]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070217
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.402 .
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='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
4952                 cf_cv_shlib_version=cygdll
4953                 cf_cv_shlib_version_infix=cygdll
4954                 ;;
4955         darwin*)
4956                 EXTRA_CFLAGS="-no-cpp-precomp"
4957                 CC_SHARED_OPTS="-dynamic"
4958                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4959                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4960                 cf_cv_shlib_version_infix=yes
4961                 echo "$as_me:4961: checking if ld -search_paths_first works" >&5
4962 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4963 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4964   echo $ECHO_N "(cached) $ECHO_C" >&6
4965 else
4966
4967                         cf_save_LDFLAGS=$LDFLAGS
4968                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4969                         cat >conftest.$ac_ext <<_ACEOF
4970 #line 4970 "configure"
4971 #include "confdefs.h"
4972
4973 int
4974 main ()
4975 {
4976 int i;
4977   ;
4978   return 0;
4979 }
4980 _ACEOF
4981 rm -f conftest.$ac_objext conftest$ac_exeext
4982 if { (eval echo "$as_me:4982: \"$ac_link\"") >&5
4983   (eval $ac_link) 2>&5
4984   ac_status=$?
4985   echo "$as_me:4985: \$? = $ac_status" >&5
4986   (exit $ac_status); } &&
4987          { ac_try='test -s conftest$ac_exeext'
4988   { (eval echo "$as_me:4988: \"$ac_try\"") >&5
4989   (eval $ac_try) 2>&5
4990   ac_status=$?
4991   echo "$as_me:4991: \$? = $ac_status" >&5
4992   (exit $ac_status); }; }; then
4993   cf_cv_ldflags_search_paths_first=yes
4994 else
4995   echo "$as_me: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 cf_cv_ldflags_search_paths_first=no
4998 fi
4999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5000                                 LDFLAGS=$cf_save_LDFLAGS
5001 fi
5002 echo "$as_me:5002: result: $cf_cv_ldflags_search_paths_first" >&5
5003 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5004                 if test $cf_cv_ldflags_search_paths_first = yes; then
5005                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5006                 fi
5007                 ;;
5008         hpux*)
5009                 # (tested with gcc 2.7.2 -- I don't have c89)
5010                 if test "$GCC" = yes; then
5011                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5012                 else
5013                         CC_SHARED_OPTS='+Z'
5014                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5015                 fi
5016                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5017                 # HP-UX shared libraries must be executable, and should be
5018                 # readonly to exploit a quirk in the memory manager.
5019                 INSTALL_LIB="-m 555"
5020                 ;;
5021         irix*)
5022                 if test "$cf_cv_ld_rpath" = yes ; then
5023                         if test "$GCC" = yes; then
5024                                 cf_ld_rpath_opt="-Wl,-rpath,"
5025                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5026                         else
5027                                 cf_ld_rpath_opt="-rpath "
5028                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5029                         fi
5030                 fi
5031                 # tested with IRIX 5.2 and 'cc'.
5032                 if test "$GCC" != yes; then
5033                         CC_SHARED_OPTS='-KPIC'
5034                 fi
5035                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5036                 cf_cv_rm_so_locs=yes
5037                 ;;
5038         linux*|gnu*|k*bsd*-gnu)
5039                 if test "$DFT_LWR_MODEL" = "shared" ; then
5040                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5041                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5042                 fi
5043                 if test "$cf_cv_ld_rpath" = yes ; then
5044                         cf_ld_rpath_opt="-Wl,-rpath,"
5045                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5046                 fi
5047
5048         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5049         if test "$cf_cv_shlib_version" = rel; then
5050                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5051         else
5052                 cf_shared_soname='`basename $@`'
5053         fi
5054
5055                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5056                 ;;
5057         openbsd[2-9].*)
5058                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5059                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5060                 ;;
5061         openbsd*|freebsd[12].*)
5062                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5063                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5064                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5065                 ;;
5066         freebsd*)
5067                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5068                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5069                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5070                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5071                         cf_ld_rpath_opt="-rpath "
5072                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5073                 fi
5074
5075         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5076         if test "$cf_cv_shlib_version" = rel; then
5077                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5078         else
5079                 cf_shared_soname='`basename $@`'
5080         fi
5081
5082                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5083                 ;;
5084         netbsd*)
5085                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5086                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5087                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5088                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5089                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5090                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5091                         if test "$cf_cv_shlib_version" = auto; then
5092                         if test -f /usr/libexec/ld.elf_so; then
5093                                 cf_cv_shlib_version=abi
5094                         else
5095                                 cf_cv_shlib_version=rel
5096                         fi
5097                         fi
5098
5099         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5100         if test "$cf_cv_shlib_version" = rel; then
5101                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5102         else
5103                 cf_shared_soname='`basename $@`'
5104         fi
5105
5106                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5107                 else
5108                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5109                 fi
5110                 ;;
5111         osf*|mls+*)
5112                 # tested with OSF/1 V3.2 and 'cc'
5113                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5114                 # link with shared libs).
5115                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5116                 case $host_os in
5117                 osf4*)
5118                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5119                         ;;
5120                 esac
5121                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5122                 if test "$DFT_LWR_MODEL" = "shared" ; then
5123                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5124                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5125                 fi
5126                 if test "$cf_cv_ld_rpath" = yes ; then
5127                         cf_ld_rpath_opt="-rpath"
5128                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5129                 fi
5130                 cf_cv_rm_so_locs=yes
5131                 ;;
5132         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5133                 # tested with osr5.0.5
5134                 if test "$GCC" != yes; then
5135                         CC_SHARED_OPTS='-belf -KPIC'
5136                 fi
5137                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5138                 if test "$cf_cv_ld_rpath" = yes ; then
5139                         # only way is to set LD_RUN_PATH but no switch for it
5140                         RUN_PATH=$libdir
5141                 fi
5142                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5143                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5144                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5145                 ;;
5146         sunos4*)
5147                 # tested with SunOS 4.1.1 and gcc 2.7.0
5148                 if test "$GCC" != yes; then
5149                         CC_SHARED_OPTS='-KPIC'
5150                 fi
5151                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5152                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5153                 ;;
5154         solaris2*)
5155                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5156                 if test "$GCC" != yes; then
5157                         CC_SHARED_OPTS='-KPIC'
5158                 fi
5159                 if test "$DFT_LWR_MODEL" = "shared" ; then
5160                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5161                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5162                 fi
5163                 if test "$cf_cv_ld_rpath" = yes ; then
5164                         cf_ld_rpath_opt="-R"
5165                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5166                 fi
5167
5168         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5169         if test "$cf_cv_shlib_version" = rel; then
5170                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5171         else
5172                 cf_shared_soname='`basename $@`'
5173         fi
5174
5175                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5176                 ;;
5177         sysv5uw7*|unix_sv*)
5178                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5179                 if test "$GCC" != yes; then
5180                         CC_SHARED_OPTS='-KPIC'
5181                 fi
5182                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5183                 ;;
5184         *)
5185                 CC_SHARED_OPTS='unknown'
5186                 MK_SHARED_LIB='echo unknown'
5187                 ;;
5188         esac
5189
5190         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5191         case "$cf_cv_shlib_version" in #(vi
5192         rel|abi)
5193                 case "$MK_SHARED_LIB" in #(vi
5194                 *'-o $@')
5195                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5196                         ;;
5197                 *)
5198                         { echo "$as_me:5198: WARNING: ignored --with-shlib-version" >&5
5199 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5200                         ;;
5201                 esac
5202                 ;;
5203         esac
5204
5205         if test -n "$cf_ld_rpath_opt" ; then
5206                 echo "$as_me:5206: checking if we need a space after rpath option" >&5
5207 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5208                 cf_save_LIBS="$LIBS"
5209                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5210                 cat >conftest.$ac_ext <<_ACEOF
5211 #line 5211 "configure"
5212 #include "confdefs.h"
5213
5214 int
5215 main ()
5216 {
5217
5218   ;
5219   return 0;
5220 }
5221 _ACEOF
5222 rm -f conftest.$ac_objext conftest$ac_exeext
5223 if { (eval echo "$as_me:5223: \"$ac_link\"") >&5
5224   (eval $ac_link) 2>&5
5225   ac_status=$?
5226   echo "$as_me:5226: \$? = $ac_status" >&5
5227   (exit $ac_status); } &&
5228          { ac_try='test -s conftest$ac_exeext'
5229   { (eval echo "$as_me:5229: \"$ac_try\"") >&5
5230   (eval $ac_try) 2>&5
5231   ac_status=$?
5232   echo "$as_me:5232: \$? = $ac_status" >&5
5233   (exit $ac_status); }; }; then
5234   cf_rpath_space=no
5235 else
5236   echo "$as_me: failed program was:" >&5
5237 cat conftest.$ac_ext >&5
5238 cf_rpath_space=yes
5239 fi
5240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5241                 LIBS="$cf_save_LIBS"
5242                 echo "$as_me:5242: result: $cf_rpath_space" >&5
5243 echo "${ECHO_T}$cf_rpath_space" >&6
5244                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5245                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5246         fi
5247
5248 if test "$CC_SHARED_OPTS" = "unknown"; then
5249         for model in $cf_list_models; do
5250                 if test "$model" = "shared"; then
5251                         { { echo "$as_me:5251: error: Shared libraries are not supported in this version" >&5
5252 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5253    { (exit 1); exit 1; }; }
5254                 fi
5255         done
5256 fi
5257
5258 ###############################################################################
5259
5260 ###     use option --disable-overwrite to leave out the link to -lcurses
5261 echo "$as_me:5261: checking if you wish to install ncurses overwriting curses" >&5
5262 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5263
5264 # Check whether --enable-overwrite or --disable-overwrite was given.
5265 if test "${enable_overwrite+set}" = set; then
5266   enableval="$enable_overwrite"
5267   with_overwrite=$enableval
5268 else
5269   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5270 fi;
5271 echo "$as_me:5271: result: $with_overwrite" >&5
5272 echo "${ECHO_T}$with_overwrite" >&6
5273
5274 echo "$as_me:5274: checking if external terminfo-database is used" >&5
5275 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5276
5277 # Check whether --enable-database or --disable-database was given.
5278 if test "${enable_database+set}" = set; then
5279   enableval="$enable_database"
5280   use_database=$enableval
5281 else
5282   use_database=yes
5283 fi;
5284 echo "$as_me:5284: result: $use_database" >&5
5285 echo "${ECHO_T}$use_database" >&6
5286
5287 case $host_os in #(vi
5288 os2*) #(vi
5289         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5290         ;;
5291 *) #(vi
5292         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5293         ;;
5294 esac
5295
5296         case $cf_cv_system_name in
5297         os2*)   PATHSEP=';'  ;;
5298         *)      PATHSEP=':'  ;;
5299         esac
5300
5301 if test "$use_database" != no ; then
5302         cat >>confdefs.h <<\EOF
5303 #define USE_DATABASE 1
5304 EOF
5305
5306         echo "$as_me:5306: checking which terminfo source-file will be installed" >&5
5307 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5308
5309 # Check whether --enable-database or --disable-database was given.
5310 if test "${enable_database+set}" = set; then
5311   enableval="$enable_database"
5312   TERMINFO_SRC=$withval
5313 fi;
5314         echo "$as_me:5314: result: $TERMINFO_SRC" >&5
5315 echo "${ECHO_T}$TERMINFO_SRC" >&6
5316
5317         echo "$as_me:5317: checking whether to use hashed database instead of directory/tree" >&5
5318 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5319
5320 # Check whether --with-hashed-db or --without-hashed-db was given.
5321 if test "${with_hashed_db+set}" = set; then
5322   withval="$with_hashed_db"
5323
5324 else
5325   with_hashed_db=no
5326 fi;
5327         echo "$as_me:5327: result: $with_hashed_db" >&5
5328 echo "${ECHO_T}$with_hashed_db" >&6
5329 fi
5330
5331 echo "$as_me:5331: checking for list of fallback descriptions" >&5
5332 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5333
5334 # Check whether --with-fallbacks or --without-fallbacks was given.
5335 if test "${with_fallbacks+set}" = set; then
5336   withval="$with_fallbacks"
5337   with_fallback=$withval
5338 else
5339   with_fallback=
5340 fi;
5341 echo "$as_me:5341: result: $with_fallback" >&5
5342 echo "${ECHO_T}$with_fallback" >&6
5343 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5344
5345 echo "$as_me:5345: checking if you want modern xterm or antique" >&5
5346 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5347
5348 # Check whether --with-xterm-new or --without-xterm-new was given.
5349 if test "${with_xterm_new+set}" = set; then
5350   withval="$with_xterm_new"
5351   with_xterm_new=$withval
5352 else
5353   with_xterm_new=yes
5354 fi;
5355 case $with_xterm_new in
5356 no)     with_xterm_new=xterm-old;;
5357 *)      with_xterm_new=xterm-new;;
5358 esac
5359 echo "$as_me:5359: result: $with_xterm_new" >&5
5360 echo "${ECHO_T}$with_xterm_new" >&6
5361 WHICH_XTERM=$with_xterm_new
5362
5363 MAKE_TERMINFO=
5364 if test "$use_database" = no ; then
5365         TERMINFO="${datadir}/terminfo"
5366         MAKE_TERMINFO="#"
5367 else
5368
5369 echo "$as_me:5369: checking for list of terminfo directories" >&5
5370 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5371
5372 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5373 if test "${with_terminfo_dirs+set}" = set; then
5374   withval="$with_terminfo_dirs"
5375
5376 else
5377   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5378 fi;
5379 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5380 cf_dst_path=
5381 for cf_src_path in $withval
5382 do
5383
5384 if test "x$prefix" != xNONE; then
5385   cf_path_syntax="$prefix"
5386 else
5387   cf_path_syntax="$ac_default_prefix"
5388 fi
5389
5390 case ".$cf_src_path" in #(vi
5391 .\$\(*\)*|.\'*\'*) #(vi
5392   ;;
5393 ..|./*|.\\*) #(vi
5394   ;;
5395 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5396   ;;
5397 .\${*prefix}*) #(vi
5398   eval cf_src_path="$cf_src_path"
5399   case ".$cf_src_path" in #(vi
5400   .NONE/*)
5401     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5402     ;;
5403   esac
5404   ;; #(vi
5405 .no|.NONE/*)
5406   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5407   ;;
5408 *)
5409   { { echo "$as_me:5409: error: expected a pathname, not \"$cf_src_path\"" >&5
5410 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5411    { (exit 1); exit 1; }; }
5412   ;;
5413 esac
5414
5415   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5416   cf_dst_path="${cf_dst_path}${cf_src_path}"
5417 done
5418 IFS="$ac_save_ifs"
5419
5420 eval 'TERMINFO_DIRS="$cf_dst_path"'
5421
5422 echo "$as_me:5422: result: $TERMINFO_DIRS" >&5
5423 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5424 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5425 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5426 EOF
5427
5428 echo "$as_me:5428: checking for default terminfo directory" >&5
5429 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5430
5431 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5432 if test "${with_default_terminfo_dir+set}" = set; then
5433   withval="$with_default_terminfo_dir"
5434
5435 else
5436   withval="${TERMINFO-${datadir}/terminfo}"
5437 fi;
5438 if test "x$prefix" != xNONE; then
5439   cf_path_syntax="$prefix"
5440 else
5441   cf_path_syntax="$ac_default_prefix"
5442 fi
5443
5444 case ".$withval" in #(vi
5445 .\$\(*\)*|.\'*\'*) #(vi
5446   ;;
5447 ..|./*|.\\*) #(vi
5448   ;;
5449 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5450   ;;
5451 .\${*prefix}*) #(vi
5452   eval withval="$withval"
5453   case ".$withval" in #(vi
5454   .NONE/*)
5455     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5456     ;;
5457   esac
5458   ;; #(vi
5459 .no|.NONE/*)
5460   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5461   ;;
5462 *)
5463   { { echo "$as_me:5463: error: expected a pathname, not \"$withval\"" >&5
5464 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5465    { (exit 1); exit 1; }; }
5466   ;;
5467 esac
5468
5469 TERMINFO="$withval"
5470
5471 echo "$as_me:5471: result: $TERMINFO" >&5
5472 echo "${ECHO_T}$TERMINFO" >&6
5473 cat >>confdefs.h <<EOF
5474 #define TERMINFO "$TERMINFO"
5475 EOF
5476
5477 fi
5478
5479 ###     use option --disable-big-core to make tic run on small machines
5480 ###     We need 4Mb, check if we can allocate 50% more than that.
5481 echo "$as_me:5481: checking if big-core option selected" >&5
5482 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5483
5484 # Check whether --enable-big-core or --disable-big-core was given.
5485 if test "${enable_big_core+set}" = set; then
5486   enableval="$enable_big_core"
5487   with_big_core=$enableval
5488 else
5489   if test "$cross_compiling" = yes; then
5490   with_big_core=no
5491 else
5492   cat >conftest.$ac_ext <<_ACEOF
5493 #line 5493 "configure"
5494 #include "confdefs.h"
5495
5496 #include <stdlib.h>
5497 #include <string.h>
5498 int main() {
5499         unsigned long n = 6000000L;
5500         char *s = malloc(n);
5501         if (s != 0)
5502                 s[0] = s[n-1] = 0;
5503         ${cf_cv_main_return:-return}(s == 0);
5504 }
5505 _ACEOF
5506 rm -f conftest$ac_exeext
5507 if { (eval echo "$as_me:5507: \"$ac_link\"") >&5
5508   (eval $ac_link) 2>&5
5509   ac_status=$?
5510   echo "$as_me:5510: \$? = $ac_status" >&5
5511   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5512   { (eval echo "$as_me:5512: \"$ac_try\"") >&5
5513   (eval $ac_try) 2>&5
5514   ac_status=$?
5515   echo "$as_me:5515: \$? = $ac_status" >&5
5516   (exit $ac_status); }; }; then
5517   with_big_core=yes
5518 else
5519   echo "$as_me: program exited with status $ac_status" >&5
5520 echo "$as_me: failed program was:" >&5
5521 cat conftest.$ac_ext >&5
5522 with_big_core=no
5523 fi
5524 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5525 fi
5526 fi;
5527 echo "$as_me:5527: result: $with_big_core" >&5
5528 echo "${ECHO_T}$with_big_core" >&6
5529 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5530 #define HAVE_BIG_CORE 1
5531 EOF
5532
5533 ###     use option --enable-termcap to compile in the termcap fallback support
5534 echo "$as_me:5534: checking if you want termcap-fallback support" >&5
5535 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5536
5537 # Check whether --enable-termcap or --disable-termcap was given.
5538 if test "${enable_termcap+set}" = set; then
5539   enableval="$enable_termcap"
5540   with_termcap=$enableval
5541 else
5542   with_termcap=no
5543 fi;
5544 echo "$as_me:5544: result: $with_termcap" >&5
5545 echo "${ECHO_T}$with_termcap" >&6
5546
5547 if test "$with_termcap" != "yes" ; then
5548         if test "$use_database" = no ; then
5549                 if test -z "$with_fallback" ; then
5550                         { { echo "$as_me:5550: error: You have disabled the database w/o specifying fallbacks" >&5
5551 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5552    { (exit 1); exit 1; }; }
5553                 fi
5554         fi
5555         cat >>confdefs.h <<\EOF
5556 #define PURE_TERMINFO 1
5557 EOF
5558
5559 else
5560
5561 if test "$with_ticlib" != no ; then
5562         { { echo "$as_me:5562: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5563 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5564    { (exit 1); exit 1; }; }
5565 fi
5566
5567 cat >>confdefs.h <<\EOF
5568 #define USE_TERMCAP 1
5569 EOF
5570
5571 echo "$as_me:5571: checking for list of termcap files" >&5
5572 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5573
5574 # Check whether --with-termpath or --without-termpath was given.
5575 if test "${with_termpath+set}" = set; then
5576   withval="$with_termpath"
5577
5578 else
5579   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5580 fi;
5581 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5582 cf_dst_path=
5583 for cf_src_path in $withval
5584 do
5585
5586 if test "x$prefix" != xNONE; then
5587   cf_path_syntax="$prefix"
5588 else
5589   cf_path_syntax="$ac_default_prefix"
5590 fi
5591
5592 case ".$cf_src_path" in #(vi
5593 .\$\(*\)*|.\'*\'*) #(vi
5594   ;;
5595 ..|./*|.\\*) #(vi
5596   ;;
5597 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5598   ;;
5599 .\${*prefix}*) #(vi
5600   eval cf_src_path="$cf_src_path"
5601   case ".$cf_src_path" in #(vi
5602   .NONE/*)
5603     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5604     ;;
5605   esac
5606   ;; #(vi
5607 .no|.NONE/*)
5608   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5609   ;;
5610 *)
5611   { { echo "$as_me:5611: error: expected a pathname, not \"$cf_src_path\"" >&5
5612 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5613    { (exit 1); exit 1; }; }
5614   ;;
5615 esac
5616
5617   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5618   cf_dst_path="${cf_dst_path}${cf_src_path}"
5619 done
5620 IFS="$ac_save_ifs"
5621
5622 eval 'TERMPATH="$cf_dst_path"'
5623
5624 echo "$as_me:5624: result: $TERMPATH" >&5
5625 echo "${ECHO_T}$TERMPATH" >&6
5626 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5627 #define TERMPATH "$TERMPATH"
5628 EOF
5629
5630 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5631 echo "$as_me:5631: checking if fast termcap-loader is needed" >&5
5632 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5633
5634 # Check whether --enable-getcap or --disable-getcap was given.
5635 if test "${enable_getcap+set}" = set; then
5636   enableval="$enable_getcap"
5637   with_getcap=$enableval
5638 else
5639   with_getcap=no
5640 fi;
5641 echo "$as_me:5641: result: $with_getcap" >&5
5642 echo "${ECHO_T}$with_getcap" >&6
5643 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5644 #define USE_GETCAP 1
5645 EOF
5646
5647 echo "$as_me:5647: checking if translated termcaps will be cached in ~/.terminfo" >&5
5648 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5649
5650 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5651 if test "${enable_getcap_cache+set}" = set; then
5652   enableval="$enable_getcap_cache"
5653   with_getcap_cache=$enableval
5654 else
5655   with_getcap_cache=no
5656 fi;
5657 echo "$as_me:5657: result: $with_getcap_cache" >&5
5658 echo "${ECHO_T}$with_getcap_cache" >&6
5659 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5660 #define USE_GETCAP_CACHE 1
5661 EOF
5662
5663 fi
5664
5665 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5666 echo "$as_me:5666: checking if ~/.terminfo is wanted" >&5
5667 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5668
5669 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5670 if test "${enable_home_terminfo+set}" = set; then
5671   enableval="$enable_home_terminfo"
5672   with_home_terminfo=$enableval
5673 else
5674   with_home_terminfo=yes
5675 fi;
5676 echo "$as_me:5676: result: $with_home_terminfo" >&5
5677 echo "${ECHO_T}$with_home_terminfo" >&6
5678 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5679 #define USE_HOME_TERMINFO 1
5680 EOF
5681
5682 echo "$as_me:5682: checking if you want to use restricted environment when running as root" >&5
5683 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5684
5685 # Check whether --enable-root-environ or --disable-root-environ was given.
5686 if test "${enable_root_environ+set}" = set; then
5687   enableval="$enable_root_environ"
5688   with_root_environ=$enableval
5689 else
5690   with_root_environ=yes
5691 fi;
5692 echo "$as_me:5692: result: $with_root_environ" >&5
5693 echo "${ECHO_T}$with_root_environ" >&6
5694 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5695 #define USE_ROOT_ENVIRON 1
5696 EOF
5697
5698 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5699 ###   to reduce storage requirements for the terminfo database.
5700
5701 for ac_func in \
5702         remove \
5703         unlink
5704 do
5705 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5706 echo "$as_me:5706: checking for $ac_func" >&5
5707 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5708 if eval "test \"\${$as_ac_var+set}\" = set"; then
5709   echo $ECHO_N "(cached) $ECHO_C" >&6
5710 else
5711   cat >conftest.$ac_ext <<_ACEOF
5712 #line 5712 "configure"
5713 #include "confdefs.h"
5714 /* System header to define __stub macros and hopefully few prototypes,
5715     which can conflict with char $ac_func (); below.  */
5716 #include <assert.h>
5717 /* Override any gcc2 internal prototype to avoid an error.  */
5718 #ifdef __cplusplus
5719 extern "C"
5720 #endif
5721 /* We use char because int might match the return type of a gcc2
5722    builtin and then its argument prototype would still apply.  */
5723 char $ac_func ();
5724 char (*f) ();
5725
5726 int
5727 main ()
5728 {
5729 /* The GNU C library defines this for functions which it implements
5730     to always fail with ENOSYS.  Some functions are actually named
5731     something starting with __ and the normal name is an alias.  */
5732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5733 choke me
5734 #else
5735 f = $ac_func;
5736 #endif
5737
5738   ;
5739   return 0;
5740 }
5741 _ACEOF
5742 rm -f conftest.$ac_objext conftest$ac_exeext
5743 if { (eval echo "$as_me:5743: \"$ac_link\"") >&5
5744   (eval $ac_link) 2>&5
5745   ac_status=$?
5746   echo "$as_me:5746: \$? = $ac_status" >&5
5747   (exit $ac_status); } &&
5748          { ac_try='test -s conftest$ac_exeext'
5749   { (eval echo "$as_me:5749: \"$ac_try\"") >&5
5750   (eval $ac_try) 2>&5
5751   ac_status=$?
5752   echo "$as_me:5752: \$? = $ac_status" >&5
5753   (exit $ac_status); }; }; then
5754   eval "$as_ac_var=yes"
5755 else
5756   echo "$as_me: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5758 eval "$as_ac_var=no"
5759 fi
5760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5761 fi
5762 echo "$as_me:5762: result: `eval echo '${'$as_ac_var'}'`" >&5
5763 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5764 if test `eval echo '${'$as_ac_var'}'` = yes; then
5765   cat >>confdefs.h <<EOF
5766 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5767 EOF
5768
5769 fi
5770 done
5771
5772 if test "$cross_compiling" = yes ; then
5773
5774 for ac_func in \
5775                 link \
5776                 symlink
5777 do
5778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5779 echo "$as_me:5779: checking for $ac_func" >&5
5780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5781 if eval "test \"\${$as_ac_var+set}\" = set"; then
5782   echo $ECHO_N "(cached) $ECHO_C" >&6
5783 else
5784   cat >conftest.$ac_ext <<_ACEOF
5785 #line 5785 "configure"
5786 #include "confdefs.h"
5787 /* System header to define __stub macros and hopefully few prototypes,
5788     which can conflict with char $ac_func (); below.  */
5789 #include <assert.h>
5790 /* Override any gcc2 internal prototype to avoid an error.  */
5791 #ifdef __cplusplus
5792 extern "C"
5793 #endif
5794 /* We use char because int might match the return type of a gcc2
5795    builtin and then its argument prototype would still apply.  */
5796 char $ac_func ();
5797 char (*f) ();
5798
5799 int
5800 main ()
5801 {
5802 /* The GNU C library defines this for functions which it implements
5803     to always fail with ENOSYS.  Some functions are actually named
5804     something starting with __ and the normal name is an alias.  */
5805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5806 choke me
5807 #else
5808 f = $ac_func;
5809 #endif
5810
5811   ;
5812   return 0;
5813 }
5814 _ACEOF
5815 rm -f conftest.$ac_objext conftest$ac_exeext
5816 if { (eval echo "$as_me:5816: \"$ac_link\"") >&5
5817   (eval $ac_link) 2>&5
5818   ac_status=$?
5819   echo "$as_me:5819: \$? = $ac_status" >&5
5820   (exit $ac_status); } &&
5821          { ac_try='test -s conftest$ac_exeext'
5822   { (eval echo "$as_me:5822: \"$ac_try\"") >&5
5823   (eval $ac_try) 2>&5
5824   ac_status=$?
5825   echo "$as_me:5825: \$? = $ac_status" >&5
5826   (exit $ac_status); }; }; then
5827   eval "$as_ac_var=yes"
5828 else
5829   echo "$as_me: failed program was:" >&5
5830 cat conftest.$ac_ext >&5
5831 eval "$as_ac_var=no"
5832 fi
5833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5834 fi
5835 echo "$as_me:5835: result: `eval echo '${'$as_ac_var'}'`" >&5
5836 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5837 if test `eval echo '${'$as_ac_var'}'` = yes; then
5838   cat >>confdefs.h <<EOF
5839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5840 EOF
5841
5842 fi
5843 done
5844
5845 else
5846         echo "$as_me:5846: checking if link/symlink functions work" >&5
5847 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5848 if test "${cf_cv_link_funcs+set}" = set; then
5849   echo $ECHO_N "(cached) $ECHO_C" >&6
5850 else
5851
5852                 cf_cv_link_funcs=
5853                 for cf_func in link symlink ; do
5854                         if test "$cross_compiling" = yes; then
5855
5856                         eval 'ac_cv_func_'$cf_func'=error'
5857 else
5858   cat >conftest.$ac_ext <<_ACEOF
5859 #line 5859 "configure"
5860 #include "confdefs.h"
5861
5862 #include <sys/types.h>
5863 #include <sys/stat.h>
5864 #ifdef HAVE_UNISTD_H
5865 #include <unistd.h>
5866 #endif
5867 int main()
5868 {
5869         int fail = 0;
5870         char *src = "config.log";
5871         char *dst = "conftest.chk";
5872         struct stat src_sb;
5873         struct stat dst_sb;
5874
5875         stat(src, &src_sb);
5876         fail = ($cf_func("config.log", "conftest.chk") < 0)
5877             || (stat(dst, &dst_sb) < 0)
5878             || (dst_sb.st_mtime != src_sb.st_mtime);
5879 #ifdef HAVE_UNLINK
5880         unlink(dst);
5881 #else
5882         remove(dst);
5883 #endif
5884         ${cf_cv_main_return:-return} (fail);
5885 }
5886
5887 _ACEOF
5888 rm -f conftest$ac_exeext
5889 if { (eval echo "$as_me:5889: \"$ac_link\"") >&5
5890   (eval $ac_link) 2>&5
5891   ac_status=$?
5892   echo "$as_me:5892: \$? = $ac_status" >&5
5893   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5894   { (eval echo "$as_me:5894: \"$ac_try\"") >&5
5895   (eval $ac_try) 2>&5
5896   ac_status=$?
5897   echo "$as_me:5897: \$? = $ac_status" >&5
5898   (exit $ac_status); }; }; then
5899
5900                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5901                         eval 'ac_cv_func_'$cf_func'=yes'
5902 else
5903   echo "$as_me: program exited with status $ac_status" >&5
5904 echo "$as_me: failed program was:" >&5
5905 cat conftest.$ac_ext >&5
5906
5907                         eval 'ac_cv_func_'$cf_func'=no'
5908 fi
5909 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5910 fi
5911                 done
5912                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5913
5914 fi
5915 echo "$as_me:5915: result: $cf_cv_link_funcs" >&5
5916 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5917         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5918 #define HAVE_LINK 1
5919 EOF
5920
5921         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5922 #define HAVE_SYMLINK 1
5923 EOF
5924
5925 fi
5926
5927 with_links=no
5928 with_symlinks=no
5929
5930 # soft links (symbolic links) are useful for some systems where hard links do
5931 # not work, or to make it simpler to copy terminfo trees around.
5932 if test "$ac_cv_func_symlink" = yes ; then
5933     echo "$as_me:5933: checking if tic should use symbolic links" >&5
5934 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5935
5936 # Check whether --enable-symlinks or --disable-symlinks was given.
5937 if test "${enable_symlinks+set}" = set; then
5938   enableval="$enable_symlinks"
5939   with_symlinks=$enableval
5940 else
5941   with_symlinks=no
5942 fi;
5943     echo "$as_me:5943: result: $with_symlinks" >&5
5944 echo "${ECHO_T}$with_symlinks" >&6
5945 fi
5946
5947 # If we have hard links and did not choose to use soft links instead, there is
5948 # no reason to make this choice optional - use the hard links.
5949 if test "$with_symlinks" = no ; then
5950     echo "$as_me:5950: checking if tic should use hard links" >&5
5951 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5952     if test "$ac_cv_func_link" = yes ; then
5953         with_links=yes
5954     else
5955         with_links=no
5956     fi
5957     echo "$as_me:5957: result: $with_links" >&5
5958 echo "${ECHO_T}$with_links" >&6
5959 fi
5960
5961 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5962 #define USE_LINKS 1
5963 EOF
5964
5965 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5966 #define USE_SYMLINKS 1
5967 EOF
5968
5969 ###   use option --enable-broken-linker to force on use of broken-linker support
5970 echo "$as_me:5970: checking if you want broken-linker support code" >&5
5971 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5972
5973 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5974 if test "${enable_broken_linker+set}" = set; then
5975   enableval="$enable_broken_linker"
5976   with_broken_linker=$enableval
5977 else
5978   with_broken_linker=${BROKEN_LINKER-no}
5979 fi;
5980 echo "$as_me:5980: result: $with_broken_linker" >&5
5981 echo "${ECHO_T}$with_broken_linker" >&6
5982
5983 BROKEN_LINKER=0
5984 if test "$with_broken_linker" = yes ; then
5985         cat >>confdefs.h <<\EOF
5986 #define BROKEN_LINKER 1
5987 EOF
5988
5989         BROKEN_LINKER=1
5990 elif test "$DFT_LWR_MODEL" = shared ; then
5991         case $cf_cv_system_name in #(vi
5992         cygwin*)
5993                 cat >>confdefs.h <<\EOF
5994 #define BROKEN_LINKER 1
5995 EOF
5996
5997                 BROKEN_LINKER=1
5998                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
5999
6000                 ;;
6001         esac
6002 fi
6003
6004 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6005 echo "$as_me:6005: checking if tputs should process BSD-style prefix padding" >&5
6006 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6007
6008 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6009 if test "${enable_bsdpad+set}" = set; then
6010   enableval="$enable_bsdpad"
6011   with_bsdpad=$enableval
6012 else
6013   with_bsdpad=no
6014 fi;
6015 echo "$as_me:6015: result: $with_bsdpad" >&5
6016 echo "${ECHO_T}$with_bsdpad" >&6
6017 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6018 #define BSD_TPUTS 1
6019 EOF
6020
6021 ###   use option --enable-widec to turn on use of wide-character support
6022 NCURSES_CH_T=chtype
6023 NCURSES_LIBUTF8=0
6024
6025 NEED_WCHAR_H=0
6026 NCURSES_MBSTATE_T=0
6027 NCURSES_WCHAR_T=0
6028 NCURSES_WINT_T=0
6029
6030 # Check to define _XOPEN_SOURCE "automatically"
6031
6032 echo "$as_me:6032: checking if $CC -U and -D options work together" >&5
6033 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6034 if test "${cf_cv_cc_u_d_options+set}" = set; then
6035   echo $ECHO_N "(cached) $ECHO_C" >&6
6036 else
6037
6038         cf_save_CPPFLAGS="$CPPFLAGS"
6039         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6040         cat >conftest.$ac_ext <<_ACEOF
6041 #line 6041 "configure"
6042 #include "confdefs.h"
6043
6044 int
6045 main ()
6046 {
6047
6048 #ifndef U_D_OPTIONS
6049 make an undefined-error
6050 #endif
6051 #ifdef  D_U_OPTIONS
6052 make a defined-error
6053 #endif
6054
6055   ;
6056   return 0;
6057 }
6058 _ACEOF
6059 rm -f conftest.$ac_objext
6060 if { (eval echo "$as_me:6060: \"$ac_compile\"") >&5
6061   (eval $ac_compile) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit $ac_status); } &&
6065          { ac_try='test -s conftest.$ac_objext'
6066   { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit $ac_status); }; }; then
6071
6072         cf_cv_cc_u_d_options=yes
6073 else
6074   echo "$as_me: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076
6077         cf_cv_cc_u_d_options=no
6078 fi
6079 rm -f conftest.$ac_objext conftest.$ac_ext
6080         CPPFLAGS="$cf_save_CPPFLAGS"
6081
6082 fi
6083 echo "$as_me:6083: result: $cf_cv_cc_u_d_options" >&5
6084 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6085
6086 cf_XOPEN_SOURCE=500
6087 cf_POSIX_C_SOURCE=199506L
6088
6089 case $host_os in #(vi
6090 aix[45]*) #(vi
6091         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6092         ;;
6093 freebsd*) #(vi
6094         # 5.x headers associate
6095         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6096         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6097         cf_POSIX_C_SOURCE=200112L
6098         cf_XOPEN_SOURCE=600
6099         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6100         ;;
6101 hpux*) #(vi
6102         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6103         ;;
6104 irix[56].*) #(vi
6105         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6106         ;;
6107 linux*|gnu*|k*bsd*-gnu) #(vi
6108
6109 echo "$as_me:6109: checking if we must define _GNU_SOURCE" >&5
6110 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6111 if test "${cf_cv_gnu_source+set}" = set; then
6112   echo $ECHO_N "(cached) $ECHO_C" >&6
6113 else
6114
6115 cat >conftest.$ac_ext <<_ACEOF
6116 #line 6116 "configure"
6117 #include "confdefs.h"
6118 #include <sys/types.h>
6119 int
6120 main ()
6121 {
6122
6123 #ifndef _XOPEN_SOURCE
6124 make an error
6125 #endif
6126   ;
6127   return 0;
6128 }
6129 _ACEOF
6130 rm -f conftest.$ac_objext
6131 if { (eval echo "$as_me:6131: \"$ac_compile\"") >&5
6132   (eval $ac_compile) 2>&5
6133   ac_status=$?
6134   echo "$as_me:6134: \$? = $ac_status" >&5
6135   (exit $ac_status); } &&
6136          { ac_try='test -s conftest.$ac_objext'
6137   { (eval echo "$as_me:6137: \"$ac_try\"") >&5
6138   (eval $ac_try) 2>&5
6139   ac_status=$?
6140   echo "$as_me:6140: \$? = $ac_status" >&5
6141   (exit $ac_status); }; }; then
6142   cf_cv_gnu_source=no
6143 else
6144   echo "$as_me: failed program was:" >&5
6145 cat conftest.$ac_ext >&5
6146 cf_save="$CPPFLAGS"
6147          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6148          cat >conftest.$ac_ext <<_ACEOF
6149 #line 6149 "configure"
6150 #include "confdefs.h"
6151 #include <sys/types.h>
6152 int
6153 main ()
6154 {
6155
6156 #ifdef _XOPEN_SOURCE
6157 make an error
6158 #endif
6159   ;
6160   return 0;
6161 }
6162 _ACEOF
6163 rm -f conftest.$ac_objext
6164 if { (eval echo "$as_me:6164: \"$ac_compile\"") >&5
6165   (eval $ac_compile) 2>&5
6166   ac_status=$?
6167   echo "$as_me:6167: \$? = $ac_status" >&5
6168   (exit $ac_status); } &&
6169          { ac_try='test -s conftest.$ac_objext'
6170   { (eval echo "$as_me:6170: \"$ac_try\"") >&5
6171   (eval $ac_try) 2>&5
6172   ac_status=$?
6173   echo "$as_me:6173: \$? = $ac_status" >&5
6174   (exit $ac_status); }; }; then
6175   cf_cv_gnu_source=no
6176 else
6177   echo "$as_me: failed program was:" >&5
6178 cat conftest.$ac_ext >&5
6179 cf_cv_gnu_source=yes
6180 fi
6181 rm -f conftest.$ac_objext conftest.$ac_ext
6182         CPPFLAGS="$cf_save"
6183
6184 fi
6185 rm -f conftest.$ac_objext conftest.$ac_ext
6186
6187 fi
6188 echo "$as_me:6188: result: $cf_cv_gnu_source" >&5
6189 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6190 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6191
6192         ;;
6193 mirbsd*) #(vi
6194         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6195         ;;
6196 netbsd*) #(vi
6197         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6198         ;;
6199 openbsd*) #(vi
6200         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6201         ;;
6202 osf[45]*) #(vi
6203         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6204         ;;
6205 nto-qnx*) #(vi
6206         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6207         ;;
6208 sco*) #(vi
6209         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6210         ;;
6211 solaris*) #(vi
6212         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6213         ;;
6214 *)
6215         echo "$as_me:6215: checking if we should define _XOPEN_SOURCE" >&5
6216 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6217 if test "${cf_cv_xopen_source+set}" = set; then
6218   echo $ECHO_N "(cached) $ECHO_C" >&6
6219 else
6220
6221         cat >conftest.$ac_ext <<_ACEOF
6222 #line 6222 "configure"
6223 #include "confdefs.h"
6224 #include <sys/types.h>
6225 int
6226 main ()
6227 {
6228
6229 #ifndef _XOPEN_SOURCE
6230 make an error
6231 #endif
6232   ;
6233   return 0;
6234 }
6235 _ACEOF
6236 rm -f conftest.$ac_objext
6237 if { (eval echo "$as_me:6237: \"$ac_compile\"") >&5
6238   (eval $ac_compile) 2>&5
6239   ac_status=$?
6240   echo "$as_me:6240: \$? = $ac_status" >&5
6241   (exit $ac_status); } &&
6242          { ac_try='test -s conftest.$ac_objext'
6243   { (eval echo "$as_me:6243: \"$ac_try\"") >&5
6244   (eval $ac_try) 2>&5
6245   ac_status=$?
6246   echo "$as_me:6246: \$? = $ac_status" >&5
6247   (exit $ac_status); }; }; then
6248   cf_cv_xopen_source=no
6249 else
6250   echo "$as_me: failed program was:" >&5
6251 cat conftest.$ac_ext >&5
6252 cf_save="$CPPFLAGS"
6253          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6254          cat >conftest.$ac_ext <<_ACEOF
6255 #line 6255 "configure"
6256 #include "confdefs.h"
6257 #include <sys/types.h>
6258 int
6259 main ()
6260 {
6261
6262 #ifdef _XOPEN_SOURCE
6263 make an error
6264 #endif
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -f conftest.$ac_objext
6270 if { (eval echo "$as_me:6270: \"$ac_compile\"") >&5
6271   (eval $ac_compile) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); } &&
6275          { ac_try='test -s conftest.$ac_objext'
6276   { (eval echo "$as_me:6276: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:6279: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   cf_cv_xopen_source=no
6282 else
6283   echo "$as_me: failed program was:" >&5
6284 cat conftest.$ac_ext >&5
6285 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6286 fi
6287 rm -f conftest.$ac_objext conftest.$ac_ext
6288         CPPFLAGS="$cf_save"
6289
6290 fi
6291 rm -f conftest.$ac_objext conftest.$ac_ext
6292
6293 fi
6294 echo "$as_me:6294: result: $cf_cv_xopen_source" >&5
6295 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6296         if test "$cf_cv_xopen_source" != no ; then
6297
6298 # remove _XOPEN_SOURCE symbol from $CFLAGS
6299 CFLAGS=`echo "$CFLAGS" | \
6300         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6301                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6302
6303 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6304 CPPFLAGS=`echo "$CPPFLAGS" | \
6305         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6306                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6307
6308                 test "$cf_cv_cc_u_d_options" = yes && \
6309                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6310                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6311         fi
6312
6313 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6314
6315 cf_save_CFLAGS="$CFLAGS"
6316 cf_save_CPPFLAGS="$CPPFLAGS"
6317
6318 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6319 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6320         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6321                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6322
6323 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6324 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6325         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6326                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6327
6328 echo "$as_me:6328: checking if we should define _POSIX_C_SOURCE" >&5
6329 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6330 if test "${cf_cv_posix_c_source+set}" = set; then
6331   echo $ECHO_N "(cached) $ECHO_C" >&6
6332 else
6333
6334 echo "(line 6334) testing if the symbol is already defined go no further ..." 1>&5
6335
6336         cat >conftest.$ac_ext <<_ACEOF
6337 #line 6337 "configure"
6338 #include "confdefs.h"
6339 #include <sys/types.h>
6340 int
6341 main ()
6342 {
6343
6344 #ifndef _POSIX_C_SOURCE
6345 make an error
6346 #endif
6347   ;
6348   return 0;
6349 }
6350 _ACEOF
6351 rm -f conftest.$ac_objext
6352 if { (eval echo "$as_me:6352: \"$ac_compile\"") >&5
6353   (eval $ac_compile) 2>&5
6354   ac_status=$?
6355   echo "$as_me:6355: \$? = $ac_status" >&5
6356   (exit $ac_status); } &&
6357          { ac_try='test -s conftest.$ac_objext'
6358   { (eval echo "$as_me:6358: \"$ac_try\"") >&5
6359   (eval $ac_try) 2>&5
6360   ac_status=$?
6361   echo "$as_me:6361: \$? = $ac_status" >&5
6362   (exit $ac_status); }; }; then
6363   cf_cv_posix_c_source=no
6364 else
6365   echo "$as_me: failed program was:" >&5
6366 cat conftest.$ac_ext >&5
6367 cf_want_posix_source=no
6368          case .$cf_POSIX_C_SOURCE in #(vi
6369          .[12]??*) #(vi
6370                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6371                 ;;
6372          .2) #(vi
6373                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6374                 cf_want_posix_source=yes
6375                 ;;
6376          .*)
6377                 cf_want_posix_source=yes
6378                 ;;
6379          esac
6380          if test "$cf_want_posix_source" = yes ; then
6381                 cat >conftest.$ac_ext <<_ACEOF
6382 #line 6382 "configure"
6383 #include "confdefs.h"
6384 #include <sys/types.h>
6385 int
6386 main ()
6387 {
6388
6389 #ifdef _POSIX_SOURCE
6390 make an error
6391 #endif
6392   ;
6393   return 0;
6394 }
6395 _ACEOF
6396 rm -f conftest.$ac_objext
6397 if { (eval echo "$as_me:6397: \"$ac_compile\"") >&5
6398   (eval $ac_compile) 2>&5
6399   ac_status=$?
6400   echo "$as_me:6400: \$? = $ac_status" >&5
6401   (exit $ac_status); } &&
6402          { ac_try='test -s conftest.$ac_objext'
6403   { (eval echo "$as_me:6403: \"$ac_try\"") >&5
6404   (eval $ac_try) 2>&5
6405   ac_status=$?
6406   echo "$as_me:6406: \$? = $ac_status" >&5
6407   (exit $ac_status); }; }; then
6408   :
6409 else
6410   echo "$as_me: failed program was:" >&5
6411 cat conftest.$ac_ext >&5
6412 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6413 fi
6414 rm -f conftest.$ac_objext conftest.$ac_ext
6415          fi
6416
6417 echo "(line 6417) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6418
6419          CFLAGS="$cf_trim_CFLAGS"
6420          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6421
6422 echo "(line 6422) testing if the second compile does not leave our definition intact error ..." 1>&5
6423
6424          cat >conftest.$ac_ext <<_ACEOF
6425 #line 6425 "configure"
6426 #include "confdefs.h"
6427 #include <sys/types.h>
6428 int
6429 main ()
6430 {
6431
6432 #ifndef _POSIX_C_SOURCE
6433 make an error
6434 #endif
6435   ;
6436   return 0;
6437 }
6438 _ACEOF
6439 rm -f conftest.$ac_objext
6440 if { (eval echo "$as_me:6440: \"$ac_compile\"") >&5
6441   (eval $ac_compile) 2>&5
6442   ac_status=$?
6443   echo "$as_me:6443: \$? = $ac_status" >&5
6444   (exit $ac_status); } &&
6445          { ac_try='test -s conftest.$ac_objext'
6446   { (eval echo "$as_me:6446: \"$ac_try\"") >&5
6447   (eval $ac_try) 2>&5
6448   ac_status=$?
6449   echo "$as_me:6449: \$? = $ac_status" >&5
6450   (exit $ac_status); }; }; then
6451   :
6452 else
6453   echo "$as_me: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6455 cf_cv_posix_c_source=no
6456 fi
6457 rm -f conftest.$ac_objext conftest.$ac_ext
6458          CFLAGS="$cf_save_CFLAGS"
6459          CPPFLAGS="$cf_save_CPPFLAGS"
6460
6461 fi
6462 rm -f conftest.$ac_objext conftest.$ac_ext
6463
6464 fi
6465 echo "$as_me:6465: result: $cf_cv_posix_c_source" >&5
6466 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6467
6468 if test "$cf_cv_posix_c_source" != no ; then
6469         CFLAGS="$cf_trim_CFLAGS"
6470         CPPFLAGS="$cf_trim_CPPFLAGS"
6471         if test "$cf_cv_cc_u_d_options" = yes ; then
6472                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6473                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6474                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6475         fi
6476         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6477 fi
6478
6479         ;;
6480 esac
6481
6482 # Work around breakage on OS X
6483
6484 echo "$as_me:6484: checking if SIGWINCH is defined" >&5
6485 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6486 if test "${cf_cv_define_sigwinch+set}" = set; then
6487   echo $ECHO_N "(cached) $ECHO_C" >&6
6488 else
6489
6490         cat >conftest.$ac_ext <<_ACEOF
6491 #line 6491 "configure"
6492 #include "confdefs.h"
6493
6494 #include <sys/types.h>
6495 #include <sys/signal.h>
6496
6497 int
6498 main ()
6499 {
6500 int x = SIGWINCH
6501   ;
6502   return 0;
6503 }
6504 _ACEOF
6505 rm -f conftest.$ac_objext
6506 if { (eval echo "$as_me:6506: \"$ac_compile\"") >&5
6507   (eval $ac_compile) 2>&5
6508   ac_status=$?
6509   echo "$as_me:6509: \$? = $ac_status" >&5
6510   (exit $ac_status); } &&
6511          { ac_try='test -s conftest.$ac_objext'
6512   { (eval echo "$as_me:6512: \"$ac_try\"") >&5
6513   (eval $ac_try) 2>&5
6514   ac_status=$?
6515   echo "$as_me:6515: \$? = $ac_status" >&5
6516   (exit $ac_status); }; }; then
6517   cf_cv_define_sigwinch=yes
6518 else
6519   echo "$as_me: failed program was:" >&5
6520 cat conftest.$ac_ext >&5
6521 cat >conftest.$ac_ext <<_ACEOF
6522 #line 6522 "configure"
6523 #include "confdefs.h"
6524
6525 #undef _XOPEN_SOURCE
6526 #undef _POSIX_SOURCE
6527 #undef _POSIX_C_SOURCE
6528 #include <sys/types.h>
6529 #include <sys/signal.h>
6530
6531 int
6532 main ()
6533 {
6534 int x = SIGWINCH
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 rm -f conftest.$ac_objext
6540 if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
6541   (eval $ac_compile) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -s conftest.$ac_objext'
6546   { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547   (eval $ac_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }; }; then
6551   cf_cv_define_sigwinch=maybe
6552 else
6553   echo "$as_me: failed program was:" >&5
6554 cat conftest.$ac_ext >&5
6555 cf_cv_define_sigwinch=no
6556 fi
6557 rm -f conftest.$ac_objext conftest.$ac_ext
6558
6559 fi
6560 rm -f conftest.$ac_objext conftest.$ac_ext
6561
6562 fi
6563 echo "$as_me:6563: result: $cf_cv_define_sigwinch" >&5
6564 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6565
6566 if test "$cf_cv_define_sigwinch" = maybe ; then
6567 echo "$as_me:6567: checking for actual SIGWINCH definition" >&5
6568 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6569 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6570   echo $ECHO_N "(cached) $ECHO_C" >&6
6571 else
6572
6573 cf_cv_fixup_sigwinch=unknown
6574 cf_sigwinch=32
6575 while test $cf_sigwinch != 1
6576 do
6577         cat >conftest.$ac_ext <<_ACEOF
6578 #line 6578 "configure"
6579 #include "confdefs.h"
6580
6581 #undef _XOPEN_SOURCE
6582 #undef _POSIX_SOURCE
6583 #undef _POSIX_C_SOURCE
6584 #include <sys/types.h>
6585 #include <sys/signal.h>
6586
6587 int
6588 main ()
6589 {
6590
6591 #if SIGWINCH != $cf_sigwinch
6592 make an error
6593 #endif
6594 int x = SIGWINCH
6595   ;
6596   return 0;
6597 }
6598 _ACEOF
6599 rm -f conftest.$ac_objext
6600 if { (eval echo "$as_me:6600: \"$ac_compile\"") >&5
6601   (eval $ac_compile) 2>&5
6602   ac_status=$?
6603   echo "$as_me:6603: \$? = $ac_status" >&5
6604   (exit $ac_status); } &&
6605          { ac_try='test -s conftest.$ac_objext'
6606   { (eval echo "$as_me:6606: \"$ac_try\"") >&5
6607   (eval $ac_try) 2>&5
6608   ac_status=$?
6609   echo "$as_me:6609: \$? = $ac_status" >&5
6610   (exit $ac_status); }; }; then
6611   cf_cv_fixup_sigwinch=$cf_sigwinch
6612          break
6613 else
6614   echo "$as_me: failed program was:" >&5
6615 cat conftest.$ac_ext >&5
6616 fi
6617 rm -f conftest.$ac_objext conftest.$ac_ext
6618
6619 cf_sigwinch=`expr $cf_sigwinch - 1`
6620 done
6621
6622 fi
6623 echo "$as_me:6623: result: $cf_cv_fixup_sigwinch" >&5
6624 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6625
6626         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6627                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6628         fi
6629 fi
6630
6631 # Checks for CODESET support.
6632
6633   echo "$as_me:6633: checking for nl_langinfo and CODESET" >&5
6634 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6635 if test "${am_cv_langinfo_codeset+set}" = set; then
6636   echo $ECHO_N "(cached) $ECHO_C" >&6
6637 else
6638   cat >conftest.$ac_ext <<_ACEOF
6639 #line 6639 "configure"
6640 #include "confdefs.h"
6641 #include <langinfo.h>
6642 int
6643 main ()
6644 {
6645 char* cs = nl_langinfo(CODESET);
6646   ;
6647   return 0;
6648 }
6649 _ACEOF
6650 rm -f conftest.$ac_objext conftest$ac_exeext
6651 if { (eval echo "$as_me:6651: \"$ac_link\"") >&5
6652   (eval $ac_link) 2>&5
6653   ac_status=$?
6654   echo "$as_me:6654: \$? = $ac_status" >&5
6655   (exit $ac_status); } &&
6656          { ac_try='test -s conftest$ac_exeext'
6657   { (eval echo "$as_me:6657: \"$ac_try\"") >&5
6658   (eval $ac_try) 2>&5
6659   ac_status=$?
6660   echo "$as_me:6660: \$? = $ac_status" >&5
6661   (exit $ac_status); }; }; then
6662   am_cv_langinfo_codeset=yes
6663 else
6664   echo "$as_me: failed program was:" >&5
6665 cat conftest.$ac_ext >&5
6666 am_cv_langinfo_codeset=no
6667 fi
6668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6669
6670 fi
6671 echo "$as_me:6671: result: $am_cv_langinfo_codeset" >&5
6672 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6673   if test $am_cv_langinfo_codeset = yes; then
6674
6675 cat >>confdefs.h <<\EOF
6676 #define HAVE_LANGINFO_CODESET 1
6677 EOF
6678
6679   fi
6680
6681 # use these variables to work around a defect in gcc's fixincludes.
6682 NCURSES_OK_WCHAR_T=
6683 NCURSES_OK_WINT_T=
6684
6685 echo "$as_me:6685: checking if you want wide-character code" >&5
6686 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6687
6688 # Check whether --enable-widec or --disable-widec was given.
6689 if test "${enable_widec+set}" = set; then
6690   enableval="$enable_widec"
6691   with_widec=$enableval
6692 else
6693   with_widec=no
6694 fi;
6695 echo "$as_me:6695: result: $with_widec" >&5
6696 echo "${ECHO_T}$with_widec" >&6
6697 if test "$with_widec" = yes ; then
6698         LIB_SUFFIX="w${LIB_SUFFIX}"
6699         cat >>confdefs.h <<\EOF
6700 #define USE_WIDEC_SUPPORT 1
6701 EOF
6702
6703 echo "$as_me:6703: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6704 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6705 cat >conftest.$ac_ext <<_ACEOF
6706 #line 6706 "configure"
6707 #include "confdefs.h"
6708 #include <sys/types.h>
6709
6710 int
6711 main ()
6712 {
6713
6714 #ifndef _XOPEN_SOURCE_EXTENDED
6715 make an error
6716 #endif
6717   ;
6718   return 0;
6719 }
6720 _ACEOF
6721 rm -f conftest.$ac_objext
6722 if { (eval echo "$as_me:6722: \"$ac_compile\"") >&5
6723   (eval $ac_compile) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit $ac_status); } &&
6727          { ac_try='test -s conftest.$ac_objext'
6728   { (eval echo "$as_me:6728: \"$ac_try\"") >&5
6729   (eval $ac_try) 2>&5
6730   ac_status=$?
6731   echo "$as_me:6731: \$? = $ac_status" >&5
6732   (exit $ac_status); }; }; then
6733   cf_result=no
6734 else
6735   echo "$as_me: failed program was:" >&5
6736 cat conftest.$ac_ext >&5
6737 cf_result=yes
6738 fi
6739 rm -f conftest.$ac_objext conftest.$ac_ext
6740 echo "$as_me:6740: result: $cf_result" >&5
6741 echo "${ECHO_T}$cf_result" >&6
6742
6743 if test "$cf_result" = yes ; then
6744         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6745 elif test "x" != "x" ; then
6746         echo "$as_me:6746: checking checking for compatible value versus " >&5
6747 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6748         cat >conftest.$ac_ext <<_ACEOF
6749 #line 6749 "configure"
6750 #include "confdefs.h"
6751 #include <sys/types.h>
6752
6753 int
6754 main ()
6755 {
6756
6757 #if _XOPEN_SOURCE_EXTENDED- < 0
6758 make an error
6759 #endif
6760   ;
6761   return 0;
6762 }
6763 _ACEOF
6764 rm -f conftest.$ac_objext
6765 if { (eval echo "$as_me:6765: \"$ac_compile\"") >&5
6766   (eval $ac_compile) 2>&5
6767   ac_status=$?
6768   echo "$as_me:6768: \$? = $ac_status" >&5
6769   (exit $ac_status); } &&
6770          { ac_try='test -s conftest.$ac_objext'
6771   { (eval echo "$as_me:6771: \"$ac_try\"") >&5
6772   (eval $ac_try) 2>&5
6773   ac_status=$?
6774   echo "$as_me:6774: \$? = $ac_status" >&5
6775   (exit $ac_status); }; }; then
6776   cf_result=yes
6777 else
6778   echo "$as_me: failed program was:" >&5
6779 cat conftest.$ac_ext >&5
6780 cf_result=no
6781 fi
6782 rm -f conftest.$ac_objext conftest.$ac_ext
6783         echo "$as_me:6783: result: $cf_result" >&5
6784 echo "${ECHO_T}$cf_result" >&6
6785         if test "$cf_result" = no ; then
6786                 # perhaps we can override it - try...
6787                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6788         fi
6789 fi
6790
6791         # with_overwrite=no
6792         NCURSES_CH_T=cchar_t
6793
6794 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6795 do
6796 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6797 echo "$as_me:6797: checking for $ac_func" >&5
6798 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6799 if eval "test \"\${$as_ac_var+set}\" = set"; then
6800   echo $ECHO_N "(cached) $ECHO_C" >&6
6801 else
6802   cat >conftest.$ac_ext <<_ACEOF
6803 #line 6803 "configure"
6804 #include "confdefs.h"
6805 /* System header to define __stub macros and hopefully few prototypes,
6806     which can conflict with char $ac_func (); below.  */
6807 #include <assert.h>
6808 /* Override any gcc2 internal prototype to avoid an error.  */
6809 #ifdef __cplusplus
6810 extern "C"
6811 #endif
6812 /* We use char because int might match the return type of a gcc2
6813    builtin and then its argument prototype would still apply.  */
6814 char $ac_func ();
6815 char (*f) ();
6816
6817 int
6818 main ()
6819 {
6820 /* The GNU C library defines this for functions which it implements
6821     to always fail with ENOSYS.  Some functions are actually named
6822     something starting with __ and the normal name is an alias.  */
6823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6824 choke me
6825 #else
6826 f = $ac_func;
6827 #endif
6828
6829   ;
6830   return 0;
6831 }
6832 _ACEOF
6833 rm -f conftest.$ac_objext conftest$ac_exeext
6834 if { (eval echo "$as_me:6834: \"$ac_link\"") >&5
6835   (eval $ac_link) 2>&5
6836   ac_status=$?
6837   echo "$as_me:6837: \$? = $ac_status" >&5
6838   (exit $ac_status); } &&
6839          { ac_try='test -s conftest$ac_exeext'
6840   { (eval echo "$as_me:6840: \"$ac_try\"") >&5
6841   (eval $ac_try) 2>&5
6842   ac_status=$?
6843   echo "$as_me:6843: \$? = $ac_status" >&5
6844   (exit $ac_status); }; }; then
6845   eval "$as_ac_var=yes"
6846 else
6847   echo "$as_me: failed program was:" >&5
6848 cat conftest.$ac_ext >&5
6849 eval "$as_ac_var=no"
6850 fi
6851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6852 fi
6853 echo "$as_me:6853: result: `eval echo '${'$as_ac_var'}'`" >&5
6854 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6855 if test `eval echo '${'$as_ac_var'}'` = yes; then
6856   cat >>confdefs.h <<EOF
6857 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6858 EOF
6859
6860 fi
6861 done
6862
6863         if test "$ac_cv_func_putwc" != yes ; then
6864
6865 echo "$as_me:6865: checking for putwc in libutf8" >&5
6866 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6867 if test "${cf_cv_libutf8+set}" = set; then
6868   echo $ECHO_N "(cached) $ECHO_C" >&6
6869 else
6870
6871         cf_save_LIBS="$LIBS"
6872         LIBS="-lutf8 $LIBS"
6873 cat >conftest.$ac_ext <<_ACEOF
6874 #line 6874 "configure"
6875 #include "confdefs.h"
6876
6877 #include <libutf8.h>
6878 int
6879 main ()
6880 {
6881 putwc(0,0);
6882   ;
6883   return 0;
6884 }
6885 _ACEOF
6886 rm -f conftest.$ac_objext conftest$ac_exeext
6887 if { (eval echo "$as_me:6887: \"$ac_link\"") >&5
6888   (eval $ac_link) 2>&5
6889   ac_status=$?
6890   echo "$as_me:6890: \$? = $ac_status" >&5
6891   (exit $ac_status); } &&
6892          { ac_try='test -s conftest$ac_exeext'
6893   { (eval echo "$as_me:6893: \"$ac_try\"") >&5
6894   (eval $ac_try) 2>&5
6895   ac_status=$?
6896   echo "$as_me:6896: \$? = $ac_status" >&5
6897   (exit $ac_status); }; }; then
6898   cf_cv_libutf8=yes
6899 else
6900   echo "$as_me: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 cf_cv_libutf8=no
6903 fi
6904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6905         LIBS="$cf_save_LIBS"
6906
6907 fi
6908 echo "$as_me:6908: result: $cf_cv_libutf8" >&5
6909 echo "${ECHO_T}$cf_cv_libutf8" >&6
6910
6911 if test "$cf_cv_libutf8" = yes ; then
6912         cat >>confdefs.h <<\EOF
6913 #define HAVE_LIBUTF8_H 1
6914 EOF
6915
6916         LIBS="-lutf8 $LIBS"
6917 fi
6918
6919                 if test "$cf_cv_libutf8" = yes ; then
6920                         NCURSES_LIBUTF8=1
6921                 fi
6922         fi
6923
6924 # This is needed on Tru64 5.0 to declare mbstate_t
6925 echo "$as_me:6925: checking if we must include wchar.h to declare mbstate_t" >&5
6926 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6927 if test "${cf_cv_mbstate_t+set}" = set; then
6928   echo $ECHO_N "(cached) $ECHO_C" >&6
6929 else
6930
6931 cat >conftest.$ac_ext <<_ACEOF
6932 #line 6932 "configure"
6933 #include "confdefs.h"
6934
6935 #include <stdlib.h>
6936 #include <stdarg.h>
6937 #include <stdio.h>
6938 #ifdef HAVE_LIBUTF8_H
6939 #include <libutf8.h>
6940 #endif
6941 int
6942 main ()
6943 {
6944 mbstate_t state
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 rm -f conftest.$ac_objext
6950 if { (eval echo "$as_me:6950: \"$ac_compile\"") >&5
6951   (eval $ac_compile) 2>&5
6952   ac_status=$?
6953   echo "$as_me:6953: \$? = $ac_status" >&5
6954   (exit $ac_status); } &&
6955          { ac_try='test -s conftest.$ac_objext'
6956   { (eval echo "$as_me:6956: \"$ac_try\"") >&5
6957   (eval $ac_try) 2>&5
6958   ac_status=$?
6959   echo "$as_me:6959: \$? = $ac_status" >&5
6960   (exit $ac_status); }; }; then
6961   cf_cv_mbstate_t=no
6962 else
6963   echo "$as_me: failed program was:" >&5
6964 cat conftest.$ac_ext >&5
6965 cat >conftest.$ac_ext <<_ACEOF
6966 #line 6966 "configure"
6967 #include "confdefs.h"
6968
6969 #include <stdlib.h>
6970 #include <stdarg.h>
6971 #include <stdio.h>
6972 #include <wchar.h>
6973 #ifdef HAVE_LIBUTF8_H
6974 #include <libutf8.h>
6975 #endif
6976 int
6977 main ()
6978 {
6979 mbstate_t value
6980   ;
6981   return 0;
6982 }
6983 _ACEOF
6984 rm -f conftest.$ac_objext
6985 if { (eval echo "$as_me:6985: \"$ac_compile\"") >&5
6986   (eval $ac_compile) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); } &&
6990          { ac_try='test -s conftest.$ac_objext'
6991   { (eval echo "$as_me:6991: \"$ac_try\"") >&5
6992   (eval $ac_try) 2>&5
6993   ac_status=$?
6994   echo "$as_me:6994: \$? = $ac_status" >&5
6995   (exit $ac_status); }; }; then
6996   cf_cv_mbstate_t=yes
6997 else
6998   echo "$as_me: failed program was:" >&5
6999 cat conftest.$ac_ext >&5
7000 cf_cv_mbstate_t=unknown
7001 fi
7002 rm -f conftest.$ac_objext conftest.$ac_ext
7003 fi
7004 rm -f conftest.$ac_objext conftest.$ac_ext
7005 fi
7006 echo "$as_me:7006: result: $cf_cv_mbstate_t" >&5
7007 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7008
7009 if test "$cf_cv_mbstate_t" = yes ; then
7010         cat >>confdefs.h <<\EOF
7011 #define NEED_WCHAR_H 1
7012 EOF
7013
7014         NEED_WCHAR_H=1
7015 fi
7016
7017 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7018 if test "$cf_cv_mbstate_t" = unknown ; then
7019         NCURSES_MBSTATE_T=1
7020 fi
7021
7022 # This is needed on Tru64 5.0 to declare wchar_t
7023 echo "$as_me:7023: checking if we must include wchar.h to declare wchar_t" >&5
7024 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7025 if test "${cf_cv_wchar_t+set}" = set; then
7026   echo $ECHO_N "(cached) $ECHO_C" >&6
7027 else
7028
7029 cat >conftest.$ac_ext <<_ACEOF
7030 #line 7030 "configure"
7031 #include "confdefs.h"
7032
7033 #include <stdlib.h>
7034 #include <stdarg.h>
7035 #include <stdio.h>
7036 #ifdef HAVE_LIBUTF8_H
7037 #include <libutf8.h>
7038 #endif
7039 int
7040 main ()
7041 {
7042 wchar_t state
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f conftest.$ac_objext
7048 if { (eval echo "$as_me:7048: \"$ac_compile\"") >&5
7049   (eval $ac_compile) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit $ac_status); } &&
7053          { ac_try='test -s conftest.$ac_objext'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit $ac_status); }; }; then
7059   cf_cv_wchar_t=no
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat conftest.$ac_ext >&5
7063 cat >conftest.$ac_ext <<_ACEOF
7064 #line 7064 "configure"
7065 #include "confdefs.h"
7066
7067 #include <stdlib.h>
7068 #include <stdarg.h>
7069 #include <stdio.h>
7070 #include <wchar.h>
7071 #ifdef HAVE_LIBUTF8_H
7072 #include <libutf8.h>
7073 #endif
7074 int
7075 main ()
7076 {
7077 wchar_t value
7078   ;
7079   return 0;
7080 }
7081 _ACEOF
7082 rm -f conftest.$ac_objext
7083 if { (eval echo "$as_me:7083: \"$ac_compile\"") >&5
7084   (eval $ac_compile) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); } &&
7088          { ac_try='test -s conftest.$ac_objext'
7089   { (eval echo "$as_me:7089: \"$ac_try\"") >&5
7090   (eval $ac_try) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit $ac_status); }; }; then
7094   cf_cv_wchar_t=yes
7095 else
7096   echo "$as_me: failed program was:" >&5
7097 cat conftest.$ac_ext >&5
7098 cf_cv_wchar_t=unknown
7099 fi
7100 rm -f conftest.$ac_objext conftest.$ac_ext
7101 fi
7102 rm -f conftest.$ac_objext conftest.$ac_ext
7103 fi
7104 echo "$as_me:7104: result: $cf_cv_wchar_t" >&5
7105 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7106
7107 if test "$cf_cv_wchar_t" = yes ; then
7108         cat >>confdefs.h <<\EOF
7109 #define NEED_WCHAR_H 1
7110 EOF
7111
7112         NEED_WCHAR_H=1
7113 fi
7114
7115 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7116 if test "$cf_cv_wchar_t" = unknown ; then
7117         NCURSES_WCHAR_T=1
7118 fi
7119
7120 # if we find wchar_t in either place, use substitution to provide a fallback.
7121 if test "$cf_cv_wchar_t" != unknown ; then
7122         NCURSES_OK_WCHAR_T=1
7123 fi
7124
7125 # This is needed on Tru64 5.0 to declare wint_t
7126 echo "$as_me:7126: checking if we must include wchar.h to declare wint_t" >&5
7127 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7128 if test "${cf_cv_wint_t+set}" = set; then
7129   echo $ECHO_N "(cached) $ECHO_C" >&6
7130 else
7131
7132 cat >conftest.$ac_ext <<_ACEOF
7133 #line 7133 "configure"
7134 #include "confdefs.h"
7135
7136 #include <stdlib.h>
7137 #include <stdarg.h>
7138 #include <stdio.h>
7139 #ifdef HAVE_LIBUTF8_H
7140 #include <libutf8.h>
7141 #endif
7142 int
7143 main ()
7144 {
7145 wint_t state
7146   ;
7147   return 0;
7148 }
7149 _ACEOF
7150 rm -f conftest.$ac_objext
7151 if { (eval echo "$as_me:7151: \"$ac_compile\"") >&5
7152   (eval $ac_compile) 2>&5
7153   ac_status=$?
7154   echo "$as_me:7154: \$? = $ac_status" >&5
7155   (exit $ac_status); } &&
7156          { ac_try='test -s conftest.$ac_objext'
7157   { (eval echo "$as_me:7157: \"$ac_try\"") >&5
7158   (eval $ac_try) 2>&5
7159   ac_status=$?
7160   echo "$as_me:7160: \$? = $ac_status" >&5
7161   (exit $ac_status); }; }; then
7162   cf_cv_wint_t=no
7163 else
7164   echo "$as_me: failed program was:" >&5
7165 cat conftest.$ac_ext >&5
7166 cat >conftest.$ac_ext <<_ACEOF
7167 #line 7167 "configure"
7168 #include "confdefs.h"
7169
7170 #include <stdlib.h>
7171 #include <stdarg.h>
7172 #include <stdio.h>
7173 #include <wchar.h>
7174 #ifdef HAVE_LIBUTF8_H
7175 #include <libutf8.h>
7176 #endif
7177 int
7178 main ()
7179 {
7180 wint_t value
7181   ;
7182   return 0;
7183 }
7184 _ACEOF
7185 rm -f conftest.$ac_objext
7186 if { (eval echo "$as_me:7186: \"$ac_compile\"") >&5
7187   (eval $ac_compile) 2>&5
7188   ac_status=$?
7189   echo "$as_me:7189: \$? = $ac_status" >&5
7190   (exit $ac_status); } &&
7191          { ac_try='test -s conftest.$ac_objext'
7192   { (eval echo "$as_me:7192: \"$ac_try\"") >&5
7193   (eval $ac_try) 2>&5
7194   ac_status=$?
7195   echo "$as_me:7195: \$? = $ac_status" >&5
7196   (exit $ac_status); }; }; then
7197   cf_cv_wint_t=yes
7198 else
7199   echo "$as_me: failed program was:" >&5
7200 cat conftest.$ac_ext >&5
7201 cf_cv_wint_t=unknown
7202 fi
7203 rm -f conftest.$ac_objext conftest.$ac_ext
7204 fi
7205 rm -f conftest.$ac_objext conftest.$ac_ext
7206 fi
7207 echo "$as_me:7207: result: $cf_cv_wint_t" >&5
7208 echo "${ECHO_T}$cf_cv_wint_t" >&6
7209
7210 if test "$cf_cv_wint_t" = yes ; then
7211         cat >>confdefs.h <<\EOF
7212 #define NEED_WCHAR_H 1
7213 EOF
7214
7215         NEED_WCHAR_H=1
7216 fi
7217
7218 # if we do not find wint_t in either place, use substitution to provide a fallback.
7219 if test "$cf_cv_wint_t" = unknown ; then
7220         NCURSES_WINT_T=1
7221 fi
7222
7223 # if we find wint_t in either place, use substitution to provide a fallback.
7224 if test "$cf_cv_wint_t" != unknown ; then
7225         NCURSES_OK_WINT_T=1
7226 fi
7227
7228         if test "$NCURSES_MBSTATE_T" != 0; then
7229                 cat >>confdefs.h <<\EOF
7230 #define NEED_MBSTATE_T_DEF 1
7231 EOF
7232
7233         fi
7234 fi
7235
7236 ###   use option --disable-lp64 to allow long chtype
7237 case $cf_cv_abi_version in
7238 [345]*)
7239         default_with_lp64=no
7240         ;;
7241 *)
7242         default_with_lp64=yes
7243         ;;
7244 esac
7245
7246 echo "$as_me:7246: checking whether to enable _LP64 definition in curses.h" >&5
7247 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7248
7249 # Check whether --enable-lp64 or --disable-lp64 was given.
7250 if test "${enable_lp64+set}" = set; then
7251   enableval="$enable_lp64"
7252   with_lp64=$enableval
7253 else
7254   with_lp64=$default_with_lp64
7255 fi;
7256 echo "$as_me:7256: result: $with_lp64" >&5
7257 echo "${ECHO_T}$with_lp64" >&6
7258
7259 if test "$with_lp64" = yes ; then
7260         cf_cv_enable_lp64=1
7261 else
7262         cf_cv_enable_lp64=0
7263 fi
7264
7265 # Check whether --enable-largefile or --disable-largefile was given.
7266 if test "${enable_largefile+set}" = set; then
7267   enableval="$enable_largefile"
7268
7269 fi;
7270 if test "$enable_largefile" != no; then
7271
7272   echo "$as_me:7272: checking for special C compiler options needed for large files" >&5
7273 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7274 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7275   echo $ECHO_N "(cached) $ECHO_C" >&6
7276 else
7277   ac_cv_sys_largefile_CC=no
7278      if test "$GCC" != yes; then
7279        ac_save_CC=$CC
7280        while :; do
7281          # IRIX 6.2 and later do not support large files by default,
7282          # so use the C compiler's -n32 option if that helps.
7283          cat >conftest.$ac_ext <<_ACEOF
7284 #line 7284 "configure"
7285 #include "confdefs.h"
7286 #include <sys/types.h>
7287  /* Check that off_t can represent 2**63 - 1 correctly.
7288     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7289     since some C++ compilers masquerading as C compilers
7290     incorrectly reject 9223372036854775807.  */
7291 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7292   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7293                        && LARGE_OFF_T % 2147483647 == 1)
7294                       ? 1 : -1];
7295 int
7296 main ()
7297 {
7298
7299   ;
7300   return 0;
7301 }
7302 _ACEOF
7303          rm -f conftest.$ac_objext
7304 if { (eval echo "$as_me:7304: \"$ac_compile\"") >&5
7305   (eval $ac_compile) 2>&5
7306   ac_status=$?
7307   echo "$as_me:7307: \$? = $ac_status" >&5
7308   (exit $ac_status); } &&
7309          { ac_try='test -s conftest.$ac_objext'
7310   { (eval echo "$as_me:7310: \"$ac_try\"") >&5
7311   (eval $ac_try) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); }; }; then
7315   break
7316 else
7317   echo "$as_me: failed program was:" >&5
7318 cat conftest.$ac_ext >&5
7319 fi
7320 rm -f conftest.$ac_objext
7321          CC="$CC -n32"
7322          rm -f conftest.$ac_objext
7323 if { (eval echo "$as_me:7323: \"$ac_compile\"") >&5
7324   (eval $ac_compile) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); } &&
7328          { ac_try='test -s conftest.$ac_objext'
7329   { (eval echo "$as_me:7329: \"$ac_try\"") >&5
7330   (eval $ac_try) 2>&5
7331   ac_status=$?
7332   echo "$as_me:7332: \$? = $ac_status" >&5
7333   (exit $ac_status); }; }; then
7334   ac_cv_sys_largefile_CC=' -n32'; break
7335 else
7336   echo "$as_me: failed program was:" >&5
7337 cat conftest.$ac_ext >&5
7338 fi
7339 rm -f conftest.$ac_objext
7340          break
7341        done
7342        CC=$ac_save_CC
7343        rm -f conftest.$ac_ext
7344     fi
7345 fi
7346 echo "$as_me:7346: result: $ac_cv_sys_largefile_CC" >&5
7347 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7348   if test "$ac_cv_sys_largefile_CC" != no; then
7349     CC=$CC$ac_cv_sys_largefile_CC
7350   fi
7351
7352   echo "$as_me:7352: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7353 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7354 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7355   echo $ECHO_N "(cached) $ECHO_C" >&6
7356 else
7357   while :; do
7358   ac_cv_sys_file_offset_bits=no
7359   cat >conftest.$ac_ext <<_ACEOF
7360 #line 7360 "configure"
7361 #include "confdefs.h"
7362 #include <sys/types.h>
7363  /* Check that off_t can represent 2**63 - 1 correctly.
7364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7365     since some C++ compilers masquerading as C compilers
7366     incorrectly reject 9223372036854775807.  */
7367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7369                        && LARGE_OFF_T % 2147483647 == 1)
7370                       ? 1 : -1];
7371 int
7372 main ()
7373 {
7374
7375   ;
7376   return 0;
7377 }
7378 _ACEOF
7379 rm -f conftest.$ac_objext
7380 if { (eval echo "$as_me:7380: \"$ac_compile\"") >&5
7381   (eval $ac_compile) 2>&5
7382   ac_status=$?
7383   echo "$as_me:7383: \$? = $ac_status" >&5
7384   (exit $ac_status); } &&
7385          { ac_try='test -s conftest.$ac_objext'
7386   { (eval echo "$as_me:7386: \"$ac_try\"") >&5
7387   (eval $ac_try) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit $ac_status); }; }; then
7391   break
7392 else
7393   echo "$as_me: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395 fi
7396 rm -f conftest.$ac_objext conftest.$ac_ext
7397   cat >conftest.$ac_ext <<_ACEOF
7398 #line 7398 "configure"
7399 #include "confdefs.h"
7400 #define _FILE_OFFSET_BITS 64
7401 #include <sys/types.h>
7402  /* Check that off_t can represent 2**63 - 1 correctly.
7403     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7404     since some C++ compilers masquerading as C compilers
7405     incorrectly reject 9223372036854775807.  */
7406 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7407   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7408                        && LARGE_OFF_T % 2147483647 == 1)
7409                       ? 1 : -1];
7410 int
7411 main ()
7412 {
7413
7414   ;
7415   return 0;
7416 }
7417 _ACEOF
7418 rm -f conftest.$ac_objext
7419 if { (eval echo "$as_me:7419: \"$ac_compile\"") >&5
7420   (eval $ac_compile) 2>&5
7421   ac_status=$?
7422   echo "$as_me:7422: \$? = $ac_status" >&5
7423   (exit $ac_status); } &&
7424          { ac_try='test -s conftest.$ac_objext'
7425   { (eval echo "$as_me:7425: \"$ac_try\"") >&5
7426   (eval $ac_try) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); }; }; then
7430   ac_cv_sys_file_offset_bits=64; break
7431 else
7432   echo "$as_me: failed program was:" >&5
7433 cat conftest.$ac_ext >&5
7434 fi
7435 rm -f conftest.$ac_objext conftest.$ac_ext
7436   break
7437 done
7438 fi
7439 echo "$as_me:7439: result: $ac_cv_sys_file_offset_bits" >&5
7440 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7441 if test "$ac_cv_sys_file_offset_bits" != no; then
7442
7443 cat >>confdefs.h <<EOF
7444 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7445 EOF
7446
7447 fi
7448 rm -f conftest*
7449   echo "$as_me:7449: checking for _LARGE_FILES value needed for large files" >&5
7450 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7451 if test "${ac_cv_sys_large_files+set}" = set; then
7452   echo $ECHO_N "(cached) $ECHO_C" >&6
7453 else
7454   while :; do
7455   ac_cv_sys_large_files=no
7456   cat >conftest.$ac_ext <<_ACEOF
7457 #line 7457 "configure"
7458 #include "confdefs.h"
7459 #include <sys/types.h>
7460  /* Check that off_t can represent 2**63 - 1 correctly.
7461     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7462     since some C++ compilers masquerading as C compilers
7463     incorrectly reject 9223372036854775807.  */
7464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7465   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7466                        && LARGE_OFF_T % 2147483647 == 1)
7467                       ? 1 : -1];
7468 int
7469 main ()
7470 {
7471
7472   ;
7473   return 0;
7474 }
7475 _ACEOF
7476 rm -f conftest.$ac_objext
7477 if { (eval echo "$as_me:7477: \"$ac_compile\"") >&5
7478   (eval $ac_compile) 2>&5
7479   ac_status=$?
7480   echo "$as_me:7480: \$? = $ac_status" >&5
7481   (exit $ac_status); } &&
7482          { ac_try='test -s conftest.$ac_objext'
7483   { (eval echo "$as_me:7483: \"$ac_try\"") >&5
7484   (eval $ac_try) 2>&5
7485   ac_status=$?
7486   echo "$as_me:7486: \$? = $ac_status" >&5
7487   (exit $ac_status); }; }; then
7488   break
7489 else
7490   echo "$as_me: failed program was:" >&5
7491 cat conftest.$ac_ext >&5
7492 fi
7493 rm -f conftest.$ac_objext conftest.$ac_ext
7494   cat >conftest.$ac_ext <<_ACEOF
7495 #line 7495 "configure"
7496 #include "confdefs.h"
7497 #define _LARGE_FILES 1
7498 #include <sys/types.h>
7499  /* Check that off_t can represent 2**63 - 1 correctly.
7500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7501     since some C++ compilers masquerading as C compilers
7502     incorrectly reject 9223372036854775807.  */
7503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7505                        && LARGE_OFF_T % 2147483647 == 1)
7506                       ? 1 : -1];
7507 int
7508 main ()
7509 {
7510
7511   ;
7512   return 0;
7513 }
7514 _ACEOF
7515 rm -f conftest.$ac_objext
7516 if { (eval echo "$as_me:7516: \"$ac_compile\"") >&5
7517   (eval $ac_compile) 2>&5
7518   ac_status=$?
7519   echo "$as_me:7519: \$? = $ac_status" >&5
7520   (exit $ac_status); } &&
7521          { ac_try='test -s conftest.$ac_objext'
7522   { (eval echo "$as_me:7522: \"$ac_try\"") >&5
7523   (eval $ac_try) 2>&5
7524   ac_status=$?
7525   echo "$as_me:7525: \$? = $ac_status" >&5
7526   (exit $ac_status); }; }; then
7527   ac_cv_sys_large_files=1; break
7528 else
7529   echo "$as_me: failed program was:" >&5
7530 cat conftest.$ac_ext >&5
7531 fi
7532 rm -f conftest.$ac_objext conftest.$ac_ext
7533   break
7534 done
7535 fi
7536 echo "$as_me:7536: result: $ac_cv_sys_large_files" >&5
7537 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7538 if test "$ac_cv_sys_large_files" != no; then
7539
7540 cat >>confdefs.h <<EOF
7541 #define _LARGE_FILES $ac_cv_sys_large_files
7542 EOF
7543
7544 fi
7545 rm -f conftest*
7546 fi
7547
7548     if test "$enable_largefile" != no ; then
7549         echo "$as_me:7549: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7550 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7551 if test "${ac_cv_sys_largefile_source+set}" = set; then
7552   echo $ECHO_N "(cached) $ECHO_C" >&6
7553 else
7554   while :; do
7555   ac_cv_sys_largefile_source=no
7556   cat >conftest.$ac_ext <<_ACEOF
7557 #line 7557 "configure"
7558 #include "confdefs.h"
7559 #include <stdio.h>
7560 int
7561 main ()
7562 {
7563 return !fseeko;
7564   ;
7565   return 0;
7566 }
7567 _ACEOF
7568 rm -f conftest.$ac_objext
7569 if { (eval echo "$as_me:7569: \"$ac_compile\"") >&5
7570   (eval $ac_compile) 2>&5
7571   ac_status=$?
7572   echo "$as_me:7572: \$? = $ac_status" >&5
7573   (exit $ac_status); } &&
7574          { ac_try='test -s conftest.$ac_objext'
7575   { (eval echo "$as_me:7575: \"$ac_try\"") >&5
7576   (eval $ac_try) 2>&5
7577   ac_status=$?
7578   echo "$as_me:7578: \$? = $ac_status" >&5
7579   (exit $ac_status); }; }; then
7580   break
7581 else
7582   echo "$as_me: failed program was:" >&5
7583 cat conftest.$ac_ext >&5
7584 fi
7585 rm -f conftest.$ac_objext conftest.$ac_ext
7586   cat >conftest.$ac_ext <<_ACEOF
7587 #line 7587 "configure"
7588 #include "confdefs.h"
7589 #define _LARGEFILE_SOURCE 1
7590 #include <stdio.h>
7591 int
7592 main ()
7593 {
7594 return !fseeko;
7595   ;
7596   return 0;
7597 }
7598 _ACEOF
7599 rm -f conftest.$ac_objext
7600 if { (eval echo "$as_me:7600: \"$ac_compile\"") >&5
7601   (eval $ac_compile) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); } &&
7605          { ac_try='test -s conftest.$ac_objext'
7606   { (eval echo "$as_me:7606: \"$ac_try\"") >&5
7607   (eval $ac_try) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); }; }; then
7611   ac_cv_sys_largefile_source=1; break
7612 else
7613   echo "$as_me: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 fi
7616 rm -f conftest.$ac_objext conftest.$ac_ext
7617   break
7618 done
7619 fi
7620 echo "$as_me:7620: result: $ac_cv_sys_largefile_source" >&5
7621 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7622 if test "$ac_cv_sys_largefile_source" != no; then
7623
7624 cat >>confdefs.h <<EOF
7625 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7626 EOF
7627
7628 fi
7629 rm -f conftest*
7630
7631 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7632 # in glibc 2.1.3, but that breaks too many other things.
7633 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7634 echo "$as_me:7634: checking for fseeko" >&5
7635 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7636 if test "${ac_cv_func_fseeko+set}" = set; then
7637   echo $ECHO_N "(cached) $ECHO_C" >&6
7638 else
7639   cat >conftest.$ac_ext <<_ACEOF
7640 #line 7640 "configure"
7641 #include "confdefs.h"
7642 #include <stdio.h>
7643 int
7644 main ()
7645 {
7646 return fseeko && fseeko (stdin, 0, 0);
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 rm -f conftest.$ac_objext conftest$ac_exeext
7652 if { (eval echo "$as_me:7652: \"$ac_link\"") >&5
7653   (eval $ac_link) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); } &&
7657          { ac_try='test -s conftest$ac_exeext'
7658   { (eval echo "$as_me:7658: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); }; }; then
7663   ac_cv_func_fseeko=yes
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 ac_cv_func_fseeko=no
7668 fi
7669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7670 fi
7671 echo "$as_me:7671: result: $ac_cv_func_fseeko" >&5
7672 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7673 if test $ac_cv_func_fseeko = yes; then
7674
7675 cat >>confdefs.h <<\EOF
7676 #define HAVE_FSEEKO 1
7677 EOF
7678
7679 fi
7680
7681         # Normally we would collect these definitions in the config.h,
7682         # but (like _XOPEN_SOURCE), some environments rely on having these
7683         # defined before any of the system headers are included.  Another
7684         # case comes up with C++, e.g., on AIX the compiler compiles the
7685         # header files by themselves before looking at the body files it is
7686         # told to compile.  For ncurses, those header files do not include
7687         # the config.h
7688         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7689         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7690
7691         echo "$as_me:7691: checking whether to use struct dirent64" >&5
7692 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7693 if test "${cf_cv_struct_dirent64+set}" = set; then
7694   echo $ECHO_N "(cached) $ECHO_C" >&6
7695 else
7696
7697                 cat >conftest.$ac_ext <<_ACEOF
7698 #line 7698 "configure"
7699 #include "confdefs.h"
7700
7701 #include <sys/types.h>
7702 #include <dirent.h>
7703
7704 int
7705 main ()
7706 {
7707
7708                 /* if transitional largefile support is setup, this is true */
7709                 extern struct dirent64 * readdir(DIR *);
7710                 struct dirent64 *x = readdir((DIR *)0);
7711                 struct dirent *y = readdir((DIR *)0);
7712                 int z = x - y;
7713
7714   ;
7715   return 0;
7716 }
7717 _ACEOF
7718 rm -f conftest.$ac_objext
7719 if { (eval echo "$as_me:7719: \"$ac_compile\"") >&5
7720   (eval $ac_compile) 2>&5
7721   ac_status=$?
7722   echo "$as_me:7722: \$? = $ac_status" >&5
7723   (exit $ac_status); } &&
7724          { ac_try='test -s conftest.$ac_objext'
7725   { (eval echo "$as_me:7725: \"$ac_try\"") >&5
7726   (eval $ac_try) 2>&5
7727   ac_status=$?
7728   echo "$as_me:7728: \$? = $ac_status" >&5
7729   (exit $ac_status); }; }; then
7730   cf_cv_struct_dirent64=yes
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734 cf_cv_struct_dirent64=no
7735 fi
7736 rm -f conftest.$ac_objext conftest.$ac_ext
7737
7738 fi
7739 echo "$as_me:7739: result: $cf_cv_struct_dirent64" >&5
7740 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7741         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7742 #define HAVE_STRUCT_DIRENT64 1
7743 EOF
7744
7745     fi
7746
7747 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7748 echo "$as_me:7748: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7749 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7750
7751 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7752 if test "${enable_tparm_varargs+set}" = set; then
7753   enableval="$enable_tparm_varargs"
7754   with_tparm_varargs=$enableval
7755 else
7756   with_tparm_varargs=yes
7757 fi;
7758 echo "$as_me:7758: result: $with_tparm_varargs" >&5
7759 echo "${ECHO_T}$with_tparm_varargs" >&6
7760 NCURSES_TPARM_VARARGS=0
7761 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7762
7763 ###   use option --with-bool to override bool's type
7764 echo "$as_me:7764: checking for type of bool" >&5
7765 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7766
7767 # Check whether --with-bool or --without-bool was given.
7768 if test "${with_bool+set}" = set; then
7769   withval="$with_bool"
7770   NCURSES_BOOL="$withval"
7771 else
7772   NCURSES_BOOL=auto
7773 fi;
7774 echo "$as_me:7774: result: $NCURSES_BOOL" >&5
7775 echo "${ECHO_T}$NCURSES_BOOL" >&6
7776
7777 echo "$as_me:7777: checking for alternate terminal capabilities file" >&5
7778 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7779
7780 # Check whether --with-caps or --without-caps was given.
7781 if test "${with_caps+set}" = set; then
7782   withval="$with_caps"
7783   TERMINFO_CAPS=Caps.$withval
7784 else
7785   TERMINFO_CAPS=Caps
7786 fi;
7787 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7788 echo "$as_me:7788: result: $TERMINFO_CAPS" >&5
7789 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7790
7791 ###   use option --with-chtype to override chtype's type
7792 echo "$as_me:7792: checking for type of chtype" >&5
7793 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7794
7795 # Check whether --with-chtype or --without-chtype was given.
7796 if test "${with_chtype+set}" = set; then
7797   withval="$with_chtype"
7798   NCURSES_CHTYPE="$withval"
7799 else
7800   NCURSES_CHTYPE=auto
7801 fi;
7802 echo "$as_me:7802: result: $NCURSES_CHTYPE" >&5
7803 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7804
7805 ###   use option --with-ospeed to override ospeed's type
7806 echo "$as_me:7806: checking for type of ospeed" >&5
7807 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7808
7809 # Check whether --with-ospeed or --without-ospeed was given.
7810 if test "${with_ospeed+set}" = set; then
7811   withval="$with_ospeed"
7812   NCURSES_OSPEED="$withval"
7813 else
7814   NCURSES_OSPEED=short
7815 fi;
7816 echo "$as_me:7816: result: $NCURSES_OSPEED" >&5
7817 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7818
7819 ###   use option --with-mmask-t to override mmask_t's type
7820 echo "$as_me:7820: checking for type of mmask_t" >&5
7821 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7822
7823 # Check whether --with-mmask-t or --without-mmask-t was given.
7824 if test "${with_mmask_t+set}" = set; then
7825   withval="$with_mmask_t"
7826   NCURSES_MMASK_T="$withval"
7827 else
7828   NCURSES_MMASK_T=auto
7829 fi;
7830 echo "$as_me:7830: result: $NCURSES_MMASK_T" >&5
7831 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7832
7833 ### Enable compiling-in rcs id's
7834 echo "$as_me:7834: checking if RCS identifiers should be compiled-in" >&5
7835 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7836
7837 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7838 if test "${with_rcs_ids+set}" = set; then
7839   withval="$with_rcs_ids"
7840   with_rcs_ids=$withval
7841 else
7842   with_rcs_ids=no
7843 fi;
7844 echo "$as_me:7844: result: $with_rcs_ids" >&5
7845 echo "${ECHO_T}$with_rcs_ids" >&6
7846 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7847 #define USE_RCS_IDS 1
7848 EOF
7849
7850 ###############################################################################
7851
7852 echo "$as_me:7852: checking format of man-pages" >&5
7853 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7854
7855 # Check whether --with-manpage-format or --without-manpage-format was given.
7856 if test "${with_manpage_format+set}" = set; then
7857   withval="$with_manpage_format"
7858   MANPAGE_FORMAT=$withval
7859 else
7860   MANPAGE_FORMAT=unknown
7861 fi;
7862
7863 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7864 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7865
7866 cf_unknown=
7867
7868 case $MANPAGE_FORMAT in
7869 unknown)
7870   if test -z "$MANPATH" ; then
7871     MANPATH="/usr/man:/usr/share/man"
7872   fi
7873
7874   # look for the 'date' man-page (it's most likely to be installed!)
7875   MANPAGE_FORMAT=
7876   cf_preform=no
7877   cf_catonly=yes
7878   cf_example=date
7879
7880   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7881   for cf_dir in $MANPATH; do
7882     test -z "$cf_dir" && cf_dir=/usr/man
7883     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
7884     do
7885       cf_test=`echo $cf_name | sed -e 's/*//'`
7886       if test "x$cf_test" = "x$cf_name" ; then
7887
7888         case "$cf_name" in
7889         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7890         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7891         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7892         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7893         esac
7894
7895         case "$cf_name" in
7896         $cf_dir/man*)
7897           cf_catonly=no
7898           ;;
7899         $cf_dir/cat*)
7900           cf_preform=yes
7901           ;;
7902         esac
7903         break
7904       fi
7905
7906       # if we found a match in either man* or cat*, stop looking
7907       if test -n "$MANPAGE_FORMAT" ; then
7908         cf_found=no
7909         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7910         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7911         case "$cf_name" in
7912         $cf_dir/cat*)
7913           cf_found=yes
7914           ;;
7915         esac
7916         test $cf_found=yes && break
7917       fi
7918     done
7919     # only check the first directory in $MANPATH where we find manpages
7920     if test -n "$MANPAGE_FORMAT" ; then
7921        break
7922     fi
7923   done
7924   # if we did not find the example, just assume it is normal
7925   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7926   IFS="$ac_save_ifs"
7927   ;;
7928 *)
7929   for cf_option in $MANPAGE_FORMAT; do
7930      case $cf_option in #(vi
7931      gzip|compress|BSDI|normal|formatted|catonly)
7932        ;;
7933      *)
7934        cf_unknown="$cf_unknown $cf_option"
7935        ;;
7936      esac
7937   done
7938   ;;
7939 esac
7940
7941 echo "$as_me:7941: result: $MANPAGE_FORMAT" >&5
7942 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7943 if test -n "$cf_unknown" ; then
7944   { echo "$as_me:7944: WARNING: Unexpected manpage-format $cf_unknown" >&5
7945 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7946 fi
7947
7948 echo "$as_me:7948: checking for manpage renaming" >&5
7949 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7950
7951 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7952 if test "${with_manpage_renames+set}" = set; then
7953   withval="$with_manpage_renames"
7954   MANPAGE_RENAMES=$withval
7955 else
7956   MANPAGE_RENAMES=yes
7957 fi;
7958
7959 case ".$MANPAGE_RENAMES" in #(vi
7960 .no) #(vi
7961   ;;
7962 .|.yes)
7963   # Debian 'man' program?
7964   if test -f /etc/debian_version ; then
7965     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7966   else
7967     MANPAGE_RENAMES=no
7968   fi
7969   ;;
7970 esac
7971
7972 if test "$MANPAGE_RENAMES" != no ; then
7973   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7974     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7975   elif test ! -f $MANPAGE_RENAMES ; then
7976     { { echo "$as_me:7976: error: not a filename: $MANPAGE_RENAMES" >&5
7977 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7978    { (exit 1); exit 1; }; }
7979   fi
7980
7981   test ! -d man && mkdir man
7982
7983   # Construct a sed-script to perform renaming within man-pages
7984   if test -n "$MANPAGE_RENAMES" ; then
7985     test ! -d man && mkdir man
7986     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7987   fi
7988 fi
7989
7990 echo "$as_me:7990: result: $MANPAGE_RENAMES" >&5
7991 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7992
7993 echo "$as_me:7993: checking if manpage aliases will be installed" >&5
7994 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7995
7996 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7997 if test "${with_manpage_aliases+set}" = set; then
7998   withval="$with_manpage_aliases"
7999   MANPAGE_ALIASES=$withval
8000 else
8001   MANPAGE_ALIASES=yes
8002 fi;
8003
8004 echo "$as_me:8004: result: $MANPAGE_ALIASES" >&5
8005 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8006
8007 if test "$LN_S" = "ln -s"; then
8008         cf_use_symlinks=yes
8009 else
8010         cf_use_symlinks=no
8011 fi
8012
8013 MANPAGE_SYMLINKS=no
8014 if test "$MANPAGE_ALIASES" = yes ; then
8015 echo "$as_me:8015: checking if manpage symlinks should be used" >&5
8016 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8017
8018 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8019 if test "${with_manpage_symlinks+set}" = set; then
8020   withval="$with_manpage_symlinks"
8021   MANPAGE_SYMLINKS=$withval
8022 else
8023   MANPAGE_SYMLINKS=$cf_use_symlinks
8024 fi;
8025
8026 if test "$$cf_use_symlinks" = no; then
8027 if test "$MANPAGE_SYMLINKS" = yes ; then
8028         { echo "$as_me:8028: WARNING: cannot make symlinks" >&5
8029 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8030         MANPAGE_SYMLINKS=no
8031 fi
8032 fi
8033
8034 echo "$as_me:8034: result: $MANPAGE_SYMLINKS" >&5
8035 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8036 fi
8037
8038 echo "$as_me:8038: checking for manpage tbl" >&5
8039 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8040
8041 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8042 if test "${with_manpage_tbl+set}" = set; then
8043   withval="$with_manpage_tbl"
8044   MANPAGE_TBL=$withval
8045 else
8046   MANPAGE_TBL=no
8047 fi;
8048
8049 echo "$as_me:8049: result: $MANPAGE_TBL" >&5
8050 echo "${ECHO_T}$MANPAGE_TBL" >&6
8051
8052   if test "$prefix" = "NONE" ; then
8053      cf_prefix="$ac_default_prefix"
8054   else
8055      cf_prefix="$prefix"
8056   fi
8057
8058   case "$MANPAGE_FORMAT" in # (vi
8059   *catonly*) # (vi
8060     cf_format=yes
8061     cf_inboth=no
8062     ;;
8063   *formatted*) # (vi
8064     cf_format=yes
8065     cf_inboth=yes
8066     ;;
8067   *)
8068     cf_format=no
8069     cf_inboth=no
8070     ;;
8071   esac
8072
8073 test ! -d man && mkdir man
8074
8075 cf_so_strip=
8076 cf_compress=
8077 case "$MANPAGE_FORMAT" in #(vi
8078 *compress*) #(vi
8079         cf_so_strip="Z"
8080         cf_compress=compress
8081   ;;
8082 *gzip*) #(vi
8083         cf_so_strip="gz"
8084         cf_compress=gzip
8085   ;;
8086 esac
8087
8088 cf_edit_man=./edit_man.sh
8089 cf_man_alias=`pwd`/man_alias.sed
8090
8091 cat >$cf_edit_man <<CF_EOF
8092 #! /bin/sh
8093 # this script is generated by the configure-script CF_MAN_PAGES macro.
8094
8095 prefix="$cf_prefix"
8096 datadir="$datadir"
8097
8098 NCURSES_MAJOR="$NCURSES_MAJOR"
8099 NCURSES_MINOR="$NCURSES_MINOR"
8100 NCURSES_PATCH="$NCURSES_PATCH"
8101
8102 NCURSES_OSPEED="$NCURSES_OSPEED"
8103 TERMINFO="$TERMINFO"
8104
8105 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8106
8107 INSTALL="$INSTALL"
8108 INSTALL_DATA="$INSTALL_DATA"
8109
8110 transform="$program_transform_name"
8111
8112 TMP=\${TMPDIR-/tmp}/man\$\$
8113 trap "rm -f \$TMP" 0 1 2 5 15
8114
8115 form=\$1
8116 shift || exit 1
8117
8118 verb=\$1
8119 shift || exit 1
8120
8121 mandir=\$1
8122 shift || exit 1
8123
8124 srcdir=\$1
8125 top_srcdir=\$srcdir/..
8126 shift || exit 1
8127
8128 if test "\$form" = normal ; then
8129         if test "$cf_format" = yes ; then
8130         if test "$cf_inboth" = no ; then
8131                 sh \$0 format \$verb \$mandir \$srcdir \$*
8132                 exit $?
8133         fi
8134         fi
8135         cf_subdir=\$mandir/man
8136         cf_tables=$MANPAGE_TBL
8137 else
8138         cf_subdir=\$mandir/cat
8139         cf_tables=yes
8140 fi
8141
8142 # process the list of source-files
8143 for i in \$* ; do
8144 case \$i in #(vi
8145 *.orig|*.rej) ;; #(vi
8146 *.[0-9]*)
8147         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8148         if test \$verb = installing ; then
8149         if test ! -d \$cf_subdir\${section} ; then
8150                 \$MKDIRS \$cf_subdir\$section
8151         fi
8152         fi
8153
8154         # replace variables in man page
8155         if test ! -f $cf_man_alias ; then
8156 cat >>$cf_man_alias <<-CF_EOF2
8157                 s,@DATADIR@,\$datadir,
8158                 s,@TERMINFO@,\$TERMINFO,
8159                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,
8160                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,
8161                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,
8162                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,
8163 CF_EOF
8164
8165         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8166         do
8167                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8168                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8169 cat >>$cf_edit_man <<-CF_EOF
8170                 s,@$cf_NAME@,$cf_name,
8171 CF_EOF
8172         done
8173
8174 cat >>$cf_edit_man <<CF_EOF
8175 CF_EOF2
8176                 echo "...made $cf_man_alias"
8177         fi
8178
8179         aliases=
8180         cf_source=\`basename \$i\`
8181         inalias=\$cf_source
8182         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8183         if test ! -f \$inalias ; then
8184                 echo .. skipped \$cf_source
8185                 continue
8186         fi
8187 CF_EOF
8188
8189 if test "$MANPAGE_ALIASES" != no ; then
8190 cat >>$cf_edit_man <<CF_EOF
8191         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8192 CF_EOF
8193 fi
8194
8195 if test "$MANPAGE_RENAMES" = no ; then
8196 cat >>$cf_edit_man <<CF_EOF
8197         # perform program transformations for section 1 man pages
8198         if test \$section = 1 ; then
8199                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8200         else
8201                 cf_target=\$cf_subdir\${section}/\$cf_source
8202         fi
8203 CF_EOF
8204 else
8205 cat >>$cf_edit_man <<CF_EOF
8206         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8207         if test -z "\$cf_target" ; then
8208                 echo '? missing rename for '\$cf_source
8209                 cf_target="\$cf_source"
8210         fi
8211         cf_target="\$cf_subdir\${section}/\${cf_target}"
8212
8213 CF_EOF
8214 fi
8215
8216 cat >>$cf_edit_man <<CF_EOF
8217         sed     -f $cf_man_alias \\
8218 CF_EOF
8219
8220 if test -f $MANPAGE_RENAMES ; then
8221 cat >>$cf_edit_man <<CF_EOF
8222                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8223 CF_EOF
8224 else
8225 cat >>$cf_edit_man <<CF_EOF
8226                 < \$i >\$TMP
8227 CF_EOF
8228 fi
8229
8230 cat >>$cf_edit_man <<CF_EOF
8231 if test \$cf_tables = yes ; then
8232         tbl \$TMP >\$TMP.out
8233         mv \$TMP.out \$TMP
8234 fi
8235 CF_EOF
8236
8237 if test $with_curses_h != yes ; then
8238 cat >>$cf_edit_man <<CF_EOF
8239         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8240         mv \$TMP.out \$TMP
8241 CF_EOF
8242 fi
8243
8244 cat >>$cf_edit_man <<CF_EOF
8245         if test \$form = format ; then
8246                 nroff -man \$TMP >\$TMP.out
8247                 mv \$TMP.out \$TMP
8248         fi
8249 CF_EOF
8250
8251 if test -n "$cf_compress" ; then
8252 cat >>$cf_edit_man <<CF_EOF
8253         if test \$verb = installing ; then
8254         if ( $cf_compress -f \$TMP )
8255         then
8256                 mv \$TMP.$cf_so_strip \$TMP
8257         fi
8258         fi
8259         cf_target="\$cf_target.$cf_so_strip"
8260 CF_EOF
8261 fi
8262
8263 case "$MANPAGE_FORMAT" in #(vi
8264 *BSDI*)
8265 cat >>$cf_edit_man <<CF_EOF
8266         if test \$form = format ; then
8267                 # BSDI installs only .0 suffixes in the cat directories
8268                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8269         fi
8270 CF_EOF
8271   ;;
8272 esac
8273
8274 cat >>$cf_edit_man <<CF_EOF
8275         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8276         if test \$verb = installing ; then
8277                 echo \$verb \$cf_target
8278                 \$INSTALL_DATA \$TMP \$cf_target
8279                 test -n "\$aliases" && (
8280                         cd \$cf_subdir\${section} && (
8281                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8282                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8283                                 cf_target=\`basename \$cf_target\`
8284                                 for cf_alias in \$aliases
8285                                 do
8286                                         if test \$section = 1 ; then
8287                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8288                                         fi
8289
8290                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8291                                                 if test -f \$cf_alias\${suffix} ; then
8292                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8293                                                         then
8294                                                                 continue
8295                                                         fi
8296                                                 fi
8297                                                 echo .. \$verb alias \$cf_alias\${suffix}
8298                                                 rm -f \$cf_alias\${suffix}
8299                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8300                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8301                                                 echo ".so \$cf_source" >\$TMP
8302 CF_EOF
8303 if test -n "$cf_compress" ; then
8304 cat >>$cf_edit_man <<CF_EOF
8305                                                 if test -n "$cf_so_strip" ; then
8306                                                         $cf_compress -f \$TMP
8307                                                         mv \$TMP.$cf_so_strip \$TMP
8308                                                 fi
8309 CF_EOF
8310 fi
8311 cat >>$cf_edit_man <<CF_EOF
8312                                                 echo .. \$verb alias \$cf_alias\${suffix}
8313                                                 rm -f \$cf_alias\${suffix}
8314                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8315                                         fi
8316                                 done
8317                         )
8318                 )
8319         elif test \$verb = removing ; then
8320                 echo \$verb \$cf_target
8321                 rm -f \$cf_target
8322                 test -n "\$aliases" && (
8323                         cd \$cf_subdir\${section} && (
8324                                 for cf_alias in \$aliases
8325                                 do
8326                                         if test \$section = 1 ; then
8327                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8328                                         fi
8329
8330                                         echo .. \$verb alias \$cf_alias\${suffix}
8331                                         rm -f \$cf_alias\${suffix}
8332                                 done
8333                         )
8334                 )
8335         else
8336 #               echo ".hy 0"
8337                 cat \$TMP
8338         fi
8339         ;;
8340 esac
8341 done
8342
8343 if test $cf_inboth = yes ; then
8344 if test \$form != format ; then
8345         sh \$0 format \$verb \$mandir \$srcdir \$*
8346 fi
8347 fi
8348
8349 exit 0
8350 CF_EOF
8351 chmod 755 $cf_edit_man
8352
8353 ###############################################################################
8354
8355 ### Note that some functions (such as const) are normally disabled anyway.
8356 echo "$as_me:8356: checking if you want to build with function extensions" >&5
8357 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8358
8359 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8360 if test "${enable_ext_funcs+set}" = set; then
8361   enableval="$enable_ext_funcs"
8362   with_ext_funcs=$enableval
8363 else
8364   with_ext_funcs=yes
8365 fi;
8366 echo "$as_me:8366: result: $with_ext_funcs" >&5
8367 echo "${ECHO_T}$with_ext_funcs" >&6
8368 if test "$with_ext_funcs" = yes ; then
8369         NCURSES_EXT_FUNCS=1
8370         cat >>confdefs.h <<\EOF
8371 #define HAVE_CURSES_VERSION 1
8372 EOF
8373
8374         cat >>confdefs.h <<\EOF
8375 #define HAVE_HAS_KEY 1
8376 EOF
8377
8378         cat >>confdefs.h <<\EOF
8379 #define HAVE_RESIZETERM 1
8380 EOF
8381
8382         cat >>confdefs.h <<\EOF
8383 #define HAVE_RESIZE_TERM 1
8384 EOF
8385
8386         cat >>confdefs.h <<\EOF
8387 #define HAVE_USE_DEFAULT_COLORS 1
8388 EOF
8389
8390         cat >>confdefs.h <<\EOF
8391 #define HAVE_WRESIZE 1
8392 EOF
8393
8394         cat >>confdefs.h <<\EOF
8395 #define NCURSES_EXT_FUNCS 1
8396 EOF
8397
8398 else
8399         NCURSES_EXT_FUNCS=0
8400 fi
8401
8402 ###   use option --enable-const to turn on use of const beyond that in XSI.
8403 echo "$as_me:8403: checking for extended use of const keyword" >&5
8404 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8405
8406 # Check whether --enable-const or --disable-const was given.
8407 if test "${enable_const+set}" = set; then
8408   enableval="$enable_const"
8409   with_ext_const=$enableval
8410 else
8411   with_ext_const=no
8412 fi;
8413 echo "$as_me:8413: result: $with_ext_const" >&5
8414 echo "${ECHO_T}$with_ext_const" >&6
8415 NCURSES_CONST='/*nothing*/'
8416 if test "$with_ext_const" = yes ; then
8417         NCURSES_CONST=const
8418 fi
8419
8420 echo "$as_me:8420: checking if you want \$NCURSES_NO_PADDING code" >&5
8421 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8422
8423 # Check whether --enable-no-padding or --disable-no-padding was given.
8424 if test "${enable_no_padding+set}" = set; then
8425   enableval="$enable_no_padding"
8426   with_no_padding=$enableval
8427 else
8428   with_no_padding=$with_ext_funcs
8429 fi;
8430 echo "$as_me:8430: result: $with_no_padding" >&5
8431 echo "${ECHO_T}$with_no_padding" >&6
8432 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8433 #define NCURSES_NO_PADDING 1
8434 EOF
8435
8436 echo "$as_me:8436: checking for ANSI C header files" >&5
8437 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8438 if test "${ac_cv_header_stdc+set}" = set; then
8439   echo $ECHO_N "(cached) $ECHO_C" >&6
8440 else
8441   cat >conftest.$ac_ext <<_ACEOF
8442 #line 8442 "configure"
8443 #include "confdefs.h"
8444 #include <stdlib.h>
8445 #include <stdarg.h>
8446 #include <string.h>
8447 #include <float.h>
8448
8449 _ACEOF
8450 if { (eval echo "$as_me:8450: \"$ac_cpp conftest.$ac_ext\"") >&5
8451   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8452   ac_status=$?
8453   egrep -v '^ *\+' conftest.er1 >conftest.err
8454   rm -f conftest.er1
8455   cat conftest.err >&5
8456   echo "$as_me:8456: \$? = $ac_status" >&5
8457   (exit $ac_status); } >/dev/null; then
8458   if test -s conftest.err; then
8459     ac_cpp_err=$ac_c_preproc_warn_flag
8460   else
8461     ac_cpp_err=
8462   fi
8463 else
8464   ac_cpp_err=yes
8465 fi
8466 if test -z "$ac_cpp_err"; then
8467   ac_cv_header_stdc=yes
8468 else
8469   echo "$as_me: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   ac_cv_header_stdc=no
8472 fi
8473 rm -f conftest.err conftest.$ac_ext
8474
8475 if test $ac_cv_header_stdc = yes; then
8476   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8477   cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480 #include <string.h>
8481
8482 _ACEOF
8483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8484   egrep "memchr" >/dev/null 2>&1; then
8485   :
8486 else
8487   ac_cv_header_stdc=no
8488 fi
8489 rm -f conftest*
8490
8491 fi
8492
8493 if test $ac_cv_header_stdc = yes; then
8494   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8495   cat >conftest.$ac_ext <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8498 #include <stdlib.h>
8499
8500 _ACEOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "free" >/dev/null 2>&1; then
8503   :
8504 else
8505   ac_cv_header_stdc=no
8506 fi
8507 rm -f conftest*
8508
8509 fi
8510
8511 if test $ac_cv_header_stdc = yes; then
8512   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8513   if test "$cross_compiling" = yes; then
8514   :
8515 else
8516   cat >conftest.$ac_ext <<_ACEOF
8517 #line 8517 "configure"
8518 #include "confdefs.h"
8519 #include <ctype.h>
8520 #if ((' ' & 0x0FF) == 0x020)
8521 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8522 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8523 #else
8524 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8525                      || ('j' <= (c) && (c) <= 'r') \
8526                      || ('s' <= (c) && (c) <= 'z'))
8527 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8528 #endif
8529
8530 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8531 int
8532 main ()
8533 {
8534   int i;
8535   for (i = 0; i < 256; i++)
8536     if (XOR (islower (i), ISLOWER (i))
8537         || toupper (i) != TOUPPER (i))
8538       $ac_main_return(2);
8539   $ac_main_return (0);
8540 }
8541 _ACEOF
8542 rm -f conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544   (eval $ac_link) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8548   { (eval echo "$as_me:8548: \"$ac_try\"") >&5
8549   (eval $ac_try) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); }; }; then
8553   :
8554 else
8555   echo "$as_me: program exited with status $ac_status" >&5
8556 echo "$as_me: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558 ac_cv_header_stdc=no
8559 fi
8560 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8561 fi
8562 fi
8563 fi
8564 echo "$as_me:8564: result: $ac_cv_header_stdc" >&5
8565 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8566 if test $ac_cv_header_stdc = yes; then
8567
8568 cat >>confdefs.h <<\EOF
8569 #define STDC_HEADERS 1
8570 EOF
8571
8572 fi
8573
8574 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8575
8576 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8577                   inttypes.h stdint.h unistd.h
8578 do
8579 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8580 echo "$as_me:8580: checking for $ac_header" >&5
8581 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8582 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8583   echo $ECHO_N "(cached) $ECHO_C" >&6
8584 else
8585   cat >conftest.$ac_ext <<_ACEOF
8586 #line 8586 "configure"
8587 #include "confdefs.h"
8588 $ac_includes_default
8589 #include <$ac_header>
8590 _ACEOF
8591 rm -f conftest.$ac_objext
8592 if { (eval echo "$as_me:8592: \"$ac_compile\"") >&5
8593   (eval $ac_compile) 2>&5
8594   ac_status=$?
8595   echo "$as_me:8595: \$? = $ac_status" >&5
8596   (exit $ac_status); } &&
8597          { ac_try='test -s conftest.$ac_objext'
8598   { (eval echo "$as_me:8598: \"$ac_try\"") >&5
8599   (eval $ac_try) 2>&5
8600   ac_status=$?
8601   echo "$as_me:8601: \$? = $ac_status" >&5
8602   (exit $ac_status); }; }; then
8603   eval "$as_ac_Header=yes"
8604 else
8605   echo "$as_me: failed program was:" >&5
8606 cat conftest.$ac_ext >&5
8607 eval "$as_ac_Header=no"
8608 fi
8609 rm -f conftest.$ac_objext conftest.$ac_ext
8610 fi
8611 echo "$as_me:8611: result: `eval echo '${'$as_ac_Header'}'`" >&5
8612 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8613 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8614   cat >>confdefs.h <<EOF
8615 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8616 EOF
8617
8618 fi
8619 done
8620
8621 echo "$as_me:8621: checking for signed char" >&5
8622 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8623 if test "${ac_cv_type_signed_char+set}" = set; then
8624   echo $ECHO_N "(cached) $ECHO_C" >&6
8625 else
8626   cat >conftest.$ac_ext <<_ACEOF
8627 #line 8627 "configure"
8628 #include "confdefs.h"
8629 $ac_includes_default
8630 int
8631 main ()
8632 {
8633 if ((signed char *) 0)
8634   return 0;
8635 if (sizeof (signed char))
8636   return 0;
8637   ;
8638   return 0;
8639 }
8640 _ACEOF
8641 rm -f conftest.$ac_objext
8642 if { (eval echo "$as_me:8642: \"$ac_compile\"") >&5
8643   (eval $ac_compile) 2>&5
8644   ac_status=$?
8645   echo "$as_me:8645: \$? = $ac_status" >&5
8646   (exit $ac_status); } &&
8647          { ac_try='test -s conftest.$ac_objext'
8648   { (eval echo "$as_me:8648: \"$ac_try\"") >&5
8649   (eval $ac_try) 2>&5
8650   ac_status=$?
8651   echo "$as_me:8651: \$? = $ac_status" >&5
8652   (exit $ac_status); }; }; then
8653   ac_cv_type_signed_char=yes
8654 else
8655   echo "$as_me: failed program was:" >&5
8656 cat conftest.$ac_ext >&5
8657 ac_cv_type_signed_char=no
8658 fi
8659 rm -f conftest.$ac_objext conftest.$ac_ext
8660 fi
8661 echo "$as_me:8661: result: $ac_cv_type_signed_char" >&5
8662 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8663
8664 echo "$as_me:8664: checking size of signed char" >&5
8665 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8666 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8667   echo $ECHO_N "(cached) $ECHO_C" >&6
8668 else
8669   if test "$ac_cv_type_signed_char" = yes; then
8670   if test "$cross_compiling" = yes; then
8671   # Depending upon the size, compute the lo and hi bounds.
8672 cat >conftest.$ac_ext <<_ACEOF
8673 #line 8673 "configure"
8674 #include "confdefs.h"
8675 $ac_includes_default
8676 int
8677 main ()
8678 {
8679 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8680   ;
8681   return 0;
8682 }
8683 _ACEOF
8684 rm -f conftest.$ac_objext
8685 if { (eval echo "$as_me:8685: \"$ac_compile\"") >&5
8686   (eval $ac_compile) 2>&5
8687   ac_status=$?
8688   echo "$as_me:8688: \$? = $ac_status" >&5
8689   (exit $ac_status); } &&
8690          { ac_try='test -s conftest.$ac_objext'
8691   { (eval echo "$as_me:8691: \"$ac_try\"") >&5
8692   (eval $ac_try) 2>&5
8693   ac_status=$?
8694   echo "$as_me:8694: \$? = $ac_status" >&5
8695   (exit $ac_status); }; }; then
8696   ac_lo=0 ac_mid=0
8697   while :; do
8698     cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8701 $ac_includes_default
8702 int
8703 main ()
8704 {
8705 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8706   ;
8707   return 0;
8708 }
8709 _ACEOF
8710 rm -f conftest.$ac_objext
8711 if { (eval echo "$as_me:8711: \"$ac_compile\"") >&5
8712   (eval $ac_compile) 2>&5
8713   ac_status=$?
8714   echo "$as_me:8714: \$? = $ac_status" >&5
8715   (exit $ac_status); } &&
8716          { ac_try='test -s conftest.$ac_objext'
8717   { (eval echo "$as_me:8717: \"$ac_try\"") >&5
8718   (eval $ac_try) 2>&5
8719   ac_status=$?
8720   echo "$as_me:8720: \$? = $ac_status" >&5
8721   (exit $ac_status); }; }; then
8722   ac_hi=$ac_mid; break
8723 else
8724   echo "$as_me: failed program was:" >&5
8725 cat conftest.$ac_ext >&5
8726 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8727 fi
8728 rm -f conftest.$ac_objext conftest.$ac_ext
8729   done
8730 else
8731   echo "$as_me: failed program was:" >&5
8732 cat conftest.$ac_ext >&5
8733 ac_hi=-1 ac_mid=-1
8734   while :; do
8735     cat >conftest.$ac_ext <<_ACEOF
8736 #line 8736 "configure"
8737 #include "confdefs.h"
8738 $ac_includes_default
8739 int
8740 main ()
8741 {
8742 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8743   ;
8744   return 0;
8745 }
8746 _ACEOF
8747 rm -f conftest.$ac_objext
8748 if { (eval echo "$as_me:8748: \"$ac_compile\"") >&5
8749   (eval $ac_compile) 2>&5
8750   ac_status=$?
8751   echo "$as_me:8751: \$? = $ac_status" >&5
8752   (exit $ac_status); } &&
8753          { ac_try='test -s conftest.$ac_objext'
8754   { (eval echo "$as_me:8754: \"$ac_try\"") >&5
8755   (eval $ac_try) 2>&5
8756   ac_status=$?
8757   echo "$as_me:8757: \$? = $ac_status" >&5
8758   (exit $ac_status); }; }; then
8759   ac_lo=$ac_mid; break
8760 else
8761   echo "$as_me: failed program was:" >&5
8762 cat conftest.$ac_ext >&5
8763 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8764 fi
8765 rm -f conftest.$ac_objext conftest.$ac_ext
8766   done
8767 fi
8768 rm -f conftest.$ac_objext conftest.$ac_ext
8769 # Binary search between lo and hi bounds.
8770 while test "x$ac_lo" != "x$ac_hi"; do
8771   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8772   cat >conftest.$ac_ext <<_ACEOF
8773 #line 8773 "configure"
8774 #include "confdefs.h"
8775 $ac_includes_default
8776 int
8777 main ()
8778 {
8779 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8780   ;
8781   return 0;
8782 }
8783 _ACEOF
8784 rm -f conftest.$ac_objext
8785 if { (eval echo "$as_me:8785: \"$ac_compile\"") >&5
8786   (eval $ac_compile) 2>&5
8787   ac_status=$?
8788   echo "$as_me:8788: \$? = $ac_status" >&5
8789   (exit $ac_status); } &&
8790          { ac_try='test -s conftest.$ac_objext'
8791   { (eval echo "$as_me:8791: \"$ac_try\"") >&5
8792   (eval $ac_try) 2>&5
8793   ac_status=$?
8794   echo "$as_me:8794: \$? = $ac_status" >&5
8795   (exit $ac_status); }; }; then
8796   ac_hi=$ac_mid
8797 else
8798   echo "$as_me: failed program was:" >&5
8799 cat conftest.$ac_ext >&5
8800 ac_lo=`expr $ac_mid + 1`
8801 fi
8802 rm -f conftest.$ac_objext conftest.$ac_ext
8803 done
8804 ac_cv_sizeof_signed_char=$ac_lo
8805 else
8806   if test "$cross_compiling" = yes; then
8807   { { echo "$as_me:8807: error: cannot run test program while cross compiling" >&5
8808 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8809    { (exit 1); exit 1; }; }
8810 else
8811   cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8814 $ac_includes_default
8815 int
8816 main ()
8817 {
8818 FILE *f = fopen ("conftest.val", "w");
8819 if (!f)
8820   $ac_main_return (1);
8821 fprintf (f, "%d", (sizeof (signed char)));
8822 fclose (f);
8823   ;
8824   return 0;
8825 }
8826 _ACEOF
8827 rm -f conftest$ac_exeext
8828 if { (eval echo "$as_me:8828: \"$ac_link\"") >&5
8829   (eval $ac_link) 2>&5
8830   ac_status=$?
8831   echo "$as_me:8831: \$? = $ac_status" >&5
8832   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8833   { (eval echo "$as_me:8833: \"$ac_try\"") >&5
8834   (eval $ac_try) 2>&5
8835   ac_status=$?
8836   echo "$as_me:8836: \$? = $ac_status" >&5
8837   (exit $ac_status); }; }; then
8838   ac_cv_sizeof_signed_char=`cat conftest.val`
8839 else
8840   echo "$as_me: program exited with status $ac_status" >&5
8841 echo "$as_me: failed program was:" >&5
8842 cat conftest.$ac_ext >&5
8843 fi
8844 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8845 fi
8846 fi
8847 rm -f conftest.val
8848 else
8849   ac_cv_sizeof_signed_char=0
8850 fi
8851 fi
8852 echo "$as_me:8852: result: $ac_cv_sizeof_signed_char" >&5
8853 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8854 cat >>confdefs.h <<EOF
8855 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8856 EOF
8857
8858 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8859         NCURSES_SBOOL="signed char"
8860 else
8861         NCURSES_SBOOL="char"
8862 fi
8863 echo "$as_me:8863: checking if you want to use signed Boolean array in term.h" >&5
8864 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8865
8866 # Check whether --enable-signed-char or --disable-signed-char was given.
8867 if test "${enable_signed_char+set}" = set; then
8868   enableval="$enable_signed_char"
8869   with_signed_char=$enableval
8870 else
8871   with_signed_char=no
8872 fi;
8873 echo "$as_me:8873: result: $with_signed_char" >&5
8874 echo "${ECHO_T}$with_signed_char" >&6
8875 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8876
8877 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8878 echo "$as_me:8878: checking if you want SIGWINCH handler" >&5
8879 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8880
8881 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8882 if test "${enable_sigwinch+set}" = set; then
8883   enableval="$enable_sigwinch"
8884   with_sigwinch=$enableval
8885 else
8886   with_sigwinch=$with_ext_funcs
8887 fi;
8888 echo "$as_me:8888: result: $with_sigwinch" >&5
8889 echo "${ECHO_T}$with_sigwinch" >&6
8890 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8891 #define USE_SIGWINCH 1
8892 EOF
8893
8894 ###   use option --enable-tcap-names to allow user to define new capabilities
8895 echo "$as_me:8895: checking if you want user-definable terminal capabilities like termcap" >&5
8896 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8897
8898 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8899 if test "${enable_tcap_names+set}" = set; then
8900   enableval="$enable_tcap_names"
8901   with_tcap_names=$enableval
8902 else
8903   with_tcap_names=$with_ext_funcs
8904 fi;
8905 echo "$as_me:8905: result: $with_tcap_names" >&5
8906 echo "${ECHO_T}$with_tcap_names" >&6
8907 NCURSES_XNAMES=0
8908 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8909
8910 ###############################################################################
8911 # These options are relatively safe to experiment with.
8912
8913 echo "$as_me:8913: checking if you want all development code" >&5
8914 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8915
8916 # Check whether --with-develop or --without-develop was given.
8917 if test "${with_develop+set}" = set; then
8918   withval="$with_develop"
8919   with_develop=$withval
8920 else
8921   with_develop=no
8922 fi;
8923 echo "$as_me:8923: result: $with_develop" >&5
8924 echo "${ECHO_T}$with_develop" >&6
8925
8926 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8927 echo "$as_me:8927: checking if you want hard-tabs code" >&5
8928 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8929
8930 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8931 if test "${enable_hard_tabs+set}" = set; then
8932   enableval="$enable_hard_tabs"
8933
8934 else
8935   enable_hard_tabs=$with_develop
8936 fi;
8937 echo "$as_me:8937: result: $enable_hard_tabs" >&5
8938 echo "${ECHO_T}$enable_hard_tabs" >&6
8939 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8940 #define USE_HARD_TABS 1
8941 EOF
8942
8943 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8944 echo "$as_me:8944: checking if you want limited support for xmc" >&5
8945 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8946
8947 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8948 if test "${enable_xmc_glitch+set}" = set; then
8949   enableval="$enable_xmc_glitch"
8950
8951 else
8952   enable_xmc_glitch=$with_develop
8953 fi;
8954 echo "$as_me:8954: result: $enable_xmc_glitch" >&5
8955 echo "${ECHO_T}$enable_xmc_glitch" >&6
8956 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8957 #define USE_XMC_SUPPORT 1
8958 EOF
8959
8960 ###############################################################################
8961 # These are just experimental, probably should not be in a package:
8962
8963 echo "$as_me:8963: checking if you do not want to assume colors are white-on-black" >&5
8964 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8965
8966 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8967 if test "${enable_assumed_color+set}" = set; then
8968   enableval="$enable_assumed_color"
8969   with_assumed_color=$enableval
8970 else
8971   with_assumed_color=yes
8972 fi;
8973 echo "$as_me:8973: result: $with_assumed_color" >&5
8974 echo "${ECHO_T}$with_assumed_color" >&6
8975 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8976 #define USE_ASSUMED_COLOR 1
8977 EOF
8978
8979 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8980 echo "$as_me:8980: checking if you want hashmap scrolling-optimization code" >&5
8981 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8982
8983 # Check whether --enable-hashmap or --disable-hashmap was given.
8984 if test "${enable_hashmap+set}" = set; then
8985   enableval="$enable_hashmap"
8986   with_hashmap=$enableval
8987 else
8988   with_hashmap=yes
8989 fi;
8990 echo "$as_me:8990: result: $with_hashmap" >&5
8991 echo "${ECHO_T}$with_hashmap" >&6
8992 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8993 #define USE_HASHMAP 1
8994 EOF
8995
8996 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8997 echo "$as_me:8997: checking if you want colorfgbg code" >&5
8998 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8999
9000 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9001 if test "${enable_colorfgbg+set}" = set; then
9002   enableval="$enable_colorfgbg"
9003   with_colorfgbg=$enableval
9004 else
9005   with_colorfgbg=no
9006 fi;
9007 echo "$as_me:9007: result: $with_colorfgbg" >&5
9008 echo "${ECHO_T}$with_colorfgbg" >&6
9009 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9010 #define USE_COLORFGBG 1
9011 EOF
9012
9013 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9014 echo "$as_me:9014: checking if you want to use experimental extended colors" >&5
9015 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9016
9017 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9018 if test "${enable_ext_colors+set}" = set; then
9019   enableval="$enable_ext_colors"
9020   with_ext_colors=$enableval
9021 else
9022   with_ext_colors=no
9023 fi;
9024 echo "$as_me:9024: result: $with_ext_colors" >&5
9025 echo "${ECHO_T}$with_ext_colors" >&6
9026 NCURSES_EXT_COLORS=0
9027 if test "$with_ext_colors" = yes ; then
9028         if test "$with_widec" != yes ; then
9029                 { echo "$as_me:9029: WARNING: This option applies only to wide-character library" >&5
9030 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
9031         else
9032                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9033
9034 if test "${with_abi_version+set}" != set; then
9035         case $cf_cv_rel_version in
9036         5.*)
9037                 cf_cv_rel_version=6.0
9038                 cf_cv_abi_version=6
9039                 { echo "$as_me:9039: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9040 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9041                 ;;
9042         esac
9043 fi
9044
9045         fi
9046         NCURSES_EXT_COLORS=1
9047         cat >>confdefs.h <<\EOF
9048 #define NCURSES_EXT_COLORS 1
9049 EOF
9050
9051 fi
9052
9053 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9054 echo "$as_me:9054: checking if you want to use experimental extended mouse encoding" >&5
9055 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9056
9057 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9058 if test "${enable_ext_mouse+set}" = set; then
9059   enableval="$enable_ext_mouse"
9060   with_ext_mouse=$enableval
9061 else
9062   with_ext_mouse=no
9063 fi;
9064 echo "$as_me:9064: result: $with_ext_mouse" >&5
9065 echo "${ECHO_T}$with_ext_mouse" >&6
9066 NCURSES_MOUSE_VERSION=1
9067 if test "$with_ext_mouse" = yes ; then
9068         NCURSES_MOUSE_VERSION=2
9069
9070 if test "${with_abi_version+set}" != set; then
9071         case $cf_cv_rel_version in
9072         5.*)
9073                 cf_cv_rel_version=6.0
9074                 cf_cv_abi_version=6
9075                 { echo "$as_me:9075: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9076 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9077                 ;;
9078         esac
9079 fi
9080
9081 fi
9082
9083 echo "$as_me:9083: checking if you want experimental safe-sprintf code" >&5
9084 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9085
9086 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9087 if test "${enable_safe_sprintf+set}" = set; then
9088   enableval="$enable_safe_sprintf"
9089   with_safe_sprintf=$enableval
9090 else
9091   with_safe_sprintf=no
9092 fi;
9093 echo "$as_me:9093: result: $with_safe_sprintf" >&5
9094 echo "${ECHO_T}$with_safe_sprintf" >&6
9095 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9096 #define USE_SAFE_SPRINTF 1
9097 EOF
9098
9099 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9100 # when hashmap is used scroll hints are useless
9101 if test "$with_hashmap" = no ; then
9102 echo "$as_me:9102: checking if you want to experiment without scrolling-hints code" >&5
9103 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9104
9105 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9106 if test "${enable_scroll_hints+set}" = set; then
9107   enableval="$enable_scroll_hints"
9108   with_scroll_hints=$enableval
9109 else
9110   with_scroll_hints=yes
9111 fi;
9112 echo "$as_me:9112: result: $with_scroll_hints" >&5
9113 echo "${ECHO_T}$with_scroll_hints" >&6
9114 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9115 #define USE_SCROLL_HINTS 1
9116 EOF
9117
9118 fi
9119
9120 echo "$as_me:9120: checking if you want experimental wgetch-events code" >&5
9121 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9122
9123 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9124 if test "${enable_wgetch_events+set}" = set; then
9125   enableval="$enable_wgetch_events"
9126   with_wgetch_events=$enableval
9127 else
9128   with_wgetch_events=no
9129 fi;
9130 echo "$as_me:9130: result: $with_wgetch_events" >&5
9131 echo "${ECHO_T}$with_wgetch_events" >&6
9132 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9133 #define NCURSES_WGETCH_EVENTS 1
9134 EOF
9135
9136 ###############################################################################
9137
9138 ###     use option --disable-echo to suppress full display compiling commands
9139 echo "$as_me:9139: checking if you want to display full commands during build" >&5
9140 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9141
9142 # Check whether --enable-echo or --disable-echo was given.
9143 if test "${enable_echo+set}" = set; then
9144   enableval="$enable_echo"
9145   with_echo=$enableval
9146 else
9147   with_echo=yes
9148 fi;
9149 if test "$with_echo" = yes; then
9150         ECHO_LINK=
9151 else
9152         ECHO_LINK='@ echo linking $@ ... ;'
9153         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9154 fi
9155 echo "$as_me:9155: result: $with_echo" >&5
9156 echo "${ECHO_T}$with_echo" >&6
9157
9158 ###     use option --enable-warnings to turn on all gcc warnings
9159 echo "$as_me:9159: checking if you want to see compiler warnings" >&5
9160 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9161
9162 # Check whether --enable-warnings or --disable-warnings was given.
9163 if test "${enable_warnings+set}" = set; then
9164   enableval="$enable_warnings"
9165   with_warnings=$enableval
9166 fi;
9167 echo "$as_me:9167: result: $with_warnings" >&5
9168 echo "${ECHO_T}$with_warnings" >&6
9169
9170 if test -n "$with_warnings"; then
9171         ADAFLAGS="$ADAFLAGS -gnatg"
9172
9173 INTEL_COMPILER=no
9174
9175 if test "$GCC" = yes ; then
9176         case $host_os in
9177         linux*|gnu*)
9178                 echo "$as_me:9178: checking if this is really Intel C compiler" >&5
9179 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9180                 cf_save_CFLAGS="$CFLAGS"
9181                 CFLAGS="$CFLAGS -no-gcc"
9182                 cat >conftest.$ac_ext <<_ACEOF
9183 #line 9183 "configure"
9184 #include "confdefs.h"
9185
9186 int
9187 main ()
9188 {
9189
9190 #ifdef __INTEL_COMPILER
9191 #else
9192 make an error
9193 #endif
9194
9195   ;
9196   return 0;
9197 }
9198 _ACEOF
9199 rm -f conftest.$ac_objext
9200 if { (eval echo "$as_me:9200: \"$ac_compile\"") >&5
9201   (eval $ac_compile) 2>&5
9202   ac_status=$?
9203   echo "$as_me:9203: \$? = $ac_status" >&5
9204   (exit $ac_status); } &&
9205          { ac_try='test -s conftest.$ac_objext'
9206   { (eval echo "$as_me:9206: \"$ac_try\"") >&5
9207   (eval $ac_try) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); }; }; then
9211   INTEL_COMPILER=yes
9212 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9213
9214 else
9215   echo "$as_me: failed program was:" >&5
9216 cat conftest.$ac_ext >&5
9217 fi
9218 rm -f conftest.$ac_objext conftest.$ac_ext
9219                 CFLAGS="$cf_save_CFLAGS"
9220                 echo "$as_me:9220: result: $INTEL_COMPILER" >&5
9221 echo "${ECHO_T}$INTEL_COMPILER" >&6
9222                 ;;
9223         esac
9224 fi
9225
9226 cat > conftest.$ac_ext <<EOF
9227 #line 9227 "configure"
9228 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9229 EOF
9230
9231 if test "$INTEL_COMPILER" = yes
9232 then
9233 # The "-wdXXX" options suppress warnings:
9234 # remark #1419: external declaration in primary source file
9235 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9236 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9237 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9238 # remark #193: zero used for undefined preprocessing identifier
9239 # remark #593: variable "curs_sb_left_arrow" was set but never used
9240 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9241 # remark #869: parameter "tw" was never referenced
9242 # remark #981: operands are evaluated in unspecified order
9243 # warning #269: invalid format string conversion
9244
9245         { echo "$as_me:9245: checking for $CC warning options..." >&5
9246 echo "$as_me: checking for $CC warning options..." >&6;}
9247         cf_save_CFLAGS="$CFLAGS"
9248         EXTRA_CFLAGS="-Wall"
9249         for cf_opt in  \
9250                 wd1419 \
9251                 wd1682 \
9252                 wd1683 \
9253                 wd1684 \
9254                 wd193 \
9255                 wd279 \
9256                 wd593 \
9257                 wd810 \
9258                 wd869 \
9259                 wd981
9260         do
9261                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9262                 if { (eval echo "$as_me:9262: \"$ac_compile\"") >&5
9263   (eval $ac_compile) 2>&5
9264   ac_status=$?
9265   echo "$as_me:9265: \$? = $ac_status" >&5
9266   (exit $ac_status); }; then
9267                         test -n "$verbose" && echo "$as_me:9267: result: ... -$cf_opt" >&5
9268 echo "${ECHO_T}... -$cf_opt" >&6
9269                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9270                 fi
9271         done
9272         CFLAGS="$cf_save_CFLAGS"
9273
9274 elif test "$GCC" = yes
9275 then
9276         { echo "$as_me:9276: checking for $CC warning options..." >&5
9277 echo "$as_me: checking for $CC warning options..." >&6;}
9278         cf_save_CFLAGS="$CFLAGS"
9279         EXTRA_CFLAGS="-W -Wall"
9280         cf_warn_CONST=""
9281         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9282         for cf_opt in \
9283                 Wbad-function-cast \
9284                 Wcast-align \
9285                 Wcast-qual \
9286                 Winline \
9287                 Wmissing-declarations \
9288                 Wmissing-prototypes \
9289                 Wnested-externs \
9290                 Wpointer-arith \
9291                 Wshadow \
9292                 Wstrict-prototypes \
9293                 Wundef $cf_warn_CONST
9294         do
9295                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9296                 if { (eval echo "$as_me:9296: \"$ac_compile\"") >&5
9297   (eval $ac_compile) 2>&5
9298   ac_status=$?
9299   echo "$as_me:9299: \$? = $ac_status" >&5
9300   (exit $ac_status); }; then
9301                         test -n "$verbose" && echo "$as_me:9301: result: ... -$cf_opt" >&5
9302 echo "${ECHO_T}... -$cf_opt" >&6
9303                         case $cf_opt in #(vi
9304                         Wcast-qual) #(vi
9305                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9306                                 ;;
9307                         Winline) #(vi
9308                                 case $GCC_VERSION in
9309                                 3.3*)
9310                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9311
9312                                         continue;;
9313                                 esac
9314                                 ;;
9315                         esac
9316                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9317                 fi
9318         done
9319         CFLAGS="$cf_save_CFLAGS"
9320 fi
9321 rm -f conftest*
9322
9323         if test "$cf_with_cxx" = yes ; then
9324
9325 INTEL_CPLUSPLUS=no
9326
9327 if test "$GCC" = yes ; then
9328         case $host_os in
9329         linux*|gnu*)
9330                 echo "$as_me:9330: checking if this is really Intel C++ compiler" >&5
9331 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9332                 cf_save_CFLAGS="$CXXFLAGS"
9333                 CXXFLAGS="$CXXFLAGS -no-gcc"
9334                 cat >conftest.$ac_ext <<_ACEOF
9335 #line 9335 "configure"
9336 #include "confdefs.h"
9337
9338 int
9339 main ()
9340 {
9341
9342 #ifdef __INTEL_COMPILER
9343 #else
9344 make an error
9345 #endif
9346
9347   ;
9348   return 0;
9349 }
9350 _ACEOF
9351 rm -f conftest.$ac_objext
9352 if { (eval echo "$as_me:9352: \"$ac_compile\"") >&5
9353   (eval $ac_compile) 2>&5
9354   ac_status=$?
9355   echo "$as_me:9355: \$? = $ac_status" >&5
9356   (exit $ac_status); } &&
9357          { ac_try='test -s conftest.$ac_objext'
9358   { (eval echo "$as_me:9358: \"$ac_try\"") >&5
9359   (eval $ac_try) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); }; }; then
9363   INTEL_CPLUSPLUS=yes
9364 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9365
9366 else
9367   echo "$as_me: failed program was:" >&5
9368 cat conftest.$ac_ext >&5
9369 fi
9370 rm -f conftest.$ac_objext conftest.$ac_ext
9371                 CXXFLAGS="$cf_save_CFLAGS"
9372                 echo "$as_me:9372: result: $INTEL_CPLUSPLUS" >&5
9373 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9374                 ;;
9375         esac
9376 fi
9377
9378 ac_ext=cc
9379 ac_cpp='$CXXCPP $CPPFLAGS'
9380 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9381 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9382 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9383 ac_main_return=return
9384
9385 cat > conftest.$ac_ext <<EOF
9386 #line 9386 "configure"
9387 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9388 EOF
9389
9390 if test "$INTEL_CPLUSPLUS" = yes
9391 then
9392 # The "-wdXXX" options suppress warnings:
9393 # remark #1419: external declaration in primary source file
9394 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9395 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9396 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9397 # remark #193: zero used for undefined preprocessing identifier
9398 # remark #593: variable "curs_sb_left_arrow" was set but never used
9399 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9400 # remark #869: parameter "tw" was never referenced
9401 # remark #981: operands are evaluated in unspecified order
9402 # warning #269: invalid format string conversion
9403
9404         { echo "$as_me:9404: checking for $CC warning options..." >&5
9405 echo "$as_me: checking for $CC warning options..." >&6;}
9406         cf_save_CXXFLAGS="$CXXFLAGS"
9407         EXTRA_CXXFLAGS="-Wall"
9408         for cf_opt in \
9409                 wd1419 \
9410                 wd1682 \
9411                 wd1683 \
9412                 wd1684 \
9413                 wd193 \
9414                 wd279 \
9415                 wd593 \
9416                 wd810 \
9417                 wd869 \
9418                 wd981
9419         do
9420                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9421                 if { (eval echo "$as_me:9421: \"$ac_compile\"") >&5
9422   (eval $ac_compile) 2>&5
9423   ac_status=$?
9424   echo "$as_me:9424: \$? = $ac_status" >&5
9425   (exit $ac_status); }; then
9426                         test -n "$verbose" && echo "$as_me:9426: result: ... -$cf_opt" >&5
9427 echo "${ECHO_T}... -$cf_opt" >&6
9428                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9429                 fi
9430         done
9431         CXXFLAGS="$cf_save_CXXFLAGS"
9432
9433 elif test "$GXX" = yes
9434 then
9435         { echo "$as_me:9435: checking for $CXX warning options..." >&5
9436 echo "$as_me: checking for $CXX warning options..." >&6;}
9437         cf_save_CXXFLAGS="$CXXFLAGS"
9438         EXTRA_CXXFLAGS="-W -Wall"
9439         cf_gxx_extra_warnings=""
9440         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9441         case "$GCC_VERSION" in
9442         [1-2].*)
9443                 ;;
9444         *)
9445                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9446                 ;;
9447         esac
9448         for cf_opt in \
9449                 Wabi \
9450                 fabi-version=0 \
9451                 Woverloaded-virtual \
9452                 Wsign-promo \
9453                 Wsynth \
9454                 Wold-style-cast \
9455                 Wcast-align \
9456                 Wcast-qual \
9457                 Wmissing-prototypes \
9458                 Wpointer-arith \
9459                 Wshadow \
9460                 Wstrict-prototypes \
9461                 Wundef $cf_gxx_extra_warnings Wno-unused
9462         do
9463                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9464                 if { (eval echo "$as_me:9464: \"$ac_compile\"") >&5
9465   (eval $ac_compile) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); }; then
9469                         test -n "$verbose" && echo "$as_me:9469: result: ... -$cf_opt" >&5
9470 echo "${ECHO_T}... -$cf_opt" >&6
9471                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9472                 else
9473                         test -n "$verbose" && echo "$as_me:9473: result: ... no -$cf_opt" >&5
9474 echo "${ECHO_T}... no -$cf_opt" >&6
9475                 fi
9476         done
9477         CXXFLAGS="$cf_save_CXXFLAGS"
9478 fi
9479
9480 rm -f conftest*
9481 ac_ext=c
9482 ac_cpp='$CPP $CPPFLAGS'
9483 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9484 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9485 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9486 ac_main_return=return
9487
9488         fi
9489 fi
9490
9491 if test "$GCC" = yes
9492 then
9493 cat > conftest.i <<EOF
9494 #ifndef GCC_PRINTF
9495 #define GCC_PRINTF 0
9496 #endif
9497 #ifndef GCC_SCANF
9498 #define GCC_SCANF 0
9499 #endif
9500 #ifndef GCC_NORETURN
9501 #define GCC_NORETURN /* nothing */
9502 #endif
9503 #ifndef GCC_UNUSED
9504 #define GCC_UNUSED /* nothing */
9505 #endif
9506 EOF
9507 if test "$GCC" = yes
9508 then
9509         { echo "$as_me:9509: checking for $CC __attribute__ directives..." >&5
9510 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9511 cat > conftest.$ac_ext <<EOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514 #include "conftest.h"
9515 #include "conftest.i"
9516 #if     GCC_PRINTF
9517 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9518 #else
9519 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9520 #endif
9521 #if     GCC_SCANF
9522 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9523 #else
9524 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9525 #endif
9526 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9527 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9528 extern void foo(void) GCC_NORETURN;
9529 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9530 EOF
9531         for cf_attribute in scanf printf unused noreturn
9532         do
9533
9534 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9535
9536                 cf_directive="__attribute__(($cf_attribute))"
9537                 echo "checking for $CC $cf_directive" 1>&5
9538                 case $cf_attribute in
9539                 scanf|printf)
9540                 cat >conftest.h <<EOF
9541 #define GCC_$cf_ATTRIBUTE 1
9542 EOF
9543                         ;;
9544                 *)
9545                 cat >conftest.h <<EOF
9546 #define GCC_$cf_ATTRIBUTE $cf_directive
9547 EOF
9548                         ;;
9549                 esac
9550                 if { (eval echo "$as_me:9550: \"$ac_compile\"") >&5
9551   (eval $ac_compile) 2>&5
9552   ac_status=$?
9553   echo "$as_me:9553: \$? = $ac_status" >&5
9554   (exit $ac_status); }; then
9555                         test -n "$verbose" && echo "$as_me:9555: result: ... $cf_attribute" >&5
9556 echo "${ECHO_T}... $cf_attribute" >&6
9557                         cat conftest.h >>confdefs.h
9558                 fi
9559         done
9560 else
9561         fgrep define conftest.i >>confdefs.h
9562 fi
9563 rm -rf conftest*
9564 fi
9565
9566 ###     use option --enable-assertions to turn on generation of assertion code
9567 echo "$as_me:9567: checking if you want to enable runtime assertions" >&5
9568 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9569
9570 # Check whether --enable-assertions or --disable-assertions was given.
9571 if test "${enable_assertions+set}" = set; then
9572   enableval="$enable_assertions"
9573   with_assertions=$enableval
9574 else
9575   with_assertions=no
9576 fi;
9577 echo "$as_me:9577: result: $with_assertions" >&5
9578 echo "${ECHO_T}$with_assertions" >&6
9579 if test -n "$GCC"
9580 then
9581         if test "$with_assertions" = no
9582         then
9583                 cat >>confdefs.h <<\EOF
9584 #define NDEBUG 1
9585 EOF
9586
9587                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9588         else
9589                 ADAFLAGS="$ADAFLAGS -gnata"
9590         fi
9591 fi
9592
9593 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9594
9595 echo "$as_me:9595: checking if you want to use dmalloc for testing" >&5
9596 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9597
9598 # Check whether --with-dmalloc or --without-dmalloc was given.
9599 if test "${with_dmalloc+set}" = set; then
9600   withval="$with_dmalloc"
9601   cat >>confdefs.h <<\EOF
9602 #define USE_DMALLOC 1
9603 EOF
9604
9605         : ${with_cflags:=-g}
9606         : ${with_no_leaks:=yes}
9607          with_dmalloc=yes
9608 else
9609   with_dmalloc=
9610 fi;
9611 echo "$as_me:9611: result: ${with_dmalloc:-no}" >&5
9612 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9613
9614 case .$with_cflags in #(vi
9615 .*-g*)
9616         case .$CFLAGS in #(vi
9617         .*-g*) #(vi
9618                 ;;
9619         *)
9620
9621 cf_fix_cppflags=no
9622 cf_new_cflags=
9623 cf_new_cppflags=
9624 cf_new_extra_cppflags=
9625
9626 for cf_add_cflags in -g
9627 do
9628 case $cf_fix_cppflags in
9629 no)
9630         case $cf_add_cflags in #(vi
9631         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9632                 case $cf_add_cflags in
9633                 -D*)
9634                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9635
9636                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9637                         && test -z "${cf_tst_cflags}" \
9638                         && cf_fix_cppflags=yes
9639
9640                         if test $cf_fix_cppflags = yes ; then
9641                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9642                                 continue
9643                         elif test "${cf_tst_cflags}" = "\"'" ; then
9644                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9645                                 continue
9646                         fi
9647                         ;;
9648                 esac
9649                 case "$CPPFLAGS" in
9650                 *$cf_add_cflags) #(vi
9651                         ;;
9652                 *) #(vi
9653                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9654                         ;;
9655                 esac
9656                 ;;
9657         *)
9658                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9659                 ;;
9660         esac
9661         ;;
9662 yes)
9663         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9664
9665         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9666
9667         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9668         && test -z "${cf_tst_cflags}" \
9669         && cf_fix_cppflags=no
9670         ;;
9671 esac
9672 done
9673
9674 if test -n "$cf_new_cflags" ; then
9675
9676         CFLAGS="$CFLAGS $cf_new_cflags"
9677 fi
9678
9679 if test -n "$cf_new_cppflags" ; then
9680
9681         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9682 fi
9683
9684 if test -n "$cf_new_extra_cppflags" ; then
9685
9686         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9687 fi
9688
9689                 ;;
9690         esac
9691         ;;
9692 esac
9693
9694 if test "$with_dmalloc" = yes ; then
9695         echo "$as_me:9695: checking for dmalloc.h" >&5
9696 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9697 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9698   echo $ECHO_N "(cached) $ECHO_C" >&6
9699 else
9700   cat >conftest.$ac_ext <<_ACEOF
9701 #line 9701 "configure"
9702 #include "confdefs.h"
9703 #include <dmalloc.h>
9704 _ACEOF
9705 if { (eval echo "$as_me:9705: \"$ac_cpp conftest.$ac_ext\"") >&5
9706   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9707   ac_status=$?
9708   egrep -v '^ *\+' conftest.er1 >conftest.err
9709   rm -f conftest.er1
9710   cat conftest.err >&5
9711   echo "$as_me:9711: \$? = $ac_status" >&5
9712   (exit $ac_status); } >/dev/null; then
9713   if test -s conftest.err; then
9714     ac_cpp_err=$ac_c_preproc_warn_flag
9715   else
9716     ac_cpp_err=
9717   fi
9718 else
9719   ac_cpp_err=yes
9720 fi
9721 if test -z "$ac_cpp_err"; then
9722   ac_cv_header_dmalloc_h=yes
9723 else
9724   echo "$as_me: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   ac_cv_header_dmalloc_h=no
9727 fi
9728 rm -f conftest.err conftest.$ac_ext
9729 fi
9730 echo "$as_me:9730: result: $ac_cv_header_dmalloc_h" >&5
9731 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9732 if test $ac_cv_header_dmalloc_h = yes; then
9733
9734 echo "$as_me:9734: checking for dmalloc_debug in -ldmalloc" >&5
9735 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9736 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9737   echo $ECHO_N "(cached) $ECHO_C" >&6
9738 else
9739   ac_check_lib_save_LIBS=$LIBS
9740 LIBS="-ldmalloc  $LIBS"
9741 cat >conftest.$ac_ext <<_ACEOF
9742 #line 9742 "configure"
9743 #include "confdefs.h"
9744
9745 /* Override any gcc2 internal prototype to avoid an error.  */
9746 #ifdef __cplusplus
9747 extern "C"
9748 #endif
9749 /* We use char because int might match the return type of a gcc2
9750    builtin and then its argument prototype would still apply.  */
9751 char dmalloc_debug ();
9752 int
9753 main ()
9754 {
9755 dmalloc_debug ();
9756   ;
9757   return 0;
9758 }
9759 _ACEOF
9760 rm -f conftest.$ac_objext conftest$ac_exeext
9761 if { (eval echo "$as_me:9761: \"$ac_link\"") >&5
9762   (eval $ac_link) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); } &&
9766          { ac_try='test -s conftest$ac_exeext'
9767   { (eval echo "$as_me:9767: \"$ac_try\"") >&5
9768   (eval $ac_try) 2>&5
9769   ac_status=$?
9770   echo "$as_me:9770: \$? = $ac_status" >&5
9771   (exit $ac_status); }; }; then
9772   ac_cv_lib_dmalloc_dmalloc_debug=yes
9773 else
9774   echo "$as_me: failed program was:" >&5
9775 cat conftest.$ac_ext >&5
9776 ac_cv_lib_dmalloc_dmalloc_debug=no
9777 fi
9778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9779 LIBS=$ac_check_lib_save_LIBS
9780 fi
9781 echo "$as_me:9781: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9782 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9783 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9784   cat >>confdefs.h <<EOF
9785 #define HAVE_LIBDMALLOC 1
9786 EOF
9787
9788   LIBS="-ldmalloc $LIBS"
9789
9790 fi
9791
9792 fi
9793
9794 fi
9795
9796 echo "$as_me:9796: checking if you want to use dbmalloc for testing" >&5
9797 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9798
9799 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9800 if test "${with_dbmalloc+set}" = set; then
9801   withval="$with_dbmalloc"
9802   cat >>confdefs.h <<\EOF
9803 #define USE_DBMALLOC 1
9804 EOF
9805
9806         : ${with_cflags:=-g}
9807         : ${with_no_leaks:=yes}
9808          with_dbmalloc=yes
9809 else
9810   with_dbmalloc=
9811 fi;
9812 echo "$as_me:9812: result: ${with_dbmalloc:-no}" >&5
9813 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9814
9815 case .$with_cflags in #(vi
9816 .*-g*)
9817         case .$CFLAGS in #(vi
9818         .*-g*) #(vi
9819                 ;;
9820         *)
9821
9822 cf_fix_cppflags=no
9823 cf_new_cflags=
9824 cf_new_cppflags=
9825 cf_new_extra_cppflags=
9826
9827 for cf_add_cflags in -g
9828 do
9829 case $cf_fix_cppflags in
9830 no)
9831         case $cf_add_cflags in #(vi
9832         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9833                 case $cf_add_cflags in
9834                 -D*)
9835                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9836
9837                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9838                         && test -z "${cf_tst_cflags}" \
9839                         && cf_fix_cppflags=yes
9840
9841                         if test $cf_fix_cppflags = yes ; then
9842                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9843                                 continue
9844                         elif test "${cf_tst_cflags}" = "\"'" ; then
9845                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9846                                 continue
9847                         fi
9848                         ;;
9849                 esac
9850                 case "$CPPFLAGS" in
9851                 *$cf_add_cflags) #(vi
9852                         ;;
9853                 *) #(vi
9854                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9855                         ;;
9856                 esac
9857                 ;;
9858         *)
9859                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9860                 ;;
9861         esac
9862         ;;
9863 yes)
9864         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9865
9866         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9867
9868         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9869         && test -z "${cf_tst_cflags}" \
9870         && cf_fix_cppflags=no
9871         ;;
9872 esac
9873 done
9874
9875 if test -n "$cf_new_cflags" ; then
9876
9877         CFLAGS="$CFLAGS $cf_new_cflags"
9878 fi
9879
9880 if test -n "$cf_new_cppflags" ; then
9881
9882         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9883 fi
9884
9885 if test -n "$cf_new_extra_cppflags" ; then
9886
9887         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9888 fi
9889
9890                 ;;
9891         esac
9892         ;;
9893 esac
9894
9895 if test "$with_dbmalloc" = yes ; then
9896         echo "$as_me:9896: checking for dbmalloc.h" >&5
9897 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9898 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9899   echo $ECHO_N "(cached) $ECHO_C" >&6
9900 else
9901   cat >conftest.$ac_ext <<_ACEOF
9902 #line 9902 "configure"
9903 #include "confdefs.h"
9904 #include <dbmalloc.h>
9905 _ACEOF
9906 if { (eval echo "$as_me:9906: \"$ac_cpp conftest.$ac_ext\"") >&5
9907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9908   ac_status=$?
9909   egrep -v '^ *\+' conftest.er1 >conftest.err
9910   rm -f conftest.er1
9911   cat conftest.err >&5
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); } >/dev/null; then
9914   if test -s conftest.err; then
9915     ac_cpp_err=$ac_c_preproc_warn_flag
9916   else
9917     ac_cpp_err=
9918   fi
9919 else
9920   ac_cpp_err=yes
9921 fi
9922 if test -z "$ac_cpp_err"; then
9923   ac_cv_header_dbmalloc_h=yes
9924 else
9925   echo "$as_me: failed program was:" >&5
9926   cat conftest.$ac_ext >&5
9927   ac_cv_header_dbmalloc_h=no
9928 fi
9929 rm -f conftest.err conftest.$ac_ext
9930 fi
9931 echo "$as_me:9931: result: $ac_cv_header_dbmalloc_h" >&5
9932 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9933 if test $ac_cv_header_dbmalloc_h = yes; then
9934
9935 echo "$as_me:9935: checking for debug_malloc in -ldbmalloc" >&5
9936 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9937 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9938   echo $ECHO_N "(cached) $ECHO_C" >&6
9939 else
9940   ac_check_lib_save_LIBS=$LIBS
9941 LIBS="-ldbmalloc  $LIBS"
9942 cat >conftest.$ac_ext <<_ACEOF
9943 #line 9943 "configure"
9944 #include "confdefs.h"
9945
9946 /* Override any gcc2 internal prototype to avoid an error.  */
9947 #ifdef __cplusplus
9948 extern "C"
9949 #endif
9950 /* We use char because int might match the return type of a gcc2
9951    builtin and then its argument prototype would still apply.  */
9952 char debug_malloc ();
9953 int
9954 main ()
9955 {
9956 debug_malloc ();
9957   ;
9958   return 0;
9959 }
9960 _ACEOF
9961 rm -f conftest.$ac_objext conftest$ac_exeext
9962 if { (eval echo "$as_me:9962: \"$ac_link\"") >&5
9963   (eval $ac_link) 2>&5
9964   ac_status=$?
9965   echo "$as_me:9965: \$? = $ac_status" >&5
9966   (exit $ac_status); } &&
9967          { ac_try='test -s conftest$ac_exeext'
9968   { (eval echo "$as_me:9968: \"$ac_try\"") >&5
9969   (eval $ac_try) 2>&5
9970   ac_status=$?
9971   echo "$as_me:9971: \$? = $ac_status" >&5
9972   (exit $ac_status); }; }; then
9973   ac_cv_lib_dbmalloc_debug_malloc=yes
9974 else
9975   echo "$as_me: failed program was:" >&5
9976 cat conftest.$ac_ext >&5
9977 ac_cv_lib_dbmalloc_debug_malloc=no
9978 fi
9979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9980 LIBS=$ac_check_lib_save_LIBS
9981 fi
9982 echo "$as_me:9982: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9983 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9984 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9985   cat >>confdefs.h <<EOF
9986 #define HAVE_LIBDBMALLOC 1
9987 EOF
9988
9989   LIBS="-ldbmalloc $LIBS"
9990
9991 fi
9992
9993 fi
9994
9995 fi
9996
9997 echo "$as_me:9997: checking if you want to use valgrind for testing" >&5
9998 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9999
10000 # Check whether --with-valgrind or --without-valgrind was given.
10001 if test "${with_valgrind+set}" = set; then
10002   withval="$with_valgrind"
10003   cat >>confdefs.h <<\EOF
10004 #define USE_VALGRIND 1
10005 EOF
10006
10007         : ${with_cflags:=-g}
10008         : ${with_no_leaks:=yes}
10009          with_valgrind=yes
10010 else
10011   with_valgrind=
10012 fi;
10013 echo "$as_me:10013: result: ${with_valgrind:-no}" >&5
10014 echo "${ECHO_T}${with_valgrind:-no}" >&6
10015
10016 case .$with_cflags in #(vi
10017 .*-g*)
10018         case .$CFLAGS in #(vi
10019         .*-g*) #(vi
10020                 ;;
10021         *)
10022
10023 cf_fix_cppflags=no
10024 cf_new_cflags=
10025 cf_new_cppflags=
10026 cf_new_extra_cppflags=
10027
10028 for cf_add_cflags in -g
10029 do
10030 case $cf_fix_cppflags in
10031 no)
10032         case $cf_add_cflags in #(vi
10033         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10034                 case $cf_add_cflags in
10035                 -D*)
10036                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10037
10038                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10039                         && test -z "${cf_tst_cflags}" \
10040                         && cf_fix_cppflags=yes
10041
10042                         if test $cf_fix_cppflags = yes ; then
10043                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10044                                 continue
10045                         elif test "${cf_tst_cflags}" = "\"'" ; then
10046                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10047                                 continue
10048                         fi
10049                         ;;
10050                 esac
10051                 case "$CPPFLAGS" in
10052                 *$cf_add_cflags) #(vi
10053                         ;;
10054                 *) #(vi
10055                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10056                         ;;
10057                 esac
10058                 ;;
10059         *)
10060                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10061                 ;;
10062         esac
10063         ;;
10064 yes)
10065         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10066
10067         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10068
10069         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10070         && test -z "${cf_tst_cflags}" \
10071         && cf_fix_cppflags=no
10072         ;;
10073 esac
10074 done
10075
10076 if test -n "$cf_new_cflags" ; then
10077
10078         CFLAGS="$CFLAGS $cf_new_cflags"
10079 fi
10080
10081 if test -n "$cf_new_cppflags" ; then
10082
10083         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10084 fi
10085
10086 if test -n "$cf_new_extra_cppflags" ; then
10087
10088         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10089 fi
10090
10091                 ;;
10092         esac
10093         ;;
10094 esac
10095
10096 echo "$as_me:10096: checking if you want to perform memory-leak testing" >&5
10097 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10098
10099 # Check whether --enable-leaks or --disable-leaks was given.
10100 if test "${enable_leaks+set}" = set; then
10101   enableval="$enable_leaks"
10102   with_no_leaks=yes
10103 else
10104   : ${with_no_leaks:=no}
10105 fi;
10106 echo "$as_me:10106: result: $with_no_leaks" >&5
10107 echo "${ECHO_T}$with_no_leaks" >&6
10108
10109 if test "$with_no_leaks" = yes ; then
10110         cat >>confdefs.h <<\EOF
10111 #define NO_LEAKS 1
10112 EOF
10113
10114 fi
10115
10116 cat >>confdefs.h <<\EOF
10117 #define HAVE_NC_ALLOC_H 1
10118 EOF
10119
10120 ###     use option --enable-expanded to generate certain macros as functions
10121
10122 # Check whether --enable-expanded or --disable-expanded was given.
10123 if test "${enable_expanded+set}" = set; then
10124   enableval="$enable_expanded"
10125   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10126 #define NCURSES_EXPANDED 1
10127 EOF
10128
10129 fi;
10130
10131 ###     use option --disable-macros to suppress macros in favor of functions
10132
10133 # Check whether --enable-macros or --disable-macros was given.
10134 if test "${enable_macros+set}" = set; then
10135   enableval="$enable_macros"
10136   test "$enableval" = no && cat >>confdefs.h <<\EOF
10137 #define NCURSES_NOMACROS 1
10138 EOF
10139
10140 fi;
10141
10142 # Normally we only add trace() to the debug-library.  Allow this to be
10143 # extended to all models of the ncurses library:
10144 cf_all_traces=no
10145 case "$CFLAGS $CPPFLAGS" in
10146 *-DTRACE*)
10147         cf_all_traces=yes
10148         ;;
10149 esac
10150
10151 echo "$as_me:10151: checking whether to add trace feature to all models" >&5
10152 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10153
10154 # Check whether --with-trace or --without-trace was given.
10155 if test "${with_trace+set}" = set; then
10156   withval="$with_trace"
10157   cf_with_trace=$withval
10158 else
10159   cf_with_trace=$cf_all_traces
10160 fi;
10161 echo "$as_me:10161: result: $cf_with_trace" >&5
10162 echo "${ECHO_T}$cf_with_trace" >&6
10163
10164 if test "$cf_with_trace" = yes ; then
10165         LIB_TRACING=all
10166         ADA_TRACE=TRUE
10167
10168 cf_fix_cppflags=no
10169 cf_new_cflags=
10170 cf_new_cppflags=
10171 cf_new_extra_cppflags=
10172
10173 for cf_add_cflags in -DTRACE
10174 do
10175 case $cf_fix_cppflags in
10176 no)
10177         case $cf_add_cflags in #(vi
10178         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10179                 case $cf_add_cflags in
10180                 -D*)
10181                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10182
10183                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10184                         && test -z "${cf_tst_cflags}" \
10185                         && cf_fix_cppflags=yes
10186
10187                         if test $cf_fix_cppflags = yes ; then
10188                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10189                                 continue
10190                         elif test "${cf_tst_cflags}" = "\"'" ; then
10191                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10192                                 continue
10193                         fi
10194                         ;;
10195                 esac
10196                 case "$CPPFLAGS" in
10197                 *$cf_add_cflags) #(vi
10198                         ;;
10199                 *) #(vi
10200                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10201                         ;;
10202                 esac
10203                 ;;
10204         *)
10205                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10206                 ;;
10207         esac
10208         ;;
10209 yes)
10210         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10211
10212         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10213
10214         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10215         && test -z "${cf_tst_cflags}" \
10216         && cf_fix_cppflags=no
10217         ;;
10218 esac
10219 done
10220
10221 if test -n "$cf_new_cflags" ; then
10222
10223         CFLAGS="$CFLAGS $cf_new_cflags"
10224 fi
10225
10226 if test -n "$cf_new_cppflags" ; then
10227
10228         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10229 fi
10230
10231 if test -n "$cf_new_extra_cppflags" ; then
10232
10233         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10234 fi
10235
10236 else
10237         LIB_TRACING=DEBUG
10238         ADA_TRACE=FALSE
10239 fi
10240
10241 ###     Checks for libraries.
10242 echo "$as_me:10242: checking for gettimeofday" >&5
10243 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10244 if test "${ac_cv_func_gettimeofday+set}" = set; then
10245   echo $ECHO_N "(cached) $ECHO_C" >&6
10246 else
10247   cat >conftest.$ac_ext <<_ACEOF
10248 #line 10248 "configure"
10249 #include "confdefs.h"
10250 /* System header to define __stub macros and hopefully few prototypes,
10251     which can conflict with char gettimeofday (); below.  */
10252 #include <assert.h>
10253 /* Override any gcc2 internal prototype to avoid an error.  */
10254 #ifdef __cplusplus
10255 extern "C"
10256 #endif
10257 /* We use char because int might match the return type of a gcc2
10258    builtin and then its argument prototype would still apply.  */
10259 char gettimeofday ();
10260 char (*f) ();
10261
10262 int
10263 main ()
10264 {
10265 /* The GNU C library defines this for functions which it implements
10266     to always fail with ENOSYS.  Some functions are actually named
10267     something starting with __ and the normal name is an alias.  */
10268 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10269 choke me
10270 #else
10271 f = gettimeofday;
10272 #endif
10273
10274   ;
10275   return 0;
10276 }
10277 _ACEOF
10278 rm -f conftest.$ac_objext conftest$ac_exeext
10279 if { (eval echo "$as_me:10279: \"$ac_link\"") >&5
10280   (eval $ac_link) 2>&5
10281   ac_status=$?
10282   echo "$as_me:10282: \$? = $ac_status" >&5
10283   (exit $ac_status); } &&
10284          { ac_try='test -s conftest$ac_exeext'
10285   { (eval echo "$as_me:10285: \"$ac_try\"") >&5
10286   (eval $ac_try) 2>&5
10287   ac_status=$?
10288   echo "$as_me:10288: \$? = $ac_status" >&5
10289   (exit $ac_status); }; }; then
10290   ac_cv_func_gettimeofday=yes
10291 else
10292   echo "$as_me: failed program was:" >&5
10293 cat conftest.$ac_ext >&5
10294 ac_cv_func_gettimeofday=no
10295 fi
10296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10297 fi
10298 echo "$as_me:10298: result: $ac_cv_func_gettimeofday" >&5
10299 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10300 if test $ac_cv_func_gettimeofday = yes; then
10301   cat >>confdefs.h <<\EOF
10302 #define HAVE_GETTIMEOFDAY 1
10303 EOF
10304
10305 else
10306
10307 echo "$as_me:10307: checking for gettimeofday in -lbsd" >&5
10308 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10309 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10310   echo $ECHO_N "(cached) $ECHO_C" >&6
10311 else
10312   ac_check_lib_save_LIBS=$LIBS
10313 LIBS="-lbsd  $LIBS"
10314 cat >conftest.$ac_ext <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317
10318 /* Override any gcc2 internal prototype to avoid an error.  */
10319 #ifdef __cplusplus
10320 extern "C"
10321 #endif
10322 /* We use char because int might match the return type of a gcc2
10323    builtin and then its argument prototype would still apply.  */
10324 char gettimeofday ();
10325 int
10326 main ()
10327 {
10328 gettimeofday ();
10329   ;
10330   return 0;
10331 }
10332 _ACEOF
10333 rm -f conftest.$ac_objext conftest$ac_exeext
10334 if { (eval echo "$as_me:10334: \"$ac_link\"") >&5
10335   (eval $ac_link) 2>&5
10336   ac_status=$?
10337   echo "$as_me:10337: \$? = $ac_status" >&5
10338   (exit $ac_status); } &&
10339          { ac_try='test -s conftest$ac_exeext'
10340   { (eval echo "$as_me:10340: \"$ac_try\"") >&5
10341   (eval $ac_try) 2>&5
10342   ac_status=$?
10343   echo "$as_me:10343: \$? = $ac_status" >&5
10344   (exit $ac_status); }; }; then
10345   ac_cv_lib_bsd_gettimeofday=yes
10346 else
10347   echo "$as_me: failed program was:" >&5
10348 cat conftest.$ac_ext >&5
10349 ac_cv_lib_bsd_gettimeofday=no
10350 fi
10351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10352 LIBS=$ac_check_lib_save_LIBS
10353 fi
10354 echo "$as_me:10354: result: $ac_cv_lib_bsd_gettimeofday" >&5
10355 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10356 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10357   cat >>confdefs.h <<\EOF
10358 #define HAVE_GETTIMEOFDAY 1
10359 EOF
10360
10361         LIBS="$LIBS -lbsd"
10362 fi
10363
10364 fi
10365
10366 echo "$as_me:10366: checking if -lm needed for math functions" >&5
10367 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10368 if test "${cf_cv_need_libm+set}" = set; then
10369   echo $ECHO_N "(cached) $ECHO_C" >&6
10370 else
10371
10372         cat >conftest.$ac_ext <<_ACEOF
10373 #line 10373 "configure"
10374 #include "confdefs.h"
10375
10376         #include <stdio.h>
10377         #include <math.h>
10378
10379 int
10380 main ()
10381 {
10382 double x = rand(); printf("result = %g\n", sin(x))
10383   ;
10384   return 0;
10385 }
10386 _ACEOF
10387 rm -f conftest.$ac_objext conftest$ac_exeext
10388 if { (eval echo "$as_me:10388: \"$ac_link\"") >&5
10389   (eval $ac_link) 2>&5
10390   ac_status=$?
10391   echo "$as_me:10391: \$? = $ac_status" >&5
10392   (exit $ac_status); } &&
10393          { ac_try='test -s conftest$ac_exeext'
10394   { (eval echo "$as_me:10394: \"$ac_try\"") >&5
10395   (eval $ac_try) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); }; }; then
10399   cf_cv_need_libm=no
10400 else
10401   echo "$as_me: failed program was:" >&5
10402 cat conftest.$ac_ext >&5
10403 cf_cv_need_libm=yes
10404 fi
10405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10406 fi
10407 echo "$as_me:10407: result: $cf_cv_need_libm" >&5
10408 echo "${ECHO_T}$cf_cv_need_libm" >&6
10409 if test "$cf_cv_need_libm" = yes
10410 then
10411 MATH_LIB=-lm
10412 fi
10413
10414 ###     Checks for header files.
10415 echo "$as_me:10415: checking for ANSI C header files" >&5
10416 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10417 if test "${ac_cv_header_stdc+set}" = set; then
10418   echo $ECHO_N "(cached) $ECHO_C" >&6
10419 else
10420   cat >conftest.$ac_ext <<_ACEOF
10421 #line 10421 "configure"
10422 #include "confdefs.h"
10423 #include <stdlib.h>
10424 #include <stdarg.h>
10425 #include <string.h>
10426 #include <float.h>
10427
10428 _ACEOF
10429 if { (eval echo "$as_me:10429: \"$ac_cpp conftest.$ac_ext\"") >&5
10430   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10431   ac_status=$?
10432   egrep -v '^ *\+' conftest.er1 >conftest.err
10433   rm -f conftest.er1
10434   cat conftest.err >&5
10435   echo "$as_me:10435: \$? = $ac_status" >&5
10436   (exit $ac_status); } >/dev/null; then
10437   if test -s conftest.err; then
10438     ac_cpp_err=$ac_c_preproc_warn_flag
10439   else
10440     ac_cpp_err=
10441   fi
10442 else
10443   ac_cpp_err=yes
10444 fi
10445 if test -z "$ac_cpp_err"; then
10446   ac_cv_header_stdc=yes
10447 else
10448   echo "$as_me: failed program was:" >&5
10449   cat conftest.$ac_ext >&5
10450   ac_cv_header_stdc=no
10451 fi
10452 rm -f conftest.err conftest.$ac_ext
10453
10454 if test $ac_cv_header_stdc = yes; then
10455   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10456   cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 #include <string.h>
10460
10461 _ACEOF
10462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10463   egrep "memchr" >/dev/null 2>&1; then
10464   :
10465 else
10466   ac_cv_header_stdc=no
10467 fi
10468 rm -f conftest*
10469
10470 fi
10471
10472 if test $ac_cv_header_stdc = yes; then
10473   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10474   cat >conftest.$ac_ext <<_ACEOF
10475 #line 10475 "configure"
10476 #include "confdefs.h"
10477 #include <stdlib.h>
10478
10479 _ACEOF
10480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10481   egrep "free" >/dev/null 2>&1; then
10482   :
10483 else
10484   ac_cv_header_stdc=no
10485 fi
10486 rm -f conftest*
10487
10488 fi
10489
10490 if test $ac_cv_header_stdc = yes; then
10491   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10492   if test "$cross_compiling" = yes; then
10493   :
10494 else
10495   cat >conftest.$ac_ext <<_ACEOF
10496 #line 10496 "configure"
10497 #include "confdefs.h"
10498 #include <ctype.h>
10499 #if ((' ' & 0x0FF) == 0x020)
10500 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10501 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10502 #else
10503 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10504                      || ('j' <= (c) && (c) <= 'r') \
10505                      || ('s' <= (c) && (c) <= 'z'))
10506 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10507 #endif
10508
10509 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10510 int
10511 main ()
10512 {
10513   int i;
10514   for (i = 0; i < 256; i++)
10515     if (XOR (islower (i), ISLOWER (i))
10516         || toupper (i) != TOUPPER (i))
10517       $ac_main_return(2);
10518   $ac_main_return (0);
10519 }
10520 _ACEOF
10521 rm -f conftest$ac_exeext
10522 if { (eval echo "$as_me:10522: \"$ac_link\"") >&5
10523   (eval $ac_link) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10527   { (eval echo "$as_me:10527: \"$ac_try\"") >&5
10528   (eval $ac_try) 2>&5
10529   ac_status=$?
10530   echo "$as_me:10530: \$? = $ac_status" >&5
10531   (exit $ac_status); }; }; then
10532   :
10533 else
10534   echo "$as_me: program exited with status $ac_status" >&5
10535 echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 ac_cv_header_stdc=no
10538 fi
10539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10540 fi
10541 fi
10542 fi
10543 echo "$as_me:10543: result: $ac_cv_header_stdc" >&5
10544 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10545 if test $ac_cv_header_stdc = yes; then
10546
10547 cat >>confdefs.h <<\EOF
10548 #define STDC_HEADERS 1
10549 EOF
10550
10551 fi
10552
10553 ac_header_dirent=no
10554 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10555   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10556 echo "$as_me:10556: checking for $ac_hdr that defines DIR" >&5
10557 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10559   echo $ECHO_N "(cached) $ECHO_C" >&6
10560 else
10561   cat >conftest.$ac_ext <<_ACEOF
10562 #line 10562 "configure"
10563 #include "confdefs.h"
10564 #include <sys/types.h>
10565 #include <$ac_hdr>
10566
10567 int
10568 main ()
10569 {
10570 if ((DIR *) 0)
10571 return 0;
10572   ;
10573   return 0;
10574 }
10575 _ACEOF
10576 rm -f conftest.$ac_objext
10577 if { (eval echo "$as_me:10577: \"$ac_compile\"") >&5
10578   (eval $ac_compile) 2>&5
10579   ac_status=$?
10580   echo "$as_me:10580: \$? = $ac_status" >&5
10581   (exit $ac_status); } &&
10582          { ac_try='test -s conftest.$ac_objext'
10583   { (eval echo "$as_me:10583: \"$ac_try\"") >&5
10584   (eval $ac_try) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); }; }; then
10588   eval "$as_ac_Header=yes"
10589 else
10590   echo "$as_me: failed program was:" >&5
10591 cat conftest.$ac_ext >&5
10592 eval "$as_ac_Header=no"
10593 fi
10594 rm -f conftest.$ac_objext conftest.$ac_ext
10595 fi
10596 echo "$as_me:10596: result: `eval echo '${'$as_ac_Header'}'`" >&5
10597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10598 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10599   cat >>confdefs.h <<EOF
10600 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10601 EOF
10602
10603 ac_header_dirent=$ac_hdr; break
10604 fi
10605
10606 done
10607 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10608 if test $ac_header_dirent = dirent.h; then
10609   echo "$as_me:10609: checking for opendir in -ldir" >&5
10610 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10611 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10612   echo $ECHO_N "(cached) $ECHO_C" >&6
10613 else
10614   ac_check_lib_save_LIBS=$LIBS
10615 LIBS="-ldir  $LIBS"
10616 cat >conftest.$ac_ext <<_ACEOF
10617 #line 10617 "configure"
10618 #include "confdefs.h"
10619
10620 /* Override any gcc2 internal prototype to avoid an error.  */
10621 #ifdef __cplusplus
10622 extern "C"
10623 #endif
10624 /* We use char because int might match the return type of a gcc2
10625    builtin and then its argument prototype would still apply.  */
10626 char opendir ();
10627 int
10628 main ()
10629 {
10630 opendir ();
10631   ;
10632   return 0;
10633 }
10634 _ACEOF
10635 rm -f conftest.$ac_objext conftest$ac_exeext
10636 if { (eval echo "$as_me:10636: \"$ac_link\"") >&5
10637   (eval $ac_link) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit $ac_status); } &&
10641          { ac_try='test -s conftest$ac_exeext'
10642   { (eval echo "$as_me:10642: \"$ac_try\"") >&5
10643   (eval $ac_try) 2>&5
10644   ac_status=$?
10645   echo "$as_me:10645: \$? = $ac_status" >&5
10646   (exit $ac_status); }; }; then
10647   ac_cv_lib_dir_opendir=yes
10648 else
10649   echo "$as_me: failed program was:" >&5
10650 cat conftest.$ac_ext >&5
10651 ac_cv_lib_dir_opendir=no
10652 fi
10653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10654 LIBS=$ac_check_lib_save_LIBS
10655 fi
10656 echo "$as_me:10656: result: $ac_cv_lib_dir_opendir" >&5
10657 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10658 if test $ac_cv_lib_dir_opendir = yes; then
10659   LIBS="$LIBS -ldir"
10660 fi
10661
10662 else
10663   echo "$as_me:10663: checking for opendir in -lx" >&5
10664 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10665 if test "${ac_cv_lib_x_opendir+set}" = set; then
10666   echo $ECHO_N "(cached) $ECHO_C" >&6
10667 else
10668   ac_check_lib_save_LIBS=$LIBS
10669 LIBS="-lx  $LIBS"
10670 cat >conftest.$ac_ext <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10673
10674 /* Override any gcc2 internal prototype to avoid an error.  */
10675 #ifdef __cplusplus
10676 extern "C"
10677 #endif
10678 /* We use char because int might match the return type of a gcc2
10679    builtin and then its argument prototype would still apply.  */
10680 char opendir ();
10681 int
10682 main ()
10683 {
10684 opendir ();
10685   ;
10686   return 0;
10687 }
10688 _ACEOF
10689 rm -f conftest.$ac_objext conftest$ac_exeext
10690 if { (eval echo "$as_me:10690: \"$ac_link\"") >&5
10691   (eval $ac_link) 2>&5
10692   ac_status=$?
10693   echo "$as_me:10693: \$? = $ac_status" >&5
10694   (exit $ac_status); } &&
10695          { ac_try='test -s conftest$ac_exeext'
10696   { (eval echo "$as_me:10696: \"$ac_try\"") >&5
10697   (eval $ac_try) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); }; }; then
10701   ac_cv_lib_x_opendir=yes
10702 else
10703   echo "$as_me: failed program was:" >&5
10704 cat conftest.$ac_ext >&5
10705 ac_cv_lib_x_opendir=no
10706 fi
10707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10708 LIBS=$ac_check_lib_save_LIBS
10709 fi
10710 echo "$as_me:10710: result: $ac_cv_lib_x_opendir" >&5
10711 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10712 if test $ac_cv_lib_x_opendir = yes; then
10713   LIBS="$LIBS -lx"
10714 fi
10715
10716 fi
10717
10718 echo "$as_me:10718: checking whether time.h and sys/time.h may both be included" >&5
10719 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10720 if test "${ac_cv_header_time+set}" = set; then
10721   echo $ECHO_N "(cached) $ECHO_C" >&6
10722 else
10723   cat >conftest.$ac_ext <<_ACEOF
10724 #line 10724 "configure"
10725 #include "confdefs.h"
10726 #include <sys/types.h>
10727 #include <sys/time.h>
10728 #include <time.h>
10729
10730 int
10731 main ()
10732 {
10733 if ((struct tm *) 0)
10734 return 0;
10735   ;
10736   return 0;
10737 }
10738 _ACEOF
10739 rm -f conftest.$ac_objext
10740 if { (eval echo "$as_me:10740: \"$ac_compile\"") >&5
10741   (eval $ac_compile) 2>&5
10742   ac_status=$?
10743   echo "$as_me:10743: \$? = $ac_status" >&5
10744   (exit $ac_status); } &&
10745          { ac_try='test -s conftest.$ac_objext'
10746   { (eval echo "$as_me:10746: \"$ac_try\"") >&5
10747   (eval $ac_try) 2>&5
10748   ac_status=$?
10749   echo "$as_me:10749: \$? = $ac_status" >&5
10750   (exit $ac_status); }; }; then
10751   ac_cv_header_time=yes
10752 else
10753   echo "$as_me: failed program was:" >&5
10754 cat conftest.$ac_ext >&5
10755 ac_cv_header_time=no
10756 fi
10757 rm -f conftest.$ac_objext conftest.$ac_ext
10758 fi
10759 echo "$as_me:10759: result: $ac_cv_header_time" >&5
10760 echo "${ECHO_T}$ac_cv_header_time" >&6
10761 if test $ac_cv_header_time = yes; then
10762
10763 cat >>confdefs.h <<\EOF
10764 #define TIME_WITH_SYS_TIME 1
10765 EOF
10766
10767 fi
10768
10769 echo "$as_me:10769: checking for regular-expression headers" >&5
10770 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10771 if test "${cf_cv_regex+set}" = set; then
10772   echo $ECHO_N "(cached) $ECHO_C" >&6
10773 else
10774
10775 cat >conftest.$ac_ext <<_ACEOF
10776 #line 10776 "configure"
10777 #include "confdefs.h"
10778 #include <sys/types.h>
10779 #include <regex.h>
10780 int
10781 main ()
10782 {
10783
10784         regex_t *p;
10785         int x = regcomp(p, "", 0);
10786         int y = regexec(p, "", 0, 0, 0);
10787         regfree(p);
10788
10789   ;
10790   return 0;
10791 }
10792 _ACEOF
10793 rm -f conftest.$ac_objext conftest$ac_exeext
10794 if { (eval echo "$as_me:10794: \"$ac_link\"") >&5
10795   (eval $ac_link) 2>&5
10796   ac_status=$?
10797   echo "$as_me:10797: \$? = $ac_status" >&5
10798   (exit $ac_status); } &&
10799          { ac_try='test -s conftest$ac_exeext'
10800   { (eval echo "$as_me:10800: \"$ac_try\"") >&5
10801   (eval $ac_try) 2>&5
10802   ac_status=$?
10803   echo "$as_me:10803: \$? = $ac_status" >&5
10804   (exit $ac_status); }; }; then
10805   cf_cv_regex="regex.h"
10806 else
10807   echo "$as_me: failed program was:" >&5
10808 cat conftest.$ac_ext >&5
10809
10810         cat >conftest.$ac_ext <<_ACEOF
10811 #line 10811 "configure"
10812 #include "confdefs.h"
10813 #include <regexp.h>
10814 int
10815 main ()
10816 {
10817
10818                 char *p = compile("", "", "", 0);
10819                 int x = step("", "");
10820
10821   ;
10822   return 0;
10823 }
10824 _ACEOF
10825 rm -f conftest.$ac_objext conftest$ac_exeext
10826 if { (eval echo "$as_me:10826: \"$ac_link\"") >&5
10827   (eval $ac_link) 2>&5
10828   ac_status=$?
10829   echo "$as_me:10829: \$? = $ac_status" >&5
10830   (exit $ac_status); } &&
10831          { ac_try='test -s conftest$ac_exeext'
10832   { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:10835: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   cf_cv_regex="regexp.h"
10838 else
10839   echo "$as_me: failed program was:" >&5
10840 cat conftest.$ac_ext >&5
10841
10842                 cf_save_LIBS="$LIBS"
10843                 LIBS="-lgen $LIBS"
10844                 cat >conftest.$ac_ext <<_ACEOF
10845 #line 10845 "configure"
10846 #include "confdefs.h"
10847 #include <regexpr.h>
10848 int
10849 main ()
10850 {
10851
10852                         char *p = compile("", "", "");
10853                         int x = step("", "");
10854
10855   ;
10856   return 0;
10857 }
10858 _ACEOF
10859 rm -f conftest.$ac_objext conftest$ac_exeext
10860 if { (eval echo "$as_me:10860: \"$ac_link\"") >&5
10861   (eval $ac_link) 2>&5
10862   ac_status=$?
10863   echo "$as_me:10863: \$? = $ac_status" >&5
10864   (exit $ac_status); } &&
10865          { ac_try='test -s conftest$ac_exeext'
10866   { (eval echo "$as_me:10866: \"$ac_try\"") >&5
10867   (eval $ac_try) 2>&5
10868   ac_status=$?
10869   echo "$as_me:10869: \$? = $ac_status" >&5
10870   (exit $ac_status); }; }; then
10871   cf_cv_regex="regexpr.h"
10872 else
10873   echo "$as_me: failed program was:" >&5
10874 cat conftest.$ac_ext >&5
10875 LIBS="$cf_save_LIBS"
10876 fi
10877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10878 fi
10879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10880 fi
10881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10882
10883 fi
10884
10885 echo "$as_me:10885: result: $cf_cv_regex" >&5
10886 echo "${ECHO_T}$cf_cv_regex" >&6
10887 case $cf_cv_regex in
10888         regex.h)   cat >>confdefs.h <<\EOF
10889 #define HAVE_REGEX_H_FUNCS 1
10890 EOF
10891  ;;
10892         regexp.h)  cat >>confdefs.h <<\EOF
10893 #define HAVE_REGEXP_H_FUNCS 1
10894 EOF
10895  ;;
10896         regexpr.h) cat >>confdefs.h <<\EOF
10897 #define HAVE_REGEXPR_H_FUNCS 1
10898 EOF
10899  ;;
10900 esac
10901
10902 for ac_header in \
10903 fcntl.h \
10904 getopt.h \
10905 limits.h \
10906 locale.h \
10907 poll.h \
10908 sys/bsdtypes.h \
10909 sys/ioctl.h \
10910 sys/param.h \
10911 sys/poll.h \
10912 sys/select.h \
10913 sys/time.h \
10914 sys/times.h \
10915 ttyent.h \
10916 unistd.h \
10917 wctype.h \
10918
10919 do
10920 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10921 echo "$as_me:10921: checking for $ac_header" >&5
10922 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10923 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10924   echo $ECHO_N "(cached) $ECHO_C" >&6
10925 else
10926   cat >conftest.$ac_ext <<_ACEOF
10927 #line 10927 "configure"
10928 #include "confdefs.h"
10929 #include <$ac_header>
10930 _ACEOF
10931 if { (eval echo "$as_me:10931: \"$ac_cpp conftest.$ac_ext\"") >&5
10932   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10933   ac_status=$?
10934   egrep -v '^ *\+' conftest.er1 >conftest.err
10935   rm -f conftest.er1
10936   cat conftest.err >&5
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); } >/dev/null; then
10939   if test -s conftest.err; then
10940     ac_cpp_err=$ac_c_preproc_warn_flag
10941   else
10942     ac_cpp_err=
10943   fi
10944 else
10945   ac_cpp_err=yes
10946 fi
10947 if test -z "$ac_cpp_err"; then
10948   eval "$as_ac_Header=yes"
10949 else
10950   echo "$as_me: failed program was:" >&5
10951   cat conftest.$ac_ext >&5
10952   eval "$as_ac_Header=no"
10953 fi
10954 rm -f conftest.err conftest.$ac_ext
10955 fi
10956 echo "$as_me:10956: result: `eval echo '${'$as_ac_Header'}'`" >&5
10957 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10958 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10959   cat >>confdefs.h <<EOF
10960 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10961 EOF
10962
10963 fi
10964 done
10965
10966 # check for ISC (this may also define _POSIX_SOURCE)
10967 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10968 if test "$ISC" = yes ; then
10969
10970 echo "$as_me:10970: checking for main in -lcposix" >&5
10971 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10972 if test "${ac_cv_lib_cposix_main+set}" = set; then
10973   echo $ECHO_N "(cached) $ECHO_C" >&6
10974 else
10975   ac_check_lib_save_LIBS=$LIBS
10976 LIBS="-lcposix  $LIBS"
10977 cat >conftest.$ac_ext <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10980
10981 int
10982 main ()
10983 {
10984 main ();
10985   ;
10986   return 0;
10987 }
10988 _ACEOF
10989 rm -f conftest.$ac_objext conftest$ac_exeext
10990 if { (eval echo "$as_me:10990: \"$ac_link\"") >&5
10991   (eval $ac_link) 2>&5
10992   ac_status=$?
10993   echo "$as_me:10993: \$? = $ac_status" >&5
10994   (exit $ac_status); } &&
10995          { ac_try='test -s conftest$ac_exeext'
10996   { (eval echo "$as_me:10996: \"$ac_try\"") >&5
10997   (eval $ac_try) 2>&5
10998   ac_status=$?
10999   echo "$as_me:10999: \$? = $ac_status" >&5
11000   (exit $ac_status); }; }; then
11001   ac_cv_lib_cposix_main=yes
11002 else
11003   echo "$as_me: failed program was:" >&5
11004 cat conftest.$ac_ext >&5
11005 ac_cv_lib_cposix_main=no
11006 fi
11007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11008 LIBS=$ac_check_lib_save_LIBS
11009 fi
11010 echo "$as_me:11010: result: $ac_cv_lib_cposix_main" >&5
11011 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11012 if test $ac_cv_lib_cposix_main = yes; then
11013   cat >>confdefs.h <<EOF
11014 #define HAVE_LIBCPOSIX 1
11015 EOF
11016
11017   LIBS="-lcposix $LIBS"
11018
11019 fi
11020
11021         echo "$as_me:11021: checking for bzero in -linet" >&5
11022 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11023 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11024   echo $ECHO_N "(cached) $ECHO_C" >&6
11025 else
11026   ac_check_lib_save_LIBS=$LIBS
11027 LIBS="-linet  $LIBS"
11028 cat >conftest.$ac_ext <<_ACEOF
11029 #line 11029 "configure"
11030 #include "confdefs.h"
11031
11032 /* Override any gcc2 internal prototype to avoid an error.  */
11033 #ifdef __cplusplus
11034 extern "C"
11035 #endif
11036 /* We use char because int might match the return type of a gcc2
11037    builtin and then its argument prototype would still apply.  */
11038 char bzero ();
11039 int
11040 main ()
11041 {
11042 bzero ();
11043   ;
11044   return 0;
11045 }
11046 _ACEOF
11047 rm -f conftest.$ac_objext conftest$ac_exeext
11048 if { (eval echo "$as_me:11048: \"$ac_link\"") >&5
11049   (eval $ac_link) 2>&5
11050   ac_status=$?
11051   echo "$as_me:11051: \$? = $ac_status" >&5
11052   (exit $ac_status); } &&
11053          { ac_try='test -s conftest$ac_exeext'
11054   { (eval echo "$as_me:11054: \"$ac_try\"") >&5
11055   (eval $ac_try) 2>&5
11056   ac_status=$?
11057   echo "$as_me:11057: \$? = $ac_status" >&5
11058   (exit $ac_status); }; }; then
11059   ac_cv_lib_inet_bzero=yes
11060 else
11061   echo "$as_me: failed program was:" >&5
11062 cat conftest.$ac_ext >&5
11063 ac_cv_lib_inet_bzero=no
11064 fi
11065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11066 LIBS=$ac_check_lib_save_LIBS
11067 fi
11068 echo "$as_me:11068: result: $ac_cv_lib_inet_bzero" >&5
11069 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11070 if test $ac_cv_lib_inet_bzero = yes; then
11071   LIBS="$LIBS -linet"
11072 fi
11073 fi
11074
11075 echo "$as_me:11075: checking if sys/time.h works with sys/select.h" >&5
11076 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11077 if test "${cf_cv_sys_time_select+set}" = set; then
11078   echo $ECHO_N "(cached) $ECHO_C" >&6
11079 else
11080
11081 cat >conftest.$ac_ext <<_ACEOF
11082 #line 11082 "configure"
11083 #include "confdefs.h"
11084
11085 #include <sys/types.h>
11086 #ifdef HAVE_SYS_TIME_H
11087 #include <sys/time.h>
11088 #endif
11089 #ifdef HAVE_SYS_SELECT_H
11090 #include <sys/select.h>
11091 #endif
11092
11093 int
11094 main ()
11095 {
11096
11097   ;
11098   return 0;
11099 }
11100 _ACEOF
11101 rm -f conftest.$ac_objext
11102 if { (eval echo "$as_me:11102: \"$ac_compile\"") >&5
11103   (eval $ac_compile) 2>&5
11104   ac_status=$?
11105   echo "$as_me:11105: \$? = $ac_status" >&5
11106   (exit $ac_status); } &&
11107          { ac_try='test -s conftest.$ac_objext'
11108   { (eval echo "$as_me:11108: \"$ac_try\"") >&5
11109   (eval $ac_try) 2>&5
11110   ac_status=$?
11111   echo "$as_me:11111: \$? = $ac_status" >&5
11112   (exit $ac_status); }; }; then
11113   cf_cv_sys_time_select=yes
11114 else
11115   echo "$as_me: failed program was:" >&5
11116 cat conftest.$ac_ext >&5
11117 cf_cv_sys_time_select=no
11118 fi
11119 rm -f conftest.$ac_objext conftest.$ac_ext
11120
11121 fi
11122
11123 echo "$as_me:11123: result: $cf_cv_sys_time_select" >&5
11124 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11125 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11126 #define HAVE_SYS_TIME_SELECT 1
11127 EOF
11128
11129 ###     checks for compiler characteristics
11130 ac_ext=c
11131 ac_cpp='$CPP $CPPFLAGS'
11132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11135 ac_main_return=return
11136
11137 echo "$as_me:11137: checking for $CC option to accept ANSI C" >&5
11138 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11139 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11140   echo $ECHO_N "(cached) $ECHO_C" >&6
11141 else
11142   ac_cv_prog_cc_stdc=no
11143 ac_save_CC=$CC
11144 cat >conftest.$ac_ext <<_ACEOF
11145 #line 11145 "configure"
11146 #include "confdefs.h"
11147 #include <stdarg.h>
11148 #include <stdio.h>
11149 #include <sys/types.h>
11150 #include <sys/stat.h>
11151 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11152 struct buf { int x; };
11153 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11154 static char *e (p, i)
11155      char **p;
11156      int i;
11157 {
11158   return p[i];
11159 }
11160 static char *f (char * (*g) (char **, int), char **p, ...)
11161 {
11162   char *s;
11163   va_list v;
11164   va_start (v,p);
11165   s = g (p, va_arg (v,int));
11166   va_end (v);
11167   return s;
11168 }
11169 int test (int i, double x);
11170 struct s1 {int (*f) (int a);};
11171 struct s2 {int (*f) (double a);};
11172 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11173 int argc;
11174 char **argv;
11175 int
11176 main ()
11177 {
11178 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11179   ;
11180   return 0;
11181 }
11182 _ACEOF
11183 # Don't try gcc -ansi; that turns off useful extensions and
11184 # breaks some systems' header files.
11185 # AIX                   -qlanglvl=ansi
11186 # Ultrix and OSF/1      -std1
11187 # HP-UX 10.20 and later -Ae
11188 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11189 # SVR4                  -Xc -D__EXTENSIONS__
11190 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11191 do
11192   CC="$ac_save_CC $ac_arg"
11193   rm -f conftest.$ac_objext
11194 if { (eval echo "$as_me:11194: \"$ac_compile\"") >&5
11195   (eval $ac_compile) 2>&5
11196   ac_status=$?
11197   echo "$as_me:11197: \$? = $ac_status" >&5
11198   (exit $ac_status); } &&
11199          { ac_try='test -s conftest.$ac_objext'
11200   { (eval echo "$as_me:11200: \"$ac_try\"") >&5
11201   (eval $ac_try) 2>&5
11202   ac_status=$?
11203   echo "$as_me:11203: \$? = $ac_status" >&5
11204   (exit $ac_status); }; }; then
11205   ac_cv_prog_cc_stdc=$ac_arg
11206 break
11207 else
11208   echo "$as_me: failed program was:" >&5
11209 cat conftest.$ac_ext >&5
11210 fi
11211 rm -f conftest.$ac_objext
11212 done
11213 rm -f conftest.$ac_ext conftest.$ac_objext
11214 CC=$ac_save_CC
11215
11216 fi
11217
11218 case "x$ac_cv_prog_cc_stdc" in
11219   x|xno)
11220     echo "$as_me:11220: result: none needed" >&5
11221 echo "${ECHO_T}none needed" >&6 ;;
11222   *)
11223     echo "$as_me:11223: result: $ac_cv_prog_cc_stdc" >&5
11224 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11225     CC="$CC $ac_cv_prog_cc_stdc" ;;
11226 esac
11227
11228 echo "$as_me:11228: checking for an ANSI C-conforming const" >&5
11229 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11230 if test "${ac_cv_c_const+set}" = set; then
11231   echo $ECHO_N "(cached) $ECHO_C" >&6
11232 else
11233   cat >conftest.$ac_ext <<_ACEOF
11234 #line 11234 "configure"
11235 #include "confdefs.h"
11236
11237 int
11238 main ()
11239 {
11240 /* FIXME: Include the comments suggested by Paul. */
11241 #ifndef __cplusplus
11242   /* Ultrix mips cc rejects this.  */
11243   typedef int charset[2];
11244   const charset x;
11245   /* SunOS 4.1.1 cc rejects this.  */
11246   char const *const *ccp;
11247   char **p;
11248   /* NEC SVR4.0.2 mips cc rejects this.  */
11249   struct point {int x, y;};
11250   static struct point const zero = {0,0};
11251   /* AIX XL C 1.02.0.0 rejects this.
11252      It does not let you subtract one const X* pointer from another in
11253      an arm of an if-expression whose if-part is not a constant
11254      expression */
11255   const char *g = "string";
11256   ccp = &g + (g ? g-g : 0);
11257   /* HPUX 7.0 cc rejects these. */
11258   ++ccp;
11259   p = (char**) ccp;
11260   ccp = (char const *const *) p;
11261   { /* SCO 3.2v4 cc rejects this.  */
11262     char *t;
11263     char const *s = 0 ? (char *) 0 : (char const *) 0;
11264
11265     *t++ = 0;
11266   }
11267   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11268     int x[] = {25, 17};
11269     const int *foo = &x[0];
11270     ++foo;
11271   }
11272   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11273     typedef const int *iptr;
11274     iptr p = 0;
11275     ++p;
11276   }
11277   { /* AIX XL C 1.02.0.0 rejects this saying
11278        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11279     struct s { int j; const int *ap[3]; };
11280     struct s *b; b->j = 5;
11281   }
11282   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11283     const int foo = 10;
11284   }
11285 #endif
11286
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f conftest.$ac_objext
11292 if { (eval echo "$as_me:11292: \"$ac_compile\"") >&5
11293   (eval $ac_compile) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); } &&
11297          { ac_try='test -s conftest.$ac_objext'
11298   { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299   (eval $ac_try) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit $ac_status); }; }; then
11303   ac_cv_c_const=yes
11304 else
11305   echo "$as_me: failed program was:" >&5
11306 cat conftest.$ac_ext >&5
11307 ac_cv_c_const=no
11308 fi
11309 rm -f conftest.$ac_objext conftest.$ac_ext
11310 fi
11311 echo "$as_me:11311: result: $ac_cv_c_const" >&5
11312 echo "${ECHO_T}$ac_cv_c_const" >&6
11313 if test $ac_cv_c_const = no; then
11314
11315 cat >>confdefs.h <<\EOF
11316 #define const
11317 EOF
11318
11319 fi
11320
11321 echo "$as_me:11321: checking for inline" >&5
11322 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11323 if test "${ac_cv_c_inline+set}" = set; then
11324   echo $ECHO_N "(cached) $ECHO_C" >&6
11325 else
11326   ac_cv_c_inline=no
11327 for ac_kw in inline __inline__ __inline; do
11328   cat >conftest.$ac_ext <<_ACEOF
11329 #line 11329 "configure"
11330 #include "confdefs.h"
11331 #ifndef __cplusplus
11332 static $ac_kw int static_foo () {return 0; }
11333 $ac_kw int foo () {return 0; }
11334 #endif
11335
11336 _ACEOF
11337 rm -f conftest.$ac_objext
11338 if { (eval echo "$as_me:11338: \"$ac_compile\"") >&5
11339   (eval $ac_compile) 2>&5
11340   ac_status=$?
11341   echo "$as_me:11341: \$? = $ac_status" >&5
11342   (exit $ac_status); } &&
11343          { ac_try='test -s conftest.$ac_objext'
11344   { (eval echo "$as_me:11344: \"$ac_try\"") >&5
11345   (eval $ac_try) 2>&5
11346   ac_status=$?
11347   echo "$as_me:11347: \$? = $ac_status" >&5
11348   (exit $ac_status); }; }; then
11349   ac_cv_c_inline=$ac_kw; break
11350 else
11351   echo "$as_me: failed program was:" >&5
11352 cat conftest.$ac_ext >&5
11353 fi
11354 rm -f conftest.$ac_objext conftest.$ac_ext
11355 done
11356
11357 fi
11358 echo "$as_me:11358: result: $ac_cv_c_inline" >&5
11359 echo "${ECHO_T}$ac_cv_c_inline" >&6
11360 case $ac_cv_c_inline in
11361   inline | yes) ;;
11362   no)
11363 cat >>confdefs.h <<\EOF
11364 #define inline
11365 EOF
11366  ;;
11367   *)  cat >>confdefs.h <<EOF
11368 #define inline $ac_cv_c_inline
11369 EOF
11370  ;;
11371 esac
11372
11373 NCURSES_INLINE=
11374 if test "$ac_cv_c_inline" != no ; then
11375         cat >>confdefs.h <<\EOF
11376 #define CC_HAS_INLINE_FUNCS 1
11377 EOF
11378
11379         NCURSES_INLINE=inline
11380 fi
11381
11382 if test $NCURSES_CHTYPE = auto ; then
11383
11384 echo "$as_me:11384: checking for type of chtype" >&5
11385 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11386 if test "${cf_cv_typeof_chtype+set}" = set; then
11387   echo $ECHO_N "(cached) $ECHO_C" >&6
11388 else
11389
11390                 if test "$cross_compiling" = yes; then
11391   cf_cv_typeof_chtype=long
11392 else
11393   cat >conftest.$ac_ext <<_ACEOF
11394 #line 11394 "configure"
11395 #include "confdefs.h"
11396
11397 #define WANT_BITS 31
11398 #include <stdio.h>
11399 int main()
11400 {
11401         FILE *fp = fopen("cf_test.out", "w");
11402         if (fp != 0) {
11403                 char *result = "long";
11404                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11405                         int n;
11406                         unsigned int x, y;
11407                         for (n = 0; n < WANT_BITS; n++) {
11408                                 x = (1 << n);
11409                                 y = (x >> n);
11410                                 if (y != 1 || x == 0) {
11411                                         x = 0;
11412                                         break;
11413                                 }
11414                         }
11415                         /*
11416                          * If x is nonzero, an int is big enough for the bits
11417                          * that we want.
11418                          */
11419                         result = (x != 0) ? "int" : "long";
11420                 }
11421                 fputs(result, fp);
11422                 fclose(fp);
11423         }
11424         ${cf_cv_main_return:-return}(0);
11425 }
11426
11427 _ACEOF
11428 rm -f conftest$ac_exeext
11429 if { (eval echo "$as_me:11429: \"$ac_link\"") >&5
11430   (eval $ac_link) 2>&5
11431   ac_status=$?
11432   echo "$as_me:11432: \$? = $ac_status" >&5
11433   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11434   { (eval echo "$as_me:11434: \"$ac_try\"") >&5
11435   (eval $ac_try) 2>&5
11436   ac_status=$?
11437   echo "$as_me:11437: \$? = $ac_status" >&5
11438   (exit $ac_status); }; }; then
11439   cf_cv_typeof_chtype=`cat cf_test.out`
11440 else
11441   echo "$as_me: program exited with status $ac_status" >&5
11442 echo "$as_me: failed program was:" >&5
11443 cat conftest.$ac_ext >&5
11444 cf_cv_typeof_chtype=long
11445 fi
11446 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11447 fi
11448                 rm -f cf_test.out
11449
11450 fi
11451
11452 echo "$as_me:11452: result: $cf_cv_typeof_chtype" >&5
11453 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11454
11455 cat >>confdefs.h <<EOF
11456 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11457 EOF
11458
11459 else
11460         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11461 fi
11462
11463 echo "$as_me:11463: checking if unsigned literals are legal" >&5
11464 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11465 if test "${cf_cv_unsigned_literals+set}" = set; then
11466   echo $ECHO_N "(cached) $ECHO_C" >&6
11467 else
11468
11469         cat >conftest.$ac_ext <<_ACEOF
11470 #line 11470 "configure"
11471 #include "confdefs.h"
11472
11473 int
11474 main ()
11475 {
11476 long x = 1L + 1UL + 1U + 1
11477   ;
11478   return 0;
11479 }
11480 _ACEOF
11481 rm -f conftest.$ac_objext
11482 if { (eval echo "$as_me:11482: \"$ac_compile\"") >&5
11483   (eval $ac_compile) 2>&5
11484   ac_status=$?
11485   echo "$as_me:11485: \$? = $ac_status" >&5
11486   (exit $ac_status); } &&
11487          { ac_try='test -s conftest.$ac_objext'
11488   { (eval echo "$as_me:11488: \"$ac_try\"") >&5
11489   (eval $ac_try) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit $ac_status); }; }; then
11493   cf_cv_unsigned_literals=yes
11494 else
11495   echo "$as_me: failed program was:" >&5
11496 cat conftest.$ac_ext >&5
11497 cf_cv_unsigned_literals=no
11498 fi
11499 rm -f conftest.$ac_objext conftest.$ac_ext
11500
11501 fi
11502
11503 echo "$as_me:11503: result: $cf_cv_unsigned_literals" >&5
11504 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11505
11506 cf_cv_1UL="1"
11507 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11508 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11509
11510 if test $NCURSES_MMASK_T = auto ; then
11511         cf_cv_typeof_mmask_t=long
11512 else
11513         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11514 fi
11515
11516 ###     Checks for external-data
11517
11518 echo "$as_me:11518: checking if external errno is declared" >&5
11519 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11520 if test "${cf_cv_dcl_errno+set}" = set; then
11521   echo $ECHO_N "(cached) $ECHO_C" >&6
11522 else
11523
11524     cat >conftest.$ac_ext <<_ACEOF
11525 #line 11525 "configure"
11526 #include "confdefs.h"
11527
11528 #ifdef HAVE_STDLIB_H
11529 #include <stdlib.h>
11530 #endif
11531 #include <stdio.h>
11532 #include <sys/types.h>
11533 #include <errno.h>
11534 int
11535 main ()
11536 {
11537 long x = (long) errno
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 rm -f conftest.$ac_objext
11543 if { (eval echo "$as_me:11543: \"$ac_compile\"") >&5
11544   (eval $ac_compile) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit $ac_status); } &&
11548          { ac_try='test -s conftest.$ac_objext'
11549   { (eval echo "$as_me:11549: \"$ac_try\"") >&5
11550   (eval $ac_try) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit $ac_status); }; }; then
11554   cf_cv_dcl_errno=yes
11555 else
11556   echo "$as_me: failed program was:" >&5
11557 cat conftest.$ac_ext >&5
11558 cf_cv_dcl_errno=no
11559 fi
11560 rm -f conftest.$ac_objext conftest.$ac_ext
11561
11562 fi
11563 echo "$as_me:11563: result: $cf_cv_dcl_errno" >&5
11564 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11565
11566 if test "$cf_cv_dcl_errno" = no ; then
11567
11568 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11569
11570     cat >>confdefs.h <<EOF
11571 #define $cf_result 1
11572 EOF
11573
11574 fi
11575
11576 # It's possible (for near-UNIX clones) that the data doesn't exist
11577
11578 echo "$as_me:11578: checking if external errno exists" >&5
11579 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11580 if test "${cf_cv_have_errno+set}" = set; then
11581   echo $ECHO_N "(cached) $ECHO_C" >&6
11582 else
11583
11584     cat >conftest.$ac_ext <<_ACEOF
11585 #line 11585 "configure"
11586 #include "confdefs.h"
11587
11588 #undef errno
11589 extern int errno;
11590
11591 int
11592 main ()
11593 {
11594 errno = 2
11595   ;
11596   return 0;
11597 }
11598 _ACEOF
11599 rm -f conftest.$ac_objext conftest$ac_exeext
11600 if { (eval echo "$as_me:11600: \"$ac_link\"") >&5
11601   (eval $ac_link) 2>&5
11602   ac_status=$?
11603   echo "$as_me:11603: \$? = $ac_status" >&5
11604   (exit $ac_status); } &&
11605          { ac_try='test -s conftest$ac_exeext'
11606   { (eval echo "$as_me:11606: \"$ac_try\"") >&5
11607   (eval $ac_try) 2>&5
11608   ac_status=$?
11609   echo "$as_me:11609: \$? = $ac_status" >&5
11610   (exit $ac_status); }; }; then
11611   cf_cv_have_errno=yes
11612 else
11613   echo "$as_me: failed program was:" >&5
11614 cat conftest.$ac_ext >&5
11615 cf_cv_have_errno=no
11616 fi
11617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11618
11619 fi
11620 echo "$as_me:11620: result: $cf_cv_have_errno" >&5
11621 echo "${ECHO_T}$cf_cv_have_errno" >&6
11622
11623 if test "$cf_cv_have_errno" = yes ; then
11624
11625 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11626
11627     cat >>confdefs.h <<EOF
11628 #define $cf_result 1
11629 EOF
11630
11631 fi
11632
11633 echo "$as_me:11633: checking if data-only library module links" >&5
11634 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11635 if test "${cf_cv_link_dataonly+set}" = set; then
11636   echo $ECHO_N "(cached) $ECHO_C" >&6
11637 else
11638
11639         rm -f conftest.a
11640         cat >conftest.$ac_ext <<EOF
11641 #line 11641 "configure"
11642 int     testdata[3] = { 123, 456, 789 };
11643 EOF
11644         if { (eval echo "$as_me:11644: \"$ac_compile\"") >&5
11645   (eval $ac_compile) 2>&5
11646   ac_status=$?
11647   echo "$as_me:11647: \$? = $ac_status" >&5
11648   (exit $ac_status); } ; then
11649                 mv conftest.o data.o && \
11650                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11651         fi
11652         rm -f conftest.$ac_ext data.o
11653         cat >conftest.$ac_ext <<EOF
11654 #line 11654 "configure"
11655 int     testfunc()
11656 {
11657 #if defined(NeXT)
11658         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11659 #else
11660         extern int testdata[3];
11661         return testdata[0] == 123
11662            &&  testdata[1] == 456
11663            &&  testdata[2] == 789;
11664 #endif
11665 }
11666 EOF
11667         if { (eval echo "$as_me:11667: \"$ac_compile\"") >&5
11668   (eval $ac_compile) 2>&5
11669   ac_status=$?
11670   echo "$as_me:11670: \$? = $ac_status" >&5
11671   (exit $ac_status); }; then
11672                 mv conftest.o func.o && \
11673                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11674         fi
11675         rm -f conftest.$ac_ext func.o
11676         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11677         cf_saveLIBS="$LIBS"
11678         LIBS="conftest.a $LIBS"
11679         if test "$cross_compiling" = yes; then
11680   cf_cv_link_dataonly=unknown
11681 else
11682   cat >conftest.$ac_ext <<_ACEOF
11683 #line 11683 "configure"
11684 #include "confdefs.h"
11685
11686         int main()
11687         {
11688                 extern int testfunc();
11689                 ${cf_cv_main_return:-return} (!testfunc());
11690         }
11691
11692 _ACEOF
11693 rm -f conftest$ac_exeext
11694 if { (eval echo "$as_me:11694: \"$ac_link\"") >&5
11695   (eval $ac_link) 2>&5
11696   ac_status=$?
11697   echo "$as_me:11697: \$? = $ac_status" >&5
11698   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11699   { (eval echo "$as_me:11699: \"$ac_try\"") >&5
11700   (eval $ac_try) 2>&5
11701   ac_status=$?
11702   echo "$as_me:11702: \$? = $ac_status" >&5
11703   (exit $ac_status); }; }; then
11704   cf_cv_link_dataonly=yes
11705 else
11706   echo "$as_me: program exited with status $ac_status" >&5
11707 echo "$as_me: failed program was:" >&5
11708 cat conftest.$ac_ext >&5
11709 cf_cv_link_dataonly=no
11710 fi
11711 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11712 fi
11713         LIBS="$cf_saveLIBS"
11714
11715 fi
11716
11717 echo "$as_me:11717: result: $cf_cv_link_dataonly" >&5
11718 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11719
11720 if test "$cf_cv_link_dataonly" = no ; then
11721         cat >>confdefs.h <<\EOF
11722 #define BROKEN_LINKER 1
11723 EOF
11724
11725         BROKEN_LINKER=1
11726 fi
11727
11728 ###     Checks for library functions.
11729
11730 for ac_func in \
11731 getcwd \
11732 getegid \
11733 geteuid \
11734 getttynam \
11735 issetugid \
11736 poll \
11737 remove \
11738 select \
11739 setbuf \
11740 setbuffer \
11741 setvbuf \
11742 sigaction \
11743 sigvec \
11744 strdup \
11745 strstr \
11746 tcgetpgrp \
11747 times \
11748 vsnprintf \
11749
11750 do
11751 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11752 echo "$as_me:11752: checking for $ac_func" >&5
11753 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11754 if eval "test \"\${$as_ac_var+set}\" = set"; then
11755   echo $ECHO_N "(cached) $ECHO_C" >&6
11756 else
11757   cat >conftest.$ac_ext <<_ACEOF
11758 #line 11758 "configure"
11759 #include "confdefs.h"
11760 /* System header to define __stub macros and hopefully few prototypes,
11761     which can conflict with char $ac_func (); below.  */
11762 #include <assert.h>
11763 /* Override any gcc2 internal prototype to avoid an error.  */
11764 #ifdef __cplusplus
11765 extern "C"
11766 #endif
11767 /* We use char because int might match the return type of a gcc2
11768    builtin and then its argument prototype would still apply.  */
11769 char $ac_func ();
11770 char (*f) ();
11771
11772 int
11773 main ()
11774 {
11775 /* The GNU C library defines this for functions which it implements
11776     to always fail with ENOSYS.  Some functions are actually named
11777     something starting with __ and the normal name is an alias.  */
11778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11779 choke me
11780 #else
11781 f = $ac_func;
11782 #endif
11783
11784   ;
11785   return 0;
11786 }
11787 _ACEOF
11788 rm -f conftest.$ac_objext conftest$ac_exeext
11789 if { (eval echo "$as_me:11789: \"$ac_link\"") >&5
11790   (eval $ac_link) 2>&5
11791   ac_status=$?
11792   echo "$as_me:11792: \$? = $ac_status" >&5
11793   (exit $ac_status); } &&
11794          { ac_try='test -s conftest$ac_exeext'
11795   { (eval echo "$as_me:11795: \"$ac_try\"") >&5
11796   (eval $ac_try) 2>&5
11797   ac_status=$?
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit $ac_status); }; }; then
11800   eval "$as_ac_var=yes"
11801 else
11802   echo "$as_me: failed program was:" >&5
11803 cat conftest.$ac_ext >&5
11804 eval "$as_ac_var=no"
11805 fi
11806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11807 fi
11808 echo "$as_me:11808: result: `eval echo '${'$as_ac_var'}'`" >&5
11809 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11810 if test `eval echo '${'$as_ac_var'}'` = yes; then
11811   cat >>confdefs.h <<EOF
11812 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11813 EOF
11814
11815 fi
11816 done
11817
11818 if test "$with_getcap" = "yes" ; then
11819
11820 echo "$as_me:11820: checking for terminal-capability database functions" >&5
11821 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11822 if test "${cf_cv_cgetent+set}" = set; then
11823   echo $ECHO_N "(cached) $ECHO_C" >&6
11824 else
11825
11826 cat >conftest.$ac_ext <<_ACEOF
11827 #line 11827 "configure"
11828 #include "confdefs.h"
11829
11830 #include <stdlib.h>
11831 int
11832 main ()
11833 {
11834
11835         char temp[128];
11836         char *buf = temp;
11837         char *db_array = temp;
11838         cgetent(&buf, /* int *, */ &db_array, "vt100");
11839         cgetcap(buf, "tc", '=');
11840         cgetmatch(buf, "tc");
11841
11842   ;
11843   return 0;
11844 }
11845 _ACEOF
11846 rm -f conftest.$ac_objext conftest$ac_exeext
11847 if { (eval echo "$as_me:11847: \"$ac_link\"") >&5
11848   (eval $ac_link) 2>&5
11849   ac_status=$?
11850   echo "$as_me:11850: \$? = $ac_status" >&5
11851   (exit $ac_status); } &&
11852          { ac_try='test -s conftest$ac_exeext'
11853   { (eval echo "$as_me:11853: \"$ac_try\"") >&5
11854   (eval $ac_try) 2>&5
11855   ac_status=$?
11856   echo "$as_me:11856: \$? = $ac_status" >&5
11857   (exit $ac_status); }; }; then
11858   cf_cv_cgetent=yes
11859 else
11860   echo "$as_me: failed program was:" >&5
11861 cat conftest.$ac_ext >&5
11862 cf_cv_cgetent=no
11863 fi
11864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11865
11866 fi
11867
11868 echo "$as_me:11868: result: $cf_cv_cgetent" >&5
11869 echo "${ECHO_T}$cf_cv_cgetent" >&6
11870 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11871 #define HAVE_BSD_CGETENT 1
11872 EOF
11873
11874 fi
11875
11876 echo "$as_me:11876: checking for isascii" >&5
11877 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11878 if test "${cf_cv_have_isascii+set}" = set; then
11879   echo $ECHO_N "(cached) $ECHO_C" >&6
11880 else
11881
11882         cat >conftest.$ac_ext <<_ACEOF
11883 #line 11883 "configure"
11884 #include "confdefs.h"
11885 #include <ctype.h>
11886 int
11887 main ()
11888 {
11889 int x = isascii(' ')
11890   ;
11891   return 0;
11892 }
11893 _ACEOF
11894 rm -f conftest.$ac_objext conftest$ac_exeext
11895 if { (eval echo "$as_me:11895: \"$ac_link\"") >&5
11896   (eval $ac_link) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit $ac_status); } &&
11900          { ac_try='test -s conftest$ac_exeext'
11901   { (eval echo "$as_me:11901: \"$ac_try\"") >&5
11902   (eval $ac_try) 2>&5
11903   ac_status=$?
11904   echo "$as_me:11904: \$? = $ac_status" >&5
11905   (exit $ac_status); }; }; then
11906   cf_cv_have_isascii=yes
11907 else
11908   echo "$as_me: failed program was:" >&5
11909 cat conftest.$ac_ext >&5
11910 cf_cv_have_isascii=no
11911 fi
11912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11913
11914 fi
11915 echo "$as_me:11915: result: $cf_cv_have_isascii" >&5
11916 echo "${ECHO_T}$cf_cv_have_isascii" >&6
11917 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11918 #define HAVE_ISASCII 1
11919 EOF
11920
11921 if test "$ac_cv_func_sigaction" = yes; then
11922 echo "$as_me:11922: checking whether sigaction needs _POSIX_SOURCE" >&5
11923 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11924 cat >conftest.$ac_ext <<_ACEOF
11925 #line 11925 "configure"
11926 #include "confdefs.h"
11927
11928 #include <sys/types.h>
11929 #include <signal.h>
11930 int
11931 main ()
11932 {
11933 struct sigaction act
11934   ;
11935   return 0;
11936 }
11937 _ACEOF
11938 rm -f conftest.$ac_objext
11939 if { (eval echo "$as_me:11939: \"$ac_compile\"") >&5
11940   (eval $ac_compile) 2>&5
11941   ac_status=$?
11942   echo "$as_me:11942: \$? = $ac_status" >&5
11943   (exit $ac_status); } &&
11944          { ac_try='test -s conftest.$ac_objext'
11945   { (eval echo "$as_me:11945: \"$ac_try\"") >&5
11946   (eval $ac_try) 2>&5
11947   ac_status=$?
11948   echo "$as_me:11948: \$? = $ac_status" >&5
11949   (exit $ac_status); }; }; then
11950   sigact_bad=no
11951 else
11952   echo "$as_me: failed program was:" >&5
11953 cat conftest.$ac_ext >&5
11954
11955 cat >conftest.$ac_ext <<_ACEOF
11956 #line 11956 "configure"
11957 #include "confdefs.h"
11958
11959 #define _POSIX_SOURCE
11960 #include <sys/types.h>
11961 #include <signal.h>
11962 int
11963 main ()
11964 {
11965 struct sigaction act
11966   ;
11967   return 0;
11968 }
11969 _ACEOF
11970 rm -f conftest.$ac_objext
11971 if { (eval echo "$as_me:11971: \"$ac_compile\"") >&5
11972   (eval $ac_compile) 2>&5
11973   ac_status=$?
11974   echo "$as_me:11974: \$? = $ac_status" >&5
11975   (exit $ac_status); } &&
11976          { ac_try='test -s conftest.$ac_objext'
11977   { (eval echo "$as_me:11977: \"$ac_try\"") >&5
11978   (eval $ac_try) 2>&5
11979   ac_status=$?
11980   echo "$as_me:11980: \$? = $ac_status" >&5
11981   (exit $ac_status); }; }; then
11982   sigact_bad=yes
11983          cat >>confdefs.h <<\EOF
11984 #define SVR4_ACTION 1
11985 EOF
11986
11987 else
11988   echo "$as_me: failed program was:" >&5
11989 cat conftest.$ac_ext >&5
11990 sigact_bad=unknown
11991 fi
11992 rm -f conftest.$ac_objext conftest.$ac_ext
11993 fi
11994 rm -f conftest.$ac_objext conftest.$ac_ext
11995 echo "$as_me:11995: result: $sigact_bad" >&5
11996 echo "${ECHO_T}$sigact_bad" >&6
11997 fi
11998
11999 echo "$as_me:11999: checking if nanosleep really works" >&5
12000 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12001 if test "${cf_cv_func_nanosleep+set}" = set; then
12002   echo $ECHO_N "(cached) $ECHO_C" >&6
12003 else
12004
12005 if test "$cross_compiling" = yes; then
12006   cf_cv_func_nanosleep=unknown
12007 else
12008   cat >conftest.$ac_ext <<_ACEOF
12009 #line 12009 "configure"
12010 #include "confdefs.h"
12011
12012 #include <stdio.h>
12013 #include <errno.h>
12014 #include <time.h>
12015
12016 #ifdef HAVE_SYS_TIME_H
12017 #include <sys/time.h>
12018 #endif
12019
12020 int main() {
12021         struct timespec ts1, ts2;
12022         int code;
12023         ts1.tv_sec  = 0;
12024         ts1.tv_nsec = 750000000;
12025         ts2.tv_sec  = 0;
12026         ts2.tv_nsec = 0;
12027         errno = 0;
12028         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12029         ${cf_cv_main_return:-return}(code != 0);
12030 }
12031
12032 _ACEOF
12033 rm -f conftest$ac_exeext
12034 if { (eval echo "$as_me:12034: \"$ac_link\"") >&5
12035   (eval $ac_link) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12039   { (eval echo "$as_me:12039: \"$ac_try\"") >&5
12040   (eval $ac_try) 2>&5
12041   ac_status=$?
12042   echo "$as_me:12042: \$? = $ac_status" >&5
12043   (exit $ac_status); }; }; then
12044   cf_cv_func_nanosleep=yes
12045 else
12046   echo "$as_me: program exited with status $ac_status" >&5
12047 echo "$as_me: failed program was:" >&5
12048 cat conftest.$ac_ext >&5
12049 cf_cv_func_nanosleep=no
12050 fi
12051 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12052 fi
12053 fi
12054 echo "$as_me:12054: result: $cf_cv_func_nanosleep" >&5
12055 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12056
12057 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12058 #define HAVE_NANOSLEEP 1
12059 EOF
12060
12061 for ac_header in \
12062 termio.h \
12063 termios.h \
12064 unistd.h \
12065
12066 do
12067 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12068 echo "$as_me:12068: checking for $ac_header" >&5
12069 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12070 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12071   echo $ECHO_N "(cached) $ECHO_C" >&6
12072 else
12073   cat >conftest.$ac_ext <<_ACEOF
12074 #line 12074 "configure"
12075 #include "confdefs.h"
12076 #include <$ac_header>
12077 _ACEOF
12078 if { (eval echo "$as_me:12078: \"$ac_cpp conftest.$ac_ext\"") >&5
12079   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12080   ac_status=$?
12081   egrep -v '^ *\+' conftest.er1 >conftest.err
12082   rm -f conftest.er1
12083   cat conftest.err >&5
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit $ac_status); } >/dev/null; then
12086   if test -s conftest.err; then
12087     ac_cpp_err=$ac_c_preproc_warn_flag
12088   else
12089     ac_cpp_err=
12090   fi
12091 else
12092   ac_cpp_err=yes
12093 fi
12094 if test -z "$ac_cpp_err"; then
12095   eval "$as_ac_Header=yes"
12096 else
12097   echo "$as_me: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   eval "$as_ac_Header=no"
12100 fi
12101 rm -f conftest.err conftest.$ac_ext
12102 fi
12103 echo "$as_me:12103: result: `eval echo '${'$as_ac_Header'}'`" >&5
12104 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12105 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12106   cat >>confdefs.h <<EOF
12107 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12108 EOF
12109
12110 fi
12111 done
12112
12113 if test "$ISC" = yes ; then
12114
12115 for ac_header in sys/termio.h
12116 do
12117 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12118 echo "$as_me:12118: checking for $ac_header" >&5
12119 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12120 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12121   echo $ECHO_N "(cached) $ECHO_C" >&6
12122 else
12123   cat >conftest.$ac_ext <<_ACEOF
12124 #line 12124 "configure"
12125 #include "confdefs.h"
12126 #include <$ac_header>
12127 _ACEOF
12128 if { (eval echo "$as_me:12128: \"$ac_cpp conftest.$ac_ext\"") >&5
12129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12130   ac_status=$?
12131   egrep -v '^ *\+' conftest.er1 >conftest.err
12132   rm -f conftest.er1
12133   cat conftest.err >&5
12134   echo "$as_me:12134: \$? = $ac_status" >&5
12135   (exit $ac_status); } >/dev/null; then
12136   if test -s conftest.err; then
12137     ac_cpp_err=$ac_c_preproc_warn_flag
12138   else
12139     ac_cpp_err=
12140   fi
12141 else
12142   ac_cpp_err=yes
12143 fi
12144 if test -z "$ac_cpp_err"; then
12145   eval "$as_ac_Header=yes"
12146 else
12147   echo "$as_me: failed program was:" >&5
12148   cat conftest.$ac_ext >&5
12149   eval "$as_ac_Header=no"
12150 fi
12151 rm -f conftest.err conftest.$ac_ext
12152 fi
12153 echo "$as_me:12153: result: `eval echo '${'$as_ac_Header'}'`" >&5
12154 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12155 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12156   cat >>confdefs.h <<EOF
12157 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12158 EOF
12159
12160 fi
12161 done
12162
12163 fi
12164 if test "$ac_cv_header_termios_h" = yes ; then
12165         case "$CFLAGS $CPPFLAGS" in
12166         *-D_POSIX_SOURCE*)
12167                 termios_bad=dunno ;;
12168         *)      termios_bad=maybe ;;
12169         esac
12170         if test "$termios_bad" = maybe ; then
12171         echo "$as_me:12171: checking whether termios.h needs _POSIX_SOURCE" >&5
12172 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12173         cat >conftest.$ac_ext <<_ACEOF
12174 #line 12174 "configure"
12175 #include "confdefs.h"
12176 #include <termios.h>
12177 int
12178 main ()
12179 {
12180 struct termios foo; int x = foo.c_iflag
12181   ;
12182   return 0;
12183 }
12184 _ACEOF
12185 rm -f conftest.$ac_objext
12186 if { (eval echo "$as_me:12186: \"$ac_compile\"") >&5
12187   (eval $ac_compile) 2>&5
12188   ac_status=$?
12189   echo "$as_me:12189: \$? = $ac_status" >&5
12190   (exit $ac_status); } &&
12191          { ac_try='test -s conftest.$ac_objext'
12192   { (eval echo "$as_me:12192: \"$ac_try\"") >&5
12193   (eval $ac_try) 2>&5
12194   ac_status=$?
12195   echo "$as_me:12195: \$? = $ac_status" >&5
12196   (exit $ac_status); }; }; then
12197   termios_bad=no
12198 else
12199   echo "$as_me: failed program was:" >&5
12200 cat conftest.$ac_ext >&5
12201
12202                 cat >conftest.$ac_ext <<_ACEOF
12203 #line 12203 "configure"
12204 #include "confdefs.h"
12205
12206 #define _POSIX_SOURCE
12207 #include <termios.h>
12208 int
12209 main ()
12210 {
12211 struct termios foo; int x = foo.c_iflag
12212   ;
12213   return 0;
12214 }
12215 _ACEOF
12216 rm -f conftest.$ac_objext
12217 if { (eval echo "$as_me:12217: \"$ac_compile\"") >&5
12218   (eval $ac_compile) 2>&5
12219   ac_status=$?
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit $ac_status); } &&
12222          { ac_try='test -s conftest.$ac_objext'
12223   { (eval echo "$as_me:12223: \"$ac_try\"") >&5
12224   (eval $ac_try) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit $ac_status); }; }; then
12228   termios_bad=unknown
12229 else
12230   echo "$as_me: failed program was:" >&5
12231 cat conftest.$ac_ext >&5
12232 termios_bad=yes cat >>confdefs.h <<\EOF
12233 #define SVR4_TERMIO 1
12234 EOF
12235
12236 fi
12237 rm -f conftest.$ac_objext conftest.$ac_ext
12238
12239 fi
12240 rm -f conftest.$ac_objext conftest.$ac_ext
12241         echo "$as_me:12241: result: $termios_bad" >&5
12242 echo "${ECHO_T}$termios_bad" >&6
12243         fi
12244 fi
12245
12246 echo "$as_me:12246: checking for tcgetattr" >&5
12247 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12248 if test "${cf_cv_have_tcgetattr+set}" = set; then
12249   echo $ECHO_N "(cached) $ECHO_C" >&6
12250 else
12251
12252 cat >conftest.$ac_ext <<_ACEOF
12253 #line 12253 "configure"
12254 #include "confdefs.h"
12255
12256 #include <sys/types.h>
12257 #ifdef HAVE_UNISTD_H
12258 #include <unistd.h>
12259 #endif
12260 #ifdef HAVE_TERMIOS_H
12261 #include <termios.h>
12262 #define TTY struct termios
12263 #else
12264 #ifdef HAVE_TERMIO_H
12265 #include <termio.h>
12266 #define TTY struct termio
12267 #endif
12268 #endif
12269
12270 int
12271 main ()
12272 {
12273
12274 TTY foo;
12275 tcgetattr(1, &foo);
12276   ;
12277   return 0;
12278 }
12279 _ACEOF
12280 rm -f conftest.$ac_objext conftest$ac_exeext
12281 if { (eval echo "$as_me:12281: \"$ac_link\"") >&5
12282   (eval $ac_link) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit $ac_status); } &&
12286          { ac_try='test -s conftest$ac_exeext'
12287   { (eval echo "$as_me:12287: \"$ac_try\"") >&5
12288   (eval $ac_try) 2>&5
12289   ac_status=$?
12290   echo "$as_me:12290: \$? = $ac_status" >&5
12291   (exit $ac_status); }; }; then
12292   cf_cv_have_tcgetattr=yes
12293 else
12294   echo "$as_me: failed program was:" >&5
12295 cat conftest.$ac_ext >&5
12296 cf_cv_have_tcgetattr=no
12297 fi
12298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12299 fi
12300 echo "$as_me:12300: result: $cf_cv_have_tcgetattr" >&5
12301 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12302 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12303 #define HAVE_TCGETATTR 1
12304 EOF
12305
12306 echo "$as_me:12306: checking for vsscanf function or workaround" >&5
12307 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12308 if test "${cf_cv_func_vsscanf+set}" = set; then
12309   echo $ECHO_N "(cached) $ECHO_C" >&6
12310 else
12311
12312 cat >conftest.$ac_ext <<_ACEOF
12313 #line 12313 "configure"
12314 #include "confdefs.h"
12315
12316 #include <stdarg.h>
12317 #include <stdio.h>
12318 int
12319 main ()
12320 {
12321
12322         va_list ap;
12323         vsscanf("from", "%d", ap)
12324   ;
12325   return 0;
12326 }
12327 _ACEOF
12328 rm -f conftest.$ac_objext conftest$ac_exeext
12329 if { (eval echo "$as_me:12329: \"$ac_link\"") >&5
12330   (eval $ac_link) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); } &&
12334          { ac_try='test -s conftest$ac_exeext'
12335   { (eval echo "$as_me:12335: \"$ac_try\"") >&5
12336   (eval $ac_try) 2>&5
12337   ac_status=$?
12338   echo "$as_me:12338: \$? = $ac_status" >&5
12339   (exit $ac_status); }; }; then
12340   cf_cv_func_vsscanf=vsscanf
12341 else
12342   echo "$as_me: failed program was:" >&5
12343 cat conftest.$ac_ext >&5
12344
12345 cat >conftest.$ac_ext <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348
12349 #include <stdarg.h>
12350 #include <stdio.h>
12351 int
12352 main ()
12353 {
12354
12355     FILE strbuf;
12356     char *str = "from";
12357
12358     strbuf._flag = _IOREAD;
12359     strbuf._ptr = strbuf._base = (unsigned char *) str;
12360     strbuf._cnt = strlen(str);
12361     strbuf._file = _NFILE;
12362     return (vfscanf(&strbuf, "%d", ap))
12363   ;
12364   return 0;
12365 }
12366 _ACEOF
12367 rm -f conftest.$ac_objext conftest$ac_exeext
12368 if { (eval echo "$as_me:12368: \"$ac_link\"") >&5
12369   (eval $ac_link) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); } &&
12373          { ac_try='test -s conftest$ac_exeext'
12374   { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375   (eval $ac_try) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit $ac_status); }; }; then
12379   cf_cv_func_vsscanf=vfscanf
12380 else
12381   echo "$as_me: failed program was:" >&5
12382 cat conftest.$ac_ext >&5
12383
12384 cat >conftest.$ac_ext <<_ACEOF
12385 #line 12385 "configure"
12386 #include "confdefs.h"
12387
12388 #include <stdarg.h>
12389 #include <stdio.h>
12390 int
12391 main ()
12392 {
12393
12394     FILE strbuf;
12395     char *str = "from";
12396
12397     strbuf._flag = _IOREAD;
12398     strbuf._ptr = strbuf._base = (unsigned char *) str;
12399     strbuf._cnt = strlen(str);
12400     strbuf._file = _NFILE;
12401     return (_doscan(&strbuf, "%d", ap))
12402   ;
12403   return 0;
12404 }
12405 _ACEOF
12406 rm -f conftest.$ac_objext conftest$ac_exeext
12407 if { (eval echo "$as_me:12407: \"$ac_link\"") >&5
12408   (eval $ac_link) 2>&5
12409   ac_status=$?
12410   echo "$as_me:12410: \$? = $ac_status" >&5
12411   (exit $ac_status); } &&
12412          { ac_try='test -s conftest$ac_exeext'
12413   { (eval echo "$as_me:12413: \"$ac_try\"") >&5
12414   (eval $ac_try) 2>&5
12415   ac_status=$?
12416   echo "$as_me:12416: \$? = $ac_status" >&5
12417   (exit $ac_status); }; }; then
12418   cf_cv_func_vsscanf=_doscan
12419 else
12420   echo "$as_me: failed program was:" >&5
12421 cat conftest.$ac_ext >&5
12422
12423 cf_cv_func_vsscanf=no
12424 fi
12425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12426 fi
12427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12428 fi
12429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12430 fi
12431 echo "$as_me:12431: result: $cf_cv_func_vsscanf" >&5
12432 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12433
12434 case $cf_cv_func_vsscanf in #(vi
12435 vsscanf) cat >>confdefs.h <<\EOF
12436 #define HAVE_VSSCANF 1
12437 EOF
12438 ;; #(vi
12439 vfscanf) cat >>confdefs.h <<\EOF
12440 #define HAVE_VFSCANF 1
12441 EOF
12442 ;; #(vi
12443 _doscan) cat >>confdefs.h <<\EOF
12444 #define HAVE__DOSCAN 1
12445 EOF
12446 ;;
12447 esac
12448
12449 echo "$as_me:12449: checking for working mkstemp" >&5
12450 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12451 if test "${cf_cv_func_mkstemp+set}" = set; then
12452   echo $ECHO_N "(cached) $ECHO_C" >&6
12453 else
12454
12455 rm -f conftest*
12456 if test "$cross_compiling" = yes; then
12457   echo "$as_me:12457: checking for mkstemp" >&5
12458 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12459 if test "${ac_cv_func_mkstemp+set}" = set; then
12460   echo $ECHO_N "(cached) $ECHO_C" >&6
12461 else
12462   cat >conftest.$ac_ext <<_ACEOF
12463 #line 12463 "configure"
12464 #include "confdefs.h"
12465 /* System header to define __stub macros and hopefully few prototypes,
12466     which can conflict with char mkstemp (); below.  */
12467 #include <assert.h>
12468 /* Override any gcc2 internal prototype to avoid an error.  */
12469 #ifdef __cplusplus
12470 extern "C"
12471 #endif
12472 /* We use char because int might match the return type of a gcc2
12473    builtin and then its argument prototype would still apply.  */
12474 char mkstemp ();
12475 char (*f) ();
12476
12477 int
12478 main ()
12479 {
12480 /* The GNU C library defines this for functions which it implements
12481     to always fail with ENOSYS.  Some functions are actually named
12482     something starting with __ and the normal name is an alias.  */
12483 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12484 choke me
12485 #else
12486 f = mkstemp;
12487 #endif
12488
12489   ;
12490   return 0;
12491 }
12492 _ACEOF
12493 rm -f conftest.$ac_objext conftest$ac_exeext
12494 if { (eval echo "$as_me:12494: \"$ac_link\"") >&5
12495   (eval $ac_link) 2>&5
12496   ac_status=$?
12497   echo "$as_me:12497: \$? = $ac_status" >&5
12498   (exit $ac_status); } &&
12499          { ac_try='test -s conftest$ac_exeext'
12500   { (eval echo "$as_me:12500: \"$ac_try\"") >&5
12501   (eval $ac_try) 2>&5
12502   ac_status=$?
12503   echo "$as_me:12503: \$? = $ac_status" >&5
12504   (exit $ac_status); }; }; then
12505   ac_cv_func_mkstemp=yes
12506 else
12507   echo "$as_me: failed program was:" >&5
12508 cat conftest.$ac_ext >&5
12509 ac_cv_func_mkstemp=no
12510 fi
12511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12512 fi
12513 echo "$as_me:12513: result: $ac_cv_func_mkstemp" >&5
12514 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12515
12516 else
12517   cat >conftest.$ac_ext <<_ACEOF
12518 #line 12518 "configure"
12519 #include "confdefs.h"
12520
12521 #include <sys/types.h>
12522 #include <stdlib.h>
12523 #include <stdio.h>
12524 #include <string.h>
12525 #include <sys/stat.h>
12526 int main()
12527 {
12528         char *tmpl = "conftestXXXXXX";
12529         char name[2][80];
12530         int n;
12531         int result = 0;
12532         int fd;
12533         struct stat sb;
12534
12535         umask(077);
12536         for (n = 0; n < 2; ++n) {
12537                 strcpy(name[n], tmpl);
12538                 if ((fd = mkstemp(name[n])) >= 0) {
12539                         if (!strcmp(name[n], tmpl)
12540                          || stat(name[n], &sb) != 0
12541                          || (sb.st_mode & S_IFMT) != S_IFREG
12542                          || (sb.st_mode & 077) != 0) {
12543                                 result = 1;
12544                         }
12545                         close(fd);
12546                 }
12547         }
12548         if (result == 0
12549          && !strcmp(name[0], name[1]))
12550                 result = 1;
12551         ${cf_cv_main_return:-return}(result);
12552 }
12553
12554 _ACEOF
12555 rm -f conftest$ac_exeext
12556 if { (eval echo "$as_me:12556: \"$ac_link\"") >&5
12557   (eval $ac_link) 2>&5
12558   ac_status=$?
12559   echo "$as_me:12559: \$? = $ac_status" >&5
12560   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12561   { (eval echo "$as_me:12561: \"$ac_try\"") >&5
12562   (eval $ac_try) 2>&5
12563   ac_status=$?
12564   echo "$as_me:12564: \$? = $ac_status" >&5
12565   (exit $ac_status); }; }; then
12566   cf_cv_func_mkstemp=yes
12567
12568 else
12569   echo "$as_me: program exited with status $ac_status" >&5
12570 echo "$as_me: failed program was:" >&5
12571 cat conftest.$ac_ext >&5
12572 cf_cv_func_mkstemp=no
12573
12574 fi
12575 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12576 fi
12577
12578 fi
12579 echo "$as_me:12579: result: $cf_cv_func_mkstemp" >&5
12580 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12581 if test "$cf_cv_func_mkstemp" = yes ; then
12582         cat >>confdefs.h <<\EOF
12583 #define HAVE_MKSTEMP 1
12584 EOF
12585
12586 fi
12587
12588 # setup for prototype of fallback for vsscanf()
12589
12590 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12591         HAVE_VSSCANF=1
12592 else
12593         HAVE_VSSCANF=0
12594 fi
12595
12596 if test "$cross_compiling" = yes ; then
12597         { echo "$as_me:12597: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12598 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12599 else
12600         echo "$as_me:12600: checking whether setvbuf arguments are reversed" >&5
12601 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12602 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12603   echo $ECHO_N "(cached) $ECHO_C" >&6
12604 else
12605   if test "$cross_compiling" = yes; then
12606   { { echo "$as_me:12606: error: cannot run test program while cross compiling" >&5
12607 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12608    { (exit 1); exit 1; }; }
12609 else
12610   cat >conftest.$ac_ext <<_ACEOF
12611 #line 12611 "configure"
12612 #include "confdefs.h"
12613 #include <stdio.h>
12614 /* If setvbuf has the reversed format, exit 0. */
12615 int
12616 main ()
12617 {
12618   /* This call has the arguments reversed.
12619      A reversed system may check and see that the address of main
12620      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12621   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12622     $ac_main_return(1);
12623   putc('\r', stdout);
12624   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12625 }
12626 _ACEOF
12627 rm -f conftest$ac_exeext
12628 if { (eval echo "$as_me:12628: \"$ac_link\"") >&5
12629   (eval $ac_link) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12633   { (eval echo "$as_me:12633: \"$ac_try\"") >&5
12634   (eval $ac_try) 2>&5
12635   ac_status=$?
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit $ac_status); }; }; then
12638   ac_cv_func_setvbuf_reversed=yes
12639 else
12640   echo "$as_me: program exited with status $ac_status" >&5
12641 echo "$as_me: failed program was:" >&5
12642 cat conftest.$ac_ext >&5
12643 ac_cv_func_setvbuf_reversed=no
12644 fi
12645 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12646 fi
12647 rm -f core core.* *.core
12648 fi
12649 echo "$as_me:12649: result: $ac_cv_func_setvbuf_reversed" >&5
12650 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12651 if test $ac_cv_func_setvbuf_reversed = yes; then
12652
12653 cat >>confdefs.h <<\EOF
12654 #define SETVBUF_REVERSED 1
12655 EOF
12656
12657 fi
12658
12659 fi
12660 echo "$as_me:12660: checking return type of signal handlers" >&5
12661 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12662 if test "${ac_cv_type_signal+set}" = set; then
12663   echo $ECHO_N "(cached) $ECHO_C" >&6
12664 else
12665   cat >conftest.$ac_ext <<_ACEOF
12666 #line 12666 "configure"
12667 #include "confdefs.h"
12668 #include <sys/types.h>
12669 #include <signal.h>
12670 #ifdef signal
12671 # undef signal
12672 #endif
12673 #ifdef __cplusplus
12674 extern "C" void (*signal (int, void (*)(int)))(int);
12675 #else
12676 void (*signal ()) ();
12677 #endif
12678
12679 int
12680 main ()
12681 {
12682 int i;
12683   ;
12684   return 0;
12685 }
12686 _ACEOF
12687 rm -f conftest.$ac_objext
12688 if { (eval echo "$as_me:12688: \"$ac_compile\"") >&5
12689   (eval $ac_compile) 2>&5
12690   ac_status=$?
12691   echo "$as_me:12691: \$? = $ac_status" >&5
12692   (exit $ac_status); } &&
12693          { ac_try='test -s conftest.$ac_objext'
12694   { (eval echo "$as_me:12694: \"$ac_try\"") >&5
12695   (eval $ac_try) 2>&5
12696   ac_status=$?
12697   echo "$as_me:12697: \$? = $ac_status" >&5
12698   (exit $ac_status); }; }; then
12699   ac_cv_type_signal=void
12700 else
12701   echo "$as_me: failed program was:" >&5
12702 cat conftest.$ac_ext >&5
12703 ac_cv_type_signal=int
12704 fi
12705 rm -f conftest.$ac_objext conftest.$ac_ext
12706 fi
12707 echo "$as_me:12707: result: $ac_cv_type_signal" >&5
12708 echo "${ECHO_T}$ac_cv_type_signal" >&6
12709
12710 cat >>confdefs.h <<EOF
12711 #define RETSIGTYPE $ac_cv_type_signal
12712 EOF
12713
12714 echo "$as_me:12714: checking for type sigaction_t" >&5
12715 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12716 if test "${cf_cv_type_sigaction+set}" = set; then
12717   echo $ECHO_N "(cached) $ECHO_C" >&6
12718 else
12719
12720         cat >conftest.$ac_ext <<_ACEOF
12721 #line 12721 "configure"
12722 #include "confdefs.h"
12723
12724 #include <signal.h>
12725 int
12726 main ()
12727 {
12728 sigaction_t x
12729   ;
12730   return 0;
12731 }
12732 _ACEOF
12733 rm -f conftest.$ac_objext
12734 if { (eval echo "$as_me:12734: \"$ac_compile\"") >&5
12735   (eval $ac_compile) 2>&5
12736   ac_status=$?
12737   echo "$as_me:12737: \$? = $ac_status" >&5
12738   (exit $ac_status); } &&
12739          { ac_try='test -s conftest.$ac_objext'
12740   { (eval echo "$as_me:12740: \"$ac_try\"") >&5
12741   (eval $ac_try) 2>&5
12742   ac_status=$?
12743   echo "$as_me:12743: \$? = $ac_status" >&5
12744   (exit $ac_status); }; }; then
12745   cf_cv_type_sigaction=yes
12746 else
12747   echo "$as_me: failed program was:" >&5
12748 cat conftest.$ac_ext >&5
12749 cf_cv_type_sigaction=no
12750 fi
12751 rm -f conftest.$ac_objext conftest.$ac_ext
12752 fi
12753
12754 echo "$as_me:12754: result: $cf_cv_type_sigaction" >&5
12755 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12756 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12757 #define HAVE_TYPE_SIGACTION 1
12758 EOF
12759
12760 echo "$as_me:12760: checking declaration of size-change" >&5
12761 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12762 if test "${cf_cv_sizechange+set}" = set; then
12763   echo $ECHO_N "(cached) $ECHO_C" >&6
12764 else
12765
12766     cf_cv_sizechange=unknown
12767     cf_save_CPPFLAGS="$CPPFLAGS"
12768
12769 for cf_opts in "" "NEED_PTEM_H"
12770 do
12771
12772     CPPFLAGS="$cf_save_CPPFLAGS"
12773     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12774     cat >conftest.$ac_ext <<_ACEOF
12775 #line 12775 "configure"
12776 #include "confdefs.h"
12777 #include <sys/types.h>
12778 #ifdef HAVE_TERMIOS_H
12779 #include <termios.h>
12780 #else
12781 #ifdef HAVE_TERMIO_H
12782 #include <termio.h>
12783 #endif
12784 #endif
12785 #ifdef NEED_PTEM_H
12786 /* This is a workaround for SCO:  they neglected to define struct winsize in
12787  * termios.h -- it's only in termio.h and ptem.h
12788  */
12789 #include        <sys/stream.h>
12790 #include        <sys/ptem.h>
12791 #endif
12792 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12793 #include <sys/ioctl.h>
12794 #endif
12795
12796 int
12797 main ()
12798 {
12799
12800 #ifdef TIOCGSIZE
12801         struct ttysize win;     /* FIXME: what system is this? */
12802         int y = win.ts_lines;
12803         int x = win.ts_cols;
12804 #else
12805 #ifdef TIOCGWINSZ
12806         struct winsize win;
12807         int y = win.ws_row;
12808         int x = win.ws_col;
12809 #else
12810         no TIOCGSIZE or TIOCGWINSZ
12811 #endif /* TIOCGWINSZ */
12812 #endif /* TIOCGSIZE */
12813
12814   ;
12815   return 0;
12816 }
12817 _ACEOF
12818 rm -f conftest.$ac_objext
12819 if { (eval echo "$as_me:12819: \"$ac_compile\"") >&5
12820   (eval $ac_compile) 2>&5
12821   ac_status=$?
12822   echo "$as_me:12822: \$? = $ac_status" >&5
12823   (exit $ac_status); } &&
12824          { ac_try='test -s conftest.$ac_objext'
12825   { (eval echo "$as_me:12825: \"$ac_try\"") >&5
12826   (eval $ac_try) 2>&5
12827   ac_status=$?
12828   echo "$as_me:12828: \$? = $ac_status" >&5
12829   (exit $ac_status); }; }; then
12830   cf_cv_sizechange=yes
12831 else
12832   echo "$as_me: failed program was:" >&5
12833 cat conftest.$ac_ext >&5
12834 cf_cv_sizechange=no
12835 fi
12836 rm -f conftest.$ac_objext conftest.$ac_ext
12837
12838         CPPFLAGS="$cf_save_CPPFLAGS"
12839         if test "$cf_cv_sizechange" = yes ; then
12840                 echo "size-change succeeded ($cf_opts)" >&5
12841                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12842                 break
12843         fi
12844 done
12845
12846 fi
12847 echo "$as_me:12847: result: $cf_cv_sizechange" >&5
12848 echo "${ECHO_T}$cf_cv_sizechange" >&6
12849 if test "$cf_cv_sizechange" != no ; then
12850         cat >>confdefs.h <<\EOF
12851 #define HAVE_SIZECHANGE 1
12852 EOF
12853
12854         case $cf_cv_sizechange in #(vi
12855         NEED*)
12856                 cat >>confdefs.h <<EOF
12857 #define $cf_cv_sizechange  1
12858 EOF
12859
12860                 ;;
12861         esac
12862 fi
12863
12864 echo "$as_me:12864: checking for memmove" >&5
12865 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12866 if test "${ac_cv_func_memmove+set}" = set; then
12867   echo $ECHO_N "(cached) $ECHO_C" >&6
12868 else
12869   cat >conftest.$ac_ext <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872 /* System header to define __stub macros and hopefully few prototypes,
12873     which can conflict with char memmove (); below.  */
12874 #include <assert.h>
12875 /* Override any gcc2 internal prototype to avoid an error.  */
12876 #ifdef __cplusplus
12877 extern "C"
12878 #endif
12879 /* We use char because int might match the return type of a gcc2
12880    builtin and then its argument prototype would still apply.  */
12881 char memmove ();
12882 char (*f) ();
12883
12884 int
12885 main ()
12886 {
12887 /* The GNU C library defines this for functions which it implements
12888     to always fail with ENOSYS.  Some functions are actually named
12889     something starting with __ and the normal name is an alias.  */
12890 #if defined (__stub_memmove) || defined (__stub___memmove)
12891 choke me
12892 #else
12893 f = memmove;
12894 #endif
12895
12896   ;
12897   return 0;
12898 }
12899 _ACEOF
12900 rm -f conftest.$ac_objext conftest$ac_exeext
12901 if { (eval echo "$as_me:12901: \"$ac_link\"") >&5
12902   (eval $ac_link) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit $ac_status); } &&
12906          { ac_try='test -s conftest$ac_exeext'
12907   { (eval echo "$as_me:12907: \"$ac_try\"") >&5
12908   (eval $ac_try) 2>&5
12909   ac_status=$?
12910   echo "$as_me:12910: \$? = $ac_status" >&5
12911   (exit $ac_status); }; }; then
12912   ac_cv_func_memmove=yes
12913 else
12914   echo "$as_me: failed program was:" >&5
12915 cat conftest.$ac_ext >&5
12916 ac_cv_func_memmove=no
12917 fi
12918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12919 fi
12920 echo "$as_me:12920: result: $ac_cv_func_memmove" >&5
12921 echo "${ECHO_T}$ac_cv_func_memmove" >&6
12922 if test $ac_cv_func_memmove = yes; then
12923   :
12924 else
12925
12926 echo "$as_me:12926: checking for bcopy" >&5
12927 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12928 if test "${ac_cv_func_bcopy+set}" = set; then
12929   echo $ECHO_N "(cached) $ECHO_C" >&6
12930 else
12931   cat >conftest.$ac_ext <<_ACEOF
12932 #line 12932 "configure"
12933 #include "confdefs.h"
12934 /* System header to define __stub macros and hopefully few prototypes,
12935     which can conflict with char bcopy (); below.  */
12936 #include <assert.h>
12937 /* Override any gcc2 internal prototype to avoid an error.  */
12938 #ifdef __cplusplus
12939 extern "C"
12940 #endif
12941 /* We use char because int might match the return type of a gcc2
12942    builtin and then its argument prototype would still apply.  */
12943 char bcopy ();
12944 char (*f) ();
12945
12946 int
12947 main ()
12948 {
12949 /* The GNU C library defines this for functions which it implements
12950     to always fail with ENOSYS.  Some functions are actually named
12951     something starting with __ and the normal name is an alias.  */
12952 #if defined (__stub_bcopy) || defined (__stub___bcopy)
12953 choke me
12954 #else
12955 f = bcopy;
12956 #endif
12957
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 rm -f conftest.$ac_objext conftest$ac_exeext
12963 if { (eval echo "$as_me:12963: \"$ac_link\"") >&5
12964   (eval $ac_link) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit $ac_status); } &&
12968          { ac_try='test -s conftest$ac_exeext'
12969   { (eval echo "$as_me:12969: \"$ac_try\"") >&5
12970   (eval $ac_try) 2>&5
12971   ac_status=$?
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit $ac_status); }; }; then
12974   ac_cv_func_bcopy=yes
12975 else
12976   echo "$as_me: failed program was:" >&5
12977 cat conftest.$ac_ext >&5
12978 ac_cv_func_bcopy=no
12979 fi
12980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12981 fi
12982 echo "$as_me:12982: result: $ac_cv_func_bcopy" >&5
12983 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
12984 if test $ac_cv_func_bcopy = yes; then
12985
12986         echo "$as_me:12986: checking if bcopy does overlapping moves" >&5
12987 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
12988 if test "${cf_cv_good_bcopy+set}" = set; then
12989   echo $ECHO_N "(cached) $ECHO_C" >&6
12990 else
12991
12992                 if test "$cross_compiling" = yes; then
12993   cf_cv_good_bcopy=unknown
12994 else
12995   cat >conftest.$ac_ext <<_ACEOF
12996 #line 12996 "configure"
12997 #include "confdefs.h"
12998
12999 int main() {
13000         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13001         char temp[40];
13002         bcopy(data, temp, sizeof(data));
13003         bcopy(temp+10, temp, 15);
13004         bcopy(temp+5, temp+15, 10);
13005         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13006 }
13007
13008 _ACEOF
13009 rm -f conftest$ac_exeext
13010 if { (eval echo "$as_me:13010: \"$ac_link\"") >&5
13011   (eval $ac_link) 2>&5
13012   ac_status=$?
13013   echo "$as_me:13013: \$? = $ac_status" >&5
13014   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13015   { (eval echo "$as_me:13015: \"$ac_try\"") >&5
13016   (eval $ac_try) 2>&5
13017   ac_status=$?
13018   echo "$as_me:13018: \$? = $ac_status" >&5
13019   (exit $ac_status); }; }; then
13020   cf_cv_good_bcopy=yes
13021 else
13022   echo "$as_me: program exited with status $ac_status" >&5
13023 echo "$as_me: failed program was:" >&5
13024 cat conftest.$ac_ext >&5
13025 cf_cv_good_bcopy=no
13026 fi
13027 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13028 fi
13029
13030 fi
13031 echo "$as_me:13031: result: $cf_cv_good_bcopy" >&5
13032 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13033
13034 else
13035   cf_cv_good_bcopy=no
13036 fi
13037
13038         if test "$cf_cv_good_bcopy" = yes ; then
13039                 cat >>confdefs.h <<\EOF
13040 #define USE_OK_BCOPY 1
13041 EOF
13042
13043         else
13044                 cat >>confdefs.h <<\EOF
13045 #define USE_MY_MEMMOVE 1
13046 EOF
13047
13048         fi
13049
13050 fi
13051
13052 echo "$as_me:13052: checking if poll really works" >&5
13053 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13054 if test "${cf_cv_working_poll+set}" = set; then
13055   echo $ECHO_N "(cached) $ECHO_C" >&6
13056 else
13057
13058 if test "$cross_compiling" = yes; then
13059   cf_cv_working_poll=unknown
13060 else
13061   cat >conftest.$ac_ext <<_ACEOF
13062 #line 13062 "configure"
13063 #include "confdefs.h"
13064
13065 #include <stdio.h>
13066 #ifdef HAVE_POLL_H
13067 #include <poll.h>
13068 #else
13069 #include <sys/poll.h>
13070 #endif
13071 int main() {
13072         struct pollfd myfds;
13073         int ret;
13074
13075         myfds.fd = 0;
13076         myfds.events = POLLIN;
13077
13078         ret = poll(&myfds, 1, 100);
13079         ${cf_cv_main_return:-return}(ret != 0);
13080 }
13081 _ACEOF
13082 rm -f conftest$ac_exeext
13083 if { (eval echo "$as_me:13083: \"$ac_link\"") >&5
13084   (eval $ac_link) 2>&5
13085   ac_status=$?
13086   echo "$as_me:13086: \$? = $ac_status" >&5
13087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13088   { (eval echo "$as_me:13088: \"$ac_try\"") >&5
13089   (eval $ac_try) 2>&5
13090   ac_status=$?
13091   echo "$as_me:13091: \$? = $ac_status" >&5
13092   (exit $ac_status); }; }; then
13093   cf_cv_working_poll=yes
13094 else
13095   echo "$as_me: program exited with status $ac_status" >&5
13096 echo "$as_me: failed program was:" >&5
13097 cat conftest.$ac_ext >&5
13098 cf_cv_working_poll=no
13099 fi
13100 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13101 fi
13102 fi
13103 echo "$as_me:13103: result: $cf_cv_working_poll" >&5
13104 echo "${ECHO_T}$cf_cv_working_poll" >&6
13105 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13106 #define HAVE_WORKING_POLL 1
13107 EOF
13108
13109 if test "$with_hashed_db" != no ; then
13110         cat >>confdefs.h <<\EOF
13111 #define USE_HASHED_DB 1
13112 EOF
13113
13114 echo "$as_me:13114: checking for db.h" >&5
13115 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13116 if test "${ac_cv_header_db_h+set}" = set; then
13117   echo $ECHO_N "(cached) $ECHO_C" >&6
13118 else
13119   cat >conftest.$ac_ext <<_ACEOF
13120 #line 13120 "configure"
13121 #include "confdefs.h"
13122 #include <db.h>
13123 _ACEOF
13124 if { (eval echo "$as_me:13124: \"$ac_cpp conftest.$ac_ext\"") >&5
13125   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13126   ac_status=$?
13127   egrep -v '^ *\+' conftest.er1 >conftest.err
13128   rm -f conftest.er1
13129   cat conftest.err >&5
13130   echo "$as_me:13130: \$? = $ac_status" >&5
13131   (exit $ac_status); } >/dev/null; then
13132   if test -s conftest.err; then
13133     ac_cpp_err=$ac_c_preproc_warn_flag
13134   else
13135     ac_cpp_err=
13136   fi
13137 else
13138   ac_cpp_err=yes
13139 fi
13140 if test -z "$ac_cpp_err"; then
13141   ac_cv_header_db_h=yes
13142 else
13143   echo "$as_me: failed program was:" >&5
13144   cat conftest.$ac_ext >&5
13145   ac_cv_header_db_h=no
13146 fi
13147 rm -f conftest.err conftest.$ac_ext
13148 fi
13149 echo "$as_me:13149: result: $ac_cv_header_db_h" >&5
13150 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13151 if test $ac_cv_header_db_h = yes; then
13152
13153 echo "$as_me:13153: checking for version of db" >&5
13154 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13155 if test "${cf_cv_hashed_db_version+set}" = set; then
13156   echo $ECHO_N "(cached) $ECHO_C" >&6
13157 else
13158
13159 cf_cv_hashed_db_version=unknown
13160
13161 for cf_db_version in 1 2 3 4
13162 do
13163
13164 echo "(line 13164) testing checking for db version $cf_db_version ..." 1>&5
13165
13166         cat >conftest.$ac_ext <<_ACEOF
13167 #line 13167 "configure"
13168 #include "confdefs.h"
13169
13170 $ac_includes_default
13171 #include <db.h>
13172
13173 #ifdef DB_VERSION_MAJOR
13174         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13175 #if $cf_db_version == DB_VERSION_MAJOR
13176         /* ok */
13177 #else
13178         make an error
13179 #endif
13180 #else
13181 #if $cf_db_version == 1
13182         /* ok: assuming this is DB 1.8.5 */
13183 #else
13184         make an error
13185 #endif
13186 #endif
13187
13188 int
13189 main ()
13190 {
13191 DBT *foo = 0
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f conftest.$ac_objext
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); } &&
13202          { ac_try='test -s conftest.$ac_objext'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit $ac_status); }; }; then
13208
13209         cf_cv_hashed_db_version=$cf_db_version
13210         break
13211
13212 else
13213   echo "$as_me: failed program was:" >&5
13214 cat conftest.$ac_ext >&5
13215 fi
13216 rm -f conftest.$ac_objext conftest.$ac_ext
13217 done
13218
13219 fi
13220 echo "$as_me:13220: result: $cf_cv_hashed_db_version" >&5
13221 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13222
13223 if test "$cf_cv_hashed_db_version" = unknown ; then
13224         { { echo "$as_me:13224: error: Cannot determine version of db" >&5
13225 echo "$as_me: error: Cannot determine version of db" >&2;}
13226    { (exit 1); exit 1; }; }
13227 else
13228
13229 echo "$as_me:13229: checking for db libraries" >&5
13230 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13231 if test "${cf_cv_hashed_db_libs+set}" = set; then
13232   echo $ECHO_N "(cached) $ECHO_C" >&6
13233 else
13234
13235 cf_cv_hashed_db_libs=unknown
13236 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13237 do
13238         cf_save_libs="$LIBS"
13239         if test -n "$cf_db_libs"; then
13240                 LIBS="-l$cf_db_libs $LIBS"
13241         fi
13242
13243 echo "(line 13243) testing checking for library "$cf_db_libs" ..." 1>&5
13244
13245         cat >conftest.$ac_ext <<_ACEOF
13246 #line 13246 "configure"
13247 #include "confdefs.h"
13248
13249 $ac_includes_default
13250 #include <db.h>
13251
13252 int
13253 main ()
13254 {
13255
13256         char *path = "/tmp/foo";
13257 #ifdef DB_VERSION_MAJOR
13258 #if DB_VERSION_MAJOR >= 4
13259         DB *result = 0;
13260         db_create(&result, NULL, 0);
13261         result->open(result,
13262                 NULL,
13263                 path,
13264                 path,
13265                 DB_HASH,
13266                 DB_CREATE,
13267                 0644);
13268 #elif DB_VERSION_MAJOR >= 3
13269         DB *result = 0;
13270         db_create(&result, NULL, 0);
13271         result->open(result,
13272                 path,
13273                 path,
13274                 DB_HASH,
13275                 DB_CREATE,
13276                 0644);
13277 #elif DB_VERSION_MAJOR >= 2
13278         DB *result = 0;
13279         db_open(path,
13280                 DB_HASH,
13281                 DB_CREATE,
13282                 0644,
13283                 (DB_ENV *) 0,
13284                 (DB_INFO *) 0,
13285                 &result);
13286 #endif /* DB_VERSION_MAJOR */
13287 #else
13288         DB *result = dbopen(path,
13289                      2,
13290                      0644,
13291                      DB_HASH,
13292                      0);
13293 #endif
13294         ${cf_cv_main_return:-return}(result != 0)
13295
13296   ;
13297   return 0;
13298 }
13299 _ACEOF
13300 rm -f conftest.$ac_objext conftest$ac_exeext
13301 if { (eval echo "$as_me:13301: \"$ac_link\"") >&5
13302   (eval $ac_link) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); } &&
13306          { ac_try='test -s conftest$ac_exeext'
13307   { (eval echo "$as_me:13307: \"$ac_try\"") >&5
13308   (eval $ac_try) 2>&5
13309   ac_status=$?
13310   echo "$as_me:13310: \$? = $ac_status" >&5
13311   (exit $ac_status); }; }; then
13312
13313         if test -n "$cf_db_libs" ; then
13314                 cf_cv_hashed_db_libs=$cf_db_libs
13315         else
13316                 cf_cv_hashed_db_libs=default
13317         fi
13318         LIBS="$cf_save_libs"
13319         break
13320
13321 else
13322   echo "$as_me: failed program was:" >&5
13323 cat conftest.$ac_ext >&5
13324 fi
13325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13326         LIBS="$cf_save_libs"
13327 done
13328
13329 fi
13330 echo "$as_me:13330: result: $cf_cv_hashed_db_libs" >&5
13331 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13332
13333         if test "$cf_cv_hashed_db_libs" = unknown ; then
13334                 { { echo "$as_me:13334: error: Cannot determine library for db" >&5
13335 echo "$as_me: error: Cannot determine library for db" >&2;}
13336    { (exit 1); exit 1; }; }
13337         elif test "$cf_cv_hashed_db_libs" != default ; then
13338                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13339         fi
13340 fi
13341
13342 else
13343
13344         { { echo "$as_me:13344: error: Cannot find db.h" >&5
13345 echo "$as_me: error: Cannot find db.h" >&2;}
13346    { (exit 1); exit 1; }; }
13347
13348 fi
13349
13350 fi
13351
13352 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13353         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13354         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13355 fi
13356
13357 # Just in case, check if the C compiler has a bool type.
13358
13359 echo "$as_me:13359: checking if we should include stdbool.h" >&5
13360 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13361
13362 if test "${cf_cv_header_stdbool_h+set}" = set; then
13363   echo $ECHO_N "(cached) $ECHO_C" >&6
13364 else
13365
13366         cat >conftest.$ac_ext <<_ACEOF
13367 #line 13367 "configure"
13368 #include "confdefs.h"
13369
13370 int
13371 main ()
13372 {
13373 bool foo = false
13374   ;
13375   return 0;
13376 }
13377 _ACEOF
13378 rm -f conftest.$ac_objext
13379 if { (eval echo "$as_me:13379: \"$ac_compile\"") >&5
13380   (eval $ac_compile) 2>&5
13381   ac_status=$?
13382   echo "$as_me:13382: \$? = $ac_status" >&5
13383   (exit $ac_status); } &&
13384          { ac_try='test -s conftest.$ac_objext'
13385   { (eval echo "$as_me:13385: \"$ac_try\"") >&5
13386   (eval $ac_try) 2>&5
13387   ac_status=$?
13388   echo "$as_me:13388: \$? = $ac_status" >&5
13389   (exit $ac_status); }; }; then
13390   cf_cv_header_stdbool_h=0
13391 else
13392   echo "$as_me: failed program was:" >&5
13393 cat conftest.$ac_ext >&5
13394 cat >conftest.$ac_ext <<_ACEOF
13395 #line 13395 "configure"
13396 #include "confdefs.h"
13397
13398 #ifndef __BEOS__
13399 #include <stdbool.h>
13400 #endif
13401
13402 int
13403 main ()
13404 {
13405 bool foo = false
13406   ;
13407   return 0;
13408 }
13409 _ACEOF
13410 rm -f conftest.$ac_objext
13411 if { (eval echo "$as_me:13411: \"$ac_compile\"") >&5
13412   (eval $ac_compile) 2>&5
13413   ac_status=$?
13414   echo "$as_me:13414: \$? = $ac_status" >&5
13415   (exit $ac_status); } &&
13416          { ac_try='test -s conftest.$ac_objext'
13417   { (eval echo "$as_me:13417: \"$ac_try\"") >&5
13418   (eval $ac_try) 2>&5
13419   ac_status=$?
13420   echo "$as_me:13420: \$? = $ac_status" >&5
13421   (exit $ac_status); }; }; then
13422   cf_cv_header_stdbool_h=1
13423 else
13424   echo "$as_me: failed program was:" >&5
13425 cat conftest.$ac_ext >&5
13426 cf_cv_header_stdbool_h=0
13427 fi
13428 rm -f conftest.$ac_objext conftest.$ac_ext
13429 fi
13430 rm -f conftest.$ac_objext conftest.$ac_ext
13431 fi
13432
13433 if test "$cf_cv_header_stdbool_h" = 1
13434 then    echo "$as_me:13434: result: yes" >&5
13435 echo "${ECHO_T}yes" >&6
13436 else    echo "$as_me:13436: result: no" >&5
13437 echo "${ECHO_T}no" >&6
13438 fi
13439
13440 echo "$as_me:13440: checking for builtin bool type" >&5
13441 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13442
13443 if test "${cf_cv_cc_bool_type+set}" = set; then
13444   echo $ECHO_N "(cached) $ECHO_C" >&6
13445 else
13446
13447         cat >conftest.$ac_ext <<_ACEOF
13448 #line 13448 "configure"
13449 #include "confdefs.h"
13450
13451 #include <stdio.h>
13452 #include <sys/types.h>
13453
13454 int
13455 main ()
13456 {
13457 bool x = false
13458   ;
13459   return 0;
13460 }
13461 _ACEOF
13462 rm -f conftest.$ac_objext
13463 if { (eval echo "$as_me:13463: \"$ac_compile\"") >&5
13464   (eval $ac_compile) 2>&5
13465   ac_status=$?
13466   echo "$as_me:13466: \$? = $ac_status" >&5
13467   (exit $ac_status); } &&
13468          { ac_try='test -s conftest.$ac_objext'
13469   { (eval echo "$as_me:13469: \"$ac_try\"") >&5
13470   (eval $ac_try) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); }; }; then
13474   cf_cv_cc_bool_type=1
13475 else
13476   echo "$as_me: failed program was:" >&5
13477 cat conftest.$ac_ext >&5
13478 cf_cv_cc_bool_type=0
13479 fi
13480 rm -f conftest.$ac_objext conftest.$ac_ext
13481
13482 fi
13483
13484 if test "$cf_cv_cc_bool_type" = 1
13485 then    echo "$as_me:13485: result: yes" >&5
13486 echo "${ECHO_T}yes" >&6
13487 else    echo "$as_me:13487: result: no" >&5
13488 echo "${ECHO_T}no" >&6
13489 fi
13490
13491 # Check for C++ compiler characteristics (and ensure that it's there!)
13492 if test -n "$CXX" ; then
13493         ac_ext=cc
13494 ac_cpp='$CXXCPP $CPPFLAGS'
13495 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13496 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13497 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13498 ac_main_return=return
13499
13500 if test -n "$GXX" ; then
13501 case $cf_cv_system_name in #(vi
13502 os2*) #(vi
13503         cf_stdcpp_libname=stdcpp
13504         ;;
13505 *)
13506         cf_stdcpp_libname=stdc++
13507         ;;
13508 esac
13509 echo "$as_me:13509: checking for library $cf_stdcpp_libname" >&5
13510 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13511 if test "${cf_cv_libstdcpp+set}" = set; then
13512   echo $ECHO_N "(cached) $ECHO_C" >&6
13513 else
13514
13515         cf_save="$LIBS"
13516         LIBS="$LIBS -l$cf_stdcpp_libname"
13517 cat >conftest.$ac_ext <<_ACEOF
13518 #line 13518 "configure"
13519 #include "confdefs.h"
13520
13521 #include <strstream.h>
13522 int
13523 main ()
13524 {
13525
13526 char buf[80];
13527 strstreambuf foo(buf, sizeof(buf))
13528
13529   ;
13530   return 0;
13531 }
13532 _ACEOF
13533 rm -f conftest.$ac_objext conftest$ac_exeext
13534 if { (eval echo "$as_me:13534: \"$ac_link\"") >&5
13535   (eval $ac_link) 2>&5
13536   ac_status=$?
13537   echo "$as_me:13537: \$? = $ac_status" >&5
13538   (exit $ac_status); } &&
13539          { ac_try='test -s conftest$ac_exeext'
13540   { (eval echo "$as_me:13540: \"$ac_try\"") >&5
13541   (eval $ac_try) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit $ac_status); }; }; then
13545   cf_cv_libstdcpp=yes
13546 else
13547   echo "$as_me: failed program was:" >&5
13548 cat conftest.$ac_ext >&5
13549 cf_cv_libstdcpp=no
13550 fi
13551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13552         LIBS="$cf_save"
13553
13554 fi
13555 echo "$as_me:13555: result: $cf_cv_libstdcpp" >&5
13556 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13557 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13558 fi
13559
13560         echo "$as_me:13560: checking whether $CXX understands -c and -o together" >&5
13561 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13562 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13563   echo $ECHO_N "(cached) $ECHO_C" >&6
13564 else
13565
13566 cat > conftest.$ac_ext <<CF_EOF
13567 #include <stdio.h>
13568 int main()
13569 {
13570         ${cf_cv_main_return:-return}(0);
13571 }
13572 CF_EOF
13573 # We do the test twice because some compilers refuse to overwrite an
13574 # existing .o file with -o, though they will create one.
13575 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13576 if { (eval echo "$as_me:13576: \"$ac_try\"") >&5
13577   (eval $ac_try) 2>&5
13578   ac_status=$?
13579   echo "$as_me:13579: \$? = $ac_status" >&5
13580   (exit $ac_status); } &&
13581   test -f conftest2.$ac_objext && { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); };
13586 then
13587   eval cf_cv_prog_CXX_c_o=yes
13588 else
13589   eval cf_cv_prog_CXX_c_o=no
13590 fi
13591 rm -f conftest*
13592
13593 fi
13594 if test $cf_cv_prog_CXX_c_o = yes; then
13595   echo "$as_me:13595: result: yes" >&5
13596 echo "${ECHO_T}yes" >&6
13597 else
13598   echo "$as_me:13598: result: no" >&5
13599 echo "${ECHO_T}no" >&6
13600 fi
13601
13602         case $GXX_VERSION in
13603         1*|2.0-6*)
13604                 cf_cxx_library=yes
13605                 ;;
13606         *-2.7*|2.7*)
13607
13608 cf_cxx_library=unknown
13609 case $cf_cv_system_name in #(vi
13610 os2*) #(vi
13611         cf_gpp_libname=gpp
13612         ;;
13613 *)
13614         cf_gpp_libname=g++
13615         ;;
13616 esac
13617 if test "$GXX" = yes; then
13618         echo "$as_me:13618: checking for lib$cf_gpp_libname" >&5
13619 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13620         cf_save="$LIBS"
13621         LIBS="$LIBS -l$cf_gpp_libname"
13622         cat >conftest.$ac_ext <<_ACEOF
13623 #line 13623 "configure"
13624 #include "confdefs.h"
13625
13626 #include <$cf_gpp_libname/builtin.h>
13627
13628 int
13629 main ()
13630 {
13631 two_arg_error_handler_t foo2 = lib_error_handler
13632   ;
13633   return 0;
13634 }
13635 _ACEOF
13636 rm -f conftest.$ac_objext conftest$ac_exeext
13637 if { (eval echo "$as_me:13637: \"$ac_link\"") >&5
13638   (eval $ac_link) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); } &&
13642          { ac_try='test -s conftest$ac_exeext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   cf_cxx_library=yes
13649          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13650          if test "$cf_gpp_libname" = cpp ; then
13651             cat >>confdefs.h <<\EOF
13652 #define HAVE_GPP_BUILTIN_H 1
13653 EOF
13654
13655          else
13656             cat >>confdefs.h <<\EOF
13657 #define HAVE_GXX_BUILTIN_H 1
13658 EOF
13659
13660          fi
13661 else
13662   echo "$as_me: failed program was:" >&5
13663 cat conftest.$ac_ext >&5
13664 cat >conftest.$ac_ext <<_ACEOF
13665 #line 13665 "configure"
13666 #include "confdefs.h"
13667
13668 #include <builtin.h>
13669
13670 int
13671 main ()
13672 {
13673 two_arg_error_handler_t foo2 = lib_error_handler
13674   ;
13675   return 0;
13676 }
13677 _ACEOF
13678 rm -f conftest.$ac_objext conftest$ac_exeext
13679 if { (eval echo "$as_me:13679: \"$ac_link\"") >&5
13680   (eval $ac_link) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); } &&
13684          { ac_try='test -s conftest$ac_exeext'
13685   { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); }; }; then
13690   cf_cxx_library=yes
13691          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13692          cat >>confdefs.h <<\EOF
13693 #define HAVE_BUILTIN_H 1
13694 EOF
13695
13696 else
13697   echo "$as_me: failed program was:" >&5
13698 cat conftest.$ac_ext >&5
13699 cf_cxx_library=no
13700 fi
13701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13702 fi
13703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13704         LIBS="$cf_save"
13705         echo "$as_me:13705: result: $cf_cxx_library" >&5
13706 echo "${ECHO_T}$cf_cxx_library" >&6
13707 fi
13708
13709                 ;;
13710         *)
13711                 cf_cxx_library=no
13712                 ;;
13713         esac
13714
13715         ac_ext=cc
13716 ac_cpp='$CXXCPP $CPPFLAGS'
13717 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13718 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13719 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13720 ac_main_return=return
13721 echo "$as_me:13721: checking how to run the C++ preprocessor" >&5
13722 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13723 if test -z "$CXXCPP"; then
13724   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13725   echo $ECHO_N "(cached) $ECHO_C" >&6
13726 else
13727       # Double quotes because CXXCPP needs to be expanded
13728     for CXXCPP in "$CXX -E" "/lib/cpp"
13729     do
13730       ac_preproc_ok=false
13731 for ac_cxx_preproc_warn_flag in '' yes
13732 do
13733   # Use a header file that comes with gcc, so configuring glibc
13734   # with a fresh cross-compiler works.
13735   # On the NeXT, cc -E runs the code through the compiler's parser,
13736   # not just through cpp. "Syntax error" is here to catch this case.
13737   cat >conftest.$ac_ext <<_ACEOF
13738 #line 13738 "configure"
13739 #include "confdefs.h"
13740 #include <assert.h>
13741                      Syntax error
13742 _ACEOF
13743 if { (eval echo "$as_me:13743: \"$ac_cpp conftest.$ac_ext\"") >&5
13744   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13745   ac_status=$?
13746   egrep -v '^ *\+' conftest.er1 >conftest.err
13747   rm -f conftest.er1
13748   cat conftest.err >&5
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); } >/dev/null; then
13751   if test -s conftest.err; then
13752     ac_cpp_err=$ac_cxx_preproc_warn_flag
13753   else
13754     ac_cpp_err=
13755   fi
13756 else
13757   ac_cpp_err=yes
13758 fi
13759 if test -z "$ac_cpp_err"; then
13760   :
13761 else
13762   echo "$as_me: failed program was:" >&5
13763   cat conftest.$ac_ext >&5
13764   # Broken: fails on valid input.
13765 continue
13766 fi
13767 rm -f conftest.err conftest.$ac_ext
13768
13769   # OK, works on sane cases.  Now check whether non-existent headers
13770   # can be detected and how.
13771   cat >conftest.$ac_ext <<_ACEOF
13772 #line 13772 "configure"
13773 #include "confdefs.h"
13774 #include <ac_nonexistent.h>
13775 _ACEOF
13776 if { (eval echo "$as_me:13776: \"$ac_cpp conftest.$ac_ext\"") >&5
13777   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13778   ac_status=$?
13779   egrep -v '^ *\+' conftest.er1 >conftest.err
13780   rm -f conftest.er1
13781   cat conftest.err >&5
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit $ac_status); } >/dev/null; then
13784   if test -s conftest.err; then
13785     ac_cpp_err=$ac_cxx_preproc_warn_flag
13786   else
13787     ac_cpp_err=
13788   fi
13789 else
13790   ac_cpp_err=yes
13791 fi
13792 if test -z "$ac_cpp_err"; then
13793   # Broken: success on invalid input.
13794 continue
13795 else
13796   echo "$as_me: failed program was:" >&5
13797   cat conftest.$ac_ext >&5
13798   # Passes both tests.
13799 ac_preproc_ok=:
13800 break
13801 fi
13802 rm -f conftest.err conftest.$ac_ext
13803
13804 done
13805 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13806 rm -f conftest.err conftest.$ac_ext
13807 if $ac_preproc_ok; then
13808   break
13809 fi
13810
13811     done
13812     ac_cv_prog_CXXCPP=$CXXCPP
13813
13814 fi
13815   CXXCPP=$ac_cv_prog_CXXCPP
13816 else
13817   ac_cv_prog_CXXCPP=$CXXCPP
13818 fi
13819 echo "$as_me:13819: result: $CXXCPP" >&5
13820 echo "${ECHO_T}$CXXCPP" >&6
13821 ac_preproc_ok=false
13822 for ac_cxx_preproc_warn_flag in '' yes
13823 do
13824   # Use a header file that comes with gcc, so configuring glibc
13825   # with a fresh cross-compiler works.
13826   # On the NeXT, cc -E runs the code through the compiler's parser,
13827   # not just through cpp. "Syntax error" is here to catch this case.
13828   cat >conftest.$ac_ext <<_ACEOF
13829 #line 13829 "configure"
13830 #include "confdefs.h"
13831 #include <assert.h>
13832                      Syntax error
13833 _ACEOF
13834 if { (eval echo "$as_me:13834: \"$ac_cpp conftest.$ac_ext\"") >&5
13835   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13836   ac_status=$?
13837   egrep -v '^ *\+' conftest.er1 >conftest.err
13838   rm -f conftest.er1
13839   cat conftest.err >&5
13840   echo "$as_me:13840: \$? = $ac_status" >&5
13841   (exit $ac_status); } >/dev/null; then
13842   if test -s conftest.err; then
13843     ac_cpp_err=$ac_cxx_preproc_warn_flag
13844   else
13845     ac_cpp_err=
13846   fi
13847 else
13848   ac_cpp_err=yes
13849 fi
13850 if test -z "$ac_cpp_err"; then
13851   :
13852 else
13853   echo "$as_me: failed program was:" >&5
13854   cat conftest.$ac_ext >&5
13855   # Broken: fails on valid input.
13856 continue
13857 fi
13858 rm -f conftest.err conftest.$ac_ext
13859
13860   # OK, works on sane cases.  Now check whether non-existent headers
13861   # can be detected and how.
13862   cat >conftest.$ac_ext <<_ACEOF
13863 #line 13863 "configure"
13864 #include "confdefs.h"
13865 #include <ac_nonexistent.h>
13866 _ACEOF
13867 if { (eval echo "$as_me:13867: \"$ac_cpp conftest.$ac_ext\"") >&5
13868   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13869   ac_status=$?
13870   egrep -v '^ *\+' conftest.er1 >conftest.err
13871   rm -f conftest.er1
13872   cat conftest.err >&5
13873   echo "$as_me:13873: \$? = $ac_status" >&5
13874   (exit $ac_status); } >/dev/null; then
13875   if test -s conftest.err; then
13876     ac_cpp_err=$ac_cxx_preproc_warn_flag
13877   else
13878     ac_cpp_err=
13879   fi
13880 else
13881   ac_cpp_err=yes
13882 fi
13883 if test -z "$ac_cpp_err"; then
13884   # Broken: success on invalid input.
13885 continue
13886 else
13887   echo "$as_me: failed program was:" >&5
13888   cat conftest.$ac_ext >&5
13889   # Passes both tests.
13890 ac_preproc_ok=:
13891 break
13892 fi
13893 rm -f conftest.err conftest.$ac_ext
13894
13895 done
13896 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13897 rm -f conftest.err conftest.$ac_ext
13898 if $ac_preproc_ok; then
13899   :
13900 else
13901   { { echo "$as_me:13901: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13902 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13903    { (exit 1); exit 1; }; }
13904 fi
13905
13906 ac_ext=cc
13907 ac_cpp='$CXXCPP $CPPFLAGS'
13908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13911 ac_main_return=return
13912
13913 for ac_header in typeinfo
13914 do
13915 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13916 echo "$as_me:13916: checking for $ac_header" >&5
13917 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13918 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13919   echo $ECHO_N "(cached) $ECHO_C" >&6
13920 else
13921   cat >conftest.$ac_ext <<_ACEOF
13922 #line 13922 "configure"
13923 #include "confdefs.h"
13924 #include <$ac_header>
13925 _ACEOF
13926 if { (eval echo "$as_me:13926: \"$ac_cpp conftest.$ac_ext\"") >&5
13927   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13928   ac_status=$?
13929   egrep -v '^ *\+' conftest.er1 >conftest.err
13930   rm -f conftest.er1
13931   cat conftest.err >&5
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit $ac_status); } >/dev/null; then
13934   if test -s conftest.err; then
13935     ac_cpp_err=$ac_cxx_preproc_warn_flag
13936   else
13937     ac_cpp_err=
13938   fi
13939 else
13940   ac_cpp_err=yes
13941 fi
13942 if test -z "$ac_cpp_err"; then
13943   eval "$as_ac_Header=yes"
13944 else
13945   echo "$as_me: failed program was:" >&5
13946   cat conftest.$ac_ext >&5
13947   eval "$as_ac_Header=no"
13948 fi
13949 rm -f conftest.err conftest.$ac_ext
13950 fi
13951 echo "$as_me:13951: result: `eval echo '${'$as_ac_Header'}'`" >&5
13952 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13953 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13954   cat >>confdefs.h <<EOF
13955 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13956 EOF
13957
13958 fi
13959 done
13960
13961 echo "$as_me:13961: checking if we should include stdbool.h" >&5
13962 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13963
13964 if test "${cf_cv_header_stdbool_h+set}" = set; then
13965   echo $ECHO_N "(cached) $ECHO_C" >&6
13966 else
13967
13968         cat >conftest.$ac_ext <<_ACEOF
13969 #line 13969 "configure"
13970 #include "confdefs.h"
13971
13972 int
13973 main ()
13974 {
13975 bool foo = false
13976   ;
13977   return 0;
13978 }
13979 _ACEOF
13980 rm -f conftest.$ac_objext
13981 if { (eval echo "$as_me:13981: \"$ac_compile\"") >&5
13982   (eval $ac_compile) 2>&5
13983   ac_status=$?
13984   echo "$as_me:13984: \$? = $ac_status" >&5
13985   (exit $ac_status); } &&
13986          { ac_try='test -s conftest.$ac_objext'
13987   { (eval echo "$as_me:13987: \"$ac_try\"") >&5
13988   (eval $ac_try) 2>&5
13989   ac_status=$?
13990   echo "$as_me:13990: \$? = $ac_status" >&5
13991   (exit $ac_status); }; }; then
13992   cf_cv_header_stdbool_h=0
13993 else
13994   echo "$as_me: failed program was:" >&5
13995 cat conftest.$ac_ext >&5
13996 cat >conftest.$ac_ext <<_ACEOF
13997 #line 13997 "configure"
13998 #include "confdefs.h"
13999
14000 #ifndef __BEOS__
14001 #include <stdbool.h>
14002 #endif
14003
14004 int
14005 main ()
14006 {
14007 bool foo = false
14008   ;
14009   return 0;
14010 }
14011 _ACEOF
14012 rm -f conftest.$ac_objext
14013 if { (eval echo "$as_me:14013: \"$ac_compile\"") >&5
14014   (eval $ac_compile) 2>&5
14015   ac_status=$?
14016   echo "$as_me:14016: \$? = $ac_status" >&5
14017   (exit $ac_status); } &&
14018          { ac_try='test -s conftest.$ac_objext'
14019   { (eval echo "$as_me:14019: \"$ac_try\"") >&5
14020   (eval $ac_try) 2>&5
14021   ac_status=$?
14022   echo "$as_me:14022: \$? = $ac_status" >&5
14023   (exit $ac_status); }; }; then
14024   cf_cv_header_stdbool_h=1
14025 else
14026   echo "$as_me: failed program was:" >&5
14027 cat conftest.$ac_ext >&5
14028 cf_cv_header_stdbool_h=0
14029 fi
14030 rm -f conftest.$ac_objext conftest.$ac_ext
14031 fi
14032 rm -f conftest.$ac_objext conftest.$ac_ext
14033 fi
14034
14035 if test "$cf_cv_header_stdbool_h" = 1
14036 then    echo "$as_me:14036: result: yes" >&5
14037 echo "${ECHO_T}yes" >&6
14038 else    echo "$as_me:14038: result: no" >&5
14039 echo "${ECHO_T}no" >&6
14040 fi
14041
14042 echo "$as_me:14042: checking for builtin bool type" >&5
14043 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14044
14045 if test "${cf_cv_builtin_bool+set}" = set; then
14046   echo $ECHO_N "(cached) $ECHO_C" >&6
14047 else
14048
14049         cat >conftest.$ac_ext <<_ACEOF
14050 #line 14050 "configure"
14051 #include "confdefs.h"
14052
14053 #include <stdio.h>
14054 #include <sys/types.h>
14055
14056 int
14057 main ()
14058 {
14059 bool x = false
14060   ;
14061   return 0;
14062 }
14063 _ACEOF
14064 rm -f conftest.$ac_objext
14065 if { (eval echo "$as_me:14065: \"$ac_compile\"") >&5
14066   (eval $ac_compile) 2>&5
14067   ac_status=$?
14068   echo "$as_me:14068: \$? = $ac_status" >&5
14069   (exit $ac_status); } &&
14070          { ac_try='test -s conftest.$ac_objext'
14071   { (eval echo "$as_me:14071: \"$ac_try\"") >&5
14072   (eval $ac_try) 2>&5
14073   ac_status=$?
14074   echo "$as_me:14074: \$? = $ac_status" >&5
14075   (exit $ac_status); }; }; then
14076   cf_cv_builtin_bool=1
14077 else
14078   echo "$as_me: failed program was:" >&5
14079 cat conftest.$ac_ext >&5
14080 cf_cv_builtin_bool=0
14081 fi
14082 rm -f conftest.$ac_objext conftest.$ac_ext
14083
14084 fi
14085
14086 if test "$cf_cv_builtin_bool" = 1
14087 then    echo "$as_me:14087: result: yes" >&5
14088 echo "${ECHO_T}yes" >&6
14089 else    echo "$as_me:14089: result: no" >&5
14090 echo "${ECHO_T}no" >&6
14091 fi
14092
14093 echo "$as_me:14093: checking for size of bool" >&5
14094 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14095 if test "${cf_cv_type_of_bool+set}" = set; then
14096   echo $ECHO_N "(cached) $ECHO_C" >&6
14097 else
14098
14099         rm -f cf_test.out
14100         if test "$cross_compiling" = yes; then
14101   cf_cv_type_of_bool=unknown
14102 else
14103   cat >conftest.$ac_ext <<_ACEOF
14104 #line 14104 "configure"
14105 #include "confdefs.h"
14106
14107 #include <stdlib.h>
14108 #include <stdio.h>
14109
14110 #if defined(__cplusplus)
14111
14112 #ifdef HAVE_GXX_BUILTIN_H
14113 #include <g++/builtin.h>
14114 #elif HAVE_GPP_BUILTIN_H
14115 #include <gpp/builtin.h>
14116 #elif HAVE_BUILTIN_H
14117 #include <builtin.h>
14118 #endif
14119
14120 #else
14121
14122 #if $cf_cv_header_stdbool_h
14123 #include <stdbool.h>
14124 #endif
14125
14126 #endif
14127
14128 main()
14129 {
14130         FILE *fp = fopen("cf_test.out", "w");
14131         if (fp != 0) {
14132                 bool x = true;
14133                 if ((bool)(-x) >= 0)
14134                         fputs("unsigned ", fp);
14135                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14136                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14137                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14138                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14139                 fclose(fp);
14140         }
14141         ${cf_cv_main_return:-return}(0);
14142 }
14143
14144 _ACEOF
14145 rm -f conftest$ac_exeext
14146 if { (eval echo "$as_me:14146: \"$ac_link\"") >&5
14147   (eval $ac_link) 2>&5
14148   ac_status=$?
14149   echo "$as_me:14149: \$? = $ac_status" >&5
14150   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14151   { (eval echo "$as_me:14151: \"$ac_try\"") >&5
14152   (eval $ac_try) 2>&5
14153   ac_status=$?
14154   echo "$as_me:14154: \$? = $ac_status" >&5
14155   (exit $ac_status); }; }; then
14156   cf_cv_type_of_bool=`cat cf_test.out`
14157                  if test -z "$cf_cv_type_of_bool"; then
14158                    cf_cv_type_of_bool=unknown
14159                  fi
14160 else
14161   echo "$as_me: program exited with status $ac_status" >&5
14162 echo "$as_me: failed program was:" >&5
14163 cat conftest.$ac_ext >&5
14164 cf_cv_type_of_bool=unknown
14165 fi
14166 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14167 fi
14168
14169 fi
14170
14171         rm -f cf_test.out
14172 echo "$as_me:14172: result: $cf_cv_type_of_bool" >&5
14173 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14174 if test "$cf_cv_type_of_bool" = unknown ; then
14175         case .$NCURSES_BOOL in #(vi
14176         .auto|.) NCURSES_BOOL=unsigned;;
14177         esac
14178         { echo "$as_me:14178: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14179 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14180         cf_cv_type_of_bool=$NCURSES_BOOL
14181 fi
14182
14183 echo "$as_me:14183: checking for special defines needed for etip.h" >&5
14184 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14185 cf_save_CXXFLAGS="$CXXFLAGS"
14186 cf_result="none"
14187 for cf_math in "" MATH_H
14188 do
14189 for cf_excp in "" MATH_EXCEPTION
14190 do
14191         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14192         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14193         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14194 cat >conftest.$ac_ext <<_ACEOF
14195 #line 14195 "configure"
14196 #include "confdefs.h"
14197
14198 #include <etip.h.in>
14199
14200 int
14201 main ()
14202 {
14203
14204   ;
14205   return 0;
14206 }
14207 _ACEOF
14208 rm -f conftest.$ac_objext
14209 if { (eval echo "$as_me:14209: \"$ac_compile\"") >&5
14210   (eval $ac_compile) 2>&5
14211   ac_status=$?
14212   echo "$as_me:14212: \$? = $ac_status" >&5
14213   (exit $ac_status); } &&
14214          { ac_try='test -s conftest.$ac_objext'
14215   { (eval echo "$as_me:14215: \"$ac_try\"") >&5
14216   (eval $ac_try) 2>&5
14217   ac_status=$?
14218   echo "$as_me:14218: \$? = $ac_status" >&5
14219   (exit $ac_status); }; }; then
14220
14221         test -n "$cf_math" && cat >>confdefs.h <<EOF
14222 #define ETIP_NEEDS_${cf_math} 1
14223 EOF
14224
14225         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14226 #define ETIP_NEEDS_${cf_excp} 1
14227 EOF
14228
14229         cf_result="$cf_math $cf_excp"
14230         break
14231
14232 else
14233   echo "$as_me: failed program was:" >&5
14234 cat conftest.$ac_ext >&5
14235 fi
14236 rm -f conftest.$ac_objext conftest.$ac_ext
14237 done
14238 done
14239 echo "$as_me:14239: result: $cf_result" >&5
14240 echo "${ECHO_T}$cf_result" >&6
14241 CXXFLAGS="$cf_save_CXXFLAGS"
14242
14243 if test -n "$CXX"; then
14244 echo "$as_me:14244: checking if $CXX accepts parameter initialization" >&5
14245 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14246 if test "${cf_cv_cpp_param_init+set}" = set; then
14247   echo $ECHO_N "(cached) $ECHO_C" >&6
14248 else
14249
14250         ac_ext=cc
14251 ac_cpp='$CXXCPP $CPPFLAGS'
14252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14255 ac_main_return=return
14256
14257         if test "$cross_compiling" = yes; then
14258   cf_cv_cpp_param_init=unknown
14259 else
14260   cat >conftest.$ac_ext <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263
14264 class TEST {
14265 private:
14266         int value;
14267 public:
14268         TEST(int x = 1);
14269         ~TEST();
14270 };
14271
14272 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14273 {
14274         value = x;
14275 }
14276 void main() { }
14277
14278 _ACEOF
14279 rm -f conftest$ac_exeext
14280 if { (eval echo "$as_me:14280: \"$ac_link\"") >&5
14281   (eval $ac_link) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14285   { (eval echo "$as_me:14285: \"$ac_try\"") >&5
14286   (eval $ac_try) 2>&5
14287   ac_status=$?
14288   echo "$as_me:14288: \$? = $ac_status" >&5
14289   (exit $ac_status); }; }; then
14290   cf_cv_cpp_param_init=yes
14291 else
14292   echo "$as_me: program exited with status $ac_status" >&5
14293 echo "$as_me: failed program was:" >&5
14294 cat conftest.$ac_ext >&5
14295 cf_cv_cpp_param_init=no
14296 fi
14297 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14298 fi
14299         ac_ext=cc
14300 ac_cpp='$CXXCPP $CPPFLAGS'
14301 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14302 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14303 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14304 ac_main_return=return
14305
14306 fi
14307 echo "$as_me:14307: result: $cf_cv_cpp_param_init" >&5
14308 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14309 fi
14310 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14311 #define CPP_HAS_PARAM_INIT 1
14312 EOF
14313
14314 if test -n "$CXX"; then
14315
14316 echo "$as_me:14316: checking if $CXX accepts static_cast" >&5
14317 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14318 if test "${cf_cv_cpp_static_cast+set}" = set; then
14319   echo $ECHO_N "(cached) $ECHO_C" >&6
14320 else
14321
14322         ac_ext=cc
14323 ac_cpp='$CXXCPP $CPPFLAGS'
14324 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14325 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14326 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14327 ac_main_return=return
14328
14329         cat >conftest.$ac_ext <<_ACEOF
14330 #line 14330 "configure"
14331 #include "confdefs.h"
14332
14333 class NCursesPanel
14334 {
14335 public:
14336   NCursesPanel(int nlines,
14337                int ncols,
14338                int begin_y = 0,
14339                int begin_x = 0)
14340   {
14341   }
14342
14343   ~NCursesPanel();
14344 };
14345
14346 template<class T> class NCursesUserPanel : public NCursesPanel
14347 {
14348 public:
14349   NCursesUserPanel (int nlines,
14350                     int ncols,
14351                     int begin_y = 0,
14352                     int begin_x = 0,
14353                     const T* p_UserData = static_cast<T*>(0))
14354     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14355   {
14356   };
14357   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14358   {
14359   };
14360
14361   virtual ~NCursesUserPanel() {};
14362 };
14363
14364 int
14365 main ()
14366 {
14367
14368         const char* p_UserData = static_cast<char*>(0)
14369   ;
14370   return 0;
14371 }
14372 _ACEOF
14373 rm -f conftest.$ac_objext
14374 if { (eval echo "$as_me:14374: \"$ac_compile\"") >&5
14375   (eval $ac_compile) 2>&5
14376   ac_status=$?
14377   echo "$as_me:14377: \$? = $ac_status" >&5
14378   (exit $ac_status); } &&
14379          { ac_try='test -s conftest.$ac_objext'
14380   { (eval echo "$as_me:14380: \"$ac_try\"") >&5
14381   (eval $ac_try) 2>&5
14382   ac_status=$?
14383   echo "$as_me:14383: \$? = $ac_status" >&5
14384   (exit $ac_status); }; }; then
14385   cf_cv_cpp_static_cast=yes
14386 else
14387   echo "$as_me: failed program was:" >&5
14388 cat conftest.$ac_ext >&5
14389 cf_cv_cpp_static_cast=no
14390 fi
14391 rm -f conftest.$ac_objext conftest.$ac_ext
14392
14393         ac_ext=cc
14394 ac_cpp='$CXXCPP $CPPFLAGS'
14395 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14396 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14397 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14398 ac_main_return=return
14399
14400 fi
14401 echo "$as_me:14401: result: $cf_cv_cpp_static_cast" >&5
14402 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14403
14404 fi
14405
14406 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14407 #define CPP_HAS_STATIC_CAST 1
14408 EOF
14409
14410         CXX_AR='$(AR)'
14411         CXX_AR_OPTS='$(AR_OPTS)'
14412         case $cf_cv_system_name in #(vi
14413         irix*) #(vi
14414             if test "$GXX" != yes ; then
14415                 CXX_AR='$(CXX)'
14416                 CXX_AR_OPTS='-ar -o'
14417             fi
14418             ;;
14419         sco3.2v5*) #(vi
14420             CXXLDFLAGS="-u main"
14421             ;;
14422         solaris2*)
14423             if test "$GXX" != yes ; then
14424                 CXX_AR='$(CXX)'
14425                 CXX_AR_OPTS='-xar -o'
14426             fi
14427             ;;
14428         esac
14429
14430 else
14431         cf_cxx_library=no
14432         cf_cv_builtin_bool=1
14433
14434         # Just because we are not configuring against C++ right now does not
14435         # mean that a user will not want to use C++.  Some distributors disable
14436         # the C++ portion of this configuration as a shortcut (or just to avoid
14437         # compiling the demo in the c++ directory).  So we need a reasonable
14438         # default for the 'bool' type.
14439         #
14440         # Caveat: since the storage of the bool type is not standardized, it
14441         # may change.
14442
14443         if test "$NCURSES_BOOL" != auto ; then
14444                 cf_cv_type_of_bool=$NCURSES_BOOL
14445                 cf_cv_header_stdbool_h=0
14446         else
14447                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14448
14449 echo "$as_me:14449: checking for size of bool" >&5
14450 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14451 if test "${cf_cv_type_of_bool+set}" = set; then
14452   echo $ECHO_N "(cached) $ECHO_C" >&6
14453 else
14454
14455         rm -f cf_test.out
14456         if test "$cross_compiling" = yes; then
14457   cf_cv_type_of_bool=unknown
14458 else
14459   cat >conftest.$ac_ext <<_ACEOF
14460 #line 14460 "configure"
14461 #include "confdefs.h"
14462
14463 #include <stdlib.h>
14464 #include <stdio.h>
14465
14466 #if defined(__cplusplus)
14467
14468 #ifdef HAVE_GXX_BUILTIN_H
14469 #include <g++/builtin.h>
14470 #elif HAVE_GPP_BUILTIN_H
14471 #include <gpp/builtin.h>
14472 #elif HAVE_BUILTIN_H
14473 #include <builtin.h>
14474 #endif
14475
14476 #else
14477
14478 #if $cf_cv_header_stdbool_h
14479 #include <stdbool.h>
14480 #endif
14481
14482 #endif
14483
14484 main()
14485 {
14486         FILE *fp = fopen("cf_test.out", "w");
14487         if (fp != 0) {
14488                 bool x = true;
14489                 if ((bool)(-x) >= 0)
14490                         fputs("unsigned ", fp);
14491                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14492                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14493                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14494                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14495                 fclose(fp);
14496         }
14497         ${cf_cv_main_return:-return}(0);
14498 }
14499
14500 _ACEOF
14501 rm -f conftest$ac_exeext
14502 if { (eval echo "$as_me:14502: \"$ac_link\"") >&5
14503   (eval $ac_link) 2>&5
14504   ac_status=$?
14505   echo "$as_me:14505: \$? = $ac_status" >&5
14506   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14507   { (eval echo "$as_me:14507: \"$ac_try\"") >&5
14508   (eval $ac_try) 2>&5
14509   ac_status=$?
14510   echo "$as_me:14510: \$? = $ac_status" >&5
14511   (exit $ac_status); }; }; then
14512   cf_cv_type_of_bool=`cat cf_test.out`
14513                  if test -z "$cf_cv_type_of_bool"; then
14514                    cf_cv_type_of_bool=unknown
14515                  fi
14516 else
14517   echo "$as_me: program exited with status $ac_status" >&5
14518 echo "$as_me: failed program was:" >&5
14519 cat conftest.$ac_ext >&5
14520 cf_cv_type_of_bool=unknown
14521 fi
14522 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14523 fi
14524
14525 fi
14526
14527         rm -f cf_test.out
14528 echo "$as_me:14528: result: $cf_cv_type_of_bool" >&5
14529 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14530 if test "$cf_cv_type_of_bool" = unknown ; then
14531         case .$NCURSES_BOOL in #(vi
14532         .auto|.) NCURSES_BOOL=unsigned;;
14533         esac
14534         { echo "$as_me:14534: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14535 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14536         cf_cv_type_of_bool=$NCURSES_BOOL
14537 fi
14538
14539                 else
14540                         echo "$as_me:14540: checking for fallback type of bool" >&5
14541 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14542                         case "$host_cpu" in #(vi
14543                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14544                         *)      cf_cv_type_of_bool=int  ;;
14545                         esac
14546                         echo "$as_me:14546: result: $cf_cv_type_of_bool" >&5
14547 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14548                 fi
14549         fi
14550 fi
14551
14552 # If the C compiler did not declare bool, and we did not determine that the C++
14553 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14554 # ncurses library use the same type as C++ bool.  Note that this allows one to
14555 # specify the type of bool in a configure-script option and postpone
14556 # integration with the C++ compiler provided that the types are compatible.
14557 USE_CXX_BOOL=1
14558 if test $cf_cv_cc_bool_type = 1
14559 then
14560         # oops: C has a bool.  Unlikely, but C++ could differ.
14561         USE_CXX_BOOL=0
14562 elif test $cf_cv_builtin_bool = 0
14563 then
14564         # C++ has no bool
14565         USE_CXX_BOOL=0
14566 else
14567         # this is the normal case
14568         USE_CXX_BOOL='defined(__cplusplus)'
14569 fi
14570
14571 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14572 if test "$cf_with_ada" != "no" ; then
14573 cf_ada_make=gnatmake
14574 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14575 set dummy $cf_ada_make; ac_word=$2
14576 echo "$as_me:14576: checking for $ac_word" >&5
14577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14578 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14579   echo $ECHO_N "(cached) $ECHO_C" >&6
14580 else
14581   if test -n "$gnat_exists"; then
14582   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14583 else
14584   ac_save_IFS=$IFS; IFS=$ac_path_separator
14585 ac_dummy="$PATH"
14586 for ac_dir in $ac_dummy; do
14587   IFS=$ac_save_IFS
14588   test -z "$ac_dir" && ac_dir=.
14589   $as_executable_p "$ac_dir/$ac_word" || continue
14590 ac_cv_prog_gnat_exists="yes"
14591 echo "$as_me:14591: found $ac_dir/$ac_word" >&5
14592 break
14593 done
14594
14595   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14596 fi
14597 fi
14598 gnat_exists=$ac_cv_prog_gnat_exists
14599 if test -n "$gnat_exists"; then
14600   echo "$as_me:14600: result: $gnat_exists" >&5
14601 echo "${ECHO_T}$gnat_exists" >&6
14602 else
14603   echo "$as_me:14603: result: no" >&5
14604 echo "${ECHO_T}no" >&6
14605 fi
14606
14607 if test "$ac_cv_prog_gnat_exists" = no; then
14608    cf_ada_make=
14609 else
14610
14611 echo "$as_me:14611: checking for gnat version" >&5
14612 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14613 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14614   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14615 echo "$as_me:14615: result: $cf_gnat_version" >&5
14616 echo "${ECHO_T}$cf_gnat_version" >&6
14617
14618 case $cf_gnat_version in
14619   3.1[1-9]*|3.[2-9]*|[4-9].*)
14620     cf_cv_prog_gnat_correct=yes
14621     ;;
14622   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14623      cf_cv_prog_gnat_correct=no
14624      ;;
14625 esac
14626 case $cf_gnat_version in
14627   3.[1-9]*|[4-9].*)
14628       cf_compile_generics=generics
14629       cf_generic_objects="\${GENOBJS}"
14630       ;;
14631   *)  cf_compile_generics=
14632       cf_generic_objects=
14633       ;;
14634 esac
14635
14636    # Extract the first word of "m4", so it can be a program name with args.
14637 set dummy m4; ac_word=$2
14638 echo "$as_me:14638: checking for $ac_word" >&5
14639 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14640 if test "${ac_cv_prog_M4_exists+set}" = set; then
14641   echo $ECHO_N "(cached) $ECHO_C" >&6
14642 else
14643   if test -n "$M4_exists"; then
14644   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14645 else
14646   ac_save_IFS=$IFS; IFS=$ac_path_separator
14647 ac_dummy="$PATH"
14648 for ac_dir in $ac_dummy; do
14649   IFS=$ac_save_IFS
14650   test -z "$ac_dir" && ac_dir=.
14651   $as_executable_p "$ac_dir/$ac_word" || continue
14652 ac_cv_prog_M4_exists="yes"
14653 echo "$as_me:14653: found $ac_dir/$ac_word" >&5
14654 break
14655 done
14656
14657   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14658 fi
14659 fi
14660 M4_exists=$ac_cv_prog_M4_exists
14661 if test -n "$M4_exists"; then
14662   echo "$as_me:14662: result: $M4_exists" >&5
14663 echo "${ECHO_T}$M4_exists" >&6
14664 else
14665   echo "$as_me:14665: result: no" >&5
14666 echo "${ECHO_T}no" >&6
14667 fi
14668
14669    if test "$ac_cv_prog_M4_exists" = no; then
14670       cf_cv_prog_gnat_correct=no
14671       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14672    fi
14673    if test "$cf_cv_prog_gnat_correct" = yes; then
14674       echo "$as_me:14674: checking if GNAT works" >&5
14675 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14676
14677 rm -f conftest*
14678 cat >>conftest.ads <<CF_EOF
14679 procedure conftest;
14680 CF_EOF
14681 cat >>conftest.adb <<CF_EOF
14682 with Text_IO;
14683 with GNAT.OS_Lib;
14684 procedure conftest is
14685 begin
14686    Text_IO.Put ("Hello World");
14687    Text_IO.New_Line;
14688    GNAT.OS_Lib.OS_Exit (0);
14689 end conftest;
14690 CF_EOF
14691 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14692    if ( ./conftest 1>&5 2>&1 ) ; then
14693       cf_cv_prog_gnat_correct=yes
14694    else
14695       cf_cv_prog_gnat_correct=no
14696    fi
14697 else
14698    cf_cv_prog_gnat_correct=no
14699 fi
14700 rm -f conftest*
14701
14702       echo "$as_me:14702: result: $cf_cv_prog_gnat_correct" >&5
14703 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14704    fi
14705 fi
14706 if test "$cf_cv_prog_gnat_correct" = yes; then
14707    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14708
14709    echo "$as_me:14709: checking if GNAT pragma Unreferenced works" >&5
14710 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14711
14712 rm -f conftest*
14713 cat >>conftest.ads <<CF_EOF
14714 procedure conftest;
14715 CF_EOF
14716 cat >>conftest.adb <<CF_EOF
14717 with Text_IO;
14718 with GNAT.OS_Lib;
14719 procedure conftest is
14720    test : Integer;
14721    pragma Unreferenced (test);
14722 begin
14723    test := 1;
14724    Text_IO.Put ("Hello World");
14725    Text_IO.New_Line;
14726    GNAT.OS_Lib.OS_Exit (0);
14727 end conftest;
14728 CF_EOF
14729 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14730       cf_cv_pragma_unreferenced=yes
14731 else
14732    cf_cv_pragma_unreferenced=no
14733 fi
14734 rm -f conftest*
14735
14736    echo "$as_me:14736: result: $cf_cv_pragma_unreferenced" >&5
14737 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14738
14739    # if the pragma is supported, use it (needed in the Trace code).
14740    if test $cf_cv_pragma_unreferenced = yes ; then
14741       PRAGMA_UNREF=TRUE
14742    else
14743       PRAGMA_UNREF=FALSE
14744    fi
14745
14746 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14747 if test "${with_ada_compiler+set}" = set; then
14748   withval="$with_ada_compiler"
14749   cf_ada_compiler=$withval
14750 else
14751   cf_ada_compiler=gnatmake
14752 fi;
14753
14754    cf_ada_package=terminal_interface
14755
14756 # Check whether --with-ada-include or --without-ada-include was given.
14757 if test "${with_ada_include+set}" = set; then
14758   withval="$with_ada_include"
14759
14760 else
14761   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14762 fi;
14763 if test "x$prefix" != xNONE; then
14764   cf_path_syntax="$prefix"
14765 else
14766   cf_path_syntax="$ac_default_prefix"
14767 fi
14768
14769 case ".$withval" in #(vi
14770 .\$\(*\)*|.\'*\'*) #(vi
14771   ;;
14772 ..|./*|.\\*) #(vi
14773   ;;
14774 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14775   ;;
14776 .\${*prefix}*) #(vi
14777   eval withval="$withval"
14778   case ".$withval" in #(vi
14779   .NONE/*)
14780     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14781     ;;
14782   esac
14783   ;; #(vi
14784 .no|.NONE/*)
14785   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14786   ;;
14787 *)
14788   { { echo "$as_me:14788: error: expected a pathname, not \"$withval\"" >&5
14789 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14790    { (exit 1); exit 1; }; }
14791   ;;
14792 esac
14793
14794 ADA_INCLUDE="$withval"
14795
14796 # Check whether --with-ada-objects or --without-ada-objects was given.
14797 if test "${with_ada_objects+set}" = set; then
14798   withval="$with_ada_objects"
14799
14800 else
14801   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14802 fi;
14803 if test "x$prefix" != xNONE; then
14804   cf_path_syntax="$prefix"
14805 else
14806   cf_path_syntax="$ac_default_prefix"
14807 fi
14808
14809 case ".$withval" in #(vi
14810 .\$\(*\)*|.\'*\'*) #(vi
14811   ;;
14812 ..|./*|.\\*) #(vi
14813   ;;
14814 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14815   ;;
14816 .\${*prefix}*) #(vi
14817   eval withval="$withval"
14818   case ".$withval" in #(vi
14819   .NONE/*)
14820     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14821     ;;
14822   esac
14823   ;; #(vi
14824 .no|.NONE/*)
14825   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14826   ;;
14827 *)
14828   { { echo "$as_me:14828: error: expected a pathname, not \"$withval\"" >&5
14829 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14830    { (exit 1); exit 1; }; }
14831   ;;
14832 esac
14833
14834 ADA_OBJECTS="$withval"
14835
14836 fi
14837 fi
14838 fi
14839
14840 ### Construct the ncurses library-subsets, if any, from this set of keywords:
14841 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
14842 ###
14843 ### ticlib modules may be a separate library, otherwise contained in termlib.
14844 ### termlib modules may be a separate library, otherwise contained in ncurses.
14845 ###
14846 ### The of "+" or " " between the tokens controls the way the script
14847 ### chooses to split module lists into libraries.
14848 ###
14849 ### (see CF_LIB_RULES).
14850 echo "$as_me:14850: checking for library subsets" >&5
14851 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14852 LIB_SUBSETS=
14853
14854 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
14855         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
14856         if test "$with_ticlib" != no ; then
14857                 LIB_SUBSETS="${LIB_SUBSETS} "
14858         else
14859                 LIB_SUBSETS="${LIB_SUBSETS}+"
14860         fi
14861 fi
14862
14863 LIB_SUBSETS="${LIB_SUBSETS}termlib"
14864 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14865 if test "$with_termlib" != no ; then
14866         LIB_SUBSETS="${LIB_SUBSETS} "
14867 else
14868         LIB_SUBSETS="${LIB_SUBSETS}+"
14869 fi
14870
14871 LIB_SUBSETS="${LIB_SUBSETS}base"
14872 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
14873 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
14874
14875 echo "$as_me:14875: result: $LIB_SUBSETS" >&5
14876 echo "${ECHO_T}$LIB_SUBSETS" >&6
14877
14878 ### Construct the list of include-directories to be generated
14879
14880 CPPFLAGS="-I. -I../include $CPPFLAGS"
14881 if test "$srcdir" != "."; then
14882         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14883 fi
14884 if test "$GCC" != yes; then
14885         CPPFLAGS="$CPPFLAGS -I\${includedir}"
14886 elif test "$includedir" != "/usr/include"; then
14887         if test "$includedir" = '${prefix}/include' ; then
14888                 if test $prefix != /usr ; then
14889                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
14890                 fi
14891         else
14892                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
14893         fi
14894 fi
14895
14896 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
14897 if test "$srcdir" != "."; then
14898         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14899 fi
14900 if test "$GCC" != yes; then
14901         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14902 elif test "$includedir" != "/usr/include"; then
14903         if test "$includedir" = '${prefix}/include' ; then
14904                 if test $prefix != /usr ; then
14905                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14906                 fi
14907         else
14908                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14909         fi
14910 fi
14911
14912 ### Build up pieces for makefile rules
14913 echo "$as_me:14913: checking default library suffix" >&5
14914 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14915
14916         case $DFT_LWR_MODEL in
14917         libtool) DFT_ARG_SUFFIX=''   ;;
14918         normal)  DFT_ARG_SUFFIX=''   ;;
14919         debug)   DFT_ARG_SUFFIX='_g' ;;
14920         profile) DFT_ARG_SUFFIX='_p' ;;
14921         shared)  DFT_ARG_SUFFIX=''   ;;
14922         esac
14923         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14924 echo "$as_me:14924: result: $DFT_ARG_SUFFIX" >&5
14925 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14926
14927 echo "$as_me:14927: checking default library-dependency suffix" >&5
14928 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14929
14930         case $DFT_LWR_MODEL in
14931         libtool) DFT_DEP_SUFFIX='.la'  ;;
14932         normal)  DFT_DEP_SUFFIX='.a'   ;;
14933         debug)   DFT_DEP_SUFFIX='_g.a' ;;
14934         profile) DFT_DEP_SUFFIX='_p.a' ;;
14935         shared)
14936                 case $cf_cv_system_name in
14937                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
14938                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
14939                 hpux*)
14940                         case $target in
14941                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
14942                         *)      DFT_DEP_SUFFIX='.sl' ;;
14943                         esac
14944                         ;;
14945                 *)      DFT_DEP_SUFFIX='.so'  ;;
14946                 esac
14947         esac
14948         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
14949 if test $DFT_LWR_MODEL = shared ; then
14950         case $cf_cv_system_name in #(vi
14951         cygwin*)
14952                 DFT_DEP_SUFFIX=".dll.a"
14953                 ;;
14954         esac
14955 fi
14956 echo "$as_me:14956: result: $DFT_DEP_SUFFIX" >&5
14957 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14958
14959 echo "$as_me:14959: checking default object directory" >&5
14960 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14961
14962         case $DFT_LWR_MODEL in
14963         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
14964         normal)  DFT_OBJ_SUBDIR='objects' ;;
14965         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
14966         profile) DFT_OBJ_SUBDIR='obj_p' ;;
14967         shared)
14968                 case $cf_cv_system_name in #(vi
14969                 cygwin) #(vi
14970                         DFT_OBJ_SUBDIR='objects' ;;
14971                 *)
14972                         DFT_OBJ_SUBDIR='obj_s' ;;
14973                 esac
14974         esac
14975 echo "$as_me:14975: result: $DFT_OBJ_SUBDIR" >&5
14976 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14977
14978 # libtool thinks it can make c++ shared libraries (perhaps only g++)
14979 if test "$cf_with_cxx" = yes ; then
14980 echo "$as_me:14980: checking c++ library-dependency suffix" >&5
14981 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
14982 if test "$with_libtool" != "no"; then
14983         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
14984 else
14985
14986         case normal in
14987         libtool) CXX_LIB_SUFFIX='.la'  ;;
14988         normal)  CXX_LIB_SUFFIX='.a'   ;;
14989         debug)   CXX_LIB_SUFFIX='_g.a' ;;
14990         profile) CXX_LIB_SUFFIX='_p.a' ;;
14991         shared)
14992                 case $cf_cv_system_name in
14993                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
14994                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
14995                 hpux*)
14996                         case $target in
14997                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
14998                         *)      CXX_LIB_SUFFIX='.sl' ;;
14999                         esac
15000                         ;;
15001                 *)      CXX_LIB_SUFFIX='.so'  ;;
15002                 esac
15003         esac
15004         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15005 fi
15006 echo "$as_me:15006: result: $CXX_LIB_SUFFIX" >&5
15007 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15008
15009 fi
15010
15011 # do not want -ldl in build except as needed for -lncurses dependency
15012
15013 # remove dl library from $LIBS
15014 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15015
15016 ### Set up low-level terminfo dependencies for makefiles.
15017
15018 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15019 # do not need libdl
15020 TICS_LIST=
15021
15022 # remove dl library from $SHLIB_LIST
15023 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15024
15025 if test "$with_ticlib" != no ; then
15026
15027         if test "$with_ticlib" != yes ; then
15028                 TICS_NAME=$with_ticlib
15029                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15030                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15031                 TICS_LIB_SUFFIX="${with_ticlib}"
15032         else
15033                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15034                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15035                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15036         fi
15037         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15038 else
15039         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15040 fi
15041
15042 if test "$with_termlib" != no ; then
15043
15044         if test "$with_termlib" != yes ; then
15045                 TINFO_NAME=$with_termlib
15046                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15047                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15048                 TINFO_LIB_SUFFIX="${with_termlib}"
15049         else
15050                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15051                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15052                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15053         fi
15054
15055         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15056         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15057         if test "$DFT_LWR_MODEL" = "libtool"; then
15058                 TEST_ARGS="${TEST_DEPS}"
15059                 TEST_ARG2="${TEST_DEP2}"
15060                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15061         else
15062                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15063                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15064                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15065                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15066                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15067         fi
15068 else
15069         # the next lines are needed for linking libtic over libncurses
15070         TINFO_NAME=${LIB_NAME}${DFT_ARG_SUFFIX}
15071         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15072
15073         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15074 fi
15075
15076 # remove dl library from $TICS_LIST
15077 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15078
15079 # needed for Ada95
15080 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15081
15082 echo "$as_me:15082: checking where we will install curses.h" >&5
15083 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15084 test "$with_overwrite" = no && \
15085 test "x$includedir" = 'x${prefix}/include' && \
15086         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15087 echo "$as_me:15087: result: $includedir" >&5
15088 echo "${ECHO_T}$includedir" >&6
15089
15090 ### Resolve a conflict between normal and wide-curses by forcing applications
15091 ### that will need libutf8 to add it to their configure script.
15092 if test "$with_overwrite" != no ; then
15093 if test "$NCURSES_LIBUTF8" = 1 ; then
15094         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15095         { echo "$as_me:15095: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15096 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15097 fi
15098 fi
15099
15100 # used to separate tack out of the tree
15101 NCURSES_TREE=
15102
15103 ### predefined stuff for the test programs
15104 cat >>confdefs.h <<\EOF
15105 #define HAVE_SLK_COLOR 1
15106 EOF
15107
15108 ### Construct the list of subdirectories for which we'll customize makefiles
15109 ### with the appropriate compile-rules.
15110
15111 echo "$as_me:15111: checking for src modules" >&5
15112 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15113
15114 # dependencies and linker-arguments for test-programs
15115 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15116 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15117 if test "$DFT_LWR_MODEL" = "libtool"; then
15118         TEST_ARGS="${TEST_DEPS}"
15119         TEST_ARG2="${TEST_DEP2}"
15120 else
15121         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15122         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15123 fi
15124
15125 cf_cv_src_modules=
15126 for cf_dir in $modules_to_build
15127 do
15128         if test -f $srcdir/$cf_dir/modules; then
15129
15130                 # We may/may not have tack in the distribution, though the
15131                 # makefile is.
15132                 if test $cf_dir = tack ; then
15133                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15134                                 continue
15135                         fi
15136                 fi
15137
15138                 if test -z "$cf_cv_src_modules"; then
15139                         cf_cv_src_modules=$cf_dir
15140                 else
15141                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15142                 fi
15143
15144                 # Make the ncurses_cfg.h file record the library interface files as
15145                 # well.  These are header files that are the same name as their
15146                 # directory.  Ncurses is the only library that does not follow
15147                 # that pattern.
15148                 if test $cf_dir = tack ; then
15149                         continue
15150                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15151
15152 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15153
15154                         cat >>confdefs.h <<EOF
15155 #define HAVE_${cf_have_include}_H 1
15156 EOF
15157
15158                         cat >>confdefs.h <<EOF
15159 #define HAVE_LIB${cf_have_include} 1
15160 EOF
15161
15162                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15163                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15164                         if test "$DFT_LWR_MODEL" = "libtool"; then
15165                                 TEST_ARGS="${TEST_DEPS}"
15166                                 TEST_ARG2="${TEST_DEP2}"
15167                         else
15168                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15169                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15170                         fi
15171                 fi
15172         fi
15173 done
15174 echo "$as_me:15174: result: $cf_cv_src_modules" >&5
15175 echo "${ECHO_T}$cf_cv_src_modules" >&6
15176
15177 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15178 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15179
15180 SRC_SUBDIRS="man include"
15181 for cf_dir in $cf_cv_src_modules
15182 do
15183         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15184 done
15185 SRC_SUBDIRS="$SRC_SUBDIRS test"
15186 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15187 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15188
15189 ADA_SUBDIRS=
15190 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15191    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15192    ADA_SUBDIRS="gen src samples"
15193 fi
15194
15195 SUB_MAKEFILES=
15196 for cf_dir in $SRC_SUBDIRS
15197 do
15198         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15199 done
15200
15201 if test -n "$ADA_SUBDIRS"; then
15202    for cf_dir in $ADA_SUBDIRS
15203    do
15204       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15205    done
15206
15207 fi
15208
15209 DIRS_TO_MAKE="lib"
15210 for cf_item in $cf_list_models
15211 do
15212
15213         case $cf_item in
15214         libtool) cf_subdir='obj_lo'  ;;
15215         normal)  cf_subdir='objects' ;;
15216         debug)   cf_subdir='obj_g' ;;
15217         profile) cf_subdir='obj_p' ;;
15218         shared)
15219                 case $cf_cv_system_name in #(vi
15220                 cygwin) #(vi
15221                         cf_subdir='objects' ;;
15222                 *)
15223                         cf_subdir='obj_s' ;;
15224                 esac
15225         esac
15226
15227         for cf_item2 in $DIRS_TO_MAKE
15228         do
15229                 test $cf_item2 = $cf_subdir && break
15230         done
15231         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15232 done
15233 for cf_dir in $DIRS_TO_MAKE
15234 do
15235         test ! -d $cf_dir && mkdir $cf_dir
15236 done
15237
15238 cat >>confdefs.h <<EOF
15239 #define NCURSES_PATHSEP '$PATHSEP'
15240 EOF
15241
15242 cat >>confdefs.h <<EOF
15243 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15244 EOF
15245
15246 ### Now that we're done running tests, add the compiler-warnings, if any
15247
15248 cf_fix_cppflags=no
15249 cf_new_cflags=
15250 cf_new_cppflags=
15251 cf_new_extra_cppflags=
15252
15253 for cf_add_cflags in $EXTRA_CFLAGS
15254 do
15255 case $cf_fix_cppflags in
15256 no)
15257         case $cf_add_cflags in #(vi
15258         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15259                 case $cf_add_cflags in
15260                 -D*)
15261                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15262
15263                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15264                         && test -z "${cf_tst_cflags}" \
15265                         && cf_fix_cppflags=yes
15266
15267                         if test $cf_fix_cppflags = yes ; then
15268                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15269                                 continue
15270                         elif test "${cf_tst_cflags}" = "\"'" ; then
15271                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15272                                 continue
15273                         fi
15274                         ;;
15275                 esac
15276                 case "$CPPFLAGS" in
15277                 *$cf_add_cflags) #(vi
15278                         ;;
15279                 *) #(vi
15280                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15281                         ;;
15282                 esac
15283                 ;;
15284         *)
15285                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15286                 ;;
15287         esac
15288         ;;
15289 yes)
15290         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15291
15292         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15293
15294         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15295         && test -z "${cf_tst_cflags}" \
15296         && cf_fix_cppflags=no
15297         ;;
15298 esac
15299 done
15300
15301 if test -n "$cf_new_cflags" ; then
15302
15303         CFLAGS="$CFLAGS $cf_new_cflags"
15304 fi
15305
15306 if test -n "$cf_new_cppflags" ; then
15307
15308         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15309 fi
15310
15311 if test -n "$cf_new_extra_cppflags" ; then
15312
15313         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15314 fi
15315
15316 ### Define substitutions for header files to avoid name-pollution
15317
15318 if test "$cf_cv_have_tcgetattr" = yes ; then
15319         HAVE_TCGETATTR=1
15320 else
15321         HAVE_TCGETATTR=0
15322 fi
15323
15324 if test "$ac_cv_header_termio_h" = yes ; then
15325         HAVE_TERMIO_H=1
15326 else
15327         HAVE_TERMIO_H=0
15328 fi
15329
15330 if test "$ac_cv_header_termios_h" = yes ; then
15331         HAVE_TERMIOS_H=1
15332 else
15333         HAVE_TERMIOS_H=0
15334 fi
15335
15336 ################################################################################
15337 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15338 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15339 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"
15340 ac_config_commands="$ac_config_commands default"
15341 cat >confcache <<\_ACEOF
15342 # This file is a shell script that caches the results of configure
15343 # tests run on this system so they can be shared between configure
15344 # scripts and configure runs, see configure's option --config-cache.
15345 # It is not useful on other systems.  If it contains results you don't
15346 # want to keep, you may remove or edit it.
15347 #
15348 # config.status only pays attention to the cache file if you give it
15349 # the --recheck option to rerun configure.
15350 #
15351 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15352 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15353 # following values.
15354
15355 _ACEOF
15356
15357 # The following way of writing the cache mishandles newlines in values,
15358 # but we know of no workaround that is simple, portable, and efficient.
15359 # So, don't put newlines in cache variables' values.
15360 # Ultrix sh set writes to stderr and can't be redirected directly,
15361 # and sets the high bit in the cache file unless we assign to the vars.
15362 {
15363   (set) 2>&1 |
15364     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15365     *ac_space=\ *)
15366       # `set' does not quote correctly, so add quotes (double-quote
15367       # substitution turns \\\\ into \\, and sed turns \\ into \).
15368       sed -n \
15369         "s/'/'\\\\''/g;
15370           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15371       ;;
15372     *)
15373       # `set' quotes correctly as required by POSIX, so do not add quotes.
15374       sed -n \
15375         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15376       ;;
15377     esac;
15378 } |
15379   sed '
15380      t clear
15381      : clear
15382      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15383      t end
15384      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15385      : end' >>confcache
15386 if cmp -s $cache_file confcache; then :; else
15387   if test -w $cache_file; then
15388     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15389     cat confcache >$cache_file
15390   else
15391     echo "not updating unwritable cache $cache_file"
15392   fi
15393 fi
15394 rm -f confcache
15395
15396 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15397 # Let make expand exec_prefix.
15398 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15399
15400 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15401 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15402 # trailing colons and then remove the whole line if VPATH becomes empty
15403 # (actually we leave an empty line to preserve line numbers).
15404 if test "x$srcdir" = x.; then
15405   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15406 s/:*\$(srcdir):*/:/;
15407 s/:*\${srcdir}:*/:/;
15408 s/:*@srcdir@:*/:/;
15409 s/^\([^=]*=[    ]*\):*/\1/;
15410 s/:*$//;
15411 s/^[^=]*=[      ]*$//;
15412 }'
15413 fi
15414
15415 DEFS=-DHAVE_CONFIG_H
15416
15417 : ${CONFIG_STATUS=./config.status}
15418 ac_clean_files_save=$ac_clean_files
15419 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15420 { echo "$as_me:15420: creating $CONFIG_STATUS" >&5
15421 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15422 cat >$CONFIG_STATUS <<_ACEOF
15423 #! $SHELL
15424 # Generated automatically by configure.
15425 # Run this file to recreate the current configuration.
15426 # Compiler output produced by configure, useful for debugging
15427 # configure, is in config.log if it exists.
15428
15429 debug=false
15430 SHELL=\${CONFIG_SHELL-$SHELL}
15431 ac_cs_invocation="\$0 \$@"
15432
15433 _ACEOF
15434
15435 cat >>$CONFIG_STATUS <<\_ACEOF
15436 # Be Bourne compatible
15437 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15438   emulate sh
15439   NULLCMD=:
15440 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15441   set -o posix
15442 fi
15443
15444 # Name of the executable.
15445 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15446
15447 if expr a : '\(a\)' >/dev/null 2>&1; then
15448   as_expr=expr
15449 else
15450   as_expr=false
15451 fi
15452
15453 rm -f conf$$ conf$$.exe conf$$.file
15454 echo >conf$$.file
15455 if ln -s conf$$.file conf$$ 2>/dev/null; then
15456   # We could just check for DJGPP; but this test a) works b) is more generic
15457   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15458   if test -f conf$$.exe; then
15459     # Don't use ln at all; we don't have any links
15460     as_ln_s='cp -p'
15461   else
15462     as_ln_s='ln -s'
15463   fi
15464 elif ln conf$$.file conf$$ 2>/dev/null; then
15465   as_ln_s=ln
15466 else
15467   as_ln_s='cp -p'
15468 fi
15469 rm -f conf$$ conf$$.exe conf$$.file
15470
15471 as_executable_p="test -f"
15472
15473 # Support unset when possible.
15474 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15475   as_unset=unset
15476 else
15477   as_unset=false
15478 fi
15479
15480 # NLS nuisances.
15481 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15482 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15483 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15484 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15485 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15486 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15487 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15488 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15489
15490 # IFS
15491 # We need space, tab and new line, in precisely that order.
15492 as_nl='
15493 '
15494 IFS="   $as_nl"
15495
15496 # CDPATH.
15497 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15498
15499 exec 6>&1
15500
15501 _ACEOF
15502
15503 # Files that config.status was made for.
15504 if test -n "$ac_config_files"; then
15505   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15506 fi
15507
15508 if test -n "$ac_config_headers"; then
15509   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15510 fi
15511
15512 if test -n "$ac_config_links"; then
15513   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15514 fi
15515
15516 if test -n "$ac_config_commands"; then
15517   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15518 fi
15519
15520 cat >>$CONFIG_STATUS <<\EOF
15521
15522 ac_cs_usage="\
15523 \`$as_me' instantiates files from templates according to the
15524 current configuration.
15525
15526 Usage: $0 [OPTIONS] [FILE]...
15527
15528   -h, --help       print this help, then exit
15529   -V, --version    print version number, then exit
15530   -d, --debug      don't remove temporary files
15531       --recheck    update $as_me by reconfiguring in the same conditions
15532   --file=FILE[:TEMPLATE]
15533                    instantiate the configuration file FILE
15534   --header=FILE[:TEMPLATE]
15535                    instantiate the configuration header FILE
15536
15537 Configuration files:
15538 $config_files
15539
15540 Configuration headers:
15541 $config_headers
15542
15543 Configuration commands:
15544 $config_commands
15545
15546 Report bugs to <bug-autoconf@gnu.org>."
15547 EOF
15548
15549 cat >>$CONFIG_STATUS <<EOF
15550 ac_cs_version="\\
15551 config.status
15552 configured by $0, generated by GNU Autoconf 2.52.20061216,
15553   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15554
15555 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15556 Free Software Foundation, Inc.
15557 This config.status script is free software; the Free Software Foundation
15558 gives unlimited permission to copy, distribute and modify it."
15559 srcdir=$srcdir
15560 INSTALL="$INSTALL"
15561 EOF
15562
15563 cat >>$CONFIG_STATUS <<\EOF
15564 # If no file are specified by the user, then we need to provide default
15565 # value.  By we need to know if files were specified by the user.
15566 ac_need_defaults=:
15567 while test $# != 0
15568 do
15569   case $1 in
15570   --*=*)
15571     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15572     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15573     shift
15574     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15575     shift
15576     ;;
15577   -*);;
15578   *) # This is not an option, so the user has probably given explicit
15579      # arguments.
15580      ac_need_defaults=false;;
15581   esac
15582
15583   case $1 in
15584   # Handling of the options.
15585 EOF
15586 cat >>$CONFIG_STATUS <<EOF
15587   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15588     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15589     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15590 EOF
15591 cat >>$CONFIG_STATUS <<\EOF
15592   --version | --vers* | -V )
15593     echo "$ac_cs_version"; exit 0 ;;
15594   --he | --h)
15595     # Conflict between --help and --header
15596     { { echo "$as_me:15596: error: ambiguous option: $1
15597 Try \`$0 --help' for more information." >&5
15598 echo "$as_me: error: ambiguous option: $1
15599 Try \`$0 --help' for more information." >&2;}
15600    { (exit 1); exit 1; }; };;
15601   --help | --hel | -h )
15602     echo "$ac_cs_usage"; exit 0 ;;
15603   --debug | --d* | -d )
15604     debug=: ;;
15605   --file | --fil | --fi | --f )
15606     shift
15607     CONFIG_FILES="$CONFIG_FILES $1"
15608     ac_need_defaults=false;;
15609   --header | --heade | --head | --hea )
15610     shift
15611     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15612     ac_need_defaults=false;;
15613
15614   # This is an error.
15615   -*) { { echo "$as_me:15615: error: unrecognized option: $1
15616 Try \`$0 --help' for more information." >&5
15617 echo "$as_me: error: unrecognized option: $1
15618 Try \`$0 --help' for more information." >&2;}
15619    { (exit 1); exit 1; }; } ;;
15620
15621   *) ac_config_targets="$ac_config_targets $1" ;;
15622
15623   esac
15624   shift
15625 done
15626
15627 exec 5>>config.log
15628 cat >&5 << _ACEOF
15629
15630 ## ----------------------- ##
15631 ## Running config.status.  ##
15632 ## ----------------------- ##
15633
15634 This file was extended by $as_me 2.52.20061216, executed with
15635   CONFIG_FILES    = $CONFIG_FILES
15636   CONFIG_HEADERS  = $CONFIG_HEADERS
15637   CONFIG_LINKS    = $CONFIG_LINKS
15638   CONFIG_COMMANDS = $CONFIG_COMMANDS
15639   > $ac_cs_invocation
15640 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15641
15642 _ACEOF
15643 EOF
15644
15645 cat >>$CONFIG_STATUS <<EOF
15646 #
15647 # INIT-COMMANDS section.
15648 #
15649
15650 ### Special initialization commands, used to pass information from the
15651 ### configuration-run into config.status
15652
15653 AWK="$AWK"
15654 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15655 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15656 ECHO_LINK="$ECHO_LINK"
15657 LDCONFIG="$LDCONFIG"
15658 LIB_NAME="$LIB_NAME"
15659 LIB_SUBSETS="$LIB_SUBSETS"
15660 LIB_SUFFIX="$LIB_SUFFIX"
15661 LIB_TRACING="$LIB_TRACING"
15662 MAKE_TERMINFO="$MAKE_TERMINFO"
15663 NCURSES_MAJOR="$NCURSES_MAJOR"
15664 NCURSES_MINOR="$NCURSES_MINOR"
15665 NCURSES_OSPEED="$NCURSES_OSPEED"
15666 NCURSES_PATCH="$NCURSES_PATCH"
15667 SRC_SUBDIRS="$SRC_SUBDIRS"
15668 TERMINFO="$TERMINFO"
15669 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15670 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15671 TINFO_NAME="$TINFO_NAME"
15672 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
15673 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
15674 TICS_NAME="$TICS_NAME"
15675 WITH_CURSES_H="$with_curses_h"
15676 WITH_ECHO="$with_echo"
15677 WITH_OVERWRITE="$with_overwrite"
15678 cf_LIST_MODELS="$cf_list_models"
15679 cf_cv_abi_version="$cf_cv_abi_version"
15680 cf_cv_do_relink="$cf_cv_do_relink"
15681 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15682 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15683 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15684 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15685 cf_cv_rel_version="$cf_cv_rel_version"
15686 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15687 cf_cv_shlib_version="$cf_cv_shlib_version"
15688 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15689 cf_cv_system_name="$cf_cv_system_name"
15690 cf_with_cxx_binding="$cf_with_cxx_binding"
15691 host="$host"
15692 target="$target"
15693
15694 EOF
15695
15696 cat >>$CONFIG_STATUS <<\EOF
15697 for ac_config_target in $ac_config_targets
15698 do
15699   case "$ac_config_target" in
15700   # Handling of arguments.
15701   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15702   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15703   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15704   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15705   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15706   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15707   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15708   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15709   *) { { echo "$as_me:15709: error: invalid argument: $ac_config_target" >&5
15710 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15711    { (exit 1); exit 1; }; };;
15712   esac
15713 done
15714
15715 # If the user did not use the arguments to specify the items to instantiate,
15716 # then the envvar interface is used.  Set only those that are not.
15717 # We use the long form for the default assignment because of an extremely
15718 # bizarre bug on SunOS 4.1.3.
15719 if $ac_need_defaults; then
15720   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15721   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15722   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15723 fi
15724
15725 # Create a temporary directory, and hook for its removal unless debugging.
15726 $debug ||
15727 {
15728   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15729   trap '{ (exit 1); exit 1; }' 1 2 13 15
15730 }
15731
15732 # Create a (secure) tmp directory for tmp files.
15733 : ${TMPDIR=/tmp}
15734 {
15735   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15736   test -n "$tmp" && test -d "$tmp"
15737 }  ||
15738 {
15739   tmp=$TMPDIR/cs$$-$RANDOM
15740   (umask 077 && mkdir $tmp)
15741 } ||
15742 {
15743    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15744    { (exit 1); exit 1; }
15745 }
15746
15747 EOF
15748
15749 cat >>$CONFIG_STATUS <<EOF
15750
15751 #
15752 # CONFIG_FILES section.
15753 #
15754
15755 # No need to generate the scripts if there are no CONFIG_FILES.
15756 # This happens for instance when ./config.status config.h
15757 if test -n "\$CONFIG_FILES"; then
15758   # Protect against being on the right side of a sed subst in config.status.
15759   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15760    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15761 s,@SHELL@,$SHELL,;t t
15762 s,@exec_prefix@,$exec_prefix,;t t
15763 s,@prefix@,$prefix,;t t
15764 s,@program_transform_name@,$program_transform_name,;t t
15765 s,@bindir@,$bindir,;t t
15766 s,@sbindir@,$sbindir,;t t
15767 s,@libexecdir@,$libexecdir,;t t
15768 s,@datadir@,$datadir,;t t
15769 s,@sysconfdir@,$sysconfdir,;t t
15770 s,@sharedstatedir@,$sharedstatedir,;t t
15771 s,@localstatedir@,$localstatedir,;t t
15772 s,@libdir@,$libdir,;t t
15773 s,@includedir@,$includedir,;t t
15774 s,@oldincludedir@,$oldincludedir,;t t
15775 s,@infodir@,$infodir,;t t
15776 s,@mandir@,$mandir,;t t
15777 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15778 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15779 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15780 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15781 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15782 s,@build_alias@,$build_alias,;t t
15783 s,@host_alias@,$host_alias,;t t
15784 s,@target_alias@,$target_alias,;t t
15785 s,@ECHO_C@,$ECHO_C,;t t
15786 s,@ECHO_N@,$ECHO_N,;t t
15787 s,@ECHO_T@,$ECHO_T,;t t
15788 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15789 s,@DEFS@,$DEFS,;t t
15790 s,@LIBS@,$LIBS,;t t
15791 s,@top_builddir@,$top_builddir,;t t
15792 s,@EGREP@,$EGREP,;t t
15793 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15794 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15795 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15796 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15797 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15798 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15799 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15800 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15801 s,@build@,$build,;t t
15802 s,@build_cpu@,$build_cpu,;t t
15803 s,@build_vendor@,$build_vendor,;t t
15804 s,@build_os@,$build_os,;t t
15805 s,@host@,$host,;t t
15806 s,@host_cpu@,$host_cpu,;t t
15807 s,@host_vendor@,$host_vendor,;t t
15808 s,@host_os@,$host_os,;t t
15809 s,@target@,$target,;t t
15810 s,@target_cpu@,$target_cpu,;t t
15811 s,@target_vendor@,$target_vendor,;t t
15812 s,@target_os@,$target_os,;t t
15813 s,@CC@,$CC,;t t
15814 s,@CFLAGS@,$CFLAGS,;t t
15815 s,@LDFLAGS@,$LDFLAGS,;t t
15816 s,@CPPFLAGS@,$CPPFLAGS,;t t
15817 s,@ac_ct_CC@,$ac_ct_CC,;t t
15818 s,@EXEEXT@,$EXEEXT,;t t
15819 s,@OBJEXT@,$OBJEXT,;t t
15820 s,@CPP@,$CPP,;t t
15821 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15822 s,@PROG_EXT@,$PROG_EXT,;t t
15823 s,@LDCONFIG@,$LDCONFIG,;t t
15824 s,@CXX@,$CXX,;t t
15825 s,@CXXFLAGS@,$CXXFLAGS,;t t
15826 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15827 s,@AWK@,$AWK,;t t
15828 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15829 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15830 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15831 s,@LINT@,$LINT,;t t
15832 s,@LINT_OPTS@,$LINT_OPTS,;t t
15833 s,@LN_S@,$LN_S,;t t
15834 s,@SET_MAKE@,$SET_MAKE,;t t
15835 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15836 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15837 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15838 s,@RANLIB@,$RANLIB,;t t
15839 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15840 s,@LD@,$LD,;t t
15841 s,@ac_ct_LD@,$ac_ct_LD,;t t
15842 s,@AR@,$AR,;t t
15843 s,@ac_ct_AR@,$ac_ct_AR,;t t
15844 s,@AR_OPTS@,$AR_OPTS,;t t
15845 s,@DESTDIR@,$DESTDIR,;t t
15846 s,@BUILD_CC@,$BUILD_CC,;t t
15847 s,@BUILD_CPP@,$BUILD_CPP,;t t
15848 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15849 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15850 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15851 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15852 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15853 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15854 s,@cf_list_models@,$cf_list_models,;t t
15855 s,@LIBTOOL@,$LIBTOOL,;t t
15856 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15857 s,@LIB_CREATE@,$LIB_CREATE,;t t
15858 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15859 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15860 s,@LIB_PREP@,$LIB_PREP,;t t
15861 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15862 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15863 s,@LIB_LINK@,$LIB_LINK,;t t
15864 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15865 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15866 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15867 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15868 s,@TICS_NAME@,$TICS_NAME,;t t
15869 s,@TINFO_NAME@,$TINFO_NAME,;t t
15870 s,@LIB_NAME@,$LIB_NAME,;t t
15871 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15872 s,@CC_G_OPT@,$CC_G_OPT,;t t
15873 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
15874 s,@LD_MODEL@,$LD_MODEL,;t t
15875 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15876 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15877 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15878 s,@LINK_PROGS@,$LINK_PROGS,;t t
15879 s,@LINK_TESTS@,$LINK_TESTS,;t t
15880 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15881 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15882 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15883 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15884 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
15885 s,@PATHSEP@,$PATHSEP,;t t
15886 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
15887 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
15888 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
15889 s,@TERMINFO@,$TERMINFO,;t t
15890 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
15891 s,@TERMPATH@,$TERMPATH,;t t
15892 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15893 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
15894 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
15895 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
15896 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
15897 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
15898 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
15899 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
15900 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
15901 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
15902 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
15903 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
15904 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
15905 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
15906 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
15907 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15908 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15909 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
15910 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
15911 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
15912 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
15913 s,@ECHO_LINK@,$ECHO_LINK,;t t
15914 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15915 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
15916 s,@ADA_TRACE@,$ADA_TRACE,;t t
15917 s,@MATH_LIB@,$MATH_LIB,;t t
15918 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
15919 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
15920 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
15921 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
15922 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
15923 s,@CXXCPP@,$CXXCPP,;t t
15924 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
15925 s,@CXX_AR@,$CXX_AR,;t t
15926 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
15927 s,@CXXLIBS@,$CXXLIBS,;t t
15928 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
15929 s,@gnat_exists@,$gnat_exists,;t t
15930 s,@M4_exists@,$M4_exists,;t t
15931 s,@cf_ada_make@,$cf_ada_make,;t t
15932 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15933 s,@cf_ada_package@,$cf_ada_package,;t t
15934 s,@ADAFLAGS@,$ADAFLAGS,;t t
15935 s,@cf_compile_generics@,$cf_compile_generics,;t t
15936 s,@cf_generic_objects@,$cf_generic_objects,;t t
15937 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
15938 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15939 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15940 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15941 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15942 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15943 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15944 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
15945 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
15946 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
15947 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
15948 s,@TICS_ARGS@,$TICS_ARGS,;t t
15949 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
15950 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
15951 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
15952 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15953 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
15954 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
15955 s,@TICS_LIST@,$TICS_LIST,;t t
15956 s,@TINFO_LIST@,$TINFO_LIST,;t t
15957 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
15958 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15959 s,@TEST_ARGS@,$TEST_ARGS,;t t
15960 s,@TEST_DEPS@,$TEST_DEPS,;t t
15961 s,@TEST_ARG2@,$TEST_ARG2,;t t
15962 s,@TEST_DEP2@,$TEST_DEP2,;t t
15963 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15964 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
15965 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
15966 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
15967 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
15968 CEOF
15969
15970 EOF
15971
15972   cat >>$CONFIG_STATUS <<\EOF
15973   # Split the substitutions into bite-sized pieces for seds with
15974   # small command number limits, like on Digital OSF/1 and HP-UX.
15975   ac_max_sed_lines=48
15976   ac_sed_frag=1 # Number of current file.
15977   ac_beg=1 # First line for current file.
15978   ac_end=$ac_max_sed_lines # Line after last line for current file.
15979   ac_more_lines=:
15980   ac_sed_cmds=
15981   while $ac_more_lines; do
15982     if test $ac_beg -gt 1; then
15983       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15984     else
15985       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15986     fi
15987     if test ! -s $tmp/subs.frag; then
15988       ac_more_lines=false
15989     else
15990       # The purpose of the label and of the branching condition is to
15991       # speed up the sed processing (if there are no `@' at all, there
15992       # is no need to browse any of the substitutions).
15993       # These are the two extra sed commands mentioned above.
15994       (echo ':t
15995   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15996       if test -z "$ac_sed_cmds"; then
15997         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15998       else
15999         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16000       fi
16001       ac_sed_frag=`expr $ac_sed_frag + 1`
16002       ac_beg=$ac_end
16003       ac_end=`expr $ac_end + $ac_max_sed_lines`
16004     fi
16005   done
16006   if test -z "$ac_sed_cmds"; then
16007     ac_sed_cmds=cat
16008   fi
16009 fi # test -n "$CONFIG_FILES"
16010
16011 EOF
16012 cat >>$CONFIG_STATUS <<\EOF
16013 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16014   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16015   case $ac_file in
16016   - | *:- | *:-:* ) # input from stdin
16017         cat >$tmp/stdin
16018         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16019         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16020   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16021         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16022   * )   ac_file_in=$ac_file.in ;;
16023   esac
16024
16025   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16026   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16027          X"$ac_file" : 'X\(//\)[^/]' \| \
16028          X"$ac_file" : 'X\(//\)$' \| \
16029          X"$ac_file" : 'X\(/\)' \| \
16030          .     : '\(.\)' 2>/dev/null ||
16031 echo X"$ac_file" |
16032     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16033           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16034           /^X\(\/\/\)$/{ s//\1/; q; }
16035           /^X\(\/\).*/{ s//\1/; q; }
16036           s/.*/./; q'`
16037   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16038     { case "$ac_dir" in
16039   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16040   *)                      as_incr_dir=.;;
16041 esac
16042 as_dummy="$ac_dir"
16043 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16044   case $as_mkdir_dir in
16045     # Skip DOS drivespec
16046     ?:) as_incr_dir=$as_mkdir_dir ;;
16047     *)
16048       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16049       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16050     ;;
16051   esac
16052 done; }
16053
16054     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16055     # A "../" for each directory in $ac_dir_suffix.
16056     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16057   else
16058     ac_dir_suffix= ac_dots=
16059   fi
16060
16061   case $srcdir in
16062   .)  ac_srcdir=.
16063       if test -z "$ac_dots"; then
16064          ac_top_srcdir=.
16065       else
16066          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16067       fi ;;
16068   [\\/]* | ?:[\\/]* )
16069       ac_srcdir=$srcdir$ac_dir_suffix;
16070       ac_top_srcdir=$srcdir ;;
16071   *) # Relative path.
16072     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16073     ac_top_srcdir=$ac_dots$srcdir ;;
16074   esac
16075
16076   case $INSTALL in
16077   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16078   *) ac_INSTALL=$ac_dots$INSTALL ;;
16079   esac
16080
16081   if test x"$ac_file" != x-; then
16082     { echo "$as_me:16082: creating $ac_file" >&5
16083 echo "$as_me: creating $ac_file" >&6;}
16084     rm -f "$ac_file"
16085   fi
16086   # Let's still pretend it is `configure' which instantiates (i.e., don't
16087   # use $as_me), people would be surprised to read:
16088   #    /* config.h.  Generated automatically by config.status.  */
16089   configure_input="Generated automatically from `echo $ac_file_in |
16090                                                  sed 's,.*/,,'` by configure."
16091
16092   # First look for the input files in the build tree, otherwise in the
16093   # src tree.
16094   ac_file_inputs=`IFS=:
16095     for f in $ac_file_in; do
16096       case $f in
16097       -) echo $tmp/stdin ;;
16098       [\\/$]*)
16099          # Absolute (can't be DOS-style, as IFS=:)
16100          test -f "$f" || { { echo "$as_me:16100: error: cannot find input file: $f" >&5
16101 echo "$as_me: error: cannot find input file: $f" >&2;}
16102    { (exit 1); exit 1; }; }
16103          echo $f;;
16104       *) # Relative
16105          if test -f "$f"; then
16106            # Build tree
16107            echo $f
16108          elif test -f "$srcdir/$f"; then
16109            # Source tree
16110            echo $srcdir/$f
16111          else
16112            # /dev/null tree
16113            { { echo "$as_me:16113: error: cannot find input file: $f" >&5
16114 echo "$as_me: error: cannot find input file: $f" >&2;}
16115    { (exit 1); exit 1; }; }
16116          fi;;
16117       esac
16118     done` || { (exit 1); exit 1; }
16119 EOF
16120 cat >>$CONFIG_STATUS <<EOF
16121   sed "$ac_vpsub
16122 $extrasub
16123 EOF
16124 cat >>$CONFIG_STATUS <<\EOF
16125 :t
16126 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16127 s,@configure_input@,$configure_input,;t t
16128 s,@srcdir@,$ac_srcdir,;t t
16129 s,@top_srcdir@,$ac_top_srcdir,;t t
16130 s,@INSTALL@,$ac_INSTALL,;t t
16131 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16132   rm -f $tmp/stdin
16133   if test x"$ac_file" != x-; then
16134     mv $tmp/out $ac_file
16135   else
16136     cat $tmp/out
16137     rm -f $tmp/out
16138   fi
16139
16140 done
16141 EOF
16142 cat >>$CONFIG_STATUS <<\EOF
16143
16144 #
16145 # CONFIG_HEADER section.
16146 #
16147
16148 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16149 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16150 #
16151 # ac_d sets the value in "#define NAME VALUE" lines.
16152 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16153 ac_dB='[        ].*$,\1#\2'
16154 ac_dC=' '
16155 ac_dD=',;t'
16156 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16157 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16158 ac_iB='\([      ]\),\1#\2define\3'
16159 ac_iC=' '
16160 ac_iD='\4,;t'
16161 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16162 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16163 ac_uB='$,\1#\2define\3'
16164 ac_uC=' '
16165 ac_uD=',;t'
16166
16167 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16168   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16169   case $ac_file in
16170   - | *:- | *:-:* ) # input from stdin
16171         cat >$tmp/stdin
16172         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16173         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16174   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16175         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16176   * )   ac_file_in=$ac_file.in ;;
16177   esac
16178
16179   test x"$ac_file" != x- && { echo "$as_me:16179: creating $ac_file" >&5
16180 echo "$as_me: creating $ac_file" >&6;}
16181
16182   # First look for the input files in the build tree, otherwise in the
16183   # src tree.
16184   ac_file_inputs=`IFS=:
16185     for f in $ac_file_in; do
16186       case $f in
16187       -) echo $tmp/stdin ;;
16188       [\\/$]*)
16189          # Absolute (can't be DOS-style, as IFS=:)
16190          test -f "$f" || { { echo "$as_me:16190: error: cannot find input file: $f" >&5
16191 echo "$as_me: error: cannot find input file: $f" >&2;}
16192    { (exit 1); exit 1; }; }
16193          echo $f;;
16194       *) # Relative
16195          if test -f "$f"; then
16196            # Build tree
16197            echo $f
16198          elif test -f "$srcdir/$f"; then
16199            # Source tree
16200            echo $srcdir/$f
16201          else
16202            # /dev/null tree
16203            { { echo "$as_me:16203: error: cannot find input file: $f" >&5
16204 echo "$as_me: error: cannot find input file: $f" >&2;}
16205    { (exit 1); exit 1; }; }
16206          fi;;
16207       esac
16208     done` || { (exit 1); exit 1; }
16209   # Remove the trailing spaces.
16210   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16211
16212 EOF
16213
16214 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16215 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16216 # be either 'cat' or 'sort'.
16217 cat confdefs.h | uniq >conftest.vals
16218
16219 # Break up conftest.vals because some shells have a limit on
16220 # the size of here documents, and old seds have small limits too.
16221
16222 rm -f conftest.tail
16223 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16224 while grep . conftest.vals >/dev/null
16225 do
16226   # Write chunks of a limited-size here document to conftest.frag.
16227   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16228   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16229   echo 'CEOF' >> $CONFIG_STATUS
16230   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16231   rm -f conftest.vals
16232   mv conftest.tail conftest.vals
16233 done
16234 rm -f conftest.vals
16235
16236 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16237 # marker @DEFS@.
16238 echo '  cat >> conftest.edit <<CEOF
16239 /@DEFS@/r conftest.frag
16240 /@DEFS@/d
16241 CEOF
16242 sed -f conftest.edit $tmp/in > $tmp/out
16243 rm -f $tmp/in
16244 mv $tmp/out $tmp/in
16245 rm -f conftest.edit conftest.frag
16246 ' >> $CONFIG_STATUS
16247
16248 cat >>$CONFIG_STATUS <<\EOF
16249   # Let's still pretend it is `configure' which instantiates (i.e., don't
16250   # use $as_me), people would be surprised to read:
16251   #    /* config.h.  Generated automatically by config.status.  */
16252   if test x"$ac_file" = x-; then
16253     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16254   else
16255     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16256   fi
16257   cat $tmp/in >>$tmp/config.h
16258   rm -f $tmp/in
16259   if test x"$ac_file" != x-; then
16260     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16261       { echo "$as_me:16261: $ac_file is unchanged" >&5
16262 echo "$as_me: $ac_file is unchanged" >&6;}
16263     else
16264       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16265          X"$ac_file" : 'X\(//\)[^/]' \| \
16266          X"$ac_file" : 'X\(//\)$' \| \
16267          X"$ac_file" : 'X\(/\)' \| \
16268          .     : '\(.\)' 2>/dev/null ||
16269 echo X"$ac_file" |
16270     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16271           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16272           /^X\(\/\/\)$/{ s//\1/; q; }
16273           /^X\(\/\).*/{ s//\1/; q; }
16274           s/.*/./; q'`
16275       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16276         { case "$ac_dir" in
16277   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16278   *)                      as_incr_dir=.;;
16279 esac
16280 as_dummy="$ac_dir"
16281 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16282   case $as_mkdir_dir in
16283     # Skip DOS drivespec
16284     ?:) as_incr_dir=$as_mkdir_dir ;;
16285     *)
16286       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16287       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16288     ;;
16289   esac
16290 done; }
16291
16292       fi
16293       rm -f $ac_file
16294       mv $tmp/config.h $ac_file
16295     fi
16296   else
16297     cat $tmp/config.h
16298     rm -f $tmp/config.h
16299   fi
16300 done
16301 EOF
16302 cat >>$CONFIG_STATUS <<\EOF
16303
16304 #
16305 # CONFIG_COMMANDS section.
16306 #
16307 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16308   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16309   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16310
16311   case $ac_dest in
16312     default )
16313
16314 for cf_dir in test
16315 do
16316         if test ! -d $srcdir/$cf_dir; then
16317                 continue
16318         elif test -f $srcdir/$cf_dir/programs; then
16319                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16320         fi
16321 done
16322
16323         case $cf_cv_system_name in
16324         OS/2*)  LIB_PREFIX=''     ;;
16325         os2*)   LIB_PREFIX=''     ;;
16326         *)      LIB_PREFIX='lib'  ;;
16327         esac
16328 cf_prefix=$LIB_PREFIX
16329
16330 for cf_dir in $SRC_SUBDIRS
16331 do
16332         if test ! -d $srcdir/$cf_dir ; then
16333                 continue
16334         elif test -f $srcdir/$cf_dir/modules; then
16335
16336                 IMPORT_LIB=
16337                 SHARED_LIB=
16338                 LIBS_TO_MAKE=
16339                 for cf_item in $cf_LIST_MODELS
16340                 do
16341
16342         case $cf_item in
16343         libtool) cf_suffix='.la'  ;;
16344         normal)  cf_suffix='.a'   ;;
16345         debug)   cf_suffix='_g.a' ;;
16346         profile) cf_suffix='_p.a' ;;
16347         shared)
16348                 case $cf_cv_system_name in
16349                 cygwin*) cf_suffix='.dll' ;;
16350                 darwin*) cf_suffix='.dylib' ;;
16351                 hpux*)
16352                         case $target in
16353                         ia64*)  cf_suffix='.so' ;;
16354                         *)      cf_suffix='.sl' ;;
16355                         esac
16356                         ;;
16357                 *)      cf_suffix='.so'  ;;
16358                 esac
16359         esac
16360         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16361
16362                         if test $cf_item = shared ; then
16363                         if test "$cf_cv_do_symlinks" = yes ; then
16364                                 case "$cf_cv_shlib_version" in #(vi
16365                                 rel) #(vi
16366                                         case "$cf_cv_system_name" in #(vi
16367                                         darwin*)
16368                                         case .${LIB_SUFFIX} in
16369                                         .w*)
16370                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16371                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16372                                                 ;;
16373                                         *)
16374                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16375                                                 ;;
16376                                         esac
16377                                         ;; #(vi
16378                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16379                                         esac
16380                                         ;;
16381                                 abi)
16382                                         case "$cf_cv_system_name" in #(vi
16383                                         darwin*)
16384                                         case .${LIB_SUFFIX} in
16385                                         .w*)
16386                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16387                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16388                                                 ;;
16389                                         *)
16390                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16391                                                 ;;
16392                                         esac
16393                                         ;; #(vi
16394                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16395                                         esac
16396                                         ;;
16397                                 esac
16398                         fi
16399                         # cygwin needs import library, and has unique naming convention
16400                         # use autodetected ${cf_prefix} for import lib and static lib, but
16401                         # use 'cyg' prefix for shared lib.
16402                         if test $cf_cv_shlib_version = cygdll ; then
16403                                 SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
16404                                 IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
16405                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
16406                                 continue
16407                         fi
16408                         fi
16409                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16410                 done
16411
16412                 if test $cf_dir = ncurses ; then
16413                         cf_subsets="$LIB_SUBSETS"
16414                         cf_r_parts="$cf_subsets"
16415
16416                         while test -n "$cf_r_parts"
16417                         do
16418                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16419                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16420                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16421                                         case $cf_l_parts in #(vi
16422                                         *termlib*) #(vi
16423                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16424                                                 ;;
16425                                         *ticlib*)
16426                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16427                                                 ;;
16428                                         *)
16429                                                 break
16430                                                 ;;
16431                                         esac
16432                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16433                                 else
16434                                         break
16435                                 fi
16436                         done
16437                 else
16438                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16439                 fi
16440
16441                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16442                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
16443                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16444                         $cf_dir/Makefile >$cf_dir/Makefile.out
16445                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16446
16447                 $AWK -f $srcdir/mk-0th.awk \
16448                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16449                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16450
16451                 for cf_subset in $cf_subsets
16452                 do
16453                         cf_subdirs=
16454                         for cf_item in $cf_LIST_MODELS
16455                         do
16456                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16457
16458 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16459
16460         case $cf_item in
16461         libtool) cf_suffix='.la'  ;;
16462         normal)  cf_suffix='.a'   ;;
16463         debug)   cf_suffix='_g.a' ;;
16464         profile) cf_suffix='_p.a' ;;
16465         shared)
16466                 case $cf_cv_system_name in
16467                 cygwin*) cf_suffix='.dll' ;;
16468                 darwin*) cf_suffix='.dylib' ;;
16469                 hpux*)
16470                         case $target in
16471                         ia64*)  cf_suffix='.so' ;;
16472                         *)      cf_suffix='.sl' ;;
16473                         esac
16474                         ;;
16475                 *)      cf_suffix='.so'  ;;
16476                 esac
16477         esac
16478         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16479
16480         case $cf_item in
16481         libtool) cf_subdir='obj_lo'  ;;
16482         normal)  cf_subdir='objects' ;;
16483         debug)   cf_subdir='obj_g' ;;
16484         profile) cf_subdir='obj_p' ;;
16485         shared)
16486                 case $cf_cv_system_name in #(vi
16487                 cygwin) #(vi
16488                         cf_subdir='objects' ;;
16489                 *)
16490                         cf_subdir='obj_s' ;;
16491                 esac
16492         esac
16493
16494                         # Test for case where we build libtinfo with a different name.
16495                         cf_libname=$cf_dir
16496                         if test $cf_dir = ncurses ; then
16497                                 case $cf_subset in
16498                                 *base*)
16499                                         ;;
16500                                 *termlib*)
16501                                         cf_libname=$TINFO_LIB_SUFFIX
16502                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16503                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16504                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16505                                         fi
16506                                         ;;
16507                                 ticlib*)
16508                                         cf_libname=$TICS_LIB_SUFFIX
16509                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16510                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16511                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16512                                         fi
16513                                         ;;
16514                                 esac
16515                         fi
16516
16517                         # These dependencies really are for development, not
16518                         # builds, but they are useful in porting, too.
16519                         cf_depend="../include/ncurses_cfg.h"
16520                         if test "$srcdir" = "."; then
16521                                 cf_reldir="."
16522                         else
16523                                 cf_reldir="\${srcdir}"
16524                         fi
16525
16526                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16527                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16528                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16529                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16530                         fi
16531
16532                         cf_dir_suffix=
16533                         old_cf_suffix="$cf_suffix"
16534                         if test "$cf_cv_shlib_version_infix" = yes ; then
16535                         if test -n "$LIB_SUFFIX" ; then
16536                                 case $LIB_SUFFIX in
16537                                 w*)
16538                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16539                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16540                                         cf_dir_suffix=w
16541                                         ;;
16542                                 esac
16543                         fi
16544                         fi
16545
16546                         $AWK -f $srcdir/mk-1st.awk \
16547                                 name=${cf_libname}${cf_dir_suffix} \
16548                                 traces=$LIB_TRACING \
16549                                 MODEL=$cf_ITEM \
16550                                 model=$cf_subdir \
16551                                 prefix=$cf_prefix \
16552                                 suffix=$cf_suffix \
16553                                 subset=$cf_subset \
16554                                 TermlibRoot=$TINFO_NAME \
16555                                 ShlibVer=$cf_cv_shlib_version \
16556                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16557                                 ReLink=${cf_cv_do_relink-no} \
16558                                 DoLinks=$cf_cv_do_symlinks \
16559                                 rmSoLocs=$cf_cv_rm_so_locs \
16560                                 ldconfig="$LDCONFIG" \
16561                                 overwrite=$WITH_OVERWRITE \
16562                                 depend="$cf_depend" \
16563                                 host="$host" \
16564                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16565
16566                         cf_suffix="$old_cf_suffix"
16567
16568                         for cf_subdir2 in $cf_subdirs lib
16569                         do
16570                                 test $cf_subdir = $cf_subdir2 && break
16571                         done
16572                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16573                         $AWK -f $srcdir/mk-2nd.awk \
16574                                 name=$cf_dir \
16575                                 traces=$LIB_TRACING \
16576                                 MODEL=$cf_ITEM \
16577                                 model=$cf_subdir \
16578                                 subset=$cf_subset \
16579                                 srcdir=$srcdir \
16580                                 echo=$WITH_ECHO \
16581                                 crenames=$cf_cv_prog_CC_c_o \
16582                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16583                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16584                         cf_subdirs="$cf_subdirs $cf_subdir"
16585                         done
16586                 done
16587         fi
16588
16589         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16590 done
16591
16592 for cf_dir in $SRC_SUBDIRS
16593 do
16594         if test ! -d $srcdir/$cf_dir ; then
16595                 continue
16596         fi
16597
16598         if test -f $cf_dir/Makefile ; then
16599                 case "$cf_dir" in
16600                 Ada95) #(vi
16601                         echo 'libs \' >> Makefile
16602                         echo 'install.libs \' >> Makefile
16603                         echo 'uninstall.libs ::' >> Makefile
16604                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16605                         ;;
16606                 esac
16607         fi
16608
16609         if test -f $srcdir/$cf_dir/modules; then
16610                 echo >> Makefile
16611                 if test -f $srcdir/$cf_dir/headers; then
16612 cat >> Makefile <<CF_EOF
16613 install.includes \\
16614 uninstall.includes \\
16615 CF_EOF
16616                 fi
16617 if test "$cf_dir" != "c++" ; then
16618 echo 'lint \' >> Makefile
16619 fi
16620 cat >> Makefile <<CF_EOF
16621 libs \\
16622 lintlib \\
16623 install.libs \\
16624 uninstall.libs \\
16625 install.$cf_dir \\
16626 uninstall.$cf_dir ::
16627         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16628 CF_EOF
16629         elif test -f $srcdir/$cf_dir/headers; then
16630 cat >> Makefile <<CF_EOF
16631
16632 libs \\
16633 install.libs \\
16634 uninstall.libs \\
16635 install.includes \\
16636 uninstall.includes ::
16637         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16638 CF_EOF
16639 fi
16640 done
16641
16642 cat >> Makefile <<CF_EOF
16643
16644 install.libs uninstall.libs \\
16645 install.data uninstall.data ::
16646 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16647
16648 install.man \\
16649 uninstall.man ::
16650         cd man && \${MAKE} \${CF_MFLAGS} \$@
16651
16652 distclean ::
16653         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16654         rm -f headers.sh headers.sed
16655         rm -rf \${DIRS_TO_MAKE}
16656 CF_EOF
16657
16658 # Special case: tack's manpage lives in its own directory.
16659 if test -d tack ; then
16660 if test -f $srcdir/$tack.h; then
16661 cat >> Makefile <<CF_EOF
16662
16663 install.man \\
16664 uninstall.man ::
16665         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16666 CF_EOF
16667 fi
16668 fi
16669
16670 rm -f headers.sed headers.sh
16671
16672 echo creating headers.sh
16673 cat >headers.sh <<CF_EOF
16674 #! /bin/sh
16675 # This shell script is generated by the 'configure' script.  It is invoked in a
16676 # subdirectory of the build tree.  It generates a sed-script in the parent
16677 # directory that is used to adjust includes for header files that reside in a
16678 # subdirectory of /usr/include, etc.
16679 PRG=""
16680 while test \$# != 3
16681 do
16682 PRG="\$PRG \$1"; shift
16683 done
16684 DST=\$1
16685 REF=\$2
16686 SRC=\$3
16687 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16688 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16689 echo installing \$SRC in \$DST
16690 CF_EOF
16691
16692 if test $WITH_CURSES_H = yes; then
16693         cat >>headers.sh <<CF_EOF
16694 case \$DST in
16695 /*/include/*)
16696         END=\`basename \$DST\`
16697         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16698         do
16699                 NAME=\`basename \$i\`
16700                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16701         done
16702         ;;
16703 *)
16704         echo "" >> \$TMPSED
16705         ;;
16706 esac
16707 CF_EOF
16708
16709 else
16710         cat >>headers.sh <<CF_EOF
16711 case \$DST in
16712 /*/include/*)
16713         END=\`basename \$DST\`
16714         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16715         do
16716                 NAME=\`basename \$i\`
16717                 if test "\$NAME" = "curses.h"
16718                 then
16719                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16720                         NAME=ncurses.h
16721                 fi
16722                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16723         done
16724         ;;
16725 *)
16726         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16727         ;;
16728 esac
16729 CF_EOF
16730 fi
16731 cat >>headers.sh <<CF_EOF
16732 rm -f \$TMPSRC
16733 sed -f \$TMPSED \$SRC > \$TMPSRC
16734 NAME=\`basename \$SRC\`
16735 CF_EOF
16736 if test $WITH_CURSES_H != yes; then
16737         cat >>headers.sh <<CF_EOF
16738 test "\$NAME" = "curses.h" && NAME=ncurses.h
16739 CF_EOF
16740 fi
16741 cat >>headers.sh <<CF_EOF
16742 # Just in case someone gzip'd manpages, remove the conflicting copy.
16743 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16744
16745 eval \$PRG \$TMPSRC \$DST/\$NAME
16746 rm -f \$TMPSRC \$TMPSED
16747 CF_EOF
16748
16749 chmod 0755 headers.sh
16750
16751 for cf_dir in $SRC_SUBDIRS
16752 do
16753         if test ! -d $srcdir/$cf_dir ; then
16754                 continue
16755         fi
16756
16757         if test -f $srcdir/$cf_dir/headers; then
16758                 $AWK -f $srcdir/mk-hdr.awk \
16759                         subset="$LIB_SUBSETS" \
16760                         compat="$WITH_CURSES_H" \
16761                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
16762         fi
16763
16764         if test -f $srcdir/$cf_dir/modules; then
16765                 if test "$cf_dir" != "c++" ; then
16766                         cat >>$cf_dir/Makefile <<"CF_EOF"
16767 depend : ${AUTO_SRC}
16768         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16769
16770 # DO NOT DELETE THIS LINE -- make depend depends on it.
16771 CF_EOF
16772                 fi
16773         fi
16774 done
16775
16776  ;;
16777   esac
16778 done
16779 EOF
16780
16781 cat >>$CONFIG_STATUS <<\EOF
16782
16783 { (exit 0); exit 0; }
16784 EOF
16785 chmod +x $CONFIG_STATUS
16786 ac_clean_files=$ac_clean_files_save
16787
16788 # configure is writing to config.log, and then calls config.status.
16789 # config.status does its own redirection, appending to config.log.
16790 # Unfortunately, on DOS this fails, as config.log is still kept open
16791 # by configure, so config.status won't be able to write to it; its
16792 # output is simply discarded.  So we exec the FD to /dev/null,
16793 # effectively closing config.log, so it can be properly (re)opened and
16794 # appended to by config.status.  When coming back to configure, we
16795 # need to make the FD available again.
16796 if test "$no_create" != yes; then
16797   ac_cs_success=:
16798   exec 5>/dev/null
16799   $SHELL $CONFIG_STATUS || ac_cs_success=false
16800   exec 5>>config.log
16801   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16802   # would make configure fail if this is the last instruction.
16803   $ac_cs_success || { (exit 1); exit 1; }
16804 fi
16805 ${MAKE-make} preinstall