]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ec18b511abf96ed50e64c9090c97be41d602fd89
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.413 .
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-reentrant      compile with experimental reentrant code
778   --enable-safe-sprintf   compile with experimental safe-sprintf code
779   --disable-scroll-hints  compile without scroll-hints code
780   --enable-wgetch-events  compile with experimental wgetch-events code
781 Testing/development Options:
782   --enable-echo           build: display "compiling" commands (default)
783   --enable-warnings       build: turn on GCC compiler warnings
784   --enable-assertions     test: turn on generation of assertion code
785   --with-dmalloc          test: use Gray Watson's dmalloc library
786   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
787   --with-valgrind         test: use valgrind
788   --disable-leaks         test: free permanent memory, analyze leaks
789   --enable-expanded       test: generate functions for certain macros
790   --disable-macros        test: use functions rather than macros
791   --with-trace            test: add trace() function to all models of ncurses
792 Ada95 Binding Options:
793   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
794   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
795   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
796
797 Some influential environment variables:
798   CC          C compiler command
799   CFLAGS      C compiler flags
800   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
801               nonstandard directory <lib dir>
802   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
803               headers in a nonstandard directory <include dir>
804   CPP         C preprocessor
805   CXX         C++ compiler command
806   CXXFLAGS    C++ compiler flags
807   CXXCPP      C++ preprocessor
808
809 Use these variables to override the choices made by `configure' or to help
810 it to find libraries and programs with nonstandard names/locations.
811
812 EOF
813 fi
814
815 if test "$ac_init_help" = "recursive"; then
816   # If there are subdirs, report their specific --help.
817   ac_popdir=`pwd`
818   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
819     cd $ac_subdir
820     # A "../" for each directory in /$ac_subdir.
821     ac_dots=`echo $ac_subdir |
822              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
823
824     case $srcdir in
825     .) # No --srcdir option.  We are building in place.
826       ac_sub_srcdir=$srcdir ;;
827     [\\/]* | ?:[\\/]* ) # Absolute path.
828       ac_sub_srcdir=$srcdir/$ac_subdir ;;
829     *) # Relative path.
830       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
831     esac
832
833     # Check for guested configure; otherwise get Cygnus style configure.
834     if test -f $ac_sub_srcdir/configure.gnu; then
835       echo
836       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
837     elif test -f $ac_sub_srcdir/configure; then
838       echo
839       $SHELL $ac_sub_srcdir/configure  --help=recursive
840     elif test -f $ac_sub_srcdir/configure.ac ||
841            test -f $ac_sub_srcdir/configure.in; then
842       echo
843       $ac_configure --help
844     else
845       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
846     fi
847     cd $ac_popdir
848   done
849 fi
850
851 test -n "$ac_init_help" && exit 0
852 if $ac_init_version; then
853   cat <<\EOF
854
855 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
856 Free Software Foundation, Inc.
857 This configure script is free software; the Free Software Foundation
858 gives unlimited permission to copy, distribute and modify it.
859 EOF
860   exit 0
861 fi
862 exec 5>config.log
863 cat >&5 <<EOF
864 This file contains any messages produced by compilers while
865 running configure, to aid debugging if configure makes a mistake.
866
867 It was created by $as_me, which was
868 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
869
870   $ $0 $@
871
872 EOF
873 {
874 cat <<_ASUNAME
875 ## ---------- ##
876 ## Platform.  ##
877 ## ---------- ##
878
879 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
880 uname -m = `(uname -m) 2>/dev/null || echo unknown`
881 uname -r = `(uname -r) 2>/dev/null || echo unknown`
882 uname -s = `(uname -s) 2>/dev/null || echo unknown`
883 uname -v = `(uname -v) 2>/dev/null || echo unknown`
884
885 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
886 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
887
888 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
889 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
890 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
891 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
892 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
893 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
894 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
895
896 PATH = $PATH
897
898 _ASUNAME
899 } >&5
900
901 cat >&5 <<EOF
902 ## ------------ ##
903 ## Core tests.  ##
904 ## ------------ ##
905
906 EOF
907
908 # Keep a trace of the command line.
909 # Strip out --no-create and --no-recursion so they do not pile up.
910 # Also quote any args containing shell meta-characters.
911 ac_configure_args=
912 ac_sep=
913 for ac_arg
914 do
915   case $ac_arg in
916   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
917   | --no-cr | --no-c) ;;
918   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
919   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
920   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
921     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
922     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
923     ac_sep=" " ;;
924   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
925      ac_sep=" " ;;
926   esac
927   # Get rid of the leading space.
928 done
929
930 # When interrupted or exit'd, cleanup temporary files, and complete
931 # config.log.  We remove comments because anyway the quotes in there
932 # would cause problems or look ugly.
933 trap 'exit_status=$?
934   # Save into config.log some information that might help in debugging.
935   echo >&5
936   echo "## ----------------- ##" >&5
937   echo "## Cache variables.  ##" >&5
938   echo "## ----------------- ##" >&5
939   echo >&5
940   # The following way of writing the cache mishandles newlines in values,
941 {
942   (set) 2>&1 |
943     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
944     *ac_space=\ *)
945       sed -n \
946         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
947           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
948       ;;
949     *)
950       sed -n \
951         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
952       ;;
953     esac;
954 } >&5
955   sed "/^$/d" confdefs.h >conftest.log
956   if test -s conftest.log; then
957     echo >&5
958     echo "## ------------ ##" >&5
959     echo "## confdefs.h.  ##" >&5
960     echo "## ------------ ##" >&5
961     echo >&5
962     cat conftest.log >&5
963   fi
964   (echo; echo) >&5
965   test "$ac_signal" != 0 &&
966     echo "$as_me: caught signal $ac_signal" >&5
967   echo "$as_me: exit $exit_status" >&5
968   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
969     exit $exit_status
970      ' 0
971 for ac_signal in 1 2 13 15; do
972   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
973 done
974 ac_signal=0
975
976 # confdefs.h avoids OS command line length limits that DEFS can exceed.
977 rm -rf conftest* confdefs.h
978 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
979 echo >confdefs.h
980
981 # Let the site file select an alternate cache file if it wants to.
982 # Prefer explicitly selected file to automatically selected ones.
983 if test -z "$CONFIG_SITE"; then
984   if test "x$prefix" != xNONE; then
985     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
986   else
987     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
988   fi
989 fi
990 for ac_site_file in $CONFIG_SITE; do
991   if test -r "$ac_site_file"; then
992     { echo "$as_me:992: loading site script $ac_site_file" >&5
993 echo "$as_me: loading site script $ac_site_file" >&6;}
994     cat "$ac_site_file" >&5
995     . "$ac_site_file"
996   fi
997 done
998
999 if test -r "$cache_file"; then
1000   # Some versions of bash will fail to source /dev/null (special
1001   # files actually), so we avoid doing that.
1002   if test -f "$cache_file"; then
1003     { echo "$as_me:1003: loading cache $cache_file" >&5
1004 echo "$as_me: loading cache $cache_file" >&6;}
1005     case $cache_file in
1006       [\\/]* | ?:[\\/]* ) . $cache_file;;
1007       *)                      . ./$cache_file;;
1008     esac
1009   fi
1010 else
1011   { echo "$as_me:1011: creating cache $cache_file" >&5
1012 echo "$as_me: creating cache $cache_file" >&6;}
1013   >$cache_file
1014 fi
1015
1016 # Check that the precious variables saved in the cache have kept the same
1017 # value.
1018 ac_cache_corrupted=false
1019 for ac_var in `(set) 2>&1 |
1020                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1021   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1022   eval ac_new_set=\$ac_env_${ac_var}_set
1023   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1024   eval ac_new_val="\$ac_env_${ac_var}_value"
1025   case $ac_old_set,$ac_new_set in
1026     set,)
1027       { echo "$as_me:1027: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1028 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1029       ac_cache_corrupted=: ;;
1030     ,set)
1031       { echo "$as_me:1031: error: \`$ac_var' was not set in the previous run" >&5
1032 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1033       ac_cache_corrupted=: ;;
1034     ,);;
1035     *)
1036       if test "x$ac_old_val" != "x$ac_new_val"; then
1037         { echo "$as_me:1037: error: \`$ac_var' has changed since the previous run:" >&5
1038 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1039         { echo "$as_me:1039:   former value:  $ac_old_val" >&5
1040 echo "$as_me:   former value:  $ac_old_val" >&2;}
1041         { echo "$as_me:1041:   current value: $ac_new_val" >&5
1042 echo "$as_me:   current value: $ac_new_val" >&2;}
1043         ac_cache_corrupted=:
1044       fi;;
1045   esac
1046   # Pass precious variables to config.status.  It doesn't matter if
1047   # we pass some twice (in addition to the command line arguments).
1048   if test "$ac_new_set" = set; then
1049     case $ac_new_val in
1050     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1051       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1052       ac_configure_args="$ac_configure_args '$ac_arg'"
1053       ;;
1054     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1055        ;;
1056     esac
1057   fi
1058 done
1059 if $ac_cache_corrupted; then
1060   { echo "$as_me:1060: error: changes in the environment can compromise the build" >&5
1061 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1062   { { echo "$as_me:1062: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1063 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1064    { (exit 1); exit 1; }; }
1065 fi
1066
1067 ac_ext=c
1068 ac_cpp='$CPP $CPPFLAGS'
1069 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1070 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1071 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1072 ac_main_return=return
1073
1074 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1075   *c*,-n*) ECHO_N= ECHO_C='
1076 ' ECHO_T='      ' ;;
1077   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1078   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1079 esac
1080 echo "#! $SHELL" >conftest.sh
1081 echo  "exit 0"   >>conftest.sh
1082 chmod +x conftest.sh
1083 if { (echo "$as_me:1083: PATH=\".;.\"; conftest.sh") >&5
1084   (PATH=".;."; conftest.sh) 2>&5
1085   ac_status=$?
1086   echo "$as_me:1086: \$? = $ac_status" >&5
1087   (exit $ac_status); }; then
1088   ac_path_separator=';'
1089 else
1090   ac_path_separator=:
1091 fi
1092 PATH_SEPARATOR="$ac_path_separator"
1093 rm -f conftest.sh
1094
1095 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1096
1097 top_builddir=`pwd`
1098
1099 echo "$as_me:1099: checking for egrep" >&5
1100 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1101 if test "${ac_cv_prog_egrep+set}" = set; then
1102   echo $ECHO_N "(cached) $ECHO_C" >&6
1103 else
1104   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1105     then ac_cv_prog_egrep='grep -E'
1106     else ac_cv_prog_egrep='egrep'
1107     fi
1108 fi
1109 echo "$as_me:1109: result: $ac_cv_prog_egrep" >&5
1110 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1111  EGREP=$ac_cv_prog_egrep
1112
1113 test -z "$EGREP" && { { echo "$as_me:1113: error: No egrep program found" >&5
1114 echo "$as_me: error: No egrep program found" >&2;}
1115    { (exit 1); exit 1; }; }
1116
1117 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1118 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1119 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 cf_cv_abi_version=${NCURSES_MAJOR}
1121 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1122 cf_cv_timestamp=`date`
1123 echo "$as_me:1123: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1124 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1125
1126 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1127
1128 # Check whether --with-rel-version or --without-rel-version was given.
1129 if test "${with_rel_version+set}" = set; then
1130   withval="$with_rel_version"
1131   { echo "$as_me:1131: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1132 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1133  cf_cv_rel_version=$withval
1134 fi;
1135
1136  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1137  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1138
1139 if test -n "$NCURSES_MAJOR" ; then
1140   case $NCURSES_MAJOR in #(vi
1141   [0-9]*) #(vi
1142         ;;
1143   *)
1144         { { echo "$as_me:1144: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1145 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1146    { (exit 1); exit 1; }; }
1147         ;;
1148   esac
1149 else
1150   { { echo "$as_me:1150: error: Release major-version value is empty" >&5
1151 echo "$as_me: error: Release major-version value is empty" >&2;}
1152    { (exit 1); exit 1; }; }
1153 fi
1154
1155 if test -n "$NCURSES_MINOR" ; then
1156   case $NCURSES_MINOR in #(vi
1157   [0-9]*) #(vi
1158         ;;
1159   *)
1160         { { echo "$as_me:1160: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1161 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1162    { (exit 1); exit 1; }; }
1163         ;;
1164   esac
1165 else
1166   { { echo "$as_me:1166: error: Release minor-version value is empty" >&5
1167 echo "$as_me: error: Release minor-version value is empty" >&2;}
1168    { (exit 1); exit 1; }; }
1169 fi
1170
1171 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1172
1173 # Check whether --with-abi-version or --without-abi-version was given.
1174 if test "${with_abi_version+set}" = set; then
1175   withval="$with_abi_version"
1176   { echo "$as_me:1176: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1177 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1178  cf_cv_abi_version=$withval
1179 fi;
1180
1181 if test -n "$cf_cv_abi_version" ; then
1182   case $cf_cv_abi_version in #(vi
1183   [0-9]*) #(vi
1184         ;;
1185   *)
1186         { { echo "$as_me:1186: error: ABI version is not a number: $cf_cv_abi_version" >&5
1187 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1188    { (exit 1); exit 1; }; }
1189         ;;
1190   esac
1191 else
1192   { { echo "$as_me:1192: error: ABI version value is empty" >&5
1193 echo "$as_me: error: ABI version value is empty" >&2;}
1194    { (exit 1); exit 1; }; }
1195 fi
1196
1197 ac_aux_dir=
1198 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1199   if test -f $ac_dir/install-sh; then
1200     ac_aux_dir=$ac_dir
1201     ac_install_sh="$ac_aux_dir/install-sh -c"
1202     break
1203   elif test -f $ac_dir/install.sh; then
1204     ac_aux_dir=$ac_dir
1205     ac_install_sh="$ac_aux_dir/install.sh -c"
1206     break
1207   elif test -f $ac_dir/shtool; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/shtool install -c"
1210     break
1211   fi
1212 done
1213 if test -z "$ac_aux_dir"; then
1214   { { echo "$as_me:1214: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1215 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1216    { (exit 1); exit 1; }; }
1217 fi
1218 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1219 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1220 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1221
1222 # Make sure we can run config.sub.
1223 $ac_config_sub sun4 >/dev/null 2>&1 ||
1224   { { echo "$as_me:1224: error: cannot run $ac_config_sub" >&5
1225 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1226    { (exit 1); exit 1; }; }
1227
1228 echo "$as_me:1228: checking build system type" >&5
1229 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1230 if test "${ac_cv_build+set}" = set; then
1231   echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233   ac_cv_build_alias=$build_alias
1234 test -z "$ac_cv_build_alias" &&
1235   ac_cv_build_alias=`$ac_config_guess`
1236 test -z "$ac_cv_build_alias" &&
1237   { { echo "$as_me:1237: error: cannot guess build type; you must specify one" >&5
1238 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1239    { (exit 1); exit 1; }; }
1240 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1241   { { echo "$as_me:1241: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1242 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1243    { (exit 1); exit 1; }; }
1244
1245 fi
1246 echo "$as_me:1246: result: $ac_cv_build" >&5
1247 echo "${ECHO_T}$ac_cv_build" >&6
1248 build=$ac_cv_build
1249 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1250 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1251 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1252
1253 echo "$as_me:1253: checking host system type" >&5
1254 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1255 if test "${ac_cv_host+set}" = set; then
1256   echo $ECHO_N "(cached) $ECHO_C" >&6
1257 else
1258   ac_cv_host_alias=$host_alias
1259 test -z "$ac_cv_host_alias" &&
1260   ac_cv_host_alias=$ac_cv_build_alias
1261 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1262   { { echo "$as_me:1262: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1263 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1264    { (exit 1); exit 1; }; }
1265
1266 fi
1267 echo "$as_me:1267: result: $ac_cv_host" >&5
1268 echo "${ECHO_T}$ac_cv_host" >&6
1269 host=$ac_cv_host
1270 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1271 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1272 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1273
1274 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1275         echo "$as_me:1275: checking target system type" >&5
1276 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1277 if test "${ac_cv_target+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   ac_cv_target_alias=$target_alias
1281 test "x$ac_cv_target_alias" = "x" &&
1282   ac_cv_target_alias=$ac_cv_host_alias
1283 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1284   { { echo "$as_me:1284: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1285 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1286    { (exit 1); exit 1; }; }
1287
1288 fi
1289 echo "$as_me:1289: result: $ac_cv_target" >&5
1290 echo "${ECHO_T}$ac_cv_target" >&6
1291 target=$ac_cv_target
1292 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1293 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1294 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1295
1296 # The aliases save the names the user supplied, while $host etc.
1297 # will get canonicalized.
1298 test -n "$target_alias" &&
1299   test "$program_prefix$program_suffix$program_transform_name" = \
1300     NONENONEs,x,x, &&
1301   program_prefix=${target_alias}-
1302         system_name="$host_os"
1303 else
1304         system_name="`(uname -s -r) 2>/dev/null`"
1305         if test -z "$system_name" ; then
1306                 system_name="`(hostname) 2>/dev/null`"
1307         fi
1308 fi
1309 test -n "$system_name" && cat >>confdefs.h <<EOF
1310 #define SYSTEM_NAME "$system_name"
1311 EOF
1312
1313 if test "${cf_cv_system_name+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   cf_cv_system_name="$system_name"
1317 fi
1318
1319 test -z "$system_name" && system_name="$cf_cv_system_name"
1320 test -n "$cf_cv_system_name" && echo "$as_me:1320: result: Configuring for $cf_cv_system_name" >&5
1321 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1322
1323 if test ".$system_name" != ".$cf_cv_system_name" ; then
1324         echo "$as_me:1324: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1325 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1326         { { echo "$as_me:1326: error: \"Please remove config.cache and try again.\"" >&5
1327 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1328    { (exit 1); exit 1; }; }
1329 fi
1330
1331 # Check whether --with-system-type or --without-system-type was given.
1332 if test "${with_system_type+set}" = set; then
1333   withval="$with_system_type"
1334   { echo "$as_me:1334: WARNING: overriding system type to $withval" >&5
1335 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1336  cf_cv_system_name=$withval
1337 fi;
1338
1339 ###     Save the given $CFLAGS to allow user-override.
1340 cf_user_CFLAGS="$CFLAGS"
1341
1342 ###     Default install-location
1343
1344 echo "$as_me:1344: checking for prefix" >&5
1345 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1346 if test "x$prefix" = "xNONE" ; then
1347         case "$cf_cv_system_name" in
1348                 # non-vendor systems don't have a conflict
1349         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1350                 prefix=/usr
1351                 ;;
1352         *)      prefix=$ac_default_prefix
1353                 ;;
1354         esac
1355 fi
1356 echo "$as_me:1356: result: $prefix" >&5
1357 echo "${ECHO_T}$prefix" >&6
1358
1359 if test "x$prefix" = "xNONE" ; then
1360 echo "$as_me:1360: checking for default include-directory" >&5
1361 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1362 test -n "$verbose" && echo 1>&6
1363 for cf_symbol in \
1364         $includedir \
1365         $includedir/ncurses \
1366         $prefix/include \
1367         $prefix/include/ncurses \
1368         /usr/local/include \
1369         /usr/local/include/ncurses \
1370         /usr/include \
1371         /usr/include/ncurses
1372 do
1373         cf_dir=`eval echo $cf_symbol`
1374         if test -f $cf_dir/curses.h ; then
1375         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1376                 includedir="$cf_symbol"
1377                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1378                 break
1379         fi
1380         fi
1381         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1382 done
1383 echo "$as_me:1383: result: $includedir" >&5
1384 echo "${ECHO_T}$includedir" >&6
1385 fi
1386
1387 ###     Checks for programs.
1388 ac_ext=c
1389 ac_cpp='$CPP $CPPFLAGS'
1390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1393 ac_main_return=return
1394 if test -n "$ac_tool_prefix"; then
1395   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1396 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1397 echo "$as_me:1397: checking for $ac_word" >&5
1398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1399 if test "${ac_cv_prog_CC+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   if test -n "$CC"; then
1403   ac_cv_prog_CC="$CC" # Let the user override the test.
1404 else
1405   ac_save_IFS=$IFS; IFS=$ac_path_separator
1406 ac_dummy="$PATH"
1407 for ac_dir in $ac_dummy; do
1408   IFS=$ac_save_IFS
1409   test -z "$ac_dir" && ac_dir=.
1410   $as_executable_p "$ac_dir/$ac_word" || continue
1411 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1412 echo "$as_me:1412: found $ac_dir/$ac_word" >&5
1413 break
1414 done
1415
1416 fi
1417 fi
1418 CC=$ac_cv_prog_CC
1419 if test -n "$CC"; then
1420   echo "$as_me:1420: result: $CC" >&5
1421 echo "${ECHO_T}$CC" >&6
1422 else
1423   echo "$as_me:1423: result: no" >&5
1424 echo "${ECHO_T}no" >&6
1425 fi
1426
1427 fi
1428 if test -z "$ac_cv_prog_CC"; then
1429   ac_ct_CC=$CC
1430   # Extract the first word of "gcc", so it can be a program name with args.
1431 set dummy gcc; ac_word=$2
1432 echo "$as_me:1432: checking for $ac_word" >&5
1433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   if test -n "$ac_ct_CC"; then
1438   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1439 else
1440   ac_save_IFS=$IFS; IFS=$ac_path_separator
1441 ac_dummy="$PATH"
1442 for ac_dir in $ac_dummy; do
1443   IFS=$ac_save_IFS
1444   test -z "$ac_dir" && ac_dir=.
1445   $as_executable_p "$ac_dir/$ac_word" || continue
1446 ac_cv_prog_ac_ct_CC="gcc"
1447 echo "$as_me:1447: found $ac_dir/$ac_word" >&5
1448 break
1449 done
1450
1451 fi
1452 fi
1453 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1454 if test -n "$ac_ct_CC"; then
1455   echo "$as_me:1455: result: $ac_ct_CC" >&5
1456 echo "${ECHO_T}$ac_ct_CC" >&6
1457 else
1458   echo "$as_me:1458: result: no" >&5
1459 echo "${ECHO_T}no" >&6
1460 fi
1461
1462   CC=$ac_ct_CC
1463 else
1464   CC="$ac_cv_prog_CC"
1465 fi
1466
1467 if test -z "$CC"; then
1468   if test -n "$ac_tool_prefix"; then
1469   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1470 set dummy ${ac_tool_prefix}cc; ac_word=$2
1471 echo "$as_me:1471: checking for $ac_word" >&5
1472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1473 if test "${ac_cv_prog_CC+set}" = set; then
1474   echo $ECHO_N "(cached) $ECHO_C" >&6
1475 else
1476   if test -n "$CC"; then
1477   ac_cv_prog_CC="$CC" # Let the user override the test.
1478 else
1479   ac_save_IFS=$IFS; IFS=$ac_path_separator
1480 ac_dummy="$PATH"
1481 for ac_dir in $ac_dummy; do
1482   IFS=$ac_save_IFS
1483   test -z "$ac_dir" && ac_dir=.
1484   $as_executable_p "$ac_dir/$ac_word" || continue
1485 ac_cv_prog_CC="${ac_tool_prefix}cc"
1486 echo "$as_me:1486: found $ac_dir/$ac_word" >&5
1487 break
1488 done
1489
1490 fi
1491 fi
1492 CC=$ac_cv_prog_CC
1493 if test -n "$CC"; then
1494   echo "$as_me:1494: result: $CC" >&5
1495 echo "${ECHO_T}$CC" >&6
1496 else
1497   echo "$as_me:1497: result: no" >&5
1498 echo "${ECHO_T}no" >&6
1499 fi
1500
1501 fi
1502 if test -z "$ac_cv_prog_CC"; then
1503   ac_ct_CC=$CC
1504   # Extract the first word of "cc", so it can be a program name with args.
1505 set dummy cc; ac_word=$2
1506 echo "$as_me:1506: checking for $ac_word" >&5
1507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1508 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1509   echo $ECHO_N "(cached) $ECHO_C" >&6
1510 else
1511   if test -n "$ac_ct_CC"; then
1512   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1513 else
1514   ac_save_IFS=$IFS; IFS=$ac_path_separator
1515 ac_dummy="$PATH"
1516 for ac_dir in $ac_dummy; do
1517   IFS=$ac_save_IFS
1518   test -z "$ac_dir" && ac_dir=.
1519   $as_executable_p "$ac_dir/$ac_word" || continue
1520 ac_cv_prog_ac_ct_CC="cc"
1521 echo "$as_me:1521: found $ac_dir/$ac_word" >&5
1522 break
1523 done
1524
1525 fi
1526 fi
1527 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1528 if test -n "$ac_ct_CC"; then
1529   echo "$as_me:1529: result: $ac_ct_CC" >&5
1530 echo "${ECHO_T}$ac_ct_CC" >&6
1531 else
1532   echo "$as_me:1532: result: no" >&5
1533 echo "${ECHO_T}no" >&6
1534 fi
1535
1536   CC=$ac_ct_CC
1537 else
1538   CC="$ac_cv_prog_CC"
1539 fi
1540
1541 fi
1542 if test -z "$CC"; then
1543   # Extract the first word of "cc", so it can be a program name with args.
1544 set dummy cc; ac_word=$2
1545 echo "$as_me:1545: checking for $ac_word" >&5
1546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1547 if test "${ac_cv_prog_CC+set}" = set; then
1548   echo $ECHO_N "(cached) $ECHO_C" >&6
1549 else
1550   if test -n "$CC"; then
1551   ac_cv_prog_CC="$CC" # Let the user override the test.
1552 else
1553   ac_prog_rejected=no
1554   ac_save_IFS=$IFS; IFS=$ac_path_separator
1555 ac_dummy="$PATH"
1556 for ac_dir in $ac_dummy; do
1557   IFS=$ac_save_IFS
1558   test -z "$ac_dir" && ac_dir=.
1559   $as_executable_p "$ac_dir/$ac_word" || continue
1560 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1561   ac_prog_rejected=yes
1562   continue
1563 fi
1564 ac_cv_prog_CC="cc"
1565 echo "$as_me:1565: found $ac_dir/$ac_word" >&5
1566 break
1567 done
1568
1569 if test $ac_prog_rejected = yes; then
1570   # We found a bogon in the path, so make sure we never use it.
1571   set dummy $ac_cv_prog_CC
1572   shift
1573   if test $# != 0; then
1574     # We chose a different compiler from the bogus one.
1575     # However, it has the same basename, so the bogon will be chosen
1576     # first if we set CC to just the basename; use the full file name.
1577     shift
1578     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1579     shift
1580     ac_cv_prog_CC="$@"
1581   fi
1582 fi
1583 fi
1584 fi
1585 CC=$ac_cv_prog_CC
1586 if test -n "$CC"; then
1587   echo "$as_me:1587: result: $CC" >&5
1588 echo "${ECHO_T}$CC" >&6
1589 else
1590   echo "$as_me:1590: result: no" >&5
1591 echo "${ECHO_T}no" >&6
1592 fi
1593
1594 fi
1595 if test -z "$CC"; then
1596   if test -n "$ac_tool_prefix"; then
1597   for ac_prog in cl
1598   do
1599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1601 echo "$as_me:1601: checking for $ac_word" >&5
1602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1603 if test "${ac_cv_prog_CC+set}" = set; then
1604   echo $ECHO_N "(cached) $ECHO_C" >&6
1605 else
1606   if test -n "$CC"; then
1607   ac_cv_prog_CC="$CC" # Let the user override the test.
1608 else
1609   ac_save_IFS=$IFS; IFS=$ac_path_separator
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
1612   IFS=$ac_save_IFS
1613   test -z "$ac_dir" && ac_dir=.
1614   $as_executable_p "$ac_dir/$ac_word" || continue
1615 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1616 echo "$as_me:1616: found $ac_dir/$ac_word" >&5
1617 break
1618 done
1619
1620 fi
1621 fi
1622 CC=$ac_cv_prog_CC
1623 if test -n "$CC"; then
1624   echo "$as_me:1624: result: $CC" >&5
1625 echo "${ECHO_T}$CC" >&6
1626 else
1627   echo "$as_me:1627: result: no" >&5
1628 echo "${ECHO_T}no" >&6
1629 fi
1630
1631     test -n "$CC" && break
1632   done
1633 fi
1634 if test -z "$CC"; then
1635   ac_ct_CC=$CC
1636   for ac_prog in cl
1637 do
1638   # Extract the first word of "$ac_prog", so it can be a program name with args.
1639 set dummy $ac_prog; ac_word=$2
1640 echo "$as_me:1640: checking for $ac_word" >&5
1641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1642 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   if test -n "$ac_ct_CC"; then
1646   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1647 else
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   $as_executable_p "$ac_dir/$ac_word" || continue
1654 ac_cv_prog_ac_ct_CC="$ac_prog"
1655 echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656 break
1657 done
1658
1659 fi
1660 fi
1661 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1662 if test -n "$ac_ct_CC"; then
1663   echo "$as_me:1663: result: $ac_ct_CC" >&5
1664 echo "${ECHO_T}$ac_ct_CC" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$ac_ct_CC" && break
1671 done
1672
1673   CC=$ac_ct_CC
1674 fi
1675
1676 fi
1677
1678 test -z "$CC" && { { echo "$as_me:1678: error: no acceptable cc found in \$PATH" >&5
1679 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1680    { (exit 1); exit 1; }; }
1681
1682 # Provide some information about the compiler.
1683 echo "$as_me:1683:" \
1684      "checking for C compiler version" >&5
1685 ac_compiler=`set X $ac_compile; echo $2`
1686 { (eval echo "$as_me:1686: \"$ac_compiler --version </dev/null >&5\"") >&5
1687   (eval $ac_compiler --version </dev/null >&5) 2>&5
1688   ac_status=$?
1689   echo "$as_me:1689: \$? = $ac_status" >&5
1690   (exit $ac_status); }
1691 { (eval echo "$as_me:1691: \"$ac_compiler -v </dev/null >&5\"") >&5
1692   (eval $ac_compiler -v </dev/null >&5) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }
1696 { (eval echo "$as_me:1696: \"$ac_compiler -V </dev/null >&5\"") >&5
1697   (eval $ac_compiler -V </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701
1702 cat >conftest.$ac_ext <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1705
1706 int
1707 main ()
1708 {
1709
1710   ;
1711   return 0;
1712 }
1713 _ACEOF
1714 ac_clean_files_save=$ac_clean_files
1715 ac_clean_files="$ac_clean_files a.out a.exe"
1716 # Try to create an executable without -o first, disregard a.out.
1717 # It will help us diagnose broken compilers, and finding out an intuition
1718 # of exeext.
1719 echo "$as_me:1719: checking for C compiler default output" >&5
1720 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1721 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1722 if { (eval echo "$as_me:1722: \"$ac_link_default\"") >&5
1723   (eval $ac_link_default) 2>&5
1724   ac_status=$?
1725   echo "$as_me:1725: \$? = $ac_status" >&5
1726   (exit $ac_status); }; then
1727   # Find the output, starting from the most likely.  This scheme is
1728 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1729 # resort.
1730 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1731                 ls a.out conftest 2>/dev/null;
1732                 ls a.* conftest.* 2>/dev/null`; do
1733   case $ac_file in
1734     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1735     a.out ) # We found the default executable, but exeext='' is most
1736             # certainly right.
1737             break;;
1738     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1739           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1740           export ac_cv_exeext
1741           break;;
1742     * ) break;;
1743   esac
1744 done
1745 else
1746   echo "$as_me: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 { { echo "$as_me:1748: error: C compiler cannot create executables" >&5
1749 echo "$as_me: error: C compiler cannot create executables" >&2;}
1750    { (exit 77); exit 77; }; }
1751 fi
1752
1753 ac_exeext=$ac_cv_exeext
1754 echo "$as_me:1754: result: $ac_file" >&5
1755 echo "${ECHO_T}$ac_file" >&6
1756
1757 # Check the compiler produces executables we can run.  If not, either
1758 # the compiler is broken, or we cross compile.
1759 echo "$as_me:1759: checking whether the C compiler works" >&5
1760 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1761 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762 # If not cross compiling, check that we can run a simple program.
1763 if test "$cross_compiling" != yes; then
1764   if { ac_try='./$ac_file'
1765   { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766   (eval $ac_try) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); }; }; then
1770     cross_compiling=no
1771   else
1772     if test "$cross_compiling" = maybe; then
1773         cross_compiling=yes
1774     else
1775         { { echo "$as_me:1775: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&5
1777 echo "$as_me: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&2;}
1779    { (exit 1); exit 1; }; }
1780     fi
1781   fi
1782 fi
1783 echo "$as_me:1783: result: yes" >&5
1784 echo "${ECHO_T}yes" >&6
1785
1786 rm -f a.out a.exe conftest$ac_cv_exeext
1787 ac_clean_files=$ac_clean_files_save
1788 # Check the compiler produces executables we can run.  If not, either
1789 # the compiler is broken, or we cross compile.
1790 echo "$as_me:1790: checking whether we are cross compiling" >&5
1791 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1792 echo "$as_me:1792: result: $cross_compiling" >&5
1793 echo "${ECHO_T}$cross_compiling" >&6
1794
1795 echo "$as_me:1795: checking for executable suffix" >&5
1796 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1797 if { (eval echo "$as_me:1797: \"$ac_link\"") >&5
1798   (eval $ac_link) 2>&5
1799   ac_status=$?
1800   echo "$as_me:1800: \$? = $ac_status" >&5
1801   (exit $ac_status); }; then
1802   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1803 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1804 # work properly (i.e., refer to `conftest.exe'), while it won't with
1805 # `rm'.
1806 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1807   case $ac_file in
1808     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1809     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810           export ac_cv_exeext
1811           break;;
1812     * ) break;;
1813   esac
1814 done
1815 else
1816   { { echo "$as_me:1816: error: cannot compute EXEEXT: cannot compile and link" >&5
1817 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1818    { (exit 1); exit 1; }; }
1819 fi
1820
1821 rm -f conftest$ac_cv_exeext
1822 echo "$as_me:1822: result: $ac_cv_exeext" >&5
1823 echo "${ECHO_T}$ac_cv_exeext" >&6
1824
1825 rm -f conftest.$ac_ext
1826 EXEEXT=$ac_cv_exeext
1827 ac_exeext=$EXEEXT
1828 echo "$as_me:1828: checking for object suffix" >&5
1829 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1830 if test "${ac_cv_objext+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833   cat >conftest.$ac_ext <<_ACEOF
1834 #line 1834 "configure"
1835 #include "confdefs.h"
1836
1837 int
1838 main ()
1839 {
1840
1841   ;
1842   return 0;
1843 }
1844 _ACEOF
1845 rm -f conftest.o conftest.obj
1846 if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847   (eval $ac_compile) 2>&5
1848   ac_status=$?
1849   echo "$as_me:1849: \$? = $ac_status" >&5
1850   (exit $ac_status); }; then
1851   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1852   case $ac_file in
1853     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1854     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1855        break;;
1856   esac
1857 done
1858 else
1859   echo "$as_me: failed program was:" >&5
1860 cat conftest.$ac_ext >&5
1861 { { echo "$as_me:1861: error: cannot compute OBJEXT: cannot compile" >&5
1862 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1863    { (exit 1); exit 1; }; }
1864 fi
1865
1866 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1867 fi
1868 echo "$as_me:1868: result: $ac_cv_objext" >&5
1869 echo "${ECHO_T}$ac_cv_objext" >&6
1870 OBJEXT=$ac_cv_objext
1871 ac_objext=$OBJEXT
1872 echo "$as_me:1872: checking whether we are using the GNU C compiler" >&5
1873 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1874 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main ()
1883 {
1884 #ifndef __GNUC__
1885        choke me
1886 #endif
1887
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   ac_compiler_gnu=yes
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 ac_compiler_gnu=no
1909 fi
1910 rm -f conftest.$ac_objext conftest.$ac_ext
1911 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1912
1913 fi
1914 echo "$as_me:1914: result: $ac_cv_c_compiler_gnu" >&5
1915 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1916 GCC=`test $ac_compiler_gnu = yes && echo yes`
1917 ac_test_CFLAGS=${CFLAGS+set}
1918 ac_save_CFLAGS=$CFLAGS
1919 CFLAGS="-g"
1920 echo "$as_me:1920: checking whether $CC accepts -g" >&5
1921 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1922 if test "${ac_cv_prog_cc_g+set}" = set; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.$ac_ext <<_ACEOF
1926 #line 1926 "configure"
1927 #include "confdefs.h"
1928
1929 int
1930 main ()
1931 {
1932
1933   ;
1934   return 0;
1935 }
1936 _ACEOF
1937 rm -f conftest.$ac_objext
1938 if { (eval echo "$as_me:1938: \"$ac_compile\"") >&5
1939   (eval $ac_compile) 2>&5
1940   ac_status=$?
1941   echo "$as_me:1941: \$? = $ac_status" >&5
1942   (exit $ac_status); } &&
1943          { ac_try='test -s conftest.$ac_objext'
1944   { (eval echo "$as_me:1944: \"$ac_try\"") >&5
1945   (eval $ac_try) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); }; }; then
1949   ac_cv_prog_cc_g=yes
1950 else
1951   echo "$as_me: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 ac_cv_prog_cc_g=no
1954 fi
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 fi
1957 echo "$as_me:1957: result: $ac_cv_prog_cc_g" >&5
1958 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1959 if test "$ac_test_CFLAGS" = set; then
1960   CFLAGS=$ac_save_CFLAGS
1961 elif test $ac_cv_prog_cc_g = yes; then
1962   if test "$GCC" = yes; then
1963     CFLAGS="-g -O2"
1964   else
1965     CFLAGS="-g"
1966   fi
1967 else
1968   if test "$GCC" = yes; then
1969     CFLAGS="-O2"
1970   else
1971     CFLAGS=
1972   fi
1973 fi
1974 # Some people use a C++ compiler to compile C.  Since we use `exit',
1975 # in C++ we need to declare it.  In case someone uses the same compiler
1976 # for both compiling C and C++ we need to have the C++ compiler decide
1977 # the declaration of exit, since it's the most demanding environment.
1978 cat >conftest.$ac_ext <<_ACEOF
1979 #ifndef __cplusplus
1980   choke me
1981 #endif
1982 _ACEOF
1983 rm -f conftest.$ac_objext
1984 if { (eval echo "$as_me:1984: \"$ac_compile\"") >&5
1985   (eval $ac_compile) 2>&5
1986   ac_status=$?
1987   echo "$as_me:1987: \$? = $ac_status" >&5
1988   (exit $ac_status); } &&
1989          { ac_try='test -s conftest.$ac_objext'
1990   { (eval echo "$as_me:1990: \"$ac_try\"") >&5
1991   (eval $ac_try) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); }; }; then
1995   for ac_declaration in \
1996    ''\
1997    '#include <stdlib.h>' \
1998    'extern "C" void std::exit (int) throw (); using std::exit;' \
1999    'extern "C" void std::exit (int); using std::exit;' \
2000    'extern "C" void exit (int) throw ();' \
2001    'extern "C" void exit (int);' \
2002    'void exit (int);'
2003 do
2004   cat >conftest.$ac_ext <<_ACEOF
2005 #line 2005 "configure"
2006 #include "confdefs.h"
2007 #include <stdlib.h>
2008 $ac_declaration
2009 int
2010 main ()
2011 {
2012 exit (42);
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019   (eval $ac_compile) 2>&5
2020   ac_status=$?
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } &&
2023          { ac_try='test -s conftest.$ac_objext'
2024   { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2025   (eval $ac_try) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); }; }; then
2029   :
2030 else
2031   echo "$as_me: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 continue
2034 fi
2035 rm -f conftest.$ac_objext conftest.$ac_ext
2036   cat >conftest.$ac_ext <<_ACEOF
2037 #line 2037 "configure"
2038 #include "confdefs.h"
2039 $ac_declaration
2040 int
2041 main ()
2042 {
2043 exit (42);
2044   ;
2045   return 0;
2046 }
2047 _ACEOF
2048 rm -f conftest.$ac_objext
2049 if { (eval echo "$as_me:2049: \"$ac_compile\"") >&5
2050   (eval $ac_compile) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } &&
2054          { ac_try='test -s conftest.$ac_objext'
2055   { (eval echo "$as_me:2055: \"$ac_try\"") >&5
2056   (eval $ac_try) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); }; }; then
2060   break
2061 else
2062   echo "$as_me: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 fi
2065 rm -f conftest.$ac_objext conftest.$ac_ext
2066 done
2067 rm -f conftest*
2068 if test -n "$ac_declaration"; then
2069   echo '#ifdef __cplusplus' >>confdefs.h
2070   echo $ac_declaration      >>confdefs.h
2071   echo '#endif'             >>confdefs.h
2072 fi
2073
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 ac_ext=c
2080 ac_cpp='$CPP $CPPFLAGS'
2081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2084 ac_main_return=return
2085
2086 GCC_VERSION=none
2087 if test "$GCC" = yes ; then
2088         echo "$as_me:2088: checking version of $CC" >&5
2089 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2090         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2091         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2092         echo "$as_me:2092: result: $GCC_VERSION" >&5
2093 echo "${ECHO_T}$GCC_VERSION" >&6
2094 fi
2095
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102 echo "$as_me:2102: checking how to run the C preprocessor" >&5
2103 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2104 # On Suns, sometimes $CPP names a directory.
2105 if test -n "$CPP" && test -d "$CPP"; then
2106   CPP=
2107 fi
2108 if test -z "$CPP"; then
2109   if test "${ac_cv_prog_CPP+set}" = set; then
2110   echo $ECHO_N "(cached) $ECHO_C" >&6
2111 else
2112       # Double quotes because CPP needs to be expanded
2113     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2114     do
2115       ac_preproc_ok=false
2116 for ac_c_preproc_warn_flag in '' yes
2117 do
2118   # Use a header file that comes with gcc, so configuring glibc
2119   # with a fresh cross-compiler works.
2120   # On the NeXT, cc -E runs the code through the compiler's parser,
2121   # not just through cpp. "Syntax error" is here to catch this case.
2122   cat >conftest.$ac_ext <<_ACEOF
2123 #line 2123 "configure"
2124 #include "confdefs.h"
2125 #include <assert.h>
2126                      Syntax error
2127 _ACEOF
2128 if { (eval echo "$as_me:2128: \"$ac_cpp conftest.$ac_ext\"") >&5
2129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2130   ac_status=$?
2131   egrep -v '^ *\+' conftest.er1 >conftest.err
2132   rm -f conftest.er1
2133   cat conftest.err >&5
2134   echo "$as_me:2134: \$? = $ac_status" >&5
2135   (exit $ac_status); } >/dev/null; then
2136   if test -s conftest.err; then
2137     ac_cpp_err=$ac_c_preproc_warn_flag
2138   else
2139     ac_cpp_err=
2140   fi
2141 else
2142   ac_cpp_err=yes
2143 fi
2144 if test -z "$ac_cpp_err"; then
2145   :
2146 else
2147   echo "$as_me: failed program was:" >&5
2148   cat conftest.$ac_ext >&5
2149   # Broken: fails on valid input.
2150 continue
2151 fi
2152 rm -f conftest.err conftest.$ac_ext
2153
2154   # OK, works on sane cases.  Now check whether non-existent headers
2155   # can be detected and how.
2156   cat >conftest.$ac_ext <<_ACEOF
2157 #line 2157 "configure"
2158 #include "confdefs.h"
2159 #include <ac_nonexistent.h>
2160 _ACEOF
2161 if { (eval echo "$as_me:2161: \"$ac_cpp conftest.$ac_ext\"") >&5
2162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2163   ac_status=$?
2164   egrep -v '^ *\+' conftest.er1 >conftest.err
2165   rm -f conftest.er1
2166   cat conftest.err >&5
2167   echo "$as_me:2167: \$? = $ac_status" >&5
2168   (exit $ac_status); } >/dev/null; then
2169   if test -s conftest.err; then
2170     ac_cpp_err=$ac_c_preproc_warn_flag
2171   else
2172     ac_cpp_err=
2173   fi
2174 else
2175   ac_cpp_err=yes
2176 fi
2177 if test -z "$ac_cpp_err"; then
2178   # Broken: success on invalid input.
2179 continue
2180 else
2181   echo "$as_me: failed program was:" >&5
2182   cat conftest.$ac_ext >&5
2183   # Passes both tests.
2184 ac_preproc_ok=:
2185 break
2186 fi
2187 rm -f conftest.err conftest.$ac_ext
2188
2189 done
2190 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2191 rm -f conftest.err conftest.$ac_ext
2192 if $ac_preproc_ok; then
2193   break
2194 fi
2195
2196     done
2197     ac_cv_prog_CPP=$CPP
2198
2199 fi
2200   CPP=$ac_cv_prog_CPP
2201 else
2202   ac_cv_prog_CPP=$CPP
2203 fi
2204 echo "$as_me:2204: result: $CPP" >&5
2205 echo "${ECHO_T}$CPP" >&6
2206 ac_preproc_ok=false
2207 for ac_c_preproc_warn_flag in '' yes
2208 do
2209   # Use a header file that comes with gcc, so configuring glibc
2210   # with a fresh cross-compiler works.
2211   # On the NeXT, cc -E runs the code through the compiler's parser,
2212   # not just through cpp. "Syntax error" is here to catch this case.
2213   cat >conftest.$ac_ext <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 #include <assert.h>
2217                      Syntax error
2218 _ACEOF
2219 if { (eval echo "$as_me:2219: \"$ac_cpp conftest.$ac_ext\"") >&5
2220   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2221   ac_status=$?
2222   egrep -v '^ *\+' conftest.er1 >conftest.err
2223   rm -f conftest.er1
2224   cat conftest.err >&5
2225   echo "$as_me:2225: \$? = $ac_status" >&5
2226   (exit $ac_status); } >/dev/null; then
2227   if test -s conftest.err; then
2228     ac_cpp_err=$ac_c_preproc_warn_flag
2229   else
2230     ac_cpp_err=
2231   fi
2232 else
2233   ac_cpp_err=yes
2234 fi
2235 if test -z "$ac_cpp_err"; then
2236   :
2237 else
2238   echo "$as_me: failed program was:" >&5
2239   cat conftest.$ac_ext >&5
2240   # Broken: fails on valid input.
2241 continue
2242 fi
2243 rm -f conftest.err conftest.$ac_ext
2244
2245   # OK, works on sane cases.  Now check whether non-existent headers
2246   # can be detected and how.
2247   cat >conftest.$ac_ext <<_ACEOF
2248 #line 2248 "configure"
2249 #include "confdefs.h"
2250 #include <ac_nonexistent.h>
2251 _ACEOF
2252 if { (eval echo "$as_me:2252: \"$ac_cpp conftest.$ac_ext\"") >&5
2253   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2254   ac_status=$?
2255   egrep -v '^ *\+' conftest.er1 >conftest.err
2256   rm -f conftest.er1
2257   cat conftest.err >&5
2258   echo "$as_me:2258: \$? = $ac_status" >&5
2259   (exit $ac_status); } >/dev/null; then
2260   if test -s conftest.err; then
2261     ac_cpp_err=$ac_c_preproc_warn_flag
2262   else
2263     ac_cpp_err=
2264   fi
2265 else
2266   ac_cpp_err=yes
2267 fi
2268 if test -z "$ac_cpp_err"; then
2269   # Broken: success on invalid input.
2270 continue
2271 else
2272   echo "$as_me: failed program was:" >&5
2273   cat conftest.$ac_ext >&5
2274   # Passes both tests.
2275 ac_preproc_ok=:
2276 break
2277 fi
2278 rm -f conftest.err conftest.$ac_ext
2279
2280 done
2281 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2282 rm -f conftest.err conftest.$ac_ext
2283 if $ac_preproc_ok; then
2284   :
2285 else
2286   { { echo "$as_me:2286: error: C preprocessor \"$CPP\" fails sanity check" >&5
2287 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2288    { (exit 1); exit 1; }; }
2289 fi
2290
2291 ac_ext=c
2292 ac_cpp='$CPP $CPPFLAGS'
2293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296 ac_main_return=return
2297
2298 if test $ac_cv_c_compiler_gnu = yes; then
2299     echo "$as_me:2299: checking whether $CC needs -traditional" >&5
2300 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2301 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2302   echo $ECHO_N "(cached) $ECHO_C" >&6
2303 else
2304     ac_pattern="Autoconf.*'x'"
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <sgtty.h>
2309 int Autoconf = TIOCGETP;
2310 _ACEOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312   egrep "$ac_pattern" >/dev/null 2>&1; then
2313   ac_cv_prog_gcc_traditional=yes
2314 else
2315   ac_cv_prog_gcc_traditional=no
2316 fi
2317 rm -f conftest*
2318
2319   if test $ac_cv_prog_gcc_traditional = no; then
2320     cat >conftest.$ac_ext <<_ACEOF
2321 #line 2321 "configure"
2322 #include "confdefs.h"
2323 #include <termio.h>
2324 int Autoconf = TCGETA;
2325 _ACEOF
2326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2327   egrep "$ac_pattern" >/dev/null 2>&1; then
2328   ac_cv_prog_gcc_traditional=yes
2329 fi
2330 rm -f conftest*
2331
2332   fi
2333 fi
2334 echo "$as_me:2334: result: $ac_cv_prog_gcc_traditional" >&5
2335 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2336   if test $ac_cv_prog_gcc_traditional = yes; then
2337     CC="$CC -traditional"
2338   fi
2339 fi
2340
2341 echo "$as_me:2341: checking whether $CC understands -c and -o together" >&5
2342 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2343 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346
2347 cat > conftest.$ac_ext <<CF_EOF
2348 #include <stdio.h>
2349 int main()
2350 {
2351         ${cf_cv_main_return:-return}(0);
2352 }
2353 CF_EOF
2354 # We do the test twice because some compilers refuse to overwrite an
2355 # existing .o file with -o, though they will create one.
2356 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2357 if { (eval echo "$as_me:2357: \"$ac_try\"") >&5
2358   (eval $ac_try) 2>&5
2359   ac_status=$?
2360   echo "$as_me:2360: \$? = $ac_status" >&5
2361   (exit $ac_status); } &&
2362   test -f conftest2.$ac_objext && { (eval echo "$as_me:2362: \"$ac_try\"") >&5
2363   (eval $ac_try) 2>&5
2364   ac_status=$?
2365   echo "$as_me:2365: \$? = $ac_status" >&5
2366   (exit $ac_status); };
2367 then
2368   eval cf_cv_prog_CC_c_o=yes
2369 else
2370   eval cf_cv_prog_CC_c_o=no
2371 fi
2372 rm -f conftest*
2373
2374 fi
2375 if test $cf_cv_prog_CC_c_o = yes; then
2376   echo "$as_me:2376: result: yes" >&5
2377 echo "${ECHO_T}yes" >&6
2378 else
2379   echo "$as_me:2379: result: no" >&5
2380 echo "${ECHO_T}no" >&6
2381 fi
2382
2383 echo "$as_me:2383: checking for POSIXized ISC" >&5
2384 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2385 if test -d /etc/conf/kconfig.d &&
2386    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2387 then
2388   echo "$as_me:2388: result: yes" >&5
2389 echo "${ECHO_T}yes" >&6
2390   ISC=yes # If later tests want to check for ISC.
2391
2392 cat >>confdefs.h <<\EOF
2393 #define _POSIX_SOURCE 1
2394 EOF
2395
2396   if test "$GCC" = yes; then
2397     CC="$CC -posix"
2398   else
2399     CC="$CC -Xp"
2400   fi
2401 else
2402   echo "$as_me:2402: result: no" >&5
2403 echo "${ECHO_T}no" >&6
2404   ISC=
2405 fi
2406
2407 echo "$as_me:2407: checking for ${CC-cc} option to accept ANSI C" >&5
2408 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2409 if test "${cf_cv_ansi_cc+set}" = set; then
2410   echo $ECHO_N "(cached) $ECHO_C" >&6
2411 else
2412
2413 cf_cv_ansi_cc=no
2414 cf_save_CFLAGS="$CFLAGS"
2415 cf_save_CPPFLAGS="$CPPFLAGS"
2416 # Don't try gcc -ansi; that turns off useful extensions and
2417 # breaks some systems' header files.
2418 # AIX                   -qlanglvl=ansi
2419 # Ultrix and OSF/1      -std1
2420 # HP-UX                 -Aa -D_HPUX_SOURCE
2421 # SVR4                  -Xc
2422 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2423 for cf_arg in "-DCC_HAS_PROTOS" \
2424         "" \
2425         -qlanglvl=ansi \
2426         -std1 \
2427         -Ae \
2428         "-Aa -D_HPUX_SOURCE" \
2429         -Xc
2430 do
2431
2432 cf_fix_cppflags=no
2433 cf_new_cflags=
2434 cf_new_cppflags=
2435 cf_new_extra_cppflags=
2436
2437 for cf_add_cflags in $cf_arg
2438 do
2439 case $cf_fix_cppflags in
2440 no)
2441         case $cf_add_cflags in #(vi
2442         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2443                 case $cf_add_cflags in
2444                 -D*)
2445                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2446
2447                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2448                         && test -z "${cf_tst_cflags}" \
2449                         && cf_fix_cppflags=yes
2450
2451                         if test $cf_fix_cppflags = yes ; then
2452                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2453                                 continue
2454                         elif test "${cf_tst_cflags}" = "\"'" ; then
2455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2456                                 continue
2457                         fi
2458                         ;;
2459                 esac
2460                 case "$CPPFLAGS" in
2461                 *$cf_add_cflags) #(vi
2462                         ;;
2463                 *) #(vi
2464                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2465                         ;;
2466                 esac
2467                 ;;
2468         *)
2469                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2470                 ;;
2471         esac
2472         ;;
2473 yes)
2474         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2475
2476         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2477
2478         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2479         && test -z "${cf_tst_cflags}" \
2480         && cf_fix_cppflags=no
2481         ;;
2482 esac
2483 done
2484
2485 if test -n "$cf_new_cflags" ; then
2486
2487         CFLAGS="$CFLAGS $cf_new_cflags"
2488 fi
2489
2490 if test -n "$cf_new_cppflags" ; then
2491
2492         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2493 fi
2494
2495 if test -n "$cf_new_extra_cppflags" ; then
2496
2497         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2498 fi
2499
2500         cat >conftest.$ac_ext <<_ACEOF
2501 #line 2501 "configure"
2502 #include "confdefs.h"
2503
2504 #ifndef CC_HAS_PROTOS
2505 #if !defined(__STDC__) || (__STDC__ != 1)
2506 choke me
2507 #endif
2508 #endif
2509
2510 int
2511 main ()
2512 {
2513
2514         int test (int i, double x);
2515         struct s1 {int (*f) (int a);};
2516         struct s2 {int (*f) (double a);};
2517   ;
2518   return 0;
2519 }
2520 _ACEOF
2521 rm -f conftest.$ac_objext
2522 if { (eval echo "$as_me:2522: \"$ac_compile\"") >&5
2523   (eval $ac_compile) 2>&5
2524   ac_status=$?
2525   echo "$as_me:2525: \$? = $ac_status" >&5
2526   (exit $ac_status); } &&
2527          { ac_try='test -s conftest.$ac_objext'
2528   { (eval echo "$as_me:2528: \"$ac_try\"") >&5
2529   (eval $ac_try) 2>&5
2530   ac_status=$?
2531   echo "$as_me:2531: \$? = $ac_status" >&5
2532   (exit $ac_status); }; }; then
2533   cf_cv_ansi_cc="$cf_arg"; break
2534 else
2535   echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 fi
2538 rm -f conftest.$ac_objext conftest.$ac_ext
2539 done
2540 CFLAGS="$cf_save_CFLAGS"
2541 CPPFLAGS="$cf_save_CPPFLAGS"
2542
2543 fi
2544 echo "$as_me:2544: result: $cf_cv_ansi_cc" >&5
2545 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2546
2547 if test "$cf_cv_ansi_cc" != "no"; then
2548 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2549
2550 cf_fix_cppflags=no
2551 cf_new_cflags=
2552 cf_new_cppflags=
2553 cf_new_extra_cppflags=
2554
2555 for cf_add_cflags in $cf_cv_ansi_cc
2556 do
2557 case $cf_fix_cppflags in
2558 no)
2559         case $cf_add_cflags in #(vi
2560         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2561                 case $cf_add_cflags in
2562                 -D*)
2563                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2564
2565                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2566                         && test -z "${cf_tst_cflags}" \
2567                         && cf_fix_cppflags=yes
2568
2569                         if test $cf_fix_cppflags = yes ; then
2570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2571                                 continue
2572                         elif test "${cf_tst_cflags}" = "\"'" ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         fi
2576                         ;;
2577                 esac
2578                 case "$CPPFLAGS" in
2579                 *$cf_add_cflags) #(vi
2580                         ;;
2581                 *) #(vi
2582                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2583                         ;;
2584                 esac
2585                 ;;
2586         *)
2587                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2588                 ;;
2589         esac
2590         ;;
2591 yes)
2592         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2593
2594         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2595
2596         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2597         && test -z "${cf_tst_cflags}" \
2598         && cf_fix_cppflags=no
2599         ;;
2600 esac
2601 done
2602
2603 if test -n "$cf_new_cflags" ; then
2604
2605         CFLAGS="$CFLAGS $cf_new_cflags"
2606 fi
2607
2608 if test -n "$cf_new_cppflags" ; then
2609
2610         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2611 fi
2612
2613 if test -n "$cf_new_extra_cppflags" ; then
2614
2615         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2616 fi
2617
2618 else
2619         cat >>confdefs.h <<\EOF
2620 #define CC_HAS_PROTOS 1
2621 EOF
2622
2623 fi
2624 fi
2625
2626 if test "$cf_cv_ansi_cc" = "no"; then
2627         { { echo "$as_me:2627: error: Your compiler does not appear to recognize prototypes.
2628 You have the following choices:
2629         a. adjust your compiler options
2630         b. get an up-to-date compiler
2631         c. use a wrapper such as unproto" >&5
2632 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2633 You have the following choices:
2634         a. adjust your compiler options
2635         b. get an up-to-date compiler
2636         c. use a wrapper such as unproto" >&2;}
2637    { (exit 1); exit 1; }; }
2638 fi
2639
2640 case $cf_cv_system_name in
2641 os2*)
2642     CFLAGS="$CFLAGS -Zmt"
2643     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2644     CXXFLAGS="$CXXFLAGS -Zmt"
2645     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2646     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2647     ac_cv_exeext=.exe
2648     ;;
2649 esac
2650
2651 PROG_EXT="$EXEEXT"
2652
2653 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2654 #define PROG_EXT "$PROG_EXT"
2655 EOF
2656
2657 if test "$cross_compiling" = yes ; then
2658   LDCONFIG=:
2659 else
2660 case "$cf_cv_system_name" in #(vi
2661 freebsd*) #(vi
2662   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2663   ;;
2664 *) LDPATH=$PATH:/sbin:/usr/sbin
2665   # Extract the first word of "ldconfig", so it can be a program name with args.
2666 set dummy ldconfig; ac_word=$2
2667 echo "$as_me:2667: checking for $ac_word" >&5
2668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2669 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672   case $LDCONFIG in
2673   [\\/]* | ?:[\\/]*)
2674   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2675   ;;
2676   *)
2677   ac_save_IFS=$IFS; IFS=$ac_path_separator
2678 ac_dummy="$LDPATH"
2679 for ac_dir in $ac_dummy; do
2680   IFS=$ac_save_IFS
2681   test -z "$ac_dir" && ac_dir=.
2682   if $as_executable_p "$ac_dir/$ac_word"; then
2683    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2684    echo "$as_me:2684: found $ac_dir/$ac_word" >&5
2685    break
2686 fi
2687 done
2688
2689   ;;
2690 esac
2691 fi
2692 LDCONFIG=$ac_cv_path_LDCONFIG
2693
2694 if test -n "$LDCONFIG"; then
2695   echo "$as_me:2695: result: $LDCONFIG" >&5
2696 echo "${ECHO_T}$LDCONFIG" >&6
2697 else
2698   echo "$as_me:2698: result: no" >&5
2699 echo "${ECHO_T}no" >&6
2700 fi
2701
2702   ;;
2703 esac
2704 fi
2705
2706 echo "$as_me:2706: checking if you want to ensure bool is consistent with C++" >&5
2707 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2708
2709 # Check whether --with-cxx or --without-cxx was given.
2710 if test "${with_cxx+set}" = set; then
2711   withval="$with_cxx"
2712   cf_with_cxx=$withval
2713 else
2714   cf_with_cxx=yes
2715 fi;
2716 echo "$as_me:2716: result: $cf_with_cxx" >&5
2717 echo "${ECHO_T}$cf_with_cxx" >&6
2718 if test "X$cf_with_cxx" = Xno ; then
2719         CXX=""
2720         GXX=""
2721 else
2722         # with autoconf 2.13, we can change the error to a warning:
2723                 ac_ext=cc
2724 ac_cpp='$CXXCPP $CPPFLAGS'
2725 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2726 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2727 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2728 ac_main_return=return
2729 if test -n "$ac_tool_prefix"; then
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731   do
2732     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$CXX"; then
2740   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 CXX=$ac_cv_prog_CXX
2756 if test -n "$CXX"; then
2757   echo "$as_me:2757: result: $CXX" >&5
2758 echo "${ECHO_T}$CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764     test -n "$CXX" && break
2765   done
2766 fi
2767 if test -z "$CXX"; then
2768   ac_ct_CXX=$CXX
2769   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2770 do
2771   # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2776   echo $ECHO_N "(cached) $ECHO_C" >&6
2777 else
2778   if test -n "$ac_ct_CXX"; then
2779   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2780 else
2781   ac_save_IFS=$IFS; IFS=$ac_path_separator
2782 ac_dummy="$PATH"
2783 for ac_dir in $ac_dummy; do
2784   IFS=$ac_save_IFS
2785   test -z "$ac_dir" && ac_dir=.
2786   $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_ac_ct_CXX="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2789 break
2790 done
2791
2792 fi
2793 fi
2794 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2795 if test -n "$ac_ct_CXX"; then
2796   echo "$as_me:2796: result: $ac_ct_CXX" >&5
2797 echo "${ECHO_T}$ac_ct_CXX" >&6
2798 else
2799   echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2801 fi
2802
2803   test -n "$ac_ct_CXX" && break
2804 done
2805 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2806
2807   CXX=$ac_ct_CXX
2808 fi
2809
2810 # Provide some information about the compiler.
2811 echo "$as_me:2811:" \
2812      "checking for C++ compiler version" >&5
2813 ac_compiler=`set X $ac_compile; echo $2`
2814 { (eval echo "$as_me:2814: \"$ac_compiler --version </dev/null >&5\"") >&5
2815   (eval $ac_compiler --version </dev/null >&5) 2>&5
2816   ac_status=$?
2817   echo "$as_me:2817: \$? = $ac_status" >&5
2818   (exit $ac_status); }
2819 { (eval echo "$as_me:2819: \"$ac_compiler -v </dev/null >&5\"") >&5
2820   (eval $ac_compiler -v </dev/null >&5) 2>&5
2821   ac_status=$?
2822   echo "$as_me:2822: \$? = $ac_status" >&5
2823   (exit $ac_status); }
2824 { (eval echo "$as_me:2824: \"$ac_compiler -V </dev/null >&5\"") >&5
2825   (eval $ac_compiler -V </dev/null >&5) 2>&5
2826   ac_status=$?
2827   echo "$as_me:2827: \$? = $ac_status" >&5
2828   (exit $ac_status); }
2829
2830 echo "$as_me:2830: checking whether we are using the GNU C++ compiler" >&5
2831 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2832 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2833   echo $ECHO_N "(cached) $ECHO_C" >&6
2834 else
2835   cat >conftest.$ac_ext <<_ACEOF
2836 #line 2836 "configure"
2837 #include "confdefs.h"
2838
2839 int
2840 main ()
2841 {
2842 #ifndef __GNUC__
2843        choke me
2844 #endif
2845
2846   ;
2847   return 0;
2848 }
2849 _ACEOF
2850 rm -f conftest.$ac_objext
2851 if { (eval echo "$as_me:2851: \"$ac_compile\"") >&5
2852   (eval $ac_compile) 2>&5
2853   ac_status=$?
2854   echo "$as_me:2854: \$? = $ac_status" >&5
2855   (exit $ac_status); } &&
2856          { ac_try='test -s conftest.$ac_objext'
2857   { (eval echo "$as_me:2857: \"$ac_try\"") >&5
2858   (eval $ac_try) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }; }; then
2862   ac_compiler_gnu=yes
2863 else
2864   echo "$as_me: failed program was:" >&5
2865 cat conftest.$ac_ext >&5
2866 ac_compiler_gnu=no
2867 fi
2868 rm -f conftest.$ac_objext conftest.$ac_ext
2869 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2870
2871 fi
2872 echo "$as_me:2872: result: $ac_cv_cxx_compiler_gnu" >&5
2873 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2874 GXX=`test $ac_compiler_gnu = yes && echo yes`
2875 ac_test_CXXFLAGS=${CXXFLAGS+set}
2876 ac_save_CXXFLAGS=$CXXFLAGS
2877 CXXFLAGS="-g"
2878 echo "$as_me:2878: checking whether $CXX accepts -g" >&5
2879 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2880 if test "${ac_cv_prog_cxx_g+set}" = set; then
2881   echo $ECHO_N "(cached) $ECHO_C" >&6
2882 else
2883   cat >conftest.$ac_ext <<_ACEOF
2884 #line 2884 "configure"
2885 #include "confdefs.h"
2886
2887 int
2888 main ()
2889 {
2890
2891   ;
2892   return 0;
2893 }
2894 _ACEOF
2895 rm -f conftest.$ac_objext
2896 if { (eval echo "$as_me:2896: \"$ac_compile\"") >&5
2897   (eval $ac_compile) 2>&5
2898   ac_status=$?
2899   echo "$as_me:2899: \$? = $ac_status" >&5
2900   (exit $ac_status); } &&
2901          { ac_try='test -s conftest.$ac_objext'
2902   { (eval echo "$as_me:2902: \"$ac_try\"") >&5
2903   (eval $ac_try) 2>&5
2904   ac_status=$?
2905   echo "$as_me:2905: \$? = $ac_status" >&5
2906   (exit $ac_status); }; }; then
2907   ac_cv_prog_cxx_g=yes
2908 else
2909   echo "$as_me: failed program was:" >&5
2910 cat conftest.$ac_ext >&5
2911 ac_cv_prog_cxx_g=no
2912 fi
2913 rm -f conftest.$ac_objext conftest.$ac_ext
2914 fi
2915 echo "$as_me:2915: result: $ac_cv_prog_cxx_g" >&5
2916 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2917 if test "$ac_test_CXXFLAGS" = set; then
2918   CXXFLAGS=$ac_save_CXXFLAGS
2919 elif test $ac_cv_prog_cxx_g = yes; then
2920   if test "$GXX" = yes; then
2921     CXXFLAGS="-g -O2"
2922   else
2923     CXXFLAGS="-g"
2924   fi
2925 else
2926   if test "$GXX" = yes; then
2927     CXXFLAGS="-O2"
2928   else
2929     CXXFLAGS=
2930   fi
2931 fi
2932 for ac_declaration in \
2933    ''\
2934    '#include <stdlib.h>' \
2935    'extern "C" void std::exit (int) throw (); using std::exit;' \
2936    'extern "C" void std::exit (int); using std::exit;' \
2937    'extern "C" void exit (int) throw ();' \
2938    'extern "C" void exit (int);' \
2939    'void exit (int);'
2940 do
2941   cat >conftest.$ac_ext <<_ACEOF
2942 #line 2942 "configure"
2943 #include "confdefs.h"
2944 #include <stdlib.h>
2945 $ac_declaration
2946 int
2947 main ()
2948 {
2949 exit (42);
2950   ;
2951   return 0;
2952 }
2953 _ACEOF
2954 rm -f conftest.$ac_objext
2955 if { (eval echo "$as_me:2955: \"$ac_compile\"") >&5
2956   (eval $ac_compile) 2>&5
2957   ac_status=$?
2958   echo "$as_me:2958: \$? = $ac_status" >&5
2959   (exit $ac_status); } &&
2960          { ac_try='test -s conftest.$ac_objext'
2961   { (eval echo "$as_me:2961: \"$ac_try\"") >&5
2962   (eval $ac_try) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); }; }; then
2966   :
2967 else
2968   echo "$as_me: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
2970 continue
2971 fi
2972 rm -f conftest.$ac_objext conftest.$ac_ext
2973   cat >conftest.$ac_ext <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 $ac_declaration
2977 int
2978 main ()
2979 {
2980 exit (42);
2981   ;
2982   return 0;
2983 }
2984 _ACEOF
2985 rm -f conftest.$ac_objext
2986 if { (eval echo "$as_me:2986: \"$ac_compile\"") >&5
2987   (eval $ac_compile) 2>&5
2988   ac_status=$?
2989   echo "$as_me:2989: \$? = $ac_status" >&5
2990   (exit $ac_status); } &&
2991          { ac_try='test -s conftest.$ac_objext'
2992   { (eval echo "$as_me:2992: \"$ac_try\"") >&5
2993   (eval $ac_try) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); }; }; then
2997   break
2998 else
2999   echo "$as_me: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3001 fi
3002 rm -f conftest.$ac_objext conftest.$ac_ext
3003 done
3004 rm -f conftest*
3005 if test -n "$ac_declaration"; then
3006   echo '#ifdef __cplusplus' >>confdefs.h
3007   echo $ac_declaration      >>confdefs.h
3008   echo '#endif'             >>confdefs.h
3009 fi
3010
3011 ac_ext=c
3012 ac_cpp='$CPP $CPPFLAGS'
3013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3016 ac_main_return=return
3017
3018                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3019         if test "$CXX" = "g++" ; then
3020                 # Extract the first word of "g++", so it can be a program name with args.
3021 set dummy g++; ac_word=$2
3022 echo "$as_me:3022: checking for $ac_word" >&5
3023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3024 if test "${ac_cv_path_CXX+set}" = set; then
3025   echo $ECHO_N "(cached) $ECHO_C" >&6
3026 else
3027   case $CXX in
3028   [\\/]* | ?:[\\/]*)
3029   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3030   ;;
3031   *)
3032   ac_save_IFS=$IFS; IFS=$ac_path_separator
3033 ac_dummy="$PATH"
3034 for ac_dir in $ac_dummy; do
3035   IFS=$ac_save_IFS
3036   test -z "$ac_dir" && ac_dir=.
3037   if $as_executable_p "$ac_dir/$ac_word"; then
3038    ac_cv_path_CXX="$ac_dir/$ac_word"
3039    echo "$as_me:3039: found $ac_dir/$ac_word" >&5
3040    break
3041 fi
3042 done
3043
3044   ;;
3045 esac
3046 fi
3047 CXX=$ac_cv_path_CXX
3048
3049 if test -n "$CXX"; then
3050   echo "$as_me:3050: result: $CXX" >&5
3051 echo "${ECHO_T}$CXX" >&6
3052 else
3053   echo "$as_me:3053: result: no" >&5
3054 echo "${ECHO_T}no" >&6
3055 fi
3056
3057         fi
3058         if test "$CXX" = "g++" ; then
3059                 { echo "$as_me:3059: WARNING: ignoring hardcoded g++" >&5
3060 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3061                 cf_with_cxx=no; CXX=""; GXX="";
3062         fi
3063 fi
3064
3065 GXX_VERSION=none
3066 if test "$GXX" = yes; then
3067         echo "$as_me:3067: checking version of g++" >&5
3068 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3069         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3070         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3071         echo "$as_me:3071: result: $GXX_VERSION" >&5
3072 echo "${ECHO_T}$GXX_VERSION" >&6
3073 fi
3074
3075 case $GXX_VERSION in
3076 1*|2.[0-6]*)
3077         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3078         # cf_cxx_library=no
3079         { echo "$as_me:3079: WARNING: templates do not work" >&5
3080 echo "$as_me: WARNING: templates do not work" >&2;}
3081         ;;
3082 esac
3083
3084 echo "$as_me:3084: checking if you want to build C++ binding and demo" >&5
3085 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3086
3087 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3088 if test "${with_cxx_binding+set}" = set; then
3089   withval="$with_cxx_binding"
3090   cf_with_cxx_binding=$withval
3091 else
3092   cf_with_cxx_binding=$cf_with_cxx
3093 fi;
3094 echo "$as_me:3094: result: $cf_with_cxx_binding" >&5
3095 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3096
3097 echo "$as_me:3097: checking if you want to build with Ada95" >&5
3098 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3099
3100 # Check whether --with-ada or --without-ada was given.
3101 if test "${with_ada+set}" = set; then
3102   withval="$with_ada"
3103   cf_with_ada=$withval
3104 else
3105   cf_with_ada=yes
3106 fi;
3107 echo "$as_me:3107: result: $cf_with_ada" >&5
3108 echo "${ECHO_T}$cf_with_ada" >&6
3109
3110 echo "$as_me:3110: checking if you want to build programs such as tic" >&5
3111 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3112
3113 # Check whether --with-progs or --without-progs was given.
3114 if test "${with_progs+set}" = set; then
3115   withval="$with_progs"
3116   cf_with_progs=$withval
3117 else
3118   cf_with_progs=yes
3119 fi;
3120 echo "$as_me:3120: result: $cf_with_progs" >&5
3121 echo "${ECHO_T}$cf_with_progs" >&6
3122
3123 echo "$as_me:3123: checking if you wish to install curses.h" >&5
3124 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3125
3126 # Check whether --with-curses-h or --without-curses-h was given.
3127 if test "${with_curses_h+set}" = set; then
3128   withval="$with_curses_h"
3129   with_curses_h=$withval
3130 else
3131   with_curses_h=yes
3132 fi;
3133 echo "$as_me:3133: result: $with_curses_h" >&5
3134 echo "${ECHO_T}$with_curses_h" >&6
3135
3136 modules_to_build="ncurses"
3137 if test "X$cf_with_progs" != Xno ; then
3138 modules_to_build="$modules_to_build progs tack"
3139 fi
3140 modules_to_build="$modules_to_build panel menu form"
3141
3142 test "$program_prefix" != NONE &&
3143   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3144 # Use a double $ so make ignores it.
3145 test "$program_suffix" != NONE &&
3146   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3147 # Double any \ or $.  echo might interpret backslashes.
3148 # By default was `s,x,x', remove it if useless.
3149 cat <<\_ACEOF >conftest.sed
3150 s/[\\$]/&&/g;s/;s,x,x,$//
3151 _ACEOF
3152 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3153 rm conftest.sed
3154
3155 for ac_prog in mawk gawk nawk awk
3156 do
3157   # Extract the first word of "$ac_prog", so it can be a program name with args.
3158 set dummy $ac_prog; ac_word=$2
3159 echo "$as_me:3159: checking for $ac_word" >&5
3160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3161 if test "${ac_cv_prog_AWK+set}" = set; then
3162   echo $ECHO_N "(cached) $ECHO_C" >&6
3163 else
3164   if test -n "$AWK"; then
3165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3166 else
3167   ac_save_IFS=$IFS; IFS=$ac_path_separator
3168 ac_dummy="$PATH"
3169 for ac_dir in $ac_dummy; do
3170   IFS=$ac_save_IFS
3171   test -z "$ac_dir" && ac_dir=.
3172   $as_executable_p "$ac_dir/$ac_word" || continue
3173 ac_cv_prog_AWK="$ac_prog"
3174 echo "$as_me:3174: found $ac_dir/$ac_word" >&5
3175 break
3176 done
3177
3178 fi
3179 fi
3180 AWK=$ac_cv_prog_AWK
3181 if test -n "$AWK"; then
3182   echo "$as_me:3182: result: $AWK" >&5
3183 echo "${ECHO_T}$AWK" >&6
3184 else
3185   echo "$as_me:3185: result: no" >&5
3186 echo "${ECHO_T}no" >&6
3187 fi
3188
3189   test -n "$AWK" && break
3190 done
3191
3192 test -z "$AWK" && { { echo "$as_me:3192: error: No awk program found" >&5
3193 echo "$as_me: error: No awk program found" >&2;}
3194    { (exit 1); exit 1; }; }
3195
3196 echo "$as_me:3196: checking for egrep" >&5
3197 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3198 if test "${ac_cv_prog_egrep+set}" = set; then
3199   echo $ECHO_N "(cached) $ECHO_C" >&6
3200 else
3201   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3202     then ac_cv_prog_egrep='grep -E'
3203     else ac_cv_prog_egrep='egrep'
3204     fi
3205 fi
3206 echo "$as_me:3206: result: $ac_cv_prog_egrep" >&5
3207 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3208  EGREP=$ac_cv_prog_egrep
3209
3210 test -z "$EGREP" && { { echo "$as_me:3210: error: No egrep program found" >&5
3211 echo "$as_me: error: No egrep program found" >&2;}
3212    { (exit 1); exit 1; }; }
3213
3214 # Find a good install program.  We prefer a C program (faster),
3215 # so one script is as good as another.  But avoid the broken or
3216 # incompatible versions:
3217 # SysV /etc/install, /usr/sbin/install
3218 # SunOS /usr/etc/install
3219 # IRIX /sbin/install
3220 # AIX /bin/install
3221 # AmigaOS /C/install, which installs bootblocks on floppy discs
3222 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3223 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3224 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3225 # ./install, which can be erroneously created by make from ./install.sh.
3226 echo "$as_me:3226: checking for a BSD compatible install" >&5
3227 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3228 if test -z "$INSTALL"; then
3229 if test "${ac_cv_path_install+set}" = set; then
3230   echo $ECHO_N "(cached) $ECHO_C" >&6
3231 else
3232     ac_save_IFS=$IFS; IFS=$ac_path_separator
3233   for ac_dir in $PATH; do
3234     IFS=$ac_save_IFS
3235     # Account for people who put trailing slashes in PATH elements.
3236     case $ac_dir/ in
3237     / | ./ | .// | /cC/* \
3238     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3239     | /usr/ucb/* ) ;;
3240     *)
3241       # OSF1 and SCO ODT 3.0 have their own names for install.
3242       # Don't use installbsd from OSF since it installs stuff as root
3243       # by default.
3244       for ac_prog in ginstall scoinst install; do
3245         if $as_executable_p "$ac_dir/$ac_prog"; then
3246           if test $ac_prog = install &&
3247             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3248             # AIX install.  It has an incompatible calling convention.
3249             :
3250           elif test $ac_prog = install &&
3251             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3252             # program-specific install script used by HP pwplus--don't use.
3253             :
3254           else
3255             ac_cv_path_install="$ac_dir/$ac_prog -c"
3256             break 2
3257           fi
3258         fi
3259       done
3260       ;;
3261     esac
3262   done
3263
3264 fi
3265   if test "${ac_cv_path_install+set}" = set; then
3266     INSTALL=$ac_cv_path_install
3267   else
3268     # As a last resort, use the slow shell script.  We don't cache a
3269     # path for INSTALL within a source directory, because that will
3270     # break other packages using the cache if that directory is
3271     # removed, or if the path is relative.
3272     INSTALL=$ac_install_sh
3273   fi
3274 fi
3275 echo "$as_me:3275: result: $INSTALL" >&5
3276 echo "${ECHO_T}$INSTALL" >&6
3277
3278 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3279 # It thinks the first close brace ends the variable substitution.
3280 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3281
3282 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3283
3284 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3285
3286 case $INSTALL in
3287 /*)
3288   ;;
3289 *)
3290   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3291   test -z "$cf_dir" && cf_dir=.
3292   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3293   ;;
3294 esac
3295
3296 for ac_prog in tdlint lint alint
3297 do
3298   # Extract the first word of "$ac_prog", so it can be a program name with args.
3299 set dummy $ac_prog; ac_word=$2
3300 echo "$as_me:3300: checking for $ac_word" >&5
3301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3302 if test "${ac_cv_prog_LINT+set}" = set; then
3303   echo $ECHO_N "(cached) $ECHO_C" >&6
3304 else
3305   if test -n "$LINT"; then
3306   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3307 else
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   $as_executable_p "$ac_dir/$ac_word" || continue
3314 ac_cv_prog_LINT="$ac_prog"
3315 echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316 break
3317 done
3318
3319 fi
3320 fi
3321 LINT=$ac_cv_prog_LINT
3322 if test -n "$LINT"; then
3323   echo "$as_me:3323: result: $LINT" >&5
3324 echo "${ECHO_T}$LINT" >&6
3325 else
3326   echo "$as_me:3326: result: no" >&5
3327 echo "${ECHO_T}no" >&6
3328 fi
3329
3330   test -n "$LINT" && break
3331 done
3332
3333 echo "$as_me:3333: checking whether ln -s works" >&5
3334 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3335 LN_S=$as_ln_s
3336 if test "$LN_S" = "ln -s"; then
3337   echo "$as_me:3337: result: yes" >&5
3338 echo "${ECHO_T}yes" >&6
3339 else
3340   echo "$as_me:3340: result: no, using $LN_S" >&5
3341 echo "${ECHO_T}no, using $LN_S" >&6
3342 fi
3343
3344 echo "$as_me:3344: checking whether ${MAKE-make} sets \${MAKE}" >&5
3345 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3346 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3347 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3348   echo $ECHO_N "(cached) $ECHO_C" >&6
3349 else
3350   cat >conftest.make <<\EOF
3351 all:
3352         @echo 'ac_maketemp="${MAKE}"'
3353 EOF
3354 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3355 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3356 if test -n "$ac_maketemp"; then
3357   eval ac_cv_prog_make_${ac_make}_set=yes
3358 else
3359   eval ac_cv_prog_make_${ac_make}_set=no
3360 fi
3361 rm -f conftest.make
3362 fi
3363 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3364   echo "$as_me:3364: result: yes" >&5
3365 echo "${ECHO_T}yes" >&6
3366   SET_MAKE=
3367 else
3368   echo "$as_me:3368: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370   SET_MAKE="MAKE=${MAKE-make}"
3371 fi
3372
3373 echo "$as_me:3373: checking if filesystem supports mixed-case filenames" >&5
3374 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3375 if test "${cf_cv_mixedcase+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378
3379 if test "$cross_compiling" = yes ; then
3380         case $target_alias in #(vi
3381         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3382                 cf_cv_mixedcase=no
3383                 ;;
3384         *)
3385                 cf_cv_mixedcase=yes
3386                 ;;
3387         esac
3388 else
3389         rm -f conftest CONFTEST
3390         echo test >conftest
3391         if test -f CONFTEST ; then
3392                 cf_cv_mixedcase=no
3393         else
3394                 cf_cv_mixedcase=yes
3395         fi
3396         rm -f conftest CONFTEST
3397 fi
3398
3399 fi
3400 echo "$as_me:3400: result: $cf_cv_mixedcase" >&5
3401 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3402 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3403 #define MIXEDCASE_FILENAMES 1
3404 EOF
3405
3406 # Extract the first word of "ctags", so it can be a program name with args.
3407 set dummy ctags; ac_word=$2
3408 echo "$as_me:3408: checking for $ac_word" >&5
3409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3410 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3411   echo $ECHO_N "(cached) $ECHO_C" >&6
3412 else
3413   if test -n "$MAKE_LOWER_TAGS"; then
3414   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3415 else
3416   ac_save_IFS=$IFS; IFS=$ac_path_separator
3417 ac_dummy="$PATH"
3418 for ac_dir in $ac_dummy; do
3419   IFS=$ac_save_IFS
3420   test -z "$ac_dir" && ac_dir=.
3421   $as_executable_p "$ac_dir/$ac_word" || continue
3422 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3423 echo "$as_me:3423: found $ac_dir/$ac_word" >&5
3424 break
3425 done
3426
3427   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3428 fi
3429 fi
3430 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3431 if test -n "$MAKE_LOWER_TAGS"; then
3432   echo "$as_me:3432: result: $MAKE_LOWER_TAGS" >&5
3433 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3434 else
3435   echo "$as_me:3435: result: no" >&5
3436 echo "${ECHO_T}no" >&6
3437 fi
3438
3439 if test "$cf_cv_mixedcase" = yes ; then
3440         # Extract the first word of "etags", so it can be a program name with args.
3441 set dummy etags; ac_word=$2
3442 echo "$as_me:3442: checking for $ac_word" >&5
3443 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3444 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3445   echo $ECHO_N "(cached) $ECHO_C" >&6
3446 else
3447   if test -n "$MAKE_UPPER_TAGS"; then
3448   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3449 else
3450   ac_save_IFS=$IFS; IFS=$ac_path_separator
3451 ac_dummy="$PATH"
3452 for ac_dir in $ac_dummy; do
3453   IFS=$ac_save_IFS
3454   test -z "$ac_dir" && ac_dir=.
3455   $as_executable_p "$ac_dir/$ac_word" || continue
3456 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3457 echo "$as_me:3457: found $ac_dir/$ac_word" >&5
3458 break
3459 done
3460
3461   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3462 fi
3463 fi
3464 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3465 if test -n "$MAKE_UPPER_TAGS"; then
3466   echo "$as_me:3466: result: $MAKE_UPPER_TAGS" >&5
3467 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3468 else
3469   echo "$as_me:3469: result: no" >&5
3470 echo "${ECHO_T}no" >&6
3471 fi
3472
3473 else
3474         MAKE_UPPER_TAGS=no
3475 fi
3476
3477 if test "$MAKE_UPPER_TAGS" = yes ; then
3478         MAKE_UPPER_TAGS=
3479 else
3480         MAKE_UPPER_TAGS="#"
3481 fi
3482
3483 if test "$MAKE_LOWER_TAGS" = yes ; then
3484         MAKE_LOWER_TAGS=
3485 else
3486         MAKE_LOWER_TAGS="#"
3487 fi
3488
3489 echo "$as_me:3489: checking for makeflags variable" >&5
3490 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3491 if test "${cf_cv_makeflags+set}" = set; then
3492   echo $ECHO_N "(cached) $ECHO_C" >&6
3493 else
3494
3495         cf_cv_makeflags=''
3496         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3497         do
3498                 cat >cf_makeflags.tmp <<CF_EOF
3499 SHELL = /bin/sh
3500 all :
3501         @ echo '.$cf_option'
3502 CF_EOF
3503                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3504                 case "$cf_result" in
3505                 .*k)
3506                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3507                         case "$cf_result" in
3508                         .*CC=*) cf_cv_makeflags=
3509                                 ;;
3510                         *)      cf_cv_makeflags=$cf_option
3511                                 ;;
3512                         esac
3513                         break
3514                         ;;
3515                 .-)     ;;
3516                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3517                         ;;
3518                 esac
3519         done
3520         rm -f cf_makeflags.tmp
3521
3522 fi
3523 echo "$as_me:3523: result: $cf_cv_makeflags" >&5
3524 echo "${ECHO_T}$cf_cv_makeflags" >&6
3525
3526 echo "$as_me:3526: checking for long file names" >&5
3527 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3528 if test "${ac_cv_sys_long_file_names+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   ac_cv_sys_long_file_names=yes
3532 # Test for long file names in all the places we know might matter:
3533 #      .                the current directory, where building will happen
3534 #      $prefix/lib      where we will be installing things
3535 #      $exec_prefix/lib likewise
3536 # eval it to expand exec_prefix.
3537 #      $TMPDIR          if set, where it might want to write temporary files
3538 # if $TMPDIR is not set:
3539 #      /tmp             where it might want to write temporary files
3540 #      /var/tmp         likewise
3541 #      /usr/tmp         likewise
3542 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3543   ac_tmpdirs=$TMPDIR
3544 else
3545   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3546 fi
3547 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3548   test -d $ac_dir || continue
3549   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3550   ac_xdir=$ac_dir/cf$$
3551   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3552   ac_tf1=$ac_xdir/conftest9012345
3553   ac_tf2=$ac_xdir/conftest9012346
3554   (echo 1 >$ac_tf1) 2>/dev/null
3555   (echo 2 >$ac_tf2) 2>/dev/null
3556   ac_val=`cat $ac_tf1 2>/dev/null`
3557   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3558     ac_cv_sys_long_file_names=no
3559     rm -rf $ac_xdir 2>/dev/null
3560     break
3561   fi
3562   rm -rf $ac_xdir 2>/dev/null
3563 done
3564 fi
3565 echo "$as_me:3565: result: $ac_cv_sys_long_file_names" >&5
3566 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3567 if test $ac_cv_sys_long_file_names = yes; then
3568
3569 cat >>confdefs.h <<\EOF
3570 #define HAVE_LONG_FILE_NAMES 1
3571 EOF
3572
3573 fi
3574
3575 echo "$as_me:3575: checking if filesystem supports mixed-case filenames" >&5
3576 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3577 if test "${cf_cv_mixedcase+set}" = set; then
3578   echo $ECHO_N "(cached) $ECHO_C" >&6
3579 else
3580
3581 if test "$cross_compiling" = yes ; then
3582         case $target_alias in #(vi
3583         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3584                 cf_cv_mixedcase=no
3585                 ;;
3586         *)
3587                 cf_cv_mixedcase=yes
3588                 ;;
3589         esac
3590 else
3591         rm -f conftest CONFTEST
3592         echo test >conftest
3593         if test -f CONFTEST ; then
3594                 cf_cv_mixedcase=no
3595         else
3596                 cf_cv_mixedcase=yes
3597         fi
3598         rm -f conftest CONFTEST
3599 fi
3600
3601 fi
3602 echo "$as_me:3602: result: $cf_cv_mixedcase" >&5
3603 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3604 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3605 #define MIXEDCASE_FILENAMES 1
3606 EOF
3607
3608 if test -n "$ac_tool_prefix"; then
3609   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3610 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3611 echo "$as_me:3611: checking for $ac_word" >&5
3612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3613 if test "${ac_cv_prog_RANLIB+set}" = set; then
3614   echo $ECHO_N "(cached) $ECHO_C" >&6
3615 else
3616   if test -n "$RANLIB"; then
3617   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3618 else
3619   ac_save_IFS=$IFS; IFS=$ac_path_separator
3620 ac_dummy="$PATH"
3621 for ac_dir in $ac_dummy; do
3622   IFS=$ac_save_IFS
3623   test -z "$ac_dir" && ac_dir=.
3624   $as_executable_p "$ac_dir/$ac_word" || continue
3625 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3626 echo "$as_me:3626: found $ac_dir/$ac_word" >&5
3627 break
3628 done
3629
3630 fi
3631 fi
3632 RANLIB=$ac_cv_prog_RANLIB
3633 if test -n "$RANLIB"; then
3634   echo "$as_me:3634: result: $RANLIB" >&5
3635 echo "${ECHO_T}$RANLIB" >&6
3636 else
3637   echo "$as_me:3637: result: no" >&5
3638 echo "${ECHO_T}no" >&6
3639 fi
3640
3641 fi
3642 if test -z "$ac_cv_prog_RANLIB"; then
3643   ac_ct_RANLIB=$RANLIB
3644   # Extract the first word of "ranlib", so it can be a program name with args.
3645 set dummy ranlib; ac_word=$2
3646 echo "$as_me:3646: checking for $ac_word" >&5
3647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3648 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3649   echo $ECHO_N "(cached) $ECHO_C" >&6
3650 else
3651   if test -n "$ac_ct_RANLIB"; then
3652   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3653 else
3654   ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657   IFS=$ac_save_IFS
3658   test -z "$ac_dir" && ac_dir=.
3659   $as_executable_p "$ac_dir/$ac_word" || continue
3660 ac_cv_prog_ac_ct_RANLIB="ranlib"
3661 echo "$as_me:3661: found $ac_dir/$ac_word" >&5
3662 break
3663 done
3664
3665   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3666 fi
3667 fi
3668 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3669 if test -n "$ac_ct_RANLIB"; then
3670   echo "$as_me:3670: result: $ac_ct_RANLIB" >&5
3671 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3672 else
3673   echo "$as_me:3673: result: no" >&5
3674 echo "${ECHO_T}no" >&6
3675 fi
3676
3677   RANLIB=$ac_ct_RANLIB
3678 else
3679   RANLIB="$ac_cv_prog_RANLIB"
3680 fi
3681
3682 if test -n "$ac_tool_prefix"; then
3683   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3684 set dummy ${ac_tool_prefix}ld; ac_word=$2
3685 echo "$as_me:3685: checking for $ac_word" >&5
3686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3687 if test "${ac_cv_prog_LD+set}" = set; then
3688   echo $ECHO_N "(cached) $ECHO_C" >&6
3689 else
3690   if test -n "$LD"; then
3691   ac_cv_prog_LD="$LD" # Let the user override the test.
3692 else
3693   ac_save_IFS=$IFS; IFS=$ac_path_separator
3694 ac_dummy="$PATH"
3695 for ac_dir in $ac_dummy; do
3696   IFS=$ac_save_IFS
3697   test -z "$ac_dir" && ac_dir=.
3698   $as_executable_p "$ac_dir/$ac_word" || continue
3699 ac_cv_prog_LD="${ac_tool_prefix}ld"
3700 echo "$as_me:3700: found $ac_dir/$ac_word" >&5
3701 break
3702 done
3703
3704 fi
3705 fi
3706 LD=$ac_cv_prog_LD
3707 if test -n "$LD"; then
3708   echo "$as_me:3708: result: $LD" >&5
3709 echo "${ECHO_T}$LD" >&6
3710 else
3711   echo "$as_me:3711: result: no" >&5
3712 echo "${ECHO_T}no" >&6
3713 fi
3714
3715 fi
3716 if test -z "$ac_cv_prog_LD"; then
3717   ac_ct_LD=$LD
3718   # Extract the first word of "ld", so it can be a program name with args.
3719 set dummy ld; ac_word=$2
3720 echo "$as_me:3720: checking for $ac_word" >&5
3721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3722 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3723   echo $ECHO_N "(cached) $ECHO_C" >&6
3724 else
3725   if test -n "$ac_ct_LD"; then
3726   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3727 else
3728   ac_save_IFS=$IFS; IFS=$ac_path_separator
3729 ac_dummy="$PATH"
3730 for ac_dir in $ac_dummy; do
3731   IFS=$ac_save_IFS
3732   test -z "$ac_dir" && ac_dir=.
3733   $as_executable_p "$ac_dir/$ac_word" || continue
3734 ac_cv_prog_ac_ct_LD="ld"
3735 echo "$as_me:3735: found $ac_dir/$ac_word" >&5
3736 break
3737 done
3738
3739   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3740 fi
3741 fi
3742 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3743 if test -n "$ac_ct_LD"; then
3744   echo "$as_me:3744: result: $ac_ct_LD" >&5
3745 echo "${ECHO_T}$ac_ct_LD" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751   LD=$ac_ct_LD
3752 else
3753   LD="$ac_cv_prog_LD"
3754 fi
3755
3756 if test -n "$ac_tool_prefix"; then
3757   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3758 set dummy ${ac_tool_prefix}ar; ac_word=$2
3759 echo "$as_me:3759: checking for $ac_word" >&5
3760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3761 if test "${ac_cv_prog_AR+set}" = set; then
3762   echo $ECHO_N "(cached) $ECHO_C" >&6
3763 else
3764   if test -n "$AR"; then
3765   ac_cv_prog_AR="$AR" # Let the user override the test.
3766 else
3767   ac_save_IFS=$IFS; IFS=$ac_path_separator
3768 ac_dummy="$PATH"
3769 for ac_dir in $ac_dummy; do
3770   IFS=$ac_save_IFS
3771   test -z "$ac_dir" && ac_dir=.
3772   $as_executable_p "$ac_dir/$ac_word" || continue
3773 ac_cv_prog_AR="${ac_tool_prefix}ar"
3774 echo "$as_me:3774: found $ac_dir/$ac_word" >&5
3775 break
3776 done
3777
3778 fi
3779 fi
3780 AR=$ac_cv_prog_AR
3781 if test -n "$AR"; then
3782   echo "$as_me:3782: result: $AR" >&5
3783 echo "${ECHO_T}$AR" >&6
3784 else
3785   echo "$as_me:3785: result: no" >&5
3786 echo "${ECHO_T}no" >&6
3787 fi
3788
3789 fi
3790 if test -z "$ac_cv_prog_AR"; then
3791   ac_ct_AR=$AR
3792   # Extract the first word of "ar", so it can be a program name with args.
3793 set dummy ar; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   if test -n "$ac_ct_AR"; then
3800   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3801 else
3802   ac_save_IFS=$IFS; IFS=$ac_path_separator
3803 ac_dummy="$PATH"
3804 for ac_dir in $ac_dummy; do
3805   IFS=$ac_save_IFS
3806   test -z "$ac_dir" && ac_dir=.
3807   $as_executable_p "$ac_dir/$ac_word" || continue
3808 ac_cv_prog_ac_ct_AR="ar"
3809 echo "$as_me:3809: found $ac_dir/$ac_word" >&5
3810 break
3811 done
3812
3813   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3814 fi
3815 fi
3816 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3817 if test -n "$ac_ct_AR"; then
3818   echo "$as_me:3818: result: $ac_ct_AR" >&5
3819 echo "${ECHO_T}$ac_ct_AR" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825   AR=$ac_ct_AR
3826 else
3827   AR="$ac_cv_prog_AR"
3828 fi
3829
3830 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833
3834 echo "$as_me:3834: checking for archiver options (symbol AR_OPTS)" >&5
3835 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3836
3837 if test -z "$AR_OPTS" ; then
3838         AR_OPTS=rv
3839
3840 fi
3841
3842 cf_cv_subst_AR_OPTS=$AR_OPTS
3843 echo "$as_me:3843: result: $AR_OPTS" >&5
3844 echo "${ECHO_T}$AR_OPTS" >&6
3845
3846 fi
3847
3848 echo "$as_me:3848: checking if you have specified an install-prefix" >&5
3849 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3850
3851 # Check whether --with-install-prefix or --without-install-prefix was given.
3852 if test "${with_install_prefix+set}" = set; then
3853   withval="$with_install_prefix"
3854   case "$withval" in #(vi
3855         yes|no) #(vi
3856                 ;;
3857         *)      DESTDIR="$withval"
3858                 ;;
3859         esac
3860 fi;
3861 echo "$as_me:3861: result: $DESTDIR" >&5
3862 echo "${ECHO_T}$DESTDIR" >&6
3863
3864 ###############################################################################
3865
3866 # If we're cross-compiling, allow the user to override the tools and their
3867 # options.  The configure script is oriented toward identifying the host
3868 # compiler, etc., but we need a build compiler to generate parts of the source.
3869
3870 if test "$cross_compiling" = yes ; then
3871
3872         # defaults that we might want to override
3873         : ${BUILD_CFLAGS:=''}
3874         : ${BUILD_CPPFLAGS:=''}
3875         : ${BUILD_LDFLAGS:=''}
3876         : ${BUILD_LIBS:=''}
3877         : ${BUILD_EXEEXT:='$x'}
3878         : ${BUILD_OBJEXT:='o'}
3879
3880 # Check whether --with-build-cc or --without-build-cc was given.
3881 if test "${with_build_cc+set}" = set; then
3882   withval="$with_build_cc"
3883   BUILD_CC="$withval"
3884 else
3885   for ac_prog in gcc cc cl
3886 do
3887   # Extract the first word of "$ac_prog", so it can be a program name with args.
3888 set dummy $ac_prog; ac_word=$2
3889 echo "$as_me:3889: checking for $ac_word" >&5
3890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3891 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3892   echo $ECHO_N "(cached) $ECHO_C" >&6
3893 else
3894   if test -n "$BUILD_CC"; then
3895   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3896 else
3897   ac_save_IFS=$IFS; IFS=$ac_path_separator
3898 ac_dummy="$PATH"
3899 for ac_dir in $ac_dummy; do
3900   IFS=$ac_save_IFS
3901   test -z "$ac_dir" && ac_dir=.
3902   $as_executable_p "$ac_dir/$ac_word" || continue
3903 ac_cv_prog_BUILD_CC="$ac_prog"
3904 echo "$as_me:3904: found $ac_dir/$ac_word" >&5
3905 break
3906 done
3907
3908 fi
3909 fi
3910 BUILD_CC=$ac_cv_prog_BUILD_CC
3911 if test -n "$BUILD_CC"; then
3912   echo "$as_me:3912: result: $BUILD_CC" >&5
3913 echo "${ECHO_T}$BUILD_CC" >&6
3914 else
3915   echo "$as_me:3915: result: no" >&5
3916 echo "${ECHO_T}no" >&6
3917 fi
3918
3919   test -n "$BUILD_CC" && break
3920 done
3921
3922 fi;
3923         echo "$as_me:3923: checking for native build C compiler" >&5
3924 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3925         echo "$as_me:3925: result: $BUILD_CC" >&5
3926 echo "${ECHO_T}$BUILD_CC" >&6
3927
3928         echo "$as_me:3928: checking for native build C preprocessor" >&5
3929 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3930
3931 # Check whether --with-build-cpp or --without-build-cpp was given.
3932 if test "${with_build_cpp+set}" = set; then
3933   withval="$with_build_cpp"
3934   BUILD_CPP="$withval"
3935 else
3936   BUILD_CPP='${BUILD_CC} -E'
3937 fi;
3938         echo "$as_me:3938: result: $BUILD_CPP" >&5
3939 echo "${ECHO_T}$BUILD_CPP" >&6
3940
3941         echo "$as_me:3941: checking for native build C flags" >&5
3942 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3943
3944 # Check whether --with-build-cflags or --without-build-cflags was given.
3945 if test "${with_build_cflags+set}" = set; then
3946   withval="$with_build_cflags"
3947   BUILD_CFLAGS="$withval"
3948 fi;
3949         echo "$as_me:3949: result: $BUILD_CFLAGS" >&5
3950 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3951
3952         echo "$as_me:3952: checking for native build C preprocessor-flags" >&5
3953 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3954
3955 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3956 if test "${with_build_cppflags+set}" = set; then
3957   withval="$with_build_cppflags"
3958   BUILD_CPPFLAGS="$withval"
3959 fi;
3960         echo "$as_me:3960: result: $BUILD_CPPFLAGS" >&5
3961 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3962
3963         echo "$as_me:3963: checking for native build linker-flags" >&5
3964 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3965
3966 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3967 if test "${with_build_ldflags+set}" = set; then
3968   withval="$with_build_ldflags"
3969   BUILD_LDFLAGS="$withval"
3970 fi;
3971         echo "$as_me:3971: result: $BUILD_LDFLAGS" >&5
3972 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3973
3974         echo "$as_me:3974: checking for native build linker-libraries" >&5
3975 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3976
3977 # Check whether --with-build-libs or --without-build-libs was given.
3978 if test "${with_build_libs+set}" = set; then
3979   withval="$with_build_libs"
3980   BUILD_LIBS="$withval"
3981 fi;
3982         echo "$as_me:3982: result: $BUILD_LIBS" >&5
3983 echo "${ECHO_T}$BUILD_LIBS" >&6
3984
3985         # this assumes we're on Unix.
3986         BUILD_EXEEXT=
3987         BUILD_OBJEXT=o
3988
3989         : ${BUILD_CC:='${CC}'}
3990
3991         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3992                 { { echo "$as_me:3992: error: Cross-build requires two compilers.
3993 Use --with-build-cc to specify the native compiler." >&5
3994 echo "$as_me: error: Cross-build requires two compilers.
3995 Use --with-build-cc to specify the native compiler." >&2;}
3996    { (exit 1); exit 1; }; }
3997         fi
3998
3999 else
4000         : ${BUILD_CC:='${CC}'}
4001         : ${BUILD_CPP:='${CPP}'}
4002         : ${BUILD_CFLAGS:='${CFLAGS}'}
4003         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4004         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4005         : ${BUILD_LIBS:='${LIBS}'}
4006         : ${BUILD_EXEEXT:='$x'}
4007         : ${BUILD_OBJEXT:='o'}
4008 fi
4009
4010 ###############################################################################
4011
4012 ### Options to allow the user to specify the set of libraries which are used.
4013 ### Use "--without-normal --with-shared" to allow the default model to be
4014 ### shared, for example.
4015 cf_list_models=""
4016
4017 LIBTOOL=
4018
4019 # common library maintenance symbols that are convenient for libtool scripts:
4020 LIB_CREATE='${AR} -cr'
4021 LIB_OBJECT='${OBJECTS}'
4022 LIB_SUFFIX=.a
4023 LIB_PREP="$RANLIB"
4024
4025 # symbols used to prop libtool up to enable it to determine what it should be
4026 # doing:
4027 LIB_CLEAN=
4028 LIB_COMPILE=
4029 LIB_LINK='${CC}'
4030 LIB_INSTALL=
4031 LIB_UNINSTALL=
4032
4033 echo "$as_me:4033: checking if you want to build libraries with libtool" >&5
4034 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4035
4036 # Check whether --with-libtool or --without-libtool was given.
4037 if test "${with_libtool+set}" = set; then
4038   withval="$with_libtool"
4039   with_libtool=$withval
4040 else
4041   with_libtool=no
4042 fi;
4043 echo "$as_me:4043: result: $with_libtool" >&5
4044 echo "${ECHO_T}$with_libtool" >&6
4045 if test "$with_libtool" != "no"; then
4046
4047         if test "$with_libtool" != "yes" ; then
4048
4049 if test "x$prefix" != xNONE; then
4050   cf_path_syntax="$prefix"
4051 else
4052   cf_path_syntax="$ac_default_prefix"
4053 fi
4054
4055 case ".$with_libtool" in #(vi
4056 .\$\(*\)*|.\'*\'*) #(vi
4057   ;;
4058 ..|./*|.\\*) #(vi
4059   ;;
4060 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4061   ;;
4062 .\${*prefix}*) #(vi
4063   eval with_libtool="$with_libtool"
4064   case ".$with_libtool" in #(vi
4065   .NONE/*)
4066     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4067     ;;
4068   esac
4069   ;; #(vi
4070 .no|.NONE/*)
4071   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4072   ;;
4073 *)
4074   { { echo "$as_me:4074: error: expected a pathname, not \"$with_libtool\"" >&5
4075 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4076    { (exit 1); exit 1; }; }
4077   ;;
4078 esac
4079
4080                 LIBTOOL=$with_libtool
4081         else
4082                 # Extract the first word of "libtool", so it can be a program name with args.
4083 set dummy libtool; ac_word=$2
4084 echo "$as_me:4084: checking for $ac_word" >&5
4085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4086 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4087   echo $ECHO_N "(cached) $ECHO_C" >&6
4088 else
4089   case $LIBTOOL in
4090   [\\/]* | ?:[\\/]*)
4091   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4092   ;;
4093   *)
4094   ac_save_IFS=$IFS; IFS=$ac_path_separator
4095 ac_dummy="$PATH"
4096 for ac_dir in $ac_dummy; do
4097   IFS=$ac_save_IFS
4098   test -z "$ac_dir" && ac_dir=.
4099   if $as_executable_p "$ac_dir/$ac_word"; then
4100    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4101    echo "$as_me:4101: found $ac_dir/$ac_word" >&5
4102    break
4103 fi
4104 done
4105
4106   ;;
4107 esac
4108 fi
4109 LIBTOOL=$ac_cv_path_LIBTOOL
4110
4111 if test -n "$LIBTOOL"; then
4112   echo "$as_me:4112: result: $LIBTOOL" >&5
4113 echo "${ECHO_T}$LIBTOOL" >&6
4114 else
4115   echo "$as_me:4115: result: no" >&5
4116 echo "${ECHO_T}no" >&6
4117 fi
4118
4119         fi
4120         if test -z "$LIBTOOL" ; then
4121                 { { echo "$as_me:4121: error: Cannot find libtool" >&5
4122 echo "$as_me: error: Cannot find libtool" >&2;}
4123    { (exit 1); exit 1; }; }
4124         fi
4125         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4126         LIB_OBJECT='${OBJECTS:.o=.lo}'
4127         LIB_SUFFIX=.la
4128         LIB_CLEAN='${LIBTOOL} --mode=clean'
4129         LIB_COMPILE='${LIBTOOL} --mode=compile'
4130         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4131         LIB_INSTALL='${LIBTOOL} --mode=install'
4132         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4133         LIB_PREP=:
4134
4135         # Show the version of libtool
4136         echo "$as_me:4136: checking version of libtool" >&5
4137 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4138
4139         # Save the version in a cache variable - this is not entirely a good
4140         # thing, but the version string from libtool is very ugly, and for
4141         # bug reports it might be useful to have the original string.
4142         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.].*//'`
4143         echo "$as_me:4143: result: $cf_cv_libtool_version" >&5
4144 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4145         if test -z "$cf_cv_libtool_version" ; then
4146                 { { echo "$as_me:4146: error: This is not GNU libtool" >&5
4147 echo "$as_me: error: This is not GNU libtool" >&2;}
4148    { (exit 1); exit 1; }; }
4149         fi
4150
4151         # special hack to add --tag option for C++ compiler
4152         case $cf_cv_libtool_version in
4153         1.[5-9]*|[2-9]*)
4154                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4155                 ;;
4156         *)
4157                 LIBTOOL_CXX="$LIBTOOL"
4158                 ;;
4159         esac
4160 else
4161         LIBTOOL=""
4162         LIBTOOL_CXX=""
4163 fi
4164
4165 test -z "$LIBTOOL" && ECHO_LT=
4166
4167 if test "$with_libtool" != "no" ; then
4168
4169 cf_list_models="$cf_list_models libtool"
4170
4171 else
4172
4173 echo "$as_me:4173: checking if you want to build shared libraries" >&5
4174 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4175
4176 # Check whether --with-shared or --without-shared was given.
4177 if test "${with_shared+set}" = set; then
4178   withval="$with_shared"
4179   with_shared=$withval
4180 else
4181   with_shared=no
4182 fi;
4183 echo "$as_me:4183: result: $with_shared" >&5
4184 echo "${ECHO_T}$with_shared" >&6
4185 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4186
4187 echo "$as_me:4187: checking if you want to build static libraries" >&5
4188 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4189
4190 # Check whether --with-normal or --without-normal was given.
4191 if test "${with_normal+set}" = set; then
4192   withval="$with_normal"
4193   with_normal=$withval
4194 else
4195   with_normal=yes
4196 fi;
4197 echo "$as_me:4197: result: $with_normal" >&5
4198 echo "${ECHO_T}$with_normal" >&6
4199 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4200
4201 echo "$as_me:4201: checking if you want to build debug libraries" >&5
4202 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4203
4204 # Check whether --with-debug or --without-debug was given.
4205 if test "${with_debug+set}" = set; then
4206   withval="$with_debug"
4207   with_debug=$withval
4208 else
4209   with_debug=yes
4210 fi;
4211 echo "$as_me:4211: result: $with_debug" >&5
4212 echo "${ECHO_T}$with_debug" >&6
4213 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4214
4215 echo "$as_me:4215: checking if you want to build profiling libraries" >&5
4216 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4217
4218 # Check whether --with-profile or --without-profile was given.
4219 if test "${with_profile+set}" = set; then
4220   withval="$with_profile"
4221   with_profile=$withval
4222 else
4223   with_profile=no
4224 fi;
4225 echo "$as_me:4225: result: $with_profile" >&5
4226 echo "${ECHO_T}$with_profile" >&6
4227 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4228
4229 fi
4230
4231 ###############################################################################
4232
4233 echo "$as_me:4233: checking for specified models" >&5
4234 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4235 test -z "$cf_list_models" && cf_list_models=normal
4236 test "$with_libtool" != "no" && cf_list_models=libtool
4237 echo "$as_me:4237: result: $cf_list_models" >&5
4238 echo "${ECHO_T}$cf_list_models" >&6
4239
4240 ### Use the first model as the default, and save its suffix for use in building
4241 ### up test-applications.
4242 echo "$as_me:4242: checking for default model" >&5
4243 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4244 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4245 echo "$as_me:4245: result: $DFT_LWR_MODEL" >&5
4246 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4247
4248 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4249
4250 TICS_NAME=tic
4251
4252 TINFO_NAME=tinfo
4253
4254 LIB_NAME=ncurses
4255
4256 LIB_DIR=../lib
4257 LIB_2ND=../../lib
4258
4259         case $cf_cv_system_name in
4260         OS/2*)  LIB_PREFIX=''     ;;
4261         os2*)   LIB_PREFIX=''     ;;
4262         *)      LIB_PREFIX='lib'  ;;
4263         esac
4264 cf_prefix=$LIB_PREFIX
4265
4266 LIB_PREFIX=$cf_prefix
4267
4268 LIB_SUFFIX=
4269
4270 ###############################################################################
4271
4272 echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
4273 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4274
4275 # Check whether --with-termlib or --without-termlib was given.
4276 if test "${with_termlib+set}" = set; then
4277   withval="$with_termlib"
4278   with_termlib=$withval
4279 else
4280   with_termlib=no
4281 fi;
4282 echo "$as_me:4282: result: $with_termlib" >&5
4283 echo "${ECHO_T}$with_termlib" >&6
4284
4285 echo "$as_me:4285: checking if you want to build a separate tic library" >&5
4286 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4287
4288 # Check whether --with-ticlib or --without-ticlib was given.
4289 if test "${with_ticlib+set}" = set; then
4290   withval="$with_ticlib"
4291   with_ticlib=$withval
4292 else
4293   with_ticlib=no
4294 fi;
4295 echo "$as_me:4295: result: $with_ticlib" >&5
4296 echo "${ECHO_T}$with_ticlib" >&6
4297
4298 ### Checks for special libraries, must be done up-front.
4299 SHLIB_LIST=""
4300
4301 echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
4302 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4303
4304 # Check whether --with-gpm or --without-gpm was given.
4305 if test "${with_gpm+set}" = set; then
4306   withval="$with_gpm"
4307   with_gpm=$withval
4308 else
4309   with_gpm=maybe
4310 fi;
4311 echo "$as_me:4311: result: $with_gpm" >&5
4312 echo "${ECHO_T}$with_gpm" >&6
4313
4314 if test "$with_gpm" != no ; then
4315         echo "$as_me:4315: checking for gpm.h" >&5
4316 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4317 if test "${ac_cv_header_gpm_h+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   cat >conftest.$ac_ext <<_ACEOF
4321 #line 4321 "configure"
4322 #include "confdefs.h"
4323 #include <gpm.h>
4324 _ACEOF
4325 if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
4326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4327   ac_status=$?
4328   egrep -v '^ *\+' conftest.er1 >conftest.err
4329   rm -f conftest.er1
4330   cat conftest.err >&5
4331   echo "$as_me:4331: \$? = $ac_status" >&5
4332   (exit $ac_status); } >/dev/null; then
4333   if test -s conftest.err; then
4334     ac_cpp_err=$ac_c_preproc_warn_flag
4335   else
4336     ac_cpp_err=
4337   fi
4338 else
4339   ac_cpp_err=yes
4340 fi
4341 if test -z "$ac_cpp_err"; then
4342   ac_cv_header_gpm_h=yes
4343 else
4344   echo "$as_me: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   ac_cv_header_gpm_h=no
4347 fi
4348 rm -f conftest.err conftest.$ac_ext
4349 fi
4350 echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
4351 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4352 if test $ac_cv_header_gpm_h = yes; then
4353
4354                 cat >>confdefs.h <<\EOF
4355 #define HAVE_GPM_H 1
4356 EOF
4357
4358                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4359                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4360
4361                         cat >>confdefs.h <<\EOF
4362 #define HAVE_LIBGPM 1
4363 EOF
4364
4365                 else
4366                         echo "$as_me:4366: checking for Gpm_Open in -lgpm" >&5
4367 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4368 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   ac_check_lib_save_LIBS=$LIBS
4372 LIBS="-lgpm  $LIBS"
4373 cat >conftest.$ac_ext <<_ACEOF
4374 #line 4374 "configure"
4375 #include "confdefs.h"
4376
4377 /* Override any gcc2 internal prototype to avoid an error.  */
4378 #ifdef __cplusplus
4379 extern "C"
4380 #endif
4381 /* We use char because int might match the return type of a gcc2
4382    builtin and then its argument prototype would still apply.  */
4383 char Gpm_Open ();
4384 int
4385 main ()
4386 {
4387 Gpm_Open ();
4388   ;
4389   return 0;
4390 }
4391 _ACEOF
4392 rm -f conftest.$ac_objext conftest$ac_exeext
4393 if { (eval echo "$as_me:4393: \"$ac_link\"") >&5
4394   (eval $ac_link) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } &&
4398          { ac_try='test -s conftest$ac_exeext'
4399   { (eval echo "$as_me:4399: \"$ac_try\"") >&5
4400   (eval $ac_try) 2>&5
4401   ac_status=$?
4402   echo "$as_me:4402: \$? = $ac_status" >&5
4403   (exit $ac_status); }; }; then
4404   ac_cv_lib_gpm_Gpm_Open=yes
4405 else
4406   echo "$as_me: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 ac_cv_lib_gpm_Gpm_Open=no
4409 fi
4410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4411 LIBS=$ac_check_lib_save_LIBS
4412 fi
4413 echo "$as_me:4413: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4414 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4415 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4416   :
4417 else
4418
4419                                 { { echo "$as_me:4419: error: Cannot link with GPM library" >&5
4420 echo "$as_me: error: Cannot link with GPM library" >&2;}
4421    { (exit 1); exit 1; }; }
4422                 fi
4423                 with_gpm=yes
4424
4425 fi
4426
4427 else
4428
4429                 test "$with_gpm" != maybe && { echo "$as_me:4429: WARNING: Cannot find GPM header" >&5
4430 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4431                 with_gpm=no
4432
4433 fi
4434
4435 fi
4436
4437 if test "$with_gpm" != no ; then
4438         echo "$as_me:4438: checking if you want to load GPM dynamically" >&5
4439 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4440
4441 # Check whether --with-dlsym or --without-dlsym was given.
4442 if test "${with_dlsym+set}" = set; then
4443   withval="$with_dlsym"
4444   with_dlsym=$withval
4445 else
4446   with_dlsym=yes
4447 fi;
4448         echo "$as_me:4448: result: $with_dlsym" >&5
4449 echo "${ECHO_T}$with_dlsym" >&6
4450         if test "$with_dlsym" = yes ; then
4451
4452 cf_have_dlsym=no
4453 echo "$as_me:4453: checking for dlsym" >&5
4454 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4455 if test "${ac_cv_func_dlsym+set}" = set; then
4456   echo $ECHO_N "(cached) $ECHO_C" >&6
4457 else
4458   cat >conftest.$ac_ext <<_ACEOF
4459 #line 4459 "configure"
4460 #include "confdefs.h"
4461 /* System header to define __stub macros and hopefully few prototypes,
4462     which can conflict with char dlsym (); below.  */
4463 #include <assert.h>
4464 /* Override any gcc2 internal prototype to avoid an error.  */
4465 #ifdef __cplusplus
4466 extern "C"
4467 #endif
4468 /* We use char because int might match the return type of a gcc2
4469    builtin and then its argument prototype would still apply.  */
4470 char dlsym ();
4471 char (*f) ();
4472
4473 int
4474 main ()
4475 {
4476 /* The GNU C library defines this for functions which it implements
4477     to always fail with ENOSYS.  Some functions are actually named
4478     something starting with __ and the normal name is an alias.  */
4479 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4480 choke me
4481 #else
4482 f = dlsym;
4483 #endif
4484
4485   ;
4486   return 0;
4487 }
4488 _ACEOF
4489 rm -f conftest.$ac_objext conftest$ac_exeext
4490 if { (eval echo "$as_me:4490: \"$ac_link\"") >&5
4491   (eval $ac_link) 2>&5
4492   ac_status=$?
4493   echo "$as_me:4493: \$? = $ac_status" >&5
4494   (exit $ac_status); } &&
4495          { ac_try='test -s conftest$ac_exeext'
4496   { (eval echo "$as_me:4496: \"$ac_try\"") >&5
4497   (eval $ac_try) 2>&5
4498   ac_status=$?
4499   echo "$as_me:4499: \$? = $ac_status" >&5
4500   (exit $ac_status); }; }; then
4501   ac_cv_func_dlsym=yes
4502 else
4503   echo "$as_me: failed program was:" >&5
4504 cat conftest.$ac_ext >&5
4505 ac_cv_func_dlsym=no
4506 fi
4507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4508 fi
4509 echo "$as_me:4509: result: $ac_cv_func_dlsym" >&5
4510 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4511 if test $ac_cv_func_dlsym = yes; then
4512   cf_have_dlsym=yes
4513 else
4514
4515 cf_have_libdl=no
4516 echo "$as_me:4516: checking for dlsym in -ldl" >&5
4517 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4518 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4519   echo $ECHO_N "(cached) $ECHO_C" >&6
4520 else
4521   ac_check_lib_save_LIBS=$LIBS
4522 LIBS="-ldl  $LIBS"
4523 cat >conftest.$ac_ext <<_ACEOF
4524 #line 4524 "configure"
4525 #include "confdefs.h"
4526
4527 /* Override any gcc2 internal prototype to avoid an error.  */
4528 #ifdef __cplusplus
4529 extern "C"
4530 #endif
4531 /* We use char because int might match the return type of a gcc2
4532    builtin and then its argument prototype would still apply.  */
4533 char dlsym ();
4534 int
4535 main ()
4536 {
4537 dlsym ();
4538   ;
4539   return 0;
4540 }
4541 _ACEOF
4542 rm -f conftest.$ac_objext conftest$ac_exeext
4543 if { (eval echo "$as_me:4543: \"$ac_link\"") >&5
4544   (eval $ac_link) 2>&5
4545   ac_status=$?
4546   echo "$as_me:4546: \$? = $ac_status" >&5
4547   (exit $ac_status); } &&
4548          { ac_try='test -s conftest$ac_exeext'
4549   { (eval echo "$as_me:4549: \"$ac_try\"") >&5
4550   (eval $ac_try) 2>&5
4551   ac_status=$?
4552   echo "$as_me:4552: \$? = $ac_status" >&5
4553   (exit $ac_status); }; }; then
4554   ac_cv_lib_dl_dlsym=yes
4555 else
4556   echo "$as_me: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 ac_cv_lib_dl_dlsym=no
4559 fi
4560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4561 LIBS=$ac_check_lib_save_LIBS
4562 fi
4563 echo "$as_me:4563: result: $ac_cv_lib_dl_dlsym" >&5
4564 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4565 if test $ac_cv_lib_dl_dlsym = yes; then
4566
4567         cf_have_dlsym=yes
4568         cf_have_libdl=yes
4569 fi
4570
4571 fi
4572
4573 if test "$cf_have_dlsym" = yes ; then
4574         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4575
4576         echo "$as_me:4576: checking whether able to link to dl*() functions" >&5
4577 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4578         cat >conftest.$ac_ext <<_ACEOF
4579 #line 4579 "configure"
4580 #include "confdefs.h"
4581 #include <dlfcn.h>
4582 int
4583 main ()
4584 {
4585
4586                 void *obj;
4587                 if ((obj = dlopen("filename", 0)) != 0) {
4588                         if (dlsym(obj, "symbolname") == 0) {
4589                         dlclose(obj);
4590                         }
4591                 }
4592   ;
4593   return 0;
4594 }
4595 _ACEOF
4596 rm -f conftest.$ac_objext conftest$ac_exeext
4597 if { (eval echo "$as_me:4597: \"$ac_link\"") >&5
4598   (eval $ac_link) 2>&5
4599   ac_status=$?
4600   echo "$as_me:4600: \$? = $ac_status" >&5
4601   (exit $ac_status); } &&
4602          { ac_try='test -s conftest$ac_exeext'
4603   { (eval echo "$as_me:4603: \"$ac_try\"") >&5
4604   (eval $ac_try) 2>&5
4605   ac_status=$?
4606   echo "$as_me:4606: \$? = $ac_status" >&5
4607   (exit $ac_status); }; }; then
4608
4609                 cat >>confdefs.h <<\EOF
4610 #define HAVE_LIBDL 1
4611 EOF
4612
4613 else
4614   echo "$as_me: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
4616
4617                 { { echo "$as_me:4617: error: Cannot link test program for libdl" >&5
4618 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4619    { (exit 1); exit 1; }; }
4620 fi
4621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4622         echo "$as_me:4622: result: ok" >&5
4623 echo "${ECHO_T}ok" >&6
4624 else
4625         { { echo "$as_me:4625: error: Cannot find dlsym function" >&5
4626 echo "$as_me: error: Cannot find dlsym function" >&2;}
4627    { (exit 1); exit 1; }; }
4628 fi
4629
4630                 if test "$with_gpm" != yes ; then
4631                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4632
4633                         cf_cv_gpm_soname="$with_gpm"
4634                 else
4635
4636 echo "$as_me:4636: checking for soname of gpm library" >&5
4637 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4638 if test "${cf_cv_gpm_soname+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642 cf_cv_gpm_soname=unknown
4643 if test "$cross_compiling" != yes ; then
4644 cat >conftest.$ac_ext <<CF_EOF
4645 #include <gpm.h>
4646 int main()
4647 {
4648 if (Gpm_Open(0,0)) Gpm_Close();
4649         ${cf_cv_main_return:-return}(0);
4650 }
4651 CF_EOF
4652 cf_save_LIBS="$LIBS"
4653         LIBS="-lgpm $LIBS"
4654         if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655   (eval $ac_compile) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); } ; then
4659                 if { (eval echo "$as_me:4659: \"$ac_link\"") >&5
4660   (eval $ac_link) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); } ; then
4664                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4665                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4666                 fi
4667         fi
4668 rm -f conftest*
4669 LIBS="$cf_save_LIBS"
4670 fi
4671
4672 fi
4673 echo "$as_me:4673: result: $cf_cv_gpm_soname" >&5
4674 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4675
4676                 fi
4677                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4678 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4679 EOF
4680
4681                 SHLIB_LIST="-ldl $SHLIB_LIST"
4682         else
4683                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4684         fi
4685         cat >>confdefs.h <<\EOF
4686 #define HAVE_LIBGPM 1
4687 EOF
4688
4689         echo "$as_me:4689: checking for Gpm_Wgetch in -lgpm" >&5
4690 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4691 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   ac_check_lib_save_LIBS=$LIBS
4695 LIBS="-lgpm  $LIBS"
4696 cat >conftest.$ac_ext <<_ACEOF
4697 #line 4697 "configure"
4698 #include "confdefs.h"
4699
4700 /* Override any gcc2 internal prototype to avoid an error.  */
4701 #ifdef __cplusplus
4702 extern "C"
4703 #endif
4704 /* We use char because int might match the return type of a gcc2
4705    builtin and then its argument prototype would still apply.  */
4706 char Gpm_Wgetch ();
4707 int
4708 main ()
4709 {
4710 Gpm_Wgetch ();
4711   ;
4712   return 0;
4713 }
4714 _ACEOF
4715 rm -f conftest.$ac_objext conftest$ac_exeext
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717   (eval $ac_link) 2>&5
4718   ac_status=$?
4719   echo "$as_me:4719: \$? = $ac_status" >&5
4720   (exit $ac_status); } &&
4721          { ac_try='test -s conftest$ac_exeext'
4722   { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4723   (eval $ac_try) 2>&5
4724   ac_status=$?
4725   echo "$as_me:4725: \$? = $ac_status" >&5
4726   (exit $ac_status); }; }; then
4727   ac_cv_lib_gpm_Gpm_Wgetch=yes
4728 else
4729   echo "$as_me: failed program was:" >&5
4730 cat conftest.$ac_ext >&5
4731 ac_cv_lib_gpm_Gpm_Wgetch=no
4732 fi
4733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4734 LIBS=$ac_check_lib_save_LIBS
4735 fi
4736 echo "$as_me:4736: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4737 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4738 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4739
4740                 { echo "$as_me:4740: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4741 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4742
4743 fi
4744
4745 fi
4746
4747 # not everyone has "test -c"
4748 if test -c /dev/sysmouse 2>/dev/null ; then
4749 echo "$as_me:4749: checking if you want to use sysmouse" >&5
4750 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4751
4752 # Check whether --with-sysmouse or --without-sysmouse was given.
4753 if test "${with_sysmouse+set}" = set; then
4754   withval="$with_sysmouse"
4755   cf_with_sysmouse=$withval
4756 else
4757   cf_with_sysmouse=maybe
4758 fi;
4759         if test "$cf_with_sysmouse" != no ; then
4760         cat >conftest.$ac_ext <<_ACEOF
4761 #line 4761 "configure"
4762 #include "confdefs.h"
4763
4764 #include <osreldate.h>
4765 #if (__FreeBSD_version >= 400017)
4766 #include <sys/consio.h>
4767 #include <sys/fbio.h>
4768 #else
4769 #include <machine/console.h>
4770 #endif
4771
4772 int
4773 main ()
4774 {
4775
4776         struct mouse_info the_mouse;
4777         ioctl(0, CONS_MOUSECTL, &the_mouse);
4778
4779   ;
4780   return 0;
4781 }
4782 _ACEOF
4783 rm -f conftest.$ac_objext
4784 if { (eval echo "$as_me:4784: \"$ac_compile\"") >&5
4785   (eval $ac_compile) 2>&5
4786   ac_status=$?
4787   echo "$as_me:4787: \$? = $ac_status" >&5
4788   (exit $ac_status); } &&
4789          { ac_try='test -s conftest.$ac_objext'
4790   { (eval echo "$as_me:4790: \"$ac_try\"") >&5
4791   (eval $ac_try) 2>&5
4792   ac_status=$?
4793   echo "$as_me:4793: \$? = $ac_status" >&5
4794   (exit $ac_status); }; }; then
4795   cf_with_sysmouse=yes
4796 else
4797   echo "$as_me: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
4799 cf_with_sysmouse=no
4800 fi
4801 rm -f conftest.$ac_objext conftest.$ac_ext
4802         fi
4803 echo "$as_me:4803: result: $cf_with_sysmouse" >&5
4804 echo "${ECHO_T}$cf_with_sysmouse" >&6
4805 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4806 #define USE_SYSMOUSE 1
4807 EOF
4808
4809 fi
4810
4811 if test X"$CC_G_OPT" = X"" ; then
4812         CC_G_OPT='-g'
4813         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4814 fi
4815
4816 if test X"$CXX_G_OPT" = X"" ; then
4817         CXX_G_OPT='-g'
4818         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4819 fi
4820
4821 echo "$as_me:4821: checking for default loader flags" >&5
4822 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4823 case $DFT_LWR_MODEL in
4824 libtool) LD_MODEL=''   ;;
4825 normal)  LD_MODEL=''   ;;
4826 debug)   LD_MODEL=$CC_G_OPT ;;
4827 profile) LD_MODEL='-pg';;
4828 shared)  LD_MODEL=''   ;;
4829 esac
4830 echo "$as_me:4830: result: $LD_MODEL" >&5
4831 echo "${ECHO_T}$LD_MODEL" >&6
4832
4833 case $DFT_LWR_MODEL in
4834 shared)
4835 echo "$as_me:4835: checking if rpath option should be used" >&5
4836 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4837
4838 # Check whether --enable-rpath or --disable-rpath was given.
4839 if test "${enable_rpath+set}" = set; then
4840   enableval="$enable_rpath"
4841   cf_cv_ld_rpath=$enableval
4842 else
4843   cf_cv_ld_rpath=no
4844 fi;
4845 echo "$as_me:4845: result: $cf_cv_ld_rpath" >&5
4846 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4847 echo "$as_me:4847: checking if shared libraries should be relinked during install" >&5
4848 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4849
4850 # Check whether --enable-rpath or --disable-rpath was given.
4851 if test "${enable_rpath+set}" = set; then
4852   enableval="$enable_rpath"
4853   cf_cv_do_relink=$enableval
4854 else
4855   cf_cv_do_relink=yes
4856 fi;
4857 echo "$as_me:4857: result: $cf_cv_do_relink" >&5
4858 echo "${ECHO_T}$cf_cv_do_relink" >&6
4859         ;;
4860 esac
4861
4862         LOCAL_LDFLAGS=
4863         LOCAL_LDFLAGS2=
4864         LD_SHARED_OPTS=
4865         INSTALL_LIB="-m 644"
4866
4867         cf_cv_do_symlinks=no
4868
4869         echo "$as_me:4869: checking if release/abi version should be used for shared libs" >&5
4870 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4871
4872 # Check whether --with-shlib-version or --without-shlib-version was given.
4873 if test "${with_shlib_version+set}" = set; then
4874   withval="$with_shlib_version"
4875   test -z "$withval" && withval=auto
4876         case $withval in #(vi
4877         yes) #(vi
4878                 cf_cv_shlib_version=auto
4879                 ;;
4880         rel|abi|auto|no) #(vi
4881                 cf_cv_shlib_version=$withval
4882                 ;;
4883         *)
4884                 { { echo "$as_me:4884: error: option value must be one of: rel, abi, auto or no" >&5
4885 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4886    { (exit 1); exit 1; }; }
4887                 ;;
4888         esac
4889
4890 else
4891   cf_cv_shlib_version=auto
4892 fi;
4893         echo "$as_me:4893: result: $cf_cv_shlib_version" >&5
4894 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4895
4896         cf_cv_rm_so_locs=no
4897
4898         # Some less-capable ports of gcc support only -fpic
4899         CC_SHARED_OPTS=
4900         if test "$GCC" = yes
4901         then
4902                 echo "$as_me:4902: checking which $CC option to use" >&5
4903 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4904                 cf_save_CFLAGS="$CFLAGS"
4905                 for CC_SHARED_OPTS in -fPIC -fpic ''
4906                 do
4907                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4908                         cat >conftest.$ac_ext <<_ACEOF
4909 #line 4909 "configure"
4910 #include "confdefs.h"
4911 #include <stdio.h>
4912 int
4913 main ()
4914 {
4915 int x = 1
4916   ;
4917   return 0;
4918 }
4919 _ACEOF
4920 rm -f conftest.$ac_objext
4921 if { (eval echo "$as_me:4921: \"$ac_compile\"") >&5
4922   (eval $ac_compile) 2>&5
4923   ac_status=$?
4924   echo "$as_me:4924: \$? = $ac_status" >&5
4925   (exit $ac_status); } &&
4926          { ac_try='test -s conftest.$ac_objext'
4927   { (eval echo "$as_me:4927: \"$ac_try\"") >&5
4928   (eval $ac_try) 2>&5
4929   ac_status=$?
4930   echo "$as_me:4930: \$? = $ac_status" >&5
4931   (exit $ac_status); }; }; then
4932   break
4933 else
4934   echo "$as_me: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
4936 fi
4937 rm -f conftest.$ac_objext conftest.$ac_ext
4938                 done
4939                 echo "$as_me:4939: result: $CC_SHARED_OPTS" >&5
4940 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4941                 CFLAGS="$cf_save_CFLAGS"
4942         fi
4943
4944         cf_cv_shlib_version_infix=no
4945
4946         case $cf_cv_system_name in
4947         beos*)
4948                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4949                 ;;
4950         cygwin*)
4951                 CC_SHARED_OPTS=
4952                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
4953                 cf_cv_shlib_version=cygdll
4954                 cf_cv_shlib_version_infix=cygdll
4955                 cat >mk_shared_lib.sh <<-CF_EOF
4956                 #!/bin/sh
4957                 SHARED_LIB=\$1
4958                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
4959                 shift
4960                 cat <<-EOF
4961                 Linking shared library
4962                 ** SHARED_LIB \$SHARED_LIB
4963                 ** IMPORT_LIB \$IMPORT_LIB
4964 EOF
4965                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
4966 CF_EOF
4967                 chmod +x mk_shared_lib.sh
4968                 ;;
4969         darwin*)
4970                 EXTRA_CFLAGS="-no-cpp-precomp"
4971                 CC_SHARED_OPTS="-dynamic"
4972                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4973                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4974                 cf_cv_shlib_version_infix=yes
4975                 echo "$as_me:4975: checking if ld -search_paths_first works" >&5
4976 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4977 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4978   echo $ECHO_N "(cached) $ECHO_C" >&6
4979 else
4980
4981                         cf_save_LDFLAGS=$LDFLAGS
4982                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4983                         cat >conftest.$ac_ext <<_ACEOF
4984 #line 4984 "configure"
4985 #include "confdefs.h"
4986
4987 int
4988 main ()
4989 {
4990 int i;
4991   ;
4992   return 0;
4993 }
4994 _ACEOF
4995 rm -f conftest.$ac_objext conftest$ac_exeext
4996 if { (eval echo "$as_me:4996: \"$ac_link\"") >&5
4997   (eval $ac_link) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); } &&
5001          { ac_try='test -s conftest$ac_exeext'
5002   { (eval echo "$as_me:5002: \"$ac_try\"") >&5
5003   (eval $ac_try) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit $ac_status); }; }; then
5007   cf_cv_ldflags_search_paths_first=yes
5008 else
5009   echo "$as_me: failed program was:" >&5
5010 cat conftest.$ac_ext >&5
5011 cf_cv_ldflags_search_paths_first=no
5012 fi
5013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5014                                 LDFLAGS=$cf_save_LDFLAGS
5015 fi
5016 echo "$as_me:5016: result: $cf_cv_ldflags_search_paths_first" >&5
5017 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5018                 if test $cf_cv_ldflags_search_paths_first = yes; then
5019                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5020                 fi
5021                 ;;
5022         hpux*)
5023                 # (tested with gcc 2.7.2 -- I don't have c89)
5024                 if test "$GCC" = yes; then
5025                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5026                 else
5027                         CC_SHARED_OPTS='+Z'
5028                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5029                 fi
5030                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5031                 # HP-UX shared libraries must be executable, and should be
5032                 # readonly to exploit a quirk in the memory manager.
5033                 INSTALL_LIB="-m 555"
5034                 ;;
5035         irix*)
5036                 if test "$cf_cv_ld_rpath" = yes ; then
5037                         if test "$GCC" = yes; then
5038                                 cf_ld_rpath_opt="-Wl,-rpath,"
5039                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5040                         else
5041                                 cf_ld_rpath_opt="-rpath "
5042                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5043                         fi
5044                 fi
5045                 # tested with IRIX 5.2 and 'cc'.
5046                 if test "$GCC" != yes; then
5047                         CC_SHARED_OPTS='-KPIC'
5048                 fi
5049                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5050                 cf_cv_rm_so_locs=yes
5051                 ;;
5052         linux*|gnu*|k*bsd*-gnu)
5053                 if test "$DFT_LWR_MODEL" = "shared" ; then
5054                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5055                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5056                 fi
5057                 if test "$cf_cv_ld_rpath" = yes ; then
5058                         cf_ld_rpath_opt="-Wl,-rpath,"
5059                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5060                 fi
5061
5062         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5063         if test "$cf_cv_shlib_version" = rel; then
5064                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5065         else
5066                 cf_shared_soname='`basename $@`'
5067         fi
5068
5069                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5070                 ;;
5071         openbsd[2-9].*)
5072                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5073                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5074                 ;;
5075         openbsd*|freebsd[12].*)
5076                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5077                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5078                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5079                 ;;
5080         freebsd*)
5081                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5082                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5083                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5084                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5085                         cf_ld_rpath_opt="-rpath "
5086                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5087                 fi
5088
5089         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5090         if test "$cf_cv_shlib_version" = rel; then
5091                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5092         else
5093                 cf_shared_soname='`basename $@`'
5094         fi
5095
5096                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5097                 ;;
5098         netbsd*)
5099                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5100                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5101                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5102                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5103                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5104                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5105                         if test "$cf_cv_shlib_version" = auto; then
5106                         if test -f /usr/libexec/ld.elf_so; then
5107                                 cf_cv_shlib_version=abi
5108                         else
5109                                 cf_cv_shlib_version=rel
5110                         fi
5111                         fi
5112
5113         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5114         if test "$cf_cv_shlib_version" = rel; then
5115                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5116         else
5117                 cf_shared_soname='`basename $@`'
5118         fi
5119
5120                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5121                 else
5122                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5123                 fi
5124                 ;;
5125         osf*|mls+*)
5126                 # tested with OSF/1 V3.2 and 'cc'
5127                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5128                 # link with shared libs).
5129                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5130                 case $host_os in
5131                 osf4*)
5132                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5133                         ;;
5134                 esac
5135                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5136                 if test "$DFT_LWR_MODEL" = "shared" ; then
5137                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5138                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5139                 fi
5140                 if test "$cf_cv_ld_rpath" = yes ; then
5141                         cf_ld_rpath_opt="-rpath"
5142                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5143                 fi
5144                 cf_cv_rm_so_locs=yes
5145                 ;;
5146         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5147                 # tested with osr5.0.5
5148                 if test "$GCC" != yes; then
5149                         CC_SHARED_OPTS='-belf -KPIC'
5150                 fi
5151                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5152                 if test "$cf_cv_ld_rpath" = yes ; then
5153                         # only way is to set LD_RUN_PATH but no switch for it
5154                         RUN_PATH=$libdir
5155                 fi
5156                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5157                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5158                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5159                 ;;
5160         sunos4*)
5161                 # tested with SunOS 4.1.1 and gcc 2.7.0
5162                 if test "$GCC" != yes; then
5163                         CC_SHARED_OPTS='-KPIC'
5164                 fi
5165                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5166                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5167                 ;;
5168         solaris2*)
5169                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5170                 if test "$GCC" != yes; then
5171                         CC_SHARED_OPTS='-KPIC'
5172                 fi
5173                 if test "$DFT_LWR_MODEL" = "shared" ; then
5174                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5175                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5176                 fi
5177                 if test "$cf_cv_ld_rpath" = yes ; then
5178                         cf_ld_rpath_opt="-R"
5179                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5180                 fi
5181
5182         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5183         if test "$cf_cv_shlib_version" = rel; then
5184                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5185         else
5186                 cf_shared_soname='`basename $@`'
5187         fi
5188
5189                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5190                 ;;
5191         sysv5uw7*|unix_sv*)
5192                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5193                 if test "$GCC" != yes; then
5194                         CC_SHARED_OPTS='-KPIC'
5195                 fi
5196                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5197                 ;;
5198         *)
5199                 CC_SHARED_OPTS='unknown'
5200                 MK_SHARED_LIB='echo unknown'
5201                 ;;
5202         esac
5203
5204         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5205         case "$cf_cv_shlib_version" in #(vi
5206         rel|abi)
5207                 case "$MK_SHARED_LIB" in #(vi
5208                 *'-o $@')
5209                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5210                         ;;
5211                 *)
5212                         { echo "$as_me:5212: WARNING: ignored --with-shlib-version" >&5
5213 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5214                         ;;
5215                 esac
5216                 ;;
5217         esac
5218
5219         if test -n "$cf_ld_rpath_opt" ; then
5220                 echo "$as_me:5220: checking if we need a space after rpath option" >&5
5221 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5222                 cf_save_LIBS="$LIBS"
5223                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5224                 cat >conftest.$ac_ext <<_ACEOF
5225 #line 5225 "configure"
5226 #include "confdefs.h"
5227
5228 int
5229 main ()
5230 {
5231
5232   ;
5233   return 0;
5234 }
5235 _ACEOF
5236 rm -f conftest.$ac_objext conftest$ac_exeext
5237 if { (eval echo "$as_me:5237: \"$ac_link\"") >&5
5238   (eval $ac_link) 2>&5
5239   ac_status=$?
5240   echo "$as_me:5240: \$? = $ac_status" >&5
5241   (exit $ac_status); } &&
5242          { ac_try='test -s conftest$ac_exeext'
5243   { (eval echo "$as_me:5243: \"$ac_try\"") >&5
5244   (eval $ac_try) 2>&5
5245   ac_status=$?
5246   echo "$as_me:5246: \$? = $ac_status" >&5
5247   (exit $ac_status); }; }; then
5248   cf_rpath_space=no
5249 else
5250   echo "$as_me: failed program was:" >&5
5251 cat conftest.$ac_ext >&5
5252 cf_rpath_space=yes
5253 fi
5254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5255                 LIBS="$cf_save_LIBS"
5256                 echo "$as_me:5256: result: $cf_rpath_space" >&5
5257 echo "${ECHO_T}$cf_rpath_space" >&6
5258                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5259                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5260         fi
5261
5262 if test "$CC_SHARED_OPTS" = "unknown"; then
5263         for model in $cf_list_models; do
5264                 if test "$model" = "shared"; then
5265                         { { echo "$as_me:5265: error: Shared libraries are not supported in this version" >&5
5266 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5267    { (exit 1); exit 1; }; }
5268                 fi
5269         done
5270 fi
5271
5272 ###############################################################################
5273
5274 ###     use option --disable-overwrite to leave out the link to -lcurses
5275 echo "$as_me:5275: checking if you wish to install ncurses overwriting curses" >&5
5276 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5277
5278 # Check whether --enable-overwrite or --disable-overwrite was given.
5279 if test "${enable_overwrite+set}" = set; then
5280   enableval="$enable_overwrite"
5281   with_overwrite=$enableval
5282 else
5283   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5284 fi;
5285 echo "$as_me:5285: result: $with_overwrite" >&5
5286 echo "${ECHO_T}$with_overwrite" >&6
5287
5288 echo "$as_me:5288: checking if external terminfo-database is used" >&5
5289 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5290
5291 # Check whether --enable-database or --disable-database was given.
5292 if test "${enable_database+set}" = set; then
5293   enableval="$enable_database"
5294   use_database=$enableval
5295 else
5296   use_database=yes
5297 fi;
5298 echo "$as_me:5298: result: $use_database" >&5
5299 echo "${ECHO_T}$use_database" >&6
5300
5301 case $host_os in #(vi
5302 os2*) #(vi
5303         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5304         ;;
5305 *) #(vi
5306         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5307         ;;
5308 esac
5309
5310         case $cf_cv_system_name in
5311         os2*)   PATHSEP=';'  ;;
5312         *)      PATHSEP=':'  ;;
5313         esac
5314
5315 if test "$use_database" != no ; then
5316         cat >>confdefs.h <<\EOF
5317 #define USE_DATABASE 1
5318 EOF
5319
5320         echo "$as_me:5320: checking which terminfo source-file will be installed" >&5
5321 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5322
5323 # Check whether --enable-database or --disable-database was given.
5324 if test "${enable_database+set}" = set; then
5325   enableval="$enable_database"
5326   TERMINFO_SRC=$withval
5327 fi;
5328         echo "$as_me:5328: result: $TERMINFO_SRC" >&5
5329 echo "${ECHO_T}$TERMINFO_SRC" >&6
5330
5331         echo "$as_me:5331: checking whether to use hashed database instead of directory/tree" >&5
5332 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5333
5334 # Check whether --with-hashed-db or --without-hashed-db was given.
5335 if test "${with_hashed_db+set}" = set; then
5336   withval="$with_hashed_db"
5337
5338 else
5339   with_hashed_db=no
5340 fi;
5341         echo "$as_me:5341: result: $with_hashed_db" >&5
5342 echo "${ECHO_T}$with_hashed_db" >&6
5343 fi
5344
5345 echo "$as_me:5345: checking for list of fallback descriptions" >&5
5346 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5347
5348 # Check whether --with-fallbacks or --without-fallbacks was given.
5349 if test "${with_fallbacks+set}" = set; then
5350   withval="$with_fallbacks"
5351   with_fallback=$withval
5352 else
5353   with_fallback=
5354 fi;
5355 echo "$as_me:5355: result: $with_fallback" >&5
5356 echo "${ECHO_T}$with_fallback" >&6
5357 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5358
5359 echo "$as_me:5359: checking if you want modern xterm or antique" >&5
5360 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5361
5362 # Check whether --with-xterm-new or --without-xterm-new was given.
5363 if test "${with_xterm_new+set}" = set; then
5364   withval="$with_xterm_new"
5365   with_xterm_new=$withval
5366 else
5367   with_xterm_new=yes
5368 fi;
5369 case $with_xterm_new in
5370 no)     with_xterm_new=xterm-old;;
5371 *)      with_xterm_new=xterm-new;;
5372 esac
5373 echo "$as_me:5373: result: $with_xterm_new" >&5
5374 echo "${ECHO_T}$with_xterm_new" >&6
5375 WHICH_XTERM=$with_xterm_new
5376
5377 MAKE_TERMINFO=
5378 if test "$use_database" = no ; then
5379         TERMINFO="${datadir}/terminfo"
5380         MAKE_TERMINFO="#"
5381 else
5382
5383 echo "$as_me:5383: checking for list of terminfo directories" >&5
5384 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5385
5386 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5387 if test "${with_terminfo_dirs+set}" = set; then
5388   withval="$with_terminfo_dirs"
5389
5390 else
5391   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5392 fi;
5393 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5394 cf_dst_path=
5395 for cf_src_path in $withval
5396 do
5397
5398 if test "x$prefix" != xNONE; then
5399   cf_path_syntax="$prefix"
5400 else
5401   cf_path_syntax="$ac_default_prefix"
5402 fi
5403
5404 case ".$cf_src_path" in #(vi
5405 .\$\(*\)*|.\'*\'*) #(vi
5406   ;;
5407 ..|./*|.\\*) #(vi
5408   ;;
5409 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5410   ;;
5411 .\${*prefix}*) #(vi
5412   eval cf_src_path="$cf_src_path"
5413   case ".$cf_src_path" in #(vi
5414   .NONE/*)
5415     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5416     ;;
5417   esac
5418   ;; #(vi
5419 .no|.NONE/*)
5420   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5421   ;;
5422 *)
5423   { { echo "$as_me:5423: error: expected a pathname, not \"$cf_src_path\"" >&5
5424 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5425    { (exit 1); exit 1; }; }
5426   ;;
5427 esac
5428
5429   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5430   cf_dst_path="${cf_dst_path}${cf_src_path}"
5431 done
5432 IFS="$ac_save_ifs"
5433
5434 eval 'TERMINFO_DIRS="$cf_dst_path"'
5435
5436 echo "$as_me:5436: result: $TERMINFO_DIRS" >&5
5437 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5438 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5439 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5440 EOF
5441
5442 echo "$as_me:5442: checking for default terminfo directory" >&5
5443 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5444
5445 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5446 if test "${with_default_terminfo_dir+set}" = set; then
5447   withval="$with_default_terminfo_dir"
5448
5449 else
5450   withval="${TERMINFO-${datadir}/terminfo}"
5451 fi;
5452 if test "x$prefix" != xNONE; then
5453   cf_path_syntax="$prefix"
5454 else
5455   cf_path_syntax="$ac_default_prefix"
5456 fi
5457
5458 case ".$withval" in #(vi
5459 .\$\(*\)*|.\'*\'*) #(vi
5460   ;;
5461 ..|./*|.\\*) #(vi
5462   ;;
5463 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5464   ;;
5465 .\${*prefix}*) #(vi
5466   eval withval="$withval"
5467   case ".$withval" in #(vi
5468   .NONE/*)
5469     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5470     ;;
5471   esac
5472   ;; #(vi
5473 .no|.NONE/*)
5474   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5475   ;;
5476 *)
5477   { { echo "$as_me:5477: error: expected a pathname, not \"$withval\"" >&5
5478 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5479    { (exit 1); exit 1; }; }
5480   ;;
5481 esac
5482
5483 TERMINFO="$withval"
5484
5485 echo "$as_me:5485: result: $TERMINFO" >&5
5486 echo "${ECHO_T}$TERMINFO" >&6
5487 cat >>confdefs.h <<EOF
5488 #define TERMINFO "$TERMINFO"
5489 EOF
5490
5491 fi
5492
5493 ###     use option --disable-big-core to make tic run on small machines
5494 ###     We need 4Mb, check if we can allocate 50% more than that.
5495 echo "$as_me:5495: checking if big-core option selected" >&5
5496 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5497
5498 # Check whether --enable-big-core or --disable-big-core was given.
5499 if test "${enable_big_core+set}" = set; then
5500   enableval="$enable_big_core"
5501   with_big_core=$enableval
5502 else
5503   if test "$cross_compiling" = yes; then
5504   with_big_core=no
5505 else
5506   cat >conftest.$ac_ext <<_ACEOF
5507 #line 5507 "configure"
5508 #include "confdefs.h"
5509
5510 #include <stdlib.h>
5511 #include <string.h>
5512 int main() {
5513         unsigned long n = 6000000L;
5514         char *s = malloc(n);
5515         if (s != 0)
5516                 s[0] = s[n-1] = 0;
5517         ${cf_cv_main_return:-return}(s == 0);
5518 }
5519 _ACEOF
5520 rm -f conftest$ac_exeext
5521 if { (eval echo "$as_me:5521: \"$ac_link\"") >&5
5522   (eval $ac_link) 2>&5
5523   ac_status=$?
5524   echo "$as_me:5524: \$? = $ac_status" >&5
5525   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5526   { (eval echo "$as_me:5526: \"$ac_try\"") >&5
5527   (eval $ac_try) 2>&5
5528   ac_status=$?
5529   echo "$as_me:5529: \$? = $ac_status" >&5
5530   (exit $ac_status); }; }; then
5531   with_big_core=yes
5532 else
5533   echo "$as_me: program exited with status $ac_status" >&5
5534 echo "$as_me: failed program was:" >&5
5535 cat conftest.$ac_ext >&5
5536 with_big_core=no
5537 fi
5538 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5539 fi
5540 fi;
5541 echo "$as_me:5541: result: $with_big_core" >&5
5542 echo "${ECHO_T}$with_big_core" >&6
5543 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5544 #define HAVE_BIG_CORE 1
5545 EOF
5546
5547 ###     use option --enable-termcap to compile in the termcap fallback support
5548 echo "$as_me:5548: checking if you want termcap-fallback support" >&5
5549 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5550
5551 # Check whether --enable-termcap or --disable-termcap was given.
5552 if test "${enable_termcap+set}" = set; then
5553   enableval="$enable_termcap"
5554   with_termcap=$enableval
5555 else
5556   with_termcap=no
5557 fi;
5558 echo "$as_me:5558: result: $with_termcap" >&5
5559 echo "${ECHO_T}$with_termcap" >&6
5560
5561 if test "$with_termcap" != "yes" ; then
5562         if test "$use_database" = no ; then
5563                 if test -z "$with_fallback" ; then
5564                         { { echo "$as_me:5564: error: You have disabled the database w/o specifying fallbacks" >&5
5565 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5566    { (exit 1); exit 1; }; }
5567                 fi
5568         fi
5569         cat >>confdefs.h <<\EOF
5570 #define PURE_TERMINFO 1
5571 EOF
5572
5573 else
5574
5575 if test "$with_ticlib" != no ; then
5576         { { echo "$as_me:5576: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5577 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5578    { (exit 1); exit 1; }; }
5579 fi
5580
5581 cat >>confdefs.h <<\EOF
5582 #define USE_TERMCAP 1
5583 EOF
5584
5585 echo "$as_me:5585: checking for list of termcap files" >&5
5586 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5587
5588 # Check whether --with-termpath or --without-termpath was given.
5589 if test "${with_termpath+set}" = set; then
5590   withval="$with_termpath"
5591
5592 else
5593   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5594 fi;
5595 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5596 cf_dst_path=
5597 for cf_src_path in $withval
5598 do
5599
5600 if test "x$prefix" != xNONE; then
5601   cf_path_syntax="$prefix"
5602 else
5603   cf_path_syntax="$ac_default_prefix"
5604 fi
5605
5606 case ".$cf_src_path" in #(vi
5607 .\$\(*\)*|.\'*\'*) #(vi
5608   ;;
5609 ..|./*|.\\*) #(vi
5610   ;;
5611 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5612   ;;
5613 .\${*prefix}*) #(vi
5614   eval cf_src_path="$cf_src_path"
5615   case ".$cf_src_path" in #(vi
5616   .NONE/*)
5617     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5618     ;;
5619   esac
5620   ;; #(vi
5621 .no|.NONE/*)
5622   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5623   ;;
5624 *)
5625   { { echo "$as_me:5625: error: expected a pathname, not \"$cf_src_path\"" >&5
5626 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5627    { (exit 1); exit 1; }; }
5628   ;;
5629 esac
5630
5631   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5632   cf_dst_path="${cf_dst_path}${cf_src_path}"
5633 done
5634 IFS="$ac_save_ifs"
5635
5636 eval 'TERMPATH="$cf_dst_path"'
5637
5638 echo "$as_me:5638: result: $TERMPATH" >&5
5639 echo "${ECHO_T}$TERMPATH" >&6
5640 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5641 #define TERMPATH "$TERMPATH"
5642 EOF
5643
5644 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5645 echo "$as_me:5645: checking if fast termcap-loader is needed" >&5
5646 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5647
5648 # Check whether --enable-getcap or --disable-getcap was given.
5649 if test "${enable_getcap+set}" = set; then
5650   enableval="$enable_getcap"
5651   with_getcap=$enableval
5652 else
5653   with_getcap=no
5654 fi;
5655 echo "$as_me:5655: result: $with_getcap" >&5
5656 echo "${ECHO_T}$with_getcap" >&6
5657 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5658 #define USE_GETCAP 1
5659 EOF
5660
5661 echo "$as_me:5661: checking if translated termcaps will be cached in ~/.terminfo" >&5
5662 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5663
5664 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5665 if test "${enable_getcap_cache+set}" = set; then
5666   enableval="$enable_getcap_cache"
5667   with_getcap_cache=$enableval
5668 else
5669   with_getcap_cache=no
5670 fi;
5671 echo "$as_me:5671: result: $with_getcap_cache" >&5
5672 echo "${ECHO_T}$with_getcap_cache" >&6
5673 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5674 #define USE_GETCAP_CACHE 1
5675 EOF
5676
5677 fi
5678
5679 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5680 echo "$as_me:5680: checking if ~/.terminfo is wanted" >&5
5681 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5682
5683 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5684 if test "${enable_home_terminfo+set}" = set; then
5685   enableval="$enable_home_terminfo"
5686   with_home_terminfo=$enableval
5687 else
5688   with_home_terminfo=yes
5689 fi;
5690 echo "$as_me:5690: result: $with_home_terminfo" >&5
5691 echo "${ECHO_T}$with_home_terminfo" >&6
5692 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5693 #define USE_HOME_TERMINFO 1
5694 EOF
5695
5696 echo "$as_me:5696: checking if you want to use restricted environment when running as root" >&5
5697 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5698
5699 # Check whether --enable-root-environ or --disable-root-environ was given.
5700 if test "${enable_root_environ+set}" = set; then
5701   enableval="$enable_root_environ"
5702   with_root_environ=$enableval
5703 else
5704   with_root_environ=yes
5705 fi;
5706 echo "$as_me:5706: result: $with_root_environ" >&5
5707 echo "${ECHO_T}$with_root_environ" >&6
5708 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5709 #define USE_ROOT_ENVIRON 1
5710 EOF
5711
5712 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5713 ###   to reduce storage requirements for the terminfo database.
5714
5715 for ac_func in \
5716         remove \
5717         unlink
5718 do
5719 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5720 echo "$as_me:5720: checking for $ac_func" >&5
5721 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5722 if eval "test \"\${$as_ac_var+set}\" = set"; then
5723   echo $ECHO_N "(cached) $ECHO_C" >&6
5724 else
5725   cat >conftest.$ac_ext <<_ACEOF
5726 #line 5726 "configure"
5727 #include "confdefs.h"
5728 /* System header to define __stub macros and hopefully few prototypes,
5729     which can conflict with char $ac_func (); below.  */
5730 #include <assert.h>
5731 /* Override any gcc2 internal prototype to avoid an error.  */
5732 #ifdef __cplusplus
5733 extern "C"
5734 #endif
5735 /* We use char because int might match the return type of a gcc2
5736    builtin and then its argument prototype would still apply.  */
5737 char $ac_func ();
5738 char (*f) ();
5739
5740 int
5741 main ()
5742 {
5743 /* The GNU C library defines this for functions which it implements
5744     to always fail with ENOSYS.  Some functions are actually named
5745     something starting with __ and the normal name is an alias.  */
5746 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5747 choke me
5748 #else
5749 f = $ac_func;
5750 #endif
5751
5752   ;
5753   return 0;
5754 }
5755 _ACEOF
5756 rm -f conftest.$ac_objext conftest$ac_exeext
5757 if { (eval echo "$as_me:5757: \"$ac_link\"") >&5
5758   (eval $ac_link) 2>&5
5759   ac_status=$?
5760   echo "$as_me:5760: \$? = $ac_status" >&5
5761   (exit $ac_status); } &&
5762          { ac_try='test -s conftest$ac_exeext'
5763   { (eval echo "$as_me:5763: \"$ac_try\"") >&5
5764   (eval $ac_try) 2>&5
5765   ac_status=$?
5766   echo "$as_me:5766: \$? = $ac_status" >&5
5767   (exit $ac_status); }; }; then
5768   eval "$as_ac_var=yes"
5769 else
5770   echo "$as_me: failed program was:" >&5
5771 cat conftest.$ac_ext >&5
5772 eval "$as_ac_var=no"
5773 fi
5774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5775 fi
5776 echo "$as_me:5776: result: `eval echo '${'$as_ac_var'}'`" >&5
5777 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5778 if test `eval echo '${'$as_ac_var'}'` = yes; then
5779   cat >>confdefs.h <<EOF
5780 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5781 EOF
5782
5783 fi
5784 done
5785
5786 if test "$cross_compiling" = yes ; then
5787
5788 for ac_func in \
5789                 link \
5790                 symlink
5791 do
5792 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5793 echo "$as_me:5793: checking for $ac_func" >&5
5794 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5795 if eval "test \"\${$as_ac_var+set}\" = set"; then
5796   echo $ECHO_N "(cached) $ECHO_C" >&6
5797 else
5798   cat >conftest.$ac_ext <<_ACEOF
5799 #line 5799 "configure"
5800 #include "confdefs.h"
5801 /* System header to define __stub macros and hopefully few prototypes,
5802     which can conflict with char $ac_func (); below.  */
5803 #include <assert.h>
5804 /* Override any gcc2 internal prototype to avoid an error.  */
5805 #ifdef __cplusplus
5806 extern "C"
5807 #endif
5808 /* We use char because int might match the return type of a gcc2
5809    builtin and then its argument prototype would still apply.  */
5810 char $ac_func ();
5811 char (*f) ();
5812
5813 int
5814 main ()
5815 {
5816 /* The GNU C library defines this for functions which it implements
5817     to always fail with ENOSYS.  Some functions are actually named
5818     something starting with __ and the normal name is an alias.  */
5819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5820 choke me
5821 #else
5822 f = $ac_func;
5823 #endif
5824
5825   ;
5826   return 0;
5827 }
5828 _ACEOF
5829 rm -f conftest.$ac_objext conftest$ac_exeext
5830 if { (eval echo "$as_me:5830: \"$ac_link\"") >&5
5831   (eval $ac_link) 2>&5
5832   ac_status=$?
5833   echo "$as_me:5833: \$? = $ac_status" >&5
5834   (exit $ac_status); } &&
5835          { ac_try='test -s conftest$ac_exeext'
5836   { (eval echo "$as_me:5836: \"$ac_try\"") >&5
5837   (eval $ac_try) 2>&5
5838   ac_status=$?
5839   echo "$as_me:5839: \$? = $ac_status" >&5
5840   (exit $ac_status); }; }; then
5841   eval "$as_ac_var=yes"
5842 else
5843   echo "$as_me: failed program was:" >&5
5844 cat conftest.$ac_ext >&5
5845 eval "$as_ac_var=no"
5846 fi
5847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5848 fi
5849 echo "$as_me:5849: result: `eval echo '${'$as_ac_var'}'`" >&5
5850 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5851 if test `eval echo '${'$as_ac_var'}'` = yes; then
5852   cat >>confdefs.h <<EOF
5853 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5854 EOF
5855
5856 fi
5857 done
5858
5859 else
5860         echo "$as_me:5860: checking if link/symlink functions work" >&5
5861 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5862 if test "${cf_cv_link_funcs+set}" = set; then
5863   echo $ECHO_N "(cached) $ECHO_C" >&6
5864 else
5865
5866                 cf_cv_link_funcs=
5867                 for cf_func in link symlink ; do
5868                         if test "$cross_compiling" = yes; then
5869
5870                         eval 'ac_cv_func_'$cf_func'=error'
5871 else
5872   cat >conftest.$ac_ext <<_ACEOF
5873 #line 5873 "configure"
5874 #include "confdefs.h"
5875
5876 #include <sys/types.h>
5877 #include <sys/stat.h>
5878 #ifdef HAVE_UNISTD_H
5879 #include <unistd.h>
5880 #endif
5881 int main()
5882 {
5883         int fail = 0;
5884         char *src = "config.log";
5885         char *dst = "conftest.chk";
5886         struct stat src_sb;
5887         struct stat dst_sb;
5888
5889         stat(src, &src_sb);
5890         fail = ($cf_func("config.log", "conftest.chk") < 0)
5891             || (stat(dst, &dst_sb) < 0)
5892             || (dst_sb.st_mtime != src_sb.st_mtime);
5893 #ifdef HAVE_UNLINK
5894         unlink(dst);
5895 #else
5896         remove(dst);
5897 #endif
5898         ${cf_cv_main_return:-return} (fail);
5899 }
5900
5901 _ACEOF
5902 rm -f conftest$ac_exeext
5903 if { (eval echo "$as_me:5903: \"$ac_link\"") >&5
5904   (eval $ac_link) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5908   { (eval echo "$as_me:5908: \"$ac_try\"") >&5
5909   (eval $ac_try) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); }; }; then
5913
5914                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5915                         eval 'ac_cv_func_'$cf_func'=yes'
5916 else
5917   echo "$as_me: program exited with status $ac_status" >&5
5918 echo "$as_me: failed program was:" >&5
5919 cat conftest.$ac_ext >&5
5920
5921                         eval 'ac_cv_func_'$cf_func'=no'
5922 fi
5923 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5924 fi
5925                 done
5926                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5927
5928 fi
5929 echo "$as_me:5929: result: $cf_cv_link_funcs" >&5
5930 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5931         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5932 #define HAVE_LINK 1
5933 EOF
5934
5935         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5936 #define HAVE_SYMLINK 1
5937 EOF
5938
5939 fi
5940
5941 with_links=no
5942 with_symlinks=no
5943
5944 # soft links (symbolic links) are useful for some systems where hard links do
5945 # not work, or to make it simpler to copy terminfo trees around.
5946 if test "$ac_cv_func_symlink" = yes ; then
5947     echo "$as_me:5947: checking if tic should use symbolic links" >&5
5948 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5949
5950 # Check whether --enable-symlinks or --disable-symlinks was given.
5951 if test "${enable_symlinks+set}" = set; then
5952   enableval="$enable_symlinks"
5953   with_symlinks=$enableval
5954 else
5955   with_symlinks=no
5956 fi;
5957     echo "$as_me:5957: result: $with_symlinks" >&5
5958 echo "${ECHO_T}$with_symlinks" >&6
5959 fi
5960
5961 # If we have hard links and did not choose to use soft links instead, there is
5962 # no reason to make this choice optional - use the hard links.
5963 if test "$with_symlinks" = no ; then
5964     echo "$as_me:5964: checking if tic should use hard links" >&5
5965 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5966     if test "$ac_cv_func_link" = yes ; then
5967         with_links=yes
5968     else
5969         with_links=no
5970     fi
5971     echo "$as_me:5971: result: $with_links" >&5
5972 echo "${ECHO_T}$with_links" >&6
5973 fi
5974
5975 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5976 #define USE_LINKS 1
5977 EOF
5978
5979 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5980 #define USE_SYMLINKS 1
5981 EOF
5982
5983 ###   use option --enable-broken-linker to force on use of broken-linker support
5984 echo "$as_me:5984: checking if you want broken-linker support code" >&5
5985 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5986
5987 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5988 if test "${enable_broken_linker+set}" = set; then
5989   enableval="$enable_broken_linker"
5990   with_broken_linker=$enableval
5991 else
5992   with_broken_linker=${BROKEN_LINKER-no}
5993 fi;
5994 echo "$as_me:5994: result: $with_broken_linker" >&5
5995 echo "${ECHO_T}$with_broken_linker" >&6
5996
5997 BROKEN_LINKER=0
5998 if test "$with_broken_linker" = yes ; then
5999         cat >>confdefs.h <<\EOF
6000 #define BROKEN_LINKER 1
6001 EOF
6002
6003         BROKEN_LINKER=1
6004 elif test "$DFT_LWR_MODEL" = shared ; then
6005         case $cf_cv_system_name in #(vi
6006         cygwin*)
6007                 cat >>confdefs.h <<\EOF
6008 #define BROKEN_LINKER 1
6009 EOF
6010
6011                 BROKEN_LINKER=1
6012                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6013
6014                 ;;
6015         esac
6016 fi
6017
6018 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6019 echo "$as_me:6019: checking if tputs should process BSD-style prefix padding" >&5
6020 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6021
6022 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6023 if test "${enable_bsdpad+set}" = set; then
6024   enableval="$enable_bsdpad"
6025   with_bsdpad=$enableval
6026 else
6027   with_bsdpad=no
6028 fi;
6029 echo "$as_me:6029: result: $with_bsdpad" >&5
6030 echo "${ECHO_T}$with_bsdpad" >&6
6031 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6032 #define BSD_TPUTS 1
6033 EOF
6034
6035 ###   use option --enable-widec to turn on use of wide-character support
6036 NCURSES_CH_T=chtype
6037 NCURSES_LIBUTF8=0
6038
6039 NEED_WCHAR_H=0
6040 NCURSES_MBSTATE_T=0
6041 NCURSES_WCHAR_T=0
6042 NCURSES_WINT_T=0
6043
6044 # Check to define _XOPEN_SOURCE "automatically"
6045
6046 echo "$as_me:6046: checking if $CC -U and -D options work together" >&5
6047 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6048 if test "${cf_cv_cc_u_d_options+set}" = set; then
6049   echo $ECHO_N "(cached) $ECHO_C" >&6
6050 else
6051
6052         cf_save_CPPFLAGS="$CPPFLAGS"
6053         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6054         cat >conftest.$ac_ext <<_ACEOF
6055 #line 6055 "configure"
6056 #include "confdefs.h"
6057
6058 int
6059 main ()
6060 {
6061
6062 #ifndef U_D_OPTIONS
6063 make an undefined-error
6064 #endif
6065 #ifdef  D_U_OPTIONS
6066 make a defined-error
6067 #endif
6068
6069   ;
6070   return 0;
6071 }
6072 _ACEOF
6073 rm -f conftest.$ac_objext
6074 if { (eval echo "$as_me:6074: \"$ac_compile\"") >&5
6075   (eval $ac_compile) 2>&5
6076   ac_status=$?
6077   echo "$as_me:6077: \$? = $ac_status" >&5
6078   (exit $ac_status); } &&
6079          { ac_try='test -s conftest.$ac_objext'
6080   { (eval echo "$as_me:6080: \"$ac_try\"") >&5
6081   (eval $ac_try) 2>&5
6082   ac_status=$?
6083   echo "$as_me:6083: \$? = $ac_status" >&5
6084   (exit $ac_status); }; }; then
6085
6086         cf_cv_cc_u_d_options=yes
6087 else
6088   echo "$as_me: failed program was:" >&5
6089 cat conftest.$ac_ext >&5
6090
6091         cf_cv_cc_u_d_options=no
6092 fi
6093 rm -f conftest.$ac_objext conftest.$ac_ext
6094         CPPFLAGS="$cf_save_CPPFLAGS"
6095
6096 fi
6097 echo "$as_me:6097: result: $cf_cv_cc_u_d_options" >&5
6098 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6099
6100 cf_XOPEN_SOURCE=500
6101 cf_POSIX_C_SOURCE=199506L
6102
6103 case $host_os in #(vi
6104 aix[45]*) #(vi
6105         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6106         ;;
6107 freebsd*) #(vi
6108         # 5.x headers associate
6109         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6110         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6111         cf_POSIX_C_SOURCE=200112L
6112         cf_XOPEN_SOURCE=600
6113         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6114         ;;
6115 hpux*) #(vi
6116         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6117         ;;
6118 irix[56].*) #(vi
6119         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6120         ;;
6121 linux*|gnu*|k*bsd*-gnu) #(vi
6122
6123 echo "$as_me:6123: checking if we must define _GNU_SOURCE" >&5
6124 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6125 if test "${cf_cv_gnu_source+set}" = set; then
6126   echo $ECHO_N "(cached) $ECHO_C" >&6
6127 else
6128
6129 cat >conftest.$ac_ext <<_ACEOF
6130 #line 6130 "configure"
6131 #include "confdefs.h"
6132 #include <sys/types.h>
6133 int
6134 main ()
6135 {
6136
6137 #ifndef _XOPEN_SOURCE
6138 make an error
6139 #endif
6140   ;
6141   return 0;
6142 }
6143 _ACEOF
6144 rm -f conftest.$ac_objext
6145 if { (eval echo "$as_me:6145: \"$ac_compile\"") >&5
6146   (eval $ac_compile) 2>&5
6147   ac_status=$?
6148   echo "$as_me:6148: \$? = $ac_status" >&5
6149   (exit $ac_status); } &&
6150          { ac_try='test -s conftest.$ac_objext'
6151   { (eval echo "$as_me:6151: \"$ac_try\"") >&5
6152   (eval $ac_try) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit $ac_status); }; }; then
6156   cf_cv_gnu_source=no
6157 else
6158   echo "$as_me: failed program was:" >&5
6159 cat conftest.$ac_ext >&5
6160 cf_save="$CPPFLAGS"
6161          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6162          cat >conftest.$ac_ext <<_ACEOF
6163 #line 6163 "configure"
6164 #include "confdefs.h"
6165 #include <sys/types.h>
6166 int
6167 main ()
6168 {
6169
6170 #ifdef _XOPEN_SOURCE
6171 make an error
6172 #endif
6173   ;
6174   return 0;
6175 }
6176 _ACEOF
6177 rm -f conftest.$ac_objext
6178 if { (eval echo "$as_me:6178: \"$ac_compile\"") >&5
6179   (eval $ac_compile) 2>&5
6180   ac_status=$?
6181   echo "$as_me:6181: \$? = $ac_status" >&5
6182   (exit $ac_status); } &&
6183          { ac_try='test -s conftest.$ac_objext'
6184   { (eval echo "$as_me:6184: \"$ac_try\"") >&5
6185   (eval $ac_try) 2>&5
6186   ac_status=$?
6187   echo "$as_me:6187: \$? = $ac_status" >&5
6188   (exit $ac_status); }; }; then
6189   cf_cv_gnu_source=no
6190 else
6191   echo "$as_me: failed program was:" >&5
6192 cat conftest.$ac_ext >&5
6193 cf_cv_gnu_source=yes
6194 fi
6195 rm -f conftest.$ac_objext conftest.$ac_ext
6196         CPPFLAGS="$cf_save"
6197
6198 fi
6199 rm -f conftest.$ac_objext conftest.$ac_ext
6200
6201 fi
6202 echo "$as_me:6202: result: $cf_cv_gnu_source" >&5
6203 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6204 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6205
6206         ;;
6207 mirbsd*) #(vi
6208         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6209         ;;
6210 netbsd*) #(vi
6211         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6212         ;;
6213 openbsd*) #(vi
6214         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6215         ;;
6216 osf[45]*) #(vi
6217         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6218         ;;
6219 nto-qnx*) #(vi
6220         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6221         ;;
6222 sco*) #(vi
6223         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6224         ;;
6225 solaris*) #(vi
6226         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6227         ;;
6228 *)
6229         echo "$as_me:6229: checking if we should define _XOPEN_SOURCE" >&5
6230 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6231 if test "${cf_cv_xopen_source+set}" = set; then
6232   echo $ECHO_N "(cached) $ECHO_C" >&6
6233 else
6234
6235         cat >conftest.$ac_ext <<_ACEOF
6236 #line 6236 "configure"
6237 #include "confdefs.h"
6238 #include <sys/types.h>
6239 int
6240 main ()
6241 {
6242
6243 #ifndef _XOPEN_SOURCE
6244 make an error
6245 #endif
6246   ;
6247   return 0;
6248 }
6249 _ACEOF
6250 rm -f conftest.$ac_objext
6251 if { (eval echo "$as_me:6251: \"$ac_compile\"") >&5
6252   (eval $ac_compile) 2>&5
6253   ac_status=$?
6254   echo "$as_me:6254: \$? = $ac_status" >&5
6255   (exit $ac_status); } &&
6256          { ac_try='test -s conftest.$ac_objext'
6257   { (eval echo "$as_me:6257: \"$ac_try\"") >&5
6258   (eval $ac_try) 2>&5
6259   ac_status=$?
6260   echo "$as_me:6260: \$? = $ac_status" >&5
6261   (exit $ac_status); }; }; then
6262   cf_cv_xopen_source=no
6263 else
6264   echo "$as_me: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6266 cf_save="$CPPFLAGS"
6267          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6268          cat >conftest.$ac_ext <<_ACEOF
6269 #line 6269 "configure"
6270 #include "confdefs.h"
6271 #include <sys/types.h>
6272 int
6273 main ()
6274 {
6275
6276 #ifdef _XOPEN_SOURCE
6277 make an error
6278 #endif
6279   ;
6280   return 0;
6281 }
6282 _ACEOF
6283 rm -f conftest.$ac_objext
6284 if { (eval echo "$as_me:6284: \"$ac_compile\"") >&5
6285   (eval $ac_compile) 2>&5
6286   ac_status=$?
6287   echo "$as_me:6287: \$? = $ac_status" >&5
6288   (exit $ac_status); } &&
6289          { ac_try='test -s conftest.$ac_objext'
6290   { (eval echo "$as_me:6290: \"$ac_try\"") >&5
6291   (eval $ac_try) 2>&5
6292   ac_status=$?
6293   echo "$as_me:6293: \$? = $ac_status" >&5
6294   (exit $ac_status); }; }; then
6295   cf_cv_xopen_source=no
6296 else
6297   echo "$as_me: failed program was:" >&5
6298 cat conftest.$ac_ext >&5
6299 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6300 fi
6301 rm -f conftest.$ac_objext conftest.$ac_ext
6302         CPPFLAGS="$cf_save"
6303
6304 fi
6305 rm -f conftest.$ac_objext conftest.$ac_ext
6306
6307 fi
6308 echo "$as_me:6308: result: $cf_cv_xopen_source" >&5
6309 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6310         if test "$cf_cv_xopen_source" != no ; then
6311
6312 # remove _XOPEN_SOURCE symbol from $CFLAGS
6313 CFLAGS=`echo "$CFLAGS" | \
6314         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6315                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6316
6317 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6318 CPPFLAGS=`echo "$CPPFLAGS" | \
6319         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6320                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6321
6322                 test "$cf_cv_cc_u_d_options" = yes && \
6323                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6324                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6325         fi
6326
6327 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6328
6329 cf_save_CFLAGS="$CFLAGS"
6330 cf_save_CPPFLAGS="$CPPFLAGS"
6331
6332 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6333 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6334         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6335                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6336
6337 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6338 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6339         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6340                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6341
6342 echo "$as_me:6342: checking if we should define _POSIX_C_SOURCE" >&5
6343 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6344 if test "${cf_cv_posix_c_source+set}" = set; then
6345   echo $ECHO_N "(cached) $ECHO_C" >&6
6346 else
6347
6348 echo "(line 6348) testing if the symbol is already defined go no further ..." 1>&5
6349
6350         cat >conftest.$ac_ext <<_ACEOF
6351 #line 6351 "configure"
6352 #include "confdefs.h"
6353 #include <sys/types.h>
6354 int
6355 main ()
6356 {
6357
6358 #ifndef _POSIX_C_SOURCE
6359 make an error
6360 #endif
6361   ;
6362   return 0;
6363 }
6364 _ACEOF
6365 rm -f conftest.$ac_objext
6366 if { (eval echo "$as_me:6366: \"$ac_compile\"") >&5
6367   (eval $ac_compile) 2>&5
6368   ac_status=$?
6369   echo "$as_me:6369: \$? = $ac_status" >&5
6370   (exit $ac_status); } &&
6371          { ac_try='test -s conftest.$ac_objext'
6372   { (eval echo "$as_me:6372: \"$ac_try\"") >&5
6373   (eval $ac_try) 2>&5
6374   ac_status=$?
6375   echo "$as_me:6375: \$? = $ac_status" >&5
6376   (exit $ac_status); }; }; then
6377   cf_cv_posix_c_source=no
6378 else
6379   echo "$as_me: failed program was:" >&5
6380 cat conftest.$ac_ext >&5
6381 cf_want_posix_source=no
6382          case .$cf_POSIX_C_SOURCE in #(vi
6383          .[12]??*) #(vi
6384                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6385                 ;;
6386          .2) #(vi
6387                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6388                 cf_want_posix_source=yes
6389                 ;;
6390          .*)
6391                 cf_want_posix_source=yes
6392                 ;;
6393          esac
6394          if test "$cf_want_posix_source" = yes ; then
6395                 cat >conftest.$ac_ext <<_ACEOF
6396 #line 6396 "configure"
6397 #include "confdefs.h"
6398 #include <sys/types.h>
6399 int
6400 main ()
6401 {
6402
6403 #ifdef _POSIX_SOURCE
6404 make an error
6405 #endif
6406   ;
6407   return 0;
6408 }
6409 _ACEOF
6410 rm -f conftest.$ac_objext
6411 if { (eval echo "$as_me:6411: \"$ac_compile\"") >&5
6412   (eval $ac_compile) 2>&5
6413   ac_status=$?
6414   echo "$as_me:6414: \$? = $ac_status" >&5
6415   (exit $ac_status); } &&
6416          { ac_try='test -s conftest.$ac_objext'
6417   { (eval echo "$as_me:6417: \"$ac_try\"") >&5
6418   (eval $ac_try) 2>&5
6419   ac_status=$?
6420   echo "$as_me:6420: \$? = $ac_status" >&5
6421   (exit $ac_status); }; }; then
6422   :
6423 else
6424   echo "$as_me: failed program was:" >&5
6425 cat conftest.$ac_ext >&5
6426 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6427 fi
6428 rm -f conftest.$ac_objext conftest.$ac_ext
6429          fi
6430
6431 echo "(line 6431) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6432
6433          CFLAGS="$cf_trim_CFLAGS"
6434          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6435
6436 echo "(line 6436) testing if the second compile does not leave our definition intact error ..." 1>&5
6437
6438          cat >conftest.$ac_ext <<_ACEOF
6439 #line 6439 "configure"
6440 #include "confdefs.h"
6441 #include <sys/types.h>
6442 int
6443 main ()
6444 {
6445
6446 #ifndef _POSIX_C_SOURCE
6447 make an error
6448 #endif
6449   ;
6450   return 0;
6451 }
6452 _ACEOF
6453 rm -f conftest.$ac_objext
6454 if { (eval echo "$as_me:6454: \"$ac_compile\"") >&5
6455   (eval $ac_compile) 2>&5
6456   ac_status=$?
6457   echo "$as_me:6457: \$? = $ac_status" >&5
6458   (exit $ac_status); } &&
6459          { ac_try='test -s conftest.$ac_objext'
6460   { (eval echo "$as_me:6460: \"$ac_try\"") >&5
6461   (eval $ac_try) 2>&5
6462   ac_status=$?
6463   echo "$as_me:6463: \$? = $ac_status" >&5
6464   (exit $ac_status); }; }; then
6465   :
6466 else
6467   echo "$as_me: failed program was:" >&5
6468 cat conftest.$ac_ext >&5
6469 cf_cv_posix_c_source=no
6470 fi
6471 rm -f conftest.$ac_objext conftest.$ac_ext
6472          CFLAGS="$cf_save_CFLAGS"
6473          CPPFLAGS="$cf_save_CPPFLAGS"
6474
6475 fi
6476 rm -f conftest.$ac_objext conftest.$ac_ext
6477
6478 fi
6479 echo "$as_me:6479: result: $cf_cv_posix_c_source" >&5
6480 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6481
6482 if test "$cf_cv_posix_c_source" != no ; then
6483         CFLAGS="$cf_trim_CFLAGS"
6484         CPPFLAGS="$cf_trim_CPPFLAGS"
6485         if test "$cf_cv_cc_u_d_options" = yes ; then
6486                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6487                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6488                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6489         fi
6490         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6491 fi
6492
6493         ;;
6494 esac
6495
6496 # Work around breakage on OS X
6497
6498 echo "$as_me:6498: checking if SIGWINCH is defined" >&5
6499 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6500 if test "${cf_cv_define_sigwinch+set}" = set; then
6501   echo $ECHO_N "(cached) $ECHO_C" >&6
6502 else
6503
6504         cat >conftest.$ac_ext <<_ACEOF
6505 #line 6505 "configure"
6506 #include "confdefs.h"
6507
6508 #include <sys/types.h>
6509 #include <sys/signal.h>
6510
6511 int
6512 main ()
6513 {
6514 int x = SIGWINCH
6515   ;
6516   return 0;
6517 }
6518 _ACEOF
6519 rm -f conftest.$ac_objext
6520 if { (eval echo "$as_me:6520: \"$ac_compile\"") >&5
6521   (eval $ac_compile) 2>&5
6522   ac_status=$?
6523   echo "$as_me:6523: \$? = $ac_status" >&5
6524   (exit $ac_status); } &&
6525          { ac_try='test -s conftest.$ac_objext'
6526   { (eval echo "$as_me:6526: \"$ac_try\"") >&5
6527   (eval $ac_try) 2>&5
6528   ac_status=$?
6529   echo "$as_me:6529: \$? = $ac_status" >&5
6530   (exit $ac_status); }; }; then
6531   cf_cv_define_sigwinch=yes
6532 else
6533   echo "$as_me: failed program was:" >&5
6534 cat conftest.$ac_ext >&5
6535 cat >conftest.$ac_ext <<_ACEOF
6536 #line 6536 "configure"
6537 #include "confdefs.h"
6538
6539 #undef _XOPEN_SOURCE
6540 #undef _POSIX_SOURCE
6541 #undef _POSIX_C_SOURCE
6542 #include <sys/types.h>
6543 #include <sys/signal.h>
6544
6545 int
6546 main ()
6547 {
6548 int x = SIGWINCH
6549   ;
6550   return 0;
6551 }
6552 _ACEOF
6553 rm -f conftest.$ac_objext
6554 if { (eval echo "$as_me:6554: \"$ac_compile\"") >&5
6555   (eval $ac_compile) 2>&5
6556   ac_status=$?
6557   echo "$as_me:6557: \$? = $ac_status" >&5
6558   (exit $ac_status); } &&
6559          { ac_try='test -s conftest.$ac_objext'
6560   { (eval echo "$as_me:6560: \"$ac_try\"") >&5
6561   (eval $ac_try) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); }; }; then
6565   cf_cv_define_sigwinch=maybe
6566 else
6567   echo "$as_me: failed program was:" >&5
6568 cat conftest.$ac_ext >&5
6569 cf_cv_define_sigwinch=no
6570 fi
6571 rm -f conftest.$ac_objext conftest.$ac_ext
6572
6573 fi
6574 rm -f conftest.$ac_objext conftest.$ac_ext
6575
6576 fi
6577 echo "$as_me:6577: result: $cf_cv_define_sigwinch" >&5
6578 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6579
6580 if test "$cf_cv_define_sigwinch" = maybe ; then
6581 echo "$as_me:6581: checking for actual SIGWINCH definition" >&5
6582 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6583 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6584   echo $ECHO_N "(cached) $ECHO_C" >&6
6585 else
6586
6587 cf_cv_fixup_sigwinch=unknown
6588 cf_sigwinch=32
6589 while test $cf_sigwinch != 1
6590 do
6591         cat >conftest.$ac_ext <<_ACEOF
6592 #line 6592 "configure"
6593 #include "confdefs.h"
6594
6595 #undef _XOPEN_SOURCE
6596 #undef _POSIX_SOURCE
6597 #undef _POSIX_C_SOURCE
6598 #include <sys/types.h>
6599 #include <sys/signal.h>
6600
6601 int
6602 main ()
6603 {
6604
6605 #if SIGWINCH != $cf_sigwinch
6606 make an error
6607 #endif
6608 int x = SIGWINCH
6609   ;
6610   return 0;
6611 }
6612 _ACEOF
6613 rm -f conftest.$ac_objext
6614 if { (eval echo "$as_me:6614: \"$ac_compile\"") >&5
6615   (eval $ac_compile) 2>&5
6616   ac_status=$?
6617   echo "$as_me:6617: \$? = $ac_status" >&5
6618   (exit $ac_status); } &&
6619          { ac_try='test -s conftest.$ac_objext'
6620   { (eval echo "$as_me:6620: \"$ac_try\"") >&5
6621   (eval $ac_try) 2>&5
6622   ac_status=$?
6623   echo "$as_me:6623: \$? = $ac_status" >&5
6624   (exit $ac_status); }; }; then
6625   cf_cv_fixup_sigwinch=$cf_sigwinch
6626          break
6627 else
6628   echo "$as_me: failed program was:" >&5
6629 cat conftest.$ac_ext >&5
6630 fi
6631 rm -f conftest.$ac_objext conftest.$ac_ext
6632
6633 cf_sigwinch=`expr $cf_sigwinch - 1`
6634 done
6635
6636 fi
6637 echo "$as_me:6637: result: $cf_cv_fixup_sigwinch" >&5
6638 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6639
6640         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6641                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6642         fi
6643 fi
6644
6645 # Checks for CODESET support.
6646
6647   echo "$as_me:6647: checking for nl_langinfo and CODESET" >&5
6648 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6649 if test "${am_cv_langinfo_codeset+set}" = set; then
6650   echo $ECHO_N "(cached) $ECHO_C" >&6
6651 else
6652   cat >conftest.$ac_ext <<_ACEOF
6653 #line 6653 "configure"
6654 #include "confdefs.h"
6655 #include <langinfo.h>
6656 int
6657 main ()
6658 {
6659 char* cs = nl_langinfo(CODESET);
6660   ;
6661   return 0;
6662 }
6663 _ACEOF
6664 rm -f conftest.$ac_objext conftest$ac_exeext
6665 if { (eval echo "$as_me:6665: \"$ac_link\"") >&5
6666   (eval $ac_link) 2>&5
6667   ac_status=$?
6668   echo "$as_me:6668: \$? = $ac_status" >&5
6669   (exit $ac_status); } &&
6670          { ac_try='test -s conftest$ac_exeext'
6671   { (eval echo "$as_me:6671: \"$ac_try\"") >&5
6672   (eval $ac_try) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit $ac_status); }; }; then
6676   am_cv_langinfo_codeset=yes
6677 else
6678   echo "$as_me: failed program was:" >&5
6679 cat conftest.$ac_ext >&5
6680 am_cv_langinfo_codeset=no
6681 fi
6682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6683
6684 fi
6685 echo "$as_me:6685: result: $am_cv_langinfo_codeset" >&5
6686 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6687   if test $am_cv_langinfo_codeset = yes; then
6688
6689 cat >>confdefs.h <<\EOF
6690 #define HAVE_LANGINFO_CODESET 1
6691 EOF
6692
6693   fi
6694
6695 # use these variables to work around a defect in gcc's fixincludes.
6696 NCURSES_OK_WCHAR_T=
6697 NCURSES_OK_WINT_T=
6698
6699 echo "$as_me:6699: checking if you want wide-character code" >&5
6700 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6701
6702 # Check whether --enable-widec or --disable-widec was given.
6703 if test "${enable_widec+set}" = set; then
6704   enableval="$enable_widec"
6705   with_widec=$enableval
6706 else
6707   with_widec=no
6708 fi;
6709 echo "$as_me:6709: result: $with_widec" >&5
6710 echo "${ECHO_T}$with_widec" >&6
6711 if test "$with_widec" = yes ; then
6712         LIB_SUFFIX="w${LIB_SUFFIX}"
6713         cat >>confdefs.h <<\EOF
6714 #define USE_WIDEC_SUPPORT 1
6715 EOF
6716
6717 echo "$as_me:6717: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6718 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6719 cat >conftest.$ac_ext <<_ACEOF
6720 #line 6720 "configure"
6721 #include "confdefs.h"
6722 #include <sys/types.h>
6723
6724 int
6725 main ()
6726 {
6727
6728 #ifndef _XOPEN_SOURCE_EXTENDED
6729 make an error
6730 #endif
6731   ;
6732   return 0;
6733 }
6734 _ACEOF
6735 rm -f conftest.$ac_objext
6736 if { (eval echo "$as_me:6736: \"$ac_compile\"") >&5
6737   (eval $ac_compile) 2>&5
6738   ac_status=$?
6739   echo "$as_me:6739: \$? = $ac_status" >&5
6740   (exit $ac_status); } &&
6741          { ac_try='test -s conftest.$ac_objext'
6742   { (eval echo "$as_me:6742: \"$ac_try\"") >&5
6743   (eval $ac_try) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); }; }; then
6747   cf_result=no
6748 else
6749   echo "$as_me: failed program was:" >&5
6750 cat conftest.$ac_ext >&5
6751 cf_result=yes
6752 fi
6753 rm -f conftest.$ac_objext conftest.$ac_ext
6754 echo "$as_me:6754: result: $cf_result" >&5
6755 echo "${ECHO_T}$cf_result" >&6
6756
6757 if test "$cf_result" = yes ; then
6758         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6759 elif test "x" != "x" ; then
6760         echo "$as_me:6760: checking checking for compatible value versus " >&5
6761 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6762         cat >conftest.$ac_ext <<_ACEOF
6763 #line 6763 "configure"
6764 #include "confdefs.h"
6765 #include <sys/types.h>
6766
6767 int
6768 main ()
6769 {
6770
6771 #if _XOPEN_SOURCE_EXTENDED- < 0
6772 make an error
6773 #endif
6774   ;
6775   return 0;
6776 }
6777 _ACEOF
6778 rm -f conftest.$ac_objext
6779 if { (eval echo "$as_me:6779: \"$ac_compile\"") >&5
6780   (eval $ac_compile) 2>&5
6781   ac_status=$?
6782   echo "$as_me:6782: \$? = $ac_status" >&5
6783   (exit $ac_status); } &&
6784          { ac_try='test -s conftest.$ac_objext'
6785   { (eval echo "$as_me:6785: \"$ac_try\"") >&5
6786   (eval $ac_try) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); }; }; then
6790   cf_result=yes
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794 cf_result=no
6795 fi
6796 rm -f conftest.$ac_objext conftest.$ac_ext
6797         echo "$as_me:6797: result: $cf_result" >&5
6798 echo "${ECHO_T}$cf_result" >&6
6799         if test "$cf_result" = no ; then
6800                 # perhaps we can override it - try...
6801                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6802         fi
6803 fi
6804
6805         # with_overwrite=no
6806         NCURSES_CH_T=cchar_t
6807
6808 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6809 do
6810 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6811 echo "$as_me:6811: checking for $ac_func" >&5
6812 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6813 if eval "test \"\${$as_ac_var+set}\" = set"; then
6814   echo $ECHO_N "(cached) $ECHO_C" >&6
6815 else
6816   cat >conftest.$ac_ext <<_ACEOF
6817 #line 6817 "configure"
6818 #include "confdefs.h"
6819 /* System header to define __stub macros and hopefully few prototypes,
6820     which can conflict with char $ac_func (); below.  */
6821 #include <assert.h>
6822 /* Override any gcc2 internal prototype to avoid an error.  */
6823 #ifdef __cplusplus
6824 extern "C"
6825 #endif
6826 /* We use char because int might match the return type of a gcc2
6827    builtin and then its argument prototype would still apply.  */
6828 char $ac_func ();
6829 char (*f) ();
6830
6831 int
6832 main ()
6833 {
6834 /* The GNU C library defines this for functions which it implements
6835     to always fail with ENOSYS.  Some functions are actually named
6836     something starting with __ and the normal name is an alias.  */
6837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6838 choke me
6839 #else
6840 f = $ac_func;
6841 #endif
6842
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext conftest$ac_exeext
6848 if { (eval echo "$as_me:6848: \"$ac_link\"") >&5
6849   (eval $ac_link) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest$ac_exeext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   eval "$as_ac_var=yes"
6860 else
6861   echo "$as_me: failed program was:" >&5
6862 cat conftest.$ac_ext >&5
6863 eval "$as_ac_var=no"
6864 fi
6865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6866 fi
6867 echo "$as_me:6867: result: `eval echo '${'$as_ac_var'}'`" >&5
6868 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6869 if test `eval echo '${'$as_ac_var'}'` = yes; then
6870   cat >>confdefs.h <<EOF
6871 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6872 EOF
6873
6874 fi
6875 done
6876
6877         if test "$ac_cv_func_putwc" != yes ; then
6878
6879 echo "$as_me:6879: checking for putwc in libutf8" >&5
6880 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6881 if test "${cf_cv_libutf8+set}" = set; then
6882   echo $ECHO_N "(cached) $ECHO_C" >&6
6883 else
6884
6885         cf_save_LIBS="$LIBS"
6886         LIBS="-lutf8 $LIBS"
6887 cat >conftest.$ac_ext <<_ACEOF
6888 #line 6888 "configure"
6889 #include "confdefs.h"
6890
6891 #include <libutf8.h>
6892 int
6893 main ()
6894 {
6895 putwc(0,0);
6896   ;
6897   return 0;
6898 }
6899 _ACEOF
6900 rm -f conftest.$ac_objext conftest$ac_exeext
6901 if { (eval echo "$as_me:6901: \"$ac_link\"") >&5
6902   (eval $ac_link) 2>&5
6903   ac_status=$?
6904   echo "$as_me:6904: \$? = $ac_status" >&5
6905   (exit $ac_status); } &&
6906          { ac_try='test -s conftest$ac_exeext'
6907   { (eval echo "$as_me:6907: \"$ac_try\"") >&5
6908   (eval $ac_try) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); }; }; then
6912   cf_cv_libutf8=yes
6913 else
6914   echo "$as_me: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 cf_cv_libutf8=no
6917 fi
6918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6919         LIBS="$cf_save_LIBS"
6920
6921 fi
6922 echo "$as_me:6922: result: $cf_cv_libutf8" >&5
6923 echo "${ECHO_T}$cf_cv_libutf8" >&6
6924
6925 if test "$cf_cv_libutf8" = yes ; then
6926         cat >>confdefs.h <<\EOF
6927 #define HAVE_LIBUTF8_H 1
6928 EOF
6929
6930         LIBS="-lutf8 $LIBS"
6931 fi
6932
6933                 if test "$cf_cv_libutf8" = yes ; then
6934                         NCURSES_LIBUTF8=1
6935                 fi
6936         fi
6937
6938 # This is needed on Tru64 5.0 to declare mbstate_t
6939 echo "$as_me:6939: checking if we must include wchar.h to declare mbstate_t" >&5
6940 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6941 if test "${cf_cv_mbstate_t+set}" = set; then
6942   echo $ECHO_N "(cached) $ECHO_C" >&6
6943 else
6944
6945 cat >conftest.$ac_ext <<_ACEOF
6946 #line 6946 "configure"
6947 #include "confdefs.h"
6948
6949 #include <stdlib.h>
6950 #include <stdarg.h>
6951 #include <stdio.h>
6952 #ifdef HAVE_LIBUTF8_H
6953 #include <libutf8.h>
6954 #endif
6955 int
6956 main ()
6957 {
6958 mbstate_t state
6959   ;
6960   return 0;
6961 }
6962 _ACEOF
6963 rm -f conftest.$ac_objext
6964 if { (eval echo "$as_me:6964: \"$ac_compile\"") >&5
6965   (eval $ac_compile) 2>&5
6966   ac_status=$?
6967   echo "$as_me:6967: \$? = $ac_status" >&5
6968   (exit $ac_status); } &&
6969          { ac_try='test -s conftest.$ac_objext'
6970   { (eval echo "$as_me:6970: \"$ac_try\"") >&5
6971   (eval $ac_try) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); }; }; then
6975   cf_cv_mbstate_t=no
6976 else
6977   echo "$as_me: failed program was:" >&5
6978 cat conftest.$ac_ext >&5
6979 cat >conftest.$ac_ext <<_ACEOF
6980 #line 6980 "configure"
6981 #include "confdefs.h"
6982
6983 #include <stdlib.h>
6984 #include <stdarg.h>
6985 #include <stdio.h>
6986 #include <wchar.h>
6987 #ifdef HAVE_LIBUTF8_H
6988 #include <libutf8.h>
6989 #endif
6990 int
6991 main ()
6992 {
6993 mbstate_t value
6994   ;
6995   return 0;
6996 }
6997 _ACEOF
6998 rm -f conftest.$ac_objext
6999 if { (eval echo "$as_me:6999: \"$ac_compile\"") >&5
7000   (eval $ac_compile) 2>&5
7001   ac_status=$?
7002   echo "$as_me:7002: \$? = $ac_status" >&5
7003   (exit $ac_status); } &&
7004          { ac_try='test -s conftest.$ac_objext'
7005   { (eval echo "$as_me:7005: \"$ac_try\"") >&5
7006   (eval $ac_try) 2>&5
7007   ac_status=$?
7008   echo "$as_me:7008: \$? = $ac_status" >&5
7009   (exit $ac_status); }; }; then
7010   cf_cv_mbstate_t=yes
7011 else
7012   echo "$as_me: failed program was:" >&5
7013 cat conftest.$ac_ext >&5
7014 cf_cv_mbstate_t=unknown
7015 fi
7016 rm -f conftest.$ac_objext conftest.$ac_ext
7017 fi
7018 rm -f conftest.$ac_objext conftest.$ac_ext
7019 fi
7020 echo "$as_me:7020: result: $cf_cv_mbstate_t" >&5
7021 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7022
7023 if test "$cf_cv_mbstate_t" = yes ; then
7024         cat >>confdefs.h <<\EOF
7025 #define NEED_WCHAR_H 1
7026 EOF
7027
7028         NEED_WCHAR_H=1
7029 fi
7030
7031 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7032 if test "$cf_cv_mbstate_t" = unknown ; then
7033         NCURSES_MBSTATE_T=1
7034 fi
7035
7036 # This is needed on Tru64 5.0 to declare wchar_t
7037 echo "$as_me:7037: checking if we must include wchar.h to declare wchar_t" >&5
7038 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7039 if test "${cf_cv_wchar_t+set}" = set; then
7040   echo $ECHO_N "(cached) $ECHO_C" >&6
7041 else
7042
7043 cat >conftest.$ac_ext <<_ACEOF
7044 #line 7044 "configure"
7045 #include "confdefs.h"
7046
7047 #include <stdlib.h>
7048 #include <stdarg.h>
7049 #include <stdio.h>
7050 #ifdef HAVE_LIBUTF8_H
7051 #include <libutf8.h>
7052 #endif
7053 int
7054 main ()
7055 {
7056 wchar_t state
7057   ;
7058   return 0;
7059 }
7060 _ACEOF
7061 rm -f conftest.$ac_objext
7062 if { (eval echo "$as_me:7062: \"$ac_compile\"") >&5
7063   (eval $ac_compile) 2>&5
7064   ac_status=$?
7065   echo "$as_me:7065: \$? = $ac_status" >&5
7066   (exit $ac_status); } &&
7067          { ac_try='test -s conftest.$ac_objext'
7068   { (eval echo "$as_me:7068: \"$ac_try\"") >&5
7069   (eval $ac_try) 2>&5
7070   ac_status=$?
7071   echo "$as_me:7071: \$? = $ac_status" >&5
7072   (exit $ac_status); }; }; then
7073   cf_cv_wchar_t=no
7074 else
7075   echo "$as_me: failed program was:" >&5
7076 cat conftest.$ac_ext >&5
7077 cat >conftest.$ac_ext <<_ACEOF
7078 #line 7078 "configure"
7079 #include "confdefs.h"
7080
7081 #include <stdlib.h>
7082 #include <stdarg.h>
7083 #include <stdio.h>
7084 #include <wchar.h>
7085 #ifdef HAVE_LIBUTF8_H
7086 #include <libutf8.h>
7087 #endif
7088 int
7089 main ()
7090 {
7091 wchar_t value
7092   ;
7093   return 0;
7094 }
7095 _ACEOF
7096 rm -f conftest.$ac_objext
7097 if { (eval echo "$as_me:7097: \"$ac_compile\"") >&5
7098   (eval $ac_compile) 2>&5
7099   ac_status=$?
7100   echo "$as_me:7100: \$? = $ac_status" >&5
7101   (exit $ac_status); } &&
7102          { ac_try='test -s conftest.$ac_objext'
7103   { (eval echo "$as_me:7103: \"$ac_try\"") >&5
7104   (eval $ac_try) 2>&5
7105   ac_status=$?
7106   echo "$as_me:7106: \$? = $ac_status" >&5
7107   (exit $ac_status); }; }; then
7108   cf_cv_wchar_t=yes
7109 else
7110   echo "$as_me: failed program was:" >&5
7111 cat conftest.$ac_ext >&5
7112 cf_cv_wchar_t=unknown
7113 fi
7114 rm -f conftest.$ac_objext conftest.$ac_ext
7115 fi
7116 rm -f conftest.$ac_objext conftest.$ac_ext
7117 fi
7118 echo "$as_me:7118: result: $cf_cv_wchar_t" >&5
7119 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7120
7121 if test "$cf_cv_wchar_t" = yes ; then
7122         cat >>confdefs.h <<\EOF
7123 #define NEED_WCHAR_H 1
7124 EOF
7125
7126         NEED_WCHAR_H=1
7127 fi
7128
7129 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7130 if test "$cf_cv_wchar_t" = unknown ; then
7131         NCURSES_WCHAR_T=1
7132 fi
7133
7134 # if we find wchar_t in either place, use substitution to provide a fallback.
7135 if test "$cf_cv_wchar_t" != unknown ; then
7136         NCURSES_OK_WCHAR_T=1
7137 fi
7138
7139 # This is needed on Tru64 5.0 to declare wint_t
7140 echo "$as_me:7140: checking if we must include wchar.h to declare wint_t" >&5
7141 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7142 if test "${cf_cv_wint_t+set}" = set; then
7143   echo $ECHO_N "(cached) $ECHO_C" >&6
7144 else
7145
7146 cat >conftest.$ac_ext <<_ACEOF
7147 #line 7147 "configure"
7148 #include "confdefs.h"
7149
7150 #include <stdlib.h>
7151 #include <stdarg.h>
7152 #include <stdio.h>
7153 #ifdef HAVE_LIBUTF8_H
7154 #include <libutf8.h>
7155 #endif
7156 int
7157 main ()
7158 {
7159 wint_t state
7160   ;
7161   return 0;
7162 }
7163 _ACEOF
7164 rm -f conftest.$ac_objext
7165 if { (eval echo "$as_me:7165: \"$ac_compile\"") >&5
7166   (eval $ac_compile) 2>&5
7167   ac_status=$?
7168   echo "$as_me:7168: \$? = $ac_status" >&5
7169   (exit $ac_status); } &&
7170          { ac_try='test -s conftest.$ac_objext'
7171   { (eval echo "$as_me:7171: \"$ac_try\"") >&5
7172   (eval $ac_try) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit $ac_status); }; }; then
7176   cf_cv_wint_t=no
7177 else
7178   echo "$as_me: failed program was:" >&5
7179 cat conftest.$ac_ext >&5
7180 cat >conftest.$ac_ext <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7183
7184 #include <stdlib.h>
7185 #include <stdarg.h>
7186 #include <stdio.h>
7187 #include <wchar.h>
7188 #ifdef HAVE_LIBUTF8_H
7189 #include <libutf8.h>
7190 #endif
7191 int
7192 main ()
7193 {
7194 wint_t value
7195   ;
7196   return 0;
7197 }
7198 _ACEOF
7199 rm -f conftest.$ac_objext
7200 if { (eval echo "$as_me:7200: \"$ac_compile\"") >&5
7201   (eval $ac_compile) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); } &&
7205          { ac_try='test -s conftest.$ac_objext'
7206   { (eval echo "$as_me:7206: \"$ac_try\"") >&5
7207   (eval $ac_try) 2>&5
7208   ac_status=$?
7209   echo "$as_me:7209: \$? = $ac_status" >&5
7210   (exit $ac_status); }; }; then
7211   cf_cv_wint_t=yes
7212 else
7213   echo "$as_me: failed program was:" >&5
7214 cat conftest.$ac_ext >&5
7215 cf_cv_wint_t=unknown
7216 fi
7217 rm -f conftest.$ac_objext conftest.$ac_ext
7218 fi
7219 rm -f conftest.$ac_objext conftest.$ac_ext
7220 fi
7221 echo "$as_me:7221: result: $cf_cv_wint_t" >&5
7222 echo "${ECHO_T}$cf_cv_wint_t" >&6
7223
7224 if test "$cf_cv_wint_t" = yes ; then
7225         cat >>confdefs.h <<\EOF
7226 #define NEED_WCHAR_H 1
7227 EOF
7228
7229         NEED_WCHAR_H=1
7230 fi
7231
7232 # if we do not find wint_t in either place, use substitution to provide a fallback.
7233 if test "$cf_cv_wint_t" = unknown ; then
7234         NCURSES_WINT_T=1
7235 fi
7236
7237 # if we find wint_t in either place, use substitution to provide a fallback.
7238 if test "$cf_cv_wint_t" != unknown ; then
7239         NCURSES_OK_WINT_T=1
7240 fi
7241
7242         if test "$NCURSES_MBSTATE_T" != 0; then
7243                 cat >>confdefs.h <<\EOF
7244 #define NEED_MBSTATE_T_DEF 1
7245 EOF
7246
7247         fi
7248 fi
7249
7250 ###   use option --disable-lp64 to allow long chtype
7251 case $cf_cv_abi_version in
7252 [345]*)
7253         default_with_lp64=no
7254         ;;
7255 *)
7256         default_with_lp64=yes
7257         ;;
7258 esac
7259
7260 echo "$as_me:7260: checking whether to enable _LP64 definition in curses.h" >&5
7261 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7262
7263 # Check whether --enable-lp64 or --disable-lp64 was given.
7264 if test "${enable_lp64+set}" = set; then
7265   enableval="$enable_lp64"
7266   with_lp64=$enableval
7267 else
7268   with_lp64=$default_with_lp64
7269 fi;
7270 echo "$as_me:7270: result: $with_lp64" >&5
7271 echo "${ECHO_T}$with_lp64" >&6
7272
7273 if test "$with_lp64" = yes ; then
7274         cf_cv_enable_lp64=1
7275 else
7276         cf_cv_enable_lp64=0
7277 fi
7278
7279 # Check whether --enable-largefile or --disable-largefile was given.
7280 if test "${enable_largefile+set}" = set; then
7281   enableval="$enable_largefile"
7282
7283 fi;
7284 if test "$enable_largefile" != no; then
7285
7286   echo "$as_me:7286: checking for special C compiler options needed for large files" >&5
7287 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7288 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7289   echo $ECHO_N "(cached) $ECHO_C" >&6
7290 else
7291   ac_cv_sys_largefile_CC=no
7292      if test "$GCC" != yes; then
7293        ac_save_CC=$CC
7294        while :; do
7295          # IRIX 6.2 and later do not support large files by default,
7296          # so use the C compiler's -n32 option if that helps.
7297          cat >conftest.$ac_ext <<_ACEOF
7298 #line 7298 "configure"
7299 #include "confdefs.h"
7300 #include <sys/types.h>
7301  /* Check that off_t can represent 2**63 - 1 correctly.
7302     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7303     since some C++ compilers masquerading as C compilers
7304     incorrectly reject 9223372036854775807.  */
7305 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7306   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7307                        && LARGE_OFF_T % 2147483647 == 1)
7308                       ? 1 : -1];
7309 int
7310 main ()
7311 {
7312
7313   ;
7314   return 0;
7315 }
7316 _ACEOF
7317          rm -f conftest.$ac_objext
7318 if { (eval echo "$as_me:7318: \"$ac_compile\"") >&5
7319   (eval $ac_compile) 2>&5
7320   ac_status=$?
7321   echo "$as_me:7321: \$? = $ac_status" >&5
7322   (exit $ac_status); } &&
7323          { ac_try='test -s conftest.$ac_objext'
7324   { (eval echo "$as_me:7324: \"$ac_try\"") >&5
7325   (eval $ac_try) 2>&5
7326   ac_status=$?
7327   echo "$as_me:7327: \$? = $ac_status" >&5
7328   (exit $ac_status); }; }; then
7329   break
7330 else
7331   echo "$as_me: failed program was:" >&5
7332 cat conftest.$ac_ext >&5
7333 fi
7334 rm -f conftest.$ac_objext
7335          CC="$CC -n32"
7336          rm -f conftest.$ac_objext
7337 if { (eval echo "$as_me:7337: \"$ac_compile\"") >&5
7338   (eval $ac_compile) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); } &&
7342          { ac_try='test -s conftest.$ac_objext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   ac_cv_sys_largefile_CC=' -n32'; break
7349 else
7350   echo "$as_me: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
7352 fi
7353 rm -f conftest.$ac_objext
7354          break
7355        done
7356        CC=$ac_save_CC
7357        rm -f conftest.$ac_ext
7358     fi
7359 fi
7360 echo "$as_me:7360: result: $ac_cv_sys_largefile_CC" >&5
7361 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7362   if test "$ac_cv_sys_largefile_CC" != no; then
7363     CC=$CC$ac_cv_sys_largefile_CC
7364   fi
7365
7366   echo "$as_me:7366: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7367 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7368 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7369   echo $ECHO_N "(cached) $ECHO_C" >&6
7370 else
7371   while :; do
7372   ac_cv_sys_file_offset_bits=no
7373   cat >conftest.$ac_ext <<_ACEOF
7374 #line 7374 "configure"
7375 #include "confdefs.h"
7376 #include <sys/types.h>
7377  /* Check that off_t can represent 2**63 - 1 correctly.
7378     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7379     since some C++ compilers masquerading as C compilers
7380     incorrectly reject 9223372036854775807.  */
7381 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7382   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7383                        && LARGE_OFF_T % 2147483647 == 1)
7384                       ? 1 : -1];
7385 int
7386 main ()
7387 {
7388
7389   ;
7390   return 0;
7391 }
7392 _ACEOF
7393 rm -f conftest.$ac_objext
7394 if { (eval echo "$as_me:7394: \"$ac_compile\"") >&5
7395   (eval $ac_compile) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); } &&
7399          { ac_try='test -s conftest.$ac_objext'
7400   { (eval echo "$as_me:7400: \"$ac_try\"") >&5
7401   (eval $ac_try) 2>&5
7402   ac_status=$?
7403   echo "$as_me:7403: \$? = $ac_status" >&5
7404   (exit $ac_status); }; }; then
7405   break
7406 else
7407   echo "$as_me: failed program was:" >&5
7408 cat conftest.$ac_ext >&5
7409 fi
7410 rm -f conftest.$ac_objext conftest.$ac_ext
7411   cat >conftest.$ac_ext <<_ACEOF
7412 #line 7412 "configure"
7413 #include "confdefs.h"
7414 #define _FILE_OFFSET_BITS 64
7415 #include <sys/types.h>
7416  /* Check that off_t can represent 2**63 - 1 correctly.
7417     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7418     since some C++ compilers masquerading as C compilers
7419     incorrectly reject 9223372036854775807.  */
7420 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7421   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7422                        && LARGE_OFF_T % 2147483647 == 1)
7423                       ? 1 : -1];
7424 int
7425 main ()
7426 {
7427
7428   ;
7429   return 0;
7430 }
7431 _ACEOF
7432 rm -f conftest.$ac_objext
7433 if { (eval echo "$as_me:7433: \"$ac_compile\"") >&5
7434   (eval $ac_compile) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); } &&
7438          { ac_try='test -s conftest.$ac_objext'
7439   { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7440   (eval $ac_try) 2>&5
7441   ac_status=$?
7442   echo "$as_me:7442: \$? = $ac_status" >&5
7443   (exit $ac_status); }; }; then
7444   ac_cv_sys_file_offset_bits=64; break
7445 else
7446   echo "$as_me: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 fi
7449 rm -f conftest.$ac_objext conftest.$ac_ext
7450   break
7451 done
7452 fi
7453 echo "$as_me:7453: result: $ac_cv_sys_file_offset_bits" >&5
7454 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7455 if test "$ac_cv_sys_file_offset_bits" != no; then
7456
7457 cat >>confdefs.h <<EOF
7458 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7459 EOF
7460
7461 fi
7462 rm -f conftest*
7463   echo "$as_me:7463: checking for _LARGE_FILES value needed for large files" >&5
7464 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7465 if test "${ac_cv_sys_large_files+set}" = set; then
7466   echo $ECHO_N "(cached) $ECHO_C" >&6
7467 else
7468   while :; do
7469   ac_cv_sys_large_files=no
7470   cat >conftest.$ac_ext <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473 #include <sys/types.h>
7474  /* Check that off_t can represent 2**63 - 1 correctly.
7475     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7476     since some C++ compilers masquerading as C compilers
7477     incorrectly reject 9223372036854775807.  */
7478 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7479   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7480                        && LARGE_OFF_T % 2147483647 == 1)
7481                       ? 1 : -1];
7482 int
7483 main ()
7484 {
7485
7486   ;
7487   return 0;
7488 }
7489 _ACEOF
7490 rm -f conftest.$ac_objext
7491 if { (eval echo "$as_me:7491: \"$ac_compile\"") >&5
7492   (eval $ac_compile) 2>&5
7493   ac_status=$?
7494   echo "$as_me:7494: \$? = $ac_status" >&5
7495   (exit $ac_status); } &&
7496          { ac_try='test -s conftest.$ac_objext'
7497   { (eval echo "$as_me:7497: \"$ac_try\"") >&5
7498   (eval $ac_try) 2>&5
7499   ac_status=$?
7500   echo "$as_me:7500: \$? = $ac_status" >&5
7501   (exit $ac_status); }; }; then
7502   break
7503 else
7504   echo "$as_me: failed program was:" >&5
7505 cat conftest.$ac_ext >&5
7506 fi
7507 rm -f conftest.$ac_objext conftest.$ac_ext
7508   cat >conftest.$ac_ext <<_ACEOF
7509 #line 7509 "configure"
7510 #include "confdefs.h"
7511 #define _LARGE_FILES 1
7512 #include <sys/types.h>
7513  /* Check that off_t can represent 2**63 - 1 correctly.
7514     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7515     since some C++ compilers masquerading as C compilers
7516     incorrectly reject 9223372036854775807.  */
7517 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7518   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7519                        && LARGE_OFF_T % 2147483647 == 1)
7520                       ? 1 : -1];
7521 int
7522 main ()
7523 {
7524
7525   ;
7526   return 0;
7527 }
7528 _ACEOF
7529 rm -f conftest.$ac_objext
7530 if { (eval echo "$as_me:7530: \"$ac_compile\"") >&5
7531   (eval $ac_compile) 2>&5
7532   ac_status=$?
7533   echo "$as_me:7533: \$? = $ac_status" >&5
7534   (exit $ac_status); } &&
7535          { ac_try='test -s conftest.$ac_objext'
7536   { (eval echo "$as_me:7536: \"$ac_try\"") >&5
7537   (eval $ac_try) 2>&5
7538   ac_status=$?
7539   echo "$as_me:7539: \$? = $ac_status" >&5
7540   (exit $ac_status); }; }; then
7541   ac_cv_sys_large_files=1; break
7542 else
7543   echo "$as_me: failed program was:" >&5
7544 cat conftest.$ac_ext >&5
7545 fi
7546 rm -f conftest.$ac_objext conftest.$ac_ext
7547   break
7548 done
7549 fi
7550 echo "$as_me:7550: result: $ac_cv_sys_large_files" >&5
7551 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7552 if test "$ac_cv_sys_large_files" != no; then
7553
7554 cat >>confdefs.h <<EOF
7555 #define _LARGE_FILES $ac_cv_sys_large_files
7556 EOF
7557
7558 fi
7559 rm -f conftest*
7560 fi
7561
7562     if test "$enable_largefile" != no ; then
7563         echo "$as_me:7563: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7564 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7565 if test "${ac_cv_sys_largefile_source+set}" = set; then
7566   echo $ECHO_N "(cached) $ECHO_C" >&6
7567 else
7568   while :; do
7569   ac_cv_sys_largefile_source=no
7570   cat >conftest.$ac_ext <<_ACEOF
7571 #line 7571 "configure"
7572 #include "confdefs.h"
7573 #include <stdio.h>
7574 int
7575 main ()
7576 {
7577 return !fseeko;
7578   ;
7579   return 0;
7580 }
7581 _ACEOF
7582 rm -f conftest.$ac_objext
7583 if { (eval echo "$as_me:7583: \"$ac_compile\"") >&5
7584   (eval $ac_compile) 2>&5
7585   ac_status=$?
7586   echo "$as_me:7586: \$? = $ac_status" >&5
7587   (exit $ac_status); } &&
7588          { ac_try='test -s conftest.$ac_objext'
7589   { (eval echo "$as_me:7589: \"$ac_try\"") >&5
7590   (eval $ac_try) 2>&5
7591   ac_status=$?
7592   echo "$as_me:7592: \$? = $ac_status" >&5
7593   (exit $ac_status); }; }; then
7594   break
7595 else
7596   echo "$as_me: failed program was:" >&5
7597 cat conftest.$ac_ext >&5
7598 fi
7599 rm -f conftest.$ac_objext conftest.$ac_ext
7600   cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #define _LARGEFILE_SOURCE 1
7604 #include <stdio.h>
7605 int
7606 main ()
7607 {
7608 return !fseeko;
7609   ;
7610   return 0;
7611 }
7612 _ACEOF
7613 rm -f conftest.$ac_objext
7614 if { (eval echo "$as_me:7614: \"$ac_compile\"") >&5
7615   (eval $ac_compile) 2>&5
7616   ac_status=$?
7617   echo "$as_me:7617: \$? = $ac_status" >&5
7618   (exit $ac_status); } &&
7619          { ac_try='test -s conftest.$ac_objext'
7620   { (eval echo "$as_me:7620: \"$ac_try\"") >&5
7621   (eval $ac_try) 2>&5
7622   ac_status=$?
7623   echo "$as_me:7623: \$? = $ac_status" >&5
7624   (exit $ac_status); }; }; then
7625   ac_cv_sys_largefile_source=1; break
7626 else
7627   echo "$as_me: failed program was:" >&5
7628 cat conftest.$ac_ext >&5
7629 fi
7630 rm -f conftest.$ac_objext conftest.$ac_ext
7631   break
7632 done
7633 fi
7634 echo "$as_me:7634: result: $ac_cv_sys_largefile_source" >&5
7635 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7636 if test "$ac_cv_sys_largefile_source" != no; then
7637
7638 cat >>confdefs.h <<EOF
7639 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7640 EOF
7641
7642 fi
7643 rm -f conftest*
7644
7645 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7646 # in glibc 2.1.3, but that breaks too many other things.
7647 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7648 echo "$as_me:7648: checking for fseeko" >&5
7649 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7650 if test "${ac_cv_func_fseeko+set}" = set; then
7651   echo $ECHO_N "(cached) $ECHO_C" >&6
7652 else
7653   cat >conftest.$ac_ext <<_ACEOF
7654 #line 7654 "configure"
7655 #include "confdefs.h"
7656 #include <stdio.h>
7657 int
7658 main ()
7659 {
7660 return fseeko && fseeko (stdin, 0, 0);
7661   ;
7662   return 0;
7663 }
7664 _ACEOF
7665 rm -f conftest.$ac_objext conftest$ac_exeext
7666 if { (eval echo "$as_me:7666: \"$ac_link\"") >&5
7667   (eval $ac_link) 2>&5
7668   ac_status=$?
7669   echo "$as_me:7669: \$? = $ac_status" >&5
7670   (exit $ac_status); } &&
7671          { ac_try='test -s conftest$ac_exeext'
7672   { (eval echo "$as_me:7672: \"$ac_try\"") >&5
7673   (eval $ac_try) 2>&5
7674   ac_status=$?
7675   echo "$as_me:7675: \$? = $ac_status" >&5
7676   (exit $ac_status); }; }; then
7677   ac_cv_func_fseeko=yes
7678 else
7679   echo "$as_me: failed program was:" >&5
7680 cat conftest.$ac_ext >&5
7681 ac_cv_func_fseeko=no
7682 fi
7683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684 fi
7685 echo "$as_me:7685: result: $ac_cv_func_fseeko" >&5
7686 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7687 if test $ac_cv_func_fseeko = yes; then
7688
7689 cat >>confdefs.h <<\EOF
7690 #define HAVE_FSEEKO 1
7691 EOF
7692
7693 fi
7694
7695         # Normally we would collect these definitions in the config.h,
7696         # but (like _XOPEN_SOURCE), some environments rely on having these
7697         # defined before any of the system headers are included.  Another
7698         # case comes up with C++, e.g., on AIX the compiler compiles the
7699         # header files by themselves before looking at the body files it is
7700         # told to compile.  For ncurses, those header files do not include
7701         # the config.h
7702         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7703         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7704
7705         echo "$as_me:7705: checking whether to use struct dirent64" >&5
7706 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7707 if test "${cf_cv_struct_dirent64+set}" = set; then
7708   echo $ECHO_N "(cached) $ECHO_C" >&6
7709 else
7710
7711                 cat >conftest.$ac_ext <<_ACEOF
7712 #line 7712 "configure"
7713 #include "confdefs.h"
7714
7715 #include <sys/types.h>
7716 #include <dirent.h>
7717
7718 int
7719 main ()
7720 {
7721
7722                 /* if transitional largefile support is setup, this is true */
7723                 extern struct dirent64 * readdir(DIR *);
7724                 struct dirent64 *x = readdir((DIR *)0);
7725                 struct dirent *y = readdir((DIR *)0);
7726                 int z = x - y;
7727
7728   ;
7729   return 0;
7730 }
7731 _ACEOF
7732 rm -f conftest.$ac_objext
7733 if { (eval echo "$as_me:7733: \"$ac_compile\"") >&5
7734   (eval $ac_compile) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); } &&
7738          { ac_try='test -s conftest.$ac_objext'
7739   { (eval echo "$as_me:7739: \"$ac_try\"") >&5
7740   (eval $ac_try) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); }; }; then
7744   cf_cv_struct_dirent64=yes
7745 else
7746   echo "$as_me: failed program was:" >&5
7747 cat conftest.$ac_ext >&5
7748 cf_cv_struct_dirent64=no
7749 fi
7750 rm -f conftest.$ac_objext conftest.$ac_ext
7751
7752 fi
7753 echo "$as_me:7753: result: $cf_cv_struct_dirent64" >&5
7754 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7755         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7756 #define HAVE_STRUCT_DIRENT64 1
7757 EOF
7758
7759     fi
7760
7761 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7762 echo "$as_me:7762: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7763 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7764
7765 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7766 if test "${enable_tparm_varargs+set}" = set; then
7767   enableval="$enable_tparm_varargs"
7768   with_tparm_varargs=$enableval
7769 else
7770   with_tparm_varargs=yes
7771 fi;
7772 echo "$as_me:7772: result: $with_tparm_varargs" >&5
7773 echo "${ECHO_T}$with_tparm_varargs" >&6
7774 NCURSES_TPARM_VARARGS=0
7775 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7776
7777 ###   use option --with-bool to override bool's type
7778 echo "$as_me:7778: checking for type of bool" >&5
7779 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7780
7781 # Check whether --with-bool or --without-bool was given.
7782 if test "${with_bool+set}" = set; then
7783   withval="$with_bool"
7784   NCURSES_BOOL="$withval"
7785 else
7786   NCURSES_BOOL=auto
7787 fi;
7788 echo "$as_me:7788: result: $NCURSES_BOOL" >&5
7789 echo "${ECHO_T}$NCURSES_BOOL" >&6
7790
7791 echo "$as_me:7791: checking for alternate terminal capabilities file" >&5
7792 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7793
7794 # Check whether --with-caps or --without-caps was given.
7795 if test "${with_caps+set}" = set; then
7796   withval="$with_caps"
7797   TERMINFO_CAPS=Caps.$withval
7798 else
7799   TERMINFO_CAPS=Caps
7800 fi;
7801 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7802 echo "$as_me:7802: result: $TERMINFO_CAPS" >&5
7803 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7804
7805 ###   use option --with-chtype to override chtype's type
7806 echo "$as_me:7806: checking for type of chtype" >&5
7807 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7808
7809 # Check whether --with-chtype or --without-chtype was given.
7810 if test "${with_chtype+set}" = set; then
7811   withval="$with_chtype"
7812   NCURSES_CHTYPE="$withval"
7813 else
7814   NCURSES_CHTYPE=auto
7815 fi;
7816 echo "$as_me:7816: result: $NCURSES_CHTYPE" >&5
7817 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7818
7819 ###   use option --with-ospeed to override ospeed's type
7820 echo "$as_me:7820: checking for type of ospeed" >&5
7821 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7822
7823 # Check whether --with-ospeed or --without-ospeed was given.
7824 if test "${with_ospeed+set}" = set; then
7825   withval="$with_ospeed"
7826   NCURSES_OSPEED="$withval"
7827 else
7828   NCURSES_OSPEED=short
7829 fi;
7830 echo "$as_me:7830: result: $NCURSES_OSPEED" >&5
7831 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7832
7833 ###   use option --with-mmask-t to override mmask_t's type
7834 echo "$as_me:7834: checking for type of mmask_t" >&5
7835 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7836
7837 # Check whether --with-mmask-t or --without-mmask-t was given.
7838 if test "${with_mmask_t+set}" = set; then
7839   withval="$with_mmask_t"
7840   NCURSES_MMASK_T="$withval"
7841 else
7842   NCURSES_MMASK_T=auto
7843 fi;
7844 echo "$as_me:7844: result: $NCURSES_MMASK_T" >&5
7845 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7846
7847 ### Enable compiling-in rcs id's
7848 echo "$as_me:7848: checking if RCS identifiers should be compiled-in" >&5
7849 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7850
7851 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7852 if test "${with_rcs_ids+set}" = set; then
7853   withval="$with_rcs_ids"
7854   with_rcs_ids=$withval
7855 else
7856   with_rcs_ids=no
7857 fi;
7858 echo "$as_me:7858: result: $with_rcs_ids" >&5
7859 echo "${ECHO_T}$with_rcs_ids" >&6
7860 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7861 #define USE_RCS_IDS 1
7862 EOF
7863
7864 ###############################################################################
7865
7866 echo "$as_me:7866: checking format of man-pages" >&5
7867 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7868
7869 # Check whether --with-manpage-format or --without-manpage-format was given.
7870 if test "${with_manpage_format+set}" = set; then
7871   withval="$with_manpage_format"
7872   MANPAGE_FORMAT=$withval
7873 else
7874   MANPAGE_FORMAT=unknown
7875 fi;
7876
7877 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7878 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7879
7880 cf_unknown=
7881
7882 case $MANPAGE_FORMAT in
7883 unknown)
7884   if test -z "$MANPATH" ; then
7885     MANPATH="/usr/man:/usr/share/man"
7886   fi
7887
7888   # look for the 'date' man-page (it's most likely to be installed!)
7889   MANPAGE_FORMAT=
7890   cf_preform=no
7891   cf_catonly=yes
7892   cf_example=date
7893
7894   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7895   for cf_dir in $MANPATH; do
7896     test -z "$cf_dir" && cf_dir=/usr/man
7897     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
7898     do
7899       cf_test=`echo $cf_name | sed -e 's/*//'`
7900       if test "x$cf_test" = "x$cf_name" ; then
7901
7902         case "$cf_name" in
7903         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7904         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7905         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7906         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7907         esac
7908
7909         case "$cf_name" in
7910         $cf_dir/man*)
7911           cf_catonly=no
7912           ;;
7913         $cf_dir/cat*)
7914           cf_preform=yes
7915           ;;
7916         esac
7917         break
7918       fi
7919
7920       # if we found a match in either man* or cat*, stop looking
7921       if test -n "$MANPAGE_FORMAT" ; then
7922         cf_found=no
7923         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7924         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7925         case "$cf_name" in
7926         $cf_dir/cat*)
7927           cf_found=yes
7928           ;;
7929         esac
7930         test $cf_found=yes && break
7931       fi
7932     done
7933     # only check the first directory in $MANPATH where we find manpages
7934     if test -n "$MANPAGE_FORMAT" ; then
7935        break
7936     fi
7937   done
7938   # if we did not find the example, just assume it is normal
7939   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7940   IFS="$ac_save_ifs"
7941   ;;
7942 *)
7943   for cf_option in $MANPAGE_FORMAT; do
7944      case $cf_option in #(vi
7945      gzip|compress|BSDI|normal|formatted|catonly)
7946        ;;
7947      *)
7948        cf_unknown="$cf_unknown $cf_option"
7949        ;;
7950      esac
7951   done
7952   ;;
7953 esac
7954
7955 echo "$as_me:7955: result: $MANPAGE_FORMAT" >&5
7956 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7957 if test -n "$cf_unknown" ; then
7958   { echo "$as_me:7958: WARNING: Unexpected manpage-format $cf_unknown" >&5
7959 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7960 fi
7961
7962 echo "$as_me:7962: checking for manpage renaming" >&5
7963 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7964
7965 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7966 if test "${with_manpage_renames+set}" = set; then
7967   withval="$with_manpage_renames"
7968   MANPAGE_RENAMES=$withval
7969 else
7970   MANPAGE_RENAMES=yes
7971 fi;
7972
7973 case ".$MANPAGE_RENAMES" in #(vi
7974 .no) #(vi
7975   ;;
7976 .|.yes)
7977   # Debian 'man' program?
7978   if test -f /etc/debian_version ; then
7979     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7980   else
7981     MANPAGE_RENAMES=no
7982   fi
7983   ;;
7984 esac
7985
7986 if test "$MANPAGE_RENAMES" != no ; then
7987   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7988     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7989   elif test ! -f $MANPAGE_RENAMES ; then
7990     { { echo "$as_me:7990: error: not a filename: $MANPAGE_RENAMES" >&5
7991 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7992    { (exit 1); exit 1; }; }
7993   fi
7994
7995   test ! -d man && mkdir man
7996
7997   # Construct a sed-script to perform renaming within man-pages
7998   if test -n "$MANPAGE_RENAMES" ; then
7999     test ! -d man && mkdir man
8000     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8001   fi
8002 fi
8003
8004 echo "$as_me:8004: result: $MANPAGE_RENAMES" >&5
8005 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8006
8007 echo "$as_me:8007: checking if manpage aliases will be installed" >&5
8008 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8009
8010 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8011 if test "${with_manpage_aliases+set}" = set; then
8012   withval="$with_manpage_aliases"
8013   MANPAGE_ALIASES=$withval
8014 else
8015   MANPAGE_ALIASES=yes
8016 fi;
8017
8018 echo "$as_me:8018: result: $MANPAGE_ALIASES" >&5
8019 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8020
8021 if test "$LN_S" = "ln -s"; then
8022         cf_use_symlinks=yes
8023 else
8024         cf_use_symlinks=no
8025 fi
8026
8027 MANPAGE_SYMLINKS=no
8028 if test "$MANPAGE_ALIASES" = yes ; then
8029 echo "$as_me:8029: checking if manpage symlinks should be used" >&5
8030 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8031
8032 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8033 if test "${with_manpage_symlinks+set}" = set; then
8034   withval="$with_manpage_symlinks"
8035   MANPAGE_SYMLINKS=$withval
8036 else
8037   MANPAGE_SYMLINKS=$cf_use_symlinks
8038 fi;
8039
8040 if test "$$cf_use_symlinks" = no; then
8041 if test "$MANPAGE_SYMLINKS" = yes ; then
8042         { echo "$as_me:8042: WARNING: cannot make symlinks" >&5
8043 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8044         MANPAGE_SYMLINKS=no
8045 fi
8046 fi
8047
8048 echo "$as_me:8048: result: $MANPAGE_SYMLINKS" >&5
8049 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8050 fi
8051
8052 echo "$as_me:8052: checking for manpage tbl" >&5
8053 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8054
8055 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8056 if test "${with_manpage_tbl+set}" = set; then
8057   withval="$with_manpage_tbl"
8058   MANPAGE_TBL=$withval
8059 else
8060   MANPAGE_TBL=no
8061 fi;
8062
8063 echo "$as_me:8063: result: $MANPAGE_TBL" >&5
8064 echo "${ECHO_T}$MANPAGE_TBL" >&6
8065
8066   if test "$prefix" = "NONE" ; then
8067      cf_prefix="$ac_default_prefix"
8068   else
8069      cf_prefix="$prefix"
8070   fi
8071
8072   case "$MANPAGE_FORMAT" in # (vi
8073   *catonly*) # (vi
8074     cf_format=yes
8075     cf_inboth=no
8076     ;;
8077   *formatted*) # (vi
8078     cf_format=yes
8079     cf_inboth=yes
8080     ;;
8081   *)
8082     cf_format=no
8083     cf_inboth=no
8084     ;;
8085   esac
8086
8087 test ! -d man && mkdir man
8088
8089 cf_so_strip=
8090 cf_compress=
8091 case "$MANPAGE_FORMAT" in #(vi
8092 *compress*) #(vi
8093         cf_so_strip="Z"
8094         cf_compress=compress
8095   ;;
8096 *gzip*) #(vi
8097         cf_so_strip="gz"
8098         cf_compress=gzip
8099   ;;
8100 esac
8101
8102 cf_edit_man=./edit_man.sh
8103 cf_man_alias=`pwd`/man_alias.sed
8104
8105 cat >$cf_edit_man <<CF_EOF
8106 #! /bin/sh
8107 # this script is generated by the configure-script CF_MAN_PAGES macro.
8108
8109 prefix="$cf_prefix"
8110 datadir="$datadir"
8111
8112 NCURSES_MAJOR="$NCURSES_MAJOR"
8113 NCURSES_MINOR="$NCURSES_MINOR"
8114 NCURSES_PATCH="$NCURSES_PATCH"
8115
8116 NCURSES_OSPEED="$NCURSES_OSPEED"
8117 TERMINFO="$TERMINFO"
8118
8119 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8120
8121 INSTALL="$INSTALL"
8122 INSTALL_DATA="$INSTALL_DATA"
8123
8124 transform="$program_transform_name"
8125
8126 TMP=\${TMPDIR-/tmp}/man\$\$
8127 trap "rm -f \$TMP" 0 1 2 5 15
8128
8129 form=\$1
8130 shift || exit 1
8131
8132 verb=\$1
8133 shift || exit 1
8134
8135 mandir=\$1
8136 shift || exit 1
8137
8138 srcdir=\$1
8139 top_srcdir=\$srcdir/..
8140 shift || exit 1
8141
8142 if test "\$form" = normal ; then
8143         if test "$cf_format" = yes ; then
8144         if test "$cf_inboth" = no ; then
8145                 sh \$0 format \$verb \$mandir \$srcdir \$*
8146                 exit $?
8147         fi
8148         fi
8149         cf_subdir=\$mandir/man
8150         cf_tables=$MANPAGE_TBL
8151 else
8152         cf_subdir=\$mandir/cat
8153         cf_tables=yes
8154 fi
8155
8156 # process the list of source-files
8157 for i in \$* ; do
8158 case \$i in #(vi
8159 *.orig|*.rej) ;; #(vi
8160 *.[0-9]*)
8161         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8162         if test \$verb = installing ; then
8163         if test ! -d \$cf_subdir\${section} ; then
8164                 \$MKDIRS \$cf_subdir\$section
8165         fi
8166         fi
8167
8168         # replace variables in man page
8169         if test ! -f $cf_man_alias ; then
8170 cat >>$cf_man_alias <<-CF_EOF2
8171                 s,@DATADIR@,\$datadir,g
8172                 s,@TERMINFO@,\$TERMINFO,g
8173                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8174                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8175                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8176                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8177 CF_EOF
8178
8179         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8180         do
8181                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8182                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8183 cat >>$cf_edit_man <<-CF_EOF
8184                 s,@$cf_NAME@,$cf_name,
8185 CF_EOF
8186         done
8187
8188 cat >>$cf_edit_man <<CF_EOF
8189 CF_EOF2
8190                 echo "...made $cf_man_alias"
8191         fi
8192
8193         aliases=
8194         cf_source=\`basename \$i\`
8195         inalias=\$cf_source
8196         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8197         if test ! -f \$inalias ; then
8198                 echo .. skipped \$cf_source
8199                 continue
8200         fi
8201 CF_EOF
8202
8203 if test "$MANPAGE_ALIASES" != no ; then
8204 cat >>$cf_edit_man <<CF_EOF
8205         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8206 CF_EOF
8207 fi
8208
8209 if test "$MANPAGE_RENAMES" = no ; then
8210 cat >>$cf_edit_man <<CF_EOF
8211         # perform program transformations for section 1 man pages
8212         if test \$section = 1 ; then
8213                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8214         else
8215                 cf_target=\$cf_subdir\${section}/\$cf_source
8216         fi
8217 CF_EOF
8218 else
8219 cat >>$cf_edit_man <<CF_EOF
8220         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8221         if test -z "\$cf_target" ; then
8222                 echo '? missing rename for '\$cf_source
8223                 cf_target="\$cf_source"
8224         fi
8225         cf_target="\$cf_subdir\${section}/\${cf_target}"
8226
8227 CF_EOF
8228 fi
8229
8230 cat >>$cf_edit_man <<CF_EOF
8231         sed     -f $cf_man_alias \\
8232 CF_EOF
8233
8234 if test -f $MANPAGE_RENAMES ; then
8235 cat >>$cf_edit_man <<CF_EOF
8236                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8237 CF_EOF
8238 else
8239 cat >>$cf_edit_man <<CF_EOF
8240                 < \$i >\$TMP
8241 CF_EOF
8242 fi
8243
8244 cat >>$cf_edit_man <<CF_EOF
8245 if test \$cf_tables = yes ; then
8246         tbl \$TMP >\$TMP.out
8247         mv \$TMP.out \$TMP
8248 fi
8249 CF_EOF
8250
8251 if test $with_curses_h != yes ; then
8252 cat >>$cf_edit_man <<CF_EOF
8253         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8254         mv \$TMP.out \$TMP
8255 CF_EOF
8256 fi
8257
8258 cat >>$cf_edit_man <<CF_EOF
8259         if test \$form = format ; then
8260                 nroff -man \$TMP >\$TMP.out
8261                 mv \$TMP.out \$TMP
8262         fi
8263 CF_EOF
8264
8265 if test -n "$cf_compress" ; then
8266 cat >>$cf_edit_man <<CF_EOF
8267         if test \$verb = installing ; then
8268         if ( $cf_compress -f \$TMP )
8269         then
8270                 mv \$TMP.$cf_so_strip \$TMP
8271         fi
8272         fi
8273         cf_target="\$cf_target.$cf_so_strip"
8274 CF_EOF
8275 fi
8276
8277 case "$MANPAGE_FORMAT" in #(vi
8278 *BSDI*)
8279 cat >>$cf_edit_man <<CF_EOF
8280         if test \$form = format ; then
8281                 # BSDI installs only .0 suffixes in the cat directories
8282                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8283         fi
8284 CF_EOF
8285   ;;
8286 esac
8287
8288 cat >>$cf_edit_man <<CF_EOF
8289         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8290         if test \$verb = installing ; then
8291                 echo \$verb \$cf_target
8292                 \$INSTALL_DATA \$TMP \$cf_target
8293                 test -d \$cf_subdir\${section} &&
8294                 test -n "\$aliases" && (
8295                         cd \$cf_subdir\${section} && (
8296                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8297                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8298                                 cf_target=\`basename \$cf_target\`
8299                                 for cf_alias in \$aliases
8300                                 do
8301                                         if test \$section = 1 ; then
8302                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8303                                         fi
8304
8305                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8306                                                 if test -f \$cf_alias\${suffix} ; then
8307                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8308                                                         then
8309                                                                 continue
8310                                                         fi
8311                                                 fi
8312                                                 echo .. \$verb alias \$cf_alias\${suffix}
8313                                                 rm -f \$cf_alias\${suffix}
8314                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8315                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8316                                                 echo ".so \$cf_source" >\$TMP
8317 CF_EOF
8318 if test -n "$cf_compress" ; then
8319 cat >>$cf_edit_man <<CF_EOF
8320                                                 if test -n "$cf_so_strip" ; then
8321                                                         $cf_compress -f \$TMP
8322                                                         mv \$TMP.$cf_so_strip \$TMP
8323                                                 fi
8324 CF_EOF
8325 fi
8326 cat >>$cf_edit_man <<CF_EOF
8327                                                 echo .. \$verb alias \$cf_alias\${suffix}
8328                                                 rm -f \$cf_alias\${suffix}
8329                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8330                                         fi
8331                                 done
8332                         )
8333                 )
8334         elif test \$verb = removing ; then
8335                 test -f \$cf_target && (
8336                         echo \$verb \$cf_target
8337                         rm -f \$cf_target
8338                 )
8339                 test -d \$cf_subdir\${section} &&
8340                 test -n "\$aliases" && (
8341                         cd \$cf_subdir\${section} && (
8342                                 for cf_alias in \$aliases
8343                                 do
8344                                         if test \$section = 1 ; then
8345                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8346                                         fi
8347
8348                                         echo .. \$verb alias \$cf_alias\${suffix}
8349                                         rm -f \$cf_alias\${suffix}
8350                                 done
8351                         )
8352                 )
8353         else
8354 #               echo ".hy 0"
8355                 cat \$TMP
8356         fi
8357         ;;
8358 esac
8359 done
8360
8361 if test $cf_inboth = yes ; then
8362 if test \$form != format ; then
8363         sh \$0 format \$verb \$mandir \$srcdir \$*
8364 fi
8365 fi
8366
8367 exit 0
8368 CF_EOF
8369 chmod 755 $cf_edit_man
8370
8371 ###############################################################################
8372
8373 ### Note that some functions (such as const) are normally disabled anyway.
8374 echo "$as_me:8374: checking if you want to build with function extensions" >&5
8375 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8376
8377 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8378 if test "${enable_ext_funcs+set}" = set; then
8379   enableval="$enable_ext_funcs"
8380   with_ext_funcs=$enableval
8381 else
8382   with_ext_funcs=yes
8383 fi;
8384 echo "$as_me:8384: result: $with_ext_funcs" >&5
8385 echo "${ECHO_T}$with_ext_funcs" >&6
8386 if test "$with_ext_funcs" = yes ; then
8387         NCURSES_EXT_FUNCS=1
8388         cat >>confdefs.h <<\EOF
8389 #define HAVE_CURSES_VERSION 1
8390 EOF
8391
8392         cat >>confdefs.h <<\EOF
8393 #define HAVE_HAS_KEY 1
8394 EOF
8395
8396         cat >>confdefs.h <<\EOF
8397 #define HAVE_RESIZETERM 1
8398 EOF
8399
8400         cat >>confdefs.h <<\EOF
8401 #define HAVE_RESIZE_TERM 1
8402 EOF
8403
8404         cat >>confdefs.h <<\EOF
8405 #define HAVE_USE_DEFAULT_COLORS 1
8406 EOF
8407
8408         cat >>confdefs.h <<\EOF
8409 #define HAVE_WRESIZE 1
8410 EOF
8411
8412         cat >>confdefs.h <<\EOF
8413 #define NCURSES_EXT_FUNCS 1
8414 EOF
8415
8416 else
8417         NCURSES_EXT_FUNCS=0
8418 fi
8419
8420 ###   use option --enable-const to turn on use of const beyond that in XSI.
8421 echo "$as_me:8421: checking for extended use of const keyword" >&5
8422 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8423
8424 # Check whether --enable-const or --disable-const was given.
8425 if test "${enable_const+set}" = set; then
8426   enableval="$enable_const"
8427   with_ext_const=$enableval
8428 else
8429   with_ext_const=no
8430 fi;
8431 echo "$as_me:8431: result: $with_ext_const" >&5
8432 echo "${ECHO_T}$with_ext_const" >&6
8433 NCURSES_CONST='/*nothing*/'
8434 if test "$with_ext_const" = yes ; then
8435         NCURSES_CONST=const
8436 fi
8437
8438 echo "$as_me:8438: checking if you want \$NCURSES_NO_PADDING code" >&5
8439 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8440
8441 # Check whether --enable-no-padding or --disable-no-padding was given.
8442 if test "${enable_no_padding+set}" = set; then
8443   enableval="$enable_no_padding"
8444   with_no_padding=$enableval
8445 else
8446   with_no_padding=$with_ext_funcs
8447 fi;
8448 echo "$as_me:8448: result: $with_no_padding" >&5
8449 echo "${ECHO_T}$with_no_padding" >&6
8450 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8451 #define NCURSES_NO_PADDING 1
8452 EOF
8453
8454 echo "$as_me:8454: checking for ANSI C header files" >&5
8455 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8456 if test "${ac_cv_header_stdc+set}" = set; then
8457   echo $ECHO_N "(cached) $ECHO_C" >&6
8458 else
8459   cat >conftest.$ac_ext <<_ACEOF
8460 #line 8460 "configure"
8461 #include "confdefs.h"
8462 #include <stdlib.h>
8463 #include <stdarg.h>
8464 #include <string.h>
8465 #include <float.h>
8466
8467 _ACEOF
8468 if { (eval echo "$as_me:8468: \"$ac_cpp conftest.$ac_ext\"") >&5
8469   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8470   ac_status=$?
8471   egrep -v '^ *\+' conftest.er1 >conftest.err
8472   rm -f conftest.er1
8473   cat conftest.err >&5
8474   echo "$as_me:8474: \$? = $ac_status" >&5
8475   (exit $ac_status); } >/dev/null; then
8476   if test -s conftest.err; then
8477     ac_cpp_err=$ac_c_preproc_warn_flag
8478   else
8479     ac_cpp_err=
8480   fi
8481 else
8482   ac_cpp_err=yes
8483 fi
8484 if test -z "$ac_cpp_err"; then
8485   ac_cv_header_stdc=yes
8486 else
8487   echo "$as_me: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   ac_cv_header_stdc=no
8490 fi
8491 rm -f conftest.err conftest.$ac_ext
8492
8493 if test $ac_cv_header_stdc = yes; then
8494   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8495   cat >conftest.$ac_ext <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8498 #include <string.h>
8499
8500 _ACEOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "memchr" >/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   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8513   cat >conftest.$ac_ext <<_ACEOF
8514 #line 8514 "configure"
8515 #include "confdefs.h"
8516 #include <stdlib.h>
8517
8518 _ACEOF
8519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8520   egrep "free" >/dev/null 2>&1; then
8521   :
8522 else
8523   ac_cv_header_stdc=no
8524 fi
8525 rm -f conftest*
8526
8527 fi
8528
8529 if test $ac_cv_header_stdc = yes; then
8530   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8531   if test "$cross_compiling" = yes; then
8532   :
8533 else
8534   cat >conftest.$ac_ext <<_ACEOF
8535 #line 8535 "configure"
8536 #include "confdefs.h"
8537 #include <ctype.h>
8538 #if ((' ' & 0x0FF) == 0x020)
8539 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8540 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8541 #else
8542 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8543                      || ('j' <= (c) && (c) <= 'r') \
8544                      || ('s' <= (c) && (c) <= 'z'))
8545 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8546 #endif
8547
8548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8549 int
8550 main ()
8551 {
8552   int i;
8553   for (i = 0; i < 256; i++)
8554     if (XOR (islower (i), ISLOWER (i))
8555         || toupper (i) != TOUPPER (i))
8556       $ac_main_return(2);
8557   $ac_main_return (0);
8558 }
8559 _ACEOF
8560 rm -f conftest$ac_exeext
8561 if { (eval echo "$as_me:8561: \"$ac_link\"") >&5
8562   (eval $ac_link) 2>&5
8563   ac_status=$?
8564   echo "$as_me:8564: \$? = $ac_status" >&5
8565   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8566   { (eval echo "$as_me:8566: \"$ac_try\"") >&5
8567   (eval $ac_try) 2>&5
8568   ac_status=$?
8569   echo "$as_me:8569: \$? = $ac_status" >&5
8570   (exit $ac_status); }; }; then
8571   :
8572 else
8573   echo "$as_me: program exited with status $ac_status" >&5
8574 echo "$as_me: failed program was:" >&5
8575 cat conftest.$ac_ext >&5
8576 ac_cv_header_stdc=no
8577 fi
8578 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8579 fi
8580 fi
8581 fi
8582 echo "$as_me:8582: result: $ac_cv_header_stdc" >&5
8583 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8584 if test $ac_cv_header_stdc = yes; then
8585
8586 cat >>confdefs.h <<\EOF
8587 #define STDC_HEADERS 1
8588 EOF
8589
8590 fi
8591
8592 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8593
8594 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8595                   inttypes.h stdint.h unistd.h
8596 do
8597 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8598 echo "$as_me:8598: checking for $ac_header" >&5
8599 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8600 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8601   echo $ECHO_N "(cached) $ECHO_C" >&6
8602 else
8603   cat >conftest.$ac_ext <<_ACEOF
8604 #line 8604 "configure"
8605 #include "confdefs.h"
8606 $ac_includes_default
8607 #include <$ac_header>
8608 _ACEOF
8609 rm -f conftest.$ac_objext
8610 if { (eval echo "$as_me:8610: \"$ac_compile\"") >&5
8611   (eval $ac_compile) 2>&5
8612   ac_status=$?
8613   echo "$as_me:8613: \$? = $ac_status" >&5
8614   (exit $ac_status); } &&
8615          { ac_try='test -s conftest.$ac_objext'
8616   { (eval echo "$as_me:8616: \"$ac_try\"") >&5
8617   (eval $ac_try) 2>&5
8618   ac_status=$?
8619   echo "$as_me:8619: \$? = $ac_status" >&5
8620   (exit $ac_status); }; }; then
8621   eval "$as_ac_Header=yes"
8622 else
8623   echo "$as_me: failed program was:" >&5
8624 cat conftest.$ac_ext >&5
8625 eval "$as_ac_Header=no"
8626 fi
8627 rm -f conftest.$ac_objext conftest.$ac_ext
8628 fi
8629 echo "$as_me:8629: result: `eval echo '${'$as_ac_Header'}'`" >&5
8630 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8631 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8632   cat >>confdefs.h <<EOF
8633 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8634 EOF
8635
8636 fi
8637 done
8638
8639 echo "$as_me:8639: checking for signed char" >&5
8640 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8641 if test "${ac_cv_type_signed_char+set}" = set; then
8642   echo $ECHO_N "(cached) $ECHO_C" >&6
8643 else
8644   cat >conftest.$ac_ext <<_ACEOF
8645 #line 8645 "configure"
8646 #include "confdefs.h"
8647 $ac_includes_default
8648 int
8649 main ()
8650 {
8651 if ((signed char *) 0)
8652   return 0;
8653 if (sizeof (signed char))
8654   return 0;
8655   ;
8656   return 0;
8657 }
8658 _ACEOF
8659 rm -f conftest.$ac_objext
8660 if { (eval echo "$as_me:8660: \"$ac_compile\"") >&5
8661   (eval $ac_compile) 2>&5
8662   ac_status=$?
8663   echo "$as_me:8663: \$? = $ac_status" >&5
8664   (exit $ac_status); } &&
8665          { ac_try='test -s conftest.$ac_objext'
8666   { (eval echo "$as_me:8666: \"$ac_try\"") >&5
8667   (eval $ac_try) 2>&5
8668   ac_status=$?
8669   echo "$as_me:8669: \$? = $ac_status" >&5
8670   (exit $ac_status); }; }; then
8671   ac_cv_type_signed_char=yes
8672 else
8673   echo "$as_me: failed program was:" >&5
8674 cat conftest.$ac_ext >&5
8675 ac_cv_type_signed_char=no
8676 fi
8677 rm -f conftest.$ac_objext conftest.$ac_ext
8678 fi
8679 echo "$as_me:8679: result: $ac_cv_type_signed_char" >&5
8680 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8681
8682 echo "$as_me:8682: checking size of signed char" >&5
8683 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8684 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8685   echo $ECHO_N "(cached) $ECHO_C" >&6
8686 else
8687   if test "$ac_cv_type_signed_char" = yes; then
8688   if test "$cross_compiling" = yes; then
8689   # Depending upon the size, compute the lo and hi bounds.
8690 cat >conftest.$ac_ext <<_ACEOF
8691 #line 8691 "configure"
8692 #include "confdefs.h"
8693 $ac_includes_default
8694 int
8695 main ()
8696 {
8697 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8698   ;
8699   return 0;
8700 }
8701 _ACEOF
8702 rm -f conftest.$ac_objext
8703 if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5
8704   (eval $ac_compile) 2>&5
8705   ac_status=$?
8706   echo "$as_me:8706: \$? = $ac_status" >&5
8707   (exit $ac_status); } &&
8708          { ac_try='test -s conftest.$ac_objext'
8709   { (eval echo "$as_me:8709: \"$ac_try\"") >&5
8710   (eval $ac_try) 2>&5
8711   ac_status=$?
8712   echo "$as_me:8712: \$? = $ac_status" >&5
8713   (exit $ac_status); }; }; then
8714   ac_lo=0 ac_mid=0
8715   while :; do
8716     cat >conftest.$ac_ext <<_ACEOF
8717 #line 8717 "configure"
8718 #include "confdefs.h"
8719 $ac_includes_default
8720 int
8721 main ()
8722 {
8723 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8724   ;
8725   return 0;
8726 }
8727 _ACEOF
8728 rm -f conftest.$ac_objext
8729 if { (eval echo "$as_me:8729: \"$ac_compile\"") >&5
8730   (eval $ac_compile) 2>&5
8731   ac_status=$?
8732   echo "$as_me:8732: \$? = $ac_status" >&5
8733   (exit $ac_status); } &&
8734          { ac_try='test -s conftest.$ac_objext'
8735   { (eval echo "$as_me:8735: \"$ac_try\"") >&5
8736   (eval $ac_try) 2>&5
8737   ac_status=$?
8738   echo "$as_me:8738: \$? = $ac_status" >&5
8739   (exit $ac_status); }; }; then
8740   ac_hi=$ac_mid; break
8741 else
8742   echo "$as_me: failed program was:" >&5
8743 cat conftest.$ac_ext >&5
8744 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8745 fi
8746 rm -f conftest.$ac_objext conftest.$ac_ext
8747   done
8748 else
8749   echo "$as_me: failed program was:" >&5
8750 cat conftest.$ac_ext >&5
8751 ac_hi=-1 ac_mid=-1
8752   while :; do
8753     cat >conftest.$ac_ext <<_ACEOF
8754 #line 8754 "configure"
8755 #include "confdefs.h"
8756 $ac_includes_default
8757 int
8758 main ()
8759 {
8760 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8761   ;
8762   return 0;
8763 }
8764 _ACEOF
8765 rm -f conftest.$ac_objext
8766 if { (eval echo "$as_me:8766: \"$ac_compile\"") >&5
8767   (eval $ac_compile) 2>&5
8768   ac_status=$?
8769   echo "$as_me:8769: \$? = $ac_status" >&5
8770   (exit $ac_status); } &&
8771          { ac_try='test -s conftest.$ac_objext'
8772   { (eval echo "$as_me:8772: \"$ac_try\"") >&5
8773   (eval $ac_try) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); }; }; then
8777   ac_lo=$ac_mid; break
8778 else
8779   echo "$as_me: failed program was:" >&5
8780 cat conftest.$ac_ext >&5
8781 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8782 fi
8783 rm -f conftest.$ac_objext conftest.$ac_ext
8784   done
8785 fi
8786 rm -f conftest.$ac_objext conftest.$ac_ext
8787 # Binary search between lo and hi bounds.
8788 while test "x$ac_lo" != "x$ac_hi"; do
8789   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8790   cat >conftest.$ac_ext <<_ACEOF
8791 #line 8791 "configure"
8792 #include "confdefs.h"
8793 $ac_includes_default
8794 int
8795 main ()
8796 {
8797 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8798   ;
8799   return 0;
8800 }
8801 _ACEOF
8802 rm -f conftest.$ac_objext
8803 if { (eval echo "$as_me:8803: \"$ac_compile\"") >&5
8804   (eval $ac_compile) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); } &&
8808          { ac_try='test -s conftest.$ac_objext'
8809   { (eval echo "$as_me:8809: \"$ac_try\"") >&5
8810   (eval $ac_try) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); }; }; then
8814   ac_hi=$ac_mid
8815 else
8816   echo "$as_me: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8818 ac_lo=`expr $ac_mid + 1`
8819 fi
8820 rm -f conftest.$ac_objext conftest.$ac_ext
8821 done
8822 ac_cv_sizeof_signed_char=$ac_lo
8823 else
8824   if test "$cross_compiling" = yes; then
8825   { { echo "$as_me:8825: error: cannot run test program while cross compiling" >&5
8826 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8827    { (exit 1); exit 1; }; }
8828 else
8829   cat >conftest.$ac_ext <<_ACEOF
8830 #line 8830 "configure"
8831 #include "confdefs.h"
8832 $ac_includes_default
8833 int
8834 main ()
8835 {
8836 FILE *f = fopen ("conftest.val", "w");
8837 if (!f)
8838   $ac_main_return (1);
8839 fprintf (f, "%d", (sizeof (signed char)));
8840 fclose (f);
8841   ;
8842   return 0;
8843 }
8844 _ACEOF
8845 rm -f conftest$ac_exeext
8846 if { (eval echo "$as_me:8846: \"$ac_link\"") >&5
8847   (eval $ac_link) 2>&5
8848   ac_status=$?
8849   echo "$as_me:8849: \$? = $ac_status" >&5
8850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8851   { (eval echo "$as_me:8851: \"$ac_try\"") >&5
8852   (eval $ac_try) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); }; }; then
8856   ac_cv_sizeof_signed_char=`cat conftest.val`
8857 else
8858   echo "$as_me: program exited with status $ac_status" >&5
8859 echo "$as_me: failed program was:" >&5
8860 cat conftest.$ac_ext >&5
8861 fi
8862 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8863 fi
8864 fi
8865 rm -f conftest.val
8866 else
8867   ac_cv_sizeof_signed_char=0
8868 fi
8869 fi
8870 echo "$as_me:8870: result: $ac_cv_sizeof_signed_char" >&5
8871 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8872 cat >>confdefs.h <<EOF
8873 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8874 EOF
8875
8876 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8877         NCURSES_SBOOL="signed char"
8878 else
8879         NCURSES_SBOOL="char"
8880 fi
8881 echo "$as_me:8881: checking if you want to use signed Boolean array in term.h" >&5
8882 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8883
8884 # Check whether --enable-signed-char or --disable-signed-char was given.
8885 if test "${enable_signed_char+set}" = set; then
8886   enableval="$enable_signed_char"
8887   with_signed_char=$enableval
8888 else
8889   with_signed_char=no
8890 fi;
8891 echo "$as_me:8891: result: $with_signed_char" >&5
8892 echo "${ECHO_T}$with_signed_char" >&6
8893 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8894
8895 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8896 echo "$as_me:8896: checking if you want SIGWINCH handler" >&5
8897 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8898
8899 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8900 if test "${enable_sigwinch+set}" = set; then
8901   enableval="$enable_sigwinch"
8902   with_sigwinch=$enableval
8903 else
8904   with_sigwinch=$with_ext_funcs
8905 fi;
8906 echo "$as_me:8906: result: $with_sigwinch" >&5
8907 echo "${ECHO_T}$with_sigwinch" >&6
8908 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8909 #define USE_SIGWINCH 1
8910 EOF
8911
8912 ###   use option --enable-tcap-names to allow user to define new capabilities
8913 echo "$as_me:8913: checking if you want user-definable terminal capabilities like termcap" >&5
8914 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8915
8916 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8917 if test "${enable_tcap_names+set}" = set; then
8918   enableval="$enable_tcap_names"
8919   with_tcap_names=$enableval
8920 else
8921   with_tcap_names=$with_ext_funcs
8922 fi;
8923 echo "$as_me:8923: result: $with_tcap_names" >&5
8924 echo "${ECHO_T}$with_tcap_names" >&6
8925 NCURSES_XNAMES=0
8926 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8927
8928 ###############################################################################
8929 # These options are relatively safe to experiment with.
8930
8931 echo "$as_me:8931: checking if you want all development code" >&5
8932 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8933
8934 # Check whether --with-develop or --without-develop was given.
8935 if test "${with_develop+set}" = set; then
8936   withval="$with_develop"
8937   with_develop=$withval
8938 else
8939   with_develop=no
8940 fi;
8941 echo "$as_me:8941: result: $with_develop" >&5
8942 echo "${ECHO_T}$with_develop" >&6
8943
8944 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8945 echo "$as_me:8945: checking if you want hard-tabs code" >&5
8946 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8947
8948 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8949 if test "${enable_hard_tabs+set}" = set; then
8950   enableval="$enable_hard_tabs"
8951
8952 else
8953   enable_hard_tabs=$with_develop
8954 fi;
8955 echo "$as_me:8955: result: $enable_hard_tabs" >&5
8956 echo "${ECHO_T}$enable_hard_tabs" >&6
8957 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8958 #define USE_HARD_TABS 1
8959 EOF
8960
8961 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8962 echo "$as_me:8962: checking if you want limited support for xmc" >&5
8963 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8964
8965 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8966 if test "${enable_xmc_glitch+set}" = set; then
8967   enableval="$enable_xmc_glitch"
8968
8969 else
8970   enable_xmc_glitch=$with_develop
8971 fi;
8972 echo "$as_me:8972: result: $enable_xmc_glitch" >&5
8973 echo "${ECHO_T}$enable_xmc_glitch" >&6
8974 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8975 #define USE_XMC_SUPPORT 1
8976 EOF
8977
8978 ###############################################################################
8979 # These are just experimental, probably should not be in a package:
8980
8981 echo "$as_me:8981: checking if you do not want to assume colors are white-on-black" >&5
8982 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8983
8984 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8985 if test "${enable_assumed_color+set}" = set; then
8986   enableval="$enable_assumed_color"
8987   with_assumed_color=$enableval
8988 else
8989   with_assumed_color=yes
8990 fi;
8991 echo "$as_me:8991: result: $with_assumed_color" >&5
8992 echo "${ECHO_T}$with_assumed_color" >&6
8993 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8994 #define USE_ASSUMED_COLOR 1
8995 EOF
8996
8997 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8998 echo "$as_me:8998: checking if you want hashmap scrolling-optimization code" >&5
8999 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9000
9001 # Check whether --enable-hashmap or --disable-hashmap was given.
9002 if test "${enable_hashmap+set}" = set; then
9003   enableval="$enable_hashmap"
9004   with_hashmap=$enableval
9005 else
9006   with_hashmap=yes
9007 fi;
9008 echo "$as_me:9008: result: $with_hashmap" >&5
9009 echo "${ECHO_T}$with_hashmap" >&6
9010 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9011 #define USE_HASHMAP 1
9012 EOF
9013
9014 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9015 echo "$as_me:9015: checking if you want colorfgbg code" >&5
9016 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9017
9018 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9019 if test "${enable_colorfgbg+set}" = set; then
9020   enableval="$enable_colorfgbg"
9021   with_colorfgbg=$enableval
9022 else
9023   with_colorfgbg=no
9024 fi;
9025 echo "$as_me:9025: result: $with_colorfgbg" >&5
9026 echo "${ECHO_T}$with_colorfgbg" >&6
9027 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9028 #define USE_COLORFGBG 1
9029 EOF
9030
9031 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9032 echo "$as_me:9032: checking if you want to use experimental extended colors" >&5
9033 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9034
9035 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9036 if test "${enable_ext_colors+set}" = set; then
9037   enableval="$enable_ext_colors"
9038   with_ext_colors=$enableval
9039 else
9040   with_ext_colors=no
9041 fi;
9042 echo "$as_me:9042: result: $with_ext_colors" >&5
9043 echo "${ECHO_T}$with_ext_colors" >&6
9044 NCURSES_EXT_COLORS=0
9045 if test "$with_ext_colors" = yes ; then
9046         if test "$with_widec" != yes ; then
9047                 { { echo "$as_me:9047: error: This option applies only to wide-character library" >&5
9048 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9049    { (exit 1); exit 1; }; }
9050         else
9051                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9052
9053 if test "${with_abi_version+set}" != set; then
9054         case $cf_cv_rel_version in
9055         5.*)
9056                 cf_cv_rel_version=6.0
9057                 cf_cv_abi_version=6
9058                 { echo "$as_me:9058: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9059 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9060                 ;;
9061         esac
9062 fi
9063
9064         fi
9065         NCURSES_EXT_COLORS=1
9066         cat >>confdefs.h <<\EOF
9067 #define NCURSES_EXT_COLORS 1
9068 EOF
9069
9070 fi
9071
9072 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9073 echo "$as_me:9073: checking if you want to use experimental extended mouse encoding" >&5
9074 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9075
9076 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9077 if test "${enable_ext_mouse+set}" = set; then
9078   enableval="$enable_ext_mouse"
9079   with_ext_mouse=$enableval
9080 else
9081   with_ext_mouse=no
9082 fi;
9083 echo "$as_me:9083: result: $with_ext_mouse" >&5
9084 echo "${ECHO_T}$with_ext_mouse" >&6
9085 NCURSES_MOUSE_VERSION=1
9086 if test "$with_ext_mouse" = yes ; then
9087         NCURSES_MOUSE_VERSION=2
9088
9089 if test "${with_abi_version+set}" != set; then
9090         case $cf_cv_rel_version in
9091         5.*)
9092                 cf_cv_rel_version=6.0
9093                 cf_cv_abi_version=6
9094                 { echo "$as_me:9094: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9095 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9096                 ;;
9097         esac
9098 fi
9099
9100 fi
9101
9102 # Reentrant code has to be opaque; there's little advantage to making ncurses
9103 # opaque outside of that, so there is no --enable-opaque option.
9104 echo "$as_me:9104: checking if you want experimental reentrant code" >&5
9105 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9106
9107 # Check whether --enable-reentrant or --disable-reentrant was given.
9108 if test "${enable_reentrant+set}" = set; then
9109   enableval="$enable_reentrant"
9110   with_reentrant=$enableval
9111 else
9112   with_reentrant=no
9113 fi;
9114 echo "$as_me:9114: result: $with_reentrant" >&5
9115 echo "${ECHO_T}$with_reentrant" >&6
9116 if test "$with_reentrant" = yes ; then
9117         cf_cv_enable_reentrant=1
9118         cf_cv_enable_opaque="NCURSES_INTERNALS"
9119         NCURSES_OPAQUE=1
9120         NCURSES_SIZE_T=int
9121         LIB_SUFFIX="t${LIB_SUFFIX}"
9122         cat >>confdefs.h <<\EOF
9123 #define USE_REENTRANT 1
9124 EOF
9125
9126 if test "${with_abi_version+set}" != set; then
9127         case $cf_cv_rel_version in
9128         5.*)
9129                 cf_cv_rel_version=6.0
9130                 cf_cv_abi_version=6
9131                 { echo "$as_me:9131: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9132 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9133                 ;;
9134         esac
9135 fi
9136
9137 else
9138         cf_cv_enable_reentrant=0
9139         cf_cv_enable_opaque="NCURSES_OPAQUE"
9140         NCURSES_OPAQUE=0
9141         NCURSES_SIZE_T=short
9142 fi
9143
9144 echo "$as_me:9144: checking if you want experimental safe-sprintf code" >&5
9145 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9146
9147 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9148 if test "${enable_safe_sprintf+set}" = set; then
9149   enableval="$enable_safe_sprintf"
9150   with_safe_sprintf=$enableval
9151 else
9152   with_safe_sprintf=no
9153 fi;
9154 echo "$as_me:9154: result: $with_safe_sprintf" >&5
9155 echo "${ECHO_T}$with_safe_sprintf" >&6
9156 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9157 #define USE_SAFE_SPRINTF 1
9158 EOF
9159
9160 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9161 # when hashmap is used scroll hints are useless
9162 if test "$with_hashmap" = no ; then
9163 echo "$as_me:9163: checking if you want to experiment without scrolling-hints code" >&5
9164 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9165
9166 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9167 if test "${enable_scroll_hints+set}" = set; then
9168   enableval="$enable_scroll_hints"
9169   with_scroll_hints=$enableval
9170 else
9171   with_scroll_hints=yes
9172 fi;
9173 echo "$as_me:9173: result: $with_scroll_hints" >&5
9174 echo "${ECHO_T}$with_scroll_hints" >&6
9175 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9176 #define USE_SCROLL_HINTS 1
9177 EOF
9178
9179 fi
9180
9181 echo "$as_me:9181: checking if you want experimental wgetch-events code" >&5
9182 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9183
9184 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9185 if test "${enable_wgetch_events+set}" = set; then
9186   enableval="$enable_wgetch_events"
9187   with_wgetch_events=$enableval
9188 else
9189   with_wgetch_events=no
9190 fi;
9191 echo "$as_me:9191: result: $with_wgetch_events" >&5
9192 echo "${ECHO_T}$with_wgetch_events" >&6
9193 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9194 #define NCURSES_WGETCH_EVENTS 1
9195 EOF
9196
9197 ###############################################################################
9198
9199 ###     use option --disable-echo to suppress full display compiling commands
9200 echo "$as_me:9200: checking if you want to display full commands during build" >&5
9201 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9202
9203 # Check whether --enable-echo or --disable-echo was given.
9204 if test "${enable_echo+set}" = set; then
9205   enableval="$enable_echo"
9206   with_echo=$enableval
9207 else
9208   with_echo=yes
9209 fi;
9210 if test "$with_echo" = yes; then
9211         ECHO_LINK=
9212 else
9213         ECHO_LINK='@ echo linking $@ ... ;'
9214         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9215 fi
9216 echo "$as_me:9216: result: $with_echo" >&5
9217 echo "${ECHO_T}$with_echo" >&6
9218
9219 ###     use option --enable-warnings to turn on all gcc warnings
9220 echo "$as_me:9220: checking if you want to see compiler warnings" >&5
9221 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9222
9223 # Check whether --enable-warnings or --disable-warnings was given.
9224 if test "${enable_warnings+set}" = set; then
9225   enableval="$enable_warnings"
9226   with_warnings=$enableval
9227 fi;
9228 echo "$as_me:9228: result: $with_warnings" >&5
9229 echo "${ECHO_T}$with_warnings" >&6
9230
9231 if test -n "$with_warnings"; then
9232         ADAFLAGS="$ADAFLAGS -gnatg"
9233
9234 INTEL_COMPILER=no
9235
9236 if test "$GCC" = yes ; then
9237         case $host_os in
9238         linux*|gnu*)
9239                 echo "$as_me:9239: checking if this is really Intel C compiler" >&5
9240 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9241                 cf_save_CFLAGS="$CFLAGS"
9242                 CFLAGS="$CFLAGS -no-gcc"
9243                 cat >conftest.$ac_ext <<_ACEOF
9244 #line 9244 "configure"
9245 #include "confdefs.h"
9246
9247 int
9248 main ()
9249 {
9250
9251 #ifdef __INTEL_COMPILER
9252 #else
9253 make an error
9254 #endif
9255
9256   ;
9257   return 0;
9258 }
9259 _ACEOF
9260 rm -f conftest.$ac_objext
9261 if { (eval echo "$as_me:9261: \"$ac_compile\"") >&5
9262   (eval $ac_compile) 2>&5
9263   ac_status=$?
9264   echo "$as_me:9264: \$? = $ac_status" >&5
9265   (exit $ac_status); } &&
9266          { ac_try='test -s conftest.$ac_objext'
9267   { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9268   (eval $ac_try) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit $ac_status); }; }; then
9272   INTEL_COMPILER=yes
9273 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9274
9275 else
9276   echo "$as_me: failed program was:" >&5
9277 cat conftest.$ac_ext >&5
9278 fi
9279 rm -f conftest.$ac_objext conftest.$ac_ext
9280                 CFLAGS="$cf_save_CFLAGS"
9281                 echo "$as_me:9281: result: $INTEL_COMPILER" >&5
9282 echo "${ECHO_T}$INTEL_COMPILER" >&6
9283                 ;;
9284         esac
9285 fi
9286
9287 cat > conftest.$ac_ext <<EOF
9288 #line 9288 "configure"
9289 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9290 EOF
9291
9292 if test "$INTEL_COMPILER" = yes
9293 then
9294 # The "-wdXXX" options suppress warnings:
9295 # remark #1419: external declaration in primary source file
9296 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9297 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9298 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9299 # remark #193: zero used for undefined preprocessing identifier
9300 # remark #593: variable "curs_sb_left_arrow" was set but never used
9301 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9302 # remark #869: parameter "tw" was never referenced
9303 # remark #981: operands are evaluated in unspecified order
9304 # warning #269: invalid format string conversion
9305
9306         { echo "$as_me:9306: checking for $CC warning options..." >&5
9307 echo "$as_me: checking for $CC warning options..." >&6;}
9308         cf_save_CFLAGS="$CFLAGS"
9309         EXTRA_CFLAGS="-Wall"
9310         for cf_opt in  \
9311                 wd1419 \
9312                 wd1682 \
9313                 wd1683 \
9314                 wd1684 \
9315                 wd193 \
9316                 wd279 \
9317                 wd593 \
9318                 wd810 \
9319                 wd869 \
9320                 wd981
9321         do
9322                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9323                 if { (eval echo "$as_me:9323: \"$ac_compile\"") >&5
9324   (eval $ac_compile) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); }; then
9328                         test -n "$verbose" && echo "$as_me:9328: result: ... -$cf_opt" >&5
9329 echo "${ECHO_T}... -$cf_opt" >&6
9330                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9331                 fi
9332         done
9333         CFLAGS="$cf_save_CFLAGS"
9334
9335 elif test "$GCC" = yes
9336 then
9337         { echo "$as_me:9337: checking for $CC warning options..." >&5
9338 echo "$as_me: checking for $CC warning options..." >&6;}
9339         cf_save_CFLAGS="$CFLAGS"
9340         EXTRA_CFLAGS="-W -Wall"
9341         cf_warn_CONST=""
9342         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9343         for cf_opt in \
9344                 Wbad-function-cast \
9345                 Wcast-align \
9346                 Wcast-qual \
9347                 Winline \
9348                 Wmissing-declarations \
9349                 Wmissing-prototypes \
9350                 Wnested-externs \
9351                 Wpointer-arith \
9352                 Wshadow \
9353                 Wstrict-prototypes \
9354                 Wundef $cf_warn_CONST
9355         do
9356                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9357                 if { (eval echo "$as_me:9357: \"$ac_compile\"") >&5
9358   (eval $ac_compile) 2>&5
9359   ac_status=$?
9360   echo "$as_me:9360: \$? = $ac_status" >&5
9361   (exit $ac_status); }; then
9362                         test -n "$verbose" && echo "$as_me:9362: result: ... -$cf_opt" >&5
9363 echo "${ECHO_T}... -$cf_opt" >&6
9364                         case $cf_opt in #(vi
9365                         Wcast-qual) #(vi
9366                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9367                                 ;;
9368                         Winline) #(vi
9369                                 case $GCC_VERSION in
9370                                 3.3*)
9371                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9372
9373                                         continue;;
9374                                 esac
9375                                 ;;
9376                         esac
9377                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9378                 fi
9379         done
9380         CFLAGS="$cf_save_CFLAGS"
9381 fi
9382 rm -f conftest*
9383
9384         if test "$cf_with_cxx" = yes ; then
9385
9386 INTEL_CPLUSPLUS=no
9387
9388 if test "$GCC" = yes ; then
9389         case $host_os in
9390         linux*|gnu*)
9391                 echo "$as_me:9391: checking if this is really Intel C++ compiler" >&5
9392 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9393                 cf_save_CFLAGS="$CXXFLAGS"
9394                 CXXFLAGS="$CXXFLAGS -no-gcc"
9395                 cat >conftest.$ac_ext <<_ACEOF
9396 #line 9396 "configure"
9397 #include "confdefs.h"
9398
9399 int
9400 main ()
9401 {
9402
9403 #ifdef __INTEL_COMPILER
9404 #else
9405 make an error
9406 #endif
9407
9408   ;
9409   return 0;
9410 }
9411 _ACEOF
9412 rm -f conftest.$ac_objext
9413 if { (eval echo "$as_me:9413: \"$ac_compile\"") >&5
9414   (eval $ac_compile) 2>&5
9415   ac_status=$?
9416   echo "$as_me:9416: \$? = $ac_status" >&5
9417   (exit $ac_status); } &&
9418          { ac_try='test -s conftest.$ac_objext'
9419   { (eval echo "$as_me:9419: \"$ac_try\"") >&5
9420   (eval $ac_try) 2>&5
9421   ac_status=$?
9422   echo "$as_me:9422: \$? = $ac_status" >&5
9423   (exit $ac_status); }; }; then
9424   INTEL_CPLUSPLUS=yes
9425 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9426
9427 else
9428   echo "$as_me: failed program was:" >&5
9429 cat conftest.$ac_ext >&5
9430 fi
9431 rm -f conftest.$ac_objext conftest.$ac_ext
9432                 CXXFLAGS="$cf_save_CFLAGS"
9433                 echo "$as_me:9433: result: $INTEL_CPLUSPLUS" >&5
9434 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9435                 ;;
9436         esac
9437 fi
9438
9439 ac_ext=cc
9440 ac_cpp='$CXXCPP $CPPFLAGS'
9441 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9442 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9443 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9444 ac_main_return=return
9445
9446 cat > conftest.$ac_ext <<EOF
9447 #line 9447 "configure"
9448 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9449 EOF
9450
9451 if test "$INTEL_CPLUSPLUS" = yes
9452 then
9453 # The "-wdXXX" options suppress warnings:
9454 # remark #1419: external declaration in primary source file
9455 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9456 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9457 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9458 # remark #193: zero used for undefined preprocessing identifier
9459 # remark #593: variable "curs_sb_left_arrow" was set but never used
9460 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9461 # remark #869: parameter "tw" was never referenced
9462 # remark #981: operands are evaluated in unspecified order
9463 # warning #269: invalid format string conversion
9464
9465         { echo "$as_me:9465: checking for $CC warning options..." >&5
9466 echo "$as_me: checking for $CC warning options..." >&6;}
9467         cf_save_CXXFLAGS="$CXXFLAGS"
9468         EXTRA_CXXFLAGS="-Wall"
9469         for cf_opt in \
9470                 wd1419 \
9471                 wd1682 \
9472                 wd1683 \
9473                 wd1684 \
9474                 wd193 \
9475                 wd279 \
9476                 wd593 \
9477                 wd810 \
9478                 wd869 \
9479                 wd981
9480         do
9481                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9482                 if { (eval echo "$as_me:9482: \"$ac_compile\"") >&5
9483   (eval $ac_compile) 2>&5
9484   ac_status=$?
9485   echo "$as_me:9485: \$? = $ac_status" >&5
9486   (exit $ac_status); }; then
9487                         test -n "$verbose" && echo "$as_me:9487: result: ... -$cf_opt" >&5
9488 echo "${ECHO_T}... -$cf_opt" >&6
9489                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9490                 fi
9491         done
9492         CXXFLAGS="$cf_save_CXXFLAGS"
9493
9494 elif test "$GXX" = yes
9495 then
9496         { echo "$as_me:9496: checking for $CXX warning options..." >&5
9497 echo "$as_me: checking for $CXX warning options..." >&6;}
9498         cf_save_CXXFLAGS="$CXXFLAGS"
9499         EXTRA_CXXFLAGS="-W -Wall"
9500         cf_gxx_extra_warnings=""
9501         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9502         case "$GCC_VERSION" in
9503         [1-2].*)
9504                 ;;
9505         *)
9506                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9507                 ;;
9508         esac
9509         for cf_opt in \
9510                 Wabi \
9511                 fabi-version=0 \
9512                 Woverloaded-virtual \
9513                 Wsign-promo \
9514                 Wsynth \
9515                 Wold-style-cast \
9516                 Wcast-align \
9517                 Wcast-qual \
9518                 Wmissing-prototypes \
9519                 Wpointer-arith \
9520                 Wshadow \
9521                 Wstrict-prototypes \
9522                 Wundef $cf_gxx_extra_warnings Wno-unused
9523         do
9524                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9525                 if { (eval echo "$as_me:9525: \"$ac_compile\"") >&5
9526   (eval $ac_compile) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); }; then
9530                         test -n "$verbose" && echo "$as_me:9530: result: ... -$cf_opt" >&5
9531 echo "${ECHO_T}... -$cf_opt" >&6
9532                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9533                 else
9534                         test -n "$verbose" && echo "$as_me:9534: result: ... no -$cf_opt" >&5
9535 echo "${ECHO_T}... no -$cf_opt" >&6
9536                 fi
9537         done
9538         CXXFLAGS="$cf_save_CXXFLAGS"
9539 fi
9540
9541 rm -f conftest*
9542 ac_ext=c
9543 ac_cpp='$CPP $CPPFLAGS'
9544 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9545 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9546 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9547 ac_main_return=return
9548
9549         fi
9550 fi
9551
9552 if test "$GCC" = yes
9553 then
9554 cat > conftest.i <<EOF
9555 #ifndef GCC_PRINTF
9556 #define GCC_PRINTF 0
9557 #endif
9558 #ifndef GCC_SCANF
9559 #define GCC_SCANF 0
9560 #endif
9561 #ifndef GCC_NORETURN
9562 #define GCC_NORETURN /* nothing */
9563 #endif
9564 #ifndef GCC_UNUSED
9565 #define GCC_UNUSED /* nothing */
9566 #endif
9567 EOF
9568 if test "$GCC" = yes
9569 then
9570         { echo "$as_me:9570: checking for $CC __attribute__ directives..." >&5
9571 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9572 cat > conftest.$ac_ext <<EOF
9573 #line 9573 "configure"
9574 #include "confdefs.h"
9575 #include "conftest.h"
9576 #include "conftest.i"
9577 #if     GCC_PRINTF
9578 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9579 #else
9580 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9581 #endif
9582 #if     GCC_SCANF
9583 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9584 #else
9585 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9586 #endif
9587 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9588 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9589 extern void foo(void) GCC_NORETURN;
9590 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9591 EOF
9592         for cf_attribute in scanf printf unused noreturn
9593         do
9594
9595 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9596
9597                 cf_directive="__attribute__(($cf_attribute))"
9598                 echo "checking for $CC $cf_directive" 1>&5
9599                 case $cf_attribute in
9600                 scanf|printf)
9601                 cat >conftest.h <<EOF
9602 #define GCC_$cf_ATTRIBUTE 1
9603 EOF
9604                         ;;
9605                 *)
9606                 cat >conftest.h <<EOF
9607 #define GCC_$cf_ATTRIBUTE $cf_directive
9608 EOF
9609                         ;;
9610                 esac
9611                 if { (eval echo "$as_me:9611: \"$ac_compile\"") >&5
9612   (eval $ac_compile) 2>&5
9613   ac_status=$?
9614   echo "$as_me:9614: \$? = $ac_status" >&5
9615   (exit $ac_status); }; then
9616                         test -n "$verbose" && echo "$as_me:9616: result: ... $cf_attribute" >&5
9617 echo "${ECHO_T}... $cf_attribute" >&6
9618                         cat conftest.h >>confdefs.h
9619                 fi
9620         done
9621 else
9622         fgrep define conftest.i >>confdefs.h
9623 fi
9624 rm -rf conftest*
9625 fi
9626
9627 ###     use option --enable-assertions to turn on generation of assertion code
9628 echo "$as_me:9628: checking if you want to enable runtime assertions" >&5
9629 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9630
9631 # Check whether --enable-assertions or --disable-assertions was given.
9632 if test "${enable_assertions+set}" = set; then
9633   enableval="$enable_assertions"
9634   with_assertions=$enableval
9635 else
9636   with_assertions=no
9637 fi;
9638 echo "$as_me:9638: result: $with_assertions" >&5
9639 echo "${ECHO_T}$with_assertions" >&6
9640 if test -n "$GCC"
9641 then
9642         if test "$with_assertions" = no
9643         then
9644                 cat >>confdefs.h <<\EOF
9645 #define NDEBUG 1
9646 EOF
9647
9648                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9649         else
9650                 ADAFLAGS="$ADAFLAGS -gnata"
9651         fi
9652 fi
9653
9654 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9655
9656 echo "$as_me:9656: checking if you want to use dmalloc for testing" >&5
9657 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9658
9659 # Check whether --with-dmalloc or --without-dmalloc was given.
9660 if test "${with_dmalloc+set}" = set; then
9661   withval="$with_dmalloc"
9662   cat >>confdefs.h <<\EOF
9663 #define USE_DMALLOC 1
9664 EOF
9665
9666         : ${with_cflags:=-g}
9667         : ${with_no_leaks:=yes}
9668          with_dmalloc=yes
9669 else
9670   with_dmalloc=
9671 fi;
9672 echo "$as_me:9672: result: ${with_dmalloc:-no}" >&5
9673 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9674
9675 case .$with_cflags in #(vi
9676 .*-g*)
9677         case .$CFLAGS in #(vi
9678         .*-g*) #(vi
9679                 ;;
9680         *)
9681
9682 cf_fix_cppflags=no
9683 cf_new_cflags=
9684 cf_new_cppflags=
9685 cf_new_extra_cppflags=
9686
9687 for cf_add_cflags in -g
9688 do
9689 case $cf_fix_cppflags in
9690 no)
9691         case $cf_add_cflags in #(vi
9692         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9693                 case $cf_add_cflags in
9694                 -D*)
9695                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9696
9697                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9698                         && test -z "${cf_tst_cflags}" \
9699                         && cf_fix_cppflags=yes
9700
9701                         if test $cf_fix_cppflags = yes ; then
9702                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9703                                 continue
9704                         elif test "${cf_tst_cflags}" = "\"'" ; then
9705                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9706                                 continue
9707                         fi
9708                         ;;
9709                 esac
9710                 case "$CPPFLAGS" in
9711                 *$cf_add_cflags) #(vi
9712                         ;;
9713                 *) #(vi
9714                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9715                         ;;
9716                 esac
9717                 ;;
9718         *)
9719                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9720                 ;;
9721         esac
9722         ;;
9723 yes)
9724         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9725
9726         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9727
9728         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9729         && test -z "${cf_tst_cflags}" \
9730         && cf_fix_cppflags=no
9731         ;;
9732 esac
9733 done
9734
9735 if test -n "$cf_new_cflags" ; then
9736
9737         CFLAGS="$CFLAGS $cf_new_cflags"
9738 fi
9739
9740 if test -n "$cf_new_cppflags" ; then
9741
9742         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9743 fi
9744
9745 if test -n "$cf_new_extra_cppflags" ; then
9746
9747         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9748 fi
9749
9750                 ;;
9751         esac
9752         ;;
9753 esac
9754
9755 if test "$with_dmalloc" = yes ; then
9756         echo "$as_me:9756: checking for dmalloc.h" >&5
9757 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9758 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9759   echo $ECHO_N "(cached) $ECHO_C" >&6
9760 else
9761   cat >conftest.$ac_ext <<_ACEOF
9762 #line 9762 "configure"
9763 #include "confdefs.h"
9764 #include <dmalloc.h>
9765 _ACEOF
9766 if { (eval echo "$as_me:9766: \"$ac_cpp conftest.$ac_ext\"") >&5
9767   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9768   ac_status=$?
9769   egrep -v '^ *\+' conftest.er1 >conftest.err
9770   rm -f conftest.er1
9771   cat conftest.err >&5
9772   echo "$as_me:9772: \$? = $ac_status" >&5
9773   (exit $ac_status); } >/dev/null; then
9774   if test -s conftest.err; then
9775     ac_cpp_err=$ac_c_preproc_warn_flag
9776   else
9777     ac_cpp_err=
9778   fi
9779 else
9780   ac_cpp_err=yes
9781 fi
9782 if test -z "$ac_cpp_err"; then
9783   ac_cv_header_dmalloc_h=yes
9784 else
9785   echo "$as_me: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787   ac_cv_header_dmalloc_h=no
9788 fi
9789 rm -f conftest.err conftest.$ac_ext
9790 fi
9791 echo "$as_me:9791: result: $ac_cv_header_dmalloc_h" >&5
9792 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9793 if test $ac_cv_header_dmalloc_h = yes; then
9794
9795 echo "$as_me:9795: checking for dmalloc_debug in -ldmalloc" >&5
9796 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9797 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9798   echo $ECHO_N "(cached) $ECHO_C" >&6
9799 else
9800   ac_check_lib_save_LIBS=$LIBS
9801 LIBS="-ldmalloc  $LIBS"
9802 cat >conftest.$ac_ext <<_ACEOF
9803 #line 9803 "configure"
9804 #include "confdefs.h"
9805
9806 /* Override any gcc2 internal prototype to avoid an error.  */
9807 #ifdef __cplusplus
9808 extern "C"
9809 #endif
9810 /* We use char because int might match the return type of a gcc2
9811    builtin and then its argument prototype would still apply.  */
9812 char dmalloc_debug ();
9813 int
9814 main ()
9815 {
9816 dmalloc_debug ();
9817   ;
9818   return 0;
9819 }
9820 _ACEOF
9821 rm -f conftest.$ac_objext conftest$ac_exeext
9822 if { (eval echo "$as_me:9822: \"$ac_link\"") >&5
9823   (eval $ac_link) 2>&5
9824   ac_status=$?
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); } &&
9827          { ac_try='test -s conftest$ac_exeext'
9828   { (eval echo "$as_me:9828: \"$ac_try\"") >&5
9829   (eval $ac_try) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit $ac_status); }; }; then
9833   ac_cv_lib_dmalloc_dmalloc_debug=yes
9834 else
9835   echo "$as_me: failed program was:" >&5
9836 cat conftest.$ac_ext >&5
9837 ac_cv_lib_dmalloc_dmalloc_debug=no
9838 fi
9839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9840 LIBS=$ac_check_lib_save_LIBS
9841 fi
9842 echo "$as_me:9842: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9843 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9844 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9845   cat >>confdefs.h <<EOF
9846 #define HAVE_LIBDMALLOC 1
9847 EOF
9848
9849   LIBS="-ldmalloc $LIBS"
9850
9851 fi
9852
9853 fi
9854
9855 fi
9856
9857 echo "$as_me:9857: checking if you want to use dbmalloc for testing" >&5
9858 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9859
9860 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9861 if test "${with_dbmalloc+set}" = set; then
9862   withval="$with_dbmalloc"
9863   cat >>confdefs.h <<\EOF
9864 #define USE_DBMALLOC 1
9865 EOF
9866
9867         : ${with_cflags:=-g}
9868         : ${with_no_leaks:=yes}
9869          with_dbmalloc=yes
9870 else
9871   with_dbmalloc=
9872 fi;
9873 echo "$as_me:9873: result: ${with_dbmalloc:-no}" >&5
9874 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9875
9876 case .$with_cflags in #(vi
9877 .*-g*)
9878         case .$CFLAGS in #(vi
9879         .*-g*) #(vi
9880                 ;;
9881         *)
9882
9883 cf_fix_cppflags=no
9884 cf_new_cflags=
9885 cf_new_cppflags=
9886 cf_new_extra_cppflags=
9887
9888 for cf_add_cflags in -g
9889 do
9890 case $cf_fix_cppflags in
9891 no)
9892         case $cf_add_cflags in #(vi
9893         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9894                 case $cf_add_cflags in
9895                 -D*)
9896                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9897
9898                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9899                         && test -z "${cf_tst_cflags}" \
9900                         && cf_fix_cppflags=yes
9901
9902                         if test $cf_fix_cppflags = yes ; then
9903                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9904                                 continue
9905                         elif test "${cf_tst_cflags}" = "\"'" ; then
9906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9907                                 continue
9908                         fi
9909                         ;;
9910                 esac
9911                 case "$CPPFLAGS" in
9912                 *$cf_add_cflags) #(vi
9913                         ;;
9914                 *) #(vi
9915                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9916                         ;;
9917                 esac
9918                 ;;
9919         *)
9920                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9921                 ;;
9922         esac
9923         ;;
9924 yes)
9925         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9926
9927         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9928
9929         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9930         && test -z "${cf_tst_cflags}" \
9931         && cf_fix_cppflags=no
9932         ;;
9933 esac
9934 done
9935
9936 if test -n "$cf_new_cflags" ; then
9937
9938         CFLAGS="$CFLAGS $cf_new_cflags"
9939 fi
9940
9941 if test -n "$cf_new_cppflags" ; then
9942
9943         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9944 fi
9945
9946 if test -n "$cf_new_extra_cppflags" ; then
9947
9948         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9949 fi
9950
9951                 ;;
9952         esac
9953         ;;
9954 esac
9955
9956 if test "$with_dbmalloc" = yes ; then
9957         echo "$as_me:9957: checking for dbmalloc.h" >&5
9958 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9959 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9960   echo $ECHO_N "(cached) $ECHO_C" >&6
9961 else
9962   cat >conftest.$ac_ext <<_ACEOF
9963 #line 9963 "configure"
9964 #include "confdefs.h"
9965 #include <dbmalloc.h>
9966 _ACEOF
9967 if { (eval echo "$as_me:9967: \"$ac_cpp conftest.$ac_ext\"") >&5
9968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9969   ac_status=$?
9970   egrep -v '^ *\+' conftest.er1 >conftest.err
9971   rm -f conftest.er1
9972   cat conftest.err >&5
9973   echo "$as_me:9973: \$? = $ac_status" >&5
9974   (exit $ac_status); } >/dev/null; then
9975   if test -s conftest.err; then
9976     ac_cpp_err=$ac_c_preproc_warn_flag
9977   else
9978     ac_cpp_err=
9979   fi
9980 else
9981   ac_cpp_err=yes
9982 fi
9983 if test -z "$ac_cpp_err"; then
9984   ac_cv_header_dbmalloc_h=yes
9985 else
9986   echo "$as_me: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   ac_cv_header_dbmalloc_h=no
9989 fi
9990 rm -f conftest.err conftest.$ac_ext
9991 fi
9992 echo "$as_me:9992: result: $ac_cv_header_dbmalloc_h" >&5
9993 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9994 if test $ac_cv_header_dbmalloc_h = yes; then
9995
9996 echo "$as_me:9996: checking for debug_malloc in -ldbmalloc" >&5
9997 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9998 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9999   echo $ECHO_N "(cached) $ECHO_C" >&6
10000 else
10001   ac_check_lib_save_LIBS=$LIBS
10002 LIBS="-ldbmalloc  $LIBS"
10003 cat >conftest.$ac_ext <<_ACEOF
10004 #line 10004 "configure"
10005 #include "confdefs.h"
10006
10007 /* Override any gcc2 internal prototype to avoid an error.  */
10008 #ifdef __cplusplus
10009 extern "C"
10010 #endif
10011 /* We use char because int might match the return type of a gcc2
10012    builtin and then its argument prototype would still apply.  */
10013 char debug_malloc ();
10014 int
10015 main ()
10016 {
10017 debug_malloc ();
10018   ;
10019   return 0;
10020 }
10021 _ACEOF
10022 rm -f conftest.$ac_objext conftest$ac_exeext
10023 if { (eval echo "$as_me:10023: \"$ac_link\"") >&5
10024   (eval $ac_link) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); } &&
10028          { ac_try='test -s conftest$ac_exeext'
10029   { (eval echo "$as_me:10029: \"$ac_try\"") >&5
10030   (eval $ac_try) 2>&5
10031   ac_status=$?
10032   echo "$as_me:10032: \$? = $ac_status" >&5
10033   (exit $ac_status); }; }; then
10034   ac_cv_lib_dbmalloc_debug_malloc=yes
10035 else
10036   echo "$as_me: failed program was:" >&5
10037 cat conftest.$ac_ext >&5
10038 ac_cv_lib_dbmalloc_debug_malloc=no
10039 fi
10040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10041 LIBS=$ac_check_lib_save_LIBS
10042 fi
10043 echo "$as_me:10043: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10044 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10045 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10046   cat >>confdefs.h <<EOF
10047 #define HAVE_LIBDBMALLOC 1
10048 EOF
10049
10050   LIBS="-ldbmalloc $LIBS"
10051
10052 fi
10053
10054 fi
10055
10056 fi
10057
10058 echo "$as_me:10058: checking if you want to use valgrind for testing" >&5
10059 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10060
10061 # Check whether --with-valgrind or --without-valgrind was given.
10062 if test "${with_valgrind+set}" = set; then
10063   withval="$with_valgrind"
10064   cat >>confdefs.h <<\EOF
10065 #define USE_VALGRIND 1
10066 EOF
10067
10068         : ${with_cflags:=-g}
10069         : ${with_no_leaks:=yes}
10070          with_valgrind=yes
10071 else
10072   with_valgrind=
10073 fi;
10074 echo "$as_me:10074: result: ${with_valgrind:-no}" >&5
10075 echo "${ECHO_T}${with_valgrind:-no}" >&6
10076
10077 case .$with_cflags in #(vi
10078 .*-g*)
10079         case .$CFLAGS in #(vi
10080         .*-g*) #(vi
10081                 ;;
10082         *)
10083
10084 cf_fix_cppflags=no
10085 cf_new_cflags=
10086 cf_new_cppflags=
10087 cf_new_extra_cppflags=
10088
10089 for cf_add_cflags in -g
10090 do
10091 case $cf_fix_cppflags in
10092 no)
10093         case $cf_add_cflags in #(vi
10094         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10095                 case $cf_add_cflags in
10096                 -D*)
10097                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10098
10099                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10100                         && test -z "${cf_tst_cflags}" \
10101                         && cf_fix_cppflags=yes
10102
10103                         if test $cf_fix_cppflags = yes ; then
10104                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10105                                 continue
10106                         elif test "${cf_tst_cflags}" = "\"'" ; then
10107                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10108                                 continue
10109                         fi
10110                         ;;
10111                 esac
10112                 case "$CPPFLAGS" in
10113                 *$cf_add_cflags) #(vi
10114                         ;;
10115                 *) #(vi
10116                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10117                         ;;
10118                 esac
10119                 ;;
10120         *)
10121                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10122                 ;;
10123         esac
10124         ;;
10125 yes)
10126         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10127
10128         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10129
10130         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10131         && test -z "${cf_tst_cflags}" \
10132         && cf_fix_cppflags=no
10133         ;;
10134 esac
10135 done
10136
10137 if test -n "$cf_new_cflags" ; then
10138
10139         CFLAGS="$CFLAGS $cf_new_cflags"
10140 fi
10141
10142 if test -n "$cf_new_cppflags" ; then
10143
10144         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10145 fi
10146
10147 if test -n "$cf_new_extra_cppflags" ; then
10148
10149         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10150 fi
10151
10152                 ;;
10153         esac
10154         ;;
10155 esac
10156
10157 echo "$as_me:10157: checking if you want to perform memory-leak testing" >&5
10158 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10159
10160 # Check whether --enable-leaks or --disable-leaks was given.
10161 if test "${enable_leaks+set}" = set; then
10162   enableval="$enable_leaks"
10163   with_no_leaks=yes
10164 else
10165   : ${with_no_leaks:=no}
10166 fi;
10167 echo "$as_me:10167: result: $with_no_leaks" >&5
10168 echo "${ECHO_T}$with_no_leaks" >&6
10169
10170 if test "$with_no_leaks" = yes ; then
10171         cat >>confdefs.h <<\EOF
10172 #define NO_LEAKS 1
10173 EOF
10174
10175 fi
10176
10177 cat >>confdefs.h <<\EOF
10178 #define HAVE_NC_ALLOC_H 1
10179 EOF
10180
10181 ###     use option --enable-expanded to generate certain macros as functions
10182
10183 # Check whether --enable-expanded or --disable-expanded was given.
10184 if test "${enable_expanded+set}" = set; then
10185   enableval="$enable_expanded"
10186   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10187 #define NCURSES_EXPANDED 1
10188 EOF
10189
10190 fi;
10191
10192 ###     use option --disable-macros to suppress macros in favor of functions
10193
10194 # Check whether --enable-macros or --disable-macros was given.
10195 if test "${enable_macros+set}" = set; then
10196   enableval="$enable_macros"
10197   test "$enableval" = no && cat >>confdefs.h <<\EOF
10198 #define NCURSES_NOMACROS 1
10199 EOF
10200
10201 fi;
10202
10203 # Normally we only add trace() to the debug-library.  Allow this to be
10204 # extended to all models of the ncurses library:
10205 cf_all_traces=no
10206 case "$CFLAGS $CPPFLAGS" in
10207 *-DTRACE*)
10208         cf_all_traces=yes
10209         ;;
10210 esac
10211
10212 echo "$as_me:10212: checking whether to add trace feature to all models" >&5
10213 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10214
10215 # Check whether --with-trace or --without-trace was given.
10216 if test "${with_trace+set}" = set; then
10217   withval="$with_trace"
10218   cf_with_trace=$withval
10219 else
10220   cf_with_trace=$cf_all_traces
10221 fi;
10222 echo "$as_me:10222: result: $cf_with_trace" >&5
10223 echo "${ECHO_T}$cf_with_trace" >&6
10224
10225 if test "$cf_with_trace" = yes ; then
10226         LIB_TRACING=all
10227         ADA_TRACE=TRUE
10228
10229 cf_fix_cppflags=no
10230 cf_new_cflags=
10231 cf_new_cppflags=
10232 cf_new_extra_cppflags=
10233
10234 for cf_add_cflags in -DTRACE
10235 do
10236 case $cf_fix_cppflags in
10237 no)
10238         case $cf_add_cflags in #(vi
10239         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10240                 case $cf_add_cflags in
10241                 -D*)
10242                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10243
10244                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10245                         && test -z "${cf_tst_cflags}" \
10246                         && cf_fix_cppflags=yes
10247
10248                         if test $cf_fix_cppflags = yes ; then
10249                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10250                                 continue
10251                         elif test "${cf_tst_cflags}" = "\"'" ; then
10252                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10253                                 continue
10254                         fi
10255                         ;;
10256                 esac
10257                 case "$CPPFLAGS" in
10258                 *$cf_add_cflags) #(vi
10259                         ;;
10260                 *) #(vi
10261                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10262                         ;;
10263                 esac
10264                 ;;
10265         *)
10266                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10267                 ;;
10268         esac
10269         ;;
10270 yes)
10271         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10272
10273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10274
10275         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10276         && test -z "${cf_tst_cflags}" \
10277         && cf_fix_cppflags=no
10278         ;;
10279 esac
10280 done
10281
10282 if test -n "$cf_new_cflags" ; then
10283
10284         CFLAGS="$CFLAGS $cf_new_cflags"
10285 fi
10286
10287 if test -n "$cf_new_cppflags" ; then
10288
10289         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10290 fi
10291
10292 if test -n "$cf_new_extra_cppflags" ; then
10293
10294         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10295 fi
10296
10297 else
10298         LIB_TRACING=DEBUG
10299         ADA_TRACE=FALSE
10300 fi
10301
10302 ###     Checks for libraries.
10303 echo "$as_me:10303: checking for gettimeofday" >&5
10304 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10305 if test "${ac_cv_func_gettimeofday+set}" = set; then
10306   echo $ECHO_N "(cached) $ECHO_C" >&6
10307 else
10308   cat >conftest.$ac_ext <<_ACEOF
10309 #line 10309 "configure"
10310 #include "confdefs.h"
10311 /* System header to define __stub macros and hopefully few prototypes,
10312     which can conflict with char gettimeofday (); below.  */
10313 #include <assert.h>
10314 /* Override any gcc2 internal prototype to avoid an error.  */
10315 #ifdef __cplusplus
10316 extern "C"
10317 #endif
10318 /* We use char because int might match the return type of a gcc2
10319    builtin and then its argument prototype would still apply.  */
10320 char gettimeofday ();
10321 char (*f) ();
10322
10323 int
10324 main ()
10325 {
10326 /* The GNU C library defines this for functions which it implements
10327     to always fail with ENOSYS.  Some functions are actually named
10328     something starting with __ and the normal name is an alias.  */
10329 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10330 choke me
10331 #else
10332 f = gettimeofday;
10333 #endif
10334
10335   ;
10336   return 0;
10337 }
10338 _ACEOF
10339 rm -f conftest.$ac_objext conftest$ac_exeext
10340 if { (eval echo "$as_me:10340: \"$ac_link\"") >&5
10341   (eval $ac_link) 2>&5
10342   ac_status=$?
10343   echo "$as_me:10343: \$? = $ac_status" >&5
10344   (exit $ac_status); } &&
10345          { ac_try='test -s conftest$ac_exeext'
10346   { (eval echo "$as_me:10346: \"$ac_try\"") >&5
10347   (eval $ac_try) 2>&5
10348   ac_status=$?
10349   echo "$as_me:10349: \$? = $ac_status" >&5
10350   (exit $ac_status); }; }; then
10351   ac_cv_func_gettimeofday=yes
10352 else
10353   echo "$as_me: failed program was:" >&5
10354 cat conftest.$ac_ext >&5
10355 ac_cv_func_gettimeofday=no
10356 fi
10357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10358 fi
10359 echo "$as_me:10359: result: $ac_cv_func_gettimeofday" >&5
10360 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10361 if test $ac_cv_func_gettimeofday = yes; then
10362   cat >>confdefs.h <<\EOF
10363 #define HAVE_GETTIMEOFDAY 1
10364 EOF
10365
10366 else
10367
10368 echo "$as_me:10368: checking for gettimeofday in -lbsd" >&5
10369 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10370 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10371   echo $ECHO_N "(cached) $ECHO_C" >&6
10372 else
10373   ac_check_lib_save_LIBS=$LIBS
10374 LIBS="-lbsd  $LIBS"
10375 cat >conftest.$ac_ext <<_ACEOF
10376 #line 10376 "configure"
10377 #include "confdefs.h"
10378
10379 /* Override any gcc2 internal prototype to avoid an error.  */
10380 #ifdef __cplusplus
10381 extern "C"
10382 #endif
10383 /* We use char because int might match the return type of a gcc2
10384    builtin and then its argument prototype would still apply.  */
10385 char gettimeofday ();
10386 int
10387 main ()
10388 {
10389 gettimeofday ();
10390   ;
10391   return 0;
10392 }
10393 _ACEOF
10394 rm -f conftest.$ac_objext conftest$ac_exeext
10395 if { (eval echo "$as_me:10395: \"$ac_link\"") >&5
10396   (eval $ac_link) 2>&5
10397   ac_status=$?
10398   echo "$as_me:10398: \$? = $ac_status" >&5
10399   (exit $ac_status); } &&
10400          { ac_try='test -s conftest$ac_exeext'
10401   { (eval echo "$as_me:10401: \"$ac_try\"") >&5
10402   (eval $ac_try) 2>&5
10403   ac_status=$?
10404   echo "$as_me:10404: \$? = $ac_status" >&5
10405   (exit $ac_status); }; }; then
10406   ac_cv_lib_bsd_gettimeofday=yes
10407 else
10408   echo "$as_me: failed program was:" >&5
10409 cat conftest.$ac_ext >&5
10410 ac_cv_lib_bsd_gettimeofday=no
10411 fi
10412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10413 LIBS=$ac_check_lib_save_LIBS
10414 fi
10415 echo "$as_me:10415: result: $ac_cv_lib_bsd_gettimeofday" >&5
10416 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10417 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10418   cat >>confdefs.h <<\EOF
10419 #define HAVE_GETTIMEOFDAY 1
10420 EOF
10421
10422         LIBS="$LIBS -lbsd"
10423 fi
10424
10425 fi
10426
10427 echo "$as_me:10427: checking if -lm needed for math functions" >&5
10428 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10429 if test "${cf_cv_need_libm+set}" = set; then
10430   echo $ECHO_N "(cached) $ECHO_C" >&6
10431 else
10432
10433         cat >conftest.$ac_ext <<_ACEOF
10434 #line 10434 "configure"
10435 #include "confdefs.h"
10436
10437         #include <stdio.h>
10438         #include <math.h>
10439
10440 int
10441 main ()
10442 {
10443 double x = rand(); printf("result = %g\n", sin(x))
10444   ;
10445   return 0;
10446 }
10447 _ACEOF
10448 rm -f conftest.$ac_objext conftest$ac_exeext
10449 if { (eval echo "$as_me:10449: \"$ac_link\"") >&5
10450   (eval $ac_link) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); } &&
10454          { ac_try='test -s conftest$ac_exeext'
10455   { (eval echo "$as_me:10455: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); }; }; then
10460   cf_cv_need_libm=no
10461 else
10462   echo "$as_me: failed program was:" >&5
10463 cat conftest.$ac_ext >&5
10464 cf_cv_need_libm=yes
10465 fi
10466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10467 fi
10468 echo "$as_me:10468: result: $cf_cv_need_libm" >&5
10469 echo "${ECHO_T}$cf_cv_need_libm" >&6
10470 if test "$cf_cv_need_libm" = yes
10471 then
10472 MATH_LIB=-lm
10473 fi
10474
10475 ###     Checks for header files.
10476 echo "$as_me:10476: checking for ANSI C header files" >&5
10477 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10478 if test "${ac_cv_header_stdc+set}" = set; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 else
10481   cat >conftest.$ac_ext <<_ACEOF
10482 #line 10482 "configure"
10483 #include "confdefs.h"
10484 #include <stdlib.h>
10485 #include <stdarg.h>
10486 #include <string.h>
10487 #include <float.h>
10488
10489 _ACEOF
10490 if { (eval echo "$as_me:10490: \"$ac_cpp conftest.$ac_ext\"") >&5
10491   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10492   ac_status=$?
10493   egrep -v '^ *\+' conftest.er1 >conftest.err
10494   rm -f conftest.er1
10495   cat conftest.err >&5
10496   echo "$as_me:10496: \$? = $ac_status" >&5
10497   (exit $ac_status); } >/dev/null; then
10498   if test -s conftest.err; then
10499     ac_cpp_err=$ac_c_preproc_warn_flag
10500   else
10501     ac_cpp_err=
10502   fi
10503 else
10504   ac_cpp_err=yes
10505 fi
10506 if test -z "$ac_cpp_err"; then
10507   ac_cv_header_stdc=yes
10508 else
10509   echo "$as_me: failed program was:" >&5
10510   cat conftest.$ac_ext >&5
10511   ac_cv_header_stdc=no
10512 fi
10513 rm -f conftest.err conftest.$ac_ext
10514
10515 if test $ac_cv_header_stdc = yes; then
10516   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10517   cat >conftest.$ac_ext <<_ACEOF
10518 #line 10518 "configure"
10519 #include "confdefs.h"
10520 #include <string.h>
10521
10522 _ACEOF
10523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10524   egrep "memchr" >/dev/null 2>&1; then
10525   :
10526 else
10527   ac_cv_header_stdc=no
10528 fi
10529 rm -f conftest*
10530
10531 fi
10532
10533 if test $ac_cv_header_stdc = yes; then
10534   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10535   cat >conftest.$ac_ext <<_ACEOF
10536 #line 10536 "configure"
10537 #include "confdefs.h"
10538 #include <stdlib.h>
10539
10540 _ACEOF
10541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10542   egrep "free" >/dev/null 2>&1; then
10543   :
10544 else
10545   ac_cv_header_stdc=no
10546 fi
10547 rm -f conftest*
10548
10549 fi
10550
10551 if test $ac_cv_header_stdc = yes; then
10552   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10553   if test "$cross_compiling" = yes; then
10554   :
10555 else
10556   cat >conftest.$ac_ext <<_ACEOF
10557 #line 10557 "configure"
10558 #include "confdefs.h"
10559 #include <ctype.h>
10560 #if ((' ' & 0x0FF) == 0x020)
10561 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10562 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10563 #else
10564 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10565                      || ('j' <= (c) && (c) <= 'r') \
10566                      || ('s' <= (c) && (c) <= 'z'))
10567 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10568 #endif
10569
10570 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10571 int
10572 main ()
10573 {
10574   int i;
10575   for (i = 0; i < 256; i++)
10576     if (XOR (islower (i), ISLOWER (i))
10577         || toupper (i) != TOUPPER (i))
10578       $ac_main_return(2);
10579   $ac_main_return (0);
10580 }
10581 _ACEOF
10582 rm -f conftest$ac_exeext
10583 if { (eval echo "$as_me:10583: \"$ac_link\"") >&5
10584   (eval $ac_link) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10588   { (eval echo "$as_me:10588: \"$ac_try\"") >&5
10589   (eval $ac_try) 2>&5
10590   ac_status=$?
10591   echo "$as_me:10591: \$? = $ac_status" >&5
10592   (exit $ac_status); }; }; then
10593   :
10594 else
10595   echo "$as_me: program exited with status $ac_status" >&5
10596 echo "$as_me: failed program was:" >&5
10597 cat conftest.$ac_ext >&5
10598 ac_cv_header_stdc=no
10599 fi
10600 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10601 fi
10602 fi
10603 fi
10604 echo "$as_me:10604: result: $ac_cv_header_stdc" >&5
10605 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10606 if test $ac_cv_header_stdc = yes; then
10607
10608 cat >>confdefs.h <<\EOF
10609 #define STDC_HEADERS 1
10610 EOF
10611
10612 fi
10613
10614 ac_header_dirent=no
10615 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10616   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10617 echo "$as_me:10617: checking for $ac_hdr that defines DIR" >&5
10618 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10620   echo $ECHO_N "(cached) $ECHO_C" >&6
10621 else
10622   cat >conftest.$ac_ext <<_ACEOF
10623 #line 10623 "configure"
10624 #include "confdefs.h"
10625 #include <sys/types.h>
10626 #include <$ac_hdr>
10627
10628 int
10629 main ()
10630 {
10631 if ((DIR *) 0)
10632 return 0;
10633   ;
10634   return 0;
10635 }
10636 _ACEOF
10637 rm -f conftest.$ac_objext
10638 if { (eval echo "$as_me:10638: \"$ac_compile\"") >&5
10639   (eval $ac_compile) 2>&5
10640   ac_status=$?
10641   echo "$as_me:10641: \$? = $ac_status" >&5
10642   (exit $ac_status); } &&
10643          { ac_try='test -s conftest.$ac_objext'
10644   { (eval echo "$as_me:10644: \"$ac_try\"") >&5
10645   (eval $ac_try) 2>&5
10646   ac_status=$?
10647   echo "$as_me:10647: \$? = $ac_status" >&5
10648   (exit $ac_status); }; }; then
10649   eval "$as_ac_Header=yes"
10650 else
10651   echo "$as_me: failed program was:" >&5
10652 cat conftest.$ac_ext >&5
10653 eval "$as_ac_Header=no"
10654 fi
10655 rm -f conftest.$ac_objext conftest.$ac_ext
10656 fi
10657 echo "$as_me:10657: result: `eval echo '${'$as_ac_Header'}'`" >&5
10658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10660   cat >>confdefs.h <<EOF
10661 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10662 EOF
10663
10664 ac_header_dirent=$ac_hdr; break
10665 fi
10666
10667 done
10668 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10669 if test $ac_header_dirent = dirent.h; then
10670   echo "$as_me:10670: checking for opendir in -ldir" >&5
10671 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10672 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10673   echo $ECHO_N "(cached) $ECHO_C" >&6
10674 else
10675   ac_check_lib_save_LIBS=$LIBS
10676 LIBS="-ldir  $LIBS"
10677 cat >conftest.$ac_ext <<_ACEOF
10678 #line 10678 "configure"
10679 #include "confdefs.h"
10680
10681 /* Override any gcc2 internal prototype to avoid an error.  */
10682 #ifdef __cplusplus
10683 extern "C"
10684 #endif
10685 /* We use char because int might match the return type of a gcc2
10686    builtin and then its argument prototype would still apply.  */
10687 char opendir ();
10688 int
10689 main ()
10690 {
10691 opendir ();
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 rm -f conftest.$ac_objext conftest$ac_exeext
10697 if { (eval echo "$as_me:10697: \"$ac_link\"") >&5
10698   (eval $ac_link) 2>&5
10699   ac_status=$?
10700   echo "$as_me:10700: \$? = $ac_status" >&5
10701   (exit $ac_status); } &&
10702          { ac_try='test -s conftest$ac_exeext'
10703   { (eval echo "$as_me:10703: \"$ac_try\"") >&5
10704   (eval $ac_try) 2>&5
10705   ac_status=$?
10706   echo "$as_me:10706: \$? = $ac_status" >&5
10707   (exit $ac_status); }; }; then
10708   ac_cv_lib_dir_opendir=yes
10709 else
10710   echo "$as_me: failed program was:" >&5
10711 cat conftest.$ac_ext >&5
10712 ac_cv_lib_dir_opendir=no
10713 fi
10714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10715 LIBS=$ac_check_lib_save_LIBS
10716 fi
10717 echo "$as_me:10717: result: $ac_cv_lib_dir_opendir" >&5
10718 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10719 if test $ac_cv_lib_dir_opendir = yes; then
10720   LIBS="$LIBS -ldir"
10721 fi
10722
10723 else
10724   echo "$as_me:10724: checking for opendir in -lx" >&5
10725 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10726 if test "${ac_cv_lib_x_opendir+set}" = set; then
10727   echo $ECHO_N "(cached) $ECHO_C" >&6
10728 else
10729   ac_check_lib_save_LIBS=$LIBS
10730 LIBS="-lx  $LIBS"
10731 cat >conftest.$ac_ext <<_ACEOF
10732 #line 10732 "configure"
10733 #include "confdefs.h"
10734
10735 /* Override any gcc2 internal prototype to avoid an error.  */
10736 #ifdef __cplusplus
10737 extern "C"
10738 #endif
10739 /* We use char because int might match the return type of a gcc2
10740    builtin and then its argument prototype would still apply.  */
10741 char opendir ();
10742 int
10743 main ()
10744 {
10745 opendir ();
10746   ;
10747   return 0;
10748 }
10749 _ACEOF
10750 rm -f conftest.$ac_objext conftest$ac_exeext
10751 if { (eval echo "$as_me:10751: \"$ac_link\"") >&5
10752   (eval $ac_link) 2>&5
10753   ac_status=$?
10754   echo "$as_me:10754: \$? = $ac_status" >&5
10755   (exit $ac_status); } &&
10756          { ac_try='test -s conftest$ac_exeext'
10757   { (eval echo "$as_me:10757: \"$ac_try\"") >&5
10758   (eval $ac_try) 2>&5
10759   ac_status=$?
10760   echo "$as_me:10760: \$? = $ac_status" >&5
10761   (exit $ac_status); }; }; then
10762   ac_cv_lib_x_opendir=yes
10763 else
10764   echo "$as_me: failed program was:" >&5
10765 cat conftest.$ac_ext >&5
10766 ac_cv_lib_x_opendir=no
10767 fi
10768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10769 LIBS=$ac_check_lib_save_LIBS
10770 fi
10771 echo "$as_me:10771: result: $ac_cv_lib_x_opendir" >&5
10772 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10773 if test $ac_cv_lib_x_opendir = yes; then
10774   LIBS="$LIBS -lx"
10775 fi
10776
10777 fi
10778
10779 echo "$as_me:10779: checking whether time.h and sys/time.h may both be included" >&5
10780 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10781 if test "${ac_cv_header_time+set}" = set; then
10782   echo $ECHO_N "(cached) $ECHO_C" >&6
10783 else
10784   cat >conftest.$ac_ext <<_ACEOF
10785 #line 10785 "configure"
10786 #include "confdefs.h"
10787 #include <sys/types.h>
10788 #include <sys/time.h>
10789 #include <time.h>
10790
10791 int
10792 main ()
10793 {
10794 if ((struct tm *) 0)
10795 return 0;
10796   ;
10797   return 0;
10798 }
10799 _ACEOF
10800 rm -f conftest.$ac_objext
10801 if { (eval echo "$as_me:10801: \"$ac_compile\"") >&5
10802   (eval $ac_compile) 2>&5
10803   ac_status=$?
10804   echo "$as_me:10804: \$? = $ac_status" >&5
10805   (exit $ac_status); } &&
10806          { ac_try='test -s conftest.$ac_objext'
10807   { (eval echo "$as_me:10807: \"$ac_try\"") >&5
10808   (eval $ac_try) 2>&5
10809   ac_status=$?
10810   echo "$as_me:10810: \$? = $ac_status" >&5
10811   (exit $ac_status); }; }; then
10812   ac_cv_header_time=yes
10813 else
10814   echo "$as_me: failed program was:" >&5
10815 cat conftest.$ac_ext >&5
10816 ac_cv_header_time=no
10817 fi
10818 rm -f conftest.$ac_objext conftest.$ac_ext
10819 fi
10820 echo "$as_me:10820: result: $ac_cv_header_time" >&5
10821 echo "${ECHO_T}$ac_cv_header_time" >&6
10822 if test $ac_cv_header_time = yes; then
10823
10824 cat >>confdefs.h <<\EOF
10825 #define TIME_WITH_SYS_TIME 1
10826 EOF
10827
10828 fi
10829
10830 echo "$as_me:10830: checking for regular-expression headers" >&5
10831 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10832 if test "${cf_cv_regex+set}" = set; then
10833   echo $ECHO_N "(cached) $ECHO_C" >&6
10834 else
10835
10836 cat >conftest.$ac_ext <<_ACEOF
10837 #line 10837 "configure"
10838 #include "confdefs.h"
10839 #include <sys/types.h>
10840 #include <regex.h>
10841 int
10842 main ()
10843 {
10844
10845         regex_t *p;
10846         int x = regcomp(p, "", 0);
10847         int y = regexec(p, "", 0, 0, 0);
10848         regfree(p);
10849
10850   ;
10851   return 0;
10852 }
10853 _ACEOF
10854 rm -f conftest.$ac_objext conftest$ac_exeext
10855 if { (eval echo "$as_me:10855: \"$ac_link\"") >&5
10856   (eval $ac_link) 2>&5
10857   ac_status=$?
10858   echo "$as_me:10858: \$? = $ac_status" >&5
10859   (exit $ac_status); } &&
10860          { ac_try='test -s conftest$ac_exeext'
10861   { (eval echo "$as_me:10861: \"$ac_try\"") >&5
10862   (eval $ac_try) 2>&5
10863   ac_status=$?
10864   echo "$as_me:10864: \$? = $ac_status" >&5
10865   (exit $ac_status); }; }; then
10866   cf_cv_regex="regex.h"
10867 else
10868   echo "$as_me: failed program was:" >&5
10869 cat conftest.$ac_ext >&5
10870
10871         cat >conftest.$ac_ext <<_ACEOF
10872 #line 10872 "configure"
10873 #include "confdefs.h"
10874 #include <regexp.h>
10875 int
10876 main ()
10877 {
10878
10879                 char *p = compile("", "", "", 0);
10880                 int x = step("", "");
10881
10882   ;
10883   return 0;
10884 }
10885 _ACEOF
10886 rm -f conftest.$ac_objext conftest$ac_exeext
10887 if { (eval echo "$as_me:10887: \"$ac_link\"") >&5
10888   (eval $ac_link) 2>&5
10889   ac_status=$?
10890   echo "$as_me:10890: \$? = $ac_status" >&5
10891   (exit $ac_status); } &&
10892          { ac_try='test -s conftest$ac_exeext'
10893   { (eval echo "$as_me:10893: \"$ac_try\"") >&5
10894   (eval $ac_try) 2>&5
10895   ac_status=$?
10896   echo "$as_me:10896: \$? = $ac_status" >&5
10897   (exit $ac_status); }; }; then
10898   cf_cv_regex="regexp.h"
10899 else
10900   echo "$as_me: failed program was:" >&5
10901 cat conftest.$ac_ext >&5
10902
10903                 cf_save_LIBS="$LIBS"
10904                 LIBS="-lgen $LIBS"
10905                 cat >conftest.$ac_ext <<_ACEOF
10906 #line 10906 "configure"
10907 #include "confdefs.h"
10908 #include <regexpr.h>
10909 int
10910 main ()
10911 {
10912
10913                         char *p = compile("", "", "");
10914                         int x = step("", "");
10915
10916   ;
10917   return 0;
10918 }
10919 _ACEOF
10920 rm -f conftest.$ac_objext conftest$ac_exeext
10921 if { (eval echo "$as_me:10921: \"$ac_link\"") >&5
10922   (eval $ac_link) 2>&5
10923   ac_status=$?
10924   echo "$as_me:10924: \$? = $ac_status" >&5
10925   (exit $ac_status); } &&
10926          { ac_try='test -s conftest$ac_exeext'
10927   { (eval echo "$as_me:10927: \"$ac_try\"") >&5
10928   (eval $ac_try) 2>&5
10929   ac_status=$?
10930   echo "$as_me:10930: \$? = $ac_status" >&5
10931   (exit $ac_status); }; }; then
10932   cf_cv_regex="regexpr.h"
10933 else
10934   echo "$as_me: failed program was:" >&5
10935 cat conftest.$ac_ext >&5
10936 LIBS="$cf_save_LIBS"
10937 fi
10938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10939 fi
10940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10941 fi
10942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10943
10944 fi
10945
10946 echo "$as_me:10946: result: $cf_cv_regex" >&5
10947 echo "${ECHO_T}$cf_cv_regex" >&6
10948 case $cf_cv_regex in
10949         regex.h)   cat >>confdefs.h <<\EOF
10950 #define HAVE_REGEX_H_FUNCS 1
10951 EOF
10952  ;;
10953         regexp.h)  cat >>confdefs.h <<\EOF
10954 #define HAVE_REGEXP_H_FUNCS 1
10955 EOF
10956  ;;
10957         regexpr.h) cat >>confdefs.h <<\EOF
10958 #define HAVE_REGEXPR_H_FUNCS 1
10959 EOF
10960  ;;
10961 esac
10962
10963 for ac_header in \
10964 fcntl.h \
10965 getopt.h \
10966 limits.h \
10967 locale.h \
10968 poll.h \
10969 sys/bsdtypes.h \
10970 sys/ioctl.h \
10971 sys/param.h \
10972 sys/poll.h \
10973 sys/select.h \
10974 sys/time.h \
10975 sys/times.h \
10976 ttyent.h \
10977 unistd.h \
10978 wctype.h \
10979
10980 do
10981 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10982 echo "$as_me:10982: checking for $ac_header" >&5
10983 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10984 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10985   echo $ECHO_N "(cached) $ECHO_C" >&6
10986 else
10987   cat >conftest.$ac_ext <<_ACEOF
10988 #line 10988 "configure"
10989 #include "confdefs.h"
10990 #include <$ac_header>
10991 _ACEOF
10992 if { (eval echo "$as_me:10992: \"$ac_cpp conftest.$ac_ext\"") >&5
10993   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10994   ac_status=$?
10995   egrep -v '^ *\+' conftest.er1 >conftest.err
10996   rm -f conftest.er1
10997   cat conftest.err >&5
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit $ac_status); } >/dev/null; then
11000   if test -s conftest.err; then
11001     ac_cpp_err=$ac_c_preproc_warn_flag
11002   else
11003     ac_cpp_err=
11004   fi
11005 else
11006   ac_cpp_err=yes
11007 fi
11008 if test -z "$ac_cpp_err"; then
11009   eval "$as_ac_Header=yes"
11010 else
11011   echo "$as_me: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   eval "$as_ac_Header=no"
11014 fi
11015 rm -f conftest.err conftest.$ac_ext
11016 fi
11017 echo "$as_me:11017: result: `eval echo '${'$as_ac_Header'}'`" >&5
11018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11020   cat >>confdefs.h <<EOF
11021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11022 EOF
11023
11024 fi
11025 done
11026
11027 # check for ISC (this may also define _POSIX_SOURCE)
11028 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11029 if test "$ISC" = yes ; then
11030
11031 echo "$as_me:11031: checking for main in -lcposix" >&5
11032 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11033 if test "${ac_cv_lib_cposix_main+set}" = set; then
11034   echo $ECHO_N "(cached) $ECHO_C" >&6
11035 else
11036   ac_check_lib_save_LIBS=$LIBS
11037 LIBS="-lcposix  $LIBS"
11038 cat >conftest.$ac_ext <<_ACEOF
11039 #line 11039 "configure"
11040 #include "confdefs.h"
11041
11042 int
11043 main ()
11044 {
11045 main ();
11046   ;
11047   return 0;
11048 }
11049 _ACEOF
11050 rm -f conftest.$ac_objext conftest$ac_exeext
11051 if { (eval echo "$as_me:11051: \"$ac_link\"") >&5
11052   (eval $ac_link) 2>&5
11053   ac_status=$?
11054   echo "$as_me:11054: \$? = $ac_status" >&5
11055   (exit $ac_status); } &&
11056          { ac_try='test -s conftest$ac_exeext'
11057   { (eval echo "$as_me:11057: \"$ac_try\"") >&5
11058   (eval $ac_try) 2>&5
11059   ac_status=$?
11060   echo "$as_me:11060: \$? = $ac_status" >&5
11061   (exit $ac_status); }; }; then
11062   ac_cv_lib_cposix_main=yes
11063 else
11064   echo "$as_me: failed program was:" >&5
11065 cat conftest.$ac_ext >&5
11066 ac_cv_lib_cposix_main=no
11067 fi
11068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11069 LIBS=$ac_check_lib_save_LIBS
11070 fi
11071 echo "$as_me:11071: result: $ac_cv_lib_cposix_main" >&5
11072 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11073 if test $ac_cv_lib_cposix_main = yes; then
11074   cat >>confdefs.h <<EOF
11075 #define HAVE_LIBCPOSIX 1
11076 EOF
11077
11078   LIBS="-lcposix $LIBS"
11079
11080 fi
11081
11082         echo "$as_me:11082: checking for bzero in -linet" >&5
11083 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11084 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11085   echo $ECHO_N "(cached) $ECHO_C" >&6
11086 else
11087   ac_check_lib_save_LIBS=$LIBS
11088 LIBS="-linet  $LIBS"
11089 cat >conftest.$ac_ext <<_ACEOF
11090 #line 11090 "configure"
11091 #include "confdefs.h"
11092
11093 /* Override any gcc2 internal prototype to avoid an error.  */
11094 #ifdef __cplusplus
11095 extern "C"
11096 #endif
11097 /* We use char because int might match the return type of a gcc2
11098    builtin and then its argument prototype would still apply.  */
11099 char bzero ();
11100 int
11101 main ()
11102 {
11103 bzero ();
11104   ;
11105   return 0;
11106 }
11107 _ACEOF
11108 rm -f conftest.$ac_objext conftest$ac_exeext
11109 if { (eval echo "$as_me:11109: \"$ac_link\"") >&5
11110   (eval $ac_link) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); } &&
11114          { ac_try='test -s conftest$ac_exeext'
11115   { (eval echo "$as_me:11115: \"$ac_try\"") >&5
11116   (eval $ac_try) 2>&5
11117   ac_status=$?
11118   echo "$as_me:11118: \$? = $ac_status" >&5
11119   (exit $ac_status); }; }; then
11120   ac_cv_lib_inet_bzero=yes
11121 else
11122   echo "$as_me: failed program was:" >&5
11123 cat conftest.$ac_ext >&5
11124 ac_cv_lib_inet_bzero=no
11125 fi
11126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11127 LIBS=$ac_check_lib_save_LIBS
11128 fi
11129 echo "$as_me:11129: result: $ac_cv_lib_inet_bzero" >&5
11130 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11131 if test $ac_cv_lib_inet_bzero = yes; then
11132   LIBS="$LIBS -linet"
11133 fi
11134 fi
11135
11136 echo "$as_me:11136: checking if sys/time.h works with sys/select.h" >&5
11137 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11138 if test "${cf_cv_sys_time_select+set}" = set; then
11139   echo $ECHO_N "(cached) $ECHO_C" >&6
11140 else
11141
11142 cat >conftest.$ac_ext <<_ACEOF
11143 #line 11143 "configure"
11144 #include "confdefs.h"
11145
11146 #include <sys/types.h>
11147 #ifdef HAVE_SYS_TIME_H
11148 #include <sys/time.h>
11149 #endif
11150 #ifdef HAVE_SYS_SELECT_H
11151 #include <sys/select.h>
11152 #endif
11153
11154 int
11155 main ()
11156 {
11157
11158   ;
11159   return 0;
11160 }
11161 _ACEOF
11162 rm -f conftest.$ac_objext
11163 if { (eval echo "$as_me:11163: \"$ac_compile\"") >&5
11164   (eval $ac_compile) 2>&5
11165   ac_status=$?
11166   echo "$as_me:11166: \$? = $ac_status" >&5
11167   (exit $ac_status); } &&
11168          { ac_try='test -s conftest.$ac_objext'
11169   { (eval echo "$as_me:11169: \"$ac_try\"") >&5
11170   (eval $ac_try) 2>&5
11171   ac_status=$?
11172   echo "$as_me:11172: \$? = $ac_status" >&5
11173   (exit $ac_status); }; }; then
11174   cf_cv_sys_time_select=yes
11175 else
11176   echo "$as_me: failed program was:" >&5
11177 cat conftest.$ac_ext >&5
11178 cf_cv_sys_time_select=no
11179 fi
11180 rm -f conftest.$ac_objext conftest.$ac_ext
11181
11182 fi
11183
11184 echo "$as_me:11184: result: $cf_cv_sys_time_select" >&5
11185 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11186 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11187 #define HAVE_SYS_TIME_SELECT 1
11188 EOF
11189
11190 ###     checks for compiler characteristics
11191 ac_ext=c
11192 ac_cpp='$CPP $CPPFLAGS'
11193 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11194 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11195 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11196 ac_main_return=return
11197
11198 echo "$as_me:11198: checking for $CC option to accept ANSI C" >&5
11199 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11200 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11201   echo $ECHO_N "(cached) $ECHO_C" >&6
11202 else
11203   ac_cv_prog_cc_stdc=no
11204 ac_save_CC=$CC
11205 cat >conftest.$ac_ext <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11208 #include <stdarg.h>
11209 #include <stdio.h>
11210 #include <sys/types.h>
11211 #include <sys/stat.h>
11212 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11213 struct buf { int x; };
11214 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11215 static char *e (p, i)
11216      char **p;
11217      int i;
11218 {
11219   return p[i];
11220 }
11221 static char *f (char * (*g) (char **, int), char **p, ...)
11222 {
11223   char *s;
11224   va_list v;
11225   va_start (v,p);
11226   s = g (p, va_arg (v,int));
11227   va_end (v);
11228   return s;
11229 }
11230 int test (int i, double x);
11231 struct s1 {int (*f) (int a);};
11232 struct s2 {int (*f) (double a);};
11233 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11234 int argc;
11235 char **argv;
11236 int
11237 main ()
11238 {
11239 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11240   ;
11241   return 0;
11242 }
11243 _ACEOF
11244 # Don't try gcc -ansi; that turns off useful extensions and
11245 # breaks some systems' header files.
11246 # AIX                   -qlanglvl=ansi
11247 # Ultrix and OSF/1      -std1
11248 # HP-UX 10.20 and later -Ae
11249 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11250 # SVR4                  -Xc -D__EXTENSIONS__
11251 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11252 do
11253   CC="$ac_save_CC $ac_arg"
11254   rm -f conftest.$ac_objext
11255 if { (eval echo "$as_me:11255: \"$ac_compile\"") >&5
11256   (eval $ac_compile) 2>&5
11257   ac_status=$?
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit $ac_status); } &&
11260          { ac_try='test -s conftest.$ac_objext'
11261   { (eval echo "$as_me:11261: \"$ac_try\"") >&5
11262   (eval $ac_try) 2>&5
11263   ac_status=$?
11264   echo "$as_me:11264: \$? = $ac_status" >&5
11265   (exit $ac_status); }; }; then
11266   ac_cv_prog_cc_stdc=$ac_arg
11267 break
11268 else
11269   echo "$as_me: failed program was:" >&5
11270 cat conftest.$ac_ext >&5
11271 fi
11272 rm -f conftest.$ac_objext
11273 done
11274 rm -f conftest.$ac_ext conftest.$ac_objext
11275 CC=$ac_save_CC
11276
11277 fi
11278
11279 case "x$ac_cv_prog_cc_stdc" in
11280   x|xno)
11281     echo "$as_me:11281: result: none needed" >&5
11282 echo "${ECHO_T}none needed" >&6 ;;
11283   *)
11284     echo "$as_me:11284: result: $ac_cv_prog_cc_stdc" >&5
11285 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11286     CC="$CC $ac_cv_prog_cc_stdc" ;;
11287 esac
11288
11289 echo "$as_me:11289: checking for an ANSI C-conforming const" >&5
11290 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11291 if test "${ac_cv_c_const+set}" = set; then
11292   echo $ECHO_N "(cached) $ECHO_C" >&6
11293 else
11294   cat >conftest.$ac_ext <<_ACEOF
11295 #line 11295 "configure"
11296 #include "confdefs.h"
11297
11298 int
11299 main ()
11300 {
11301 /* FIXME: Include the comments suggested by Paul. */
11302 #ifndef __cplusplus
11303   /* Ultrix mips cc rejects this.  */
11304   typedef int charset[2];
11305   const charset x;
11306   /* SunOS 4.1.1 cc rejects this.  */
11307   char const *const *ccp;
11308   char **p;
11309   /* NEC SVR4.0.2 mips cc rejects this.  */
11310   struct point {int x, y;};
11311   static struct point const zero = {0,0};
11312   /* AIX XL C 1.02.0.0 rejects this.
11313      It does not let you subtract one const X* pointer from another in
11314      an arm of an if-expression whose if-part is not a constant
11315      expression */
11316   const char *g = "string";
11317   ccp = &g + (g ? g-g : 0);
11318   /* HPUX 7.0 cc rejects these. */
11319   ++ccp;
11320   p = (char**) ccp;
11321   ccp = (char const *const *) p;
11322   { /* SCO 3.2v4 cc rejects this.  */
11323     char *t;
11324     char const *s = 0 ? (char *) 0 : (char const *) 0;
11325
11326     *t++ = 0;
11327   }
11328   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11329     int x[] = {25, 17};
11330     const int *foo = &x[0];
11331     ++foo;
11332   }
11333   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11334     typedef const int *iptr;
11335     iptr p = 0;
11336     ++p;
11337   }
11338   { /* AIX XL C 1.02.0.0 rejects this saying
11339        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11340     struct s { int j; const int *ap[3]; };
11341     struct s *b; b->j = 5;
11342   }
11343   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11344     const int foo = 10;
11345   }
11346 #endif
11347
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext
11353 if { (eval echo "$as_me:11353: \"$ac_compile\"") >&5
11354   (eval $ac_compile) 2>&5
11355   ac_status=$?
11356   echo "$as_me:11356: \$? = $ac_status" >&5
11357   (exit $ac_status); } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364   ac_cv_c_const=yes
11365 else
11366   echo "$as_me: failed program was:" >&5
11367 cat conftest.$ac_ext >&5
11368 ac_cv_c_const=no
11369 fi
11370 rm -f conftest.$ac_objext conftest.$ac_ext
11371 fi
11372 echo "$as_me:11372: result: $ac_cv_c_const" >&5
11373 echo "${ECHO_T}$ac_cv_c_const" >&6
11374 if test $ac_cv_c_const = no; then
11375
11376 cat >>confdefs.h <<\EOF
11377 #define const
11378 EOF
11379
11380 fi
11381
11382 echo "$as_me:11382: checking for inline" >&5
11383 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11384 if test "${ac_cv_c_inline+set}" = set; then
11385   echo $ECHO_N "(cached) $ECHO_C" >&6
11386 else
11387   ac_cv_c_inline=no
11388 for ac_kw in inline __inline__ __inline; do
11389   cat >conftest.$ac_ext <<_ACEOF
11390 #line 11390 "configure"
11391 #include "confdefs.h"
11392 #ifndef __cplusplus
11393 static $ac_kw int static_foo () {return 0; }
11394 $ac_kw int foo () {return 0; }
11395 #endif
11396
11397 _ACEOF
11398 rm -f conftest.$ac_objext
11399 if { (eval echo "$as_me:11399: \"$ac_compile\"") >&5
11400   (eval $ac_compile) 2>&5
11401   ac_status=$?
11402   echo "$as_me:11402: \$? = $ac_status" >&5
11403   (exit $ac_status); } &&
11404          { ac_try='test -s conftest.$ac_objext'
11405   { (eval echo "$as_me:11405: \"$ac_try\"") >&5
11406   (eval $ac_try) 2>&5
11407   ac_status=$?
11408   echo "$as_me:11408: \$? = $ac_status" >&5
11409   (exit $ac_status); }; }; then
11410   ac_cv_c_inline=$ac_kw; break
11411 else
11412   echo "$as_me: failed program was:" >&5
11413 cat conftest.$ac_ext >&5
11414 fi
11415 rm -f conftest.$ac_objext conftest.$ac_ext
11416 done
11417
11418 fi
11419 echo "$as_me:11419: result: $ac_cv_c_inline" >&5
11420 echo "${ECHO_T}$ac_cv_c_inline" >&6
11421 case $ac_cv_c_inline in
11422   inline | yes) ;;
11423   no)
11424 cat >>confdefs.h <<\EOF
11425 #define inline
11426 EOF
11427  ;;
11428   *)  cat >>confdefs.h <<EOF
11429 #define inline $ac_cv_c_inline
11430 EOF
11431  ;;
11432 esac
11433
11434 echo "$as_me:11434: checking for signal global datatype" >&5
11435 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11436 if test "${cf_cv_sig_atomic_t+set}" = set; then
11437   echo $ECHO_N "(cached) $ECHO_C" >&6
11438 else
11439
11440         for cf_type in \
11441                 "volatile sig_atomic_t" \
11442                 "sig_atomic_t" \
11443                 "int"
11444         do
11445         cat >conftest.$ac_ext <<_ACEOF
11446 #line 11446 "configure"
11447 #include "confdefs.h"
11448
11449 #include <sys/types.h>
11450 #include <signal.h>
11451 #include <stdio.h>
11452
11453 extern $cf_type x;
11454 $cf_type x;
11455 static void handler(int sig)
11456 {
11457         x = 5;
11458 }
11459 int
11460 main ()
11461 {
11462 signal(SIGINT, handler);
11463                  x = 1
11464   ;
11465   return 0;
11466 }
11467 _ACEOF
11468 rm -f conftest.$ac_objext
11469 if { (eval echo "$as_me:11469: \"$ac_compile\"") >&5
11470   (eval $ac_compile) 2>&5
11471   ac_status=$?
11472   echo "$as_me:11472: \$? = $ac_status" >&5
11473   (exit $ac_status); } &&
11474          { ac_try='test -s conftest.$ac_objext'
11475   { (eval echo "$as_me:11475: \"$ac_try\"") >&5
11476   (eval $ac_try) 2>&5
11477   ac_status=$?
11478   echo "$as_me:11478: \$? = $ac_status" >&5
11479   (exit $ac_status); }; }; then
11480   cf_cv_sig_atomic_t=$cf_type
11481 else
11482   echo "$as_me: failed program was:" >&5
11483 cat conftest.$ac_ext >&5
11484 cf_cv_sig_atomic_t=no
11485 fi
11486 rm -f conftest.$ac_objext conftest.$ac_ext
11487                 test "$cf_cv_sig_atomic_t" != no && break
11488         done
11489
11490 fi
11491
11492 echo "$as_me:11492: result: $cf_cv_sig_atomic_t" >&5
11493 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11494 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11495 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11496 EOF
11497
11498 NCURSES_INLINE=
11499 if test "$ac_cv_c_inline" != no ; then
11500         cat >>confdefs.h <<\EOF
11501 #define CC_HAS_INLINE_FUNCS 1
11502 EOF
11503
11504         NCURSES_INLINE=inline
11505 fi
11506
11507 if test $NCURSES_CHTYPE = auto ; then
11508
11509 echo "$as_me:11509: checking for type of chtype" >&5
11510 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11511 if test "${cf_cv_typeof_chtype+set}" = set; then
11512   echo $ECHO_N "(cached) $ECHO_C" >&6
11513 else
11514
11515                 if test "$cross_compiling" = yes; then
11516   cf_cv_typeof_chtype=long
11517 else
11518   cat >conftest.$ac_ext <<_ACEOF
11519 #line 11519 "configure"
11520 #include "confdefs.h"
11521
11522 #define WANT_BITS 31
11523 #include <stdio.h>
11524 int main()
11525 {
11526         FILE *fp = fopen("cf_test.out", "w");
11527         if (fp != 0) {
11528                 char *result = "long";
11529                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11530                         int n;
11531                         unsigned int x, y;
11532                         for (n = 0; n < WANT_BITS; n++) {
11533                                 x = (1 << n);
11534                                 y = (x >> n);
11535                                 if (y != 1 || x == 0) {
11536                                         x = 0;
11537                                         break;
11538                                 }
11539                         }
11540                         /*
11541                          * If x is nonzero, an int is big enough for the bits
11542                          * that we want.
11543                          */
11544                         result = (x != 0) ? "int" : "long";
11545                 }
11546                 fputs(result, fp);
11547                 fclose(fp);
11548         }
11549         ${cf_cv_main_return:-return}(0);
11550 }
11551
11552 _ACEOF
11553 rm -f conftest$ac_exeext
11554 if { (eval echo "$as_me:11554: \"$ac_link\"") >&5
11555   (eval $ac_link) 2>&5
11556   ac_status=$?
11557   echo "$as_me:11557: \$? = $ac_status" >&5
11558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11559   { (eval echo "$as_me:11559: \"$ac_try\"") >&5
11560   (eval $ac_try) 2>&5
11561   ac_status=$?
11562   echo "$as_me:11562: \$? = $ac_status" >&5
11563   (exit $ac_status); }; }; then
11564   cf_cv_typeof_chtype=`cat cf_test.out`
11565 else
11566   echo "$as_me: program exited with status $ac_status" >&5
11567 echo "$as_me: failed program was:" >&5
11568 cat conftest.$ac_ext >&5
11569 cf_cv_typeof_chtype=long
11570 fi
11571 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11572 fi
11573                 rm -f cf_test.out
11574
11575 fi
11576
11577 echo "$as_me:11577: result: $cf_cv_typeof_chtype" >&5
11578 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11579
11580 cat >>confdefs.h <<EOF
11581 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11582 EOF
11583
11584 else
11585         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11586 fi
11587 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11588
11589 echo "$as_me:11589: checking if unsigned literals are legal" >&5
11590 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11591 if test "${cf_cv_unsigned_literals+set}" = set; then
11592   echo $ECHO_N "(cached) $ECHO_C" >&6
11593 else
11594
11595         cat >conftest.$ac_ext <<_ACEOF
11596 #line 11596 "configure"
11597 #include "confdefs.h"
11598
11599 int
11600 main ()
11601 {
11602 long x = 1L + 1UL + 1U + 1
11603   ;
11604   return 0;
11605 }
11606 _ACEOF
11607 rm -f conftest.$ac_objext
11608 if { (eval echo "$as_me:11608: \"$ac_compile\"") >&5
11609   (eval $ac_compile) 2>&5
11610   ac_status=$?
11611   echo "$as_me:11611: \$? = $ac_status" >&5
11612   (exit $ac_status); } &&
11613          { ac_try='test -s conftest.$ac_objext'
11614   { (eval echo "$as_me:11614: \"$ac_try\"") >&5
11615   (eval $ac_try) 2>&5
11616   ac_status=$?
11617   echo "$as_me:11617: \$? = $ac_status" >&5
11618   (exit $ac_status); }; }; then
11619   cf_cv_unsigned_literals=yes
11620 else
11621   echo "$as_me: failed program was:" >&5
11622 cat conftest.$ac_ext >&5
11623 cf_cv_unsigned_literals=no
11624 fi
11625 rm -f conftest.$ac_objext conftest.$ac_ext
11626
11627 fi
11628
11629 echo "$as_me:11629: result: $cf_cv_unsigned_literals" >&5
11630 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11631
11632 cf_cv_1UL="1"
11633 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11634 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11635
11636 if test $NCURSES_MMASK_T = auto ; then
11637         cf_cv_typeof_mmask_t=long
11638 else
11639         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11640 fi
11641 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11642
11643 ###     Checks for external-data
11644
11645 echo "$as_me:11645: checking if external errno is declared" >&5
11646 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11647 if test "${cf_cv_dcl_errno+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650
11651     cat >conftest.$ac_ext <<_ACEOF
11652 #line 11652 "configure"
11653 #include "confdefs.h"
11654
11655 #ifdef HAVE_STDLIB_H
11656 #include <stdlib.h>
11657 #endif
11658 #include <stdio.h>
11659 #include <sys/types.h>
11660 #include <errno.h>
11661 int
11662 main ()
11663 {
11664 long x = (long) errno
11665   ;
11666   return 0;
11667 }
11668 _ACEOF
11669 rm -f conftest.$ac_objext
11670 if { (eval echo "$as_me:11670: \"$ac_compile\"") >&5
11671   (eval $ac_compile) 2>&5
11672   ac_status=$?
11673   echo "$as_me:11673: \$? = $ac_status" >&5
11674   (exit $ac_status); } &&
11675          { ac_try='test -s conftest.$ac_objext'
11676   { (eval echo "$as_me:11676: \"$ac_try\"") >&5
11677   (eval $ac_try) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); }; }; then
11681   cf_cv_dcl_errno=yes
11682 else
11683   echo "$as_me: failed program was:" >&5
11684 cat conftest.$ac_ext >&5
11685 cf_cv_dcl_errno=no
11686 fi
11687 rm -f conftest.$ac_objext conftest.$ac_ext
11688
11689 fi
11690 echo "$as_me:11690: result: $cf_cv_dcl_errno" >&5
11691 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11692
11693 if test "$cf_cv_dcl_errno" = no ; then
11694
11695 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11696
11697     cat >>confdefs.h <<EOF
11698 #define $cf_result 1
11699 EOF
11700
11701 fi
11702
11703 # It's possible (for near-UNIX clones) that the data doesn't exist
11704
11705 echo "$as_me:11705: checking if external errno exists" >&5
11706 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11707 if test "${cf_cv_have_errno+set}" = set; then
11708   echo $ECHO_N "(cached) $ECHO_C" >&6
11709 else
11710
11711     cat >conftest.$ac_ext <<_ACEOF
11712 #line 11712 "configure"
11713 #include "confdefs.h"
11714
11715 #undef errno
11716 extern int errno;
11717
11718 int
11719 main ()
11720 {
11721 errno = 2
11722   ;
11723   return 0;
11724 }
11725 _ACEOF
11726 rm -f conftest.$ac_objext conftest$ac_exeext
11727 if { (eval echo "$as_me:11727: \"$ac_link\"") >&5
11728   (eval $ac_link) 2>&5
11729   ac_status=$?
11730   echo "$as_me:11730: \$? = $ac_status" >&5
11731   (exit $ac_status); } &&
11732          { ac_try='test -s conftest$ac_exeext'
11733   { (eval echo "$as_me:11733: \"$ac_try\"") >&5
11734   (eval $ac_try) 2>&5
11735   ac_status=$?
11736   echo "$as_me:11736: \$? = $ac_status" >&5
11737   (exit $ac_status); }; }; then
11738   cf_cv_have_errno=yes
11739 else
11740   echo "$as_me: failed program was:" >&5
11741 cat conftest.$ac_ext >&5
11742 cf_cv_have_errno=no
11743 fi
11744 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11745
11746 fi
11747 echo "$as_me:11747: result: $cf_cv_have_errno" >&5
11748 echo "${ECHO_T}$cf_cv_have_errno" >&6
11749
11750 if test "$cf_cv_have_errno" = yes ; then
11751
11752 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11753
11754     cat >>confdefs.h <<EOF
11755 #define $cf_result 1
11756 EOF
11757
11758 fi
11759
11760 echo "$as_me:11760: checking if data-only library module links" >&5
11761 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11762 if test "${cf_cv_link_dataonly+set}" = set; then
11763   echo $ECHO_N "(cached) $ECHO_C" >&6
11764 else
11765
11766         rm -f conftest.a
11767         cat >conftest.$ac_ext <<EOF
11768 #line 11768 "configure"
11769 int     testdata[3] = { 123, 456, 789 };
11770 EOF
11771         if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5
11772   (eval $ac_compile) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); } ; then
11776                 mv conftest.o data.o && \
11777                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11778         fi
11779         rm -f conftest.$ac_ext data.o
11780         cat >conftest.$ac_ext <<EOF
11781 #line 11781 "configure"
11782 int     testfunc()
11783 {
11784 #if defined(NeXT)
11785         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11786 #else
11787         extern int testdata[3];
11788         return testdata[0] == 123
11789            &&  testdata[1] == 456
11790            &&  testdata[2] == 789;
11791 #endif
11792 }
11793 EOF
11794         if { (eval echo "$as_me:11794: \"$ac_compile\"") >&5
11795   (eval $ac_compile) 2>&5
11796   ac_status=$?
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); }; then
11799                 mv conftest.o func.o && \
11800                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11801         fi
11802         rm -f conftest.$ac_ext func.o
11803         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11804         cf_saveLIBS="$LIBS"
11805         LIBS="conftest.a $LIBS"
11806         if test "$cross_compiling" = yes; then
11807   cf_cv_link_dataonly=unknown
11808 else
11809   cat >conftest.$ac_ext <<_ACEOF
11810 #line 11810 "configure"
11811 #include "confdefs.h"
11812
11813         int main()
11814         {
11815                 extern int testfunc();
11816                 ${cf_cv_main_return:-return} (!testfunc());
11817         }
11818
11819 _ACEOF
11820 rm -f conftest$ac_exeext
11821 if { (eval echo "$as_me:11821: \"$ac_link\"") >&5
11822   (eval $ac_link) 2>&5
11823   ac_status=$?
11824   echo "$as_me:11824: \$? = $ac_status" >&5
11825   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11826   { (eval echo "$as_me:11826: \"$ac_try\"") >&5
11827   (eval $ac_try) 2>&5
11828   ac_status=$?
11829   echo "$as_me:11829: \$? = $ac_status" >&5
11830   (exit $ac_status); }; }; then
11831   cf_cv_link_dataonly=yes
11832 else
11833   echo "$as_me: program exited with status $ac_status" >&5
11834 echo "$as_me: failed program was:" >&5
11835 cat conftest.$ac_ext >&5
11836 cf_cv_link_dataonly=no
11837 fi
11838 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11839 fi
11840         LIBS="$cf_saveLIBS"
11841
11842 fi
11843
11844 echo "$as_me:11844: result: $cf_cv_link_dataonly" >&5
11845 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11846
11847 if test "$cf_cv_link_dataonly" = no ; then
11848         cat >>confdefs.h <<\EOF
11849 #define BROKEN_LINKER 1
11850 EOF
11851
11852         BROKEN_LINKER=1
11853 fi
11854
11855 ###     Checks for library functions.
11856
11857 for ac_func in \
11858 getcwd \
11859 getegid \
11860 geteuid \
11861 getttynam \
11862 issetugid \
11863 poll \
11864 remove \
11865 select \
11866 setbuf \
11867 setbuffer \
11868 setvbuf \
11869 sigaction \
11870 sigvec \
11871 strdup \
11872 strstr \
11873 tcgetpgrp \
11874 times \
11875 vsnprintf \
11876
11877 do
11878 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11879 echo "$as_me:11879: checking for $ac_func" >&5
11880 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11881 if eval "test \"\${$as_ac_var+set}\" = set"; then
11882   echo $ECHO_N "(cached) $ECHO_C" >&6
11883 else
11884   cat >conftest.$ac_ext <<_ACEOF
11885 #line 11885 "configure"
11886 #include "confdefs.h"
11887 /* System header to define __stub macros and hopefully few prototypes,
11888     which can conflict with char $ac_func (); below.  */
11889 #include <assert.h>
11890 /* Override any gcc2 internal prototype to avoid an error.  */
11891 #ifdef __cplusplus
11892 extern "C"
11893 #endif
11894 /* We use char because int might match the return type of a gcc2
11895    builtin and then its argument prototype would still apply.  */
11896 char $ac_func ();
11897 char (*f) ();
11898
11899 int
11900 main ()
11901 {
11902 /* The GNU C library defines this for functions which it implements
11903     to always fail with ENOSYS.  Some functions are actually named
11904     something starting with __ and the normal name is an alias.  */
11905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11906 choke me
11907 #else
11908 f = $ac_func;
11909 #endif
11910
11911   ;
11912   return 0;
11913 }
11914 _ACEOF
11915 rm -f conftest.$ac_objext conftest$ac_exeext
11916 if { (eval echo "$as_me:11916: \"$ac_link\"") >&5
11917   (eval $ac_link) 2>&5
11918   ac_status=$?
11919   echo "$as_me:11919: \$? = $ac_status" >&5
11920   (exit $ac_status); } &&
11921          { ac_try='test -s conftest$ac_exeext'
11922   { (eval echo "$as_me:11922: \"$ac_try\"") >&5
11923   (eval $ac_try) 2>&5
11924   ac_status=$?
11925   echo "$as_me:11925: \$? = $ac_status" >&5
11926   (exit $ac_status); }; }; then
11927   eval "$as_ac_var=yes"
11928 else
11929   echo "$as_me: failed program was:" >&5
11930 cat conftest.$ac_ext >&5
11931 eval "$as_ac_var=no"
11932 fi
11933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11934 fi
11935 echo "$as_me:11935: result: `eval echo '${'$as_ac_var'}'`" >&5
11936 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11937 if test `eval echo '${'$as_ac_var'}'` = yes; then
11938   cat >>confdefs.h <<EOF
11939 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11940 EOF
11941
11942 fi
11943 done
11944
11945 if test "$with_getcap" = "yes" ; then
11946
11947 echo "$as_me:11947: checking for terminal-capability database functions" >&5
11948 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11949 if test "${cf_cv_cgetent+set}" = set; then
11950   echo $ECHO_N "(cached) $ECHO_C" >&6
11951 else
11952
11953 cat >conftest.$ac_ext <<_ACEOF
11954 #line 11954 "configure"
11955 #include "confdefs.h"
11956
11957 #include <stdlib.h>
11958 int
11959 main ()
11960 {
11961
11962         char temp[128];
11963         char *buf = temp;
11964         char *db_array = temp;
11965         cgetent(&buf, /* int *, */ &db_array, "vt100");
11966         cgetcap(buf, "tc", '=');
11967         cgetmatch(buf, "tc");
11968
11969   ;
11970   return 0;
11971 }
11972 _ACEOF
11973 rm -f conftest.$ac_objext conftest$ac_exeext
11974 if { (eval echo "$as_me:11974: \"$ac_link\"") >&5
11975   (eval $ac_link) 2>&5
11976   ac_status=$?
11977   echo "$as_me:11977: \$? = $ac_status" >&5
11978   (exit $ac_status); } &&
11979          { ac_try='test -s conftest$ac_exeext'
11980   { (eval echo "$as_me:11980: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985   cf_cv_cgetent=yes
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 cat conftest.$ac_ext >&5
11989 cf_cv_cgetent=no
11990 fi
11991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11992
11993 fi
11994
11995 echo "$as_me:11995: result: $cf_cv_cgetent" >&5
11996 echo "${ECHO_T}$cf_cv_cgetent" >&6
11997 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11998 #define HAVE_BSD_CGETENT 1
11999 EOF
12000
12001 fi
12002
12003 echo "$as_me:12003: checking for isascii" >&5
12004 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12005 if test "${cf_cv_have_isascii+set}" = set; then
12006   echo $ECHO_N "(cached) $ECHO_C" >&6
12007 else
12008
12009         cat >conftest.$ac_ext <<_ACEOF
12010 #line 12010 "configure"
12011 #include "confdefs.h"
12012 #include <ctype.h>
12013 int
12014 main ()
12015 {
12016 int x = isascii(' ')
12017   ;
12018   return 0;
12019 }
12020 _ACEOF
12021 rm -f conftest.$ac_objext conftest$ac_exeext
12022 if { (eval echo "$as_me:12022: \"$ac_link\"") >&5
12023   (eval $ac_link) 2>&5
12024   ac_status=$?
12025   echo "$as_me:12025: \$? = $ac_status" >&5
12026   (exit $ac_status); } &&
12027          { ac_try='test -s conftest$ac_exeext'
12028   { (eval echo "$as_me:12028: \"$ac_try\"") >&5
12029   (eval $ac_try) 2>&5
12030   ac_status=$?
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit $ac_status); }; }; then
12033   cf_cv_have_isascii=yes
12034 else
12035   echo "$as_me: failed program was:" >&5
12036 cat conftest.$ac_ext >&5
12037 cf_cv_have_isascii=no
12038 fi
12039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12040
12041 fi
12042 echo "$as_me:12042: result: $cf_cv_have_isascii" >&5
12043 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12044 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12045 #define HAVE_ISASCII 1
12046 EOF
12047
12048 if test "$ac_cv_func_sigaction" = yes; then
12049 echo "$as_me:12049: checking whether sigaction needs _POSIX_SOURCE" >&5
12050 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12051 cat >conftest.$ac_ext <<_ACEOF
12052 #line 12052 "configure"
12053 #include "confdefs.h"
12054
12055 #include <sys/types.h>
12056 #include <signal.h>
12057 int
12058 main ()
12059 {
12060 struct sigaction act
12061   ;
12062   return 0;
12063 }
12064 _ACEOF
12065 rm -f conftest.$ac_objext
12066 if { (eval echo "$as_me:12066: \"$ac_compile\"") >&5
12067   (eval $ac_compile) 2>&5
12068   ac_status=$?
12069   echo "$as_me:12069: \$? = $ac_status" >&5
12070   (exit $ac_status); } &&
12071          { ac_try='test -s conftest.$ac_objext'
12072   { (eval echo "$as_me:12072: \"$ac_try\"") >&5
12073   (eval $ac_try) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit $ac_status); }; }; then
12077   sigact_bad=no
12078 else
12079   echo "$as_me: failed program was:" >&5
12080 cat conftest.$ac_ext >&5
12081
12082 cat >conftest.$ac_ext <<_ACEOF
12083 #line 12083 "configure"
12084 #include "confdefs.h"
12085
12086 #define _POSIX_SOURCE
12087 #include <sys/types.h>
12088 #include <signal.h>
12089 int
12090 main ()
12091 {
12092 struct sigaction act
12093   ;
12094   return 0;
12095 }
12096 _ACEOF
12097 rm -f conftest.$ac_objext
12098 if { (eval echo "$as_me:12098: \"$ac_compile\"") >&5
12099   (eval $ac_compile) 2>&5
12100   ac_status=$?
12101   echo "$as_me:12101: \$? = $ac_status" >&5
12102   (exit $ac_status); } &&
12103          { ac_try='test -s conftest.$ac_objext'
12104   { (eval echo "$as_me:12104: \"$ac_try\"") >&5
12105   (eval $ac_try) 2>&5
12106   ac_status=$?
12107   echo "$as_me:12107: \$? = $ac_status" >&5
12108   (exit $ac_status); }; }; then
12109   sigact_bad=yes
12110          cat >>confdefs.h <<\EOF
12111 #define SVR4_ACTION 1
12112 EOF
12113
12114 else
12115   echo "$as_me: failed program was:" >&5
12116 cat conftest.$ac_ext >&5
12117 sigact_bad=unknown
12118 fi
12119 rm -f conftest.$ac_objext conftest.$ac_ext
12120 fi
12121 rm -f conftest.$ac_objext conftest.$ac_ext
12122 echo "$as_me:12122: result: $sigact_bad" >&5
12123 echo "${ECHO_T}$sigact_bad" >&6
12124 fi
12125
12126 echo "$as_me:12126: checking if nanosleep really works" >&5
12127 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12128 if test "${cf_cv_func_nanosleep+set}" = set; then
12129   echo $ECHO_N "(cached) $ECHO_C" >&6
12130 else
12131
12132 if test "$cross_compiling" = yes; then
12133   cf_cv_func_nanosleep=unknown
12134 else
12135   cat >conftest.$ac_ext <<_ACEOF
12136 #line 12136 "configure"
12137 #include "confdefs.h"
12138
12139 #include <stdio.h>
12140 #include <errno.h>
12141 #include <time.h>
12142
12143 #ifdef HAVE_SYS_TIME_H
12144 #include <sys/time.h>
12145 #endif
12146
12147 int main() {
12148         struct timespec ts1, ts2;
12149         int code;
12150         ts1.tv_sec  = 0;
12151         ts1.tv_nsec = 750000000;
12152         ts2.tv_sec  = 0;
12153         ts2.tv_nsec = 0;
12154         errno = 0;
12155         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12156         ${cf_cv_main_return:-return}(code != 0);
12157 }
12158
12159 _ACEOF
12160 rm -f conftest$ac_exeext
12161 if { (eval echo "$as_me:12161: \"$ac_link\"") >&5
12162   (eval $ac_link) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12166   { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167   (eval $ac_try) 2>&5
12168   ac_status=$?
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); }; }; then
12171   cf_cv_func_nanosleep=yes
12172 else
12173   echo "$as_me: program exited with status $ac_status" >&5
12174 echo "$as_me: failed program was:" >&5
12175 cat conftest.$ac_ext >&5
12176 cf_cv_func_nanosleep=no
12177 fi
12178 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12179 fi
12180 fi
12181 echo "$as_me:12181: result: $cf_cv_func_nanosleep" >&5
12182 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12183
12184 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12185 #define HAVE_NANOSLEEP 1
12186 EOF
12187
12188 for ac_header in \
12189 termio.h \
12190 termios.h \
12191 unistd.h \
12192
12193 do
12194 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12195 echo "$as_me:12195: checking for $ac_header" >&5
12196 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12197 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12198   echo $ECHO_N "(cached) $ECHO_C" >&6
12199 else
12200   cat >conftest.$ac_ext <<_ACEOF
12201 #line 12201 "configure"
12202 #include "confdefs.h"
12203 #include <$ac_header>
12204 _ACEOF
12205 if { (eval echo "$as_me:12205: \"$ac_cpp conftest.$ac_ext\"") >&5
12206   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12207   ac_status=$?
12208   egrep -v '^ *\+' conftest.er1 >conftest.err
12209   rm -f conftest.er1
12210   cat conftest.err >&5
12211   echo "$as_me:12211: \$? = $ac_status" >&5
12212   (exit $ac_status); } >/dev/null; then
12213   if test -s conftest.err; then
12214     ac_cpp_err=$ac_c_preproc_warn_flag
12215   else
12216     ac_cpp_err=
12217   fi
12218 else
12219   ac_cpp_err=yes
12220 fi
12221 if test -z "$ac_cpp_err"; then
12222   eval "$as_ac_Header=yes"
12223 else
12224   echo "$as_me: failed program was:" >&5
12225   cat conftest.$ac_ext >&5
12226   eval "$as_ac_Header=no"
12227 fi
12228 rm -f conftest.err conftest.$ac_ext
12229 fi
12230 echo "$as_me:12230: result: `eval echo '${'$as_ac_Header'}'`" >&5
12231 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12232 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12233   cat >>confdefs.h <<EOF
12234 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12235 EOF
12236
12237 fi
12238 done
12239
12240 if test "$ISC" = yes ; then
12241
12242 for ac_header in sys/termio.h
12243 do
12244 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12245 echo "$as_me:12245: checking for $ac_header" >&5
12246 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12247 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12248   echo $ECHO_N "(cached) $ECHO_C" >&6
12249 else
12250   cat >conftest.$ac_ext <<_ACEOF
12251 #line 12251 "configure"
12252 #include "confdefs.h"
12253 #include <$ac_header>
12254 _ACEOF
12255 if { (eval echo "$as_me:12255: \"$ac_cpp conftest.$ac_ext\"") >&5
12256   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12257   ac_status=$?
12258   egrep -v '^ *\+' conftest.er1 >conftest.err
12259   rm -f conftest.er1
12260   cat conftest.err >&5
12261   echo "$as_me:12261: \$? = $ac_status" >&5
12262   (exit $ac_status); } >/dev/null; then
12263   if test -s conftest.err; then
12264     ac_cpp_err=$ac_c_preproc_warn_flag
12265   else
12266     ac_cpp_err=
12267   fi
12268 else
12269   ac_cpp_err=yes
12270 fi
12271 if test -z "$ac_cpp_err"; then
12272   eval "$as_ac_Header=yes"
12273 else
12274   echo "$as_me: failed program was:" >&5
12275   cat conftest.$ac_ext >&5
12276   eval "$as_ac_Header=no"
12277 fi
12278 rm -f conftest.err conftest.$ac_ext
12279 fi
12280 echo "$as_me:12280: result: `eval echo '${'$as_ac_Header'}'`" >&5
12281 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12282 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12283   cat >>confdefs.h <<EOF
12284 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12285 EOF
12286
12287 fi
12288 done
12289
12290 fi
12291 if test "$ac_cv_header_termios_h" = yes ; then
12292         case "$CFLAGS $CPPFLAGS" in
12293         *-D_POSIX_SOURCE*)
12294                 termios_bad=dunno ;;
12295         *)      termios_bad=maybe ;;
12296         esac
12297         if test "$termios_bad" = maybe ; then
12298         echo "$as_me:12298: checking whether termios.h needs _POSIX_SOURCE" >&5
12299 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12300         cat >conftest.$ac_ext <<_ACEOF
12301 #line 12301 "configure"
12302 #include "confdefs.h"
12303 #include <termios.h>
12304 int
12305 main ()
12306 {
12307 struct termios foo; int x = foo.c_iflag
12308   ;
12309   return 0;
12310 }
12311 _ACEOF
12312 rm -f conftest.$ac_objext
12313 if { (eval echo "$as_me:12313: \"$ac_compile\"") >&5
12314   (eval $ac_compile) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); } &&
12318          { ac_try='test -s conftest.$ac_objext'
12319   { (eval echo "$as_me:12319: \"$ac_try\"") >&5
12320   (eval $ac_try) 2>&5
12321   ac_status=$?
12322   echo "$as_me:12322: \$? = $ac_status" >&5
12323   (exit $ac_status); }; }; then
12324   termios_bad=no
12325 else
12326   echo "$as_me: failed program was:" >&5
12327 cat conftest.$ac_ext >&5
12328
12329                 cat >conftest.$ac_ext <<_ACEOF
12330 #line 12330 "configure"
12331 #include "confdefs.h"
12332
12333 #define _POSIX_SOURCE
12334 #include <termios.h>
12335 int
12336 main ()
12337 {
12338 struct termios foo; int x = foo.c_iflag
12339   ;
12340   return 0;
12341 }
12342 _ACEOF
12343 rm -f conftest.$ac_objext
12344 if { (eval echo "$as_me:12344: \"$ac_compile\"") >&5
12345   (eval $ac_compile) 2>&5
12346   ac_status=$?
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); } &&
12349          { ac_try='test -s conftest.$ac_objext'
12350   { (eval echo "$as_me:12350: \"$ac_try\"") >&5
12351   (eval $ac_try) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); }; }; then
12355   termios_bad=unknown
12356 else
12357   echo "$as_me: failed program was:" >&5
12358 cat conftest.$ac_ext >&5
12359 termios_bad=yes cat >>confdefs.h <<\EOF
12360 #define SVR4_TERMIO 1
12361 EOF
12362
12363 fi
12364 rm -f conftest.$ac_objext conftest.$ac_ext
12365
12366 fi
12367 rm -f conftest.$ac_objext conftest.$ac_ext
12368         echo "$as_me:12368: result: $termios_bad" >&5
12369 echo "${ECHO_T}$termios_bad" >&6
12370         fi
12371 fi
12372
12373 echo "$as_me:12373: checking for tcgetattr" >&5
12374 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12375 if test "${cf_cv_have_tcgetattr+set}" = set; then
12376   echo $ECHO_N "(cached) $ECHO_C" >&6
12377 else
12378
12379 cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382
12383 #include <sys/types.h>
12384 #ifdef HAVE_UNISTD_H
12385 #include <unistd.h>
12386 #endif
12387 #ifdef HAVE_TERMIOS_H
12388 #include <termios.h>
12389 #define TTY struct termios
12390 #else
12391 #ifdef HAVE_TERMIO_H
12392 #include <termio.h>
12393 #define TTY struct termio
12394 #endif
12395 #endif
12396
12397 int
12398 main ()
12399 {
12400
12401 TTY foo;
12402 tcgetattr(1, &foo);
12403   ;
12404   return 0;
12405 }
12406 _ACEOF
12407 rm -f conftest.$ac_objext conftest$ac_exeext
12408 if { (eval echo "$as_me:12408: \"$ac_link\"") >&5
12409   (eval $ac_link) 2>&5
12410   ac_status=$?
12411   echo "$as_me:12411: \$? = $ac_status" >&5
12412   (exit $ac_status); } &&
12413          { ac_try='test -s conftest$ac_exeext'
12414   { (eval echo "$as_me:12414: \"$ac_try\"") >&5
12415   (eval $ac_try) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); }; }; then
12419   cf_cv_have_tcgetattr=yes
12420 else
12421   echo "$as_me: failed program was:" >&5
12422 cat conftest.$ac_ext >&5
12423 cf_cv_have_tcgetattr=no
12424 fi
12425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12426 fi
12427 echo "$as_me:12427: result: $cf_cv_have_tcgetattr" >&5
12428 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12429 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12430 #define HAVE_TCGETATTR 1
12431 EOF
12432
12433 echo "$as_me:12433: checking for vsscanf function or workaround" >&5
12434 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12435 if test "${cf_cv_func_vsscanf+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438
12439 cat >conftest.$ac_ext <<_ACEOF
12440 #line 12440 "configure"
12441 #include "confdefs.h"
12442
12443 #include <stdarg.h>
12444 #include <stdio.h>
12445 int
12446 main ()
12447 {
12448
12449         va_list ap;
12450         vsscanf("from", "%d", ap)
12451   ;
12452   return 0;
12453 }
12454 _ACEOF
12455 rm -f conftest.$ac_objext conftest$ac_exeext
12456 if { (eval echo "$as_me:12456: \"$ac_link\"") >&5
12457   (eval $ac_link) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit $ac_status); } &&
12461          { ac_try='test -s conftest$ac_exeext'
12462   { (eval echo "$as_me:12462: \"$ac_try\"") >&5
12463   (eval $ac_try) 2>&5
12464   ac_status=$?
12465   echo "$as_me:12465: \$? = $ac_status" >&5
12466   (exit $ac_status); }; }; then
12467   cf_cv_func_vsscanf=vsscanf
12468 else
12469   echo "$as_me: failed program was:" >&5
12470 cat conftest.$ac_ext >&5
12471
12472 cat >conftest.$ac_ext <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 #include <stdarg.h>
12477 #include <stdio.h>
12478 int
12479 main ()
12480 {
12481
12482     FILE strbuf;
12483     char *str = "from";
12484
12485     strbuf._flag = _IOREAD;
12486     strbuf._ptr = strbuf._base = (unsigned char *) str;
12487     strbuf._cnt = strlen(str);
12488     strbuf._file = _NFILE;
12489     return (vfscanf(&strbuf, "%d", ap))
12490   ;
12491   return 0;
12492 }
12493 _ACEOF
12494 rm -f conftest.$ac_objext conftest$ac_exeext
12495 if { (eval echo "$as_me:12495: \"$ac_link\"") >&5
12496   (eval $ac_link) 2>&5
12497   ac_status=$?
12498   echo "$as_me:12498: \$? = $ac_status" >&5
12499   (exit $ac_status); } &&
12500          { ac_try='test -s conftest$ac_exeext'
12501   { (eval echo "$as_me:12501: \"$ac_try\"") >&5
12502   (eval $ac_try) 2>&5
12503   ac_status=$?
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit $ac_status); }; }; then
12506   cf_cv_func_vsscanf=vfscanf
12507 else
12508   echo "$as_me: failed program was:" >&5
12509 cat conftest.$ac_ext >&5
12510
12511 cat >conftest.$ac_ext <<_ACEOF
12512 #line 12512 "configure"
12513 #include "confdefs.h"
12514
12515 #include <stdarg.h>
12516 #include <stdio.h>
12517 int
12518 main ()
12519 {
12520
12521     FILE strbuf;
12522     char *str = "from";
12523
12524     strbuf._flag = _IOREAD;
12525     strbuf._ptr = strbuf._base = (unsigned char *) str;
12526     strbuf._cnt = strlen(str);
12527     strbuf._file = _NFILE;
12528     return (_doscan(&strbuf, "%d", ap))
12529   ;
12530   return 0;
12531 }
12532 _ACEOF
12533 rm -f conftest.$ac_objext conftest$ac_exeext
12534 if { (eval echo "$as_me:12534: \"$ac_link\"") >&5
12535   (eval $ac_link) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -s conftest$ac_exeext'
12540   { (eval echo "$as_me:12540: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:12543: \$? = $ac_status" >&5
12544   (exit $ac_status); }; }; then
12545   cf_cv_func_vsscanf=_doscan
12546 else
12547   echo "$as_me: failed program was:" >&5
12548 cat conftest.$ac_ext >&5
12549
12550 cf_cv_func_vsscanf=no
12551 fi
12552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12553 fi
12554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12555 fi
12556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12557 fi
12558 echo "$as_me:12558: result: $cf_cv_func_vsscanf" >&5
12559 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12560
12561 case $cf_cv_func_vsscanf in #(vi
12562 vsscanf) cat >>confdefs.h <<\EOF
12563 #define HAVE_VSSCANF 1
12564 EOF
12565 ;; #(vi
12566 vfscanf) cat >>confdefs.h <<\EOF
12567 #define HAVE_VFSCANF 1
12568 EOF
12569 ;; #(vi
12570 _doscan) cat >>confdefs.h <<\EOF
12571 #define HAVE__DOSCAN 1
12572 EOF
12573 ;;
12574 esac
12575
12576 echo "$as_me:12576: checking for working mkstemp" >&5
12577 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12578 if test "${cf_cv_func_mkstemp+set}" = set; then
12579   echo $ECHO_N "(cached) $ECHO_C" >&6
12580 else
12581
12582 rm -f conftest*
12583 if test "$cross_compiling" = yes; then
12584   echo "$as_me:12584: checking for mkstemp" >&5
12585 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12586 if test "${ac_cv_func_mkstemp+set}" = set; then
12587   echo $ECHO_N "(cached) $ECHO_C" >&6
12588 else
12589   cat >conftest.$ac_ext <<_ACEOF
12590 #line 12590 "configure"
12591 #include "confdefs.h"
12592 /* System header to define __stub macros and hopefully few prototypes,
12593     which can conflict with char mkstemp (); below.  */
12594 #include <assert.h>
12595 /* Override any gcc2 internal prototype to avoid an error.  */
12596 #ifdef __cplusplus
12597 extern "C"
12598 #endif
12599 /* We use char because int might match the return type of a gcc2
12600    builtin and then its argument prototype would still apply.  */
12601 char mkstemp ();
12602 char (*f) ();
12603
12604 int
12605 main ()
12606 {
12607 /* The GNU C library defines this for functions which it implements
12608     to always fail with ENOSYS.  Some functions are actually named
12609     something starting with __ and the normal name is an alias.  */
12610 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12611 choke me
12612 #else
12613 f = mkstemp;
12614 #endif
12615
12616   ;
12617   return 0;
12618 }
12619 _ACEOF
12620 rm -f conftest.$ac_objext conftest$ac_exeext
12621 if { (eval echo "$as_me:12621: \"$ac_link\"") >&5
12622   (eval $ac_link) 2>&5
12623   ac_status=$?
12624   echo "$as_me:12624: \$? = $ac_status" >&5
12625   (exit $ac_status); } &&
12626          { ac_try='test -s conftest$ac_exeext'
12627   { (eval echo "$as_me:12627: \"$ac_try\"") >&5
12628   (eval $ac_try) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit $ac_status); }; }; then
12632   ac_cv_func_mkstemp=yes
12633 else
12634   echo "$as_me: failed program was:" >&5
12635 cat conftest.$ac_ext >&5
12636 ac_cv_func_mkstemp=no
12637 fi
12638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12639 fi
12640 echo "$as_me:12640: result: $ac_cv_func_mkstemp" >&5
12641 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12642
12643 else
12644   cat >conftest.$ac_ext <<_ACEOF
12645 #line 12645 "configure"
12646 #include "confdefs.h"
12647
12648 #include <sys/types.h>
12649 #include <stdlib.h>
12650 #include <stdio.h>
12651 #include <string.h>
12652 #include <sys/stat.h>
12653 int main()
12654 {
12655         char *tmpl = "conftestXXXXXX";
12656         char name[2][80];
12657         int n;
12658         int result = 0;
12659         int fd;
12660         struct stat sb;
12661
12662         umask(077);
12663         for (n = 0; n < 2; ++n) {
12664                 strcpy(name[n], tmpl);
12665                 if ((fd = mkstemp(name[n])) >= 0) {
12666                         if (!strcmp(name[n], tmpl)
12667                          || stat(name[n], &sb) != 0
12668                          || (sb.st_mode & S_IFMT) != S_IFREG
12669                          || (sb.st_mode & 077) != 0) {
12670                                 result = 1;
12671                         }
12672                         close(fd);
12673                 }
12674         }
12675         if (result == 0
12676          && !strcmp(name[0], name[1]))
12677                 result = 1;
12678         ${cf_cv_main_return:-return}(result);
12679 }
12680
12681 _ACEOF
12682 rm -f conftest$ac_exeext
12683 if { (eval echo "$as_me:12683: \"$ac_link\"") >&5
12684   (eval $ac_link) 2>&5
12685   ac_status=$?
12686   echo "$as_me:12686: \$? = $ac_status" >&5
12687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12688   { (eval echo "$as_me:12688: \"$ac_try\"") >&5
12689   (eval $ac_try) 2>&5
12690   ac_status=$?
12691   echo "$as_me:12691: \$? = $ac_status" >&5
12692   (exit $ac_status); }; }; then
12693   cf_cv_func_mkstemp=yes
12694
12695 else
12696   echo "$as_me: program exited with status $ac_status" >&5
12697 echo "$as_me: failed program was:" >&5
12698 cat conftest.$ac_ext >&5
12699 cf_cv_func_mkstemp=no
12700
12701 fi
12702 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12703 fi
12704
12705 fi
12706 echo "$as_me:12706: result: $cf_cv_func_mkstemp" >&5
12707 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12708 if test "$cf_cv_func_mkstemp" = yes ; then
12709         cat >>confdefs.h <<\EOF
12710 #define HAVE_MKSTEMP 1
12711 EOF
12712
12713 fi
12714
12715 # setup for prototype of fallback for vsscanf()
12716
12717 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12718         HAVE_VSSCANF=1
12719 else
12720         HAVE_VSSCANF=0
12721 fi
12722
12723 if test "$cross_compiling" = yes ; then
12724         { echo "$as_me:12724: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12725 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12726 else
12727         echo "$as_me:12727: checking whether setvbuf arguments are reversed" >&5
12728 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12729 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12730   echo $ECHO_N "(cached) $ECHO_C" >&6
12731 else
12732   if test "$cross_compiling" = yes; then
12733   { { echo "$as_me:12733: error: cannot run test program while cross compiling" >&5
12734 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12735    { (exit 1); exit 1; }; }
12736 else
12737   cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12740 #include <stdio.h>
12741 /* If setvbuf has the reversed format, exit 0. */
12742 int
12743 main ()
12744 {
12745   /* This call has the arguments reversed.
12746      A reversed system may check and see that the address of main
12747      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12748   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12749     $ac_main_return(1);
12750   putc('\r', stdout);
12751   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12752 }
12753 _ACEOF
12754 rm -f conftest$ac_exeext
12755 if { (eval echo "$as_me:12755: \"$ac_link\"") >&5
12756   (eval $ac_link) 2>&5
12757   ac_status=$?
12758   echo "$as_me:12758: \$? = $ac_status" >&5
12759   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12760   { (eval echo "$as_me:12760: \"$ac_try\"") >&5
12761   (eval $ac_try) 2>&5
12762   ac_status=$?
12763   echo "$as_me:12763: \$? = $ac_status" >&5
12764   (exit $ac_status); }; }; then
12765   ac_cv_func_setvbuf_reversed=yes
12766 else
12767   echo "$as_me: program exited with status $ac_status" >&5
12768 echo "$as_me: failed program was:" >&5
12769 cat conftest.$ac_ext >&5
12770 ac_cv_func_setvbuf_reversed=no
12771 fi
12772 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12773 fi
12774 rm -f core core.* *.core
12775 fi
12776 echo "$as_me:12776: result: $ac_cv_func_setvbuf_reversed" >&5
12777 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12778 if test $ac_cv_func_setvbuf_reversed = yes; then
12779
12780 cat >>confdefs.h <<\EOF
12781 #define SETVBUF_REVERSED 1
12782 EOF
12783
12784 fi
12785
12786 fi
12787 echo "$as_me:12787: checking return type of signal handlers" >&5
12788 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12789 if test "${ac_cv_type_signal+set}" = set; then
12790   echo $ECHO_N "(cached) $ECHO_C" >&6
12791 else
12792   cat >conftest.$ac_ext <<_ACEOF
12793 #line 12793 "configure"
12794 #include "confdefs.h"
12795 #include <sys/types.h>
12796 #include <signal.h>
12797 #ifdef signal
12798 # undef signal
12799 #endif
12800 #ifdef __cplusplus
12801 extern "C" void (*signal (int, void (*)(int)))(int);
12802 #else
12803 void (*signal ()) ();
12804 #endif
12805
12806 int
12807 main ()
12808 {
12809 int i;
12810   ;
12811   return 0;
12812 }
12813 _ACEOF
12814 rm -f conftest.$ac_objext
12815 if { (eval echo "$as_me:12815: \"$ac_compile\"") >&5
12816   (eval $ac_compile) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit $ac_status); } &&
12820          { ac_try='test -s conftest.$ac_objext'
12821   { (eval echo "$as_me:12821: \"$ac_try\"") >&5
12822   (eval $ac_try) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit $ac_status); }; }; then
12826   ac_cv_type_signal=void
12827 else
12828   echo "$as_me: failed program was:" >&5
12829 cat conftest.$ac_ext >&5
12830 ac_cv_type_signal=int
12831 fi
12832 rm -f conftest.$ac_objext conftest.$ac_ext
12833 fi
12834 echo "$as_me:12834: result: $ac_cv_type_signal" >&5
12835 echo "${ECHO_T}$ac_cv_type_signal" >&6
12836
12837 cat >>confdefs.h <<EOF
12838 #define RETSIGTYPE $ac_cv_type_signal
12839 EOF
12840
12841 echo "$as_me:12841: checking for type sigaction_t" >&5
12842 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12843 if test "${cf_cv_type_sigaction+set}" = set; then
12844   echo $ECHO_N "(cached) $ECHO_C" >&6
12845 else
12846
12847         cat >conftest.$ac_ext <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12850
12851 #include <signal.h>
12852 int
12853 main ()
12854 {
12855 sigaction_t x
12856   ;
12857   return 0;
12858 }
12859 _ACEOF
12860 rm -f conftest.$ac_objext
12861 if { (eval echo "$as_me:12861: \"$ac_compile\"") >&5
12862   (eval $ac_compile) 2>&5
12863   ac_status=$?
12864   echo "$as_me:12864: \$? = $ac_status" >&5
12865   (exit $ac_status); } &&
12866          { ac_try='test -s conftest.$ac_objext'
12867   { (eval echo "$as_me:12867: \"$ac_try\"") >&5
12868   (eval $ac_try) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); }; }; then
12872   cf_cv_type_sigaction=yes
12873 else
12874   echo "$as_me: failed program was:" >&5
12875 cat conftest.$ac_ext >&5
12876 cf_cv_type_sigaction=no
12877 fi
12878 rm -f conftest.$ac_objext conftest.$ac_ext
12879 fi
12880
12881 echo "$as_me:12881: result: $cf_cv_type_sigaction" >&5
12882 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12883 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12884 #define HAVE_TYPE_SIGACTION 1
12885 EOF
12886
12887 echo "$as_me:12887: checking declaration of size-change" >&5
12888 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12889 if test "${cf_cv_sizechange+set}" = set; then
12890   echo $ECHO_N "(cached) $ECHO_C" >&6
12891 else
12892
12893     cf_cv_sizechange=unknown
12894     cf_save_CPPFLAGS="$CPPFLAGS"
12895
12896 for cf_opts in "" "NEED_PTEM_H"
12897 do
12898
12899     CPPFLAGS="$cf_save_CPPFLAGS"
12900     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12901     cat >conftest.$ac_ext <<_ACEOF
12902 #line 12902 "configure"
12903 #include "confdefs.h"
12904 #include <sys/types.h>
12905 #ifdef HAVE_TERMIOS_H
12906 #include <termios.h>
12907 #else
12908 #ifdef HAVE_TERMIO_H
12909 #include <termio.h>
12910 #endif
12911 #endif
12912 #ifdef NEED_PTEM_H
12913 /* This is a workaround for SCO:  they neglected to define struct winsize in
12914  * termios.h -- it's only in termio.h and ptem.h
12915  */
12916 #include        <sys/stream.h>
12917 #include        <sys/ptem.h>
12918 #endif
12919 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12920 #include <sys/ioctl.h>
12921 #endif
12922
12923 int
12924 main ()
12925 {
12926
12927 #ifdef TIOCGSIZE
12928         struct ttysize win;     /* FIXME: what system is this? */
12929         int y = win.ts_lines;
12930         int x = win.ts_cols;
12931 #else
12932 #ifdef TIOCGWINSZ
12933         struct winsize win;
12934         int y = win.ws_row;
12935         int x = win.ws_col;
12936 #else
12937         no TIOCGSIZE or TIOCGWINSZ
12938 #endif /* TIOCGWINSZ */
12939 #endif /* TIOCGSIZE */
12940
12941   ;
12942   return 0;
12943 }
12944 _ACEOF
12945 rm -f conftest.$ac_objext
12946 if { (eval echo "$as_me:12946: \"$ac_compile\"") >&5
12947   (eval $ac_compile) 2>&5
12948   ac_status=$?
12949   echo "$as_me:12949: \$? = $ac_status" >&5
12950   (exit $ac_status); } &&
12951          { ac_try='test -s conftest.$ac_objext'
12952   { (eval echo "$as_me:12952: \"$ac_try\"") >&5
12953   (eval $ac_try) 2>&5
12954   ac_status=$?
12955   echo "$as_me:12955: \$? = $ac_status" >&5
12956   (exit $ac_status); }; }; then
12957   cf_cv_sizechange=yes
12958 else
12959   echo "$as_me: failed program was:" >&5
12960 cat conftest.$ac_ext >&5
12961 cf_cv_sizechange=no
12962 fi
12963 rm -f conftest.$ac_objext conftest.$ac_ext
12964
12965         CPPFLAGS="$cf_save_CPPFLAGS"
12966         if test "$cf_cv_sizechange" = yes ; then
12967                 echo "size-change succeeded ($cf_opts)" >&5
12968                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12969                 break
12970         fi
12971 done
12972
12973 fi
12974 echo "$as_me:12974: result: $cf_cv_sizechange" >&5
12975 echo "${ECHO_T}$cf_cv_sizechange" >&6
12976 if test "$cf_cv_sizechange" != no ; then
12977         cat >>confdefs.h <<\EOF
12978 #define HAVE_SIZECHANGE 1
12979 EOF
12980
12981         case $cf_cv_sizechange in #(vi
12982         NEED*)
12983                 cat >>confdefs.h <<EOF
12984 #define $cf_cv_sizechange  1
12985 EOF
12986
12987                 ;;
12988         esac
12989 fi
12990
12991 echo "$as_me:12991: checking for memmove" >&5
12992 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12993 if test "${ac_cv_func_memmove+set}" = set; then
12994   echo $ECHO_N "(cached) $ECHO_C" >&6
12995 else
12996   cat >conftest.$ac_ext <<_ACEOF
12997 #line 12997 "configure"
12998 #include "confdefs.h"
12999 /* System header to define __stub macros and hopefully few prototypes,
13000     which can conflict with char memmove (); below.  */
13001 #include <assert.h>
13002 /* Override any gcc2 internal prototype to avoid an error.  */
13003 #ifdef __cplusplus
13004 extern "C"
13005 #endif
13006 /* We use char because int might match the return type of a gcc2
13007    builtin and then its argument prototype would still apply.  */
13008 char memmove ();
13009 char (*f) ();
13010
13011 int
13012 main ()
13013 {
13014 /* The GNU C library defines this for functions which it implements
13015     to always fail with ENOSYS.  Some functions are actually named
13016     something starting with __ and the normal name is an alias.  */
13017 #if defined (__stub_memmove) || defined (__stub___memmove)
13018 choke me
13019 #else
13020 f = memmove;
13021 #endif
13022
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 rm -f conftest.$ac_objext conftest$ac_exeext
13028 if { (eval echo "$as_me:13028: \"$ac_link\"") >&5
13029   (eval $ac_link) 2>&5
13030   ac_status=$?
13031   echo "$as_me:13031: \$? = $ac_status" >&5
13032   (exit $ac_status); } &&
13033          { ac_try='test -s conftest$ac_exeext'
13034   { (eval echo "$as_me:13034: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit $ac_status); }; }; then
13039   ac_cv_func_memmove=yes
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 ac_cv_func_memmove=no
13044 fi
13045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13046 fi
13047 echo "$as_me:13047: result: $ac_cv_func_memmove" >&5
13048 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13049 if test $ac_cv_func_memmove = yes; then
13050   :
13051 else
13052
13053 echo "$as_me:13053: checking for bcopy" >&5
13054 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13055 if test "${ac_cv_func_bcopy+set}" = set; then
13056   echo $ECHO_N "(cached) $ECHO_C" >&6
13057 else
13058   cat >conftest.$ac_ext <<_ACEOF
13059 #line 13059 "configure"
13060 #include "confdefs.h"
13061 /* System header to define __stub macros and hopefully few prototypes,
13062     which can conflict with char bcopy (); below.  */
13063 #include <assert.h>
13064 /* Override any gcc2 internal prototype to avoid an error.  */
13065 #ifdef __cplusplus
13066 extern "C"
13067 #endif
13068 /* We use char because int might match the return type of a gcc2
13069    builtin and then its argument prototype would still apply.  */
13070 char bcopy ();
13071 char (*f) ();
13072
13073 int
13074 main ()
13075 {
13076 /* The GNU C library defines this for functions which it implements
13077     to always fail with ENOSYS.  Some functions are actually named
13078     something starting with __ and the normal name is an alias.  */
13079 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13080 choke me
13081 #else
13082 f = bcopy;
13083 #endif
13084
13085   ;
13086   return 0;
13087 }
13088 _ACEOF
13089 rm -f conftest.$ac_objext conftest$ac_exeext
13090 if { (eval echo "$as_me:13090: \"$ac_link\"") >&5
13091   (eval $ac_link) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); } &&
13095          { ac_try='test -s conftest$ac_exeext'
13096   { (eval echo "$as_me:13096: \"$ac_try\"") >&5
13097   (eval $ac_try) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); }; }; then
13101   ac_cv_func_bcopy=yes
13102 else
13103   echo "$as_me: failed program was:" >&5
13104 cat conftest.$ac_ext >&5
13105 ac_cv_func_bcopy=no
13106 fi
13107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13108 fi
13109 echo "$as_me:13109: result: $ac_cv_func_bcopy" >&5
13110 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13111 if test $ac_cv_func_bcopy = yes; then
13112
13113         echo "$as_me:13113: checking if bcopy does overlapping moves" >&5
13114 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13115 if test "${cf_cv_good_bcopy+set}" = set; then
13116   echo $ECHO_N "(cached) $ECHO_C" >&6
13117 else
13118
13119                 if test "$cross_compiling" = yes; then
13120   cf_cv_good_bcopy=unknown
13121 else
13122   cat >conftest.$ac_ext <<_ACEOF
13123 #line 13123 "configure"
13124 #include "confdefs.h"
13125
13126 int main() {
13127         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13128         char temp[40];
13129         bcopy(data, temp, sizeof(data));
13130         bcopy(temp+10, temp, 15);
13131         bcopy(temp+5, temp+15, 10);
13132         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13133 }
13134
13135 _ACEOF
13136 rm -f conftest$ac_exeext
13137 if { (eval echo "$as_me:13137: \"$ac_link\"") >&5
13138   (eval $ac_link) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13142   { (eval echo "$as_me:13142: \"$ac_try\"") >&5
13143   (eval $ac_try) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); }; }; then
13147   cf_cv_good_bcopy=yes
13148 else
13149   echo "$as_me: program exited with status $ac_status" >&5
13150 echo "$as_me: failed program was:" >&5
13151 cat conftest.$ac_ext >&5
13152 cf_cv_good_bcopy=no
13153 fi
13154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13155 fi
13156
13157 fi
13158 echo "$as_me:13158: result: $cf_cv_good_bcopy" >&5
13159 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13160
13161 else
13162   cf_cv_good_bcopy=no
13163 fi
13164
13165         if test "$cf_cv_good_bcopy" = yes ; then
13166                 cat >>confdefs.h <<\EOF
13167 #define USE_OK_BCOPY 1
13168 EOF
13169
13170         else
13171                 cat >>confdefs.h <<\EOF
13172 #define USE_MY_MEMMOVE 1
13173 EOF
13174
13175         fi
13176
13177 fi
13178
13179 echo "$as_me:13179: checking if poll really works" >&5
13180 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13181 if test "${cf_cv_working_poll+set}" = set; then
13182   echo $ECHO_N "(cached) $ECHO_C" >&6
13183 else
13184
13185 if test "$cross_compiling" = yes; then
13186   cf_cv_working_poll=unknown
13187 else
13188   cat >conftest.$ac_ext <<_ACEOF
13189 #line 13189 "configure"
13190 #include "confdefs.h"
13191
13192 #include <stdio.h>
13193 #ifdef HAVE_POLL_H
13194 #include <poll.h>
13195 #else
13196 #include <sys/poll.h>
13197 #endif
13198 int main() {
13199         struct pollfd myfds;
13200         int ret;
13201
13202         myfds.fd = 0;
13203         myfds.events = POLLIN;
13204
13205         ret = poll(&myfds, 1, 100);
13206         ${cf_cv_main_return:-return}(ret != 0);
13207 }
13208 _ACEOF
13209 rm -f conftest$ac_exeext
13210 if { (eval echo "$as_me:13210: \"$ac_link\"") >&5
13211   (eval $ac_link) 2>&5
13212   ac_status=$?
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13215   { (eval echo "$as_me:13215: \"$ac_try\"") >&5
13216   (eval $ac_try) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit $ac_status); }; }; then
13220   cf_cv_working_poll=yes
13221 else
13222   echo "$as_me: program exited with status $ac_status" >&5
13223 echo "$as_me: failed program was:" >&5
13224 cat conftest.$ac_ext >&5
13225 cf_cv_working_poll=no
13226 fi
13227 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13228 fi
13229 fi
13230 echo "$as_me:13230: result: $cf_cv_working_poll" >&5
13231 echo "${ECHO_T}$cf_cv_working_poll" >&6
13232 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13233 #define HAVE_WORKING_POLL 1
13234 EOF
13235
13236 if test "$with_hashed_db" != no ; then
13237         cat >>confdefs.h <<\EOF
13238 #define USE_HASHED_DB 1
13239 EOF
13240
13241 echo "$as_me:13241: checking for db.h" >&5
13242 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13243 if test "${ac_cv_header_db_h+set}" = set; then
13244   echo $ECHO_N "(cached) $ECHO_C" >&6
13245 else
13246   cat >conftest.$ac_ext <<_ACEOF
13247 #line 13247 "configure"
13248 #include "confdefs.h"
13249 #include <db.h>
13250 _ACEOF
13251 if { (eval echo "$as_me:13251: \"$ac_cpp conftest.$ac_ext\"") >&5
13252   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13253   ac_status=$?
13254   egrep -v '^ *\+' conftest.er1 >conftest.err
13255   rm -f conftest.er1
13256   cat conftest.err >&5
13257   echo "$as_me:13257: \$? = $ac_status" >&5
13258   (exit $ac_status); } >/dev/null; then
13259   if test -s conftest.err; then
13260     ac_cpp_err=$ac_c_preproc_warn_flag
13261   else
13262     ac_cpp_err=
13263   fi
13264 else
13265   ac_cpp_err=yes
13266 fi
13267 if test -z "$ac_cpp_err"; then
13268   ac_cv_header_db_h=yes
13269 else
13270   echo "$as_me: failed program was:" >&5
13271   cat conftest.$ac_ext >&5
13272   ac_cv_header_db_h=no
13273 fi
13274 rm -f conftest.err conftest.$ac_ext
13275 fi
13276 echo "$as_me:13276: result: $ac_cv_header_db_h" >&5
13277 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13278 if test $ac_cv_header_db_h = yes; then
13279
13280 echo "$as_me:13280: checking for version of db" >&5
13281 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13282 if test "${cf_cv_hashed_db_version+set}" = set; then
13283   echo $ECHO_N "(cached) $ECHO_C" >&6
13284 else
13285
13286 cf_cv_hashed_db_version=unknown
13287
13288 for cf_db_version in 1 2 3 4
13289 do
13290
13291 echo "(line 13291) testing checking for db version $cf_db_version ..." 1>&5
13292
13293         cat >conftest.$ac_ext <<_ACEOF
13294 #line 13294 "configure"
13295 #include "confdefs.h"
13296
13297 $ac_includes_default
13298 #include <db.h>
13299
13300 #ifdef DB_VERSION_MAJOR
13301         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13302 #if $cf_db_version == DB_VERSION_MAJOR
13303         /* ok */
13304 #else
13305         make an error
13306 #endif
13307 #else
13308 #if $cf_db_version == 1
13309         /* ok: assuming this is DB 1.8.5 */
13310 #else
13311         make an error
13312 #endif
13313 #endif
13314
13315 int
13316 main ()
13317 {
13318 DBT *foo = 0
13319   ;
13320   return 0;
13321 }
13322 _ACEOF
13323 rm -f conftest.$ac_objext
13324 if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5
13325   (eval $ac_compile) 2>&5
13326   ac_status=$?
13327   echo "$as_me:13327: \$? = $ac_status" >&5
13328   (exit $ac_status); } &&
13329          { ac_try='test -s conftest.$ac_objext'
13330   { (eval echo "$as_me:13330: \"$ac_try\"") >&5
13331   (eval $ac_try) 2>&5
13332   ac_status=$?
13333   echo "$as_me:13333: \$? = $ac_status" >&5
13334   (exit $ac_status); }; }; then
13335
13336         cf_cv_hashed_db_version=$cf_db_version
13337         break
13338
13339 else
13340   echo "$as_me: failed program was:" >&5
13341 cat conftest.$ac_ext >&5
13342 fi
13343 rm -f conftest.$ac_objext conftest.$ac_ext
13344 done
13345
13346 fi
13347 echo "$as_me:13347: result: $cf_cv_hashed_db_version" >&5
13348 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13349
13350 if test "$cf_cv_hashed_db_version" = unknown ; then
13351         { { echo "$as_me:13351: error: Cannot determine version of db" >&5
13352 echo "$as_me: error: Cannot determine version of db" >&2;}
13353    { (exit 1); exit 1; }; }
13354 else
13355
13356 echo "$as_me:13356: checking for db libraries" >&5
13357 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13358 if test "${cf_cv_hashed_db_libs+set}" = set; then
13359   echo $ECHO_N "(cached) $ECHO_C" >&6
13360 else
13361
13362 cf_cv_hashed_db_libs=unknown
13363 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13364 do
13365         cf_save_libs="$LIBS"
13366         if test -n "$cf_db_libs"; then
13367                 LIBS="-l$cf_db_libs $LIBS"
13368         fi
13369
13370 echo "(line 13370) testing checking for library "$cf_db_libs" ..." 1>&5
13371
13372         cat >conftest.$ac_ext <<_ACEOF
13373 #line 13373 "configure"
13374 #include "confdefs.h"
13375
13376 $ac_includes_default
13377 #include <db.h>
13378
13379 int
13380 main ()
13381 {
13382
13383         char *path = "/tmp/foo";
13384 #ifdef DB_VERSION_MAJOR
13385 #if DB_VERSION_MAJOR >= 4
13386         DB *result = 0;
13387         db_create(&result, NULL, 0);
13388         result->open(result,
13389                 NULL,
13390                 path,
13391                 path,
13392                 DB_HASH,
13393                 DB_CREATE,
13394                 0644);
13395 #elif DB_VERSION_MAJOR >= 3
13396         DB *result = 0;
13397         db_create(&result, NULL, 0);
13398         result->open(result,
13399                 path,
13400                 path,
13401                 DB_HASH,
13402                 DB_CREATE,
13403                 0644);
13404 #elif DB_VERSION_MAJOR >= 2
13405         DB *result = 0;
13406         db_open(path,
13407                 DB_HASH,
13408                 DB_CREATE,
13409                 0644,
13410                 (DB_ENV *) 0,
13411                 (DB_INFO *) 0,
13412                 &result);
13413 #endif /* DB_VERSION_MAJOR */
13414 #else
13415         DB *result = dbopen(path,
13416                      2,
13417                      0644,
13418                      DB_HASH,
13419                      0);
13420 #endif
13421         ${cf_cv_main_return:-return}(result != 0)
13422
13423   ;
13424   return 0;
13425 }
13426 _ACEOF
13427 rm -f conftest.$ac_objext conftest$ac_exeext
13428 if { (eval echo "$as_me:13428: \"$ac_link\"") >&5
13429   (eval $ac_link) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit $ac_status); } &&
13433          { ac_try='test -s conftest$ac_exeext'
13434   { (eval echo "$as_me:13434: \"$ac_try\"") >&5
13435   (eval $ac_try) 2>&5
13436   ac_status=$?
13437   echo "$as_me:13437: \$? = $ac_status" >&5
13438   (exit $ac_status); }; }; then
13439
13440         if test -n "$cf_db_libs" ; then
13441                 cf_cv_hashed_db_libs=$cf_db_libs
13442         else
13443                 cf_cv_hashed_db_libs=default
13444         fi
13445         LIBS="$cf_save_libs"
13446         break
13447
13448 else
13449   echo "$as_me: failed program was:" >&5
13450 cat conftest.$ac_ext >&5
13451 fi
13452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13453         LIBS="$cf_save_libs"
13454 done
13455
13456 fi
13457 echo "$as_me:13457: result: $cf_cv_hashed_db_libs" >&5
13458 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13459
13460         if test "$cf_cv_hashed_db_libs" = unknown ; then
13461                 { { echo "$as_me:13461: error: Cannot determine library for db" >&5
13462 echo "$as_me: error: Cannot determine library for db" >&2;}
13463    { (exit 1); exit 1; }; }
13464         elif test "$cf_cv_hashed_db_libs" != default ; then
13465                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13466         fi
13467 fi
13468
13469 else
13470
13471         { { echo "$as_me:13471: error: Cannot find db.h" >&5
13472 echo "$as_me: error: Cannot find db.h" >&2;}
13473    { (exit 1); exit 1; }; }
13474
13475 fi
13476
13477 fi
13478
13479 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13480         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13481         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13482 fi
13483
13484 # Just in case, check if the C compiler has a bool type.
13485
13486 echo "$as_me:13486: checking if we should include stdbool.h" >&5
13487 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13488
13489 if test "${cf_cv_header_stdbool_h+set}" = set; then
13490   echo $ECHO_N "(cached) $ECHO_C" >&6
13491 else
13492
13493         cat >conftest.$ac_ext <<_ACEOF
13494 #line 13494 "configure"
13495 #include "confdefs.h"
13496
13497 int
13498 main ()
13499 {
13500 bool foo = false
13501   ;
13502   return 0;
13503 }
13504 _ACEOF
13505 rm -f conftest.$ac_objext
13506 if { (eval echo "$as_me:13506: \"$ac_compile\"") >&5
13507   (eval $ac_compile) 2>&5
13508   ac_status=$?
13509   echo "$as_me:13509: \$? = $ac_status" >&5
13510   (exit $ac_status); } &&
13511          { ac_try='test -s conftest.$ac_objext'
13512   { (eval echo "$as_me:13512: \"$ac_try\"") >&5
13513   (eval $ac_try) 2>&5
13514   ac_status=$?
13515   echo "$as_me:13515: \$? = $ac_status" >&5
13516   (exit $ac_status); }; }; then
13517   cf_cv_header_stdbool_h=0
13518 else
13519   echo "$as_me: failed program was:" >&5
13520 cat conftest.$ac_ext >&5
13521 cat >conftest.$ac_ext <<_ACEOF
13522 #line 13522 "configure"
13523 #include "confdefs.h"
13524
13525 #ifndef __BEOS__
13526 #include <stdbool.h>
13527 #endif
13528
13529 int
13530 main ()
13531 {
13532 bool foo = false
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 rm -f conftest.$ac_objext
13538 if { (eval echo "$as_me:13538: \"$ac_compile\"") >&5
13539   (eval $ac_compile) 2>&5
13540   ac_status=$?
13541   echo "$as_me:13541: \$? = $ac_status" >&5
13542   (exit $ac_status); } &&
13543          { ac_try='test -s conftest.$ac_objext'
13544   { (eval echo "$as_me:13544: \"$ac_try\"") >&5
13545   (eval $ac_try) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); }; }; then
13549   cf_cv_header_stdbool_h=1
13550 else
13551   echo "$as_me: failed program was:" >&5
13552 cat conftest.$ac_ext >&5
13553 cf_cv_header_stdbool_h=0
13554 fi
13555 rm -f conftest.$ac_objext conftest.$ac_ext
13556 fi
13557 rm -f conftest.$ac_objext conftest.$ac_ext
13558 fi
13559
13560 if test "$cf_cv_header_stdbool_h" = 1
13561 then    echo "$as_me:13561: result: yes" >&5
13562 echo "${ECHO_T}yes" >&6
13563 else    echo "$as_me:13563: result: no" >&5
13564 echo "${ECHO_T}no" >&6
13565 fi
13566
13567 echo "$as_me:13567: checking for builtin bool type" >&5
13568 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13569
13570 if test "${cf_cv_cc_bool_type+set}" = set; then
13571   echo $ECHO_N "(cached) $ECHO_C" >&6
13572 else
13573
13574         cat >conftest.$ac_ext <<_ACEOF
13575 #line 13575 "configure"
13576 #include "confdefs.h"
13577
13578 #include <stdio.h>
13579 #include <sys/types.h>
13580
13581 int
13582 main ()
13583 {
13584 bool x = false
13585   ;
13586   return 0;
13587 }
13588 _ACEOF
13589 rm -f conftest.$ac_objext
13590 if { (eval echo "$as_me:13590: \"$ac_compile\"") >&5
13591   (eval $ac_compile) 2>&5
13592   ac_status=$?
13593   echo "$as_me:13593: \$? = $ac_status" >&5
13594   (exit $ac_status); } &&
13595          { ac_try='test -s conftest.$ac_objext'
13596   { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit $ac_status); }; }; then
13601   cf_cv_cc_bool_type=1
13602 else
13603   echo "$as_me: failed program was:" >&5
13604 cat conftest.$ac_ext >&5
13605 cf_cv_cc_bool_type=0
13606 fi
13607 rm -f conftest.$ac_objext conftest.$ac_ext
13608
13609 fi
13610
13611 if test "$cf_cv_cc_bool_type" = 1
13612 then    echo "$as_me:13612: result: yes" >&5
13613 echo "${ECHO_T}yes" >&6
13614 else    echo "$as_me:13614: result: no" >&5
13615 echo "${ECHO_T}no" >&6
13616 fi
13617
13618 # Check for C++ compiler characteristics (and ensure that it's there!)
13619 if test -n "$CXX" ; then
13620         ac_ext=cc
13621 ac_cpp='$CXXCPP $CPPFLAGS'
13622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13625 ac_main_return=return
13626
13627 if test -n "$GXX" ; then
13628 case $cf_cv_system_name in #(vi
13629 os2*) #(vi
13630         cf_stdcpp_libname=stdcpp
13631         ;;
13632 *)
13633         cf_stdcpp_libname=stdc++
13634         ;;
13635 esac
13636 echo "$as_me:13636: checking for library $cf_stdcpp_libname" >&5
13637 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13638 if test "${cf_cv_libstdcpp+set}" = set; then
13639   echo $ECHO_N "(cached) $ECHO_C" >&6
13640 else
13641
13642         cf_save="$LIBS"
13643         LIBS="$LIBS -l$cf_stdcpp_libname"
13644 cat >conftest.$ac_ext <<_ACEOF
13645 #line 13645 "configure"
13646 #include "confdefs.h"
13647
13648 #include <strstream.h>
13649 int
13650 main ()
13651 {
13652
13653 char buf[80];
13654 strstreambuf foo(buf, sizeof(buf))
13655
13656   ;
13657   return 0;
13658 }
13659 _ACEOF
13660 rm -f conftest.$ac_objext conftest$ac_exeext
13661 if { (eval echo "$as_me:13661: \"$ac_link\"") >&5
13662   (eval $ac_link) 2>&5
13663   ac_status=$?
13664   echo "$as_me:13664: \$? = $ac_status" >&5
13665   (exit $ac_status); } &&
13666          { ac_try='test -s conftest$ac_exeext'
13667   { (eval echo "$as_me:13667: \"$ac_try\"") >&5
13668   (eval $ac_try) 2>&5
13669   ac_status=$?
13670   echo "$as_me:13670: \$? = $ac_status" >&5
13671   (exit $ac_status); }; }; then
13672   cf_cv_libstdcpp=yes
13673 else
13674   echo "$as_me: failed program was:" >&5
13675 cat conftest.$ac_ext >&5
13676 cf_cv_libstdcpp=no
13677 fi
13678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13679         LIBS="$cf_save"
13680
13681 fi
13682 echo "$as_me:13682: result: $cf_cv_libstdcpp" >&5
13683 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13684 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13685 fi
13686
13687         echo "$as_me:13687: checking whether $CXX understands -c and -o together" >&5
13688 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13689 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13690   echo $ECHO_N "(cached) $ECHO_C" >&6
13691 else
13692
13693 cat > conftest.$ac_ext <<CF_EOF
13694 #include <stdio.h>
13695 int main()
13696 {
13697         ${cf_cv_main_return:-return}(0);
13698 }
13699 CF_EOF
13700 # We do the test twice because some compilers refuse to overwrite an
13701 # existing .o file with -o, though they will create one.
13702 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13703 if { (eval echo "$as_me:13703: \"$ac_try\"") >&5
13704   (eval $ac_try) 2>&5
13705   ac_status=$?
13706   echo "$as_me:13706: \$? = $ac_status" >&5
13707   (exit $ac_status); } &&
13708   test -f conftest2.$ac_objext && { (eval echo "$as_me:13708: \"$ac_try\"") >&5
13709   (eval $ac_try) 2>&5
13710   ac_status=$?
13711   echo "$as_me:13711: \$? = $ac_status" >&5
13712   (exit $ac_status); };
13713 then
13714   eval cf_cv_prog_CXX_c_o=yes
13715 else
13716   eval cf_cv_prog_CXX_c_o=no
13717 fi
13718 rm -f conftest*
13719
13720 fi
13721 if test $cf_cv_prog_CXX_c_o = yes; then
13722   echo "$as_me:13722: result: yes" >&5
13723 echo "${ECHO_T}yes" >&6
13724 else
13725   echo "$as_me:13725: result: no" >&5
13726 echo "${ECHO_T}no" >&6
13727 fi
13728
13729         case $GXX_VERSION in
13730         1*|2.0-6*)
13731                 cf_cxx_library=yes
13732                 ;;
13733         *-2.7*|2.7*)
13734
13735 cf_cxx_library=unknown
13736 case $cf_cv_system_name in #(vi
13737 os2*) #(vi
13738         cf_gpp_libname=gpp
13739         ;;
13740 *)
13741         cf_gpp_libname=g++
13742         ;;
13743 esac
13744 if test "$GXX" = yes; then
13745         echo "$as_me:13745: checking for lib$cf_gpp_libname" >&5
13746 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13747         cf_save="$LIBS"
13748         LIBS="$LIBS -l$cf_gpp_libname"
13749         cat >conftest.$ac_ext <<_ACEOF
13750 #line 13750 "configure"
13751 #include "confdefs.h"
13752
13753 #include <$cf_gpp_libname/builtin.h>
13754
13755 int
13756 main ()
13757 {
13758 two_arg_error_handler_t foo2 = lib_error_handler
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f conftest.$ac_objext conftest$ac_exeext
13764 if { (eval echo "$as_me:13764: \"$ac_link\"") >&5
13765   (eval $ac_link) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } &&
13769          { ac_try='test -s conftest$ac_exeext'
13770   { (eval echo "$as_me:13770: \"$ac_try\"") >&5
13771   (eval $ac_try) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit $ac_status); }; }; then
13775   cf_cxx_library=yes
13776          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13777          if test "$cf_gpp_libname" = cpp ; then
13778             cat >>confdefs.h <<\EOF
13779 #define HAVE_GPP_BUILTIN_H 1
13780 EOF
13781
13782          else
13783             cat >>confdefs.h <<\EOF
13784 #define HAVE_GXX_BUILTIN_H 1
13785 EOF
13786
13787          fi
13788 else
13789   echo "$as_me: failed program was:" >&5
13790 cat conftest.$ac_ext >&5
13791 cat >conftest.$ac_ext <<_ACEOF
13792 #line 13792 "configure"
13793 #include "confdefs.h"
13794
13795 #include <builtin.h>
13796
13797 int
13798 main ()
13799 {
13800 two_arg_error_handler_t foo2 = lib_error_handler
13801   ;
13802   return 0;
13803 }
13804 _ACEOF
13805 rm -f conftest.$ac_objext conftest$ac_exeext
13806 if { (eval echo "$as_me:13806: \"$ac_link\"") >&5
13807   (eval $ac_link) 2>&5
13808   ac_status=$?
13809   echo "$as_me:13809: \$? = $ac_status" >&5
13810   (exit $ac_status); } &&
13811          { ac_try='test -s conftest$ac_exeext'
13812   { (eval echo "$as_me:13812: \"$ac_try\"") >&5
13813   (eval $ac_try) 2>&5
13814   ac_status=$?
13815   echo "$as_me:13815: \$? = $ac_status" >&5
13816   (exit $ac_status); }; }; then
13817   cf_cxx_library=yes
13818          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13819          cat >>confdefs.h <<\EOF
13820 #define HAVE_BUILTIN_H 1
13821 EOF
13822
13823 else
13824   echo "$as_me: failed program was:" >&5
13825 cat conftest.$ac_ext >&5
13826 cf_cxx_library=no
13827 fi
13828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13829 fi
13830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13831         LIBS="$cf_save"
13832         echo "$as_me:13832: result: $cf_cxx_library" >&5
13833 echo "${ECHO_T}$cf_cxx_library" >&6
13834 fi
13835
13836                 ;;
13837         *)
13838                 cf_cxx_library=no
13839                 ;;
13840         esac
13841
13842         ac_ext=cc
13843 ac_cpp='$CXXCPP $CPPFLAGS'
13844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13847 ac_main_return=return
13848 echo "$as_me:13848: checking how to run the C++ preprocessor" >&5
13849 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13850 if test -z "$CXXCPP"; then
13851   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13852   echo $ECHO_N "(cached) $ECHO_C" >&6
13853 else
13854       # Double quotes because CXXCPP needs to be expanded
13855     for CXXCPP in "$CXX -E" "/lib/cpp"
13856     do
13857       ac_preproc_ok=false
13858 for ac_cxx_preproc_warn_flag in '' yes
13859 do
13860   # Use a header file that comes with gcc, so configuring glibc
13861   # with a fresh cross-compiler works.
13862   # On the NeXT, cc -E runs the code through the compiler's parser,
13863   # not just through cpp. "Syntax error" is here to catch this case.
13864   cat >conftest.$ac_ext <<_ACEOF
13865 #line 13865 "configure"
13866 #include "confdefs.h"
13867 #include <assert.h>
13868                      Syntax error
13869 _ACEOF
13870 if { (eval echo "$as_me:13870: \"$ac_cpp conftest.$ac_ext\"") >&5
13871   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13872   ac_status=$?
13873   egrep -v '^ *\+' conftest.er1 >conftest.err
13874   rm -f conftest.er1
13875   cat conftest.err >&5
13876   echo "$as_me:13876: \$? = $ac_status" >&5
13877   (exit $ac_status); } >/dev/null; then
13878   if test -s conftest.err; then
13879     ac_cpp_err=$ac_cxx_preproc_warn_flag
13880   else
13881     ac_cpp_err=
13882   fi
13883 else
13884   ac_cpp_err=yes
13885 fi
13886 if test -z "$ac_cpp_err"; then
13887   :
13888 else
13889   echo "$as_me: failed program was:" >&5
13890   cat conftest.$ac_ext >&5
13891   # Broken: fails on valid input.
13892 continue
13893 fi
13894 rm -f conftest.err conftest.$ac_ext
13895
13896   # OK, works on sane cases.  Now check whether non-existent headers
13897   # can be detected and how.
13898   cat >conftest.$ac_ext <<_ACEOF
13899 #line 13899 "configure"
13900 #include "confdefs.h"
13901 #include <ac_nonexistent.h>
13902 _ACEOF
13903 if { (eval echo "$as_me:13903: \"$ac_cpp conftest.$ac_ext\"") >&5
13904   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13905   ac_status=$?
13906   egrep -v '^ *\+' conftest.er1 >conftest.err
13907   rm -f conftest.er1
13908   cat conftest.err >&5
13909   echo "$as_me:13909: \$? = $ac_status" >&5
13910   (exit $ac_status); } >/dev/null; then
13911   if test -s conftest.err; then
13912     ac_cpp_err=$ac_cxx_preproc_warn_flag
13913   else
13914     ac_cpp_err=
13915   fi
13916 else
13917   ac_cpp_err=yes
13918 fi
13919 if test -z "$ac_cpp_err"; then
13920   # Broken: success on invalid input.
13921 continue
13922 else
13923   echo "$as_me: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   # Passes both tests.
13926 ac_preproc_ok=:
13927 break
13928 fi
13929 rm -f conftest.err conftest.$ac_ext
13930
13931 done
13932 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13933 rm -f conftest.err conftest.$ac_ext
13934 if $ac_preproc_ok; then
13935   break
13936 fi
13937
13938     done
13939     ac_cv_prog_CXXCPP=$CXXCPP
13940
13941 fi
13942   CXXCPP=$ac_cv_prog_CXXCPP
13943 else
13944   ac_cv_prog_CXXCPP=$CXXCPP
13945 fi
13946 echo "$as_me:13946: result: $CXXCPP" >&5
13947 echo "${ECHO_T}$CXXCPP" >&6
13948 ac_preproc_ok=false
13949 for ac_cxx_preproc_warn_flag in '' yes
13950 do
13951   # Use a header file that comes with gcc, so configuring glibc
13952   # with a fresh cross-compiler works.
13953   # On the NeXT, cc -E runs the code through the compiler's parser,
13954   # not just through cpp. "Syntax error" is here to catch this case.
13955   cat >conftest.$ac_ext <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13958 #include <assert.h>
13959                      Syntax error
13960 _ACEOF
13961 if { (eval echo "$as_me:13961: \"$ac_cpp conftest.$ac_ext\"") >&5
13962   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13963   ac_status=$?
13964   egrep -v '^ *\+' conftest.er1 >conftest.err
13965   rm -f conftest.er1
13966   cat conftest.err >&5
13967   echo "$as_me:13967: \$? = $ac_status" >&5
13968   (exit $ac_status); } >/dev/null; then
13969   if test -s conftest.err; then
13970     ac_cpp_err=$ac_cxx_preproc_warn_flag
13971   else
13972     ac_cpp_err=
13973   fi
13974 else
13975   ac_cpp_err=yes
13976 fi
13977 if test -z "$ac_cpp_err"; then
13978   :
13979 else
13980   echo "$as_me: failed program was:" >&5
13981   cat conftest.$ac_ext >&5
13982   # Broken: fails on valid input.
13983 continue
13984 fi
13985 rm -f conftest.err conftest.$ac_ext
13986
13987   # OK, works on sane cases.  Now check whether non-existent headers
13988   # can be detected and how.
13989   cat >conftest.$ac_ext <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992 #include <ac_nonexistent.h>
13993 _ACEOF
13994 if { (eval echo "$as_me:13994: \"$ac_cpp conftest.$ac_ext\"") >&5
13995   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13996   ac_status=$?
13997   egrep -v '^ *\+' conftest.er1 >conftest.err
13998   rm -f conftest.er1
13999   cat conftest.err >&5
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); } >/dev/null; then
14002   if test -s conftest.err; then
14003     ac_cpp_err=$ac_cxx_preproc_warn_flag
14004   else
14005     ac_cpp_err=
14006   fi
14007 else
14008   ac_cpp_err=yes
14009 fi
14010 if test -z "$ac_cpp_err"; then
14011   # Broken: success on invalid input.
14012 continue
14013 else
14014   echo "$as_me: failed program was:" >&5
14015   cat conftest.$ac_ext >&5
14016   # Passes both tests.
14017 ac_preproc_ok=:
14018 break
14019 fi
14020 rm -f conftest.err conftest.$ac_ext
14021
14022 done
14023 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14024 rm -f conftest.err conftest.$ac_ext
14025 if $ac_preproc_ok; then
14026   :
14027 else
14028   { { echo "$as_me:14028: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14029 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14030    { (exit 1); exit 1; }; }
14031 fi
14032
14033 ac_ext=cc
14034 ac_cpp='$CXXCPP $CPPFLAGS'
14035 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14036 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14037 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14038 ac_main_return=return
14039
14040 for ac_header in iostream typeinfo
14041 do
14042 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14043 echo "$as_me:14043: checking for $ac_header" >&5
14044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14046   echo $ECHO_N "(cached) $ECHO_C" >&6
14047 else
14048   cat >conftest.$ac_ext <<_ACEOF
14049 #line 14049 "configure"
14050 #include "confdefs.h"
14051 #include <$ac_header>
14052 _ACEOF
14053 if { (eval echo "$as_me:14053: \"$ac_cpp conftest.$ac_ext\"") >&5
14054   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14055   ac_status=$?
14056   egrep -v '^ *\+' conftest.er1 >conftest.err
14057   rm -f conftest.er1
14058   cat conftest.err >&5
14059   echo "$as_me:14059: \$? = $ac_status" >&5
14060   (exit $ac_status); } >/dev/null; then
14061   if test -s conftest.err; then
14062     ac_cpp_err=$ac_cxx_preproc_warn_flag
14063   else
14064     ac_cpp_err=
14065   fi
14066 else
14067   ac_cpp_err=yes
14068 fi
14069 if test -z "$ac_cpp_err"; then
14070   eval "$as_ac_Header=yes"
14071 else
14072   echo "$as_me: failed program was:" >&5
14073   cat conftest.$ac_ext >&5
14074   eval "$as_ac_Header=no"
14075 fi
14076 rm -f conftest.err conftest.$ac_ext
14077 fi
14078 echo "$as_me:14078: result: `eval echo '${'$as_ac_Header'}'`" >&5
14079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14080 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14081   cat >>confdefs.h <<EOF
14082 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14083 EOF
14084
14085 fi
14086 done
14087
14088 echo "$as_me:14088: checking if we should include stdbool.h" >&5
14089 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14090
14091 if test "${cf_cv_header_stdbool_h+set}" = set; then
14092   echo $ECHO_N "(cached) $ECHO_C" >&6
14093 else
14094
14095         cat >conftest.$ac_ext <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098
14099 int
14100 main ()
14101 {
14102 bool foo = false
14103   ;
14104   return 0;
14105 }
14106 _ACEOF
14107 rm -f conftest.$ac_objext
14108 if { (eval echo "$as_me:14108: \"$ac_compile\"") >&5
14109   (eval $ac_compile) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit $ac_status); } &&
14113          { ac_try='test -s conftest.$ac_objext'
14114   { (eval echo "$as_me:14114: \"$ac_try\"") >&5
14115   (eval $ac_try) 2>&5
14116   ac_status=$?
14117   echo "$as_me:14117: \$? = $ac_status" >&5
14118   (exit $ac_status); }; }; then
14119   cf_cv_header_stdbool_h=0
14120 else
14121   echo "$as_me: failed program was:" >&5
14122 cat conftest.$ac_ext >&5
14123 cat >conftest.$ac_ext <<_ACEOF
14124 #line 14124 "configure"
14125 #include "confdefs.h"
14126
14127 #ifndef __BEOS__
14128 #include <stdbool.h>
14129 #endif
14130
14131 int
14132 main ()
14133 {
14134 bool foo = false
14135   ;
14136   return 0;
14137 }
14138 _ACEOF
14139 rm -f conftest.$ac_objext
14140 if { (eval echo "$as_me:14140: \"$ac_compile\"") >&5
14141   (eval $ac_compile) 2>&5
14142   ac_status=$?
14143   echo "$as_me:14143: \$? = $ac_status" >&5
14144   (exit $ac_status); } &&
14145          { ac_try='test -s conftest.$ac_objext'
14146   { (eval echo "$as_me:14146: \"$ac_try\"") >&5
14147   (eval $ac_try) 2>&5
14148   ac_status=$?
14149   echo "$as_me:14149: \$? = $ac_status" >&5
14150   (exit $ac_status); }; }; then
14151   cf_cv_header_stdbool_h=1
14152 else
14153   echo "$as_me: failed program was:" >&5
14154 cat conftest.$ac_ext >&5
14155 cf_cv_header_stdbool_h=0
14156 fi
14157 rm -f conftest.$ac_objext conftest.$ac_ext
14158 fi
14159 rm -f conftest.$ac_objext conftest.$ac_ext
14160 fi
14161
14162 if test "$cf_cv_header_stdbool_h" = 1
14163 then    echo "$as_me:14163: result: yes" >&5
14164 echo "${ECHO_T}yes" >&6
14165 else    echo "$as_me:14165: result: no" >&5
14166 echo "${ECHO_T}no" >&6
14167 fi
14168
14169 echo "$as_me:14169: checking for builtin bool type" >&5
14170 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14171
14172 if test "${cf_cv_builtin_bool+set}" = set; then
14173   echo $ECHO_N "(cached) $ECHO_C" >&6
14174 else
14175
14176         cat >conftest.$ac_ext <<_ACEOF
14177 #line 14177 "configure"
14178 #include "confdefs.h"
14179
14180 #include <stdio.h>
14181 #include <sys/types.h>
14182
14183 int
14184 main ()
14185 {
14186 bool x = false
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 rm -f conftest.$ac_objext
14192 if { (eval echo "$as_me:14192: \"$ac_compile\"") >&5
14193   (eval $ac_compile) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -s conftest.$ac_objext'
14198   { (eval echo "$as_me:14198: \"$ac_try\"") >&5
14199   (eval $ac_try) 2>&5
14200   ac_status=$?
14201   echo "$as_me:14201: \$? = $ac_status" >&5
14202   (exit $ac_status); }; }; then
14203   cf_cv_builtin_bool=1
14204 else
14205   echo "$as_me: failed program was:" >&5
14206 cat conftest.$ac_ext >&5
14207 cf_cv_builtin_bool=0
14208 fi
14209 rm -f conftest.$ac_objext conftest.$ac_ext
14210
14211 fi
14212
14213 if test "$cf_cv_builtin_bool" = 1
14214 then    echo "$as_me:14214: result: yes" >&5
14215 echo "${ECHO_T}yes" >&6
14216 else    echo "$as_me:14216: result: no" >&5
14217 echo "${ECHO_T}no" >&6
14218 fi
14219
14220 echo "$as_me:14220: checking for size of bool" >&5
14221 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14222 if test "${cf_cv_type_of_bool+set}" = set; then
14223   echo $ECHO_N "(cached) $ECHO_C" >&6
14224 else
14225
14226         rm -f cf_test.out
14227         if test "$cross_compiling" = yes; then
14228   cf_cv_type_of_bool=unknown
14229 else
14230   cat >conftest.$ac_ext <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233
14234 #include <stdlib.h>
14235 #include <stdio.h>
14236
14237 #if defined(__cplusplus)
14238
14239 #ifdef HAVE_GXX_BUILTIN_H
14240 #include <g++/builtin.h>
14241 #elif HAVE_GPP_BUILTIN_H
14242 #include <gpp/builtin.h>
14243 #elif HAVE_BUILTIN_H
14244 #include <builtin.h>
14245 #endif
14246
14247 #else
14248
14249 #if $cf_cv_header_stdbool_h
14250 #include <stdbool.h>
14251 #endif
14252
14253 #endif
14254
14255 main()
14256 {
14257         FILE *fp = fopen("cf_test.out", "w");
14258         if (fp != 0) {
14259                 bool x = true;
14260                 if ((bool)(-x) >= 0)
14261                         fputs("unsigned ", fp);
14262                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14263                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14264                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14265                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14266                 fclose(fp);
14267         }
14268         ${cf_cv_main_return:-return}(0);
14269 }
14270
14271 _ACEOF
14272 rm -f conftest$ac_exeext
14273 if { (eval echo "$as_me:14273: \"$ac_link\"") >&5
14274   (eval $ac_link) 2>&5
14275   ac_status=$?
14276   echo "$as_me:14276: \$? = $ac_status" >&5
14277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14278   { (eval echo "$as_me:14278: \"$ac_try\"") >&5
14279   (eval $ac_try) 2>&5
14280   ac_status=$?
14281   echo "$as_me:14281: \$? = $ac_status" >&5
14282   (exit $ac_status); }; }; then
14283   cf_cv_type_of_bool=`cat cf_test.out`
14284                  if test -z "$cf_cv_type_of_bool"; then
14285                    cf_cv_type_of_bool=unknown
14286                  fi
14287 else
14288   echo "$as_me: program exited with status $ac_status" >&5
14289 echo "$as_me: failed program was:" >&5
14290 cat conftest.$ac_ext >&5
14291 cf_cv_type_of_bool=unknown
14292 fi
14293 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14294 fi
14295
14296 fi
14297
14298         rm -f cf_test.out
14299 echo "$as_me:14299: result: $cf_cv_type_of_bool" >&5
14300 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14301 if test "$cf_cv_type_of_bool" = unknown ; then
14302         case .$NCURSES_BOOL in #(vi
14303         .auto|.) NCURSES_BOOL=unsigned;;
14304         esac
14305         { echo "$as_me:14305: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14306 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14307         cf_cv_type_of_bool=$NCURSES_BOOL
14308 fi
14309
14310 echo "$as_me:14310: checking for special defines needed for etip.h" >&5
14311 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14312 cf_save_CXXFLAGS="$CXXFLAGS"
14313 cf_result="none"
14314 for cf_math in "" MATH_H
14315 do
14316 for cf_excp in "" MATH_EXCEPTION
14317 do
14318         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14319         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14320         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14321 cat >conftest.$ac_ext <<_ACEOF
14322 #line 14322 "configure"
14323 #include "confdefs.h"
14324
14325 #include <etip.h.in>
14326
14327 int
14328 main ()
14329 {
14330
14331   ;
14332   return 0;
14333 }
14334 _ACEOF
14335 rm -f conftest.$ac_objext
14336 if { (eval echo "$as_me:14336: \"$ac_compile\"") >&5
14337   (eval $ac_compile) 2>&5
14338   ac_status=$?
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit $ac_status); } &&
14341          { ac_try='test -s conftest.$ac_objext'
14342   { (eval echo "$as_me:14342: \"$ac_try\"") >&5
14343   (eval $ac_try) 2>&5
14344   ac_status=$?
14345   echo "$as_me:14345: \$? = $ac_status" >&5
14346   (exit $ac_status); }; }; then
14347
14348         test -n "$cf_math" && cat >>confdefs.h <<EOF
14349 #define ETIP_NEEDS_${cf_math} 1
14350 EOF
14351
14352         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14353 #define ETIP_NEEDS_${cf_excp} 1
14354 EOF
14355
14356         cf_result="$cf_math $cf_excp"
14357         break
14358
14359 else
14360   echo "$as_me: failed program was:" >&5
14361 cat conftest.$ac_ext >&5
14362 fi
14363 rm -f conftest.$ac_objext conftest.$ac_ext
14364 done
14365 done
14366 echo "$as_me:14366: result: $cf_result" >&5
14367 echo "${ECHO_T}$cf_result" >&6
14368 CXXFLAGS="$cf_save_CXXFLAGS"
14369
14370 if test -n "$CXX"; then
14371 echo "$as_me:14371: checking if $CXX accepts parameter initialization" >&5
14372 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14373 if test "${cf_cv_cpp_param_init+set}" = set; then
14374   echo $ECHO_N "(cached) $ECHO_C" >&6
14375 else
14376
14377         ac_ext=cc
14378 ac_cpp='$CXXCPP $CPPFLAGS'
14379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14382 ac_main_return=return
14383
14384         if test "$cross_compiling" = yes; then
14385   cf_cv_cpp_param_init=unknown
14386 else
14387   cat >conftest.$ac_ext <<_ACEOF
14388 #line 14388 "configure"
14389 #include "confdefs.h"
14390
14391 class TEST {
14392 private:
14393         int value;
14394 public:
14395         TEST(int x = 1);
14396         ~TEST();
14397 };
14398
14399 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14400 {
14401         value = x;
14402 }
14403 void main() { }
14404
14405 _ACEOF
14406 rm -f conftest$ac_exeext
14407 if { (eval echo "$as_me:14407: \"$ac_link\"") >&5
14408   (eval $ac_link) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14412   { (eval echo "$as_me:14412: \"$ac_try\"") >&5
14413   (eval $ac_try) 2>&5
14414   ac_status=$?
14415   echo "$as_me:14415: \$? = $ac_status" >&5
14416   (exit $ac_status); }; }; then
14417   cf_cv_cpp_param_init=yes
14418 else
14419   echo "$as_me: program exited with status $ac_status" >&5
14420 echo "$as_me: failed program was:" >&5
14421 cat conftest.$ac_ext >&5
14422 cf_cv_cpp_param_init=no
14423 fi
14424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14425 fi
14426         ac_ext=cc
14427 ac_cpp='$CXXCPP $CPPFLAGS'
14428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14429 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14431 ac_main_return=return
14432
14433 fi
14434 echo "$as_me:14434: result: $cf_cv_cpp_param_init" >&5
14435 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14436 fi
14437 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14438 #define CPP_HAS_PARAM_INIT 1
14439 EOF
14440
14441 if test -n "$CXX"; then
14442
14443 echo "$as_me:14443: checking if $CXX accepts static_cast" >&5
14444 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14445 if test "${cf_cv_cpp_static_cast+set}" = set; then
14446   echo $ECHO_N "(cached) $ECHO_C" >&6
14447 else
14448
14449         ac_ext=cc
14450 ac_cpp='$CXXCPP $CPPFLAGS'
14451 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14452 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14453 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14454 ac_main_return=return
14455
14456         cat >conftest.$ac_ext <<_ACEOF
14457 #line 14457 "configure"
14458 #include "confdefs.h"
14459
14460 class NCursesPanel
14461 {
14462 public:
14463   NCursesPanel(int nlines,
14464                int ncols,
14465                int begin_y = 0,
14466                int begin_x = 0)
14467   {
14468   }
14469
14470   ~NCursesPanel();
14471 };
14472
14473 template<class T> class NCursesUserPanel : public NCursesPanel
14474 {
14475 public:
14476   NCursesUserPanel (int nlines,
14477                     int ncols,
14478                     int begin_y = 0,
14479                     int begin_x = 0,
14480                     const T* p_UserData = static_cast<T*>(0))
14481     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14482   {
14483   };
14484   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14485   {
14486   };
14487
14488   virtual ~NCursesUserPanel() {};
14489 };
14490
14491 int
14492 main ()
14493 {
14494
14495         const char* p_UserData = static_cast<char*>(0)
14496   ;
14497   return 0;
14498 }
14499 _ACEOF
14500 rm -f conftest.$ac_objext
14501 if { (eval echo "$as_me:14501: \"$ac_compile\"") >&5
14502   (eval $ac_compile) 2>&5
14503   ac_status=$?
14504   echo "$as_me:14504: \$? = $ac_status" >&5
14505   (exit $ac_status); } &&
14506          { ac_try='test -s conftest.$ac_objext'
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_cpp_static_cast=yes
14513 else
14514   echo "$as_me: failed program was:" >&5
14515 cat conftest.$ac_ext >&5
14516 cf_cv_cpp_static_cast=no
14517 fi
14518 rm -f conftest.$ac_objext conftest.$ac_ext
14519
14520         ac_ext=cc
14521 ac_cpp='$CXXCPP $CPPFLAGS'
14522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14525 ac_main_return=return
14526
14527 fi
14528 echo "$as_me:14528: result: $cf_cv_cpp_static_cast" >&5
14529 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14530
14531 fi
14532
14533 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14534 #define CPP_HAS_STATIC_CAST 1
14535 EOF
14536
14537         CXX_AR='$(AR)'
14538         CXX_AR_OPTS='$(AR_OPTS)'
14539         case $cf_cv_system_name in #(vi
14540         irix*) #(vi
14541             if test "$GXX" != yes ; then
14542                 CXX_AR='$(CXX)'
14543                 CXX_AR_OPTS='-ar -o'
14544             fi
14545             ;;
14546         sco3.2v5*) #(vi
14547             CXXLDFLAGS="-u main"
14548             ;;
14549         solaris2*)
14550             if test "$GXX" != yes ; then
14551                 CXX_AR='$(CXX)'
14552                 CXX_AR_OPTS='-xar -o'
14553             fi
14554             ;;
14555         esac
14556
14557 else
14558         cf_cxx_library=no
14559         cf_cv_builtin_bool=1
14560
14561         # Just because we are not configuring against C++ right now does not
14562         # mean that a user will not want to use C++.  Some distributors disable
14563         # the C++ portion of this configuration as a shortcut (or just to avoid
14564         # compiling the demo in the c++ directory).  So we need a reasonable
14565         # default for the 'bool' type.
14566         #
14567         # Caveat: since the storage of the bool type is not standardized, it
14568         # may change.
14569
14570         if test "$NCURSES_BOOL" != auto ; then
14571                 cf_cv_type_of_bool=$NCURSES_BOOL
14572                 cf_cv_header_stdbool_h=0
14573         else
14574                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14575
14576 echo "$as_me:14576: checking for size of bool" >&5
14577 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14578 if test "${cf_cv_type_of_bool+set}" = set; then
14579   echo $ECHO_N "(cached) $ECHO_C" >&6
14580 else
14581
14582         rm -f cf_test.out
14583         if test "$cross_compiling" = yes; then
14584   cf_cv_type_of_bool=unknown
14585 else
14586   cat >conftest.$ac_ext <<_ACEOF
14587 #line 14587 "configure"
14588 #include "confdefs.h"
14589
14590 #include <stdlib.h>
14591 #include <stdio.h>
14592
14593 #if defined(__cplusplus)
14594
14595 #ifdef HAVE_GXX_BUILTIN_H
14596 #include <g++/builtin.h>
14597 #elif HAVE_GPP_BUILTIN_H
14598 #include <gpp/builtin.h>
14599 #elif HAVE_BUILTIN_H
14600 #include <builtin.h>
14601 #endif
14602
14603 #else
14604
14605 #if $cf_cv_header_stdbool_h
14606 #include <stdbool.h>
14607 #endif
14608
14609 #endif
14610
14611 main()
14612 {
14613         FILE *fp = fopen("cf_test.out", "w");
14614         if (fp != 0) {
14615                 bool x = true;
14616                 if ((bool)(-x) >= 0)
14617                         fputs("unsigned ", fp);
14618                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14619                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14620                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14621                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14622                 fclose(fp);
14623         }
14624         ${cf_cv_main_return:-return}(0);
14625 }
14626
14627 _ACEOF
14628 rm -f conftest$ac_exeext
14629 if { (eval echo "$as_me:14629: \"$ac_link\"") >&5
14630   (eval $ac_link) 2>&5
14631   ac_status=$?
14632   echo "$as_me:14632: \$? = $ac_status" >&5
14633   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14634   { (eval echo "$as_me:14634: \"$ac_try\"") >&5
14635   (eval $ac_try) 2>&5
14636   ac_status=$?
14637   echo "$as_me:14637: \$? = $ac_status" >&5
14638   (exit $ac_status); }; }; then
14639   cf_cv_type_of_bool=`cat cf_test.out`
14640                  if test -z "$cf_cv_type_of_bool"; then
14641                    cf_cv_type_of_bool=unknown
14642                  fi
14643 else
14644   echo "$as_me: program exited with status $ac_status" >&5
14645 echo "$as_me: failed program was:" >&5
14646 cat conftest.$ac_ext >&5
14647 cf_cv_type_of_bool=unknown
14648 fi
14649 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14650 fi
14651
14652 fi
14653
14654         rm -f cf_test.out
14655 echo "$as_me:14655: result: $cf_cv_type_of_bool" >&5
14656 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14657 if test "$cf_cv_type_of_bool" = unknown ; then
14658         case .$NCURSES_BOOL in #(vi
14659         .auto|.) NCURSES_BOOL=unsigned;;
14660         esac
14661         { echo "$as_me:14661: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14662 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14663         cf_cv_type_of_bool=$NCURSES_BOOL
14664 fi
14665
14666                 else
14667                         echo "$as_me:14667: checking for fallback type of bool" >&5
14668 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14669                         case "$host_cpu" in #(vi
14670                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14671                         *)      cf_cv_type_of_bool=int  ;;
14672                         esac
14673                         echo "$as_me:14673: result: $cf_cv_type_of_bool" >&5
14674 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14675                 fi
14676         fi
14677 fi
14678
14679 # If the C compiler did not declare bool, and we did not determine that the C++
14680 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14681 # ncurses library use the same type as C++ bool.  Note that this allows one to
14682 # specify the type of bool in a configure-script option and postpone
14683 # integration with the C++ compiler provided that the types are compatible.
14684 USE_CXX_BOOL=1
14685 if test $cf_cv_cc_bool_type = 1
14686 then
14687         # oops: C has a bool.  Unlikely, but C++ could differ.
14688         USE_CXX_BOOL=0
14689 elif test $cf_cv_builtin_bool = 0
14690 then
14691         # C++ has no bool
14692         USE_CXX_BOOL=0
14693 else
14694         # this is the normal case
14695         USE_CXX_BOOL='defined(__cplusplus)'
14696 fi
14697
14698 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14699 if test "$cf_with_ada" != "no" ; then
14700 cf_ada_make=gnatmake
14701 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14702 set dummy $cf_ada_make; ac_word=$2
14703 echo "$as_me:14703: checking for $ac_word" >&5
14704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14705 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14706   echo $ECHO_N "(cached) $ECHO_C" >&6
14707 else
14708   if test -n "$gnat_exists"; then
14709   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14710 else
14711   ac_save_IFS=$IFS; IFS=$ac_path_separator
14712 ac_dummy="$PATH"
14713 for ac_dir in $ac_dummy; do
14714   IFS=$ac_save_IFS
14715   test -z "$ac_dir" && ac_dir=.
14716   $as_executable_p "$ac_dir/$ac_word" || continue
14717 ac_cv_prog_gnat_exists="yes"
14718 echo "$as_me:14718: found $ac_dir/$ac_word" >&5
14719 break
14720 done
14721
14722   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14723 fi
14724 fi
14725 gnat_exists=$ac_cv_prog_gnat_exists
14726 if test -n "$gnat_exists"; then
14727   echo "$as_me:14727: result: $gnat_exists" >&5
14728 echo "${ECHO_T}$gnat_exists" >&6
14729 else
14730   echo "$as_me:14730: result: no" >&5
14731 echo "${ECHO_T}no" >&6
14732 fi
14733
14734 if test "$ac_cv_prog_gnat_exists" = no; then
14735    cf_ada_make=
14736 else
14737
14738 echo "$as_me:14738: checking for gnat version" >&5
14739 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14740 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14741   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14742 echo "$as_me:14742: result: $cf_gnat_version" >&5
14743 echo "${ECHO_T}$cf_gnat_version" >&6
14744
14745 case $cf_gnat_version in
14746   3.1[1-9]*|3.[2-9]*|[4-9].*)
14747     cf_cv_prog_gnat_correct=yes
14748     ;;
14749   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14750      cf_cv_prog_gnat_correct=no
14751      ;;
14752 esac
14753 case $cf_gnat_version in
14754   3.[1-9]*|[4-9].*)
14755       cf_compile_generics=generics
14756       cf_generic_objects="\${GENOBJS}"
14757       ;;
14758   *)  cf_compile_generics=
14759       cf_generic_objects=
14760       ;;
14761 esac
14762
14763    # Extract the first word of "m4", so it can be a program name with args.
14764 set dummy m4; ac_word=$2
14765 echo "$as_me:14765: checking for $ac_word" >&5
14766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14767 if test "${ac_cv_prog_M4_exists+set}" = set; then
14768   echo $ECHO_N "(cached) $ECHO_C" >&6
14769 else
14770   if test -n "$M4_exists"; then
14771   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14772 else
14773   ac_save_IFS=$IFS; IFS=$ac_path_separator
14774 ac_dummy="$PATH"
14775 for ac_dir in $ac_dummy; do
14776   IFS=$ac_save_IFS
14777   test -z "$ac_dir" && ac_dir=.
14778   $as_executable_p "$ac_dir/$ac_word" || continue
14779 ac_cv_prog_M4_exists="yes"
14780 echo "$as_me:14780: found $ac_dir/$ac_word" >&5
14781 break
14782 done
14783
14784   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14785 fi
14786 fi
14787 M4_exists=$ac_cv_prog_M4_exists
14788 if test -n "$M4_exists"; then
14789   echo "$as_me:14789: result: $M4_exists" >&5
14790 echo "${ECHO_T}$M4_exists" >&6
14791 else
14792   echo "$as_me:14792: result: no" >&5
14793 echo "${ECHO_T}no" >&6
14794 fi
14795
14796    if test "$ac_cv_prog_M4_exists" = no; then
14797       cf_cv_prog_gnat_correct=no
14798       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14799    fi
14800    if test "$cf_cv_prog_gnat_correct" = yes; then
14801       echo "$as_me:14801: checking if GNAT works" >&5
14802 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14803
14804 rm -f conftest*
14805 cat >>conftest.ads <<CF_EOF
14806 procedure conftest;
14807 CF_EOF
14808 cat >>conftest.adb <<CF_EOF
14809 with Text_IO;
14810 with GNAT.OS_Lib;
14811 procedure conftest is
14812 begin
14813    Text_IO.Put ("Hello World");
14814    Text_IO.New_Line;
14815    GNAT.OS_Lib.OS_Exit (0);
14816 end conftest;
14817 CF_EOF
14818 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14819    if ( ./conftest 1>&5 2>&1 ) ; then
14820       cf_cv_prog_gnat_correct=yes
14821    else
14822       cf_cv_prog_gnat_correct=no
14823    fi
14824 else
14825    cf_cv_prog_gnat_correct=no
14826 fi
14827 rm -f conftest*
14828
14829       echo "$as_me:14829: result: $cf_cv_prog_gnat_correct" >&5
14830 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14831    fi
14832 fi
14833 if test "$cf_cv_prog_gnat_correct" = yes; then
14834    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14835
14836    echo "$as_me:14836: checking if GNAT pragma Unreferenced works" >&5
14837 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14838
14839 rm -f conftest*
14840 cat >>conftest.ads <<CF_EOF
14841 procedure conftest;
14842 CF_EOF
14843 cat >>conftest.adb <<CF_EOF
14844 with Text_IO;
14845 with GNAT.OS_Lib;
14846 procedure conftest is
14847    test : Integer;
14848    pragma Unreferenced (test);
14849 begin
14850    test := 1;
14851    Text_IO.Put ("Hello World");
14852    Text_IO.New_Line;
14853    GNAT.OS_Lib.OS_Exit (0);
14854 end conftest;
14855 CF_EOF
14856 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14857       cf_cv_pragma_unreferenced=yes
14858 else
14859    cf_cv_pragma_unreferenced=no
14860 fi
14861 rm -f conftest*
14862
14863    echo "$as_me:14863: result: $cf_cv_pragma_unreferenced" >&5
14864 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14865
14866    # if the pragma is supported, use it (needed in the Trace code).
14867    if test $cf_cv_pragma_unreferenced = yes ; then
14868       PRAGMA_UNREF=TRUE
14869    else
14870       PRAGMA_UNREF=FALSE
14871    fi
14872
14873 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14874 if test "${with_ada_compiler+set}" = set; then
14875   withval="$with_ada_compiler"
14876   cf_ada_compiler=$withval
14877 else
14878   cf_ada_compiler=gnatmake
14879 fi;
14880
14881    cf_ada_package=terminal_interface
14882
14883 # Check whether --with-ada-include or --without-ada-include was given.
14884 if test "${with_ada_include+set}" = set; then
14885   withval="$with_ada_include"
14886
14887 else
14888   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14889 fi;
14890 if test "x$prefix" != xNONE; then
14891   cf_path_syntax="$prefix"
14892 else
14893   cf_path_syntax="$ac_default_prefix"
14894 fi
14895
14896 case ".$withval" in #(vi
14897 .\$\(*\)*|.\'*\'*) #(vi
14898   ;;
14899 ..|./*|.\\*) #(vi
14900   ;;
14901 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14902   ;;
14903 .\${*prefix}*) #(vi
14904   eval withval="$withval"
14905   case ".$withval" in #(vi
14906   .NONE/*)
14907     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14908     ;;
14909   esac
14910   ;; #(vi
14911 .no|.NONE/*)
14912   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14913   ;;
14914 *)
14915   { { echo "$as_me:14915: error: expected a pathname, not \"$withval\"" >&5
14916 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14917    { (exit 1); exit 1; }; }
14918   ;;
14919 esac
14920
14921 ADA_INCLUDE="$withval"
14922
14923 # Check whether --with-ada-objects or --without-ada-objects was given.
14924 if test "${with_ada_objects+set}" = set; then
14925   withval="$with_ada_objects"
14926
14927 else
14928   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14929 fi;
14930 if test "x$prefix" != xNONE; then
14931   cf_path_syntax="$prefix"
14932 else
14933   cf_path_syntax="$ac_default_prefix"
14934 fi
14935
14936 case ".$withval" in #(vi
14937 .\$\(*\)*|.\'*\'*) #(vi
14938   ;;
14939 ..|./*|.\\*) #(vi
14940   ;;
14941 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14942   ;;
14943 .\${*prefix}*) #(vi
14944   eval withval="$withval"
14945   case ".$withval" in #(vi
14946   .NONE/*)
14947     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14948     ;;
14949   esac
14950   ;; #(vi
14951 .no|.NONE/*)
14952   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14953   ;;
14954 *)
14955   { { echo "$as_me:14955: error: expected a pathname, not \"$withval\"" >&5
14956 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14957    { (exit 1); exit 1; }; }
14958   ;;
14959 esac
14960
14961 ADA_OBJECTS="$withval"
14962
14963 fi
14964 fi
14965 else
14966    cf_with_ada=no
14967 fi
14968
14969 ### Construct the ncurses library-subsets, if any, from this set of keywords:
14970 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
14971 ###
14972 ### ticlib modules may be a separate library, otherwise contained in termlib.
14973 ### termlib modules may be a separate library, otherwise contained in ncurses.
14974 ###
14975 ### The of "+" or " " between the tokens controls the way the script
14976 ### chooses to split module lists into libraries.
14977 ###
14978 ### (see CF_LIB_RULES).
14979 echo "$as_me:14979: checking for library subsets" >&5
14980 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14981 LIB_SUBSETS=
14982
14983 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
14984         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
14985         if test "$with_ticlib" != no ; then
14986                 LIB_SUBSETS="${LIB_SUBSETS} "
14987         else
14988                 LIB_SUBSETS="${LIB_SUBSETS}+"
14989         fi
14990 fi
14991
14992 LIB_SUBSETS="${LIB_SUBSETS}termlib"
14993 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14994 if test "$with_termlib" != no ; then
14995         LIB_SUBSETS="${LIB_SUBSETS} "
14996 else
14997         LIB_SUBSETS="${LIB_SUBSETS}+"
14998 fi
14999
15000 LIB_SUBSETS="${LIB_SUBSETS}base"
15001 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15002 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15003
15004 echo "$as_me:15004: result: $LIB_SUBSETS" >&5
15005 echo "${ECHO_T}$LIB_SUBSETS" >&6
15006
15007 ### Construct the list of include-directories to be generated
15008
15009 CPPFLAGS="-I. -I../include $CPPFLAGS"
15010 if test "$srcdir" != "."; then
15011         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15012 fi
15013 if test "$GCC" != yes; then
15014         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15015 elif test "$includedir" != "/usr/include"; then
15016         if test "$includedir" = '${prefix}/include' ; then
15017                 if test $prefix != /usr ; then
15018                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15019                 fi
15020         else
15021                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15022         fi
15023 fi
15024
15025 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15026 if test "$srcdir" != "."; then
15027         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15028 fi
15029 if test "$GCC" != yes; then
15030         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15031 elif test "$includedir" != "/usr/include"; then
15032         if test "$includedir" = '${prefix}/include' ; then
15033                 if test $prefix != /usr ; then
15034                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15035                 fi
15036         else
15037                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15038         fi
15039 fi
15040
15041 ### Build up pieces for makefile rules
15042 echo "$as_me:15042: checking default library suffix" >&5
15043 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15044
15045         case $DFT_LWR_MODEL in
15046         libtool) DFT_ARG_SUFFIX=''   ;;
15047         normal)  DFT_ARG_SUFFIX=''   ;;
15048         debug)   DFT_ARG_SUFFIX='_g' ;;
15049         profile) DFT_ARG_SUFFIX='_p' ;;
15050         shared)  DFT_ARG_SUFFIX=''   ;;
15051         esac
15052         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15053 echo "$as_me:15053: result: $DFT_ARG_SUFFIX" >&5
15054 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15055
15056 echo "$as_me:15056: checking default library-dependency suffix" >&5
15057 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15058
15059         case $DFT_LWR_MODEL in
15060         libtool) DFT_DEP_SUFFIX='.la'  ;;
15061         normal)  DFT_DEP_SUFFIX='.a'   ;;
15062         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15063         profile) DFT_DEP_SUFFIX='_p.a' ;;
15064         shared)
15065                 case $cf_cv_system_name in
15066                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15067                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15068                 hpux*)
15069                         case $target in
15070                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15071                         *)      DFT_DEP_SUFFIX='.sl' ;;
15072                         esac
15073                         ;;
15074                 *)      DFT_DEP_SUFFIX='.so'  ;;
15075                 esac
15076         esac
15077         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15078 if test $DFT_LWR_MODEL = shared ; then
15079         case $cf_cv_system_name in #(vi
15080         cygwin*)
15081                 DFT_DEP_SUFFIX=".dll.a"
15082                 ;;
15083         esac
15084 fi
15085 echo "$as_me:15085: result: $DFT_DEP_SUFFIX" >&5
15086 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15087
15088 echo "$as_me:15088: checking default object directory" >&5
15089 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15090
15091         case $DFT_LWR_MODEL in
15092         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15093         normal)  DFT_OBJ_SUBDIR='objects' ;;
15094         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15095         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15096         shared)
15097                 case $cf_cv_system_name in #(vi
15098                 cygwin) #(vi
15099                         DFT_OBJ_SUBDIR='objects' ;;
15100                 *)
15101                         DFT_OBJ_SUBDIR='obj_s' ;;
15102                 esac
15103         esac
15104 echo "$as_me:15104: result: $DFT_OBJ_SUBDIR" >&5
15105 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15106
15107 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15108 if test "$cf_with_cxx" = yes ; then
15109 echo "$as_me:15109: checking c++ library-dependency suffix" >&5
15110 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15111 if test "$with_libtool" != "no"; then
15112         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15113 else
15114
15115         case normal in
15116         libtool) CXX_LIB_SUFFIX='.la'  ;;
15117         normal)  CXX_LIB_SUFFIX='.a'   ;;
15118         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15119         profile) CXX_LIB_SUFFIX='_p.a' ;;
15120         shared)
15121                 case $cf_cv_system_name in
15122                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15123                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15124                 hpux*)
15125                         case $target in
15126                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15127                         *)      CXX_LIB_SUFFIX='.sl' ;;
15128                         esac
15129                         ;;
15130                 *)      CXX_LIB_SUFFIX='.so'  ;;
15131                 esac
15132         esac
15133         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15134 fi
15135 echo "$as_me:15135: result: $CXX_LIB_SUFFIX" >&5
15136 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15137
15138 fi
15139
15140 # do not want -ldl in build except as needed for -lncurses dependency
15141 if test "$with_dlsym" = yes ; then
15142 if test $DFT_LWR_MODEL = shared || \
15143    test $DFT_LWR_MODEL = libtool ; then
15144
15145 # remove dl library from $LIBS
15146 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15147
15148 fi
15149 fi
15150 ### Set up low-level terminfo dependencies for makefiles.
15151
15152 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15153 # do not need libdl
15154 TICS_LIST=
15155 if test "$with_dlsym" = yes ; then
15156
15157 # remove dl library from $SHLIB_LIST
15158 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15159
15160 fi
15161
15162 if test "$with_ticlib" != no ; then
15163
15164         if test "$with_ticlib" != yes ; then
15165                 TICS_NAME=$with_ticlib
15166                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15167                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15168                 TICS_LIB_SUFFIX="${with_ticlib}"
15169         else
15170                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15171                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15172                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15173         fi
15174         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15175 else
15176         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15177 fi
15178
15179 if test "$with_termlib" != no ; then
15180
15181         if test "$with_termlib" != yes ; then
15182                 TINFO_NAME=$with_termlib
15183                 TINFO_SUFFIX="`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15184                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15185                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15186                 TINFO_LIB_SUFFIX="${with_termlib}"
15187         else
15188                 TINFO_SUFFIX=${DFT_DEP_SUFFIX}
15189                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15190                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15191                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15192         fi
15193
15194         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15195         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15196         if test "$DFT_LWR_MODEL" = "libtool"; then
15197                 TEST_ARGS="${TEST_DEPS}"
15198                 TEST_ARG2="${TEST_DEP2}"
15199                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15200         else
15201                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15202                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15203                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15204                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15205                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15206         fi
15207 else
15208         # the next lines are needed for linking libtic over libncurses
15209         TINFO_NAME=${LIB_NAME}
15210         TINFO_SUFFIX=${DFT_DEP_SUFFIX}
15211         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15212         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15213
15214         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15215 fi
15216
15217 if test "$with_dlsym" = yes ; then
15218
15219 # remove dl library from $TICS_LIST
15220 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15221
15222 fi
15223
15224 # needed for Ada95
15225 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15226
15227 echo "$as_me:15227: checking where we will install curses.h" >&5
15228 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15229 test "$with_overwrite" = no && \
15230 test "x$includedir" = 'x${prefix}/include' && \
15231         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15232 echo "$as_me:15232: result: $includedir" >&5
15233 echo "${ECHO_T}$includedir" >&6
15234
15235 ### Resolve a conflict between normal and wide-curses by forcing applications
15236 ### that will need libutf8 to add it to their configure script.
15237 if test "$with_overwrite" != no ; then
15238 if test "$NCURSES_LIBUTF8" = 1 ; then
15239         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15240         { echo "$as_me:15240: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15241 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15242 fi
15243 fi
15244
15245 # used to separate tack out of the tree
15246 NCURSES_TREE=
15247
15248 ### predefined stuff for the test programs
15249 cat >>confdefs.h <<\EOF
15250 #define HAVE_SLK_COLOR 1
15251 EOF
15252
15253 ### Construct the list of subdirectories for which we'll customize makefiles
15254 ### with the appropriate compile-rules.
15255
15256 echo "$as_me:15256: checking for src modules" >&5
15257 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15258
15259 # dependencies and linker-arguments for test-programs
15260 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15261 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15262 if test "$DFT_LWR_MODEL" = "libtool"; then
15263         TEST_ARGS="${TEST_DEPS}"
15264         TEST_ARG2="${TEST_DEP2}"
15265 else
15266         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15267         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15268 fi
15269
15270 cf_cv_src_modules=
15271 for cf_dir in $modules_to_build
15272 do
15273         if test -f $srcdir/$cf_dir/modules; then
15274
15275                 # We may/may not have tack in the distribution, though the
15276                 # makefile is.
15277                 if test $cf_dir = tack ; then
15278                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15279                                 continue
15280                         fi
15281                 fi
15282
15283                 if test -z "$cf_cv_src_modules"; then
15284                         cf_cv_src_modules=$cf_dir
15285                 else
15286                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15287                 fi
15288
15289                 # Make the ncurses_cfg.h file record the library interface files as
15290                 # well.  These are header files that are the same name as their
15291                 # directory.  Ncurses is the only library that does not follow
15292                 # that pattern.
15293                 if test $cf_dir = tack ; then
15294                         continue
15295                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15296
15297 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15298
15299                         cat >>confdefs.h <<EOF
15300 #define HAVE_${cf_have_include}_H 1
15301 EOF
15302
15303                         cat >>confdefs.h <<EOF
15304 #define HAVE_LIB${cf_have_include} 1
15305 EOF
15306
15307                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15308                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15309                         if test "$DFT_LWR_MODEL" = "libtool"; then
15310                                 TEST_ARGS="${TEST_DEPS}"
15311                                 TEST_ARG2="${TEST_DEP2}"
15312                         else
15313                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15314                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15315                         fi
15316                 fi
15317         fi
15318 done
15319 echo "$as_me:15319: result: $cf_cv_src_modules" >&5
15320 echo "${ECHO_T}$cf_cv_src_modules" >&6
15321
15322 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15323 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15324
15325 SRC_SUBDIRS="man include"
15326 for cf_dir in $cf_cv_src_modules
15327 do
15328         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15329 done
15330 SRC_SUBDIRS="$SRC_SUBDIRS test"
15331 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15332 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15333
15334 ADA_SUBDIRS=
15335 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15336    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15337    ADA_SUBDIRS="gen src samples"
15338 fi
15339
15340 SUB_MAKEFILES=
15341 for cf_dir in $SRC_SUBDIRS
15342 do
15343         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15344 done
15345
15346 if test -n "$ADA_SUBDIRS"; then
15347    for cf_dir in $ADA_SUBDIRS
15348    do
15349       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15350    done
15351
15352 fi
15353
15354 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15355    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15356 fi
15357
15358 DIRS_TO_MAKE="lib"
15359 for cf_item in $cf_list_models
15360 do
15361
15362         case $cf_item in
15363         libtool) cf_subdir='obj_lo'  ;;
15364         normal)  cf_subdir='objects' ;;
15365         debug)   cf_subdir='obj_g' ;;
15366         profile) cf_subdir='obj_p' ;;
15367         shared)
15368                 case $cf_cv_system_name in #(vi
15369                 cygwin) #(vi
15370                         cf_subdir='objects' ;;
15371                 *)
15372                         cf_subdir='obj_s' ;;
15373                 esac
15374         esac
15375
15376         for cf_item2 in $DIRS_TO_MAKE
15377         do
15378                 test $cf_item2 = $cf_subdir && break
15379         done
15380         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15381 done
15382 for cf_dir in $DIRS_TO_MAKE
15383 do
15384         test ! -d $cf_dir && mkdir $cf_dir
15385 done
15386
15387 cat >>confdefs.h <<EOF
15388 #define NCURSES_PATHSEP '$PATHSEP'
15389 EOF
15390
15391 cat >>confdefs.h <<EOF
15392 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15393 EOF
15394
15395 ### Now that we're done running tests, add the compiler-warnings, if any
15396
15397 cf_fix_cppflags=no
15398 cf_new_cflags=
15399 cf_new_cppflags=
15400 cf_new_extra_cppflags=
15401
15402 for cf_add_cflags in $EXTRA_CFLAGS
15403 do
15404 case $cf_fix_cppflags in
15405 no)
15406         case $cf_add_cflags in #(vi
15407         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15408                 case $cf_add_cflags in
15409                 -D*)
15410                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15411
15412                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15413                         && test -z "${cf_tst_cflags}" \
15414                         && cf_fix_cppflags=yes
15415
15416                         if test $cf_fix_cppflags = yes ; then
15417                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15418                                 continue
15419                         elif test "${cf_tst_cflags}" = "\"'" ; then
15420                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15421                                 continue
15422                         fi
15423                         ;;
15424                 esac
15425                 case "$CPPFLAGS" in
15426                 *$cf_add_cflags) #(vi
15427                         ;;
15428                 *) #(vi
15429                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15430                         ;;
15431                 esac
15432                 ;;
15433         *)
15434                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15435                 ;;
15436         esac
15437         ;;
15438 yes)
15439         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15440
15441         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15442
15443         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15444         && test -z "${cf_tst_cflags}" \
15445         && cf_fix_cppflags=no
15446         ;;
15447 esac
15448 done
15449
15450 if test -n "$cf_new_cflags" ; then
15451
15452         CFLAGS="$CFLAGS $cf_new_cflags"
15453 fi
15454
15455 if test -n "$cf_new_cppflags" ; then
15456
15457         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15458 fi
15459
15460 if test -n "$cf_new_extra_cppflags" ; then
15461
15462         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15463 fi
15464
15465 ### Define substitutions for header files to avoid name-pollution
15466
15467 if test "$cf_cv_have_tcgetattr" = yes ; then
15468         HAVE_TCGETATTR=1
15469 else
15470         HAVE_TCGETATTR=0
15471 fi
15472
15473 if test "$ac_cv_header_termio_h" = yes ; then
15474         HAVE_TERMIO_H=1
15475 else
15476         HAVE_TERMIO_H=0
15477 fi
15478
15479 if test "$ac_cv_header_termios_h" = yes ; then
15480         HAVE_TERMIOS_H=1
15481 else
15482         HAVE_TERMIOS_H=0
15483 fi
15484
15485 ################################################################################
15486 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15487 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15488 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"
15489 ac_config_commands="$ac_config_commands default"
15490 cat >confcache <<\_ACEOF
15491 # This file is a shell script that caches the results of configure
15492 # tests run on this system so they can be shared between configure
15493 # scripts and configure runs, see configure's option --config-cache.
15494 # It is not useful on other systems.  If it contains results you don't
15495 # want to keep, you may remove or edit it.
15496 #
15497 # config.status only pays attention to the cache file if you give it
15498 # the --recheck option to rerun configure.
15499 #
15500 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15501 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15502 # following values.
15503
15504 _ACEOF
15505
15506 # The following way of writing the cache mishandles newlines in values,
15507 # but we know of no workaround that is simple, portable, and efficient.
15508 # So, don't put newlines in cache variables' values.
15509 # Ultrix sh set writes to stderr and can't be redirected directly,
15510 # and sets the high bit in the cache file unless we assign to the vars.
15511 {
15512   (set) 2>&1 |
15513     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15514     *ac_space=\ *)
15515       # `set' does not quote correctly, so add quotes (double-quote
15516       # substitution turns \\\\ into \\, and sed turns \\ into \).
15517       sed -n \
15518         "s/'/'\\\\''/g;
15519           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15520       ;;
15521     *)
15522       # `set' quotes correctly as required by POSIX, so do not add quotes.
15523       sed -n \
15524         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15525       ;;
15526     esac;
15527 } |
15528   sed '
15529      t clear
15530      : clear
15531      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15532      t end
15533      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15534      : end' >>confcache
15535 if cmp -s $cache_file confcache; then :; else
15536   if test -w $cache_file; then
15537     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15538     cat confcache >$cache_file
15539   else
15540     echo "not updating unwritable cache $cache_file"
15541   fi
15542 fi
15543 rm -f confcache
15544
15545 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15546 # Let make expand exec_prefix.
15547 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15548
15549 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15550 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15551 # trailing colons and then remove the whole line if VPATH becomes empty
15552 # (actually we leave an empty line to preserve line numbers).
15553 if test "x$srcdir" = x.; then
15554   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15555 s/:*\$(srcdir):*/:/;
15556 s/:*\${srcdir}:*/:/;
15557 s/:*@srcdir@:*/:/;
15558 s/^\([^=]*=[    ]*\):*/\1/;
15559 s/:*$//;
15560 s/^[^=]*=[      ]*$//;
15561 }'
15562 fi
15563
15564 DEFS=-DHAVE_CONFIG_H
15565
15566 : ${CONFIG_STATUS=./config.status}
15567 ac_clean_files_save=$ac_clean_files
15568 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15569 { echo "$as_me:15569: creating $CONFIG_STATUS" >&5
15570 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15571 cat >$CONFIG_STATUS <<_ACEOF
15572 #! $SHELL
15573 # Generated automatically by configure.
15574 # Run this file to recreate the current configuration.
15575 # Compiler output produced by configure, useful for debugging
15576 # configure, is in config.log if it exists.
15577
15578 debug=false
15579 SHELL=\${CONFIG_SHELL-$SHELL}
15580 ac_cs_invocation="\$0 \$@"
15581
15582 _ACEOF
15583
15584 cat >>$CONFIG_STATUS <<\_ACEOF
15585 # Be Bourne compatible
15586 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15587   emulate sh
15588   NULLCMD=:
15589 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15590   set -o posix
15591 fi
15592
15593 # Name of the executable.
15594 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15595
15596 if expr a : '\(a\)' >/dev/null 2>&1; then
15597   as_expr=expr
15598 else
15599   as_expr=false
15600 fi
15601
15602 rm -f conf$$ conf$$.exe conf$$.file
15603 echo >conf$$.file
15604 if ln -s conf$$.file conf$$ 2>/dev/null; then
15605   # We could just check for DJGPP; but this test a) works b) is more generic
15606   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15607   if test -f conf$$.exe; then
15608     # Don't use ln at all; we don't have any links
15609     as_ln_s='cp -p'
15610   else
15611     as_ln_s='ln -s'
15612   fi
15613 elif ln conf$$.file conf$$ 2>/dev/null; then
15614   as_ln_s=ln
15615 else
15616   as_ln_s='cp -p'
15617 fi
15618 rm -f conf$$ conf$$.exe conf$$.file
15619
15620 as_executable_p="test -f"
15621
15622 # Support unset when possible.
15623 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15624   as_unset=unset
15625 else
15626   as_unset=false
15627 fi
15628
15629 # NLS nuisances.
15630 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15631 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15632 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15633 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15634 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15635 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15636 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15637 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15638
15639 # IFS
15640 # We need space, tab and new line, in precisely that order.
15641 as_nl='
15642 '
15643 IFS="   $as_nl"
15644
15645 # CDPATH.
15646 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15647
15648 exec 6>&1
15649
15650 _ACEOF
15651
15652 # Files that config.status was made for.
15653 if test -n "$ac_config_files"; then
15654   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15655 fi
15656
15657 if test -n "$ac_config_headers"; then
15658   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15659 fi
15660
15661 if test -n "$ac_config_links"; then
15662   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15663 fi
15664
15665 if test -n "$ac_config_commands"; then
15666   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15667 fi
15668
15669 cat >>$CONFIG_STATUS <<\EOF
15670
15671 ac_cs_usage="\
15672 \`$as_me' instantiates files from templates according to the
15673 current configuration.
15674
15675 Usage: $0 [OPTIONS] [FILE]...
15676
15677   -h, --help       print this help, then exit
15678   -V, --version    print version number, then exit
15679   -d, --debug      don't remove temporary files
15680       --recheck    update $as_me by reconfiguring in the same conditions
15681   --file=FILE[:TEMPLATE]
15682                    instantiate the configuration file FILE
15683   --header=FILE[:TEMPLATE]
15684                    instantiate the configuration header FILE
15685
15686 Configuration files:
15687 $config_files
15688
15689 Configuration headers:
15690 $config_headers
15691
15692 Configuration commands:
15693 $config_commands
15694
15695 Report bugs to <bug-autoconf@gnu.org>."
15696 EOF
15697
15698 cat >>$CONFIG_STATUS <<EOF
15699 ac_cs_version="\\
15700 config.status
15701 configured by $0, generated by GNU Autoconf 2.52.20061216,
15702   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15703
15704 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15705 Free Software Foundation, Inc.
15706 This config.status script is free software; the Free Software Foundation
15707 gives unlimited permission to copy, distribute and modify it."
15708 srcdir=$srcdir
15709 INSTALL="$INSTALL"
15710 EOF
15711
15712 cat >>$CONFIG_STATUS <<\EOF
15713 # If no file are specified by the user, then we need to provide default
15714 # value.  By we need to know if files were specified by the user.
15715 ac_need_defaults=:
15716 while test $# != 0
15717 do
15718   case $1 in
15719   --*=*)
15720     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15721     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15722     shift
15723     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15724     shift
15725     ;;
15726   -*);;
15727   *) # This is not an option, so the user has probably given explicit
15728      # arguments.
15729      ac_need_defaults=false;;
15730   esac
15731
15732   case $1 in
15733   # Handling of the options.
15734 EOF
15735 cat >>$CONFIG_STATUS <<EOF
15736   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15737     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15738     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15739 EOF
15740 cat >>$CONFIG_STATUS <<\EOF
15741   --version | --vers* | -V )
15742     echo "$ac_cs_version"; exit 0 ;;
15743   --he | --h)
15744     # Conflict between --help and --header
15745     { { echo "$as_me:15745: error: ambiguous option: $1
15746 Try \`$0 --help' for more information." >&5
15747 echo "$as_me: error: ambiguous option: $1
15748 Try \`$0 --help' for more information." >&2;}
15749    { (exit 1); exit 1; }; };;
15750   --help | --hel | -h )
15751     echo "$ac_cs_usage"; exit 0 ;;
15752   --debug | --d* | -d )
15753     debug=: ;;
15754   --file | --fil | --fi | --f )
15755     shift
15756     CONFIG_FILES="$CONFIG_FILES $1"
15757     ac_need_defaults=false;;
15758   --header | --heade | --head | --hea )
15759     shift
15760     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15761     ac_need_defaults=false;;
15762
15763   # This is an error.
15764   -*) { { echo "$as_me:15764: error: unrecognized option: $1
15765 Try \`$0 --help' for more information." >&5
15766 echo "$as_me: error: unrecognized option: $1
15767 Try \`$0 --help' for more information." >&2;}
15768    { (exit 1); exit 1; }; } ;;
15769
15770   *) ac_config_targets="$ac_config_targets $1" ;;
15771
15772   esac
15773   shift
15774 done
15775
15776 exec 5>>config.log
15777 cat >&5 << _ACEOF
15778
15779 ## ----------------------- ##
15780 ## Running config.status.  ##
15781 ## ----------------------- ##
15782
15783 This file was extended by $as_me 2.52.20061216, executed with
15784   CONFIG_FILES    = $CONFIG_FILES
15785   CONFIG_HEADERS  = $CONFIG_HEADERS
15786   CONFIG_LINKS    = $CONFIG_LINKS
15787   CONFIG_COMMANDS = $CONFIG_COMMANDS
15788   > $ac_cs_invocation
15789 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15790
15791 _ACEOF
15792 EOF
15793
15794 cat >>$CONFIG_STATUS <<EOF
15795 #
15796 # INIT-COMMANDS section.
15797 #
15798
15799 ### Special initialization commands, used to pass information from the
15800 ### configuration-run into config.status
15801
15802 AWK="$AWK"
15803 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15804 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15805 ECHO_LINK="$ECHO_LINK"
15806 LDCONFIG="$LDCONFIG"
15807 LIB_NAME="$LIB_NAME"
15808 LIB_SUBSETS="$LIB_SUBSETS"
15809 LIB_SUFFIX="$LIB_SUFFIX"
15810 LIB_TRACING="$LIB_TRACING"
15811 MAKE_TERMINFO="$MAKE_TERMINFO"
15812 NCURSES_MAJOR="$NCURSES_MAJOR"
15813 NCURSES_MINOR="$NCURSES_MINOR"
15814 NCURSES_OSPEED="$NCURSES_OSPEED"
15815 NCURSES_PATCH="$NCURSES_PATCH"
15816 SRC_SUBDIRS="$SRC_SUBDIRS"
15817 TERMINFO="$TERMINFO"
15818 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15819 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15820 TINFO_NAME="$TINFO_NAME"
15821 TINFO_SUFFIX="$TINFO_SUFFIX"
15822 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
15823 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
15824 TICS_NAME="$TICS_NAME"
15825 WITH_CURSES_H="$with_curses_h"
15826 WITH_ECHO="$with_echo"
15827 WITH_OVERWRITE="$with_overwrite"
15828 cf_LIST_MODELS="$cf_list_models"
15829 cf_cv_abi_version="$cf_cv_abi_version"
15830 cf_cv_do_relink="$cf_cv_do_relink"
15831 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15832 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15833 cf_cv_enable_opaque="$cf_cv_enable_opaque"
15834 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15835 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15836 cf_cv_rel_version="$cf_cv_rel_version"
15837 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15838 cf_cv_shlib_version="$cf_cv_shlib_version"
15839 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15840 cf_cv_system_name="$cf_cv_system_name"
15841 cf_with_cxx_binding="$cf_with_cxx_binding"
15842 host="$host"
15843 target="$target"
15844
15845 EOF
15846
15847 cat >>$CONFIG_STATUS <<\EOF
15848 for ac_config_target in $ac_config_targets
15849 do
15850   case "$ac_config_target" in
15851   # Handling of arguments.
15852   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15853   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15854   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15855   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15856   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15857   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15858   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15859   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15860   *) { { echo "$as_me:15860: error: invalid argument: $ac_config_target" >&5
15861 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15862    { (exit 1); exit 1; }; };;
15863   esac
15864 done
15865
15866 # If the user did not use the arguments to specify the items to instantiate,
15867 # then the envvar interface is used.  Set only those that are not.
15868 # We use the long form for the default assignment because of an extremely
15869 # bizarre bug on SunOS 4.1.3.
15870 if $ac_need_defaults; then
15871   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15872   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15873   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15874 fi
15875
15876 # Create a temporary directory, and hook for its removal unless debugging.
15877 $debug ||
15878 {
15879   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15880   trap '{ (exit 1); exit 1; }' 1 2 13 15
15881 }
15882
15883 # Create a (secure) tmp directory for tmp files.
15884 : ${TMPDIR=/tmp}
15885 {
15886   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15887   test -n "$tmp" && test -d "$tmp"
15888 }  ||
15889 {
15890   tmp=$TMPDIR/cs$$-$RANDOM
15891   (umask 077 && mkdir $tmp)
15892 } ||
15893 {
15894    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15895    { (exit 1); exit 1; }
15896 }
15897
15898 EOF
15899
15900 cat >>$CONFIG_STATUS <<EOF
15901
15902 #
15903 # CONFIG_FILES section.
15904 #
15905
15906 # No need to generate the scripts if there are no CONFIG_FILES.
15907 # This happens for instance when ./config.status config.h
15908 if test -n "\$CONFIG_FILES"; then
15909   # Protect against being on the right side of a sed subst in config.status.
15910   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15911    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15912 s,@SHELL@,$SHELL,;t t
15913 s,@exec_prefix@,$exec_prefix,;t t
15914 s,@prefix@,$prefix,;t t
15915 s,@program_transform_name@,$program_transform_name,;t t
15916 s,@bindir@,$bindir,;t t
15917 s,@sbindir@,$sbindir,;t t
15918 s,@libexecdir@,$libexecdir,;t t
15919 s,@datadir@,$datadir,;t t
15920 s,@sysconfdir@,$sysconfdir,;t t
15921 s,@sharedstatedir@,$sharedstatedir,;t t
15922 s,@localstatedir@,$localstatedir,;t t
15923 s,@libdir@,$libdir,;t t
15924 s,@includedir@,$includedir,;t t
15925 s,@oldincludedir@,$oldincludedir,;t t
15926 s,@infodir@,$infodir,;t t
15927 s,@mandir@,$mandir,;t t
15928 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15929 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15930 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15931 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15932 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15933 s,@build_alias@,$build_alias,;t t
15934 s,@host_alias@,$host_alias,;t t
15935 s,@target_alias@,$target_alias,;t t
15936 s,@ECHO_C@,$ECHO_C,;t t
15937 s,@ECHO_N@,$ECHO_N,;t t
15938 s,@ECHO_T@,$ECHO_T,;t t
15939 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15940 s,@DEFS@,$DEFS,;t t
15941 s,@LIBS@,$LIBS,;t t
15942 s,@top_builddir@,$top_builddir,;t t
15943 s,@EGREP@,$EGREP,;t t
15944 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15945 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15946 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15947 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15948 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15949 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15950 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15951 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15952 s,@build@,$build,;t t
15953 s,@build_cpu@,$build_cpu,;t t
15954 s,@build_vendor@,$build_vendor,;t t
15955 s,@build_os@,$build_os,;t t
15956 s,@host@,$host,;t t
15957 s,@host_cpu@,$host_cpu,;t t
15958 s,@host_vendor@,$host_vendor,;t t
15959 s,@host_os@,$host_os,;t t
15960 s,@target@,$target,;t t
15961 s,@target_cpu@,$target_cpu,;t t
15962 s,@target_vendor@,$target_vendor,;t t
15963 s,@target_os@,$target_os,;t t
15964 s,@CC@,$CC,;t t
15965 s,@CFLAGS@,$CFLAGS,;t t
15966 s,@LDFLAGS@,$LDFLAGS,;t t
15967 s,@CPPFLAGS@,$CPPFLAGS,;t t
15968 s,@ac_ct_CC@,$ac_ct_CC,;t t
15969 s,@EXEEXT@,$EXEEXT,;t t
15970 s,@OBJEXT@,$OBJEXT,;t t
15971 s,@CPP@,$CPP,;t t
15972 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15973 s,@PROG_EXT@,$PROG_EXT,;t t
15974 s,@LDCONFIG@,$LDCONFIG,;t t
15975 s,@CXX@,$CXX,;t t
15976 s,@CXXFLAGS@,$CXXFLAGS,;t t
15977 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15978 s,@AWK@,$AWK,;t t
15979 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15980 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15981 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15982 s,@LINT@,$LINT,;t t
15983 s,@LINT_OPTS@,$LINT_OPTS,;t t
15984 s,@LN_S@,$LN_S,;t t
15985 s,@SET_MAKE@,$SET_MAKE,;t t
15986 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15987 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15988 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15989 s,@RANLIB@,$RANLIB,;t t
15990 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15991 s,@LD@,$LD,;t t
15992 s,@ac_ct_LD@,$ac_ct_LD,;t t
15993 s,@AR@,$AR,;t t
15994 s,@ac_ct_AR@,$ac_ct_AR,;t t
15995 s,@AR_OPTS@,$AR_OPTS,;t t
15996 s,@DESTDIR@,$DESTDIR,;t t
15997 s,@BUILD_CC@,$BUILD_CC,;t t
15998 s,@BUILD_CPP@,$BUILD_CPP,;t t
15999 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16000 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16001 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16002 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16003 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16004 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16005 s,@cf_list_models@,$cf_list_models,;t t
16006 s,@LIBTOOL@,$LIBTOOL,;t t
16007 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16008 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16009 s,@LIB_CREATE@,$LIB_CREATE,;t t
16010 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16011 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16012 s,@LIB_PREP@,$LIB_PREP,;t t
16013 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16014 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16015 s,@LIB_LINK@,$LIB_LINK,;t t
16016 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16017 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16018 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16019 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16020 s,@TICS_NAME@,$TICS_NAME,;t t
16021 s,@TINFO_NAME@,$TINFO_NAME,;t t
16022 s,@LIB_NAME@,$LIB_NAME,;t t
16023 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16024 s,@CC_G_OPT@,$CC_G_OPT,;t t
16025 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16026 s,@LD_MODEL@,$LD_MODEL,;t t
16027 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16028 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16029 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16030 s,@LINK_PROGS@,$LINK_PROGS,;t t
16031 s,@LINK_TESTS@,$LINK_TESTS,;t t
16032 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16033 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16034 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16035 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16036 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16037 s,@PATHSEP@,$PATHSEP,;t t
16038 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16039 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16040 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16041 s,@TERMINFO@,$TERMINFO,;t t
16042 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16043 s,@TERMPATH@,$TERMPATH,;t t
16044 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16045 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16046 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16047 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16048 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16049 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16050 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16051 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16052 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16053 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16054 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16055 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16056 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16057 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16058 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16059 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16060 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16061 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16062 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16063 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16064 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16065 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16066 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16067 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16068 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16069 s,@ECHO_LINK@,$ECHO_LINK,;t t
16070 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16071 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16072 s,@ADA_TRACE@,$ADA_TRACE,;t t
16073 s,@MATH_LIB@,$MATH_LIB,;t t
16074 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16075 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16076 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16077 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16078 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16079 s,@CXXCPP@,$CXXCPP,;t t
16080 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16081 s,@CXX_AR@,$CXX_AR,;t t
16082 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16083 s,@CXXLIBS@,$CXXLIBS,;t t
16084 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16085 s,@gnat_exists@,$gnat_exists,;t t
16086 s,@M4_exists@,$M4_exists,;t t
16087 s,@cf_ada_make@,$cf_ada_make,;t t
16088 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16089 s,@cf_ada_package@,$cf_ada_package,;t t
16090 s,@ADAFLAGS@,$ADAFLAGS,;t t
16091 s,@cf_compile_generics@,$cf_compile_generics,;t t
16092 s,@cf_generic_objects@,$cf_generic_objects,;t t
16093 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16094 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16095 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16096 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16097 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16098 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16099 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16100 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16101 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16102 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16103 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16104 s,@TICS_ARGS@,$TICS_ARGS,;t t
16105 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16106 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16107 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16108 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16109 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16110 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16111 s,@TICS_LIST@,$TICS_LIST,;t t
16112 s,@TINFO_LIST@,$TINFO_LIST,;t t
16113 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16114 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16115 s,@TEST_ARGS@,$TEST_ARGS,;t t
16116 s,@TEST_DEPS@,$TEST_DEPS,;t t
16117 s,@TEST_ARG2@,$TEST_ARG2,;t t
16118 s,@TEST_DEP2@,$TEST_DEP2,;t t
16119 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16120 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16121 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16122 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16123 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16124 CEOF
16125
16126 EOF
16127
16128   cat >>$CONFIG_STATUS <<\EOF
16129   # Split the substitutions into bite-sized pieces for seds with
16130   # small command number limits, like on Digital OSF/1 and HP-UX.
16131   ac_max_sed_lines=48
16132   ac_sed_frag=1 # Number of current file.
16133   ac_beg=1 # First line for current file.
16134   ac_end=$ac_max_sed_lines # Line after last line for current file.
16135   ac_more_lines=:
16136   ac_sed_cmds=
16137   while $ac_more_lines; do
16138     if test $ac_beg -gt 1; then
16139       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16140     else
16141       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16142     fi
16143     if test ! -s $tmp/subs.frag; then
16144       ac_more_lines=false
16145     else
16146       # The purpose of the label and of the branching condition is to
16147       # speed up the sed processing (if there are no `@' at all, there
16148       # is no need to browse any of the substitutions).
16149       # These are the two extra sed commands mentioned above.
16150       (echo ':t
16151   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16152       if test -z "$ac_sed_cmds"; then
16153         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16154       else
16155         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16156       fi
16157       ac_sed_frag=`expr $ac_sed_frag + 1`
16158       ac_beg=$ac_end
16159       ac_end=`expr $ac_end + $ac_max_sed_lines`
16160     fi
16161   done
16162   if test -z "$ac_sed_cmds"; then
16163     ac_sed_cmds=cat
16164   fi
16165 fi # test -n "$CONFIG_FILES"
16166
16167 EOF
16168 cat >>$CONFIG_STATUS <<\EOF
16169 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16170   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16171   case $ac_file in
16172   - | *:- | *:-:* ) # input from stdin
16173         cat >$tmp/stdin
16174         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16175         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16176   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16177         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16178   * )   ac_file_in=$ac_file.in ;;
16179   esac
16180
16181   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16182   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16183          X"$ac_file" : 'X\(//\)[^/]' \| \
16184          X"$ac_file" : 'X\(//\)$' \| \
16185          X"$ac_file" : 'X\(/\)' \| \
16186          .     : '\(.\)' 2>/dev/null ||
16187 echo X"$ac_file" |
16188     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16189           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16190           /^X\(\/\/\)$/{ s//\1/; q; }
16191           /^X\(\/\).*/{ s//\1/; q; }
16192           s/.*/./; q'`
16193   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16194     { case "$ac_dir" in
16195   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16196   *)                      as_incr_dir=.;;
16197 esac
16198 as_dummy="$ac_dir"
16199 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16200   case $as_mkdir_dir in
16201     # Skip DOS drivespec
16202     ?:) as_incr_dir=$as_mkdir_dir ;;
16203     *)
16204       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16205       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16206     ;;
16207   esac
16208 done; }
16209
16210     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16211     # A "../" for each directory in $ac_dir_suffix.
16212     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16213   else
16214     ac_dir_suffix= ac_dots=
16215   fi
16216
16217   case $srcdir in
16218   .)  ac_srcdir=.
16219       if test -z "$ac_dots"; then
16220          ac_top_srcdir=.
16221       else
16222          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16223       fi ;;
16224   [\\/]* | ?:[\\/]* )
16225       ac_srcdir=$srcdir$ac_dir_suffix;
16226       ac_top_srcdir=$srcdir ;;
16227   *) # Relative path.
16228     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16229     ac_top_srcdir=$ac_dots$srcdir ;;
16230   esac
16231
16232   case $INSTALL in
16233   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16234   *) ac_INSTALL=$ac_dots$INSTALL ;;
16235   esac
16236
16237   if test x"$ac_file" != x-; then
16238     { echo "$as_me:16238: creating $ac_file" >&5
16239 echo "$as_me: creating $ac_file" >&6;}
16240     rm -f "$ac_file"
16241   fi
16242   # Let's still pretend it is `configure' which instantiates (i.e., don't
16243   # use $as_me), people would be surprised to read:
16244   #    /* config.h.  Generated automatically by config.status.  */
16245   configure_input="Generated automatically from `echo $ac_file_in |
16246                                                  sed 's,.*/,,'` by configure."
16247
16248   # First look for the input files in the build tree, otherwise in the
16249   # src tree.
16250   ac_file_inputs=`IFS=:
16251     for f in $ac_file_in; do
16252       case $f in
16253       -) echo $tmp/stdin ;;
16254       [\\/$]*)
16255          # Absolute (can't be DOS-style, as IFS=:)
16256          test -f "$f" || { { echo "$as_me:16256: error: cannot find input file: $f" >&5
16257 echo "$as_me: error: cannot find input file: $f" >&2;}
16258    { (exit 1); exit 1; }; }
16259          echo $f;;
16260       *) # Relative
16261          if test -f "$f"; then
16262            # Build tree
16263            echo $f
16264          elif test -f "$srcdir/$f"; then
16265            # Source tree
16266            echo $srcdir/$f
16267          else
16268            # /dev/null tree
16269            { { echo "$as_me:16269: error: cannot find input file: $f" >&5
16270 echo "$as_me: error: cannot find input file: $f" >&2;}
16271    { (exit 1); exit 1; }; }
16272          fi;;
16273       esac
16274     done` || { (exit 1); exit 1; }
16275 EOF
16276 cat >>$CONFIG_STATUS <<EOF
16277   sed "$ac_vpsub
16278 $extrasub
16279 EOF
16280 cat >>$CONFIG_STATUS <<\EOF
16281 :t
16282 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16283 s,@configure_input@,$configure_input,;t t
16284 s,@srcdir@,$ac_srcdir,;t t
16285 s,@top_srcdir@,$ac_top_srcdir,;t t
16286 s,@INSTALL@,$ac_INSTALL,;t t
16287 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16288   rm -f $tmp/stdin
16289   if test x"$ac_file" != x-; then
16290     mv $tmp/out $ac_file
16291   else
16292     cat $tmp/out
16293     rm -f $tmp/out
16294   fi
16295
16296 done
16297 EOF
16298 cat >>$CONFIG_STATUS <<\EOF
16299
16300 #
16301 # CONFIG_HEADER section.
16302 #
16303
16304 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16305 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16306 #
16307 # ac_d sets the value in "#define NAME VALUE" lines.
16308 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16309 ac_dB='[        ].*$,\1#\2'
16310 ac_dC=' '
16311 ac_dD=',;t'
16312 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16313 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16314 ac_iB='\([      ]\),\1#\2define\3'
16315 ac_iC=' '
16316 ac_iD='\4,;t'
16317 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16318 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16319 ac_uB='$,\1#\2define\3'
16320 ac_uC=' '
16321 ac_uD=',;t'
16322
16323 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16324   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16325   case $ac_file in
16326   - | *:- | *:-:* ) # input from stdin
16327         cat >$tmp/stdin
16328         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16329         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16330   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16331         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16332   * )   ac_file_in=$ac_file.in ;;
16333   esac
16334
16335   test x"$ac_file" != x- && { echo "$as_me:16335: creating $ac_file" >&5
16336 echo "$as_me: creating $ac_file" >&6;}
16337
16338   # First look for the input files in the build tree, otherwise in the
16339   # src tree.
16340   ac_file_inputs=`IFS=:
16341     for f in $ac_file_in; do
16342       case $f in
16343       -) echo $tmp/stdin ;;
16344       [\\/$]*)
16345          # Absolute (can't be DOS-style, as IFS=:)
16346          test -f "$f" || { { echo "$as_me:16346: error: cannot find input file: $f" >&5
16347 echo "$as_me: error: cannot find input file: $f" >&2;}
16348    { (exit 1); exit 1; }; }
16349          echo $f;;
16350       *) # Relative
16351          if test -f "$f"; then
16352            # Build tree
16353            echo $f
16354          elif test -f "$srcdir/$f"; then
16355            # Source tree
16356            echo $srcdir/$f
16357          else
16358            # /dev/null tree
16359            { { echo "$as_me:16359: error: cannot find input file: $f" >&5
16360 echo "$as_me: error: cannot find input file: $f" >&2;}
16361    { (exit 1); exit 1; }; }
16362          fi;;
16363       esac
16364     done` || { (exit 1); exit 1; }
16365   # Remove the trailing spaces.
16366   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16367
16368 EOF
16369
16370 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16371 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16372 # be either 'cat' or 'sort'.
16373 cat confdefs.h | uniq >conftest.vals
16374
16375 # Break up conftest.vals because some shells have a limit on
16376 # the size of here documents, and old seds have small limits too.
16377
16378 rm -f conftest.tail
16379 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16380 while grep . conftest.vals >/dev/null
16381 do
16382   # Write chunks of a limited-size here document to conftest.frag.
16383   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16384   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16385   echo 'CEOF' >> $CONFIG_STATUS
16386   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16387   rm -f conftest.vals
16388   mv conftest.tail conftest.vals
16389 done
16390 rm -f conftest.vals
16391
16392 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16393 # marker @DEFS@.
16394 echo '  cat >> conftest.edit <<CEOF
16395 /@DEFS@/r conftest.frag
16396 /@DEFS@/d
16397 CEOF
16398 sed -f conftest.edit $tmp/in > $tmp/out
16399 rm -f $tmp/in
16400 mv $tmp/out $tmp/in
16401 rm -f conftest.edit conftest.frag
16402 ' >> $CONFIG_STATUS
16403
16404 cat >>$CONFIG_STATUS <<\EOF
16405   # Let's still pretend it is `configure' which instantiates (i.e., don't
16406   # use $as_me), people would be surprised to read:
16407   #    /* config.h.  Generated automatically by config.status.  */
16408   if test x"$ac_file" = x-; then
16409     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16410   else
16411     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16412   fi
16413   cat $tmp/in >>$tmp/config.h
16414   rm -f $tmp/in
16415   if test x"$ac_file" != x-; then
16416     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16417       { echo "$as_me:16417: $ac_file is unchanged" >&5
16418 echo "$as_me: $ac_file is unchanged" >&6;}
16419     else
16420       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16421          X"$ac_file" : 'X\(//\)[^/]' \| \
16422          X"$ac_file" : 'X\(//\)$' \| \
16423          X"$ac_file" : 'X\(/\)' \| \
16424          .     : '\(.\)' 2>/dev/null ||
16425 echo X"$ac_file" |
16426     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16427           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16428           /^X\(\/\/\)$/{ s//\1/; q; }
16429           /^X\(\/\).*/{ s//\1/; q; }
16430           s/.*/./; q'`
16431       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16432         { case "$ac_dir" in
16433   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16434   *)                      as_incr_dir=.;;
16435 esac
16436 as_dummy="$ac_dir"
16437 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16438   case $as_mkdir_dir in
16439     # Skip DOS drivespec
16440     ?:) as_incr_dir=$as_mkdir_dir ;;
16441     *)
16442       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16443       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16444     ;;
16445   esac
16446 done; }
16447
16448       fi
16449       rm -f $ac_file
16450       mv $tmp/config.h $ac_file
16451     fi
16452   else
16453     cat $tmp/config.h
16454     rm -f $tmp/config.h
16455   fi
16456 done
16457 EOF
16458 cat >>$CONFIG_STATUS <<\EOF
16459
16460 #
16461 # CONFIG_COMMANDS section.
16462 #
16463 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16464   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16465   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16466
16467   case $ac_dest in
16468     default )
16469
16470 for cf_dir in test
16471 do
16472         if test ! -d $srcdir/$cf_dir; then
16473                 continue
16474         elif test -f $srcdir/$cf_dir/programs; then
16475                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16476         fi
16477 done
16478
16479         case $cf_cv_system_name in
16480         OS/2*)  LIB_PREFIX=''     ;;
16481         os2*)   LIB_PREFIX=''     ;;
16482         *)      LIB_PREFIX='lib'  ;;
16483         esac
16484 cf_prefix=$LIB_PREFIX
16485
16486 for cf_dir in $SRC_SUBDIRS
16487 do
16488         if test ! -d $srcdir/$cf_dir ; then
16489                 continue
16490         elif test -f $srcdir/$cf_dir/modules; then
16491
16492                 SHARED_LIB=
16493                 LIBS_TO_MAKE=
16494                 for cf_item in $cf_LIST_MODELS
16495                 do
16496
16497         case $cf_item in
16498         libtool) cf_suffix='.la'  ;;
16499         normal)  cf_suffix='.a'   ;;
16500         debug)   cf_suffix='_g.a' ;;
16501         profile) cf_suffix='_p.a' ;;
16502         shared)
16503                 case $cf_cv_system_name in
16504                 cygwin*) cf_suffix='.dll' ;;
16505                 darwin*) cf_suffix='.dylib' ;;
16506                 hpux*)
16507                         case $target in
16508                         ia64*)  cf_suffix='.so' ;;
16509                         *)      cf_suffix='.sl' ;;
16510                         esac
16511                         ;;
16512                 *)      cf_suffix='.so'  ;;
16513                 esac
16514         esac
16515         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16516
16517                         if test $cf_item = shared ; then
16518                         if test "$cf_cv_do_symlinks" = yes ; then
16519                                 case "$cf_cv_shlib_version" in #(vi
16520                                 rel) #(vi
16521                                         case "$cf_cv_system_name" in #(vi
16522                                         darwin*)
16523                                         case .${LIB_SUFFIX} in
16524                                         .w*)
16525                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16526                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16527                                                 ;;
16528                                         *)
16529                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16530                                                 ;;
16531                                         esac
16532                                         ;; #(vi
16533                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16534                                         esac
16535                                         ;;
16536                                 abi)
16537                                         case "$cf_cv_system_name" in #(vi
16538                                         darwin*)
16539                                         case .${LIB_SUFFIX} in
16540                                         .w*)
16541                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16542                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16543                                                 ;;
16544                                         *)
16545                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16546                                                 ;;
16547                                         esac
16548                                         ;; #(vi
16549                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16550                                         esac
16551                                         ;;
16552                                 esac
16553                         fi
16554                         # cygwin needs import library, and has unique naming convention
16555                         # use autodetected ${cf_prefix} for import lib and static lib, but
16556                         # use 'cyg' prefix for shared lib.
16557                         if test $cf_cv_shlib_version = cygdll ; then
16558                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16559                                 continue
16560                         fi
16561                         fi
16562                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16563                 done
16564
16565                 if test $cf_dir = ncurses ; then
16566                         cf_subsets="$LIB_SUBSETS"
16567                         cf_r_parts="$cf_subsets"
16568
16569                         while test -n "$cf_r_parts"
16570                         do
16571                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16572                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16573                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16574                                         case $cf_l_parts in #(vi
16575                                         *termlib*) #(vi
16576                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16577                                                 ;;
16578                                         *ticlib*)
16579                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16580                                                 ;;
16581                                         *)
16582                                                 break
16583                                                 ;;
16584                                         esac
16585                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16586                                 else
16587                                         break
16588                                 fi
16589                         done
16590                 else
16591                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16592                 fi
16593
16594                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16595                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16596                         $cf_dir/Makefile >$cf_dir/Makefile.out
16597                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16598
16599                 $AWK -f $srcdir/mk-0th.awk \
16600                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16601                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16602
16603                 for cf_subset in $cf_subsets
16604                 do
16605                         cf_subdirs=
16606                         for cf_item in $cf_LIST_MODELS
16607                         do
16608                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16609
16610 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16611
16612         case $cf_item in
16613         libtool) cf_suffix='.la'  ;;
16614         normal)  cf_suffix='.a'   ;;
16615         debug)   cf_suffix='_g.a' ;;
16616         profile) cf_suffix='_p.a' ;;
16617         shared)
16618                 case $cf_cv_system_name in
16619                 cygwin*) cf_suffix='.dll' ;;
16620                 darwin*) cf_suffix='.dylib' ;;
16621                 hpux*)
16622                         case $target in
16623                         ia64*)  cf_suffix='.so' ;;
16624                         *)      cf_suffix='.sl' ;;
16625                         esac
16626                         ;;
16627                 *)      cf_suffix='.so'  ;;
16628                 esac
16629         esac
16630         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16631
16632         case $cf_item in
16633         libtool) cf_subdir='obj_lo'  ;;
16634         normal)  cf_subdir='objects' ;;
16635         debug)   cf_subdir='obj_g' ;;
16636         profile) cf_subdir='obj_p' ;;
16637         shared)
16638                 case $cf_cv_system_name in #(vi
16639                 cygwin) #(vi
16640                         cf_subdir='objects' ;;
16641                 *)
16642                         cf_subdir='obj_s' ;;
16643                 esac
16644         esac
16645
16646                         # Test for case where we build libtinfo with a different name.
16647                         cf_libname=$cf_dir
16648                         if test $cf_dir = ncurses ; then
16649                                 case $cf_subset in
16650                                 *base*)
16651                                         ;;
16652                                 *termlib*)
16653                                         cf_libname=$TINFO_LIB_SUFFIX
16654                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16655                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16656                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16657                                         fi
16658                                         ;;
16659                                 ticlib*)
16660                                         cf_libname=$TICS_LIB_SUFFIX
16661                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16662                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16663                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16664                                         fi
16665                                         ;;
16666                                 esac
16667                         fi
16668
16669                         # These dependencies really are for development, not
16670                         # builds, but they are useful in porting, too.
16671                         cf_depend="../include/ncurses_cfg.h"
16672                         if test "$srcdir" = "."; then
16673                                 cf_reldir="."
16674                         else
16675                                 cf_reldir="\${srcdir}"
16676                         fi
16677
16678                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16679                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16680                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16681                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16682                         fi
16683
16684                         cf_dir_suffix=
16685                         old_cf_suffix="$cf_suffix"
16686                         if test "$cf_cv_shlib_version_infix" = yes ; then
16687                         if test -n "$LIB_SUFFIX" ; then
16688                                 case $LIB_SUFFIX in
16689                                 w*)
16690                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16691                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16692                                         cf_dir_suffix=w
16693                                         ;;
16694                                 esac
16695                         fi
16696                         fi
16697
16698                         $AWK -f $srcdir/mk-1st.awk \
16699                                 name=${cf_libname}${cf_dir_suffix} \
16700                                 traces=$LIB_TRACING \
16701                                 MODEL=$cf_ITEM \
16702                                 model=$cf_subdir \
16703                                 prefix=$cf_prefix \
16704                                 suffix=$cf_suffix \
16705                                 subset=$cf_subset \
16706                                 TermlibRoot=$TINFO_NAME \
16707                                 TermlibSuffix=$TINFO_SUFFIX \
16708                                 ShlibVer=$cf_cv_shlib_version \
16709                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16710                                 ReLink=${cf_cv_do_relink-no} \
16711                                 DoLinks=$cf_cv_do_symlinks \
16712                                 rmSoLocs=$cf_cv_rm_so_locs \
16713                                 ldconfig="$LDCONFIG" \
16714                                 overwrite=$WITH_OVERWRITE \
16715                                 depend="$cf_depend" \
16716                                 host="$host" \
16717                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16718
16719                         cf_suffix="$old_cf_suffix"
16720
16721                         for cf_subdir2 in $cf_subdirs lib
16722                         do
16723                                 test $cf_subdir = $cf_subdir2 && break
16724                         done
16725                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16726                         $AWK -f $srcdir/mk-2nd.awk \
16727                                 name=$cf_dir \
16728                                 traces=$LIB_TRACING \
16729                                 MODEL=$cf_ITEM \
16730                                 model=$cf_subdir \
16731                                 subset=$cf_subset \
16732                                 srcdir=$srcdir \
16733                                 echo=$WITH_ECHO \
16734                                 crenames=$cf_cv_prog_CC_c_o \
16735                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16736                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16737                         cf_subdirs="$cf_subdirs $cf_subdir"
16738                         done
16739                 done
16740         fi
16741
16742         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16743 done
16744
16745 for cf_dir in $SRC_SUBDIRS
16746 do
16747         if test ! -d $srcdir/$cf_dir ; then
16748                 continue
16749         fi
16750
16751         if test -f $cf_dir/Makefile ; then
16752                 case "$cf_dir" in
16753                 Ada95) #(vi
16754                         echo 'libs \' >> Makefile
16755                         echo 'install.libs \' >> Makefile
16756                         echo 'uninstall.libs ::' >> Makefile
16757                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16758                         ;;
16759                 esac
16760         fi
16761
16762         if test -f $srcdir/$cf_dir/modules; then
16763                 echo >> Makefile
16764                 if test -f $srcdir/$cf_dir/headers; then
16765 cat >> Makefile <<CF_EOF
16766 install.includes \\
16767 uninstall.includes \\
16768 CF_EOF
16769                 fi
16770 if test "$cf_dir" != "c++" ; then
16771 echo 'lint \' >> Makefile
16772 fi
16773 cat >> Makefile <<CF_EOF
16774 libs \\
16775 lintlib \\
16776 install.libs \\
16777 uninstall.libs \\
16778 install.$cf_dir \\
16779 uninstall.$cf_dir ::
16780         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16781 CF_EOF
16782         elif test -f $srcdir/$cf_dir/headers; then
16783 cat >> Makefile <<CF_EOF
16784
16785 libs \\
16786 install.libs \\
16787 uninstall.libs \\
16788 install.includes \\
16789 uninstall.includes ::
16790         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16791 CF_EOF
16792 fi
16793 done
16794
16795 cat >> Makefile <<CF_EOF
16796
16797 install.libs uninstall.libs \\
16798 install.data uninstall.data ::
16799 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16800
16801 install.man \\
16802 uninstall.man ::
16803         cd man && \${MAKE} \${CF_MFLAGS} \$@
16804
16805 distclean ::
16806         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16807         rm -f headers.sh headers.sed mk_shared_lib.sh
16808         rm -rf \${DIRS_TO_MAKE}
16809 CF_EOF
16810
16811 # Special case: tack's manpage lives in its own directory.
16812 if test -d tack ; then
16813 if test -f $srcdir/$tack.h; then
16814 cat >> Makefile <<CF_EOF
16815
16816 install.man \\
16817 uninstall.man ::
16818         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16819 CF_EOF
16820 fi
16821 fi
16822
16823 rm -f headers.sed headers.sh
16824
16825 echo creating headers.sh
16826 cat >headers.sh <<CF_EOF
16827 #! /bin/sh
16828 # This shell script is generated by the 'configure' script.  It is invoked in a
16829 # subdirectory of the build tree.  It generates a sed-script in the parent
16830 # directory that is used to adjust includes for header files that reside in a
16831 # subdirectory of /usr/include, etc.
16832 PRG=""
16833 while test \$# != 3
16834 do
16835 PRG="\$PRG \$1"; shift
16836 done
16837 DST=\$1
16838 REF=\$2
16839 SRC=\$3
16840 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16841 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16842 echo installing \$SRC in \$DST
16843 CF_EOF
16844
16845 if test $WITH_CURSES_H = yes; then
16846         cat >>headers.sh <<CF_EOF
16847 case \$DST in
16848 /*/include/*)
16849         END=\`basename \$DST\`
16850         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16851         do
16852                 NAME=\`basename \$i\`
16853                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16854         done
16855         ;;
16856 *)
16857         echo "" >> \$TMPSED
16858         ;;
16859 esac
16860 CF_EOF
16861
16862 else
16863         cat >>headers.sh <<CF_EOF
16864 case \$DST in
16865 /*/include/*)
16866         END=\`basename \$DST\`
16867         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16868         do
16869                 NAME=\`basename \$i\`
16870                 if test "\$NAME" = "curses.h"
16871                 then
16872                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16873                         NAME=ncurses.h
16874                 fi
16875                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16876         done
16877         ;;
16878 *)
16879         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16880         ;;
16881 esac
16882 CF_EOF
16883 fi
16884 cat >>headers.sh <<CF_EOF
16885 rm -f \$TMPSRC
16886 sed -f \$TMPSED \$SRC > \$TMPSRC
16887 NAME=\`basename \$SRC\`
16888 CF_EOF
16889 if test $WITH_CURSES_H != yes; then
16890         cat >>headers.sh <<CF_EOF
16891 test "\$NAME" = "curses.h" && NAME=ncurses.h
16892 CF_EOF
16893 fi
16894 cat >>headers.sh <<CF_EOF
16895 # Just in case someone gzip'd manpages, remove the conflicting copy.
16896 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16897
16898 eval \$PRG \$TMPSRC \$DST/\$NAME
16899 rm -f \$TMPSRC \$TMPSED
16900 CF_EOF
16901
16902 chmod 0755 headers.sh
16903
16904 for cf_dir in $SRC_SUBDIRS
16905 do
16906         if test ! -d $srcdir/$cf_dir ; then
16907                 continue
16908         fi
16909
16910         if test -f $srcdir/$cf_dir/headers; then
16911                 $AWK -f $srcdir/mk-hdr.awk \
16912                         subset="$LIB_SUBSETS" \
16913                         compat="$WITH_CURSES_H" \
16914                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
16915         fi
16916
16917         if test -f $srcdir/$cf_dir/modules; then
16918                 if test "$cf_dir" != "c++" ; then
16919                         cat >>$cf_dir/Makefile <<"CF_EOF"
16920 depend : ${AUTO_SRC}
16921         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16922
16923 # DO NOT DELETE THIS LINE -- make depend depends on it.
16924 CF_EOF
16925                 fi
16926         fi
16927 done
16928
16929  ;;
16930   esac
16931 done
16932 EOF
16933
16934 cat >>$CONFIG_STATUS <<\EOF
16935
16936 { (exit 0); exit 0; }
16937 EOF
16938 chmod +x $CONFIG_STATUS
16939 ac_clean_files=$ac_clean_files_save
16940
16941 # configure is writing to config.log, and then calls config.status.
16942 # config.status does its own redirection, appending to config.log.
16943 # Unfortunately, on DOS this fails, as config.log is still kept open
16944 # by configure, so config.status won't be able to write to it; its
16945 # output is simply discarded.  So we exec the FD to /dev/null,
16946 # effectively closing config.log, so it can be properly (re)opened and
16947 # appended to by config.status.  When coming back to configure, we
16948 # need to make the FD available again.
16949 if test "$no_create" != yes; then
16950   ac_cs_success=:
16951   exec 5>/dev/null
16952   $SHELL $CONFIG_STATUS || ac_cs_success=false
16953   exec 5>>config.log
16954   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16955   # would make configure fail if this is the last instruction.
16956   $ac_cs_success || { (exit 1); exit 1; }
16957 fi
16958 ${MAKE-make} preinstall