]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070224
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.404 .
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   --disable-relink        relink shared libraries during install
723   --with-shlib-version=X  Specify rel or abi version for shared libs
724 Fine-Tuning Your Configuration:
725   --disable-overwrite     leave out the link to -lcurses
726   --disable-database      do not use terminfo, only fallbacks/termcap
727   --with-database=XXX     specify terminfo source to install
728   --with-hashed-db        specify hashed-database library
729   --with-fallbacks=XXX    specify list of fallback terminal descriptions
730   --without-xterm-new     specify if xterm terminfo should be old version
731   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
732   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
733   --disable-big-core      assume machine has little memory
734   --enable-termcap        compile in termcap fallback support
735   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
736   --enable-getcap         fast termcap load, no xrefs to terminfo
737   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
738   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
739   --disable-root-environ  restrict environment when running as root
740   --enable-symlinks       make tic use symbolic links not hard links
741   --enable-broken_linker  compile with broken-linker support code
742   --enable-bsdpad         recognize BSD-style prefix padding
743   --enable-widec          compile with wide-char/UTF-8 code
744   --disable-lp64          allow chtype to be long (ignore _LP64)
745   --disable-largefile     omit support for large files
746   --disable-tparm-varargs compile tparm() without varargs interface
747   --with-bool=TYPE        override fallback type of bool variable
748   --with-caps=alt         compile with alternate Caps file
749   --with-chtype=TYPE      override type of chtype
750   --with-ospeed=TYPE      override type of ospeed variable
751   --with-mmask-t=TYPE     override type of mmask_t
752   --with-rcs-ids          compile-in RCS identifiers
753 Options to Specify How Manpages are Installed:
754   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
755                           optionally formatted/catonly, e.g., gzip,formatted
756   --with-manpage-renames  specify manpage-renaming
757   --with-manpage-aliases  specify manpage-aliases using .so
758   --with-manpage-symlinks specify manpage-aliases using symlinks
759   --with-manpage-tbl      specify manpage processing with tbl
760 Extensions:
761   --disable-ext-funcs     disable function-extensions
762   --enable-const          compile with extra/non-standard const
763   --enable-no-padding     compile with $NCURSES_NO_PADDING code
764   --enable-signed-char    compile using signed Boolean's in term.h
765   --enable-sigwinch       compile with SIGWINCH handler
766   --enable-tcap-names     compile with user-definable terminal capabilities
767 Development Code:
768   --without-develop       disable development options
769   --enable-hard-tabs      compile with hard-tabs code
770   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
771 Experimental Code:
772   --disable-assumed-color do not assume anything about default-colors
773   --disable-hashmap       compile without hashmap scrolling-optimization
774   --enable-colorfgbg      compile with $COLORFGBG code
775   --enable-ext-colors     compile for experimental 256-color support
776   --enable-ext-mouse      compile for experimental mouse-encoding
777   --enable-safe-sprintf   compile with experimental safe-sprintf code
778   --disable-scroll-hints  compile without scroll-hints code
779   --enable-wgetch-events  compile with experimental wgetch-events code
780 Testing/development Options:
781   --enable-echo           build: display "compiling" commands (default)
782   --enable-warnings       build: turn on GCC compiler warnings
783   --enable-assertions     test: turn on generation of assertion code
784   --with-dmalloc          test: use Gray Watson's dmalloc library
785   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
786   --with-valgrind         test: use valgrind
787   --disable-leaks         test: free permanent memory, analyze leaks
788   --enable-expanded       test: generate functions for certain macros
789   --disable-macros        test: use functions rather than macros
790   --with-trace            test: add trace() function to all models of ncurses
791 Ada95 Binding Options:
792   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
793   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
794   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
795
796 Some influential environment variables:
797   CC          C compiler command
798   CFLAGS      C compiler flags
799   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
800               nonstandard directory <lib dir>
801   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
802               headers in a nonstandard directory <include dir>
803   CPP         C preprocessor
804   CXX         C++ compiler command
805   CXXFLAGS    C++ compiler flags
806   CXXCPP      C++ preprocessor
807
808 Use these variables to override the choices made by `configure' or to help
809 it to find libraries and programs with nonstandard names/locations.
810
811 EOF
812 fi
813
814 if test "$ac_init_help" = "recursive"; then
815   # If there are subdirs, report their specific --help.
816   ac_popdir=`pwd`
817   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
818     cd $ac_subdir
819     # A "../" for each directory in /$ac_subdir.
820     ac_dots=`echo $ac_subdir |
821              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
822
823     case $srcdir in
824     .) # No --srcdir option.  We are building in place.
825       ac_sub_srcdir=$srcdir ;;
826     [\\/]* | ?:[\\/]* ) # Absolute path.
827       ac_sub_srcdir=$srcdir/$ac_subdir ;;
828     *) # Relative path.
829       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
830     esac
831
832     # Check for guested configure; otherwise get Cygnus style configure.
833     if test -f $ac_sub_srcdir/configure.gnu; then
834       echo
835       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
836     elif test -f $ac_sub_srcdir/configure; then
837       echo
838       $SHELL $ac_sub_srcdir/configure  --help=recursive
839     elif test -f $ac_sub_srcdir/configure.ac ||
840            test -f $ac_sub_srcdir/configure.in; then
841       echo
842       $ac_configure --help
843     else
844       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
845     fi
846     cd $ac_popdir
847   done
848 fi
849
850 test -n "$ac_init_help" && exit 0
851 if $ac_init_version; then
852   cat <<\EOF
853
854 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
855 Free Software Foundation, Inc.
856 This configure script is free software; the Free Software Foundation
857 gives unlimited permission to copy, distribute and modify it.
858 EOF
859   exit 0
860 fi
861 exec 5>config.log
862 cat >&5 <<EOF
863 This file contains any messages produced by compilers while
864 running configure, to aid debugging if configure makes a mistake.
865
866 It was created by $as_me, which was
867 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
868
869   $ $0 $@
870
871 EOF
872 {
873 cat <<_ASUNAME
874 ## ---------- ##
875 ## Platform.  ##
876 ## ---------- ##
877
878 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
879 uname -m = `(uname -m) 2>/dev/null || echo unknown`
880 uname -r = `(uname -r) 2>/dev/null || echo unknown`
881 uname -s = `(uname -s) 2>/dev/null || echo unknown`
882 uname -v = `(uname -v) 2>/dev/null || echo unknown`
883
884 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
885 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
886
887 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
888 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
889 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
890 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
891 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
892 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
893 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
894
895 PATH = $PATH
896
897 _ASUNAME
898 } >&5
899
900 cat >&5 <<EOF
901 ## ------------ ##
902 ## Core tests.  ##
903 ## ------------ ##
904
905 EOF
906
907 # Keep a trace of the command line.
908 # Strip out --no-create and --no-recursion so they do not pile up.
909 # Also quote any args containing shell meta-characters.
910 ac_configure_args=
911 ac_sep=
912 for ac_arg
913 do
914   case $ac_arg in
915   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
916   | --no-cr | --no-c) ;;
917   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
918   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
919   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
920     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
921     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
922     ac_sep=" " ;;
923   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
924      ac_sep=" " ;;
925   esac
926   # Get rid of the leading space.
927 done
928
929 # When interrupted or exit'd, cleanup temporary files, and complete
930 # config.log.  We remove comments because anyway the quotes in there
931 # would cause problems or look ugly.
932 trap 'exit_status=$?
933   # Save into config.log some information that might help in debugging.
934   echo >&5
935   echo "## ----------------- ##" >&5
936   echo "## Cache variables.  ##" >&5
937   echo "## ----------------- ##" >&5
938   echo >&5
939   # The following way of writing the cache mishandles newlines in values,
940 {
941   (set) 2>&1 |
942     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
943     *ac_space=\ *)
944       sed -n \
945         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
946           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
947       ;;
948     *)
949       sed -n \
950         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
951       ;;
952     esac;
953 } >&5
954   sed "/^$/d" confdefs.h >conftest.log
955   if test -s conftest.log; then
956     echo >&5
957     echo "## ------------ ##" >&5
958     echo "## confdefs.h.  ##" >&5
959     echo "## ------------ ##" >&5
960     echo >&5
961     cat conftest.log >&5
962   fi
963   (echo; echo) >&5
964   test "$ac_signal" != 0 &&
965     echo "$as_me: caught signal $ac_signal" >&5
966   echo "$as_me: exit $exit_status" >&5
967   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
968     exit $exit_status
969      ' 0
970 for ac_signal in 1 2 13 15; do
971   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
972 done
973 ac_signal=0
974
975 # confdefs.h avoids OS command line length limits that DEFS can exceed.
976 rm -rf conftest* confdefs.h
977 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
978 echo >confdefs.h
979
980 # Let the site file select an alternate cache file if it wants to.
981 # Prefer explicitly selected file to automatically selected ones.
982 if test -z "$CONFIG_SITE"; then
983   if test "x$prefix" != xNONE; then
984     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
985   else
986     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
987   fi
988 fi
989 for ac_site_file in $CONFIG_SITE; do
990   if test -r "$ac_site_file"; then
991     { echo "$as_me:991: loading site script $ac_site_file" >&5
992 echo "$as_me: loading site script $ac_site_file" >&6;}
993     cat "$ac_site_file" >&5
994     . "$ac_site_file"
995   fi
996 done
997
998 if test -r "$cache_file"; then
999   # Some versions of bash will fail to source /dev/null (special
1000   # files actually), so we avoid doing that.
1001   if test -f "$cache_file"; then
1002     { echo "$as_me:1002: loading cache $cache_file" >&5
1003 echo "$as_me: loading cache $cache_file" >&6;}
1004     case $cache_file in
1005       [\\/]* | ?:[\\/]* ) . $cache_file;;
1006       *)                      . ./$cache_file;;
1007     esac
1008   fi
1009 else
1010   { echo "$as_me:1010: creating cache $cache_file" >&5
1011 echo "$as_me: creating cache $cache_file" >&6;}
1012   >$cache_file
1013 fi
1014
1015 # Check that the precious variables saved in the cache have kept the same
1016 # value.
1017 ac_cache_corrupted=false
1018 for ac_var in `(set) 2>&1 |
1019                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1020   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1021   eval ac_new_set=\$ac_env_${ac_var}_set
1022   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1023   eval ac_new_val="\$ac_env_${ac_var}_value"
1024   case $ac_old_set,$ac_new_set in
1025     set,)
1026       { echo "$as_me:1026: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1027 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1028       ac_cache_corrupted=: ;;
1029     ,set)
1030       { echo "$as_me:1030: error: \`$ac_var' was not set in the previous run" >&5
1031 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1032       ac_cache_corrupted=: ;;
1033     ,);;
1034     *)
1035       if test "x$ac_old_val" != "x$ac_new_val"; then
1036         { echo "$as_me:1036: error: \`$ac_var' has changed since the previous run:" >&5
1037 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1038         { echo "$as_me:1038:   former value:  $ac_old_val" >&5
1039 echo "$as_me:   former value:  $ac_old_val" >&2;}
1040         { echo "$as_me:1040:   current value: $ac_new_val" >&5
1041 echo "$as_me:   current value: $ac_new_val" >&2;}
1042         ac_cache_corrupted=:
1043       fi;;
1044   esac
1045   # Pass precious variables to config.status.  It doesn't matter if
1046   # we pass some twice (in addition to the command line arguments).
1047   if test "$ac_new_set" = set; then
1048     case $ac_new_val in
1049     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1050       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1051       ac_configure_args="$ac_configure_args '$ac_arg'"
1052       ;;
1053     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1054        ;;
1055     esac
1056   fi
1057 done
1058 if $ac_cache_corrupted; then
1059   { echo "$as_me:1059: error: changes in the environment can compromise the build" >&5
1060 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1061   { { echo "$as_me:1061: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1062 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1063    { (exit 1); exit 1; }; }
1064 fi
1065
1066 ac_ext=c
1067 ac_cpp='$CPP $CPPFLAGS'
1068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1071 ac_main_return=return
1072
1073 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1074   *c*,-n*) ECHO_N= ECHO_C='
1075 ' ECHO_T='      ' ;;
1076   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1077   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1078 esac
1079 echo "#! $SHELL" >conftest.sh
1080 echo  "exit 0"   >>conftest.sh
1081 chmod +x conftest.sh
1082 if { (echo "$as_me:1082: PATH=\".;.\"; conftest.sh") >&5
1083   (PATH=".;."; conftest.sh) 2>&5
1084   ac_status=$?
1085   echo "$as_me:1085: \$? = $ac_status" >&5
1086   (exit $ac_status); }; then
1087   ac_path_separator=';'
1088 else
1089   ac_path_separator=:
1090 fi
1091 PATH_SEPARATOR="$ac_path_separator"
1092 rm -f conftest.sh
1093
1094 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1095
1096 top_builddir=`pwd`
1097
1098 echo "$as_me:1098: checking for egrep" >&5
1099 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1100 if test "${ac_cv_prog_egrep+set}" = set; then
1101   echo $ECHO_N "(cached) $ECHO_C" >&6
1102 else
1103   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1104     then ac_cv_prog_egrep='grep -E'
1105     else ac_cv_prog_egrep='egrep'
1106     fi
1107 fi
1108 echo "$as_me:1108: result: $ac_cv_prog_egrep" >&5
1109 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1110  EGREP=$ac_cv_prog_egrep
1111
1112 test -z "$EGREP" && { { echo "$as_me:1112: error: No egrep program found" >&5
1113 echo "$as_me: error: No egrep program found" >&2;}
1114    { (exit 1); exit 1; }; }
1115
1116 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1117 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1118 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1119 cf_cv_abi_version=${NCURSES_MAJOR}
1120 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1121 cf_cv_timestamp=`date`
1122 echo "$as_me:1122: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1123 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1124
1125 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1126
1127 # Check whether --with-rel-version or --without-rel-version was given.
1128 if test "${with_rel_version+set}" = set; then
1129   withval="$with_rel_version"
1130   { echo "$as_me:1130: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1131 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1132  cf_cv_rel_version=$withval
1133 fi;
1134
1135  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1136  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1137
1138 if test -n "$NCURSES_MAJOR" ; then
1139   case $NCURSES_MAJOR in #(vi
1140   [0-9]*) #(vi
1141         ;;
1142   *)
1143         { { echo "$as_me:1143: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1144 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1145    { (exit 1); exit 1; }; }
1146         ;;
1147   esac
1148 else
1149   { { echo "$as_me:1149: error: Release major-version value is empty" >&5
1150 echo "$as_me: error: Release major-version value is empty" >&2;}
1151    { (exit 1); exit 1; }; }
1152 fi
1153
1154 if test -n "$NCURSES_MINOR" ; then
1155   case $NCURSES_MINOR in #(vi
1156   [0-9]*) #(vi
1157         ;;
1158   *)
1159         { { echo "$as_me:1159: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1160 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1161    { (exit 1); exit 1; }; }
1162         ;;
1163   esac
1164 else
1165   { { echo "$as_me:1165: error: Release minor-version value is empty" >&5
1166 echo "$as_me: error: Release minor-version value is empty" >&2;}
1167    { (exit 1); exit 1; }; }
1168 fi
1169
1170 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1171
1172 # Check whether --with-abi-version or --without-abi-version was given.
1173 if test "${with_abi_version+set}" = set; then
1174   withval="$with_abi_version"
1175   { echo "$as_me:1175: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1176 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1177  cf_cv_abi_version=$withval
1178 fi;
1179
1180 if test -n "$cf_cv_abi_version" ; then
1181   case $cf_cv_abi_version in #(vi
1182   [0-9]*) #(vi
1183         ;;
1184   *)
1185         { { echo "$as_me:1185: error: ABI version is not a number: $cf_cv_abi_version" >&5
1186 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1187    { (exit 1); exit 1; }; }
1188         ;;
1189   esac
1190 else
1191   { { echo "$as_me:1191: error: ABI version value is empty" >&5
1192 echo "$as_me: error: ABI version value is empty" >&2;}
1193    { (exit 1); exit 1; }; }
1194 fi
1195
1196 ac_aux_dir=
1197 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1198   if test -f $ac_dir/install-sh; then
1199     ac_aux_dir=$ac_dir
1200     ac_install_sh="$ac_aux_dir/install-sh -c"
1201     break
1202   elif test -f $ac_dir/install.sh; then
1203     ac_aux_dir=$ac_dir
1204     ac_install_sh="$ac_aux_dir/install.sh -c"
1205     break
1206   elif test -f $ac_dir/shtool; then
1207     ac_aux_dir=$ac_dir
1208     ac_install_sh="$ac_aux_dir/shtool install -c"
1209     break
1210   fi
1211 done
1212 if test -z "$ac_aux_dir"; then
1213   { { echo "$as_me:1213: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1214 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1218 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1219 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1220
1221 # Make sure we can run config.sub.
1222 $ac_config_sub sun4 >/dev/null 2>&1 ||
1223   { { echo "$as_me:1223: error: cannot run $ac_config_sub" >&5
1224 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1225    { (exit 1); exit 1; }; }
1226
1227 echo "$as_me:1227: checking build system type" >&5
1228 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1229 if test "${ac_cv_build+set}" = set; then
1230   echo $ECHO_N "(cached) $ECHO_C" >&6
1231 else
1232   ac_cv_build_alias=$build_alias
1233 test -z "$ac_cv_build_alias" &&
1234   ac_cv_build_alias=`$ac_config_guess`
1235 test -z "$ac_cv_build_alias" &&
1236   { { echo "$as_me:1236: error: cannot guess build type; you must specify one" >&5
1237 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1238    { (exit 1); exit 1; }; }
1239 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1240   { { echo "$as_me:1240: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1241 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1242    { (exit 1); exit 1; }; }
1243
1244 fi
1245 echo "$as_me:1245: result: $ac_cv_build" >&5
1246 echo "${ECHO_T}$ac_cv_build" >&6
1247 build=$ac_cv_build
1248 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1249 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1250 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1251
1252 echo "$as_me:1252: checking host system type" >&5
1253 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1254 if test "${ac_cv_host+set}" = set; then
1255   echo $ECHO_N "(cached) $ECHO_C" >&6
1256 else
1257   ac_cv_host_alias=$host_alias
1258 test -z "$ac_cv_host_alias" &&
1259   ac_cv_host_alias=$ac_cv_build_alias
1260 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1261   { { echo "$as_me:1261: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1262 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1263    { (exit 1); exit 1; }; }
1264
1265 fi
1266 echo "$as_me:1266: result: $ac_cv_host" >&5
1267 echo "${ECHO_T}$ac_cv_host" >&6
1268 host=$ac_cv_host
1269 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1270 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1271 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1272
1273 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1274         echo "$as_me:1274: checking target system type" >&5
1275 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1276 if test "${ac_cv_target+set}" = set; then
1277   echo $ECHO_N "(cached) $ECHO_C" >&6
1278 else
1279   ac_cv_target_alias=$target_alias
1280 test "x$ac_cv_target_alias" = "x" &&
1281   ac_cv_target_alias=$ac_cv_host_alias
1282 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1283   { { echo "$as_me:1283: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1284 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1285    { (exit 1); exit 1; }; }
1286
1287 fi
1288 echo "$as_me:1288: result: $ac_cv_target" >&5
1289 echo "${ECHO_T}$ac_cv_target" >&6
1290 target=$ac_cv_target
1291 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1292 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1293 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1294
1295 # The aliases save the names the user supplied, while $host etc.
1296 # will get canonicalized.
1297 test -n "$target_alias" &&
1298   test "$program_prefix$program_suffix$program_transform_name" = \
1299     NONENONEs,x,x, &&
1300   program_prefix=${target_alias}-
1301         system_name="$host_os"
1302 else
1303         system_name="`(uname -s -r) 2>/dev/null`"
1304         if test -z "$system_name" ; then
1305                 system_name="`(hostname) 2>/dev/null`"
1306         fi
1307 fi
1308 test -n "$system_name" && cat >>confdefs.h <<EOF
1309 #define SYSTEM_NAME "$system_name"
1310 EOF
1311
1312 if test "${cf_cv_system_name+set}" = set; then
1313   echo $ECHO_N "(cached) $ECHO_C" >&6
1314 else
1315   cf_cv_system_name="$system_name"
1316 fi
1317
1318 test -z "$system_name" && system_name="$cf_cv_system_name"
1319 test -n "$cf_cv_system_name" && echo "$as_me:1319: result: Configuring for $cf_cv_system_name" >&5
1320 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1321
1322 if test ".$system_name" != ".$cf_cv_system_name" ; then
1323         echo "$as_me:1323: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1324 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1325         { { echo "$as_me:1325: error: \"Please remove config.cache and try again.\"" >&5
1326 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1327    { (exit 1); exit 1; }; }
1328 fi
1329
1330 # Check whether --with-system-type or --without-system-type was given.
1331 if test "${with_system_type+set}" = set; then
1332   withval="$with_system_type"
1333   { echo "$as_me:1333: WARNING: overriding system type to $withval" >&5
1334 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1335  cf_cv_system_name=$withval
1336 fi;
1337
1338 ###     Save the given $CFLAGS to allow user-override.
1339 cf_user_CFLAGS="$CFLAGS"
1340
1341 ###     Default install-location
1342
1343 echo "$as_me:1343: checking for prefix" >&5
1344 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1345 if test "x$prefix" = "xNONE" ; then
1346         case "$cf_cv_system_name" in
1347                 # non-vendor systems don't have a conflict
1348         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1349                 prefix=/usr
1350                 ;;
1351         *)      prefix=$ac_default_prefix
1352                 ;;
1353         esac
1354 fi
1355 echo "$as_me:1355: result: $prefix" >&5
1356 echo "${ECHO_T}$prefix" >&6
1357
1358 if test "x$prefix" = "xNONE" ; then
1359 echo "$as_me:1359: checking for default include-directory" >&5
1360 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1361 test -n "$verbose" && echo 1>&6
1362 for cf_symbol in \
1363         $includedir \
1364         $includedir/ncurses \
1365         $prefix/include \
1366         $prefix/include/ncurses \
1367         /usr/local/include \
1368         /usr/local/include/ncurses \
1369         /usr/include \
1370         /usr/include/ncurses
1371 do
1372         cf_dir=`eval echo $cf_symbol`
1373         if test -f $cf_dir/curses.h ; then
1374         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1375                 includedir="$cf_symbol"
1376                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1377                 break
1378         fi
1379         fi
1380         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1381 done
1382 echo "$as_me:1382: result: $includedir" >&5
1383 echo "${ECHO_T}$includedir" >&6
1384 fi
1385
1386 ###     Checks for programs.
1387 ac_ext=c
1388 ac_cpp='$CPP $CPPFLAGS'
1389 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1390 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1391 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1392 ac_main_return=return
1393 if test -n "$ac_tool_prefix"; then
1394   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1395 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1396 echo "$as_me:1396: checking for $ac_word" >&5
1397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1398 if test "${ac_cv_prog_CC+set}" = set; then
1399   echo $ECHO_N "(cached) $ECHO_C" >&6
1400 else
1401   if test -n "$CC"; then
1402   ac_cv_prog_CC="$CC" # Let the user override the test.
1403 else
1404   ac_save_IFS=$IFS; IFS=$ac_path_separator
1405 ac_dummy="$PATH"
1406 for ac_dir in $ac_dummy; do
1407   IFS=$ac_save_IFS
1408   test -z "$ac_dir" && ac_dir=.
1409   $as_executable_p "$ac_dir/$ac_word" || continue
1410 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1411 echo "$as_me:1411: found $ac_dir/$ac_word" >&5
1412 break
1413 done
1414
1415 fi
1416 fi
1417 CC=$ac_cv_prog_CC
1418 if test -n "$CC"; then
1419   echo "$as_me:1419: result: $CC" >&5
1420 echo "${ECHO_T}$CC" >&6
1421 else
1422   echo "$as_me:1422: result: no" >&5
1423 echo "${ECHO_T}no" >&6
1424 fi
1425
1426 fi
1427 if test -z "$ac_cv_prog_CC"; then
1428   ac_ct_CC=$CC
1429   # Extract the first word of "gcc", so it can be a program name with args.
1430 set dummy gcc; ac_word=$2
1431 echo "$as_me:1431: checking for $ac_word" >&5
1432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1433 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   if test -n "$ac_ct_CC"; then
1437   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1438 else
1439   ac_save_IFS=$IFS; IFS=$ac_path_separator
1440 ac_dummy="$PATH"
1441 for ac_dir in $ac_dummy; do
1442   IFS=$ac_save_IFS
1443   test -z "$ac_dir" && ac_dir=.
1444   $as_executable_p "$ac_dir/$ac_word" || continue
1445 ac_cv_prog_ac_ct_CC="gcc"
1446 echo "$as_me:1446: found $ac_dir/$ac_word" >&5
1447 break
1448 done
1449
1450 fi
1451 fi
1452 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1453 if test -n "$ac_ct_CC"; then
1454   echo "$as_me:1454: result: $ac_ct_CC" >&5
1455 echo "${ECHO_T}$ac_ct_CC" >&6
1456 else
1457   echo "$as_me:1457: result: no" >&5
1458 echo "${ECHO_T}no" >&6
1459 fi
1460
1461   CC=$ac_ct_CC
1462 else
1463   CC="$ac_cv_prog_CC"
1464 fi
1465
1466 if test -z "$CC"; then
1467   if test -n "$ac_tool_prefix"; then
1468   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1469 set dummy ${ac_tool_prefix}cc; ac_word=$2
1470 echo "$as_me:1470: checking for $ac_word" >&5
1471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1472 if test "${ac_cv_prog_CC+set}" = set; then
1473   echo $ECHO_N "(cached) $ECHO_C" >&6
1474 else
1475   if test -n "$CC"; then
1476   ac_cv_prog_CC="$CC" # Let the user override the test.
1477 else
1478   ac_save_IFS=$IFS; IFS=$ac_path_separator
1479 ac_dummy="$PATH"
1480 for ac_dir in $ac_dummy; do
1481   IFS=$ac_save_IFS
1482   test -z "$ac_dir" && ac_dir=.
1483   $as_executable_p "$ac_dir/$ac_word" || continue
1484 ac_cv_prog_CC="${ac_tool_prefix}cc"
1485 echo "$as_me:1485: found $ac_dir/$ac_word" >&5
1486 break
1487 done
1488
1489 fi
1490 fi
1491 CC=$ac_cv_prog_CC
1492 if test -n "$CC"; then
1493   echo "$as_me:1493: result: $CC" >&5
1494 echo "${ECHO_T}$CC" >&6
1495 else
1496   echo "$as_me:1496: result: no" >&5
1497 echo "${ECHO_T}no" >&6
1498 fi
1499
1500 fi
1501 if test -z "$ac_cv_prog_CC"; then
1502   ac_ct_CC=$CC
1503   # Extract the first word of "cc", so it can be a program name with args.
1504 set dummy cc; ac_word=$2
1505 echo "$as_me:1505: checking for $ac_word" >&5
1506 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1507 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1508   echo $ECHO_N "(cached) $ECHO_C" >&6
1509 else
1510   if test -n "$ac_ct_CC"; then
1511   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1512 else
1513   ac_save_IFS=$IFS; IFS=$ac_path_separator
1514 ac_dummy="$PATH"
1515 for ac_dir in $ac_dummy; do
1516   IFS=$ac_save_IFS
1517   test -z "$ac_dir" && ac_dir=.
1518   $as_executable_p "$ac_dir/$ac_word" || continue
1519 ac_cv_prog_ac_ct_CC="cc"
1520 echo "$as_me:1520: found $ac_dir/$ac_word" >&5
1521 break
1522 done
1523
1524 fi
1525 fi
1526 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1527 if test -n "$ac_ct_CC"; then
1528   echo "$as_me:1528: result: $ac_ct_CC" >&5
1529 echo "${ECHO_T}$ac_ct_CC" >&6
1530 else
1531   echo "$as_me:1531: result: no" >&5
1532 echo "${ECHO_T}no" >&6
1533 fi
1534
1535   CC=$ac_ct_CC
1536 else
1537   CC="$ac_cv_prog_CC"
1538 fi
1539
1540 fi
1541 if test -z "$CC"; then
1542   # Extract the first word of "cc", so it can be a program name with args.
1543 set dummy cc; ac_word=$2
1544 echo "$as_me:1544: checking for $ac_word" >&5
1545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1546 if test "${ac_cv_prog_CC+set}" = set; then
1547   echo $ECHO_N "(cached) $ECHO_C" >&6
1548 else
1549   if test -n "$CC"; then
1550   ac_cv_prog_CC="$CC" # Let the user override the test.
1551 else
1552   ac_prog_rejected=no
1553   ac_save_IFS=$IFS; IFS=$ac_path_separator
1554 ac_dummy="$PATH"
1555 for ac_dir in $ac_dummy; do
1556   IFS=$ac_save_IFS
1557   test -z "$ac_dir" && ac_dir=.
1558   $as_executable_p "$ac_dir/$ac_word" || continue
1559 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1560   ac_prog_rejected=yes
1561   continue
1562 fi
1563 ac_cv_prog_CC="cc"
1564 echo "$as_me:1564: found $ac_dir/$ac_word" >&5
1565 break
1566 done
1567
1568 if test $ac_prog_rejected = yes; then
1569   # We found a bogon in the path, so make sure we never use it.
1570   set dummy $ac_cv_prog_CC
1571   shift
1572   if test $# != 0; then
1573     # We chose a different compiler from the bogus one.
1574     # However, it has the same basename, so the bogon will be chosen
1575     # first if we set CC to just the basename; use the full file name.
1576     shift
1577     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1578     shift
1579     ac_cv_prog_CC="$@"
1580   fi
1581 fi
1582 fi
1583 fi
1584 CC=$ac_cv_prog_CC
1585 if test -n "$CC"; then
1586   echo "$as_me:1586: result: $CC" >&5
1587 echo "${ECHO_T}$CC" >&6
1588 else
1589   echo "$as_me:1589: result: no" >&5
1590 echo "${ECHO_T}no" >&6
1591 fi
1592
1593 fi
1594 if test -z "$CC"; then
1595   if test -n "$ac_tool_prefix"; then
1596   for ac_prog in cl
1597   do
1598     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1599 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1600 echo "$as_me:1600: checking for $ac_word" >&5
1601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1602 if test "${ac_cv_prog_CC+set}" = set; then
1603   echo $ECHO_N "(cached) $ECHO_C" >&6
1604 else
1605   if test -n "$CC"; then
1606   ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608   ac_save_IFS=$IFS; IFS=$ac_path_separator
1609 ac_dummy="$PATH"
1610 for ac_dir in $ac_dummy; do
1611   IFS=$ac_save_IFS
1612   test -z "$ac_dir" && ac_dir=.
1613   $as_executable_p "$ac_dir/$ac_word" || continue
1614 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1615 echo "$as_me:1615: found $ac_dir/$ac_word" >&5
1616 break
1617 done
1618
1619 fi
1620 fi
1621 CC=$ac_cv_prog_CC
1622 if test -n "$CC"; then
1623   echo "$as_me:1623: result: $CC" >&5
1624 echo "${ECHO_T}$CC" >&6
1625 else
1626   echo "$as_me:1626: result: no" >&5
1627 echo "${ECHO_T}no" >&6
1628 fi
1629
1630     test -n "$CC" && break
1631   done
1632 fi
1633 if test -z "$CC"; then
1634   ac_ct_CC=$CC
1635   for ac_prog in cl
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   if test -n "$ac_ct_CC"; then
1645   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1646 else
1647   ac_save_IFS=$IFS; IFS=$ac_path_separator
1648 ac_dummy="$PATH"
1649 for ac_dir in $ac_dummy; do
1650   IFS=$ac_save_IFS
1651   test -z "$ac_dir" && ac_dir=.
1652   $as_executable_p "$ac_dir/$ac_word" || continue
1653 ac_cv_prog_ac_ct_CC="$ac_prog"
1654 echo "$as_me:1654: found $ac_dir/$ac_word" >&5
1655 break
1656 done
1657
1658 fi
1659 fi
1660 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1661 if test -n "$ac_ct_CC"; then
1662   echo "$as_me:1662: result: $ac_ct_CC" >&5
1663 echo "${ECHO_T}$ac_ct_CC" >&6
1664 else
1665   echo "$as_me:1665: result: no" >&5
1666 echo "${ECHO_T}no" >&6
1667 fi
1668
1669   test -n "$ac_ct_CC" && break
1670 done
1671
1672   CC=$ac_ct_CC
1673 fi
1674
1675 fi
1676
1677 test -z "$CC" && { { echo "$as_me:1677: error: no acceptable cc found in \$PATH" >&5
1678 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1679    { (exit 1); exit 1; }; }
1680
1681 # Provide some information about the compiler.
1682 echo "$as_me:1682:" \
1683      "checking for C compiler version" >&5
1684 ac_compiler=`set X $ac_compile; echo $2`
1685 { (eval echo "$as_me:1685: \"$ac_compiler --version </dev/null >&5\"") >&5
1686   (eval $ac_compiler --version </dev/null >&5) 2>&5
1687   ac_status=$?
1688   echo "$as_me:1688: \$? = $ac_status" >&5
1689   (exit $ac_status); }
1690 { (eval echo "$as_me:1690: \"$ac_compiler -v </dev/null >&5\"") >&5
1691   (eval $ac_compiler -v </dev/null >&5) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }
1695 { (eval echo "$as_me:1695: \"$ac_compiler -V </dev/null >&5\"") >&5
1696   (eval $ac_compiler -V </dev/null >&5) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }
1700
1701 cat >conftest.$ac_ext <<_ACEOF
1702 #line 1702 "configure"
1703 #include "confdefs.h"
1704
1705 int
1706 main ()
1707 {
1708
1709   ;
1710   return 0;
1711 }
1712 _ACEOF
1713 ac_clean_files_save=$ac_clean_files
1714 ac_clean_files="$ac_clean_files a.out a.exe"
1715 # Try to create an executable without -o first, disregard a.out.
1716 # It will help us diagnose broken compilers, and finding out an intuition
1717 # of exeext.
1718 echo "$as_me:1718: checking for C compiler default output" >&5
1719 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1720 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1721 if { (eval echo "$as_me:1721: \"$ac_link_default\"") >&5
1722   (eval $ac_link_default) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); }; then
1726   # Find the output, starting from the most likely.  This scheme is
1727 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1728 # resort.
1729 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1730                 ls a.out conftest 2>/dev/null;
1731                 ls a.* conftest.* 2>/dev/null`; do
1732   case $ac_file in
1733     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1734     a.out ) # We found the default executable, but exeext='' is most
1735             # certainly right.
1736             break;;
1737     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1738           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1739           export ac_cv_exeext
1740           break;;
1741     * ) break;;
1742   esac
1743 done
1744 else
1745   echo "$as_me: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1747 { { echo "$as_me:1747: error: C compiler cannot create executables" >&5
1748 echo "$as_me: error: C compiler cannot create executables" >&2;}
1749    { (exit 77); exit 77; }; }
1750 fi
1751
1752 ac_exeext=$ac_cv_exeext
1753 echo "$as_me:1753: result: $ac_file" >&5
1754 echo "${ECHO_T}$ac_file" >&6
1755
1756 # Check the compiler produces executables we can run.  If not, either
1757 # the compiler is broken, or we cross compile.
1758 echo "$as_me:1758: checking whether the C compiler works" >&5
1759 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1760 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1761 # If not cross compiling, check that we can run a simple program.
1762 if test "$cross_compiling" != yes; then
1763   if { ac_try='./$ac_file'
1764   { (eval echo "$as_me:1764: \"$ac_try\"") >&5
1765   (eval $ac_try) 2>&5
1766   ac_status=$?
1767   echo "$as_me:1767: \$? = $ac_status" >&5
1768   (exit $ac_status); }; }; then
1769     cross_compiling=no
1770   else
1771     if test "$cross_compiling" = maybe; then
1772         cross_compiling=yes
1773     else
1774         { { echo "$as_me:1774: error: cannot run C compiled programs.
1775 If you meant to cross compile, use \`--host'." >&5
1776 echo "$as_me: error: cannot run C compiled programs.
1777 If you meant to cross compile, use \`--host'." >&2;}
1778    { (exit 1); exit 1; }; }
1779     fi
1780   fi
1781 fi
1782 echo "$as_me:1782: result: yes" >&5
1783 echo "${ECHO_T}yes" >&6
1784
1785 rm -f a.out a.exe conftest$ac_cv_exeext
1786 ac_clean_files=$ac_clean_files_save
1787 # Check the compiler produces executables we can run.  If not, either
1788 # the compiler is broken, or we cross compile.
1789 echo "$as_me:1789: checking whether we are cross compiling" >&5
1790 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1791 echo "$as_me:1791: result: $cross_compiling" >&5
1792 echo "${ECHO_T}$cross_compiling" >&6
1793
1794 echo "$as_me:1794: checking for executable suffix" >&5
1795 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1796 if { (eval echo "$as_me:1796: \"$ac_link\"") >&5
1797   (eval $ac_link) 2>&5
1798   ac_status=$?
1799   echo "$as_me:1799: \$? = $ac_status" >&5
1800   (exit $ac_status); }; then
1801   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1802 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1803 # work properly (i.e., refer to `conftest.exe'), while it won't with
1804 # `rm'.
1805 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1806   case $ac_file in
1807     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1808     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1809           export ac_cv_exeext
1810           break;;
1811     * ) break;;
1812   esac
1813 done
1814 else
1815   { { echo "$as_me:1815: error: cannot compute EXEEXT: cannot compile and link" >&5
1816 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1817    { (exit 1); exit 1; }; }
1818 fi
1819
1820 rm -f conftest$ac_cv_exeext
1821 echo "$as_me:1821: result: $ac_cv_exeext" >&5
1822 echo "${ECHO_T}$ac_cv_exeext" >&6
1823
1824 rm -f conftest.$ac_ext
1825 EXEEXT=$ac_cv_exeext
1826 ac_exeext=$EXEEXT
1827 echo "$as_me:1827: checking for object suffix" >&5
1828 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1829 if test "${ac_cv_objext+set}" = set; then
1830   echo $ECHO_N "(cached) $ECHO_C" >&6
1831 else
1832   cat >conftest.$ac_ext <<_ACEOF
1833 #line 1833 "configure"
1834 #include "confdefs.h"
1835
1836 int
1837 main ()
1838 {
1839
1840   ;
1841   return 0;
1842 }
1843 _ACEOF
1844 rm -f conftest.o conftest.obj
1845 if { (eval echo "$as_me:1845: \"$ac_compile\"") >&5
1846   (eval $ac_compile) 2>&5
1847   ac_status=$?
1848   echo "$as_me:1848: \$? = $ac_status" >&5
1849   (exit $ac_status); }; then
1850   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1851   case $ac_file in
1852     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1853     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1854        break;;
1855   esac
1856 done
1857 else
1858   echo "$as_me: failed program was:" >&5
1859 cat conftest.$ac_ext >&5
1860 { { echo "$as_me:1860: error: cannot compute OBJEXT: cannot compile" >&5
1861 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1862    { (exit 1); exit 1; }; }
1863 fi
1864
1865 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1866 fi
1867 echo "$as_me:1867: result: $ac_cv_objext" >&5
1868 echo "${ECHO_T}$ac_cv_objext" >&6
1869 OBJEXT=$ac_cv_objext
1870 ac_objext=$OBJEXT
1871 echo "$as_me:1871: checking whether we are using the GNU C compiler" >&5
1872 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1873 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1874   echo $ECHO_N "(cached) $ECHO_C" >&6
1875 else
1876   cat >conftest.$ac_ext <<_ACEOF
1877 #line 1877 "configure"
1878 #include "confdefs.h"
1879
1880 int
1881 main ()
1882 {
1883 #ifndef __GNUC__
1884        choke me
1885 #endif
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 rm -f conftest.$ac_objext
1892 if { (eval echo "$as_me:1892: \"$ac_compile\"") >&5
1893   (eval $ac_compile) 2>&5
1894   ac_status=$?
1895   echo "$as_me:1895: \$? = $ac_status" >&5
1896   (exit $ac_status); } &&
1897          { ac_try='test -s conftest.$ac_objext'
1898   { (eval echo "$as_me:1898: \"$ac_try\"") >&5
1899   (eval $ac_try) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); }; }; then
1903   ac_compiler_gnu=yes
1904 else
1905   echo "$as_me: failed program was:" >&5
1906 cat conftest.$ac_ext >&5
1907 ac_compiler_gnu=no
1908 fi
1909 rm -f conftest.$ac_objext conftest.$ac_ext
1910 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1911
1912 fi
1913 echo "$as_me:1913: result: $ac_cv_c_compiler_gnu" >&5
1914 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1915 GCC=`test $ac_compiler_gnu = yes && echo yes`
1916 ac_test_CFLAGS=${CFLAGS+set}
1917 ac_save_CFLAGS=$CFLAGS
1918 CFLAGS="-g"
1919 echo "$as_me:1919: checking whether $CC accepts -g" >&5
1920 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1921 if test "${ac_cv_prog_cc_g+set}" = set; then
1922   echo $ECHO_N "(cached) $ECHO_C" >&6
1923 else
1924   cat >conftest.$ac_ext <<_ACEOF
1925 #line 1925 "configure"
1926 #include "confdefs.h"
1927
1928 int
1929 main ()
1930 {
1931
1932   ;
1933   return 0;
1934 }
1935 _ACEOF
1936 rm -f conftest.$ac_objext
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938   (eval $ac_compile) 2>&5
1939   ac_status=$?
1940   echo "$as_me:1940: \$? = $ac_status" >&5
1941   (exit $ac_status); } &&
1942          { ac_try='test -s conftest.$ac_objext'
1943   { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1944   (eval $ac_try) 2>&5
1945   ac_status=$?
1946   echo "$as_me:1946: \$? = $ac_status" >&5
1947   (exit $ac_status); }; }; then
1948   ac_cv_prog_cc_g=yes
1949 else
1950   echo "$as_me: failed program was:" >&5
1951 cat conftest.$ac_ext >&5
1952 ac_cv_prog_cc_g=no
1953 fi
1954 rm -f conftest.$ac_objext conftest.$ac_ext
1955 fi
1956 echo "$as_me:1956: result: $ac_cv_prog_cc_g" >&5
1957 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1958 if test "$ac_test_CFLAGS" = set; then
1959   CFLAGS=$ac_save_CFLAGS
1960 elif test $ac_cv_prog_cc_g = yes; then
1961   if test "$GCC" = yes; then
1962     CFLAGS="-g -O2"
1963   else
1964     CFLAGS="-g"
1965   fi
1966 else
1967   if test "$GCC" = yes; then
1968     CFLAGS="-O2"
1969   else
1970     CFLAGS=
1971   fi
1972 fi
1973 # Some people use a C++ compiler to compile C.  Since we use `exit',
1974 # in C++ we need to declare it.  In case someone uses the same compiler
1975 # for both compiling C and C++ we need to have the C++ compiler decide
1976 # the declaration of exit, since it's the most demanding environment.
1977 cat >conftest.$ac_ext <<_ACEOF
1978 #ifndef __cplusplus
1979   choke me
1980 #endif
1981 _ACEOF
1982 rm -f conftest.$ac_objext
1983 if { (eval echo "$as_me:1983: \"$ac_compile\"") >&5
1984   (eval $ac_compile) 2>&5
1985   ac_status=$?
1986   echo "$as_me:1986: \$? = $ac_status" >&5
1987   (exit $ac_status); } &&
1988          { ac_try='test -s conftest.$ac_objext'
1989   { (eval echo "$as_me:1989: \"$ac_try\"") >&5
1990   (eval $ac_try) 2>&5
1991   ac_status=$?
1992   echo "$as_me:1992: \$? = $ac_status" >&5
1993   (exit $ac_status); }; }; then
1994   for ac_declaration in \
1995    ''\
1996    '#include <stdlib.h>' \
1997    'extern "C" void std::exit (int) throw (); using std::exit;' \
1998    'extern "C" void std::exit (int); using std::exit;' \
1999    'extern "C" void exit (int) throw ();' \
2000    'extern "C" void exit (int);' \
2001    'void exit (int);'
2002 do
2003   cat >conftest.$ac_ext <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2006 #include <stdlib.h>
2007 $ac_declaration
2008 int
2009 main ()
2010 {
2011 exit (42);
2012   ;
2013   return 0;
2014 }
2015 _ACEOF
2016 rm -f conftest.$ac_objext
2017 if { (eval echo "$as_me:2017: \"$ac_compile\"") >&5
2018   (eval $ac_compile) 2>&5
2019   ac_status=$?
2020   echo "$as_me:2020: \$? = $ac_status" >&5
2021   (exit $ac_status); } &&
2022          { ac_try='test -s conftest.$ac_objext'
2023   { (eval echo "$as_me:2023: \"$ac_try\"") >&5
2024   (eval $ac_try) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit $ac_status); }; }; then
2028   :
2029 else
2030   echo "$as_me: failed program was:" >&5
2031 cat conftest.$ac_ext >&5
2032 continue
2033 fi
2034 rm -f conftest.$ac_objext conftest.$ac_ext
2035   cat >conftest.$ac_ext <<_ACEOF
2036 #line 2036 "configure"
2037 #include "confdefs.h"
2038 $ac_declaration
2039 int
2040 main ()
2041 {
2042 exit (42);
2043   ;
2044   return 0;
2045 }
2046 _ACEOF
2047 rm -f conftest.$ac_objext
2048 if { (eval echo "$as_me:2048: \"$ac_compile\"") >&5
2049   (eval $ac_compile) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); } &&
2053          { ac_try='test -s conftest.$ac_objext'
2054   { (eval echo "$as_me:2054: \"$ac_try\"") >&5
2055   (eval $ac_try) 2>&5
2056   ac_status=$?
2057   echo "$as_me:2057: \$? = $ac_status" >&5
2058   (exit $ac_status); }; }; then
2059   break
2060 else
2061   echo "$as_me: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 fi
2064 rm -f conftest.$ac_objext conftest.$ac_ext
2065 done
2066 rm -f conftest*
2067 if test -n "$ac_declaration"; then
2068   echo '#ifdef __cplusplus' >>confdefs.h
2069   echo $ac_declaration      >>confdefs.h
2070   echo '#endif'             >>confdefs.h
2071 fi
2072
2073 else
2074   echo "$as_me: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2076 fi
2077 rm -f conftest.$ac_objext conftest.$ac_ext
2078 ac_ext=c
2079 ac_cpp='$CPP $CPPFLAGS'
2080 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2081 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2082 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2083 ac_main_return=return
2084
2085 GCC_VERSION=none
2086 if test "$GCC" = yes ; then
2087         echo "$as_me:2087: checking version of $CC" >&5
2088 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2089         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2090         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2091         echo "$as_me:2091: result: $GCC_VERSION" >&5
2092 echo "${ECHO_T}$GCC_VERSION" >&6
2093 fi
2094
2095 ac_ext=c
2096 ac_cpp='$CPP $CPPFLAGS'
2097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2100 ac_main_return=return
2101 echo "$as_me:2101: checking how to run the C preprocessor" >&5
2102 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2103 # On Suns, sometimes $CPP names a directory.
2104 if test -n "$CPP" && test -d "$CPP"; then
2105   CPP=
2106 fi
2107 if test -z "$CPP"; then
2108   if test "${ac_cv_prog_CPP+set}" = set; then
2109   echo $ECHO_N "(cached) $ECHO_C" >&6
2110 else
2111       # Double quotes because CPP needs to be expanded
2112     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2113     do
2114       ac_preproc_ok=false
2115 for ac_c_preproc_warn_flag in '' yes
2116 do
2117   # Use a header file that comes with gcc, so configuring glibc
2118   # with a fresh cross-compiler works.
2119   # On the NeXT, cc -E runs the code through the compiler's parser,
2120   # not just through cpp. "Syntax error" is here to catch this case.
2121   cat >conftest.$ac_ext <<_ACEOF
2122 #line 2122 "configure"
2123 #include "confdefs.h"
2124 #include <assert.h>
2125                      Syntax error
2126 _ACEOF
2127 if { (eval echo "$as_me:2127: \"$ac_cpp conftest.$ac_ext\"") >&5
2128   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2129   ac_status=$?
2130   egrep -v '^ *\+' conftest.er1 >conftest.err
2131   rm -f conftest.er1
2132   cat conftest.err >&5
2133   echo "$as_me:2133: \$? = $ac_status" >&5
2134   (exit $ac_status); } >/dev/null; then
2135   if test -s conftest.err; then
2136     ac_cpp_err=$ac_c_preproc_warn_flag
2137   else
2138     ac_cpp_err=
2139   fi
2140 else
2141   ac_cpp_err=yes
2142 fi
2143 if test -z "$ac_cpp_err"; then
2144   :
2145 else
2146   echo "$as_me: failed program was:" >&5
2147   cat conftest.$ac_ext >&5
2148   # Broken: fails on valid input.
2149 continue
2150 fi
2151 rm -f conftest.err conftest.$ac_ext
2152
2153   # OK, works on sane cases.  Now check whether non-existent headers
2154   # can be detected and how.
2155   cat >conftest.$ac_ext <<_ACEOF
2156 #line 2156 "configure"
2157 #include "confdefs.h"
2158 #include <ac_nonexistent.h>
2159 _ACEOF
2160 if { (eval echo "$as_me:2160: \"$ac_cpp conftest.$ac_ext\"") >&5
2161   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2162   ac_status=$?
2163   egrep -v '^ *\+' conftest.er1 >conftest.err
2164   rm -f conftest.er1
2165   cat conftest.err >&5
2166   echo "$as_me:2166: \$? = $ac_status" >&5
2167   (exit $ac_status); } >/dev/null; then
2168   if test -s conftest.err; then
2169     ac_cpp_err=$ac_c_preproc_warn_flag
2170   else
2171     ac_cpp_err=
2172   fi
2173 else
2174   ac_cpp_err=yes
2175 fi
2176 if test -z "$ac_cpp_err"; then
2177   # Broken: success on invalid input.
2178 continue
2179 else
2180   echo "$as_me: failed program was:" >&5
2181   cat conftest.$ac_ext >&5
2182   # Passes both tests.
2183 ac_preproc_ok=:
2184 break
2185 fi
2186 rm -f conftest.err conftest.$ac_ext
2187
2188 done
2189 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2190 rm -f conftest.err conftest.$ac_ext
2191 if $ac_preproc_ok; then
2192   break
2193 fi
2194
2195     done
2196     ac_cv_prog_CPP=$CPP
2197
2198 fi
2199   CPP=$ac_cv_prog_CPP
2200 else
2201   ac_cv_prog_CPP=$CPP
2202 fi
2203 echo "$as_me:2203: result: $CPP" >&5
2204 echo "${ECHO_T}$CPP" >&6
2205 ac_preproc_ok=false
2206 for ac_c_preproc_warn_flag in '' yes
2207 do
2208   # Use a header file that comes with gcc, so configuring glibc
2209   # with a fresh cross-compiler works.
2210   # On the NeXT, cc -E runs the code through the compiler's parser,
2211   # not just through cpp. "Syntax error" is here to catch this case.
2212   cat >conftest.$ac_ext <<_ACEOF
2213 #line 2213 "configure"
2214 #include "confdefs.h"
2215 #include <assert.h>
2216                      Syntax error
2217 _ACEOF
2218 if { (eval echo "$as_me:2218: \"$ac_cpp conftest.$ac_ext\"") >&5
2219   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2220   ac_status=$?
2221   egrep -v '^ *\+' conftest.er1 >conftest.err
2222   rm -f conftest.er1
2223   cat conftest.err >&5
2224   echo "$as_me:2224: \$? = $ac_status" >&5
2225   (exit $ac_status); } >/dev/null; then
2226   if test -s conftest.err; then
2227     ac_cpp_err=$ac_c_preproc_warn_flag
2228   else
2229     ac_cpp_err=
2230   fi
2231 else
2232   ac_cpp_err=yes
2233 fi
2234 if test -z "$ac_cpp_err"; then
2235   :
2236 else
2237   echo "$as_me: failed program was:" >&5
2238   cat conftest.$ac_ext >&5
2239   # Broken: fails on valid input.
2240 continue
2241 fi
2242 rm -f conftest.err conftest.$ac_ext
2243
2244   # OK, works on sane cases.  Now check whether non-existent headers
2245   # can be detected and how.
2246   cat >conftest.$ac_ext <<_ACEOF
2247 #line 2247 "configure"
2248 #include "confdefs.h"
2249 #include <ac_nonexistent.h>
2250 _ACEOF
2251 if { (eval echo "$as_me:2251: \"$ac_cpp conftest.$ac_ext\"") >&5
2252   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2253   ac_status=$?
2254   egrep -v '^ *\+' conftest.er1 >conftest.err
2255   rm -f conftest.er1
2256   cat conftest.err >&5
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit $ac_status); } >/dev/null; then
2259   if test -s conftest.err; then
2260     ac_cpp_err=$ac_c_preproc_warn_flag
2261   else
2262     ac_cpp_err=
2263   fi
2264 else
2265   ac_cpp_err=yes
2266 fi
2267 if test -z "$ac_cpp_err"; then
2268   # Broken: success on invalid input.
2269 continue
2270 else
2271   echo "$as_me: failed program was:" >&5
2272   cat conftest.$ac_ext >&5
2273   # Passes both tests.
2274 ac_preproc_ok=:
2275 break
2276 fi
2277 rm -f conftest.err conftest.$ac_ext
2278
2279 done
2280 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2281 rm -f conftest.err conftest.$ac_ext
2282 if $ac_preproc_ok; then
2283   :
2284 else
2285   { { echo "$as_me:2285: error: C preprocessor \"$CPP\" fails sanity check" >&5
2286 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2287    { (exit 1); exit 1; }; }
2288 fi
2289
2290 ac_ext=c
2291 ac_cpp='$CPP $CPPFLAGS'
2292 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2293 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2294 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2295 ac_main_return=return
2296
2297 if test $ac_cv_c_compiler_gnu = yes; then
2298     echo "$as_me:2298: checking whether $CC needs -traditional" >&5
2299 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2300 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2301   echo $ECHO_N "(cached) $ECHO_C" >&6
2302 else
2303     ac_pattern="Autoconf.*'x'"
2304   cat >conftest.$ac_ext <<_ACEOF
2305 #line 2305 "configure"
2306 #include "confdefs.h"
2307 #include <sgtty.h>
2308 int Autoconf = TIOCGETP;
2309 _ACEOF
2310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2311   egrep "$ac_pattern" >/dev/null 2>&1; then
2312   ac_cv_prog_gcc_traditional=yes
2313 else
2314   ac_cv_prog_gcc_traditional=no
2315 fi
2316 rm -f conftest*
2317
2318   if test $ac_cv_prog_gcc_traditional = no; then
2319     cat >conftest.$ac_ext <<_ACEOF
2320 #line 2320 "configure"
2321 #include "confdefs.h"
2322 #include <termio.h>
2323 int Autoconf = TCGETA;
2324 _ACEOF
2325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2326   egrep "$ac_pattern" >/dev/null 2>&1; then
2327   ac_cv_prog_gcc_traditional=yes
2328 fi
2329 rm -f conftest*
2330
2331   fi
2332 fi
2333 echo "$as_me:2333: result: $ac_cv_prog_gcc_traditional" >&5
2334 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2335   if test $ac_cv_prog_gcc_traditional = yes; then
2336     CC="$CC -traditional"
2337   fi
2338 fi
2339
2340 echo "$as_me:2340: checking whether $CC understands -c and -o together" >&5
2341 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2342 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345
2346 cat > conftest.$ac_ext <<CF_EOF
2347 #include <stdio.h>
2348 int main()
2349 {
2350         ${cf_cv_main_return:-return}(0);
2351 }
2352 CF_EOF
2353 # We do the test twice because some compilers refuse to overwrite an
2354 # existing .o file with -o, though they will create one.
2355 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2356 if { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit $ac_status); } &&
2361   test -f conftest2.$ac_objext && { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit $ac_status); };
2366 then
2367   eval cf_cv_prog_CC_c_o=yes
2368 else
2369   eval cf_cv_prog_CC_c_o=no
2370 fi
2371 rm -f conftest*
2372
2373 fi
2374 if test $cf_cv_prog_CC_c_o = yes; then
2375   echo "$as_me:2375: result: yes" >&5
2376 echo "${ECHO_T}yes" >&6
2377 else
2378   echo "$as_me:2378: result: no" >&5
2379 echo "${ECHO_T}no" >&6
2380 fi
2381
2382 echo "$as_me:2382: checking for POSIXized ISC" >&5
2383 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2384 if test -d /etc/conf/kconfig.d &&
2385    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2386 then
2387   echo "$as_me:2387: result: yes" >&5
2388 echo "${ECHO_T}yes" >&6
2389   ISC=yes # If later tests want to check for ISC.
2390
2391 cat >>confdefs.h <<\EOF
2392 #define _POSIX_SOURCE 1
2393 EOF
2394
2395   if test "$GCC" = yes; then
2396     CC="$CC -posix"
2397   else
2398     CC="$CC -Xp"
2399   fi
2400 else
2401   echo "$as_me:2401: result: no" >&5
2402 echo "${ECHO_T}no" >&6
2403   ISC=
2404 fi
2405
2406 echo "$as_me:2406: checking for ${CC-cc} option to accept ANSI C" >&5
2407 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2408 if test "${cf_cv_ansi_cc+set}" = set; then
2409   echo $ECHO_N "(cached) $ECHO_C" >&6
2410 else
2411
2412 cf_cv_ansi_cc=no
2413 cf_save_CFLAGS="$CFLAGS"
2414 cf_save_CPPFLAGS="$CPPFLAGS"
2415 # Don't try gcc -ansi; that turns off useful extensions and
2416 # breaks some systems' header files.
2417 # AIX                   -qlanglvl=ansi
2418 # Ultrix and OSF/1      -std1
2419 # HP-UX                 -Aa -D_HPUX_SOURCE
2420 # SVR4                  -Xc
2421 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2422 for cf_arg in "-DCC_HAS_PROTOS" \
2423         "" \
2424         -qlanglvl=ansi \
2425         -std1 \
2426         -Ae \
2427         "-Aa -D_HPUX_SOURCE" \
2428         -Xc
2429 do
2430
2431 cf_fix_cppflags=no
2432 cf_new_cflags=
2433 cf_new_cppflags=
2434 cf_new_extra_cppflags=
2435
2436 for cf_add_cflags in $cf_arg
2437 do
2438 case $cf_fix_cppflags in
2439 no)
2440         case $cf_add_cflags in #(vi
2441         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2442                 case $cf_add_cflags in
2443                 -D*)
2444                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2445
2446                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2447                         && test -z "${cf_tst_cflags}" \
2448                         && cf_fix_cppflags=yes
2449
2450                         if test $cf_fix_cppflags = yes ; then
2451                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2452                                 continue
2453                         elif test "${cf_tst_cflags}" = "\"'" ; then
2454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2455                                 continue
2456                         fi
2457                         ;;
2458                 esac
2459                 case "$CPPFLAGS" in
2460                 *$cf_add_cflags) #(vi
2461                         ;;
2462                 *) #(vi
2463                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2464                         ;;
2465                 esac
2466                 ;;
2467         *)
2468                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2469                 ;;
2470         esac
2471         ;;
2472 yes)
2473         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2474
2475         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2476
2477         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2478         && test -z "${cf_tst_cflags}" \
2479         && cf_fix_cppflags=no
2480         ;;
2481 esac
2482 done
2483
2484 if test -n "$cf_new_cflags" ; then
2485
2486         CFLAGS="$CFLAGS $cf_new_cflags"
2487 fi
2488
2489 if test -n "$cf_new_cppflags" ; then
2490
2491         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2492 fi
2493
2494 if test -n "$cf_new_extra_cppflags" ; then
2495
2496         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2497 fi
2498
2499         cat >conftest.$ac_ext <<_ACEOF
2500 #line 2500 "configure"
2501 #include "confdefs.h"
2502
2503 #ifndef CC_HAS_PROTOS
2504 #if !defined(__STDC__) || (__STDC__ != 1)
2505 choke me
2506 #endif
2507 #endif
2508
2509 int
2510 main ()
2511 {
2512
2513         int test (int i, double x);
2514         struct s1 {int (*f) (int a);};
2515         struct s2 {int (*f) (double a);};
2516   ;
2517   return 0;
2518 }
2519 _ACEOF
2520 rm -f conftest.$ac_objext
2521 if { (eval echo "$as_me:2521: \"$ac_compile\"") >&5
2522   (eval $ac_compile) 2>&5
2523   ac_status=$?
2524   echo "$as_me:2524: \$? = $ac_status" >&5
2525   (exit $ac_status); } &&
2526          { ac_try='test -s conftest.$ac_objext'
2527   { (eval echo "$as_me:2527: \"$ac_try\"") >&5
2528   (eval $ac_try) 2>&5
2529   ac_status=$?
2530   echo "$as_me:2530: \$? = $ac_status" >&5
2531   (exit $ac_status); }; }; then
2532   cf_cv_ansi_cc="$cf_arg"; break
2533 else
2534   echo "$as_me: failed program was:" >&5
2535 cat conftest.$ac_ext >&5
2536 fi
2537 rm -f conftest.$ac_objext conftest.$ac_ext
2538 done
2539 CFLAGS="$cf_save_CFLAGS"
2540 CPPFLAGS="$cf_save_CPPFLAGS"
2541
2542 fi
2543 echo "$as_me:2543: result: $cf_cv_ansi_cc" >&5
2544 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2545
2546 if test "$cf_cv_ansi_cc" != "no"; then
2547 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2548
2549 cf_fix_cppflags=no
2550 cf_new_cflags=
2551 cf_new_cppflags=
2552 cf_new_extra_cppflags=
2553
2554 for cf_add_cflags in $cf_cv_ansi_cc
2555 do
2556 case $cf_fix_cppflags in
2557 no)
2558         case $cf_add_cflags in #(vi
2559         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2560                 case $cf_add_cflags in
2561                 -D*)
2562                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2563
2564                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2565                         && test -z "${cf_tst_cflags}" \
2566                         && cf_fix_cppflags=yes
2567
2568                         if test $cf_fix_cppflags = yes ; then
2569                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2570                                 continue
2571                         elif test "${cf_tst_cflags}" = "\"'" ; then
2572                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2573                                 continue
2574                         fi
2575                         ;;
2576                 esac
2577                 case "$CPPFLAGS" in
2578                 *$cf_add_cflags) #(vi
2579                         ;;
2580                 *) #(vi
2581                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2582                         ;;
2583                 esac
2584                 ;;
2585         *)
2586                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2587                 ;;
2588         esac
2589         ;;
2590 yes)
2591         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2592
2593         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2594
2595         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2596         && test -z "${cf_tst_cflags}" \
2597         && cf_fix_cppflags=no
2598         ;;
2599 esac
2600 done
2601
2602 if test -n "$cf_new_cflags" ; then
2603
2604         CFLAGS="$CFLAGS $cf_new_cflags"
2605 fi
2606
2607 if test -n "$cf_new_cppflags" ; then
2608
2609         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2610 fi
2611
2612 if test -n "$cf_new_extra_cppflags" ; then
2613
2614         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2615 fi
2616
2617 else
2618         cat >>confdefs.h <<\EOF
2619 #define CC_HAS_PROTOS 1
2620 EOF
2621
2622 fi
2623 fi
2624
2625 if test "$cf_cv_ansi_cc" = "no"; then
2626         { { echo "$as_me:2626: error: Your compiler does not appear to recognize prototypes.
2627 You have the following choices:
2628         a. adjust your compiler options
2629         b. get an up-to-date compiler
2630         c. use a wrapper such as unproto" >&5
2631 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2632 You have the following choices:
2633         a. adjust your compiler options
2634         b. get an up-to-date compiler
2635         c. use a wrapper such as unproto" >&2;}
2636    { (exit 1); exit 1; }; }
2637 fi
2638
2639 case $cf_cv_system_name in
2640 os2*)
2641     CFLAGS="$CFLAGS -Zmt"
2642     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2643     CXXFLAGS="$CXXFLAGS -Zmt"
2644     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2645     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2646     ac_cv_exeext=.exe
2647     ;;
2648 esac
2649
2650 PROG_EXT="$EXEEXT"
2651
2652 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2653 #define PROG_EXT "$PROG_EXT"
2654 EOF
2655
2656 if test "$cross_compiling" = yes ; then
2657   LDCONFIG=:
2658 else
2659 case "$cf_cv_system_name" in #(vi
2660 freebsd*) #(vi
2661   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2662   ;;
2663 *) LDPATH=$PATH:/sbin:/usr/sbin
2664   # Extract the first word of "ldconfig", so it can be a program name with args.
2665 set dummy ldconfig; ac_word=$2
2666 echo "$as_me:2666: checking for $ac_word" >&5
2667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2668 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2669   echo $ECHO_N "(cached) $ECHO_C" >&6
2670 else
2671   case $LDCONFIG in
2672   [\\/]* | ?:[\\/]*)
2673   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2674   ;;
2675   *)
2676   ac_save_IFS=$IFS; IFS=$ac_path_separator
2677 ac_dummy="$LDPATH"
2678 for ac_dir in $ac_dummy; do
2679   IFS=$ac_save_IFS
2680   test -z "$ac_dir" && ac_dir=.
2681   if $as_executable_p "$ac_dir/$ac_word"; then
2682    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2683    echo "$as_me:2683: found $ac_dir/$ac_word" >&5
2684    break
2685 fi
2686 done
2687
2688   ;;
2689 esac
2690 fi
2691 LDCONFIG=$ac_cv_path_LDCONFIG
2692
2693 if test -n "$LDCONFIG"; then
2694   echo "$as_me:2694: result: $LDCONFIG" >&5
2695 echo "${ECHO_T}$LDCONFIG" >&6
2696 else
2697   echo "$as_me:2697: result: no" >&5
2698 echo "${ECHO_T}no" >&6
2699 fi
2700
2701   ;;
2702 esac
2703 fi
2704
2705 echo "$as_me:2705: checking if you want to ensure bool is consistent with C++" >&5
2706 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2707
2708 # Check whether --with-cxx or --without-cxx was given.
2709 if test "${with_cxx+set}" = set; then
2710   withval="$with_cxx"
2711   cf_with_cxx=$withval
2712 else
2713   cf_with_cxx=yes
2714 fi;
2715 echo "$as_me:2715: result: $cf_with_cxx" >&5
2716 echo "${ECHO_T}$cf_with_cxx" >&6
2717 if test "X$cf_with_cxx" = Xno ; then
2718         CXX=""
2719         GXX=""
2720 else
2721         # with autoconf 2.13, we can change the error to a warning:
2722                 ac_ext=cc
2723 ac_cpp='$CXXCPP $CPPFLAGS'
2724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2727 ac_main_return=return
2728 if test -n "$ac_tool_prefix"; then
2729   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2730   do
2731     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2732 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2733 echo "$as_me:2733: checking for $ac_word" >&5
2734 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2735 if test "${ac_cv_prog_CXX+set}" = set; then
2736   echo $ECHO_N "(cached) $ECHO_C" >&6
2737 else
2738   if test -n "$CXX"; then
2739   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2740 else
2741   ac_save_IFS=$IFS; IFS=$ac_path_separator
2742 ac_dummy="$PATH"
2743 for ac_dir in $ac_dummy; do
2744   IFS=$ac_save_IFS
2745   test -z "$ac_dir" && ac_dir=.
2746   $as_executable_p "$ac_dir/$ac_word" || continue
2747 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2748 echo "$as_me:2748: found $ac_dir/$ac_word" >&5
2749 break
2750 done
2751
2752 fi
2753 fi
2754 CXX=$ac_cv_prog_CXX
2755 if test -n "$CXX"; then
2756   echo "$as_me:2756: result: $CXX" >&5
2757 echo "${ECHO_T}$CXX" >&6
2758 else
2759   echo "$as_me:2759: result: no" >&5
2760 echo "${ECHO_T}no" >&6
2761 fi
2762
2763     test -n "$CXX" && break
2764   done
2765 fi
2766 if test -z "$CXX"; then
2767   ac_ct_CXX=$CXX
2768   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2769 do
2770   # Extract the first word of "$ac_prog", so it can be a program name with args.
2771 set dummy $ac_prog; ac_word=$2
2772 echo "$as_me:2772: checking for $ac_word" >&5
2773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2774 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777   if test -n "$ac_ct_CXX"; then
2778   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2779 else
2780   ac_save_IFS=$IFS; IFS=$ac_path_separator
2781 ac_dummy="$PATH"
2782 for ac_dir in $ac_dummy; do
2783   IFS=$ac_save_IFS
2784   test -z "$ac_dir" && ac_dir=.
2785   $as_executable_p "$ac_dir/$ac_word" || continue
2786 ac_cv_prog_ac_ct_CXX="$ac_prog"
2787 echo "$as_me:2787: found $ac_dir/$ac_word" >&5
2788 break
2789 done
2790
2791 fi
2792 fi
2793 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2794 if test -n "$ac_ct_CXX"; then
2795   echo "$as_me:2795: result: $ac_ct_CXX" >&5
2796 echo "${ECHO_T}$ac_ct_CXX" >&6
2797 else
2798   echo "$as_me:2798: result: no" >&5
2799 echo "${ECHO_T}no" >&6
2800 fi
2801
2802   test -n "$ac_ct_CXX" && break
2803 done
2804 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2805
2806   CXX=$ac_ct_CXX
2807 fi
2808
2809 # Provide some information about the compiler.
2810 echo "$as_me:2810:" \
2811      "checking for C++ compiler version" >&5
2812 ac_compiler=`set X $ac_compile; echo $2`
2813 { (eval echo "$as_me:2813: \"$ac_compiler --version </dev/null >&5\"") >&5
2814   (eval $ac_compiler --version </dev/null >&5) 2>&5
2815   ac_status=$?
2816   echo "$as_me:2816: \$? = $ac_status" >&5
2817   (exit $ac_status); }
2818 { (eval echo "$as_me:2818: \"$ac_compiler -v </dev/null >&5\"") >&5
2819   (eval $ac_compiler -v </dev/null >&5) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }
2823 { (eval echo "$as_me:2823: \"$ac_compiler -V </dev/null >&5\"") >&5
2824   (eval $ac_compiler -V </dev/null >&5) 2>&5
2825   ac_status=$?
2826   echo "$as_me:2826: \$? = $ac_status" >&5
2827   (exit $ac_status); }
2828
2829 echo "$as_me:2829: checking whether we are using the GNU C++ compiler" >&5
2830 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2831 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2832   echo $ECHO_N "(cached) $ECHO_C" >&6
2833 else
2834   cat >conftest.$ac_ext <<_ACEOF
2835 #line 2835 "configure"
2836 #include "confdefs.h"
2837
2838 int
2839 main ()
2840 {
2841 #ifndef __GNUC__
2842        choke me
2843 #endif
2844
2845   ;
2846   return 0;
2847 }
2848 _ACEOF
2849 rm -f conftest.$ac_objext
2850 if { (eval echo "$as_me:2850: \"$ac_compile\"") >&5
2851   (eval $ac_compile) 2>&5
2852   ac_status=$?
2853   echo "$as_me:2853: \$? = $ac_status" >&5
2854   (exit $ac_status); } &&
2855          { ac_try='test -s conftest.$ac_objext'
2856   { (eval echo "$as_me:2856: \"$ac_try\"") >&5
2857   (eval $ac_try) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); }; }; then
2861   ac_compiler_gnu=yes
2862 else
2863   echo "$as_me: failed program was:" >&5
2864 cat conftest.$ac_ext >&5
2865 ac_compiler_gnu=no
2866 fi
2867 rm -f conftest.$ac_objext conftest.$ac_ext
2868 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2869
2870 fi
2871 echo "$as_me:2871: result: $ac_cv_cxx_compiler_gnu" >&5
2872 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2873 GXX=`test $ac_compiler_gnu = yes && echo yes`
2874 ac_test_CXXFLAGS=${CXXFLAGS+set}
2875 ac_save_CXXFLAGS=$CXXFLAGS
2876 CXXFLAGS="-g"
2877 echo "$as_me:2877: checking whether $CXX accepts -g" >&5
2878 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2879 if test "${ac_cv_prog_cxx_g+set}" = set; then
2880   echo $ECHO_N "(cached) $ECHO_C" >&6
2881 else
2882   cat >conftest.$ac_ext <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885
2886 int
2887 main ()
2888 {
2889
2890   ;
2891   return 0;
2892 }
2893 _ACEOF
2894 rm -f conftest.$ac_objext
2895 if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
2896   (eval $ac_compile) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); } &&
2900          { ac_try='test -s conftest.$ac_objext'
2901   { (eval echo "$as_me:2901: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); }; }; then
2906   ac_cv_prog_cxx_g=yes
2907 else
2908   echo "$as_me: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 ac_cv_prog_cxx_g=no
2911 fi
2912 rm -f conftest.$ac_objext conftest.$ac_ext
2913 fi
2914 echo "$as_me:2914: result: $ac_cv_prog_cxx_g" >&5
2915 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2916 if test "$ac_test_CXXFLAGS" = set; then
2917   CXXFLAGS=$ac_save_CXXFLAGS
2918 elif test $ac_cv_prog_cxx_g = yes; then
2919   if test "$GXX" = yes; then
2920     CXXFLAGS="-g -O2"
2921   else
2922     CXXFLAGS="-g"
2923   fi
2924 else
2925   if test "$GXX" = yes; then
2926     CXXFLAGS="-O2"
2927   else
2928     CXXFLAGS=
2929   fi
2930 fi
2931 for ac_declaration in \
2932    ''\
2933    '#include <stdlib.h>' \
2934    'extern "C" void std::exit (int) throw (); using std::exit;' \
2935    'extern "C" void std::exit (int); using std::exit;' \
2936    'extern "C" void exit (int) throw ();' \
2937    'extern "C" void exit (int);' \
2938    'void exit (int);'
2939 do
2940   cat >conftest.$ac_ext <<_ACEOF
2941 #line 2941 "configure"
2942 #include "confdefs.h"
2943 #include <stdlib.h>
2944 $ac_declaration
2945 int
2946 main ()
2947 {
2948 exit (42);
2949   ;
2950   return 0;
2951 }
2952 _ACEOF
2953 rm -f conftest.$ac_objext
2954 if { (eval echo "$as_me:2954: \"$ac_compile\"") >&5
2955   (eval $ac_compile) 2>&5
2956   ac_status=$?
2957   echo "$as_me:2957: \$? = $ac_status" >&5
2958   (exit $ac_status); } &&
2959          { ac_try='test -s conftest.$ac_objext'
2960   { (eval echo "$as_me:2960: \"$ac_try\"") >&5
2961   (eval $ac_try) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }; }; then
2965   :
2966 else
2967   echo "$as_me: failed program was:" >&5
2968 cat conftest.$ac_ext >&5
2969 continue
2970 fi
2971 rm -f conftest.$ac_objext conftest.$ac_ext
2972   cat >conftest.$ac_ext <<_ACEOF
2973 #line 2973 "configure"
2974 #include "confdefs.h"
2975 $ac_declaration
2976 int
2977 main ()
2978 {
2979 exit (42);
2980   ;
2981   return 0;
2982 }
2983 _ACEOF
2984 rm -f conftest.$ac_objext
2985 if { (eval echo "$as_me:2985: \"$ac_compile\"") >&5
2986   (eval $ac_compile) 2>&5
2987   ac_status=$?
2988   echo "$as_me:2988: \$? = $ac_status" >&5
2989   (exit $ac_status); } &&
2990          { ac_try='test -s conftest.$ac_objext'
2991   { (eval echo "$as_me:2991: \"$ac_try\"") >&5
2992   (eval $ac_try) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); }; }; then
2996   break
2997 else
2998   echo "$as_me: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 fi
3001 rm -f conftest.$ac_objext conftest.$ac_ext
3002 done
3003 rm -f conftest*
3004 if test -n "$ac_declaration"; then
3005   echo '#ifdef __cplusplus' >>confdefs.h
3006   echo $ac_declaration      >>confdefs.h
3007   echo '#endif'             >>confdefs.h
3008 fi
3009
3010 ac_ext=c
3011 ac_cpp='$CPP $CPPFLAGS'
3012 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3013 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3015 ac_main_return=return
3016
3017                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3018         if test "$CXX" = "g++" ; then
3019                 # Extract the first word of "g++", so it can be a program name with args.
3020 set dummy g++; ac_word=$2
3021 echo "$as_me:3021: checking for $ac_word" >&5
3022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3023 if test "${ac_cv_path_CXX+set}" = set; then
3024   echo $ECHO_N "(cached) $ECHO_C" >&6
3025 else
3026   case $CXX in
3027   [\\/]* | ?:[\\/]*)
3028   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3029   ;;
3030   *)
3031   ac_save_IFS=$IFS; IFS=$ac_path_separator
3032 ac_dummy="$PATH"
3033 for ac_dir in $ac_dummy; do
3034   IFS=$ac_save_IFS
3035   test -z "$ac_dir" && ac_dir=.
3036   if $as_executable_p "$ac_dir/$ac_word"; then
3037    ac_cv_path_CXX="$ac_dir/$ac_word"
3038    echo "$as_me:3038: found $ac_dir/$ac_word" >&5
3039    break
3040 fi
3041 done
3042
3043   ;;
3044 esac
3045 fi
3046 CXX=$ac_cv_path_CXX
3047
3048 if test -n "$CXX"; then
3049   echo "$as_me:3049: result: $CXX" >&5
3050 echo "${ECHO_T}$CXX" >&6
3051 else
3052   echo "$as_me:3052: result: no" >&5
3053 echo "${ECHO_T}no" >&6
3054 fi
3055
3056         fi
3057         if test "$CXX" = "g++" ; then
3058                 { echo "$as_me:3058: WARNING: ignoring hardcoded g++" >&5
3059 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3060                 cf_with_cxx=no; CXX=""; GXX="";
3061         fi
3062 fi
3063
3064 GXX_VERSION=none
3065 if test "$GXX" = yes; then
3066         echo "$as_me:3066: checking version of g++" >&5
3067 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3068         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3069         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3070         echo "$as_me:3070: result: $GXX_VERSION" >&5
3071 echo "${ECHO_T}$GXX_VERSION" >&6
3072 fi
3073
3074 case $GXX_VERSION in
3075 1*|2.[0-6]*)
3076         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3077         # cf_cxx_library=no
3078         { echo "$as_me:3078: WARNING: templates do not work" >&5
3079 echo "$as_me: WARNING: templates do not work" >&2;}
3080         ;;
3081 esac
3082
3083 echo "$as_me:3083: checking if you want to build C++ binding and demo" >&5
3084 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3085
3086 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3087 if test "${with_cxx_binding+set}" = set; then
3088   withval="$with_cxx_binding"
3089   cf_with_cxx_binding=$withval
3090 else
3091   cf_with_cxx_binding=$cf_with_cxx
3092 fi;
3093 echo "$as_me:3093: result: $cf_with_cxx_binding" >&5
3094 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3095
3096 echo "$as_me:3096: checking if you want to build with Ada95" >&5
3097 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3098
3099 # Check whether --with-ada or --without-ada was given.
3100 if test "${with_ada+set}" = set; then
3101   withval="$with_ada"
3102   cf_with_ada=$withval
3103 else
3104   cf_with_ada=yes
3105 fi;
3106 echo "$as_me:3106: result: $cf_with_ada" >&5
3107 echo "${ECHO_T}$cf_with_ada" >&6
3108
3109 echo "$as_me:3109: checking if you want to build programs such as tic" >&5
3110 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3111
3112 # Check whether --with-progs or --without-progs was given.
3113 if test "${with_progs+set}" = set; then
3114   withval="$with_progs"
3115   cf_with_progs=$withval
3116 else
3117   cf_with_progs=yes
3118 fi;
3119 echo "$as_me:3119: result: $cf_with_progs" >&5
3120 echo "${ECHO_T}$cf_with_progs" >&6
3121
3122 echo "$as_me:3122: checking if you wish to install curses.h" >&5
3123 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3124
3125 # Check whether --with-curses-h or --without-curses-h was given.
3126 if test "${with_curses_h+set}" = set; then
3127   withval="$with_curses_h"
3128   with_curses_h=$withval
3129 else
3130   with_curses_h=yes
3131 fi;
3132 echo "$as_me:3132: result: $with_curses_h" >&5
3133 echo "${ECHO_T}$with_curses_h" >&6
3134
3135 modules_to_build="ncurses"
3136 if test "X$cf_with_progs" != Xno ; then
3137 modules_to_build="$modules_to_build progs tack"
3138 fi
3139 modules_to_build="$modules_to_build panel menu form"
3140
3141 test "$program_prefix" != NONE &&
3142   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3143 # Use a double $ so make ignores it.
3144 test "$program_suffix" != NONE &&
3145   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3146 # Double any \ or $.  echo might interpret backslashes.
3147 # By default was `s,x,x', remove it if useless.
3148 cat <<\_ACEOF >conftest.sed
3149 s/[\\$]/&&/g;s/;s,x,x,$//
3150 _ACEOF
3151 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3152 rm conftest.sed
3153
3154 for ac_prog in mawk gawk nawk awk
3155 do
3156   # Extract the first word of "$ac_prog", so it can be a program name with args.
3157 set dummy $ac_prog; ac_word=$2
3158 echo "$as_me:3158: checking for $ac_word" >&5
3159 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3160 if test "${ac_cv_prog_AWK+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163   if test -n "$AWK"; then
3164   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3165 else
3166   ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 ac_dummy="$PATH"
3168 for ac_dir in $ac_dummy; do
3169   IFS=$ac_save_IFS
3170   test -z "$ac_dir" && ac_dir=.
3171   $as_executable_p "$ac_dir/$ac_word" || continue
3172 ac_cv_prog_AWK="$ac_prog"
3173 echo "$as_me:3173: found $ac_dir/$ac_word" >&5
3174 break
3175 done
3176
3177 fi
3178 fi
3179 AWK=$ac_cv_prog_AWK
3180 if test -n "$AWK"; then
3181   echo "$as_me:3181: result: $AWK" >&5
3182 echo "${ECHO_T}$AWK" >&6
3183 else
3184   echo "$as_me:3184: result: no" >&5
3185 echo "${ECHO_T}no" >&6
3186 fi
3187
3188   test -n "$AWK" && break
3189 done
3190
3191 test -z "$AWK" && { { echo "$as_me:3191: error: No awk program found" >&5
3192 echo "$as_me: error: No awk program found" >&2;}
3193    { (exit 1); exit 1; }; }
3194
3195 echo "$as_me:3195: checking for egrep" >&5
3196 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3197 if test "${ac_cv_prog_egrep+set}" = set; then
3198   echo $ECHO_N "(cached) $ECHO_C" >&6
3199 else
3200   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3201     then ac_cv_prog_egrep='grep -E'
3202     else ac_cv_prog_egrep='egrep'
3203     fi
3204 fi
3205 echo "$as_me:3205: result: $ac_cv_prog_egrep" >&5
3206 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3207  EGREP=$ac_cv_prog_egrep
3208
3209 test -z "$EGREP" && { { echo "$as_me:3209: error: No egrep program found" >&5
3210 echo "$as_me: error: No egrep program found" >&2;}
3211    { (exit 1); exit 1; }; }
3212
3213 # Find a good install program.  We prefer a C program (faster),
3214 # so one script is as good as another.  But avoid the broken or
3215 # incompatible versions:
3216 # SysV /etc/install, /usr/sbin/install
3217 # SunOS /usr/etc/install
3218 # IRIX /sbin/install
3219 # AIX /bin/install
3220 # AmigaOS /C/install, which installs bootblocks on floppy discs
3221 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3222 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3223 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3224 # ./install, which can be erroneously created by make from ./install.sh.
3225 echo "$as_me:3225: checking for a BSD compatible install" >&5
3226 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3227 if test -z "$INSTALL"; then
3228 if test "${ac_cv_path_install+set}" = set; then
3229   echo $ECHO_N "(cached) $ECHO_C" >&6
3230 else
3231     ac_save_IFS=$IFS; IFS=$ac_path_separator
3232   for ac_dir in $PATH; do
3233     IFS=$ac_save_IFS
3234     # Account for people who put trailing slashes in PATH elements.
3235     case $ac_dir/ in
3236     / | ./ | .// | /cC/* \
3237     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3238     | /usr/ucb/* ) ;;
3239     *)
3240       # OSF1 and SCO ODT 3.0 have their own names for install.
3241       # Don't use installbsd from OSF since it installs stuff as root
3242       # by default.
3243       for ac_prog in ginstall scoinst install; do
3244         if $as_executable_p "$ac_dir/$ac_prog"; then
3245           if test $ac_prog = install &&
3246             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3247             # AIX install.  It has an incompatible calling convention.
3248             :
3249           elif test $ac_prog = install &&
3250             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3251             # program-specific install script used by HP pwplus--don't use.
3252             :
3253           else
3254             ac_cv_path_install="$ac_dir/$ac_prog -c"
3255             break 2
3256           fi
3257         fi
3258       done
3259       ;;
3260     esac
3261   done
3262
3263 fi
3264   if test "${ac_cv_path_install+set}" = set; then
3265     INSTALL=$ac_cv_path_install
3266   else
3267     # As a last resort, use the slow shell script.  We don't cache a
3268     # path for INSTALL within a source directory, because that will
3269     # break other packages using the cache if that directory is
3270     # removed, or if the path is relative.
3271     INSTALL=$ac_install_sh
3272   fi
3273 fi
3274 echo "$as_me:3274: result: $INSTALL" >&5
3275 echo "${ECHO_T}$INSTALL" >&6
3276
3277 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3278 # It thinks the first close brace ends the variable substitution.
3279 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3280
3281 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3282
3283 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3284
3285 case $INSTALL in
3286 /*)
3287   ;;
3288 *)
3289   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3290   test -z "$cf_dir" && cf_dir=.
3291   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3292   ;;
3293 esac
3294
3295 for ac_prog in tdlint lint alint
3296 do
3297   # Extract the first word of "$ac_prog", so it can be a program name with args.
3298 set dummy $ac_prog; ac_word=$2
3299 echo "$as_me:3299: checking for $ac_word" >&5
3300 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3301 if test "${ac_cv_prog_LINT+set}" = set; then
3302   echo $ECHO_N "(cached) $ECHO_C" >&6
3303 else
3304   if test -n "$LINT"; then
3305   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3306 else
3307   ac_save_IFS=$IFS; IFS=$ac_path_separator
3308 ac_dummy="$PATH"
3309 for ac_dir in $ac_dummy; do
3310   IFS=$ac_save_IFS
3311   test -z "$ac_dir" && ac_dir=.
3312   $as_executable_p "$ac_dir/$ac_word" || continue
3313 ac_cv_prog_LINT="$ac_prog"
3314 echo "$as_me:3314: found $ac_dir/$ac_word" >&5
3315 break
3316 done
3317
3318 fi
3319 fi
3320 LINT=$ac_cv_prog_LINT
3321 if test -n "$LINT"; then
3322   echo "$as_me:3322: result: $LINT" >&5
3323 echo "${ECHO_T}$LINT" >&6
3324 else
3325   echo "$as_me:3325: result: no" >&5
3326 echo "${ECHO_T}no" >&6
3327 fi
3328
3329   test -n "$LINT" && break
3330 done
3331
3332 echo "$as_me:3332: checking whether ln -s works" >&5
3333 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3334 LN_S=$as_ln_s
3335 if test "$LN_S" = "ln -s"; then
3336   echo "$as_me:3336: result: yes" >&5
3337 echo "${ECHO_T}yes" >&6
3338 else
3339   echo "$as_me:3339: result: no, using $LN_S" >&5
3340 echo "${ECHO_T}no, using $LN_S" >&6
3341 fi
3342
3343 echo "$as_me:3343: checking whether ${MAKE-make} sets \${MAKE}" >&5
3344 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3345 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3346 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3347   echo $ECHO_N "(cached) $ECHO_C" >&6
3348 else
3349   cat >conftest.make <<\EOF
3350 all:
3351         @echo 'ac_maketemp="${MAKE}"'
3352 EOF
3353 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3354 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3355 if test -n "$ac_maketemp"; then
3356   eval ac_cv_prog_make_${ac_make}_set=yes
3357 else
3358   eval ac_cv_prog_make_${ac_make}_set=no
3359 fi
3360 rm -f conftest.make
3361 fi
3362 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3363   echo "$as_me:3363: result: yes" >&5
3364 echo "${ECHO_T}yes" >&6
3365   SET_MAKE=
3366 else
3367   echo "$as_me:3367: result: no" >&5
3368 echo "${ECHO_T}no" >&6
3369   SET_MAKE="MAKE=${MAKE-make}"
3370 fi
3371
3372 echo "$as_me:3372: checking if filesystem supports mixed-case filenames" >&5
3373 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3374 if test "${cf_cv_mixedcase+set}" = set; then
3375   echo $ECHO_N "(cached) $ECHO_C" >&6
3376 else
3377
3378 if test "$cross_compiling" = yes ; then
3379         case $target_alias in #(vi
3380         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3381                 cf_cv_mixedcase=no
3382                 ;;
3383         *)
3384                 cf_cv_mixedcase=yes
3385                 ;;
3386         esac
3387 else
3388         rm -f conftest CONFTEST
3389         echo test >conftest
3390         if test -f CONFTEST ; then
3391                 cf_cv_mixedcase=no
3392         else
3393                 cf_cv_mixedcase=yes
3394         fi
3395         rm -f conftest CONFTEST
3396 fi
3397
3398 fi
3399 echo "$as_me:3399: result: $cf_cv_mixedcase" >&5
3400 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3401 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3402 #define MIXEDCASE_FILENAMES 1
3403 EOF
3404
3405 # Extract the first word of "ctags", so it can be a program name with args.
3406 set dummy ctags; ac_word=$2
3407 echo "$as_me:3407: checking for $ac_word" >&5
3408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3409 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3410   echo $ECHO_N "(cached) $ECHO_C" >&6
3411 else
3412   if test -n "$MAKE_LOWER_TAGS"; then
3413   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3414 else
3415   ac_save_IFS=$IFS; IFS=$ac_path_separator
3416 ac_dummy="$PATH"
3417 for ac_dir in $ac_dummy; do
3418   IFS=$ac_save_IFS
3419   test -z "$ac_dir" && ac_dir=.
3420   $as_executable_p "$ac_dir/$ac_word" || continue
3421 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3422 echo "$as_me:3422: found $ac_dir/$ac_word" >&5
3423 break
3424 done
3425
3426   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3427 fi
3428 fi
3429 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3430 if test -n "$MAKE_LOWER_TAGS"; then
3431   echo "$as_me:3431: result: $MAKE_LOWER_TAGS" >&5
3432 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3433 else
3434   echo "$as_me:3434: result: no" >&5
3435 echo "${ECHO_T}no" >&6
3436 fi
3437
3438 if test "$cf_cv_mixedcase" = yes ; then
3439         # Extract the first word of "etags", so it can be a program name with args.
3440 set dummy etags; ac_word=$2
3441 echo "$as_me:3441: checking for $ac_word" >&5
3442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3443 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3444   echo $ECHO_N "(cached) $ECHO_C" >&6
3445 else
3446   if test -n "$MAKE_UPPER_TAGS"; then
3447   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3448 else
3449   ac_save_IFS=$IFS; IFS=$ac_path_separator
3450 ac_dummy="$PATH"
3451 for ac_dir in $ac_dummy; do
3452   IFS=$ac_save_IFS
3453   test -z "$ac_dir" && ac_dir=.
3454   $as_executable_p "$ac_dir/$ac_word" || continue
3455 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3456 echo "$as_me:3456: found $ac_dir/$ac_word" >&5
3457 break
3458 done
3459
3460   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3461 fi
3462 fi
3463 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3464 if test -n "$MAKE_UPPER_TAGS"; then
3465   echo "$as_me:3465: result: $MAKE_UPPER_TAGS" >&5
3466 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3467 else
3468   echo "$as_me:3468: result: no" >&5
3469 echo "${ECHO_T}no" >&6
3470 fi
3471
3472 else
3473         MAKE_UPPER_TAGS=no
3474 fi
3475
3476 if test "$MAKE_UPPER_TAGS" = yes ; then
3477         MAKE_UPPER_TAGS=
3478 else
3479         MAKE_UPPER_TAGS="#"
3480 fi
3481
3482 if test "$MAKE_LOWER_TAGS" = yes ; then
3483         MAKE_LOWER_TAGS=
3484 else
3485         MAKE_LOWER_TAGS="#"
3486 fi
3487
3488 echo "$as_me:3488: checking for makeflags variable" >&5
3489 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3490 if test "${cf_cv_makeflags+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493
3494         cf_cv_makeflags=''
3495         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3496         do
3497                 cat >cf_makeflags.tmp <<CF_EOF
3498 SHELL = /bin/sh
3499 all :
3500         @ echo '.$cf_option'
3501 CF_EOF
3502                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3503                 case "$cf_result" in
3504                 .*k)
3505                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3506                         case "$cf_result" in
3507                         .*CC=*) cf_cv_makeflags=
3508                                 ;;
3509                         *)      cf_cv_makeflags=$cf_option
3510                                 ;;
3511                         esac
3512                         break
3513                         ;;
3514                 .-)     ;;
3515                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3516                         ;;
3517                 esac
3518         done
3519         rm -f cf_makeflags.tmp
3520
3521 fi
3522 echo "$as_me:3522: result: $cf_cv_makeflags" >&5
3523 echo "${ECHO_T}$cf_cv_makeflags" >&6
3524
3525 echo "$as_me:3525: checking for long file names" >&5
3526 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3527 if test "${ac_cv_sys_long_file_names+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   ac_cv_sys_long_file_names=yes
3531 # Test for long file names in all the places we know might matter:
3532 #      .                the current directory, where building will happen
3533 #      $prefix/lib      where we will be installing things
3534 #      $exec_prefix/lib likewise
3535 # eval it to expand exec_prefix.
3536 #      $TMPDIR          if set, where it might want to write temporary files
3537 # if $TMPDIR is not set:
3538 #      /tmp             where it might want to write temporary files
3539 #      /var/tmp         likewise
3540 #      /usr/tmp         likewise
3541 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3542   ac_tmpdirs=$TMPDIR
3543 else
3544   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3545 fi
3546 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3547   test -d $ac_dir || continue
3548   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3549   ac_xdir=$ac_dir/cf$$
3550   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3551   ac_tf1=$ac_xdir/conftest9012345
3552   ac_tf2=$ac_xdir/conftest9012346
3553   (echo 1 >$ac_tf1) 2>/dev/null
3554   (echo 2 >$ac_tf2) 2>/dev/null
3555   ac_val=`cat $ac_tf1 2>/dev/null`
3556   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3557     ac_cv_sys_long_file_names=no
3558     rm -rf $ac_xdir 2>/dev/null
3559     break
3560   fi
3561   rm -rf $ac_xdir 2>/dev/null
3562 done
3563 fi
3564 echo "$as_me:3564: result: $ac_cv_sys_long_file_names" >&5
3565 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3566 if test $ac_cv_sys_long_file_names = yes; then
3567
3568 cat >>confdefs.h <<\EOF
3569 #define HAVE_LONG_FILE_NAMES 1
3570 EOF
3571
3572 fi
3573
3574 echo "$as_me:3574: checking if filesystem supports mixed-case filenames" >&5
3575 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3576 if test "${cf_cv_mixedcase+set}" = set; then
3577   echo $ECHO_N "(cached) $ECHO_C" >&6
3578 else
3579
3580 if test "$cross_compiling" = yes ; then
3581         case $target_alias in #(vi
3582         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3583                 cf_cv_mixedcase=no
3584                 ;;
3585         *)
3586                 cf_cv_mixedcase=yes
3587                 ;;
3588         esac
3589 else
3590         rm -f conftest CONFTEST
3591         echo test >conftest
3592         if test -f CONFTEST ; then
3593                 cf_cv_mixedcase=no
3594         else
3595                 cf_cv_mixedcase=yes
3596         fi
3597         rm -f conftest CONFTEST
3598 fi
3599
3600 fi
3601 echo "$as_me:3601: result: $cf_cv_mixedcase" >&5
3602 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3603 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3604 #define MIXEDCASE_FILENAMES 1
3605 EOF
3606
3607 if test -n "$ac_tool_prefix"; then
3608   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3609 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3610 echo "$as_me:3610: checking for $ac_word" >&5
3611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3612 if test "${ac_cv_prog_RANLIB+set}" = set; then
3613   echo $ECHO_N "(cached) $ECHO_C" >&6
3614 else
3615   if test -n "$RANLIB"; then
3616   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3617 else
3618   ac_save_IFS=$IFS; IFS=$ac_path_separator
3619 ac_dummy="$PATH"
3620 for ac_dir in $ac_dummy; do
3621   IFS=$ac_save_IFS
3622   test -z "$ac_dir" && ac_dir=.
3623   $as_executable_p "$ac_dir/$ac_word" || continue
3624 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3625 echo "$as_me:3625: found $ac_dir/$ac_word" >&5
3626 break
3627 done
3628
3629 fi
3630 fi
3631 RANLIB=$ac_cv_prog_RANLIB
3632 if test -n "$RANLIB"; then
3633   echo "$as_me:3633: result: $RANLIB" >&5
3634 echo "${ECHO_T}$RANLIB" >&6
3635 else
3636   echo "$as_me:3636: result: no" >&5
3637 echo "${ECHO_T}no" >&6
3638 fi
3639
3640 fi
3641 if test -z "$ac_cv_prog_RANLIB"; then
3642   ac_ct_RANLIB=$RANLIB
3643   # Extract the first word of "ranlib", so it can be a program name with args.
3644 set dummy ranlib; ac_word=$2
3645 echo "$as_me:3645: checking for $ac_word" >&5
3646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3647 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3648   echo $ECHO_N "(cached) $ECHO_C" >&6
3649 else
3650   if test -n "$ac_ct_RANLIB"; then
3651   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3652 else
3653   ac_save_IFS=$IFS; IFS=$ac_path_separator
3654 ac_dummy="$PATH"
3655 for ac_dir in $ac_dummy; do
3656   IFS=$ac_save_IFS
3657   test -z "$ac_dir" && ac_dir=.
3658   $as_executable_p "$ac_dir/$ac_word" || continue
3659 ac_cv_prog_ac_ct_RANLIB="ranlib"
3660 echo "$as_me:3660: found $ac_dir/$ac_word" >&5
3661 break
3662 done
3663
3664   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3665 fi
3666 fi
3667 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3668 if test -n "$ac_ct_RANLIB"; then
3669   echo "$as_me:3669: result: $ac_ct_RANLIB" >&5
3670 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3671 else
3672   echo "$as_me:3672: result: no" >&5
3673 echo "${ECHO_T}no" >&6
3674 fi
3675
3676   RANLIB=$ac_ct_RANLIB
3677 else
3678   RANLIB="$ac_cv_prog_RANLIB"
3679 fi
3680
3681 if test -n "$ac_tool_prefix"; then
3682   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3683 set dummy ${ac_tool_prefix}ld; ac_word=$2
3684 echo "$as_me:3684: checking for $ac_word" >&5
3685 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3686 if test "${ac_cv_prog_LD+set}" = set; then
3687   echo $ECHO_N "(cached) $ECHO_C" >&6
3688 else
3689   if test -n "$LD"; then
3690   ac_cv_prog_LD="$LD" # Let the user override the test.
3691 else
3692   ac_save_IFS=$IFS; IFS=$ac_path_separator
3693 ac_dummy="$PATH"
3694 for ac_dir in $ac_dummy; do
3695   IFS=$ac_save_IFS
3696   test -z "$ac_dir" && ac_dir=.
3697   $as_executable_p "$ac_dir/$ac_word" || continue
3698 ac_cv_prog_LD="${ac_tool_prefix}ld"
3699 echo "$as_me:3699: found $ac_dir/$ac_word" >&5
3700 break
3701 done
3702
3703 fi
3704 fi
3705 LD=$ac_cv_prog_LD
3706 if test -n "$LD"; then
3707   echo "$as_me:3707: result: $LD" >&5
3708 echo "${ECHO_T}$LD" >&6
3709 else
3710   echo "$as_me:3710: result: no" >&5
3711 echo "${ECHO_T}no" >&6
3712 fi
3713
3714 fi
3715 if test -z "$ac_cv_prog_LD"; then
3716   ac_ct_LD=$LD
3717   # Extract the first word of "ld", so it can be a program name with args.
3718 set dummy ld; ac_word=$2
3719 echo "$as_me:3719: checking for $ac_word" >&5
3720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3721 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3722   echo $ECHO_N "(cached) $ECHO_C" >&6
3723 else
3724   if test -n "$ac_ct_LD"; then
3725   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3726 else
3727   ac_save_IFS=$IFS; IFS=$ac_path_separator
3728 ac_dummy="$PATH"
3729 for ac_dir in $ac_dummy; do
3730   IFS=$ac_save_IFS
3731   test -z "$ac_dir" && ac_dir=.
3732   $as_executable_p "$ac_dir/$ac_word" || continue
3733 ac_cv_prog_ac_ct_LD="ld"
3734 echo "$as_me:3734: found $ac_dir/$ac_word" >&5
3735 break
3736 done
3737
3738   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3739 fi
3740 fi
3741 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3742 if test -n "$ac_ct_LD"; then
3743   echo "$as_me:3743: result: $ac_ct_LD" >&5
3744 echo "${ECHO_T}$ac_ct_LD" >&6
3745 else
3746   echo "$as_me:3746: result: no" >&5
3747 echo "${ECHO_T}no" >&6
3748 fi
3749
3750   LD=$ac_ct_LD
3751 else
3752   LD="$ac_cv_prog_LD"
3753 fi
3754
3755 if test -n "$ac_tool_prefix"; then
3756   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3757 set dummy ${ac_tool_prefix}ar; ac_word=$2
3758 echo "$as_me:3758: checking for $ac_word" >&5
3759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3760 if test "${ac_cv_prog_AR+set}" = set; then
3761   echo $ECHO_N "(cached) $ECHO_C" >&6
3762 else
3763   if test -n "$AR"; then
3764   ac_cv_prog_AR="$AR" # Let the user override the test.
3765 else
3766   ac_save_IFS=$IFS; IFS=$ac_path_separator
3767 ac_dummy="$PATH"
3768 for ac_dir in $ac_dummy; do
3769   IFS=$ac_save_IFS
3770   test -z "$ac_dir" && ac_dir=.
3771   $as_executable_p "$ac_dir/$ac_word" || continue
3772 ac_cv_prog_AR="${ac_tool_prefix}ar"
3773 echo "$as_me:3773: found $ac_dir/$ac_word" >&5
3774 break
3775 done
3776
3777 fi
3778 fi
3779 AR=$ac_cv_prog_AR
3780 if test -n "$AR"; then
3781   echo "$as_me:3781: result: $AR" >&5
3782 echo "${ECHO_T}$AR" >&6
3783 else
3784   echo "$as_me:3784: result: no" >&5
3785 echo "${ECHO_T}no" >&6
3786 fi
3787
3788 fi
3789 if test -z "$ac_cv_prog_AR"; then
3790   ac_ct_AR=$AR
3791   # Extract the first word of "ar", so it can be a program name with args.
3792 set dummy ar; ac_word=$2
3793 echo "$as_me:3793: checking for $ac_word" >&5
3794 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3795 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3796   echo $ECHO_N "(cached) $ECHO_C" >&6
3797 else
3798   if test -n "$ac_ct_AR"; then
3799   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3800 else
3801   ac_save_IFS=$IFS; IFS=$ac_path_separator
3802 ac_dummy="$PATH"
3803 for ac_dir in $ac_dummy; do
3804   IFS=$ac_save_IFS
3805   test -z "$ac_dir" && ac_dir=.
3806   $as_executable_p "$ac_dir/$ac_word" || continue
3807 ac_cv_prog_ac_ct_AR="ar"
3808 echo "$as_me:3808: found $ac_dir/$ac_word" >&5
3809 break
3810 done
3811
3812   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3813 fi
3814 fi
3815 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3816 if test -n "$ac_ct_AR"; then
3817   echo "$as_me:3817: result: $ac_ct_AR" >&5
3818 echo "${ECHO_T}$ac_ct_AR" >&6
3819 else
3820   echo "$as_me:3820: result: no" >&5
3821 echo "${ECHO_T}no" >&6
3822 fi
3823
3824   AR=$ac_ct_AR
3825 else
3826   AR="$ac_cv_prog_AR"
3827 fi
3828
3829 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832
3833 echo "$as_me:3833: checking for archiver options (symbol AR_OPTS)" >&5
3834 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3835
3836 if test -z "$AR_OPTS" ; then
3837         AR_OPTS=rv
3838
3839 fi
3840
3841 cf_cv_subst_AR_OPTS=$AR_OPTS
3842 echo "$as_me:3842: result: $AR_OPTS" >&5
3843 echo "${ECHO_T}$AR_OPTS" >&6
3844
3845 fi
3846
3847 echo "$as_me:3847: checking if you have specified an install-prefix" >&5
3848 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3849
3850 # Check whether --with-install-prefix or --without-install-prefix was given.
3851 if test "${with_install_prefix+set}" = set; then
3852   withval="$with_install_prefix"
3853   case "$withval" in #(vi
3854         yes|no) #(vi
3855                 ;;
3856         *)      DESTDIR="$withval"
3857                 ;;
3858         esac
3859 fi;
3860 echo "$as_me:3860: result: $DESTDIR" >&5
3861 echo "${ECHO_T}$DESTDIR" >&6
3862
3863 ###############################################################################
3864
3865 # If we're cross-compiling, allow the user to override the tools and their
3866 # options.  The configure script is oriented toward identifying the host
3867 # compiler, etc., but we need a build compiler to generate parts of the source.
3868
3869 if test "$cross_compiling" = yes ; then
3870
3871         # defaults that we might want to override
3872         : ${BUILD_CFLAGS:=''}
3873         : ${BUILD_CPPFLAGS:=''}
3874         : ${BUILD_LDFLAGS:=''}
3875         : ${BUILD_LIBS:=''}
3876         : ${BUILD_EXEEXT:='$x'}
3877         : ${BUILD_OBJEXT:='o'}
3878
3879 # Check whether --with-build-cc or --without-build-cc was given.
3880 if test "${with_build_cc+set}" = set; then
3881   withval="$with_build_cc"
3882   BUILD_CC="$withval"
3883 else
3884   for ac_prog in gcc cc cl
3885 do
3886   # Extract the first word of "$ac_prog", so it can be a program name with args.
3887 set dummy $ac_prog; ac_word=$2
3888 echo "$as_me:3888: checking for $ac_word" >&5
3889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3890 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3891   echo $ECHO_N "(cached) $ECHO_C" >&6
3892 else
3893   if test -n "$BUILD_CC"; then
3894   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3895 else
3896   ac_save_IFS=$IFS; IFS=$ac_path_separator
3897 ac_dummy="$PATH"
3898 for ac_dir in $ac_dummy; do
3899   IFS=$ac_save_IFS
3900   test -z "$ac_dir" && ac_dir=.
3901   $as_executable_p "$ac_dir/$ac_word" || continue
3902 ac_cv_prog_BUILD_CC="$ac_prog"
3903 echo "$as_me:3903: found $ac_dir/$ac_word" >&5
3904 break
3905 done
3906
3907 fi
3908 fi
3909 BUILD_CC=$ac_cv_prog_BUILD_CC
3910 if test -n "$BUILD_CC"; then
3911   echo "$as_me:3911: result: $BUILD_CC" >&5
3912 echo "${ECHO_T}$BUILD_CC" >&6
3913 else
3914   echo "$as_me:3914: result: no" >&5
3915 echo "${ECHO_T}no" >&6
3916 fi
3917
3918   test -n "$BUILD_CC" && break
3919 done
3920
3921 fi;
3922         echo "$as_me:3922: checking for native build C compiler" >&5
3923 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3924         echo "$as_me:3924: result: $BUILD_CC" >&5
3925 echo "${ECHO_T}$BUILD_CC" >&6
3926
3927         echo "$as_me:3927: checking for native build C preprocessor" >&5
3928 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3929
3930 # Check whether --with-build-cpp or --without-build-cpp was given.
3931 if test "${with_build_cpp+set}" = set; then
3932   withval="$with_build_cpp"
3933   BUILD_CPP="$withval"
3934 else
3935   BUILD_CPP='${BUILD_CC} -E'
3936 fi;
3937         echo "$as_me:3937: result: $BUILD_CPP" >&5
3938 echo "${ECHO_T}$BUILD_CPP" >&6
3939
3940         echo "$as_me:3940: checking for native build C flags" >&5
3941 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3942
3943 # Check whether --with-build-cflags or --without-build-cflags was given.
3944 if test "${with_build_cflags+set}" = set; then
3945   withval="$with_build_cflags"
3946   BUILD_CFLAGS="$withval"
3947 fi;
3948         echo "$as_me:3948: result: $BUILD_CFLAGS" >&5
3949 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3950
3951         echo "$as_me:3951: checking for native build C preprocessor-flags" >&5
3952 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3953
3954 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3955 if test "${with_build_cppflags+set}" = set; then
3956   withval="$with_build_cppflags"
3957   BUILD_CPPFLAGS="$withval"
3958 fi;
3959         echo "$as_me:3959: result: $BUILD_CPPFLAGS" >&5
3960 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3961
3962         echo "$as_me:3962: checking for native build linker-flags" >&5
3963 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3964
3965 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3966 if test "${with_build_ldflags+set}" = set; then
3967   withval="$with_build_ldflags"
3968   BUILD_LDFLAGS="$withval"
3969 fi;
3970         echo "$as_me:3970: result: $BUILD_LDFLAGS" >&5
3971 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3972
3973         echo "$as_me:3973: checking for native build linker-libraries" >&5
3974 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3975
3976 # Check whether --with-build-libs or --without-build-libs was given.
3977 if test "${with_build_libs+set}" = set; then
3978   withval="$with_build_libs"
3979   BUILD_LIBS="$withval"
3980 fi;
3981         echo "$as_me:3981: result: $BUILD_LIBS" >&5
3982 echo "${ECHO_T}$BUILD_LIBS" >&6
3983
3984         # this assumes we're on Unix.
3985         BUILD_EXEEXT=
3986         BUILD_OBJEXT=o
3987
3988         : ${BUILD_CC:='${CC}'}
3989
3990         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3991                 { { echo "$as_me:3991: error: Cross-build requires two compilers.
3992 Use --with-build-cc to specify the native compiler." >&5
3993 echo "$as_me: error: Cross-build requires two compilers.
3994 Use --with-build-cc to specify the native compiler." >&2;}
3995    { (exit 1); exit 1; }; }
3996         fi
3997
3998 else
3999         : ${BUILD_CC:='${CC}'}
4000         : ${BUILD_CPP:='${CPP}'}
4001         : ${BUILD_CFLAGS:='${CFLAGS}'}
4002         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4003         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4004         : ${BUILD_LIBS:='${LIBS}'}
4005         : ${BUILD_EXEEXT:='$x'}
4006         : ${BUILD_OBJEXT:='o'}
4007 fi
4008
4009 ###############################################################################
4010
4011 ### Options to allow the user to specify the set of libraries which are used.
4012 ### Use "--without-normal --with-shared" to allow the default model to be
4013 ### shared, for example.
4014 cf_list_models=""
4015
4016 LIBTOOL=
4017
4018 # common library maintenance symbols that are convenient for libtool scripts:
4019 LIB_CREATE='${AR} -cr'
4020 LIB_OBJECT='${OBJECTS}'
4021 LIB_SUFFIX=.a
4022 LIB_PREP="$RANLIB"
4023
4024 # symbols used to prop libtool up to enable it to determine what it should be
4025 # doing:
4026 LIB_CLEAN=
4027 LIB_COMPILE=
4028 LIB_LINK=
4029 LIB_INSTALL=
4030 LIB_UNINSTALL=
4031
4032 echo "$as_me:4032: checking if you want to build libraries with libtool" >&5
4033 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4034
4035 # Check whether --with-libtool or --without-libtool was given.
4036 if test "${with_libtool+set}" = set; then
4037   withval="$with_libtool"
4038   with_libtool=$withval
4039 else
4040   with_libtool=no
4041 fi;
4042 echo "$as_me:4042: result: $with_libtool" >&5
4043 echo "${ECHO_T}$with_libtool" >&6
4044 if test "$with_libtool" != "no"; then
4045
4046         if test "$with_libtool" != "yes" ; then
4047
4048 if test "x$prefix" != xNONE; then
4049   cf_path_syntax="$prefix"
4050 else
4051   cf_path_syntax="$ac_default_prefix"
4052 fi
4053
4054 case ".$with_libtool" in #(vi
4055 .\$\(*\)*|.\'*\'*) #(vi
4056   ;;
4057 ..|./*|.\\*) #(vi
4058   ;;
4059 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4060   ;;
4061 .\${*prefix}*) #(vi
4062   eval with_libtool="$with_libtool"
4063   case ".$with_libtool" in #(vi
4064   .NONE/*)
4065     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4066     ;;
4067   esac
4068   ;; #(vi
4069 .no|.NONE/*)
4070   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4071   ;;
4072 *)
4073   { { echo "$as_me:4073: error: expected a pathname, not \"$with_libtool\"" >&5
4074 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4075    { (exit 1); exit 1; }; }
4076   ;;
4077 esac
4078
4079                 LIBTOOL=$with_libtool
4080         else
4081                 # Extract the first word of "libtool", so it can be a program name with args.
4082 set dummy libtool; ac_word=$2
4083 echo "$as_me:4083: checking for $ac_word" >&5
4084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4085 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   case $LIBTOOL in
4089   [\\/]* | ?:[\\/]*)
4090   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4091   ;;
4092   *)
4093   ac_save_IFS=$IFS; IFS=$ac_path_separator
4094 ac_dummy="$PATH"
4095 for ac_dir in $ac_dummy; do
4096   IFS=$ac_save_IFS
4097   test -z "$ac_dir" && ac_dir=.
4098   if $as_executable_p "$ac_dir/$ac_word"; then
4099    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4100    echo "$as_me:4100: found $ac_dir/$ac_word" >&5
4101    break
4102 fi
4103 done
4104
4105   ;;
4106 esac
4107 fi
4108 LIBTOOL=$ac_cv_path_LIBTOOL
4109
4110 if test -n "$LIBTOOL"; then
4111   echo "$as_me:4111: result: $LIBTOOL" >&5
4112 echo "${ECHO_T}$LIBTOOL" >&6
4113 else
4114   echo "$as_me:4114: result: no" >&5
4115 echo "${ECHO_T}no" >&6
4116 fi
4117
4118         fi
4119         if test -z "$LIBTOOL" ; then
4120                 { { echo "$as_me:4120: error: Cannot find libtool" >&5
4121 echo "$as_me: error: Cannot find libtool" >&2;}
4122    { (exit 1); exit 1; }; }
4123         fi
4124         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
4125         LIB_OBJECT='${OBJECTS}.o=.lo)'
4126         LIB_SUFFIX=.la
4127         LIB_CLEAN='${LIBTOOL} --mode=clean'
4128         LIB_COMPILE='${LIBTOOL} --mode=compile'
4129         LIB_LINK='${LIBTOOL} --mode=link'
4130         LIB_INSTALL='${LIBTOOL} --mode=install'
4131         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4132         LIB_PREP=:
4133
4134         # Show the version of libtool
4135         echo "$as_me:4135: checking version of libtool" >&5
4136 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4137
4138         # Save the version in a cache variable - this is not entirely a good
4139         # thing, but the version string from libtool is very ugly, and for
4140         # bug reports it might be useful to have the original string.
4141         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4142         echo "$as_me:4142: result: $cf_cv_libtool_version" >&5
4143 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4144         if test -z "$cf_cv_libtool_version" ; then
4145                 { { echo "$as_me:4145: error: This is not libtool" >&5
4146 echo "$as_me: error: This is not libtool" >&2;}
4147    { (exit 1); exit 1; }; }
4148         fi
4149
4150         # special hack to add --tag option for C++ compiler
4151         case $cf_cv_libtool_version in
4152         1.[5-9]*|[2-9]*)
4153                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4154                 ;;
4155         *)
4156                 LIBTOOL_CXX="$LIBTOOL"
4157                 ;;
4158         esac
4159 else
4160         LIBTOOL=""
4161         LIBTOOL_CXX=""
4162 fi
4163
4164 test -z "$LIBTOOL" && ECHO_LT=
4165
4166 if test "$with_libtool" != "no" ; then
4167
4168 cf_list_models="$cf_list_models libtool"
4169
4170 else
4171
4172 echo "$as_me:4172: checking if you want to build shared libraries" >&5
4173 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4174
4175 # Check whether --with-shared or --without-shared was given.
4176 if test "${with_shared+set}" = set; then
4177   withval="$with_shared"
4178   with_shared=$withval
4179 else
4180   with_shared=no
4181 fi;
4182 echo "$as_me:4182: result: $with_shared" >&5
4183 echo "${ECHO_T}$with_shared" >&6
4184 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4185
4186 echo "$as_me:4186: checking if you want to build static libraries" >&5
4187 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4188
4189 # Check whether --with-normal or --without-normal was given.
4190 if test "${with_normal+set}" = set; then
4191   withval="$with_normal"
4192   with_normal=$withval
4193 else
4194   with_normal=yes
4195 fi;
4196 echo "$as_me:4196: result: $with_normal" >&5
4197 echo "${ECHO_T}$with_normal" >&6
4198 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4199
4200 echo "$as_me:4200: checking if you want to build debug libraries" >&5
4201 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4202
4203 # Check whether --with-debug or --without-debug was given.
4204 if test "${with_debug+set}" = set; then
4205   withval="$with_debug"
4206   with_debug=$withval
4207 else
4208   with_debug=yes
4209 fi;
4210 echo "$as_me:4210: result: $with_debug" >&5
4211 echo "${ECHO_T}$with_debug" >&6
4212 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4213
4214 echo "$as_me:4214: checking if you want to build profiling libraries" >&5
4215 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4216
4217 # Check whether --with-profile or --without-profile was given.
4218 if test "${with_profile+set}" = set; then
4219   withval="$with_profile"
4220   with_profile=$withval
4221 else
4222   with_profile=no
4223 fi;
4224 echo "$as_me:4224: result: $with_profile" >&5
4225 echo "${ECHO_T}$with_profile" >&6
4226 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4227
4228 fi
4229
4230 ###############################################################################
4231
4232 echo "$as_me:4232: checking for specified models" >&5
4233 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4234 test -z "$cf_list_models" && cf_list_models=normal
4235 test "$with_libtool" != "no" && cf_list_models=libtool
4236 echo "$as_me:4236: result: $cf_list_models" >&5
4237 echo "${ECHO_T}$cf_list_models" >&6
4238
4239 ### Use the first model as the default, and save its suffix for use in building
4240 ### up test-applications.
4241 echo "$as_me:4241: checking for default model" >&5
4242 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4243 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4244 echo "$as_me:4244: result: $DFT_LWR_MODEL" >&5
4245 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4246
4247 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4248
4249 TICS_NAME=tic
4250
4251 TINFO_NAME=tinfo
4252
4253 LIB_NAME=ncurses
4254
4255 LIB_DIR=../lib
4256 LIB_2ND=../../lib
4257
4258         case $cf_cv_system_name in
4259         OS/2*)  LIB_PREFIX=''     ;;
4260         os2*)   LIB_PREFIX=''     ;;
4261         *)      LIB_PREFIX='lib'  ;;
4262         esac
4263 cf_prefix=$LIB_PREFIX
4264
4265 LIB_PREFIX=$cf_prefix
4266
4267 LIB_SUFFIX=
4268
4269 ###############################################################################
4270
4271 echo "$as_me:4271: checking if you want to build a separate terminfo library" >&5
4272 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4273
4274 # Check whether --with-termlib or --without-termlib was given.
4275 if test "${with_termlib+set}" = set; then
4276   withval="$with_termlib"
4277   with_termlib=$withval
4278 else
4279   with_termlib=no
4280 fi;
4281 echo "$as_me:4281: result: $with_termlib" >&5
4282 echo "${ECHO_T}$with_termlib" >&6
4283
4284 echo "$as_me:4284: checking if you want to build a separate tic library" >&5
4285 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4286
4287 # Check whether --with-ticlib or --without-ticlib was given.
4288 if test "${with_ticlib+set}" = set; then
4289   withval="$with_ticlib"
4290   with_ticlib=$withval
4291 else
4292   with_ticlib=no
4293 fi;
4294 echo "$as_me:4294: result: $with_ticlib" >&5
4295 echo "${ECHO_T}$with_ticlib" >&6
4296
4297 ### Checks for special libraries, must be done up-front.
4298 SHLIB_LIST=""
4299
4300 echo "$as_me:4300: checking if you want to link with the GPM mouse library" >&5
4301 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4302
4303 # Check whether --with-gpm or --without-gpm was given.
4304 if test "${with_gpm+set}" = set; then
4305   withval="$with_gpm"
4306   with_gpm=$withval
4307 else
4308   with_gpm=maybe
4309 fi;
4310 echo "$as_me:4310: result: $with_gpm" >&5
4311 echo "${ECHO_T}$with_gpm" >&6
4312
4313 if test "$with_gpm" != no ; then
4314         echo "$as_me:4314: checking for gpm.h" >&5
4315 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4316 if test "${ac_cv_header_gpm_h+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   cat >conftest.$ac_ext <<_ACEOF
4320 #line 4320 "configure"
4321 #include "confdefs.h"
4322 #include <gpm.h>
4323 _ACEOF
4324 if { (eval echo "$as_me:4324: \"$ac_cpp conftest.$ac_ext\"") >&5
4325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4326   ac_status=$?
4327   egrep -v '^ *\+' conftest.er1 >conftest.err
4328   rm -f conftest.er1
4329   cat conftest.err >&5
4330   echo "$as_me:4330: \$? = $ac_status" >&5
4331   (exit $ac_status); } >/dev/null; then
4332   if test -s conftest.err; then
4333     ac_cpp_err=$ac_c_preproc_warn_flag
4334   else
4335     ac_cpp_err=
4336   fi
4337 else
4338   ac_cpp_err=yes
4339 fi
4340 if test -z "$ac_cpp_err"; then
4341   ac_cv_header_gpm_h=yes
4342 else
4343   echo "$as_me: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   ac_cv_header_gpm_h=no
4346 fi
4347 rm -f conftest.err conftest.$ac_ext
4348 fi
4349 echo "$as_me:4349: result: $ac_cv_header_gpm_h" >&5
4350 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4351 if test $ac_cv_header_gpm_h = yes; then
4352
4353                 cat >>confdefs.h <<\EOF
4354 #define HAVE_GPM_H 1
4355 EOF
4356
4357                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4358                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4359
4360                         cat >>confdefs.h <<\EOF
4361 #define HAVE_LIBGPM 1
4362 EOF
4363
4364                 else
4365                         echo "$as_me:4365: checking for Gpm_Open in -lgpm" >&5
4366 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4367 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4368   echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370   ac_check_lib_save_LIBS=$LIBS
4371 LIBS="-lgpm  $LIBS"
4372 cat >conftest.$ac_ext <<_ACEOF
4373 #line 4373 "configure"
4374 #include "confdefs.h"
4375
4376 /* Override any gcc2 internal prototype to avoid an error.  */
4377 #ifdef __cplusplus
4378 extern "C"
4379 #endif
4380 /* We use char because int might match the return type of a gcc2
4381    builtin and then its argument prototype would still apply.  */
4382 char Gpm_Open ();
4383 int
4384 main ()
4385 {
4386 Gpm_Open ();
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 rm -f conftest.$ac_objext conftest$ac_exeext
4392 if { (eval echo "$as_me:4392: \"$ac_link\"") >&5
4393   (eval $ac_link) 2>&5
4394   ac_status=$?
4395   echo "$as_me:4395: \$? = $ac_status" >&5
4396   (exit $ac_status); } &&
4397          { ac_try='test -s conftest$ac_exeext'
4398   { (eval echo "$as_me:4398: \"$ac_try\"") >&5
4399   (eval $ac_try) 2>&5
4400   ac_status=$?
4401   echo "$as_me:4401: \$? = $ac_status" >&5
4402   (exit $ac_status); }; }; then
4403   ac_cv_lib_gpm_Gpm_Open=yes
4404 else
4405   echo "$as_me: failed program was:" >&5
4406 cat conftest.$ac_ext >&5
4407 ac_cv_lib_gpm_Gpm_Open=no
4408 fi
4409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4410 LIBS=$ac_check_lib_save_LIBS
4411 fi
4412 echo "$as_me:4412: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4413 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4414 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4415   :
4416 else
4417
4418                                 { { echo "$as_me:4418: error: Cannot link with GPM library" >&5
4419 echo "$as_me: error: Cannot link with GPM library" >&2;}
4420    { (exit 1); exit 1; }; }
4421                 fi
4422                 with_gpm=yes
4423
4424 fi
4425
4426 else
4427
4428                 test "$with_gpm" != maybe && { echo "$as_me:4428: WARNING: Cannot find GPM header" >&5
4429 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4430                 with_gpm=no
4431
4432 fi
4433
4434 fi
4435
4436 if test "$with_gpm" != no ; then
4437         echo "$as_me:4437: checking if you want to load GPM dynamically" >&5
4438 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4439
4440 # Check whether --with-dlsym or --without-dlsym was given.
4441 if test "${with_dlsym+set}" = set; then
4442   withval="$with_dlsym"
4443   with_dlsym=$withval
4444 else
4445   with_dlsym=yes
4446 fi;
4447         echo "$as_me:4447: result: $with_dlsym" >&5
4448 echo "${ECHO_T}$with_dlsym" >&6
4449         if test "$with_dlsym" = yes ; then
4450
4451 cf_have_dlsym=no
4452 echo "$as_me:4452: checking for dlsym" >&5
4453 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4454 if test "${ac_cv_func_dlsym+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   cat >conftest.$ac_ext <<_ACEOF
4458 #line 4458 "configure"
4459 #include "confdefs.h"
4460 /* System header to define __stub macros and hopefully few prototypes,
4461     which can conflict with char dlsym (); below.  */
4462 #include <assert.h>
4463 /* Override any gcc2 internal prototype to avoid an error.  */
4464 #ifdef __cplusplus
4465 extern "C"
4466 #endif
4467 /* We use char because int might match the return type of a gcc2
4468    builtin and then its argument prototype would still apply.  */
4469 char dlsym ();
4470 char (*f) ();
4471
4472 int
4473 main ()
4474 {
4475 /* The GNU C library defines this for functions which it implements
4476     to always fail with ENOSYS.  Some functions are actually named
4477     something starting with __ and the normal name is an alias.  */
4478 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4479 choke me
4480 #else
4481 f = dlsym;
4482 #endif
4483
4484   ;
4485   return 0;
4486 }
4487 _ACEOF
4488 rm -f conftest.$ac_objext conftest$ac_exeext
4489 if { (eval echo "$as_me:4489: \"$ac_link\"") >&5
4490   (eval $ac_link) 2>&5
4491   ac_status=$?
4492   echo "$as_me:4492: \$? = $ac_status" >&5
4493   (exit $ac_status); } &&
4494          { ac_try='test -s conftest$ac_exeext'
4495   { (eval echo "$as_me:4495: \"$ac_try\"") >&5
4496   (eval $ac_try) 2>&5
4497   ac_status=$?
4498   echo "$as_me:4498: \$? = $ac_status" >&5
4499   (exit $ac_status); }; }; then
4500   ac_cv_func_dlsym=yes
4501 else
4502   echo "$as_me: failed program was:" >&5
4503 cat conftest.$ac_ext >&5
4504 ac_cv_func_dlsym=no
4505 fi
4506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4507 fi
4508 echo "$as_me:4508: result: $ac_cv_func_dlsym" >&5
4509 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4510 if test $ac_cv_func_dlsym = yes; then
4511   cf_have_dlsym=yes
4512 else
4513
4514 cf_have_libdl=no
4515 echo "$as_me:4515: checking for dlsym in -ldl" >&5
4516 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4517 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520   ac_check_lib_save_LIBS=$LIBS
4521 LIBS="-ldl  $LIBS"
4522 cat >conftest.$ac_ext <<_ACEOF
4523 #line 4523 "configure"
4524 #include "confdefs.h"
4525
4526 /* Override any gcc2 internal prototype to avoid an error.  */
4527 #ifdef __cplusplus
4528 extern "C"
4529 #endif
4530 /* We use char because int might match the return type of a gcc2
4531    builtin and then its argument prototype would still apply.  */
4532 char dlsym ();
4533 int
4534 main ()
4535 {
4536 dlsym ();
4537   ;
4538   return 0;
4539 }
4540 _ACEOF
4541 rm -f conftest.$ac_objext conftest$ac_exeext
4542 if { (eval echo "$as_me:4542: \"$ac_link\"") >&5
4543   (eval $ac_link) 2>&5
4544   ac_status=$?
4545   echo "$as_me:4545: \$? = $ac_status" >&5
4546   (exit $ac_status); } &&
4547          { ac_try='test -s conftest$ac_exeext'
4548   { (eval echo "$as_me:4548: \"$ac_try\"") >&5
4549   (eval $ac_try) 2>&5
4550   ac_status=$?
4551   echo "$as_me:4551: \$? = $ac_status" >&5
4552   (exit $ac_status); }; }; then
4553   ac_cv_lib_dl_dlsym=yes
4554 else
4555   echo "$as_me: failed program was:" >&5
4556 cat conftest.$ac_ext >&5
4557 ac_cv_lib_dl_dlsym=no
4558 fi
4559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4560 LIBS=$ac_check_lib_save_LIBS
4561 fi
4562 echo "$as_me:4562: result: $ac_cv_lib_dl_dlsym" >&5
4563 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4564 if test $ac_cv_lib_dl_dlsym = yes; then
4565
4566         cf_have_dlsym=yes
4567         cf_have_libdl=yes
4568 fi
4569
4570 fi
4571
4572 if test "$cf_have_dlsym" = yes ; then
4573         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4574
4575         echo "$as_me:4575: checking whether able to link to dl*() functions" >&5
4576 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4577         cat >conftest.$ac_ext <<_ACEOF
4578 #line 4578 "configure"
4579 #include "confdefs.h"
4580 #include <dlfcn.h>
4581 int
4582 main ()
4583 {
4584
4585                 void *obj;
4586                 if ((obj = dlopen("filename", 0)) != 0) {
4587                         if (dlsym(obj, "symbolname") == 0) {
4588                         dlclose(obj);
4589                         }
4590                 }
4591   ;
4592   return 0;
4593 }
4594 _ACEOF
4595 rm -f conftest.$ac_objext conftest$ac_exeext
4596 if { (eval echo "$as_me:4596: \"$ac_link\"") >&5
4597   (eval $ac_link) 2>&5
4598   ac_status=$?
4599   echo "$as_me:4599: \$? = $ac_status" >&5
4600   (exit $ac_status); } &&
4601          { ac_try='test -s conftest$ac_exeext'
4602   { (eval echo "$as_me:4602: \"$ac_try\"") >&5
4603   (eval $ac_try) 2>&5
4604   ac_status=$?
4605   echo "$as_me:4605: \$? = $ac_status" >&5
4606   (exit $ac_status); }; }; then
4607
4608                 cat >>confdefs.h <<\EOF
4609 #define HAVE_LIBDL 1
4610 EOF
4611
4612 else
4613   echo "$as_me: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4615
4616                 { { echo "$as_me:4616: error: Cannot link test program for libdl" >&5
4617 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4618    { (exit 1); exit 1; }; }
4619 fi
4620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4621         echo "$as_me:4621: result: ok" >&5
4622 echo "${ECHO_T}ok" >&6
4623 else
4624         { { echo "$as_me:4624: error: Cannot find dlsym function" >&5
4625 echo "$as_me: error: Cannot find dlsym function" >&2;}
4626    { (exit 1); exit 1; }; }
4627 fi
4628
4629                 if test "$with_gpm" != yes ; then
4630                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4631
4632                         cf_cv_gpm_soname="$with_gpm"
4633                 else
4634
4635 echo "$as_me:4635: checking for soname of gpm library" >&5
4636 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4637 if test "${cf_cv_gpm_soname+set}" = set; then
4638   echo $ECHO_N "(cached) $ECHO_C" >&6
4639 else
4640
4641 cf_cv_gpm_soname=unknown
4642 if test "$cross_compiling" != yes ; then
4643 cat >conftest.$ac_ext <<CF_EOF
4644 #include <gpm.h>
4645 int main()
4646 {
4647 if (Gpm_Open(0,0)) Gpm_Close();
4648         ${cf_cv_main_return:-return}(0);
4649 }
4650 CF_EOF
4651 cf_save_LIBS="$LIBS"
4652         LIBS="-lgpm $LIBS"
4653         if { (eval echo "$as_me:4653: \"$ac_compile\"") >&5
4654   (eval $ac_compile) 2>&5
4655   ac_status=$?
4656   echo "$as_me:4656: \$? = $ac_status" >&5
4657   (exit $ac_status); } ; then
4658                 if { (eval echo "$as_me:4658: \"$ac_link\"") >&5
4659   (eval $ac_link) 2>&5
4660   ac_status=$?
4661   echo "$as_me:4661: \$? = $ac_status" >&5
4662   (exit $ac_status); } ; then
4663                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4664                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4665                 fi
4666         fi
4667 rm -f conftest*
4668 LIBS="$cf_save_LIBS"
4669 fi
4670
4671 fi
4672 echo "$as_me:4672: result: $cf_cv_gpm_soname" >&5
4673 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4674
4675                 fi
4676                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4677 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4678 EOF
4679
4680                 SHLIB_LIST="-ldl $SHLIB_LIST"
4681         else
4682                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4683         fi
4684         cat >>confdefs.h <<\EOF
4685 #define HAVE_LIBGPM 1
4686 EOF
4687
4688         echo "$as_me:4688: checking for Gpm_Wgetch in -lgpm" >&5
4689 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4690 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   ac_check_lib_save_LIBS=$LIBS
4694 LIBS="-lgpm  $LIBS"
4695 cat >conftest.$ac_ext <<_ACEOF
4696 #line 4696 "configure"
4697 #include "confdefs.h"
4698
4699 /* Override any gcc2 internal prototype to avoid an error.  */
4700 #ifdef __cplusplus
4701 extern "C"
4702 #endif
4703 /* We use char because int might match the return type of a gcc2
4704    builtin and then its argument prototype would still apply.  */
4705 char Gpm_Wgetch ();
4706 int
4707 main ()
4708 {
4709 Gpm_Wgetch ();
4710   ;
4711   return 0;
4712 }
4713 _ACEOF
4714 rm -f conftest.$ac_objext conftest$ac_exeext
4715 if { (eval echo "$as_me:4715: \"$ac_link\"") >&5
4716   (eval $ac_link) 2>&5
4717   ac_status=$?
4718   echo "$as_me:4718: \$? = $ac_status" >&5
4719   (exit $ac_status); } &&
4720          { ac_try='test -s conftest$ac_exeext'
4721   { (eval echo "$as_me:4721: \"$ac_try\"") >&5
4722   (eval $ac_try) 2>&5
4723   ac_status=$?
4724   echo "$as_me:4724: \$? = $ac_status" >&5
4725   (exit $ac_status); }; }; then
4726   ac_cv_lib_gpm_Gpm_Wgetch=yes
4727 else
4728   echo "$as_me: failed program was:" >&5
4729 cat conftest.$ac_ext >&5
4730 ac_cv_lib_gpm_Gpm_Wgetch=no
4731 fi
4732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4733 LIBS=$ac_check_lib_save_LIBS
4734 fi
4735 echo "$as_me:4735: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4736 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4737 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4738
4739                 { echo "$as_me:4739: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4740 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4741
4742 fi
4743
4744 fi
4745
4746 # not everyone has "test -c"
4747 if test -c /dev/sysmouse 2>/dev/null ; then
4748 echo "$as_me:4748: checking if you want to use sysmouse" >&5
4749 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4750
4751 # Check whether --with-sysmouse or --without-sysmouse was given.
4752 if test "${with_sysmouse+set}" = set; then
4753   withval="$with_sysmouse"
4754   cf_with_sysmouse=$withval
4755 else
4756   cf_with_sysmouse=maybe
4757 fi;
4758         if test "$cf_with_sysmouse" != no ; then
4759         cat >conftest.$ac_ext <<_ACEOF
4760 #line 4760 "configure"
4761 #include "confdefs.h"
4762
4763 #include <osreldate.h>
4764 #if (__FreeBSD_version >= 400017)
4765 #include <sys/consio.h>
4766 #include <sys/fbio.h>
4767 #else
4768 #include <machine/console.h>
4769 #endif
4770
4771 int
4772 main ()
4773 {
4774
4775         struct mouse_info the_mouse;
4776         ioctl(0, CONS_MOUSECTL, &the_mouse);
4777
4778   ;
4779   return 0;
4780 }
4781 _ACEOF
4782 rm -f conftest.$ac_objext
4783 if { (eval echo "$as_me:4783: \"$ac_compile\"") >&5
4784   (eval $ac_compile) 2>&5
4785   ac_status=$?
4786   echo "$as_me:4786: \$? = $ac_status" >&5
4787   (exit $ac_status); } &&
4788          { ac_try='test -s conftest.$ac_objext'
4789   { (eval echo "$as_me:4789: \"$ac_try\"") >&5
4790   (eval $ac_try) 2>&5
4791   ac_status=$?
4792   echo "$as_me:4792: \$? = $ac_status" >&5
4793   (exit $ac_status); }; }; then
4794   cf_with_sysmouse=yes
4795 else
4796   echo "$as_me: failed program was:" >&5
4797 cat conftest.$ac_ext >&5
4798 cf_with_sysmouse=no
4799 fi
4800 rm -f conftest.$ac_objext conftest.$ac_ext
4801         fi
4802 echo "$as_me:4802: result: $cf_with_sysmouse" >&5
4803 echo "${ECHO_T}$cf_with_sysmouse" >&6
4804 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4805 #define USE_SYSMOUSE 1
4806 EOF
4807
4808 fi
4809
4810 if test X"$CC_G_OPT" = X"" ; then
4811         CC_G_OPT='-g'
4812         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4813 fi
4814
4815 if test X"$CXX_G_OPT" = X"" ; then
4816         CXX_G_OPT='-g'
4817         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4818 fi
4819
4820 echo "$as_me:4820: checking for default loader flags" >&5
4821 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4822 case $DFT_LWR_MODEL in
4823 libtool) LD_MODEL=''   ;;
4824 normal)  LD_MODEL=''   ;;
4825 debug)   LD_MODEL=$CC_G_OPT ;;
4826 profile) LD_MODEL='-pg';;
4827 shared)  LD_MODEL=''   ;;
4828 esac
4829 echo "$as_me:4829: result: $LD_MODEL" >&5
4830 echo "${ECHO_T}$LD_MODEL" >&6
4831
4832 case $DFT_LWR_MODEL in
4833 shared)
4834 echo "$as_me:4834: checking if rpath option should be used" >&5
4835 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4836
4837 # Check whether --enable-rpath or --disable-rpath was given.
4838 if test "${enable_rpath+set}" = set; then
4839   enableval="$enable_rpath"
4840   cf_cv_ld_rpath=$enableval
4841 else
4842   cf_cv_ld_rpath=no
4843 fi;
4844 echo "$as_me:4844: result: $cf_cv_ld_rpath" >&5
4845 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4846 echo "$as_me:4846: checking if shared libraries should be relinked during install" >&5
4847 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4848
4849 # Check whether --enable-rpath or --disable-rpath was given.
4850 if test "${enable_rpath+set}" = set; then
4851   enableval="$enable_rpath"
4852   cf_cv_do_relink=$enableval
4853 else
4854   cf_cv_do_relink=yes
4855 fi;
4856 echo "$as_me:4856: result: $cf_cv_do_relink" >&5
4857 echo "${ECHO_T}$cf_cv_do_relink" >&6
4858         ;;
4859 esac
4860
4861         LOCAL_LDFLAGS=
4862         LOCAL_LDFLAGS2=
4863         LD_SHARED_OPTS=
4864         INSTALL_LIB="-m 644"
4865
4866         cf_cv_do_symlinks=no
4867
4868         echo "$as_me:4868: checking if release/abi version should be used for shared libs" >&5
4869 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4870
4871 # Check whether --with-shlib-version or --without-shlib-version was given.
4872 if test "${with_shlib_version+set}" = set; then
4873   withval="$with_shlib_version"
4874   test -z "$withval" && withval=auto
4875         case $withval in #(vi
4876         yes) #(vi
4877                 cf_cv_shlib_version=auto
4878                 ;;
4879         rel|abi|auto|no) #(vi
4880                 cf_cv_shlib_version=$withval
4881                 ;;
4882         *)
4883                 { { echo "$as_me:4883: error: option value must be one of: rel, abi, auto or no" >&5
4884 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4885    { (exit 1); exit 1; }; }
4886                 ;;
4887         esac
4888
4889 else
4890   cf_cv_shlib_version=auto
4891 fi;
4892         echo "$as_me:4892: result: $cf_cv_shlib_version" >&5
4893 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4894
4895         cf_cv_rm_so_locs=no
4896
4897         # Some less-capable ports of gcc support only -fpic
4898         CC_SHARED_OPTS=
4899         if test "$GCC" = yes
4900         then
4901                 echo "$as_me:4901: checking which $CC option to use" >&5
4902 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4903                 cf_save_CFLAGS="$CFLAGS"
4904                 for CC_SHARED_OPTS in -fPIC -fpic ''
4905                 do
4906                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4907                         cat >conftest.$ac_ext <<_ACEOF
4908 #line 4908 "configure"
4909 #include "confdefs.h"
4910 #include <stdio.h>
4911 int
4912 main ()
4913 {
4914 int x = 1
4915   ;
4916   return 0;
4917 }
4918 _ACEOF
4919 rm -f conftest.$ac_objext
4920 if { (eval echo "$as_me:4920: \"$ac_compile\"") >&5
4921   (eval $ac_compile) 2>&5
4922   ac_status=$?
4923   echo "$as_me:4923: \$? = $ac_status" >&5
4924   (exit $ac_status); } &&
4925          { ac_try='test -s conftest.$ac_objext'
4926   { (eval echo "$as_me:4926: \"$ac_try\"") >&5
4927   (eval $ac_try) 2>&5
4928   ac_status=$?
4929   echo "$as_me:4929: \$? = $ac_status" >&5
4930   (exit $ac_status); }; }; then
4931   break
4932 else
4933   echo "$as_me: failed program was:" >&5
4934 cat conftest.$ac_ext >&5
4935 fi
4936 rm -f conftest.$ac_objext conftest.$ac_ext
4937                 done
4938                 echo "$as_me:4938: result: $CC_SHARED_OPTS" >&5
4939 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4940                 CFLAGS="$cf_save_CFLAGS"
4941         fi
4942
4943         cf_cv_shlib_version_infix=no
4944
4945         case $cf_cv_system_name in
4946         beos*)
4947                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4948                 ;;
4949         cygwin*)
4950                 CC_SHARED_OPTS=
4951                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
4952                 cf_cv_shlib_version=cygdll
4953                 cf_cv_shlib_version_infix=cygdll
4954                 cat >mk_shared_lib.sh <<-CF_EOF
4955                 #!/bin/sh
4956                 SHARED_LIB=\$1
4957                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
4958                 shift
4959                 cat <<-EOF
4960                 Linking shared library
4961                 ** SHARED_LIB \$SHARED_LIB
4962                 ** IMPORT_LIB \$IMPORT_LIB
4963 EOF
4964                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
4965 CF_EOF
4966                 chmod +x mk_shared_lib.sh
4967                 ;;
4968         darwin*)
4969                 EXTRA_CFLAGS="-no-cpp-precomp"
4970                 CC_SHARED_OPTS="-dynamic"
4971                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4972                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4973                 cf_cv_shlib_version_infix=yes
4974                 echo "$as_me:4974: checking if ld -search_paths_first works" >&5
4975 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4976 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4977   echo $ECHO_N "(cached) $ECHO_C" >&6
4978 else
4979
4980                         cf_save_LDFLAGS=$LDFLAGS
4981                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4982                         cat >conftest.$ac_ext <<_ACEOF
4983 #line 4983 "configure"
4984 #include "confdefs.h"
4985
4986 int
4987 main ()
4988 {
4989 int i;
4990   ;
4991   return 0;
4992 }
4993 _ACEOF
4994 rm -f conftest.$ac_objext conftest$ac_exeext
4995 if { (eval echo "$as_me:4995: \"$ac_link\"") >&5
4996   (eval $ac_link) 2>&5
4997   ac_status=$?
4998   echo "$as_me:4998: \$? = $ac_status" >&5
4999   (exit $ac_status); } &&
5000          { ac_try='test -s conftest$ac_exeext'
5001   { (eval echo "$as_me:5001: \"$ac_try\"") >&5
5002   (eval $ac_try) 2>&5
5003   ac_status=$?
5004   echo "$as_me:5004: \$? = $ac_status" >&5
5005   (exit $ac_status); }; }; then
5006   cf_cv_ldflags_search_paths_first=yes
5007 else
5008   echo "$as_me: failed program was:" >&5
5009 cat conftest.$ac_ext >&5
5010 cf_cv_ldflags_search_paths_first=no
5011 fi
5012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5013                                 LDFLAGS=$cf_save_LDFLAGS
5014 fi
5015 echo "$as_me:5015: result: $cf_cv_ldflags_search_paths_first" >&5
5016 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5017                 if test $cf_cv_ldflags_search_paths_first = yes; then
5018                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5019                 fi
5020                 ;;
5021         hpux*)
5022                 # (tested with gcc 2.7.2 -- I don't have c89)
5023                 if test "$GCC" = yes; then
5024                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5025                 else
5026                         CC_SHARED_OPTS='+Z'
5027                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5028                 fi
5029                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5030                 # HP-UX shared libraries must be executable, and should be
5031                 # readonly to exploit a quirk in the memory manager.
5032                 INSTALL_LIB="-m 555"
5033                 ;;
5034         irix*)
5035                 if test "$cf_cv_ld_rpath" = yes ; then
5036                         if test "$GCC" = yes; then
5037                                 cf_ld_rpath_opt="-Wl,-rpath,"
5038                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5039                         else
5040                                 cf_ld_rpath_opt="-rpath "
5041                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5042                         fi
5043                 fi
5044                 # tested with IRIX 5.2 and 'cc'.
5045                 if test "$GCC" != yes; then
5046                         CC_SHARED_OPTS='-KPIC'
5047                 fi
5048                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5049                 cf_cv_rm_so_locs=yes
5050                 ;;
5051         linux*|gnu*|k*bsd*-gnu)
5052                 if test "$DFT_LWR_MODEL" = "shared" ; then
5053                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5054                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5055                 fi
5056                 if test "$cf_cv_ld_rpath" = yes ; then
5057                         cf_ld_rpath_opt="-Wl,-rpath,"
5058                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5059                 fi
5060
5061         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5062         if test "$cf_cv_shlib_version" = rel; then
5063                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5064         else
5065                 cf_shared_soname='`basename $@`'
5066         fi
5067
5068                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5069                 ;;
5070         openbsd[2-9].*)
5071                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5072                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5073                 ;;
5074         openbsd*|freebsd[12].*)
5075                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5076                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5077                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5078                 ;;
5079         freebsd*)
5080                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5081                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5082                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5083                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5084                         cf_ld_rpath_opt="-rpath "
5085                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5086                 fi
5087
5088         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5089         if test "$cf_cv_shlib_version" = rel; then
5090                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5091         else
5092                 cf_shared_soname='`basename $@`'
5093         fi
5094
5095                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5096                 ;;
5097         netbsd*)
5098                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5099                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5100                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5101                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5102                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5103                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5104                         if test "$cf_cv_shlib_version" = auto; then
5105                         if test -f /usr/libexec/ld.elf_so; then
5106                                 cf_cv_shlib_version=abi
5107                         else
5108                                 cf_cv_shlib_version=rel
5109                         fi
5110                         fi
5111
5112         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5113         if test "$cf_cv_shlib_version" = rel; then
5114                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5115         else
5116                 cf_shared_soname='`basename $@`'
5117         fi
5118
5119                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5120                 else
5121                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5122                 fi
5123                 ;;
5124         osf*|mls+*)
5125                 # tested with OSF/1 V3.2 and 'cc'
5126                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5127                 # link with shared libs).
5128                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5129                 case $host_os in
5130                 osf4*)
5131                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5132                         ;;
5133                 esac
5134                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5135                 if test "$DFT_LWR_MODEL" = "shared" ; then
5136                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5137                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5138                 fi
5139                 if test "$cf_cv_ld_rpath" = yes ; then
5140                         cf_ld_rpath_opt="-rpath"
5141                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5142                 fi
5143                 cf_cv_rm_so_locs=yes
5144                 ;;
5145         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5146                 # tested with osr5.0.5
5147                 if test "$GCC" != yes; then
5148                         CC_SHARED_OPTS='-belf -KPIC'
5149                 fi
5150                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5151                 if test "$cf_cv_ld_rpath" = yes ; then
5152                         # only way is to set LD_RUN_PATH but no switch for it
5153                         RUN_PATH=$libdir
5154                 fi
5155                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5156                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5157                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5158                 ;;
5159         sunos4*)
5160                 # tested with SunOS 4.1.1 and gcc 2.7.0
5161                 if test "$GCC" != yes; then
5162                         CC_SHARED_OPTS='-KPIC'
5163                 fi
5164                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5165                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5166                 ;;
5167         solaris2*)
5168                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5169                 if test "$GCC" != yes; then
5170                         CC_SHARED_OPTS='-KPIC'
5171                 fi
5172                 if test "$DFT_LWR_MODEL" = "shared" ; then
5173                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5174                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5175                 fi
5176                 if test "$cf_cv_ld_rpath" = yes ; then
5177                         cf_ld_rpath_opt="-R"
5178                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5179                 fi
5180
5181         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5182         if test "$cf_cv_shlib_version" = rel; then
5183                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5184         else
5185                 cf_shared_soname='`basename $@`'
5186         fi
5187
5188                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5189                 ;;
5190         sysv5uw7*|unix_sv*)
5191                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5192                 if test "$GCC" != yes; then
5193                         CC_SHARED_OPTS='-KPIC'
5194                 fi
5195                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5196                 ;;
5197         *)
5198                 CC_SHARED_OPTS='unknown'
5199                 MK_SHARED_LIB='echo unknown'
5200                 ;;
5201         esac
5202
5203         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5204         case "$cf_cv_shlib_version" in #(vi
5205         rel|abi)
5206                 case "$MK_SHARED_LIB" in #(vi
5207                 *'-o $@')
5208                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5209                         ;;
5210                 *)
5211                         { echo "$as_me:5211: WARNING: ignored --with-shlib-version" >&5
5212 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5213                         ;;
5214                 esac
5215                 ;;
5216         esac
5217
5218         if test -n "$cf_ld_rpath_opt" ; then
5219                 echo "$as_me:5219: checking if we need a space after rpath option" >&5
5220 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5221                 cf_save_LIBS="$LIBS"
5222                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5223                 cat >conftest.$ac_ext <<_ACEOF
5224 #line 5224 "configure"
5225 #include "confdefs.h"
5226
5227 int
5228 main ()
5229 {
5230
5231   ;
5232   return 0;
5233 }
5234 _ACEOF
5235 rm -f conftest.$ac_objext conftest$ac_exeext
5236 if { (eval echo "$as_me:5236: \"$ac_link\"") >&5
5237   (eval $ac_link) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); } &&
5241          { ac_try='test -s conftest$ac_exeext'
5242   { (eval echo "$as_me:5242: \"$ac_try\"") >&5
5243   (eval $ac_try) 2>&5
5244   ac_status=$?
5245   echo "$as_me:5245: \$? = $ac_status" >&5
5246   (exit $ac_status); }; }; then
5247   cf_rpath_space=no
5248 else
5249   echo "$as_me: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 cf_rpath_space=yes
5252 fi
5253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5254                 LIBS="$cf_save_LIBS"
5255                 echo "$as_me:5255: result: $cf_rpath_space" >&5
5256 echo "${ECHO_T}$cf_rpath_space" >&6
5257                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5258                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5259         fi
5260
5261 if test "$CC_SHARED_OPTS" = "unknown"; then
5262         for model in $cf_list_models; do
5263                 if test "$model" = "shared"; then
5264                         { { echo "$as_me:5264: error: Shared libraries are not supported in this version" >&5
5265 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5266    { (exit 1); exit 1; }; }
5267                 fi
5268         done
5269 fi
5270
5271 ###############################################################################
5272
5273 ###     use option --disable-overwrite to leave out the link to -lcurses
5274 echo "$as_me:5274: checking if you wish to install ncurses overwriting curses" >&5
5275 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5276
5277 # Check whether --enable-overwrite or --disable-overwrite was given.
5278 if test "${enable_overwrite+set}" = set; then
5279   enableval="$enable_overwrite"
5280   with_overwrite=$enableval
5281 else
5282   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5283 fi;
5284 echo "$as_me:5284: result: $with_overwrite" >&5
5285 echo "${ECHO_T}$with_overwrite" >&6
5286
5287 echo "$as_me:5287: checking if external terminfo-database is used" >&5
5288 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5289
5290 # Check whether --enable-database or --disable-database was given.
5291 if test "${enable_database+set}" = set; then
5292   enableval="$enable_database"
5293   use_database=$enableval
5294 else
5295   use_database=yes
5296 fi;
5297 echo "$as_me:5297: result: $use_database" >&5
5298 echo "${ECHO_T}$use_database" >&6
5299
5300 case $host_os in #(vi
5301 os2*) #(vi
5302         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5303         ;;
5304 *) #(vi
5305         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5306         ;;
5307 esac
5308
5309         case $cf_cv_system_name in
5310         os2*)   PATHSEP=';'  ;;
5311         *)      PATHSEP=':'  ;;
5312         esac
5313
5314 if test "$use_database" != no ; then
5315         cat >>confdefs.h <<\EOF
5316 #define USE_DATABASE 1
5317 EOF
5318
5319         echo "$as_me:5319: checking which terminfo source-file will be installed" >&5
5320 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5321
5322 # Check whether --enable-database or --disable-database was given.
5323 if test "${enable_database+set}" = set; then
5324   enableval="$enable_database"
5325   TERMINFO_SRC=$withval
5326 fi;
5327         echo "$as_me:5327: result: $TERMINFO_SRC" >&5
5328 echo "${ECHO_T}$TERMINFO_SRC" >&6
5329
5330         echo "$as_me:5330: checking whether to use hashed database instead of directory/tree" >&5
5331 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5332
5333 # Check whether --with-hashed-db or --without-hashed-db was given.
5334 if test "${with_hashed_db+set}" = set; then
5335   withval="$with_hashed_db"
5336
5337 else
5338   with_hashed_db=no
5339 fi;
5340         echo "$as_me:5340: result: $with_hashed_db" >&5
5341 echo "${ECHO_T}$with_hashed_db" >&6
5342 fi
5343
5344 echo "$as_me:5344: checking for list of fallback descriptions" >&5
5345 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5346
5347 # Check whether --with-fallbacks or --without-fallbacks was given.
5348 if test "${with_fallbacks+set}" = set; then
5349   withval="$with_fallbacks"
5350   with_fallback=$withval
5351 else
5352   with_fallback=
5353 fi;
5354 echo "$as_me:5354: result: $with_fallback" >&5
5355 echo "${ECHO_T}$with_fallback" >&6
5356 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5357
5358 echo "$as_me:5358: checking if you want modern xterm or antique" >&5
5359 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5360
5361 # Check whether --with-xterm-new or --without-xterm-new was given.
5362 if test "${with_xterm_new+set}" = set; then
5363   withval="$with_xterm_new"
5364   with_xterm_new=$withval
5365 else
5366   with_xterm_new=yes
5367 fi;
5368 case $with_xterm_new in
5369 no)     with_xterm_new=xterm-old;;
5370 *)      with_xterm_new=xterm-new;;
5371 esac
5372 echo "$as_me:5372: result: $with_xterm_new" >&5
5373 echo "${ECHO_T}$with_xterm_new" >&6
5374 WHICH_XTERM=$with_xterm_new
5375
5376 MAKE_TERMINFO=
5377 if test "$use_database" = no ; then
5378         TERMINFO="${datadir}/terminfo"
5379         MAKE_TERMINFO="#"
5380 else
5381
5382 echo "$as_me:5382: checking for list of terminfo directories" >&5
5383 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5384
5385 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5386 if test "${with_terminfo_dirs+set}" = set; then
5387   withval="$with_terminfo_dirs"
5388
5389 else
5390   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5391 fi;
5392 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5393 cf_dst_path=
5394 for cf_src_path in $withval
5395 do
5396
5397 if test "x$prefix" != xNONE; then
5398   cf_path_syntax="$prefix"
5399 else
5400   cf_path_syntax="$ac_default_prefix"
5401 fi
5402
5403 case ".$cf_src_path" in #(vi
5404 .\$\(*\)*|.\'*\'*) #(vi
5405   ;;
5406 ..|./*|.\\*) #(vi
5407   ;;
5408 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5409   ;;
5410 .\${*prefix}*) #(vi
5411   eval cf_src_path="$cf_src_path"
5412   case ".$cf_src_path" in #(vi
5413   .NONE/*)
5414     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5415     ;;
5416   esac
5417   ;; #(vi
5418 .no|.NONE/*)
5419   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5420   ;;
5421 *)
5422   { { echo "$as_me:5422: error: expected a pathname, not \"$cf_src_path\"" >&5
5423 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5424    { (exit 1); exit 1; }; }
5425   ;;
5426 esac
5427
5428   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5429   cf_dst_path="${cf_dst_path}${cf_src_path}"
5430 done
5431 IFS="$ac_save_ifs"
5432
5433 eval 'TERMINFO_DIRS="$cf_dst_path"'
5434
5435 echo "$as_me:5435: result: $TERMINFO_DIRS" >&5
5436 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5437 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5438 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5439 EOF
5440
5441 echo "$as_me:5441: checking for default terminfo directory" >&5
5442 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5443
5444 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5445 if test "${with_default_terminfo_dir+set}" = set; then
5446   withval="$with_default_terminfo_dir"
5447
5448 else
5449   withval="${TERMINFO-${datadir}/terminfo}"
5450 fi;
5451 if test "x$prefix" != xNONE; then
5452   cf_path_syntax="$prefix"
5453 else
5454   cf_path_syntax="$ac_default_prefix"
5455 fi
5456
5457 case ".$withval" in #(vi
5458 .\$\(*\)*|.\'*\'*) #(vi
5459   ;;
5460 ..|./*|.\\*) #(vi
5461   ;;
5462 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5463   ;;
5464 .\${*prefix}*) #(vi
5465   eval withval="$withval"
5466   case ".$withval" in #(vi
5467   .NONE/*)
5468     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5469     ;;
5470   esac
5471   ;; #(vi
5472 .no|.NONE/*)
5473   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5474   ;;
5475 *)
5476   { { echo "$as_me:5476: error: expected a pathname, not \"$withval\"" >&5
5477 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5478    { (exit 1); exit 1; }; }
5479   ;;
5480 esac
5481
5482 TERMINFO="$withval"
5483
5484 echo "$as_me:5484: result: $TERMINFO" >&5
5485 echo "${ECHO_T}$TERMINFO" >&6
5486 cat >>confdefs.h <<EOF
5487 #define TERMINFO "$TERMINFO"
5488 EOF
5489
5490 fi
5491
5492 ###     use option --disable-big-core to make tic run on small machines
5493 ###     We need 4Mb, check if we can allocate 50% more than that.
5494 echo "$as_me:5494: checking if big-core option selected" >&5
5495 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5496
5497 # Check whether --enable-big-core or --disable-big-core was given.
5498 if test "${enable_big_core+set}" = set; then
5499   enableval="$enable_big_core"
5500   with_big_core=$enableval
5501 else
5502   if test "$cross_compiling" = yes; then
5503   with_big_core=no
5504 else
5505   cat >conftest.$ac_ext <<_ACEOF
5506 #line 5506 "configure"
5507 #include "confdefs.h"
5508
5509 #include <stdlib.h>
5510 #include <string.h>
5511 int main() {
5512         unsigned long n = 6000000L;
5513         char *s = malloc(n);
5514         if (s != 0)
5515                 s[0] = s[n-1] = 0;
5516         ${cf_cv_main_return:-return}(s == 0);
5517 }
5518 _ACEOF
5519 rm -f conftest$ac_exeext
5520 if { (eval echo "$as_me:5520: \"$ac_link\"") >&5
5521   (eval $ac_link) 2>&5
5522   ac_status=$?
5523   echo "$as_me:5523: \$? = $ac_status" >&5
5524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5525   { (eval echo "$as_me:5525: \"$ac_try\"") >&5
5526   (eval $ac_try) 2>&5
5527   ac_status=$?
5528   echo "$as_me:5528: \$? = $ac_status" >&5
5529   (exit $ac_status); }; }; then
5530   with_big_core=yes
5531 else
5532   echo "$as_me: program exited with status $ac_status" >&5
5533 echo "$as_me: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 with_big_core=no
5536 fi
5537 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5538 fi
5539 fi;
5540 echo "$as_me:5540: result: $with_big_core" >&5
5541 echo "${ECHO_T}$with_big_core" >&6
5542 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5543 #define HAVE_BIG_CORE 1
5544 EOF
5545
5546 ###     use option --enable-termcap to compile in the termcap fallback support
5547 echo "$as_me:5547: checking if you want termcap-fallback support" >&5
5548 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5549
5550 # Check whether --enable-termcap or --disable-termcap was given.
5551 if test "${enable_termcap+set}" = set; then
5552   enableval="$enable_termcap"
5553   with_termcap=$enableval
5554 else
5555   with_termcap=no
5556 fi;
5557 echo "$as_me:5557: result: $with_termcap" >&5
5558 echo "${ECHO_T}$with_termcap" >&6
5559
5560 if test "$with_termcap" != "yes" ; then
5561         if test "$use_database" = no ; then
5562                 if test -z "$with_fallback" ; then
5563                         { { echo "$as_me:5563: error: You have disabled the database w/o specifying fallbacks" >&5
5564 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5565    { (exit 1); exit 1; }; }
5566                 fi
5567         fi
5568         cat >>confdefs.h <<\EOF
5569 #define PURE_TERMINFO 1
5570 EOF
5571
5572 else
5573
5574 if test "$with_ticlib" != no ; then
5575         { { echo "$as_me:5575: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5576 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5577    { (exit 1); exit 1; }; }
5578 fi
5579
5580 cat >>confdefs.h <<\EOF
5581 #define USE_TERMCAP 1
5582 EOF
5583
5584 echo "$as_me:5584: checking for list of termcap files" >&5
5585 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5586
5587 # Check whether --with-termpath or --without-termpath was given.
5588 if test "${with_termpath+set}" = set; then
5589   withval="$with_termpath"
5590
5591 else
5592   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5593 fi;
5594 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5595 cf_dst_path=
5596 for cf_src_path in $withval
5597 do
5598
5599 if test "x$prefix" != xNONE; then
5600   cf_path_syntax="$prefix"
5601 else
5602   cf_path_syntax="$ac_default_prefix"
5603 fi
5604
5605 case ".$cf_src_path" in #(vi
5606 .\$\(*\)*|.\'*\'*) #(vi
5607   ;;
5608 ..|./*|.\\*) #(vi
5609   ;;
5610 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5611   ;;
5612 .\${*prefix}*) #(vi
5613   eval cf_src_path="$cf_src_path"
5614   case ".$cf_src_path" in #(vi
5615   .NONE/*)
5616     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5617     ;;
5618   esac
5619   ;; #(vi
5620 .no|.NONE/*)
5621   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5622   ;;
5623 *)
5624   { { echo "$as_me:5624: error: expected a pathname, not \"$cf_src_path\"" >&5
5625 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5626    { (exit 1); exit 1; }; }
5627   ;;
5628 esac
5629
5630   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5631   cf_dst_path="${cf_dst_path}${cf_src_path}"
5632 done
5633 IFS="$ac_save_ifs"
5634
5635 eval 'TERMPATH="$cf_dst_path"'
5636
5637 echo "$as_me:5637: result: $TERMPATH" >&5
5638 echo "${ECHO_T}$TERMPATH" >&6
5639 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5640 #define TERMPATH "$TERMPATH"
5641 EOF
5642
5643 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5644 echo "$as_me:5644: checking if fast termcap-loader is needed" >&5
5645 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5646
5647 # Check whether --enable-getcap or --disable-getcap was given.
5648 if test "${enable_getcap+set}" = set; then
5649   enableval="$enable_getcap"
5650   with_getcap=$enableval
5651 else
5652   with_getcap=no
5653 fi;
5654 echo "$as_me:5654: result: $with_getcap" >&5
5655 echo "${ECHO_T}$with_getcap" >&6
5656 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5657 #define USE_GETCAP 1
5658 EOF
5659
5660 echo "$as_me:5660: checking if translated termcaps will be cached in ~/.terminfo" >&5
5661 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5662
5663 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5664 if test "${enable_getcap_cache+set}" = set; then
5665   enableval="$enable_getcap_cache"
5666   with_getcap_cache=$enableval
5667 else
5668   with_getcap_cache=no
5669 fi;
5670 echo "$as_me:5670: result: $with_getcap_cache" >&5
5671 echo "${ECHO_T}$with_getcap_cache" >&6
5672 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5673 #define USE_GETCAP_CACHE 1
5674 EOF
5675
5676 fi
5677
5678 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5679 echo "$as_me:5679: checking if ~/.terminfo is wanted" >&5
5680 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5681
5682 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5683 if test "${enable_home_terminfo+set}" = set; then
5684   enableval="$enable_home_terminfo"
5685   with_home_terminfo=$enableval
5686 else
5687   with_home_terminfo=yes
5688 fi;
5689 echo "$as_me:5689: result: $with_home_terminfo" >&5
5690 echo "${ECHO_T}$with_home_terminfo" >&6
5691 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5692 #define USE_HOME_TERMINFO 1
5693 EOF
5694
5695 echo "$as_me:5695: checking if you want to use restricted environment when running as root" >&5
5696 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5697
5698 # Check whether --enable-root-environ or --disable-root-environ was given.
5699 if test "${enable_root_environ+set}" = set; then
5700   enableval="$enable_root_environ"
5701   with_root_environ=$enableval
5702 else
5703   with_root_environ=yes
5704 fi;
5705 echo "$as_me:5705: result: $with_root_environ" >&5
5706 echo "${ECHO_T}$with_root_environ" >&6
5707 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5708 #define USE_ROOT_ENVIRON 1
5709 EOF
5710
5711 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5712 ###   to reduce storage requirements for the terminfo database.
5713
5714 for ac_func in \
5715         remove \
5716         unlink
5717 do
5718 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5719 echo "$as_me:5719: checking for $ac_func" >&5
5720 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5721 if eval "test \"\${$as_ac_var+set}\" = set"; then
5722   echo $ECHO_N "(cached) $ECHO_C" >&6
5723 else
5724   cat >conftest.$ac_ext <<_ACEOF
5725 #line 5725 "configure"
5726 #include "confdefs.h"
5727 /* System header to define __stub macros and hopefully few prototypes,
5728     which can conflict with char $ac_func (); below.  */
5729 #include <assert.h>
5730 /* Override any gcc2 internal prototype to avoid an error.  */
5731 #ifdef __cplusplus
5732 extern "C"
5733 #endif
5734 /* We use char because int might match the return type of a gcc2
5735    builtin and then its argument prototype would still apply.  */
5736 char $ac_func ();
5737 char (*f) ();
5738
5739 int
5740 main ()
5741 {
5742 /* The GNU C library defines this for functions which it implements
5743     to always fail with ENOSYS.  Some functions are actually named
5744     something starting with __ and the normal name is an alias.  */
5745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5746 choke me
5747 #else
5748 f = $ac_func;
5749 #endif
5750
5751   ;
5752   return 0;
5753 }
5754 _ACEOF
5755 rm -f conftest.$ac_objext conftest$ac_exeext
5756 if { (eval echo "$as_me:5756: \"$ac_link\"") >&5
5757   (eval $ac_link) 2>&5
5758   ac_status=$?
5759   echo "$as_me:5759: \$? = $ac_status" >&5
5760   (exit $ac_status); } &&
5761          { ac_try='test -s conftest$ac_exeext'
5762   { (eval echo "$as_me:5762: \"$ac_try\"") >&5
5763   (eval $ac_try) 2>&5
5764   ac_status=$?
5765   echo "$as_me:5765: \$? = $ac_status" >&5
5766   (exit $ac_status); }; }; then
5767   eval "$as_ac_var=yes"
5768 else
5769   echo "$as_me: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
5771 eval "$as_ac_var=no"
5772 fi
5773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5774 fi
5775 echo "$as_me:5775: result: `eval echo '${'$as_ac_var'}'`" >&5
5776 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5777 if test `eval echo '${'$as_ac_var'}'` = yes; then
5778   cat >>confdefs.h <<EOF
5779 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5780 EOF
5781
5782 fi
5783 done
5784
5785 if test "$cross_compiling" = yes ; then
5786
5787 for ac_func in \
5788                 link \
5789                 symlink
5790 do
5791 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5792 echo "$as_me:5792: checking for $ac_func" >&5
5793 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5794 if eval "test \"\${$as_ac_var+set}\" = set"; then
5795   echo $ECHO_N "(cached) $ECHO_C" >&6
5796 else
5797   cat >conftest.$ac_ext <<_ACEOF
5798 #line 5798 "configure"
5799 #include "confdefs.h"
5800 /* System header to define __stub macros and hopefully few prototypes,
5801     which can conflict with char $ac_func (); below.  */
5802 #include <assert.h>
5803 /* Override any gcc2 internal prototype to avoid an error.  */
5804 #ifdef __cplusplus
5805 extern "C"
5806 #endif
5807 /* We use char because int might match the return type of a gcc2
5808    builtin and then its argument prototype would still apply.  */
5809 char $ac_func ();
5810 char (*f) ();
5811
5812 int
5813 main ()
5814 {
5815 /* The GNU C library defines this for functions which it implements
5816     to always fail with ENOSYS.  Some functions are actually named
5817     something starting with __ and the normal name is an alias.  */
5818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5819 choke me
5820 #else
5821 f = $ac_func;
5822 #endif
5823
5824   ;
5825   return 0;
5826 }
5827 _ACEOF
5828 rm -f conftest.$ac_objext conftest$ac_exeext
5829 if { (eval echo "$as_me:5829: \"$ac_link\"") >&5
5830   (eval $ac_link) 2>&5
5831   ac_status=$?
5832   echo "$as_me:5832: \$? = $ac_status" >&5
5833   (exit $ac_status); } &&
5834          { ac_try='test -s conftest$ac_exeext'
5835   { (eval echo "$as_me:5835: \"$ac_try\"") >&5
5836   (eval $ac_try) 2>&5
5837   ac_status=$?
5838   echo "$as_me:5838: \$? = $ac_status" >&5
5839   (exit $ac_status); }; }; then
5840   eval "$as_ac_var=yes"
5841 else
5842   echo "$as_me: failed program was:" >&5
5843 cat conftest.$ac_ext >&5
5844 eval "$as_ac_var=no"
5845 fi
5846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5847 fi
5848 echo "$as_me:5848: result: `eval echo '${'$as_ac_var'}'`" >&5
5849 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5850 if test `eval echo '${'$as_ac_var'}'` = yes; then
5851   cat >>confdefs.h <<EOF
5852 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5853 EOF
5854
5855 fi
5856 done
5857
5858 else
5859         echo "$as_me:5859: checking if link/symlink functions work" >&5
5860 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5861 if test "${cf_cv_link_funcs+set}" = set; then
5862   echo $ECHO_N "(cached) $ECHO_C" >&6
5863 else
5864
5865                 cf_cv_link_funcs=
5866                 for cf_func in link symlink ; do
5867                         if test "$cross_compiling" = yes; then
5868
5869                         eval 'ac_cv_func_'$cf_func'=error'
5870 else
5871   cat >conftest.$ac_ext <<_ACEOF
5872 #line 5872 "configure"
5873 #include "confdefs.h"
5874
5875 #include <sys/types.h>
5876 #include <sys/stat.h>
5877 #ifdef HAVE_UNISTD_H
5878 #include <unistd.h>
5879 #endif
5880 int main()
5881 {
5882         int fail = 0;
5883         char *src = "config.log";
5884         char *dst = "conftest.chk";
5885         struct stat src_sb;
5886         struct stat dst_sb;
5887
5888         stat(src, &src_sb);
5889         fail = ($cf_func("config.log", "conftest.chk") < 0)
5890             || (stat(dst, &dst_sb) < 0)
5891             || (dst_sb.st_mtime != src_sb.st_mtime);
5892 #ifdef HAVE_UNLINK
5893         unlink(dst);
5894 #else
5895         remove(dst);
5896 #endif
5897         ${cf_cv_main_return:-return} (fail);
5898 }
5899
5900 _ACEOF
5901 rm -f conftest$ac_exeext
5902 if { (eval echo "$as_me:5902: \"$ac_link\"") >&5
5903   (eval $ac_link) 2>&5
5904   ac_status=$?
5905   echo "$as_me:5905: \$? = $ac_status" >&5
5906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5907   { (eval echo "$as_me:5907: \"$ac_try\"") >&5
5908   (eval $ac_try) 2>&5
5909   ac_status=$?
5910   echo "$as_me:5910: \$? = $ac_status" >&5
5911   (exit $ac_status); }; }; then
5912
5913                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5914                         eval 'ac_cv_func_'$cf_func'=yes'
5915 else
5916   echo "$as_me: program exited with status $ac_status" >&5
5917 echo "$as_me: failed program was:" >&5
5918 cat conftest.$ac_ext >&5
5919
5920                         eval 'ac_cv_func_'$cf_func'=no'
5921 fi
5922 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5923 fi
5924                 done
5925                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5926
5927 fi
5928 echo "$as_me:5928: result: $cf_cv_link_funcs" >&5
5929 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5930         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5931 #define HAVE_LINK 1
5932 EOF
5933
5934         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5935 #define HAVE_SYMLINK 1
5936 EOF
5937
5938 fi
5939
5940 with_links=no
5941 with_symlinks=no
5942
5943 # soft links (symbolic links) are useful for some systems where hard links do
5944 # not work, or to make it simpler to copy terminfo trees around.
5945 if test "$ac_cv_func_symlink" = yes ; then
5946     echo "$as_me:5946: checking if tic should use symbolic links" >&5
5947 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5948
5949 # Check whether --enable-symlinks or --disable-symlinks was given.
5950 if test "${enable_symlinks+set}" = set; then
5951   enableval="$enable_symlinks"
5952   with_symlinks=$enableval
5953 else
5954   with_symlinks=no
5955 fi;
5956     echo "$as_me:5956: result: $with_symlinks" >&5
5957 echo "${ECHO_T}$with_symlinks" >&6
5958 fi
5959
5960 # If we have hard links and did not choose to use soft links instead, there is
5961 # no reason to make this choice optional - use the hard links.
5962 if test "$with_symlinks" = no ; then
5963     echo "$as_me:5963: checking if tic should use hard links" >&5
5964 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5965     if test "$ac_cv_func_link" = yes ; then
5966         with_links=yes
5967     else
5968         with_links=no
5969     fi
5970     echo "$as_me:5970: result: $with_links" >&5
5971 echo "${ECHO_T}$with_links" >&6
5972 fi
5973
5974 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5975 #define USE_LINKS 1
5976 EOF
5977
5978 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5979 #define USE_SYMLINKS 1
5980 EOF
5981
5982 ###   use option --enable-broken-linker to force on use of broken-linker support
5983 echo "$as_me:5983: checking if you want broken-linker support code" >&5
5984 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5985
5986 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5987 if test "${enable_broken_linker+set}" = set; then
5988   enableval="$enable_broken_linker"
5989   with_broken_linker=$enableval
5990 else
5991   with_broken_linker=${BROKEN_LINKER-no}
5992 fi;
5993 echo "$as_me:5993: result: $with_broken_linker" >&5
5994 echo "${ECHO_T}$with_broken_linker" >&6
5995
5996 BROKEN_LINKER=0
5997 if test "$with_broken_linker" = yes ; then
5998         cat >>confdefs.h <<\EOF
5999 #define BROKEN_LINKER 1
6000 EOF
6001
6002         BROKEN_LINKER=1
6003 elif test "$DFT_LWR_MODEL" = shared ; then
6004         case $cf_cv_system_name in #(vi
6005         cygwin*)
6006                 cat >>confdefs.h <<\EOF
6007 #define BROKEN_LINKER 1
6008 EOF
6009
6010                 BROKEN_LINKER=1
6011                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6012
6013                 ;;
6014         esac
6015 fi
6016
6017 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6018 echo "$as_me:6018: checking if tputs should process BSD-style prefix padding" >&5
6019 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6020
6021 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6022 if test "${enable_bsdpad+set}" = set; then
6023   enableval="$enable_bsdpad"
6024   with_bsdpad=$enableval
6025 else
6026   with_bsdpad=no
6027 fi;
6028 echo "$as_me:6028: result: $with_bsdpad" >&5
6029 echo "${ECHO_T}$with_bsdpad" >&6
6030 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6031 #define BSD_TPUTS 1
6032 EOF
6033
6034 ###   use option --enable-widec to turn on use of wide-character support
6035 NCURSES_CH_T=chtype
6036 NCURSES_LIBUTF8=0
6037
6038 NEED_WCHAR_H=0
6039 NCURSES_MBSTATE_T=0
6040 NCURSES_WCHAR_T=0
6041 NCURSES_WINT_T=0
6042
6043 # Check to define _XOPEN_SOURCE "automatically"
6044
6045 echo "$as_me:6045: checking if $CC -U and -D options work together" >&5
6046 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6047 if test "${cf_cv_cc_u_d_options+set}" = set; then
6048   echo $ECHO_N "(cached) $ECHO_C" >&6
6049 else
6050
6051         cf_save_CPPFLAGS="$CPPFLAGS"
6052         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6053         cat >conftest.$ac_ext <<_ACEOF
6054 #line 6054 "configure"
6055 #include "confdefs.h"
6056
6057 int
6058 main ()
6059 {
6060
6061 #ifndef U_D_OPTIONS
6062 make an undefined-error
6063 #endif
6064 #ifdef  D_U_OPTIONS
6065 make a defined-error
6066 #endif
6067
6068   ;
6069   return 0;
6070 }
6071 _ACEOF
6072 rm -f conftest.$ac_objext
6073 if { (eval echo "$as_me:6073: \"$ac_compile\"") >&5
6074   (eval $ac_compile) 2>&5
6075   ac_status=$?
6076   echo "$as_me:6076: \$? = $ac_status" >&5
6077   (exit $ac_status); } &&
6078          { ac_try='test -s conftest.$ac_objext'
6079   { (eval echo "$as_me:6079: \"$ac_try\"") >&5
6080   (eval $ac_try) 2>&5
6081   ac_status=$?
6082   echo "$as_me:6082: \$? = $ac_status" >&5
6083   (exit $ac_status); }; }; then
6084
6085         cf_cv_cc_u_d_options=yes
6086 else
6087   echo "$as_me: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6089
6090         cf_cv_cc_u_d_options=no
6091 fi
6092 rm -f conftest.$ac_objext conftest.$ac_ext
6093         CPPFLAGS="$cf_save_CPPFLAGS"
6094
6095 fi
6096 echo "$as_me:6096: result: $cf_cv_cc_u_d_options" >&5
6097 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6098
6099 cf_XOPEN_SOURCE=500
6100 cf_POSIX_C_SOURCE=199506L
6101
6102 case $host_os in #(vi
6103 aix[45]*) #(vi
6104         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6105         ;;
6106 freebsd*) #(vi
6107         # 5.x headers associate
6108         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6109         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6110         cf_POSIX_C_SOURCE=200112L
6111         cf_XOPEN_SOURCE=600
6112         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6113         ;;
6114 hpux*) #(vi
6115         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6116         ;;
6117 irix[56].*) #(vi
6118         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6119         ;;
6120 linux*|gnu*|k*bsd*-gnu) #(vi
6121
6122 echo "$as_me:6122: checking if we must define _GNU_SOURCE" >&5
6123 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6124 if test "${cf_cv_gnu_source+set}" = set; then
6125   echo $ECHO_N "(cached) $ECHO_C" >&6
6126 else
6127
6128 cat >conftest.$ac_ext <<_ACEOF
6129 #line 6129 "configure"
6130 #include "confdefs.h"
6131 #include <sys/types.h>
6132 int
6133 main ()
6134 {
6135
6136 #ifndef _XOPEN_SOURCE
6137 make an error
6138 #endif
6139   ;
6140   return 0;
6141 }
6142 _ACEOF
6143 rm -f conftest.$ac_objext
6144 if { (eval echo "$as_me:6144: \"$ac_compile\"") >&5
6145   (eval $ac_compile) 2>&5
6146   ac_status=$?
6147   echo "$as_me:6147: \$? = $ac_status" >&5
6148   (exit $ac_status); } &&
6149          { ac_try='test -s conftest.$ac_objext'
6150   { (eval echo "$as_me:6150: \"$ac_try\"") >&5
6151   (eval $ac_try) 2>&5
6152   ac_status=$?
6153   echo "$as_me:6153: \$? = $ac_status" >&5
6154   (exit $ac_status); }; }; then
6155   cf_cv_gnu_source=no
6156 else
6157   echo "$as_me: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6159 cf_save="$CPPFLAGS"
6160          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6161          cat >conftest.$ac_ext <<_ACEOF
6162 #line 6162 "configure"
6163 #include "confdefs.h"
6164 #include <sys/types.h>
6165 int
6166 main ()
6167 {
6168
6169 #ifdef _XOPEN_SOURCE
6170 make an error
6171 #endif
6172   ;
6173   return 0;
6174 }
6175 _ACEOF
6176 rm -f conftest.$ac_objext
6177 if { (eval echo "$as_me:6177: \"$ac_compile\"") >&5
6178   (eval $ac_compile) 2>&5
6179   ac_status=$?
6180   echo "$as_me:6180: \$? = $ac_status" >&5
6181   (exit $ac_status); } &&
6182          { ac_try='test -s conftest.$ac_objext'
6183   { (eval echo "$as_me:6183: \"$ac_try\"") >&5
6184   (eval $ac_try) 2>&5
6185   ac_status=$?
6186   echo "$as_me:6186: \$? = $ac_status" >&5
6187   (exit $ac_status); }; }; then
6188   cf_cv_gnu_source=no
6189 else
6190   echo "$as_me: failed program was:" >&5
6191 cat conftest.$ac_ext >&5
6192 cf_cv_gnu_source=yes
6193 fi
6194 rm -f conftest.$ac_objext conftest.$ac_ext
6195         CPPFLAGS="$cf_save"
6196
6197 fi
6198 rm -f conftest.$ac_objext conftest.$ac_ext
6199
6200 fi
6201 echo "$as_me:6201: result: $cf_cv_gnu_source" >&5
6202 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6203 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6204
6205         ;;
6206 mirbsd*) #(vi
6207         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6208         ;;
6209 netbsd*) #(vi
6210         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6211         ;;
6212 openbsd*) #(vi
6213         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6214         ;;
6215 osf[45]*) #(vi
6216         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6217         ;;
6218 nto-qnx*) #(vi
6219         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6220         ;;
6221 sco*) #(vi
6222         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6223         ;;
6224 solaris*) #(vi
6225         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6226         ;;
6227 *)
6228         echo "$as_me:6228: checking if we should define _XOPEN_SOURCE" >&5
6229 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6230 if test "${cf_cv_xopen_source+set}" = set; then
6231   echo $ECHO_N "(cached) $ECHO_C" >&6
6232 else
6233
6234         cat >conftest.$ac_ext <<_ACEOF
6235 #line 6235 "configure"
6236 #include "confdefs.h"
6237 #include <sys/types.h>
6238 int
6239 main ()
6240 {
6241
6242 #ifndef _XOPEN_SOURCE
6243 make an error
6244 #endif
6245   ;
6246   return 0;
6247 }
6248 _ACEOF
6249 rm -f conftest.$ac_objext
6250 if { (eval echo "$as_me:6250: \"$ac_compile\"") >&5
6251   (eval $ac_compile) 2>&5
6252   ac_status=$?
6253   echo "$as_me:6253: \$? = $ac_status" >&5
6254   (exit $ac_status); } &&
6255          { ac_try='test -s conftest.$ac_objext'
6256   { (eval echo "$as_me:6256: \"$ac_try\"") >&5
6257   (eval $ac_try) 2>&5
6258   ac_status=$?
6259   echo "$as_me:6259: \$? = $ac_status" >&5
6260   (exit $ac_status); }; }; then
6261   cf_cv_xopen_source=no
6262 else
6263   echo "$as_me: failed program was:" >&5
6264 cat conftest.$ac_ext >&5
6265 cf_save="$CPPFLAGS"
6266          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6267          cat >conftest.$ac_ext <<_ACEOF
6268 #line 6268 "configure"
6269 #include "confdefs.h"
6270 #include <sys/types.h>
6271 int
6272 main ()
6273 {
6274
6275 #ifdef _XOPEN_SOURCE
6276 make an error
6277 #endif
6278   ;
6279   return 0;
6280 }
6281 _ACEOF
6282 rm -f conftest.$ac_objext
6283 if { (eval echo "$as_me:6283: \"$ac_compile\"") >&5
6284   (eval $ac_compile) 2>&5
6285   ac_status=$?
6286   echo "$as_me:6286: \$? = $ac_status" >&5
6287   (exit $ac_status); } &&
6288          { ac_try='test -s conftest.$ac_objext'
6289   { (eval echo "$as_me:6289: \"$ac_try\"") >&5
6290   (eval $ac_try) 2>&5
6291   ac_status=$?
6292   echo "$as_me:6292: \$? = $ac_status" >&5
6293   (exit $ac_status); }; }; then
6294   cf_cv_xopen_source=no
6295 else
6296   echo "$as_me: failed program was:" >&5
6297 cat conftest.$ac_ext >&5
6298 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6299 fi
6300 rm -f conftest.$ac_objext conftest.$ac_ext
6301         CPPFLAGS="$cf_save"
6302
6303 fi
6304 rm -f conftest.$ac_objext conftest.$ac_ext
6305
6306 fi
6307 echo "$as_me:6307: result: $cf_cv_xopen_source" >&5
6308 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6309         if test "$cf_cv_xopen_source" != no ; then
6310
6311 # remove _XOPEN_SOURCE symbol from $CFLAGS
6312 CFLAGS=`echo "$CFLAGS" | \
6313         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6314                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6315
6316 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6317 CPPFLAGS=`echo "$CPPFLAGS" | \
6318         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6319                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6320
6321                 test "$cf_cv_cc_u_d_options" = yes && \
6322                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6323                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6324         fi
6325
6326 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6327
6328 cf_save_CFLAGS="$CFLAGS"
6329 cf_save_CPPFLAGS="$CPPFLAGS"
6330
6331 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6332 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6333         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6334                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6335
6336 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6337 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6338         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6339                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6340
6341 echo "$as_me:6341: checking if we should define _POSIX_C_SOURCE" >&5
6342 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6343 if test "${cf_cv_posix_c_source+set}" = set; then
6344   echo $ECHO_N "(cached) $ECHO_C" >&6
6345 else
6346
6347 echo "(line 6347) testing if the symbol is already defined go no further ..." 1>&5
6348
6349         cat >conftest.$ac_ext <<_ACEOF
6350 #line 6350 "configure"
6351 #include "confdefs.h"
6352 #include <sys/types.h>
6353 int
6354 main ()
6355 {
6356
6357 #ifndef _POSIX_C_SOURCE
6358 make an error
6359 #endif
6360   ;
6361   return 0;
6362 }
6363 _ACEOF
6364 rm -f conftest.$ac_objext
6365 if { (eval echo "$as_me:6365: \"$ac_compile\"") >&5
6366   (eval $ac_compile) 2>&5
6367   ac_status=$?
6368   echo "$as_me:6368: \$? = $ac_status" >&5
6369   (exit $ac_status); } &&
6370          { ac_try='test -s conftest.$ac_objext'
6371   { (eval echo "$as_me:6371: \"$ac_try\"") >&5
6372   (eval $ac_try) 2>&5
6373   ac_status=$?
6374   echo "$as_me:6374: \$? = $ac_status" >&5
6375   (exit $ac_status); }; }; then
6376   cf_cv_posix_c_source=no
6377 else
6378   echo "$as_me: failed program was:" >&5
6379 cat conftest.$ac_ext >&5
6380 cf_want_posix_source=no
6381          case .$cf_POSIX_C_SOURCE in #(vi
6382          .[12]??*) #(vi
6383                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6384                 ;;
6385          .2) #(vi
6386                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6387                 cf_want_posix_source=yes
6388                 ;;
6389          .*)
6390                 cf_want_posix_source=yes
6391                 ;;
6392          esac
6393          if test "$cf_want_posix_source" = yes ; then
6394                 cat >conftest.$ac_ext <<_ACEOF
6395 #line 6395 "configure"
6396 #include "confdefs.h"
6397 #include <sys/types.h>
6398 int
6399 main ()
6400 {
6401
6402 #ifdef _POSIX_SOURCE
6403 make an error
6404 #endif
6405   ;
6406   return 0;
6407 }
6408 _ACEOF
6409 rm -f conftest.$ac_objext
6410 if { (eval echo "$as_me:6410: \"$ac_compile\"") >&5
6411   (eval $ac_compile) 2>&5
6412   ac_status=$?
6413   echo "$as_me:6413: \$? = $ac_status" >&5
6414   (exit $ac_status); } &&
6415          { ac_try='test -s conftest.$ac_objext'
6416   { (eval echo "$as_me:6416: \"$ac_try\"") >&5
6417   (eval $ac_try) 2>&5
6418   ac_status=$?
6419   echo "$as_me:6419: \$? = $ac_status" >&5
6420   (exit $ac_status); }; }; then
6421   :
6422 else
6423   echo "$as_me: failed program was:" >&5
6424 cat conftest.$ac_ext >&5
6425 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6426 fi
6427 rm -f conftest.$ac_objext conftest.$ac_ext
6428          fi
6429
6430 echo "(line 6430) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6431
6432          CFLAGS="$cf_trim_CFLAGS"
6433          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6434
6435 echo "(line 6435) testing if the second compile does not leave our definition intact error ..." 1>&5
6436
6437          cat >conftest.$ac_ext <<_ACEOF
6438 #line 6438 "configure"
6439 #include "confdefs.h"
6440 #include <sys/types.h>
6441 int
6442 main ()
6443 {
6444
6445 #ifndef _POSIX_C_SOURCE
6446 make an error
6447 #endif
6448   ;
6449   return 0;
6450 }
6451 _ACEOF
6452 rm -f conftest.$ac_objext
6453 if { (eval echo "$as_me:6453: \"$ac_compile\"") >&5
6454   (eval $ac_compile) 2>&5
6455   ac_status=$?
6456   echo "$as_me:6456: \$? = $ac_status" >&5
6457   (exit $ac_status); } &&
6458          { ac_try='test -s conftest.$ac_objext'
6459   { (eval echo "$as_me:6459: \"$ac_try\"") >&5
6460   (eval $ac_try) 2>&5
6461   ac_status=$?
6462   echo "$as_me:6462: \$? = $ac_status" >&5
6463   (exit $ac_status); }; }; then
6464   :
6465 else
6466   echo "$as_me: failed program was:" >&5
6467 cat conftest.$ac_ext >&5
6468 cf_cv_posix_c_source=no
6469 fi
6470 rm -f conftest.$ac_objext conftest.$ac_ext
6471          CFLAGS="$cf_save_CFLAGS"
6472          CPPFLAGS="$cf_save_CPPFLAGS"
6473
6474 fi
6475 rm -f conftest.$ac_objext conftest.$ac_ext
6476
6477 fi
6478 echo "$as_me:6478: result: $cf_cv_posix_c_source" >&5
6479 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6480
6481 if test "$cf_cv_posix_c_source" != no ; then
6482         CFLAGS="$cf_trim_CFLAGS"
6483         CPPFLAGS="$cf_trim_CPPFLAGS"
6484         if test "$cf_cv_cc_u_d_options" = yes ; then
6485                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6486                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6487                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6488         fi
6489         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6490 fi
6491
6492         ;;
6493 esac
6494
6495 # Work around breakage on OS X
6496
6497 echo "$as_me:6497: checking if SIGWINCH is defined" >&5
6498 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6499 if test "${cf_cv_define_sigwinch+set}" = set; then
6500   echo $ECHO_N "(cached) $ECHO_C" >&6
6501 else
6502
6503         cat >conftest.$ac_ext <<_ACEOF
6504 #line 6504 "configure"
6505 #include "confdefs.h"
6506
6507 #include <sys/types.h>
6508 #include <sys/signal.h>
6509
6510 int
6511 main ()
6512 {
6513 int x = SIGWINCH
6514   ;
6515   return 0;
6516 }
6517 _ACEOF
6518 rm -f conftest.$ac_objext
6519 if { (eval echo "$as_me:6519: \"$ac_compile\"") >&5
6520   (eval $ac_compile) 2>&5
6521   ac_status=$?
6522   echo "$as_me:6522: \$? = $ac_status" >&5
6523   (exit $ac_status); } &&
6524          { ac_try='test -s conftest.$ac_objext'
6525   { (eval echo "$as_me:6525: \"$ac_try\"") >&5
6526   (eval $ac_try) 2>&5
6527   ac_status=$?
6528   echo "$as_me:6528: \$? = $ac_status" >&5
6529   (exit $ac_status); }; }; then
6530   cf_cv_define_sigwinch=yes
6531 else
6532   echo "$as_me: failed program was:" >&5
6533 cat conftest.$ac_ext >&5
6534 cat >conftest.$ac_ext <<_ACEOF
6535 #line 6535 "configure"
6536 #include "confdefs.h"
6537
6538 #undef _XOPEN_SOURCE
6539 #undef _POSIX_SOURCE
6540 #undef _POSIX_C_SOURCE
6541 #include <sys/types.h>
6542 #include <sys/signal.h>
6543
6544 int
6545 main ()
6546 {
6547 int x = SIGWINCH
6548   ;
6549   return 0;
6550 }
6551 _ACEOF
6552 rm -f conftest.$ac_objext
6553 if { (eval echo "$as_me:6553: \"$ac_compile\"") >&5
6554   (eval $ac_compile) 2>&5
6555   ac_status=$?
6556   echo "$as_me:6556: \$? = $ac_status" >&5
6557   (exit $ac_status); } &&
6558          { ac_try='test -s conftest.$ac_objext'
6559   { (eval echo "$as_me:6559: \"$ac_try\"") >&5
6560   (eval $ac_try) 2>&5
6561   ac_status=$?
6562   echo "$as_me:6562: \$? = $ac_status" >&5
6563   (exit $ac_status); }; }; then
6564   cf_cv_define_sigwinch=maybe
6565 else
6566   echo "$as_me: failed program was:" >&5
6567 cat conftest.$ac_ext >&5
6568 cf_cv_define_sigwinch=no
6569 fi
6570 rm -f conftest.$ac_objext conftest.$ac_ext
6571
6572 fi
6573 rm -f conftest.$ac_objext conftest.$ac_ext
6574
6575 fi
6576 echo "$as_me:6576: result: $cf_cv_define_sigwinch" >&5
6577 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6578
6579 if test "$cf_cv_define_sigwinch" = maybe ; then
6580 echo "$as_me:6580: checking for actual SIGWINCH definition" >&5
6581 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6582 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6583   echo $ECHO_N "(cached) $ECHO_C" >&6
6584 else
6585
6586 cf_cv_fixup_sigwinch=unknown
6587 cf_sigwinch=32
6588 while test $cf_sigwinch != 1
6589 do
6590         cat >conftest.$ac_ext <<_ACEOF
6591 #line 6591 "configure"
6592 #include "confdefs.h"
6593
6594 #undef _XOPEN_SOURCE
6595 #undef _POSIX_SOURCE
6596 #undef _POSIX_C_SOURCE
6597 #include <sys/types.h>
6598 #include <sys/signal.h>
6599
6600 int
6601 main ()
6602 {
6603
6604 #if SIGWINCH != $cf_sigwinch
6605 make an error
6606 #endif
6607 int x = SIGWINCH
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f conftest.$ac_objext
6613 if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5
6614   (eval $ac_compile) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit $ac_status); } &&
6618          { ac_try='test -s conftest.$ac_objext'
6619   { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6620   (eval $ac_try) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit $ac_status); }; }; then
6624   cf_cv_fixup_sigwinch=$cf_sigwinch
6625          break
6626 else
6627   echo "$as_me: failed program was:" >&5
6628 cat conftest.$ac_ext >&5
6629 fi
6630 rm -f conftest.$ac_objext conftest.$ac_ext
6631
6632 cf_sigwinch=`expr $cf_sigwinch - 1`
6633 done
6634
6635 fi
6636 echo "$as_me:6636: result: $cf_cv_fixup_sigwinch" >&5
6637 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6638
6639         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6640                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6641         fi
6642 fi
6643
6644 # Checks for CODESET support.
6645
6646   echo "$as_me:6646: checking for nl_langinfo and CODESET" >&5
6647 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6648 if test "${am_cv_langinfo_codeset+set}" = set; then
6649   echo $ECHO_N "(cached) $ECHO_C" >&6
6650 else
6651   cat >conftest.$ac_ext <<_ACEOF
6652 #line 6652 "configure"
6653 #include "confdefs.h"
6654 #include <langinfo.h>
6655 int
6656 main ()
6657 {
6658 char* cs = nl_langinfo(CODESET);
6659   ;
6660   return 0;
6661 }
6662 _ACEOF
6663 rm -f conftest.$ac_objext conftest$ac_exeext
6664 if { (eval echo "$as_me:6664: \"$ac_link\"") >&5
6665   (eval $ac_link) 2>&5
6666   ac_status=$?
6667   echo "$as_me:6667: \$? = $ac_status" >&5
6668   (exit $ac_status); } &&
6669          { ac_try='test -s conftest$ac_exeext'
6670   { (eval echo "$as_me:6670: \"$ac_try\"") >&5
6671   (eval $ac_try) 2>&5
6672   ac_status=$?
6673   echo "$as_me:6673: \$? = $ac_status" >&5
6674   (exit $ac_status); }; }; then
6675   am_cv_langinfo_codeset=yes
6676 else
6677   echo "$as_me: failed program was:" >&5
6678 cat conftest.$ac_ext >&5
6679 am_cv_langinfo_codeset=no
6680 fi
6681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6682
6683 fi
6684 echo "$as_me:6684: result: $am_cv_langinfo_codeset" >&5
6685 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6686   if test $am_cv_langinfo_codeset = yes; then
6687
6688 cat >>confdefs.h <<\EOF
6689 #define HAVE_LANGINFO_CODESET 1
6690 EOF
6691
6692   fi
6693
6694 # use these variables to work around a defect in gcc's fixincludes.
6695 NCURSES_OK_WCHAR_T=
6696 NCURSES_OK_WINT_T=
6697
6698 echo "$as_me:6698: checking if you want wide-character code" >&5
6699 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6700
6701 # Check whether --enable-widec or --disable-widec was given.
6702 if test "${enable_widec+set}" = set; then
6703   enableval="$enable_widec"
6704   with_widec=$enableval
6705 else
6706   with_widec=no
6707 fi;
6708 echo "$as_me:6708: result: $with_widec" >&5
6709 echo "${ECHO_T}$with_widec" >&6
6710 if test "$with_widec" = yes ; then
6711         LIB_SUFFIX="w${LIB_SUFFIX}"
6712         cat >>confdefs.h <<\EOF
6713 #define USE_WIDEC_SUPPORT 1
6714 EOF
6715
6716 echo "$as_me:6716: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6717 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6718 cat >conftest.$ac_ext <<_ACEOF
6719 #line 6719 "configure"
6720 #include "confdefs.h"
6721 #include <sys/types.h>
6722
6723 int
6724 main ()
6725 {
6726
6727 #ifndef _XOPEN_SOURCE_EXTENDED
6728 make an error
6729 #endif
6730   ;
6731   return 0;
6732 }
6733 _ACEOF
6734 rm -f conftest.$ac_objext
6735 if { (eval echo "$as_me:6735: \"$ac_compile\"") >&5
6736   (eval $ac_compile) 2>&5
6737   ac_status=$?
6738   echo "$as_me:6738: \$? = $ac_status" >&5
6739   (exit $ac_status); } &&
6740          { ac_try='test -s conftest.$ac_objext'
6741   { (eval echo "$as_me:6741: \"$ac_try\"") >&5
6742   (eval $ac_try) 2>&5
6743   ac_status=$?
6744   echo "$as_me:6744: \$? = $ac_status" >&5
6745   (exit $ac_status); }; }; then
6746   cf_result=no
6747 else
6748   echo "$as_me: failed program was:" >&5
6749 cat conftest.$ac_ext >&5
6750 cf_result=yes
6751 fi
6752 rm -f conftest.$ac_objext conftest.$ac_ext
6753 echo "$as_me:6753: result: $cf_result" >&5
6754 echo "${ECHO_T}$cf_result" >&6
6755
6756 if test "$cf_result" = yes ; then
6757         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6758 elif test "x" != "x" ; then
6759         echo "$as_me:6759: checking checking for compatible value versus " >&5
6760 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6761         cat >conftest.$ac_ext <<_ACEOF
6762 #line 6762 "configure"
6763 #include "confdefs.h"
6764 #include <sys/types.h>
6765
6766 int
6767 main ()
6768 {
6769
6770 #if _XOPEN_SOURCE_EXTENDED- < 0
6771 make an error
6772 #endif
6773   ;
6774   return 0;
6775 }
6776 _ACEOF
6777 rm -f conftest.$ac_objext
6778 if { (eval echo "$as_me:6778: \"$ac_compile\"") >&5
6779   (eval $ac_compile) 2>&5
6780   ac_status=$?
6781   echo "$as_me:6781: \$? = $ac_status" >&5
6782   (exit $ac_status); } &&
6783          { ac_try='test -s conftest.$ac_objext'
6784   { (eval echo "$as_me:6784: \"$ac_try\"") >&5
6785   (eval $ac_try) 2>&5
6786   ac_status=$?
6787   echo "$as_me:6787: \$? = $ac_status" >&5
6788   (exit $ac_status); }; }; then
6789   cf_result=yes
6790 else
6791   echo "$as_me: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6793 cf_result=no
6794 fi
6795 rm -f conftest.$ac_objext conftest.$ac_ext
6796         echo "$as_me:6796: result: $cf_result" >&5
6797 echo "${ECHO_T}$cf_result" >&6
6798         if test "$cf_result" = no ; then
6799                 # perhaps we can override it - try...
6800                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6801         fi
6802 fi
6803
6804         # with_overwrite=no
6805         NCURSES_CH_T=cchar_t
6806
6807 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6808 do
6809 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6810 echo "$as_me:6810: checking for $ac_func" >&5
6811 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6812 if eval "test \"\${$as_ac_var+set}\" = set"; then
6813   echo $ECHO_N "(cached) $ECHO_C" >&6
6814 else
6815   cat >conftest.$ac_ext <<_ACEOF
6816 #line 6816 "configure"
6817 #include "confdefs.h"
6818 /* System header to define __stub macros and hopefully few prototypes,
6819     which can conflict with char $ac_func (); below.  */
6820 #include <assert.h>
6821 /* Override any gcc2 internal prototype to avoid an error.  */
6822 #ifdef __cplusplus
6823 extern "C"
6824 #endif
6825 /* We use char because int might match the return type of a gcc2
6826    builtin and then its argument prototype would still apply.  */
6827 char $ac_func ();
6828 char (*f) ();
6829
6830 int
6831 main ()
6832 {
6833 /* The GNU C library defines this for functions which it implements
6834     to always fail with ENOSYS.  Some functions are actually named
6835     something starting with __ and the normal name is an alias.  */
6836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6837 choke me
6838 #else
6839 f = $ac_func;
6840 #endif
6841
6842   ;
6843   return 0;
6844 }
6845 _ACEOF
6846 rm -f conftest.$ac_objext conftest$ac_exeext
6847 if { (eval echo "$as_me:6847: \"$ac_link\"") >&5
6848   (eval $ac_link) 2>&5
6849   ac_status=$?
6850   echo "$as_me:6850: \$? = $ac_status" >&5
6851   (exit $ac_status); } &&
6852          { ac_try='test -s conftest$ac_exeext'
6853   { (eval echo "$as_me:6853: \"$ac_try\"") >&5
6854   (eval $ac_try) 2>&5
6855   ac_status=$?
6856   echo "$as_me:6856: \$? = $ac_status" >&5
6857   (exit $ac_status); }; }; then
6858   eval "$as_ac_var=yes"
6859 else
6860   echo "$as_me: failed program was:" >&5
6861 cat conftest.$ac_ext >&5
6862 eval "$as_ac_var=no"
6863 fi
6864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6865 fi
6866 echo "$as_me:6866: result: `eval echo '${'$as_ac_var'}'`" >&5
6867 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6868 if test `eval echo '${'$as_ac_var'}'` = yes; then
6869   cat >>confdefs.h <<EOF
6870 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6871 EOF
6872
6873 fi
6874 done
6875
6876         if test "$ac_cv_func_putwc" != yes ; then
6877
6878 echo "$as_me:6878: checking for putwc in libutf8" >&5
6879 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6880 if test "${cf_cv_libutf8+set}" = set; then
6881   echo $ECHO_N "(cached) $ECHO_C" >&6
6882 else
6883
6884         cf_save_LIBS="$LIBS"
6885         LIBS="-lutf8 $LIBS"
6886 cat >conftest.$ac_ext <<_ACEOF
6887 #line 6887 "configure"
6888 #include "confdefs.h"
6889
6890 #include <libutf8.h>
6891 int
6892 main ()
6893 {
6894 putwc(0,0);
6895   ;
6896   return 0;
6897 }
6898 _ACEOF
6899 rm -f conftest.$ac_objext conftest$ac_exeext
6900 if { (eval echo "$as_me:6900: \"$ac_link\"") >&5
6901   (eval $ac_link) 2>&5
6902   ac_status=$?
6903   echo "$as_me:6903: \$? = $ac_status" >&5
6904   (exit $ac_status); } &&
6905          { ac_try='test -s conftest$ac_exeext'
6906   { (eval echo "$as_me:6906: \"$ac_try\"") >&5
6907   (eval $ac_try) 2>&5
6908   ac_status=$?
6909   echo "$as_me:6909: \$? = $ac_status" >&5
6910   (exit $ac_status); }; }; then
6911   cf_cv_libutf8=yes
6912 else
6913   echo "$as_me: failed program was:" >&5
6914 cat conftest.$ac_ext >&5
6915 cf_cv_libutf8=no
6916 fi
6917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6918         LIBS="$cf_save_LIBS"
6919
6920 fi
6921 echo "$as_me:6921: result: $cf_cv_libutf8" >&5
6922 echo "${ECHO_T}$cf_cv_libutf8" >&6
6923
6924 if test "$cf_cv_libutf8" = yes ; then
6925         cat >>confdefs.h <<\EOF
6926 #define HAVE_LIBUTF8_H 1
6927 EOF
6928
6929         LIBS="-lutf8 $LIBS"
6930 fi
6931
6932                 if test "$cf_cv_libutf8" = yes ; then
6933                         NCURSES_LIBUTF8=1
6934                 fi
6935         fi
6936
6937 # This is needed on Tru64 5.0 to declare mbstate_t
6938 echo "$as_me:6938: checking if we must include wchar.h to declare mbstate_t" >&5
6939 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6940 if test "${cf_cv_mbstate_t+set}" = set; then
6941   echo $ECHO_N "(cached) $ECHO_C" >&6
6942 else
6943
6944 cat >conftest.$ac_ext <<_ACEOF
6945 #line 6945 "configure"
6946 #include "confdefs.h"
6947
6948 #include <stdlib.h>
6949 #include <stdarg.h>
6950 #include <stdio.h>
6951 #ifdef HAVE_LIBUTF8_H
6952 #include <libutf8.h>
6953 #endif
6954 int
6955 main ()
6956 {
6957 mbstate_t state
6958   ;
6959   return 0;
6960 }
6961 _ACEOF
6962 rm -f conftest.$ac_objext
6963 if { (eval echo "$as_me:6963: \"$ac_compile\"") >&5
6964   (eval $ac_compile) 2>&5
6965   ac_status=$?
6966   echo "$as_me:6966: \$? = $ac_status" >&5
6967   (exit $ac_status); } &&
6968          { ac_try='test -s conftest.$ac_objext'
6969   { (eval echo "$as_me:6969: \"$ac_try\"") >&5
6970   (eval $ac_try) 2>&5
6971   ac_status=$?
6972   echo "$as_me:6972: \$? = $ac_status" >&5
6973   (exit $ac_status); }; }; then
6974   cf_cv_mbstate_t=no
6975 else
6976   echo "$as_me: failed program was:" >&5
6977 cat conftest.$ac_ext >&5
6978 cat >conftest.$ac_ext <<_ACEOF
6979 #line 6979 "configure"
6980 #include "confdefs.h"
6981
6982 #include <stdlib.h>
6983 #include <stdarg.h>
6984 #include <stdio.h>
6985 #include <wchar.h>
6986 #ifdef HAVE_LIBUTF8_H
6987 #include <libutf8.h>
6988 #endif
6989 int
6990 main ()
6991 {
6992 mbstate_t value
6993   ;
6994   return 0;
6995 }
6996 _ACEOF
6997 rm -f conftest.$ac_objext
6998 if { (eval echo "$as_me:6998: \"$ac_compile\"") >&5
6999   (eval $ac_compile) 2>&5
7000   ac_status=$?
7001   echo "$as_me:7001: \$? = $ac_status" >&5
7002   (exit $ac_status); } &&
7003          { ac_try='test -s conftest.$ac_objext'
7004   { (eval echo "$as_me:7004: \"$ac_try\"") >&5
7005   (eval $ac_try) 2>&5
7006   ac_status=$?
7007   echo "$as_me:7007: \$? = $ac_status" >&5
7008   (exit $ac_status); }; }; then
7009   cf_cv_mbstate_t=yes
7010 else
7011   echo "$as_me: failed program was:" >&5
7012 cat conftest.$ac_ext >&5
7013 cf_cv_mbstate_t=unknown
7014 fi
7015 rm -f conftest.$ac_objext conftest.$ac_ext
7016 fi
7017 rm -f conftest.$ac_objext conftest.$ac_ext
7018 fi
7019 echo "$as_me:7019: result: $cf_cv_mbstate_t" >&5
7020 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7021
7022 if test "$cf_cv_mbstate_t" = yes ; then
7023         cat >>confdefs.h <<\EOF
7024 #define NEED_WCHAR_H 1
7025 EOF
7026
7027         NEED_WCHAR_H=1
7028 fi
7029
7030 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7031 if test "$cf_cv_mbstate_t" = unknown ; then
7032         NCURSES_MBSTATE_T=1
7033 fi
7034
7035 # This is needed on Tru64 5.0 to declare wchar_t
7036 echo "$as_me:7036: checking if we must include wchar.h to declare wchar_t" >&5
7037 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7038 if test "${cf_cv_wchar_t+set}" = set; then
7039   echo $ECHO_N "(cached) $ECHO_C" >&6
7040 else
7041
7042 cat >conftest.$ac_ext <<_ACEOF
7043 #line 7043 "configure"
7044 #include "confdefs.h"
7045
7046 #include <stdlib.h>
7047 #include <stdarg.h>
7048 #include <stdio.h>
7049 #ifdef HAVE_LIBUTF8_H
7050 #include <libutf8.h>
7051 #endif
7052 int
7053 main ()
7054 {
7055 wchar_t state
7056   ;
7057   return 0;
7058 }
7059 _ACEOF
7060 rm -f conftest.$ac_objext
7061 if { (eval echo "$as_me:7061: \"$ac_compile\"") >&5
7062   (eval $ac_compile) 2>&5
7063   ac_status=$?
7064   echo "$as_me:7064: \$? = $ac_status" >&5
7065   (exit $ac_status); } &&
7066          { ac_try='test -s conftest.$ac_objext'
7067   { (eval echo "$as_me:7067: \"$ac_try\"") >&5
7068   (eval $ac_try) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); }; }; then
7072   cf_cv_wchar_t=no
7073 else
7074   echo "$as_me: failed program was:" >&5
7075 cat conftest.$ac_ext >&5
7076 cat >conftest.$ac_ext <<_ACEOF
7077 #line 7077 "configure"
7078 #include "confdefs.h"
7079
7080 #include <stdlib.h>
7081 #include <stdarg.h>
7082 #include <stdio.h>
7083 #include <wchar.h>
7084 #ifdef HAVE_LIBUTF8_H
7085 #include <libutf8.h>
7086 #endif
7087 int
7088 main ()
7089 {
7090 wchar_t value
7091   ;
7092   return 0;
7093 }
7094 _ACEOF
7095 rm -f conftest.$ac_objext
7096 if { (eval echo "$as_me:7096: \"$ac_compile\"") >&5
7097   (eval $ac_compile) 2>&5
7098   ac_status=$?
7099   echo "$as_me:7099: \$? = $ac_status" >&5
7100   (exit $ac_status); } &&
7101          { ac_try='test -s conftest.$ac_objext'
7102   { (eval echo "$as_me:7102: \"$ac_try\"") >&5
7103   (eval $ac_try) 2>&5
7104   ac_status=$?
7105   echo "$as_me:7105: \$? = $ac_status" >&5
7106   (exit $ac_status); }; }; then
7107   cf_cv_wchar_t=yes
7108 else
7109   echo "$as_me: failed program was:" >&5
7110 cat conftest.$ac_ext >&5
7111 cf_cv_wchar_t=unknown
7112 fi
7113 rm -f conftest.$ac_objext conftest.$ac_ext
7114 fi
7115 rm -f conftest.$ac_objext conftest.$ac_ext
7116 fi
7117 echo "$as_me:7117: result: $cf_cv_wchar_t" >&5
7118 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7119
7120 if test "$cf_cv_wchar_t" = yes ; then
7121         cat >>confdefs.h <<\EOF
7122 #define NEED_WCHAR_H 1
7123 EOF
7124
7125         NEED_WCHAR_H=1
7126 fi
7127
7128 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7129 if test "$cf_cv_wchar_t" = unknown ; then
7130         NCURSES_WCHAR_T=1
7131 fi
7132
7133 # if we find wchar_t in either place, use substitution to provide a fallback.
7134 if test "$cf_cv_wchar_t" != unknown ; then
7135         NCURSES_OK_WCHAR_T=1
7136 fi
7137
7138 # This is needed on Tru64 5.0 to declare wint_t
7139 echo "$as_me:7139: checking if we must include wchar.h to declare wint_t" >&5
7140 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7141 if test "${cf_cv_wint_t+set}" = set; then
7142   echo $ECHO_N "(cached) $ECHO_C" >&6
7143 else
7144
7145 cat >conftest.$ac_ext <<_ACEOF
7146 #line 7146 "configure"
7147 #include "confdefs.h"
7148
7149 #include <stdlib.h>
7150 #include <stdarg.h>
7151 #include <stdio.h>
7152 #ifdef HAVE_LIBUTF8_H
7153 #include <libutf8.h>
7154 #endif
7155 int
7156 main ()
7157 {
7158 wint_t state
7159   ;
7160   return 0;
7161 }
7162 _ACEOF
7163 rm -f conftest.$ac_objext
7164 if { (eval echo "$as_me:7164: \"$ac_compile\"") >&5
7165   (eval $ac_compile) 2>&5
7166   ac_status=$?
7167   echo "$as_me:7167: \$? = $ac_status" >&5
7168   (exit $ac_status); } &&
7169          { ac_try='test -s conftest.$ac_objext'
7170   { (eval echo "$as_me:7170: \"$ac_try\"") >&5
7171   (eval $ac_try) 2>&5
7172   ac_status=$?
7173   echo "$as_me:7173: \$? = $ac_status" >&5
7174   (exit $ac_status); }; }; then
7175   cf_cv_wint_t=no
7176 else
7177   echo "$as_me: failed program was:" >&5
7178 cat conftest.$ac_ext >&5
7179 cat >conftest.$ac_ext <<_ACEOF
7180 #line 7180 "configure"
7181 #include "confdefs.h"
7182
7183 #include <stdlib.h>
7184 #include <stdarg.h>
7185 #include <stdio.h>
7186 #include <wchar.h>
7187 #ifdef HAVE_LIBUTF8_H
7188 #include <libutf8.h>
7189 #endif
7190 int
7191 main ()
7192 {
7193 wint_t value
7194   ;
7195   return 0;
7196 }
7197 _ACEOF
7198 rm -f conftest.$ac_objext
7199 if { (eval echo "$as_me:7199: \"$ac_compile\"") >&5
7200   (eval $ac_compile) 2>&5
7201   ac_status=$?
7202   echo "$as_me:7202: \$? = $ac_status" >&5
7203   (exit $ac_status); } &&
7204          { ac_try='test -s conftest.$ac_objext'
7205   { (eval echo "$as_me:7205: \"$ac_try\"") >&5
7206   (eval $ac_try) 2>&5
7207   ac_status=$?
7208   echo "$as_me:7208: \$? = $ac_status" >&5
7209   (exit $ac_status); }; }; then
7210   cf_cv_wint_t=yes
7211 else
7212   echo "$as_me: failed program was:" >&5
7213 cat conftest.$ac_ext >&5
7214 cf_cv_wint_t=unknown
7215 fi
7216 rm -f conftest.$ac_objext conftest.$ac_ext
7217 fi
7218 rm -f conftest.$ac_objext conftest.$ac_ext
7219 fi
7220 echo "$as_me:7220: result: $cf_cv_wint_t" >&5
7221 echo "${ECHO_T}$cf_cv_wint_t" >&6
7222
7223 if test "$cf_cv_wint_t" = yes ; then
7224         cat >>confdefs.h <<\EOF
7225 #define NEED_WCHAR_H 1
7226 EOF
7227
7228         NEED_WCHAR_H=1
7229 fi
7230
7231 # if we do not find wint_t in either place, use substitution to provide a fallback.
7232 if test "$cf_cv_wint_t" = unknown ; then
7233         NCURSES_WINT_T=1
7234 fi
7235
7236 # if we find wint_t in either place, use substitution to provide a fallback.
7237 if test "$cf_cv_wint_t" != unknown ; then
7238         NCURSES_OK_WINT_T=1
7239 fi
7240
7241         if test "$NCURSES_MBSTATE_T" != 0; then
7242                 cat >>confdefs.h <<\EOF
7243 #define NEED_MBSTATE_T_DEF 1
7244 EOF
7245
7246         fi
7247 fi
7248
7249 ###   use option --disable-lp64 to allow long chtype
7250 case $cf_cv_abi_version in
7251 [345]*)
7252         default_with_lp64=no
7253         ;;
7254 *)
7255         default_with_lp64=yes
7256         ;;
7257 esac
7258
7259 echo "$as_me:7259: checking whether to enable _LP64 definition in curses.h" >&5
7260 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7261
7262 # Check whether --enable-lp64 or --disable-lp64 was given.
7263 if test "${enable_lp64+set}" = set; then
7264   enableval="$enable_lp64"
7265   with_lp64=$enableval
7266 else
7267   with_lp64=$default_with_lp64
7268 fi;
7269 echo "$as_me:7269: result: $with_lp64" >&5
7270 echo "${ECHO_T}$with_lp64" >&6
7271
7272 if test "$with_lp64" = yes ; then
7273         cf_cv_enable_lp64=1
7274 else
7275         cf_cv_enable_lp64=0
7276 fi
7277
7278 # Check whether --enable-largefile or --disable-largefile was given.
7279 if test "${enable_largefile+set}" = set; then
7280   enableval="$enable_largefile"
7281
7282 fi;
7283 if test "$enable_largefile" != no; then
7284
7285   echo "$as_me:7285: checking for special C compiler options needed for large files" >&5
7286 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7287 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7288   echo $ECHO_N "(cached) $ECHO_C" >&6
7289 else
7290   ac_cv_sys_largefile_CC=no
7291      if test "$GCC" != yes; then
7292        ac_save_CC=$CC
7293        while :; do
7294          # IRIX 6.2 and later do not support large files by default,
7295          # so use the C compiler's -n32 option if that helps.
7296          cat >conftest.$ac_ext <<_ACEOF
7297 #line 7297 "configure"
7298 #include "confdefs.h"
7299 #include <sys/types.h>
7300  /* Check that off_t can represent 2**63 - 1 correctly.
7301     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7302     since some C++ compilers masquerading as C compilers
7303     incorrectly reject 9223372036854775807.  */
7304 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7305   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7306                        && LARGE_OFF_T % 2147483647 == 1)
7307                       ? 1 : -1];
7308 int
7309 main ()
7310 {
7311
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316          rm -f conftest.$ac_objext
7317 if { (eval echo "$as_me:7317: \"$ac_compile\"") >&5
7318   (eval $ac_compile) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest.$ac_objext'
7323   { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328   break
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332 fi
7333 rm -f conftest.$ac_objext
7334          CC="$CC -n32"
7335          rm -f conftest.$ac_objext
7336 if { (eval echo "$as_me:7336: \"$ac_compile\"") >&5
7337   (eval $ac_compile) 2>&5
7338   ac_status=$?
7339   echo "$as_me:7339: \$? = $ac_status" >&5
7340   (exit $ac_status); } &&
7341          { ac_try='test -s conftest.$ac_objext'
7342   { (eval echo "$as_me:7342: \"$ac_try\"") >&5
7343   (eval $ac_try) 2>&5
7344   ac_status=$?
7345   echo "$as_me:7345: \$? = $ac_status" >&5
7346   (exit $ac_status); }; }; then
7347   ac_cv_sys_largefile_CC=' -n32'; break
7348 else
7349   echo "$as_me: failed program was:" >&5
7350 cat conftest.$ac_ext >&5
7351 fi
7352 rm -f conftest.$ac_objext
7353          break
7354        done
7355        CC=$ac_save_CC
7356        rm -f conftest.$ac_ext
7357     fi
7358 fi
7359 echo "$as_me:7359: result: $ac_cv_sys_largefile_CC" >&5
7360 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7361   if test "$ac_cv_sys_largefile_CC" != no; then
7362     CC=$CC$ac_cv_sys_largefile_CC
7363   fi
7364
7365   echo "$as_me:7365: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7366 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7367 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370   while :; do
7371   ac_cv_sys_file_offset_bits=no
7372   cat >conftest.$ac_ext <<_ACEOF
7373 #line 7373 "configure"
7374 #include "confdefs.h"
7375 #include <sys/types.h>
7376  /* Check that off_t can represent 2**63 - 1 correctly.
7377     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7378     since some C++ compilers masquerading as C compilers
7379     incorrectly reject 9223372036854775807.  */
7380 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7381   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7382                        && LARGE_OFF_T % 2147483647 == 1)
7383                       ? 1 : -1];
7384 int
7385 main ()
7386 {
7387
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392 rm -f conftest.$ac_objext
7393 if { (eval echo "$as_me:7393: \"$ac_compile\"") >&5
7394   (eval $ac_compile) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); } &&
7398          { ac_try='test -s conftest.$ac_objext'
7399   { (eval echo "$as_me:7399: \"$ac_try\"") >&5
7400   (eval $ac_try) 2>&5
7401   ac_status=$?
7402   echo "$as_me:7402: \$? = $ac_status" >&5
7403   (exit $ac_status); }; }; then
7404   break
7405 else
7406   echo "$as_me: failed program was:" >&5
7407 cat conftest.$ac_ext >&5
7408 fi
7409 rm -f conftest.$ac_objext conftest.$ac_ext
7410   cat >conftest.$ac_ext <<_ACEOF
7411 #line 7411 "configure"
7412 #include "confdefs.h"
7413 #define _FILE_OFFSET_BITS 64
7414 #include <sys/types.h>
7415  /* Check that off_t can represent 2**63 - 1 correctly.
7416     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7417     since some C++ compilers masquerading as C compilers
7418     incorrectly reject 9223372036854775807.  */
7419 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7420   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7421                        && LARGE_OFF_T % 2147483647 == 1)
7422                       ? 1 : -1];
7423 int
7424 main ()
7425 {
7426
7427   ;
7428   return 0;
7429 }
7430 _ACEOF
7431 rm -f conftest.$ac_objext
7432 if { (eval echo "$as_me:7432: \"$ac_compile\"") >&5
7433   (eval $ac_compile) 2>&5
7434   ac_status=$?
7435   echo "$as_me:7435: \$? = $ac_status" >&5
7436   (exit $ac_status); } &&
7437          { ac_try='test -s conftest.$ac_objext'
7438   { (eval echo "$as_me:7438: \"$ac_try\"") >&5
7439   (eval $ac_try) 2>&5
7440   ac_status=$?
7441   echo "$as_me:7441: \$? = $ac_status" >&5
7442   (exit $ac_status); }; }; then
7443   ac_cv_sys_file_offset_bits=64; break
7444 else
7445   echo "$as_me: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7447 fi
7448 rm -f conftest.$ac_objext conftest.$ac_ext
7449   break
7450 done
7451 fi
7452 echo "$as_me:7452: result: $ac_cv_sys_file_offset_bits" >&5
7453 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7454 if test "$ac_cv_sys_file_offset_bits" != no; then
7455
7456 cat >>confdefs.h <<EOF
7457 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7458 EOF
7459
7460 fi
7461 rm -f conftest*
7462   echo "$as_me:7462: checking for _LARGE_FILES value needed for large files" >&5
7463 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7464 if test "${ac_cv_sys_large_files+set}" = set; then
7465   echo $ECHO_N "(cached) $ECHO_C" >&6
7466 else
7467   while :; do
7468   ac_cv_sys_large_files=no
7469   cat >conftest.$ac_ext <<_ACEOF
7470 #line 7470 "configure"
7471 #include "confdefs.h"
7472 #include <sys/types.h>
7473  /* Check that off_t can represent 2**63 - 1 correctly.
7474     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7475     since some C++ compilers masquerading as C compilers
7476     incorrectly reject 9223372036854775807.  */
7477 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7478   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7479                        && LARGE_OFF_T % 2147483647 == 1)
7480                       ? 1 : -1];
7481 int
7482 main ()
7483 {
7484
7485   ;
7486   return 0;
7487 }
7488 _ACEOF
7489 rm -f conftest.$ac_objext
7490 if { (eval echo "$as_me:7490: \"$ac_compile\"") >&5
7491   (eval $ac_compile) 2>&5
7492   ac_status=$?
7493   echo "$as_me:7493: \$? = $ac_status" >&5
7494   (exit $ac_status); } &&
7495          { ac_try='test -s conftest.$ac_objext'
7496   { (eval echo "$as_me:7496: \"$ac_try\"") >&5
7497   (eval $ac_try) 2>&5
7498   ac_status=$?
7499   echo "$as_me:7499: \$? = $ac_status" >&5
7500   (exit $ac_status); }; }; then
7501   break
7502 else
7503   echo "$as_me: failed program was:" >&5
7504 cat conftest.$ac_ext >&5
7505 fi
7506 rm -f conftest.$ac_objext conftest.$ac_ext
7507   cat >conftest.$ac_ext <<_ACEOF
7508 #line 7508 "configure"
7509 #include "confdefs.h"
7510 #define _LARGE_FILES 1
7511 #include <sys/types.h>
7512  /* Check that off_t can represent 2**63 - 1 correctly.
7513     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7514     since some C++ compilers masquerading as C compilers
7515     incorrectly reject 9223372036854775807.  */
7516 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7517   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7518                        && LARGE_OFF_T % 2147483647 == 1)
7519                       ? 1 : -1];
7520 int
7521 main ()
7522 {
7523
7524   ;
7525   return 0;
7526 }
7527 _ACEOF
7528 rm -f conftest.$ac_objext
7529 if { (eval echo "$as_me:7529: \"$ac_compile\"") >&5
7530   (eval $ac_compile) 2>&5
7531   ac_status=$?
7532   echo "$as_me:7532: \$? = $ac_status" >&5
7533   (exit $ac_status); } &&
7534          { ac_try='test -s conftest.$ac_objext'
7535   { (eval echo "$as_me:7535: \"$ac_try\"") >&5
7536   (eval $ac_try) 2>&5
7537   ac_status=$?
7538   echo "$as_me:7538: \$? = $ac_status" >&5
7539   (exit $ac_status); }; }; then
7540   ac_cv_sys_large_files=1; break
7541 else
7542   echo "$as_me: failed program was:" >&5
7543 cat conftest.$ac_ext >&5
7544 fi
7545 rm -f conftest.$ac_objext conftest.$ac_ext
7546   break
7547 done
7548 fi
7549 echo "$as_me:7549: result: $ac_cv_sys_large_files" >&5
7550 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7551 if test "$ac_cv_sys_large_files" != no; then
7552
7553 cat >>confdefs.h <<EOF
7554 #define _LARGE_FILES $ac_cv_sys_large_files
7555 EOF
7556
7557 fi
7558 rm -f conftest*
7559 fi
7560
7561     if test "$enable_largefile" != no ; then
7562         echo "$as_me:7562: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7563 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7564 if test "${ac_cv_sys_largefile_source+set}" = set; then
7565   echo $ECHO_N "(cached) $ECHO_C" >&6
7566 else
7567   while :; do
7568   ac_cv_sys_largefile_source=no
7569   cat >conftest.$ac_ext <<_ACEOF
7570 #line 7570 "configure"
7571 #include "confdefs.h"
7572 #include <stdio.h>
7573 int
7574 main ()
7575 {
7576 return !fseeko;
7577   ;
7578   return 0;
7579 }
7580 _ACEOF
7581 rm -f conftest.$ac_objext
7582 if { (eval echo "$as_me:7582: \"$ac_compile\"") >&5
7583   (eval $ac_compile) 2>&5
7584   ac_status=$?
7585   echo "$as_me:7585: \$? = $ac_status" >&5
7586   (exit $ac_status); } &&
7587          { ac_try='test -s conftest.$ac_objext'
7588   { (eval echo "$as_me:7588: \"$ac_try\"") >&5
7589   (eval $ac_try) 2>&5
7590   ac_status=$?
7591   echo "$as_me:7591: \$? = $ac_status" >&5
7592   (exit $ac_status); }; }; then
7593   break
7594 else
7595   echo "$as_me: failed program was:" >&5
7596 cat conftest.$ac_ext >&5
7597 fi
7598 rm -f conftest.$ac_objext conftest.$ac_ext
7599   cat >conftest.$ac_ext <<_ACEOF
7600 #line 7600 "configure"
7601 #include "confdefs.h"
7602 #define _LARGEFILE_SOURCE 1
7603 #include <stdio.h>
7604 int
7605 main ()
7606 {
7607 return !fseeko;
7608   ;
7609   return 0;
7610 }
7611 _ACEOF
7612 rm -f conftest.$ac_objext
7613 if { (eval echo "$as_me:7613: \"$ac_compile\"") >&5
7614   (eval $ac_compile) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); } &&
7618          { ac_try='test -s conftest.$ac_objext'
7619   { (eval echo "$as_me:7619: \"$ac_try\"") >&5
7620   (eval $ac_try) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); }; }; then
7624   ac_cv_sys_largefile_source=1; break
7625 else
7626   echo "$as_me: failed program was:" >&5
7627 cat conftest.$ac_ext >&5
7628 fi
7629 rm -f conftest.$ac_objext conftest.$ac_ext
7630   break
7631 done
7632 fi
7633 echo "$as_me:7633: result: $ac_cv_sys_largefile_source" >&5
7634 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7635 if test "$ac_cv_sys_largefile_source" != no; then
7636
7637 cat >>confdefs.h <<EOF
7638 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7639 EOF
7640
7641 fi
7642 rm -f conftest*
7643
7644 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7645 # in glibc 2.1.3, but that breaks too many other things.
7646 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7647 echo "$as_me:7647: checking for fseeko" >&5
7648 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7649 if test "${ac_cv_func_fseeko+set}" = set; then
7650   echo $ECHO_N "(cached) $ECHO_C" >&6
7651 else
7652   cat >conftest.$ac_ext <<_ACEOF
7653 #line 7653 "configure"
7654 #include "confdefs.h"
7655 #include <stdio.h>
7656 int
7657 main ()
7658 {
7659 return fseeko && fseeko (stdin, 0, 0);
7660   ;
7661   return 0;
7662 }
7663 _ACEOF
7664 rm -f conftest.$ac_objext conftest$ac_exeext
7665 if { (eval echo "$as_me:7665: \"$ac_link\"") >&5
7666   (eval $ac_link) 2>&5
7667   ac_status=$?
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); } &&
7670          { ac_try='test -s conftest$ac_exeext'
7671   { (eval echo "$as_me:7671: \"$ac_try\"") >&5
7672   (eval $ac_try) 2>&5
7673   ac_status=$?
7674   echo "$as_me:7674: \$? = $ac_status" >&5
7675   (exit $ac_status); }; }; then
7676   ac_cv_func_fseeko=yes
7677 else
7678   echo "$as_me: failed program was:" >&5
7679 cat conftest.$ac_ext >&5
7680 ac_cv_func_fseeko=no
7681 fi
7682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7683 fi
7684 echo "$as_me:7684: result: $ac_cv_func_fseeko" >&5
7685 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7686 if test $ac_cv_func_fseeko = yes; then
7687
7688 cat >>confdefs.h <<\EOF
7689 #define HAVE_FSEEKO 1
7690 EOF
7691
7692 fi
7693
7694         # Normally we would collect these definitions in the config.h,
7695         # but (like _XOPEN_SOURCE), some environments rely on having these
7696         # defined before any of the system headers are included.  Another
7697         # case comes up with C++, e.g., on AIX the compiler compiles the
7698         # header files by themselves before looking at the body files it is
7699         # told to compile.  For ncurses, those header files do not include
7700         # the config.h
7701         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7702         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7703
7704         echo "$as_me:7704: checking whether to use struct dirent64" >&5
7705 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7706 if test "${cf_cv_struct_dirent64+set}" = set; then
7707   echo $ECHO_N "(cached) $ECHO_C" >&6
7708 else
7709
7710                 cat >conftest.$ac_ext <<_ACEOF
7711 #line 7711 "configure"
7712 #include "confdefs.h"
7713
7714 #include <sys/types.h>
7715 #include <dirent.h>
7716
7717 int
7718 main ()
7719 {
7720
7721                 /* if transitional largefile support is setup, this is true */
7722                 extern struct dirent64 * readdir(DIR *);
7723                 struct dirent64 *x = readdir((DIR *)0);
7724                 struct dirent *y = readdir((DIR *)0);
7725                 int z = x - y;
7726
7727   ;
7728   return 0;
7729 }
7730 _ACEOF
7731 rm -f conftest.$ac_objext
7732 if { (eval echo "$as_me:7732: \"$ac_compile\"") >&5
7733   (eval $ac_compile) 2>&5
7734   ac_status=$?
7735   echo "$as_me:7735: \$? = $ac_status" >&5
7736   (exit $ac_status); } &&
7737          { ac_try='test -s conftest.$ac_objext'
7738   { (eval echo "$as_me:7738: \"$ac_try\"") >&5
7739   (eval $ac_try) 2>&5
7740   ac_status=$?
7741   echo "$as_me:7741: \$? = $ac_status" >&5
7742   (exit $ac_status); }; }; then
7743   cf_cv_struct_dirent64=yes
7744 else
7745   echo "$as_me: failed program was:" >&5
7746 cat conftest.$ac_ext >&5
7747 cf_cv_struct_dirent64=no
7748 fi
7749 rm -f conftest.$ac_objext conftest.$ac_ext
7750
7751 fi
7752 echo "$as_me:7752: result: $cf_cv_struct_dirent64" >&5
7753 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7754         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7755 #define HAVE_STRUCT_DIRENT64 1
7756 EOF
7757
7758     fi
7759
7760 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7761 echo "$as_me:7761: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7762 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7763
7764 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7765 if test "${enable_tparm_varargs+set}" = set; then
7766   enableval="$enable_tparm_varargs"
7767   with_tparm_varargs=$enableval
7768 else
7769   with_tparm_varargs=yes
7770 fi;
7771 echo "$as_me:7771: result: $with_tparm_varargs" >&5
7772 echo "${ECHO_T}$with_tparm_varargs" >&6
7773 NCURSES_TPARM_VARARGS=0
7774 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7775
7776 ###   use option --with-bool to override bool's type
7777 echo "$as_me:7777: checking for type of bool" >&5
7778 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7779
7780 # Check whether --with-bool or --without-bool was given.
7781 if test "${with_bool+set}" = set; then
7782   withval="$with_bool"
7783   NCURSES_BOOL="$withval"
7784 else
7785   NCURSES_BOOL=auto
7786 fi;
7787 echo "$as_me:7787: result: $NCURSES_BOOL" >&5
7788 echo "${ECHO_T}$NCURSES_BOOL" >&6
7789
7790 echo "$as_me:7790: checking for alternate terminal capabilities file" >&5
7791 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7792
7793 # Check whether --with-caps or --without-caps was given.
7794 if test "${with_caps+set}" = set; then
7795   withval="$with_caps"
7796   TERMINFO_CAPS=Caps.$withval
7797 else
7798   TERMINFO_CAPS=Caps
7799 fi;
7800 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7801 echo "$as_me:7801: result: $TERMINFO_CAPS" >&5
7802 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7803
7804 ###   use option --with-chtype to override chtype's type
7805 echo "$as_me:7805: checking for type of chtype" >&5
7806 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7807
7808 # Check whether --with-chtype or --without-chtype was given.
7809 if test "${with_chtype+set}" = set; then
7810   withval="$with_chtype"
7811   NCURSES_CHTYPE="$withval"
7812 else
7813   NCURSES_CHTYPE=auto
7814 fi;
7815 echo "$as_me:7815: result: $NCURSES_CHTYPE" >&5
7816 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7817
7818 ###   use option --with-ospeed to override ospeed's type
7819 echo "$as_me:7819: checking for type of ospeed" >&5
7820 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7821
7822 # Check whether --with-ospeed or --without-ospeed was given.
7823 if test "${with_ospeed+set}" = set; then
7824   withval="$with_ospeed"
7825   NCURSES_OSPEED="$withval"
7826 else
7827   NCURSES_OSPEED=short
7828 fi;
7829 echo "$as_me:7829: result: $NCURSES_OSPEED" >&5
7830 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7831
7832 ###   use option --with-mmask-t to override mmask_t's type
7833 echo "$as_me:7833: checking for type of mmask_t" >&5
7834 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7835
7836 # Check whether --with-mmask-t or --without-mmask-t was given.
7837 if test "${with_mmask_t+set}" = set; then
7838   withval="$with_mmask_t"
7839   NCURSES_MMASK_T="$withval"
7840 else
7841   NCURSES_MMASK_T=auto
7842 fi;
7843 echo "$as_me:7843: result: $NCURSES_MMASK_T" >&5
7844 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7845
7846 ### Enable compiling-in rcs id's
7847 echo "$as_me:7847: checking if RCS identifiers should be compiled-in" >&5
7848 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7849
7850 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7851 if test "${with_rcs_ids+set}" = set; then
7852   withval="$with_rcs_ids"
7853   with_rcs_ids=$withval
7854 else
7855   with_rcs_ids=no
7856 fi;
7857 echo "$as_me:7857: result: $with_rcs_ids" >&5
7858 echo "${ECHO_T}$with_rcs_ids" >&6
7859 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7860 #define USE_RCS_IDS 1
7861 EOF
7862
7863 ###############################################################################
7864
7865 echo "$as_me:7865: checking format of man-pages" >&5
7866 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7867
7868 # Check whether --with-manpage-format or --without-manpage-format was given.
7869 if test "${with_manpage_format+set}" = set; then
7870   withval="$with_manpage_format"
7871   MANPAGE_FORMAT=$withval
7872 else
7873   MANPAGE_FORMAT=unknown
7874 fi;
7875
7876 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7877 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7878
7879 cf_unknown=
7880
7881 case $MANPAGE_FORMAT in
7882 unknown)
7883   if test -z "$MANPATH" ; then
7884     MANPATH="/usr/man:/usr/share/man"
7885   fi
7886
7887   # look for the 'date' man-page (it's most likely to be installed!)
7888   MANPAGE_FORMAT=
7889   cf_preform=no
7890   cf_catonly=yes
7891   cf_example=date
7892
7893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7894   for cf_dir in $MANPATH; do
7895     test -z "$cf_dir" && cf_dir=/usr/man
7896     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
7897     do
7898       cf_test=`echo $cf_name | sed -e 's/*//'`
7899       if test "x$cf_test" = "x$cf_name" ; then
7900
7901         case "$cf_name" in
7902         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7903         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7904         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7905         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7906         esac
7907
7908         case "$cf_name" in
7909         $cf_dir/man*)
7910           cf_catonly=no
7911           ;;
7912         $cf_dir/cat*)
7913           cf_preform=yes
7914           ;;
7915         esac
7916         break
7917       fi
7918
7919       # if we found a match in either man* or cat*, stop looking
7920       if test -n "$MANPAGE_FORMAT" ; then
7921         cf_found=no
7922         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7923         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7924         case "$cf_name" in
7925         $cf_dir/cat*)
7926           cf_found=yes
7927           ;;
7928         esac
7929         test $cf_found=yes && break
7930       fi
7931     done
7932     # only check the first directory in $MANPATH where we find manpages
7933     if test -n "$MANPAGE_FORMAT" ; then
7934        break
7935     fi
7936   done
7937   # if we did not find the example, just assume it is normal
7938   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7939   IFS="$ac_save_ifs"
7940   ;;
7941 *)
7942   for cf_option in $MANPAGE_FORMAT; do
7943      case $cf_option in #(vi
7944      gzip|compress|BSDI|normal|formatted|catonly)
7945        ;;
7946      *)
7947        cf_unknown="$cf_unknown $cf_option"
7948        ;;
7949      esac
7950   done
7951   ;;
7952 esac
7953
7954 echo "$as_me:7954: result: $MANPAGE_FORMAT" >&5
7955 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7956 if test -n "$cf_unknown" ; then
7957   { echo "$as_me:7957: WARNING: Unexpected manpage-format $cf_unknown" >&5
7958 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7959 fi
7960
7961 echo "$as_me:7961: checking for manpage renaming" >&5
7962 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7963
7964 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7965 if test "${with_manpage_renames+set}" = set; then
7966   withval="$with_manpage_renames"
7967   MANPAGE_RENAMES=$withval
7968 else
7969   MANPAGE_RENAMES=yes
7970 fi;
7971
7972 case ".$MANPAGE_RENAMES" in #(vi
7973 .no) #(vi
7974   ;;
7975 .|.yes)
7976   # Debian 'man' program?
7977   if test -f /etc/debian_version ; then
7978     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7979   else
7980     MANPAGE_RENAMES=no
7981   fi
7982   ;;
7983 esac
7984
7985 if test "$MANPAGE_RENAMES" != no ; then
7986   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7987     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7988   elif test ! -f $MANPAGE_RENAMES ; then
7989     { { echo "$as_me:7989: error: not a filename: $MANPAGE_RENAMES" >&5
7990 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7991    { (exit 1); exit 1; }; }
7992   fi
7993
7994   test ! -d man && mkdir man
7995
7996   # Construct a sed-script to perform renaming within man-pages
7997   if test -n "$MANPAGE_RENAMES" ; then
7998     test ! -d man && mkdir man
7999     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8000   fi
8001 fi
8002
8003 echo "$as_me:8003: result: $MANPAGE_RENAMES" >&5
8004 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8005
8006 echo "$as_me:8006: checking if manpage aliases will be installed" >&5
8007 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8008
8009 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8010 if test "${with_manpage_aliases+set}" = set; then
8011   withval="$with_manpage_aliases"
8012   MANPAGE_ALIASES=$withval
8013 else
8014   MANPAGE_ALIASES=yes
8015 fi;
8016
8017 echo "$as_me:8017: result: $MANPAGE_ALIASES" >&5
8018 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8019
8020 if test "$LN_S" = "ln -s"; then
8021         cf_use_symlinks=yes
8022 else
8023         cf_use_symlinks=no
8024 fi
8025
8026 MANPAGE_SYMLINKS=no
8027 if test "$MANPAGE_ALIASES" = yes ; then
8028 echo "$as_me:8028: checking if manpage symlinks should be used" >&5
8029 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8030
8031 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8032 if test "${with_manpage_symlinks+set}" = set; then
8033   withval="$with_manpage_symlinks"
8034   MANPAGE_SYMLINKS=$withval
8035 else
8036   MANPAGE_SYMLINKS=$cf_use_symlinks
8037 fi;
8038
8039 if test "$$cf_use_symlinks" = no; then
8040 if test "$MANPAGE_SYMLINKS" = yes ; then
8041         { echo "$as_me:8041: WARNING: cannot make symlinks" >&5
8042 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8043         MANPAGE_SYMLINKS=no
8044 fi
8045 fi
8046
8047 echo "$as_me:8047: result: $MANPAGE_SYMLINKS" >&5
8048 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8049 fi
8050
8051 echo "$as_me:8051: checking for manpage tbl" >&5
8052 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8053
8054 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8055 if test "${with_manpage_tbl+set}" = set; then
8056   withval="$with_manpage_tbl"
8057   MANPAGE_TBL=$withval
8058 else
8059   MANPAGE_TBL=no
8060 fi;
8061
8062 echo "$as_me:8062: result: $MANPAGE_TBL" >&5
8063 echo "${ECHO_T}$MANPAGE_TBL" >&6
8064
8065   if test "$prefix" = "NONE" ; then
8066      cf_prefix="$ac_default_prefix"
8067   else
8068      cf_prefix="$prefix"
8069   fi
8070
8071   case "$MANPAGE_FORMAT" in # (vi
8072   *catonly*) # (vi
8073     cf_format=yes
8074     cf_inboth=no
8075     ;;
8076   *formatted*) # (vi
8077     cf_format=yes
8078     cf_inboth=yes
8079     ;;
8080   *)
8081     cf_format=no
8082     cf_inboth=no
8083     ;;
8084   esac
8085
8086 test ! -d man && mkdir man
8087
8088 cf_so_strip=
8089 cf_compress=
8090 case "$MANPAGE_FORMAT" in #(vi
8091 *compress*) #(vi
8092         cf_so_strip="Z"
8093         cf_compress=compress
8094   ;;
8095 *gzip*) #(vi
8096         cf_so_strip="gz"
8097         cf_compress=gzip
8098   ;;
8099 esac
8100
8101 cf_edit_man=./edit_man.sh
8102 cf_man_alias=`pwd`/man_alias.sed
8103
8104 cat >$cf_edit_man <<CF_EOF
8105 #! /bin/sh
8106 # this script is generated by the configure-script CF_MAN_PAGES macro.
8107
8108 prefix="$cf_prefix"
8109 datadir="$datadir"
8110
8111 NCURSES_MAJOR="$NCURSES_MAJOR"
8112 NCURSES_MINOR="$NCURSES_MINOR"
8113 NCURSES_PATCH="$NCURSES_PATCH"
8114
8115 NCURSES_OSPEED="$NCURSES_OSPEED"
8116 TERMINFO="$TERMINFO"
8117
8118 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8119
8120 INSTALL="$INSTALL"
8121 INSTALL_DATA="$INSTALL_DATA"
8122
8123 transform="$program_transform_name"
8124
8125 TMP=\${TMPDIR-/tmp}/man\$\$
8126 trap "rm -f \$TMP" 0 1 2 5 15
8127
8128 form=\$1
8129 shift || exit 1
8130
8131 verb=\$1
8132 shift || exit 1
8133
8134 mandir=\$1
8135 shift || exit 1
8136
8137 srcdir=\$1
8138 top_srcdir=\$srcdir/..
8139 shift || exit 1
8140
8141 if test "\$form" = normal ; then
8142         if test "$cf_format" = yes ; then
8143         if test "$cf_inboth" = no ; then
8144                 sh \$0 format \$verb \$mandir \$srcdir \$*
8145                 exit $?
8146         fi
8147         fi
8148         cf_subdir=\$mandir/man
8149         cf_tables=$MANPAGE_TBL
8150 else
8151         cf_subdir=\$mandir/cat
8152         cf_tables=yes
8153 fi
8154
8155 # process the list of source-files
8156 for i in \$* ; do
8157 case \$i in #(vi
8158 *.orig|*.rej) ;; #(vi
8159 *.[0-9]*)
8160         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8161         if test \$verb = installing ; then
8162         if test ! -d \$cf_subdir\${section} ; then
8163                 \$MKDIRS \$cf_subdir\$section
8164         fi
8165         fi
8166
8167         # replace variables in man page
8168         if test ! -f $cf_man_alias ; then
8169 cat >>$cf_man_alias <<-CF_EOF2
8170                 s,@DATADIR@,\$datadir,
8171                 s,@TERMINFO@,\$TERMINFO,
8172                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,
8173                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,
8174                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,
8175                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,
8176 CF_EOF
8177
8178         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8179         do
8180                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8181                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8182 cat >>$cf_edit_man <<-CF_EOF
8183                 s,@$cf_NAME@,$cf_name,
8184 CF_EOF
8185         done
8186
8187 cat >>$cf_edit_man <<CF_EOF
8188 CF_EOF2
8189                 echo "...made $cf_man_alias"
8190         fi
8191
8192         aliases=
8193         cf_source=\`basename \$i\`
8194         inalias=\$cf_source
8195         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8196         if test ! -f \$inalias ; then
8197                 echo .. skipped \$cf_source
8198                 continue
8199         fi
8200 CF_EOF
8201
8202 if test "$MANPAGE_ALIASES" != no ; then
8203 cat >>$cf_edit_man <<CF_EOF
8204         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8205 CF_EOF
8206 fi
8207
8208 if test "$MANPAGE_RENAMES" = no ; then
8209 cat >>$cf_edit_man <<CF_EOF
8210         # perform program transformations for section 1 man pages
8211         if test \$section = 1 ; then
8212                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8213         else
8214                 cf_target=\$cf_subdir\${section}/\$cf_source
8215         fi
8216 CF_EOF
8217 else
8218 cat >>$cf_edit_man <<CF_EOF
8219         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8220         if test -z "\$cf_target" ; then
8221                 echo '? missing rename for '\$cf_source
8222                 cf_target="\$cf_source"
8223         fi
8224         cf_target="\$cf_subdir\${section}/\${cf_target}"
8225
8226 CF_EOF
8227 fi
8228
8229 cat >>$cf_edit_man <<CF_EOF
8230         sed     -f $cf_man_alias \\
8231 CF_EOF
8232
8233 if test -f $MANPAGE_RENAMES ; then
8234 cat >>$cf_edit_man <<CF_EOF
8235                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8236 CF_EOF
8237 else
8238 cat >>$cf_edit_man <<CF_EOF
8239                 < \$i >\$TMP
8240 CF_EOF
8241 fi
8242
8243 cat >>$cf_edit_man <<CF_EOF
8244 if test \$cf_tables = yes ; then
8245         tbl \$TMP >\$TMP.out
8246         mv \$TMP.out \$TMP
8247 fi
8248 CF_EOF
8249
8250 if test $with_curses_h != yes ; then
8251 cat >>$cf_edit_man <<CF_EOF
8252         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8253         mv \$TMP.out \$TMP
8254 CF_EOF
8255 fi
8256
8257 cat >>$cf_edit_man <<CF_EOF
8258         if test \$form = format ; then
8259                 nroff -man \$TMP >\$TMP.out
8260                 mv \$TMP.out \$TMP
8261         fi
8262 CF_EOF
8263
8264 if test -n "$cf_compress" ; then
8265 cat >>$cf_edit_man <<CF_EOF
8266         if test \$verb = installing ; then
8267         if ( $cf_compress -f \$TMP )
8268         then
8269                 mv \$TMP.$cf_so_strip \$TMP
8270         fi
8271         fi
8272         cf_target="\$cf_target.$cf_so_strip"
8273 CF_EOF
8274 fi
8275
8276 case "$MANPAGE_FORMAT" in #(vi
8277 *BSDI*)
8278 cat >>$cf_edit_man <<CF_EOF
8279         if test \$form = format ; then
8280                 # BSDI installs only .0 suffixes in the cat directories
8281                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8282         fi
8283 CF_EOF
8284   ;;
8285 esac
8286
8287 cat >>$cf_edit_man <<CF_EOF
8288         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8289         if test \$verb = installing ; then
8290                 echo \$verb \$cf_target
8291                 \$INSTALL_DATA \$TMP \$cf_target
8292                 test -d \$cf_subdir\${section} &&
8293                 test -n "\$aliases" && (
8294                         cd \$cf_subdir\${section} && (
8295                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8296                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8297                                 cf_target=\`basename \$cf_target\`
8298                                 for cf_alias in \$aliases
8299                                 do
8300                                         if test \$section = 1 ; then
8301                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8302                                         fi
8303
8304                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8305                                                 if test -f \$cf_alias\${suffix} ; then
8306                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8307                                                         then
8308                                                                 continue
8309                                                         fi
8310                                                 fi
8311                                                 echo .. \$verb alias \$cf_alias\${suffix}
8312                                                 rm -f \$cf_alias\${suffix}
8313                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8314                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8315                                                 echo ".so \$cf_source" >\$TMP
8316 CF_EOF
8317 if test -n "$cf_compress" ; then
8318 cat >>$cf_edit_man <<CF_EOF
8319                                                 if test -n "$cf_so_strip" ; then
8320                                                         $cf_compress -f \$TMP
8321                                                         mv \$TMP.$cf_so_strip \$TMP
8322                                                 fi
8323 CF_EOF
8324 fi
8325 cat >>$cf_edit_man <<CF_EOF
8326                                                 echo .. \$verb alias \$cf_alias\${suffix}
8327                                                 rm -f \$cf_alias\${suffix}
8328                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8329                                         fi
8330                                 done
8331                         )
8332                 )
8333         elif test \$verb = removing ; then
8334                 test -f \$cf_target && (
8335                         echo \$verb \$cf_target
8336                         rm -f \$cf_target
8337                 )
8338                 test -d \$cf_subdir\${section} &&
8339                 test -n "\$aliases" && (
8340                         cd \$cf_subdir\${section} && (
8341                                 for cf_alias in \$aliases
8342                                 do
8343                                         if test \$section = 1 ; then
8344                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8345                                         fi
8346
8347                                         echo .. \$verb alias \$cf_alias\${suffix}
8348                                         rm -f \$cf_alias\${suffix}
8349                                 done
8350                         )
8351                 )
8352         else
8353 #               echo ".hy 0"
8354                 cat \$TMP
8355         fi
8356         ;;
8357 esac
8358 done
8359
8360 if test $cf_inboth = yes ; then
8361 if test \$form != format ; then
8362         sh \$0 format \$verb \$mandir \$srcdir \$*
8363 fi
8364 fi
8365
8366 exit 0
8367 CF_EOF
8368 chmod 755 $cf_edit_man
8369
8370 ###############################################################################
8371
8372 ### Note that some functions (such as const) are normally disabled anyway.
8373 echo "$as_me:8373: checking if you want to build with function extensions" >&5
8374 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8375
8376 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8377 if test "${enable_ext_funcs+set}" = set; then
8378   enableval="$enable_ext_funcs"
8379   with_ext_funcs=$enableval
8380 else
8381   with_ext_funcs=yes
8382 fi;
8383 echo "$as_me:8383: result: $with_ext_funcs" >&5
8384 echo "${ECHO_T}$with_ext_funcs" >&6
8385 if test "$with_ext_funcs" = yes ; then
8386         NCURSES_EXT_FUNCS=1
8387         cat >>confdefs.h <<\EOF
8388 #define HAVE_CURSES_VERSION 1
8389 EOF
8390
8391         cat >>confdefs.h <<\EOF
8392 #define HAVE_HAS_KEY 1
8393 EOF
8394
8395         cat >>confdefs.h <<\EOF
8396 #define HAVE_RESIZETERM 1
8397 EOF
8398
8399         cat >>confdefs.h <<\EOF
8400 #define HAVE_RESIZE_TERM 1
8401 EOF
8402
8403         cat >>confdefs.h <<\EOF
8404 #define HAVE_USE_DEFAULT_COLORS 1
8405 EOF
8406
8407         cat >>confdefs.h <<\EOF
8408 #define HAVE_WRESIZE 1
8409 EOF
8410
8411         cat >>confdefs.h <<\EOF
8412 #define NCURSES_EXT_FUNCS 1
8413 EOF
8414
8415 else
8416         NCURSES_EXT_FUNCS=0
8417 fi
8418
8419 ###   use option --enable-const to turn on use of const beyond that in XSI.
8420 echo "$as_me:8420: checking for extended use of const keyword" >&5
8421 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8422
8423 # Check whether --enable-const or --disable-const was given.
8424 if test "${enable_const+set}" = set; then
8425   enableval="$enable_const"
8426   with_ext_const=$enableval
8427 else
8428   with_ext_const=no
8429 fi;
8430 echo "$as_me:8430: result: $with_ext_const" >&5
8431 echo "${ECHO_T}$with_ext_const" >&6
8432 NCURSES_CONST='/*nothing*/'
8433 if test "$with_ext_const" = yes ; then
8434         NCURSES_CONST=const
8435 fi
8436
8437 echo "$as_me:8437: checking if you want \$NCURSES_NO_PADDING code" >&5
8438 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8439
8440 # Check whether --enable-no-padding or --disable-no-padding was given.
8441 if test "${enable_no_padding+set}" = set; then
8442   enableval="$enable_no_padding"
8443   with_no_padding=$enableval
8444 else
8445   with_no_padding=$with_ext_funcs
8446 fi;
8447 echo "$as_me:8447: result: $with_no_padding" >&5
8448 echo "${ECHO_T}$with_no_padding" >&6
8449 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8450 #define NCURSES_NO_PADDING 1
8451 EOF
8452
8453 echo "$as_me:8453: checking for ANSI C header files" >&5
8454 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8455 if test "${ac_cv_header_stdc+set}" = set; then
8456   echo $ECHO_N "(cached) $ECHO_C" >&6
8457 else
8458   cat >conftest.$ac_ext <<_ACEOF
8459 #line 8459 "configure"
8460 #include "confdefs.h"
8461 #include <stdlib.h>
8462 #include <stdarg.h>
8463 #include <string.h>
8464 #include <float.h>
8465
8466 _ACEOF
8467 if { (eval echo "$as_me:8467: \"$ac_cpp conftest.$ac_ext\"") >&5
8468   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8469   ac_status=$?
8470   egrep -v '^ *\+' conftest.er1 >conftest.err
8471   rm -f conftest.er1
8472   cat conftest.err >&5
8473   echo "$as_me:8473: \$? = $ac_status" >&5
8474   (exit $ac_status); } >/dev/null; then
8475   if test -s conftest.err; then
8476     ac_cpp_err=$ac_c_preproc_warn_flag
8477   else
8478     ac_cpp_err=
8479   fi
8480 else
8481   ac_cpp_err=yes
8482 fi
8483 if test -z "$ac_cpp_err"; then
8484   ac_cv_header_stdc=yes
8485 else
8486   echo "$as_me: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   ac_cv_header_stdc=no
8489 fi
8490 rm -f conftest.err conftest.$ac_ext
8491
8492 if test $ac_cv_header_stdc = yes; then
8493   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8494   cat >conftest.$ac_ext <<_ACEOF
8495 #line 8495 "configure"
8496 #include "confdefs.h"
8497 #include <string.h>
8498
8499 _ACEOF
8500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8501   egrep "memchr" >/dev/null 2>&1; then
8502   :
8503 else
8504   ac_cv_header_stdc=no
8505 fi
8506 rm -f conftest*
8507
8508 fi
8509
8510 if test $ac_cv_header_stdc = yes; then
8511   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8512   cat >conftest.$ac_ext <<_ACEOF
8513 #line 8513 "configure"
8514 #include "confdefs.h"
8515 #include <stdlib.h>
8516
8517 _ACEOF
8518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8519   egrep "free" >/dev/null 2>&1; then
8520   :
8521 else
8522   ac_cv_header_stdc=no
8523 fi
8524 rm -f conftest*
8525
8526 fi
8527
8528 if test $ac_cv_header_stdc = yes; then
8529   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8530   if test "$cross_compiling" = yes; then
8531   :
8532 else
8533   cat >conftest.$ac_ext <<_ACEOF
8534 #line 8534 "configure"
8535 #include "confdefs.h"
8536 #include <ctype.h>
8537 #if ((' ' & 0x0FF) == 0x020)
8538 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8539 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8540 #else
8541 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8542                      || ('j' <= (c) && (c) <= 'r') \
8543                      || ('s' <= (c) && (c) <= 'z'))
8544 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8545 #endif
8546
8547 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8548 int
8549 main ()
8550 {
8551   int i;
8552   for (i = 0; i < 256; i++)
8553     if (XOR (islower (i), ISLOWER (i))
8554         || toupper (i) != TOUPPER (i))
8555       $ac_main_return(2);
8556   $ac_main_return (0);
8557 }
8558 _ACEOF
8559 rm -f conftest$ac_exeext
8560 if { (eval echo "$as_me:8560: \"$ac_link\"") >&5
8561   (eval $ac_link) 2>&5
8562   ac_status=$?
8563   echo "$as_me:8563: \$? = $ac_status" >&5
8564   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8565   { (eval echo "$as_me:8565: \"$ac_try\"") >&5
8566   (eval $ac_try) 2>&5
8567   ac_status=$?
8568   echo "$as_me:8568: \$? = $ac_status" >&5
8569   (exit $ac_status); }; }; then
8570   :
8571 else
8572   echo "$as_me: program exited with status $ac_status" >&5
8573 echo "$as_me: failed program was:" >&5
8574 cat conftest.$ac_ext >&5
8575 ac_cv_header_stdc=no
8576 fi
8577 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8578 fi
8579 fi
8580 fi
8581 echo "$as_me:8581: result: $ac_cv_header_stdc" >&5
8582 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8583 if test $ac_cv_header_stdc = yes; then
8584
8585 cat >>confdefs.h <<\EOF
8586 #define STDC_HEADERS 1
8587 EOF
8588
8589 fi
8590
8591 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8592
8593 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8594                   inttypes.h stdint.h unistd.h
8595 do
8596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8597 echo "$as_me:8597: checking for $ac_header" >&5
8598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8600   echo $ECHO_N "(cached) $ECHO_C" >&6
8601 else
8602   cat >conftest.$ac_ext <<_ACEOF
8603 #line 8603 "configure"
8604 #include "confdefs.h"
8605 $ac_includes_default
8606 #include <$ac_header>
8607 _ACEOF
8608 rm -f conftest.$ac_objext
8609 if { (eval echo "$as_me:8609: \"$ac_compile\"") >&5
8610   (eval $ac_compile) 2>&5
8611   ac_status=$?
8612   echo "$as_me:8612: \$? = $ac_status" >&5
8613   (exit $ac_status); } &&
8614          { ac_try='test -s conftest.$ac_objext'
8615   { (eval echo "$as_me:8615: \"$ac_try\"") >&5
8616   (eval $ac_try) 2>&5
8617   ac_status=$?
8618   echo "$as_me:8618: \$? = $ac_status" >&5
8619   (exit $ac_status); }; }; then
8620   eval "$as_ac_Header=yes"
8621 else
8622   echo "$as_me: failed program was:" >&5
8623 cat conftest.$ac_ext >&5
8624 eval "$as_ac_Header=no"
8625 fi
8626 rm -f conftest.$ac_objext conftest.$ac_ext
8627 fi
8628 echo "$as_me:8628: result: `eval echo '${'$as_ac_Header'}'`" >&5
8629 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8630 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8631   cat >>confdefs.h <<EOF
8632 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8633 EOF
8634
8635 fi
8636 done
8637
8638 echo "$as_me:8638: checking for signed char" >&5
8639 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8640 if test "${ac_cv_type_signed_char+set}" = set; then
8641   echo $ECHO_N "(cached) $ECHO_C" >&6
8642 else
8643   cat >conftest.$ac_ext <<_ACEOF
8644 #line 8644 "configure"
8645 #include "confdefs.h"
8646 $ac_includes_default
8647 int
8648 main ()
8649 {
8650 if ((signed char *) 0)
8651   return 0;
8652 if (sizeof (signed char))
8653   return 0;
8654   ;
8655   return 0;
8656 }
8657 _ACEOF
8658 rm -f conftest.$ac_objext
8659 if { (eval echo "$as_me:8659: \"$ac_compile\"") >&5
8660   (eval $ac_compile) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit $ac_status); } &&
8664          { ac_try='test -s conftest.$ac_objext'
8665   { (eval echo "$as_me:8665: \"$ac_try\"") >&5
8666   (eval $ac_try) 2>&5
8667   ac_status=$?
8668   echo "$as_me:8668: \$? = $ac_status" >&5
8669   (exit $ac_status); }; }; then
8670   ac_cv_type_signed_char=yes
8671 else
8672   echo "$as_me: failed program was:" >&5
8673 cat conftest.$ac_ext >&5
8674 ac_cv_type_signed_char=no
8675 fi
8676 rm -f conftest.$ac_objext conftest.$ac_ext
8677 fi
8678 echo "$as_me:8678: result: $ac_cv_type_signed_char" >&5
8679 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8680
8681 echo "$as_me:8681: checking size of signed char" >&5
8682 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8683 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8684   echo $ECHO_N "(cached) $ECHO_C" >&6
8685 else
8686   if test "$ac_cv_type_signed_char" = yes; then
8687   if test "$cross_compiling" = yes; then
8688   # Depending upon the size, compute the lo and hi bounds.
8689 cat >conftest.$ac_ext <<_ACEOF
8690 #line 8690 "configure"
8691 #include "confdefs.h"
8692 $ac_includes_default
8693 int
8694 main ()
8695 {
8696 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8697   ;
8698   return 0;
8699 }
8700 _ACEOF
8701 rm -f conftest.$ac_objext
8702 if { (eval echo "$as_me:8702: \"$ac_compile\"") >&5
8703   (eval $ac_compile) 2>&5
8704   ac_status=$?
8705   echo "$as_me:8705: \$? = $ac_status" >&5
8706   (exit $ac_status); } &&
8707          { ac_try='test -s conftest.$ac_objext'
8708   { (eval echo "$as_me:8708: \"$ac_try\"") >&5
8709   (eval $ac_try) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); }; }; then
8713   ac_lo=0 ac_mid=0
8714   while :; do
8715     cat >conftest.$ac_ext <<_ACEOF
8716 #line 8716 "configure"
8717 #include "confdefs.h"
8718 $ac_includes_default
8719 int
8720 main ()
8721 {
8722 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8723   ;
8724   return 0;
8725 }
8726 _ACEOF
8727 rm -f conftest.$ac_objext
8728 if { (eval echo "$as_me:8728: \"$ac_compile\"") >&5
8729   (eval $ac_compile) 2>&5
8730   ac_status=$?
8731   echo "$as_me:8731: \$? = $ac_status" >&5
8732   (exit $ac_status); } &&
8733          { ac_try='test -s conftest.$ac_objext'
8734   { (eval echo "$as_me:8734: \"$ac_try\"") >&5
8735   (eval $ac_try) 2>&5
8736   ac_status=$?
8737   echo "$as_me:8737: \$? = $ac_status" >&5
8738   (exit $ac_status); }; }; then
8739   ac_hi=$ac_mid; break
8740 else
8741   echo "$as_me: failed program was:" >&5
8742 cat conftest.$ac_ext >&5
8743 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8744 fi
8745 rm -f conftest.$ac_objext conftest.$ac_ext
8746   done
8747 else
8748   echo "$as_me: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8750 ac_hi=-1 ac_mid=-1
8751   while :; do
8752     cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755 $ac_includes_default
8756 int
8757 main ()
8758 {
8759 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8760   ;
8761   return 0;
8762 }
8763 _ACEOF
8764 rm -f conftest.$ac_objext
8765 if { (eval echo "$as_me:8765: \"$ac_compile\"") >&5
8766   (eval $ac_compile) 2>&5
8767   ac_status=$?
8768   echo "$as_me:8768: \$? = $ac_status" >&5
8769   (exit $ac_status); } &&
8770          { ac_try='test -s conftest.$ac_objext'
8771   { (eval echo "$as_me:8771: \"$ac_try\"") >&5
8772   (eval $ac_try) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); }; }; then
8776   ac_lo=$ac_mid; break
8777 else
8778   echo "$as_me: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8781 fi
8782 rm -f conftest.$ac_objext conftest.$ac_ext
8783   done
8784 fi
8785 rm -f conftest.$ac_objext conftest.$ac_ext
8786 # Binary search between lo and hi bounds.
8787 while test "x$ac_lo" != "x$ac_hi"; do
8788   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8789   cat >conftest.$ac_ext <<_ACEOF
8790 #line 8790 "configure"
8791 #include "confdefs.h"
8792 $ac_includes_default
8793 int
8794 main ()
8795 {
8796 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 rm -f conftest.$ac_objext
8802 if { (eval echo "$as_me:8802: \"$ac_compile\"") >&5
8803   (eval $ac_compile) 2>&5
8804   ac_status=$?
8805   echo "$as_me:8805: \$? = $ac_status" >&5
8806   (exit $ac_status); } &&
8807          { ac_try='test -s conftest.$ac_objext'
8808   { (eval echo "$as_me:8808: \"$ac_try\"") >&5
8809   (eval $ac_try) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); }; }; then
8813   ac_hi=$ac_mid
8814 else
8815   echo "$as_me: failed program was:" >&5
8816 cat conftest.$ac_ext >&5
8817 ac_lo=`expr $ac_mid + 1`
8818 fi
8819 rm -f conftest.$ac_objext conftest.$ac_ext
8820 done
8821 ac_cv_sizeof_signed_char=$ac_lo
8822 else
8823   if test "$cross_compiling" = yes; then
8824   { { echo "$as_me:8824: error: cannot run test program while cross compiling" >&5
8825 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8826    { (exit 1); exit 1; }; }
8827 else
8828   cat >conftest.$ac_ext <<_ACEOF
8829 #line 8829 "configure"
8830 #include "confdefs.h"
8831 $ac_includes_default
8832 int
8833 main ()
8834 {
8835 FILE *f = fopen ("conftest.val", "w");
8836 if (!f)
8837   $ac_main_return (1);
8838 fprintf (f, "%d", (sizeof (signed char)));
8839 fclose (f);
8840   ;
8841   return 0;
8842 }
8843 _ACEOF
8844 rm -f conftest$ac_exeext
8845 if { (eval echo "$as_me:8845: \"$ac_link\"") >&5
8846   (eval $ac_link) 2>&5
8847   ac_status=$?
8848   echo "$as_me:8848: \$? = $ac_status" >&5
8849   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8850   { (eval echo "$as_me:8850: \"$ac_try\"") >&5
8851   (eval $ac_try) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); }; }; then
8855   ac_cv_sizeof_signed_char=`cat conftest.val`
8856 else
8857   echo "$as_me: program exited with status $ac_status" >&5
8858 echo "$as_me: failed program was:" >&5
8859 cat conftest.$ac_ext >&5
8860 fi
8861 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8862 fi
8863 fi
8864 rm -f conftest.val
8865 else
8866   ac_cv_sizeof_signed_char=0
8867 fi
8868 fi
8869 echo "$as_me:8869: result: $ac_cv_sizeof_signed_char" >&5
8870 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8871 cat >>confdefs.h <<EOF
8872 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8873 EOF
8874
8875 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8876         NCURSES_SBOOL="signed char"
8877 else
8878         NCURSES_SBOOL="char"
8879 fi
8880 echo "$as_me:8880: checking if you want to use signed Boolean array in term.h" >&5
8881 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8882
8883 # Check whether --enable-signed-char or --disable-signed-char was given.
8884 if test "${enable_signed_char+set}" = set; then
8885   enableval="$enable_signed_char"
8886   with_signed_char=$enableval
8887 else
8888   with_signed_char=no
8889 fi;
8890 echo "$as_me:8890: result: $with_signed_char" >&5
8891 echo "${ECHO_T}$with_signed_char" >&6
8892 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8893
8894 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8895 echo "$as_me:8895: checking if you want SIGWINCH handler" >&5
8896 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8897
8898 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8899 if test "${enable_sigwinch+set}" = set; then
8900   enableval="$enable_sigwinch"
8901   with_sigwinch=$enableval
8902 else
8903   with_sigwinch=$with_ext_funcs
8904 fi;
8905 echo "$as_me:8905: result: $with_sigwinch" >&5
8906 echo "${ECHO_T}$with_sigwinch" >&6
8907 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8908 #define USE_SIGWINCH 1
8909 EOF
8910
8911 ###   use option --enable-tcap-names to allow user to define new capabilities
8912 echo "$as_me:8912: checking if you want user-definable terminal capabilities like termcap" >&5
8913 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8914
8915 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8916 if test "${enable_tcap_names+set}" = set; then
8917   enableval="$enable_tcap_names"
8918   with_tcap_names=$enableval
8919 else
8920   with_tcap_names=$with_ext_funcs
8921 fi;
8922 echo "$as_me:8922: result: $with_tcap_names" >&5
8923 echo "${ECHO_T}$with_tcap_names" >&6
8924 NCURSES_XNAMES=0
8925 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8926
8927 ###############################################################################
8928 # These options are relatively safe to experiment with.
8929
8930 echo "$as_me:8930: checking if you want all development code" >&5
8931 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8932
8933 # Check whether --with-develop or --without-develop was given.
8934 if test "${with_develop+set}" = set; then
8935   withval="$with_develop"
8936   with_develop=$withval
8937 else
8938   with_develop=no
8939 fi;
8940 echo "$as_me:8940: result: $with_develop" >&5
8941 echo "${ECHO_T}$with_develop" >&6
8942
8943 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8944 echo "$as_me:8944: checking if you want hard-tabs code" >&5
8945 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8946
8947 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8948 if test "${enable_hard_tabs+set}" = set; then
8949   enableval="$enable_hard_tabs"
8950
8951 else
8952   enable_hard_tabs=$with_develop
8953 fi;
8954 echo "$as_me:8954: result: $enable_hard_tabs" >&5
8955 echo "${ECHO_T}$enable_hard_tabs" >&6
8956 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8957 #define USE_HARD_TABS 1
8958 EOF
8959
8960 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8961 echo "$as_me:8961: checking if you want limited support for xmc" >&5
8962 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8963
8964 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8965 if test "${enable_xmc_glitch+set}" = set; then
8966   enableval="$enable_xmc_glitch"
8967
8968 else
8969   enable_xmc_glitch=$with_develop
8970 fi;
8971 echo "$as_me:8971: result: $enable_xmc_glitch" >&5
8972 echo "${ECHO_T}$enable_xmc_glitch" >&6
8973 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8974 #define USE_XMC_SUPPORT 1
8975 EOF
8976
8977 ###############################################################################
8978 # These are just experimental, probably should not be in a package:
8979
8980 echo "$as_me:8980: checking if you do not want to assume colors are white-on-black" >&5
8981 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8982
8983 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8984 if test "${enable_assumed_color+set}" = set; then
8985   enableval="$enable_assumed_color"
8986   with_assumed_color=$enableval
8987 else
8988   with_assumed_color=yes
8989 fi;
8990 echo "$as_me:8990: result: $with_assumed_color" >&5
8991 echo "${ECHO_T}$with_assumed_color" >&6
8992 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8993 #define USE_ASSUMED_COLOR 1
8994 EOF
8995
8996 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8997 echo "$as_me:8997: checking if you want hashmap scrolling-optimization code" >&5
8998 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8999
9000 # Check whether --enable-hashmap or --disable-hashmap was given.
9001 if test "${enable_hashmap+set}" = set; then
9002   enableval="$enable_hashmap"
9003   with_hashmap=$enableval
9004 else
9005   with_hashmap=yes
9006 fi;
9007 echo "$as_me:9007: result: $with_hashmap" >&5
9008 echo "${ECHO_T}$with_hashmap" >&6
9009 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9010 #define USE_HASHMAP 1
9011 EOF
9012
9013 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9014 echo "$as_me:9014: checking if you want colorfgbg code" >&5
9015 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9016
9017 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9018 if test "${enable_colorfgbg+set}" = set; then
9019   enableval="$enable_colorfgbg"
9020   with_colorfgbg=$enableval
9021 else
9022   with_colorfgbg=no
9023 fi;
9024 echo "$as_me:9024: result: $with_colorfgbg" >&5
9025 echo "${ECHO_T}$with_colorfgbg" >&6
9026 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9027 #define USE_COLORFGBG 1
9028 EOF
9029
9030 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9031 echo "$as_me:9031: checking if you want to use experimental extended colors" >&5
9032 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9033
9034 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9035 if test "${enable_ext_colors+set}" = set; then
9036   enableval="$enable_ext_colors"
9037   with_ext_colors=$enableval
9038 else
9039   with_ext_colors=no
9040 fi;
9041 echo "$as_me:9041: result: $with_ext_colors" >&5
9042 echo "${ECHO_T}$with_ext_colors" >&6
9043 NCURSES_EXT_COLORS=0
9044 if test "$with_ext_colors" = yes ; then
9045         if test "$with_widec" != yes ; then
9046                 { echo "$as_me:9046: WARNING: This option applies only to wide-character library" >&5
9047 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
9048         else
9049                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9050
9051 if test "${with_abi_version+set}" != set; then
9052         case $cf_cv_rel_version in
9053         5.*)
9054                 cf_cv_rel_version=6.0
9055                 cf_cv_abi_version=6
9056                 { echo "$as_me:9056: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9057 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9058                 ;;
9059         esac
9060 fi
9061
9062         fi
9063         NCURSES_EXT_COLORS=1
9064         cat >>confdefs.h <<\EOF
9065 #define NCURSES_EXT_COLORS 1
9066 EOF
9067
9068 fi
9069
9070 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9071 echo "$as_me:9071: checking if you want to use experimental extended mouse encoding" >&5
9072 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9073
9074 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9075 if test "${enable_ext_mouse+set}" = set; then
9076   enableval="$enable_ext_mouse"
9077   with_ext_mouse=$enableval
9078 else
9079   with_ext_mouse=no
9080 fi;
9081 echo "$as_me:9081: result: $with_ext_mouse" >&5
9082 echo "${ECHO_T}$with_ext_mouse" >&6
9083 NCURSES_MOUSE_VERSION=1
9084 if test "$with_ext_mouse" = yes ; then
9085         NCURSES_MOUSE_VERSION=2
9086
9087 if test "${with_abi_version+set}" != set; then
9088         case $cf_cv_rel_version in
9089         5.*)
9090                 cf_cv_rel_version=6.0
9091                 cf_cv_abi_version=6
9092                 { echo "$as_me:9092: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9093 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9094                 ;;
9095         esac
9096 fi
9097
9098 fi
9099
9100 echo "$as_me:9100: checking if you want experimental safe-sprintf code" >&5
9101 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9102
9103 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9104 if test "${enable_safe_sprintf+set}" = set; then
9105   enableval="$enable_safe_sprintf"
9106   with_safe_sprintf=$enableval
9107 else
9108   with_safe_sprintf=no
9109 fi;
9110 echo "$as_me:9110: result: $with_safe_sprintf" >&5
9111 echo "${ECHO_T}$with_safe_sprintf" >&6
9112 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9113 #define USE_SAFE_SPRINTF 1
9114 EOF
9115
9116 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9117 # when hashmap is used scroll hints are useless
9118 if test "$with_hashmap" = no ; then
9119 echo "$as_me:9119: checking if you want to experiment without scrolling-hints code" >&5
9120 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9121
9122 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9123 if test "${enable_scroll_hints+set}" = set; then
9124   enableval="$enable_scroll_hints"
9125   with_scroll_hints=$enableval
9126 else
9127   with_scroll_hints=yes
9128 fi;
9129 echo "$as_me:9129: result: $with_scroll_hints" >&5
9130 echo "${ECHO_T}$with_scroll_hints" >&6
9131 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9132 #define USE_SCROLL_HINTS 1
9133 EOF
9134
9135 fi
9136
9137 echo "$as_me:9137: checking if you want experimental wgetch-events code" >&5
9138 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9139
9140 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9141 if test "${enable_wgetch_events+set}" = set; then
9142   enableval="$enable_wgetch_events"
9143   with_wgetch_events=$enableval
9144 else
9145   with_wgetch_events=no
9146 fi;
9147 echo "$as_me:9147: result: $with_wgetch_events" >&5
9148 echo "${ECHO_T}$with_wgetch_events" >&6
9149 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9150 #define NCURSES_WGETCH_EVENTS 1
9151 EOF
9152
9153 ###############################################################################
9154
9155 ###     use option --disable-echo to suppress full display compiling commands
9156 echo "$as_me:9156: checking if you want to display full commands during build" >&5
9157 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9158
9159 # Check whether --enable-echo or --disable-echo was given.
9160 if test "${enable_echo+set}" = set; then
9161   enableval="$enable_echo"
9162   with_echo=$enableval
9163 else
9164   with_echo=yes
9165 fi;
9166 if test "$with_echo" = yes; then
9167         ECHO_LINK=
9168 else
9169         ECHO_LINK='@ echo linking $@ ... ;'
9170         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9171 fi
9172 echo "$as_me:9172: result: $with_echo" >&5
9173 echo "${ECHO_T}$with_echo" >&6
9174
9175 ###     use option --enable-warnings to turn on all gcc warnings
9176 echo "$as_me:9176: checking if you want to see compiler warnings" >&5
9177 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9178
9179 # Check whether --enable-warnings or --disable-warnings was given.
9180 if test "${enable_warnings+set}" = set; then
9181   enableval="$enable_warnings"
9182   with_warnings=$enableval
9183 fi;
9184 echo "$as_me:9184: result: $with_warnings" >&5
9185 echo "${ECHO_T}$with_warnings" >&6
9186
9187 if test -n "$with_warnings"; then
9188         ADAFLAGS="$ADAFLAGS -gnatg"
9189
9190 INTEL_COMPILER=no
9191
9192 if test "$GCC" = yes ; then
9193         case $host_os in
9194         linux*|gnu*)
9195                 echo "$as_me:9195: checking if this is really Intel C compiler" >&5
9196 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9197                 cf_save_CFLAGS="$CFLAGS"
9198                 CFLAGS="$CFLAGS -no-gcc"
9199                 cat >conftest.$ac_ext <<_ACEOF
9200 #line 9200 "configure"
9201 #include "confdefs.h"
9202
9203 int
9204 main ()
9205 {
9206
9207 #ifdef __INTEL_COMPILER
9208 #else
9209 make an error
9210 #endif
9211
9212   ;
9213   return 0;
9214 }
9215 _ACEOF
9216 rm -f conftest.$ac_objext
9217 if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
9218   (eval $ac_compile) 2>&5
9219   ac_status=$?
9220   echo "$as_me:9220: \$? = $ac_status" >&5
9221   (exit $ac_status); } &&
9222          { ac_try='test -s conftest.$ac_objext'
9223   { (eval echo "$as_me:9223: \"$ac_try\"") >&5
9224   (eval $ac_try) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); }; }; then
9228   INTEL_COMPILER=yes
9229 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9230
9231 else
9232   echo "$as_me: failed program was:" >&5
9233 cat conftest.$ac_ext >&5
9234 fi
9235 rm -f conftest.$ac_objext conftest.$ac_ext
9236                 CFLAGS="$cf_save_CFLAGS"
9237                 echo "$as_me:9237: result: $INTEL_COMPILER" >&5
9238 echo "${ECHO_T}$INTEL_COMPILER" >&6
9239                 ;;
9240         esac
9241 fi
9242
9243 cat > conftest.$ac_ext <<EOF
9244 #line 9244 "configure"
9245 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9246 EOF
9247
9248 if test "$INTEL_COMPILER" = yes
9249 then
9250 # The "-wdXXX" options suppress warnings:
9251 # remark #1419: external declaration in primary source file
9252 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9253 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9254 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9255 # remark #193: zero used for undefined preprocessing identifier
9256 # remark #593: variable "curs_sb_left_arrow" was set but never used
9257 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9258 # remark #869: parameter "tw" was never referenced
9259 # remark #981: operands are evaluated in unspecified order
9260 # warning #269: invalid format string conversion
9261
9262         { echo "$as_me:9262: checking for $CC warning options..." >&5
9263 echo "$as_me: checking for $CC warning options..." >&6;}
9264         cf_save_CFLAGS="$CFLAGS"
9265         EXTRA_CFLAGS="-Wall"
9266         for cf_opt in  \
9267                 wd1419 \
9268                 wd1682 \
9269                 wd1683 \
9270                 wd1684 \
9271                 wd193 \
9272                 wd279 \
9273                 wd593 \
9274                 wd810 \
9275                 wd869 \
9276                 wd981
9277         do
9278                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9279                 if { (eval echo "$as_me:9279: \"$ac_compile\"") >&5
9280   (eval $ac_compile) 2>&5
9281   ac_status=$?
9282   echo "$as_me:9282: \$? = $ac_status" >&5
9283   (exit $ac_status); }; then
9284                         test -n "$verbose" && echo "$as_me:9284: result: ... -$cf_opt" >&5
9285 echo "${ECHO_T}... -$cf_opt" >&6
9286                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9287                 fi
9288         done
9289         CFLAGS="$cf_save_CFLAGS"
9290
9291 elif test "$GCC" = yes
9292 then
9293         { echo "$as_me:9293: checking for $CC warning options..." >&5
9294 echo "$as_me: checking for $CC warning options..." >&6;}
9295         cf_save_CFLAGS="$CFLAGS"
9296         EXTRA_CFLAGS="-W -Wall"
9297         cf_warn_CONST=""
9298         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9299         for cf_opt in \
9300                 Wbad-function-cast \
9301                 Wcast-align \
9302                 Wcast-qual \
9303                 Winline \
9304                 Wmissing-declarations \
9305                 Wmissing-prototypes \
9306                 Wnested-externs \
9307                 Wpointer-arith \
9308                 Wshadow \
9309                 Wstrict-prototypes \
9310                 Wundef $cf_warn_CONST
9311         do
9312                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9313                 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); }; then
9318                         test -n "$verbose" && echo "$as_me:9318: result: ... -$cf_opt" >&5
9319 echo "${ECHO_T}... -$cf_opt" >&6
9320                         case $cf_opt in #(vi
9321                         Wcast-qual) #(vi
9322                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9323                                 ;;
9324                         Winline) #(vi
9325                                 case $GCC_VERSION in
9326                                 3.3*)
9327                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9328
9329                                         continue;;
9330                                 esac
9331                                 ;;
9332                         esac
9333                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9334                 fi
9335         done
9336         CFLAGS="$cf_save_CFLAGS"
9337 fi
9338 rm -f conftest*
9339
9340         if test "$cf_with_cxx" = yes ; then
9341
9342 INTEL_CPLUSPLUS=no
9343
9344 if test "$GCC" = yes ; then
9345         case $host_os in
9346         linux*|gnu*)
9347                 echo "$as_me:9347: checking if this is really Intel C++ compiler" >&5
9348 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9349                 cf_save_CFLAGS="$CXXFLAGS"
9350                 CXXFLAGS="$CXXFLAGS -no-gcc"
9351                 cat >conftest.$ac_ext <<_ACEOF
9352 #line 9352 "configure"
9353 #include "confdefs.h"
9354
9355 int
9356 main ()
9357 {
9358
9359 #ifdef __INTEL_COMPILER
9360 #else
9361 make an error
9362 #endif
9363
9364   ;
9365   return 0;
9366 }
9367 _ACEOF
9368 rm -f conftest.$ac_objext
9369 if { (eval echo "$as_me:9369: \"$ac_compile\"") >&5
9370   (eval $ac_compile) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); } &&
9374          { ac_try='test -s conftest.$ac_objext'
9375   { (eval echo "$as_me:9375: \"$ac_try\"") >&5
9376   (eval $ac_try) 2>&5
9377   ac_status=$?
9378   echo "$as_me:9378: \$? = $ac_status" >&5
9379   (exit $ac_status); }; }; then
9380   INTEL_CPLUSPLUS=yes
9381 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9382
9383 else
9384   echo "$as_me: failed program was:" >&5
9385 cat conftest.$ac_ext >&5
9386 fi
9387 rm -f conftest.$ac_objext conftest.$ac_ext
9388                 CXXFLAGS="$cf_save_CFLAGS"
9389                 echo "$as_me:9389: result: $INTEL_CPLUSPLUS" >&5
9390 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9391                 ;;
9392         esac
9393 fi
9394
9395 ac_ext=cc
9396 ac_cpp='$CXXCPP $CPPFLAGS'
9397 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9398 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9399 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9400 ac_main_return=return
9401
9402 cat > conftest.$ac_ext <<EOF
9403 #line 9403 "configure"
9404 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9405 EOF
9406
9407 if test "$INTEL_CPLUSPLUS" = yes
9408 then
9409 # The "-wdXXX" options suppress warnings:
9410 # remark #1419: external declaration in primary source file
9411 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9412 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9413 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9414 # remark #193: zero used for undefined preprocessing identifier
9415 # remark #593: variable "curs_sb_left_arrow" was set but never used
9416 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9417 # remark #869: parameter "tw" was never referenced
9418 # remark #981: operands are evaluated in unspecified order
9419 # warning #269: invalid format string conversion
9420
9421         { echo "$as_me:9421: checking for $CC warning options..." >&5
9422 echo "$as_me: checking for $CC warning options..." >&6;}
9423         cf_save_CXXFLAGS="$CXXFLAGS"
9424         EXTRA_CXXFLAGS="-Wall"
9425         for cf_opt in \
9426                 wd1419 \
9427                 wd1682 \
9428                 wd1683 \
9429                 wd1684 \
9430                 wd193 \
9431                 wd279 \
9432                 wd593 \
9433                 wd810 \
9434                 wd869 \
9435                 wd981
9436         do
9437                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9438                 if { (eval echo "$as_me:9438: \"$ac_compile\"") >&5
9439   (eval $ac_compile) 2>&5
9440   ac_status=$?
9441   echo "$as_me:9441: \$? = $ac_status" >&5
9442   (exit $ac_status); }; then
9443                         test -n "$verbose" && echo "$as_me:9443: result: ... -$cf_opt" >&5
9444 echo "${ECHO_T}... -$cf_opt" >&6
9445                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9446                 fi
9447         done
9448         CXXFLAGS="$cf_save_CXXFLAGS"
9449
9450 elif test "$GXX" = yes
9451 then
9452         { echo "$as_me:9452: checking for $CXX warning options..." >&5
9453 echo "$as_me: checking for $CXX warning options..." >&6;}
9454         cf_save_CXXFLAGS="$CXXFLAGS"
9455         EXTRA_CXXFLAGS="-W -Wall"
9456         cf_gxx_extra_warnings=""
9457         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9458         case "$GCC_VERSION" in
9459         [1-2].*)
9460                 ;;
9461         *)
9462                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9463                 ;;
9464         esac
9465         for cf_opt in \
9466                 Wabi \
9467                 fabi-version=0 \
9468                 Woverloaded-virtual \
9469                 Wsign-promo \
9470                 Wsynth \
9471                 Wold-style-cast \
9472                 Wcast-align \
9473                 Wcast-qual \
9474                 Wmissing-prototypes \
9475                 Wpointer-arith \
9476                 Wshadow \
9477                 Wstrict-prototypes \
9478                 Wundef $cf_gxx_extra_warnings Wno-unused
9479         do
9480                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9481                 if { (eval echo "$as_me:9481: \"$ac_compile\"") >&5
9482   (eval $ac_compile) 2>&5
9483   ac_status=$?
9484   echo "$as_me:9484: \$? = $ac_status" >&5
9485   (exit $ac_status); }; then
9486                         test -n "$verbose" && echo "$as_me:9486: result: ... -$cf_opt" >&5
9487 echo "${ECHO_T}... -$cf_opt" >&6
9488                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9489                 else
9490                         test -n "$verbose" && echo "$as_me:9490: result: ... no -$cf_opt" >&5
9491 echo "${ECHO_T}... no -$cf_opt" >&6
9492                 fi
9493         done
9494         CXXFLAGS="$cf_save_CXXFLAGS"
9495 fi
9496
9497 rm -f conftest*
9498 ac_ext=c
9499 ac_cpp='$CPP $CPPFLAGS'
9500 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9501 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9502 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9503 ac_main_return=return
9504
9505         fi
9506 fi
9507
9508 if test "$GCC" = yes
9509 then
9510 cat > conftest.i <<EOF
9511 #ifndef GCC_PRINTF
9512 #define GCC_PRINTF 0
9513 #endif
9514 #ifndef GCC_SCANF
9515 #define GCC_SCANF 0
9516 #endif
9517 #ifndef GCC_NORETURN
9518 #define GCC_NORETURN /* nothing */
9519 #endif
9520 #ifndef GCC_UNUSED
9521 #define GCC_UNUSED /* nothing */
9522 #endif
9523 EOF
9524 if test "$GCC" = yes
9525 then
9526         { echo "$as_me:9526: checking for $CC __attribute__ directives..." >&5
9527 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9528 cat > conftest.$ac_ext <<EOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9531 #include "conftest.h"
9532 #include "conftest.i"
9533 #if     GCC_PRINTF
9534 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9535 #else
9536 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9537 #endif
9538 #if     GCC_SCANF
9539 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9540 #else
9541 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9542 #endif
9543 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9544 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9545 extern void foo(void) GCC_NORETURN;
9546 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9547 EOF
9548         for cf_attribute in scanf printf unused noreturn
9549         do
9550
9551 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9552
9553                 cf_directive="__attribute__(($cf_attribute))"
9554                 echo "checking for $CC $cf_directive" 1>&5
9555                 case $cf_attribute in
9556                 scanf|printf)
9557                 cat >conftest.h <<EOF
9558 #define GCC_$cf_ATTRIBUTE 1
9559 EOF
9560                         ;;
9561                 *)
9562                 cat >conftest.h <<EOF
9563 #define GCC_$cf_ATTRIBUTE $cf_directive
9564 EOF
9565                         ;;
9566                 esac
9567                 if { (eval echo "$as_me:9567: \"$ac_compile\"") >&5
9568   (eval $ac_compile) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit $ac_status); }; then
9572                         test -n "$verbose" && echo "$as_me:9572: result: ... $cf_attribute" >&5
9573 echo "${ECHO_T}... $cf_attribute" >&6
9574                         cat conftest.h >>confdefs.h
9575                 fi
9576         done
9577 else
9578         fgrep define conftest.i >>confdefs.h
9579 fi
9580 rm -rf conftest*
9581 fi
9582
9583 ###     use option --enable-assertions to turn on generation of assertion code
9584 echo "$as_me:9584: checking if you want to enable runtime assertions" >&5
9585 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9586
9587 # Check whether --enable-assertions or --disable-assertions was given.
9588 if test "${enable_assertions+set}" = set; then
9589   enableval="$enable_assertions"
9590   with_assertions=$enableval
9591 else
9592   with_assertions=no
9593 fi;
9594 echo "$as_me:9594: result: $with_assertions" >&5
9595 echo "${ECHO_T}$with_assertions" >&6
9596 if test -n "$GCC"
9597 then
9598         if test "$with_assertions" = no
9599         then
9600                 cat >>confdefs.h <<\EOF
9601 #define NDEBUG 1
9602 EOF
9603
9604                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9605         else
9606                 ADAFLAGS="$ADAFLAGS -gnata"
9607         fi
9608 fi
9609
9610 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9611
9612 echo "$as_me:9612: checking if you want to use dmalloc for testing" >&5
9613 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9614
9615 # Check whether --with-dmalloc or --without-dmalloc was given.
9616 if test "${with_dmalloc+set}" = set; then
9617   withval="$with_dmalloc"
9618   cat >>confdefs.h <<\EOF
9619 #define USE_DMALLOC 1
9620 EOF
9621
9622         : ${with_cflags:=-g}
9623         : ${with_no_leaks:=yes}
9624          with_dmalloc=yes
9625 else
9626   with_dmalloc=
9627 fi;
9628 echo "$as_me:9628: result: ${with_dmalloc:-no}" >&5
9629 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9630
9631 case .$with_cflags in #(vi
9632 .*-g*)
9633         case .$CFLAGS in #(vi
9634         .*-g*) #(vi
9635                 ;;
9636         *)
9637
9638 cf_fix_cppflags=no
9639 cf_new_cflags=
9640 cf_new_cppflags=
9641 cf_new_extra_cppflags=
9642
9643 for cf_add_cflags in -g
9644 do
9645 case $cf_fix_cppflags in
9646 no)
9647         case $cf_add_cflags in #(vi
9648         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9649                 case $cf_add_cflags in
9650                 -D*)
9651                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9652
9653                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9654                         && test -z "${cf_tst_cflags}" \
9655                         && cf_fix_cppflags=yes
9656
9657                         if test $cf_fix_cppflags = yes ; then
9658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9659                                 continue
9660                         elif test "${cf_tst_cflags}" = "\"'" ; then
9661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9662                                 continue
9663                         fi
9664                         ;;
9665                 esac
9666                 case "$CPPFLAGS" in
9667                 *$cf_add_cflags) #(vi
9668                         ;;
9669                 *) #(vi
9670                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9671                         ;;
9672                 esac
9673                 ;;
9674         *)
9675                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9676                 ;;
9677         esac
9678         ;;
9679 yes)
9680         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9681
9682         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9683
9684         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9685         && test -z "${cf_tst_cflags}" \
9686         && cf_fix_cppflags=no
9687         ;;
9688 esac
9689 done
9690
9691 if test -n "$cf_new_cflags" ; then
9692
9693         CFLAGS="$CFLAGS $cf_new_cflags"
9694 fi
9695
9696 if test -n "$cf_new_cppflags" ; then
9697
9698         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9699 fi
9700
9701 if test -n "$cf_new_extra_cppflags" ; then
9702
9703         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9704 fi
9705
9706                 ;;
9707         esac
9708         ;;
9709 esac
9710
9711 if test "$with_dmalloc" = yes ; then
9712         echo "$as_me:9712: checking for dmalloc.h" >&5
9713 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9714 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9715   echo $ECHO_N "(cached) $ECHO_C" >&6
9716 else
9717   cat >conftest.$ac_ext <<_ACEOF
9718 #line 9718 "configure"
9719 #include "confdefs.h"
9720 #include <dmalloc.h>
9721 _ACEOF
9722 if { (eval echo "$as_me:9722: \"$ac_cpp conftest.$ac_ext\"") >&5
9723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9724   ac_status=$?
9725   egrep -v '^ *\+' conftest.er1 >conftest.err
9726   rm -f conftest.er1
9727   cat conftest.err >&5
9728   echo "$as_me:9728: \$? = $ac_status" >&5
9729   (exit $ac_status); } >/dev/null; then
9730   if test -s conftest.err; then
9731     ac_cpp_err=$ac_c_preproc_warn_flag
9732   else
9733     ac_cpp_err=
9734   fi
9735 else
9736   ac_cpp_err=yes
9737 fi
9738 if test -z "$ac_cpp_err"; then
9739   ac_cv_header_dmalloc_h=yes
9740 else
9741   echo "$as_me: failed program was:" >&5
9742   cat conftest.$ac_ext >&5
9743   ac_cv_header_dmalloc_h=no
9744 fi
9745 rm -f conftest.err conftest.$ac_ext
9746 fi
9747 echo "$as_me:9747: result: $ac_cv_header_dmalloc_h" >&5
9748 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9749 if test $ac_cv_header_dmalloc_h = yes; then
9750
9751 echo "$as_me:9751: checking for dmalloc_debug in -ldmalloc" >&5
9752 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9753 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9754   echo $ECHO_N "(cached) $ECHO_C" >&6
9755 else
9756   ac_check_lib_save_LIBS=$LIBS
9757 LIBS="-ldmalloc  $LIBS"
9758 cat >conftest.$ac_ext <<_ACEOF
9759 #line 9759 "configure"
9760 #include "confdefs.h"
9761
9762 /* Override any gcc2 internal prototype to avoid an error.  */
9763 #ifdef __cplusplus
9764 extern "C"
9765 #endif
9766 /* We use char because int might match the return type of a gcc2
9767    builtin and then its argument prototype would still apply.  */
9768 char dmalloc_debug ();
9769 int
9770 main ()
9771 {
9772 dmalloc_debug ();
9773   ;
9774   return 0;
9775 }
9776 _ACEOF
9777 rm -f conftest.$ac_objext conftest$ac_exeext
9778 if { (eval echo "$as_me:9778: \"$ac_link\"") >&5
9779   (eval $ac_link) 2>&5
9780   ac_status=$?
9781   echo "$as_me:9781: \$? = $ac_status" >&5
9782   (exit $ac_status); } &&
9783          { ac_try='test -s conftest$ac_exeext'
9784   { (eval echo "$as_me:9784: \"$ac_try\"") >&5
9785   (eval $ac_try) 2>&5
9786   ac_status=$?
9787   echo "$as_me:9787: \$? = $ac_status" >&5
9788   (exit $ac_status); }; }; then
9789   ac_cv_lib_dmalloc_dmalloc_debug=yes
9790 else
9791   echo "$as_me: failed program was:" >&5
9792 cat conftest.$ac_ext >&5
9793 ac_cv_lib_dmalloc_dmalloc_debug=no
9794 fi
9795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9796 LIBS=$ac_check_lib_save_LIBS
9797 fi
9798 echo "$as_me:9798: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9799 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9800 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9801   cat >>confdefs.h <<EOF
9802 #define HAVE_LIBDMALLOC 1
9803 EOF
9804
9805   LIBS="-ldmalloc $LIBS"
9806
9807 fi
9808
9809 fi
9810
9811 fi
9812
9813 echo "$as_me:9813: checking if you want to use dbmalloc for testing" >&5
9814 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9815
9816 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9817 if test "${with_dbmalloc+set}" = set; then
9818   withval="$with_dbmalloc"
9819   cat >>confdefs.h <<\EOF
9820 #define USE_DBMALLOC 1
9821 EOF
9822
9823         : ${with_cflags:=-g}
9824         : ${with_no_leaks:=yes}
9825          with_dbmalloc=yes
9826 else
9827   with_dbmalloc=
9828 fi;
9829 echo "$as_me:9829: result: ${with_dbmalloc:-no}" >&5
9830 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9831
9832 case .$with_cflags in #(vi
9833 .*-g*)
9834         case .$CFLAGS in #(vi
9835         .*-g*) #(vi
9836                 ;;
9837         *)
9838
9839 cf_fix_cppflags=no
9840 cf_new_cflags=
9841 cf_new_cppflags=
9842 cf_new_extra_cppflags=
9843
9844 for cf_add_cflags in -g
9845 do
9846 case $cf_fix_cppflags in
9847 no)
9848         case $cf_add_cflags in #(vi
9849         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9850                 case $cf_add_cflags in
9851                 -D*)
9852                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9853
9854                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9855                         && test -z "${cf_tst_cflags}" \
9856                         && cf_fix_cppflags=yes
9857
9858                         if test $cf_fix_cppflags = yes ; then
9859                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9860                                 continue
9861                         elif test "${cf_tst_cflags}" = "\"'" ; then
9862                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9863                                 continue
9864                         fi
9865                         ;;
9866                 esac
9867                 case "$CPPFLAGS" in
9868                 *$cf_add_cflags) #(vi
9869                         ;;
9870                 *) #(vi
9871                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9872                         ;;
9873                 esac
9874                 ;;
9875         *)
9876                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9877                 ;;
9878         esac
9879         ;;
9880 yes)
9881         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9882
9883         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9884
9885         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9886         && test -z "${cf_tst_cflags}" \
9887         && cf_fix_cppflags=no
9888         ;;
9889 esac
9890 done
9891
9892 if test -n "$cf_new_cflags" ; then
9893
9894         CFLAGS="$CFLAGS $cf_new_cflags"
9895 fi
9896
9897 if test -n "$cf_new_cppflags" ; then
9898
9899         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9900 fi
9901
9902 if test -n "$cf_new_extra_cppflags" ; then
9903
9904         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9905 fi
9906
9907                 ;;
9908         esac
9909         ;;
9910 esac
9911
9912 if test "$with_dbmalloc" = yes ; then
9913         echo "$as_me:9913: checking for dbmalloc.h" >&5
9914 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9915 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9916   echo $ECHO_N "(cached) $ECHO_C" >&6
9917 else
9918   cat >conftest.$ac_ext <<_ACEOF
9919 #line 9919 "configure"
9920 #include "confdefs.h"
9921 #include <dbmalloc.h>
9922 _ACEOF
9923 if { (eval echo "$as_me:9923: \"$ac_cpp conftest.$ac_ext\"") >&5
9924   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9925   ac_status=$?
9926   egrep -v '^ *\+' conftest.er1 >conftest.err
9927   rm -f conftest.er1
9928   cat conftest.err >&5
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } >/dev/null; then
9931   if test -s conftest.err; then
9932     ac_cpp_err=$ac_c_preproc_warn_flag
9933   else
9934     ac_cpp_err=
9935   fi
9936 else
9937   ac_cpp_err=yes
9938 fi
9939 if test -z "$ac_cpp_err"; then
9940   ac_cv_header_dbmalloc_h=yes
9941 else
9942   echo "$as_me: failed program was:" >&5
9943   cat conftest.$ac_ext >&5
9944   ac_cv_header_dbmalloc_h=no
9945 fi
9946 rm -f conftest.err conftest.$ac_ext
9947 fi
9948 echo "$as_me:9948: result: $ac_cv_header_dbmalloc_h" >&5
9949 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9950 if test $ac_cv_header_dbmalloc_h = yes; then
9951
9952 echo "$as_me:9952: checking for debug_malloc in -ldbmalloc" >&5
9953 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9954 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9955   echo $ECHO_N "(cached) $ECHO_C" >&6
9956 else
9957   ac_check_lib_save_LIBS=$LIBS
9958 LIBS="-ldbmalloc  $LIBS"
9959 cat >conftest.$ac_ext <<_ACEOF
9960 #line 9960 "configure"
9961 #include "confdefs.h"
9962
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 #ifdef __cplusplus
9965 extern "C"
9966 #endif
9967 /* We use char because int might match the return type of a gcc2
9968    builtin and then its argument prototype would still apply.  */
9969 char debug_malloc ();
9970 int
9971 main ()
9972 {
9973 debug_malloc ();
9974   ;
9975   return 0;
9976 }
9977 _ACEOF
9978 rm -f conftest.$ac_objext conftest$ac_exeext
9979 if { (eval echo "$as_me:9979: \"$ac_link\"") >&5
9980   (eval $ac_link) 2>&5
9981   ac_status=$?
9982   echo "$as_me:9982: \$? = $ac_status" >&5
9983   (exit $ac_status); } &&
9984          { ac_try='test -s conftest$ac_exeext'
9985   { (eval echo "$as_me:9985: \"$ac_try\"") >&5
9986   (eval $ac_try) 2>&5
9987   ac_status=$?
9988   echo "$as_me:9988: \$? = $ac_status" >&5
9989   (exit $ac_status); }; }; then
9990   ac_cv_lib_dbmalloc_debug_malloc=yes
9991 else
9992   echo "$as_me: failed program was:" >&5
9993 cat conftest.$ac_ext >&5
9994 ac_cv_lib_dbmalloc_debug_malloc=no
9995 fi
9996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9997 LIBS=$ac_check_lib_save_LIBS
9998 fi
9999 echo "$as_me:9999: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10000 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10001 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10002   cat >>confdefs.h <<EOF
10003 #define HAVE_LIBDBMALLOC 1
10004 EOF
10005
10006   LIBS="-ldbmalloc $LIBS"
10007
10008 fi
10009
10010 fi
10011
10012 fi
10013
10014 echo "$as_me:10014: checking if you want to use valgrind for testing" >&5
10015 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10016
10017 # Check whether --with-valgrind or --without-valgrind was given.
10018 if test "${with_valgrind+set}" = set; then
10019   withval="$with_valgrind"
10020   cat >>confdefs.h <<\EOF
10021 #define USE_VALGRIND 1
10022 EOF
10023
10024         : ${with_cflags:=-g}
10025         : ${with_no_leaks:=yes}
10026          with_valgrind=yes
10027 else
10028   with_valgrind=
10029 fi;
10030 echo "$as_me:10030: result: ${with_valgrind:-no}" >&5
10031 echo "${ECHO_T}${with_valgrind:-no}" >&6
10032
10033 case .$with_cflags in #(vi
10034 .*-g*)
10035         case .$CFLAGS in #(vi
10036         .*-g*) #(vi
10037                 ;;
10038         *)
10039
10040 cf_fix_cppflags=no
10041 cf_new_cflags=
10042 cf_new_cppflags=
10043 cf_new_extra_cppflags=
10044
10045 for cf_add_cflags in -g
10046 do
10047 case $cf_fix_cppflags in
10048 no)
10049         case $cf_add_cflags in #(vi
10050         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10051                 case $cf_add_cflags in
10052                 -D*)
10053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10054
10055                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10056                         && test -z "${cf_tst_cflags}" \
10057                         && cf_fix_cppflags=yes
10058
10059                         if test $cf_fix_cppflags = yes ; then
10060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10061                                 continue
10062                         elif test "${cf_tst_cflags}" = "\"'" ; then
10063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10064                                 continue
10065                         fi
10066                         ;;
10067                 esac
10068                 case "$CPPFLAGS" in
10069                 *$cf_add_cflags) #(vi
10070                         ;;
10071                 *) #(vi
10072                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10073                         ;;
10074                 esac
10075                 ;;
10076         *)
10077                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10078                 ;;
10079         esac
10080         ;;
10081 yes)
10082         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10083
10084         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10085
10086         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10087         && test -z "${cf_tst_cflags}" \
10088         && cf_fix_cppflags=no
10089         ;;
10090 esac
10091 done
10092
10093 if test -n "$cf_new_cflags" ; then
10094
10095         CFLAGS="$CFLAGS $cf_new_cflags"
10096 fi
10097
10098 if test -n "$cf_new_cppflags" ; then
10099
10100         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10101 fi
10102
10103 if test -n "$cf_new_extra_cppflags" ; then
10104
10105         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10106 fi
10107
10108                 ;;
10109         esac
10110         ;;
10111 esac
10112
10113 echo "$as_me:10113: checking if you want to perform memory-leak testing" >&5
10114 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10115
10116 # Check whether --enable-leaks or --disable-leaks was given.
10117 if test "${enable_leaks+set}" = set; then
10118   enableval="$enable_leaks"
10119   with_no_leaks=yes
10120 else
10121   : ${with_no_leaks:=no}
10122 fi;
10123 echo "$as_me:10123: result: $with_no_leaks" >&5
10124 echo "${ECHO_T}$with_no_leaks" >&6
10125
10126 if test "$with_no_leaks" = yes ; then
10127         cat >>confdefs.h <<\EOF
10128 #define NO_LEAKS 1
10129 EOF
10130
10131 fi
10132
10133 cat >>confdefs.h <<\EOF
10134 #define HAVE_NC_ALLOC_H 1
10135 EOF
10136
10137 ###     use option --enable-expanded to generate certain macros as functions
10138
10139 # Check whether --enable-expanded or --disable-expanded was given.
10140 if test "${enable_expanded+set}" = set; then
10141   enableval="$enable_expanded"
10142   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10143 #define NCURSES_EXPANDED 1
10144 EOF
10145
10146 fi;
10147
10148 ###     use option --disable-macros to suppress macros in favor of functions
10149
10150 # Check whether --enable-macros or --disable-macros was given.
10151 if test "${enable_macros+set}" = set; then
10152   enableval="$enable_macros"
10153   test "$enableval" = no && cat >>confdefs.h <<\EOF
10154 #define NCURSES_NOMACROS 1
10155 EOF
10156
10157 fi;
10158
10159 # Normally we only add trace() to the debug-library.  Allow this to be
10160 # extended to all models of the ncurses library:
10161 cf_all_traces=no
10162 case "$CFLAGS $CPPFLAGS" in
10163 *-DTRACE*)
10164         cf_all_traces=yes
10165         ;;
10166 esac
10167
10168 echo "$as_me:10168: checking whether to add trace feature to all models" >&5
10169 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10170
10171 # Check whether --with-trace or --without-trace was given.
10172 if test "${with_trace+set}" = set; then
10173   withval="$with_trace"
10174   cf_with_trace=$withval
10175 else
10176   cf_with_trace=$cf_all_traces
10177 fi;
10178 echo "$as_me:10178: result: $cf_with_trace" >&5
10179 echo "${ECHO_T}$cf_with_trace" >&6
10180
10181 if test "$cf_with_trace" = yes ; then
10182         LIB_TRACING=all
10183         ADA_TRACE=TRUE
10184
10185 cf_fix_cppflags=no
10186 cf_new_cflags=
10187 cf_new_cppflags=
10188 cf_new_extra_cppflags=
10189
10190 for cf_add_cflags in -DTRACE
10191 do
10192 case $cf_fix_cppflags in
10193 no)
10194         case $cf_add_cflags in #(vi
10195         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10196                 case $cf_add_cflags in
10197                 -D*)
10198                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10199
10200                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10201                         && test -z "${cf_tst_cflags}" \
10202                         && cf_fix_cppflags=yes
10203
10204                         if test $cf_fix_cppflags = yes ; then
10205                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10206                                 continue
10207                         elif test "${cf_tst_cflags}" = "\"'" ; then
10208                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10209                                 continue
10210                         fi
10211                         ;;
10212                 esac
10213                 case "$CPPFLAGS" in
10214                 *$cf_add_cflags) #(vi
10215                         ;;
10216                 *) #(vi
10217                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10218                         ;;
10219                 esac
10220                 ;;
10221         *)
10222                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10223                 ;;
10224         esac
10225         ;;
10226 yes)
10227         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10228
10229         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10230
10231         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10232         && test -z "${cf_tst_cflags}" \
10233         && cf_fix_cppflags=no
10234         ;;
10235 esac
10236 done
10237
10238 if test -n "$cf_new_cflags" ; then
10239
10240         CFLAGS="$CFLAGS $cf_new_cflags"
10241 fi
10242
10243 if test -n "$cf_new_cppflags" ; then
10244
10245         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10246 fi
10247
10248 if test -n "$cf_new_extra_cppflags" ; then
10249
10250         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10251 fi
10252
10253 else
10254         LIB_TRACING=DEBUG
10255         ADA_TRACE=FALSE
10256 fi
10257
10258 ###     Checks for libraries.
10259 echo "$as_me:10259: checking for gettimeofday" >&5
10260 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10261 if test "${ac_cv_func_gettimeofday+set}" = set; then
10262   echo $ECHO_N "(cached) $ECHO_C" >&6
10263 else
10264   cat >conftest.$ac_ext <<_ACEOF
10265 #line 10265 "configure"
10266 #include "confdefs.h"
10267 /* System header to define __stub macros and hopefully few prototypes,
10268     which can conflict with char gettimeofday (); below.  */
10269 #include <assert.h>
10270 /* Override any gcc2 internal prototype to avoid an error.  */
10271 #ifdef __cplusplus
10272 extern "C"
10273 #endif
10274 /* We use char because int might match the return type of a gcc2
10275    builtin and then its argument prototype would still apply.  */
10276 char gettimeofday ();
10277 char (*f) ();
10278
10279 int
10280 main ()
10281 {
10282 /* The GNU C library defines this for functions which it implements
10283     to always fail with ENOSYS.  Some functions are actually named
10284     something starting with __ and the normal name is an alias.  */
10285 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10286 choke me
10287 #else
10288 f = gettimeofday;
10289 #endif
10290
10291   ;
10292   return 0;
10293 }
10294 _ACEOF
10295 rm -f conftest.$ac_objext conftest$ac_exeext
10296 if { (eval echo "$as_me:10296: \"$ac_link\"") >&5
10297   (eval $ac_link) 2>&5
10298   ac_status=$?
10299   echo "$as_me:10299: \$? = $ac_status" >&5
10300   (exit $ac_status); } &&
10301          { ac_try='test -s conftest$ac_exeext'
10302   { (eval echo "$as_me:10302: \"$ac_try\"") >&5
10303   (eval $ac_try) 2>&5
10304   ac_status=$?
10305   echo "$as_me:10305: \$? = $ac_status" >&5
10306   (exit $ac_status); }; }; then
10307   ac_cv_func_gettimeofday=yes
10308 else
10309   echo "$as_me: failed program was:" >&5
10310 cat conftest.$ac_ext >&5
10311 ac_cv_func_gettimeofday=no
10312 fi
10313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10314 fi
10315 echo "$as_me:10315: result: $ac_cv_func_gettimeofday" >&5
10316 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10317 if test $ac_cv_func_gettimeofday = yes; then
10318   cat >>confdefs.h <<\EOF
10319 #define HAVE_GETTIMEOFDAY 1
10320 EOF
10321
10322 else
10323
10324 echo "$as_me:10324: checking for gettimeofday in -lbsd" >&5
10325 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10326 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10327   echo $ECHO_N "(cached) $ECHO_C" >&6
10328 else
10329   ac_check_lib_save_LIBS=$LIBS
10330 LIBS="-lbsd  $LIBS"
10331 cat >conftest.$ac_ext <<_ACEOF
10332 #line 10332 "configure"
10333 #include "confdefs.h"
10334
10335 /* Override any gcc2 internal prototype to avoid an error.  */
10336 #ifdef __cplusplus
10337 extern "C"
10338 #endif
10339 /* We use char because int might match the return type of a gcc2
10340    builtin and then its argument prototype would still apply.  */
10341 char gettimeofday ();
10342 int
10343 main ()
10344 {
10345 gettimeofday ();
10346   ;
10347   return 0;
10348 }
10349 _ACEOF
10350 rm -f conftest.$ac_objext conftest$ac_exeext
10351 if { (eval echo "$as_me:10351: \"$ac_link\"") >&5
10352   (eval $ac_link) 2>&5
10353   ac_status=$?
10354   echo "$as_me:10354: \$? = $ac_status" >&5
10355   (exit $ac_status); } &&
10356          { ac_try='test -s conftest$ac_exeext'
10357   { (eval echo "$as_me:10357: \"$ac_try\"") >&5
10358   (eval $ac_try) 2>&5
10359   ac_status=$?
10360   echo "$as_me:10360: \$? = $ac_status" >&5
10361   (exit $ac_status); }; }; then
10362   ac_cv_lib_bsd_gettimeofday=yes
10363 else
10364   echo "$as_me: failed program was:" >&5
10365 cat conftest.$ac_ext >&5
10366 ac_cv_lib_bsd_gettimeofday=no
10367 fi
10368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10369 LIBS=$ac_check_lib_save_LIBS
10370 fi
10371 echo "$as_me:10371: result: $ac_cv_lib_bsd_gettimeofday" >&5
10372 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10373 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10374   cat >>confdefs.h <<\EOF
10375 #define HAVE_GETTIMEOFDAY 1
10376 EOF
10377
10378         LIBS="$LIBS -lbsd"
10379 fi
10380
10381 fi
10382
10383 echo "$as_me:10383: checking if -lm needed for math functions" >&5
10384 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10385 if test "${cf_cv_need_libm+set}" = set; then
10386   echo $ECHO_N "(cached) $ECHO_C" >&6
10387 else
10388
10389         cat >conftest.$ac_ext <<_ACEOF
10390 #line 10390 "configure"
10391 #include "confdefs.h"
10392
10393         #include <stdio.h>
10394         #include <math.h>
10395
10396 int
10397 main ()
10398 {
10399 double x = rand(); printf("result = %g\n", sin(x))
10400   ;
10401   return 0;
10402 }
10403 _ACEOF
10404 rm -f conftest.$ac_objext conftest$ac_exeext
10405 if { (eval echo "$as_me:10405: \"$ac_link\"") >&5
10406   (eval $ac_link) 2>&5
10407   ac_status=$?
10408   echo "$as_me:10408: \$? = $ac_status" >&5
10409   (exit $ac_status); } &&
10410          { ac_try='test -s conftest$ac_exeext'
10411   { (eval echo "$as_me:10411: \"$ac_try\"") >&5
10412   (eval $ac_try) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); }; }; then
10416   cf_cv_need_libm=no
10417 else
10418   echo "$as_me: failed program was:" >&5
10419 cat conftest.$ac_ext >&5
10420 cf_cv_need_libm=yes
10421 fi
10422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10423 fi
10424 echo "$as_me:10424: result: $cf_cv_need_libm" >&5
10425 echo "${ECHO_T}$cf_cv_need_libm" >&6
10426 if test "$cf_cv_need_libm" = yes
10427 then
10428 MATH_LIB=-lm
10429 fi
10430
10431 ###     Checks for header files.
10432 echo "$as_me:10432: checking for ANSI C header files" >&5
10433 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10434 if test "${ac_cv_header_stdc+set}" = set; then
10435   echo $ECHO_N "(cached) $ECHO_C" >&6
10436 else
10437   cat >conftest.$ac_ext <<_ACEOF
10438 #line 10438 "configure"
10439 #include "confdefs.h"
10440 #include <stdlib.h>
10441 #include <stdarg.h>
10442 #include <string.h>
10443 #include <float.h>
10444
10445 _ACEOF
10446 if { (eval echo "$as_me:10446: \"$ac_cpp conftest.$ac_ext\"") >&5
10447   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10448   ac_status=$?
10449   egrep -v '^ *\+' conftest.er1 >conftest.err
10450   rm -f conftest.er1
10451   cat conftest.err >&5
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); } >/dev/null; then
10454   if test -s conftest.err; then
10455     ac_cpp_err=$ac_c_preproc_warn_flag
10456   else
10457     ac_cpp_err=
10458   fi
10459 else
10460   ac_cpp_err=yes
10461 fi
10462 if test -z "$ac_cpp_err"; then
10463   ac_cv_header_stdc=yes
10464 else
10465   echo "$as_me: failed program was:" >&5
10466   cat conftest.$ac_ext >&5
10467   ac_cv_header_stdc=no
10468 fi
10469 rm -f conftest.err conftest.$ac_ext
10470
10471 if test $ac_cv_header_stdc = yes; then
10472   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10473   cat >conftest.$ac_ext <<_ACEOF
10474 #line 10474 "configure"
10475 #include "confdefs.h"
10476 #include <string.h>
10477
10478 _ACEOF
10479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10480   egrep "memchr" >/dev/null 2>&1; then
10481   :
10482 else
10483   ac_cv_header_stdc=no
10484 fi
10485 rm -f conftest*
10486
10487 fi
10488
10489 if test $ac_cv_header_stdc = yes; then
10490   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10491   cat >conftest.$ac_ext <<_ACEOF
10492 #line 10492 "configure"
10493 #include "confdefs.h"
10494 #include <stdlib.h>
10495
10496 _ACEOF
10497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10498   egrep "free" >/dev/null 2>&1; then
10499   :
10500 else
10501   ac_cv_header_stdc=no
10502 fi
10503 rm -f conftest*
10504
10505 fi
10506
10507 if test $ac_cv_header_stdc = yes; then
10508   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10509   if test "$cross_compiling" = yes; then
10510   :
10511 else
10512   cat >conftest.$ac_ext <<_ACEOF
10513 #line 10513 "configure"
10514 #include "confdefs.h"
10515 #include <ctype.h>
10516 #if ((' ' & 0x0FF) == 0x020)
10517 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10518 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10519 #else
10520 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10521                      || ('j' <= (c) && (c) <= 'r') \
10522                      || ('s' <= (c) && (c) <= 'z'))
10523 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10524 #endif
10525
10526 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10527 int
10528 main ()
10529 {
10530   int i;
10531   for (i = 0; i < 256; i++)
10532     if (XOR (islower (i), ISLOWER (i))
10533         || toupper (i) != TOUPPER (i))
10534       $ac_main_return(2);
10535   $ac_main_return (0);
10536 }
10537 _ACEOF
10538 rm -f conftest$ac_exeext
10539 if { (eval echo "$as_me:10539: \"$ac_link\"") >&5
10540   (eval $ac_link) 2>&5
10541   ac_status=$?
10542   echo "$as_me:10542: \$? = $ac_status" >&5
10543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10544   { (eval echo "$as_me:10544: \"$ac_try\"") >&5
10545   (eval $ac_try) 2>&5
10546   ac_status=$?
10547   echo "$as_me:10547: \$? = $ac_status" >&5
10548   (exit $ac_status); }; }; then
10549   :
10550 else
10551   echo "$as_me: program exited with status $ac_status" >&5
10552 echo "$as_me: failed program was:" >&5
10553 cat conftest.$ac_ext >&5
10554 ac_cv_header_stdc=no
10555 fi
10556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10557 fi
10558 fi
10559 fi
10560 echo "$as_me:10560: result: $ac_cv_header_stdc" >&5
10561 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10562 if test $ac_cv_header_stdc = yes; then
10563
10564 cat >>confdefs.h <<\EOF
10565 #define STDC_HEADERS 1
10566 EOF
10567
10568 fi
10569
10570 ac_header_dirent=no
10571 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10572   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10573 echo "$as_me:10573: checking for $ac_hdr that defines DIR" >&5
10574 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10576   echo $ECHO_N "(cached) $ECHO_C" >&6
10577 else
10578   cat >conftest.$ac_ext <<_ACEOF
10579 #line 10579 "configure"
10580 #include "confdefs.h"
10581 #include <sys/types.h>
10582 #include <$ac_hdr>
10583
10584 int
10585 main ()
10586 {
10587 if ((DIR *) 0)
10588 return 0;
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 rm -f conftest.$ac_objext
10594 if { (eval echo "$as_me:10594: \"$ac_compile\"") >&5
10595   (eval $ac_compile) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); } &&
10599          { ac_try='test -s conftest.$ac_objext'
10600   { (eval echo "$as_me:10600: \"$ac_try\"") >&5
10601   (eval $ac_try) 2>&5
10602   ac_status=$?
10603   echo "$as_me:10603: \$? = $ac_status" >&5
10604   (exit $ac_status); }; }; then
10605   eval "$as_ac_Header=yes"
10606 else
10607   echo "$as_me: failed program was:" >&5
10608 cat conftest.$ac_ext >&5
10609 eval "$as_ac_Header=no"
10610 fi
10611 rm -f conftest.$ac_objext conftest.$ac_ext
10612 fi
10613 echo "$as_me:10613: result: `eval echo '${'$as_ac_Header'}'`" >&5
10614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10616   cat >>confdefs.h <<EOF
10617 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10618 EOF
10619
10620 ac_header_dirent=$ac_hdr; break
10621 fi
10622
10623 done
10624 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10625 if test $ac_header_dirent = dirent.h; then
10626   echo "$as_me:10626: checking for opendir in -ldir" >&5
10627 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10628 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10629   echo $ECHO_N "(cached) $ECHO_C" >&6
10630 else
10631   ac_check_lib_save_LIBS=$LIBS
10632 LIBS="-ldir  $LIBS"
10633 cat >conftest.$ac_ext <<_ACEOF
10634 #line 10634 "configure"
10635 #include "confdefs.h"
10636
10637 /* Override any gcc2 internal prototype to avoid an error.  */
10638 #ifdef __cplusplus
10639 extern "C"
10640 #endif
10641 /* We use char because int might match the return type of a gcc2
10642    builtin and then its argument prototype would still apply.  */
10643 char opendir ();
10644 int
10645 main ()
10646 {
10647 opendir ();
10648   ;
10649   return 0;
10650 }
10651 _ACEOF
10652 rm -f conftest.$ac_objext conftest$ac_exeext
10653 if { (eval echo "$as_me:10653: \"$ac_link\"") >&5
10654   (eval $ac_link) 2>&5
10655   ac_status=$?
10656   echo "$as_me:10656: \$? = $ac_status" >&5
10657   (exit $ac_status); } &&
10658          { ac_try='test -s conftest$ac_exeext'
10659   { (eval echo "$as_me:10659: \"$ac_try\"") >&5
10660   (eval $ac_try) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit $ac_status); }; }; then
10664   ac_cv_lib_dir_opendir=yes
10665 else
10666   echo "$as_me: failed program was:" >&5
10667 cat conftest.$ac_ext >&5
10668 ac_cv_lib_dir_opendir=no
10669 fi
10670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10671 LIBS=$ac_check_lib_save_LIBS
10672 fi
10673 echo "$as_me:10673: result: $ac_cv_lib_dir_opendir" >&5
10674 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10675 if test $ac_cv_lib_dir_opendir = yes; then
10676   LIBS="$LIBS -ldir"
10677 fi
10678
10679 else
10680   echo "$as_me:10680: checking for opendir in -lx" >&5
10681 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10682 if test "${ac_cv_lib_x_opendir+set}" = set; then
10683   echo $ECHO_N "(cached) $ECHO_C" >&6
10684 else
10685   ac_check_lib_save_LIBS=$LIBS
10686 LIBS="-lx  $LIBS"
10687 cat >conftest.$ac_ext <<_ACEOF
10688 #line 10688 "configure"
10689 #include "confdefs.h"
10690
10691 /* Override any gcc2 internal prototype to avoid an error.  */
10692 #ifdef __cplusplus
10693 extern "C"
10694 #endif
10695 /* We use char because int might match the return type of a gcc2
10696    builtin and then its argument prototype would still apply.  */
10697 char opendir ();
10698 int
10699 main ()
10700 {
10701 opendir ();
10702   ;
10703   return 0;
10704 }
10705 _ACEOF
10706 rm -f conftest.$ac_objext conftest$ac_exeext
10707 if { (eval echo "$as_me:10707: \"$ac_link\"") >&5
10708   (eval $ac_link) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); } &&
10712          { ac_try='test -s conftest$ac_exeext'
10713   { (eval echo "$as_me:10713: \"$ac_try\"") >&5
10714   (eval $ac_try) 2>&5
10715   ac_status=$?
10716   echo "$as_me:10716: \$? = $ac_status" >&5
10717   (exit $ac_status); }; }; then
10718   ac_cv_lib_x_opendir=yes
10719 else
10720   echo "$as_me: failed program was:" >&5
10721 cat conftest.$ac_ext >&5
10722 ac_cv_lib_x_opendir=no
10723 fi
10724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10725 LIBS=$ac_check_lib_save_LIBS
10726 fi
10727 echo "$as_me:10727: result: $ac_cv_lib_x_opendir" >&5
10728 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10729 if test $ac_cv_lib_x_opendir = yes; then
10730   LIBS="$LIBS -lx"
10731 fi
10732
10733 fi
10734
10735 echo "$as_me:10735: checking whether time.h and sys/time.h may both be included" >&5
10736 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10737 if test "${ac_cv_header_time+set}" = set; then
10738   echo $ECHO_N "(cached) $ECHO_C" >&6
10739 else
10740   cat >conftest.$ac_ext <<_ACEOF
10741 #line 10741 "configure"
10742 #include "confdefs.h"
10743 #include <sys/types.h>
10744 #include <sys/time.h>
10745 #include <time.h>
10746
10747 int
10748 main ()
10749 {
10750 if ((struct tm *) 0)
10751 return 0;
10752   ;
10753   return 0;
10754 }
10755 _ACEOF
10756 rm -f conftest.$ac_objext
10757 if { (eval echo "$as_me:10757: \"$ac_compile\"") >&5
10758   (eval $ac_compile) 2>&5
10759   ac_status=$?
10760   echo "$as_me:10760: \$? = $ac_status" >&5
10761   (exit $ac_status); } &&
10762          { ac_try='test -s conftest.$ac_objext'
10763   { (eval echo "$as_me:10763: \"$ac_try\"") >&5
10764   (eval $ac_try) 2>&5
10765   ac_status=$?
10766   echo "$as_me:10766: \$? = $ac_status" >&5
10767   (exit $ac_status); }; }; then
10768   ac_cv_header_time=yes
10769 else
10770   echo "$as_me: failed program was:" >&5
10771 cat conftest.$ac_ext >&5
10772 ac_cv_header_time=no
10773 fi
10774 rm -f conftest.$ac_objext conftest.$ac_ext
10775 fi
10776 echo "$as_me:10776: result: $ac_cv_header_time" >&5
10777 echo "${ECHO_T}$ac_cv_header_time" >&6
10778 if test $ac_cv_header_time = yes; then
10779
10780 cat >>confdefs.h <<\EOF
10781 #define TIME_WITH_SYS_TIME 1
10782 EOF
10783
10784 fi
10785
10786 echo "$as_me:10786: checking for regular-expression headers" >&5
10787 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10788 if test "${cf_cv_regex+set}" = set; then
10789   echo $ECHO_N "(cached) $ECHO_C" >&6
10790 else
10791
10792 cat >conftest.$ac_ext <<_ACEOF
10793 #line 10793 "configure"
10794 #include "confdefs.h"
10795 #include <sys/types.h>
10796 #include <regex.h>
10797 int
10798 main ()
10799 {
10800
10801         regex_t *p;
10802         int x = regcomp(p, "", 0);
10803         int y = regexec(p, "", 0, 0, 0);
10804         regfree(p);
10805
10806   ;
10807   return 0;
10808 }
10809 _ACEOF
10810 rm -f conftest.$ac_objext conftest$ac_exeext
10811 if { (eval echo "$as_me:10811: \"$ac_link\"") >&5
10812   (eval $ac_link) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); } &&
10816          { ac_try='test -s conftest$ac_exeext'
10817   { (eval echo "$as_me:10817: \"$ac_try\"") >&5
10818   (eval $ac_try) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); }; }; then
10822   cf_cv_regex="regex.h"
10823 else
10824   echo "$as_me: failed program was:" >&5
10825 cat conftest.$ac_ext >&5
10826
10827         cat >conftest.$ac_ext <<_ACEOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830 #include <regexp.h>
10831 int
10832 main ()
10833 {
10834
10835                 char *p = compile("", "", "", 0);
10836                 int x = step("", "");
10837
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 rm -f conftest.$ac_objext conftest$ac_exeext
10843 if { (eval echo "$as_me:10843: \"$ac_link\"") >&5
10844   (eval $ac_link) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); } &&
10848          { ac_try='test -s conftest$ac_exeext'
10849   { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850   (eval $ac_try) 2>&5
10851   ac_status=$?
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit $ac_status); }; }; then
10854   cf_cv_regex="regexp.h"
10855 else
10856   echo "$as_me: failed program was:" >&5
10857 cat conftest.$ac_ext >&5
10858
10859                 cf_save_LIBS="$LIBS"
10860                 LIBS="-lgen $LIBS"
10861                 cat >conftest.$ac_ext <<_ACEOF
10862 #line 10862 "configure"
10863 #include "confdefs.h"
10864 #include <regexpr.h>
10865 int
10866 main ()
10867 {
10868
10869                         char *p = compile("", "", "");
10870                         int x = step("", "");
10871
10872   ;
10873   return 0;
10874 }
10875 _ACEOF
10876 rm -f conftest.$ac_objext conftest$ac_exeext
10877 if { (eval echo "$as_me:10877: \"$ac_link\"") >&5
10878   (eval $ac_link) 2>&5
10879   ac_status=$?
10880   echo "$as_me:10880: \$? = $ac_status" >&5
10881   (exit $ac_status); } &&
10882          { ac_try='test -s conftest$ac_exeext'
10883   { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884   (eval $ac_try) 2>&5
10885   ac_status=$?
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit $ac_status); }; }; then
10888   cf_cv_regex="regexpr.h"
10889 else
10890   echo "$as_me: failed program was:" >&5
10891 cat conftest.$ac_ext >&5
10892 LIBS="$cf_save_LIBS"
10893 fi
10894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10895 fi
10896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10897 fi
10898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10899
10900 fi
10901
10902 echo "$as_me:10902: result: $cf_cv_regex" >&5
10903 echo "${ECHO_T}$cf_cv_regex" >&6
10904 case $cf_cv_regex in
10905         regex.h)   cat >>confdefs.h <<\EOF
10906 #define HAVE_REGEX_H_FUNCS 1
10907 EOF
10908  ;;
10909         regexp.h)  cat >>confdefs.h <<\EOF
10910 #define HAVE_REGEXP_H_FUNCS 1
10911 EOF
10912  ;;
10913         regexpr.h) cat >>confdefs.h <<\EOF
10914 #define HAVE_REGEXPR_H_FUNCS 1
10915 EOF
10916  ;;
10917 esac
10918
10919 for ac_header in \
10920 fcntl.h \
10921 getopt.h \
10922 limits.h \
10923 locale.h \
10924 poll.h \
10925 sys/bsdtypes.h \
10926 sys/ioctl.h \
10927 sys/param.h \
10928 sys/poll.h \
10929 sys/select.h \
10930 sys/time.h \
10931 sys/times.h \
10932 ttyent.h \
10933 unistd.h \
10934 wctype.h \
10935
10936 do
10937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10938 echo "$as_me:10938: checking for $ac_header" >&5
10939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10941   echo $ECHO_N "(cached) $ECHO_C" >&6
10942 else
10943   cat >conftest.$ac_ext <<_ACEOF
10944 #line 10944 "configure"
10945 #include "confdefs.h"
10946 #include <$ac_header>
10947 _ACEOF
10948 if { (eval echo "$as_me:10948: \"$ac_cpp conftest.$ac_ext\"") >&5
10949   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10950   ac_status=$?
10951   egrep -v '^ *\+' conftest.er1 >conftest.err
10952   rm -f conftest.er1
10953   cat conftest.err >&5
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); } >/dev/null; then
10956   if test -s conftest.err; then
10957     ac_cpp_err=$ac_c_preproc_warn_flag
10958   else
10959     ac_cpp_err=
10960   fi
10961 else
10962   ac_cpp_err=yes
10963 fi
10964 if test -z "$ac_cpp_err"; then
10965   eval "$as_ac_Header=yes"
10966 else
10967   echo "$as_me: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   eval "$as_ac_Header=no"
10970 fi
10971 rm -f conftest.err conftest.$ac_ext
10972 fi
10973 echo "$as_me:10973: result: `eval echo '${'$as_ac_Header'}'`" >&5
10974 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10975 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10976   cat >>confdefs.h <<EOF
10977 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10978 EOF
10979
10980 fi
10981 done
10982
10983 # check for ISC (this may also define _POSIX_SOURCE)
10984 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10985 if test "$ISC" = yes ; then
10986
10987 echo "$as_me:10987: checking for main in -lcposix" >&5
10988 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10989 if test "${ac_cv_lib_cposix_main+set}" = set; then
10990   echo $ECHO_N "(cached) $ECHO_C" >&6
10991 else
10992   ac_check_lib_save_LIBS=$LIBS
10993 LIBS="-lcposix  $LIBS"
10994 cat >conftest.$ac_ext <<_ACEOF
10995 #line 10995 "configure"
10996 #include "confdefs.h"
10997
10998 int
10999 main ()
11000 {
11001 main ();
11002   ;
11003   return 0;
11004 }
11005 _ACEOF
11006 rm -f conftest.$ac_objext conftest$ac_exeext
11007 if { (eval echo "$as_me:11007: \"$ac_link\"") >&5
11008   (eval $ac_link) 2>&5
11009   ac_status=$?
11010   echo "$as_me:11010: \$? = $ac_status" >&5
11011   (exit $ac_status); } &&
11012          { ac_try='test -s conftest$ac_exeext'
11013   { (eval echo "$as_me:11013: \"$ac_try\"") >&5
11014   (eval $ac_try) 2>&5
11015   ac_status=$?
11016   echo "$as_me:11016: \$? = $ac_status" >&5
11017   (exit $ac_status); }; }; then
11018   ac_cv_lib_cposix_main=yes
11019 else
11020   echo "$as_me: failed program was:" >&5
11021 cat conftest.$ac_ext >&5
11022 ac_cv_lib_cposix_main=no
11023 fi
11024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11025 LIBS=$ac_check_lib_save_LIBS
11026 fi
11027 echo "$as_me:11027: result: $ac_cv_lib_cposix_main" >&5
11028 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11029 if test $ac_cv_lib_cposix_main = yes; then
11030   cat >>confdefs.h <<EOF
11031 #define HAVE_LIBCPOSIX 1
11032 EOF
11033
11034   LIBS="-lcposix $LIBS"
11035
11036 fi
11037
11038         echo "$as_me:11038: checking for bzero in -linet" >&5
11039 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11040 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11041   echo $ECHO_N "(cached) $ECHO_C" >&6
11042 else
11043   ac_check_lib_save_LIBS=$LIBS
11044 LIBS="-linet  $LIBS"
11045 cat >conftest.$ac_ext <<_ACEOF
11046 #line 11046 "configure"
11047 #include "confdefs.h"
11048
11049 /* Override any gcc2 internal prototype to avoid an error.  */
11050 #ifdef __cplusplus
11051 extern "C"
11052 #endif
11053 /* We use char because int might match the return type of a gcc2
11054    builtin and then its argument prototype would still apply.  */
11055 char bzero ();
11056 int
11057 main ()
11058 {
11059 bzero ();
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 rm -f conftest.$ac_objext conftest$ac_exeext
11065 if { (eval echo "$as_me:11065: \"$ac_link\"") >&5
11066   (eval $ac_link) 2>&5
11067   ac_status=$?
11068   echo "$as_me:11068: \$? = $ac_status" >&5
11069   (exit $ac_status); } &&
11070          { ac_try='test -s conftest$ac_exeext'
11071   { (eval echo "$as_me:11071: \"$ac_try\"") >&5
11072   (eval $ac_try) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit $ac_status); }; }; then
11076   ac_cv_lib_inet_bzero=yes
11077 else
11078   echo "$as_me: failed program was:" >&5
11079 cat conftest.$ac_ext >&5
11080 ac_cv_lib_inet_bzero=no
11081 fi
11082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11083 LIBS=$ac_check_lib_save_LIBS
11084 fi
11085 echo "$as_me:11085: result: $ac_cv_lib_inet_bzero" >&5
11086 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11087 if test $ac_cv_lib_inet_bzero = yes; then
11088   LIBS="$LIBS -linet"
11089 fi
11090 fi
11091
11092 echo "$as_me:11092: checking if sys/time.h works with sys/select.h" >&5
11093 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11094 if test "${cf_cv_sys_time_select+set}" = set; then
11095   echo $ECHO_N "(cached) $ECHO_C" >&6
11096 else
11097
11098 cat >conftest.$ac_ext <<_ACEOF
11099 #line 11099 "configure"
11100 #include "confdefs.h"
11101
11102 #include <sys/types.h>
11103 #ifdef HAVE_SYS_TIME_H
11104 #include <sys/time.h>
11105 #endif
11106 #ifdef HAVE_SYS_SELECT_H
11107 #include <sys/select.h>
11108 #endif
11109
11110 int
11111 main ()
11112 {
11113
11114   ;
11115   return 0;
11116 }
11117 _ACEOF
11118 rm -f conftest.$ac_objext
11119 if { (eval echo "$as_me:11119: \"$ac_compile\"") >&5
11120   (eval $ac_compile) 2>&5
11121   ac_status=$?
11122   echo "$as_me:11122: \$? = $ac_status" >&5
11123   (exit $ac_status); } &&
11124          { ac_try='test -s conftest.$ac_objext'
11125   { (eval echo "$as_me:11125: \"$ac_try\"") >&5
11126   (eval $ac_try) 2>&5
11127   ac_status=$?
11128   echo "$as_me:11128: \$? = $ac_status" >&5
11129   (exit $ac_status); }; }; then
11130   cf_cv_sys_time_select=yes
11131 else
11132   echo "$as_me: failed program was:" >&5
11133 cat conftest.$ac_ext >&5
11134 cf_cv_sys_time_select=no
11135 fi
11136 rm -f conftest.$ac_objext conftest.$ac_ext
11137
11138 fi
11139
11140 echo "$as_me:11140: result: $cf_cv_sys_time_select" >&5
11141 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11142 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11143 #define HAVE_SYS_TIME_SELECT 1
11144 EOF
11145
11146 ###     checks for compiler characteristics
11147 ac_ext=c
11148 ac_cpp='$CPP $CPPFLAGS'
11149 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11150 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11151 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11152 ac_main_return=return
11153
11154 echo "$as_me:11154: checking for $CC option to accept ANSI C" >&5
11155 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11156 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11157   echo $ECHO_N "(cached) $ECHO_C" >&6
11158 else
11159   ac_cv_prog_cc_stdc=no
11160 ac_save_CC=$CC
11161 cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11164 #include <stdarg.h>
11165 #include <stdio.h>
11166 #include <sys/types.h>
11167 #include <sys/stat.h>
11168 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11169 struct buf { int x; };
11170 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11171 static char *e (p, i)
11172      char **p;
11173      int i;
11174 {
11175   return p[i];
11176 }
11177 static char *f (char * (*g) (char **, int), char **p, ...)
11178 {
11179   char *s;
11180   va_list v;
11181   va_start (v,p);
11182   s = g (p, va_arg (v,int));
11183   va_end (v);
11184   return s;
11185 }
11186 int test (int i, double x);
11187 struct s1 {int (*f) (int a);};
11188 struct s2 {int (*f) (double a);};
11189 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11190 int argc;
11191 char **argv;
11192 int
11193 main ()
11194 {
11195 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 # Don't try gcc -ansi; that turns off useful extensions and
11201 # breaks some systems' header files.
11202 # AIX                   -qlanglvl=ansi
11203 # Ultrix and OSF/1      -std1
11204 # HP-UX 10.20 and later -Ae
11205 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11206 # SVR4                  -Xc -D__EXTENSIONS__
11207 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11208 do
11209   CC="$ac_save_CC $ac_arg"
11210   rm -f conftest.$ac_objext
11211 if { (eval echo "$as_me:11211: \"$ac_compile\"") >&5
11212   (eval $ac_compile) 2>&5
11213   ac_status=$?
11214   echo "$as_me:11214: \$? = $ac_status" >&5
11215   (exit $ac_status); } &&
11216          { ac_try='test -s conftest.$ac_objext'
11217   { (eval echo "$as_me:11217: \"$ac_try\"") >&5
11218   (eval $ac_try) 2>&5
11219   ac_status=$?
11220   echo "$as_me:11220: \$? = $ac_status" >&5
11221   (exit $ac_status); }; }; then
11222   ac_cv_prog_cc_stdc=$ac_arg
11223 break
11224 else
11225   echo "$as_me: failed program was:" >&5
11226 cat conftest.$ac_ext >&5
11227 fi
11228 rm -f conftest.$ac_objext
11229 done
11230 rm -f conftest.$ac_ext conftest.$ac_objext
11231 CC=$ac_save_CC
11232
11233 fi
11234
11235 case "x$ac_cv_prog_cc_stdc" in
11236   x|xno)
11237     echo "$as_me:11237: result: none needed" >&5
11238 echo "${ECHO_T}none needed" >&6 ;;
11239   *)
11240     echo "$as_me:11240: result: $ac_cv_prog_cc_stdc" >&5
11241 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11242     CC="$CC $ac_cv_prog_cc_stdc" ;;
11243 esac
11244
11245 echo "$as_me:11245: checking for an ANSI C-conforming const" >&5
11246 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11247 if test "${ac_cv_c_const+set}" = set; then
11248   echo $ECHO_N "(cached) $ECHO_C" >&6
11249 else
11250   cat >conftest.$ac_ext <<_ACEOF
11251 #line 11251 "configure"
11252 #include "confdefs.h"
11253
11254 int
11255 main ()
11256 {
11257 /* FIXME: Include the comments suggested by Paul. */
11258 #ifndef __cplusplus
11259   /* Ultrix mips cc rejects this.  */
11260   typedef int charset[2];
11261   const charset x;
11262   /* SunOS 4.1.1 cc rejects this.  */
11263   char const *const *ccp;
11264   char **p;
11265   /* NEC SVR4.0.2 mips cc rejects this.  */
11266   struct point {int x, y;};
11267   static struct point const zero = {0,0};
11268   /* AIX XL C 1.02.0.0 rejects this.
11269      It does not let you subtract one const X* pointer from another in
11270      an arm of an if-expression whose if-part is not a constant
11271      expression */
11272   const char *g = "string";
11273   ccp = &g + (g ? g-g : 0);
11274   /* HPUX 7.0 cc rejects these. */
11275   ++ccp;
11276   p = (char**) ccp;
11277   ccp = (char const *const *) p;
11278   { /* SCO 3.2v4 cc rejects this.  */
11279     char *t;
11280     char const *s = 0 ? (char *) 0 : (char const *) 0;
11281
11282     *t++ = 0;
11283   }
11284   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11285     int x[] = {25, 17};
11286     const int *foo = &x[0];
11287     ++foo;
11288   }
11289   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11290     typedef const int *iptr;
11291     iptr p = 0;
11292     ++p;
11293   }
11294   { /* AIX XL C 1.02.0.0 rejects this saying
11295        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11296     struct s { int j; const int *ap[3]; };
11297     struct s *b; b->j = 5;
11298   }
11299   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11300     const int foo = 10;
11301   }
11302 #endif
11303
11304   ;
11305   return 0;
11306 }
11307 _ACEOF
11308 rm -f conftest.$ac_objext
11309 if { (eval echo "$as_me:11309: \"$ac_compile\"") >&5
11310   (eval $ac_compile) 2>&5
11311   ac_status=$?
11312   echo "$as_me:11312: \$? = $ac_status" >&5
11313   (exit $ac_status); } &&
11314          { ac_try='test -s conftest.$ac_objext'
11315   { (eval echo "$as_me:11315: \"$ac_try\"") >&5
11316   (eval $ac_try) 2>&5
11317   ac_status=$?
11318   echo "$as_me:11318: \$? = $ac_status" >&5
11319   (exit $ac_status); }; }; then
11320   ac_cv_c_const=yes
11321 else
11322   echo "$as_me: failed program was:" >&5
11323 cat conftest.$ac_ext >&5
11324 ac_cv_c_const=no
11325 fi
11326 rm -f conftest.$ac_objext conftest.$ac_ext
11327 fi
11328 echo "$as_me:11328: result: $ac_cv_c_const" >&5
11329 echo "${ECHO_T}$ac_cv_c_const" >&6
11330 if test $ac_cv_c_const = no; then
11331
11332 cat >>confdefs.h <<\EOF
11333 #define const
11334 EOF
11335
11336 fi
11337
11338 echo "$as_me:11338: checking for inline" >&5
11339 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11340 if test "${ac_cv_c_inline+set}" = set; then
11341   echo $ECHO_N "(cached) $ECHO_C" >&6
11342 else
11343   ac_cv_c_inline=no
11344 for ac_kw in inline __inline__ __inline; do
11345   cat >conftest.$ac_ext <<_ACEOF
11346 #line 11346 "configure"
11347 #include "confdefs.h"
11348 #ifndef __cplusplus
11349 static $ac_kw int static_foo () {return 0; }
11350 $ac_kw int foo () {return 0; }
11351 #endif
11352
11353 _ACEOF
11354 rm -f conftest.$ac_objext
11355 if { (eval echo "$as_me:11355: \"$ac_compile\"") >&5
11356   (eval $ac_compile) 2>&5
11357   ac_status=$?
11358   echo "$as_me:11358: \$? = $ac_status" >&5
11359   (exit $ac_status); } &&
11360          { ac_try='test -s conftest.$ac_objext'
11361   { (eval echo "$as_me:11361: \"$ac_try\"") >&5
11362   (eval $ac_try) 2>&5
11363   ac_status=$?
11364   echo "$as_me:11364: \$? = $ac_status" >&5
11365   (exit $ac_status); }; }; then
11366   ac_cv_c_inline=$ac_kw; break
11367 else
11368   echo "$as_me: failed program was:" >&5
11369 cat conftest.$ac_ext >&5
11370 fi
11371 rm -f conftest.$ac_objext conftest.$ac_ext
11372 done
11373
11374 fi
11375 echo "$as_me:11375: result: $ac_cv_c_inline" >&5
11376 echo "${ECHO_T}$ac_cv_c_inline" >&6
11377 case $ac_cv_c_inline in
11378   inline | yes) ;;
11379   no)
11380 cat >>confdefs.h <<\EOF
11381 #define inline
11382 EOF
11383  ;;
11384   *)  cat >>confdefs.h <<EOF
11385 #define inline $ac_cv_c_inline
11386 EOF
11387  ;;
11388 esac
11389
11390 NCURSES_INLINE=
11391 if test "$ac_cv_c_inline" != no ; then
11392         cat >>confdefs.h <<\EOF
11393 #define CC_HAS_INLINE_FUNCS 1
11394 EOF
11395
11396         NCURSES_INLINE=inline
11397 fi
11398
11399 if test $NCURSES_CHTYPE = auto ; then
11400
11401 echo "$as_me:11401: checking for type of chtype" >&5
11402 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11403 if test "${cf_cv_typeof_chtype+set}" = set; then
11404   echo $ECHO_N "(cached) $ECHO_C" >&6
11405 else
11406
11407                 if test "$cross_compiling" = yes; then
11408   cf_cv_typeof_chtype=long
11409 else
11410   cat >conftest.$ac_ext <<_ACEOF
11411 #line 11411 "configure"
11412 #include "confdefs.h"
11413
11414 #define WANT_BITS 31
11415 #include <stdio.h>
11416 int main()
11417 {
11418         FILE *fp = fopen("cf_test.out", "w");
11419         if (fp != 0) {
11420                 char *result = "long";
11421                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11422                         int n;
11423                         unsigned int x, y;
11424                         for (n = 0; n < WANT_BITS; n++) {
11425                                 x = (1 << n);
11426                                 y = (x >> n);
11427                                 if (y != 1 || x == 0) {
11428                                         x = 0;
11429                                         break;
11430                                 }
11431                         }
11432                         /*
11433                          * If x is nonzero, an int is big enough for the bits
11434                          * that we want.
11435                          */
11436                         result = (x != 0) ? "int" : "long";
11437                 }
11438                 fputs(result, fp);
11439                 fclose(fp);
11440         }
11441         ${cf_cv_main_return:-return}(0);
11442 }
11443
11444 _ACEOF
11445 rm -f conftest$ac_exeext
11446 if { (eval echo "$as_me:11446: \"$ac_link\"") >&5
11447   (eval $ac_link) 2>&5
11448   ac_status=$?
11449   echo "$as_me:11449: \$? = $ac_status" >&5
11450   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11451   { (eval echo "$as_me:11451: \"$ac_try\"") >&5
11452   (eval $ac_try) 2>&5
11453   ac_status=$?
11454   echo "$as_me:11454: \$? = $ac_status" >&5
11455   (exit $ac_status); }; }; then
11456   cf_cv_typeof_chtype=`cat cf_test.out`
11457 else
11458   echo "$as_me: program exited with status $ac_status" >&5
11459 echo "$as_me: failed program was:" >&5
11460 cat conftest.$ac_ext >&5
11461 cf_cv_typeof_chtype=long
11462 fi
11463 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11464 fi
11465                 rm -f cf_test.out
11466
11467 fi
11468
11469 echo "$as_me:11469: result: $cf_cv_typeof_chtype" >&5
11470 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11471
11472 cat >>confdefs.h <<EOF
11473 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11474 EOF
11475
11476 else
11477         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11478 fi
11479
11480 echo "$as_me:11480: checking if unsigned literals are legal" >&5
11481 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11482 if test "${cf_cv_unsigned_literals+set}" = set; then
11483   echo $ECHO_N "(cached) $ECHO_C" >&6
11484 else
11485
11486         cat >conftest.$ac_ext <<_ACEOF
11487 #line 11487 "configure"
11488 #include "confdefs.h"
11489
11490 int
11491 main ()
11492 {
11493 long x = 1L + 1UL + 1U + 1
11494   ;
11495   return 0;
11496 }
11497 _ACEOF
11498 rm -f conftest.$ac_objext
11499 if { (eval echo "$as_me:11499: \"$ac_compile\"") >&5
11500   (eval $ac_compile) 2>&5
11501   ac_status=$?
11502   echo "$as_me:11502: \$? = $ac_status" >&5
11503   (exit $ac_status); } &&
11504          { ac_try='test -s conftest.$ac_objext'
11505   { (eval echo "$as_me:11505: \"$ac_try\"") >&5
11506   (eval $ac_try) 2>&5
11507   ac_status=$?
11508   echo "$as_me:11508: \$? = $ac_status" >&5
11509   (exit $ac_status); }; }; then
11510   cf_cv_unsigned_literals=yes
11511 else
11512   echo "$as_me: failed program was:" >&5
11513 cat conftest.$ac_ext >&5
11514 cf_cv_unsigned_literals=no
11515 fi
11516 rm -f conftest.$ac_objext conftest.$ac_ext
11517
11518 fi
11519
11520 echo "$as_me:11520: result: $cf_cv_unsigned_literals" >&5
11521 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11522
11523 cf_cv_1UL="1"
11524 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11525 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11526
11527 if test $NCURSES_MMASK_T = auto ; then
11528         cf_cv_typeof_mmask_t=long
11529 else
11530         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11531 fi
11532
11533 ###     Checks for external-data
11534
11535 echo "$as_me:11535: checking if external errno is declared" >&5
11536 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11537 if test "${cf_cv_dcl_errno+set}" = set; then
11538   echo $ECHO_N "(cached) $ECHO_C" >&6
11539 else
11540
11541     cat >conftest.$ac_ext <<_ACEOF
11542 #line 11542 "configure"
11543 #include "confdefs.h"
11544
11545 #ifdef HAVE_STDLIB_H
11546 #include <stdlib.h>
11547 #endif
11548 #include <stdio.h>
11549 #include <sys/types.h>
11550 #include <errno.h>
11551 int
11552 main ()
11553 {
11554 long x = (long) errno
11555   ;
11556   return 0;
11557 }
11558 _ACEOF
11559 rm -f conftest.$ac_objext
11560 if { (eval echo "$as_me:11560: \"$ac_compile\"") >&5
11561   (eval $ac_compile) 2>&5
11562   ac_status=$?
11563   echo "$as_me:11563: \$? = $ac_status" >&5
11564   (exit $ac_status); } &&
11565          { ac_try='test -s conftest.$ac_objext'
11566   { (eval echo "$as_me:11566: \"$ac_try\"") >&5
11567   (eval $ac_try) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit $ac_status); }; }; then
11571   cf_cv_dcl_errno=yes
11572 else
11573   echo "$as_me: failed program was:" >&5
11574 cat conftest.$ac_ext >&5
11575 cf_cv_dcl_errno=no
11576 fi
11577 rm -f conftest.$ac_objext conftest.$ac_ext
11578
11579 fi
11580 echo "$as_me:11580: result: $cf_cv_dcl_errno" >&5
11581 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11582
11583 if test "$cf_cv_dcl_errno" = no ; then
11584
11585 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11586
11587     cat >>confdefs.h <<EOF
11588 #define $cf_result 1
11589 EOF
11590
11591 fi
11592
11593 # It's possible (for near-UNIX clones) that the data doesn't exist
11594
11595 echo "$as_me:11595: checking if external errno exists" >&5
11596 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11597 if test "${cf_cv_have_errno+set}" = set; then
11598   echo $ECHO_N "(cached) $ECHO_C" >&6
11599 else
11600
11601     cat >conftest.$ac_ext <<_ACEOF
11602 #line 11602 "configure"
11603 #include "confdefs.h"
11604
11605 #undef errno
11606 extern int errno;
11607
11608 int
11609 main ()
11610 {
11611 errno = 2
11612   ;
11613   return 0;
11614 }
11615 _ACEOF
11616 rm -f conftest.$ac_objext conftest$ac_exeext
11617 if { (eval echo "$as_me:11617: \"$ac_link\"") >&5
11618   (eval $ac_link) 2>&5
11619   ac_status=$?
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit $ac_status); } &&
11622          { ac_try='test -s conftest$ac_exeext'
11623   { (eval echo "$as_me:11623: \"$ac_try\"") >&5
11624   (eval $ac_try) 2>&5
11625   ac_status=$?
11626   echo "$as_me:11626: \$? = $ac_status" >&5
11627   (exit $ac_status); }; }; then
11628   cf_cv_have_errno=yes
11629 else
11630   echo "$as_me: failed program was:" >&5
11631 cat conftest.$ac_ext >&5
11632 cf_cv_have_errno=no
11633 fi
11634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11635
11636 fi
11637 echo "$as_me:11637: result: $cf_cv_have_errno" >&5
11638 echo "${ECHO_T}$cf_cv_have_errno" >&6
11639
11640 if test "$cf_cv_have_errno" = yes ; then
11641
11642 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11643
11644     cat >>confdefs.h <<EOF
11645 #define $cf_result 1
11646 EOF
11647
11648 fi
11649
11650 echo "$as_me:11650: checking if data-only library module links" >&5
11651 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11652 if test "${cf_cv_link_dataonly+set}" = set; then
11653   echo $ECHO_N "(cached) $ECHO_C" >&6
11654 else
11655
11656         rm -f conftest.a
11657         cat >conftest.$ac_ext <<EOF
11658 #line 11658 "configure"
11659 int     testdata[3] = { 123, 456, 789 };
11660 EOF
11661         if { (eval echo "$as_me:11661: \"$ac_compile\"") >&5
11662   (eval $ac_compile) 2>&5
11663   ac_status=$?
11664   echo "$as_me:11664: \$? = $ac_status" >&5
11665   (exit $ac_status); } ; then
11666                 mv conftest.o data.o && \
11667                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11668         fi
11669         rm -f conftest.$ac_ext data.o
11670         cat >conftest.$ac_ext <<EOF
11671 #line 11671 "configure"
11672 int     testfunc()
11673 {
11674 #if defined(NeXT)
11675         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11676 #else
11677         extern int testdata[3];
11678         return testdata[0] == 123
11679            &&  testdata[1] == 456
11680            &&  testdata[2] == 789;
11681 #endif
11682 }
11683 EOF
11684         if { (eval echo "$as_me:11684: \"$ac_compile\"") >&5
11685   (eval $ac_compile) 2>&5
11686   ac_status=$?
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); }; then
11689                 mv conftest.o func.o && \
11690                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11691         fi
11692         rm -f conftest.$ac_ext func.o
11693         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11694         cf_saveLIBS="$LIBS"
11695         LIBS="conftest.a $LIBS"
11696         if test "$cross_compiling" = yes; then
11697   cf_cv_link_dataonly=unknown
11698 else
11699   cat >conftest.$ac_ext <<_ACEOF
11700 #line 11700 "configure"
11701 #include "confdefs.h"
11702
11703         int main()
11704         {
11705                 extern int testfunc();
11706                 ${cf_cv_main_return:-return} (!testfunc());
11707         }
11708
11709 _ACEOF
11710 rm -f conftest$ac_exeext
11711 if { (eval echo "$as_me:11711: \"$ac_link\"") >&5
11712   (eval $ac_link) 2>&5
11713   ac_status=$?
11714   echo "$as_me:11714: \$? = $ac_status" >&5
11715   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11716   { (eval echo "$as_me:11716: \"$ac_try\"") >&5
11717   (eval $ac_try) 2>&5
11718   ac_status=$?
11719   echo "$as_me:11719: \$? = $ac_status" >&5
11720   (exit $ac_status); }; }; then
11721   cf_cv_link_dataonly=yes
11722 else
11723   echo "$as_me: program exited with status $ac_status" >&5
11724 echo "$as_me: failed program was:" >&5
11725 cat conftest.$ac_ext >&5
11726 cf_cv_link_dataonly=no
11727 fi
11728 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11729 fi
11730         LIBS="$cf_saveLIBS"
11731
11732 fi
11733
11734 echo "$as_me:11734: result: $cf_cv_link_dataonly" >&5
11735 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11736
11737 if test "$cf_cv_link_dataonly" = no ; then
11738         cat >>confdefs.h <<\EOF
11739 #define BROKEN_LINKER 1
11740 EOF
11741
11742         BROKEN_LINKER=1
11743 fi
11744
11745 ###     Checks for library functions.
11746
11747 for ac_func in \
11748 getcwd \
11749 getegid \
11750 geteuid \
11751 getttynam \
11752 issetugid \
11753 poll \
11754 remove \
11755 select \
11756 setbuf \
11757 setbuffer \
11758 setvbuf \
11759 sigaction \
11760 sigvec \
11761 strdup \
11762 strstr \
11763 tcgetpgrp \
11764 times \
11765 vsnprintf \
11766
11767 do
11768 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11769 echo "$as_me:11769: checking for $ac_func" >&5
11770 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11771 if eval "test \"\${$as_ac_var+set}\" = set"; then
11772   echo $ECHO_N "(cached) $ECHO_C" >&6
11773 else
11774   cat >conftest.$ac_ext <<_ACEOF
11775 #line 11775 "configure"
11776 #include "confdefs.h"
11777 /* System header to define __stub macros and hopefully few prototypes,
11778     which can conflict with char $ac_func (); below.  */
11779 #include <assert.h>
11780 /* Override any gcc2 internal prototype to avoid an error.  */
11781 #ifdef __cplusplus
11782 extern "C"
11783 #endif
11784 /* We use char because int might match the return type of a gcc2
11785    builtin and then its argument prototype would still apply.  */
11786 char $ac_func ();
11787 char (*f) ();
11788
11789 int
11790 main ()
11791 {
11792 /* The GNU C library defines this for functions which it implements
11793     to always fail with ENOSYS.  Some functions are actually named
11794     something starting with __ and the normal name is an alias.  */
11795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11796 choke me
11797 #else
11798 f = $ac_func;
11799 #endif
11800
11801   ;
11802   return 0;
11803 }
11804 _ACEOF
11805 rm -f conftest.$ac_objext conftest$ac_exeext
11806 if { (eval echo "$as_me:11806: \"$ac_link\"") >&5
11807   (eval $ac_link) 2>&5
11808   ac_status=$?
11809   echo "$as_me:11809: \$? = $ac_status" >&5
11810   (exit $ac_status); } &&
11811          { ac_try='test -s conftest$ac_exeext'
11812   { (eval echo "$as_me:11812: \"$ac_try\"") >&5
11813   (eval $ac_try) 2>&5
11814   ac_status=$?
11815   echo "$as_me:11815: \$? = $ac_status" >&5
11816   (exit $ac_status); }; }; then
11817   eval "$as_ac_var=yes"
11818 else
11819   echo "$as_me: failed program was:" >&5
11820 cat conftest.$ac_ext >&5
11821 eval "$as_ac_var=no"
11822 fi
11823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11824 fi
11825 echo "$as_me:11825: result: `eval echo '${'$as_ac_var'}'`" >&5
11826 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11827 if test `eval echo '${'$as_ac_var'}'` = yes; then
11828   cat >>confdefs.h <<EOF
11829 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11830 EOF
11831
11832 fi
11833 done
11834
11835 if test "$with_getcap" = "yes" ; then
11836
11837 echo "$as_me:11837: checking for terminal-capability database functions" >&5
11838 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11839 if test "${cf_cv_cgetent+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842
11843 cat >conftest.$ac_ext <<_ACEOF
11844 #line 11844 "configure"
11845 #include "confdefs.h"
11846
11847 #include <stdlib.h>
11848 int
11849 main ()
11850 {
11851
11852         char temp[128];
11853         char *buf = temp;
11854         char *db_array = temp;
11855         cgetent(&buf, /* int *, */ &db_array, "vt100");
11856         cgetcap(buf, "tc", '=');
11857         cgetmatch(buf, "tc");
11858
11859   ;
11860   return 0;
11861 }
11862 _ACEOF
11863 rm -f conftest.$ac_objext conftest$ac_exeext
11864 if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
11865   (eval $ac_link) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); } &&
11869          { ac_try='test -s conftest$ac_exeext'
11870   { (eval echo "$as_me:11870: \"$ac_try\"") >&5
11871   (eval $ac_try) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); }; }; then
11875   cf_cv_cgetent=yes
11876 else
11877   echo "$as_me: failed program was:" >&5
11878 cat conftest.$ac_ext >&5
11879 cf_cv_cgetent=no
11880 fi
11881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11882
11883 fi
11884
11885 echo "$as_me:11885: result: $cf_cv_cgetent" >&5
11886 echo "${ECHO_T}$cf_cv_cgetent" >&6
11887 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11888 #define HAVE_BSD_CGETENT 1
11889 EOF
11890
11891 fi
11892
11893 echo "$as_me:11893: checking for isascii" >&5
11894 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11895 if test "${cf_cv_have_isascii+set}" = set; then
11896   echo $ECHO_N "(cached) $ECHO_C" >&6
11897 else
11898
11899         cat >conftest.$ac_ext <<_ACEOF
11900 #line 11900 "configure"
11901 #include "confdefs.h"
11902 #include <ctype.h>
11903 int
11904 main ()
11905 {
11906 int x = isascii(' ')
11907   ;
11908   return 0;
11909 }
11910 _ACEOF
11911 rm -f conftest.$ac_objext conftest$ac_exeext
11912 if { (eval echo "$as_me:11912: \"$ac_link\"") >&5
11913   (eval $ac_link) 2>&5
11914   ac_status=$?
11915   echo "$as_me:11915: \$? = $ac_status" >&5
11916   (exit $ac_status); } &&
11917          { ac_try='test -s conftest$ac_exeext'
11918   { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919   (eval $ac_try) 2>&5
11920   ac_status=$?
11921   echo "$as_me:11921: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   cf_cv_have_isascii=yes
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 cat conftest.$ac_ext >&5
11927 cf_cv_have_isascii=no
11928 fi
11929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11930
11931 fi
11932 echo "$as_me:11932: result: $cf_cv_have_isascii" >&5
11933 echo "${ECHO_T}$cf_cv_have_isascii" >&6
11934 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11935 #define HAVE_ISASCII 1
11936 EOF
11937
11938 if test "$ac_cv_func_sigaction" = yes; then
11939 echo "$as_me:11939: checking whether sigaction needs _POSIX_SOURCE" >&5
11940 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11941 cat >conftest.$ac_ext <<_ACEOF
11942 #line 11942 "configure"
11943 #include "confdefs.h"
11944
11945 #include <sys/types.h>
11946 #include <signal.h>
11947 int
11948 main ()
11949 {
11950 struct sigaction act
11951   ;
11952   return 0;
11953 }
11954 _ACEOF
11955 rm -f conftest.$ac_objext
11956 if { (eval echo "$as_me:11956: \"$ac_compile\"") >&5
11957   (eval $ac_compile) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); } &&
11961          { ac_try='test -s conftest.$ac_objext'
11962   { (eval echo "$as_me:11962: \"$ac_try\"") >&5
11963   (eval $ac_try) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); }; }; then
11967   sigact_bad=no
11968 else
11969   echo "$as_me: failed program was:" >&5
11970 cat conftest.$ac_ext >&5
11971
11972 cat >conftest.$ac_ext <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975
11976 #define _POSIX_SOURCE
11977 #include <sys/types.h>
11978 #include <signal.h>
11979 int
11980 main ()
11981 {
11982 struct sigaction act
11983   ;
11984   return 0;
11985 }
11986 _ACEOF
11987 rm -f conftest.$ac_objext
11988 if { (eval echo "$as_me:11988: \"$ac_compile\"") >&5
11989   (eval $ac_compile) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit $ac_status); } &&
11993          { ac_try='test -s conftest.$ac_objext'
11994   { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit $ac_status); }; }; then
11999   sigact_bad=yes
12000          cat >>confdefs.h <<\EOF
12001 #define SVR4_ACTION 1
12002 EOF
12003
12004 else
12005   echo "$as_me: failed program was:" >&5
12006 cat conftest.$ac_ext >&5
12007 sigact_bad=unknown
12008 fi
12009 rm -f conftest.$ac_objext conftest.$ac_ext
12010 fi
12011 rm -f conftest.$ac_objext conftest.$ac_ext
12012 echo "$as_me:12012: result: $sigact_bad" >&5
12013 echo "${ECHO_T}$sigact_bad" >&6
12014 fi
12015
12016 echo "$as_me:12016: checking if nanosleep really works" >&5
12017 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12018 if test "${cf_cv_func_nanosleep+set}" = set; then
12019   echo $ECHO_N "(cached) $ECHO_C" >&6
12020 else
12021
12022 if test "$cross_compiling" = yes; then
12023   cf_cv_func_nanosleep=unknown
12024 else
12025   cat >conftest.$ac_ext <<_ACEOF
12026 #line 12026 "configure"
12027 #include "confdefs.h"
12028
12029 #include <stdio.h>
12030 #include <errno.h>
12031 #include <time.h>
12032
12033 #ifdef HAVE_SYS_TIME_H
12034 #include <sys/time.h>
12035 #endif
12036
12037 int main() {
12038         struct timespec ts1, ts2;
12039         int code;
12040         ts1.tv_sec  = 0;
12041         ts1.tv_nsec = 750000000;
12042         ts2.tv_sec  = 0;
12043         ts2.tv_nsec = 0;
12044         errno = 0;
12045         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12046         ${cf_cv_main_return:-return}(code != 0);
12047 }
12048
12049 _ACEOF
12050 rm -f conftest$ac_exeext
12051 if { (eval echo "$as_me:12051: \"$ac_link\"") >&5
12052   (eval $ac_link) 2>&5
12053   ac_status=$?
12054   echo "$as_me:12054: \$? = $ac_status" >&5
12055   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12056   { (eval echo "$as_me:12056: \"$ac_try\"") >&5
12057   (eval $ac_try) 2>&5
12058   ac_status=$?
12059   echo "$as_me:12059: \$? = $ac_status" >&5
12060   (exit $ac_status); }; }; then
12061   cf_cv_func_nanosleep=yes
12062 else
12063   echo "$as_me: program exited with status $ac_status" >&5
12064 echo "$as_me: failed program was:" >&5
12065 cat conftest.$ac_ext >&5
12066 cf_cv_func_nanosleep=no
12067 fi
12068 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12069 fi
12070 fi
12071 echo "$as_me:12071: result: $cf_cv_func_nanosleep" >&5
12072 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12073
12074 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12075 #define HAVE_NANOSLEEP 1
12076 EOF
12077
12078 for ac_header in \
12079 termio.h \
12080 termios.h \
12081 unistd.h \
12082
12083 do
12084 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12085 echo "$as_me:12085: checking for $ac_header" >&5
12086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12087 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12088   echo $ECHO_N "(cached) $ECHO_C" >&6
12089 else
12090   cat >conftest.$ac_ext <<_ACEOF
12091 #line 12091 "configure"
12092 #include "confdefs.h"
12093 #include <$ac_header>
12094 _ACEOF
12095 if { (eval echo "$as_me:12095: \"$ac_cpp conftest.$ac_ext\"") >&5
12096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12097   ac_status=$?
12098   egrep -v '^ *\+' conftest.er1 >conftest.err
12099   rm -f conftest.er1
12100   cat conftest.err >&5
12101   echo "$as_me:12101: \$? = $ac_status" >&5
12102   (exit $ac_status); } >/dev/null; then
12103   if test -s conftest.err; then
12104     ac_cpp_err=$ac_c_preproc_warn_flag
12105   else
12106     ac_cpp_err=
12107   fi
12108 else
12109   ac_cpp_err=yes
12110 fi
12111 if test -z "$ac_cpp_err"; then
12112   eval "$as_ac_Header=yes"
12113 else
12114   echo "$as_me: failed program was:" >&5
12115   cat conftest.$ac_ext >&5
12116   eval "$as_ac_Header=no"
12117 fi
12118 rm -f conftest.err conftest.$ac_ext
12119 fi
12120 echo "$as_me:12120: result: `eval echo '${'$as_ac_Header'}'`" >&5
12121 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12122 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12123   cat >>confdefs.h <<EOF
12124 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12125 EOF
12126
12127 fi
12128 done
12129
12130 if test "$ISC" = yes ; then
12131
12132 for ac_header in sys/termio.h
12133 do
12134 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12135 echo "$as_me:12135: checking for $ac_header" >&5
12136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12138   echo $ECHO_N "(cached) $ECHO_C" >&6
12139 else
12140   cat >conftest.$ac_ext <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143 #include <$ac_header>
12144 _ACEOF
12145 if { (eval echo "$as_me:12145: \"$ac_cpp conftest.$ac_ext\"") >&5
12146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12147   ac_status=$?
12148   egrep -v '^ *\+' conftest.er1 >conftest.err
12149   rm -f conftest.er1
12150   cat conftest.err >&5
12151   echo "$as_me:12151: \$? = $ac_status" >&5
12152   (exit $ac_status); } >/dev/null; then
12153   if test -s conftest.err; then
12154     ac_cpp_err=$ac_c_preproc_warn_flag
12155   else
12156     ac_cpp_err=
12157   fi
12158 else
12159   ac_cpp_err=yes
12160 fi
12161 if test -z "$ac_cpp_err"; then
12162   eval "$as_ac_Header=yes"
12163 else
12164   echo "$as_me: failed program was:" >&5
12165   cat conftest.$ac_ext >&5
12166   eval "$as_ac_Header=no"
12167 fi
12168 rm -f conftest.err conftest.$ac_ext
12169 fi
12170 echo "$as_me:12170: result: `eval echo '${'$as_ac_Header'}'`" >&5
12171 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12172 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12173   cat >>confdefs.h <<EOF
12174 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12175 EOF
12176
12177 fi
12178 done
12179
12180 fi
12181 if test "$ac_cv_header_termios_h" = yes ; then
12182         case "$CFLAGS $CPPFLAGS" in
12183         *-D_POSIX_SOURCE*)
12184                 termios_bad=dunno ;;
12185         *)      termios_bad=maybe ;;
12186         esac
12187         if test "$termios_bad" = maybe ; then
12188         echo "$as_me:12188: checking whether termios.h needs _POSIX_SOURCE" >&5
12189 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12190         cat >conftest.$ac_ext <<_ACEOF
12191 #line 12191 "configure"
12192 #include "confdefs.h"
12193 #include <termios.h>
12194 int
12195 main ()
12196 {
12197 struct termios foo; int x = foo.c_iflag
12198   ;
12199   return 0;
12200 }
12201 _ACEOF
12202 rm -f conftest.$ac_objext
12203 if { (eval echo "$as_me:12203: \"$ac_compile\"") >&5
12204   (eval $ac_compile) 2>&5
12205   ac_status=$?
12206   echo "$as_me:12206: \$? = $ac_status" >&5
12207   (exit $ac_status); } &&
12208          { ac_try='test -s conftest.$ac_objext'
12209   { (eval echo "$as_me:12209: \"$ac_try\"") >&5
12210   (eval $ac_try) 2>&5
12211   ac_status=$?
12212   echo "$as_me:12212: \$? = $ac_status" >&5
12213   (exit $ac_status); }; }; then
12214   termios_bad=no
12215 else
12216   echo "$as_me: failed program was:" >&5
12217 cat conftest.$ac_ext >&5
12218
12219                 cat >conftest.$ac_ext <<_ACEOF
12220 #line 12220 "configure"
12221 #include "confdefs.h"
12222
12223 #define _POSIX_SOURCE
12224 #include <termios.h>
12225 int
12226 main ()
12227 {
12228 struct termios foo; int x = foo.c_iflag
12229   ;
12230   return 0;
12231 }
12232 _ACEOF
12233 rm -f conftest.$ac_objext
12234 if { (eval echo "$as_me:12234: \"$ac_compile\"") >&5
12235   (eval $ac_compile) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); } &&
12239          { ac_try='test -s conftest.$ac_objext'
12240   { (eval echo "$as_me:12240: \"$ac_try\"") >&5
12241   (eval $ac_try) 2>&5
12242   ac_status=$?
12243   echo "$as_me:12243: \$? = $ac_status" >&5
12244   (exit $ac_status); }; }; then
12245   termios_bad=unknown
12246 else
12247   echo "$as_me: failed program was:" >&5
12248 cat conftest.$ac_ext >&5
12249 termios_bad=yes cat >>confdefs.h <<\EOF
12250 #define SVR4_TERMIO 1
12251 EOF
12252
12253 fi
12254 rm -f conftest.$ac_objext conftest.$ac_ext
12255
12256 fi
12257 rm -f conftest.$ac_objext conftest.$ac_ext
12258         echo "$as_me:12258: result: $termios_bad" >&5
12259 echo "${ECHO_T}$termios_bad" >&6
12260         fi
12261 fi
12262
12263 echo "$as_me:12263: checking for tcgetattr" >&5
12264 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12265 if test "${cf_cv_have_tcgetattr+set}" = set; then
12266   echo $ECHO_N "(cached) $ECHO_C" >&6
12267 else
12268
12269 cat >conftest.$ac_ext <<_ACEOF
12270 #line 12270 "configure"
12271 #include "confdefs.h"
12272
12273 #include <sys/types.h>
12274 #ifdef HAVE_UNISTD_H
12275 #include <unistd.h>
12276 #endif
12277 #ifdef HAVE_TERMIOS_H
12278 #include <termios.h>
12279 #define TTY struct termios
12280 #else
12281 #ifdef HAVE_TERMIO_H
12282 #include <termio.h>
12283 #define TTY struct termio
12284 #endif
12285 #endif
12286
12287 int
12288 main ()
12289 {
12290
12291 TTY foo;
12292 tcgetattr(1, &foo);
12293   ;
12294   return 0;
12295 }
12296 _ACEOF
12297 rm -f conftest.$ac_objext conftest$ac_exeext
12298 if { (eval echo "$as_me:12298: \"$ac_link\"") >&5
12299   (eval $ac_link) 2>&5
12300   ac_status=$?
12301   echo "$as_me:12301: \$? = $ac_status" >&5
12302   (exit $ac_status); } &&
12303          { ac_try='test -s conftest$ac_exeext'
12304   { (eval echo "$as_me:12304: \"$ac_try\"") >&5
12305   (eval $ac_try) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); }; }; then
12309   cf_cv_have_tcgetattr=yes
12310 else
12311   echo "$as_me: failed program was:" >&5
12312 cat conftest.$ac_ext >&5
12313 cf_cv_have_tcgetattr=no
12314 fi
12315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12316 fi
12317 echo "$as_me:12317: result: $cf_cv_have_tcgetattr" >&5
12318 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12319 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12320 #define HAVE_TCGETATTR 1
12321 EOF
12322
12323 echo "$as_me:12323: checking for vsscanf function or workaround" >&5
12324 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12325 if test "${cf_cv_func_vsscanf+set}" = set; then
12326   echo $ECHO_N "(cached) $ECHO_C" >&6
12327 else
12328
12329 cat >conftest.$ac_ext <<_ACEOF
12330 #line 12330 "configure"
12331 #include "confdefs.h"
12332
12333 #include <stdarg.h>
12334 #include <stdio.h>
12335 int
12336 main ()
12337 {
12338
12339         va_list ap;
12340         vsscanf("from", "%d", ap)
12341   ;
12342   return 0;
12343 }
12344 _ACEOF
12345 rm -f conftest.$ac_objext conftest$ac_exeext
12346 if { (eval echo "$as_me:12346: \"$ac_link\"") >&5
12347   (eval $ac_link) 2>&5
12348   ac_status=$?
12349   echo "$as_me:12349: \$? = $ac_status" >&5
12350   (exit $ac_status); } &&
12351          { ac_try='test -s conftest$ac_exeext'
12352   { (eval echo "$as_me:12352: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:12355: \$? = $ac_status" >&5
12356   (exit $ac_status); }; }; then
12357   cf_cv_func_vsscanf=vsscanf
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 cat conftest.$ac_ext >&5
12361
12362 cat >conftest.$ac_ext <<_ACEOF
12363 #line 12363 "configure"
12364 #include "confdefs.h"
12365
12366 #include <stdarg.h>
12367 #include <stdio.h>
12368 int
12369 main ()
12370 {
12371
12372     FILE strbuf;
12373     char *str = "from";
12374
12375     strbuf._flag = _IOREAD;
12376     strbuf._ptr = strbuf._base = (unsigned char *) str;
12377     strbuf._cnt = strlen(str);
12378     strbuf._file = _NFILE;
12379     return (vfscanf(&strbuf, "%d", ap))
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext conftest$ac_exeext
12385 if { (eval echo "$as_me:12385: \"$ac_link\"") >&5
12386   (eval $ac_link) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest$ac_exeext'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   cf_cv_func_vsscanf=vfscanf
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400
12401 cat >conftest.$ac_ext <<_ACEOF
12402 #line 12402 "configure"
12403 #include "confdefs.h"
12404
12405 #include <stdarg.h>
12406 #include <stdio.h>
12407 int
12408 main ()
12409 {
12410
12411     FILE strbuf;
12412     char *str = "from";
12413
12414     strbuf._flag = _IOREAD;
12415     strbuf._ptr = strbuf._base = (unsigned char *) str;
12416     strbuf._cnt = strlen(str);
12417     strbuf._file = _NFILE;
12418     return (_doscan(&strbuf, "%d", ap))
12419   ;
12420   return 0;
12421 }
12422 _ACEOF
12423 rm -f conftest.$ac_objext conftest$ac_exeext
12424 if { (eval echo "$as_me:12424: \"$ac_link\"") >&5
12425   (eval $ac_link) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit $ac_status); } &&
12429          { ac_try='test -s conftest$ac_exeext'
12430   { (eval echo "$as_me:12430: \"$ac_try\"") >&5
12431   (eval $ac_try) 2>&5
12432   ac_status=$?
12433   echo "$as_me:12433: \$? = $ac_status" >&5
12434   (exit $ac_status); }; }; then
12435   cf_cv_func_vsscanf=_doscan
12436 else
12437   echo "$as_me: failed program was:" >&5
12438 cat conftest.$ac_ext >&5
12439
12440 cf_cv_func_vsscanf=no
12441 fi
12442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12443 fi
12444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12445 fi
12446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12447 fi
12448 echo "$as_me:12448: result: $cf_cv_func_vsscanf" >&5
12449 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12450
12451 case $cf_cv_func_vsscanf in #(vi
12452 vsscanf) cat >>confdefs.h <<\EOF
12453 #define HAVE_VSSCANF 1
12454 EOF
12455 ;; #(vi
12456 vfscanf) cat >>confdefs.h <<\EOF
12457 #define HAVE_VFSCANF 1
12458 EOF
12459 ;; #(vi
12460 _doscan) cat >>confdefs.h <<\EOF
12461 #define HAVE__DOSCAN 1
12462 EOF
12463 ;;
12464 esac
12465
12466 echo "$as_me:12466: checking for working mkstemp" >&5
12467 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12468 if test "${cf_cv_func_mkstemp+set}" = set; then
12469   echo $ECHO_N "(cached) $ECHO_C" >&6
12470 else
12471
12472 rm -f conftest*
12473 if test "$cross_compiling" = yes; then
12474   echo "$as_me:12474: checking for mkstemp" >&5
12475 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12476 if test "${ac_cv_func_mkstemp+set}" = set; then
12477   echo $ECHO_N "(cached) $ECHO_C" >&6
12478 else
12479   cat >conftest.$ac_ext <<_ACEOF
12480 #line 12480 "configure"
12481 #include "confdefs.h"
12482 /* System header to define __stub macros and hopefully few prototypes,
12483     which can conflict with char mkstemp (); below.  */
12484 #include <assert.h>
12485 /* Override any gcc2 internal prototype to avoid an error.  */
12486 #ifdef __cplusplus
12487 extern "C"
12488 #endif
12489 /* We use char because int might match the return type of a gcc2
12490    builtin and then its argument prototype would still apply.  */
12491 char mkstemp ();
12492 char (*f) ();
12493
12494 int
12495 main ()
12496 {
12497 /* The GNU C library defines this for functions which it implements
12498     to always fail with ENOSYS.  Some functions are actually named
12499     something starting with __ and the normal name is an alias.  */
12500 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12501 choke me
12502 #else
12503 f = mkstemp;
12504 #endif
12505
12506   ;
12507   return 0;
12508 }
12509 _ACEOF
12510 rm -f conftest.$ac_objext conftest$ac_exeext
12511 if { (eval echo "$as_me:12511: \"$ac_link\"") >&5
12512   (eval $ac_link) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); } &&
12516          { ac_try='test -s conftest$ac_exeext'
12517   { (eval echo "$as_me:12517: \"$ac_try\"") >&5
12518   (eval $ac_try) 2>&5
12519   ac_status=$?
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit $ac_status); }; }; then
12522   ac_cv_func_mkstemp=yes
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat conftest.$ac_ext >&5
12526 ac_cv_func_mkstemp=no
12527 fi
12528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12529 fi
12530 echo "$as_me:12530: result: $ac_cv_func_mkstemp" >&5
12531 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12532
12533 else
12534   cat >conftest.$ac_ext <<_ACEOF
12535 #line 12535 "configure"
12536 #include "confdefs.h"
12537
12538 #include <sys/types.h>
12539 #include <stdlib.h>
12540 #include <stdio.h>
12541 #include <string.h>
12542 #include <sys/stat.h>
12543 int main()
12544 {
12545         char *tmpl = "conftestXXXXXX";
12546         char name[2][80];
12547         int n;
12548         int result = 0;
12549         int fd;
12550         struct stat sb;
12551
12552         umask(077);
12553         for (n = 0; n < 2; ++n) {
12554                 strcpy(name[n], tmpl);
12555                 if ((fd = mkstemp(name[n])) >= 0) {
12556                         if (!strcmp(name[n], tmpl)
12557                          || stat(name[n], &sb) != 0
12558                          || (sb.st_mode & S_IFMT) != S_IFREG
12559                          || (sb.st_mode & 077) != 0) {
12560                                 result = 1;
12561                         }
12562                         close(fd);
12563                 }
12564         }
12565         if (result == 0
12566          && !strcmp(name[0], name[1]))
12567                 result = 1;
12568         ${cf_cv_main_return:-return}(result);
12569 }
12570
12571 _ACEOF
12572 rm -f conftest$ac_exeext
12573 if { (eval echo "$as_me:12573: \"$ac_link\"") >&5
12574   (eval $ac_link) 2>&5
12575   ac_status=$?
12576   echo "$as_me:12576: \$? = $ac_status" >&5
12577   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   cf_cv_func_mkstemp=yes
12584
12585 else
12586   echo "$as_me: program exited with status $ac_status" >&5
12587 echo "$as_me: failed program was:" >&5
12588 cat conftest.$ac_ext >&5
12589 cf_cv_func_mkstemp=no
12590
12591 fi
12592 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12593 fi
12594
12595 fi
12596 echo "$as_me:12596: result: $cf_cv_func_mkstemp" >&5
12597 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12598 if test "$cf_cv_func_mkstemp" = yes ; then
12599         cat >>confdefs.h <<\EOF
12600 #define HAVE_MKSTEMP 1
12601 EOF
12602
12603 fi
12604
12605 # setup for prototype of fallback for vsscanf()
12606
12607 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12608         HAVE_VSSCANF=1
12609 else
12610         HAVE_VSSCANF=0
12611 fi
12612
12613 if test "$cross_compiling" = yes ; then
12614         { echo "$as_me:12614: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12615 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12616 else
12617         echo "$as_me:12617: checking whether setvbuf arguments are reversed" >&5
12618 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12619 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 else
12622   if test "$cross_compiling" = yes; then
12623   { { echo "$as_me:12623: error: cannot run test program while cross compiling" >&5
12624 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12625    { (exit 1); exit 1; }; }
12626 else
12627   cat >conftest.$ac_ext <<_ACEOF
12628 #line 12628 "configure"
12629 #include "confdefs.h"
12630 #include <stdio.h>
12631 /* If setvbuf has the reversed format, exit 0. */
12632 int
12633 main ()
12634 {
12635   /* This call has the arguments reversed.
12636      A reversed system may check and see that the address of main
12637      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12638   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12639     $ac_main_return(1);
12640   putc('\r', stdout);
12641   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12642 }
12643 _ACEOF
12644 rm -f conftest$ac_exeext
12645 if { (eval echo "$as_me:12645: \"$ac_link\"") >&5
12646   (eval $ac_link) 2>&5
12647   ac_status=$?
12648   echo "$as_me:12648: \$? = $ac_status" >&5
12649   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12650   { (eval echo "$as_me:12650: \"$ac_try\"") >&5
12651   (eval $ac_try) 2>&5
12652   ac_status=$?
12653   echo "$as_me:12653: \$? = $ac_status" >&5
12654   (exit $ac_status); }; }; then
12655   ac_cv_func_setvbuf_reversed=yes
12656 else
12657   echo "$as_me: program exited with status $ac_status" >&5
12658 echo "$as_me: failed program was:" >&5
12659 cat conftest.$ac_ext >&5
12660 ac_cv_func_setvbuf_reversed=no
12661 fi
12662 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12663 fi
12664 rm -f core core.* *.core
12665 fi
12666 echo "$as_me:12666: result: $ac_cv_func_setvbuf_reversed" >&5
12667 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12668 if test $ac_cv_func_setvbuf_reversed = yes; then
12669
12670 cat >>confdefs.h <<\EOF
12671 #define SETVBUF_REVERSED 1
12672 EOF
12673
12674 fi
12675
12676 fi
12677 echo "$as_me:12677: checking return type of signal handlers" >&5
12678 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12679 if test "${ac_cv_type_signal+set}" = set; then
12680   echo $ECHO_N "(cached) $ECHO_C" >&6
12681 else
12682   cat >conftest.$ac_ext <<_ACEOF
12683 #line 12683 "configure"
12684 #include "confdefs.h"
12685 #include <sys/types.h>
12686 #include <signal.h>
12687 #ifdef signal
12688 # undef signal
12689 #endif
12690 #ifdef __cplusplus
12691 extern "C" void (*signal (int, void (*)(int)))(int);
12692 #else
12693 void (*signal ()) ();
12694 #endif
12695
12696 int
12697 main ()
12698 {
12699 int i;
12700   ;
12701   return 0;
12702 }
12703 _ACEOF
12704 rm -f conftest.$ac_objext
12705 if { (eval echo "$as_me:12705: \"$ac_compile\"") >&5
12706   (eval $ac_compile) 2>&5
12707   ac_status=$?
12708   echo "$as_me:12708: \$? = $ac_status" >&5
12709   (exit $ac_status); } &&
12710          { ac_try='test -s conftest.$ac_objext'
12711   { (eval echo "$as_me:12711: \"$ac_try\"") >&5
12712   (eval $ac_try) 2>&5
12713   ac_status=$?
12714   echo "$as_me:12714: \$? = $ac_status" >&5
12715   (exit $ac_status); }; }; then
12716   ac_cv_type_signal=void
12717 else
12718   echo "$as_me: failed program was:" >&5
12719 cat conftest.$ac_ext >&5
12720 ac_cv_type_signal=int
12721 fi
12722 rm -f conftest.$ac_objext conftest.$ac_ext
12723 fi
12724 echo "$as_me:12724: result: $ac_cv_type_signal" >&5
12725 echo "${ECHO_T}$ac_cv_type_signal" >&6
12726
12727 cat >>confdefs.h <<EOF
12728 #define RETSIGTYPE $ac_cv_type_signal
12729 EOF
12730
12731 echo "$as_me:12731: checking for type sigaction_t" >&5
12732 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12733 if test "${cf_cv_type_sigaction+set}" = set; then
12734   echo $ECHO_N "(cached) $ECHO_C" >&6
12735 else
12736
12737         cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12740
12741 #include <signal.h>
12742 int
12743 main ()
12744 {
12745 sigaction_t x
12746   ;
12747   return 0;
12748 }
12749 _ACEOF
12750 rm -f conftest.$ac_objext
12751 if { (eval echo "$as_me:12751: \"$ac_compile\"") >&5
12752   (eval $ac_compile) 2>&5
12753   ac_status=$?
12754   echo "$as_me:12754: \$? = $ac_status" >&5
12755   (exit $ac_status); } &&
12756          { ac_try='test -s conftest.$ac_objext'
12757   { (eval echo "$as_me:12757: \"$ac_try\"") >&5
12758   (eval $ac_try) 2>&5
12759   ac_status=$?
12760   echo "$as_me:12760: \$? = $ac_status" >&5
12761   (exit $ac_status); }; }; then
12762   cf_cv_type_sigaction=yes
12763 else
12764   echo "$as_me: failed program was:" >&5
12765 cat conftest.$ac_ext >&5
12766 cf_cv_type_sigaction=no
12767 fi
12768 rm -f conftest.$ac_objext conftest.$ac_ext
12769 fi
12770
12771 echo "$as_me:12771: result: $cf_cv_type_sigaction" >&5
12772 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12773 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12774 #define HAVE_TYPE_SIGACTION 1
12775 EOF
12776
12777 echo "$as_me:12777: checking declaration of size-change" >&5
12778 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12779 if test "${cf_cv_sizechange+set}" = set; then
12780   echo $ECHO_N "(cached) $ECHO_C" >&6
12781 else
12782
12783     cf_cv_sizechange=unknown
12784     cf_save_CPPFLAGS="$CPPFLAGS"
12785
12786 for cf_opts in "" "NEED_PTEM_H"
12787 do
12788
12789     CPPFLAGS="$cf_save_CPPFLAGS"
12790     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12791     cat >conftest.$ac_ext <<_ACEOF
12792 #line 12792 "configure"
12793 #include "confdefs.h"
12794 #include <sys/types.h>
12795 #ifdef HAVE_TERMIOS_H
12796 #include <termios.h>
12797 #else
12798 #ifdef HAVE_TERMIO_H
12799 #include <termio.h>
12800 #endif
12801 #endif
12802 #ifdef NEED_PTEM_H
12803 /* This is a workaround for SCO:  they neglected to define struct winsize in
12804  * termios.h -- it's only in termio.h and ptem.h
12805  */
12806 #include        <sys/stream.h>
12807 #include        <sys/ptem.h>
12808 #endif
12809 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12810 #include <sys/ioctl.h>
12811 #endif
12812
12813 int
12814 main ()
12815 {
12816
12817 #ifdef TIOCGSIZE
12818         struct ttysize win;     /* FIXME: what system is this? */
12819         int y = win.ts_lines;
12820         int x = win.ts_cols;
12821 #else
12822 #ifdef TIOCGWINSZ
12823         struct winsize win;
12824         int y = win.ws_row;
12825         int x = win.ws_col;
12826 #else
12827         no TIOCGSIZE or TIOCGWINSZ
12828 #endif /* TIOCGWINSZ */
12829 #endif /* TIOCGSIZE */
12830
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 rm -f conftest.$ac_objext
12836 if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5
12837   (eval $ac_compile) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit $ac_status); } &&
12841          { ac_try='test -s conftest.$ac_objext'
12842   { (eval echo "$as_me:12842: \"$ac_try\"") >&5
12843   (eval $ac_try) 2>&5
12844   ac_status=$?
12845   echo "$as_me:12845: \$? = $ac_status" >&5
12846   (exit $ac_status); }; }; then
12847   cf_cv_sizechange=yes
12848 else
12849   echo "$as_me: failed program was:" >&5
12850 cat conftest.$ac_ext >&5
12851 cf_cv_sizechange=no
12852 fi
12853 rm -f conftest.$ac_objext conftest.$ac_ext
12854
12855         CPPFLAGS="$cf_save_CPPFLAGS"
12856         if test "$cf_cv_sizechange" = yes ; then
12857                 echo "size-change succeeded ($cf_opts)" >&5
12858                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12859                 break
12860         fi
12861 done
12862
12863 fi
12864 echo "$as_me:12864: result: $cf_cv_sizechange" >&5
12865 echo "${ECHO_T}$cf_cv_sizechange" >&6
12866 if test "$cf_cv_sizechange" != no ; then
12867         cat >>confdefs.h <<\EOF
12868 #define HAVE_SIZECHANGE 1
12869 EOF
12870
12871         case $cf_cv_sizechange in #(vi
12872         NEED*)
12873                 cat >>confdefs.h <<EOF
12874 #define $cf_cv_sizechange  1
12875 EOF
12876
12877                 ;;
12878         esac
12879 fi
12880
12881 echo "$as_me:12881: checking for memmove" >&5
12882 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12883 if test "${ac_cv_func_memmove+set}" = set; then
12884   echo $ECHO_N "(cached) $ECHO_C" >&6
12885 else
12886   cat >conftest.$ac_ext <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889 /* System header to define __stub macros and hopefully few prototypes,
12890     which can conflict with char memmove (); below.  */
12891 #include <assert.h>
12892 /* Override any gcc2 internal prototype to avoid an error.  */
12893 #ifdef __cplusplus
12894 extern "C"
12895 #endif
12896 /* We use char because int might match the return type of a gcc2
12897    builtin and then its argument prototype would still apply.  */
12898 char memmove ();
12899 char (*f) ();
12900
12901 int
12902 main ()
12903 {
12904 /* The GNU C library defines this for functions which it implements
12905     to always fail with ENOSYS.  Some functions are actually named
12906     something starting with __ and the normal name is an alias.  */
12907 #if defined (__stub_memmove) || defined (__stub___memmove)
12908 choke me
12909 #else
12910 f = memmove;
12911 #endif
12912
12913   ;
12914   return 0;
12915 }
12916 _ACEOF
12917 rm -f conftest.$ac_objext conftest$ac_exeext
12918 if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
12919   (eval $ac_link) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } &&
12923          { ac_try='test -s conftest$ac_exeext'
12924   { (eval echo "$as_me:12924: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit $ac_status); }; }; then
12929   ac_cv_func_memmove=yes
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 ac_cv_func_memmove=no
12934 fi
12935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12936 fi
12937 echo "$as_me:12937: result: $ac_cv_func_memmove" >&5
12938 echo "${ECHO_T}$ac_cv_func_memmove" >&6
12939 if test $ac_cv_func_memmove = yes; then
12940   :
12941 else
12942
12943 echo "$as_me:12943: checking for bcopy" >&5
12944 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12945 if test "${ac_cv_func_bcopy+set}" = set; then
12946   echo $ECHO_N "(cached) $ECHO_C" >&6
12947 else
12948   cat >conftest.$ac_ext <<_ACEOF
12949 #line 12949 "configure"
12950 #include "confdefs.h"
12951 /* System header to define __stub macros and hopefully few prototypes,
12952     which can conflict with char bcopy (); below.  */
12953 #include <assert.h>
12954 /* Override any gcc2 internal prototype to avoid an error.  */
12955 #ifdef __cplusplus
12956 extern "C"
12957 #endif
12958 /* We use char because int might match the return type of a gcc2
12959    builtin and then its argument prototype would still apply.  */
12960 char bcopy ();
12961 char (*f) ();
12962
12963 int
12964 main ()
12965 {
12966 /* The GNU C library defines this for functions which it implements
12967     to always fail with ENOSYS.  Some functions are actually named
12968     something starting with __ and the normal name is an alias.  */
12969 #if defined (__stub_bcopy) || defined (__stub___bcopy)
12970 choke me
12971 #else
12972 f = bcopy;
12973 #endif
12974
12975   ;
12976   return 0;
12977 }
12978 _ACEOF
12979 rm -f conftest.$ac_objext conftest$ac_exeext
12980 if { (eval echo "$as_me:12980: \"$ac_link\"") >&5
12981   (eval $ac_link) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); } &&
12985          { ac_try='test -s conftest$ac_exeext'
12986   { (eval echo "$as_me:12986: \"$ac_try\"") >&5
12987   (eval $ac_try) 2>&5
12988   ac_status=$?
12989   echo "$as_me:12989: \$? = $ac_status" >&5
12990   (exit $ac_status); }; }; then
12991   ac_cv_func_bcopy=yes
12992 else
12993   echo "$as_me: failed program was:" >&5
12994 cat conftest.$ac_ext >&5
12995 ac_cv_func_bcopy=no
12996 fi
12997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12998 fi
12999 echo "$as_me:12999: result: $ac_cv_func_bcopy" >&5
13000 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13001 if test $ac_cv_func_bcopy = yes; then
13002
13003         echo "$as_me:13003: checking if bcopy does overlapping moves" >&5
13004 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13005 if test "${cf_cv_good_bcopy+set}" = set; then
13006   echo $ECHO_N "(cached) $ECHO_C" >&6
13007 else
13008
13009                 if test "$cross_compiling" = yes; then
13010   cf_cv_good_bcopy=unknown
13011 else
13012   cat >conftest.$ac_ext <<_ACEOF
13013 #line 13013 "configure"
13014 #include "confdefs.h"
13015
13016 int main() {
13017         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13018         char temp[40];
13019         bcopy(data, temp, sizeof(data));
13020         bcopy(temp+10, temp, 15);
13021         bcopy(temp+5, temp+15, 10);
13022         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13023 }
13024
13025 _ACEOF
13026 rm -f conftest$ac_exeext
13027 if { (eval echo "$as_me:13027: \"$ac_link\"") >&5
13028   (eval $ac_link) 2>&5
13029   ac_status=$?
13030   echo "$as_me:13030: \$? = $ac_status" >&5
13031   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   cf_cv_good_bcopy=yes
13038 else
13039   echo "$as_me: program exited with status $ac_status" >&5
13040 echo "$as_me: failed program was:" >&5
13041 cat conftest.$ac_ext >&5
13042 cf_cv_good_bcopy=no
13043 fi
13044 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13045 fi
13046
13047 fi
13048 echo "$as_me:13048: result: $cf_cv_good_bcopy" >&5
13049 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13050
13051 else
13052   cf_cv_good_bcopy=no
13053 fi
13054
13055         if test "$cf_cv_good_bcopy" = yes ; then
13056                 cat >>confdefs.h <<\EOF
13057 #define USE_OK_BCOPY 1
13058 EOF
13059
13060         else
13061                 cat >>confdefs.h <<\EOF
13062 #define USE_MY_MEMMOVE 1
13063 EOF
13064
13065         fi
13066
13067 fi
13068
13069 echo "$as_me:13069: checking if poll really works" >&5
13070 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13071 if test "${cf_cv_working_poll+set}" = set; then
13072   echo $ECHO_N "(cached) $ECHO_C" >&6
13073 else
13074
13075 if test "$cross_compiling" = yes; then
13076   cf_cv_working_poll=unknown
13077 else
13078   cat >conftest.$ac_ext <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13081
13082 #include <stdio.h>
13083 #ifdef HAVE_POLL_H
13084 #include <poll.h>
13085 #else
13086 #include <sys/poll.h>
13087 #endif
13088 int main() {
13089         struct pollfd myfds;
13090         int ret;
13091
13092         myfds.fd = 0;
13093         myfds.events = POLLIN;
13094
13095         ret = poll(&myfds, 1, 100);
13096         ${cf_cv_main_return:-return}(ret != 0);
13097 }
13098 _ACEOF
13099 rm -f conftest$ac_exeext
13100 if { (eval echo "$as_me:13100: \"$ac_link\"") >&5
13101   (eval $ac_link) 2>&5
13102   ac_status=$?
13103   echo "$as_me:13103: \$? = $ac_status" >&5
13104   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13105   { (eval echo "$as_me:13105: \"$ac_try\"") >&5
13106   (eval $ac_try) 2>&5
13107   ac_status=$?
13108   echo "$as_me:13108: \$? = $ac_status" >&5
13109   (exit $ac_status); }; }; then
13110   cf_cv_working_poll=yes
13111 else
13112   echo "$as_me: program exited with status $ac_status" >&5
13113 echo "$as_me: failed program was:" >&5
13114 cat conftest.$ac_ext >&5
13115 cf_cv_working_poll=no
13116 fi
13117 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13118 fi
13119 fi
13120 echo "$as_me:13120: result: $cf_cv_working_poll" >&5
13121 echo "${ECHO_T}$cf_cv_working_poll" >&6
13122 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13123 #define HAVE_WORKING_POLL 1
13124 EOF
13125
13126 if test "$with_hashed_db" != no ; then
13127         cat >>confdefs.h <<\EOF
13128 #define USE_HASHED_DB 1
13129 EOF
13130
13131 echo "$as_me:13131: checking for db.h" >&5
13132 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13133 if test "${ac_cv_header_db_h+set}" = set; then
13134   echo $ECHO_N "(cached) $ECHO_C" >&6
13135 else
13136   cat >conftest.$ac_ext <<_ACEOF
13137 #line 13137 "configure"
13138 #include "confdefs.h"
13139 #include <db.h>
13140 _ACEOF
13141 if { (eval echo "$as_me:13141: \"$ac_cpp conftest.$ac_ext\"") >&5
13142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13143   ac_status=$?
13144   egrep -v '^ *\+' conftest.er1 >conftest.err
13145   rm -f conftest.er1
13146   cat conftest.err >&5
13147   echo "$as_me:13147: \$? = $ac_status" >&5
13148   (exit $ac_status); } >/dev/null; then
13149   if test -s conftest.err; then
13150     ac_cpp_err=$ac_c_preproc_warn_flag
13151   else
13152     ac_cpp_err=
13153   fi
13154 else
13155   ac_cpp_err=yes
13156 fi
13157 if test -z "$ac_cpp_err"; then
13158   ac_cv_header_db_h=yes
13159 else
13160   echo "$as_me: failed program was:" >&5
13161   cat conftest.$ac_ext >&5
13162   ac_cv_header_db_h=no
13163 fi
13164 rm -f conftest.err conftest.$ac_ext
13165 fi
13166 echo "$as_me:13166: result: $ac_cv_header_db_h" >&5
13167 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13168 if test $ac_cv_header_db_h = yes; then
13169
13170 echo "$as_me:13170: checking for version of db" >&5
13171 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13172 if test "${cf_cv_hashed_db_version+set}" = set; then
13173   echo $ECHO_N "(cached) $ECHO_C" >&6
13174 else
13175
13176 cf_cv_hashed_db_version=unknown
13177
13178 for cf_db_version in 1 2 3 4
13179 do
13180
13181 echo "(line 13181) testing checking for db version $cf_db_version ..." 1>&5
13182
13183         cat >conftest.$ac_ext <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13186
13187 $ac_includes_default
13188 #include <db.h>
13189
13190 #ifdef DB_VERSION_MAJOR
13191         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13192 #if $cf_db_version == DB_VERSION_MAJOR
13193         /* ok */
13194 #else
13195         make an error
13196 #endif
13197 #else
13198 #if $cf_db_version == 1
13199         /* ok: assuming this is DB 1.8.5 */
13200 #else
13201         make an error
13202 #endif
13203 #endif
13204
13205 int
13206 main ()
13207 {
13208 DBT *foo = 0
13209   ;
13210   return 0;
13211 }
13212 _ACEOF
13213 rm -f conftest.$ac_objext
13214 if { (eval echo "$as_me:13214: \"$ac_compile\"") >&5
13215   (eval $ac_compile) 2>&5
13216   ac_status=$?
13217   echo "$as_me:13217: \$? = $ac_status" >&5
13218   (exit $ac_status); } &&
13219          { ac_try='test -s conftest.$ac_objext'
13220   { (eval echo "$as_me:13220: \"$ac_try\"") >&5
13221   (eval $ac_try) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); }; }; then
13225
13226         cf_cv_hashed_db_version=$cf_db_version
13227         break
13228
13229 else
13230   echo "$as_me: failed program was:" >&5
13231 cat conftest.$ac_ext >&5
13232 fi
13233 rm -f conftest.$ac_objext conftest.$ac_ext
13234 done
13235
13236 fi
13237 echo "$as_me:13237: result: $cf_cv_hashed_db_version" >&5
13238 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13239
13240 if test "$cf_cv_hashed_db_version" = unknown ; then
13241         { { echo "$as_me:13241: error: Cannot determine version of db" >&5
13242 echo "$as_me: error: Cannot determine version of db" >&2;}
13243    { (exit 1); exit 1; }; }
13244 else
13245
13246 echo "$as_me:13246: checking for db libraries" >&5
13247 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13248 if test "${cf_cv_hashed_db_libs+set}" = set; then
13249   echo $ECHO_N "(cached) $ECHO_C" >&6
13250 else
13251
13252 cf_cv_hashed_db_libs=unknown
13253 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13254 do
13255         cf_save_libs="$LIBS"
13256         if test -n "$cf_db_libs"; then
13257                 LIBS="-l$cf_db_libs $LIBS"
13258         fi
13259
13260 echo "(line 13260) testing checking for library "$cf_db_libs" ..." 1>&5
13261
13262         cat >conftest.$ac_ext <<_ACEOF
13263 #line 13263 "configure"
13264 #include "confdefs.h"
13265
13266 $ac_includes_default
13267 #include <db.h>
13268
13269 int
13270 main ()
13271 {
13272
13273         char *path = "/tmp/foo";
13274 #ifdef DB_VERSION_MAJOR
13275 #if DB_VERSION_MAJOR >= 4
13276         DB *result = 0;
13277         db_create(&result, NULL, 0);
13278         result->open(result,
13279                 NULL,
13280                 path,
13281                 path,
13282                 DB_HASH,
13283                 DB_CREATE,
13284                 0644);
13285 #elif DB_VERSION_MAJOR >= 3
13286         DB *result = 0;
13287         db_create(&result, NULL, 0);
13288         result->open(result,
13289                 path,
13290                 path,
13291                 DB_HASH,
13292                 DB_CREATE,
13293                 0644);
13294 #elif DB_VERSION_MAJOR >= 2
13295         DB *result = 0;
13296         db_open(path,
13297                 DB_HASH,
13298                 DB_CREATE,
13299                 0644,
13300                 (DB_ENV *) 0,
13301                 (DB_INFO *) 0,
13302                 &result);
13303 #endif /* DB_VERSION_MAJOR */
13304 #else
13305         DB *result = dbopen(path,
13306                      2,
13307                      0644,
13308                      DB_HASH,
13309                      0);
13310 #endif
13311         ${cf_cv_main_return:-return}(result != 0)
13312
13313   ;
13314   return 0;
13315 }
13316 _ACEOF
13317 rm -f conftest.$ac_objext conftest$ac_exeext
13318 if { (eval echo "$as_me:13318: \"$ac_link\"") >&5
13319   (eval $ac_link) 2>&5
13320   ac_status=$?
13321   echo "$as_me:13321: \$? = $ac_status" >&5
13322   (exit $ac_status); } &&
13323          { ac_try='test -s conftest$ac_exeext'
13324   { (eval echo "$as_me:13324: \"$ac_try\"") >&5
13325   (eval $ac_try) 2>&5
13326   ac_status=$?
13327   echo "$as_me:13327: \$? = $ac_status" >&5
13328   (exit $ac_status); }; }; then
13329
13330         if test -n "$cf_db_libs" ; then
13331                 cf_cv_hashed_db_libs=$cf_db_libs
13332         else
13333                 cf_cv_hashed_db_libs=default
13334         fi
13335         LIBS="$cf_save_libs"
13336         break
13337
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat conftest.$ac_ext >&5
13341 fi
13342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13343         LIBS="$cf_save_libs"
13344 done
13345
13346 fi
13347 echo "$as_me:13347: result: $cf_cv_hashed_db_libs" >&5
13348 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13349
13350         if test "$cf_cv_hashed_db_libs" = unknown ; then
13351                 { { echo "$as_me:13351: error: Cannot determine library for db" >&5
13352 echo "$as_me: error: Cannot determine library for db" >&2;}
13353    { (exit 1); exit 1; }; }
13354         elif test "$cf_cv_hashed_db_libs" != default ; then
13355                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13356         fi
13357 fi
13358
13359 else
13360
13361         { { echo "$as_me:13361: error: Cannot find db.h" >&5
13362 echo "$as_me: error: Cannot find db.h" >&2;}
13363    { (exit 1); exit 1; }; }
13364
13365 fi
13366
13367 fi
13368
13369 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13370         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13371         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13372 fi
13373
13374 # Just in case, check if the C compiler has a bool type.
13375
13376 echo "$as_me:13376: checking if we should include stdbool.h" >&5
13377 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13378
13379 if test "${cf_cv_header_stdbool_h+set}" = set; then
13380   echo $ECHO_N "(cached) $ECHO_C" >&6
13381 else
13382
13383         cat >conftest.$ac_ext <<_ACEOF
13384 #line 13384 "configure"
13385 #include "confdefs.h"
13386
13387 int
13388 main ()
13389 {
13390 bool foo = false
13391   ;
13392   return 0;
13393 }
13394 _ACEOF
13395 rm -f conftest.$ac_objext
13396 if { (eval echo "$as_me:13396: \"$ac_compile\"") >&5
13397   (eval $ac_compile) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit $ac_status); } &&
13401          { ac_try='test -s conftest.$ac_objext'
13402   { (eval echo "$as_me:13402: \"$ac_try\"") >&5
13403   (eval $ac_try) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); }; }; then
13407   cf_cv_header_stdbool_h=0
13408 else
13409   echo "$as_me: failed program was:" >&5
13410 cat conftest.$ac_ext >&5
13411 cat >conftest.$ac_ext <<_ACEOF
13412 #line 13412 "configure"
13413 #include "confdefs.h"
13414
13415 #ifndef __BEOS__
13416 #include <stdbool.h>
13417 #endif
13418
13419 int
13420 main ()
13421 {
13422 bool foo = false
13423   ;
13424   return 0;
13425 }
13426 _ACEOF
13427 rm -f conftest.$ac_objext
13428 if { (eval echo "$as_me:13428: \"$ac_compile\"") >&5
13429   (eval $ac_compile) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit $ac_status); } &&
13433          { ac_try='test -s conftest.$ac_objext'
13434   { (eval echo "$as_me:13434: \"$ac_try\"") >&5
13435   (eval $ac_try) 2>&5
13436   ac_status=$?
13437   echo "$as_me:13437: \$? = $ac_status" >&5
13438   (exit $ac_status); }; }; then
13439   cf_cv_header_stdbool_h=1
13440 else
13441   echo "$as_me: failed program was:" >&5
13442 cat conftest.$ac_ext >&5
13443 cf_cv_header_stdbool_h=0
13444 fi
13445 rm -f conftest.$ac_objext conftest.$ac_ext
13446 fi
13447 rm -f conftest.$ac_objext conftest.$ac_ext
13448 fi
13449
13450 if test "$cf_cv_header_stdbool_h" = 1
13451 then    echo "$as_me:13451: result: yes" >&5
13452 echo "${ECHO_T}yes" >&6
13453 else    echo "$as_me:13453: result: no" >&5
13454 echo "${ECHO_T}no" >&6
13455 fi
13456
13457 echo "$as_me:13457: checking for builtin bool type" >&5
13458 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13459
13460 if test "${cf_cv_cc_bool_type+set}" = set; then
13461   echo $ECHO_N "(cached) $ECHO_C" >&6
13462 else
13463
13464         cat >conftest.$ac_ext <<_ACEOF
13465 #line 13465 "configure"
13466 #include "confdefs.h"
13467
13468 #include <stdio.h>
13469 #include <sys/types.h>
13470
13471 int
13472 main ()
13473 {
13474 bool x = false
13475   ;
13476   return 0;
13477 }
13478 _ACEOF
13479 rm -f conftest.$ac_objext
13480 if { (eval echo "$as_me:13480: \"$ac_compile\"") >&5
13481   (eval $ac_compile) 2>&5
13482   ac_status=$?
13483   echo "$as_me:13483: \$? = $ac_status" >&5
13484   (exit $ac_status); } &&
13485          { ac_try='test -s conftest.$ac_objext'
13486   { (eval echo "$as_me:13486: \"$ac_try\"") >&5
13487   (eval $ac_try) 2>&5
13488   ac_status=$?
13489   echo "$as_me:13489: \$? = $ac_status" >&5
13490   (exit $ac_status); }; }; then
13491   cf_cv_cc_bool_type=1
13492 else
13493   echo "$as_me: failed program was:" >&5
13494 cat conftest.$ac_ext >&5
13495 cf_cv_cc_bool_type=0
13496 fi
13497 rm -f conftest.$ac_objext conftest.$ac_ext
13498
13499 fi
13500
13501 if test "$cf_cv_cc_bool_type" = 1
13502 then    echo "$as_me:13502: result: yes" >&5
13503 echo "${ECHO_T}yes" >&6
13504 else    echo "$as_me:13504: result: no" >&5
13505 echo "${ECHO_T}no" >&6
13506 fi
13507
13508 # Check for C++ compiler characteristics (and ensure that it's there!)
13509 if test -n "$CXX" ; then
13510         ac_ext=cc
13511 ac_cpp='$CXXCPP $CPPFLAGS'
13512 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13513 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13514 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13515 ac_main_return=return
13516
13517 if test -n "$GXX" ; then
13518 case $cf_cv_system_name in #(vi
13519 os2*) #(vi
13520         cf_stdcpp_libname=stdcpp
13521         ;;
13522 *)
13523         cf_stdcpp_libname=stdc++
13524         ;;
13525 esac
13526 echo "$as_me:13526: checking for library $cf_stdcpp_libname" >&5
13527 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13528 if test "${cf_cv_libstdcpp+set}" = set; then
13529   echo $ECHO_N "(cached) $ECHO_C" >&6
13530 else
13531
13532         cf_save="$LIBS"
13533         LIBS="$LIBS -l$cf_stdcpp_libname"
13534 cat >conftest.$ac_ext <<_ACEOF
13535 #line 13535 "configure"
13536 #include "confdefs.h"
13537
13538 #include <strstream.h>
13539 int
13540 main ()
13541 {
13542
13543 char buf[80];
13544 strstreambuf foo(buf, sizeof(buf))
13545
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 rm -f conftest.$ac_objext conftest$ac_exeext
13551 if { (eval echo "$as_me:13551: \"$ac_link\"") >&5
13552   (eval $ac_link) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); } &&
13556          { ac_try='test -s conftest$ac_exeext'
13557   { (eval echo "$as_me:13557: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   cf_cv_libstdcpp=yes
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 cat conftest.$ac_ext >&5
13566 cf_cv_libstdcpp=no
13567 fi
13568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13569         LIBS="$cf_save"
13570
13571 fi
13572 echo "$as_me:13572: result: $cf_cv_libstdcpp" >&5
13573 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13574 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13575 fi
13576
13577         echo "$as_me:13577: checking whether $CXX understands -c and -o together" >&5
13578 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13579 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13580   echo $ECHO_N "(cached) $ECHO_C" >&6
13581 else
13582
13583 cat > conftest.$ac_ext <<CF_EOF
13584 #include <stdio.h>
13585 int main()
13586 {
13587         ${cf_cv_main_return:-return}(0);
13588 }
13589 CF_EOF
13590 # We do the test twice because some compilers refuse to overwrite an
13591 # existing .o file with -o, though they will create one.
13592 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13593 if { (eval echo "$as_me:13593: \"$ac_try\"") >&5
13594   (eval $ac_try) 2>&5
13595   ac_status=$?
13596   echo "$as_me:13596: \$? = $ac_status" >&5
13597   (exit $ac_status); } &&
13598   test -f conftest2.$ac_objext && { (eval echo "$as_me:13598: \"$ac_try\"") >&5
13599   (eval $ac_try) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit $ac_status); };
13603 then
13604   eval cf_cv_prog_CXX_c_o=yes
13605 else
13606   eval cf_cv_prog_CXX_c_o=no
13607 fi
13608 rm -f conftest*
13609
13610 fi
13611 if test $cf_cv_prog_CXX_c_o = yes; then
13612   echo "$as_me:13612: result: yes" >&5
13613 echo "${ECHO_T}yes" >&6
13614 else
13615   echo "$as_me:13615: result: no" >&5
13616 echo "${ECHO_T}no" >&6
13617 fi
13618
13619         case $GXX_VERSION in
13620         1*|2.0-6*)
13621                 cf_cxx_library=yes
13622                 ;;
13623         *-2.7*|2.7*)
13624
13625 cf_cxx_library=unknown
13626 case $cf_cv_system_name in #(vi
13627 os2*) #(vi
13628         cf_gpp_libname=gpp
13629         ;;
13630 *)
13631         cf_gpp_libname=g++
13632         ;;
13633 esac
13634 if test "$GXX" = yes; then
13635         echo "$as_me:13635: checking for lib$cf_gpp_libname" >&5
13636 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13637         cf_save="$LIBS"
13638         LIBS="$LIBS -l$cf_gpp_libname"
13639         cat >conftest.$ac_ext <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13642
13643 #include <$cf_gpp_libname/builtin.h>
13644
13645 int
13646 main ()
13647 {
13648 two_arg_error_handler_t foo2 = lib_error_handler
13649   ;
13650   return 0;
13651 }
13652 _ACEOF
13653 rm -f conftest.$ac_objext conftest$ac_exeext
13654 if { (eval echo "$as_me:13654: \"$ac_link\"") >&5
13655   (eval $ac_link) 2>&5
13656   ac_status=$?
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit $ac_status); } &&
13659          { ac_try='test -s conftest$ac_exeext'
13660   { (eval echo "$as_me:13660: \"$ac_try\"") >&5
13661   (eval $ac_try) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit $ac_status); }; }; then
13665   cf_cxx_library=yes
13666          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13667          if test "$cf_gpp_libname" = cpp ; then
13668             cat >>confdefs.h <<\EOF
13669 #define HAVE_GPP_BUILTIN_H 1
13670 EOF
13671
13672          else
13673             cat >>confdefs.h <<\EOF
13674 #define HAVE_GXX_BUILTIN_H 1
13675 EOF
13676
13677          fi
13678 else
13679   echo "$as_me: failed program was:" >&5
13680 cat conftest.$ac_ext >&5
13681 cat >conftest.$ac_ext <<_ACEOF
13682 #line 13682 "configure"
13683 #include "confdefs.h"
13684
13685 #include <builtin.h>
13686
13687 int
13688 main ()
13689 {
13690 two_arg_error_handler_t foo2 = lib_error_handler
13691   ;
13692   return 0;
13693 }
13694 _ACEOF
13695 rm -f conftest.$ac_objext conftest$ac_exeext
13696 if { (eval echo "$as_me:13696: \"$ac_link\"") >&5
13697   (eval $ac_link) 2>&5
13698   ac_status=$?
13699   echo "$as_me:13699: \$? = $ac_status" >&5
13700   (exit $ac_status); } &&
13701          { ac_try='test -s conftest$ac_exeext'
13702   { (eval echo "$as_me:13702: \"$ac_try\"") >&5
13703   (eval $ac_try) 2>&5
13704   ac_status=$?
13705   echo "$as_me:13705: \$? = $ac_status" >&5
13706   (exit $ac_status); }; }; then
13707   cf_cxx_library=yes
13708          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13709          cat >>confdefs.h <<\EOF
13710 #define HAVE_BUILTIN_H 1
13711 EOF
13712
13713 else
13714   echo "$as_me: failed program was:" >&5
13715 cat conftest.$ac_ext >&5
13716 cf_cxx_library=no
13717 fi
13718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13719 fi
13720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13721         LIBS="$cf_save"
13722         echo "$as_me:13722: result: $cf_cxx_library" >&5
13723 echo "${ECHO_T}$cf_cxx_library" >&6
13724 fi
13725
13726                 ;;
13727         *)
13728                 cf_cxx_library=no
13729                 ;;
13730         esac
13731
13732         ac_ext=cc
13733 ac_cpp='$CXXCPP $CPPFLAGS'
13734 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13735 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13736 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13737 ac_main_return=return
13738 echo "$as_me:13738: checking how to run the C++ preprocessor" >&5
13739 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13740 if test -z "$CXXCPP"; then
13741   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13742   echo $ECHO_N "(cached) $ECHO_C" >&6
13743 else
13744       # Double quotes because CXXCPP needs to be expanded
13745     for CXXCPP in "$CXX -E" "/lib/cpp"
13746     do
13747       ac_preproc_ok=false
13748 for ac_cxx_preproc_warn_flag in '' yes
13749 do
13750   # Use a header file that comes with gcc, so configuring glibc
13751   # with a fresh cross-compiler works.
13752   # On the NeXT, cc -E runs the code through the compiler's parser,
13753   # not just through cpp. "Syntax error" is here to catch this case.
13754   cat >conftest.$ac_ext <<_ACEOF
13755 #line 13755 "configure"
13756 #include "confdefs.h"
13757 #include <assert.h>
13758                      Syntax error
13759 _ACEOF
13760 if { (eval echo "$as_me:13760: \"$ac_cpp conftest.$ac_ext\"") >&5
13761   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13762   ac_status=$?
13763   egrep -v '^ *\+' conftest.er1 >conftest.err
13764   rm -f conftest.er1
13765   cat conftest.err >&5
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); } >/dev/null; then
13768   if test -s conftest.err; then
13769     ac_cpp_err=$ac_cxx_preproc_warn_flag
13770   else
13771     ac_cpp_err=
13772   fi
13773 else
13774   ac_cpp_err=yes
13775 fi
13776 if test -z "$ac_cpp_err"; then
13777   :
13778 else
13779   echo "$as_me: failed program was:" >&5
13780   cat conftest.$ac_ext >&5
13781   # Broken: fails on valid input.
13782 continue
13783 fi
13784 rm -f conftest.err conftest.$ac_ext
13785
13786   # OK, works on sane cases.  Now check whether non-existent headers
13787   # can be detected and how.
13788   cat >conftest.$ac_ext <<_ACEOF
13789 #line 13789 "configure"
13790 #include "confdefs.h"
13791 #include <ac_nonexistent.h>
13792 _ACEOF
13793 if { (eval echo "$as_me:13793: \"$ac_cpp conftest.$ac_ext\"") >&5
13794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13795   ac_status=$?
13796   egrep -v '^ *\+' conftest.er1 >conftest.err
13797   rm -f conftest.er1
13798   cat conftest.err >&5
13799   echo "$as_me:13799: \$? = $ac_status" >&5
13800   (exit $ac_status); } >/dev/null; then
13801   if test -s conftest.err; then
13802     ac_cpp_err=$ac_cxx_preproc_warn_flag
13803   else
13804     ac_cpp_err=
13805   fi
13806 else
13807   ac_cpp_err=yes
13808 fi
13809 if test -z "$ac_cpp_err"; then
13810   # Broken: success on invalid input.
13811 continue
13812 else
13813   echo "$as_me: failed program was:" >&5
13814   cat conftest.$ac_ext >&5
13815   # Passes both tests.
13816 ac_preproc_ok=:
13817 break
13818 fi
13819 rm -f conftest.err conftest.$ac_ext
13820
13821 done
13822 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13823 rm -f conftest.err conftest.$ac_ext
13824 if $ac_preproc_ok; then
13825   break
13826 fi
13827
13828     done
13829     ac_cv_prog_CXXCPP=$CXXCPP
13830
13831 fi
13832   CXXCPP=$ac_cv_prog_CXXCPP
13833 else
13834   ac_cv_prog_CXXCPP=$CXXCPP
13835 fi
13836 echo "$as_me:13836: result: $CXXCPP" >&5
13837 echo "${ECHO_T}$CXXCPP" >&6
13838 ac_preproc_ok=false
13839 for ac_cxx_preproc_warn_flag in '' yes
13840 do
13841   # Use a header file that comes with gcc, so configuring glibc
13842   # with a fresh cross-compiler works.
13843   # On the NeXT, cc -E runs the code through the compiler's parser,
13844   # not just through cpp. "Syntax error" is here to catch this case.
13845   cat >conftest.$ac_ext <<_ACEOF
13846 #line 13846 "configure"
13847 #include "confdefs.h"
13848 #include <assert.h>
13849                      Syntax error
13850 _ACEOF
13851 if { (eval echo "$as_me:13851: \"$ac_cpp conftest.$ac_ext\"") >&5
13852   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13853   ac_status=$?
13854   egrep -v '^ *\+' conftest.er1 >conftest.err
13855   rm -f conftest.er1
13856   cat conftest.err >&5
13857   echo "$as_me:13857: \$? = $ac_status" >&5
13858   (exit $ac_status); } >/dev/null; then
13859   if test -s conftest.err; then
13860     ac_cpp_err=$ac_cxx_preproc_warn_flag
13861   else
13862     ac_cpp_err=
13863   fi
13864 else
13865   ac_cpp_err=yes
13866 fi
13867 if test -z "$ac_cpp_err"; then
13868   :
13869 else
13870   echo "$as_me: failed program was:" >&5
13871   cat conftest.$ac_ext >&5
13872   # Broken: fails on valid input.
13873 continue
13874 fi
13875 rm -f conftest.err conftest.$ac_ext
13876
13877   # OK, works on sane cases.  Now check whether non-existent headers
13878   # can be detected and how.
13879   cat >conftest.$ac_ext <<_ACEOF
13880 #line 13880 "configure"
13881 #include "confdefs.h"
13882 #include <ac_nonexistent.h>
13883 _ACEOF
13884 if { (eval echo "$as_me:13884: \"$ac_cpp conftest.$ac_ext\"") >&5
13885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13886   ac_status=$?
13887   egrep -v '^ *\+' conftest.er1 >conftest.err
13888   rm -f conftest.er1
13889   cat conftest.err >&5
13890   echo "$as_me:13890: \$? = $ac_status" >&5
13891   (exit $ac_status); } >/dev/null; then
13892   if test -s conftest.err; then
13893     ac_cpp_err=$ac_cxx_preproc_warn_flag
13894   else
13895     ac_cpp_err=
13896   fi
13897 else
13898   ac_cpp_err=yes
13899 fi
13900 if test -z "$ac_cpp_err"; then
13901   # Broken: success on invalid input.
13902 continue
13903 else
13904   echo "$as_me: failed program was:" >&5
13905   cat conftest.$ac_ext >&5
13906   # Passes both tests.
13907 ac_preproc_ok=:
13908 break
13909 fi
13910 rm -f conftest.err conftest.$ac_ext
13911
13912 done
13913 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13914 rm -f conftest.err conftest.$ac_ext
13915 if $ac_preproc_ok; then
13916   :
13917 else
13918   { { echo "$as_me:13918: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13919 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13920    { (exit 1); exit 1; }; }
13921 fi
13922
13923 ac_ext=cc
13924 ac_cpp='$CXXCPP $CPPFLAGS'
13925 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13926 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13927 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13928 ac_main_return=return
13929
13930 for ac_header in typeinfo
13931 do
13932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13933 echo "$as_me:13933: checking for $ac_header" >&5
13934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13936   echo $ECHO_N "(cached) $ECHO_C" >&6
13937 else
13938   cat >conftest.$ac_ext <<_ACEOF
13939 #line 13939 "configure"
13940 #include "confdefs.h"
13941 #include <$ac_header>
13942 _ACEOF
13943 if { (eval echo "$as_me:13943: \"$ac_cpp conftest.$ac_ext\"") >&5
13944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13945   ac_status=$?
13946   egrep -v '^ *\+' conftest.er1 >conftest.err
13947   rm -f conftest.er1
13948   cat conftest.err >&5
13949   echo "$as_me:13949: \$? = $ac_status" >&5
13950   (exit $ac_status); } >/dev/null; then
13951   if test -s conftest.err; then
13952     ac_cpp_err=$ac_cxx_preproc_warn_flag
13953   else
13954     ac_cpp_err=
13955   fi
13956 else
13957   ac_cpp_err=yes
13958 fi
13959 if test -z "$ac_cpp_err"; then
13960   eval "$as_ac_Header=yes"
13961 else
13962   echo "$as_me: failed program was:" >&5
13963   cat conftest.$ac_ext >&5
13964   eval "$as_ac_Header=no"
13965 fi
13966 rm -f conftest.err conftest.$ac_ext
13967 fi
13968 echo "$as_me:13968: result: `eval echo '${'$as_ac_Header'}'`" >&5
13969 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13970 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13971   cat >>confdefs.h <<EOF
13972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13973 EOF
13974
13975 fi
13976 done
13977
13978 echo "$as_me:13978: checking if we should include stdbool.h" >&5
13979 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13980
13981 if test "${cf_cv_header_stdbool_h+set}" = set; then
13982   echo $ECHO_N "(cached) $ECHO_C" >&6
13983 else
13984
13985         cat >conftest.$ac_ext <<_ACEOF
13986 #line 13986 "configure"
13987 #include "confdefs.h"
13988
13989 int
13990 main ()
13991 {
13992 bool foo = false
13993   ;
13994   return 0;
13995 }
13996 _ACEOF
13997 rm -f conftest.$ac_objext
13998 if { (eval echo "$as_me:13998: \"$ac_compile\"") >&5
13999   (eval $ac_compile) 2>&5
14000   ac_status=$?
14001   echo "$as_me:14001: \$? = $ac_status" >&5
14002   (exit $ac_status); } &&
14003          { ac_try='test -s conftest.$ac_objext'
14004   { (eval echo "$as_me:14004: \"$ac_try\"") >&5
14005   (eval $ac_try) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); }; }; then
14009   cf_cv_header_stdbool_h=0
14010 else
14011   echo "$as_me: failed program was:" >&5
14012 cat conftest.$ac_ext >&5
14013 cat >conftest.$ac_ext <<_ACEOF
14014 #line 14014 "configure"
14015 #include "confdefs.h"
14016
14017 #ifndef __BEOS__
14018 #include <stdbool.h>
14019 #endif
14020
14021 int
14022 main ()
14023 {
14024 bool foo = false
14025   ;
14026   return 0;
14027 }
14028 _ACEOF
14029 rm -f conftest.$ac_objext
14030 if { (eval echo "$as_me:14030: \"$ac_compile\"") >&5
14031   (eval $ac_compile) 2>&5
14032   ac_status=$?
14033   echo "$as_me:14033: \$? = $ac_status" >&5
14034   (exit $ac_status); } &&
14035          { ac_try='test -s conftest.$ac_objext'
14036   { (eval echo "$as_me:14036: \"$ac_try\"") >&5
14037   (eval $ac_try) 2>&5
14038   ac_status=$?
14039   echo "$as_me:14039: \$? = $ac_status" >&5
14040   (exit $ac_status); }; }; then
14041   cf_cv_header_stdbool_h=1
14042 else
14043   echo "$as_me: failed program was:" >&5
14044 cat conftest.$ac_ext >&5
14045 cf_cv_header_stdbool_h=0
14046 fi
14047 rm -f conftest.$ac_objext conftest.$ac_ext
14048 fi
14049 rm -f conftest.$ac_objext conftest.$ac_ext
14050 fi
14051
14052 if test "$cf_cv_header_stdbool_h" = 1
14053 then    echo "$as_me:14053: result: yes" >&5
14054 echo "${ECHO_T}yes" >&6
14055 else    echo "$as_me:14055: result: no" >&5
14056 echo "${ECHO_T}no" >&6
14057 fi
14058
14059 echo "$as_me:14059: checking for builtin bool type" >&5
14060 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14061
14062 if test "${cf_cv_builtin_bool+set}" = set; then
14063   echo $ECHO_N "(cached) $ECHO_C" >&6
14064 else
14065
14066         cat >conftest.$ac_ext <<_ACEOF
14067 #line 14067 "configure"
14068 #include "confdefs.h"
14069
14070 #include <stdio.h>
14071 #include <sys/types.h>
14072
14073 int
14074 main ()
14075 {
14076 bool x = false
14077   ;
14078   return 0;
14079 }
14080 _ACEOF
14081 rm -f conftest.$ac_objext
14082 if { (eval echo "$as_me:14082: \"$ac_compile\"") >&5
14083   (eval $ac_compile) 2>&5
14084   ac_status=$?
14085   echo "$as_me:14085: \$? = $ac_status" >&5
14086   (exit $ac_status); } &&
14087          { ac_try='test -s conftest.$ac_objext'
14088   { (eval echo "$as_me:14088: \"$ac_try\"") >&5
14089   (eval $ac_try) 2>&5
14090   ac_status=$?
14091   echo "$as_me:14091: \$? = $ac_status" >&5
14092   (exit $ac_status); }; }; then
14093   cf_cv_builtin_bool=1
14094 else
14095   echo "$as_me: failed program was:" >&5
14096 cat conftest.$ac_ext >&5
14097 cf_cv_builtin_bool=0
14098 fi
14099 rm -f conftest.$ac_objext conftest.$ac_ext
14100
14101 fi
14102
14103 if test "$cf_cv_builtin_bool" = 1
14104 then    echo "$as_me:14104: result: yes" >&5
14105 echo "${ECHO_T}yes" >&6
14106 else    echo "$as_me:14106: result: no" >&5
14107 echo "${ECHO_T}no" >&6
14108 fi
14109
14110 echo "$as_me:14110: checking for size of bool" >&5
14111 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14112 if test "${cf_cv_type_of_bool+set}" = set; then
14113   echo $ECHO_N "(cached) $ECHO_C" >&6
14114 else
14115
14116         rm -f cf_test.out
14117         if test "$cross_compiling" = yes; then
14118   cf_cv_type_of_bool=unknown
14119 else
14120   cat >conftest.$ac_ext <<_ACEOF
14121 #line 14121 "configure"
14122 #include "confdefs.h"
14123
14124 #include <stdlib.h>
14125 #include <stdio.h>
14126
14127 #if defined(__cplusplus)
14128
14129 #ifdef HAVE_GXX_BUILTIN_H
14130 #include <g++/builtin.h>
14131 #elif HAVE_GPP_BUILTIN_H
14132 #include <gpp/builtin.h>
14133 #elif HAVE_BUILTIN_H
14134 #include <builtin.h>
14135 #endif
14136
14137 #else
14138
14139 #if $cf_cv_header_stdbool_h
14140 #include <stdbool.h>
14141 #endif
14142
14143 #endif
14144
14145 main()
14146 {
14147         FILE *fp = fopen("cf_test.out", "w");
14148         if (fp != 0) {
14149                 bool x = true;
14150                 if ((bool)(-x) >= 0)
14151                         fputs("unsigned ", fp);
14152                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14153                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14154                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14155                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14156                 fclose(fp);
14157         }
14158         ${cf_cv_main_return:-return}(0);
14159 }
14160
14161 _ACEOF
14162 rm -f conftest$ac_exeext
14163 if { (eval echo "$as_me:14163: \"$ac_link\"") >&5
14164   (eval $ac_link) 2>&5
14165   ac_status=$?
14166   echo "$as_me:14166: \$? = $ac_status" >&5
14167   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14168   { (eval echo "$as_me:14168: \"$ac_try\"") >&5
14169   (eval $ac_try) 2>&5
14170   ac_status=$?
14171   echo "$as_me:14171: \$? = $ac_status" >&5
14172   (exit $ac_status); }; }; then
14173   cf_cv_type_of_bool=`cat cf_test.out`
14174                  if test -z "$cf_cv_type_of_bool"; then
14175                    cf_cv_type_of_bool=unknown
14176                  fi
14177 else
14178   echo "$as_me: program exited with status $ac_status" >&5
14179 echo "$as_me: failed program was:" >&5
14180 cat conftest.$ac_ext >&5
14181 cf_cv_type_of_bool=unknown
14182 fi
14183 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14184 fi
14185
14186 fi
14187
14188         rm -f cf_test.out
14189 echo "$as_me:14189: result: $cf_cv_type_of_bool" >&5
14190 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14191 if test "$cf_cv_type_of_bool" = unknown ; then
14192         case .$NCURSES_BOOL in #(vi
14193         .auto|.) NCURSES_BOOL=unsigned;;
14194         esac
14195         { echo "$as_me:14195: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14196 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14197         cf_cv_type_of_bool=$NCURSES_BOOL
14198 fi
14199
14200 echo "$as_me:14200: checking for special defines needed for etip.h" >&5
14201 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14202 cf_save_CXXFLAGS="$CXXFLAGS"
14203 cf_result="none"
14204 for cf_math in "" MATH_H
14205 do
14206 for cf_excp in "" MATH_EXCEPTION
14207 do
14208         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14209         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14210         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14211 cat >conftest.$ac_ext <<_ACEOF
14212 #line 14212 "configure"
14213 #include "confdefs.h"
14214
14215 #include <etip.h.in>
14216
14217 int
14218 main ()
14219 {
14220
14221   ;
14222   return 0;
14223 }
14224 _ACEOF
14225 rm -f conftest.$ac_objext
14226 if { (eval echo "$as_me:14226: \"$ac_compile\"") >&5
14227   (eval $ac_compile) 2>&5
14228   ac_status=$?
14229   echo "$as_me:14229: \$? = $ac_status" >&5
14230   (exit $ac_status); } &&
14231          { ac_try='test -s conftest.$ac_objext'
14232   { (eval echo "$as_me:14232: \"$ac_try\"") >&5
14233   (eval $ac_try) 2>&5
14234   ac_status=$?
14235   echo "$as_me:14235: \$? = $ac_status" >&5
14236   (exit $ac_status); }; }; then
14237
14238         test -n "$cf_math" && cat >>confdefs.h <<EOF
14239 #define ETIP_NEEDS_${cf_math} 1
14240 EOF
14241
14242         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14243 #define ETIP_NEEDS_${cf_excp} 1
14244 EOF
14245
14246         cf_result="$cf_math $cf_excp"
14247         break
14248
14249 else
14250   echo "$as_me: failed program was:" >&5
14251 cat conftest.$ac_ext >&5
14252 fi
14253 rm -f conftest.$ac_objext conftest.$ac_ext
14254 done
14255 done
14256 echo "$as_me:14256: result: $cf_result" >&5
14257 echo "${ECHO_T}$cf_result" >&6
14258 CXXFLAGS="$cf_save_CXXFLAGS"
14259
14260 if test -n "$CXX"; then
14261 echo "$as_me:14261: checking if $CXX accepts parameter initialization" >&5
14262 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14263 if test "${cf_cv_cpp_param_init+set}" = set; then
14264   echo $ECHO_N "(cached) $ECHO_C" >&6
14265 else
14266
14267         ac_ext=cc
14268 ac_cpp='$CXXCPP $CPPFLAGS'
14269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14272 ac_main_return=return
14273
14274         if test "$cross_compiling" = yes; then
14275   cf_cv_cpp_param_init=unknown
14276 else
14277   cat >conftest.$ac_ext <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14280
14281 class TEST {
14282 private:
14283         int value;
14284 public:
14285         TEST(int x = 1);
14286         ~TEST();
14287 };
14288
14289 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14290 {
14291         value = x;
14292 }
14293 void main() { }
14294
14295 _ACEOF
14296 rm -f conftest$ac_exeext
14297 if { (eval echo "$as_me:14297: \"$ac_link\"") >&5
14298   (eval $ac_link) 2>&5
14299   ac_status=$?
14300   echo "$as_me:14300: \$? = $ac_status" >&5
14301   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14302   { (eval echo "$as_me:14302: \"$ac_try\"") >&5
14303   (eval $ac_try) 2>&5
14304   ac_status=$?
14305   echo "$as_me:14305: \$? = $ac_status" >&5
14306   (exit $ac_status); }; }; then
14307   cf_cv_cpp_param_init=yes
14308 else
14309   echo "$as_me: program exited with status $ac_status" >&5
14310 echo "$as_me: failed program was:" >&5
14311 cat conftest.$ac_ext >&5
14312 cf_cv_cpp_param_init=no
14313 fi
14314 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14315 fi
14316         ac_ext=cc
14317 ac_cpp='$CXXCPP $CPPFLAGS'
14318 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14319 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14320 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14321 ac_main_return=return
14322
14323 fi
14324 echo "$as_me:14324: result: $cf_cv_cpp_param_init" >&5
14325 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14326 fi
14327 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14328 #define CPP_HAS_PARAM_INIT 1
14329 EOF
14330
14331 if test -n "$CXX"; then
14332
14333 echo "$as_me:14333: checking if $CXX accepts static_cast" >&5
14334 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14335 if test "${cf_cv_cpp_static_cast+set}" = set; then
14336   echo $ECHO_N "(cached) $ECHO_C" >&6
14337 else
14338
14339         ac_ext=cc
14340 ac_cpp='$CXXCPP $CPPFLAGS'
14341 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14342 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14343 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14344 ac_main_return=return
14345
14346         cat >conftest.$ac_ext <<_ACEOF
14347 #line 14347 "configure"
14348 #include "confdefs.h"
14349
14350 class NCursesPanel
14351 {
14352 public:
14353   NCursesPanel(int nlines,
14354                int ncols,
14355                int begin_y = 0,
14356                int begin_x = 0)
14357   {
14358   }
14359
14360   ~NCursesPanel();
14361 };
14362
14363 template<class T> class NCursesUserPanel : public NCursesPanel
14364 {
14365 public:
14366   NCursesUserPanel (int nlines,
14367                     int ncols,
14368                     int begin_y = 0,
14369                     int begin_x = 0,
14370                     const T* p_UserData = static_cast<T*>(0))
14371     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14372   {
14373   };
14374   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14375   {
14376   };
14377
14378   virtual ~NCursesUserPanel() {};
14379 };
14380
14381 int
14382 main ()
14383 {
14384
14385         const char* p_UserData = static_cast<char*>(0)
14386   ;
14387   return 0;
14388 }
14389 _ACEOF
14390 rm -f conftest.$ac_objext
14391 if { (eval echo "$as_me:14391: \"$ac_compile\"") >&5
14392   (eval $ac_compile) 2>&5
14393   ac_status=$?
14394   echo "$as_me:14394: \$? = $ac_status" >&5
14395   (exit $ac_status); } &&
14396          { ac_try='test -s conftest.$ac_objext'
14397   { (eval echo "$as_me:14397: \"$ac_try\"") >&5
14398   (eval $ac_try) 2>&5
14399   ac_status=$?
14400   echo "$as_me:14400: \$? = $ac_status" >&5
14401   (exit $ac_status); }; }; then
14402   cf_cv_cpp_static_cast=yes
14403 else
14404   echo "$as_me: failed program was:" >&5
14405 cat conftest.$ac_ext >&5
14406 cf_cv_cpp_static_cast=no
14407 fi
14408 rm -f conftest.$ac_objext conftest.$ac_ext
14409
14410         ac_ext=cc
14411 ac_cpp='$CXXCPP $CPPFLAGS'
14412 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14413 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14414 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14415 ac_main_return=return
14416
14417 fi
14418 echo "$as_me:14418: result: $cf_cv_cpp_static_cast" >&5
14419 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14420
14421 fi
14422
14423 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14424 #define CPP_HAS_STATIC_CAST 1
14425 EOF
14426
14427         CXX_AR='$(AR)'
14428         CXX_AR_OPTS='$(AR_OPTS)'
14429         case $cf_cv_system_name in #(vi
14430         irix*) #(vi
14431             if test "$GXX" != yes ; then
14432                 CXX_AR='$(CXX)'
14433                 CXX_AR_OPTS='-ar -o'
14434             fi
14435             ;;
14436         sco3.2v5*) #(vi
14437             CXXLDFLAGS="-u main"
14438             ;;
14439         solaris2*)
14440             if test "$GXX" != yes ; then
14441                 CXX_AR='$(CXX)'
14442                 CXX_AR_OPTS='-xar -o'
14443             fi
14444             ;;
14445         esac
14446
14447 else
14448         cf_cxx_library=no
14449         cf_cv_builtin_bool=1
14450
14451         # Just because we are not configuring against C++ right now does not
14452         # mean that a user will not want to use C++.  Some distributors disable
14453         # the C++ portion of this configuration as a shortcut (or just to avoid
14454         # compiling the demo in the c++ directory).  So we need a reasonable
14455         # default for the 'bool' type.
14456         #
14457         # Caveat: since the storage of the bool type is not standardized, it
14458         # may change.
14459
14460         if test "$NCURSES_BOOL" != auto ; then
14461                 cf_cv_type_of_bool=$NCURSES_BOOL
14462                 cf_cv_header_stdbool_h=0
14463         else
14464                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14465
14466 echo "$as_me:14466: checking for size of bool" >&5
14467 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14468 if test "${cf_cv_type_of_bool+set}" = set; then
14469   echo $ECHO_N "(cached) $ECHO_C" >&6
14470 else
14471
14472         rm -f cf_test.out
14473         if test "$cross_compiling" = yes; then
14474   cf_cv_type_of_bool=unknown
14475 else
14476   cat >conftest.$ac_ext <<_ACEOF
14477 #line 14477 "configure"
14478 #include "confdefs.h"
14479
14480 #include <stdlib.h>
14481 #include <stdio.h>
14482
14483 #if defined(__cplusplus)
14484
14485 #ifdef HAVE_GXX_BUILTIN_H
14486 #include <g++/builtin.h>
14487 #elif HAVE_GPP_BUILTIN_H
14488 #include <gpp/builtin.h>
14489 #elif HAVE_BUILTIN_H
14490 #include <builtin.h>
14491 #endif
14492
14493 #else
14494
14495 #if $cf_cv_header_stdbool_h
14496 #include <stdbool.h>
14497 #endif
14498
14499 #endif
14500
14501 main()
14502 {
14503         FILE *fp = fopen("cf_test.out", "w");
14504         if (fp != 0) {
14505                 bool x = true;
14506                 if ((bool)(-x) >= 0)
14507                         fputs("unsigned ", fp);
14508                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14509                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14510                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14511                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14512                 fclose(fp);
14513         }
14514         ${cf_cv_main_return:-return}(0);
14515 }
14516
14517 _ACEOF
14518 rm -f conftest$ac_exeext
14519 if { (eval echo "$as_me:14519: \"$ac_link\"") >&5
14520   (eval $ac_link) 2>&5
14521   ac_status=$?
14522   echo "$as_me:14522: \$? = $ac_status" >&5
14523   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14524   { (eval echo "$as_me:14524: \"$ac_try\"") >&5
14525   (eval $ac_try) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit $ac_status); }; }; then
14529   cf_cv_type_of_bool=`cat cf_test.out`
14530                  if test -z "$cf_cv_type_of_bool"; then
14531                    cf_cv_type_of_bool=unknown
14532                  fi
14533 else
14534   echo "$as_me: program exited with status $ac_status" >&5
14535 echo "$as_me: failed program was:" >&5
14536 cat conftest.$ac_ext >&5
14537 cf_cv_type_of_bool=unknown
14538 fi
14539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14540 fi
14541
14542 fi
14543
14544         rm -f cf_test.out
14545 echo "$as_me:14545: result: $cf_cv_type_of_bool" >&5
14546 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14547 if test "$cf_cv_type_of_bool" = unknown ; then
14548         case .$NCURSES_BOOL in #(vi
14549         .auto|.) NCURSES_BOOL=unsigned;;
14550         esac
14551         { echo "$as_me:14551: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14552 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14553         cf_cv_type_of_bool=$NCURSES_BOOL
14554 fi
14555
14556                 else
14557                         echo "$as_me:14557: checking for fallback type of bool" >&5
14558 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14559                         case "$host_cpu" in #(vi
14560                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14561                         *)      cf_cv_type_of_bool=int  ;;
14562                         esac
14563                         echo "$as_me:14563: result: $cf_cv_type_of_bool" >&5
14564 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14565                 fi
14566         fi
14567 fi
14568
14569 # If the C compiler did not declare bool, and we did not determine that the C++
14570 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14571 # ncurses library use the same type as C++ bool.  Note that this allows one to
14572 # specify the type of bool in a configure-script option and postpone
14573 # integration with the C++ compiler provided that the types are compatible.
14574 USE_CXX_BOOL=1
14575 if test $cf_cv_cc_bool_type = 1
14576 then
14577         # oops: C has a bool.  Unlikely, but C++ could differ.
14578         USE_CXX_BOOL=0
14579 elif test $cf_cv_builtin_bool = 0
14580 then
14581         # C++ has no bool
14582         USE_CXX_BOOL=0
14583 else
14584         # this is the normal case
14585         USE_CXX_BOOL='defined(__cplusplus)'
14586 fi
14587
14588 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14589 if test "$cf_with_ada" != "no" ; then
14590 cf_ada_make=gnatmake
14591 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14592 set dummy $cf_ada_make; ac_word=$2
14593 echo "$as_me:14593: checking for $ac_word" >&5
14594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14595 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14596   echo $ECHO_N "(cached) $ECHO_C" >&6
14597 else
14598   if test -n "$gnat_exists"; then
14599   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14600 else
14601   ac_save_IFS=$IFS; IFS=$ac_path_separator
14602 ac_dummy="$PATH"
14603 for ac_dir in $ac_dummy; do
14604   IFS=$ac_save_IFS
14605   test -z "$ac_dir" && ac_dir=.
14606   $as_executable_p "$ac_dir/$ac_word" || continue
14607 ac_cv_prog_gnat_exists="yes"
14608 echo "$as_me:14608: found $ac_dir/$ac_word" >&5
14609 break
14610 done
14611
14612   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14613 fi
14614 fi
14615 gnat_exists=$ac_cv_prog_gnat_exists
14616 if test -n "$gnat_exists"; then
14617   echo "$as_me:14617: result: $gnat_exists" >&5
14618 echo "${ECHO_T}$gnat_exists" >&6
14619 else
14620   echo "$as_me:14620: result: no" >&5
14621 echo "${ECHO_T}no" >&6
14622 fi
14623
14624 if test "$ac_cv_prog_gnat_exists" = no; then
14625    cf_ada_make=
14626 else
14627
14628 echo "$as_me:14628: checking for gnat version" >&5
14629 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14630 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14631   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14632 echo "$as_me:14632: result: $cf_gnat_version" >&5
14633 echo "${ECHO_T}$cf_gnat_version" >&6
14634
14635 case $cf_gnat_version in
14636   3.1[1-9]*|3.[2-9]*|[4-9].*)
14637     cf_cv_prog_gnat_correct=yes
14638     ;;
14639   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14640      cf_cv_prog_gnat_correct=no
14641      ;;
14642 esac
14643 case $cf_gnat_version in
14644   3.[1-9]*|[4-9].*)
14645       cf_compile_generics=generics
14646       cf_generic_objects="\${GENOBJS}"
14647       ;;
14648   *)  cf_compile_generics=
14649       cf_generic_objects=
14650       ;;
14651 esac
14652
14653    # Extract the first word of "m4", so it can be a program name with args.
14654 set dummy m4; ac_word=$2
14655 echo "$as_me:14655: checking for $ac_word" >&5
14656 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14657 if test "${ac_cv_prog_M4_exists+set}" = set; then
14658   echo $ECHO_N "(cached) $ECHO_C" >&6
14659 else
14660   if test -n "$M4_exists"; then
14661   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14662 else
14663   ac_save_IFS=$IFS; IFS=$ac_path_separator
14664 ac_dummy="$PATH"
14665 for ac_dir in $ac_dummy; do
14666   IFS=$ac_save_IFS
14667   test -z "$ac_dir" && ac_dir=.
14668   $as_executable_p "$ac_dir/$ac_word" || continue
14669 ac_cv_prog_M4_exists="yes"
14670 echo "$as_me:14670: found $ac_dir/$ac_word" >&5
14671 break
14672 done
14673
14674   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14675 fi
14676 fi
14677 M4_exists=$ac_cv_prog_M4_exists
14678 if test -n "$M4_exists"; then
14679   echo "$as_me:14679: result: $M4_exists" >&5
14680 echo "${ECHO_T}$M4_exists" >&6
14681 else
14682   echo "$as_me:14682: result: no" >&5
14683 echo "${ECHO_T}no" >&6
14684 fi
14685
14686    if test "$ac_cv_prog_M4_exists" = no; then
14687       cf_cv_prog_gnat_correct=no
14688       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14689    fi
14690    if test "$cf_cv_prog_gnat_correct" = yes; then
14691       echo "$as_me:14691: checking if GNAT works" >&5
14692 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14693
14694 rm -f conftest*
14695 cat >>conftest.ads <<CF_EOF
14696 procedure conftest;
14697 CF_EOF
14698 cat >>conftest.adb <<CF_EOF
14699 with Text_IO;
14700 with GNAT.OS_Lib;
14701 procedure conftest is
14702 begin
14703    Text_IO.Put ("Hello World");
14704    Text_IO.New_Line;
14705    GNAT.OS_Lib.OS_Exit (0);
14706 end conftest;
14707 CF_EOF
14708 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14709    if ( ./conftest 1>&5 2>&1 ) ; then
14710       cf_cv_prog_gnat_correct=yes
14711    else
14712       cf_cv_prog_gnat_correct=no
14713    fi
14714 else
14715    cf_cv_prog_gnat_correct=no
14716 fi
14717 rm -f conftest*
14718
14719       echo "$as_me:14719: result: $cf_cv_prog_gnat_correct" >&5
14720 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14721    fi
14722 fi
14723 if test "$cf_cv_prog_gnat_correct" = yes; then
14724    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14725
14726    echo "$as_me:14726: checking if GNAT pragma Unreferenced works" >&5
14727 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14728
14729 rm -f conftest*
14730 cat >>conftest.ads <<CF_EOF
14731 procedure conftest;
14732 CF_EOF
14733 cat >>conftest.adb <<CF_EOF
14734 with Text_IO;
14735 with GNAT.OS_Lib;
14736 procedure conftest is
14737    test : Integer;
14738    pragma Unreferenced (test);
14739 begin
14740    test := 1;
14741    Text_IO.Put ("Hello World");
14742    Text_IO.New_Line;
14743    GNAT.OS_Lib.OS_Exit (0);
14744 end conftest;
14745 CF_EOF
14746 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14747       cf_cv_pragma_unreferenced=yes
14748 else
14749    cf_cv_pragma_unreferenced=no
14750 fi
14751 rm -f conftest*
14752
14753    echo "$as_me:14753: result: $cf_cv_pragma_unreferenced" >&5
14754 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14755
14756    # if the pragma is supported, use it (needed in the Trace code).
14757    if test $cf_cv_pragma_unreferenced = yes ; then
14758       PRAGMA_UNREF=TRUE
14759    else
14760       PRAGMA_UNREF=FALSE
14761    fi
14762
14763 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14764 if test "${with_ada_compiler+set}" = set; then
14765   withval="$with_ada_compiler"
14766   cf_ada_compiler=$withval
14767 else
14768   cf_ada_compiler=gnatmake
14769 fi;
14770
14771    cf_ada_package=terminal_interface
14772
14773 # Check whether --with-ada-include or --without-ada-include was given.
14774 if test "${with_ada_include+set}" = set; then
14775   withval="$with_ada_include"
14776
14777 else
14778   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14779 fi;
14780 if test "x$prefix" != xNONE; then
14781   cf_path_syntax="$prefix"
14782 else
14783   cf_path_syntax="$ac_default_prefix"
14784 fi
14785
14786 case ".$withval" in #(vi
14787 .\$\(*\)*|.\'*\'*) #(vi
14788   ;;
14789 ..|./*|.\\*) #(vi
14790   ;;
14791 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14792   ;;
14793 .\${*prefix}*) #(vi
14794   eval withval="$withval"
14795   case ".$withval" in #(vi
14796   .NONE/*)
14797     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14798     ;;
14799   esac
14800   ;; #(vi
14801 .no|.NONE/*)
14802   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14803   ;;
14804 *)
14805   { { echo "$as_me:14805: error: expected a pathname, not \"$withval\"" >&5
14806 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14807    { (exit 1); exit 1; }; }
14808   ;;
14809 esac
14810
14811 ADA_INCLUDE="$withval"
14812
14813 # Check whether --with-ada-objects or --without-ada-objects was given.
14814 if test "${with_ada_objects+set}" = set; then
14815   withval="$with_ada_objects"
14816
14817 else
14818   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14819 fi;
14820 if test "x$prefix" != xNONE; then
14821   cf_path_syntax="$prefix"
14822 else
14823   cf_path_syntax="$ac_default_prefix"
14824 fi
14825
14826 case ".$withval" in #(vi
14827 .\$\(*\)*|.\'*\'*) #(vi
14828   ;;
14829 ..|./*|.\\*) #(vi
14830   ;;
14831 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14832   ;;
14833 .\${*prefix}*) #(vi
14834   eval withval="$withval"
14835   case ".$withval" in #(vi
14836   .NONE/*)
14837     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14838     ;;
14839   esac
14840   ;; #(vi
14841 .no|.NONE/*)
14842   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14843   ;;
14844 *)
14845   { { echo "$as_me:14845: error: expected a pathname, not \"$withval\"" >&5
14846 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14847    { (exit 1); exit 1; }; }
14848   ;;
14849 esac
14850
14851 ADA_OBJECTS="$withval"
14852
14853 fi
14854 fi
14855 fi
14856
14857 ### Construct the ncurses library-subsets, if any, from this set of keywords:
14858 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
14859 ###
14860 ### ticlib modules may be a separate library, otherwise contained in termlib.
14861 ### termlib modules may be a separate library, otherwise contained in ncurses.
14862 ###
14863 ### The of "+" or " " between the tokens controls the way the script
14864 ### chooses to split module lists into libraries.
14865 ###
14866 ### (see CF_LIB_RULES).
14867 echo "$as_me:14867: checking for library subsets" >&5
14868 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14869 LIB_SUBSETS=
14870
14871 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
14872         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
14873         if test "$with_ticlib" != no ; then
14874                 LIB_SUBSETS="${LIB_SUBSETS} "
14875         else
14876                 LIB_SUBSETS="${LIB_SUBSETS}+"
14877         fi
14878 fi
14879
14880 LIB_SUBSETS="${LIB_SUBSETS}termlib"
14881 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14882 if test "$with_termlib" != no ; then
14883         LIB_SUBSETS="${LIB_SUBSETS} "
14884 else
14885         LIB_SUBSETS="${LIB_SUBSETS}+"
14886 fi
14887
14888 LIB_SUBSETS="${LIB_SUBSETS}base"
14889 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
14890 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
14891
14892 echo "$as_me:14892: result: $LIB_SUBSETS" >&5
14893 echo "${ECHO_T}$LIB_SUBSETS" >&6
14894
14895 ### Construct the list of include-directories to be generated
14896
14897 CPPFLAGS="-I. -I../include $CPPFLAGS"
14898 if test "$srcdir" != "."; then
14899         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14900 fi
14901 if test "$GCC" != yes; then
14902         CPPFLAGS="$CPPFLAGS -I\${includedir}"
14903 elif test "$includedir" != "/usr/include"; then
14904         if test "$includedir" = '${prefix}/include' ; then
14905                 if test $prefix != /usr ; then
14906                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
14907                 fi
14908         else
14909                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
14910         fi
14911 fi
14912
14913 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
14914 if test "$srcdir" != "."; then
14915         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14916 fi
14917 if test "$GCC" != yes; then
14918         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14919 elif test "$includedir" != "/usr/include"; then
14920         if test "$includedir" = '${prefix}/include' ; then
14921                 if test $prefix != /usr ; then
14922                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14923                 fi
14924         else
14925                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14926         fi
14927 fi
14928
14929 ### Build up pieces for makefile rules
14930 echo "$as_me:14930: checking default library suffix" >&5
14931 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14932
14933         case $DFT_LWR_MODEL in
14934         libtool) DFT_ARG_SUFFIX=''   ;;
14935         normal)  DFT_ARG_SUFFIX=''   ;;
14936         debug)   DFT_ARG_SUFFIX='_g' ;;
14937         profile) DFT_ARG_SUFFIX='_p' ;;
14938         shared)  DFT_ARG_SUFFIX=''   ;;
14939         esac
14940         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14941 echo "$as_me:14941: result: $DFT_ARG_SUFFIX" >&5
14942 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14943
14944 echo "$as_me:14944: checking default library-dependency suffix" >&5
14945 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14946
14947         case $DFT_LWR_MODEL in
14948         libtool) DFT_DEP_SUFFIX='.la'  ;;
14949         normal)  DFT_DEP_SUFFIX='.a'   ;;
14950         debug)   DFT_DEP_SUFFIX='_g.a' ;;
14951         profile) DFT_DEP_SUFFIX='_p.a' ;;
14952         shared)
14953                 case $cf_cv_system_name in
14954                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
14955                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
14956                 hpux*)
14957                         case $target in
14958                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
14959                         *)      DFT_DEP_SUFFIX='.sl' ;;
14960                         esac
14961                         ;;
14962                 *)      DFT_DEP_SUFFIX='.so'  ;;
14963                 esac
14964         esac
14965         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
14966 if test $DFT_LWR_MODEL = shared ; then
14967         case $cf_cv_system_name in #(vi
14968         cygwin*)
14969                 DFT_DEP_SUFFIX=".dll.a"
14970                 ;;
14971         esac
14972 fi
14973 echo "$as_me:14973: result: $DFT_DEP_SUFFIX" >&5
14974 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14975
14976 echo "$as_me:14976: checking default object directory" >&5
14977 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14978
14979         case $DFT_LWR_MODEL in
14980         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
14981         normal)  DFT_OBJ_SUBDIR='objects' ;;
14982         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
14983         profile) DFT_OBJ_SUBDIR='obj_p' ;;
14984         shared)
14985                 case $cf_cv_system_name in #(vi
14986                 cygwin) #(vi
14987                         DFT_OBJ_SUBDIR='objects' ;;
14988                 *)
14989                         DFT_OBJ_SUBDIR='obj_s' ;;
14990                 esac
14991         esac
14992 echo "$as_me:14992: result: $DFT_OBJ_SUBDIR" >&5
14993 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14994
14995 # libtool thinks it can make c++ shared libraries (perhaps only g++)
14996 if test "$cf_with_cxx" = yes ; then
14997 echo "$as_me:14997: checking c++ library-dependency suffix" >&5
14998 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
14999 if test "$with_libtool" != "no"; then
15000         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15001 else
15002
15003         case normal in
15004         libtool) CXX_LIB_SUFFIX='.la'  ;;
15005         normal)  CXX_LIB_SUFFIX='.a'   ;;
15006         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15007         profile) CXX_LIB_SUFFIX='_p.a' ;;
15008         shared)
15009                 case $cf_cv_system_name in
15010                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15011                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15012                 hpux*)
15013                         case $target in
15014                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15015                         *)      CXX_LIB_SUFFIX='.sl' ;;
15016                         esac
15017                         ;;
15018                 *)      CXX_LIB_SUFFIX='.so'  ;;
15019                 esac
15020         esac
15021         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15022 fi
15023 echo "$as_me:15023: result: $CXX_LIB_SUFFIX" >&5
15024 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15025
15026 fi
15027
15028 # do not want -ldl in build except as needed for -lncurses dependency
15029 if test "$with_dlsym" = yes ; then
15030 if test $DFT_LWR_MODEL = shared || \
15031    test $DFT_LWR_MODEL = libtool ; then
15032
15033 # remove dl library from $LIBS
15034 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15035
15036 fi
15037 fi
15038 ### Set up low-level terminfo dependencies for makefiles.
15039
15040 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15041 # do not need libdl
15042 TICS_LIST=
15043 if test "$with_dlsym" = yes ; then
15044
15045 # remove dl library from $SHLIB_LIST
15046 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15047
15048 fi
15049
15050 if test "$with_ticlib" != no ; then
15051
15052         if test "$with_ticlib" != yes ; then
15053                 TICS_NAME=$with_ticlib
15054                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15055                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15056                 TICS_LIB_SUFFIX="${with_ticlib}"
15057         else
15058                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15059                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15060                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15061         fi
15062         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15063 else
15064         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15065 fi
15066
15067 if test "$with_termlib" != no ; then
15068
15069         if test "$with_termlib" != yes ; then
15070                 TINFO_NAME=$with_termlib
15071                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15072                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15073                 TINFO_LIB_SUFFIX="${with_termlib}"
15074         else
15075                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15076                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15077                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15078         fi
15079
15080         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15081         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15082         if test "$DFT_LWR_MODEL" = "libtool"; then
15083                 TEST_ARGS="${TEST_DEPS}"
15084                 TEST_ARG2="${TEST_DEP2}"
15085                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15086         else
15087                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15088                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15089                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15090                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15091                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15092         fi
15093 else
15094         # the next lines are needed for linking libtic over libncurses
15095         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15096         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15097
15098         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15099 fi
15100
15101 if test "$with_dlsym" = yes ; then
15102
15103 # remove dl library from $TICS_LIST
15104 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15105
15106 fi
15107
15108 # needed for Ada95
15109 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15110
15111 echo "$as_me:15111: checking where we will install curses.h" >&5
15112 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15113 test "$with_overwrite" = no && \
15114 test "x$includedir" = 'x${prefix}/include' && \
15115         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15116 echo "$as_me:15116: result: $includedir" >&5
15117 echo "${ECHO_T}$includedir" >&6
15118
15119 ### Resolve a conflict between normal and wide-curses by forcing applications
15120 ### that will need libutf8 to add it to their configure script.
15121 if test "$with_overwrite" != no ; then
15122 if test "$NCURSES_LIBUTF8" = 1 ; then
15123         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15124         { echo "$as_me:15124: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15125 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15126 fi
15127 fi
15128
15129 # used to separate tack out of the tree
15130 NCURSES_TREE=
15131
15132 ### predefined stuff for the test programs
15133 cat >>confdefs.h <<\EOF
15134 #define HAVE_SLK_COLOR 1
15135 EOF
15136
15137 ### Construct the list of subdirectories for which we'll customize makefiles
15138 ### with the appropriate compile-rules.
15139
15140 echo "$as_me:15140: checking for src modules" >&5
15141 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15142
15143 # dependencies and linker-arguments for test-programs
15144 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15145 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15146 if test "$DFT_LWR_MODEL" = "libtool"; then
15147         TEST_ARGS="${TEST_DEPS}"
15148         TEST_ARG2="${TEST_DEP2}"
15149 else
15150         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15151         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15152 fi
15153
15154 cf_cv_src_modules=
15155 for cf_dir in $modules_to_build
15156 do
15157         if test -f $srcdir/$cf_dir/modules; then
15158
15159                 # We may/may not have tack in the distribution, though the
15160                 # makefile is.
15161                 if test $cf_dir = tack ; then
15162                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15163                                 continue
15164                         fi
15165                 fi
15166
15167                 if test -z "$cf_cv_src_modules"; then
15168                         cf_cv_src_modules=$cf_dir
15169                 else
15170                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15171                 fi
15172
15173                 # Make the ncurses_cfg.h file record the library interface files as
15174                 # well.  These are header files that are the same name as their
15175                 # directory.  Ncurses is the only library that does not follow
15176                 # that pattern.
15177                 if test $cf_dir = tack ; then
15178                         continue
15179                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15180
15181 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15182
15183                         cat >>confdefs.h <<EOF
15184 #define HAVE_${cf_have_include}_H 1
15185 EOF
15186
15187                         cat >>confdefs.h <<EOF
15188 #define HAVE_LIB${cf_have_include} 1
15189 EOF
15190
15191                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15192                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15193                         if test "$DFT_LWR_MODEL" = "libtool"; then
15194                                 TEST_ARGS="${TEST_DEPS}"
15195                                 TEST_ARG2="${TEST_DEP2}"
15196                         else
15197                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15198                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15199                         fi
15200                 fi
15201         fi
15202 done
15203 echo "$as_me:15203: result: $cf_cv_src_modules" >&5
15204 echo "${ECHO_T}$cf_cv_src_modules" >&6
15205
15206 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15207 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15208
15209 SRC_SUBDIRS="man include"
15210 for cf_dir in $cf_cv_src_modules
15211 do
15212         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15213 done
15214 SRC_SUBDIRS="$SRC_SUBDIRS test"
15215 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15216 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15217
15218 ADA_SUBDIRS=
15219 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15220    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15221    ADA_SUBDIRS="gen src samples"
15222 fi
15223
15224 SUB_MAKEFILES=
15225 for cf_dir in $SRC_SUBDIRS
15226 do
15227         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15228 done
15229
15230 if test -n "$ADA_SUBDIRS"; then
15231    for cf_dir in $ADA_SUBDIRS
15232    do
15233       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15234    done
15235
15236 fi
15237
15238 DIRS_TO_MAKE="lib"
15239 for cf_item in $cf_list_models
15240 do
15241
15242         case $cf_item in
15243         libtool) cf_subdir='obj_lo'  ;;
15244         normal)  cf_subdir='objects' ;;
15245         debug)   cf_subdir='obj_g' ;;
15246         profile) cf_subdir='obj_p' ;;
15247         shared)
15248                 case $cf_cv_system_name in #(vi
15249                 cygwin) #(vi
15250                         cf_subdir='objects' ;;
15251                 *)
15252                         cf_subdir='obj_s' ;;
15253                 esac
15254         esac
15255
15256         for cf_item2 in $DIRS_TO_MAKE
15257         do
15258                 test $cf_item2 = $cf_subdir && break
15259         done
15260         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15261 done
15262 for cf_dir in $DIRS_TO_MAKE
15263 do
15264         test ! -d $cf_dir && mkdir $cf_dir
15265 done
15266
15267 cat >>confdefs.h <<EOF
15268 #define NCURSES_PATHSEP '$PATHSEP'
15269 EOF
15270
15271 cat >>confdefs.h <<EOF
15272 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15273 EOF
15274
15275 ### Now that we're done running tests, add the compiler-warnings, if any
15276
15277 cf_fix_cppflags=no
15278 cf_new_cflags=
15279 cf_new_cppflags=
15280 cf_new_extra_cppflags=
15281
15282 for cf_add_cflags in $EXTRA_CFLAGS
15283 do
15284 case $cf_fix_cppflags in
15285 no)
15286         case $cf_add_cflags in #(vi
15287         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15288                 case $cf_add_cflags in
15289                 -D*)
15290                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15291
15292                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15293                         && test -z "${cf_tst_cflags}" \
15294                         && cf_fix_cppflags=yes
15295
15296                         if test $cf_fix_cppflags = yes ; then
15297                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15298                                 continue
15299                         elif test "${cf_tst_cflags}" = "\"'" ; then
15300                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15301                                 continue
15302                         fi
15303                         ;;
15304                 esac
15305                 case "$CPPFLAGS" in
15306                 *$cf_add_cflags) #(vi
15307                         ;;
15308                 *) #(vi
15309                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15310                         ;;
15311                 esac
15312                 ;;
15313         *)
15314                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15315                 ;;
15316         esac
15317         ;;
15318 yes)
15319         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15320
15321         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15322
15323         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15324         && test -z "${cf_tst_cflags}" \
15325         && cf_fix_cppflags=no
15326         ;;
15327 esac
15328 done
15329
15330 if test -n "$cf_new_cflags" ; then
15331
15332         CFLAGS="$CFLAGS $cf_new_cflags"
15333 fi
15334
15335 if test -n "$cf_new_cppflags" ; then
15336
15337         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15338 fi
15339
15340 if test -n "$cf_new_extra_cppflags" ; then
15341
15342         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15343 fi
15344
15345 ### Define substitutions for header files to avoid name-pollution
15346
15347 if test "$cf_cv_have_tcgetattr" = yes ; then
15348         HAVE_TCGETATTR=1
15349 else
15350         HAVE_TCGETATTR=0
15351 fi
15352
15353 if test "$ac_cv_header_termio_h" = yes ; then
15354         HAVE_TERMIO_H=1
15355 else
15356         HAVE_TERMIO_H=0
15357 fi
15358
15359 if test "$ac_cv_header_termios_h" = yes ; then
15360         HAVE_TERMIOS_H=1
15361 else
15362         HAVE_TERMIOS_H=0
15363 fi
15364
15365 ################################################################################
15366 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15367 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15368 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"
15369 ac_config_commands="$ac_config_commands default"
15370 cat >confcache <<\_ACEOF
15371 # This file is a shell script that caches the results of configure
15372 # tests run on this system so they can be shared between configure
15373 # scripts and configure runs, see configure's option --config-cache.
15374 # It is not useful on other systems.  If it contains results you don't
15375 # want to keep, you may remove or edit it.
15376 #
15377 # config.status only pays attention to the cache file if you give it
15378 # the --recheck option to rerun configure.
15379 #
15380 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15381 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15382 # following values.
15383
15384 _ACEOF
15385
15386 # The following way of writing the cache mishandles newlines in values,
15387 # but we know of no workaround that is simple, portable, and efficient.
15388 # So, don't put newlines in cache variables' values.
15389 # Ultrix sh set writes to stderr and can't be redirected directly,
15390 # and sets the high bit in the cache file unless we assign to the vars.
15391 {
15392   (set) 2>&1 |
15393     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15394     *ac_space=\ *)
15395       # `set' does not quote correctly, so add quotes (double-quote
15396       # substitution turns \\\\ into \\, and sed turns \\ into \).
15397       sed -n \
15398         "s/'/'\\\\''/g;
15399           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15400       ;;
15401     *)
15402       # `set' quotes correctly as required by POSIX, so do not add quotes.
15403       sed -n \
15404         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15405       ;;
15406     esac;
15407 } |
15408   sed '
15409      t clear
15410      : clear
15411      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15412      t end
15413      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15414      : end' >>confcache
15415 if cmp -s $cache_file confcache; then :; else
15416   if test -w $cache_file; then
15417     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15418     cat confcache >$cache_file
15419   else
15420     echo "not updating unwritable cache $cache_file"
15421   fi
15422 fi
15423 rm -f confcache
15424
15425 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15426 # Let make expand exec_prefix.
15427 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15428
15429 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15430 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15431 # trailing colons and then remove the whole line if VPATH becomes empty
15432 # (actually we leave an empty line to preserve line numbers).
15433 if test "x$srcdir" = x.; then
15434   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15435 s/:*\$(srcdir):*/:/;
15436 s/:*\${srcdir}:*/:/;
15437 s/:*@srcdir@:*/:/;
15438 s/^\([^=]*=[    ]*\):*/\1/;
15439 s/:*$//;
15440 s/^[^=]*=[      ]*$//;
15441 }'
15442 fi
15443
15444 DEFS=-DHAVE_CONFIG_H
15445
15446 : ${CONFIG_STATUS=./config.status}
15447 ac_clean_files_save=$ac_clean_files
15448 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15449 { echo "$as_me:15449: creating $CONFIG_STATUS" >&5
15450 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15451 cat >$CONFIG_STATUS <<_ACEOF
15452 #! $SHELL
15453 # Generated automatically by configure.
15454 # Run this file to recreate the current configuration.
15455 # Compiler output produced by configure, useful for debugging
15456 # configure, is in config.log if it exists.
15457
15458 debug=false
15459 SHELL=\${CONFIG_SHELL-$SHELL}
15460 ac_cs_invocation="\$0 \$@"
15461
15462 _ACEOF
15463
15464 cat >>$CONFIG_STATUS <<\_ACEOF
15465 # Be Bourne compatible
15466 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15467   emulate sh
15468   NULLCMD=:
15469 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15470   set -o posix
15471 fi
15472
15473 # Name of the executable.
15474 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15475
15476 if expr a : '\(a\)' >/dev/null 2>&1; then
15477   as_expr=expr
15478 else
15479   as_expr=false
15480 fi
15481
15482 rm -f conf$$ conf$$.exe conf$$.file
15483 echo >conf$$.file
15484 if ln -s conf$$.file conf$$ 2>/dev/null; then
15485   # We could just check for DJGPP; but this test a) works b) is more generic
15486   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15487   if test -f conf$$.exe; then
15488     # Don't use ln at all; we don't have any links
15489     as_ln_s='cp -p'
15490   else
15491     as_ln_s='ln -s'
15492   fi
15493 elif ln conf$$.file conf$$ 2>/dev/null; then
15494   as_ln_s=ln
15495 else
15496   as_ln_s='cp -p'
15497 fi
15498 rm -f conf$$ conf$$.exe conf$$.file
15499
15500 as_executable_p="test -f"
15501
15502 # Support unset when possible.
15503 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15504   as_unset=unset
15505 else
15506   as_unset=false
15507 fi
15508
15509 # NLS nuisances.
15510 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15511 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15512 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15513 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15514 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15515 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15516 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15517 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15518
15519 # IFS
15520 # We need space, tab and new line, in precisely that order.
15521 as_nl='
15522 '
15523 IFS="   $as_nl"
15524
15525 # CDPATH.
15526 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15527
15528 exec 6>&1
15529
15530 _ACEOF
15531
15532 # Files that config.status was made for.
15533 if test -n "$ac_config_files"; then
15534   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15535 fi
15536
15537 if test -n "$ac_config_headers"; then
15538   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15539 fi
15540
15541 if test -n "$ac_config_links"; then
15542   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15543 fi
15544
15545 if test -n "$ac_config_commands"; then
15546   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15547 fi
15548
15549 cat >>$CONFIG_STATUS <<\EOF
15550
15551 ac_cs_usage="\
15552 \`$as_me' instantiates files from templates according to the
15553 current configuration.
15554
15555 Usage: $0 [OPTIONS] [FILE]...
15556
15557   -h, --help       print this help, then exit
15558   -V, --version    print version number, then exit
15559   -d, --debug      don't remove temporary files
15560       --recheck    update $as_me by reconfiguring in the same conditions
15561   --file=FILE[:TEMPLATE]
15562                    instantiate the configuration file FILE
15563   --header=FILE[:TEMPLATE]
15564                    instantiate the configuration header FILE
15565
15566 Configuration files:
15567 $config_files
15568
15569 Configuration headers:
15570 $config_headers
15571
15572 Configuration commands:
15573 $config_commands
15574
15575 Report bugs to <bug-autoconf@gnu.org>."
15576 EOF
15577
15578 cat >>$CONFIG_STATUS <<EOF
15579 ac_cs_version="\\
15580 config.status
15581 configured by $0, generated by GNU Autoconf 2.52.20061216,
15582   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15583
15584 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15585 Free Software Foundation, Inc.
15586 This config.status script is free software; the Free Software Foundation
15587 gives unlimited permission to copy, distribute and modify it."
15588 srcdir=$srcdir
15589 INSTALL="$INSTALL"
15590 EOF
15591
15592 cat >>$CONFIG_STATUS <<\EOF
15593 # If no file are specified by the user, then we need to provide default
15594 # value.  By we need to know if files were specified by the user.
15595 ac_need_defaults=:
15596 while test $# != 0
15597 do
15598   case $1 in
15599   --*=*)
15600     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15601     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15602     shift
15603     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15604     shift
15605     ;;
15606   -*);;
15607   *) # This is not an option, so the user has probably given explicit
15608      # arguments.
15609      ac_need_defaults=false;;
15610   esac
15611
15612   case $1 in
15613   # Handling of the options.
15614 EOF
15615 cat >>$CONFIG_STATUS <<EOF
15616   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15617     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15618     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15619 EOF
15620 cat >>$CONFIG_STATUS <<\EOF
15621   --version | --vers* | -V )
15622     echo "$ac_cs_version"; exit 0 ;;
15623   --he | --h)
15624     # Conflict between --help and --header
15625     { { echo "$as_me:15625: error: ambiguous option: $1
15626 Try \`$0 --help' for more information." >&5
15627 echo "$as_me: error: ambiguous option: $1
15628 Try \`$0 --help' for more information." >&2;}
15629    { (exit 1); exit 1; }; };;
15630   --help | --hel | -h )
15631     echo "$ac_cs_usage"; exit 0 ;;
15632   --debug | --d* | -d )
15633     debug=: ;;
15634   --file | --fil | --fi | --f )
15635     shift
15636     CONFIG_FILES="$CONFIG_FILES $1"
15637     ac_need_defaults=false;;
15638   --header | --heade | --head | --hea )
15639     shift
15640     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15641     ac_need_defaults=false;;
15642
15643   # This is an error.
15644   -*) { { echo "$as_me:15644: error: unrecognized option: $1
15645 Try \`$0 --help' for more information." >&5
15646 echo "$as_me: error: unrecognized option: $1
15647 Try \`$0 --help' for more information." >&2;}
15648    { (exit 1); exit 1; }; } ;;
15649
15650   *) ac_config_targets="$ac_config_targets $1" ;;
15651
15652   esac
15653   shift
15654 done
15655
15656 exec 5>>config.log
15657 cat >&5 << _ACEOF
15658
15659 ## ----------------------- ##
15660 ## Running config.status.  ##
15661 ## ----------------------- ##
15662
15663 This file was extended by $as_me 2.52.20061216, executed with
15664   CONFIG_FILES    = $CONFIG_FILES
15665   CONFIG_HEADERS  = $CONFIG_HEADERS
15666   CONFIG_LINKS    = $CONFIG_LINKS
15667   CONFIG_COMMANDS = $CONFIG_COMMANDS
15668   > $ac_cs_invocation
15669 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15670
15671 _ACEOF
15672 EOF
15673
15674 cat >>$CONFIG_STATUS <<EOF
15675 #
15676 # INIT-COMMANDS section.
15677 #
15678
15679 ### Special initialization commands, used to pass information from the
15680 ### configuration-run into config.status
15681
15682 AWK="$AWK"
15683 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15684 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15685 ECHO_LINK="$ECHO_LINK"
15686 LDCONFIG="$LDCONFIG"
15687 LIB_NAME="$LIB_NAME"
15688 LIB_SUBSETS="$LIB_SUBSETS"
15689 LIB_SUFFIX="$LIB_SUFFIX"
15690 LIB_TRACING="$LIB_TRACING"
15691 MAKE_TERMINFO="$MAKE_TERMINFO"
15692 NCURSES_MAJOR="$NCURSES_MAJOR"
15693 NCURSES_MINOR="$NCURSES_MINOR"
15694 NCURSES_OSPEED="$NCURSES_OSPEED"
15695 NCURSES_PATCH="$NCURSES_PATCH"
15696 SRC_SUBDIRS="$SRC_SUBDIRS"
15697 TERMINFO="$TERMINFO"
15698 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15699 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15700 TINFO_NAME="$TINFO_NAME"
15701 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
15702 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
15703 TICS_NAME="$TICS_NAME"
15704 WITH_CURSES_H="$with_curses_h"
15705 WITH_ECHO="$with_echo"
15706 WITH_OVERWRITE="$with_overwrite"
15707 cf_LIST_MODELS="$cf_list_models"
15708 cf_cv_abi_version="$cf_cv_abi_version"
15709 cf_cv_do_relink="$cf_cv_do_relink"
15710 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15711 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15712 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15713 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15714 cf_cv_rel_version="$cf_cv_rel_version"
15715 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15716 cf_cv_shlib_version="$cf_cv_shlib_version"
15717 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15718 cf_cv_system_name="$cf_cv_system_name"
15719 cf_with_cxx_binding="$cf_with_cxx_binding"
15720 host="$host"
15721 target="$target"
15722
15723 EOF
15724
15725 cat >>$CONFIG_STATUS <<\EOF
15726 for ac_config_target in $ac_config_targets
15727 do
15728   case "$ac_config_target" in
15729   # Handling of arguments.
15730   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15731   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15732   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15733   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15734   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15735   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15736   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15737   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15738   *) { { echo "$as_me:15738: error: invalid argument: $ac_config_target" >&5
15739 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15740    { (exit 1); exit 1; }; };;
15741   esac
15742 done
15743
15744 # If the user did not use the arguments to specify the items to instantiate,
15745 # then the envvar interface is used.  Set only those that are not.
15746 # We use the long form for the default assignment because of an extremely
15747 # bizarre bug on SunOS 4.1.3.
15748 if $ac_need_defaults; then
15749   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15750   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15751   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15752 fi
15753
15754 # Create a temporary directory, and hook for its removal unless debugging.
15755 $debug ||
15756 {
15757   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15758   trap '{ (exit 1); exit 1; }' 1 2 13 15
15759 }
15760
15761 # Create a (secure) tmp directory for tmp files.
15762 : ${TMPDIR=/tmp}
15763 {
15764   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15765   test -n "$tmp" && test -d "$tmp"
15766 }  ||
15767 {
15768   tmp=$TMPDIR/cs$$-$RANDOM
15769   (umask 077 && mkdir $tmp)
15770 } ||
15771 {
15772    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15773    { (exit 1); exit 1; }
15774 }
15775
15776 EOF
15777
15778 cat >>$CONFIG_STATUS <<EOF
15779
15780 #
15781 # CONFIG_FILES section.
15782 #
15783
15784 # No need to generate the scripts if there are no CONFIG_FILES.
15785 # This happens for instance when ./config.status config.h
15786 if test -n "\$CONFIG_FILES"; then
15787   # Protect against being on the right side of a sed subst in config.status.
15788   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15789    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15790 s,@SHELL@,$SHELL,;t t
15791 s,@exec_prefix@,$exec_prefix,;t t
15792 s,@prefix@,$prefix,;t t
15793 s,@program_transform_name@,$program_transform_name,;t t
15794 s,@bindir@,$bindir,;t t
15795 s,@sbindir@,$sbindir,;t t
15796 s,@libexecdir@,$libexecdir,;t t
15797 s,@datadir@,$datadir,;t t
15798 s,@sysconfdir@,$sysconfdir,;t t
15799 s,@sharedstatedir@,$sharedstatedir,;t t
15800 s,@localstatedir@,$localstatedir,;t t
15801 s,@libdir@,$libdir,;t t
15802 s,@includedir@,$includedir,;t t
15803 s,@oldincludedir@,$oldincludedir,;t t
15804 s,@infodir@,$infodir,;t t
15805 s,@mandir@,$mandir,;t t
15806 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15807 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15808 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15809 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15810 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15811 s,@build_alias@,$build_alias,;t t
15812 s,@host_alias@,$host_alias,;t t
15813 s,@target_alias@,$target_alias,;t t
15814 s,@ECHO_C@,$ECHO_C,;t t
15815 s,@ECHO_N@,$ECHO_N,;t t
15816 s,@ECHO_T@,$ECHO_T,;t t
15817 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15818 s,@DEFS@,$DEFS,;t t
15819 s,@LIBS@,$LIBS,;t t
15820 s,@top_builddir@,$top_builddir,;t t
15821 s,@EGREP@,$EGREP,;t t
15822 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15823 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15824 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15825 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15826 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15827 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15828 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15829 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15830 s,@build@,$build,;t t
15831 s,@build_cpu@,$build_cpu,;t t
15832 s,@build_vendor@,$build_vendor,;t t
15833 s,@build_os@,$build_os,;t t
15834 s,@host@,$host,;t t
15835 s,@host_cpu@,$host_cpu,;t t
15836 s,@host_vendor@,$host_vendor,;t t
15837 s,@host_os@,$host_os,;t t
15838 s,@target@,$target,;t t
15839 s,@target_cpu@,$target_cpu,;t t
15840 s,@target_vendor@,$target_vendor,;t t
15841 s,@target_os@,$target_os,;t t
15842 s,@CC@,$CC,;t t
15843 s,@CFLAGS@,$CFLAGS,;t t
15844 s,@LDFLAGS@,$LDFLAGS,;t t
15845 s,@CPPFLAGS@,$CPPFLAGS,;t t
15846 s,@ac_ct_CC@,$ac_ct_CC,;t t
15847 s,@EXEEXT@,$EXEEXT,;t t
15848 s,@OBJEXT@,$OBJEXT,;t t
15849 s,@CPP@,$CPP,;t t
15850 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15851 s,@PROG_EXT@,$PROG_EXT,;t t
15852 s,@LDCONFIG@,$LDCONFIG,;t t
15853 s,@CXX@,$CXX,;t t
15854 s,@CXXFLAGS@,$CXXFLAGS,;t t
15855 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15856 s,@AWK@,$AWK,;t t
15857 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15858 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15859 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15860 s,@LINT@,$LINT,;t t
15861 s,@LINT_OPTS@,$LINT_OPTS,;t t
15862 s,@LN_S@,$LN_S,;t t
15863 s,@SET_MAKE@,$SET_MAKE,;t t
15864 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15865 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15866 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15867 s,@RANLIB@,$RANLIB,;t t
15868 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15869 s,@LD@,$LD,;t t
15870 s,@ac_ct_LD@,$ac_ct_LD,;t t
15871 s,@AR@,$AR,;t t
15872 s,@ac_ct_AR@,$ac_ct_AR,;t t
15873 s,@AR_OPTS@,$AR_OPTS,;t t
15874 s,@DESTDIR@,$DESTDIR,;t t
15875 s,@BUILD_CC@,$BUILD_CC,;t t
15876 s,@BUILD_CPP@,$BUILD_CPP,;t t
15877 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15878 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15879 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15880 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15881 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15882 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15883 s,@cf_list_models@,$cf_list_models,;t t
15884 s,@LIBTOOL@,$LIBTOOL,;t t
15885 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15886 s,@LIB_CREATE@,$LIB_CREATE,;t t
15887 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15888 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15889 s,@LIB_PREP@,$LIB_PREP,;t t
15890 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15891 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15892 s,@LIB_LINK@,$LIB_LINK,;t t
15893 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15894 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15895 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15896 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15897 s,@TICS_NAME@,$TICS_NAME,;t t
15898 s,@TINFO_NAME@,$TINFO_NAME,;t t
15899 s,@LIB_NAME@,$LIB_NAME,;t t
15900 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15901 s,@CC_G_OPT@,$CC_G_OPT,;t t
15902 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
15903 s,@LD_MODEL@,$LD_MODEL,;t t
15904 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15905 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15906 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15907 s,@LINK_PROGS@,$LINK_PROGS,;t t
15908 s,@LINK_TESTS@,$LINK_TESTS,;t t
15909 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15910 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15911 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15912 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15913 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
15914 s,@PATHSEP@,$PATHSEP,;t t
15915 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
15916 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
15917 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
15918 s,@TERMINFO@,$TERMINFO,;t t
15919 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
15920 s,@TERMPATH@,$TERMPATH,;t t
15921 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15922 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
15923 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
15924 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
15925 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
15926 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
15927 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
15928 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
15929 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
15930 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
15931 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
15932 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
15933 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
15934 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
15935 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
15936 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15937 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15938 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
15939 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
15940 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
15941 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
15942 s,@ECHO_LINK@,$ECHO_LINK,;t t
15943 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15944 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
15945 s,@ADA_TRACE@,$ADA_TRACE,;t t
15946 s,@MATH_LIB@,$MATH_LIB,;t t
15947 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
15948 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
15949 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
15950 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
15951 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
15952 s,@CXXCPP@,$CXXCPP,;t t
15953 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
15954 s,@CXX_AR@,$CXX_AR,;t t
15955 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
15956 s,@CXXLIBS@,$CXXLIBS,;t t
15957 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
15958 s,@gnat_exists@,$gnat_exists,;t t
15959 s,@M4_exists@,$M4_exists,;t t
15960 s,@cf_ada_make@,$cf_ada_make,;t t
15961 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15962 s,@cf_ada_package@,$cf_ada_package,;t t
15963 s,@ADAFLAGS@,$ADAFLAGS,;t t
15964 s,@cf_compile_generics@,$cf_compile_generics,;t t
15965 s,@cf_generic_objects@,$cf_generic_objects,;t t
15966 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
15967 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15968 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15969 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15970 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15971 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15972 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15973 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
15974 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
15975 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
15976 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
15977 s,@TICS_ARGS@,$TICS_ARGS,;t t
15978 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
15979 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
15980 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
15981 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15982 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
15983 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
15984 s,@TICS_LIST@,$TICS_LIST,;t t
15985 s,@TINFO_LIST@,$TINFO_LIST,;t t
15986 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
15987 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15988 s,@TEST_ARGS@,$TEST_ARGS,;t t
15989 s,@TEST_DEPS@,$TEST_DEPS,;t t
15990 s,@TEST_ARG2@,$TEST_ARG2,;t t
15991 s,@TEST_DEP2@,$TEST_DEP2,;t t
15992 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15993 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
15994 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
15995 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
15996 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
15997 CEOF
15998
15999 EOF
16000
16001   cat >>$CONFIG_STATUS <<\EOF
16002   # Split the substitutions into bite-sized pieces for seds with
16003   # small command number limits, like on Digital OSF/1 and HP-UX.
16004   ac_max_sed_lines=48
16005   ac_sed_frag=1 # Number of current file.
16006   ac_beg=1 # First line for current file.
16007   ac_end=$ac_max_sed_lines # Line after last line for current file.
16008   ac_more_lines=:
16009   ac_sed_cmds=
16010   while $ac_more_lines; do
16011     if test $ac_beg -gt 1; then
16012       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16013     else
16014       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16015     fi
16016     if test ! -s $tmp/subs.frag; then
16017       ac_more_lines=false
16018     else
16019       # The purpose of the label and of the branching condition is to
16020       # speed up the sed processing (if there are no `@' at all, there
16021       # is no need to browse any of the substitutions).
16022       # These are the two extra sed commands mentioned above.
16023       (echo ':t
16024   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16025       if test -z "$ac_sed_cmds"; then
16026         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16027       else
16028         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16029       fi
16030       ac_sed_frag=`expr $ac_sed_frag + 1`
16031       ac_beg=$ac_end
16032       ac_end=`expr $ac_end + $ac_max_sed_lines`
16033     fi
16034   done
16035   if test -z "$ac_sed_cmds"; then
16036     ac_sed_cmds=cat
16037   fi
16038 fi # test -n "$CONFIG_FILES"
16039
16040 EOF
16041 cat >>$CONFIG_STATUS <<\EOF
16042 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16043   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16044   case $ac_file in
16045   - | *:- | *:-:* ) # input from stdin
16046         cat >$tmp/stdin
16047         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16048         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16049   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16050         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16051   * )   ac_file_in=$ac_file.in ;;
16052   esac
16053
16054   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16055   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16056          X"$ac_file" : 'X\(//\)[^/]' \| \
16057          X"$ac_file" : 'X\(//\)$' \| \
16058          X"$ac_file" : 'X\(/\)' \| \
16059          .     : '\(.\)' 2>/dev/null ||
16060 echo X"$ac_file" |
16061     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16062           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16063           /^X\(\/\/\)$/{ s//\1/; q; }
16064           /^X\(\/\).*/{ s//\1/; q; }
16065           s/.*/./; q'`
16066   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16067     { case "$ac_dir" in
16068   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16069   *)                      as_incr_dir=.;;
16070 esac
16071 as_dummy="$ac_dir"
16072 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16073   case $as_mkdir_dir in
16074     # Skip DOS drivespec
16075     ?:) as_incr_dir=$as_mkdir_dir ;;
16076     *)
16077       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16078       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16079     ;;
16080   esac
16081 done; }
16082
16083     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16084     # A "../" for each directory in $ac_dir_suffix.
16085     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16086   else
16087     ac_dir_suffix= ac_dots=
16088   fi
16089
16090   case $srcdir in
16091   .)  ac_srcdir=.
16092       if test -z "$ac_dots"; then
16093          ac_top_srcdir=.
16094       else
16095          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16096       fi ;;
16097   [\\/]* | ?:[\\/]* )
16098       ac_srcdir=$srcdir$ac_dir_suffix;
16099       ac_top_srcdir=$srcdir ;;
16100   *) # Relative path.
16101     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16102     ac_top_srcdir=$ac_dots$srcdir ;;
16103   esac
16104
16105   case $INSTALL in
16106   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16107   *) ac_INSTALL=$ac_dots$INSTALL ;;
16108   esac
16109
16110   if test x"$ac_file" != x-; then
16111     { echo "$as_me:16111: creating $ac_file" >&5
16112 echo "$as_me: creating $ac_file" >&6;}
16113     rm -f "$ac_file"
16114   fi
16115   # Let's still pretend it is `configure' which instantiates (i.e., don't
16116   # use $as_me), people would be surprised to read:
16117   #    /* config.h.  Generated automatically by config.status.  */
16118   configure_input="Generated automatically from `echo $ac_file_in |
16119                                                  sed 's,.*/,,'` by configure."
16120
16121   # First look for the input files in the build tree, otherwise in the
16122   # src tree.
16123   ac_file_inputs=`IFS=:
16124     for f in $ac_file_in; do
16125       case $f in
16126       -) echo $tmp/stdin ;;
16127       [\\/$]*)
16128          # Absolute (can't be DOS-style, as IFS=:)
16129          test -f "$f" || { { echo "$as_me:16129: error: cannot find input file: $f" >&5
16130 echo "$as_me: error: cannot find input file: $f" >&2;}
16131    { (exit 1); exit 1; }; }
16132          echo $f;;
16133       *) # Relative
16134          if test -f "$f"; then
16135            # Build tree
16136            echo $f
16137          elif test -f "$srcdir/$f"; then
16138            # Source tree
16139            echo $srcdir/$f
16140          else
16141            # /dev/null tree
16142            { { echo "$as_me:16142: error: cannot find input file: $f" >&5
16143 echo "$as_me: error: cannot find input file: $f" >&2;}
16144    { (exit 1); exit 1; }; }
16145          fi;;
16146       esac
16147     done` || { (exit 1); exit 1; }
16148 EOF
16149 cat >>$CONFIG_STATUS <<EOF
16150   sed "$ac_vpsub
16151 $extrasub
16152 EOF
16153 cat >>$CONFIG_STATUS <<\EOF
16154 :t
16155 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16156 s,@configure_input@,$configure_input,;t t
16157 s,@srcdir@,$ac_srcdir,;t t
16158 s,@top_srcdir@,$ac_top_srcdir,;t t
16159 s,@INSTALL@,$ac_INSTALL,;t t
16160 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16161   rm -f $tmp/stdin
16162   if test x"$ac_file" != x-; then
16163     mv $tmp/out $ac_file
16164   else
16165     cat $tmp/out
16166     rm -f $tmp/out
16167   fi
16168
16169 done
16170 EOF
16171 cat >>$CONFIG_STATUS <<\EOF
16172
16173 #
16174 # CONFIG_HEADER section.
16175 #
16176
16177 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16178 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16179 #
16180 # ac_d sets the value in "#define NAME VALUE" lines.
16181 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16182 ac_dB='[        ].*$,\1#\2'
16183 ac_dC=' '
16184 ac_dD=',;t'
16185 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16186 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16187 ac_iB='\([      ]\),\1#\2define\3'
16188 ac_iC=' '
16189 ac_iD='\4,;t'
16190 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16191 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16192 ac_uB='$,\1#\2define\3'
16193 ac_uC=' '
16194 ac_uD=',;t'
16195
16196 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16197   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16198   case $ac_file in
16199   - | *:- | *:-:* ) # input from stdin
16200         cat >$tmp/stdin
16201         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16202         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16203   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16204         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16205   * )   ac_file_in=$ac_file.in ;;
16206   esac
16207
16208   test x"$ac_file" != x- && { echo "$as_me:16208: creating $ac_file" >&5
16209 echo "$as_me: creating $ac_file" >&6;}
16210
16211   # First look for the input files in the build tree, otherwise in the
16212   # src tree.
16213   ac_file_inputs=`IFS=:
16214     for f in $ac_file_in; do
16215       case $f in
16216       -) echo $tmp/stdin ;;
16217       [\\/$]*)
16218          # Absolute (can't be DOS-style, as IFS=:)
16219          test -f "$f" || { { echo "$as_me:16219: error: cannot find input file: $f" >&5
16220 echo "$as_me: error: cannot find input file: $f" >&2;}
16221    { (exit 1); exit 1; }; }
16222          echo $f;;
16223       *) # Relative
16224          if test -f "$f"; then
16225            # Build tree
16226            echo $f
16227          elif test -f "$srcdir/$f"; then
16228            # Source tree
16229            echo $srcdir/$f
16230          else
16231            # /dev/null tree
16232            { { echo "$as_me:16232: error: cannot find input file: $f" >&5
16233 echo "$as_me: error: cannot find input file: $f" >&2;}
16234    { (exit 1); exit 1; }; }
16235          fi;;
16236       esac
16237     done` || { (exit 1); exit 1; }
16238   # Remove the trailing spaces.
16239   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16240
16241 EOF
16242
16243 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16244 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16245 # be either 'cat' or 'sort'.
16246 cat confdefs.h | uniq >conftest.vals
16247
16248 # Break up conftest.vals because some shells have a limit on
16249 # the size of here documents, and old seds have small limits too.
16250
16251 rm -f conftest.tail
16252 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16253 while grep . conftest.vals >/dev/null
16254 do
16255   # Write chunks of a limited-size here document to conftest.frag.
16256   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16257   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16258   echo 'CEOF' >> $CONFIG_STATUS
16259   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16260   rm -f conftest.vals
16261   mv conftest.tail conftest.vals
16262 done
16263 rm -f conftest.vals
16264
16265 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16266 # marker @DEFS@.
16267 echo '  cat >> conftest.edit <<CEOF
16268 /@DEFS@/r conftest.frag
16269 /@DEFS@/d
16270 CEOF
16271 sed -f conftest.edit $tmp/in > $tmp/out
16272 rm -f $tmp/in
16273 mv $tmp/out $tmp/in
16274 rm -f conftest.edit conftest.frag
16275 ' >> $CONFIG_STATUS
16276
16277 cat >>$CONFIG_STATUS <<\EOF
16278   # Let's still pretend it is `configure' which instantiates (i.e., don't
16279   # use $as_me), people would be surprised to read:
16280   #    /* config.h.  Generated automatically by config.status.  */
16281   if test x"$ac_file" = x-; then
16282     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16283   else
16284     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16285   fi
16286   cat $tmp/in >>$tmp/config.h
16287   rm -f $tmp/in
16288   if test x"$ac_file" != x-; then
16289     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16290       { echo "$as_me:16290: $ac_file is unchanged" >&5
16291 echo "$as_me: $ac_file is unchanged" >&6;}
16292     else
16293       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16294          X"$ac_file" : 'X\(//\)[^/]' \| \
16295          X"$ac_file" : 'X\(//\)$' \| \
16296          X"$ac_file" : 'X\(/\)' \| \
16297          .     : '\(.\)' 2>/dev/null ||
16298 echo X"$ac_file" |
16299     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16300           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16301           /^X\(\/\/\)$/{ s//\1/; q; }
16302           /^X\(\/\).*/{ s//\1/; q; }
16303           s/.*/./; q'`
16304       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16305         { case "$ac_dir" in
16306   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16307   *)                      as_incr_dir=.;;
16308 esac
16309 as_dummy="$ac_dir"
16310 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16311   case $as_mkdir_dir in
16312     # Skip DOS drivespec
16313     ?:) as_incr_dir=$as_mkdir_dir ;;
16314     *)
16315       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16316       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16317     ;;
16318   esac
16319 done; }
16320
16321       fi
16322       rm -f $ac_file
16323       mv $tmp/config.h $ac_file
16324     fi
16325   else
16326     cat $tmp/config.h
16327     rm -f $tmp/config.h
16328   fi
16329 done
16330 EOF
16331 cat >>$CONFIG_STATUS <<\EOF
16332
16333 #
16334 # CONFIG_COMMANDS section.
16335 #
16336 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16337   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16338   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16339
16340   case $ac_dest in
16341     default )
16342
16343 for cf_dir in test
16344 do
16345         if test ! -d $srcdir/$cf_dir; then
16346                 continue
16347         elif test -f $srcdir/$cf_dir/programs; then
16348                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16349         fi
16350 done
16351
16352         case $cf_cv_system_name in
16353         OS/2*)  LIB_PREFIX=''     ;;
16354         os2*)   LIB_PREFIX=''     ;;
16355         *)      LIB_PREFIX='lib'  ;;
16356         esac
16357 cf_prefix=$LIB_PREFIX
16358
16359 for cf_dir in $SRC_SUBDIRS
16360 do
16361         if test ! -d $srcdir/$cf_dir ; then
16362                 continue
16363         elif test -f $srcdir/$cf_dir/modules; then
16364
16365                 SHARED_LIB=
16366                 LIBS_TO_MAKE=
16367                 for cf_item in $cf_LIST_MODELS
16368                 do
16369
16370         case $cf_item in
16371         libtool) cf_suffix='.la'  ;;
16372         normal)  cf_suffix='.a'   ;;
16373         debug)   cf_suffix='_g.a' ;;
16374         profile) cf_suffix='_p.a' ;;
16375         shared)
16376                 case $cf_cv_system_name in
16377                 cygwin*) cf_suffix='.dll' ;;
16378                 darwin*) cf_suffix='.dylib' ;;
16379                 hpux*)
16380                         case $target in
16381                         ia64*)  cf_suffix='.so' ;;
16382                         *)      cf_suffix='.sl' ;;
16383                         esac
16384                         ;;
16385                 *)      cf_suffix='.so'  ;;
16386                 esac
16387         esac
16388         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16389
16390                         if test $cf_item = shared ; then
16391                         if test "$cf_cv_do_symlinks" = yes ; then
16392                                 case "$cf_cv_shlib_version" in #(vi
16393                                 rel) #(vi
16394                                         case "$cf_cv_system_name" in #(vi
16395                                         darwin*)
16396                                         case .${LIB_SUFFIX} in
16397                                         .w*)
16398                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16399                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16400                                                 ;;
16401                                         *)
16402                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16403                                                 ;;
16404                                         esac
16405                                         ;; #(vi
16406                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16407                                         esac
16408                                         ;;
16409                                 abi)
16410                                         case "$cf_cv_system_name" in #(vi
16411                                         darwin*)
16412                                         case .${LIB_SUFFIX} in
16413                                         .w*)
16414                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16415                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16416                                                 ;;
16417                                         *)
16418                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16419                                                 ;;
16420                                         esac
16421                                         ;; #(vi
16422                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16423                                         esac
16424                                         ;;
16425                                 esac
16426                         fi
16427                         # cygwin needs import library, and has unique naming convention
16428                         # use autodetected ${cf_prefix} for import lib and static lib, but
16429                         # use 'cyg' prefix for shared lib.
16430                         if test $cf_cv_shlib_version = cygdll ; then
16431                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16432                                 continue
16433                         fi
16434                         fi
16435                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16436                 done
16437
16438                 if test $cf_dir = ncurses ; then
16439                         cf_subsets="$LIB_SUBSETS"
16440                         cf_r_parts="$cf_subsets"
16441
16442                         while test -n "$cf_r_parts"
16443                         do
16444                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16445                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16446                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16447                                         case $cf_l_parts in #(vi
16448                                         *termlib*) #(vi
16449                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16450                                                 ;;
16451                                         *ticlib*)
16452                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16453                                                 ;;
16454                                         *)
16455                                                 break
16456                                                 ;;
16457                                         esac
16458                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16459                                 else
16460                                         break
16461                                 fi
16462                         done
16463                 else
16464                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16465                 fi
16466
16467                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16468                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16469                         $cf_dir/Makefile >$cf_dir/Makefile.out
16470                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16471
16472                 $AWK -f $srcdir/mk-0th.awk \
16473                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16474                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16475
16476                 for cf_subset in $cf_subsets
16477                 do
16478                         cf_subdirs=
16479                         for cf_item in $cf_LIST_MODELS
16480                         do
16481                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16482
16483 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
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         case $cf_item in
16506         libtool) cf_subdir='obj_lo'  ;;
16507         normal)  cf_subdir='objects' ;;
16508         debug)   cf_subdir='obj_g' ;;
16509         profile) cf_subdir='obj_p' ;;
16510         shared)
16511                 case $cf_cv_system_name in #(vi
16512                 cygwin) #(vi
16513                         cf_subdir='objects' ;;
16514                 *)
16515                         cf_subdir='obj_s' ;;
16516                 esac
16517         esac
16518
16519                         # Test for case where we build libtinfo with a different name.
16520                         cf_libname=$cf_dir
16521                         if test $cf_dir = ncurses ; then
16522                                 case $cf_subset in
16523                                 *base*)
16524                                         ;;
16525                                 *termlib*)
16526                                         cf_libname=$TINFO_LIB_SUFFIX
16527                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16528                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16529                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16530                                         fi
16531                                         ;;
16532                                 ticlib*)
16533                                         cf_libname=$TICS_LIB_SUFFIX
16534                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16535                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16536                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16537                                         fi
16538                                         ;;
16539                                 esac
16540                         fi
16541
16542                         # These dependencies really are for development, not
16543                         # builds, but they are useful in porting, too.
16544                         cf_depend="../include/ncurses_cfg.h"
16545                         if test "$srcdir" = "."; then
16546                                 cf_reldir="."
16547                         else
16548                                 cf_reldir="\${srcdir}"
16549                         fi
16550
16551                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16552                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16553                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16554                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16555                         fi
16556
16557                         cf_dir_suffix=
16558                         old_cf_suffix="$cf_suffix"
16559                         if test "$cf_cv_shlib_version_infix" = yes ; then
16560                         if test -n "$LIB_SUFFIX" ; then
16561                                 case $LIB_SUFFIX in
16562                                 w*)
16563                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16564                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16565                                         cf_dir_suffix=w
16566                                         ;;
16567                                 esac
16568                         fi
16569                         fi
16570
16571                         $AWK -f $srcdir/mk-1st.awk \
16572                                 name=${cf_libname}${cf_dir_suffix} \
16573                                 traces=$LIB_TRACING \
16574                                 MODEL=$cf_ITEM \
16575                                 model=$cf_subdir \
16576                                 prefix=$cf_prefix \
16577                                 suffix=$cf_suffix \
16578                                 subset=$cf_subset \
16579                                 TermlibRoot=$TINFO_ARG_SUFFIX \
16580                                 ShlibVer=$cf_cv_shlib_version \
16581                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16582                                 ReLink=${cf_cv_do_relink-no} \
16583                                 DoLinks=$cf_cv_do_symlinks \
16584                                 rmSoLocs=$cf_cv_rm_so_locs \
16585                                 ldconfig="$LDCONFIG" \
16586                                 overwrite=$WITH_OVERWRITE \
16587                                 depend="$cf_depend" \
16588                                 host="$host" \
16589                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16590
16591                         cf_suffix="$old_cf_suffix"
16592
16593                         for cf_subdir2 in $cf_subdirs lib
16594                         do
16595                                 test $cf_subdir = $cf_subdir2 && break
16596                         done
16597                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16598                         $AWK -f $srcdir/mk-2nd.awk \
16599                                 name=$cf_dir \
16600                                 traces=$LIB_TRACING \
16601                                 MODEL=$cf_ITEM \
16602                                 model=$cf_subdir \
16603                                 subset=$cf_subset \
16604                                 srcdir=$srcdir \
16605                                 echo=$WITH_ECHO \
16606                                 crenames=$cf_cv_prog_CC_c_o \
16607                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16608                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16609                         cf_subdirs="$cf_subdirs $cf_subdir"
16610                         done
16611                 done
16612         fi
16613
16614         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16615 done
16616
16617 for cf_dir in $SRC_SUBDIRS
16618 do
16619         if test ! -d $srcdir/$cf_dir ; then
16620                 continue
16621         fi
16622
16623         if test -f $cf_dir/Makefile ; then
16624                 case "$cf_dir" in
16625                 Ada95) #(vi
16626                         echo 'libs \' >> Makefile
16627                         echo 'install.libs \' >> Makefile
16628                         echo 'uninstall.libs ::' >> Makefile
16629                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16630                         ;;
16631                 esac
16632         fi
16633
16634         if test -f $srcdir/$cf_dir/modules; then
16635                 echo >> Makefile
16636                 if test -f $srcdir/$cf_dir/headers; then
16637 cat >> Makefile <<CF_EOF
16638 install.includes \\
16639 uninstall.includes \\
16640 CF_EOF
16641                 fi
16642 if test "$cf_dir" != "c++" ; then
16643 echo 'lint \' >> Makefile
16644 fi
16645 cat >> Makefile <<CF_EOF
16646 libs \\
16647 lintlib \\
16648 install.libs \\
16649 uninstall.libs \\
16650 install.$cf_dir \\
16651 uninstall.$cf_dir ::
16652         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16653 CF_EOF
16654         elif test -f $srcdir/$cf_dir/headers; then
16655 cat >> Makefile <<CF_EOF
16656
16657 libs \\
16658 install.libs \\
16659 uninstall.libs \\
16660 install.includes \\
16661 uninstall.includes ::
16662         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16663 CF_EOF
16664 fi
16665 done
16666
16667 cat >> Makefile <<CF_EOF
16668
16669 install.libs uninstall.libs \\
16670 install.data uninstall.data ::
16671 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16672
16673 install.man \\
16674 uninstall.man ::
16675         cd man && \${MAKE} \${CF_MFLAGS} \$@
16676
16677 distclean ::
16678         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16679         rm -f headers.sh headers.sed mk_shared_lib.sh
16680         rm -rf \${DIRS_TO_MAKE}
16681 CF_EOF
16682
16683 # Special case: tack's manpage lives in its own directory.
16684 if test -d tack ; then
16685 if test -f $srcdir/$tack.h; then
16686 cat >> Makefile <<CF_EOF
16687
16688 install.man \\
16689 uninstall.man ::
16690         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16691 CF_EOF
16692 fi
16693 fi
16694
16695 rm -f headers.sed headers.sh
16696
16697 echo creating headers.sh
16698 cat >headers.sh <<CF_EOF
16699 #! /bin/sh
16700 # This shell script is generated by the 'configure' script.  It is invoked in a
16701 # subdirectory of the build tree.  It generates a sed-script in the parent
16702 # directory that is used to adjust includes for header files that reside in a
16703 # subdirectory of /usr/include, etc.
16704 PRG=""
16705 while test \$# != 3
16706 do
16707 PRG="\$PRG \$1"; shift
16708 done
16709 DST=\$1
16710 REF=\$2
16711 SRC=\$3
16712 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16713 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16714 echo installing \$SRC in \$DST
16715 CF_EOF
16716
16717 if test $WITH_CURSES_H = yes; then
16718         cat >>headers.sh <<CF_EOF
16719 case \$DST in
16720 /*/include/*)
16721         END=\`basename \$DST\`
16722         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16723         do
16724                 NAME=\`basename \$i\`
16725                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16726         done
16727         ;;
16728 *)
16729         echo "" >> \$TMPSED
16730         ;;
16731 esac
16732 CF_EOF
16733
16734 else
16735         cat >>headers.sh <<CF_EOF
16736 case \$DST in
16737 /*/include/*)
16738         END=\`basename \$DST\`
16739         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16740         do
16741                 NAME=\`basename \$i\`
16742                 if test "\$NAME" = "curses.h"
16743                 then
16744                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16745                         NAME=ncurses.h
16746                 fi
16747                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16748         done
16749         ;;
16750 *)
16751         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16752         ;;
16753 esac
16754 CF_EOF
16755 fi
16756 cat >>headers.sh <<CF_EOF
16757 rm -f \$TMPSRC
16758 sed -f \$TMPSED \$SRC > \$TMPSRC
16759 NAME=\`basename \$SRC\`
16760 CF_EOF
16761 if test $WITH_CURSES_H != yes; then
16762         cat >>headers.sh <<CF_EOF
16763 test "\$NAME" = "curses.h" && NAME=ncurses.h
16764 CF_EOF
16765 fi
16766 cat >>headers.sh <<CF_EOF
16767 # Just in case someone gzip'd manpages, remove the conflicting copy.
16768 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16769
16770 eval \$PRG \$TMPSRC \$DST/\$NAME
16771 rm -f \$TMPSRC \$TMPSED
16772 CF_EOF
16773
16774 chmod 0755 headers.sh
16775
16776 for cf_dir in $SRC_SUBDIRS
16777 do
16778         if test ! -d $srcdir/$cf_dir ; then
16779                 continue
16780         fi
16781
16782         if test -f $srcdir/$cf_dir/headers; then
16783                 $AWK -f $srcdir/mk-hdr.awk \
16784                         subset="$LIB_SUBSETS" \
16785                         compat="$WITH_CURSES_H" \
16786                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
16787         fi
16788
16789         if test -f $srcdir/$cf_dir/modules; then
16790                 if test "$cf_dir" != "c++" ; then
16791                         cat >>$cf_dir/Makefile <<"CF_EOF"
16792 depend : ${AUTO_SRC}
16793         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16794
16795 # DO NOT DELETE THIS LINE -- make depend depends on it.
16796 CF_EOF
16797                 fi
16798         fi
16799 done
16800
16801  ;;
16802   esac
16803 done
16804 EOF
16805
16806 cat >>$CONFIG_STATUS <<\EOF
16807
16808 { (exit 0); exit 0; }
16809 EOF
16810 chmod +x $CONFIG_STATUS
16811 ac_clean_files=$ac_clean_files_save
16812
16813 # configure is writing to config.log, and then calls config.status.
16814 # config.status does its own redirection, appending to config.log.
16815 # Unfortunately, on DOS this fails, as config.log is still kept open
16816 # by configure, so config.status won't be able to write to it; its
16817 # output is simply discarded.  So we exec the FD to /dev/null,
16818 # effectively closing config.log, so it can be properly (re)opened and
16819 # appended to by config.status.  When coming back to configure, we
16820 # need to make the FD available again.
16821 if test "$no_create" != yes; then
16822   ac_cs_success=:
16823   exec 5>/dev/null
16824   $SHELL $CONFIG_STATUS || ac_cs_success=false
16825   exec 5>>config.log
16826   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16827   # would make configure fail if this is the last instruction.
16828   $ac_cs_success || { (exit 1); exit 1; }
16829 fi
16830 ${MAKE-make} preinstall