]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070203
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.393 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --with-install-prefix   prefixes actual install-location ($DESTDIR)
703 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710 Options to Specify the Libraries Built/Used:
711   --with-libtool          generate libraries with libtool
712   --with-shared           generate shared-libraries
713   --with-normal           generate normal-libraries (default)
714   --with-debug            generate debug-libraries (default)
715   --with-profile          generate profile-libraries
716   --with-termlib          generate separate terminfo library
717   --with-ticlib           generate separate tic library
718   --with-gpm              use Alessandro Rubini's GPM library
719   --without-dlsym         do not use dlsym() to load GPM dynamically
720   --with-sysmouse         use sysmouse (FreeBSD console)
721   --enable-rpath          use rpath option when generating shared libraries
722   --with-shlib-version=X  Specify rel or abi version for shared libs
723 Fine-Tuning Your Configuration:
724   --disable-overwrite     leave out the link to -lcurses
725   --disable-database      do not use terminfo, only fallbacks/termcap
726   --with-database=XXX     specify terminfo source to install
727   --with-hashed-db        specify hashed-database library
728   --with-fallbacks=XXX    specify list of fallback terminal descriptions
729   --without-xterm-new     specify if xterm terminfo should be old version
730   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
731   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
732   --disable-big-core      assume machine has little memory
733   --enable-termcap        compile in termcap fallback support
734   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
735   --enable-getcap         fast termcap load, no xrefs to terminfo
736   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
737   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
738   --disable-root-environ  restrict environment when running as root
739   --enable-symlinks       make tic use symbolic links not hard links
740   --enable-broken_linker  compile with broken-linker support code
741   --enable-bsdpad         recognize BSD-style prefix padding
742   --enable-widec          compile with wide-char/UTF-8 code
743   --disable-lp64          allow chtype to be long (ignore _LP64)
744   --disable-largefile     omit support for large files
745   --disable-tparm-varargs compile tparm() without varargs interface
746   --with-bool=TYPE        override fallback type of bool variable
747   --with-caps=alt         compile with alternate Caps file
748   --with-chtype=TYPE      override type of chtype
749   --with-ospeed=TYPE      override type of ospeed variable
750   --with-mmask-t=TYPE     override type of mmask_t
751   --with-rcs-ids          compile-in RCS identifiers
752 Options to Specify How Manpages are Installed:
753   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
754                           optionally formatted/catonly, e.g., gzip,formatted
755   --with-manpage-renames  specify manpage-renaming
756   --with-manpage-aliases  specify manpage-aliases using .so
757   --with-manpage-symlinks specify manpage-aliases using symlinks
758   --with-manpage-tbl      specify manpage processing with tbl
759 Extensions:
760   --disable-ext-funcs     disable function-extensions
761   --enable-const          compile with extra/non-standard const
762   --enable-no-padding     compile with $NCURSES_NO_PADDING code
763   --enable-signed-char    compile with SIGWINCH handler
764   --enable-sigwinch       compile with SIGWINCH handler
765   --enable-tcap-names     compile with user-definable terminal capabilities
766 Development Code:
767   --without-develop       disable development options
768   --enable-hard-tabs      compile with hard-tabs code
769   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
770 Experimental Code:
771   --disable-assumed-color do not assume anything about default-colors
772   --disable-hashmap       compile without hashmap scrolling-optimization
773   --enable-colorfgbg      compile with $COLORFGBG code
774   --enable-ext-colors     compile for experimental 256-color support
775   --enable-ext-mouse      compile for experimental mouse-encoding
776   --enable-safe-sprintf   compile with experimental safe-sprintf code
777   --disable-scroll-hints  compile without scroll-hints code
778   --enable-wgetch-events  compile with experimental wgetch-events code
779 Testing/development Options:
780   --enable-echo           build: display "compiling" commands (default)
781   --enable-warnings       build: turn on GCC compiler warnings
782   --enable-assertions     test: turn on generation of assertion code
783   --with-dmalloc          test: use Gray Watson's dmalloc library
784   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
785   --with-valgrind         test: use valgrind
786   --disable-leaks         test: free permanent memory, analyze leaks
787   --enable-expanded       test: generate functions for certain macros
788   --disable-macros        test: use functions rather than macros
789   --with-trace            test: add trace() function to all models of ncurses
790 Ada95 Binding Options:
791   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
792   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
793   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
794
795 Some influential environment variables:
796   CC          C compiler command
797   CFLAGS      C compiler flags
798   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
799               nonstandard directory <lib dir>
800   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
801               headers in a nonstandard directory <include dir>
802   CPP         C preprocessor
803   CXX         C++ compiler command
804   CXXFLAGS    C++ compiler flags
805   CXXCPP      C++ preprocessor
806
807 Use these variables to override the choices made by `configure' or to help
808 it to find libraries and programs with nonstandard names/locations.
809
810 EOF
811 fi
812
813 if test "$ac_init_help" = "recursive"; then
814   # If there are subdirs, report their specific --help.
815   ac_popdir=`pwd`
816   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
817     cd $ac_subdir
818     # A "../" for each directory in /$ac_subdir.
819     ac_dots=`echo $ac_subdir |
820              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
821
822     case $srcdir in
823     .) # No --srcdir option.  We are building in place.
824       ac_sub_srcdir=$srcdir ;;
825     [\\/]* | ?:[\\/]* ) # Absolute path.
826       ac_sub_srcdir=$srcdir/$ac_subdir ;;
827     *) # Relative path.
828       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
829     esac
830
831     # Check for guested configure; otherwise get Cygnus style configure.
832     if test -f $ac_sub_srcdir/configure.gnu; then
833       echo
834       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
835     elif test -f $ac_sub_srcdir/configure; then
836       echo
837       $SHELL $ac_sub_srcdir/configure  --help=recursive
838     elif test -f $ac_sub_srcdir/configure.ac ||
839            test -f $ac_sub_srcdir/configure.in; then
840       echo
841       $ac_configure --help
842     else
843       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
844     fi
845     cd $ac_popdir
846   done
847 fi
848
849 test -n "$ac_init_help" && exit 0
850 if $ac_init_version; then
851   cat <<\EOF
852
853 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
854 Free Software Foundation, Inc.
855 This configure script is free software; the Free Software Foundation
856 gives unlimited permission to copy, distribute and modify it.
857 EOF
858   exit 0
859 fi
860 exec 5>config.log
861 cat >&5 <<EOF
862 This file contains any messages produced by compilers while
863 running configure, to aid debugging if configure makes a mistake.
864
865 It was created by $as_me, which was
866 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
867
868   $ $0 $@
869
870 EOF
871 {
872 cat <<_ASUNAME
873 ## ---------- ##
874 ## Platform.  ##
875 ## ---------- ##
876
877 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
878 uname -m = `(uname -m) 2>/dev/null || echo unknown`
879 uname -r = `(uname -r) 2>/dev/null || echo unknown`
880 uname -s = `(uname -s) 2>/dev/null || echo unknown`
881 uname -v = `(uname -v) 2>/dev/null || echo unknown`
882
883 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
884 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
885
886 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
887 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
888 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
889 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
890 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
891 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
892 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
893
894 PATH = $PATH
895
896 _ASUNAME
897 } >&5
898
899 cat >&5 <<EOF
900 ## ------------ ##
901 ## Core tests.  ##
902 ## ------------ ##
903
904 EOF
905
906 # Keep a trace of the command line.
907 # Strip out --no-create and --no-recursion so they do not pile up.
908 # Also quote any args containing shell meta-characters.
909 ac_configure_args=
910 ac_sep=
911 for ac_arg
912 do
913   case $ac_arg in
914   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
915   | --no-cr | --no-c) ;;
916   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
917   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
918   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
919     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
920     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
921     ac_sep=" " ;;
922   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
923      ac_sep=" " ;;
924   esac
925   # Get rid of the leading space.
926 done
927
928 # When interrupted or exit'd, cleanup temporary files, and complete
929 # config.log.  We remove comments because anyway the quotes in there
930 # would cause problems or look ugly.
931 trap 'exit_status=$?
932   # Save into config.log some information that might help in debugging.
933   echo >&5
934   echo "## ----------------- ##" >&5
935   echo "## Cache variables.  ##" >&5
936   echo "## ----------------- ##" >&5
937   echo >&5
938   # The following way of writing the cache mishandles newlines in values,
939 {
940   (set) 2>&1 |
941     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
942     *ac_space=\ *)
943       sed -n \
944         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
945           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
946       ;;
947     *)
948       sed -n \
949         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
950       ;;
951     esac;
952 } >&5
953   sed "/^$/d" confdefs.h >conftest.log
954   if test -s conftest.log; then
955     echo >&5
956     echo "## ------------ ##" >&5
957     echo "## confdefs.h.  ##" >&5
958     echo "## ------------ ##" >&5
959     echo >&5
960     cat conftest.log >&5
961   fi
962   (echo; echo) >&5
963   test "$ac_signal" != 0 &&
964     echo "$as_me: caught signal $ac_signal" >&5
965   echo "$as_me: exit $exit_status" >&5
966   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
967     exit $exit_status
968      ' 0
969 for ac_signal in 1 2 13 15; do
970   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
971 done
972 ac_signal=0
973
974 # confdefs.h avoids OS command line length limits that DEFS can exceed.
975 rm -rf conftest* confdefs.h
976 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
977 echo >confdefs.h
978
979 # Let the site file select an alternate cache file if it wants to.
980 # Prefer explicitly selected file to automatically selected ones.
981 if test -z "$CONFIG_SITE"; then
982   if test "x$prefix" != xNONE; then
983     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
984   else
985     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
986   fi
987 fi
988 for ac_site_file in $CONFIG_SITE; do
989   if test -r "$ac_site_file"; then
990     { echo "$as_me:990: loading site script $ac_site_file" >&5
991 echo "$as_me: loading site script $ac_site_file" >&6;}
992     cat "$ac_site_file" >&5
993     . "$ac_site_file"
994   fi
995 done
996
997 if test -r "$cache_file"; then
998   # Some versions of bash will fail to source /dev/null (special
999   # files actually), so we avoid doing that.
1000   if test -f "$cache_file"; then
1001     { echo "$as_me:1001: loading cache $cache_file" >&5
1002 echo "$as_me: loading cache $cache_file" >&6;}
1003     case $cache_file in
1004       [\\/]* | ?:[\\/]* ) . $cache_file;;
1005       *)                      . ./$cache_file;;
1006     esac
1007   fi
1008 else
1009   { echo "$as_me:1009: creating cache $cache_file" >&5
1010 echo "$as_me: creating cache $cache_file" >&6;}
1011   >$cache_file
1012 fi
1013
1014 # Check that the precious variables saved in the cache have kept the same
1015 # value.
1016 ac_cache_corrupted=false
1017 for ac_var in `(set) 2>&1 |
1018                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1019   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1020   eval ac_new_set=\$ac_env_${ac_var}_set
1021   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1022   eval ac_new_val="\$ac_env_${ac_var}_value"
1023   case $ac_old_set,$ac_new_set in
1024     set,)
1025       { echo "$as_me:1025: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1026 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1027       ac_cache_corrupted=: ;;
1028     ,set)
1029       { echo "$as_me:1029: error: \`$ac_var' was not set in the previous run" >&5
1030 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1031       ac_cache_corrupted=: ;;
1032     ,);;
1033     *)
1034       if test "x$ac_old_val" != "x$ac_new_val"; then
1035         { echo "$as_me:1035: error: \`$ac_var' has changed since the previous run:" >&5
1036 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1037         { echo "$as_me:1037:   former value:  $ac_old_val" >&5
1038 echo "$as_me:   former value:  $ac_old_val" >&2;}
1039         { echo "$as_me:1039:   current value: $ac_new_val" >&5
1040 echo "$as_me:   current value: $ac_new_val" >&2;}
1041         ac_cache_corrupted=:
1042       fi;;
1043   esac
1044   # Pass precious variables to config.status.  It doesn't matter if
1045   # we pass some twice (in addition to the command line arguments).
1046   if test "$ac_new_set" = set; then
1047     case $ac_new_val in
1048     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1049       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1050       ac_configure_args="$ac_configure_args '$ac_arg'"
1051       ;;
1052     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1053        ;;
1054     esac
1055   fi
1056 done
1057 if $ac_cache_corrupted; then
1058   { echo "$as_me:1058: error: changes in the environment can compromise the build" >&5
1059 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1060   { { echo "$as_me:1060: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1061 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1062    { (exit 1); exit 1; }; }
1063 fi
1064
1065 ac_ext=c
1066 ac_cpp='$CPP $CPPFLAGS'
1067 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1068 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1069 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1070 ac_main_return=return
1071
1072 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1073   *c*,-n*) ECHO_N= ECHO_C='
1074 ' ECHO_T='      ' ;;
1075   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1076   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1077 esac
1078 echo "#! $SHELL" >conftest.sh
1079 echo  "exit 0"   >>conftest.sh
1080 chmod +x conftest.sh
1081 if { (echo "$as_me:1081: PATH=\".;.\"; conftest.sh") >&5
1082   (PATH=".;."; conftest.sh) 2>&5
1083   ac_status=$?
1084   echo "$as_me:1084: \$? = $ac_status" >&5
1085   (exit $ac_status); }; then
1086   ac_path_separator=';'
1087 else
1088   ac_path_separator=:
1089 fi
1090 PATH_SEPARATOR="$ac_path_separator"
1091 rm -f conftest.sh
1092
1093 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1094
1095 top_builddir=`pwd`
1096
1097 echo "$as_me:1097: checking for egrep" >&5
1098 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1099 if test "${ac_cv_prog_egrep+set}" = set; then
1100   echo $ECHO_N "(cached) $ECHO_C" >&6
1101 else
1102   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1103     then ac_cv_prog_egrep='grep -E'
1104     else ac_cv_prog_egrep='egrep'
1105     fi
1106 fi
1107 echo "$as_me:1107: result: $ac_cv_prog_egrep" >&5
1108 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1109  EGREP=$ac_cv_prog_egrep
1110
1111 test -z "$EGREP" && { { echo "$as_me:1111: error: No egrep program found" >&5
1112 echo "$as_me: error: No egrep program found" >&2;}
1113    { (exit 1); exit 1; }; }
1114
1115 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1116 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1117 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1118 cf_cv_abi_version=${NCURSES_MAJOR}
1119 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1120 cf_cv_timestamp=`date`
1121 echo "$as_me:1121: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1122 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1123
1124 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1125
1126 # Check whether --with-rel-version or --without-rel-version was given.
1127 if test "${with_rel_version+set}" = set; then
1128   withval="$with_rel_version"
1129   { echo "$as_me:1129: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1130 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1131  cf_cv_rel_version=$withval
1132 fi;
1133
1134  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1135  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1136
1137 if test -n "$NCURSES_MAJOR" ; then
1138   case $NCURSES_MAJOR in #(vi
1139   [0-9]*) #(vi
1140         ;;
1141   *)
1142         { { echo "$as_me:1142: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1143 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1144    { (exit 1); exit 1; }; }
1145         ;;
1146   esac
1147 else
1148   { { echo "$as_me:1148: error: Release major-version value is empty" >&5
1149 echo "$as_me: error: Release major-version value is empty" >&2;}
1150    { (exit 1); exit 1; }; }
1151 fi
1152
1153 if test -n "$NCURSES_MINOR" ; then
1154   case $NCURSES_MINOR in #(vi
1155   [0-9]*) #(vi
1156         ;;
1157   *)
1158         { { echo "$as_me:1158: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1159 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1160    { (exit 1); exit 1; }; }
1161         ;;
1162   esac
1163 else
1164   { { echo "$as_me:1164: error: Release minor-version value is empty" >&5
1165 echo "$as_me: error: Release minor-version value is empty" >&2;}
1166    { (exit 1); exit 1; }; }
1167 fi
1168
1169 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1170
1171 # Check whether --with-abi-version or --without-abi-version was given.
1172 if test "${with_abi_version+set}" = set; then
1173   withval="$with_abi_version"
1174   { echo "$as_me:1174: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1175 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1176  cf_cv_abi_version=$withval
1177 fi;
1178
1179 if test -n "$cf_cv_abi_version" ; then
1180   case $cf_cv_abi_version in #(vi
1181   [0-9]*) #(vi
1182         ;;
1183   *)
1184         { { echo "$as_me:1184: error: ABI version is not a number: $cf_cv_abi_version" >&5
1185 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1186    { (exit 1); exit 1; }; }
1187         ;;
1188   esac
1189 else
1190   { { echo "$as_me:1190: error: ABI version value is empty" >&5
1191 echo "$as_me: error: ABI version value is empty" >&2;}
1192    { (exit 1); exit 1; }; }
1193 fi
1194
1195 ac_aux_dir=
1196 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1197   if test -f $ac_dir/install-sh; then
1198     ac_aux_dir=$ac_dir
1199     ac_install_sh="$ac_aux_dir/install-sh -c"
1200     break
1201   elif test -f $ac_dir/install.sh; then
1202     ac_aux_dir=$ac_dir
1203     ac_install_sh="$ac_aux_dir/install.sh -c"
1204     break
1205   elif test -f $ac_dir/shtool; then
1206     ac_aux_dir=$ac_dir
1207     ac_install_sh="$ac_aux_dir/shtool install -c"
1208     break
1209   fi
1210 done
1211 if test -z "$ac_aux_dir"; then
1212   { { echo "$as_me:1212: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1213 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1214    { (exit 1); exit 1; }; }
1215 fi
1216 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1217 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1218 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1219
1220 # Make sure we can run config.sub.
1221 $ac_config_sub sun4 >/dev/null 2>&1 ||
1222   { { echo "$as_me:1222: error: cannot run $ac_config_sub" >&5
1223 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1224    { (exit 1); exit 1; }; }
1225
1226 echo "$as_me:1226: checking build system type" >&5
1227 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1228 if test "${ac_cv_build+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   ac_cv_build_alias=$build_alias
1232 test -z "$ac_cv_build_alias" &&
1233   ac_cv_build_alias=`$ac_config_guess`
1234 test -z "$ac_cv_build_alias" &&
1235   { { echo "$as_me:1235: error: cannot guess build type; you must specify one" >&5
1236 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1237    { (exit 1); exit 1; }; }
1238 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1239   { { echo "$as_me:1239: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1240 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1241    { (exit 1); exit 1; }; }
1242
1243 fi
1244 echo "$as_me:1244: result: $ac_cv_build" >&5
1245 echo "${ECHO_T}$ac_cv_build" >&6
1246 build=$ac_cv_build
1247 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1248 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1249 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1250
1251 echo "$as_me:1251: checking host system type" >&5
1252 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1253 if test "${ac_cv_host+set}" = set; then
1254   echo $ECHO_N "(cached) $ECHO_C" >&6
1255 else
1256   ac_cv_host_alias=$host_alias
1257 test -z "$ac_cv_host_alias" &&
1258   ac_cv_host_alias=$ac_cv_build_alias
1259 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1260   { { echo "$as_me:1260: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1261 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 fi
1265 echo "$as_me:1265: result: $ac_cv_host" >&5
1266 echo "${ECHO_T}$ac_cv_host" >&6
1267 host=$ac_cv_host
1268 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1269 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1270 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1271
1272 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1273         echo "$as_me:1273: checking target system type" >&5
1274 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1275 if test "${ac_cv_target+set}" = set; then
1276   echo $ECHO_N "(cached) $ECHO_C" >&6
1277 else
1278   ac_cv_target_alias=$target_alias
1279 test "x$ac_cv_target_alias" = "x" &&
1280   ac_cv_target_alias=$ac_cv_host_alias
1281 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1282   { { echo "$as_me:1282: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1283 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1284    { (exit 1); exit 1; }; }
1285
1286 fi
1287 echo "$as_me:1287: result: $ac_cv_target" >&5
1288 echo "${ECHO_T}$ac_cv_target" >&6
1289 target=$ac_cv_target
1290 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1291 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1292 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1293
1294 # The aliases save the names the user supplied, while $host etc.
1295 # will get canonicalized.
1296 test -n "$target_alias" &&
1297   test "$program_prefix$program_suffix$program_transform_name" = \
1298     NONENONEs,x,x, &&
1299   program_prefix=${target_alias}-
1300         system_name="$host_os"
1301 else
1302         system_name="`(uname -s -r) 2>/dev/null`"
1303         if test -z "$system_name" ; then
1304                 system_name="`(hostname) 2>/dev/null`"
1305         fi
1306 fi
1307 test -n "$system_name" && cat >>confdefs.h <<EOF
1308 #define SYSTEM_NAME "$system_name"
1309 EOF
1310
1311 if test "${cf_cv_system_name+set}" = set; then
1312   echo $ECHO_N "(cached) $ECHO_C" >&6
1313 else
1314   cf_cv_system_name="$system_name"
1315 fi
1316
1317 test -z "$system_name" && system_name="$cf_cv_system_name"
1318 test -n "$cf_cv_system_name" && echo "$as_me:1318: result: Configuring for $cf_cv_system_name" >&5
1319 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1320
1321 if test ".$system_name" != ".$cf_cv_system_name" ; then
1322         echo "$as_me:1322: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1323 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1324         { { echo "$as_me:1324: error: \"Please remove config.cache and try again.\"" >&5
1325 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 # Check whether --with-system-type or --without-system-type was given.
1330 if test "${with_system_type+set}" = set; then
1331   withval="$with_system_type"
1332   { echo "$as_me:1332: WARNING: overriding system type to $withval" >&5
1333 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1334  cf_cv_system_name=$withval
1335 fi;
1336
1337 ###     Save the given $CFLAGS to allow user-override.
1338 cf_user_CFLAGS="$CFLAGS"
1339
1340 ###     Default install-location
1341
1342 echo "$as_me:1342: checking for prefix" >&5
1343 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1344 if test "x$prefix" = "xNONE" ; then
1345         case "$cf_cv_system_name" in
1346                 # non-vendor systems don't have a conflict
1347         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1348                 prefix=/usr
1349                 ;;
1350         *)      prefix=$ac_default_prefix
1351                 ;;
1352         esac
1353 fi
1354 echo "$as_me:1354: result: $prefix" >&5
1355 echo "${ECHO_T}$prefix" >&6
1356
1357 if test "x$prefix" = "xNONE" ; then
1358 echo "$as_me:1358: checking for default include-directory" >&5
1359 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1360 test -n "$verbose" && echo 1>&6
1361 for cf_symbol in \
1362         $includedir \
1363         $includedir/ncurses \
1364         $prefix/include \
1365         $prefix/include/ncurses \
1366         /usr/local/include \
1367         /usr/local/include/ncurses \
1368         /usr/include \
1369         /usr/include/ncurses
1370 do
1371         cf_dir=`eval echo $cf_symbol`
1372         if test -f $cf_dir/curses.h ; then
1373         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1374                 includedir="$cf_symbol"
1375                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1376                 break
1377         fi
1378         fi
1379         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1380 done
1381 echo "$as_me:1381: result: $includedir" >&5
1382 echo "${ECHO_T}$includedir" >&6
1383 fi
1384
1385 ###     Checks for programs.
1386 ac_ext=c
1387 ac_cpp='$CPP $CPPFLAGS'
1388 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1389 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1390 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1391 ac_main_return=return
1392 if test -n "$ac_tool_prefix"; then
1393   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1394 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398   echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400   if test -n "$CC"; then
1401   ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403   ac_save_IFS=$IFS; IFS=$ac_path_separator
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406   IFS=$ac_save_IFS
1407   test -z "$ac_dir" && ac_dir=.
1408   $as_executable_p "$ac_dir/$ac_word" || continue
1409 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1410 echo "$as_me:1410: found $ac_dir/$ac_word" >&5
1411 break
1412 done
1413
1414 fi
1415 fi
1416 CC=$ac_cv_prog_CC
1417 if test -n "$CC"; then
1418   echo "$as_me:1418: result: $CC" >&5
1419 echo "${ECHO_T}$CC" >&6
1420 else
1421   echo "$as_me:1421: result: no" >&5
1422 echo "${ECHO_T}no" >&6
1423 fi
1424
1425 fi
1426 if test -z "$ac_cv_prog_CC"; then
1427   ac_ct_CC=$CC
1428   # Extract the first word of "gcc", so it can be a program name with args.
1429 set dummy gcc; ac_word=$2
1430 echo "$as_me:1430: checking for $ac_word" >&5
1431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1432 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   if test -n "$ac_ct_CC"; then
1436   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1437 else
1438   ac_save_IFS=$IFS; IFS=$ac_path_separator
1439 ac_dummy="$PATH"
1440 for ac_dir in $ac_dummy; do
1441   IFS=$ac_save_IFS
1442   test -z "$ac_dir" && ac_dir=.
1443   $as_executable_p "$ac_dir/$ac_word" || continue
1444 ac_cv_prog_ac_ct_CC="gcc"
1445 echo "$as_me:1445: found $ac_dir/$ac_word" >&5
1446 break
1447 done
1448
1449 fi
1450 fi
1451 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1452 if test -n "$ac_ct_CC"; then
1453   echo "$as_me:1453: result: $ac_ct_CC" >&5
1454 echo "${ECHO_T}$ac_ct_CC" >&6
1455 else
1456   echo "$as_me:1456: result: no" >&5
1457 echo "${ECHO_T}no" >&6
1458 fi
1459
1460   CC=$ac_ct_CC
1461 else
1462   CC="$ac_cv_prog_CC"
1463 fi
1464
1465 if test -z "$CC"; then
1466   if test -n "$ac_tool_prefix"; then
1467   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1468 set dummy ${ac_tool_prefix}cc; ac_word=$2
1469 echo "$as_me:1469: checking for $ac_word" >&5
1470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1471 if test "${ac_cv_prog_CC+set}" = set; then
1472   echo $ECHO_N "(cached) $ECHO_C" >&6
1473 else
1474   if test -n "$CC"; then
1475   ac_cv_prog_CC="$CC" # Let the user override the test.
1476 else
1477   ac_save_IFS=$IFS; IFS=$ac_path_separator
1478 ac_dummy="$PATH"
1479 for ac_dir in $ac_dummy; do
1480   IFS=$ac_save_IFS
1481   test -z "$ac_dir" && ac_dir=.
1482   $as_executable_p "$ac_dir/$ac_word" || continue
1483 ac_cv_prog_CC="${ac_tool_prefix}cc"
1484 echo "$as_me:1484: found $ac_dir/$ac_word" >&5
1485 break
1486 done
1487
1488 fi
1489 fi
1490 CC=$ac_cv_prog_CC
1491 if test -n "$CC"; then
1492   echo "$as_me:1492: result: $CC" >&5
1493 echo "${ECHO_T}$CC" >&6
1494 else
1495   echo "$as_me:1495: result: no" >&5
1496 echo "${ECHO_T}no" >&6
1497 fi
1498
1499 fi
1500 if test -z "$ac_cv_prog_CC"; then
1501   ac_ct_CC=$CC
1502   # Extract the first word of "cc", so it can be a program name with args.
1503 set dummy cc; ac_word=$2
1504 echo "$as_me:1504: checking for $ac_word" >&5
1505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1506 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1507   echo $ECHO_N "(cached) $ECHO_C" >&6
1508 else
1509   if test -n "$ac_ct_CC"; then
1510   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1511 else
1512   ac_save_IFS=$IFS; IFS=$ac_path_separator
1513 ac_dummy="$PATH"
1514 for ac_dir in $ac_dummy; do
1515   IFS=$ac_save_IFS
1516   test -z "$ac_dir" && ac_dir=.
1517   $as_executable_p "$ac_dir/$ac_word" || continue
1518 ac_cv_prog_ac_ct_CC="cc"
1519 echo "$as_me:1519: found $ac_dir/$ac_word" >&5
1520 break
1521 done
1522
1523 fi
1524 fi
1525 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1526 if test -n "$ac_ct_CC"; then
1527   echo "$as_me:1527: result: $ac_ct_CC" >&5
1528 echo "${ECHO_T}$ac_ct_CC" >&6
1529 else
1530   echo "$as_me:1530: result: no" >&5
1531 echo "${ECHO_T}no" >&6
1532 fi
1533
1534   CC=$ac_ct_CC
1535 else
1536   CC="$ac_cv_prog_CC"
1537 fi
1538
1539 fi
1540 if test -z "$CC"; then
1541   # Extract the first word of "cc", so it can be a program name with args.
1542 set dummy cc; ac_word=$2
1543 echo "$as_me:1543: checking for $ac_word" >&5
1544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1545 if test "${ac_cv_prog_CC+set}" = set; then
1546   echo $ECHO_N "(cached) $ECHO_C" >&6
1547 else
1548   if test -n "$CC"; then
1549   ac_cv_prog_CC="$CC" # Let the user override the test.
1550 else
1551   ac_prog_rejected=no
1552   ac_save_IFS=$IFS; IFS=$ac_path_separator
1553 ac_dummy="$PATH"
1554 for ac_dir in $ac_dummy; do
1555   IFS=$ac_save_IFS
1556   test -z "$ac_dir" && ac_dir=.
1557   $as_executable_p "$ac_dir/$ac_word" || continue
1558 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1559   ac_prog_rejected=yes
1560   continue
1561 fi
1562 ac_cv_prog_CC="cc"
1563 echo "$as_me:1563: found $ac_dir/$ac_word" >&5
1564 break
1565 done
1566
1567 if test $ac_prog_rejected = yes; then
1568   # We found a bogon in the path, so make sure we never use it.
1569   set dummy $ac_cv_prog_CC
1570   shift
1571   if test $# != 0; then
1572     # We chose a different compiler from the bogus one.
1573     # However, it has the same basename, so the bogon will be chosen
1574     # first if we set CC to just the basename; use the full file name.
1575     shift
1576     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1577     shift
1578     ac_cv_prog_CC="$@"
1579   fi
1580 fi
1581 fi
1582 fi
1583 CC=$ac_cv_prog_CC
1584 if test -n "$CC"; then
1585   echo "$as_me:1585: result: $CC" >&5
1586 echo "${ECHO_T}$CC" >&6
1587 else
1588   echo "$as_me:1588: result: no" >&5
1589 echo "${ECHO_T}no" >&6
1590 fi
1591
1592 fi
1593 if test -z "$CC"; then
1594   if test -n "$ac_tool_prefix"; then
1595   for ac_prog in cl
1596   do
1597     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1598 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1599 echo "$as_me:1599: checking for $ac_word" >&5
1600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1601 if test "${ac_cv_prog_CC+set}" = set; then
1602   echo $ECHO_N "(cached) $ECHO_C" >&6
1603 else
1604   if test -n "$CC"; then
1605   ac_cv_prog_CC="$CC" # Let the user override the test.
1606 else
1607   ac_save_IFS=$IFS; IFS=$ac_path_separator
1608 ac_dummy="$PATH"
1609 for ac_dir in $ac_dummy; do
1610   IFS=$ac_save_IFS
1611   test -z "$ac_dir" && ac_dir=.
1612   $as_executable_p "$ac_dir/$ac_word" || continue
1613 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1614 echo "$as_me:1614: found $ac_dir/$ac_word" >&5
1615 break
1616 done
1617
1618 fi
1619 fi
1620 CC=$ac_cv_prog_CC
1621 if test -n "$CC"; then
1622   echo "$as_me:1622: result: $CC" >&5
1623 echo "${ECHO_T}$CC" >&6
1624 else
1625   echo "$as_me:1625: result: no" >&5
1626 echo "${ECHO_T}no" >&6
1627 fi
1628
1629     test -n "$CC" && break
1630   done
1631 fi
1632 if test -z "$CC"; then
1633   ac_ct_CC=$CC
1634   for ac_prog in cl
1635 do
1636   # Extract the first word of "$ac_prog", so it can be a program name with args.
1637 set dummy $ac_prog; ac_word=$2
1638 echo "$as_me:1638: checking for $ac_word" >&5
1639 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1640 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1641   echo $ECHO_N "(cached) $ECHO_C" >&6
1642 else
1643   if test -n "$ac_ct_CC"; then
1644   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1645 else
1646   ac_save_IFS=$IFS; IFS=$ac_path_separator
1647 ac_dummy="$PATH"
1648 for ac_dir in $ac_dummy; do
1649   IFS=$ac_save_IFS
1650   test -z "$ac_dir" && ac_dir=.
1651   $as_executable_p "$ac_dir/$ac_word" || continue
1652 ac_cv_prog_ac_ct_CC="$ac_prog"
1653 echo "$as_me:1653: found $ac_dir/$ac_word" >&5
1654 break
1655 done
1656
1657 fi
1658 fi
1659 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1660 if test -n "$ac_ct_CC"; then
1661   echo "$as_me:1661: result: $ac_ct_CC" >&5
1662 echo "${ECHO_T}$ac_ct_CC" >&6
1663 else
1664   echo "$as_me:1664: result: no" >&5
1665 echo "${ECHO_T}no" >&6
1666 fi
1667
1668   test -n "$ac_ct_CC" && break
1669 done
1670
1671   CC=$ac_ct_CC
1672 fi
1673
1674 fi
1675
1676 test -z "$CC" && { { echo "$as_me:1676: error: no acceptable cc found in \$PATH" >&5
1677 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1678    { (exit 1); exit 1; }; }
1679
1680 # Provide some information about the compiler.
1681 echo "$as_me:1681:" \
1682      "checking for C compiler version" >&5
1683 ac_compiler=`set X $ac_compile; echo $2`
1684 { (eval echo "$as_me:1684: \"$ac_compiler --version </dev/null >&5\"") >&5
1685   (eval $ac_compiler --version </dev/null >&5) 2>&5
1686   ac_status=$?
1687   echo "$as_me:1687: \$? = $ac_status" >&5
1688   (exit $ac_status); }
1689 { (eval echo "$as_me:1689: \"$ac_compiler -v </dev/null >&5\"") >&5
1690   (eval $ac_compiler -v </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -V </dev/null >&5\"") >&5
1695   (eval $ac_compiler -V </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699
1700 cat >conftest.$ac_ext <<_ACEOF
1701 #line 1701 "configure"
1702 #include "confdefs.h"
1703
1704 int
1705 main ()
1706 {
1707
1708   ;
1709   return 0;
1710 }
1711 _ACEOF
1712 ac_clean_files_save=$ac_clean_files
1713 ac_clean_files="$ac_clean_files a.out a.exe"
1714 # Try to create an executable without -o first, disregard a.out.
1715 # It will help us diagnose broken compilers, and finding out an intuition
1716 # of exeext.
1717 echo "$as_me:1717: checking for C compiler default output" >&5
1718 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1719 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1720 if { (eval echo "$as_me:1720: \"$ac_link_default\"") >&5
1721   (eval $ac_link_default) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; then
1725   # Find the output, starting from the most likely.  This scheme is
1726 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1727 # resort.
1728 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1729                 ls a.out conftest 2>/dev/null;
1730                 ls a.* conftest.* 2>/dev/null`; do
1731   case $ac_file in
1732     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1733     a.out ) # We found the default executable, but exeext='' is most
1734             # certainly right.
1735             break;;
1736     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1738           export ac_cv_exeext
1739           break;;
1740     * ) break;;
1741   esac
1742 done
1743 else
1744   echo "$as_me: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1746 { { echo "$as_me:1746: error: C compiler cannot create executables" >&5
1747 echo "$as_me: error: C compiler cannot create executables" >&2;}
1748    { (exit 77); exit 77; }; }
1749 fi
1750
1751 ac_exeext=$ac_cv_exeext
1752 echo "$as_me:1752: result: $ac_file" >&5
1753 echo "${ECHO_T}$ac_file" >&6
1754
1755 # Check the compiler produces executables we can run.  If not, either
1756 # the compiler is broken, or we cross compile.
1757 echo "$as_me:1757: checking whether the C compiler works" >&5
1758 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1759 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1760 # If not cross compiling, check that we can run a simple program.
1761 if test "$cross_compiling" != yes; then
1762   if { ac_try='./$ac_file'
1763   { (eval echo "$as_me:1763: \"$ac_try\"") >&5
1764   (eval $ac_try) 2>&5
1765   ac_status=$?
1766   echo "$as_me:1766: \$? = $ac_status" >&5
1767   (exit $ac_status); }; }; then
1768     cross_compiling=no
1769   else
1770     if test "$cross_compiling" = maybe; then
1771         cross_compiling=yes
1772     else
1773         { { echo "$as_me:1773: error: cannot run C compiled programs.
1774 If you meant to cross compile, use \`--host'." >&5
1775 echo "$as_me: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&2;}
1777    { (exit 1); exit 1; }; }
1778     fi
1779   fi
1780 fi
1781 echo "$as_me:1781: result: yes" >&5
1782 echo "${ECHO_T}yes" >&6
1783
1784 rm -f a.out a.exe conftest$ac_cv_exeext
1785 ac_clean_files=$ac_clean_files_save
1786 # Check the compiler produces executables we can run.  If not, either
1787 # the compiler is broken, or we cross compile.
1788 echo "$as_me:1788: checking whether we are cross compiling" >&5
1789 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1790 echo "$as_me:1790: result: $cross_compiling" >&5
1791 echo "${ECHO_T}$cross_compiling" >&6
1792
1793 echo "$as_me:1793: checking for executable suffix" >&5
1794 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1795 if { (eval echo "$as_me:1795: \"$ac_link\"") >&5
1796   (eval $ac_link) 2>&5
1797   ac_status=$?
1798   echo "$as_me:1798: \$? = $ac_status" >&5
1799   (exit $ac_status); }; then
1800   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1801 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1802 # work properly (i.e., refer to `conftest.exe'), while it won't with
1803 # `rm'.
1804 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1805   case $ac_file in
1806     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1807     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1808           export ac_cv_exeext
1809           break;;
1810     * ) break;;
1811   esac
1812 done
1813 else
1814   { { echo "$as_me:1814: error: cannot compute EXEEXT: cannot compile and link" >&5
1815 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1816    { (exit 1); exit 1; }; }
1817 fi
1818
1819 rm -f conftest$ac_cv_exeext
1820 echo "$as_me:1820: result: $ac_cv_exeext" >&5
1821 echo "${ECHO_T}$ac_cv_exeext" >&6
1822
1823 rm -f conftest.$ac_ext
1824 EXEEXT=$ac_cv_exeext
1825 ac_exeext=$EXEEXT
1826 echo "$as_me:1826: checking for object suffix" >&5
1827 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1828 if test "${ac_cv_objext+set}" = set; then
1829   echo $ECHO_N "(cached) $ECHO_C" >&6
1830 else
1831   cat >conftest.$ac_ext <<_ACEOF
1832 #line 1832 "configure"
1833 #include "confdefs.h"
1834
1835 int
1836 main ()
1837 {
1838
1839   ;
1840   return 0;
1841 }
1842 _ACEOF
1843 rm -f conftest.o conftest.obj
1844 if { (eval echo "$as_me:1844: \"$ac_compile\"") >&5
1845   (eval $ac_compile) 2>&5
1846   ac_status=$?
1847   echo "$as_me:1847: \$? = $ac_status" >&5
1848   (exit $ac_status); }; then
1849   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1850   case $ac_file in
1851     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1852     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1853        break;;
1854   esac
1855 done
1856 else
1857   echo "$as_me: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 { { echo "$as_me:1859: error: cannot compute OBJEXT: cannot compile" >&5
1860 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1861    { (exit 1); exit 1; }; }
1862 fi
1863
1864 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1865 fi
1866 echo "$as_me:1866: result: $ac_cv_objext" >&5
1867 echo "${ECHO_T}$ac_cv_objext" >&6
1868 OBJEXT=$ac_cv_objext
1869 ac_objext=$OBJEXT
1870 echo "$as_me:1870: checking whether we are using the GNU C compiler" >&5
1871 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1872 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1873   echo $ECHO_N "(cached) $ECHO_C" >&6
1874 else
1875   cat >conftest.$ac_ext <<_ACEOF
1876 #line 1876 "configure"
1877 #include "confdefs.h"
1878
1879 int
1880 main ()
1881 {
1882 #ifndef __GNUC__
1883        choke me
1884 #endif
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 rm -f conftest.$ac_objext
1891 if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5
1892   (eval $ac_compile) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); } &&
1896          { ac_try='test -s conftest.$ac_objext'
1897   { (eval echo "$as_me:1897: \"$ac_try\"") >&5
1898   (eval $ac_try) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); }; }; then
1902   ac_compiler_gnu=yes
1903 else
1904   echo "$as_me: failed program was:" >&5
1905 cat conftest.$ac_ext >&5
1906 ac_compiler_gnu=no
1907 fi
1908 rm -f conftest.$ac_objext conftest.$ac_ext
1909 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1910
1911 fi
1912 echo "$as_me:1912: result: $ac_cv_c_compiler_gnu" >&5
1913 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1914 GCC=`test $ac_compiler_gnu = yes && echo yes`
1915 ac_test_CFLAGS=${CFLAGS+set}
1916 ac_save_CFLAGS=$CFLAGS
1917 CFLAGS="-g"
1918 echo "$as_me:1918: checking whether $CC accepts -g" >&5
1919 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1920 if test "${ac_cv_prog_cc_g+set}" = set; then
1921   echo $ECHO_N "(cached) $ECHO_C" >&6
1922 else
1923   cat >conftest.$ac_ext <<_ACEOF
1924 #line 1924 "configure"
1925 #include "confdefs.h"
1926
1927 int
1928 main ()
1929 {
1930
1931   ;
1932   return 0;
1933 }
1934 _ACEOF
1935 rm -f conftest.$ac_objext
1936 if { (eval echo "$as_me:1936: \"$ac_compile\"") >&5
1937   (eval $ac_compile) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); } &&
1941          { ac_try='test -s conftest.$ac_objext'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); }; }; then
1947   ac_cv_prog_cc_g=yes
1948 else
1949   echo "$as_me: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1951 ac_cv_prog_cc_g=no
1952 fi
1953 rm -f conftest.$ac_objext conftest.$ac_ext
1954 fi
1955 echo "$as_me:1955: result: $ac_cv_prog_cc_g" >&5
1956 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1957 if test "$ac_test_CFLAGS" = set; then
1958   CFLAGS=$ac_save_CFLAGS
1959 elif test $ac_cv_prog_cc_g = yes; then
1960   if test "$GCC" = yes; then
1961     CFLAGS="-g -O2"
1962   else
1963     CFLAGS="-g"
1964   fi
1965 else
1966   if test "$GCC" = yes; then
1967     CFLAGS="-O2"
1968   else
1969     CFLAGS=
1970   fi
1971 fi
1972 # Some people use a C++ compiler to compile C.  Since we use `exit',
1973 # in C++ we need to declare it.  In case someone uses the same compiler
1974 # for both compiling C and C++ we need to have the C++ compiler decide
1975 # the declaration of exit, since it's the most demanding environment.
1976 cat >conftest.$ac_ext <<_ACEOF
1977 #ifndef __cplusplus
1978   choke me
1979 #endif
1980 _ACEOF
1981 rm -f conftest.$ac_objext
1982 if { (eval echo "$as_me:1982: \"$ac_compile\"") >&5
1983   (eval $ac_compile) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); } &&
1987          { ac_try='test -s conftest.$ac_objext'
1988   { (eval echo "$as_me:1988: \"$ac_try\"") >&5
1989   (eval $ac_try) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); }; }; then
1993   for ac_declaration in \
1994    ''\
1995    '#include <stdlib.h>' \
1996    'extern "C" void std::exit (int) throw (); using std::exit;' \
1997    'extern "C" void std::exit (int); using std::exit;' \
1998    'extern "C" void exit (int) throw ();' \
1999    'extern "C" void exit (int);' \
2000    'void exit (int);'
2001 do
2002   cat >conftest.$ac_ext <<_ACEOF
2003 #line 2003 "configure"
2004 #include "confdefs.h"
2005 #include <stdlib.h>
2006 $ac_declaration
2007 int
2008 main ()
2009 {
2010 exit (42);
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   :
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 continue
2032 fi
2033 rm -f conftest.$ac_objext conftest.$ac_ext
2034   cat >conftest.$ac_ext <<_ACEOF
2035 #line 2035 "configure"
2036 #include "confdefs.h"
2037 $ac_declaration
2038 int
2039 main ()
2040 {
2041 exit (42);
2042   ;
2043   return 0;
2044 }
2045 _ACEOF
2046 rm -f conftest.$ac_objext
2047 if { (eval echo "$as_me:2047: \"$ac_compile\"") >&5
2048   (eval $ac_compile) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); } &&
2052          { ac_try='test -s conftest.$ac_objext'
2053   { (eval echo "$as_me:2053: \"$ac_try\"") >&5
2054   (eval $ac_try) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); }; }; then
2058   break
2059 else
2060   echo "$as_me: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 fi
2063 rm -f conftest.$ac_objext conftest.$ac_ext
2064 done
2065 rm -f conftest*
2066 if test -n "$ac_declaration"; then
2067   echo '#ifdef __cplusplus' >>confdefs.h
2068   echo $ac_declaration      >>confdefs.h
2069   echo '#endif'             >>confdefs.h
2070 fi
2071
2072 else
2073   echo "$as_me: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 fi
2076 rm -f conftest.$ac_objext conftest.$ac_ext
2077 ac_ext=c
2078 ac_cpp='$CPP $CPPFLAGS'
2079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2082 ac_main_return=return
2083
2084 GCC_VERSION=none
2085 if test "$GCC" = yes ; then
2086         echo "$as_me:2086: checking version of $CC" >&5
2087 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2088         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2089         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2090         echo "$as_me:2090: result: $GCC_VERSION" >&5
2091 echo "${ECHO_T}$GCC_VERSION" >&6
2092 fi
2093
2094 ac_ext=c
2095 ac_cpp='$CPP $CPPFLAGS'
2096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2099 ac_main_return=return
2100 echo "$as_me:2100: checking how to run the C preprocessor" >&5
2101 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2102 # On Suns, sometimes $CPP names a directory.
2103 if test -n "$CPP" && test -d "$CPP"; then
2104   CPP=
2105 fi
2106 if test -z "$CPP"; then
2107   if test "${ac_cv_prog_CPP+set}" = set; then
2108   echo $ECHO_N "(cached) $ECHO_C" >&6
2109 else
2110       # Double quotes because CPP needs to be expanded
2111     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2112     do
2113       ac_preproc_ok=false
2114 for ac_c_preproc_warn_flag in '' yes
2115 do
2116   # Use a header file that comes with gcc, so configuring glibc
2117   # with a fresh cross-compiler works.
2118   # On the NeXT, cc -E runs the code through the compiler's parser,
2119   # not just through cpp. "Syntax error" is here to catch this case.
2120   cat >conftest.$ac_ext <<_ACEOF
2121 #line 2121 "configure"
2122 #include "confdefs.h"
2123 #include <assert.h>
2124                      Syntax error
2125 _ACEOF
2126 if { (eval echo "$as_me:2126: \"$ac_cpp conftest.$ac_ext\"") >&5
2127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2128   ac_status=$?
2129   egrep -v '^ *\+' conftest.er1 >conftest.err
2130   rm -f conftest.er1
2131   cat conftest.err >&5
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit $ac_status); } >/dev/null; then
2134   if test -s conftest.err; then
2135     ac_cpp_err=$ac_c_preproc_warn_flag
2136   else
2137     ac_cpp_err=
2138   fi
2139 else
2140   ac_cpp_err=yes
2141 fi
2142 if test -z "$ac_cpp_err"; then
2143   :
2144 else
2145   echo "$as_me: failed program was:" >&5
2146   cat conftest.$ac_ext >&5
2147   # Broken: fails on valid input.
2148 continue
2149 fi
2150 rm -f conftest.err conftest.$ac_ext
2151
2152   # OK, works on sane cases.  Now check whether non-existent headers
2153   # can be detected and how.
2154   cat >conftest.$ac_ext <<_ACEOF
2155 #line 2155 "configure"
2156 #include "confdefs.h"
2157 #include <ac_nonexistent.h>
2158 _ACEOF
2159 if { (eval echo "$as_me:2159: \"$ac_cpp conftest.$ac_ext\"") >&5
2160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2161   ac_status=$?
2162   egrep -v '^ *\+' conftest.er1 >conftest.err
2163   rm -f conftest.er1
2164   cat conftest.err >&5
2165   echo "$as_me:2165: \$? = $ac_status" >&5
2166   (exit $ac_status); } >/dev/null; then
2167   if test -s conftest.err; then
2168     ac_cpp_err=$ac_c_preproc_warn_flag
2169   else
2170     ac_cpp_err=
2171   fi
2172 else
2173   ac_cpp_err=yes
2174 fi
2175 if test -z "$ac_cpp_err"; then
2176   # Broken: success on invalid input.
2177 continue
2178 else
2179   echo "$as_me: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   # Passes both tests.
2182 ac_preproc_ok=:
2183 break
2184 fi
2185 rm -f conftest.err conftest.$ac_ext
2186
2187 done
2188 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2189 rm -f conftest.err conftest.$ac_ext
2190 if $ac_preproc_ok; then
2191   break
2192 fi
2193
2194     done
2195     ac_cv_prog_CPP=$CPP
2196
2197 fi
2198   CPP=$ac_cv_prog_CPP
2199 else
2200   ac_cv_prog_CPP=$CPP
2201 fi
2202 echo "$as_me:2202: result: $CPP" >&5
2203 echo "${ECHO_T}$CPP" >&6
2204 ac_preproc_ok=false
2205 for ac_c_preproc_warn_flag in '' yes
2206 do
2207   # Use a header file that comes with gcc, so configuring glibc
2208   # with a fresh cross-compiler works.
2209   # On the NeXT, cc -E runs the code through the compiler's parser,
2210   # not just through cpp. "Syntax error" is here to catch this case.
2211   cat >conftest.$ac_ext <<_ACEOF
2212 #line 2212 "configure"
2213 #include "confdefs.h"
2214 #include <assert.h>
2215                      Syntax error
2216 _ACEOF
2217 if { (eval echo "$as_me:2217: \"$ac_cpp conftest.$ac_ext\"") >&5
2218   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2219   ac_status=$?
2220   egrep -v '^ *\+' conftest.er1 >conftest.err
2221   rm -f conftest.er1
2222   cat conftest.err >&5
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit $ac_status); } >/dev/null; then
2225   if test -s conftest.err; then
2226     ac_cpp_err=$ac_c_preproc_warn_flag
2227   else
2228     ac_cpp_err=
2229   fi
2230 else
2231   ac_cpp_err=yes
2232 fi
2233 if test -z "$ac_cpp_err"; then
2234   :
2235 else
2236   echo "$as_me: failed program was:" >&5
2237   cat conftest.$ac_ext >&5
2238   # Broken: fails on valid input.
2239 continue
2240 fi
2241 rm -f conftest.err conftest.$ac_ext
2242
2243   # OK, works on sane cases.  Now check whether non-existent headers
2244   # can be detected and how.
2245   cat >conftest.$ac_ext <<_ACEOF
2246 #line 2246 "configure"
2247 #include "confdefs.h"
2248 #include <ac_nonexistent.h>
2249 _ACEOF
2250 if { (eval echo "$as_me:2250: \"$ac_cpp conftest.$ac_ext\"") >&5
2251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2252   ac_status=$?
2253   egrep -v '^ *\+' conftest.er1 >conftest.err
2254   rm -f conftest.er1
2255   cat conftest.err >&5
2256   echo "$as_me:2256: \$? = $ac_status" >&5
2257   (exit $ac_status); } >/dev/null; then
2258   if test -s conftest.err; then
2259     ac_cpp_err=$ac_c_preproc_warn_flag
2260   else
2261     ac_cpp_err=
2262   fi
2263 else
2264   ac_cpp_err=yes
2265 fi
2266 if test -z "$ac_cpp_err"; then
2267   # Broken: success on invalid input.
2268 continue
2269 else
2270   echo "$as_me: failed program was:" >&5
2271   cat conftest.$ac_ext >&5
2272   # Passes both tests.
2273 ac_preproc_ok=:
2274 break
2275 fi
2276 rm -f conftest.err conftest.$ac_ext
2277
2278 done
2279 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2280 rm -f conftest.err conftest.$ac_ext
2281 if $ac_preproc_ok; then
2282   :
2283 else
2284   { { echo "$as_me:2284: error: C preprocessor \"$CPP\" fails sanity check" >&5
2285 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2286    { (exit 1); exit 1; }; }
2287 fi
2288
2289 ac_ext=c
2290 ac_cpp='$CPP $CPPFLAGS'
2291 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2292 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2293 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2294 ac_main_return=return
2295
2296 if test $ac_cv_c_compiler_gnu = yes; then
2297     echo "$as_me:2297: checking whether $CC needs -traditional" >&5
2298 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2299 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2300   echo $ECHO_N "(cached) $ECHO_C" >&6
2301 else
2302     ac_pattern="Autoconf.*'x'"
2303   cat >conftest.$ac_ext <<_ACEOF
2304 #line 2304 "configure"
2305 #include "confdefs.h"
2306 #include <sgtty.h>
2307 int Autoconf = TIOCGETP;
2308 _ACEOF
2309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2310   egrep "$ac_pattern" >/dev/null 2>&1; then
2311   ac_cv_prog_gcc_traditional=yes
2312 else
2313   ac_cv_prog_gcc_traditional=no
2314 fi
2315 rm -f conftest*
2316
2317   if test $ac_cv_prog_gcc_traditional = no; then
2318     cat >conftest.$ac_ext <<_ACEOF
2319 #line 2319 "configure"
2320 #include "confdefs.h"
2321 #include <termio.h>
2322 int Autoconf = TCGETA;
2323 _ACEOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "$ac_pattern" >/dev/null 2>&1; then
2326   ac_cv_prog_gcc_traditional=yes
2327 fi
2328 rm -f conftest*
2329
2330   fi
2331 fi
2332 echo "$as_me:2332: result: $ac_cv_prog_gcc_traditional" >&5
2333 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2334   if test $ac_cv_prog_gcc_traditional = yes; then
2335     CC="$CC -traditional"
2336   fi
2337 fi
2338
2339 echo "$as_me:2339: checking whether $CC understands -c and -o together" >&5
2340 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2341 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2342   echo $ECHO_N "(cached) $ECHO_C" >&6
2343 else
2344
2345 cat > conftest.$ac_ext <<CF_EOF
2346 #include <stdio.h>
2347 int main()
2348 {
2349         ${cf_cv_main_return:-return}(0);
2350 }
2351 CF_EOF
2352 # We do the test twice because some compilers refuse to overwrite an
2353 # existing .o file with -o, though they will create one.
2354 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2355 if { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit $ac_status); } &&
2360   test -f conftest2.$ac_objext && { (eval echo "$as_me:2360: \"$ac_try\"") >&5
2361   (eval $ac_try) 2>&5
2362   ac_status=$?
2363   echo "$as_me:2363: \$? = $ac_status" >&5
2364   (exit $ac_status); };
2365 then
2366   eval cf_cv_prog_CC_c_o=yes
2367 else
2368   eval cf_cv_prog_CC_c_o=no
2369 fi
2370 rm -f conftest*
2371
2372 fi
2373 if test $cf_cv_prog_CC_c_o = yes; then
2374   echo "$as_me:2374: result: yes" >&5
2375 echo "${ECHO_T}yes" >&6
2376 else
2377   echo "$as_me:2377: result: no" >&5
2378 echo "${ECHO_T}no" >&6
2379 fi
2380
2381 echo "$as_me:2381: checking for POSIXized ISC" >&5
2382 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2383 if test -d /etc/conf/kconfig.d &&
2384    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2385 then
2386   echo "$as_me:2386: result: yes" >&5
2387 echo "${ECHO_T}yes" >&6
2388   ISC=yes # If later tests want to check for ISC.
2389
2390 cat >>confdefs.h <<\EOF
2391 #define _POSIX_SOURCE 1
2392 EOF
2393
2394   if test "$GCC" = yes; then
2395     CC="$CC -posix"
2396   else
2397     CC="$CC -Xp"
2398   fi
2399 else
2400   echo "$as_me:2400: result: no" >&5
2401 echo "${ECHO_T}no" >&6
2402   ISC=
2403 fi
2404
2405 echo "$as_me:2405: checking for ${CC-cc} option to accept ANSI C" >&5
2406 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2407 if test "${cf_cv_ansi_cc+set}" = set; then
2408   echo $ECHO_N "(cached) $ECHO_C" >&6
2409 else
2410
2411 cf_cv_ansi_cc=no
2412 cf_save_CFLAGS="$CFLAGS"
2413 cf_save_CPPFLAGS="$CPPFLAGS"
2414 # Don't try gcc -ansi; that turns off useful extensions and
2415 # breaks some systems' header files.
2416 # AIX                   -qlanglvl=ansi
2417 # Ultrix and OSF/1      -std1
2418 # HP-UX                 -Aa -D_HPUX_SOURCE
2419 # SVR4                  -Xc
2420 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2421 for cf_arg in "-DCC_HAS_PROTOS" \
2422         "" \
2423         -qlanglvl=ansi \
2424         -std1 \
2425         -Ae \
2426         "-Aa -D_HPUX_SOURCE" \
2427         -Xc
2428 do
2429
2430 cf_fix_cppflags=no
2431 cf_new_cflags=
2432 cf_new_cppflags=
2433 cf_new_extra_cppflags=
2434
2435 for cf_add_cflags in $cf_arg
2436 do
2437 case $cf_fix_cppflags in
2438 no)
2439         case $cf_add_cflags in #(vi
2440         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2441                 case $cf_add_cflags in
2442                 -D*)
2443                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2444
2445                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2446                         && test -z "${cf_tst_cflags}" \
2447                         && cf_fix_cppflags=yes
2448
2449                         if test $cf_fix_cppflags = yes ; then
2450                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2451                                 continue
2452                         elif test "${cf_tst_cflags}" = "\"'" ; then
2453                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2454                                 continue
2455                         fi
2456                         ;;
2457                 esac
2458                 case "$CPPFLAGS" in
2459                 *$cf_add_cflags) #(vi
2460                         ;;
2461                 *) #(vi
2462                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2463                         ;;
2464                 esac
2465                 ;;
2466         *)
2467                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2468                 ;;
2469         esac
2470         ;;
2471 yes)
2472         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2473
2474         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2475
2476         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2477         && test -z "${cf_tst_cflags}" \
2478         && cf_fix_cppflags=no
2479         ;;
2480 esac
2481 done
2482
2483 if test -n "$cf_new_cflags" ; then
2484
2485         CFLAGS="$CFLAGS $cf_new_cflags"
2486 fi
2487
2488 if test -n "$cf_new_cppflags" ; then
2489
2490         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2491 fi
2492
2493 if test -n "$cf_new_extra_cppflags" ; then
2494
2495         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2496 fi
2497
2498         cat >conftest.$ac_ext <<_ACEOF
2499 #line 2499 "configure"
2500 #include "confdefs.h"
2501
2502 #ifndef CC_HAS_PROTOS
2503 #if !defined(__STDC__) || (__STDC__ != 1)
2504 choke me
2505 #endif
2506 #endif
2507
2508 int
2509 main ()
2510 {
2511
2512         int test (int i, double x);
2513         struct s1 {int (*f) (int a);};
2514         struct s2 {int (*f) (double a);};
2515   ;
2516   return 0;
2517 }
2518 _ACEOF
2519 rm -f conftest.$ac_objext
2520 if { (eval echo "$as_me:2520: \"$ac_compile\"") >&5
2521   (eval $ac_compile) 2>&5
2522   ac_status=$?
2523   echo "$as_me:2523: \$? = $ac_status" >&5
2524   (exit $ac_status); } &&
2525          { ac_try='test -s conftest.$ac_objext'
2526   { (eval echo "$as_me:2526: \"$ac_try\"") >&5
2527   (eval $ac_try) 2>&5
2528   ac_status=$?
2529   echo "$as_me:2529: \$? = $ac_status" >&5
2530   (exit $ac_status); }; }; then
2531   cf_cv_ansi_cc="$cf_arg"; break
2532 else
2533   echo "$as_me: failed program was:" >&5
2534 cat conftest.$ac_ext >&5
2535 fi
2536 rm -f conftest.$ac_objext conftest.$ac_ext
2537 done
2538 CFLAGS="$cf_save_CFLAGS"
2539 CPPFLAGS="$cf_save_CPPFLAGS"
2540
2541 fi
2542 echo "$as_me:2542: result: $cf_cv_ansi_cc" >&5
2543 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2544
2545 if test "$cf_cv_ansi_cc" != "no"; then
2546 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2547
2548 cf_fix_cppflags=no
2549 cf_new_cflags=
2550 cf_new_cppflags=
2551 cf_new_extra_cppflags=
2552
2553 for cf_add_cflags in $cf_cv_ansi_cc
2554 do
2555 case $cf_fix_cppflags in
2556 no)
2557         case $cf_add_cflags in #(vi
2558         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2559                 case $cf_add_cflags in
2560                 -D*)
2561                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2562
2563                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2564                         && test -z "${cf_tst_cflags}" \
2565                         && cf_fix_cppflags=yes
2566
2567                         if test $cf_fix_cppflags = yes ; then
2568                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2569                                 continue
2570                         elif test "${cf_tst_cflags}" = "\"'" ; then
2571                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2572                                 continue
2573                         fi
2574                         ;;
2575                 esac
2576                 case "$CPPFLAGS" in
2577                 *$cf_add_cflags) #(vi
2578                         ;;
2579                 *) #(vi
2580                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2581                         ;;
2582                 esac
2583                 ;;
2584         *)
2585                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2586                 ;;
2587         esac
2588         ;;
2589 yes)
2590         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2591
2592         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2593
2594         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2595         && test -z "${cf_tst_cflags}" \
2596         && cf_fix_cppflags=no
2597         ;;
2598 esac
2599 done
2600
2601 if test -n "$cf_new_cflags" ; then
2602
2603         CFLAGS="$CFLAGS $cf_new_cflags"
2604 fi
2605
2606 if test -n "$cf_new_cppflags" ; then
2607
2608         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2609 fi
2610
2611 if test -n "$cf_new_extra_cppflags" ; then
2612
2613         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2614 fi
2615
2616 else
2617         cat >>confdefs.h <<\EOF
2618 #define CC_HAS_PROTOS 1
2619 EOF
2620
2621 fi
2622 fi
2623
2624 if test "$cf_cv_ansi_cc" = "no"; then
2625         { { echo "$as_me:2625: error: Your compiler does not appear to recognize prototypes.
2626 You have the following choices:
2627         a. adjust your compiler options
2628         b. get an up-to-date compiler
2629         c. use a wrapper such as unproto" >&5
2630 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2631 You have the following choices:
2632         a. adjust your compiler options
2633         b. get an up-to-date compiler
2634         c. use a wrapper such as unproto" >&2;}
2635    { (exit 1); exit 1; }; }
2636 fi
2637
2638 case $cf_cv_system_name in
2639 os2*)
2640     CFLAGS="$CFLAGS -Zmt"
2641     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2642     CXXFLAGS="$CXXFLAGS -Zmt"
2643     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2644     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2645     ac_cv_exeext=.exe
2646     ;;
2647 esac
2648
2649 PROG_EXT="$EXEEXT"
2650
2651 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2652 #define PROG_EXT "$PROG_EXT"
2653 EOF
2654
2655 if test "$cross_compiling" = yes ; then
2656   LDCONFIG=:
2657 else
2658 case "$cf_cv_system_name" in #(vi
2659 freebsd*) #(vi
2660   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2661   ;;
2662 *) LDPATH=$PATH:/sbin:/usr/sbin
2663   # Extract the first word of "ldconfig", so it can be a program name with args.
2664 set dummy ldconfig; ac_word=$2
2665 echo "$as_me:2665: checking for $ac_word" >&5
2666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2667 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2668   echo $ECHO_N "(cached) $ECHO_C" >&6
2669 else
2670   case $LDCONFIG in
2671   [\\/]* | ?:[\\/]*)
2672   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2673   ;;
2674   *)
2675   ac_save_IFS=$IFS; IFS=$ac_path_separator
2676 ac_dummy="$LDPATH"
2677 for ac_dir in $ac_dummy; do
2678   IFS=$ac_save_IFS
2679   test -z "$ac_dir" && ac_dir=.
2680   if $as_executable_p "$ac_dir/$ac_word"; then
2681    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2682    echo "$as_me:2682: found $ac_dir/$ac_word" >&5
2683    break
2684 fi
2685 done
2686
2687   ;;
2688 esac
2689 fi
2690 LDCONFIG=$ac_cv_path_LDCONFIG
2691
2692 if test -n "$LDCONFIG"; then
2693   echo "$as_me:2693: result: $LDCONFIG" >&5
2694 echo "${ECHO_T}$LDCONFIG" >&6
2695 else
2696   echo "$as_me:2696: result: no" >&5
2697 echo "${ECHO_T}no" >&6
2698 fi
2699
2700   ;;
2701 esac
2702 fi
2703
2704 echo "$as_me:2704: checking if you want to ensure bool is consistent with C++" >&5
2705 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2706
2707 # Check whether --with-cxx or --without-cxx was given.
2708 if test "${with_cxx+set}" = set; then
2709   withval="$with_cxx"
2710   cf_with_cxx=$withval
2711 else
2712   cf_with_cxx=yes
2713 fi;
2714 echo "$as_me:2714: result: $cf_with_cxx" >&5
2715 echo "${ECHO_T}$cf_with_cxx" >&6
2716 if test "X$cf_with_cxx" = Xno ; then
2717         CXX=""
2718         GXX=""
2719 else
2720         # with autoconf 2.13, we can change the error to a warning:
2721                 ac_ext=cc
2722 ac_cpp='$CXXCPP $CPPFLAGS'
2723 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2726 ac_main_return=return
2727 if test -n "$ac_tool_prefix"; then
2728   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2729   do
2730     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2731 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2732 echo "$as_me:2732: checking for $ac_word" >&5
2733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2734 if test "${ac_cv_prog_CXX+set}" = set; then
2735   echo $ECHO_N "(cached) $ECHO_C" >&6
2736 else
2737   if test -n "$CXX"; then
2738   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2739 else
2740   ac_save_IFS=$IFS; IFS=$ac_path_separator
2741 ac_dummy="$PATH"
2742 for ac_dir in $ac_dummy; do
2743   IFS=$ac_save_IFS
2744   test -z "$ac_dir" && ac_dir=.
2745   $as_executable_p "$ac_dir/$ac_word" || continue
2746 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2747 echo "$as_me:2747: found $ac_dir/$ac_word" >&5
2748 break
2749 done
2750
2751 fi
2752 fi
2753 CXX=$ac_cv_prog_CXX
2754 if test -n "$CXX"; then
2755   echo "$as_me:2755: result: $CXX" >&5
2756 echo "${ECHO_T}$CXX" >&6
2757 else
2758   echo "$as_me:2758: result: no" >&5
2759 echo "${ECHO_T}no" >&6
2760 fi
2761
2762     test -n "$CXX" && break
2763   done
2764 fi
2765 if test -z "$CXX"; then
2766   ac_ct_CXX=$CXX
2767   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2768 do
2769   # Extract the first word of "$ac_prog", so it can be a program name with args.
2770 set dummy $ac_prog; ac_word=$2
2771 echo "$as_me:2771: checking for $ac_word" >&5
2772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2773 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2774   echo $ECHO_N "(cached) $ECHO_C" >&6
2775 else
2776   if test -n "$ac_ct_CXX"; then
2777   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2778 else
2779   ac_save_IFS=$IFS; IFS=$ac_path_separator
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782   IFS=$ac_save_IFS
2783   test -z "$ac_dir" && ac_dir=.
2784   $as_executable_p "$ac_dir/$ac_word" || continue
2785 ac_cv_prog_ac_ct_CXX="$ac_prog"
2786 echo "$as_me:2786: found $ac_dir/$ac_word" >&5
2787 break
2788 done
2789
2790 fi
2791 fi
2792 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2793 if test -n "$ac_ct_CXX"; then
2794   echo "$as_me:2794: result: $ac_ct_CXX" >&5
2795 echo "${ECHO_T}$ac_ct_CXX" >&6
2796 else
2797   echo "$as_me:2797: result: no" >&5
2798 echo "${ECHO_T}no" >&6
2799 fi
2800
2801   test -n "$ac_ct_CXX" && break
2802 done
2803 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2804
2805   CXX=$ac_ct_CXX
2806 fi
2807
2808 # Provide some information about the compiler.
2809 echo "$as_me:2809:" \
2810      "checking for C++ compiler version" >&5
2811 ac_compiler=`set X $ac_compile; echo $2`
2812 { (eval echo "$as_me:2812: \"$ac_compiler --version </dev/null >&5\"") >&5
2813   (eval $ac_compiler --version </dev/null >&5) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); }
2817 { (eval echo "$as_me:2817: \"$ac_compiler -v </dev/null >&5\"") >&5
2818   (eval $ac_compiler -v </dev/null >&5) 2>&5
2819   ac_status=$?
2820   echo "$as_me:2820: \$? = $ac_status" >&5
2821   (exit $ac_status); }
2822 { (eval echo "$as_me:2822: \"$ac_compiler -V </dev/null >&5\"") >&5
2823   (eval $ac_compiler -V </dev/null >&5) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }
2827
2828 echo "$as_me:2828: checking whether we are using the GNU C++ compiler" >&5
2829 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2830 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2831   echo $ECHO_N "(cached) $ECHO_C" >&6
2832 else
2833   cat >conftest.$ac_ext <<_ACEOF
2834 #line 2834 "configure"
2835 #include "confdefs.h"
2836
2837 int
2838 main ()
2839 {
2840 #ifndef __GNUC__
2841        choke me
2842 #endif
2843
2844   ;
2845   return 0;
2846 }
2847 _ACEOF
2848 rm -f conftest.$ac_objext
2849 if { (eval echo "$as_me:2849: \"$ac_compile\"") >&5
2850   (eval $ac_compile) 2>&5
2851   ac_status=$?
2852   echo "$as_me:2852: \$? = $ac_status" >&5
2853   (exit $ac_status); } &&
2854          { ac_try='test -s conftest.$ac_objext'
2855   { (eval echo "$as_me:2855: \"$ac_try\"") >&5
2856   (eval $ac_try) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); }; }; then
2860   ac_compiler_gnu=yes
2861 else
2862   echo "$as_me: failed program was:" >&5
2863 cat conftest.$ac_ext >&5
2864 ac_compiler_gnu=no
2865 fi
2866 rm -f conftest.$ac_objext conftest.$ac_ext
2867 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2868
2869 fi
2870 echo "$as_me:2870: result: $ac_cv_cxx_compiler_gnu" >&5
2871 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2872 GXX=`test $ac_compiler_gnu = yes && echo yes`
2873 ac_test_CXXFLAGS=${CXXFLAGS+set}
2874 ac_save_CXXFLAGS=$CXXFLAGS
2875 CXXFLAGS="-g"
2876 echo "$as_me:2876: checking whether $CXX accepts -g" >&5
2877 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2878 if test "${ac_cv_prog_cxx_g+set}" = set; then
2879   echo $ECHO_N "(cached) $ECHO_C" >&6
2880 else
2881   cat >conftest.$ac_ext <<_ACEOF
2882 #line 2882 "configure"
2883 #include "confdefs.h"
2884
2885 int
2886 main ()
2887 {
2888
2889   ;
2890   return 0;
2891 }
2892 _ACEOF
2893 rm -f conftest.$ac_objext
2894 if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
2895   (eval $ac_compile) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -s conftest.$ac_objext'
2900   { (eval echo "$as_me:2900: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); }; }; then
2905   ac_cv_prog_cxx_g=yes
2906 else
2907   echo "$as_me: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 ac_cv_prog_cxx_g=no
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 fi
2913 echo "$as_me:2913: result: $ac_cv_prog_cxx_g" >&5
2914 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2915 if test "$ac_test_CXXFLAGS" = set; then
2916   CXXFLAGS=$ac_save_CXXFLAGS
2917 elif test $ac_cv_prog_cxx_g = yes; then
2918   if test "$GXX" = yes; then
2919     CXXFLAGS="-g -O2"
2920   else
2921     CXXFLAGS="-g"
2922   fi
2923 else
2924   if test "$GXX" = yes; then
2925     CXXFLAGS="-O2"
2926   else
2927     CXXFLAGS=
2928   fi
2929 fi
2930 for ac_declaration in \
2931    ''\
2932    '#include <stdlib.h>' \
2933    'extern "C" void std::exit (int) throw (); using std::exit;' \
2934    'extern "C" void std::exit (int); using std::exit;' \
2935    'extern "C" void exit (int) throw ();' \
2936    'extern "C" void exit (int);' \
2937    'void exit (int);'
2938 do
2939   cat >conftest.$ac_ext <<_ACEOF
2940 #line 2940 "configure"
2941 #include "confdefs.h"
2942 #include <stdlib.h>
2943 $ac_declaration
2944 int
2945 main ()
2946 {
2947 exit (42);
2948   ;
2949   return 0;
2950 }
2951 _ACEOF
2952 rm -f conftest.$ac_objext
2953 if { (eval echo "$as_me:2953: \"$ac_compile\"") >&5
2954   (eval $ac_compile) 2>&5
2955   ac_status=$?
2956   echo "$as_me:2956: \$? = $ac_status" >&5
2957   (exit $ac_status); } &&
2958          { ac_try='test -s conftest.$ac_objext'
2959   { (eval echo "$as_me:2959: \"$ac_try\"") >&5
2960   (eval $ac_try) 2>&5
2961   ac_status=$?
2962   echo "$as_me:2962: \$? = $ac_status" >&5
2963   (exit $ac_status); }; }; then
2964   :
2965 else
2966   echo "$as_me: failed program was:" >&5
2967 cat conftest.$ac_ext >&5
2968 continue
2969 fi
2970 rm -f conftest.$ac_objext conftest.$ac_ext
2971   cat >conftest.$ac_ext <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 $ac_declaration
2975 int
2976 main ()
2977 {
2978 exit (42);
2979   ;
2980   return 0;
2981 }
2982 _ACEOF
2983 rm -f conftest.$ac_objext
2984 if { (eval echo "$as_me:2984: \"$ac_compile\"") >&5
2985   (eval $ac_compile) 2>&5
2986   ac_status=$?
2987   echo "$as_me:2987: \$? = $ac_status" >&5
2988   (exit $ac_status); } &&
2989          { ac_try='test -s conftest.$ac_objext'
2990   { (eval echo "$as_me:2990: \"$ac_try\"") >&5
2991   (eval $ac_try) 2>&5
2992   ac_status=$?
2993   echo "$as_me:2993: \$? = $ac_status" >&5
2994   (exit $ac_status); }; }; then
2995   break
2996 else
2997   echo "$as_me: failed program was:" >&5
2998 cat conftest.$ac_ext >&5
2999 fi
3000 rm -f conftest.$ac_objext conftest.$ac_ext
3001 done
3002 rm -f conftest*
3003 if test -n "$ac_declaration"; then
3004   echo '#ifdef __cplusplus' >>confdefs.h
3005   echo $ac_declaration      >>confdefs.h
3006   echo '#endif'             >>confdefs.h
3007 fi
3008
3009 ac_ext=c
3010 ac_cpp='$CPP $CPPFLAGS'
3011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3014 ac_main_return=return
3015
3016                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3017         if test "$CXX" = "g++" ; then
3018                 # Extract the first word of "g++", so it can be a program name with args.
3019 set dummy g++; ac_word=$2
3020 echo "$as_me:3020: checking for $ac_word" >&5
3021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3022 if test "${ac_cv_path_CXX+set}" = set; then
3023   echo $ECHO_N "(cached) $ECHO_C" >&6
3024 else
3025   case $CXX in
3026   [\\/]* | ?:[\\/]*)
3027   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3028   ;;
3029   *)
3030   ac_save_IFS=$IFS; IFS=$ac_path_separator
3031 ac_dummy="$PATH"
3032 for ac_dir in $ac_dummy; do
3033   IFS=$ac_save_IFS
3034   test -z "$ac_dir" && ac_dir=.
3035   if $as_executable_p "$ac_dir/$ac_word"; then
3036    ac_cv_path_CXX="$ac_dir/$ac_word"
3037    echo "$as_me:3037: found $ac_dir/$ac_word" >&5
3038    break
3039 fi
3040 done
3041
3042   ;;
3043 esac
3044 fi
3045 CXX=$ac_cv_path_CXX
3046
3047 if test -n "$CXX"; then
3048   echo "$as_me:3048: result: $CXX" >&5
3049 echo "${ECHO_T}$CXX" >&6
3050 else
3051   echo "$as_me:3051: result: no" >&5
3052 echo "${ECHO_T}no" >&6
3053 fi
3054
3055         fi
3056         if test "$CXX" = "g++" ; then
3057                 { echo "$as_me:3057: WARNING: ignoring hardcoded g++" >&5
3058 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3059                 cf_with_cxx=no; CXX=""; GXX="";
3060         fi
3061 fi
3062
3063 GXX_VERSION=none
3064 if test "$GXX" = yes; then
3065         echo "$as_me:3065: checking version of g++" >&5
3066 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3067         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3068         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3069         echo "$as_me:3069: result: $GXX_VERSION" >&5
3070 echo "${ECHO_T}$GXX_VERSION" >&6
3071 fi
3072
3073 case $GXX_VERSION in
3074 1*|2.[0-6]*)
3075         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3076         # cf_cxx_library=no
3077         { echo "$as_me:3077: WARNING: templates do not work" >&5
3078 echo "$as_me: WARNING: templates do not work" >&2;}
3079         ;;
3080 esac
3081
3082 echo "$as_me:3082: checking if you want to build C++ binding and demo" >&5
3083 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3084
3085 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3086 if test "${with_cxx_binding+set}" = set; then
3087   withval="$with_cxx_binding"
3088   cf_with_cxx_binding=$withval
3089 else
3090   cf_with_cxx_binding=$cf_with_cxx
3091 fi;
3092 echo "$as_me:3092: result: $cf_with_cxx_binding" >&5
3093 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3094
3095 echo "$as_me:3095: checking if you want to build with Ada95" >&5
3096 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3097
3098 # Check whether --with-ada or --without-ada was given.
3099 if test "${with_ada+set}" = set; then
3100   withval="$with_ada"
3101   cf_with_ada=$withval
3102 else
3103   cf_with_ada=yes
3104 fi;
3105 echo "$as_me:3105: result: $cf_with_ada" >&5
3106 echo "${ECHO_T}$cf_with_ada" >&6
3107
3108 echo "$as_me:3108: checking if you want to build programs such as tic" >&5
3109 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3110
3111 # Check whether --with-progs or --without-progs was given.
3112 if test "${with_progs+set}" = set; then
3113   withval="$with_progs"
3114   cf_with_progs=$withval
3115 else
3116   cf_with_progs=yes
3117 fi;
3118 echo "$as_me:3118: result: $cf_with_progs" >&5
3119 echo "${ECHO_T}$cf_with_progs" >&6
3120
3121 echo "$as_me:3121: checking if you wish to install curses.h" >&5
3122 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3123
3124 # Check whether --with-curses-h or --without-curses-h was given.
3125 if test "${with_curses_h+set}" = set; then
3126   withval="$with_curses_h"
3127   with_curses_h=$withval
3128 else
3129   with_curses_h=yes
3130 fi;
3131 echo "$as_me:3131: result: $with_curses_h" >&5
3132 echo "${ECHO_T}$with_curses_h" >&6
3133
3134 modules_to_build="ncurses"
3135 if test "X$cf_with_progs" != Xno ; then
3136 modules_to_build="$modules_to_build progs tack"
3137 fi
3138 modules_to_build="$modules_to_build panel menu form"
3139
3140 test "$program_prefix" != NONE &&
3141   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3142 # Use a double $ so make ignores it.
3143 test "$program_suffix" != NONE &&
3144   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3145 # Double any \ or $.  echo might interpret backslashes.
3146 # By default was `s,x,x', remove it if useless.
3147 cat <<\_ACEOF >conftest.sed
3148 s/[\\$]/&&/g;s/;s,x,x,$//
3149 _ACEOF
3150 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3151 rm conftest.sed
3152
3153 for ac_prog in mawk gawk nawk awk
3154 do
3155   # Extract the first word of "$ac_prog", so it can be a program name with args.
3156 set dummy $ac_prog; ac_word=$2
3157 echo "$as_me:3157: checking for $ac_word" >&5
3158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3159 if test "${ac_cv_prog_AWK+set}" = set; then
3160   echo $ECHO_N "(cached) $ECHO_C" >&6
3161 else
3162   if test -n "$AWK"; then
3163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3164 else
3165   ac_save_IFS=$IFS; IFS=$ac_path_separator
3166 ac_dummy="$PATH"
3167 for ac_dir in $ac_dummy; do
3168   IFS=$ac_save_IFS
3169   test -z "$ac_dir" && ac_dir=.
3170   $as_executable_p "$ac_dir/$ac_word" || continue
3171 ac_cv_prog_AWK="$ac_prog"
3172 echo "$as_me:3172: found $ac_dir/$ac_word" >&5
3173 break
3174 done
3175
3176 fi
3177 fi
3178 AWK=$ac_cv_prog_AWK
3179 if test -n "$AWK"; then
3180   echo "$as_me:3180: result: $AWK" >&5
3181 echo "${ECHO_T}$AWK" >&6
3182 else
3183   echo "$as_me:3183: result: no" >&5
3184 echo "${ECHO_T}no" >&6
3185 fi
3186
3187   test -n "$AWK" && break
3188 done
3189
3190 test -z "$AWK" && { { echo "$as_me:3190: error: No awk program found" >&5
3191 echo "$as_me: error: No awk program found" >&2;}
3192    { (exit 1); exit 1; }; }
3193
3194 echo "$as_me:3194: checking for egrep" >&5
3195 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3196 if test "${ac_cv_prog_egrep+set}" = set; then
3197   echo $ECHO_N "(cached) $ECHO_C" >&6
3198 else
3199   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3200     then ac_cv_prog_egrep='grep -E'
3201     else ac_cv_prog_egrep='egrep'
3202     fi
3203 fi
3204 echo "$as_me:3204: result: $ac_cv_prog_egrep" >&5
3205 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3206  EGREP=$ac_cv_prog_egrep
3207
3208 test -z "$EGREP" && { { echo "$as_me:3208: error: No egrep program found" >&5
3209 echo "$as_me: error: No egrep program found" >&2;}
3210    { (exit 1); exit 1; }; }
3211
3212 # Find a good install program.  We prefer a C program (faster),
3213 # so one script is as good as another.  But avoid the broken or
3214 # incompatible versions:
3215 # SysV /etc/install, /usr/sbin/install
3216 # SunOS /usr/etc/install
3217 # IRIX /sbin/install
3218 # AIX /bin/install
3219 # AmigaOS /C/install, which installs bootblocks on floppy discs
3220 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3221 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3222 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3223 # ./install, which can be erroneously created by make from ./install.sh.
3224 echo "$as_me:3224: checking for a BSD compatible install" >&5
3225 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3226 if test -z "$INSTALL"; then
3227 if test "${ac_cv_path_install+set}" = set; then
3228   echo $ECHO_N "(cached) $ECHO_C" >&6
3229 else
3230     ac_save_IFS=$IFS; IFS=$ac_path_separator
3231   for ac_dir in $PATH; do
3232     IFS=$ac_save_IFS
3233     # Account for people who put trailing slashes in PATH elements.
3234     case $ac_dir/ in
3235     / | ./ | .// | /cC/* \
3236     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3237     | /usr/ucb/* ) ;;
3238     *)
3239       # OSF1 and SCO ODT 3.0 have their own names for install.
3240       # Don't use installbsd from OSF since it installs stuff as root
3241       # by default.
3242       for ac_prog in ginstall scoinst install; do
3243         if $as_executable_p "$ac_dir/$ac_prog"; then
3244           if test $ac_prog = install &&
3245             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3246             # AIX install.  It has an incompatible calling convention.
3247             :
3248           elif test $ac_prog = install &&
3249             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3250             # program-specific install script used by HP pwplus--don't use.
3251             :
3252           else
3253             ac_cv_path_install="$ac_dir/$ac_prog -c"
3254             break 2
3255           fi
3256         fi
3257       done
3258       ;;
3259     esac
3260   done
3261
3262 fi
3263   if test "${ac_cv_path_install+set}" = set; then
3264     INSTALL=$ac_cv_path_install
3265   else
3266     # As a last resort, use the slow shell script.  We don't cache a
3267     # path for INSTALL within a source directory, because that will
3268     # break other packages using the cache if that directory is
3269     # removed, or if the path is relative.
3270     INSTALL=$ac_install_sh
3271   fi
3272 fi
3273 echo "$as_me:3273: result: $INSTALL" >&5
3274 echo "${ECHO_T}$INSTALL" >&6
3275
3276 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3277 # It thinks the first close brace ends the variable substitution.
3278 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3279
3280 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3281
3282 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3283
3284 case $INSTALL in
3285 /*)
3286   ;;
3287 *)
3288   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3289   test -z "$cf_dir" && cf_dir=.
3290   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3291   ;;
3292 esac
3293
3294 for ac_prog in tdlint lint alint
3295 do
3296   # Extract the first word of "$ac_prog", so it can be a program name with args.
3297 set dummy $ac_prog; ac_word=$2
3298 echo "$as_me:3298: checking for $ac_word" >&5
3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300 if test "${ac_cv_prog_LINT+set}" = set; then
3301   echo $ECHO_N "(cached) $ECHO_C" >&6
3302 else
3303   if test -n "$LINT"; then
3304   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3305 else
3306   ac_save_IFS=$IFS; IFS=$ac_path_separator
3307 ac_dummy="$PATH"
3308 for ac_dir in $ac_dummy; do
3309   IFS=$ac_save_IFS
3310   test -z "$ac_dir" && ac_dir=.
3311   $as_executable_p "$ac_dir/$ac_word" || continue
3312 ac_cv_prog_LINT="$ac_prog"
3313 echo "$as_me:3313: found $ac_dir/$ac_word" >&5
3314 break
3315 done
3316
3317 fi
3318 fi
3319 LINT=$ac_cv_prog_LINT
3320 if test -n "$LINT"; then
3321   echo "$as_me:3321: result: $LINT" >&5
3322 echo "${ECHO_T}$LINT" >&6
3323 else
3324   echo "$as_me:3324: result: no" >&5
3325 echo "${ECHO_T}no" >&6
3326 fi
3327
3328   test -n "$LINT" && break
3329 done
3330
3331 echo "$as_me:3331: checking whether ln -s works" >&5
3332 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3333 LN_S=$as_ln_s
3334 if test "$LN_S" = "ln -s"; then
3335   echo "$as_me:3335: result: yes" >&5
3336 echo "${ECHO_T}yes" >&6
3337 else
3338   echo "$as_me:3338: result: no, using $LN_S" >&5
3339 echo "${ECHO_T}no, using $LN_S" >&6
3340 fi
3341
3342 echo "$as_me:3342: checking whether ${MAKE-make} sets \${MAKE}" >&5
3343 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3344 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3345 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3346   echo $ECHO_N "(cached) $ECHO_C" >&6
3347 else
3348   cat >conftest.make <<\EOF
3349 all:
3350         @echo 'ac_maketemp="${MAKE}"'
3351 EOF
3352 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3353 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3354 if test -n "$ac_maketemp"; then
3355   eval ac_cv_prog_make_${ac_make}_set=yes
3356 else
3357   eval ac_cv_prog_make_${ac_make}_set=no
3358 fi
3359 rm -f conftest.make
3360 fi
3361 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3362   echo "$as_me:3362: result: yes" >&5
3363 echo "${ECHO_T}yes" >&6
3364   SET_MAKE=
3365 else
3366   echo "$as_me:3366: result: no" >&5
3367 echo "${ECHO_T}no" >&6
3368   SET_MAKE="MAKE=${MAKE-make}"
3369 fi
3370
3371 echo "$as_me:3371: checking if filesystem supports mixed-case filenames" >&5
3372 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3373 if test "${cf_cv_mixedcase+set}" = set; then
3374   echo $ECHO_N "(cached) $ECHO_C" >&6
3375 else
3376
3377 if test "$cross_compiling" = yes ; then
3378         case $target_alias in #(vi
3379         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3380                 cf_cv_mixedcase=no
3381                 ;;
3382         *)
3383                 cf_cv_mixedcase=yes
3384                 ;;
3385         esac
3386 else
3387         rm -f conftest CONFTEST
3388         echo test >conftest
3389         if test -f CONFTEST ; then
3390                 cf_cv_mixedcase=no
3391         else
3392                 cf_cv_mixedcase=yes
3393         fi
3394         rm -f conftest CONFTEST
3395 fi
3396
3397 fi
3398 echo "$as_me:3398: result: $cf_cv_mixedcase" >&5
3399 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3400 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3401 #define MIXEDCASE_FILENAMES 1
3402 EOF
3403
3404 # Extract the first word of "ctags", so it can be a program name with args.
3405 set dummy ctags; ac_word=$2
3406 echo "$as_me:3406: checking for $ac_word" >&5
3407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3408 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3409   echo $ECHO_N "(cached) $ECHO_C" >&6
3410 else
3411   if test -n "$MAKE_LOWER_TAGS"; then
3412   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3413 else
3414   ac_save_IFS=$IFS; IFS=$ac_path_separator
3415 ac_dummy="$PATH"
3416 for ac_dir in $ac_dummy; do
3417   IFS=$ac_save_IFS
3418   test -z "$ac_dir" && ac_dir=.
3419   $as_executable_p "$ac_dir/$ac_word" || continue
3420 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3421 echo "$as_me:3421: found $ac_dir/$ac_word" >&5
3422 break
3423 done
3424
3425   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3426 fi
3427 fi
3428 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3429 if test -n "$MAKE_LOWER_TAGS"; then
3430   echo "$as_me:3430: result: $MAKE_LOWER_TAGS" >&5
3431 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3432 else
3433   echo "$as_me:3433: result: no" >&5
3434 echo "${ECHO_T}no" >&6
3435 fi
3436
3437 if test "$cf_cv_mixedcase" = yes ; then
3438         # Extract the first word of "etags", so it can be a program name with args.
3439 set dummy etags; ac_word=$2
3440 echo "$as_me:3440: checking for $ac_word" >&5
3441 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3442 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3443   echo $ECHO_N "(cached) $ECHO_C" >&6
3444 else
3445   if test -n "$MAKE_UPPER_TAGS"; then
3446   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3447 else
3448   ac_save_IFS=$IFS; IFS=$ac_path_separator
3449 ac_dummy="$PATH"
3450 for ac_dir in $ac_dummy; do
3451   IFS=$ac_save_IFS
3452   test -z "$ac_dir" && ac_dir=.
3453   $as_executable_p "$ac_dir/$ac_word" || continue
3454 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3455 echo "$as_me:3455: found $ac_dir/$ac_word" >&5
3456 break
3457 done
3458
3459   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3460 fi
3461 fi
3462 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3463 if test -n "$MAKE_UPPER_TAGS"; then
3464   echo "$as_me:3464: result: $MAKE_UPPER_TAGS" >&5
3465 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3466 else
3467   echo "$as_me:3467: result: no" >&5
3468 echo "${ECHO_T}no" >&6
3469 fi
3470
3471 else
3472         MAKE_UPPER_TAGS=no
3473 fi
3474
3475 if test "$MAKE_UPPER_TAGS" = yes ; then
3476         MAKE_UPPER_TAGS=
3477 else
3478         MAKE_UPPER_TAGS="#"
3479 fi
3480
3481 if test "$MAKE_LOWER_TAGS" = yes ; then
3482         MAKE_LOWER_TAGS=
3483 else
3484         MAKE_LOWER_TAGS="#"
3485 fi
3486
3487 echo "$as_me:3487: checking for makeflags variable" >&5
3488 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3489 if test "${cf_cv_makeflags+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" >&6
3491 else
3492
3493         cf_cv_makeflags=''
3494         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3495         do
3496                 cat >cf_makeflags.tmp <<CF_EOF
3497 SHELL = /bin/sh
3498 all :
3499         @ echo '.$cf_option'
3500 CF_EOF
3501                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3502                 case "$cf_result" in
3503                 .*k)
3504                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3505                         case "$cf_result" in
3506                         .*CC=*) cf_cv_makeflags=
3507                                 ;;
3508                         *)      cf_cv_makeflags=$cf_option
3509                                 ;;
3510                         esac
3511                         break
3512                         ;;
3513                 .-)     ;;
3514                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3515                         ;;
3516                 esac
3517         done
3518         rm -f cf_makeflags.tmp
3519
3520 fi
3521 echo "$as_me:3521: result: $cf_cv_makeflags" >&5
3522 echo "${ECHO_T}$cf_cv_makeflags" >&6
3523
3524 echo "$as_me:3524: checking for long file names" >&5
3525 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3526 if test "${ac_cv_sys_long_file_names+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   ac_cv_sys_long_file_names=yes
3530 # Test for long file names in all the places we know might matter:
3531 #      .                the current directory, where building will happen
3532 #      $prefix/lib      where we will be installing things
3533 #      $exec_prefix/lib likewise
3534 # eval it to expand exec_prefix.
3535 #      $TMPDIR          if set, where it might want to write temporary files
3536 # if $TMPDIR is not set:
3537 #      /tmp             where it might want to write temporary files
3538 #      /var/tmp         likewise
3539 #      /usr/tmp         likewise
3540 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3541   ac_tmpdirs=$TMPDIR
3542 else
3543   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3544 fi
3545 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3546   test -d $ac_dir || continue
3547   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3548   ac_xdir=$ac_dir/cf$$
3549   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3550   ac_tf1=$ac_xdir/conftest9012345
3551   ac_tf2=$ac_xdir/conftest9012346
3552   (echo 1 >$ac_tf1) 2>/dev/null
3553   (echo 2 >$ac_tf2) 2>/dev/null
3554   ac_val=`cat $ac_tf1 2>/dev/null`
3555   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3556     ac_cv_sys_long_file_names=no
3557     rm -rf $ac_xdir 2>/dev/null
3558     break
3559   fi
3560   rm -rf $ac_xdir 2>/dev/null
3561 done
3562 fi
3563 echo "$as_me:3563: result: $ac_cv_sys_long_file_names" >&5
3564 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3565 if test $ac_cv_sys_long_file_names = yes; then
3566
3567 cat >>confdefs.h <<\EOF
3568 #define HAVE_LONG_FILE_NAMES 1
3569 EOF
3570
3571 fi
3572
3573 echo "$as_me:3573: checking if filesystem supports mixed-case filenames" >&5
3574 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3575 if test "${cf_cv_mixedcase+set}" = set; then
3576   echo $ECHO_N "(cached) $ECHO_C" >&6
3577 else
3578
3579 if test "$cross_compiling" = yes ; then
3580         case $target_alias in #(vi
3581         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3582                 cf_cv_mixedcase=no
3583                 ;;
3584         *)
3585                 cf_cv_mixedcase=yes
3586                 ;;
3587         esac
3588 else
3589         rm -f conftest CONFTEST
3590         echo test >conftest
3591         if test -f CONFTEST ; then
3592                 cf_cv_mixedcase=no
3593         else
3594                 cf_cv_mixedcase=yes
3595         fi
3596         rm -f conftest CONFTEST
3597 fi
3598
3599 fi
3600 echo "$as_me:3600: result: $cf_cv_mixedcase" >&5
3601 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3602 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3603 #define MIXEDCASE_FILENAMES 1
3604 EOF
3605
3606 if test -n "$ac_tool_prefix"; then
3607   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3608 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3609 echo "$as_me:3609: checking for $ac_word" >&5
3610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3611 if test "${ac_cv_prog_RANLIB+set}" = set; then
3612   echo $ECHO_N "(cached) $ECHO_C" >&6
3613 else
3614   if test -n "$RANLIB"; then
3615   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3616 else
3617   ac_save_IFS=$IFS; IFS=$ac_path_separator
3618 ac_dummy="$PATH"
3619 for ac_dir in $ac_dummy; do
3620   IFS=$ac_save_IFS
3621   test -z "$ac_dir" && ac_dir=.
3622   $as_executable_p "$ac_dir/$ac_word" || continue
3623 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3624 echo "$as_me:3624: found $ac_dir/$ac_word" >&5
3625 break
3626 done
3627
3628 fi
3629 fi
3630 RANLIB=$ac_cv_prog_RANLIB
3631 if test -n "$RANLIB"; then
3632   echo "$as_me:3632: result: $RANLIB" >&5
3633 echo "${ECHO_T}$RANLIB" >&6
3634 else
3635   echo "$as_me:3635: result: no" >&5
3636 echo "${ECHO_T}no" >&6
3637 fi
3638
3639 fi
3640 if test -z "$ac_cv_prog_RANLIB"; then
3641   ac_ct_RANLIB=$RANLIB
3642   # Extract the first word of "ranlib", so it can be a program name with args.
3643 set dummy ranlib; ac_word=$2
3644 echo "$as_me:3644: checking for $ac_word" >&5
3645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3646 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3647   echo $ECHO_N "(cached) $ECHO_C" >&6
3648 else
3649   if test -n "$ac_ct_RANLIB"; then
3650   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3651 else
3652   ac_save_IFS=$IFS; IFS=$ac_path_separator
3653 ac_dummy="$PATH"
3654 for ac_dir in $ac_dummy; do
3655   IFS=$ac_save_IFS
3656   test -z "$ac_dir" && ac_dir=.
3657   $as_executable_p "$ac_dir/$ac_word" || continue
3658 ac_cv_prog_ac_ct_RANLIB="ranlib"
3659 echo "$as_me:3659: found $ac_dir/$ac_word" >&5
3660 break
3661 done
3662
3663   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3664 fi
3665 fi
3666 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3667 if test -n "$ac_ct_RANLIB"; then
3668   echo "$as_me:3668: result: $ac_ct_RANLIB" >&5
3669 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3670 else
3671   echo "$as_me:3671: result: no" >&5
3672 echo "${ECHO_T}no" >&6
3673 fi
3674
3675   RANLIB=$ac_ct_RANLIB
3676 else
3677   RANLIB="$ac_cv_prog_RANLIB"
3678 fi
3679
3680 if test -n "$ac_tool_prefix"; then
3681   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3682 set dummy ${ac_tool_prefix}ld; ac_word=$2
3683 echo "$as_me:3683: checking for $ac_word" >&5
3684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3685 if test "${ac_cv_prog_LD+set}" = set; then
3686   echo $ECHO_N "(cached) $ECHO_C" >&6
3687 else
3688   if test -n "$LD"; then
3689   ac_cv_prog_LD="$LD" # Let the user override the test.
3690 else
3691   ac_save_IFS=$IFS; IFS=$ac_path_separator
3692 ac_dummy="$PATH"
3693 for ac_dir in $ac_dummy; do
3694   IFS=$ac_save_IFS
3695   test -z "$ac_dir" && ac_dir=.
3696   $as_executable_p "$ac_dir/$ac_word" || continue
3697 ac_cv_prog_LD="${ac_tool_prefix}ld"
3698 echo "$as_me:3698: found $ac_dir/$ac_word" >&5
3699 break
3700 done
3701
3702 fi
3703 fi
3704 LD=$ac_cv_prog_LD
3705 if test -n "$LD"; then
3706   echo "$as_me:3706: result: $LD" >&5
3707 echo "${ECHO_T}$LD" >&6
3708 else
3709   echo "$as_me:3709: result: no" >&5
3710 echo "${ECHO_T}no" >&6
3711 fi
3712
3713 fi
3714 if test -z "$ac_cv_prog_LD"; then
3715   ac_ct_LD=$LD
3716   # Extract the first word of "ld", so it can be a program name with args.
3717 set dummy ld; ac_word=$2
3718 echo "$as_me:3718: checking for $ac_word" >&5
3719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3720 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723   if test -n "$ac_ct_LD"; then
3724   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3725 else
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   $as_executable_p "$ac_dir/$ac_word" || continue
3732 ac_cv_prog_ac_ct_LD="ld"
3733 echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734 break
3735 done
3736
3737   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3738 fi
3739 fi
3740 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3741 if test -n "$ac_ct_LD"; then
3742   echo "$as_me:3742: result: $ac_ct_LD" >&5
3743 echo "${ECHO_T}$ac_ct_LD" >&6
3744 else
3745   echo "$as_me:3745: result: no" >&5
3746 echo "${ECHO_T}no" >&6
3747 fi
3748
3749   LD=$ac_ct_LD
3750 else
3751   LD="$ac_cv_prog_LD"
3752 fi
3753
3754 if test -n "$ac_tool_prefix"; then
3755   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3756 set dummy ${ac_tool_prefix}ar; ac_word=$2
3757 echo "$as_me:3757: checking for $ac_word" >&5
3758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3759 if test "${ac_cv_prog_AR+set}" = set; then
3760   echo $ECHO_N "(cached) $ECHO_C" >&6
3761 else
3762   if test -n "$AR"; then
3763   ac_cv_prog_AR="$AR" # Let the user override the test.
3764 else
3765   ac_save_IFS=$IFS; IFS=$ac_path_separator
3766 ac_dummy="$PATH"
3767 for ac_dir in $ac_dummy; do
3768   IFS=$ac_save_IFS
3769   test -z "$ac_dir" && ac_dir=.
3770   $as_executable_p "$ac_dir/$ac_word" || continue
3771 ac_cv_prog_AR="${ac_tool_prefix}ar"
3772 echo "$as_me:3772: found $ac_dir/$ac_word" >&5
3773 break
3774 done
3775
3776 fi
3777 fi
3778 AR=$ac_cv_prog_AR
3779 if test -n "$AR"; then
3780   echo "$as_me:3780: result: $AR" >&5
3781 echo "${ECHO_T}$AR" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787 fi
3788 if test -z "$ac_cv_prog_AR"; then
3789   ac_ct_AR=$AR
3790   # Extract the first word of "ar", so it can be a program name with args.
3791 set dummy ar; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   if test -n "$ac_ct_AR"; then
3798   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3799 else
3800   ac_save_IFS=$IFS; IFS=$ac_path_separator
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803   IFS=$ac_save_IFS
3804   test -z "$ac_dir" && ac_dir=.
3805   $as_executable_p "$ac_dir/$ac_word" || continue
3806 ac_cv_prog_ac_ct_AR="ar"
3807 echo "$as_me:3807: found $ac_dir/$ac_word" >&5
3808 break
3809 done
3810
3811   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3812 fi
3813 fi
3814 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3815 if test -n "$ac_ct_AR"; then
3816   echo "$as_me:3816: result: $ac_ct_AR" >&5
3817 echo "${ECHO_T}$ac_ct_AR" >&6
3818 else
3819   echo "$as_me:3819: result: no" >&5
3820 echo "${ECHO_T}no" >&6
3821 fi
3822
3823   AR=$ac_ct_AR
3824 else
3825   AR="$ac_cv_prog_AR"
3826 fi
3827
3828 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3829   echo $ECHO_N "(cached) $ECHO_C" >&6
3830 else
3831
3832 echo "$as_me:3832: checking for archiver options (symbol AR_OPTS)" >&5
3833 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3834
3835 if test -z "$AR_OPTS" ; then
3836         AR_OPTS=rv
3837
3838 fi
3839
3840 cf_cv_subst_AR_OPTS=$AR_OPTS
3841 echo "$as_me:3841: result: $AR_OPTS" >&5
3842 echo "${ECHO_T}$AR_OPTS" >&6
3843
3844 fi
3845
3846 echo "$as_me:3846: checking if you have specified an install-prefix" >&5
3847 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3848
3849 # Check whether --with-install-prefix or --without-install-prefix was given.
3850 if test "${with_install_prefix+set}" = set; then
3851   withval="$with_install_prefix"
3852   case "$withval" in #(vi
3853         yes|no) #(vi
3854                 ;;
3855         *)      DESTDIR="$withval"
3856                 ;;
3857         esac
3858 fi;
3859 echo "$as_me:3859: result: $DESTDIR" >&5
3860 echo "${ECHO_T}$DESTDIR" >&6
3861
3862 ###############################################################################
3863
3864 # If we're cross-compiling, allow the user to override the tools and their
3865 # options.  The configure script is oriented toward identifying the host
3866 # compiler, etc., but we need a build compiler to generate parts of the source.
3867
3868 if test "$cross_compiling" = yes ; then
3869
3870         # defaults that we might want to override
3871         : ${BUILD_CFLAGS:=''}
3872         : ${BUILD_CPPFLAGS:=''}
3873         : ${BUILD_LDFLAGS:=''}
3874         : ${BUILD_LIBS:=''}
3875         : ${BUILD_EXEEXT:='$x'}
3876         : ${BUILD_OBJEXT:='o'}
3877
3878 # Check whether --with-build-cc or --without-build-cc was given.
3879 if test "${with_build_cc+set}" = set; then
3880   withval="$with_build_cc"
3881   BUILD_CC="$withval"
3882 else
3883   for ac_prog in gcc cc cl
3884 do
3885   # Extract the first word of "$ac_prog", so it can be a program name with args.
3886 set dummy $ac_prog; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$BUILD_CC"; then
3893   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_BUILD_CC="$ac_prog"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906 fi
3907 fi
3908 BUILD_CC=$ac_cv_prog_BUILD_CC
3909 if test -n "$BUILD_CC"; then
3910   echo "$as_me:3910: result: $BUILD_CC" >&5
3911 echo "${ECHO_T}$BUILD_CC" >&6
3912 else
3913   echo "$as_me:3913: result: no" >&5
3914 echo "${ECHO_T}no" >&6
3915 fi
3916
3917   test -n "$BUILD_CC" && break
3918 done
3919
3920 fi;
3921         echo "$as_me:3921: checking for native build C compiler" >&5
3922 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3923         echo "$as_me:3923: result: $BUILD_CC" >&5
3924 echo "${ECHO_T}$BUILD_CC" >&6
3925
3926         echo "$as_me:3926: checking for native build C preprocessor" >&5
3927 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3928
3929 # Check whether --with-build-cpp or --without-build-cpp was given.
3930 if test "${with_build_cpp+set}" = set; then
3931   withval="$with_build_cpp"
3932   BUILD_CPP="$withval"
3933 else
3934   BUILD_CPP='${BUILD_CC} -E'
3935 fi;
3936         echo "$as_me:3936: result: $BUILD_CPP" >&5
3937 echo "${ECHO_T}$BUILD_CPP" >&6
3938
3939         echo "$as_me:3939: checking for native build C flags" >&5
3940 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3941
3942 # Check whether --with-build-cflags or --without-build-cflags was given.
3943 if test "${with_build_cflags+set}" = set; then
3944   withval="$with_build_cflags"
3945   BUILD_CFLAGS="$withval"
3946 fi;
3947         echo "$as_me:3947: result: $BUILD_CFLAGS" >&5
3948 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3949
3950         echo "$as_me:3950: checking for native build C preprocessor-flags" >&5
3951 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3952
3953 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3954 if test "${with_build_cppflags+set}" = set; then
3955   withval="$with_build_cppflags"
3956   BUILD_CPPFLAGS="$withval"
3957 fi;
3958         echo "$as_me:3958: result: $BUILD_CPPFLAGS" >&5
3959 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3960
3961         echo "$as_me:3961: checking for native build linker-flags" >&5
3962 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3963
3964 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3965 if test "${with_build_ldflags+set}" = set; then
3966   withval="$with_build_ldflags"
3967   BUILD_LDFLAGS="$withval"
3968 fi;
3969         echo "$as_me:3969: result: $BUILD_LDFLAGS" >&5
3970 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3971
3972         echo "$as_me:3972: checking for native build linker-libraries" >&5
3973 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3974
3975 # Check whether --with-build-libs or --without-build-libs was given.
3976 if test "${with_build_libs+set}" = set; then
3977   withval="$with_build_libs"
3978   BUILD_LIBS="$withval"
3979 fi;
3980         echo "$as_me:3980: result: $BUILD_LIBS" >&5
3981 echo "${ECHO_T}$BUILD_LIBS" >&6
3982
3983         # this assumes we're on Unix.
3984         BUILD_EXEEXT=
3985         BUILD_OBJEXT=o
3986
3987         : ${BUILD_CC:='${CC}'}
3988
3989         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3990                 { { echo "$as_me:3990: error: Cross-build requires two compilers.
3991 Use --with-build-cc to specify the native compiler." >&5
3992 echo "$as_me: error: Cross-build requires two compilers.
3993 Use --with-build-cc to specify the native compiler." >&2;}
3994    { (exit 1); exit 1; }; }
3995         fi
3996
3997 else
3998         : ${BUILD_CC:='${CC}'}
3999         : ${BUILD_CPP:='${CPP}'}
4000         : ${BUILD_CFLAGS:='${CFLAGS}'}
4001         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4002         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4003         : ${BUILD_LIBS:='${LIBS}'}
4004         : ${BUILD_EXEEXT:='$x'}
4005         : ${BUILD_OBJEXT:='o'}
4006 fi
4007
4008 ###############################################################################
4009
4010 ### Options to allow the user to specify the set of libraries which are used.
4011 ### Use "--without-normal --with-shared" to allow the default model to be
4012 ### shared, for example.
4013 cf_list_models=""
4014
4015 LIBTOOL=
4016
4017 # common library maintenance symbols that are convenient for libtool scripts:
4018 LIB_CREATE='${AR} -cr'
4019 LIB_OBJECT='${OBJECTS}'
4020 LIB_SUFFIX=.a
4021 LIB_PREP="$RANLIB"
4022
4023 # symbols used to prop libtool up to enable it to determine what it should be
4024 # doing:
4025 LIB_CLEAN=
4026 LIB_COMPILE=
4027 LIB_LINK=
4028 LIB_INSTALL=
4029 LIB_UNINSTALL=
4030
4031 echo "$as_me:4031: checking if you want to build libraries with libtool" >&5
4032 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4033
4034 # Check whether --with-libtool or --without-libtool was given.
4035 if test "${with_libtool+set}" = set; then
4036   withval="$with_libtool"
4037   with_libtool=$withval
4038 else
4039   with_libtool=no
4040 fi;
4041 echo "$as_me:4041: result: $with_libtool" >&5
4042 echo "${ECHO_T}$with_libtool" >&6
4043 if test "$with_libtool" != "no"; then
4044
4045         if test "$with_libtool" != "yes" ; then
4046
4047 if test "x$prefix" != xNONE; then
4048   cf_path_syntax="$prefix"
4049 else
4050   cf_path_syntax="$ac_default_prefix"
4051 fi
4052
4053 case ".$with_libtool" in #(vi
4054 .\$\(*\)*|.\'*\'*) #(vi
4055   ;;
4056 ..|./*|.\\*) #(vi
4057   ;;
4058 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4059   ;;
4060 .\${*prefix}*) #(vi
4061   eval with_libtool="$with_libtool"
4062   case ".$with_libtool" in #(vi
4063   .NONE/*)
4064     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4065     ;;
4066   esac
4067   ;; #(vi
4068 .no|.NONE/*)
4069   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4070   ;;
4071 *)
4072   { { echo "$as_me:4072: error: expected a pathname, not \"$with_libtool\"" >&5
4073 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4074    { (exit 1); exit 1; }; }
4075   ;;
4076 esac
4077
4078                 LIBTOOL=$with_libtool
4079         else
4080                 # Extract the first word of "libtool", so it can be a program name with args.
4081 set dummy libtool; ac_word=$2
4082 echo "$as_me:4082: checking for $ac_word" >&5
4083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4084 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   case $LIBTOOL in
4088   [\\/]* | ?:[\\/]*)
4089   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4090   ;;
4091   *)
4092   ac_save_IFS=$IFS; IFS=$ac_path_separator
4093 ac_dummy="$PATH"
4094 for ac_dir in $ac_dummy; do
4095   IFS=$ac_save_IFS
4096   test -z "$ac_dir" && ac_dir=.
4097   if $as_executable_p "$ac_dir/$ac_word"; then
4098    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4099    echo "$as_me:4099: found $ac_dir/$ac_word" >&5
4100    break
4101 fi
4102 done
4103
4104   ;;
4105 esac
4106 fi
4107 LIBTOOL=$ac_cv_path_LIBTOOL
4108
4109 if test -n "$LIBTOOL"; then
4110   echo "$as_me:4110: result: $LIBTOOL" >&5
4111 echo "${ECHO_T}$LIBTOOL" >&6
4112 else
4113   echo "$as_me:4113: result: no" >&5
4114 echo "${ECHO_T}no" >&6
4115 fi
4116
4117         fi
4118         if test -z "$LIBTOOL" ; then
4119                 { { echo "$as_me:4119: error: Cannot find libtool" >&5
4120 echo "$as_me: error: Cannot find libtool" >&2;}
4121    { (exit 1); exit 1; }; }
4122         fi
4123         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
4124         LIB_OBJECT='${OBJECTS}.o=.lo)'
4125         LIB_SUFFIX=.la
4126         LIB_CLEAN='${LIBTOOL} --mode=clean'
4127         LIB_COMPILE='${LIBTOOL} --mode=compile'
4128         LIB_LINK='${LIBTOOL} --mode=link'
4129         LIB_INSTALL='${LIBTOOL} --mode=install'
4130         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4131         LIB_PREP=:
4132
4133         # Show the version of libtool
4134         echo "$as_me:4134: checking version of libtool" >&5
4135 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4136
4137         # Save the version in a cache variable - this is not entirely a good
4138         # thing, but the version string from libtool is very ugly, and for
4139         # bug reports it might be useful to have the original string.
4140         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4141         echo "$as_me:4141: result: $cf_cv_libtool_version" >&5
4142 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4143         if test -z "$cf_cv_libtool_version" ; then
4144                 { { echo "$as_me:4144: error: This is not libtool" >&5
4145 echo "$as_me: error: This is not libtool" >&2;}
4146    { (exit 1); exit 1; }; }
4147         fi
4148
4149         # special hack to add --tag option for C++ compiler
4150         case $cf_cv_libtool_version in
4151         1.[5-9]*|[2-9]*)
4152                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4153                 ;;
4154         *)
4155                 LIBTOOL_CXX="$LIBTOOL"
4156                 ;;
4157         esac
4158 else
4159         LIBTOOL=""
4160         LIBTOOL_CXX=""
4161 fi
4162
4163 test -z "$LIBTOOL" && ECHO_LT=
4164
4165 if test "$with_libtool" != "no" ; then
4166
4167 cf_list_models="$cf_list_models libtool"
4168
4169 else
4170
4171 echo "$as_me:4171: checking if you want to build shared libraries" >&5
4172 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4173
4174 # Check whether --with-shared or --without-shared was given.
4175 if test "${with_shared+set}" = set; then
4176   withval="$with_shared"
4177   with_shared=$withval
4178 else
4179   with_shared=no
4180 fi;
4181 echo "$as_me:4181: result: $with_shared" >&5
4182 echo "${ECHO_T}$with_shared" >&6
4183 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4184
4185 echo "$as_me:4185: checking if you want to build static libraries" >&5
4186 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4187
4188 # Check whether --with-normal or --without-normal was given.
4189 if test "${with_normal+set}" = set; then
4190   withval="$with_normal"
4191   with_normal=$withval
4192 else
4193   with_normal=yes
4194 fi;
4195 echo "$as_me:4195: result: $with_normal" >&5
4196 echo "${ECHO_T}$with_normal" >&6
4197 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4198
4199 echo "$as_me:4199: checking if you want to build debug libraries" >&5
4200 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-debug or --without-debug was given.
4203 if test "${with_debug+set}" = set; then
4204   withval="$with_debug"
4205   with_debug=$withval
4206 else
4207   with_debug=yes
4208 fi;
4209 echo "$as_me:4209: result: $with_debug" >&5
4210 echo "${ECHO_T}$with_debug" >&6
4211 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4212
4213 echo "$as_me:4213: checking if you want to build profiling libraries" >&5
4214 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4215
4216 # Check whether --with-profile or --without-profile was given.
4217 if test "${with_profile+set}" = set; then
4218   withval="$with_profile"
4219   with_profile=$withval
4220 else
4221   with_profile=no
4222 fi;
4223 echo "$as_me:4223: result: $with_profile" >&5
4224 echo "${ECHO_T}$with_profile" >&6
4225 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4226
4227 fi
4228
4229 ###############################################################################
4230
4231 echo "$as_me:4231: checking for specified models" >&5
4232 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4233 test -z "$cf_list_models" && cf_list_models=normal
4234 test "$with_libtool" != "no" && cf_list_models=libtool
4235 echo "$as_me:4235: result: $cf_list_models" >&5
4236 echo "${ECHO_T}$cf_list_models" >&6
4237
4238 ### Use the first model as the default, and save its suffix for use in building
4239 ### up test-applications.
4240 echo "$as_me:4240: checking for default model" >&5
4241 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4242 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4243 echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
4244 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4245
4246 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4247
4248 TICS_NAME=tic
4249
4250 TINFO_NAME=tinfo
4251
4252 LIB_NAME=ncurses
4253
4254 LIB_DIR=../lib
4255 LIB_2ND=../../lib
4256
4257         case $cf_cv_system_name in
4258         OS/2*)  LIB_PREFIX=''     ;;
4259         os2*)   LIB_PREFIX=''     ;;
4260         *)      LIB_PREFIX='lib'  ;;
4261         esac
4262 cf_prefix=$LIB_PREFIX
4263
4264 LIB_PREFIX=$cf_prefix
4265
4266 LIB_SUFFIX=
4267
4268 ###############################################################################
4269
4270 echo "$as_me:4270: checking if you want to build a separate terminfo library" >&5
4271 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4272
4273 # Check whether --with-termlib or --without-termlib was given.
4274 if test "${with_termlib+set}" = set; then
4275   withval="$with_termlib"
4276   with_termlib=$withval
4277 else
4278   with_termlib=no
4279 fi;
4280 echo "$as_me:4280: result: $with_termlib" >&5
4281 echo "${ECHO_T}$with_termlib" >&6
4282
4283 echo "$as_me:4283: checking if you want to build a separate tic library" >&5
4284 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4285
4286 # Check whether --with-ticlib or --without-ticlib was given.
4287 if test "${with_ticlib+set}" = set; then
4288   withval="$with_ticlib"
4289   with_ticlib=$withval
4290 else
4291   with_ticlib=no
4292 fi;
4293 echo "$as_me:4293: result: $with_ticlib" >&5
4294 echo "${ECHO_T}$with_ticlib" >&6
4295
4296 ### Checks for special libraries, must be done up-front.
4297 SHLIB_LIST=""
4298
4299 echo "$as_me:4299: checking if you want to link with the GPM mouse library" >&5
4300 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4301
4302 # Check whether --with-gpm or --without-gpm was given.
4303 if test "${with_gpm+set}" = set; then
4304   withval="$with_gpm"
4305   with_gpm=$withval
4306 else
4307   with_gpm=maybe
4308 fi;
4309 echo "$as_me:4309: result: $with_gpm" >&5
4310 echo "${ECHO_T}$with_gpm" >&6
4311
4312 if test "$with_gpm" != no ; then
4313         echo "$as_me:4313: checking for gpm.h" >&5
4314 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4315 if test "${ac_cv_header_gpm_h+set}" = set; then
4316   echo $ECHO_N "(cached) $ECHO_C" >&6
4317 else
4318   cat >conftest.$ac_ext <<_ACEOF
4319 #line 4319 "configure"
4320 #include "confdefs.h"
4321 #include <gpm.h>
4322 _ACEOF
4323 if { (eval echo "$as_me:4323: \"$ac_cpp conftest.$ac_ext\"") >&5
4324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4325   ac_status=$?
4326   egrep -v '^ *\+' conftest.er1 >conftest.err
4327   rm -f conftest.er1
4328   cat conftest.err >&5
4329   echo "$as_me:4329: \$? = $ac_status" >&5
4330   (exit $ac_status); } >/dev/null; then
4331   if test -s conftest.err; then
4332     ac_cpp_err=$ac_c_preproc_warn_flag
4333   else
4334     ac_cpp_err=
4335   fi
4336 else
4337   ac_cpp_err=yes
4338 fi
4339 if test -z "$ac_cpp_err"; then
4340   ac_cv_header_gpm_h=yes
4341 else
4342   echo "$as_me: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   ac_cv_header_gpm_h=no
4345 fi
4346 rm -f conftest.err conftest.$ac_ext
4347 fi
4348 echo "$as_me:4348: result: $ac_cv_header_gpm_h" >&5
4349 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4350 if test $ac_cv_header_gpm_h = yes; then
4351
4352                 cat >>confdefs.h <<\EOF
4353 #define HAVE_GPM_H 1
4354 EOF
4355
4356                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4357                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4358
4359                         cat >>confdefs.h <<\EOF
4360 #define HAVE_LIBGPM 1
4361 EOF
4362
4363                 else
4364                         echo "$as_me:4364: checking for Gpm_Open in -lgpm" >&5
4365 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4366 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4367   echo $ECHO_N "(cached) $ECHO_C" >&6
4368 else
4369   ac_check_lib_save_LIBS=$LIBS
4370 LIBS="-lgpm  $LIBS"
4371 cat >conftest.$ac_ext <<_ACEOF
4372 #line 4372 "configure"
4373 #include "confdefs.h"
4374
4375 /* Override any gcc2 internal prototype to avoid an error.  */
4376 #ifdef __cplusplus
4377 extern "C"
4378 #endif
4379 /* We use char because int might match the return type of a gcc2
4380    builtin and then its argument prototype would still apply.  */
4381 char Gpm_Open ();
4382 int
4383 main ()
4384 {
4385 Gpm_Open ();
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 rm -f conftest.$ac_objext conftest$ac_exeext
4391 if { (eval echo "$as_me:4391: \"$ac_link\"") >&5
4392   (eval $ac_link) 2>&5
4393   ac_status=$?
4394   echo "$as_me:4394: \$? = $ac_status" >&5
4395   (exit $ac_status); } &&
4396          { ac_try='test -s conftest$ac_exeext'
4397   { (eval echo "$as_me:4397: \"$ac_try\"") >&5
4398   (eval $ac_try) 2>&5
4399   ac_status=$?
4400   echo "$as_me:4400: \$? = $ac_status" >&5
4401   (exit $ac_status); }; }; then
4402   ac_cv_lib_gpm_Gpm_Open=yes
4403 else
4404   echo "$as_me: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 ac_cv_lib_gpm_Gpm_Open=no
4407 fi
4408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4409 LIBS=$ac_check_lib_save_LIBS
4410 fi
4411 echo "$as_me:4411: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4412 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4413 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4414   :
4415 else
4416
4417                                 { { echo "$as_me:4417: error: Cannot link with GPM library" >&5
4418 echo "$as_me: error: Cannot link with GPM library" >&2;}
4419    { (exit 1); exit 1; }; }
4420                 fi
4421                 with_gpm=yes
4422
4423 fi
4424
4425 else
4426
4427                 test "$with_gpm" != maybe && { echo "$as_me:4427: WARNING: Cannot find GPM header" >&5
4428 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4429                 with_gpm=no
4430
4431 fi
4432
4433 fi
4434
4435 if test "$with_gpm" != no ; then
4436         echo "$as_me:4436: checking if you want to load GPM dynamically" >&5
4437 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4438
4439 # Check whether --with-dlsym or --without-dlsym was given.
4440 if test "${with_dlsym+set}" = set; then
4441   withval="$with_dlsym"
4442   with_dlsym=$withval
4443 else
4444   with_dlsym=yes
4445 fi;
4446         echo "$as_me:4446: result: $with_dlsym" >&5
4447 echo "${ECHO_T}$with_dlsym" >&6
4448         if test "$with_dlsym" = yes ; then
4449
4450 cf_have_dlsym=no
4451 echo "$as_me:4451: checking for dlsym" >&5
4452 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4453 if test "${ac_cv_func_dlsym+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   cat >conftest.$ac_ext <<_ACEOF
4457 #line 4457 "configure"
4458 #include "confdefs.h"
4459 /* System header to define __stub macros and hopefully few prototypes,
4460     which can conflict with char dlsym (); below.  */
4461 #include <assert.h>
4462 /* Override any gcc2 internal prototype to avoid an error.  */
4463 #ifdef __cplusplus
4464 extern "C"
4465 #endif
4466 /* We use char because int might match the return type of a gcc2
4467    builtin and then its argument prototype would still apply.  */
4468 char dlsym ();
4469 char (*f) ();
4470
4471 int
4472 main ()
4473 {
4474 /* The GNU C library defines this for functions which it implements
4475     to always fail with ENOSYS.  Some functions are actually named
4476     something starting with __ and the normal name is an alias.  */
4477 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4478 choke me
4479 #else
4480 f = dlsym;
4481 #endif
4482
4483   ;
4484   return 0;
4485 }
4486 _ACEOF
4487 rm -f conftest.$ac_objext conftest$ac_exeext
4488 if { (eval echo "$as_me:4488: \"$ac_link\"") >&5
4489   (eval $ac_link) 2>&5
4490   ac_status=$?
4491   echo "$as_me:4491: \$? = $ac_status" >&5
4492   (exit $ac_status); } &&
4493          { ac_try='test -s conftest$ac_exeext'
4494   { (eval echo "$as_me:4494: \"$ac_try\"") >&5
4495   (eval $ac_try) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); }; }; then
4499   ac_cv_func_dlsym=yes
4500 else
4501   echo "$as_me: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 ac_cv_func_dlsym=no
4504 fi
4505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4506 fi
4507 echo "$as_me:4507: result: $ac_cv_func_dlsym" >&5
4508 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4509 if test $ac_cv_func_dlsym = yes; then
4510   cf_have_dlsym=yes
4511 else
4512
4513 cf_have_libdl=no
4514 echo "$as_me:4514: checking for dlsym in -ldl" >&5
4515 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4516 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519   ac_check_lib_save_LIBS=$LIBS
4520 LIBS="-ldl  $LIBS"
4521 cat >conftest.$ac_ext <<_ACEOF
4522 #line 4522 "configure"
4523 #include "confdefs.h"
4524
4525 /* Override any gcc2 internal prototype to avoid an error.  */
4526 #ifdef __cplusplus
4527 extern "C"
4528 #endif
4529 /* We use char because int might match the return type of a gcc2
4530    builtin and then its argument prototype would still apply.  */
4531 char dlsym ();
4532 int
4533 main ()
4534 {
4535 dlsym ();
4536   ;
4537   return 0;
4538 }
4539 _ACEOF
4540 rm -f conftest.$ac_objext conftest$ac_exeext
4541 if { (eval echo "$as_me:4541: \"$ac_link\"") >&5
4542   (eval $ac_link) 2>&5
4543   ac_status=$?
4544   echo "$as_me:4544: \$? = $ac_status" >&5
4545   (exit $ac_status); } &&
4546          { ac_try='test -s conftest$ac_exeext'
4547   { (eval echo "$as_me:4547: \"$ac_try\"") >&5
4548   (eval $ac_try) 2>&5
4549   ac_status=$?
4550   echo "$as_me:4550: \$? = $ac_status" >&5
4551   (exit $ac_status); }; }; then
4552   ac_cv_lib_dl_dlsym=yes
4553 else
4554   echo "$as_me: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 ac_cv_lib_dl_dlsym=no
4557 fi
4558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4559 LIBS=$ac_check_lib_save_LIBS
4560 fi
4561 echo "$as_me:4561: result: $ac_cv_lib_dl_dlsym" >&5
4562 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4563 if test $ac_cv_lib_dl_dlsym = yes; then
4564
4565         cf_have_dlsym=yes
4566         cf_have_libdl=yes
4567 fi
4568
4569 fi
4570
4571 if test "$cf_have_dlsym" = yes ; then
4572         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4573
4574         echo "$as_me:4574: checking whether able to link to dl*() functions" >&5
4575 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4576         cat >conftest.$ac_ext <<_ACEOF
4577 #line 4577 "configure"
4578 #include "confdefs.h"
4579 #include <dlfcn.h>
4580 int
4581 main ()
4582 {
4583
4584                 void *obj;
4585                 if ((obj = dlopen("filename", 0)) != 0) {
4586                         if (dlsym(obj, "symbolname") == 0) {
4587                         dlclose(obj);
4588                         }
4589                 }
4590   ;
4591   return 0;
4592 }
4593 _ACEOF
4594 rm -f conftest.$ac_objext conftest$ac_exeext
4595 if { (eval echo "$as_me:4595: \"$ac_link\"") >&5
4596   (eval $ac_link) 2>&5
4597   ac_status=$?
4598   echo "$as_me:4598: \$? = $ac_status" >&5
4599   (exit $ac_status); } &&
4600          { ac_try='test -s conftest$ac_exeext'
4601   { (eval echo "$as_me:4601: \"$ac_try\"") >&5
4602   (eval $ac_try) 2>&5
4603   ac_status=$?
4604   echo "$as_me:4604: \$? = $ac_status" >&5
4605   (exit $ac_status); }; }; then
4606
4607                 cat >>confdefs.h <<\EOF
4608 #define HAVE_LIBDL 1
4609 EOF
4610
4611 else
4612   echo "$as_me: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4614
4615                 { { echo "$as_me:4615: error: Cannot link test program for libdl" >&5
4616 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4617    { (exit 1); exit 1; }; }
4618 fi
4619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4620         echo "$as_me:4620: result: ok" >&5
4621 echo "${ECHO_T}ok" >&6
4622 else
4623         { { echo "$as_me:4623: error: Cannot find dlsym function" >&5
4624 echo "$as_me: error: Cannot find dlsym function" >&2;}
4625    { (exit 1); exit 1; }; }
4626 fi
4627
4628                 if test "$with_gpm" != yes ; then
4629                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4630
4631                         cf_cv_gpm_soname="$with_gpm"
4632                 else
4633
4634 echo "$as_me:4634: checking for soname of gpm library" >&5
4635 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4636 if test "${cf_cv_gpm_soname+set}" = set; then
4637   echo $ECHO_N "(cached) $ECHO_C" >&6
4638 else
4639
4640 cf_cv_gpm_soname=unknown
4641 if test "$cross_compiling" != yes ; then
4642 cat >conftest.$ac_ext <<CF_EOF
4643 #include <gpm.h>
4644 int main()
4645 {
4646 if (Gpm_Open(0,0)) Gpm_Close();
4647         ${cf_cv_main_return:-return}(0);
4648 }
4649 CF_EOF
4650 cf_save_LIBS="$LIBS"
4651         LIBS="-lgpm $LIBS"
4652         if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5
4653   (eval $ac_compile) 2>&5
4654   ac_status=$?
4655   echo "$as_me:4655: \$? = $ac_status" >&5
4656   (exit $ac_status); } ; then
4657                 if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
4658   (eval $ac_link) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); } ; then
4662                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4663                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4664                 fi
4665         fi
4666 rm -f conftest*
4667 LIBS="$cf_save_LIBS"
4668 fi
4669
4670 fi
4671 echo "$as_me:4671: result: $cf_cv_gpm_soname" >&5
4672 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4673
4674                 fi
4675                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4676 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4677 EOF
4678
4679                 SHLIB_LIST="-ldl $SHLIB_LIST"
4680         else
4681                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4682         fi
4683         cat >>confdefs.h <<\EOF
4684 #define HAVE_LIBGPM 1
4685 EOF
4686
4687         echo "$as_me:4687: checking for Gpm_Wgetch in -lgpm" >&5
4688 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4689 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4690   echo $ECHO_N "(cached) $ECHO_C" >&6
4691 else
4692   ac_check_lib_save_LIBS=$LIBS
4693 LIBS="-lgpm  $LIBS"
4694 cat >conftest.$ac_ext <<_ACEOF
4695 #line 4695 "configure"
4696 #include "confdefs.h"
4697
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 #ifdef __cplusplus
4700 extern "C"
4701 #endif
4702 /* We use char because int might match the return type of a gcc2
4703    builtin and then its argument prototype would still apply.  */
4704 char Gpm_Wgetch ();
4705 int
4706 main ()
4707 {
4708 Gpm_Wgetch ();
4709   ;
4710   return 0;
4711 }
4712 _ACEOF
4713 rm -f conftest.$ac_objext conftest$ac_exeext
4714 if { (eval echo "$as_me:4714: \"$ac_link\"") >&5
4715   (eval $ac_link) 2>&5
4716   ac_status=$?
4717   echo "$as_me:4717: \$? = $ac_status" >&5
4718   (exit $ac_status); } &&
4719          { ac_try='test -s conftest$ac_exeext'
4720   { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4721   (eval $ac_try) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); }; }; then
4725   ac_cv_lib_gpm_Gpm_Wgetch=yes
4726 else
4727   echo "$as_me: failed program was:" >&5
4728 cat conftest.$ac_ext >&5
4729 ac_cv_lib_gpm_Gpm_Wgetch=no
4730 fi
4731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4732 LIBS=$ac_check_lib_save_LIBS
4733 fi
4734 echo "$as_me:4734: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4735 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4736 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4737
4738                 { echo "$as_me:4738: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4739 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4740
4741 fi
4742
4743 fi
4744
4745 # not everyone has "test -c"
4746 if test -c /dev/sysmouse 2>/dev/null ; then
4747 echo "$as_me:4747: checking if you want to use sysmouse" >&5
4748 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4749
4750 # Check whether --with-sysmouse or --without-sysmouse was given.
4751 if test "${with_sysmouse+set}" = set; then
4752   withval="$with_sysmouse"
4753   cf_with_sysmouse=$withval
4754 else
4755   cf_with_sysmouse=maybe
4756 fi;
4757         if test "$cf_with_sysmouse" != no ; then
4758         cat >conftest.$ac_ext <<_ACEOF
4759 #line 4759 "configure"
4760 #include "confdefs.h"
4761
4762 #include <osreldate.h>
4763 #if (__FreeBSD_version >= 400017)
4764 #include <sys/consio.h>
4765 #include <sys/fbio.h>
4766 #else
4767 #include <machine/console.h>
4768 #endif
4769
4770 int
4771 main ()
4772 {
4773
4774         struct mouse_info the_mouse;
4775         ioctl(0, CONS_MOUSECTL, &the_mouse);
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 rm -f conftest.$ac_objext
4782 if { (eval echo "$as_me:4782: \"$ac_compile\"") >&5
4783   (eval $ac_compile) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -s conftest.$ac_objext'
4788   { (eval echo "$as_me:4788: \"$ac_try\"") >&5
4789   (eval $ac_try) 2>&5
4790   ac_status=$?
4791   echo "$as_me:4791: \$? = $ac_status" >&5
4792   (exit $ac_status); }; }; then
4793   cf_with_sysmouse=yes
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 cf_with_sysmouse=no
4798 fi
4799 rm -f conftest.$ac_objext conftest.$ac_ext
4800         fi
4801 echo "$as_me:4801: result: $cf_with_sysmouse" >&5
4802 echo "${ECHO_T}$cf_with_sysmouse" >&6
4803 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4804 #define USE_SYSMOUSE 1
4805 EOF
4806
4807 fi
4808
4809 if test X"$CC_G_OPT" = X"" ; then
4810         CC_G_OPT='-g'
4811         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4812 fi
4813
4814 if test X"$CXX_G_OPT" = X"" ; then
4815         CXX_G_OPT='-g'
4816         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4817 fi
4818
4819 echo "$as_me:4819: checking for default loader flags" >&5
4820 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4821 case $DFT_LWR_MODEL in
4822 libtool) LD_MODEL=''   ;;
4823 normal)  LD_MODEL=''   ;;
4824 debug)   LD_MODEL=$CC_G_OPT ;;
4825 profile) LD_MODEL='-pg';;
4826 shared)  LD_MODEL=''   ;;
4827 esac
4828 echo "$as_me:4828: result: $LD_MODEL" >&5
4829 echo "${ECHO_T}$LD_MODEL" >&6
4830
4831 case $DFT_LWR_MODEL in
4832 shared)
4833 echo "$as_me:4833: checking if rpath option should be used" >&5
4834 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4835
4836 # Check whether --enable-rpath or --disable-rpath was given.
4837 if test "${enable_rpath+set}" = set; then
4838   enableval="$enable_rpath"
4839   cf_cv_ld_rpath=$enableval
4840 else
4841   cf_cv_ld_rpath=no
4842 fi;
4843 echo "$as_me:4843: result: $cf_cv_ld_rpath" >&5
4844 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4845         ;;
4846 esac
4847
4848         LOCAL_LDFLAGS=
4849         LOCAL_LDFLAGS2=
4850         LD_SHARED_OPTS=
4851         INSTALL_LIB="-m 644"
4852
4853         cf_cv_do_symlinks=no
4854
4855         echo "$as_me:4855: checking if release/abi version should be used for shared libs" >&5
4856 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4857
4858 # Check whether --with-shlib-version or --without-shlib-version was given.
4859 if test "${with_shlib_version+set}" = set; then
4860   withval="$with_shlib_version"
4861   test -z "$withval" && withval=auto
4862         case $withval in #(vi
4863         yes) #(vi
4864                 cf_cv_shlib_version=auto
4865                 ;;
4866         rel|abi|auto|no) #(vi
4867                 cf_cv_shlib_version=$withval
4868                 ;;
4869         *)
4870                 { { echo "$as_me:4870: error: option value must be one of: rel, abi, auto or no" >&5
4871 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4872    { (exit 1); exit 1; }; }
4873                 ;;
4874         esac
4875
4876 else
4877   cf_cv_shlib_version=auto
4878 fi;
4879         echo "$as_me:4879: result: $cf_cv_shlib_version" >&5
4880 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4881
4882         cf_cv_rm_so_locs=no
4883
4884         # Some less-capable ports of gcc support only -fpic
4885         CC_SHARED_OPTS=
4886         if test "$GCC" = yes
4887         then
4888                 echo "$as_me:4888: checking which $CC option to use" >&5
4889 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4890                 cf_save_CFLAGS="$CFLAGS"
4891                 for CC_SHARED_OPTS in -fPIC -fpic ''
4892                 do
4893                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4894                         cat >conftest.$ac_ext <<_ACEOF
4895 #line 4895 "configure"
4896 #include "confdefs.h"
4897 #include <stdio.h>
4898 int
4899 main ()
4900 {
4901 int x = 1
4902   ;
4903   return 0;
4904 }
4905 _ACEOF
4906 rm -f conftest.$ac_objext
4907 if { (eval echo "$as_me:4907: \"$ac_compile\"") >&5
4908   (eval $ac_compile) 2>&5
4909   ac_status=$?
4910   echo "$as_me:4910: \$? = $ac_status" >&5
4911   (exit $ac_status); } &&
4912          { ac_try='test -s conftest.$ac_objext'
4913   { (eval echo "$as_me:4913: \"$ac_try\"") >&5
4914   (eval $ac_try) 2>&5
4915   ac_status=$?
4916   echo "$as_me:4916: \$? = $ac_status" >&5
4917   (exit $ac_status); }; }; then
4918   break
4919 else
4920   echo "$as_me: failed program was:" >&5
4921 cat conftest.$ac_ext >&5
4922 fi
4923 rm -f conftest.$ac_objext conftest.$ac_ext
4924                 done
4925                 echo "$as_me:4925: result: $CC_SHARED_OPTS" >&5
4926 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4927                 CFLAGS="$cf_save_CFLAGS"
4928         fi
4929
4930         cf_cv_shlib_version_infix=no
4931
4932         case $cf_cv_system_name in
4933         beos*)
4934                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4935                 ;;
4936         cygwin*)
4937                 CC_SHARED_OPTS=
4938                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
4939                 cf_cv_shlib_version=cygdll
4940                 cf_cv_shlib_version_infix=cygdll
4941                 ;;
4942         darwin*)
4943                 EXTRA_CFLAGS="-no-cpp-precomp"
4944                 CC_SHARED_OPTS="-dynamic"
4945                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4946                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4947                 cf_cv_shlib_version_infix=yes
4948                 echo "$as_me:4948: checking if ld -search_paths_first works" >&5
4949 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4950 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4951   echo $ECHO_N "(cached) $ECHO_C" >&6
4952 else
4953
4954                         cf_save_LDFLAGS=$LDFLAGS
4955                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4956                         cat >conftest.$ac_ext <<_ACEOF
4957 #line 4957 "configure"
4958 #include "confdefs.h"
4959
4960 int
4961 main ()
4962 {
4963 int i;
4964   ;
4965   return 0;
4966 }
4967 _ACEOF
4968 rm -f conftest.$ac_objext conftest$ac_exeext
4969 if { (eval echo "$as_me:4969: \"$ac_link\"") >&5
4970   (eval $ac_link) 2>&5
4971   ac_status=$?
4972   echo "$as_me:4972: \$? = $ac_status" >&5
4973   (exit $ac_status); } &&
4974          { ac_try='test -s conftest$ac_exeext'
4975   { (eval echo "$as_me:4975: \"$ac_try\"") >&5
4976   (eval $ac_try) 2>&5
4977   ac_status=$?
4978   echo "$as_me:4978: \$? = $ac_status" >&5
4979   (exit $ac_status); }; }; then
4980   cf_cv_ldflags_search_paths_first=yes
4981 else
4982   echo "$as_me: failed program was:" >&5
4983 cat conftest.$ac_ext >&5
4984 cf_cv_ldflags_search_paths_first=no
4985 fi
4986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4987                                 LDFLAGS=$cf_save_LDFLAGS
4988 fi
4989 echo "$as_me:4989: result: $cf_cv_ldflags_search_paths_first" >&5
4990 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
4991                 if test $cf_cv_ldflags_search_paths_first = yes; then
4992                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4993                 fi
4994                 ;;
4995         hpux*)
4996                 # (tested with gcc 2.7.2 -- I don't have c89)
4997                 if test "$GCC" = yes; then
4998                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
4999                 else
5000                         CC_SHARED_OPTS='+Z'
5001                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5002                 fi
5003                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5004                 # HP-UX shared libraries must be executable, and should be
5005                 # readonly to exploit a quirk in the memory manager.
5006                 INSTALL_LIB="-m 555"
5007                 ;;
5008         irix*)
5009                 if test "$cf_cv_ld_rpath" = yes ; then
5010                         if test "$GCC" = yes; then
5011                                 cf_ld_rpath_opt="-Wl,-rpath,"
5012                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5013                         else
5014                                 cf_ld_rpath_opt="-rpath "
5015                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5016                         fi
5017                 fi
5018                 # tested with IRIX 5.2 and 'cc'.
5019                 if test "$GCC" != yes; then
5020                         CC_SHARED_OPTS='-KPIC'
5021                 fi
5022                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5023                 cf_cv_rm_so_locs=yes
5024                 ;;
5025         linux*|gnu*|k*bsd*-gnu)
5026                 if test "$DFT_LWR_MODEL" = "shared" ; then
5027                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5028                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5029                 fi
5030                 if test "$cf_cv_ld_rpath" = yes ; then
5031                         cf_ld_rpath_opt="-Wl,-rpath,"
5032                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5033                 fi
5034
5035         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5036         if test "$cf_cv_shlib_version" = rel; then
5037                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5038         else
5039                 cf_shared_soname='`basename $@`'
5040         fi
5041
5042                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5043                 ;;
5044         openbsd[2-9].*)
5045                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5046                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5047                 ;;
5048         openbsd*|freebsd[12].*)
5049                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5050                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5051                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5052                 ;;
5053         freebsd*)
5054                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5055                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5056                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5057                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5058                         cf_ld_rpath_opt="-rpath "
5059                         EXTRA_LDFLAGS="-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='${LD} -Bshareable -soname=`basename $@` -o $@'
5070                 ;;
5071         netbsd*)
5072                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5073                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5074                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5075                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5076                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5077                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5078                         if test "$cf_cv_shlib_version" = auto; then
5079                         if test -f /usr/libexec/ld.elf_so; then
5080                                 cf_cv_shlib_version=abi
5081                         else
5082                                 cf_cv_shlib_version=rel
5083                         fi
5084                         fi
5085
5086         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5087         if test "$cf_cv_shlib_version" = rel; then
5088                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5089         else
5090                 cf_shared_soname='`basename $@`'
5091         fi
5092
5093                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5094                 else
5095                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5096                 fi
5097                 ;;
5098         osf*|mls+*)
5099                 # tested with OSF/1 V3.2 and 'cc'
5100                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5101                 # link with shared libs).
5102                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5103                 case $host_os in
5104                 osf4*)
5105                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5106                         ;;
5107                 esac
5108                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5109                 if test "$DFT_LWR_MODEL" = "shared" ; then
5110                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5111                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5112                 fi
5113                 if test "$cf_cv_ld_rpath" = yes ; then
5114                         cf_ld_rpath_opt="-rpath"
5115                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5116                 fi
5117                 cf_cv_rm_so_locs=yes
5118                 ;;
5119         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5120                 # tested with osr5.0.5
5121                 if test "$GCC" != yes; then
5122                         CC_SHARED_OPTS='-belf -KPIC'
5123                 fi
5124                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5125                 if test "$cf_cv_ld_rpath" = yes ; then
5126                         # only way is to set LD_RUN_PATH but no switch for it
5127                         RUN_PATH=$libdir
5128                 fi
5129                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5130                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5131                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5132                 ;;
5133         sunos4*)
5134                 # tested with SunOS 4.1.1 and gcc 2.7.0
5135                 if test "$GCC" != yes; then
5136                         CC_SHARED_OPTS='-KPIC'
5137                 fi
5138                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5139                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140                 ;;
5141         solaris2*)
5142                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5143                 if test "$GCC" != yes; then
5144                         CC_SHARED_OPTS='-KPIC'
5145                 fi
5146                 if test "$DFT_LWR_MODEL" = "shared" ; then
5147                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5148                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5149                 fi
5150                 if test "$cf_cv_ld_rpath" = yes ; then
5151                         cf_ld_rpath_opt="-R"
5152                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5153                 fi
5154
5155         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5156         if test "$cf_cv_shlib_version" = rel; then
5157                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5158         else
5159                 cf_shared_soname='`basename $@`'
5160         fi
5161
5162                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5163                 ;;
5164         sysv5uw7*|unix_sv*)
5165                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5166                 if test "$GCC" != yes; then
5167                         CC_SHARED_OPTS='-KPIC'
5168                 fi
5169                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5170                 ;;
5171         *)
5172                 CC_SHARED_OPTS='unknown'
5173                 MK_SHARED_LIB='echo unknown'
5174                 ;;
5175         esac
5176
5177         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5178         case "$cf_cv_shlib_version" in #(vi
5179         rel|abi)
5180                 case "$MK_SHARED_LIB" in #(vi
5181                 *'-o $@')
5182                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5183                         ;;
5184                 *)
5185                         { echo "$as_me:5185: WARNING: ignored --with-shlib-version" >&5
5186 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5187                         ;;
5188                 esac
5189                 ;;
5190         esac
5191
5192         if test -n "$cf_ld_rpath_opt" ; then
5193                 echo "$as_me:5193: checking if we need a space after rpath option" >&5
5194 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5195                 cf_save_LIBS="$LIBS"
5196                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5197                 cat >conftest.$ac_ext <<_ACEOF
5198 #line 5198 "configure"
5199 #include "confdefs.h"
5200
5201 int
5202 main ()
5203 {
5204
5205   ;
5206   return 0;
5207 }
5208 _ACEOF
5209 rm -f conftest.$ac_objext conftest$ac_exeext
5210 if { (eval echo "$as_me:5210: \"$ac_link\"") >&5
5211   (eval $ac_link) 2>&5
5212   ac_status=$?
5213   echo "$as_me:5213: \$? = $ac_status" >&5
5214   (exit $ac_status); } &&
5215          { ac_try='test -s conftest$ac_exeext'
5216   { (eval echo "$as_me:5216: \"$ac_try\"") >&5
5217   (eval $ac_try) 2>&5
5218   ac_status=$?
5219   echo "$as_me:5219: \$? = $ac_status" >&5
5220   (exit $ac_status); }; }; then
5221   cf_rpath_space=no
5222 else
5223   echo "$as_me: failed program was:" >&5
5224 cat conftest.$ac_ext >&5
5225 cf_rpath_space=yes
5226 fi
5227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5228                 LIBS="$cf_save_LIBS"
5229                 echo "$as_me:5229: result: $cf_rpath_space" >&5
5230 echo "${ECHO_T}$cf_rpath_space" >&6
5231                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5232                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5233         fi
5234
5235 if test "$CC_SHARED_OPTS" = "unknown"; then
5236         for model in $cf_list_models; do
5237                 if test "$model" = "shared"; then
5238                         { { echo "$as_me:5238: error: Shared libraries are not supported in this version" >&5
5239 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5240    { (exit 1); exit 1; }; }
5241                 fi
5242         done
5243 fi
5244
5245 ###############################################################################
5246
5247 ###     use option --disable-overwrite to leave out the link to -lcurses
5248 echo "$as_me:5248: checking if you wish to install ncurses overwriting curses" >&5
5249 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5250
5251 # Check whether --enable-overwrite or --disable-overwrite was given.
5252 if test "${enable_overwrite+set}" = set; then
5253   enableval="$enable_overwrite"
5254   with_overwrite=$enableval
5255 else
5256   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5257 fi;
5258 echo "$as_me:5258: result: $with_overwrite" >&5
5259 echo "${ECHO_T}$with_overwrite" >&6
5260
5261 echo "$as_me:5261: checking if external terminfo-database is used" >&5
5262 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5263
5264 # Check whether --enable-database or --disable-database was given.
5265 if test "${enable_database+set}" = set; then
5266   enableval="$enable_database"
5267   use_database=$enableval
5268 else
5269   use_database=yes
5270 fi;
5271 echo "$as_me:5271: result: $use_database" >&5
5272 echo "${ECHO_T}$use_database" >&6
5273
5274 case $host_os in #(vi
5275 os2*) #(vi
5276         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5277         ;;
5278 *) #(vi
5279         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5280         ;;
5281 esac
5282
5283         case $cf_cv_system_name in
5284         os2*)   PATHSEP=';'  ;;
5285         *)      PATHSEP=':'  ;;
5286         esac
5287
5288 if test "$use_database" != no ; then
5289         cat >>confdefs.h <<\EOF
5290 #define USE_DATABASE 1
5291 EOF
5292
5293         echo "$as_me:5293: checking which terminfo source-file will be installed" >&5
5294 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5295
5296 # Check whether --enable-database or --disable-database was given.
5297 if test "${enable_database+set}" = set; then
5298   enableval="$enable_database"
5299   TERMINFO_SRC=$withval
5300 fi;
5301         echo "$as_me:5301: result: $TERMINFO_SRC" >&5
5302 echo "${ECHO_T}$TERMINFO_SRC" >&6
5303
5304         echo "$as_me:5304: checking whether to use hashed database instead of directory/tree" >&5
5305 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5306
5307 # Check whether --with-hashed-db or --without-hashed-db was given.
5308 if test "${with_hashed_db+set}" = set; then
5309   withval="$with_hashed_db"
5310
5311 else
5312   with_hashed_db=no
5313 fi;
5314         echo "$as_me:5314: result: $with_hashed_db" >&5
5315 echo "${ECHO_T}$with_hashed_db" >&6
5316 fi
5317
5318 echo "$as_me:5318: checking for list of fallback descriptions" >&5
5319 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5320
5321 # Check whether --with-fallbacks or --without-fallbacks was given.
5322 if test "${with_fallbacks+set}" = set; then
5323   withval="$with_fallbacks"
5324   with_fallback=$withval
5325 else
5326   with_fallback=
5327 fi;
5328 echo "$as_me:5328: result: $with_fallback" >&5
5329 echo "${ECHO_T}$with_fallback" >&6
5330 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5331
5332 echo "$as_me:5332: checking if you want modern xterm or antique" >&5
5333 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5334
5335 # Check whether --with-xterm-new or --without-xterm-new was given.
5336 if test "${with_xterm_new+set}" = set; then
5337   withval="$with_xterm_new"
5338   with_xterm_new=$withval
5339 else
5340   with_xterm_new=yes
5341 fi;
5342 case $with_xterm_new in
5343 no)     with_xterm_new=xterm-old;;
5344 *)      with_xterm_new=xterm-new;;
5345 esac
5346 echo "$as_me:5346: result: $with_xterm_new" >&5
5347 echo "${ECHO_T}$with_xterm_new" >&6
5348 WHICH_XTERM=$with_xterm_new
5349
5350 MAKE_TERMINFO=
5351 if test "$use_database" = no ; then
5352         TERMINFO="${datadir}/terminfo"
5353         MAKE_TERMINFO="#"
5354 else
5355
5356 echo "$as_me:5356: checking for list of terminfo directories" >&5
5357 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5358
5359 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5360 if test "${with_terminfo_dirs+set}" = set; then
5361   withval="$with_terminfo_dirs"
5362
5363 else
5364   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5365 fi;
5366 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5367 cf_dst_path=
5368 for cf_src_path in $withval
5369 do
5370
5371 if test "x$prefix" != xNONE; then
5372   cf_path_syntax="$prefix"
5373 else
5374   cf_path_syntax="$ac_default_prefix"
5375 fi
5376
5377 case ".$cf_src_path" in #(vi
5378 .\$\(*\)*|.\'*\'*) #(vi
5379   ;;
5380 ..|./*|.\\*) #(vi
5381   ;;
5382 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5383   ;;
5384 .\${*prefix}*) #(vi
5385   eval cf_src_path="$cf_src_path"
5386   case ".$cf_src_path" in #(vi
5387   .NONE/*)
5388     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5389     ;;
5390   esac
5391   ;; #(vi
5392 .no|.NONE/*)
5393   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5394   ;;
5395 *)
5396   { { echo "$as_me:5396: error: expected a pathname, not \"$cf_src_path\"" >&5
5397 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5398    { (exit 1); exit 1; }; }
5399   ;;
5400 esac
5401
5402   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5403   cf_dst_path="${cf_dst_path}${cf_src_path}"
5404 done
5405 IFS="$ac_save_ifs"
5406
5407 eval 'TERMINFO_DIRS="$cf_dst_path"'
5408
5409 echo "$as_me:5409: result: $TERMINFO_DIRS" >&5
5410 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5411 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5412 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5413 EOF
5414
5415 echo "$as_me:5415: checking for default terminfo directory" >&5
5416 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5417
5418 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5419 if test "${with_default_terminfo_dir+set}" = set; then
5420   withval="$with_default_terminfo_dir"
5421
5422 else
5423   withval="${TERMINFO-${datadir}/terminfo}"
5424 fi;
5425 if test "x$prefix" != xNONE; then
5426   cf_path_syntax="$prefix"
5427 else
5428   cf_path_syntax="$ac_default_prefix"
5429 fi
5430
5431 case ".$withval" in #(vi
5432 .\$\(*\)*|.\'*\'*) #(vi
5433   ;;
5434 ..|./*|.\\*) #(vi
5435   ;;
5436 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5437   ;;
5438 .\${*prefix}*) #(vi
5439   eval withval="$withval"
5440   case ".$withval" in #(vi
5441   .NONE/*)
5442     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5443     ;;
5444   esac
5445   ;; #(vi
5446 .no|.NONE/*)
5447   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5448   ;;
5449 *)
5450   { { echo "$as_me:5450: error: expected a pathname, not \"$withval\"" >&5
5451 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5452    { (exit 1); exit 1; }; }
5453   ;;
5454 esac
5455
5456 TERMINFO="$withval"
5457
5458 echo "$as_me:5458: result: $TERMINFO" >&5
5459 echo "${ECHO_T}$TERMINFO" >&6
5460 cat >>confdefs.h <<EOF
5461 #define TERMINFO "$TERMINFO"
5462 EOF
5463
5464 fi
5465
5466 ###     use option --disable-big-core to make tic run on small machines
5467 ###     We need 4Mb, check if we can allocate 50% more than that.
5468 echo "$as_me:5468: checking if big-core option selected" >&5
5469 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5470
5471 # Check whether --enable-big-core or --disable-big-core was given.
5472 if test "${enable_big_core+set}" = set; then
5473   enableval="$enable_big_core"
5474   with_big_core=$enableval
5475 else
5476   if test "$cross_compiling" = yes; then
5477   with_big_core=no
5478 else
5479   cat >conftest.$ac_ext <<_ACEOF
5480 #line 5480 "configure"
5481 #include "confdefs.h"
5482
5483 #include <stdlib.h>
5484 #include <string.h>
5485 int main() {
5486         unsigned long n = 6000000L;
5487         char *s = malloc(n);
5488         if (s != 0)
5489                 s[0] = s[n-1] = 0;
5490         ${cf_cv_main_return:-return}(s == 0);
5491 }
5492 _ACEOF
5493 rm -f conftest$ac_exeext
5494 if { (eval echo "$as_me:5494: \"$ac_link\"") >&5
5495   (eval $ac_link) 2>&5
5496   ac_status=$?
5497   echo "$as_me:5497: \$? = $ac_status" >&5
5498   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5499   { (eval echo "$as_me:5499: \"$ac_try\"") >&5
5500   (eval $ac_try) 2>&5
5501   ac_status=$?
5502   echo "$as_me:5502: \$? = $ac_status" >&5
5503   (exit $ac_status); }; }; then
5504   with_big_core=yes
5505 else
5506   echo "$as_me: program exited with status $ac_status" >&5
5507 echo "$as_me: failed program was:" >&5
5508 cat conftest.$ac_ext >&5
5509 with_big_core=no
5510 fi
5511 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5512 fi
5513 fi;
5514 echo "$as_me:5514: result: $with_big_core" >&5
5515 echo "${ECHO_T}$with_big_core" >&6
5516 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5517 #define HAVE_BIG_CORE 1
5518 EOF
5519
5520 ###     use option --enable-termcap to compile in the termcap fallback support
5521 echo "$as_me:5521: checking if you want termcap-fallback support" >&5
5522 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5523
5524 # Check whether --enable-termcap or --disable-termcap was given.
5525 if test "${enable_termcap+set}" = set; then
5526   enableval="$enable_termcap"
5527   with_termcap=$enableval
5528 else
5529   with_termcap=no
5530 fi;
5531 echo "$as_me:5531: result: $with_termcap" >&5
5532 echo "${ECHO_T}$with_termcap" >&6
5533
5534 if test "$with_termcap" != "yes" ; then
5535         if test "$use_database" = no ; then
5536                 if test -z "$with_fallback" ; then
5537                         { { echo "$as_me:5537: error: You have disabled the database w/o specifying fallbacks" >&5
5538 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5539    { (exit 1); exit 1; }; }
5540                 fi
5541         fi
5542         cat >>confdefs.h <<\EOF
5543 #define PURE_TERMINFO 1
5544 EOF
5545
5546 else
5547
5548 if test "$with_ticlib" != no ; then
5549         { { echo "$as_me:5549: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5550 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5551    { (exit 1); exit 1; }; }
5552 fi
5553
5554 cat >>confdefs.h <<\EOF
5555 #define USE_TERMCAP 1
5556 EOF
5557
5558 echo "$as_me:5558: checking for list of termcap files" >&5
5559 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5560
5561 # Check whether --with-termpath or --without-termpath was given.
5562 if test "${with_termpath+set}" = set; then
5563   withval="$with_termpath"
5564
5565 else
5566   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5567 fi;
5568 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5569 cf_dst_path=
5570 for cf_src_path in $withval
5571 do
5572
5573 if test "x$prefix" != xNONE; then
5574   cf_path_syntax="$prefix"
5575 else
5576   cf_path_syntax="$ac_default_prefix"
5577 fi
5578
5579 case ".$cf_src_path" in #(vi
5580 .\$\(*\)*|.\'*\'*) #(vi
5581   ;;
5582 ..|./*|.\\*) #(vi
5583   ;;
5584 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5585   ;;
5586 .\${*prefix}*) #(vi
5587   eval cf_src_path="$cf_src_path"
5588   case ".$cf_src_path" in #(vi
5589   .NONE/*)
5590     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5591     ;;
5592   esac
5593   ;; #(vi
5594 .no|.NONE/*)
5595   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5596   ;;
5597 *)
5598   { { echo "$as_me:5598: error: expected a pathname, not \"$cf_src_path\"" >&5
5599 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5600    { (exit 1); exit 1; }; }
5601   ;;
5602 esac
5603
5604   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5605   cf_dst_path="${cf_dst_path}${cf_src_path}"
5606 done
5607 IFS="$ac_save_ifs"
5608
5609 eval 'TERMPATH="$cf_dst_path"'
5610
5611 echo "$as_me:5611: result: $TERMPATH" >&5
5612 echo "${ECHO_T}$TERMPATH" >&6
5613 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5614 #define TERMPATH "$TERMPATH"
5615 EOF
5616
5617 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5618 echo "$as_me:5618: checking if fast termcap-loader is needed" >&5
5619 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5620
5621 # Check whether --enable-getcap or --disable-getcap was given.
5622 if test "${enable_getcap+set}" = set; then
5623   enableval="$enable_getcap"
5624   with_getcap=$enableval
5625 else
5626   with_getcap=no
5627 fi;
5628 echo "$as_me:5628: result: $with_getcap" >&5
5629 echo "${ECHO_T}$with_getcap" >&6
5630 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5631 #define USE_GETCAP 1
5632 EOF
5633
5634 echo "$as_me:5634: checking if translated termcaps will be cached in ~/.terminfo" >&5
5635 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5636
5637 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5638 if test "${enable_getcap_cache+set}" = set; then
5639   enableval="$enable_getcap_cache"
5640   with_getcap_cache=$enableval
5641 else
5642   with_getcap_cache=no
5643 fi;
5644 echo "$as_me:5644: result: $with_getcap_cache" >&5
5645 echo "${ECHO_T}$with_getcap_cache" >&6
5646 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5647 #define USE_GETCAP_CACHE 1
5648 EOF
5649
5650 fi
5651
5652 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5653 echo "$as_me:5653: checking if ~/.terminfo is wanted" >&5
5654 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5655
5656 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5657 if test "${enable_home_terminfo+set}" = set; then
5658   enableval="$enable_home_terminfo"
5659   with_home_terminfo=$enableval
5660 else
5661   with_home_terminfo=yes
5662 fi;
5663 echo "$as_me:5663: result: $with_home_terminfo" >&5
5664 echo "${ECHO_T}$with_home_terminfo" >&6
5665 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5666 #define USE_HOME_TERMINFO 1
5667 EOF
5668
5669 echo "$as_me:5669: checking if you want to use restricted environment when running as root" >&5
5670 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5671
5672 # Check whether --enable-root-environ or --disable-root-environ was given.
5673 if test "${enable_root_environ+set}" = set; then
5674   enableval="$enable_root_environ"
5675   with_root_environ=$enableval
5676 else
5677   with_root_environ=yes
5678 fi;
5679 echo "$as_me:5679: result: $with_root_environ" >&5
5680 echo "${ECHO_T}$with_root_environ" >&6
5681 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5682 #define USE_ROOT_ENVIRON 1
5683 EOF
5684
5685 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5686 ###   to reduce storage requirements for the terminfo database.
5687
5688 for ac_func in \
5689         remove \
5690         unlink
5691 do
5692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5693 echo "$as_me:5693: checking for $ac_func" >&5
5694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5695 if eval "test \"\${$as_ac_var+set}\" = set"; then
5696   echo $ECHO_N "(cached) $ECHO_C" >&6
5697 else
5698   cat >conftest.$ac_ext <<_ACEOF
5699 #line 5699 "configure"
5700 #include "confdefs.h"
5701 /* System header to define __stub macros and hopefully few prototypes,
5702     which can conflict with char $ac_func (); below.  */
5703 #include <assert.h>
5704 /* Override any gcc2 internal prototype to avoid an error.  */
5705 #ifdef __cplusplus
5706 extern "C"
5707 #endif
5708 /* We use char because int might match the return type of a gcc2
5709    builtin and then its argument prototype would still apply.  */
5710 char $ac_func ();
5711 char (*f) ();
5712
5713 int
5714 main ()
5715 {
5716 /* The GNU C library defines this for functions which it implements
5717     to always fail with ENOSYS.  Some functions are actually named
5718     something starting with __ and the normal name is an alias.  */
5719 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5720 choke me
5721 #else
5722 f = $ac_func;
5723 #endif
5724
5725   ;
5726   return 0;
5727 }
5728 _ACEOF
5729 rm -f conftest.$ac_objext conftest$ac_exeext
5730 if { (eval echo "$as_me:5730: \"$ac_link\"") >&5
5731   (eval $ac_link) 2>&5
5732   ac_status=$?
5733   echo "$as_me:5733: \$? = $ac_status" >&5
5734   (exit $ac_status); } &&
5735          { ac_try='test -s conftest$ac_exeext'
5736   { (eval echo "$as_me:5736: \"$ac_try\"") >&5
5737   (eval $ac_try) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); }; }; then
5741   eval "$as_ac_var=yes"
5742 else
5743   echo "$as_me: failed program was:" >&5
5744 cat conftest.$ac_ext >&5
5745 eval "$as_ac_var=no"
5746 fi
5747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5748 fi
5749 echo "$as_me:5749: result: `eval echo '${'$as_ac_var'}'`" >&5
5750 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5751 if test `eval echo '${'$as_ac_var'}'` = yes; then
5752   cat >>confdefs.h <<EOF
5753 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5754 EOF
5755
5756 fi
5757 done
5758
5759 if test "$cross_compiling" = yes ; then
5760
5761 for ac_func in \
5762                 link \
5763                 symlink
5764 do
5765 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5766 echo "$as_me:5766: checking for $ac_func" >&5
5767 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5768 if eval "test \"\${$as_ac_var+set}\" = set"; then
5769   echo $ECHO_N "(cached) $ECHO_C" >&6
5770 else
5771   cat >conftest.$ac_ext <<_ACEOF
5772 #line 5772 "configure"
5773 #include "confdefs.h"
5774 /* System header to define __stub macros and hopefully few prototypes,
5775     which can conflict with char $ac_func (); below.  */
5776 #include <assert.h>
5777 /* Override any gcc2 internal prototype to avoid an error.  */
5778 #ifdef __cplusplus
5779 extern "C"
5780 #endif
5781 /* We use char because int might match the return type of a gcc2
5782    builtin and then its argument prototype would still apply.  */
5783 char $ac_func ();
5784 char (*f) ();
5785
5786 int
5787 main ()
5788 {
5789 /* The GNU C library defines this for functions which it implements
5790     to always fail with ENOSYS.  Some functions are actually named
5791     something starting with __ and the normal name is an alias.  */
5792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5793 choke me
5794 #else
5795 f = $ac_func;
5796 #endif
5797
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:5803: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>&5
5805   ac_status=$?
5806   echo "$as_me:5806: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest$ac_exeext'
5809   { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   eval "$as_ac_var=yes"
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 eval "$as_ac_var=no"
5819 fi
5820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5821 fi
5822 echo "$as_me:5822: result: `eval echo '${'$as_ac_var'}'`" >&5
5823 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5824 if test `eval echo '${'$as_ac_var'}'` = yes; then
5825   cat >>confdefs.h <<EOF
5826 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5827 EOF
5828
5829 fi
5830 done
5831
5832 else
5833         echo "$as_me:5833: checking if link/symlink functions work" >&5
5834 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5835 if test "${cf_cv_link_funcs+set}" = set; then
5836   echo $ECHO_N "(cached) $ECHO_C" >&6
5837 else
5838
5839                 cf_cv_link_funcs=
5840                 for cf_func in link symlink ; do
5841                         if test "$cross_compiling" = yes; then
5842
5843                         eval 'ac_cv_func_'$cf_func'=error'
5844 else
5845   cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848
5849 #include <sys/types.h>
5850 #include <sys/stat.h>
5851 #ifdef HAVE_UNISTD_H
5852 #include <unistd.h>
5853 #endif
5854 int main()
5855 {
5856         int fail = 0;
5857         char *src = "config.log";
5858         char *dst = "conftest.chk";
5859         struct stat src_sb;
5860         struct stat dst_sb;
5861
5862         stat(src, &src_sb);
5863         fail = ($cf_func("config.log", "conftest.chk") < 0)
5864             || (stat(dst, &dst_sb) < 0)
5865             || (dst_sb.st_mtime != src_sb.st_mtime);
5866 #ifdef HAVE_UNLINK
5867         unlink(dst);
5868 #else
5869         remove(dst);
5870 #endif
5871         ${cf_cv_main_return:-return} (fail);
5872 }
5873
5874 _ACEOF
5875 rm -f conftest$ac_exeext
5876 if { (eval echo "$as_me:5876: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5881   { (eval echo "$as_me:5881: \"$ac_try\"") >&5
5882   (eval $ac_try) 2>&5
5883   ac_status=$?
5884   echo "$as_me:5884: \$? = $ac_status" >&5
5885   (exit $ac_status); }; }; then
5886
5887                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5888                         eval 'ac_cv_func_'$cf_func'=yes'
5889 else
5890   echo "$as_me: program exited with status $ac_status" >&5
5891 echo "$as_me: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893
5894                         eval 'ac_cv_func_'$cf_func'=no'
5895 fi
5896 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5897 fi
5898                 done
5899                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5900
5901 fi
5902 echo "$as_me:5902: result: $cf_cv_link_funcs" >&5
5903 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5904         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5905 #define HAVE_LINK 1
5906 EOF
5907
5908         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5909 #define HAVE_SYMLINK 1
5910 EOF
5911
5912 fi
5913
5914 with_links=no
5915 with_symlinks=no
5916
5917 # soft links (symbolic links) are useful for some systems where hard links do
5918 # not work, or to make it simpler to copy terminfo trees around.
5919 if test "$ac_cv_func_symlink" = yes ; then
5920     echo "$as_me:5920: checking if tic should use symbolic links" >&5
5921 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5922
5923 # Check whether --enable-symlinks or --disable-symlinks was given.
5924 if test "${enable_symlinks+set}" = set; then
5925   enableval="$enable_symlinks"
5926   with_symlinks=$enableval
5927 else
5928   with_symlinks=no
5929 fi;
5930     echo "$as_me:5930: result: $with_symlinks" >&5
5931 echo "${ECHO_T}$with_symlinks" >&6
5932 fi
5933
5934 # If we have hard links and did not choose to use soft links instead, there is
5935 # no reason to make this choice optional - use the hard links.
5936 if test "$with_symlinks" = no ; then
5937     echo "$as_me:5937: checking if tic should use hard links" >&5
5938 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5939     if test "$ac_cv_func_link" = yes ; then
5940         with_links=yes
5941     else
5942         with_links=no
5943     fi
5944     echo "$as_me:5944: result: $with_links" >&5
5945 echo "${ECHO_T}$with_links" >&6
5946 fi
5947
5948 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5949 #define USE_LINKS 1
5950 EOF
5951
5952 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5953 #define USE_SYMLINKS 1
5954 EOF
5955
5956 ###   use option --enable-broken-linker to force on use of broken-linker support
5957 echo "$as_me:5957: checking if you want broken-linker support code" >&5
5958 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5959
5960 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5961 if test "${enable_broken_linker+set}" = set; then
5962   enableval="$enable_broken_linker"
5963   with_broken_linker=$enableval
5964 else
5965   with_broken_linker=${BROKEN_LINKER-no}
5966 fi;
5967 echo "$as_me:5967: result: $with_broken_linker" >&5
5968 echo "${ECHO_T}$with_broken_linker" >&6
5969
5970 BROKEN_LINKER=0
5971 if test "$with_broken_linker" = yes ; then
5972         cat >>confdefs.h <<\EOF
5973 #define BROKEN_LINKER 1
5974 EOF
5975
5976         BROKEN_LINKER=1
5977 elif test "$DFT_LWR_MODEL" = shared ; then
5978         case $cf_cv_system_name in #(vi
5979         cygwin*)
5980                 cat >>confdefs.h <<\EOF
5981 #define BROKEN_LINKER 1
5982 EOF
5983
5984                 BROKEN_LINKER=1
5985                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
5986
5987                 ;;
5988         esac
5989 fi
5990
5991 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
5992 echo "$as_me:5992: checking if tputs should process BSD-style prefix padding" >&5
5993 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
5994
5995 # Check whether --enable-bsdpad or --disable-bsdpad was given.
5996 if test "${enable_bsdpad+set}" = set; then
5997   enableval="$enable_bsdpad"
5998   with_bsdpad=$enableval
5999 else
6000   with_bsdpad=no
6001 fi;
6002 echo "$as_me:6002: result: $with_bsdpad" >&5
6003 echo "${ECHO_T}$with_bsdpad" >&6
6004 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6005 #define BSD_TPUTS 1
6006 EOF
6007
6008 ###   use option --enable-widec to turn on use of wide-character support
6009 NCURSES_CH_T=chtype
6010 NCURSES_LIBUTF8=0
6011
6012 NEED_WCHAR_H=0
6013 NCURSES_MBSTATE_T=0
6014 NCURSES_WCHAR_T=0
6015 NCURSES_WINT_T=0
6016
6017 # Check to define _XOPEN_SOURCE "automatically"
6018
6019 echo "$as_me:6019: checking if $CC -U and -D options work together" >&5
6020 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6021 if test "${cf_cv_cc_u_d_options+set}" = set; then
6022   echo $ECHO_N "(cached) $ECHO_C" >&6
6023 else
6024
6025         cf_save_CPPFLAGS="$CPPFLAGS"
6026         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6027         cat >conftest.$ac_ext <<_ACEOF
6028 #line 6028 "configure"
6029 #include "confdefs.h"
6030
6031 int
6032 main ()
6033 {
6034
6035 #ifndef U_D_OPTIONS
6036 make an undefined-error
6037 #endif
6038 #ifdef  D_U_OPTIONS
6039 make a defined-error
6040 #endif
6041
6042   ;
6043   return 0;
6044 }
6045 _ACEOF
6046 rm -f conftest.$ac_objext
6047 if { (eval echo "$as_me:6047: \"$ac_compile\"") >&5
6048   (eval $ac_compile) 2>&5
6049   ac_status=$?
6050   echo "$as_me:6050: \$? = $ac_status" >&5
6051   (exit $ac_status); } &&
6052          { ac_try='test -s conftest.$ac_objext'
6053   { (eval echo "$as_me:6053: \"$ac_try\"") >&5
6054   (eval $ac_try) 2>&5
6055   ac_status=$?
6056   echo "$as_me:6056: \$? = $ac_status" >&5
6057   (exit $ac_status); }; }; then
6058
6059         cf_cv_cc_u_d_options=yes
6060 else
6061   echo "$as_me: failed program was:" >&5
6062 cat conftest.$ac_ext >&5
6063
6064         cf_cv_cc_u_d_options=no
6065 fi
6066 rm -f conftest.$ac_objext conftest.$ac_ext
6067         CPPFLAGS="$cf_save_CPPFLAGS"
6068
6069 fi
6070 echo "$as_me:6070: result: $cf_cv_cc_u_d_options" >&5
6071 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6072
6073 cf_XOPEN_SOURCE=500
6074 cf_POSIX_C_SOURCE=199506L
6075
6076 case $host_os in #(vi
6077 aix[45]*) #(vi
6078         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6079         ;;
6080 freebsd*) #(vi
6081         # 5.x headers associate
6082         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6083         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6084         cf_POSIX_C_SOURCE=200112L
6085         cf_XOPEN_SOURCE=600
6086         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6087         ;;
6088 hpux*) #(vi
6089         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6090         ;;
6091 irix[56].*) #(vi
6092         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6093         ;;
6094 linux*|gnu*) #(vi
6095
6096 echo "$as_me:6096: checking if we must define _GNU_SOURCE" >&5
6097 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6098 if test "${cf_cv_gnu_source+set}" = set; then
6099   echo $ECHO_N "(cached) $ECHO_C" >&6
6100 else
6101
6102 cat >conftest.$ac_ext <<_ACEOF
6103 #line 6103 "configure"
6104 #include "confdefs.h"
6105 #include <sys/types.h>
6106 int
6107 main ()
6108 {
6109
6110 #ifndef _XOPEN_SOURCE
6111 make an error
6112 #endif
6113   ;
6114   return 0;
6115 }
6116 _ACEOF
6117 rm -f conftest.$ac_objext
6118 if { (eval echo "$as_me:6118: \"$ac_compile\"") >&5
6119   (eval $ac_compile) 2>&5
6120   ac_status=$?
6121   echo "$as_me:6121: \$? = $ac_status" >&5
6122   (exit $ac_status); } &&
6123          { ac_try='test -s conftest.$ac_objext'
6124   { (eval echo "$as_me:6124: \"$ac_try\"") >&5
6125   (eval $ac_try) 2>&5
6126   ac_status=$?
6127   echo "$as_me:6127: \$? = $ac_status" >&5
6128   (exit $ac_status); }; }; then
6129   cf_cv_gnu_source=no
6130 else
6131   echo "$as_me: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
6133 cf_save="$CPPFLAGS"
6134          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6135          cat >conftest.$ac_ext <<_ACEOF
6136 #line 6136 "configure"
6137 #include "confdefs.h"
6138 #include <sys/types.h>
6139 int
6140 main ()
6141 {
6142
6143 #ifdef _XOPEN_SOURCE
6144 make an error
6145 #endif
6146   ;
6147   return 0;
6148 }
6149 _ACEOF
6150 rm -f conftest.$ac_objext
6151 if { (eval echo "$as_me:6151: \"$ac_compile\"") >&5
6152   (eval $ac_compile) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit $ac_status); } &&
6156          { ac_try='test -s conftest.$ac_objext'
6157   { (eval echo "$as_me:6157: \"$ac_try\"") >&5
6158   (eval $ac_try) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit $ac_status); }; }; then
6162   cf_cv_gnu_source=no
6163 else
6164   echo "$as_me: failed program was:" >&5
6165 cat conftest.$ac_ext >&5
6166 cf_cv_gnu_source=yes
6167 fi
6168 rm -f conftest.$ac_objext conftest.$ac_ext
6169         CPPFLAGS="$cf_save"
6170
6171 fi
6172 rm -f conftest.$ac_objext conftest.$ac_ext
6173
6174 fi
6175 echo "$as_me:6175: result: $cf_cv_gnu_source" >&5
6176 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6177 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6178
6179         ;;
6180 mirbsd*) #(vi
6181         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6182         ;;
6183 netbsd*) #(vi
6184         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6185         ;;
6186 openbsd*) #(vi
6187         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6188         ;;
6189 osf[45]*) #(vi
6190         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6191         ;;
6192 nto-qnx*) #(vi
6193         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6194         ;;
6195 sco*) #(vi
6196         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6197         ;;
6198 solaris*) #(vi
6199         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6200         ;;
6201 *)
6202         echo "$as_me:6202: checking if we should define _XOPEN_SOURCE" >&5
6203 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6204 if test "${cf_cv_xopen_source+set}" = set; then
6205   echo $ECHO_N "(cached) $ECHO_C" >&6
6206 else
6207
6208         cat >conftest.$ac_ext <<_ACEOF
6209 #line 6209 "configure"
6210 #include "confdefs.h"
6211 #include <sys/types.h>
6212 int
6213 main ()
6214 {
6215
6216 #ifndef _XOPEN_SOURCE
6217 make an error
6218 #endif
6219   ;
6220   return 0;
6221 }
6222 _ACEOF
6223 rm -f conftest.$ac_objext
6224 if { (eval echo "$as_me:6224: \"$ac_compile\"") >&5
6225   (eval $ac_compile) 2>&5
6226   ac_status=$?
6227   echo "$as_me:6227: \$? = $ac_status" >&5
6228   (exit $ac_status); } &&
6229          { ac_try='test -s conftest.$ac_objext'
6230   { (eval echo "$as_me:6230: \"$ac_try\"") >&5
6231   (eval $ac_try) 2>&5
6232   ac_status=$?
6233   echo "$as_me:6233: \$? = $ac_status" >&5
6234   (exit $ac_status); }; }; then
6235   cf_cv_xopen_source=no
6236 else
6237   echo "$as_me: failed program was:" >&5
6238 cat conftest.$ac_ext >&5
6239 cf_save="$CPPFLAGS"
6240          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6241          cat >conftest.$ac_ext <<_ACEOF
6242 #line 6242 "configure"
6243 #include "confdefs.h"
6244 #include <sys/types.h>
6245 int
6246 main ()
6247 {
6248
6249 #ifdef _XOPEN_SOURCE
6250 make an error
6251 #endif
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 rm -f conftest.$ac_objext
6257 if { (eval echo "$as_me:6257: \"$ac_compile\"") >&5
6258   (eval $ac_compile) 2>&5
6259   ac_status=$?
6260   echo "$as_me:6260: \$? = $ac_status" >&5
6261   (exit $ac_status); } &&
6262          { ac_try='test -s conftest.$ac_objext'
6263   { (eval echo "$as_me:6263: \"$ac_try\"") >&5
6264   (eval $ac_try) 2>&5
6265   ac_status=$?
6266   echo "$as_me:6266: \$? = $ac_status" >&5
6267   (exit $ac_status); }; }; then
6268   cf_cv_xopen_source=no
6269 else
6270   echo "$as_me: failed program was:" >&5
6271 cat conftest.$ac_ext >&5
6272 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6273 fi
6274 rm -f conftest.$ac_objext conftest.$ac_ext
6275         CPPFLAGS="$cf_save"
6276
6277 fi
6278 rm -f conftest.$ac_objext conftest.$ac_ext
6279
6280 fi
6281 echo "$as_me:6281: result: $cf_cv_xopen_source" >&5
6282 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6283         if test "$cf_cv_xopen_source" != no ; then
6284
6285 # remove _XOPEN_SOURCE symbol from $CFLAGS
6286 CFLAGS=`echo "$CFLAGS" | \
6287         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6288                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6289
6290 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6291 CPPFLAGS=`echo "$CPPFLAGS" | \
6292         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6293                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6294
6295                 test "$cf_cv_cc_u_d_options" = yes && \
6296                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6297                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6298         fi
6299
6300 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6301
6302 cf_save_CFLAGS="$CFLAGS"
6303 cf_save_CPPFLAGS="$CPPFLAGS"
6304
6305 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6306 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6307         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6308                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6309
6310 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6311 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6312         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6313                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6314
6315 echo "$as_me:6315: checking if we should define _POSIX_C_SOURCE" >&5
6316 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6317 if test "${cf_cv_posix_c_source+set}" = set; then
6318   echo $ECHO_N "(cached) $ECHO_C" >&6
6319 else
6320
6321 echo "(line 6321) testing if the symbol is already defined go no further ..." 1>&5
6322
6323         cat >conftest.$ac_ext <<_ACEOF
6324 #line 6324 "configure"
6325 #include "confdefs.h"
6326 #include <sys/types.h>
6327 int
6328 main ()
6329 {
6330
6331 #ifndef _POSIX_C_SOURCE
6332 make an error
6333 #endif
6334   ;
6335   return 0;
6336 }
6337 _ACEOF
6338 rm -f conftest.$ac_objext
6339 if { (eval echo "$as_me:6339: \"$ac_compile\"") >&5
6340   (eval $ac_compile) 2>&5
6341   ac_status=$?
6342   echo "$as_me:6342: \$? = $ac_status" >&5
6343   (exit $ac_status); } &&
6344          { ac_try='test -s conftest.$ac_objext'
6345   { (eval echo "$as_me:6345: \"$ac_try\"") >&5
6346   (eval $ac_try) 2>&5
6347   ac_status=$?
6348   echo "$as_me:6348: \$? = $ac_status" >&5
6349   (exit $ac_status); }; }; then
6350   cf_cv_posix_c_source=no
6351 else
6352   echo "$as_me: failed program was:" >&5
6353 cat conftest.$ac_ext >&5
6354 cf_want_posix_source=no
6355          case .$cf_POSIX_C_SOURCE in #(vi
6356          .[12]??*) #(vi
6357                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6358                 ;;
6359          .2) #(vi
6360                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6361                 cf_want_posix_source=yes
6362                 ;;
6363          .*)
6364                 cf_want_posix_source=yes
6365                 ;;
6366          esac
6367          if test "$cf_want_posix_source" = yes ; then
6368                 cat >conftest.$ac_ext <<_ACEOF
6369 #line 6369 "configure"
6370 #include "confdefs.h"
6371 #include <sys/types.h>
6372 int
6373 main ()
6374 {
6375
6376 #ifdef _POSIX_SOURCE
6377 make an error
6378 #endif
6379   ;
6380   return 0;
6381 }
6382 _ACEOF
6383 rm -f conftest.$ac_objext
6384 if { (eval echo "$as_me:6384: \"$ac_compile\"") >&5
6385   (eval $ac_compile) 2>&5
6386   ac_status=$?
6387   echo "$as_me:6387: \$? = $ac_status" >&5
6388   (exit $ac_status); } &&
6389          { ac_try='test -s conftest.$ac_objext'
6390   { (eval echo "$as_me:6390: \"$ac_try\"") >&5
6391   (eval $ac_try) 2>&5
6392   ac_status=$?
6393   echo "$as_me:6393: \$? = $ac_status" >&5
6394   (exit $ac_status); }; }; then
6395   :
6396 else
6397   echo "$as_me: failed program was:" >&5
6398 cat conftest.$ac_ext >&5
6399 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6400 fi
6401 rm -f conftest.$ac_objext conftest.$ac_ext
6402          fi
6403
6404 echo "(line 6404) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6405
6406          CFLAGS="$cf_trim_CFLAGS"
6407          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6408
6409 echo "(line 6409) testing if the second compile does not leave our definition intact error ..." 1>&5
6410
6411          cat >conftest.$ac_ext <<_ACEOF
6412 #line 6412 "configure"
6413 #include "confdefs.h"
6414 #include <sys/types.h>
6415 int
6416 main ()
6417 {
6418
6419 #ifndef _POSIX_C_SOURCE
6420 make an error
6421 #endif
6422   ;
6423   return 0;
6424 }
6425 _ACEOF
6426 rm -f conftest.$ac_objext
6427 if { (eval echo "$as_me:6427: \"$ac_compile\"") >&5
6428   (eval $ac_compile) 2>&5
6429   ac_status=$?
6430   echo "$as_me:6430: \$? = $ac_status" >&5
6431   (exit $ac_status); } &&
6432          { ac_try='test -s conftest.$ac_objext'
6433   { (eval echo "$as_me:6433: \"$ac_try\"") >&5
6434   (eval $ac_try) 2>&5
6435   ac_status=$?
6436   echo "$as_me:6436: \$? = $ac_status" >&5
6437   (exit $ac_status); }; }; then
6438   :
6439 else
6440   echo "$as_me: failed program was:" >&5
6441 cat conftest.$ac_ext >&5
6442 cf_cv_posix_c_source=no
6443 fi
6444 rm -f conftest.$ac_objext conftest.$ac_ext
6445          CFLAGS="$cf_save_CFLAGS"
6446          CPPFLAGS="$cf_save_CPPFLAGS"
6447
6448 fi
6449 rm -f conftest.$ac_objext conftest.$ac_ext
6450
6451 fi
6452 echo "$as_me:6452: result: $cf_cv_posix_c_source" >&5
6453 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6454
6455 if test "$cf_cv_posix_c_source" != no ; then
6456         CFLAGS="$cf_trim_CFLAGS"
6457         CPPFLAGS="$cf_trim_CPPFLAGS"
6458         if test "$cf_cv_cc_u_d_options" = yes ; then
6459                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6460                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6461                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6462         fi
6463         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6464 fi
6465
6466         ;;
6467 esac
6468
6469 # Work around breakage on OS X
6470
6471 echo "$as_me:6471: checking if SIGWINCH is defined" >&5
6472 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6473 if test "${cf_cv_define_sigwinch+set}" = set; then
6474   echo $ECHO_N "(cached) $ECHO_C" >&6
6475 else
6476
6477         cat >conftest.$ac_ext <<_ACEOF
6478 #line 6478 "configure"
6479 #include "confdefs.h"
6480
6481 #include <sys/types.h>
6482 #include <sys/signal.h>
6483
6484 int
6485 main ()
6486 {
6487 int x = SIGWINCH
6488   ;
6489   return 0;
6490 }
6491 _ACEOF
6492 rm -f conftest.$ac_objext
6493 if { (eval echo "$as_me:6493: \"$ac_compile\"") >&5
6494   (eval $ac_compile) 2>&5
6495   ac_status=$?
6496   echo "$as_me:6496: \$? = $ac_status" >&5
6497   (exit $ac_status); } &&
6498          { ac_try='test -s conftest.$ac_objext'
6499   { (eval echo "$as_me:6499: \"$ac_try\"") >&5
6500   (eval $ac_try) 2>&5
6501   ac_status=$?
6502   echo "$as_me:6502: \$? = $ac_status" >&5
6503   (exit $ac_status); }; }; then
6504   cf_cv_define_sigwinch=yes
6505 else
6506   echo "$as_me: failed program was:" >&5
6507 cat conftest.$ac_ext >&5
6508 cat >conftest.$ac_ext <<_ACEOF
6509 #line 6509 "configure"
6510 #include "confdefs.h"
6511
6512 #undef _XOPEN_SOURCE
6513 #undef _POSIX_SOURCE
6514 #undef _POSIX_C_SOURCE
6515 #include <sys/types.h>
6516 #include <sys/signal.h>
6517
6518 int
6519 main ()
6520 {
6521 int x = SIGWINCH
6522   ;
6523   return 0;
6524 }
6525 _ACEOF
6526 rm -f conftest.$ac_objext
6527 if { (eval echo "$as_me:6527: \"$ac_compile\"") >&5
6528   (eval $ac_compile) 2>&5
6529   ac_status=$?
6530   echo "$as_me:6530: \$? = $ac_status" >&5
6531   (exit $ac_status); } &&
6532          { ac_try='test -s conftest.$ac_objext'
6533   { (eval echo "$as_me:6533: \"$ac_try\"") >&5
6534   (eval $ac_try) 2>&5
6535   ac_status=$?
6536   echo "$as_me:6536: \$? = $ac_status" >&5
6537   (exit $ac_status); }; }; then
6538   cf_cv_define_sigwinch=maybe
6539 else
6540   echo "$as_me: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542 cf_cv_define_sigwinch=no
6543 fi
6544 rm -f conftest.$ac_objext conftest.$ac_ext
6545
6546 fi
6547 rm -f conftest.$ac_objext conftest.$ac_ext
6548
6549 fi
6550 echo "$as_me:6550: result: $cf_cv_define_sigwinch" >&5
6551 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6552
6553 if test "$cf_cv_define_sigwinch" = maybe ; then
6554 echo "$as_me:6554: checking for actual SIGWINCH definition" >&5
6555 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6556 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6557   echo $ECHO_N "(cached) $ECHO_C" >&6
6558 else
6559
6560 cf_cv_fixup_sigwinch=unknown
6561 cf_sigwinch=32
6562 while test $cf_sigwinch != 1
6563 do
6564         cat >conftest.$ac_ext <<_ACEOF
6565 #line 6565 "configure"
6566 #include "confdefs.h"
6567
6568 #undef _XOPEN_SOURCE
6569 #undef _POSIX_SOURCE
6570 #undef _POSIX_C_SOURCE
6571 #include <sys/types.h>
6572 #include <sys/signal.h>
6573
6574 int
6575 main ()
6576 {
6577
6578 #if SIGWINCH != $cf_sigwinch
6579 make an error
6580 #endif
6581 int x = SIGWINCH
6582   ;
6583   return 0;
6584 }
6585 _ACEOF
6586 rm -f conftest.$ac_objext
6587 if { (eval echo "$as_me:6587: \"$ac_compile\"") >&5
6588   (eval $ac_compile) 2>&5
6589   ac_status=$?
6590   echo "$as_me:6590: \$? = $ac_status" >&5
6591   (exit $ac_status); } &&
6592          { ac_try='test -s conftest.$ac_objext'
6593   { (eval echo "$as_me:6593: \"$ac_try\"") >&5
6594   (eval $ac_try) 2>&5
6595   ac_status=$?
6596   echo "$as_me:6596: \$? = $ac_status" >&5
6597   (exit $ac_status); }; }; then
6598   cf_cv_fixup_sigwinch=$cf_sigwinch
6599          break
6600 else
6601   echo "$as_me: failed program was:" >&5
6602 cat conftest.$ac_ext >&5
6603 fi
6604 rm -f conftest.$ac_objext conftest.$ac_ext
6605
6606 cf_sigwinch=`expr $cf_sigwinch - 1`
6607 done
6608
6609 fi
6610 echo "$as_me:6610: result: $cf_cv_fixup_sigwinch" >&5
6611 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6612
6613         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6614                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6615         fi
6616 fi
6617
6618 # Checks for CODESET support.
6619
6620   echo "$as_me:6620: checking for nl_langinfo and CODESET" >&5
6621 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6622 if test "${am_cv_langinfo_codeset+set}" = set; then
6623   echo $ECHO_N "(cached) $ECHO_C" >&6
6624 else
6625   cat >conftest.$ac_ext <<_ACEOF
6626 #line 6626 "configure"
6627 #include "confdefs.h"
6628 #include <langinfo.h>
6629 int
6630 main ()
6631 {
6632 char* cs = nl_langinfo(CODESET);
6633   ;
6634   return 0;
6635 }
6636 _ACEOF
6637 rm -f conftest.$ac_objext conftest$ac_exeext
6638 if { (eval echo "$as_me:6638: \"$ac_link\"") >&5
6639   (eval $ac_link) 2>&5
6640   ac_status=$?
6641   echo "$as_me:6641: \$? = $ac_status" >&5
6642   (exit $ac_status); } &&
6643          { ac_try='test -s conftest$ac_exeext'
6644   { (eval echo "$as_me:6644: \"$ac_try\"") >&5
6645   (eval $ac_try) 2>&5
6646   ac_status=$?
6647   echo "$as_me:6647: \$? = $ac_status" >&5
6648   (exit $ac_status); }; }; then
6649   am_cv_langinfo_codeset=yes
6650 else
6651   echo "$as_me: failed program was:" >&5
6652 cat conftest.$ac_ext >&5
6653 am_cv_langinfo_codeset=no
6654 fi
6655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6656
6657 fi
6658 echo "$as_me:6658: result: $am_cv_langinfo_codeset" >&5
6659 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6660   if test $am_cv_langinfo_codeset = yes; then
6661
6662 cat >>confdefs.h <<\EOF
6663 #define HAVE_LANGINFO_CODESET 1
6664 EOF
6665
6666   fi
6667
6668 # use these variables to work around a defect in gcc's fixincludes.
6669 NCURSES_OK_WCHAR_T=
6670 NCURSES_OK_WINT_T=
6671
6672 echo "$as_me:6672: checking if you want wide-character code" >&5
6673 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6674
6675 # Check whether --enable-widec or --disable-widec was given.
6676 if test "${enable_widec+set}" = set; then
6677   enableval="$enable_widec"
6678   with_widec=$enableval
6679 else
6680   with_widec=no
6681 fi;
6682 echo "$as_me:6682: result: $with_widec" >&5
6683 echo "${ECHO_T}$with_widec" >&6
6684 if test "$with_widec" = yes ; then
6685         LIB_SUFFIX="w${LIB_SUFFIX}"
6686         cat >>confdefs.h <<\EOF
6687 #define USE_WIDEC_SUPPORT 1
6688 EOF
6689
6690 echo "$as_me:6690: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6691 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6692 cat >conftest.$ac_ext <<_ACEOF
6693 #line 6693 "configure"
6694 #include "confdefs.h"
6695 #include <sys/types.h>
6696
6697 int
6698 main ()
6699 {
6700
6701 #ifndef _XOPEN_SOURCE_EXTENDED
6702 make an error
6703 #endif
6704   ;
6705   return 0;
6706 }
6707 _ACEOF
6708 rm -f conftest.$ac_objext
6709 if { (eval echo "$as_me:6709: \"$ac_compile\"") >&5
6710   (eval $ac_compile) 2>&5
6711   ac_status=$?
6712   echo "$as_me:6712: \$? = $ac_status" >&5
6713   (exit $ac_status); } &&
6714          { ac_try='test -s conftest.$ac_objext'
6715   { (eval echo "$as_me:6715: \"$ac_try\"") >&5
6716   (eval $ac_try) 2>&5
6717   ac_status=$?
6718   echo "$as_me:6718: \$? = $ac_status" >&5
6719   (exit $ac_status); }; }; then
6720   cf_result=no
6721 else
6722   echo "$as_me: failed program was:" >&5
6723 cat conftest.$ac_ext >&5
6724 cf_result=yes
6725 fi
6726 rm -f conftest.$ac_objext conftest.$ac_ext
6727 echo "$as_me:6727: result: $cf_result" >&5
6728 echo "${ECHO_T}$cf_result" >&6
6729
6730 if test "$cf_result" = yes ; then
6731         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6732 elif test "x" != "x" ; then
6733         echo "$as_me:6733: checking checking for compatible value versus " >&5
6734 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6735         cat >conftest.$ac_ext <<_ACEOF
6736 #line 6736 "configure"
6737 #include "confdefs.h"
6738 #include <sys/types.h>
6739
6740 int
6741 main ()
6742 {
6743
6744 #if _XOPEN_SOURCE_EXTENDED- < 0
6745 make an error
6746 #endif
6747   ;
6748   return 0;
6749 }
6750 _ACEOF
6751 rm -f conftest.$ac_objext
6752 if { (eval echo "$as_me:6752: \"$ac_compile\"") >&5
6753   (eval $ac_compile) 2>&5
6754   ac_status=$?
6755   echo "$as_me:6755: \$? = $ac_status" >&5
6756   (exit $ac_status); } &&
6757          { ac_try='test -s conftest.$ac_objext'
6758   { (eval echo "$as_me:6758: \"$ac_try\"") >&5
6759   (eval $ac_try) 2>&5
6760   ac_status=$?
6761   echo "$as_me:6761: \$? = $ac_status" >&5
6762   (exit $ac_status); }; }; then
6763   cf_result=yes
6764 else
6765   echo "$as_me: failed program was:" >&5
6766 cat conftest.$ac_ext >&5
6767 cf_result=no
6768 fi
6769 rm -f conftest.$ac_objext conftest.$ac_ext
6770         echo "$as_me:6770: result: $cf_result" >&5
6771 echo "${ECHO_T}$cf_result" >&6
6772         if test "$cf_result" = no ; then
6773                 # perhaps we can override it - try...
6774                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6775         fi
6776 fi
6777
6778         # with_overwrite=no
6779         NCURSES_CH_T=cchar_t
6780
6781 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6782 do
6783 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6784 echo "$as_me:6784: checking for $ac_func" >&5
6785 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6786 if eval "test \"\${$as_ac_var+set}\" = set"; then
6787   echo $ECHO_N "(cached) $ECHO_C" >&6
6788 else
6789   cat >conftest.$ac_ext <<_ACEOF
6790 #line 6790 "configure"
6791 #include "confdefs.h"
6792 /* System header to define __stub macros and hopefully few prototypes,
6793     which can conflict with char $ac_func (); below.  */
6794 #include <assert.h>
6795 /* Override any gcc2 internal prototype to avoid an error.  */
6796 #ifdef __cplusplus
6797 extern "C"
6798 #endif
6799 /* We use char because int might match the return type of a gcc2
6800    builtin and then its argument prototype would still apply.  */
6801 char $ac_func ();
6802 char (*f) ();
6803
6804 int
6805 main ()
6806 {
6807 /* The GNU C library defines this for functions which it implements
6808     to always fail with ENOSYS.  Some functions are actually named
6809     something starting with __ and the normal name is an alias.  */
6810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6811 choke me
6812 #else
6813 f = $ac_func;
6814 #endif
6815
6816   ;
6817   return 0;
6818 }
6819 _ACEOF
6820 rm -f conftest.$ac_objext conftest$ac_exeext
6821 if { (eval echo "$as_me:6821: \"$ac_link\"") >&5
6822   (eval $ac_link) 2>&5
6823   ac_status=$?
6824   echo "$as_me:6824: \$? = $ac_status" >&5
6825   (exit $ac_status); } &&
6826          { ac_try='test -s conftest$ac_exeext'
6827   { (eval echo "$as_me:6827: \"$ac_try\"") >&5
6828   (eval $ac_try) 2>&5
6829   ac_status=$?
6830   echo "$as_me:6830: \$? = $ac_status" >&5
6831   (exit $ac_status); }; }; then
6832   eval "$as_ac_var=yes"
6833 else
6834   echo "$as_me: failed program was:" >&5
6835 cat conftest.$ac_ext >&5
6836 eval "$as_ac_var=no"
6837 fi
6838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6839 fi
6840 echo "$as_me:6840: result: `eval echo '${'$as_ac_var'}'`" >&5
6841 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6842 if test `eval echo '${'$as_ac_var'}'` = yes; then
6843   cat >>confdefs.h <<EOF
6844 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6845 EOF
6846
6847 fi
6848 done
6849
6850         if test "$ac_cv_func_putwc" != yes ; then
6851
6852 echo "$as_me:6852: checking for putwc in libutf8" >&5
6853 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6854 if test "${cf_cv_libutf8+set}" = set; then
6855   echo $ECHO_N "(cached) $ECHO_C" >&6
6856 else
6857
6858         cf_save_LIBS="$LIBS"
6859         LIBS="-lutf8 $LIBS"
6860 cat >conftest.$ac_ext <<_ACEOF
6861 #line 6861 "configure"
6862 #include "confdefs.h"
6863
6864 #include <libutf8.h>
6865 int
6866 main ()
6867 {
6868 putwc(0,0);
6869   ;
6870   return 0;
6871 }
6872 _ACEOF
6873 rm -f conftest.$ac_objext conftest$ac_exeext
6874 if { (eval echo "$as_me:6874: \"$ac_link\"") >&5
6875   (eval $ac_link) 2>&5
6876   ac_status=$?
6877   echo "$as_me:6877: \$? = $ac_status" >&5
6878   (exit $ac_status); } &&
6879          { ac_try='test -s conftest$ac_exeext'
6880   { (eval echo "$as_me:6880: \"$ac_try\"") >&5
6881   (eval $ac_try) 2>&5
6882   ac_status=$?
6883   echo "$as_me:6883: \$? = $ac_status" >&5
6884   (exit $ac_status); }; }; then
6885   cf_cv_libutf8=yes
6886 else
6887   echo "$as_me: failed program was:" >&5
6888 cat conftest.$ac_ext >&5
6889 cf_cv_libutf8=no
6890 fi
6891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6892         LIBS="$cf_save_LIBS"
6893
6894 fi
6895 echo "$as_me:6895: result: $cf_cv_libutf8" >&5
6896 echo "${ECHO_T}$cf_cv_libutf8" >&6
6897
6898 if test "$cf_cv_libutf8" = yes ; then
6899         cat >>confdefs.h <<\EOF
6900 #define HAVE_LIBUTF8_H 1
6901 EOF
6902
6903         LIBS="-lutf8 $LIBS"
6904 fi
6905
6906                 if test "$cf_cv_libutf8" = yes ; then
6907                         NCURSES_LIBUTF8=1
6908                 fi
6909         fi
6910
6911 # This is needed on Tru64 5.0 to declare mbstate_t
6912 echo "$as_me:6912: checking if we must include wchar.h to declare mbstate_t" >&5
6913 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6914 if test "${cf_cv_mbstate_t+set}" = set; then
6915   echo $ECHO_N "(cached) $ECHO_C" >&6
6916 else
6917
6918 cat >conftest.$ac_ext <<_ACEOF
6919 #line 6919 "configure"
6920 #include "confdefs.h"
6921
6922 #include <stdlib.h>
6923 #include <stdarg.h>
6924 #include <stdio.h>
6925 #ifdef HAVE_LIBUTF8_H
6926 #include <libutf8.h>
6927 #endif
6928 int
6929 main ()
6930 {
6931 mbstate_t state
6932   ;
6933   return 0;
6934 }
6935 _ACEOF
6936 rm -f conftest.$ac_objext
6937 if { (eval echo "$as_me:6937: \"$ac_compile\"") >&5
6938   (eval $ac_compile) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); } &&
6942          { ac_try='test -s conftest.$ac_objext'
6943   { (eval echo "$as_me:6943: \"$ac_try\"") >&5
6944   (eval $ac_try) 2>&5
6945   ac_status=$?
6946   echo "$as_me:6946: \$? = $ac_status" >&5
6947   (exit $ac_status); }; }; then
6948   cf_cv_mbstate_t=no
6949 else
6950   echo "$as_me: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6952 cat >conftest.$ac_ext <<_ACEOF
6953 #line 6953 "configure"
6954 #include "confdefs.h"
6955
6956 #include <stdlib.h>
6957 #include <stdarg.h>
6958 #include <stdio.h>
6959 #include <wchar.h>
6960 #ifdef HAVE_LIBUTF8_H
6961 #include <libutf8.h>
6962 #endif
6963 int
6964 main ()
6965 {
6966 mbstate_t value
6967   ;
6968   return 0;
6969 }
6970 _ACEOF
6971 rm -f conftest.$ac_objext
6972 if { (eval echo "$as_me:6972: \"$ac_compile\"") >&5
6973   (eval $ac_compile) 2>&5
6974   ac_status=$?
6975   echo "$as_me:6975: \$? = $ac_status" >&5
6976   (exit $ac_status); } &&
6977          { ac_try='test -s conftest.$ac_objext'
6978   { (eval echo "$as_me:6978: \"$ac_try\"") >&5
6979   (eval $ac_try) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); }; }; then
6983   cf_cv_mbstate_t=yes
6984 else
6985   echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987 cf_cv_mbstate_t=unknown
6988 fi
6989 rm -f conftest.$ac_objext conftest.$ac_ext
6990 fi
6991 rm -f conftest.$ac_objext conftest.$ac_ext
6992 fi
6993 echo "$as_me:6993: result: $cf_cv_mbstate_t" >&5
6994 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6995
6996 if test "$cf_cv_mbstate_t" = yes ; then
6997         cat >>confdefs.h <<\EOF
6998 #define NEED_WCHAR_H 1
6999 EOF
7000
7001         NEED_WCHAR_H=1
7002 fi
7003
7004 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7005 if test "$cf_cv_mbstate_t" = unknown ; then
7006         NCURSES_MBSTATE_T=1
7007 fi
7008
7009 # This is needed on Tru64 5.0 to declare wchar_t
7010 echo "$as_me:7010: checking if we must include wchar.h to declare wchar_t" >&5
7011 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7012 if test "${cf_cv_wchar_t+set}" = set; then
7013   echo $ECHO_N "(cached) $ECHO_C" >&6
7014 else
7015
7016 cat >conftest.$ac_ext <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019
7020 #include <stdlib.h>
7021 #include <stdarg.h>
7022 #include <stdio.h>
7023 #ifdef HAVE_LIBUTF8_H
7024 #include <libutf8.h>
7025 #endif
7026 int
7027 main ()
7028 {
7029 wchar_t state
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f conftest.$ac_objext
7035 if { (eval echo "$as_me:7035: \"$ac_compile\"") >&5
7036   (eval $ac_compile) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); } &&
7040          { ac_try='test -s conftest.$ac_objext'
7041   { (eval echo "$as_me:7041: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); }; }; then
7046   cf_cv_wchar_t=no
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7050 cat >conftest.$ac_ext <<_ACEOF
7051 #line 7051 "configure"
7052 #include "confdefs.h"
7053
7054 #include <stdlib.h>
7055 #include <stdarg.h>
7056 #include <stdio.h>
7057 #include <wchar.h>
7058 #ifdef HAVE_LIBUTF8_H
7059 #include <libutf8.h>
7060 #endif
7061 int
7062 main ()
7063 {
7064 wchar_t value
7065   ;
7066   return 0;
7067 }
7068 _ACEOF
7069 rm -f conftest.$ac_objext
7070 if { (eval echo "$as_me:7070: \"$ac_compile\"") >&5
7071   (eval $ac_compile) 2>&5
7072   ac_status=$?
7073   echo "$as_me:7073: \$? = $ac_status" >&5
7074   (exit $ac_status); } &&
7075          { ac_try='test -s conftest.$ac_objext'
7076   { (eval echo "$as_me:7076: \"$ac_try\"") >&5
7077   (eval $ac_try) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); }; }; then
7081   cf_cv_wchar_t=yes
7082 else
7083   echo "$as_me: failed program was:" >&5
7084 cat conftest.$ac_ext >&5
7085 cf_cv_wchar_t=unknown
7086 fi
7087 rm -f conftest.$ac_objext conftest.$ac_ext
7088 fi
7089 rm -f conftest.$ac_objext conftest.$ac_ext
7090 fi
7091 echo "$as_me:7091: result: $cf_cv_wchar_t" >&5
7092 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7093
7094 if test "$cf_cv_wchar_t" = yes ; then
7095         cat >>confdefs.h <<\EOF
7096 #define NEED_WCHAR_H 1
7097 EOF
7098
7099         NEED_WCHAR_H=1
7100 fi
7101
7102 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7103 if test "$cf_cv_wchar_t" = unknown ; then
7104         NCURSES_WCHAR_T=1
7105 fi
7106
7107 # if we find wchar_t in either place, use substitution to provide a fallback.
7108 if test "$cf_cv_wchar_t" != unknown ; then
7109         NCURSES_OK_WCHAR_T=1
7110 fi
7111
7112 # This is needed on Tru64 5.0 to declare wint_t
7113 echo "$as_me:7113: checking if we must include wchar.h to declare wint_t" >&5
7114 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7115 if test "${cf_cv_wint_t+set}" = set; then
7116   echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118
7119 cat >conftest.$ac_ext <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122
7123 #include <stdlib.h>
7124 #include <stdarg.h>
7125 #include <stdio.h>
7126 #ifdef HAVE_LIBUTF8_H
7127 #include <libutf8.h>
7128 #endif
7129 int
7130 main ()
7131 {
7132 wint_t state
7133   ;
7134   return 0;
7135 }
7136 _ACEOF
7137 rm -f conftest.$ac_objext
7138 if { (eval echo "$as_me:7138: \"$ac_compile\"") >&5
7139   (eval $ac_compile) 2>&5
7140   ac_status=$?
7141   echo "$as_me:7141: \$? = $ac_status" >&5
7142   (exit $ac_status); } &&
7143          { ac_try='test -s conftest.$ac_objext'
7144   { (eval echo "$as_me:7144: \"$ac_try\"") >&5
7145   (eval $ac_try) 2>&5
7146   ac_status=$?
7147   echo "$as_me:7147: \$? = $ac_status" >&5
7148   (exit $ac_status); }; }; then
7149   cf_cv_wint_t=no
7150 else
7151   echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7153 cat >conftest.$ac_ext <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156
7157 #include <stdlib.h>
7158 #include <stdarg.h>
7159 #include <stdio.h>
7160 #include <wchar.h>
7161 #ifdef HAVE_LIBUTF8_H
7162 #include <libutf8.h>
7163 #endif
7164 int
7165 main ()
7166 {
7167 wint_t value
7168   ;
7169   return 0;
7170 }
7171 _ACEOF
7172 rm -f conftest.$ac_objext
7173 if { (eval echo "$as_me:7173: \"$ac_compile\"") >&5
7174   (eval $ac_compile) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } &&
7178          { ac_try='test -s conftest.$ac_objext'
7179   { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180   (eval $ac_try) 2>&5
7181   ac_status=$?
7182   echo "$as_me:7182: \$? = $ac_status" >&5
7183   (exit $ac_status); }; }; then
7184   cf_cv_wint_t=yes
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 cf_cv_wint_t=unknown
7189 fi
7190 rm -f conftest.$ac_objext conftest.$ac_ext
7191 fi
7192 rm -f conftest.$ac_objext conftest.$ac_ext
7193 fi
7194 echo "$as_me:7194: result: $cf_cv_wint_t" >&5
7195 echo "${ECHO_T}$cf_cv_wint_t" >&6
7196
7197 if test "$cf_cv_wint_t" = yes ; then
7198         cat >>confdefs.h <<\EOF
7199 #define NEED_WCHAR_H 1
7200 EOF
7201
7202         NEED_WCHAR_H=1
7203 fi
7204
7205 # if we do not find wint_t in either place, use substitution to provide a fallback.
7206 if test "$cf_cv_wint_t" = unknown ; then
7207         NCURSES_WINT_T=1
7208 fi
7209
7210 # if we find wint_t in either place, use substitution to provide a fallback.
7211 if test "$cf_cv_wint_t" != unknown ; then
7212         NCURSES_OK_WINT_T=1
7213 fi
7214
7215         if test "$NCURSES_MBSTATE_T" != 0; then
7216                 cat >>confdefs.h <<\EOF
7217 #define NEED_MBSTATE_T_DEF 1
7218 EOF
7219
7220         fi
7221 fi
7222
7223 ###   use option --disable-lp64 to allow long chtype
7224 case $cf_cv_abi_version in
7225 [345]*)
7226         default_with_lp64=no
7227         ;;
7228 *)
7229         default_with_lp64=yes
7230         ;;
7231 esac
7232
7233 echo "$as_me:7233: checking whether to enable _LP64 definition in curses.h" >&5
7234 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7235
7236 # Check whether --enable-lp64 or --disable-lp64 was given.
7237 if test "${enable_lp64+set}" = set; then
7238   enableval="$enable_lp64"
7239   with_lp64=$enableval
7240 else
7241   with_lp64=$default_with_lp64
7242 fi;
7243 echo "$as_me:7243: result: $with_lp64" >&5
7244 echo "${ECHO_T}$with_lp64" >&6
7245
7246 if test "$with_lp64" = yes ; then
7247         cf_cv_enable_lp64=1
7248 else
7249         cf_cv_enable_lp64=0
7250 fi
7251
7252 # Check whether --enable-largefile or --disable-largefile was given.
7253 if test "${enable_largefile+set}" = set; then
7254   enableval="$enable_largefile"
7255
7256 fi;
7257 if test "$enable_largefile" != no; then
7258
7259   echo "$as_me:7259: checking for special C compiler options needed for large files" >&5
7260 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7261 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7262   echo $ECHO_N "(cached) $ECHO_C" >&6
7263 else
7264   ac_cv_sys_largefile_CC=no
7265      if test "$GCC" != yes; then
7266        ac_save_CC=$CC
7267        while :; do
7268          # IRIX 6.2 and later do not support large files by default,
7269          # so use the C compiler's -n32 option if that helps.
7270          cat >conftest.$ac_ext <<_ACEOF
7271 #line 7271 "configure"
7272 #include "confdefs.h"
7273 #include <sys/types.h>
7274  /* Check that off_t can represent 2**63 - 1 correctly.
7275     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7276     since some C++ compilers masquerading as C compilers
7277     incorrectly reject 9223372036854775807.  */
7278 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7279   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7280                        && LARGE_OFF_T % 2147483647 == 1)
7281                       ? 1 : -1];
7282 int
7283 main ()
7284 {
7285
7286   ;
7287   return 0;
7288 }
7289 _ACEOF
7290          rm -f conftest.$ac_objext
7291 if { (eval echo "$as_me:7291: \"$ac_compile\"") >&5
7292   (eval $ac_compile) 2>&5
7293   ac_status=$?
7294   echo "$as_me:7294: \$? = $ac_status" >&5
7295   (exit $ac_status); } &&
7296          { ac_try='test -s conftest.$ac_objext'
7297   { (eval echo "$as_me:7297: \"$ac_try\"") >&5
7298   (eval $ac_try) 2>&5
7299   ac_status=$?
7300   echo "$as_me:7300: \$? = $ac_status" >&5
7301   (exit $ac_status); }; }; then
7302   break
7303 else
7304   echo "$as_me: failed program was:" >&5
7305 cat conftest.$ac_ext >&5
7306 fi
7307 rm -f conftest.$ac_objext
7308          CC="$CC -n32"
7309          rm -f conftest.$ac_objext
7310 if { (eval echo "$as_me:7310: \"$ac_compile\"") >&5
7311   (eval $ac_compile) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest.$ac_objext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   ac_cv_sys_largefile_CC=' -n32'; break
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 fi
7326 rm -f conftest.$ac_objext
7327          break
7328        done
7329        CC=$ac_save_CC
7330        rm -f conftest.$ac_ext
7331     fi
7332 fi
7333 echo "$as_me:7333: result: $ac_cv_sys_largefile_CC" >&5
7334 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7335   if test "$ac_cv_sys_largefile_CC" != no; then
7336     CC=$CC$ac_cv_sys_largefile_CC
7337   fi
7338
7339   echo "$as_me:7339: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7340 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7341 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7342   echo $ECHO_N "(cached) $ECHO_C" >&6
7343 else
7344   while :; do
7345   ac_cv_sys_file_offset_bits=no
7346   cat >conftest.$ac_ext <<_ACEOF
7347 #line 7347 "configure"
7348 #include "confdefs.h"
7349 #include <sys/types.h>
7350  /* Check that off_t can represent 2**63 - 1 correctly.
7351     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7352     since some C++ compilers masquerading as C compilers
7353     incorrectly reject 9223372036854775807.  */
7354 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7355   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7356                        && LARGE_OFF_T % 2147483647 == 1)
7357                       ? 1 : -1];
7358 int
7359 main ()
7360 {
7361
7362   ;
7363   return 0;
7364 }
7365 _ACEOF
7366 rm -f conftest.$ac_objext
7367 if { (eval echo "$as_me:7367: \"$ac_compile\"") >&5
7368   (eval $ac_compile) 2>&5
7369   ac_status=$?
7370   echo "$as_me:7370: \$? = $ac_status" >&5
7371   (exit $ac_status); } &&
7372          { ac_try='test -s conftest.$ac_objext'
7373   { (eval echo "$as_me:7373: \"$ac_try\"") >&5
7374   (eval $ac_try) 2>&5
7375   ac_status=$?
7376   echo "$as_me:7376: \$? = $ac_status" >&5
7377   (exit $ac_status); }; }; then
7378   break
7379 else
7380   echo "$as_me: failed program was:" >&5
7381 cat conftest.$ac_ext >&5
7382 fi
7383 rm -f conftest.$ac_objext conftest.$ac_ext
7384   cat >conftest.$ac_ext <<_ACEOF
7385 #line 7385 "configure"
7386 #include "confdefs.h"
7387 #define _FILE_OFFSET_BITS 64
7388 #include <sys/types.h>
7389  /* Check that off_t can represent 2**63 - 1 correctly.
7390     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7391     since some C++ compilers masquerading as C compilers
7392     incorrectly reject 9223372036854775807.  */
7393 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7394   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7395                        && LARGE_OFF_T % 2147483647 == 1)
7396                       ? 1 : -1];
7397 int
7398 main ()
7399 {
7400
7401   ;
7402   return 0;
7403 }
7404 _ACEOF
7405 rm -f conftest.$ac_objext
7406 if { (eval echo "$as_me:7406: \"$ac_compile\"") >&5
7407   (eval $ac_compile) 2>&5
7408   ac_status=$?
7409   echo "$as_me:7409: \$? = $ac_status" >&5
7410   (exit $ac_status); } &&
7411          { ac_try='test -s conftest.$ac_objext'
7412   { (eval echo "$as_me:7412: \"$ac_try\"") >&5
7413   (eval $ac_try) 2>&5
7414   ac_status=$?
7415   echo "$as_me:7415: \$? = $ac_status" >&5
7416   (exit $ac_status); }; }; then
7417   ac_cv_sys_file_offset_bits=64; break
7418 else
7419   echo "$as_me: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7421 fi
7422 rm -f conftest.$ac_objext conftest.$ac_ext
7423   break
7424 done
7425 fi
7426 echo "$as_me:7426: result: $ac_cv_sys_file_offset_bits" >&5
7427 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7428 if test "$ac_cv_sys_file_offset_bits" != no; then
7429
7430 cat >>confdefs.h <<EOF
7431 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7432 EOF
7433
7434 fi
7435 rm -f conftest*
7436   echo "$as_me:7436: checking for _LARGE_FILES value needed for large files" >&5
7437 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7438 if test "${ac_cv_sys_large_files+set}" = set; then
7439   echo $ECHO_N "(cached) $ECHO_C" >&6
7440 else
7441   while :; do
7442   ac_cv_sys_large_files=no
7443   cat >conftest.$ac_ext <<_ACEOF
7444 #line 7444 "configure"
7445 #include "confdefs.h"
7446 #include <sys/types.h>
7447  /* Check that off_t can represent 2**63 - 1 correctly.
7448     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7449     since some C++ compilers masquerading as C compilers
7450     incorrectly reject 9223372036854775807.  */
7451 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7452   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7453                        && LARGE_OFF_T % 2147483647 == 1)
7454                       ? 1 : -1];
7455 int
7456 main ()
7457 {
7458
7459   ;
7460   return 0;
7461 }
7462 _ACEOF
7463 rm -f conftest.$ac_objext
7464 if { (eval echo "$as_me:7464: \"$ac_compile\"") >&5
7465   (eval $ac_compile) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } &&
7469          { ac_try='test -s conftest.$ac_objext'
7470   { (eval echo "$as_me:7470: \"$ac_try\"") >&5
7471   (eval $ac_try) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); }; }; then
7475   break
7476 else
7477   echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 fi
7480 rm -f conftest.$ac_objext conftest.$ac_ext
7481   cat >conftest.$ac_ext <<_ACEOF
7482 #line 7482 "configure"
7483 #include "confdefs.h"
7484 #define _LARGE_FILES 1
7485 #include <sys/types.h>
7486  /* Check that off_t can represent 2**63 - 1 correctly.
7487     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7488     since some C++ compilers masquerading as C compilers
7489     incorrectly reject 9223372036854775807.  */
7490 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7491   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7492                        && LARGE_OFF_T % 2147483647 == 1)
7493                       ? 1 : -1];
7494 int
7495 main ()
7496 {
7497
7498   ;
7499   return 0;
7500 }
7501 _ACEOF
7502 rm -f conftest.$ac_objext
7503 if { (eval echo "$as_me:7503: \"$ac_compile\"") >&5
7504   (eval $ac_compile) 2>&5
7505   ac_status=$?
7506   echo "$as_me:7506: \$? = $ac_status" >&5
7507   (exit $ac_status); } &&
7508          { ac_try='test -s conftest.$ac_objext'
7509   { (eval echo "$as_me:7509: \"$ac_try\"") >&5
7510   (eval $ac_try) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit $ac_status); }; }; then
7514   ac_cv_sys_large_files=1; break
7515 else
7516   echo "$as_me: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7518 fi
7519 rm -f conftest.$ac_objext conftest.$ac_ext
7520   break
7521 done
7522 fi
7523 echo "$as_me:7523: result: $ac_cv_sys_large_files" >&5
7524 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7525 if test "$ac_cv_sys_large_files" != no; then
7526
7527 cat >>confdefs.h <<EOF
7528 #define _LARGE_FILES $ac_cv_sys_large_files
7529 EOF
7530
7531 fi
7532 rm -f conftest*
7533 fi
7534
7535     if test "$enable_largefile" != no ; then
7536         echo "$as_me:7536: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7537 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7538 if test "${ac_cv_sys_largefile_source+set}" = set; then
7539   echo $ECHO_N "(cached) $ECHO_C" >&6
7540 else
7541   while :; do
7542   ac_cv_sys_largefile_source=no
7543   cat >conftest.$ac_ext <<_ACEOF
7544 #line 7544 "configure"
7545 #include "confdefs.h"
7546 #include <stdio.h>
7547 int
7548 main ()
7549 {
7550 return !fseeko;
7551   ;
7552   return 0;
7553 }
7554 _ACEOF
7555 rm -f conftest.$ac_objext
7556 if { (eval echo "$as_me:7556: \"$ac_compile\"") >&5
7557   (eval $ac_compile) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit $ac_status); } &&
7561          { ac_try='test -s conftest.$ac_objext'
7562   { (eval echo "$as_me:7562: \"$ac_try\"") >&5
7563   (eval $ac_try) 2>&5
7564   ac_status=$?
7565   echo "$as_me:7565: \$? = $ac_status" >&5
7566   (exit $ac_status); }; }; then
7567   break
7568 else
7569   echo "$as_me: failed program was:" >&5
7570 cat conftest.$ac_ext >&5
7571 fi
7572 rm -f conftest.$ac_objext conftest.$ac_ext
7573   cat >conftest.$ac_ext <<_ACEOF
7574 #line 7574 "configure"
7575 #include "confdefs.h"
7576 #define _LARGEFILE_SOURCE 1
7577 #include <stdio.h>
7578 int
7579 main ()
7580 {
7581 return !fseeko;
7582   ;
7583   return 0;
7584 }
7585 _ACEOF
7586 rm -f conftest.$ac_objext
7587 if { (eval echo "$as_me:7587: \"$ac_compile\"") >&5
7588   (eval $ac_compile) 2>&5
7589   ac_status=$?
7590   echo "$as_me:7590: \$? = $ac_status" >&5
7591   (exit $ac_status); } &&
7592          { ac_try='test -s conftest.$ac_objext'
7593   { (eval echo "$as_me:7593: \"$ac_try\"") >&5
7594   (eval $ac_try) 2>&5
7595   ac_status=$?
7596   echo "$as_me:7596: \$? = $ac_status" >&5
7597   (exit $ac_status); }; }; then
7598   ac_cv_sys_largefile_source=1; break
7599 else
7600   echo "$as_me: failed program was:" >&5
7601 cat conftest.$ac_ext >&5
7602 fi
7603 rm -f conftest.$ac_objext conftest.$ac_ext
7604   break
7605 done
7606 fi
7607 echo "$as_me:7607: result: $ac_cv_sys_largefile_source" >&5
7608 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7609 if test "$ac_cv_sys_largefile_source" != no; then
7610
7611 cat >>confdefs.h <<EOF
7612 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7613 EOF
7614
7615 fi
7616 rm -f conftest*
7617
7618 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7619 # in glibc 2.1.3, but that breaks too many other things.
7620 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7621 echo "$as_me:7621: checking for fseeko" >&5
7622 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7623 if test "${ac_cv_func_fseeko+set}" = set; then
7624   echo $ECHO_N "(cached) $ECHO_C" >&6
7625 else
7626   cat >conftest.$ac_ext <<_ACEOF
7627 #line 7627 "configure"
7628 #include "confdefs.h"
7629 #include <stdio.h>
7630 int
7631 main ()
7632 {
7633 return fseeko && fseeko (stdin, 0, 0);
7634   ;
7635   return 0;
7636 }
7637 _ACEOF
7638 rm -f conftest.$ac_objext conftest$ac_exeext
7639 if { (eval echo "$as_me:7639: \"$ac_link\"") >&5
7640   (eval $ac_link) 2>&5
7641   ac_status=$?
7642   echo "$as_me:7642: \$? = $ac_status" >&5
7643   (exit $ac_status); } &&
7644          { ac_try='test -s conftest$ac_exeext'
7645   { (eval echo "$as_me:7645: \"$ac_try\"") >&5
7646   (eval $ac_try) 2>&5
7647   ac_status=$?
7648   echo "$as_me:7648: \$? = $ac_status" >&5
7649   (exit $ac_status); }; }; then
7650   ac_cv_func_fseeko=yes
7651 else
7652   echo "$as_me: failed program was:" >&5
7653 cat conftest.$ac_ext >&5
7654 ac_cv_func_fseeko=no
7655 fi
7656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7657 fi
7658 echo "$as_me:7658: result: $ac_cv_func_fseeko" >&5
7659 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7660 if test $ac_cv_func_fseeko = yes; then
7661
7662 cat >>confdefs.h <<\EOF
7663 #define HAVE_FSEEKO 1
7664 EOF
7665
7666 fi
7667
7668         # Normally we would collect these definitions in the config.h,
7669         # but (like _XOPEN_SOURCE), some environments rely on having these
7670         # defined before any of the system headers are included.  Another
7671         # case comes up with C++, e.g., on AIX the compiler compiles the
7672         # header files by themselves before looking at the body files it is
7673         # told to compile.  For ncurses, those header files do not include
7674         # the config.h
7675         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7676         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7677
7678         echo "$as_me:7678: checking whether to use struct dirent64" >&5
7679 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7680 if test "${cf_cv_struct_dirent64+set}" = set; then
7681   echo $ECHO_N "(cached) $ECHO_C" >&6
7682 else
7683
7684                 cat >conftest.$ac_ext <<_ACEOF
7685 #line 7685 "configure"
7686 #include "confdefs.h"
7687
7688 #include <sys/types.h>
7689 #include <dirent.h>
7690
7691 int
7692 main ()
7693 {
7694
7695                 /* if transitional largefile support is setup, this is true */
7696                 extern struct dirent64 * readdir(DIR *);
7697                 struct dirent64 *x = readdir((DIR *)0);
7698                 struct dirent *y = readdir((DIR *)0);
7699                 int z = x - y;
7700
7701   ;
7702   return 0;
7703 }
7704 _ACEOF
7705 rm -f conftest.$ac_objext
7706 if { (eval echo "$as_me:7706: \"$ac_compile\"") >&5
7707   (eval $ac_compile) 2>&5
7708   ac_status=$?
7709   echo "$as_me:7709: \$? = $ac_status" >&5
7710   (exit $ac_status); } &&
7711          { ac_try='test -s conftest.$ac_objext'
7712   { (eval echo "$as_me:7712: \"$ac_try\"") >&5
7713   (eval $ac_try) 2>&5
7714   ac_status=$?
7715   echo "$as_me:7715: \$? = $ac_status" >&5
7716   (exit $ac_status); }; }; then
7717   cf_cv_struct_dirent64=yes
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 cat conftest.$ac_ext >&5
7721 cf_cv_struct_dirent64=no
7722 fi
7723 rm -f conftest.$ac_objext conftest.$ac_ext
7724
7725 fi
7726 echo "$as_me:7726: result: $cf_cv_struct_dirent64" >&5
7727 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7728         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7729 #define HAVE_STRUCT_DIRENT64 1
7730 EOF
7731
7732     fi
7733
7734 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7735 echo "$as_me:7735: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7736 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7737
7738 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7739 if test "${enable_tparm_varargs+set}" = set; then
7740   enableval="$enable_tparm_varargs"
7741   with_tparm_varargs=$enableval
7742 else
7743   with_tparm_varargs=yes
7744 fi;
7745 echo "$as_me:7745: result: $with_tparm_varargs" >&5
7746 echo "${ECHO_T}$with_tparm_varargs" >&6
7747 NCURSES_TPARM_VARARGS=0
7748 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7749
7750 ###   use option --with-bool to override bool's type
7751 echo "$as_me:7751: checking for type of bool" >&5
7752 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7753
7754 # Check whether --with-bool or --without-bool was given.
7755 if test "${with_bool+set}" = set; then
7756   withval="$with_bool"
7757   NCURSES_BOOL="$withval"
7758 else
7759   NCURSES_BOOL=auto
7760 fi;
7761 echo "$as_me:7761: result: $NCURSES_BOOL" >&5
7762 echo "${ECHO_T}$NCURSES_BOOL" >&6
7763
7764 echo "$as_me:7764: checking for alternate terminal capabilities file" >&5
7765 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7766
7767 # Check whether --with-caps or --without-caps was given.
7768 if test "${with_caps+set}" = set; then
7769   withval="$with_caps"
7770   TERMINFO_CAPS=Caps.$withval
7771 else
7772   TERMINFO_CAPS=Caps
7773 fi;
7774 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7775 echo "$as_me:7775: result: $TERMINFO_CAPS" >&5
7776 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7777
7778 ###   use option --with-chtype to override chtype's type
7779 echo "$as_me:7779: checking for type of chtype" >&5
7780 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7781
7782 # Check whether --with-chtype or --without-chtype was given.
7783 if test "${with_chtype+set}" = set; then
7784   withval="$with_chtype"
7785   NCURSES_CHTYPE="$withval"
7786 else
7787   NCURSES_CHTYPE=auto
7788 fi;
7789 echo "$as_me:7789: result: $NCURSES_CHTYPE" >&5
7790 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7791
7792 ###   use option --with-ospeed to override ospeed's type
7793 echo "$as_me:7793: checking for type of ospeed" >&5
7794 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7795
7796 # Check whether --with-ospeed or --without-ospeed was given.
7797 if test "${with_ospeed+set}" = set; then
7798   withval="$with_ospeed"
7799   NCURSES_OSPEED="$withval"
7800 else
7801   NCURSES_OSPEED=short
7802 fi;
7803 echo "$as_me:7803: result: $NCURSES_OSPEED" >&5
7804 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7805
7806 ###   use option --with-mmask-t to override mmask_t's type
7807 echo "$as_me:7807: checking for type of mmask_t" >&5
7808 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7809
7810 # Check whether --with-mmask-t or --without-mmask-t was given.
7811 if test "${with_mmask_t+set}" = set; then
7812   withval="$with_mmask_t"
7813   NCURSES_MMASK_T="$withval"
7814 else
7815   NCURSES_MMASK_T=auto
7816 fi;
7817 echo "$as_me:7817: result: $NCURSES_MMASK_T" >&5
7818 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7819
7820 ### Enable compiling-in rcs id's
7821 echo "$as_me:7821: checking if RCS identifiers should be compiled-in" >&5
7822 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7823
7824 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7825 if test "${with_rcs_ids+set}" = set; then
7826   withval="$with_rcs_ids"
7827   with_rcs_ids=$withval
7828 else
7829   with_rcs_ids=no
7830 fi;
7831 echo "$as_me:7831: result: $with_rcs_ids" >&5
7832 echo "${ECHO_T}$with_rcs_ids" >&6
7833 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7834 #define USE_RCS_IDS 1
7835 EOF
7836
7837 ###############################################################################
7838
7839 echo "$as_me:7839: checking format of man-pages" >&5
7840 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7841
7842 # Check whether --with-manpage-format or --without-manpage-format was given.
7843 if test "${with_manpage_format+set}" = set; then
7844   withval="$with_manpage_format"
7845   MANPAGE_FORMAT=$withval
7846 else
7847   MANPAGE_FORMAT=unknown
7848 fi;
7849
7850 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7851 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7852
7853 cf_unknown=
7854
7855 case $MANPAGE_FORMAT in
7856 unknown)
7857   if test -z "$MANPATH" ; then
7858     MANPATH="/usr/man:/usr/share/man"
7859   fi
7860
7861   # look for the 'date' man-page (it's most likely to be installed!)
7862   MANPAGE_FORMAT=
7863   cf_preform=no
7864   cf_catonly=yes
7865   cf_example=date
7866
7867   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7868   for cf_dir in $MANPATH; do
7869     test -z "$cf_dir" && cf_dir=/usr/man
7870     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
7871     do
7872       cf_test=`echo $cf_name | sed -e 's/*//'`
7873       if test "x$cf_test" = "x$cf_name" ; then
7874
7875         case "$cf_name" in
7876         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7877         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7878         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7879         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7880         esac
7881
7882         case "$cf_name" in
7883         $cf_dir/man*)
7884           cf_catonly=no
7885           ;;
7886         $cf_dir/cat*)
7887           cf_preform=yes
7888           ;;
7889         esac
7890         break
7891       fi
7892
7893       # if we found a match in either man* or cat*, stop looking
7894       if test -n "$MANPAGE_FORMAT" ; then
7895         cf_found=no
7896         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7897         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7898         case "$cf_name" in
7899         $cf_dir/cat*)
7900           cf_found=yes
7901           ;;
7902         esac
7903         test $cf_found=yes && break
7904       fi
7905     done
7906     # only check the first directory in $MANPATH where we find manpages
7907     if test -n "$MANPAGE_FORMAT" ; then
7908        break
7909     fi
7910   done
7911   # if we did not find the example, just assume it is normal
7912   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7913   IFS="$ac_save_ifs"
7914   ;;
7915 *)
7916   for cf_option in $MANPAGE_FORMAT; do
7917      case $cf_option in #(vi
7918      gzip|compress|BSDI|normal|formatted|catonly)
7919        ;;
7920      *)
7921        cf_unknown="$cf_unknown $cf_option"
7922        ;;
7923      esac
7924   done
7925   ;;
7926 esac
7927
7928 echo "$as_me:7928: result: $MANPAGE_FORMAT" >&5
7929 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7930 if test -n "$cf_unknown" ; then
7931   { echo "$as_me:7931: WARNING: Unexpected manpage-format $cf_unknown" >&5
7932 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7933 fi
7934
7935 echo "$as_me:7935: checking for manpage renaming" >&5
7936 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7937
7938 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7939 if test "${with_manpage_renames+set}" = set; then
7940   withval="$with_manpage_renames"
7941   MANPAGE_RENAMES=$withval
7942 else
7943   MANPAGE_RENAMES=yes
7944 fi;
7945
7946 case ".$MANPAGE_RENAMES" in #(vi
7947 .no) #(vi
7948   ;;
7949 .|.yes)
7950   # Debian 'man' program?
7951   if test -f /etc/debian_version ; then
7952     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7953   else
7954     MANPAGE_RENAMES=no
7955   fi
7956   ;;
7957 esac
7958
7959 if test "$MANPAGE_RENAMES" != no ; then
7960   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7961     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7962   elif test ! -f $MANPAGE_RENAMES ; then
7963     { { echo "$as_me:7963: error: not a filename: $MANPAGE_RENAMES" >&5
7964 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7965    { (exit 1); exit 1; }; }
7966   fi
7967
7968   test ! -d man && mkdir man
7969
7970   # Construct a sed-script to perform renaming within man-pages
7971   if test -n "$MANPAGE_RENAMES" ; then
7972     test ! -d man && mkdir man
7973     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7974   fi
7975 fi
7976
7977 echo "$as_me:7977: result: $MANPAGE_RENAMES" >&5
7978 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7979
7980 echo "$as_me:7980: checking if manpage aliases will be installed" >&5
7981 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7982
7983 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7984 if test "${with_manpage_aliases+set}" = set; then
7985   withval="$with_manpage_aliases"
7986   MANPAGE_ALIASES=$withval
7987 else
7988   MANPAGE_ALIASES=yes
7989 fi;
7990
7991 echo "$as_me:7991: result: $MANPAGE_ALIASES" >&5
7992 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
7993
7994 if test "$LN_S" = "ln -s"; then
7995         cf_use_symlinks=yes
7996 else
7997         cf_use_symlinks=no
7998 fi
7999
8000 MANPAGE_SYMLINKS=no
8001 if test "$MANPAGE_ALIASES" = yes ; then
8002 echo "$as_me:8002: checking if manpage symlinks should be used" >&5
8003 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8004
8005 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8006 if test "${with_manpage_symlinks+set}" = set; then
8007   withval="$with_manpage_symlinks"
8008   MANPAGE_SYMLINKS=$withval
8009 else
8010   MANPAGE_SYMLINKS=$cf_use_symlinks
8011 fi;
8012
8013 if test "$$cf_use_symlinks" = no; then
8014 if test "$MANPAGE_SYMLINKS" = yes ; then
8015         { echo "$as_me:8015: WARNING: cannot make symlinks" >&5
8016 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8017         MANPAGE_SYMLINKS=no
8018 fi
8019 fi
8020
8021 echo "$as_me:8021: result: $MANPAGE_SYMLINKS" >&5
8022 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8023 fi
8024
8025 echo "$as_me:8025: checking for manpage tbl" >&5
8026 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8027
8028 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8029 if test "${with_manpage_tbl+set}" = set; then
8030   withval="$with_manpage_tbl"
8031   MANPAGE_TBL=$withval
8032 else
8033   MANPAGE_TBL=no
8034 fi;
8035
8036 echo "$as_me:8036: result: $MANPAGE_TBL" >&5
8037 echo "${ECHO_T}$MANPAGE_TBL" >&6
8038
8039   if test "$prefix" = "NONE" ; then
8040      cf_prefix="$ac_default_prefix"
8041   else
8042      cf_prefix="$prefix"
8043   fi
8044
8045   case "$MANPAGE_FORMAT" in # (vi
8046   *catonly*) # (vi
8047     cf_format=yes
8048     cf_inboth=no
8049     ;;
8050   *formatted*) # (vi
8051     cf_format=yes
8052     cf_inboth=yes
8053     ;;
8054   *)
8055     cf_format=no
8056     cf_inboth=no
8057     ;;
8058   esac
8059
8060 test ! -d man && mkdir man
8061
8062 cf_so_strip=
8063 cf_compress=
8064 case "$MANPAGE_FORMAT" in #(vi
8065 *compress*) #(vi
8066         cf_so_strip="Z"
8067         cf_compress=compress
8068   ;;
8069 *gzip*) #(vi
8070         cf_so_strip="gz"
8071         cf_compress=gzip
8072   ;;
8073 esac
8074
8075 cf_edit_man=./edit_man.sh
8076 cf_man_alias=`pwd`/man_alias.sed
8077
8078 cat >$cf_edit_man <<CF_EOF
8079 #! /bin/sh
8080 # this script is generated by the configure-script CF_MAN_PAGES macro.
8081
8082 prefix="$cf_prefix"
8083 datadir="$datadir"
8084
8085 NCURSES_MAJOR="$NCURSES_MAJOR"
8086 NCURSES_MINOR="$NCURSES_MINOR"
8087 NCURSES_PATCH="$NCURSES_PATCH"
8088
8089 NCURSES_OSPEED="$NCURSES_OSPEED"
8090 TERMINFO="$TERMINFO"
8091
8092 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8093
8094 INSTALL="$INSTALL"
8095 INSTALL_DATA="$INSTALL_DATA"
8096
8097 transform="$program_transform_name"
8098
8099 TMP=\${TMPDIR-/tmp}/man\$\$
8100 trap "rm -f \$TMP" 0 1 2 5 15
8101
8102 form=\$1
8103 shift || exit 1
8104
8105 verb=\$1
8106 shift || exit 1
8107
8108 mandir=\$1
8109 shift || exit 1
8110
8111 srcdir=\$1
8112 top_srcdir=\$srcdir/..
8113 shift || exit 1
8114
8115 if test "\$form" = normal ; then
8116         if test "$cf_format" = yes ; then
8117         if test "$cf_inboth" = no ; then
8118                 sh \$0 format \$verb \$mandir \$srcdir \$*
8119                 exit $?
8120         fi
8121         fi
8122         cf_subdir=\$mandir/man
8123         cf_tables=$MANPAGE_TBL
8124 else
8125         cf_subdir=\$mandir/cat
8126         cf_tables=yes
8127 fi
8128
8129 # process the list of source-files
8130 for i in \$* ; do
8131 case \$i in #(vi
8132 *.orig|*.rej) ;; #(vi
8133 *.[0-9]*)
8134         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8135         if test \$verb = installing ; then
8136         if test ! -d \$cf_subdir\${section} ; then
8137                 \$MKDIRS \$cf_subdir\$section
8138         fi
8139         fi
8140
8141         # replace variables in man page
8142         if test ! -f $cf_man_alias ; then
8143 cat >>$cf_man_alias <<-CF_EOF2
8144                 s,@DATADIR@,\$datadir,
8145                 s,@TERMINFO@,\$TERMINFO,
8146                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,
8147                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,
8148                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,
8149                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,
8150 CF_EOF
8151
8152         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8153         do
8154                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8155                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8156 cat >>$cf_edit_man <<-CF_EOF
8157                 s,@$cf_NAME@,$cf_name,
8158 CF_EOF
8159         done
8160
8161 cat >>$cf_edit_man <<CF_EOF
8162 CF_EOF2
8163                 echo "...made $cf_man_alias"
8164         fi
8165
8166         aliases=
8167         cf_source=\`basename \$i\`
8168         inalias=\$cf_source
8169         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8170         if test ! -f \$inalias ; then
8171                 echo .. skipped \$cf_source
8172                 continue
8173         fi
8174 CF_EOF
8175
8176 if test "$MANPAGE_ALIASES" != no ; then
8177 cat >>$cf_edit_man <<CF_EOF
8178         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8179 CF_EOF
8180 fi
8181
8182 if test "$MANPAGE_RENAMES" = no ; then
8183 cat >>$cf_edit_man <<CF_EOF
8184         # perform program transformations for section 1 man pages
8185         if test \$section = 1 ; then
8186                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8187         else
8188                 cf_target=\$cf_subdir\${section}/\$cf_source
8189         fi
8190 CF_EOF
8191 else
8192 cat >>$cf_edit_man <<CF_EOF
8193         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8194         if test -z "\$cf_target" ; then
8195                 echo '? missing rename for '\$cf_source
8196                 cf_target="\$cf_source"
8197         fi
8198         cf_target="\$cf_subdir\${section}/\${cf_target}"
8199
8200 CF_EOF
8201 fi
8202
8203 cat >>$cf_edit_man <<CF_EOF
8204         sed     -f $cf_man_alias \\
8205 CF_EOF
8206
8207 if test -f $MANPAGE_RENAMES ; then
8208 cat >>$cf_edit_man <<CF_EOF
8209                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8210 CF_EOF
8211 else
8212 cat >>$cf_edit_man <<CF_EOF
8213                 < \$i >\$TMP
8214 CF_EOF
8215 fi
8216
8217 cat >>$cf_edit_man <<CF_EOF
8218 if test \$cf_tables = yes ; then
8219         tbl \$TMP >\$TMP.out
8220         mv \$TMP.out \$TMP
8221 fi
8222 CF_EOF
8223
8224 if test $with_curses_h != yes ; then
8225 cat >>$cf_edit_man <<CF_EOF
8226         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8227         mv \$TMP.out \$TMP
8228 CF_EOF
8229 fi
8230
8231 cat >>$cf_edit_man <<CF_EOF
8232         if test \$form = format ; then
8233                 nroff -man \$TMP >\$TMP.out
8234                 mv \$TMP.out \$TMP
8235         fi
8236 CF_EOF
8237
8238 if test -n "$cf_compress" ; then
8239 cat >>$cf_edit_man <<CF_EOF
8240         if test \$verb = installing ; then
8241         if ( $cf_compress -f \$TMP )
8242         then
8243                 mv \$TMP.$cf_so_strip \$TMP
8244         fi
8245         fi
8246         cf_target="\$cf_target.$cf_so_strip"
8247 CF_EOF
8248 fi
8249
8250 case "$MANPAGE_FORMAT" in #(vi
8251 *BSDI*)
8252 cat >>$cf_edit_man <<CF_EOF
8253         if test \$form = format ; then
8254                 # BSDI installs only .0 suffixes in the cat directories
8255                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8256         fi
8257 CF_EOF
8258   ;;
8259 esac
8260
8261 cat >>$cf_edit_man <<CF_EOF
8262         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8263         if test \$verb = installing ; then
8264                 echo \$verb \$cf_target
8265                 \$INSTALL_DATA \$TMP \$cf_target
8266                 test -n "\$aliases" && (
8267                         cd \$cf_subdir\${section} && (
8268                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8269                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8270                                 cf_target=\`basename \$cf_target\`
8271                                 for cf_alias in \$aliases
8272                                 do
8273                                         if test \$section = 1 ; then
8274                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8275                                         fi
8276
8277                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8278                                                 if test -f \$cf_alias\${suffix} ; then
8279                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8280                                                         then
8281                                                                 continue
8282                                                         fi
8283                                                 fi
8284                                                 echo .. \$verb alias \$cf_alias\${suffix}
8285                                                 rm -f \$cf_alias\${suffix}
8286                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8287                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8288                                                 echo ".so \$cf_source" >\$TMP
8289 CF_EOF
8290 if test -n "$cf_compress" ; then
8291 cat >>$cf_edit_man <<CF_EOF
8292                                                 if test -n "$cf_so_strip" ; then
8293                                                         $cf_compress -f \$TMP
8294                                                         mv \$TMP.$cf_so_strip \$TMP
8295                                                 fi
8296 CF_EOF
8297 fi
8298 cat >>$cf_edit_man <<CF_EOF
8299                                                 echo .. \$verb alias \$cf_alias\${suffix}
8300                                                 rm -f \$cf_alias\${suffix}
8301                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8302                                         fi
8303                                 done
8304                         )
8305                 )
8306         elif test \$verb = removing ; then
8307                 echo \$verb \$cf_target
8308                 rm -f \$cf_target
8309                 test -n "\$aliases" && (
8310                         cd \$cf_subdir\${section} && (
8311                                 for cf_alias in \$aliases
8312                                 do
8313                                         if test \$section = 1 ; then
8314                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8315                                         fi
8316
8317                                         echo .. \$verb alias \$cf_alias\${suffix}
8318                                         rm -f \$cf_alias\${suffix}
8319                                 done
8320                         )
8321                 )
8322         else
8323 #               echo ".hy 0"
8324                 cat \$TMP
8325         fi
8326         ;;
8327 esac
8328 done
8329
8330 if test $cf_inboth = yes ; then
8331 if test \$form != format ; then
8332         sh \$0 format \$verb \$mandir \$srcdir \$*
8333 fi
8334 fi
8335
8336 exit 0
8337 CF_EOF
8338 chmod 755 $cf_edit_man
8339
8340 ###############################################################################
8341
8342 ### Note that some functions (such as const) are normally disabled anyway.
8343 echo "$as_me:8343: checking if you want to build with function extensions" >&5
8344 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8345
8346 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8347 if test "${enable_ext_funcs+set}" = set; then
8348   enableval="$enable_ext_funcs"
8349   with_ext_funcs=$enableval
8350 else
8351   with_ext_funcs=yes
8352 fi;
8353 echo "$as_me:8353: result: $with_ext_funcs" >&5
8354 echo "${ECHO_T}$with_ext_funcs" >&6
8355 if test "$with_ext_funcs" = yes ; then
8356         NCURSES_EXT_FUNCS=1
8357         cat >>confdefs.h <<\EOF
8358 #define HAVE_CURSES_VERSION 1
8359 EOF
8360
8361         cat >>confdefs.h <<\EOF
8362 #define HAVE_HAS_KEY 1
8363 EOF
8364
8365         cat >>confdefs.h <<\EOF
8366 #define HAVE_RESIZETERM 1
8367 EOF
8368
8369         cat >>confdefs.h <<\EOF
8370 #define HAVE_RESIZE_TERM 1
8371 EOF
8372
8373         cat >>confdefs.h <<\EOF
8374 #define HAVE_USE_DEFAULT_COLORS 1
8375 EOF
8376
8377         cat >>confdefs.h <<\EOF
8378 #define HAVE_WRESIZE 1
8379 EOF
8380
8381         cat >>confdefs.h <<\EOF
8382 #define NCURSES_EXT_FUNCS 1
8383 EOF
8384
8385 else
8386         NCURSES_EXT_FUNCS=0
8387 fi
8388
8389 ###   use option --enable-const to turn on use of const beyond that in XSI.
8390 echo "$as_me:8390: checking for extended use of const keyword" >&5
8391 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8392
8393 # Check whether --enable-const or --disable-const was given.
8394 if test "${enable_const+set}" = set; then
8395   enableval="$enable_const"
8396   with_ext_const=$enableval
8397 else
8398   with_ext_const=no
8399 fi;
8400 echo "$as_me:8400: result: $with_ext_const" >&5
8401 echo "${ECHO_T}$with_ext_const" >&6
8402 NCURSES_CONST='/*nothing*/'
8403 if test "$with_ext_const" = yes ; then
8404         NCURSES_CONST=const
8405 fi
8406
8407 echo "$as_me:8407: checking if you want \$NCURSES_NO_PADDING code" >&5
8408 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8409
8410 # Check whether --enable-no-padding or --disable-no-padding was given.
8411 if test "${enable_no_padding+set}" = set; then
8412   enableval="$enable_no_padding"
8413   with_no_padding=$enableval
8414 else
8415   with_no_padding=$with_ext_funcs
8416 fi;
8417 echo "$as_me:8417: result: $with_no_padding" >&5
8418 echo "${ECHO_T}$with_no_padding" >&6
8419 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8420 #define NCURSES_NO_PADDING 1
8421 EOF
8422
8423 echo "$as_me:8423: checking for ANSI C header files" >&5
8424 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8425 if test "${ac_cv_header_stdc+set}" = set; then
8426   echo $ECHO_N "(cached) $ECHO_C" >&6
8427 else
8428   cat >conftest.$ac_ext <<_ACEOF
8429 #line 8429 "configure"
8430 #include "confdefs.h"
8431 #include <stdlib.h>
8432 #include <stdarg.h>
8433 #include <string.h>
8434 #include <float.h>
8435
8436 _ACEOF
8437 if { (eval echo "$as_me:8437: \"$ac_cpp conftest.$ac_ext\"") >&5
8438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8439   ac_status=$?
8440   egrep -v '^ *\+' conftest.er1 >conftest.err
8441   rm -f conftest.er1
8442   cat conftest.err >&5
8443   echo "$as_me:8443: \$? = $ac_status" >&5
8444   (exit $ac_status); } >/dev/null; then
8445   if test -s conftest.err; then
8446     ac_cpp_err=$ac_c_preproc_warn_flag
8447   else
8448     ac_cpp_err=
8449   fi
8450 else
8451   ac_cpp_err=yes
8452 fi
8453 if test -z "$ac_cpp_err"; then
8454   ac_cv_header_stdc=yes
8455 else
8456   echo "$as_me: failed program was:" >&5
8457   cat conftest.$ac_ext >&5
8458   ac_cv_header_stdc=no
8459 fi
8460 rm -f conftest.err conftest.$ac_ext
8461
8462 if test $ac_cv_header_stdc = yes; then
8463   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8464   cat >conftest.$ac_ext <<_ACEOF
8465 #line 8465 "configure"
8466 #include "confdefs.h"
8467 #include <string.h>
8468
8469 _ACEOF
8470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8471   egrep "memchr" >/dev/null 2>&1; then
8472   :
8473 else
8474   ac_cv_header_stdc=no
8475 fi
8476 rm -f conftest*
8477
8478 fi
8479
8480 if test $ac_cv_header_stdc = yes; then
8481   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8482   cat >conftest.$ac_ext <<_ACEOF
8483 #line 8483 "configure"
8484 #include "confdefs.h"
8485 #include <stdlib.h>
8486
8487 _ACEOF
8488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8489   egrep "free" >/dev/null 2>&1; then
8490   :
8491 else
8492   ac_cv_header_stdc=no
8493 fi
8494 rm -f conftest*
8495
8496 fi
8497
8498 if test $ac_cv_header_stdc = yes; then
8499   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8500   if test "$cross_compiling" = yes; then
8501   :
8502 else
8503   cat >conftest.$ac_ext <<_ACEOF
8504 #line 8504 "configure"
8505 #include "confdefs.h"
8506 #include <ctype.h>
8507 #if ((' ' & 0x0FF) == 0x020)
8508 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8509 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8510 #else
8511 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8512                      || ('j' <= (c) && (c) <= 'r') \
8513                      || ('s' <= (c) && (c) <= 'z'))
8514 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8515 #endif
8516
8517 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8518 int
8519 main ()
8520 {
8521   int i;
8522   for (i = 0; i < 256; i++)
8523     if (XOR (islower (i), ISLOWER (i))
8524         || toupper (i) != TOUPPER (i))
8525       $ac_main_return(2);
8526   $ac_main_return (0);
8527 }
8528 _ACEOF
8529 rm -f conftest$ac_exeext
8530 if { (eval echo "$as_me:8530: \"$ac_link\"") >&5
8531   (eval $ac_link) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8535   { (eval echo "$as_me:8535: \"$ac_try\"") >&5
8536   (eval $ac_try) 2>&5
8537   ac_status=$?
8538   echo "$as_me:8538: \$? = $ac_status" >&5
8539   (exit $ac_status); }; }; then
8540   :
8541 else
8542   echo "$as_me: program exited with status $ac_status" >&5
8543 echo "$as_me: failed program was:" >&5
8544 cat conftest.$ac_ext >&5
8545 ac_cv_header_stdc=no
8546 fi
8547 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8548 fi
8549 fi
8550 fi
8551 echo "$as_me:8551: result: $ac_cv_header_stdc" >&5
8552 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8553 if test $ac_cv_header_stdc = yes; then
8554
8555 cat >>confdefs.h <<\EOF
8556 #define STDC_HEADERS 1
8557 EOF
8558
8559 fi
8560
8561 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8562
8563 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8564                   inttypes.h stdint.h unistd.h
8565 do
8566 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8567 echo "$as_me:8567: checking for $ac_header" >&5
8568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8570   echo $ECHO_N "(cached) $ECHO_C" >&6
8571 else
8572   cat >conftest.$ac_ext <<_ACEOF
8573 #line 8573 "configure"
8574 #include "confdefs.h"
8575 $ac_includes_default
8576 #include <$ac_header>
8577 _ACEOF
8578 rm -f conftest.$ac_objext
8579 if { (eval echo "$as_me:8579: \"$ac_compile\"") >&5
8580   (eval $ac_compile) 2>&5
8581   ac_status=$?
8582   echo "$as_me:8582: \$? = $ac_status" >&5
8583   (exit $ac_status); } &&
8584          { ac_try='test -s conftest.$ac_objext'
8585   { (eval echo "$as_me:8585: \"$ac_try\"") >&5
8586   (eval $ac_try) 2>&5
8587   ac_status=$?
8588   echo "$as_me:8588: \$? = $ac_status" >&5
8589   (exit $ac_status); }; }; then
8590   eval "$as_ac_Header=yes"
8591 else
8592   echo "$as_me: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594 eval "$as_ac_Header=no"
8595 fi
8596 rm -f conftest.$ac_objext conftest.$ac_ext
8597 fi
8598 echo "$as_me:8598: result: `eval echo '${'$as_ac_Header'}'`" >&5
8599 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8601   cat >>confdefs.h <<EOF
8602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8603 EOF
8604
8605 fi
8606 done
8607
8608 echo "$as_me:8608: checking for signed char" >&5
8609 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8610 if test "${ac_cv_type_signed_char+set}" = set; then
8611   echo $ECHO_N "(cached) $ECHO_C" >&6
8612 else
8613   cat >conftest.$ac_ext <<_ACEOF
8614 #line 8614 "configure"
8615 #include "confdefs.h"
8616 $ac_includes_default
8617 int
8618 main ()
8619 {
8620 if ((signed char *) 0)
8621   return 0;
8622 if (sizeof (signed char))
8623   return 0;
8624   ;
8625   return 0;
8626 }
8627 _ACEOF
8628 rm -f conftest.$ac_objext
8629 if { (eval echo "$as_me:8629: \"$ac_compile\"") >&5
8630   (eval $ac_compile) 2>&5
8631   ac_status=$?
8632   echo "$as_me:8632: \$? = $ac_status" >&5
8633   (exit $ac_status); } &&
8634          { ac_try='test -s conftest.$ac_objext'
8635   { (eval echo "$as_me:8635: \"$ac_try\"") >&5
8636   (eval $ac_try) 2>&5
8637   ac_status=$?
8638   echo "$as_me:8638: \$? = $ac_status" >&5
8639   (exit $ac_status); }; }; then
8640   ac_cv_type_signed_char=yes
8641 else
8642   echo "$as_me: failed program was:" >&5
8643 cat conftest.$ac_ext >&5
8644 ac_cv_type_signed_char=no
8645 fi
8646 rm -f conftest.$ac_objext conftest.$ac_ext
8647 fi
8648 echo "$as_me:8648: result: $ac_cv_type_signed_char" >&5
8649 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8650
8651 echo "$as_me:8651: checking size of signed char" >&5
8652 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8653 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8654   echo $ECHO_N "(cached) $ECHO_C" >&6
8655 else
8656   if test "$ac_cv_type_signed_char" = yes; then
8657   if test "$cross_compiling" = yes; then
8658   # Depending upon the size, compute the lo and hi bounds.
8659 cat >conftest.$ac_ext <<_ACEOF
8660 #line 8660 "configure"
8661 #include "confdefs.h"
8662 $ac_includes_default
8663 int
8664 main ()
8665 {
8666 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8667   ;
8668   return 0;
8669 }
8670 _ACEOF
8671 rm -f conftest.$ac_objext
8672 if { (eval echo "$as_me:8672: \"$ac_compile\"") >&5
8673   (eval $ac_compile) 2>&5
8674   ac_status=$?
8675   echo "$as_me:8675: \$? = $ac_status" >&5
8676   (exit $ac_status); } &&
8677          { ac_try='test -s conftest.$ac_objext'
8678   { (eval echo "$as_me:8678: \"$ac_try\"") >&5
8679   (eval $ac_try) 2>&5
8680   ac_status=$?
8681   echo "$as_me:8681: \$? = $ac_status" >&5
8682   (exit $ac_status); }; }; then
8683   ac_lo=0 ac_mid=0
8684   while :; do
8685     cat >conftest.$ac_ext <<_ACEOF
8686 #line 8686 "configure"
8687 #include "confdefs.h"
8688 $ac_includes_default
8689 int
8690 main ()
8691 {
8692 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8693   ;
8694   return 0;
8695 }
8696 _ACEOF
8697 rm -f conftest.$ac_objext
8698 if { (eval echo "$as_me:8698: \"$ac_compile\"") >&5
8699   (eval $ac_compile) 2>&5
8700   ac_status=$?
8701   echo "$as_me:8701: \$? = $ac_status" >&5
8702   (exit $ac_status); } &&
8703          { ac_try='test -s conftest.$ac_objext'
8704   { (eval echo "$as_me:8704: \"$ac_try\"") >&5
8705   (eval $ac_try) 2>&5
8706   ac_status=$?
8707   echo "$as_me:8707: \$? = $ac_status" >&5
8708   (exit $ac_status); }; }; then
8709   ac_hi=$ac_mid; break
8710 else
8711   echo "$as_me: failed program was:" >&5
8712 cat conftest.$ac_ext >&5
8713 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8714 fi
8715 rm -f conftest.$ac_objext conftest.$ac_ext
8716   done
8717 else
8718   echo "$as_me: failed program was:" >&5
8719 cat conftest.$ac_ext >&5
8720 ac_hi=-1 ac_mid=-1
8721   while :; do
8722     cat >conftest.$ac_ext <<_ACEOF
8723 #line 8723 "configure"
8724 #include "confdefs.h"
8725 $ac_includes_default
8726 int
8727 main ()
8728 {
8729 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8730   ;
8731   return 0;
8732 }
8733 _ACEOF
8734 rm -f conftest.$ac_objext
8735 if { (eval echo "$as_me:8735: \"$ac_compile\"") >&5
8736   (eval $ac_compile) 2>&5
8737   ac_status=$?
8738   echo "$as_me:8738: \$? = $ac_status" >&5
8739   (exit $ac_status); } &&
8740          { ac_try='test -s conftest.$ac_objext'
8741   { (eval echo "$as_me:8741: \"$ac_try\"") >&5
8742   (eval $ac_try) 2>&5
8743   ac_status=$?
8744   echo "$as_me:8744: \$? = $ac_status" >&5
8745   (exit $ac_status); }; }; then
8746   ac_lo=$ac_mid; break
8747 else
8748   echo "$as_me: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8750 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8751 fi
8752 rm -f conftest.$ac_objext conftest.$ac_ext
8753   done
8754 fi
8755 rm -f conftest.$ac_objext conftest.$ac_ext
8756 # Binary search between lo and hi bounds.
8757 while test "x$ac_lo" != "x$ac_hi"; do
8758   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8759   cat >conftest.$ac_ext <<_ACEOF
8760 #line 8760 "configure"
8761 #include "confdefs.h"
8762 $ac_includes_default
8763 int
8764 main ()
8765 {
8766 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 rm -f conftest.$ac_objext
8772 if { (eval echo "$as_me:8772: \"$ac_compile\"") >&5
8773   (eval $ac_compile) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); } &&
8777          { ac_try='test -s conftest.$ac_objext'
8778   { (eval echo "$as_me:8778: \"$ac_try\"") >&5
8779   (eval $ac_try) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); }; }; then
8783   ac_hi=$ac_mid
8784 else
8785   echo "$as_me: failed program was:" >&5
8786 cat conftest.$ac_ext >&5
8787 ac_lo=`expr $ac_mid + 1`
8788 fi
8789 rm -f conftest.$ac_objext conftest.$ac_ext
8790 done
8791 ac_cv_sizeof_signed_char=$ac_lo
8792 else
8793   if test "$cross_compiling" = yes; then
8794   { { echo "$as_me:8794: error: cannot run test program while cross compiling" >&5
8795 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8796    { (exit 1); exit 1; }; }
8797 else
8798   cat >conftest.$ac_ext <<_ACEOF
8799 #line 8799 "configure"
8800 #include "confdefs.h"
8801 $ac_includes_default
8802 int
8803 main ()
8804 {
8805 FILE *f = fopen ("conftest.val", "w");
8806 if (!f)
8807   $ac_main_return (1);
8808 fprintf (f, "%d", (sizeof (signed char)));
8809 fclose (f);
8810   ;
8811   return 0;
8812 }
8813 _ACEOF
8814 rm -f conftest$ac_exeext
8815 if { (eval echo "$as_me:8815: \"$ac_link\"") >&5
8816   (eval $ac_link) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8820   { (eval echo "$as_me:8820: \"$ac_try\"") >&5
8821   (eval $ac_try) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); }; }; then
8825   ac_cv_sizeof_signed_char=`cat conftest.val`
8826 else
8827   echo "$as_me: program exited with status $ac_status" >&5
8828 echo "$as_me: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830 fi
8831 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8832 fi
8833 fi
8834 rm -f conftest.val
8835 else
8836   ac_cv_sizeof_signed_char=0
8837 fi
8838 fi
8839 echo "$as_me:8839: result: $ac_cv_sizeof_signed_char" >&5
8840 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8841 cat >>confdefs.h <<EOF
8842 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8843 EOF
8844
8845 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8846         NCURSES_SBOOL="signed char"
8847 else
8848         NCURSES_SBOOL="char"
8849 fi
8850 echo "$as_me:8850: checking if you want to use signed Boolean array in term.h" >&5
8851 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8852
8853 # Check whether --enable-signed-char or --disable-signed-char was given.
8854 if test "${enable_signed_char+set}" = set; then
8855   enableval="$enable_signed_char"
8856   with_signed_char=$enableval
8857 else
8858   with_signed_char=no
8859 fi;
8860 echo "$as_me:8860: result: $with_signed_char" >&5
8861 echo "${ECHO_T}$with_signed_char" >&6
8862 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8863
8864 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8865 echo "$as_me:8865: checking if you want SIGWINCH handler" >&5
8866 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8867
8868 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8869 if test "${enable_sigwinch+set}" = set; then
8870   enableval="$enable_sigwinch"
8871   with_sigwinch=$enableval
8872 else
8873   with_sigwinch=$with_ext_funcs
8874 fi;
8875 echo "$as_me:8875: result: $with_sigwinch" >&5
8876 echo "${ECHO_T}$with_sigwinch" >&6
8877 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8878 #define USE_SIGWINCH 1
8879 EOF
8880
8881 ###   use option --enable-tcap-names to allow user to define new capabilities
8882 echo "$as_me:8882: checking if you want user-definable terminal capabilities like termcap" >&5
8883 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8884
8885 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8886 if test "${enable_tcap_names+set}" = set; then
8887   enableval="$enable_tcap_names"
8888   with_tcap_names=$enableval
8889 else
8890   with_tcap_names=$with_ext_funcs
8891 fi;
8892 echo "$as_me:8892: result: $with_tcap_names" >&5
8893 echo "${ECHO_T}$with_tcap_names" >&6
8894 NCURSES_XNAMES=0
8895 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8896
8897 ###############################################################################
8898 # These options are relatively safe to experiment with.
8899
8900 echo "$as_me:8900: checking if you want all development code" >&5
8901 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8902
8903 # Check whether --with-develop or --without-develop was given.
8904 if test "${with_develop+set}" = set; then
8905   withval="$with_develop"
8906   with_develop=$withval
8907 else
8908   with_develop=no
8909 fi;
8910 echo "$as_me:8910: result: $with_develop" >&5
8911 echo "${ECHO_T}$with_develop" >&6
8912
8913 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8914 echo "$as_me:8914: checking if you want hard-tabs code" >&5
8915 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8916
8917 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8918 if test "${enable_hard_tabs+set}" = set; then
8919   enableval="$enable_hard_tabs"
8920
8921 else
8922   enable_hard_tabs=$with_develop
8923 fi;
8924 echo "$as_me:8924: result: $enable_hard_tabs" >&5
8925 echo "${ECHO_T}$enable_hard_tabs" >&6
8926 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8927 #define USE_HARD_TABS 1
8928 EOF
8929
8930 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8931 echo "$as_me:8931: checking if you want limited support for xmc" >&5
8932 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8933
8934 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8935 if test "${enable_xmc_glitch+set}" = set; then
8936   enableval="$enable_xmc_glitch"
8937
8938 else
8939   enable_xmc_glitch=$with_develop
8940 fi;
8941 echo "$as_me:8941: result: $enable_xmc_glitch" >&5
8942 echo "${ECHO_T}$enable_xmc_glitch" >&6
8943 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8944 #define USE_XMC_SUPPORT 1
8945 EOF
8946
8947 ###############################################################################
8948 # These are just experimental, probably should not be in a package:
8949
8950 echo "$as_me:8950: checking if you do not want to assume colors are white-on-black" >&5
8951 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8952
8953 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8954 if test "${enable_assumed_color+set}" = set; then
8955   enableval="$enable_assumed_color"
8956   with_assumed_color=$enableval
8957 else
8958   with_assumed_color=yes
8959 fi;
8960 echo "$as_me:8960: result: $with_assumed_color" >&5
8961 echo "${ECHO_T}$with_assumed_color" >&6
8962 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8963 #define USE_ASSUMED_COLOR 1
8964 EOF
8965
8966 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8967 echo "$as_me:8967: checking if you want hashmap scrolling-optimization code" >&5
8968 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8969
8970 # Check whether --enable-hashmap or --disable-hashmap was given.
8971 if test "${enable_hashmap+set}" = set; then
8972   enableval="$enable_hashmap"
8973   with_hashmap=$enableval
8974 else
8975   with_hashmap=yes
8976 fi;
8977 echo "$as_me:8977: result: $with_hashmap" >&5
8978 echo "${ECHO_T}$with_hashmap" >&6
8979 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8980 #define USE_HASHMAP 1
8981 EOF
8982
8983 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8984 echo "$as_me:8984: checking if you want colorfgbg code" >&5
8985 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8986
8987 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8988 if test "${enable_colorfgbg+set}" = set; then
8989   enableval="$enable_colorfgbg"
8990   with_colorfgbg=$enableval
8991 else
8992   with_colorfgbg=no
8993 fi;
8994 echo "$as_me:8994: result: $with_colorfgbg" >&5
8995 echo "${ECHO_T}$with_colorfgbg" >&6
8996 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8997 #define USE_COLORFGBG 1
8998 EOF
8999
9000 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9001 echo "$as_me:9001: checking if you want to use experimental extended colors" >&5
9002 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9003
9004 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9005 if test "${enable_ext_colors+set}" = set; then
9006   enableval="$enable_ext_colors"
9007   with_ext_colors=$enableval
9008 else
9009   with_ext_colors=no
9010 fi;
9011 echo "$as_me:9011: result: $with_ext_colors" >&5
9012 echo "${ECHO_T}$with_ext_colors" >&6
9013 NCURSES_EXT_COLORS=0
9014 if test "$with_ext_colors" = yes ; then
9015         if test "$with_widec" != yes ; then
9016                 { echo "$as_me:9016: WARNING: This option applies only to wide-character library" >&5
9017 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
9018         else
9019                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9020
9021 if test "${with_abi_version+set}" != set; then
9022         case $cf_cv_rel_version in
9023         5.*)
9024                 cf_cv_rel_version=6.0
9025                 cf_cv_abi_version=6
9026                 { echo "$as_me:9026: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9027 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9028                 ;;
9029         esac
9030 fi
9031
9032         fi
9033         NCURSES_EXT_COLORS=1
9034         cat >>confdefs.h <<\EOF
9035 #define NCURSES_EXT_COLORS 1
9036 EOF
9037
9038 fi
9039
9040 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9041 echo "$as_me:9041: checking if you want to use experimental extended mouse encoding" >&5
9042 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9043
9044 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9045 if test "${enable_ext_mouse+set}" = set; then
9046   enableval="$enable_ext_mouse"
9047   with_ext_mouse=$enableval
9048 else
9049   with_ext_mouse=no
9050 fi;
9051 echo "$as_me:9051: result: $with_ext_mouse" >&5
9052 echo "${ECHO_T}$with_ext_mouse" >&6
9053 NCURSES_MOUSE_VERSION=1
9054 if test "$with_ext_mouse" = yes ; then
9055         NCURSES_MOUSE_VERSION=2
9056
9057 if test "${with_abi_version+set}" != set; then
9058         case $cf_cv_rel_version in
9059         5.*)
9060                 cf_cv_rel_version=6.0
9061                 cf_cv_abi_version=6
9062                 { echo "$as_me:9062: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9063 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9064                 ;;
9065         esac
9066 fi
9067
9068 fi
9069
9070 echo "$as_me:9070: checking if you want experimental safe-sprintf code" >&5
9071 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9072
9073 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9074 if test "${enable_safe_sprintf+set}" = set; then
9075   enableval="$enable_safe_sprintf"
9076   with_safe_sprintf=$enableval
9077 else
9078   with_safe_sprintf=no
9079 fi;
9080 echo "$as_me:9080: result: $with_safe_sprintf" >&5
9081 echo "${ECHO_T}$with_safe_sprintf" >&6
9082 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9083 #define USE_SAFE_SPRINTF 1
9084 EOF
9085
9086 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9087 # when hashmap is used scroll hints are useless
9088 if test "$with_hashmap" = no ; then
9089 echo "$as_me:9089: checking if you want to experiment without scrolling-hints code" >&5
9090 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9091
9092 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9093 if test "${enable_scroll_hints+set}" = set; then
9094   enableval="$enable_scroll_hints"
9095   with_scroll_hints=$enableval
9096 else
9097   with_scroll_hints=yes
9098 fi;
9099 echo "$as_me:9099: result: $with_scroll_hints" >&5
9100 echo "${ECHO_T}$with_scroll_hints" >&6
9101 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9102 #define USE_SCROLL_HINTS 1
9103 EOF
9104
9105 fi
9106
9107 echo "$as_me:9107: checking if you want experimental wgetch-events code" >&5
9108 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9109
9110 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9111 if test "${enable_wgetch_events+set}" = set; then
9112   enableval="$enable_wgetch_events"
9113   with_wgetch_events=$enableval
9114 else
9115   with_wgetch_events=no
9116 fi;
9117 echo "$as_me:9117: result: $with_wgetch_events" >&5
9118 echo "${ECHO_T}$with_wgetch_events" >&6
9119 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9120 #define NCURSES_WGETCH_EVENTS 1
9121 EOF
9122
9123 ###############################################################################
9124
9125 ###     use option --disable-echo to suppress full display compiling commands
9126 echo "$as_me:9126: checking if you want to display full commands during build" >&5
9127 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9128
9129 # Check whether --enable-echo or --disable-echo was given.
9130 if test "${enable_echo+set}" = set; then
9131   enableval="$enable_echo"
9132   with_echo=$enableval
9133 else
9134   with_echo=yes
9135 fi;
9136 if test "$with_echo" = yes; then
9137         ECHO_LINK=
9138 else
9139         ECHO_LINK='@ echo linking $@ ... ;'
9140         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9141 fi
9142 echo "$as_me:9142: result: $with_echo" >&5
9143 echo "${ECHO_T}$with_echo" >&6
9144
9145 ###     use option --enable-warnings to turn on all gcc warnings
9146 echo "$as_me:9146: checking if you want to see compiler warnings" >&5
9147 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9148
9149 # Check whether --enable-warnings or --disable-warnings was given.
9150 if test "${enable_warnings+set}" = set; then
9151   enableval="$enable_warnings"
9152   with_warnings=$enableval
9153 fi;
9154 echo "$as_me:9154: result: $with_warnings" >&5
9155 echo "${ECHO_T}$with_warnings" >&6
9156
9157 if test -n "$with_warnings"; then
9158         ADAFLAGS="$ADAFLAGS -gnatg"
9159
9160 INTEL_COMPILER=no
9161
9162 if test "$GCC" = yes ; then
9163         case $host_os in
9164         linux*|gnu*)
9165                 echo "$as_me:9165: checking if this is really Intel C compiler" >&5
9166 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9167                 cf_save_CFLAGS="$CFLAGS"
9168                 CFLAGS="$CFLAGS -no-gcc"
9169                 cat >conftest.$ac_ext <<_ACEOF
9170 #line 9170 "configure"
9171 #include "confdefs.h"
9172
9173 int
9174 main ()
9175 {
9176
9177 #ifdef __INTEL_COMPILER
9178 #else
9179 make an error
9180 #endif
9181
9182   ;
9183   return 0;
9184 }
9185 _ACEOF
9186 rm -f conftest.$ac_objext
9187 if { (eval echo "$as_me:9187: \"$ac_compile\"") >&5
9188   (eval $ac_compile) 2>&5
9189   ac_status=$?
9190   echo "$as_me:9190: \$? = $ac_status" >&5
9191   (exit $ac_status); } &&
9192          { ac_try='test -s conftest.$ac_objext'
9193   { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9194   (eval $ac_try) 2>&5
9195   ac_status=$?
9196   echo "$as_me:9196: \$? = $ac_status" >&5
9197   (exit $ac_status); }; }; then
9198   INTEL_COMPILER=yes
9199 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9200
9201 else
9202   echo "$as_me: failed program was:" >&5
9203 cat conftest.$ac_ext >&5
9204 fi
9205 rm -f conftest.$ac_objext conftest.$ac_ext
9206                 CFLAGS="$cf_save_CFLAGS"
9207                 echo "$as_me:9207: result: $INTEL_COMPILER" >&5
9208 echo "${ECHO_T}$INTEL_COMPILER" >&6
9209                 ;;
9210         esac
9211 fi
9212
9213 cat > conftest.$ac_ext <<EOF
9214 #line 9214 "configure"
9215 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9216 EOF
9217
9218 if test "$INTEL_COMPILER" = yes
9219 then
9220 # The "-wdXXX" options suppress warnings:
9221 # remark #1419: external declaration in primary source file
9222 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9223 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9224 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9225 # remark #193: zero used for undefined preprocessing identifier
9226 # remark #593: variable "curs_sb_left_arrow" was set but never used
9227 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9228 # remark #869: parameter "tw" was never referenced
9229 # remark #981: operands are evaluated in unspecified order
9230 # warning #269: invalid format string conversion
9231
9232         { echo "$as_me:9232: checking for $CC warning options..." >&5
9233 echo "$as_me: checking for $CC warning options..." >&6;}
9234         cf_save_CFLAGS="$CFLAGS"
9235         EXTRA_CFLAGS="-Wall"
9236         for cf_opt in  \
9237                 wd1419 \
9238                 wd1682 \
9239                 wd1683 \
9240                 wd1684 \
9241                 wd193 \
9242                 wd279 \
9243                 wd593 \
9244                 wd810 \
9245                 wd869 \
9246                 wd981
9247         do
9248                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9249                 if { (eval echo "$as_me:9249: \"$ac_compile\"") >&5
9250   (eval $ac_compile) 2>&5
9251   ac_status=$?
9252   echo "$as_me:9252: \$? = $ac_status" >&5
9253   (exit $ac_status); }; then
9254                         test -n "$verbose" && echo "$as_me:9254: result: ... -$cf_opt" >&5
9255 echo "${ECHO_T}... -$cf_opt" >&6
9256                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9257                 fi
9258         done
9259         CFLAGS="$cf_save_CFLAGS"
9260
9261 elif test "$GCC" = yes
9262 then
9263         { echo "$as_me:9263: checking for $CC warning options..." >&5
9264 echo "$as_me: checking for $CC warning options..." >&6;}
9265         cf_save_CFLAGS="$CFLAGS"
9266         EXTRA_CFLAGS="-W -Wall"
9267         cf_warn_CONST=""
9268         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9269         for cf_opt in \
9270                 Wbad-function-cast \
9271                 Wcast-align \
9272                 Wcast-qual \
9273                 Winline \
9274                 Wmissing-declarations \
9275                 Wmissing-prototypes \
9276                 Wnested-externs \
9277                 Wpointer-arith \
9278                 Wshadow \
9279                 Wstrict-prototypes \
9280                 Wundef $cf_warn_CONST
9281         do
9282                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9283                 if { (eval echo "$as_me:9283: \"$ac_compile\"") >&5
9284   (eval $ac_compile) 2>&5
9285   ac_status=$?
9286   echo "$as_me:9286: \$? = $ac_status" >&5
9287   (exit $ac_status); }; then
9288                         test -n "$verbose" && echo "$as_me:9288: result: ... -$cf_opt" >&5
9289 echo "${ECHO_T}... -$cf_opt" >&6
9290                         case $cf_opt in #(vi
9291                         Wcast-qual) #(vi
9292                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9293                                 ;;
9294                         Winline) #(vi
9295                                 case $GCC_VERSION in
9296                                 3.3*)
9297                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9298
9299                                         continue;;
9300                                 esac
9301                                 ;;
9302                         esac
9303                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9304                 fi
9305         done
9306         CFLAGS="$cf_save_CFLAGS"
9307 fi
9308 rm -f conftest*
9309
9310         if test "$cf_with_cxx" = yes ; then
9311
9312 INTEL_CPLUSPLUS=no
9313
9314 if test "$GCC" = yes ; then
9315         case $host_os in
9316         linux*|gnu*)
9317                 echo "$as_me:9317: checking if this is really Intel C++ compiler" >&5
9318 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9319                 cf_save_CFLAGS="$CXXFLAGS"
9320                 CXXFLAGS="$CXXFLAGS -no-gcc"
9321                 cat >conftest.$ac_ext <<_ACEOF
9322 #line 9322 "configure"
9323 #include "confdefs.h"
9324
9325 int
9326 main ()
9327 {
9328
9329 #ifdef __INTEL_COMPILER
9330 #else
9331 make an error
9332 #endif
9333
9334   ;
9335   return 0;
9336 }
9337 _ACEOF
9338 rm -f conftest.$ac_objext
9339 if { (eval echo "$as_me:9339: \"$ac_compile\"") >&5
9340   (eval $ac_compile) 2>&5
9341   ac_status=$?
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit $ac_status); } &&
9344          { ac_try='test -s conftest.$ac_objext'
9345   { (eval echo "$as_me:9345: \"$ac_try\"") >&5
9346   (eval $ac_try) 2>&5
9347   ac_status=$?
9348   echo "$as_me:9348: \$? = $ac_status" >&5
9349   (exit $ac_status); }; }; then
9350   INTEL_CPLUSPLUS=yes
9351 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9352
9353 else
9354   echo "$as_me: failed program was:" >&5
9355 cat conftest.$ac_ext >&5
9356 fi
9357 rm -f conftest.$ac_objext conftest.$ac_ext
9358                 CXXFLAGS="$cf_save_CFLAGS"
9359                 echo "$as_me:9359: result: $INTEL_CPLUSPLUS" >&5
9360 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9361                 ;;
9362         esac
9363 fi
9364
9365 ac_ext=cc
9366 ac_cpp='$CXXCPP $CPPFLAGS'
9367 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9368 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9369 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9370 ac_main_return=return
9371
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9373 "configure"
9374 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9375 EOF
9376
9377 if test "$INTEL_CPLUSPLUS" = yes
9378 then
9379 # The "-wdXXX" options suppress warnings:
9380 # remark #1419: external declaration in primary source file
9381 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9382 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9383 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9384 # remark #193: zero used for undefined preprocessing identifier
9385 # remark #593: variable "curs_sb_left_arrow" was set but never used
9386 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9387 # remark #869: parameter "tw" was never referenced
9388 # remark #981: operands are evaluated in unspecified order
9389 # warning #269: invalid format string conversion
9390
9391         { echo "$as_me:9391: checking for $CC warning options..." >&5
9392 echo "$as_me: checking for $CC warning options..." >&6;}
9393         cf_save_CXXFLAGS="$CXXFLAGS"
9394         EXTRA_CXXFLAGS="-Wall"
9395         for cf_opt in \
9396                 wd1419 \
9397                 wd1682 \
9398                 wd1683 \
9399                 wd1684 \
9400                 wd193 \
9401                 wd279 \
9402                 wd593 \
9403                 wd810 \
9404                 wd869 \
9405                 wd981
9406         do
9407                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9408                 if { (eval echo "$as_me:9408: \"$ac_compile\"") >&5
9409   (eval $ac_compile) 2>&5
9410   ac_status=$?
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit $ac_status); }; then
9413                         test -n "$verbose" && echo "$as_me:9413: result: ... -$cf_opt" >&5
9414 echo "${ECHO_T}... -$cf_opt" >&6
9415                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9416                 fi
9417         done
9418         CXXFLAGS="$cf_save_CXXFLAGS"
9419
9420 elif test "$GXX" = yes
9421 then
9422         { echo "$as_me:9422: checking for $CXX warning options..." >&5
9423 echo "$as_me: checking for $CXX warning options..." >&6;}
9424         cf_save_CXXFLAGS="$CXXFLAGS"
9425         EXTRA_CXXFLAGS="-W -Wall"
9426         cf_gxx_extra_warnings=""
9427         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9428         case "$GCC_VERSION" in
9429         [1-2].*)
9430                 ;;
9431         *)
9432                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9433                 ;;
9434         esac
9435         for cf_opt in \
9436                 Wabi \
9437                 fabi-version=0 \
9438                 Woverloaded-virtual \
9439                 Wsign-promo \
9440                 Wsynth \
9441                 Wold-style-cast \
9442                 Wcast-align \
9443                 Wcast-qual \
9444                 Wmissing-prototypes \
9445                 Wpointer-arith \
9446                 Wshadow \
9447                 Wstrict-prototypes \
9448                 Wundef $cf_gxx_extra_warnings Wno-unused
9449         do
9450                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9451                 if { (eval echo "$as_me:9451: \"$ac_compile\"") >&5
9452   (eval $ac_compile) 2>&5
9453   ac_status=$?
9454   echo "$as_me:9454: \$? = $ac_status" >&5
9455   (exit $ac_status); }; then
9456                         test -n "$verbose" && echo "$as_me:9456: result: ... -$cf_opt" >&5
9457 echo "${ECHO_T}... -$cf_opt" >&6
9458                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9459                 else
9460                         test -n "$verbose" && echo "$as_me:9460: result: ... no -$cf_opt" >&5
9461 echo "${ECHO_T}... no -$cf_opt" >&6
9462                 fi
9463         done
9464         CXXFLAGS="$cf_save_CXXFLAGS"
9465 fi
9466
9467 rm -f conftest*
9468 ac_ext=c
9469 ac_cpp='$CPP $CPPFLAGS'
9470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9473 ac_main_return=return
9474
9475         fi
9476 fi
9477
9478 if test "$GCC" = yes
9479 then
9480 cat > conftest.i <<EOF
9481 #ifndef GCC_PRINTF
9482 #define GCC_PRINTF 0
9483 #endif
9484 #ifndef GCC_SCANF
9485 #define GCC_SCANF 0
9486 #endif
9487 #ifndef GCC_NORETURN
9488 #define GCC_NORETURN /* nothing */
9489 #endif
9490 #ifndef GCC_UNUSED
9491 #define GCC_UNUSED /* nothing */
9492 #endif
9493 EOF
9494 if test "$GCC" = yes
9495 then
9496         { echo "$as_me:9496: checking for $CC __attribute__ directives..." >&5
9497 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9498 cat > conftest.$ac_ext <<EOF
9499 #line 9499 "configure"
9500 #include "confdefs.h"
9501 #include "conftest.h"
9502 #include "conftest.i"
9503 #if     GCC_PRINTF
9504 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9505 #else
9506 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9507 #endif
9508 #if     GCC_SCANF
9509 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9510 #else
9511 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9512 #endif
9513 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9514 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9515 extern void foo(void) GCC_NORETURN;
9516 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9517 EOF
9518         for cf_attribute in scanf printf unused noreturn
9519         do
9520
9521 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9522
9523                 cf_directive="__attribute__(($cf_attribute))"
9524                 echo "checking for $CC $cf_directive" 1>&5
9525                 case $cf_attribute in
9526                 scanf|printf)
9527                 cat >conftest.h <<EOF
9528 #define GCC_$cf_ATTRIBUTE 1
9529 EOF
9530                         ;;
9531                 *)
9532                 cat >conftest.h <<EOF
9533 #define GCC_$cf_ATTRIBUTE $cf_directive
9534 EOF
9535                         ;;
9536                 esac
9537                 if { (eval echo "$as_me:9537: \"$ac_compile\"") >&5
9538   (eval $ac_compile) 2>&5
9539   ac_status=$?
9540   echo "$as_me:9540: \$? = $ac_status" >&5
9541   (exit $ac_status); }; then
9542                         test -n "$verbose" && echo "$as_me:9542: result: ... $cf_attribute" >&5
9543 echo "${ECHO_T}... $cf_attribute" >&6
9544                         cat conftest.h >>confdefs.h
9545                 fi
9546         done
9547 else
9548         fgrep define conftest.i >>confdefs.h
9549 fi
9550 rm -rf conftest*
9551 fi
9552
9553 ###     use option --enable-assertions to turn on generation of assertion code
9554 echo "$as_me:9554: checking if you want to enable runtime assertions" >&5
9555 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9556
9557 # Check whether --enable-assertions or --disable-assertions was given.
9558 if test "${enable_assertions+set}" = set; then
9559   enableval="$enable_assertions"
9560   with_assertions=$enableval
9561 else
9562   with_assertions=no
9563 fi;
9564 echo "$as_me:9564: result: $with_assertions" >&5
9565 echo "${ECHO_T}$with_assertions" >&6
9566 if test -n "$GCC"
9567 then
9568         if test "$with_assertions" = no
9569         then
9570                 cat >>confdefs.h <<\EOF
9571 #define NDEBUG 1
9572 EOF
9573
9574                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9575         else
9576                 ADAFLAGS="$ADAFLAGS -gnata"
9577         fi
9578 fi
9579
9580 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9581
9582 echo "$as_me:9582: checking if you want to use dmalloc for testing" >&5
9583 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9584
9585 # Check whether --with-dmalloc or --without-dmalloc was given.
9586 if test "${with_dmalloc+set}" = set; then
9587   withval="$with_dmalloc"
9588   cat >>confdefs.h <<\EOF
9589 #define USE_DMALLOC 1
9590 EOF
9591
9592         : ${with_cflags:=-g}
9593         : ${with_no_leaks:=yes}
9594          with_dmalloc=yes
9595 else
9596   with_dmalloc=
9597 fi;
9598 echo "$as_me:9598: result: ${with_dmalloc:-no}" >&5
9599 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9600
9601 case .$with_cflags in #(vi
9602 .*-g*)
9603         case .$CFLAGS in #(vi
9604         .*-g*) #(vi
9605                 ;;
9606         *)
9607
9608 cf_fix_cppflags=no
9609 cf_new_cflags=
9610 cf_new_cppflags=
9611 cf_new_extra_cppflags=
9612
9613 for cf_add_cflags in -g
9614 do
9615 case $cf_fix_cppflags in
9616 no)
9617         case $cf_add_cflags in #(vi
9618         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9619                 case $cf_add_cflags in
9620                 -D*)
9621                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9622
9623                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9624                         && test -z "${cf_tst_cflags}" \
9625                         && cf_fix_cppflags=yes
9626
9627                         if test $cf_fix_cppflags = yes ; then
9628                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9629                                 continue
9630                         elif test "${cf_tst_cflags}" = "\"'" ; then
9631                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9632                                 continue
9633                         fi
9634                         ;;
9635                 esac
9636                 case "$CPPFLAGS" in
9637                 *$cf_add_cflags) #(vi
9638                         ;;
9639                 *) #(vi
9640                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9641                         ;;
9642                 esac
9643                 ;;
9644         *)
9645                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9646                 ;;
9647         esac
9648         ;;
9649 yes)
9650         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9651
9652         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9653
9654         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9655         && test -z "${cf_tst_cflags}" \
9656         && cf_fix_cppflags=no
9657         ;;
9658 esac
9659 done
9660
9661 if test -n "$cf_new_cflags" ; then
9662
9663         CFLAGS="$CFLAGS $cf_new_cflags"
9664 fi
9665
9666 if test -n "$cf_new_cppflags" ; then
9667
9668         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9669 fi
9670
9671 if test -n "$cf_new_extra_cppflags" ; then
9672
9673         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9674 fi
9675
9676                 ;;
9677         esac
9678         ;;
9679 esac
9680
9681 if test "$with_dmalloc" = yes ; then
9682         echo "$as_me:9682: checking for dmalloc.h" >&5
9683 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9684 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9685   echo $ECHO_N "(cached) $ECHO_C" >&6
9686 else
9687   cat >conftest.$ac_ext <<_ACEOF
9688 #line 9688 "configure"
9689 #include "confdefs.h"
9690 #include <dmalloc.h>
9691 _ACEOF
9692 if { (eval echo "$as_me:9692: \"$ac_cpp conftest.$ac_ext\"") >&5
9693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9694   ac_status=$?
9695   egrep -v '^ *\+' conftest.er1 >conftest.err
9696   rm -f conftest.er1
9697   cat conftest.err >&5
9698   echo "$as_me:9698: \$? = $ac_status" >&5
9699   (exit $ac_status); } >/dev/null; then
9700   if test -s conftest.err; then
9701     ac_cpp_err=$ac_c_preproc_warn_flag
9702   else
9703     ac_cpp_err=
9704   fi
9705 else
9706   ac_cpp_err=yes
9707 fi
9708 if test -z "$ac_cpp_err"; then
9709   ac_cv_header_dmalloc_h=yes
9710 else
9711   echo "$as_me: failed program was:" >&5
9712   cat conftest.$ac_ext >&5
9713   ac_cv_header_dmalloc_h=no
9714 fi
9715 rm -f conftest.err conftest.$ac_ext
9716 fi
9717 echo "$as_me:9717: result: $ac_cv_header_dmalloc_h" >&5
9718 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9719 if test $ac_cv_header_dmalloc_h = yes; then
9720
9721 echo "$as_me:9721: checking for dmalloc_debug in -ldmalloc" >&5
9722 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9723 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9724   echo $ECHO_N "(cached) $ECHO_C" >&6
9725 else
9726   ac_check_lib_save_LIBS=$LIBS
9727 LIBS="-ldmalloc  $LIBS"
9728 cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731
9732 /* Override any gcc2 internal prototype to avoid an error.  */
9733 #ifdef __cplusplus
9734 extern "C"
9735 #endif
9736 /* We use char because int might match the return type of a gcc2
9737    builtin and then its argument prototype would still apply.  */
9738 char dmalloc_debug ();
9739 int
9740 main ()
9741 {
9742 dmalloc_debug ();
9743   ;
9744   return 0;
9745 }
9746 _ACEOF
9747 rm -f conftest.$ac_objext conftest$ac_exeext
9748 if { (eval echo "$as_me:9748: \"$ac_link\"") >&5
9749   (eval $ac_link) 2>&5
9750   ac_status=$?
9751   echo "$as_me:9751: \$? = $ac_status" >&5
9752   (exit $ac_status); } &&
9753          { ac_try='test -s conftest$ac_exeext'
9754   { (eval echo "$as_me:9754: \"$ac_try\"") >&5
9755   (eval $ac_try) 2>&5
9756   ac_status=$?
9757   echo "$as_me:9757: \$? = $ac_status" >&5
9758   (exit $ac_status); }; }; then
9759   ac_cv_lib_dmalloc_dmalloc_debug=yes
9760 else
9761   echo "$as_me: failed program was:" >&5
9762 cat conftest.$ac_ext >&5
9763 ac_cv_lib_dmalloc_dmalloc_debug=no
9764 fi
9765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9766 LIBS=$ac_check_lib_save_LIBS
9767 fi
9768 echo "$as_me:9768: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9769 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9770 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9771   cat >>confdefs.h <<EOF
9772 #define HAVE_LIBDMALLOC 1
9773 EOF
9774
9775   LIBS="-ldmalloc $LIBS"
9776
9777 fi
9778
9779 fi
9780
9781 fi
9782
9783 echo "$as_me:9783: checking if you want to use dbmalloc for testing" >&5
9784 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9785
9786 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9787 if test "${with_dbmalloc+set}" = set; then
9788   withval="$with_dbmalloc"
9789   cat >>confdefs.h <<\EOF
9790 #define USE_DBMALLOC 1
9791 EOF
9792
9793         : ${with_cflags:=-g}
9794         : ${with_no_leaks:=yes}
9795          with_dbmalloc=yes
9796 else
9797   with_dbmalloc=
9798 fi;
9799 echo "$as_me:9799: result: ${with_dbmalloc:-no}" >&5
9800 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9801
9802 case .$with_cflags in #(vi
9803 .*-g*)
9804         case .$CFLAGS in #(vi
9805         .*-g*) #(vi
9806                 ;;
9807         *)
9808
9809 cf_fix_cppflags=no
9810 cf_new_cflags=
9811 cf_new_cppflags=
9812 cf_new_extra_cppflags=
9813
9814 for cf_add_cflags in -g
9815 do
9816 case $cf_fix_cppflags in
9817 no)
9818         case $cf_add_cflags in #(vi
9819         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9820                 case $cf_add_cflags in
9821                 -D*)
9822                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9823
9824                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9825                         && test -z "${cf_tst_cflags}" \
9826                         && cf_fix_cppflags=yes
9827
9828                         if test $cf_fix_cppflags = yes ; then
9829                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9830                                 continue
9831                         elif test "${cf_tst_cflags}" = "\"'" ; then
9832                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9833                                 continue
9834                         fi
9835                         ;;
9836                 esac
9837                 case "$CPPFLAGS" in
9838                 *$cf_add_cflags) #(vi
9839                         ;;
9840                 *) #(vi
9841                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9842                         ;;
9843                 esac
9844                 ;;
9845         *)
9846                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9847                 ;;
9848         esac
9849         ;;
9850 yes)
9851         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9852
9853         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9854
9855         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9856         && test -z "${cf_tst_cflags}" \
9857         && cf_fix_cppflags=no
9858         ;;
9859 esac
9860 done
9861
9862 if test -n "$cf_new_cflags" ; then
9863
9864         CFLAGS="$CFLAGS $cf_new_cflags"
9865 fi
9866
9867 if test -n "$cf_new_cppflags" ; then
9868
9869         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9870 fi
9871
9872 if test -n "$cf_new_extra_cppflags" ; then
9873
9874         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9875 fi
9876
9877                 ;;
9878         esac
9879         ;;
9880 esac
9881
9882 if test "$with_dbmalloc" = yes ; then
9883         echo "$as_me:9883: checking for dbmalloc.h" >&5
9884 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9885 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9886   echo $ECHO_N "(cached) $ECHO_C" >&6
9887 else
9888   cat >conftest.$ac_ext <<_ACEOF
9889 #line 9889 "configure"
9890 #include "confdefs.h"
9891 #include <dbmalloc.h>
9892 _ACEOF
9893 if { (eval echo "$as_me:9893: \"$ac_cpp conftest.$ac_ext\"") >&5
9894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9895   ac_status=$?
9896   egrep -v '^ *\+' conftest.er1 >conftest.err
9897   rm -f conftest.er1
9898   cat conftest.err >&5
9899   echo "$as_me:9899: \$? = $ac_status" >&5
9900   (exit $ac_status); } >/dev/null; then
9901   if test -s conftest.err; then
9902     ac_cpp_err=$ac_c_preproc_warn_flag
9903   else
9904     ac_cpp_err=
9905   fi
9906 else
9907   ac_cpp_err=yes
9908 fi
9909 if test -z "$ac_cpp_err"; then
9910   ac_cv_header_dbmalloc_h=yes
9911 else
9912   echo "$as_me: failed program was:" >&5
9913   cat conftest.$ac_ext >&5
9914   ac_cv_header_dbmalloc_h=no
9915 fi
9916 rm -f conftest.err conftest.$ac_ext
9917 fi
9918 echo "$as_me:9918: result: $ac_cv_header_dbmalloc_h" >&5
9919 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9920 if test $ac_cv_header_dbmalloc_h = yes; then
9921
9922 echo "$as_me:9922: checking for debug_malloc in -ldbmalloc" >&5
9923 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9924 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9925   echo $ECHO_N "(cached) $ECHO_C" >&6
9926 else
9927   ac_check_lib_save_LIBS=$LIBS
9928 LIBS="-ldbmalloc  $LIBS"
9929 cat >conftest.$ac_ext <<_ACEOF
9930 #line 9930 "configure"
9931 #include "confdefs.h"
9932
9933 /* Override any gcc2 internal prototype to avoid an error.  */
9934 #ifdef __cplusplus
9935 extern "C"
9936 #endif
9937 /* We use char because int might match the return type of a gcc2
9938    builtin and then its argument prototype would still apply.  */
9939 char debug_malloc ();
9940 int
9941 main ()
9942 {
9943 debug_malloc ();
9944   ;
9945   return 0;
9946 }
9947 _ACEOF
9948 rm -f conftest.$ac_objext conftest$ac_exeext
9949 if { (eval echo "$as_me:9949: \"$ac_link\"") >&5
9950   (eval $ac_link) 2>&5
9951   ac_status=$?
9952   echo "$as_me:9952: \$? = $ac_status" >&5
9953   (exit $ac_status); } &&
9954          { ac_try='test -s conftest$ac_exeext'
9955   { (eval echo "$as_me:9955: \"$ac_try\"") >&5
9956   (eval $ac_try) 2>&5
9957   ac_status=$?
9958   echo "$as_me:9958: \$? = $ac_status" >&5
9959   (exit $ac_status); }; }; then
9960   ac_cv_lib_dbmalloc_debug_malloc=yes
9961 else
9962   echo "$as_me: failed program was:" >&5
9963 cat conftest.$ac_ext >&5
9964 ac_cv_lib_dbmalloc_debug_malloc=no
9965 fi
9966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9967 LIBS=$ac_check_lib_save_LIBS
9968 fi
9969 echo "$as_me:9969: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9970 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9971 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9972   cat >>confdefs.h <<EOF
9973 #define HAVE_LIBDBMALLOC 1
9974 EOF
9975
9976   LIBS="-ldbmalloc $LIBS"
9977
9978 fi
9979
9980 fi
9981
9982 fi
9983
9984 echo "$as_me:9984: checking if you want to use valgrind for testing" >&5
9985 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9986
9987 # Check whether --with-valgrind or --without-valgrind was given.
9988 if test "${with_valgrind+set}" = set; then
9989   withval="$with_valgrind"
9990   cat >>confdefs.h <<\EOF
9991 #define USE_VALGRIND 1
9992 EOF
9993
9994         : ${with_cflags:=-g}
9995         : ${with_no_leaks:=yes}
9996          with_valgrind=yes
9997 else
9998   with_valgrind=
9999 fi;
10000 echo "$as_me:10000: result: ${with_valgrind:-no}" >&5
10001 echo "${ECHO_T}${with_valgrind:-no}" >&6
10002
10003 case .$with_cflags in #(vi
10004 .*-g*)
10005         case .$CFLAGS in #(vi
10006         .*-g*) #(vi
10007                 ;;
10008         *)
10009
10010 cf_fix_cppflags=no
10011 cf_new_cflags=
10012 cf_new_cppflags=
10013 cf_new_extra_cppflags=
10014
10015 for cf_add_cflags in -g
10016 do
10017 case $cf_fix_cppflags in
10018 no)
10019         case $cf_add_cflags in #(vi
10020         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10021                 case $cf_add_cflags in
10022                 -D*)
10023                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10024
10025                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10026                         && test -z "${cf_tst_cflags}" \
10027                         && cf_fix_cppflags=yes
10028
10029                         if test $cf_fix_cppflags = yes ; then
10030                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10031                                 continue
10032                         elif test "${cf_tst_cflags}" = "\"'" ; then
10033                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10034                                 continue
10035                         fi
10036                         ;;
10037                 esac
10038                 case "$CPPFLAGS" in
10039                 *$cf_add_cflags) #(vi
10040                         ;;
10041                 *) #(vi
10042                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10043                         ;;
10044                 esac
10045                 ;;
10046         *)
10047                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10048                 ;;
10049         esac
10050         ;;
10051 yes)
10052         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10053
10054         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10055
10056         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10057         && test -z "${cf_tst_cflags}" \
10058         && cf_fix_cppflags=no
10059         ;;
10060 esac
10061 done
10062
10063 if test -n "$cf_new_cflags" ; then
10064
10065         CFLAGS="$CFLAGS $cf_new_cflags"
10066 fi
10067
10068 if test -n "$cf_new_cppflags" ; then
10069
10070         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10071 fi
10072
10073 if test -n "$cf_new_extra_cppflags" ; then
10074
10075         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10076 fi
10077
10078                 ;;
10079         esac
10080         ;;
10081 esac
10082
10083 echo "$as_me:10083: checking if you want to perform memory-leak testing" >&5
10084 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10085
10086 # Check whether --enable-leaks or --disable-leaks was given.
10087 if test "${enable_leaks+set}" = set; then
10088   enableval="$enable_leaks"
10089   with_no_leaks=yes
10090 else
10091   : ${with_no_leaks:=no}
10092 fi;
10093 echo "$as_me:10093: result: $with_no_leaks" >&5
10094 echo "${ECHO_T}$with_no_leaks" >&6
10095
10096 if test "$with_no_leaks" = yes ; then
10097         cat >>confdefs.h <<\EOF
10098 #define NO_LEAKS 1
10099 EOF
10100
10101 fi
10102
10103 cat >>confdefs.h <<\EOF
10104 #define HAVE_NC_ALLOC_H 1
10105 EOF
10106
10107 ###     use option --enable-expanded to generate certain macros as functions
10108
10109 # Check whether --enable-expanded or --disable-expanded was given.
10110 if test "${enable_expanded+set}" = set; then
10111   enableval="$enable_expanded"
10112   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10113 #define NCURSES_EXPANDED 1
10114 EOF
10115
10116 fi;
10117
10118 ###     use option --disable-macros to suppress macros in favor of functions
10119
10120 # Check whether --enable-macros or --disable-macros was given.
10121 if test "${enable_macros+set}" = set; then
10122   enableval="$enable_macros"
10123   test "$enableval" = no && cat >>confdefs.h <<\EOF
10124 #define NCURSES_NOMACROS 1
10125 EOF
10126
10127 fi;
10128
10129 # Normally we only add trace() to the debug-library.  Allow this to be
10130 # extended to all models of the ncurses library:
10131 cf_all_traces=no
10132 case "$CFLAGS $CPPFLAGS" in
10133 *-DTRACE*)
10134         cf_all_traces=yes
10135         ;;
10136 esac
10137
10138 echo "$as_me:10138: checking whether to add trace feature to all models" >&5
10139 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10140
10141 # Check whether --with-trace or --without-trace was given.
10142 if test "${with_trace+set}" = set; then
10143   withval="$with_trace"
10144   cf_with_trace=$withval
10145 else
10146   cf_with_trace=$cf_all_traces
10147 fi;
10148 echo "$as_me:10148: result: $cf_with_trace" >&5
10149 echo "${ECHO_T}$cf_with_trace" >&6
10150
10151 if test "$cf_with_trace" = yes ; then
10152         LIB_TRACING=all
10153         ADA_TRACE=TRUE
10154
10155 cf_fix_cppflags=no
10156 cf_new_cflags=
10157 cf_new_cppflags=
10158 cf_new_extra_cppflags=
10159
10160 for cf_add_cflags in -DTRACE
10161 do
10162 case $cf_fix_cppflags in
10163 no)
10164         case $cf_add_cflags in #(vi
10165         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10166                 case $cf_add_cflags in
10167                 -D*)
10168                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10169
10170                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10171                         && test -z "${cf_tst_cflags}" \
10172                         && cf_fix_cppflags=yes
10173
10174                         if test $cf_fix_cppflags = yes ; then
10175                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10176                                 continue
10177                         elif test "${cf_tst_cflags}" = "\"'" ; then
10178                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10179                                 continue
10180                         fi
10181                         ;;
10182                 esac
10183                 case "$CPPFLAGS" in
10184                 *$cf_add_cflags) #(vi
10185                         ;;
10186                 *) #(vi
10187                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10188                         ;;
10189                 esac
10190                 ;;
10191         *)
10192                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10193                 ;;
10194         esac
10195         ;;
10196 yes)
10197         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10198
10199         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10200
10201         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10202         && test -z "${cf_tst_cflags}" \
10203         && cf_fix_cppflags=no
10204         ;;
10205 esac
10206 done
10207
10208 if test -n "$cf_new_cflags" ; then
10209
10210         CFLAGS="$CFLAGS $cf_new_cflags"
10211 fi
10212
10213 if test -n "$cf_new_cppflags" ; then
10214
10215         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10216 fi
10217
10218 if test -n "$cf_new_extra_cppflags" ; then
10219
10220         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10221 fi
10222
10223 else
10224         LIB_TRACING=DEBUG
10225         ADA_TRACE=FALSE
10226 fi
10227
10228 ###     Checks for libraries.
10229 echo "$as_me:10229: checking for gettimeofday" >&5
10230 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10231 if test "${ac_cv_func_gettimeofday+set}" = set; then
10232   echo $ECHO_N "(cached) $ECHO_C" >&6
10233 else
10234   cat >conftest.$ac_ext <<_ACEOF
10235 #line 10235 "configure"
10236 #include "confdefs.h"
10237 /* System header to define __stub macros and hopefully few prototypes,
10238     which can conflict with char gettimeofday (); below.  */
10239 #include <assert.h>
10240 /* Override any gcc2 internal prototype to avoid an error.  */
10241 #ifdef __cplusplus
10242 extern "C"
10243 #endif
10244 /* We use char because int might match the return type of a gcc2
10245    builtin and then its argument prototype would still apply.  */
10246 char gettimeofday ();
10247 char (*f) ();
10248
10249 int
10250 main ()
10251 {
10252 /* The GNU C library defines this for functions which it implements
10253     to always fail with ENOSYS.  Some functions are actually named
10254     something starting with __ and the normal name is an alias.  */
10255 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10256 choke me
10257 #else
10258 f = gettimeofday;
10259 #endif
10260
10261   ;
10262   return 0;
10263 }
10264 _ACEOF
10265 rm -f conftest.$ac_objext conftest$ac_exeext
10266 if { (eval echo "$as_me:10266: \"$ac_link\"") >&5
10267   (eval $ac_link) 2>&5
10268   ac_status=$?
10269   echo "$as_me:10269: \$? = $ac_status" >&5
10270   (exit $ac_status); } &&
10271          { ac_try='test -s conftest$ac_exeext'
10272   { (eval echo "$as_me:10272: \"$ac_try\"") >&5
10273   (eval $ac_try) 2>&5
10274   ac_status=$?
10275   echo "$as_me:10275: \$? = $ac_status" >&5
10276   (exit $ac_status); }; }; then
10277   ac_cv_func_gettimeofday=yes
10278 else
10279   echo "$as_me: failed program was:" >&5
10280 cat conftest.$ac_ext >&5
10281 ac_cv_func_gettimeofday=no
10282 fi
10283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10284 fi
10285 echo "$as_me:10285: result: $ac_cv_func_gettimeofday" >&5
10286 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10287 if test $ac_cv_func_gettimeofday = yes; then
10288   cat >>confdefs.h <<\EOF
10289 #define HAVE_GETTIMEOFDAY 1
10290 EOF
10291
10292 else
10293
10294 echo "$as_me:10294: checking for gettimeofday in -lbsd" >&5
10295 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10296 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10297   echo $ECHO_N "(cached) $ECHO_C" >&6
10298 else
10299   ac_check_lib_save_LIBS=$LIBS
10300 LIBS="-lbsd  $LIBS"
10301 cat >conftest.$ac_ext <<_ACEOF
10302 #line 10302 "configure"
10303 #include "confdefs.h"
10304
10305 /* Override any gcc2 internal prototype to avoid an error.  */
10306 #ifdef __cplusplus
10307 extern "C"
10308 #endif
10309 /* We use char because int might match the return type of a gcc2
10310    builtin and then its argument prototype would still apply.  */
10311 char gettimeofday ();
10312 int
10313 main ()
10314 {
10315 gettimeofday ();
10316   ;
10317   return 0;
10318 }
10319 _ACEOF
10320 rm -f conftest.$ac_objext conftest$ac_exeext
10321 if { (eval echo "$as_me:10321: \"$ac_link\"") >&5
10322   (eval $ac_link) 2>&5
10323   ac_status=$?
10324   echo "$as_me:10324: \$? = $ac_status" >&5
10325   (exit $ac_status); } &&
10326          { ac_try='test -s conftest$ac_exeext'
10327   { (eval echo "$as_me:10327: \"$ac_try\"") >&5
10328   (eval $ac_try) 2>&5
10329   ac_status=$?
10330   echo "$as_me:10330: \$? = $ac_status" >&5
10331   (exit $ac_status); }; }; then
10332   ac_cv_lib_bsd_gettimeofday=yes
10333 else
10334   echo "$as_me: failed program was:" >&5
10335 cat conftest.$ac_ext >&5
10336 ac_cv_lib_bsd_gettimeofday=no
10337 fi
10338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10339 LIBS=$ac_check_lib_save_LIBS
10340 fi
10341 echo "$as_me:10341: result: $ac_cv_lib_bsd_gettimeofday" >&5
10342 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10343 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10344   cat >>confdefs.h <<\EOF
10345 #define HAVE_GETTIMEOFDAY 1
10346 EOF
10347
10348         LIBS="$LIBS -lbsd"
10349 fi
10350
10351 fi
10352
10353 echo "$as_me:10353: checking if -lm needed for math functions" >&5
10354 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10355 if test "${cf_cv_need_libm+set}" = set; then
10356   echo $ECHO_N "(cached) $ECHO_C" >&6
10357 else
10358
10359         cat >conftest.$ac_ext <<_ACEOF
10360 #line 10360 "configure"
10361 #include "confdefs.h"
10362
10363         #include <stdio.h>
10364         #include <math.h>
10365
10366 int
10367 main ()
10368 {
10369 double x = rand(); printf("result = %g\n", sin(x))
10370   ;
10371   return 0;
10372 }
10373 _ACEOF
10374 rm -f conftest.$ac_objext conftest$ac_exeext
10375 if { (eval echo "$as_me:10375: \"$ac_link\"") >&5
10376   (eval $ac_link) 2>&5
10377   ac_status=$?
10378   echo "$as_me:10378: \$? = $ac_status" >&5
10379   (exit $ac_status); } &&
10380          { ac_try='test -s conftest$ac_exeext'
10381   { (eval echo "$as_me:10381: \"$ac_try\"") >&5
10382   (eval $ac_try) 2>&5
10383   ac_status=$?
10384   echo "$as_me:10384: \$? = $ac_status" >&5
10385   (exit $ac_status); }; }; then
10386   cf_cv_need_libm=no
10387 else
10388   echo "$as_me: failed program was:" >&5
10389 cat conftest.$ac_ext >&5
10390 cf_cv_need_libm=yes
10391 fi
10392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10393 fi
10394 echo "$as_me:10394: result: $cf_cv_need_libm" >&5
10395 echo "${ECHO_T}$cf_cv_need_libm" >&6
10396 if test "$cf_cv_need_libm" = yes
10397 then
10398 MATH_LIB=-lm
10399 fi
10400
10401 ###     Checks for header files.
10402 echo "$as_me:10402: checking for ANSI C header files" >&5
10403 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10404 if test "${ac_cv_header_stdc+set}" = set; then
10405   echo $ECHO_N "(cached) $ECHO_C" >&6
10406 else
10407   cat >conftest.$ac_ext <<_ACEOF
10408 #line 10408 "configure"
10409 #include "confdefs.h"
10410 #include <stdlib.h>
10411 #include <stdarg.h>
10412 #include <string.h>
10413 #include <float.h>
10414
10415 _ACEOF
10416 if { (eval echo "$as_me:10416: \"$ac_cpp conftest.$ac_ext\"") >&5
10417   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10418   ac_status=$?
10419   egrep -v '^ *\+' conftest.er1 >conftest.err
10420   rm -f conftest.er1
10421   cat conftest.err >&5
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); } >/dev/null; then
10424   if test -s conftest.err; then
10425     ac_cpp_err=$ac_c_preproc_warn_flag
10426   else
10427     ac_cpp_err=
10428   fi
10429 else
10430   ac_cpp_err=yes
10431 fi
10432 if test -z "$ac_cpp_err"; then
10433   ac_cv_header_stdc=yes
10434 else
10435   echo "$as_me: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   ac_cv_header_stdc=no
10438 fi
10439 rm -f conftest.err conftest.$ac_ext
10440
10441 if test $ac_cv_header_stdc = yes; then
10442   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10443   cat >conftest.$ac_ext <<_ACEOF
10444 #line 10444 "configure"
10445 #include "confdefs.h"
10446 #include <string.h>
10447
10448 _ACEOF
10449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10450   egrep "memchr" >/dev/null 2>&1; then
10451   :
10452 else
10453   ac_cv_header_stdc=no
10454 fi
10455 rm -f conftest*
10456
10457 fi
10458
10459 if test $ac_cv_header_stdc = yes; then
10460   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10461   cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 #include <stdlib.h>
10465
10466 _ACEOF
10467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10468   egrep "free" >/dev/null 2>&1; then
10469   :
10470 else
10471   ac_cv_header_stdc=no
10472 fi
10473 rm -f conftest*
10474
10475 fi
10476
10477 if test $ac_cv_header_stdc = yes; then
10478   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10479   if test "$cross_compiling" = yes; then
10480   :
10481 else
10482   cat >conftest.$ac_ext <<_ACEOF
10483 #line 10483 "configure"
10484 #include "confdefs.h"
10485 #include <ctype.h>
10486 #if ((' ' & 0x0FF) == 0x020)
10487 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10488 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10489 #else
10490 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10491                      || ('j' <= (c) && (c) <= 'r') \
10492                      || ('s' <= (c) && (c) <= 'z'))
10493 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10494 #endif
10495
10496 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10497 int
10498 main ()
10499 {
10500   int i;
10501   for (i = 0; i < 256; i++)
10502     if (XOR (islower (i), ISLOWER (i))
10503         || toupper (i) != TOUPPER (i))
10504       $ac_main_return(2);
10505   $ac_main_return (0);
10506 }
10507 _ACEOF
10508 rm -f conftest$ac_exeext
10509 if { (eval echo "$as_me:10509: \"$ac_link\"") >&5
10510   (eval $ac_link) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10514   { (eval echo "$as_me:10514: \"$ac_try\"") >&5
10515   (eval $ac_try) 2>&5
10516   ac_status=$?
10517   echo "$as_me:10517: \$? = $ac_status" >&5
10518   (exit $ac_status); }; }; then
10519   :
10520 else
10521   echo "$as_me: program exited with status $ac_status" >&5
10522 echo "$as_me: failed program was:" >&5
10523 cat conftest.$ac_ext >&5
10524 ac_cv_header_stdc=no
10525 fi
10526 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10527 fi
10528 fi
10529 fi
10530 echo "$as_me:10530: result: $ac_cv_header_stdc" >&5
10531 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10532 if test $ac_cv_header_stdc = yes; then
10533
10534 cat >>confdefs.h <<\EOF
10535 #define STDC_HEADERS 1
10536 EOF
10537
10538 fi
10539
10540 ac_header_dirent=no
10541 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10542   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10543 echo "$as_me:10543: checking for $ac_hdr that defines DIR" >&5
10544 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10545 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10546   echo $ECHO_N "(cached) $ECHO_C" >&6
10547 else
10548   cat >conftest.$ac_ext <<_ACEOF
10549 #line 10549 "configure"
10550 #include "confdefs.h"
10551 #include <sys/types.h>
10552 #include <$ac_hdr>
10553
10554 int
10555 main ()
10556 {
10557 if ((DIR *) 0)
10558 return 0;
10559   ;
10560   return 0;
10561 }
10562 _ACEOF
10563 rm -f conftest.$ac_objext
10564 if { (eval echo "$as_me:10564: \"$ac_compile\"") >&5
10565   (eval $ac_compile) 2>&5
10566   ac_status=$?
10567   echo "$as_me:10567: \$? = $ac_status" >&5
10568   (exit $ac_status); } &&
10569          { ac_try='test -s conftest.$ac_objext'
10570   { (eval echo "$as_me:10570: \"$ac_try\"") >&5
10571   (eval $ac_try) 2>&5
10572   ac_status=$?
10573   echo "$as_me:10573: \$? = $ac_status" >&5
10574   (exit $ac_status); }; }; then
10575   eval "$as_ac_Header=yes"
10576 else
10577   echo "$as_me: failed program was:" >&5
10578 cat conftest.$ac_ext >&5
10579 eval "$as_ac_Header=no"
10580 fi
10581 rm -f conftest.$ac_objext conftest.$ac_ext
10582 fi
10583 echo "$as_me:10583: result: `eval echo '${'$as_ac_Header'}'`" >&5
10584 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10585 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10586   cat >>confdefs.h <<EOF
10587 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10588 EOF
10589
10590 ac_header_dirent=$ac_hdr; break
10591 fi
10592
10593 done
10594 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10595 if test $ac_header_dirent = dirent.h; then
10596   echo "$as_me:10596: checking for opendir in -ldir" >&5
10597 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10598 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10599   echo $ECHO_N "(cached) $ECHO_C" >&6
10600 else
10601   ac_check_lib_save_LIBS=$LIBS
10602 LIBS="-ldir  $LIBS"
10603 cat >conftest.$ac_ext <<_ACEOF
10604 #line 10604 "configure"
10605 #include "confdefs.h"
10606
10607 /* Override any gcc2 internal prototype to avoid an error.  */
10608 #ifdef __cplusplus
10609 extern "C"
10610 #endif
10611 /* We use char because int might match the return type of a gcc2
10612    builtin and then its argument prototype would still apply.  */
10613 char opendir ();
10614 int
10615 main ()
10616 {
10617 opendir ();
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext conftest$ac_exeext
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624   (eval $ac_link) 2>&5
10625   ac_status=$?
10626   echo "$as_me:10626: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest$ac_exeext'
10629   { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   ac_cv_lib_dir_opendir=yes
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 ac_cv_lib_dir_opendir=no
10639 fi
10640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10641 LIBS=$ac_check_lib_save_LIBS
10642 fi
10643 echo "$as_me:10643: result: $ac_cv_lib_dir_opendir" >&5
10644 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10645 if test $ac_cv_lib_dir_opendir = yes; then
10646   LIBS="$LIBS -ldir"
10647 fi
10648
10649 else
10650   echo "$as_me:10650: checking for opendir in -lx" >&5
10651 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10652 if test "${ac_cv_lib_x_opendir+set}" = set; then
10653   echo $ECHO_N "(cached) $ECHO_C" >&6
10654 else
10655   ac_check_lib_save_LIBS=$LIBS
10656 LIBS="-lx  $LIBS"
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10660
10661 /* Override any gcc2 internal prototype to avoid an error.  */
10662 #ifdef __cplusplus
10663 extern "C"
10664 #endif
10665 /* We use char because int might match the return type of a gcc2
10666    builtin and then its argument prototype would still apply.  */
10667 char opendir ();
10668 int
10669 main ()
10670 {
10671 opendir ();
10672   ;
10673   return 0;
10674 }
10675 _ACEOF
10676 rm -f conftest.$ac_objext conftest$ac_exeext
10677 if { (eval echo "$as_me:10677: \"$ac_link\"") >&5
10678   (eval $ac_link) 2>&5
10679   ac_status=$?
10680   echo "$as_me:10680: \$? = $ac_status" >&5
10681   (exit $ac_status); } &&
10682          { ac_try='test -s conftest$ac_exeext'
10683   { (eval echo "$as_me:10683: \"$ac_try\"") >&5
10684   (eval $ac_try) 2>&5
10685   ac_status=$?
10686   echo "$as_me:10686: \$? = $ac_status" >&5
10687   (exit $ac_status); }; }; then
10688   ac_cv_lib_x_opendir=yes
10689 else
10690   echo "$as_me: failed program was:" >&5
10691 cat conftest.$ac_ext >&5
10692 ac_cv_lib_x_opendir=no
10693 fi
10694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10695 LIBS=$ac_check_lib_save_LIBS
10696 fi
10697 echo "$as_me:10697: result: $ac_cv_lib_x_opendir" >&5
10698 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10699 if test $ac_cv_lib_x_opendir = yes; then
10700   LIBS="$LIBS -lx"
10701 fi
10702
10703 fi
10704
10705 echo "$as_me:10705: checking whether time.h and sys/time.h may both be included" >&5
10706 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10707 if test "${ac_cv_header_time+set}" = set; then
10708   echo $ECHO_N "(cached) $ECHO_C" >&6
10709 else
10710   cat >conftest.$ac_ext <<_ACEOF
10711 #line 10711 "configure"
10712 #include "confdefs.h"
10713 #include <sys/types.h>
10714 #include <sys/time.h>
10715 #include <time.h>
10716
10717 int
10718 main ()
10719 {
10720 if ((struct tm *) 0)
10721 return 0;
10722   ;
10723   return 0;
10724 }
10725 _ACEOF
10726 rm -f conftest.$ac_objext
10727 if { (eval echo "$as_me:10727: \"$ac_compile\"") >&5
10728   (eval $ac_compile) 2>&5
10729   ac_status=$?
10730   echo "$as_me:10730: \$? = $ac_status" >&5
10731   (exit $ac_status); } &&
10732          { ac_try='test -s conftest.$ac_objext'
10733   { (eval echo "$as_me:10733: \"$ac_try\"") >&5
10734   (eval $ac_try) 2>&5
10735   ac_status=$?
10736   echo "$as_me:10736: \$? = $ac_status" >&5
10737   (exit $ac_status); }; }; then
10738   ac_cv_header_time=yes
10739 else
10740   echo "$as_me: failed program was:" >&5
10741 cat conftest.$ac_ext >&5
10742 ac_cv_header_time=no
10743 fi
10744 rm -f conftest.$ac_objext conftest.$ac_ext
10745 fi
10746 echo "$as_me:10746: result: $ac_cv_header_time" >&5
10747 echo "${ECHO_T}$ac_cv_header_time" >&6
10748 if test $ac_cv_header_time = yes; then
10749
10750 cat >>confdefs.h <<\EOF
10751 #define TIME_WITH_SYS_TIME 1
10752 EOF
10753
10754 fi
10755
10756 echo "$as_me:10756: checking for regular-expression headers" >&5
10757 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10758 if test "${cf_cv_regex+set}" = set; then
10759   echo $ECHO_N "(cached) $ECHO_C" >&6
10760 else
10761
10762 cat >conftest.$ac_ext <<_ACEOF
10763 #line 10763 "configure"
10764 #include "confdefs.h"
10765 #include <sys/types.h>
10766 #include <regex.h>
10767 int
10768 main ()
10769 {
10770
10771         regex_t *p;
10772         int x = regcomp(p, "", 0);
10773         int y = regexec(p, "", 0, 0, 0);
10774         regfree(p);
10775
10776   ;
10777   return 0;
10778 }
10779 _ACEOF
10780 rm -f conftest.$ac_objext conftest$ac_exeext
10781 if { (eval echo "$as_me:10781: \"$ac_link\"") >&5
10782   (eval $ac_link) 2>&5
10783   ac_status=$?
10784   echo "$as_me:10784: \$? = $ac_status" >&5
10785   (exit $ac_status); } &&
10786          { ac_try='test -s conftest$ac_exeext'
10787   { (eval echo "$as_me:10787: \"$ac_try\"") >&5
10788   (eval $ac_try) 2>&5
10789   ac_status=$?
10790   echo "$as_me:10790: \$? = $ac_status" >&5
10791   (exit $ac_status); }; }; then
10792   cf_cv_regex="regex.h"
10793 else
10794   echo "$as_me: failed program was:" >&5
10795 cat conftest.$ac_ext >&5
10796
10797         cat >conftest.$ac_ext <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800 #include <regexp.h>
10801 int
10802 main ()
10803 {
10804
10805                 char *p = compile("", "", "", 0);
10806                 int x = step("", "");
10807
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f conftest.$ac_objext conftest$ac_exeext
10813 if { (eval echo "$as_me:10813: \"$ac_link\"") >&5
10814   (eval $ac_link) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit $ac_status); } &&
10818          { ac_try='test -s conftest$ac_exeext'
10819   { (eval echo "$as_me:10819: \"$ac_try\"") >&5
10820   (eval $ac_try) 2>&5
10821   ac_status=$?
10822   echo "$as_me:10822: \$? = $ac_status" >&5
10823   (exit $ac_status); }; }; then
10824   cf_cv_regex="regexp.h"
10825 else
10826   echo "$as_me: failed program was:" >&5
10827 cat conftest.$ac_ext >&5
10828
10829                 cf_save_LIBS="$LIBS"
10830                 LIBS="-lgen $LIBS"
10831                 cat >conftest.$ac_ext <<_ACEOF
10832 #line 10832 "configure"
10833 #include "confdefs.h"
10834 #include <regexpr.h>
10835 int
10836 main ()
10837 {
10838
10839                         char *p = compile("", "", "");
10840                         int x = step("", "");
10841
10842   ;
10843   return 0;
10844 }
10845 _ACEOF
10846 rm -f conftest.$ac_objext conftest$ac_exeext
10847 if { (eval echo "$as_me:10847: \"$ac_link\"") >&5
10848   (eval $ac_link) 2>&5
10849   ac_status=$?
10850   echo "$as_me:10850: \$? = $ac_status" >&5
10851   (exit $ac_status); } &&
10852          { ac_try='test -s conftest$ac_exeext'
10853   { (eval echo "$as_me:10853: \"$ac_try\"") >&5
10854   (eval $ac_try) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); }; }; then
10858   cf_cv_regex="regexpr.h"
10859 else
10860   echo "$as_me: failed program was:" >&5
10861 cat conftest.$ac_ext >&5
10862 LIBS="$cf_save_LIBS"
10863 fi
10864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10865 fi
10866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10867 fi
10868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10869
10870 fi
10871
10872 echo "$as_me:10872: result: $cf_cv_regex" >&5
10873 echo "${ECHO_T}$cf_cv_regex" >&6
10874 case $cf_cv_regex in
10875         regex.h)   cat >>confdefs.h <<\EOF
10876 #define HAVE_REGEX_H_FUNCS 1
10877 EOF
10878  ;;
10879         regexp.h)  cat >>confdefs.h <<\EOF
10880 #define HAVE_REGEXP_H_FUNCS 1
10881 EOF
10882  ;;
10883         regexpr.h) cat >>confdefs.h <<\EOF
10884 #define HAVE_REGEXPR_H_FUNCS 1
10885 EOF
10886  ;;
10887 esac
10888
10889 for ac_header in \
10890 fcntl.h \
10891 getopt.h \
10892 limits.h \
10893 locale.h \
10894 poll.h \
10895 sys/bsdtypes.h \
10896 sys/ioctl.h \
10897 sys/param.h \
10898 sys/poll.h \
10899 sys/select.h \
10900 sys/time.h \
10901 sys/times.h \
10902 ttyent.h \
10903 unistd.h \
10904 wctype.h \
10905
10906 do
10907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10908 echo "$as_me:10908: checking for $ac_header" >&5
10909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10911   echo $ECHO_N "(cached) $ECHO_C" >&6
10912 else
10913   cat >conftest.$ac_ext <<_ACEOF
10914 #line 10914 "configure"
10915 #include "confdefs.h"
10916 #include <$ac_header>
10917 _ACEOF
10918 if { (eval echo "$as_me:10918: \"$ac_cpp conftest.$ac_ext\"") >&5
10919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10920   ac_status=$?
10921   egrep -v '^ *\+' conftest.er1 >conftest.err
10922   rm -f conftest.er1
10923   cat conftest.err >&5
10924   echo "$as_me:10924: \$? = $ac_status" >&5
10925   (exit $ac_status); } >/dev/null; then
10926   if test -s conftest.err; then
10927     ac_cpp_err=$ac_c_preproc_warn_flag
10928   else
10929     ac_cpp_err=
10930   fi
10931 else
10932   ac_cpp_err=yes
10933 fi
10934 if test -z "$ac_cpp_err"; then
10935   eval "$as_ac_Header=yes"
10936 else
10937   echo "$as_me: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   eval "$as_ac_Header=no"
10940 fi
10941 rm -f conftest.err conftest.$ac_ext
10942 fi
10943 echo "$as_me:10943: result: `eval echo '${'$as_ac_Header'}'`" >&5
10944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10945 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10946   cat >>confdefs.h <<EOF
10947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10948 EOF
10949
10950 fi
10951 done
10952
10953 # check for ISC (this may also define _POSIX_SOURCE)
10954 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10955 if test "$ISC" = yes ; then
10956
10957 echo "$as_me:10957: checking for main in -lcposix" >&5
10958 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10959 if test "${ac_cv_lib_cposix_main+set}" = set; then
10960   echo $ECHO_N "(cached) $ECHO_C" >&6
10961 else
10962   ac_check_lib_save_LIBS=$LIBS
10963 LIBS="-lcposix  $LIBS"
10964 cat >conftest.$ac_ext <<_ACEOF
10965 #line 10965 "configure"
10966 #include "confdefs.h"
10967
10968 int
10969 main ()
10970 {
10971 main ();
10972   ;
10973   return 0;
10974 }
10975 _ACEOF
10976 rm -f conftest.$ac_objext conftest$ac_exeext
10977 if { (eval echo "$as_me:10977: \"$ac_link\"") >&5
10978   (eval $ac_link) 2>&5
10979   ac_status=$?
10980   echo "$as_me:10980: \$? = $ac_status" >&5
10981   (exit $ac_status); } &&
10982          { ac_try='test -s conftest$ac_exeext'
10983   { (eval echo "$as_me:10983: \"$ac_try\"") >&5
10984   (eval $ac_try) 2>&5
10985   ac_status=$?
10986   echo "$as_me:10986: \$? = $ac_status" >&5
10987   (exit $ac_status); }; }; then
10988   ac_cv_lib_cposix_main=yes
10989 else
10990   echo "$as_me: failed program was:" >&5
10991 cat conftest.$ac_ext >&5
10992 ac_cv_lib_cposix_main=no
10993 fi
10994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10995 LIBS=$ac_check_lib_save_LIBS
10996 fi
10997 echo "$as_me:10997: result: $ac_cv_lib_cposix_main" >&5
10998 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
10999 if test $ac_cv_lib_cposix_main = yes; then
11000   cat >>confdefs.h <<EOF
11001 #define HAVE_LIBCPOSIX 1
11002 EOF
11003
11004   LIBS="-lcposix $LIBS"
11005
11006 fi
11007
11008         echo "$as_me:11008: checking for bzero in -linet" >&5
11009 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11010 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11011   echo $ECHO_N "(cached) $ECHO_C" >&6
11012 else
11013   ac_check_lib_save_LIBS=$LIBS
11014 LIBS="-linet  $LIBS"
11015 cat >conftest.$ac_ext <<_ACEOF
11016 #line 11016 "configure"
11017 #include "confdefs.h"
11018
11019 /* Override any gcc2 internal prototype to avoid an error.  */
11020 #ifdef __cplusplus
11021 extern "C"
11022 #endif
11023 /* We use char because int might match the return type of a gcc2
11024    builtin and then its argument prototype would still apply.  */
11025 char bzero ();
11026 int
11027 main ()
11028 {
11029 bzero ();
11030   ;
11031   return 0;
11032 }
11033 _ACEOF
11034 rm -f conftest.$ac_objext conftest$ac_exeext
11035 if { (eval echo "$as_me:11035: \"$ac_link\"") >&5
11036   (eval $ac_link) 2>&5
11037   ac_status=$?
11038   echo "$as_me:11038: \$? = $ac_status" >&5
11039   (exit $ac_status); } &&
11040          { ac_try='test -s conftest$ac_exeext'
11041   { (eval echo "$as_me:11041: \"$ac_try\"") >&5
11042   (eval $ac_try) 2>&5
11043   ac_status=$?
11044   echo "$as_me:11044: \$? = $ac_status" >&5
11045   (exit $ac_status); }; }; then
11046   ac_cv_lib_inet_bzero=yes
11047 else
11048   echo "$as_me: failed program was:" >&5
11049 cat conftest.$ac_ext >&5
11050 ac_cv_lib_inet_bzero=no
11051 fi
11052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11053 LIBS=$ac_check_lib_save_LIBS
11054 fi
11055 echo "$as_me:11055: result: $ac_cv_lib_inet_bzero" >&5
11056 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11057 if test $ac_cv_lib_inet_bzero = yes; then
11058   LIBS="$LIBS -linet"
11059 fi
11060 fi
11061
11062 echo "$as_me:11062: checking if sys/time.h works with sys/select.h" >&5
11063 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11064 if test "${cf_cv_sys_time_select+set}" = set; then
11065   echo $ECHO_N "(cached) $ECHO_C" >&6
11066 else
11067
11068 cat >conftest.$ac_ext <<_ACEOF
11069 #line 11069 "configure"
11070 #include "confdefs.h"
11071
11072 #include <sys/types.h>
11073 #ifdef HAVE_SYS_TIME_H
11074 #include <sys/time.h>
11075 #endif
11076 #ifdef HAVE_SYS_SELECT_H
11077 #include <sys/select.h>
11078 #endif
11079
11080 int
11081 main ()
11082 {
11083
11084   ;
11085   return 0;
11086 }
11087 _ACEOF
11088 rm -f conftest.$ac_objext
11089 if { (eval echo "$as_me:11089: \"$ac_compile\"") >&5
11090   (eval $ac_compile) 2>&5
11091   ac_status=$?
11092   echo "$as_me:11092: \$? = $ac_status" >&5
11093   (exit $ac_status); } &&
11094          { ac_try='test -s conftest.$ac_objext'
11095   { (eval echo "$as_me:11095: \"$ac_try\"") >&5
11096   (eval $ac_try) 2>&5
11097   ac_status=$?
11098   echo "$as_me:11098: \$? = $ac_status" >&5
11099   (exit $ac_status); }; }; then
11100   cf_cv_sys_time_select=yes
11101 else
11102   echo "$as_me: failed program was:" >&5
11103 cat conftest.$ac_ext >&5
11104 cf_cv_sys_time_select=no
11105 fi
11106 rm -f conftest.$ac_objext conftest.$ac_ext
11107
11108 fi
11109
11110 echo "$as_me:11110: result: $cf_cv_sys_time_select" >&5
11111 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11112 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11113 #define HAVE_SYS_TIME_SELECT 1
11114 EOF
11115
11116 ###     checks for compiler characteristics
11117 ac_ext=c
11118 ac_cpp='$CPP $CPPFLAGS'
11119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11122 ac_main_return=return
11123
11124 echo "$as_me:11124: checking for $CC option to accept ANSI C" >&5
11125 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11126 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11127   echo $ECHO_N "(cached) $ECHO_C" >&6
11128 else
11129   ac_cv_prog_cc_stdc=no
11130 ac_save_CC=$CC
11131 cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134 #include <stdarg.h>
11135 #include <stdio.h>
11136 #include <sys/types.h>
11137 #include <sys/stat.h>
11138 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11139 struct buf { int x; };
11140 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11141 static char *e (p, i)
11142      char **p;
11143      int i;
11144 {
11145   return p[i];
11146 }
11147 static char *f (char * (*g) (char **, int), char **p, ...)
11148 {
11149   char *s;
11150   va_list v;
11151   va_start (v,p);
11152   s = g (p, va_arg (v,int));
11153   va_end (v);
11154   return s;
11155 }
11156 int test (int i, double x);
11157 struct s1 {int (*f) (int a);};
11158 struct s2 {int (*f) (double a);};
11159 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11160 int argc;
11161 char **argv;
11162 int
11163 main ()
11164 {
11165 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11166   ;
11167   return 0;
11168 }
11169 _ACEOF
11170 # Don't try gcc -ansi; that turns off useful extensions and
11171 # breaks some systems' header files.
11172 # AIX                   -qlanglvl=ansi
11173 # Ultrix and OSF/1      -std1
11174 # HP-UX 10.20 and later -Ae
11175 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11176 # SVR4                  -Xc -D__EXTENSIONS__
11177 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11178 do
11179   CC="$ac_save_CC $ac_arg"
11180   rm -f conftest.$ac_objext
11181 if { (eval echo "$as_me:11181: \"$ac_compile\"") >&5
11182   (eval $ac_compile) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); } &&
11186          { ac_try='test -s conftest.$ac_objext'
11187   { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit $ac_status); }; }; then
11192   ac_cv_prog_cc_stdc=$ac_arg
11193 break
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 fi
11198 rm -f conftest.$ac_objext
11199 done
11200 rm -f conftest.$ac_ext conftest.$ac_objext
11201 CC=$ac_save_CC
11202
11203 fi
11204
11205 case "x$ac_cv_prog_cc_stdc" in
11206   x|xno)
11207     echo "$as_me:11207: result: none needed" >&5
11208 echo "${ECHO_T}none needed" >&6 ;;
11209   *)
11210     echo "$as_me:11210: result: $ac_cv_prog_cc_stdc" >&5
11211 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11212     CC="$CC $ac_cv_prog_cc_stdc" ;;
11213 esac
11214
11215 echo "$as_me:11215: checking for an ANSI C-conforming const" >&5
11216 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11217 if test "${ac_cv_c_const+set}" = set; then
11218   echo $ECHO_N "(cached) $ECHO_C" >&6
11219 else
11220   cat >conftest.$ac_ext <<_ACEOF
11221 #line 11221 "configure"
11222 #include "confdefs.h"
11223
11224 int
11225 main ()
11226 {
11227 /* FIXME: Include the comments suggested by Paul. */
11228 #ifndef __cplusplus
11229   /* Ultrix mips cc rejects this.  */
11230   typedef int charset[2];
11231   const charset x;
11232   /* SunOS 4.1.1 cc rejects this.  */
11233   char const *const *ccp;
11234   char **p;
11235   /* NEC SVR4.0.2 mips cc rejects this.  */
11236   struct point {int x, y;};
11237   static struct point const zero = {0,0};
11238   /* AIX XL C 1.02.0.0 rejects this.
11239      It does not let you subtract one const X* pointer from another in
11240      an arm of an if-expression whose if-part is not a constant
11241      expression */
11242   const char *g = "string";
11243   ccp = &g + (g ? g-g : 0);
11244   /* HPUX 7.0 cc rejects these. */
11245   ++ccp;
11246   p = (char**) ccp;
11247   ccp = (char const *const *) p;
11248   { /* SCO 3.2v4 cc rejects this.  */
11249     char *t;
11250     char const *s = 0 ? (char *) 0 : (char const *) 0;
11251
11252     *t++ = 0;
11253   }
11254   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11255     int x[] = {25, 17};
11256     const int *foo = &x[0];
11257     ++foo;
11258   }
11259   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11260     typedef const int *iptr;
11261     iptr p = 0;
11262     ++p;
11263   }
11264   { /* AIX XL C 1.02.0.0 rejects this saying
11265        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11266     struct s { int j; const int *ap[3]; };
11267     struct s *b; b->j = 5;
11268   }
11269   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11270     const int foo = 10;
11271   }
11272 #endif
11273
11274   ;
11275   return 0;
11276 }
11277 _ACEOF
11278 rm -f conftest.$ac_objext
11279 if { (eval echo "$as_me:11279: \"$ac_compile\"") >&5
11280   (eval $ac_compile) 2>&5
11281   ac_status=$?
11282   echo "$as_me:11282: \$? = $ac_status" >&5
11283   (exit $ac_status); } &&
11284          { ac_try='test -s conftest.$ac_objext'
11285   { (eval echo "$as_me:11285: \"$ac_try\"") >&5
11286   (eval $ac_try) 2>&5
11287   ac_status=$?
11288   echo "$as_me:11288: \$? = $ac_status" >&5
11289   (exit $ac_status); }; }; then
11290   ac_cv_c_const=yes
11291 else
11292   echo "$as_me: failed program was:" >&5
11293 cat conftest.$ac_ext >&5
11294 ac_cv_c_const=no
11295 fi
11296 rm -f conftest.$ac_objext conftest.$ac_ext
11297 fi
11298 echo "$as_me:11298: result: $ac_cv_c_const" >&5
11299 echo "${ECHO_T}$ac_cv_c_const" >&6
11300 if test $ac_cv_c_const = no; then
11301
11302 cat >>confdefs.h <<\EOF
11303 #define const
11304 EOF
11305
11306 fi
11307
11308 echo "$as_me:11308: checking for inline" >&5
11309 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11310 if test "${ac_cv_c_inline+set}" = set; then
11311   echo $ECHO_N "(cached) $ECHO_C" >&6
11312 else
11313   ac_cv_c_inline=no
11314 for ac_kw in inline __inline__ __inline; do
11315   cat >conftest.$ac_ext <<_ACEOF
11316 #line 11316 "configure"
11317 #include "confdefs.h"
11318 #ifndef __cplusplus
11319 static $ac_kw int static_foo () {return 0; }
11320 $ac_kw int foo () {return 0; }
11321 #endif
11322
11323 _ACEOF
11324 rm -f conftest.$ac_objext
11325 if { (eval echo "$as_me:11325: \"$ac_compile\"") >&5
11326   (eval $ac_compile) 2>&5
11327   ac_status=$?
11328   echo "$as_me:11328: \$? = $ac_status" >&5
11329   (exit $ac_status); } &&
11330          { ac_try='test -s conftest.$ac_objext'
11331   { (eval echo "$as_me:11331: \"$ac_try\"") >&5
11332   (eval $ac_try) 2>&5
11333   ac_status=$?
11334   echo "$as_me:11334: \$? = $ac_status" >&5
11335   (exit $ac_status); }; }; then
11336   ac_cv_c_inline=$ac_kw; break
11337 else
11338   echo "$as_me: failed program was:" >&5
11339 cat conftest.$ac_ext >&5
11340 fi
11341 rm -f conftest.$ac_objext conftest.$ac_ext
11342 done
11343
11344 fi
11345 echo "$as_me:11345: result: $ac_cv_c_inline" >&5
11346 echo "${ECHO_T}$ac_cv_c_inline" >&6
11347 case $ac_cv_c_inline in
11348   inline | yes) ;;
11349   no)
11350 cat >>confdefs.h <<\EOF
11351 #define inline
11352 EOF
11353  ;;
11354   *)  cat >>confdefs.h <<EOF
11355 #define inline $ac_cv_c_inline
11356 EOF
11357  ;;
11358 esac
11359
11360 NCURSES_INLINE=
11361 if test "$ac_cv_c_inline" != no ; then
11362         cat >>confdefs.h <<\EOF
11363 #define CC_HAS_INLINE_FUNCS 1
11364 EOF
11365
11366         NCURSES_INLINE=inline
11367 fi
11368
11369 if test $NCURSES_CHTYPE = auto ; then
11370
11371 echo "$as_me:11371: checking for type of chtype" >&5
11372 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11373 if test "${cf_cv_typeof_chtype+set}" = set; then
11374   echo $ECHO_N "(cached) $ECHO_C" >&6
11375 else
11376
11377                 if test "$cross_compiling" = yes; then
11378   cf_cv_typeof_chtype=long
11379 else
11380   cat >conftest.$ac_ext <<_ACEOF
11381 #line 11381 "configure"
11382 #include "confdefs.h"
11383
11384 #define WANT_BITS 31
11385 #include <stdio.h>
11386 int main()
11387 {
11388         FILE *fp = fopen("cf_test.out", "w");
11389         if (fp != 0) {
11390                 char *result = "long";
11391                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11392                         int n;
11393                         unsigned int x, y;
11394                         for (n = 0; n < WANT_BITS; n++) {
11395                                 x = (1 << n);
11396                                 y = (x >> n);
11397                                 if (y != 1 || x == 0) {
11398                                         x = 0;
11399                                         break;
11400                                 }
11401                         }
11402                         /*
11403                          * If x is nonzero, an int is big enough for the bits
11404                          * that we want.
11405                          */
11406                         result = (x != 0) ? "int" : "long";
11407                 }
11408                 fputs(result, fp);
11409                 fclose(fp);
11410         }
11411         ${cf_cv_main_return:-return}(0);
11412 }
11413
11414 _ACEOF
11415 rm -f conftest$ac_exeext
11416 if { (eval echo "$as_me:11416: \"$ac_link\"") >&5
11417   (eval $ac_link) 2>&5
11418   ac_status=$?
11419   echo "$as_me:11419: \$? = $ac_status" >&5
11420   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11421   { (eval echo "$as_me:11421: \"$ac_try\"") >&5
11422   (eval $ac_try) 2>&5
11423   ac_status=$?
11424   echo "$as_me:11424: \$? = $ac_status" >&5
11425   (exit $ac_status); }; }; then
11426   cf_cv_typeof_chtype=`cat cf_test.out`
11427 else
11428   echo "$as_me: program exited with status $ac_status" >&5
11429 echo "$as_me: failed program was:" >&5
11430 cat conftest.$ac_ext >&5
11431 cf_cv_typeof_chtype=long
11432 fi
11433 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11434 fi
11435                 rm -f cf_test.out
11436
11437 fi
11438
11439 echo "$as_me:11439: result: $cf_cv_typeof_chtype" >&5
11440 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11441
11442 cat >>confdefs.h <<EOF
11443 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11444 EOF
11445
11446 else
11447         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11448 fi
11449
11450 echo "$as_me:11450: checking if unsigned literals are legal" >&5
11451 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11452 if test "${cf_cv_unsigned_literals+set}" = set; then
11453   echo $ECHO_N "(cached) $ECHO_C" >&6
11454 else
11455
11456         cat >conftest.$ac_ext <<_ACEOF
11457 #line 11457 "configure"
11458 #include "confdefs.h"
11459
11460 int
11461 main ()
11462 {
11463 long x = 1L + 1UL + 1U + 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_unsigned_literals=yes
11481 else
11482   echo "$as_me: failed program was:" >&5
11483 cat conftest.$ac_ext >&5
11484 cf_cv_unsigned_literals=no
11485 fi
11486 rm -f conftest.$ac_objext conftest.$ac_ext
11487
11488 fi
11489
11490 echo "$as_me:11490: result: $cf_cv_unsigned_literals" >&5
11491 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11492
11493 cf_cv_1UL="1"
11494 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11495 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11496
11497 if test $NCURSES_MMASK_T = auto ; then
11498         cf_cv_typeof_mmask_t=long
11499 else
11500         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11501 fi
11502
11503 ###     Checks for external-data
11504
11505 echo "$as_me:11505: checking if external errno is declared" >&5
11506 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11507 if test "${cf_cv_dcl_errno+set}" = set; then
11508   echo $ECHO_N "(cached) $ECHO_C" >&6
11509 else
11510
11511     cat >conftest.$ac_ext <<_ACEOF
11512 #line 11512 "configure"
11513 #include "confdefs.h"
11514
11515 #ifdef HAVE_STDLIB_H
11516 #include <stdlib.h>
11517 #endif
11518 #include <stdio.h>
11519 #include <sys/types.h>
11520 #include <errno.h>
11521 int
11522 main ()
11523 {
11524 long x = (long) errno
11525   ;
11526   return 0;
11527 }
11528 _ACEOF
11529 rm -f conftest.$ac_objext
11530 if { (eval echo "$as_me:11530: \"$ac_compile\"") >&5
11531   (eval $ac_compile) 2>&5
11532   ac_status=$?
11533   echo "$as_me:11533: \$? = $ac_status" >&5
11534   (exit $ac_status); } &&
11535          { ac_try='test -s conftest.$ac_objext'
11536   { (eval echo "$as_me:11536: \"$ac_try\"") >&5
11537   (eval $ac_try) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit $ac_status); }; }; then
11541   cf_cv_dcl_errno=yes
11542 else
11543   echo "$as_me: failed program was:" >&5
11544 cat conftest.$ac_ext >&5
11545 cf_cv_dcl_errno=no
11546 fi
11547 rm -f conftest.$ac_objext conftest.$ac_ext
11548
11549 fi
11550 echo "$as_me:11550: result: $cf_cv_dcl_errno" >&5
11551 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11552
11553 if test "$cf_cv_dcl_errno" = no ; then
11554
11555 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11556
11557     cat >>confdefs.h <<EOF
11558 #define $cf_result 1
11559 EOF
11560
11561 fi
11562
11563 # It's possible (for near-UNIX clones) that the data doesn't exist
11564
11565 echo "$as_me:11565: checking if external errno exists" >&5
11566 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11567 if test "${cf_cv_have_errno+set}" = set; then
11568   echo $ECHO_N "(cached) $ECHO_C" >&6
11569 else
11570
11571     cat >conftest.$ac_ext <<_ACEOF
11572 #line 11572 "configure"
11573 #include "confdefs.h"
11574
11575 #undef errno
11576 extern int errno;
11577
11578 int
11579 main ()
11580 {
11581 errno = 2
11582   ;
11583   return 0;
11584 }
11585 _ACEOF
11586 rm -f conftest.$ac_objext conftest$ac_exeext
11587 if { (eval echo "$as_me:11587: \"$ac_link\"") >&5
11588   (eval $ac_link) 2>&5
11589   ac_status=$?
11590   echo "$as_me:11590: \$? = $ac_status" >&5
11591   (exit $ac_status); } &&
11592          { ac_try='test -s conftest$ac_exeext'
11593   { (eval echo "$as_me:11593: \"$ac_try\"") >&5
11594   (eval $ac_try) 2>&5
11595   ac_status=$?
11596   echo "$as_me:11596: \$? = $ac_status" >&5
11597   (exit $ac_status); }; }; then
11598   cf_cv_have_errno=yes
11599 else
11600   echo "$as_me: failed program was:" >&5
11601 cat conftest.$ac_ext >&5
11602 cf_cv_have_errno=no
11603 fi
11604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11605
11606 fi
11607 echo "$as_me:11607: result: $cf_cv_have_errno" >&5
11608 echo "${ECHO_T}$cf_cv_have_errno" >&6
11609
11610 if test "$cf_cv_have_errno" = yes ; then
11611
11612 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11613
11614     cat >>confdefs.h <<EOF
11615 #define $cf_result 1
11616 EOF
11617
11618 fi
11619
11620 echo "$as_me:11620: checking if data-only library module links" >&5
11621 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11622 if test "${cf_cv_link_dataonly+set}" = set; then
11623   echo $ECHO_N "(cached) $ECHO_C" >&6
11624 else
11625
11626         rm -f conftest.a
11627         cat >conftest.$ac_ext <<EOF
11628 #line 11628 "configure"
11629 int     testdata[3] = { 123, 456, 789 };
11630 EOF
11631         if { (eval echo "$as_me:11631: \"$ac_compile\"") >&5
11632   (eval $ac_compile) 2>&5
11633   ac_status=$?
11634   echo "$as_me:11634: \$? = $ac_status" >&5
11635   (exit $ac_status); } ; then
11636                 mv conftest.o data.o && \
11637                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11638         fi
11639         rm -f conftest.$ac_ext data.o
11640         cat >conftest.$ac_ext <<EOF
11641 #line 11641 "configure"
11642 int     testfunc()
11643 {
11644 #if defined(NeXT)
11645         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11646 #else
11647         extern int testdata[3];
11648         return testdata[0] == 123
11649            &&  testdata[1] == 456
11650            &&  testdata[2] == 789;
11651 #endif
11652 }
11653 EOF
11654         if { (eval echo "$as_me:11654: \"$ac_compile\"") >&5
11655   (eval $ac_compile) 2>&5
11656   ac_status=$?
11657   echo "$as_me:11657: \$? = $ac_status" >&5
11658   (exit $ac_status); }; then
11659                 mv conftest.o func.o && \
11660                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11661         fi
11662         rm -f conftest.$ac_ext func.o
11663         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11664         cf_saveLIBS="$LIBS"
11665         LIBS="conftest.a $LIBS"
11666         if test "$cross_compiling" = yes; then
11667   cf_cv_link_dataonly=unknown
11668 else
11669   cat >conftest.$ac_ext <<_ACEOF
11670 #line 11670 "configure"
11671 #include "confdefs.h"
11672
11673         int main()
11674         {
11675                 extern int testfunc();
11676                 ${cf_cv_main_return:-return} (!testfunc());
11677         }
11678
11679 _ACEOF
11680 rm -f conftest$ac_exeext
11681 if { (eval echo "$as_me:11681: \"$ac_link\"") >&5
11682   (eval $ac_link) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11686   { (eval echo "$as_me:11686: \"$ac_try\"") >&5
11687   (eval $ac_try) 2>&5
11688   ac_status=$?
11689   echo "$as_me:11689: \$? = $ac_status" >&5
11690   (exit $ac_status); }; }; then
11691   cf_cv_link_dataonly=yes
11692 else
11693   echo "$as_me: program exited with status $ac_status" >&5
11694 echo "$as_me: failed program was:" >&5
11695 cat conftest.$ac_ext >&5
11696 cf_cv_link_dataonly=no
11697 fi
11698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11699 fi
11700         LIBS="$cf_saveLIBS"
11701
11702 fi
11703
11704 echo "$as_me:11704: result: $cf_cv_link_dataonly" >&5
11705 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11706
11707 if test "$cf_cv_link_dataonly" = no ; then
11708         cat >>confdefs.h <<\EOF
11709 #define BROKEN_LINKER 1
11710 EOF
11711
11712         BROKEN_LINKER=1
11713 fi
11714
11715 ###     Checks for library functions.
11716
11717 for ac_func in \
11718 getcwd \
11719 getegid \
11720 geteuid \
11721 getttynam \
11722 issetugid \
11723 poll \
11724 remove \
11725 select \
11726 setbuf \
11727 setbuffer \
11728 setvbuf \
11729 sigaction \
11730 sigvec \
11731 strdup \
11732 strstr \
11733 tcgetpgrp \
11734 times \
11735 vsnprintf \
11736
11737 do
11738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11739 echo "$as_me:11739: checking for $ac_func" >&5
11740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11741 if eval "test \"\${$as_ac_var+set}\" = set"; then
11742   echo $ECHO_N "(cached) $ECHO_C" >&6
11743 else
11744   cat >conftest.$ac_ext <<_ACEOF
11745 #line 11745 "configure"
11746 #include "confdefs.h"
11747 /* System header to define __stub macros and hopefully few prototypes,
11748     which can conflict with char $ac_func (); below.  */
11749 #include <assert.h>
11750 /* Override any gcc2 internal prototype to avoid an error.  */
11751 #ifdef __cplusplus
11752 extern "C"
11753 #endif
11754 /* We use char because int might match the return type of a gcc2
11755    builtin and then its argument prototype would still apply.  */
11756 char $ac_func ();
11757 char (*f) ();
11758
11759 int
11760 main ()
11761 {
11762 /* The GNU C library defines this for functions which it implements
11763     to always fail with ENOSYS.  Some functions are actually named
11764     something starting with __ and the normal name is an alias.  */
11765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11766 choke me
11767 #else
11768 f = $ac_func;
11769 #endif
11770
11771   ;
11772   return 0;
11773 }
11774 _ACEOF
11775 rm -f conftest.$ac_objext conftest$ac_exeext
11776 if { (eval echo "$as_me:11776: \"$ac_link\"") >&5
11777   (eval $ac_link) 2>&5
11778   ac_status=$?
11779   echo "$as_me:11779: \$? = $ac_status" >&5
11780   (exit $ac_status); } &&
11781          { ac_try='test -s conftest$ac_exeext'
11782   { (eval echo "$as_me:11782: \"$ac_try\"") >&5
11783   (eval $ac_try) 2>&5
11784   ac_status=$?
11785   echo "$as_me:11785: \$? = $ac_status" >&5
11786   (exit $ac_status); }; }; then
11787   eval "$as_ac_var=yes"
11788 else
11789   echo "$as_me: failed program was:" >&5
11790 cat conftest.$ac_ext >&5
11791 eval "$as_ac_var=no"
11792 fi
11793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11794 fi
11795 echo "$as_me:11795: result: `eval echo '${'$as_ac_var'}'`" >&5
11796 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11797 if test `eval echo '${'$as_ac_var'}'` = yes; then
11798   cat >>confdefs.h <<EOF
11799 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11800 EOF
11801
11802 fi
11803 done
11804
11805 if test "$with_getcap" = "yes" ; then
11806
11807 echo "$as_me:11807: checking for terminal-capability database functions" >&5
11808 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11809 if test "${cf_cv_cgetent+set}" = set; then
11810   echo $ECHO_N "(cached) $ECHO_C" >&6
11811 else
11812
11813 cat >conftest.$ac_ext <<_ACEOF
11814 #line 11814 "configure"
11815 #include "confdefs.h"
11816
11817 #include <stdlib.h>
11818 int
11819 main ()
11820 {
11821
11822         char temp[128];
11823         char *buf = temp;
11824         char *db_array = temp;
11825         cgetent(&buf, /* int *, */ &db_array, "vt100");
11826         cgetcap(buf, "tc", '=');
11827         cgetmatch(buf, "tc");
11828
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f conftest.$ac_objext conftest$ac_exeext
11834 if { (eval echo "$as_me:11834: \"$ac_link\"") >&5
11835   (eval $ac_link) 2>&5
11836   ac_status=$?
11837   echo "$as_me:11837: \$? = $ac_status" >&5
11838   (exit $ac_status); } &&
11839          { ac_try='test -s conftest$ac_exeext'
11840   { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit $ac_status); }; }; then
11845   cf_cv_cgetent=yes
11846 else
11847   echo "$as_me: failed program was:" >&5
11848 cat conftest.$ac_ext >&5
11849 cf_cv_cgetent=no
11850 fi
11851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11852
11853 fi
11854
11855 echo "$as_me:11855: result: $cf_cv_cgetent" >&5
11856 echo "${ECHO_T}$cf_cv_cgetent" >&6
11857 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11858 #define HAVE_BSD_CGETENT 1
11859 EOF
11860
11861 fi
11862
11863 echo "$as_me:11863: checking for isascii" >&5
11864 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11865 if test "${cf_cv_have_isascii+set}" = set; then
11866   echo $ECHO_N "(cached) $ECHO_C" >&6
11867 else
11868
11869         cat >conftest.$ac_ext <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872 #include <ctype.h>
11873 int
11874 main ()
11875 {
11876 int x = isascii(' ')
11877   ;
11878   return 0;
11879 }
11880 _ACEOF
11881 rm -f conftest.$ac_objext conftest$ac_exeext
11882 if { (eval echo "$as_me:11882: \"$ac_link\"") >&5
11883   (eval $ac_link) 2>&5
11884   ac_status=$?
11885   echo "$as_me:11885: \$? = $ac_status" >&5
11886   (exit $ac_status); } &&
11887          { ac_try='test -s conftest$ac_exeext'
11888   { (eval echo "$as_me:11888: \"$ac_try\"") >&5
11889   (eval $ac_try) 2>&5
11890   ac_status=$?
11891   echo "$as_me:11891: \$? = $ac_status" >&5
11892   (exit $ac_status); }; }; then
11893   cf_cv_have_isascii=yes
11894 else
11895   echo "$as_me: failed program was:" >&5
11896 cat conftest.$ac_ext >&5
11897 cf_cv_have_isascii=no
11898 fi
11899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11900
11901 fi
11902 echo "$as_me:11902: result: $cf_cv_have_isascii" >&5
11903 echo "${ECHO_T}$cf_cv_have_isascii" >&6
11904 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11905 #define HAVE_ISASCII 1
11906 EOF
11907
11908 if test "$ac_cv_func_sigaction" = yes; then
11909 echo "$as_me:11909: checking whether sigaction needs _POSIX_SOURCE" >&5
11910 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11911 cat >conftest.$ac_ext <<_ACEOF
11912 #line 11912 "configure"
11913 #include "confdefs.h"
11914
11915 #include <sys/types.h>
11916 #include <signal.h>
11917 int
11918 main ()
11919 {
11920 struct sigaction act
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 rm -f conftest.$ac_objext
11926 if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
11927   (eval $ac_compile) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); } &&
11931          { ac_try='test -s conftest.$ac_objext'
11932   { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933   (eval $ac_try) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; }; then
11937   sigact_bad=no
11938 else
11939   echo "$as_me: failed program was:" >&5
11940 cat conftest.$ac_ext >&5
11941
11942 cat >conftest.$ac_ext <<_ACEOF
11943 #line 11943 "configure"
11944 #include "confdefs.h"
11945
11946 #define _POSIX_SOURCE
11947 #include <sys/types.h>
11948 #include <signal.h>
11949 int
11950 main ()
11951 {
11952 struct sigaction act
11953   ;
11954   return 0;
11955 }
11956 _ACEOF
11957 rm -f conftest.$ac_objext
11958 if { (eval echo "$as_me:11958: \"$ac_compile\"") >&5
11959   (eval $ac_compile) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit $ac_status); } &&
11963          { ac_try='test -s conftest.$ac_objext'
11964   { (eval echo "$as_me:11964: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:11967: \$? = $ac_status" >&5
11968   (exit $ac_status); }; }; then
11969   sigact_bad=yes
11970          cat >>confdefs.h <<\EOF
11971 #define SVR4_ACTION 1
11972 EOF
11973
11974 else
11975   echo "$as_me: failed program was:" >&5
11976 cat conftest.$ac_ext >&5
11977 sigact_bad=unknown
11978 fi
11979 rm -f conftest.$ac_objext conftest.$ac_ext
11980 fi
11981 rm -f conftest.$ac_objext conftest.$ac_ext
11982 echo "$as_me:11982: result: $sigact_bad" >&5
11983 echo "${ECHO_T}$sigact_bad" >&6
11984 fi
11985
11986 echo "$as_me:11986: checking if nanosleep really works" >&5
11987 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
11988 if test "${cf_cv_func_nanosleep+set}" = set; then
11989   echo $ECHO_N "(cached) $ECHO_C" >&6
11990 else
11991
11992 if test "$cross_compiling" = yes; then
11993   cf_cv_func_nanosleep=unknown
11994 else
11995   cat >conftest.$ac_ext <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
11998
11999 #include <stdio.h>
12000 #include <errno.h>
12001 #include <time.h>
12002
12003 #ifdef HAVE_SYS_TIME_H
12004 #include <sys/time.h>
12005 #endif
12006
12007 int main() {
12008         struct timespec ts1, ts2;
12009         int code;
12010         ts1.tv_sec  = 0;
12011         ts1.tv_nsec = 750000000;
12012         ts2.tv_sec  = 0;
12013         ts2.tv_nsec = 0;
12014         errno = 0;
12015         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12016         ${cf_cv_main_return:-return}(code != 0);
12017 }
12018
12019 _ACEOF
12020 rm -f conftest$ac_exeext
12021 if { (eval echo "$as_me:12021: \"$ac_link\"") >&5
12022   (eval $ac_link) 2>&5
12023   ac_status=$?
12024   echo "$as_me:12024: \$? = $ac_status" >&5
12025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12026   { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027   (eval $ac_try) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); }; }; then
12031   cf_cv_func_nanosleep=yes
12032 else
12033   echo "$as_me: program exited with status $ac_status" >&5
12034 echo "$as_me: failed program was:" >&5
12035 cat conftest.$ac_ext >&5
12036 cf_cv_func_nanosleep=no
12037 fi
12038 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12039 fi
12040 fi
12041 echo "$as_me:12041: result: $cf_cv_func_nanosleep" >&5
12042 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12043
12044 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12045 #define HAVE_NANOSLEEP 1
12046 EOF
12047
12048 for ac_header in \
12049 termio.h \
12050 termios.h \
12051 unistd.h \
12052
12053 do
12054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12055 echo "$as_me:12055: checking for $ac_header" >&5
12056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12058   echo $ECHO_N "(cached) $ECHO_C" >&6
12059 else
12060   cat >conftest.$ac_ext <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12063 #include <$ac_header>
12064 _ACEOF
12065 if { (eval echo "$as_me:12065: \"$ac_cpp conftest.$ac_ext\"") >&5
12066   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12067   ac_status=$?
12068   egrep -v '^ *\+' conftest.er1 >conftest.err
12069   rm -f conftest.er1
12070   cat conftest.err >&5
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit $ac_status); } >/dev/null; then
12073   if test -s conftest.err; then
12074     ac_cpp_err=$ac_c_preproc_warn_flag
12075   else
12076     ac_cpp_err=
12077   fi
12078 else
12079   ac_cpp_err=yes
12080 fi
12081 if test -z "$ac_cpp_err"; then
12082   eval "$as_ac_Header=yes"
12083 else
12084   echo "$as_me: failed program was:" >&5
12085   cat conftest.$ac_ext >&5
12086   eval "$as_ac_Header=no"
12087 fi
12088 rm -f conftest.err conftest.$ac_ext
12089 fi
12090 echo "$as_me:12090: result: `eval echo '${'$as_ac_Header'}'`" >&5
12091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12092 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12093   cat >>confdefs.h <<EOF
12094 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12095 EOF
12096
12097 fi
12098 done
12099
12100 if test "$ISC" = yes ; then
12101
12102 for ac_header in sys/termio.h
12103 do
12104 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12105 echo "$as_me:12105: checking for $ac_header" >&5
12106 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12107 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12108   echo $ECHO_N "(cached) $ECHO_C" >&6
12109 else
12110   cat >conftest.$ac_ext <<_ACEOF
12111 #line 12111 "configure"
12112 #include "confdefs.h"
12113 #include <$ac_header>
12114 _ACEOF
12115 if { (eval echo "$as_me:12115: \"$ac_cpp conftest.$ac_ext\"") >&5
12116   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12117   ac_status=$?
12118   egrep -v '^ *\+' conftest.er1 >conftest.err
12119   rm -f conftest.er1
12120   cat conftest.err >&5
12121   echo "$as_me:12121: \$? = $ac_status" >&5
12122   (exit $ac_status); } >/dev/null; then
12123   if test -s conftest.err; then
12124     ac_cpp_err=$ac_c_preproc_warn_flag
12125   else
12126     ac_cpp_err=
12127   fi
12128 else
12129   ac_cpp_err=yes
12130 fi
12131 if test -z "$ac_cpp_err"; then
12132   eval "$as_ac_Header=yes"
12133 else
12134   echo "$as_me: failed program was:" >&5
12135   cat conftest.$ac_ext >&5
12136   eval "$as_ac_Header=no"
12137 fi
12138 rm -f conftest.err conftest.$ac_ext
12139 fi
12140 echo "$as_me:12140: result: `eval echo '${'$as_ac_Header'}'`" >&5
12141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12143   cat >>confdefs.h <<EOF
12144 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12145 EOF
12146
12147 fi
12148 done
12149
12150 fi
12151 if test "$ac_cv_header_termios_h" = yes ; then
12152         case "$CFLAGS $CPPFLAGS" in
12153         *-D_POSIX_SOURCE*)
12154                 termios_bad=dunno ;;
12155         *)      termios_bad=maybe ;;
12156         esac
12157         if test "$termios_bad" = maybe ; then
12158         echo "$as_me:12158: checking whether termios.h needs _POSIX_SOURCE" >&5
12159 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12160         cat >conftest.$ac_ext <<_ACEOF
12161 #line 12161 "configure"
12162 #include "confdefs.h"
12163 #include <termios.h>
12164 int
12165 main ()
12166 {
12167 struct termios foo; int x = foo.c_iflag
12168   ;
12169   return 0;
12170 }
12171 _ACEOF
12172 rm -f conftest.$ac_objext
12173 if { (eval echo "$as_me:12173: \"$ac_compile\"") >&5
12174   (eval $ac_compile) 2>&5
12175   ac_status=$?
12176   echo "$as_me:12176: \$? = $ac_status" >&5
12177   (exit $ac_status); } &&
12178          { ac_try='test -s conftest.$ac_objext'
12179   { (eval echo "$as_me:12179: \"$ac_try\"") >&5
12180   (eval $ac_try) 2>&5
12181   ac_status=$?
12182   echo "$as_me:12182: \$? = $ac_status" >&5
12183   (exit $ac_status); }; }; then
12184   termios_bad=no
12185 else
12186   echo "$as_me: failed program was:" >&5
12187 cat conftest.$ac_ext >&5
12188
12189                 cat >conftest.$ac_ext <<_ACEOF
12190 #line 12190 "configure"
12191 #include "confdefs.h"
12192
12193 #define _POSIX_SOURCE
12194 #include <termios.h>
12195 int
12196 main ()
12197 {
12198 struct termios foo; int x = foo.c_iflag
12199   ;
12200   return 0;
12201 }
12202 _ACEOF
12203 rm -f conftest.$ac_objext
12204 if { (eval echo "$as_me:12204: \"$ac_compile\"") >&5
12205   (eval $ac_compile) 2>&5
12206   ac_status=$?
12207   echo "$as_me:12207: \$? = $ac_status" >&5
12208   (exit $ac_status); } &&
12209          { ac_try='test -s conftest.$ac_objext'
12210   { (eval echo "$as_me:12210: \"$ac_try\"") >&5
12211   (eval $ac_try) 2>&5
12212   ac_status=$?
12213   echo "$as_me:12213: \$? = $ac_status" >&5
12214   (exit $ac_status); }; }; then
12215   termios_bad=unknown
12216 else
12217   echo "$as_me: failed program was:" >&5
12218 cat conftest.$ac_ext >&5
12219 termios_bad=yes cat >>confdefs.h <<\EOF
12220 #define SVR4_TERMIO 1
12221 EOF
12222
12223 fi
12224 rm -f conftest.$ac_objext conftest.$ac_ext
12225
12226 fi
12227 rm -f conftest.$ac_objext conftest.$ac_ext
12228         echo "$as_me:12228: result: $termios_bad" >&5
12229 echo "${ECHO_T}$termios_bad" >&6
12230         fi
12231 fi
12232
12233 echo "$as_me:12233: checking for tcgetattr" >&5
12234 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12235 if test "${cf_cv_have_tcgetattr+set}" = set; then
12236   echo $ECHO_N "(cached) $ECHO_C" >&6
12237 else
12238
12239 cat >conftest.$ac_ext <<_ACEOF
12240 #line 12240 "configure"
12241 #include "confdefs.h"
12242
12243 #include <sys/types.h>
12244 #ifdef HAVE_UNISTD_H
12245 #include <unistd.h>
12246 #endif
12247 #ifdef HAVE_TERMIOS_H
12248 #include <termios.h>
12249 #define TTY struct termios
12250 #else
12251 #ifdef HAVE_TERMIO_H
12252 #include <termio.h>
12253 #define TTY struct termio
12254 #endif
12255 #endif
12256
12257 int
12258 main ()
12259 {
12260
12261 TTY foo;
12262 tcgetattr(1, &foo);
12263   ;
12264   return 0;
12265 }
12266 _ACEOF
12267 rm -f conftest.$ac_objext conftest$ac_exeext
12268 if { (eval echo "$as_me:12268: \"$ac_link\"") >&5
12269   (eval $ac_link) 2>&5
12270   ac_status=$?
12271   echo "$as_me:12271: \$? = $ac_status" >&5
12272   (exit $ac_status); } &&
12273          { ac_try='test -s conftest$ac_exeext'
12274   { (eval echo "$as_me:12274: \"$ac_try\"") >&5
12275   (eval $ac_try) 2>&5
12276   ac_status=$?
12277   echo "$as_me:12277: \$? = $ac_status" >&5
12278   (exit $ac_status); }; }; then
12279   cf_cv_have_tcgetattr=yes
12280 else
12281   echo "$as_me: failed program was:" >&5
12282 cat conftest.$ac_ext >&5
12283 cf_cv_have_tcgetattr=no
12284 fi
12285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12286 fi
12287 echo "$as_me:12287: result: $cf_cv_have_tcgetattr" >&5
12288 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12289 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12290 #define HAVE_TCGETATTR 1
12291 EOF
12292
12293 echo "$as_me:12293: checking for vsscanf function or workaround" >&5
12294 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12295 if test "${cf_cv_func_vsscanf+set}" = set; then
12296   echo $ECHO_N "(cached) $ECHO_C" >&6
12297 else
12298
12299 cat >conftest.$ac_ext <<_ACEOF
12300 #line 12300 "configure"
12301 #include "confdefs.h"
12302
12303 #include <stdarg.h>
12304 #include <stdio.h>
12305 int
12306 main ()
12307 {
12308
12309         va_list ap;
12310         vsscanf("from", "%d", ap)
12311   ;
12312   return 0;
12313 }
12314 _ACEOF
12315 rm -f conftest.$ac_objext conftest$ac_exeext
12316 if { (eval echo "$as_me:12316: \"$ac_link\"") >&5
12317   (eval $ac_link) 2>&5
12318   ac_status=$?
12319   echo "$as_me:12319: \$? = $ac_status" >&5
12320   (exit $ac_status); } &&
12321          { ac_try='test -s conftest$ac_exeext'
12322   { (eval echo "$as_me:12322: \"$ac_try\"") >&5
12323   (eval $ac_try) 2>&5
12324   ac_status=$?
12325   echo "$as_me:12325: \$? = $ac_status" >&5
12326   (exit $ac_status); }; }; then
12327   cf_cv_func_vsscanf=vsscanf
12328 else
12329   echo "$as_me: failed program was:" >&5
12330 cat conftest.$ac_ext >&5
12331
12332 cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335
12336 #include <stdarg.h>
12337 #include <stdio.h>
12338 int
12339 main ()
12340 {
12341
12342     FILE strbuf;
12343     char *str = "from";
12344
12345     strbuf._flag = _IOREAD;
12346     strbuf._ptr = strbuf._base = (unsigned char *) str;
12347     strbuf._cnt = strlen(str);
12348     strbuf._file = _NFILE;
12349     return (vfscanf(&strbuf, "%d", ap))
12350   ;
12351   return 0;
12352 }
12353 _ACEOF
12354 rm -f conftest.$ac_objext conftest$ac_exeext
12355 if { (eval echo "$as_me:12355: \"$ac_link\"") >&5
12356   (eval $ac_link) 2>&5
12357   ac_status=$?
12358   echo "$as_me:12358: \$? = $ac_status" >&5
12359   (exit $ac_status); } &&
12360          { ac_try='test -s conftest$ac_exeext'
12361   { (eval echo "$as_me:12361: \"$ac_try\"") >&5
12362   (eval $ac_try) 2>&5
12363   ac_status=$?
12364   echo "$as_me:12364: \$? = $ac_status" >&5
12365   (exit $ac_status); }; }; then
12366   cf_cv_func_vsscanf=vfscanf
12367 else
12368   echo "$as_me: failed program was:" >&5
12369 cat conftest.$ac_ext >&5
12370
12371 cat >conftest.$ac_ext <<_ACEOF
12372 #line 12372 "configure"
12373 #include "confdefs.h"
12374
12375 #include <stdarg.h>
12376 #include <stdio.h>
12377 int
12378 main ()
12379 {
12380
12381     FILE strbuf;
12382     char *str = "from";
12383
12384     strbuf._flag = _IOREAD;
12385     strbuf._ptr = strbuf._base = (unsigned char *) str;
12386     strbuf._cnt = strlen(str);
12387     strbuf._file = _NFILE;
12388     return (_doscan(&strbuf, "%d", ap))
12389   ;
12390   return 0;
12391 }
12392 _ACEOF
12393 rm -f conftest.$ac_objext conftest$ac_exeext
12394 if { (eval echo "$as_me:12394: \"$ac_link\"") >&5
12395   (eval $ac_link) 2>&5
12396   ac_status=$?
12397   echo "$as_me:12397: \$? = $ac_status" >&5
12398   (exit $ac_status); } &&
12399          { ac_try='test -s conftest$ac_exeext'
12400   { (eval echo "$as_me:12400: \"$ac_try\"") >&5
12401   (eval $ac_try) 2>&5
12402   ac_status=$?
12403   echo "$as_me:12403: \$? = $ac_status" >&5
12404   (exit $ac_status); }; }; then
12405   cf_cv_func_vsscanf=_doscan
12406 else
12407   echo "$as_me: failed program was:" >&5
12408 cat conftest.$ac_ext >&5
12409
12410 cf_cv_func_vsscanf=no
12411 fi
12412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12413 fi
12414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12415 fi
12416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12417 fi
12418 echo "$as_me:12418: result: $cf_cv_func_vsscanf" >&5
12419 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12420
12421 case $cf_cv_func_vsscanf in #(vi
12422 vsscanf) cat >>confdefs.h <<\EOF
12423 #define HAVE_VSSCANF 1
12424 EOF
12425 ;; #(vi
12426 vfscanf) cat >>confdefs.h <<\EOF
12427 #define HAVE_VFSCANF 1
12428 EOF
12429 ;; #(vi
12430 _doscan) cat >>confdefs.h <<\EOF
12431 #define HAVE__DOSCAN 1
12432 EOF
12433 ;;
12434 esac
12435
12436 echo "$as_me:12436: checking for working mkstemp" >&5
12437 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12438 if test "${cf_cv_func_mkstemp+set}" = set; then
12439   echo $ECHO_N "(cached) $ECHO_C" >&6
12440 else
12441
12442 rm -f conftest*
12443 if test "$cross_compiling" = yes; then
12444   echo "$as_me:12444: checking for mkstemp" >&5
12445 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12446 if test "${ac_cv_func_mkstemp+set}" = set; then
12447   echo $ECHO_N "(cached) $ECHO_C" >&6
12448 else
12449   cat >conftest.$ac_ext <<_ACEOF
12450 #line 12450 "configure"
12451 #include "confdefs.h"
12452 /* System header to define __stub macros and hopefully few prototypes,
12453     which can conflict with char mkstemp (); below.  */
12454 #include <assert.h>
12455 /* Override any gcc2 internal prototype to avoid an error.  */
12456 #ifdef __cplusplus
12457 extern "C"
12458 #endif
12459 /* We use char because int might match the return type of a gcc2
12460    builtin and then its argument prototype would still apply.  */
12461 char mkstemp ();
12462 char (*f) ();
12463
12464 int
12465 main ()
12466 {
12467 /* The GNU C library defines this for functions which it implements
12468     to always fail with ENOSYS.  Some functions are actually named
12469     something starting with __ and the normal name is an alias.  */
12470 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12471 choke me
12472 #else
12473 f = mkstemp;
12474 #endif
12475
12476   ;
12477   return 0;
12478 }
12479 _ACEOF
12480 rm -f conftest.$ac_objext conftest$ac_exeext
12481 if { (eval echo "$as_me:12481: \"$ac_link\"") >&5
12482   (eval $ac_link) 2>&5
12483   ac_status=$?
12484   echo "$as_me:12484: \$? = $ac_status" >&5
12485   (exit $ac_status); } &&
12486          { ac_try='test -s conftest$ac_exeext'
12487   { (eval echo "$as_me:12487: \"$ac_try\"") >&5
12488   (eval $ac_try) 2>&5
12489   ac_status=$?
12490   echo "$as_me:12490: \$? = $ac_status" >&5
12491   (exit $ac_status); }; }; then
12492   ac_cv_func_mkstemp=yes
12493 else
12494   echo "$as_me: failed program was:" >&5
12495 cat conftest.$ac_ext >&5
12496 ac_cv_func_mkstemp=no
12497 fi
12498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12499 fi
12500 echo "$as_me:12500: result: $ac_cv_func_mkstemp" >&5
12501 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12502
12503 else
12504   cat >conftest.$ac_ext <<_ACEOF
12505 #line 12505 "configure"
12506 #include "confdefs.h"
12507
12508 #include <sys/types.h>
12509 #include <stdlib.h>
12510 #include <stdio.h>
12511 #include <string.h>
12512 #include <sys/stat.h>
12513 int main()
12514 {
12515         char *tmpl = "conftestXXXXXX";
12516         char name[2][80];
12517         int n;
12518         int result = 0;
12519         int fd;
12520         struct stat sb;
12521
12522         umask(077);
12523         for (n = 0; n < 2; ++n) {
12524                 strcpy(name[n], tmpl);
12525                 if ((fd = mkstemp(name[n])) >= 0) {
12526                         if (!strcmp(name[n], tmpl)
12527                          || stat(name[n], &sb) != 0
12528                          || (sb.st_mode & S_IFMT) != S_IFREG
12529                          || (sb.st_mode & 077) != 0) {
12530                                 result = 1;
12531                         }
12532                         close(fd);
12533                 }
12534         }
12535         if (result == 0
12536          && !strcmp(name[0], name[1]))
12537                 result = 1;
12538         ${cf_cv_main_return:-return}(result);
12539 }
12540
12541 _ACEOF
12542 rm -f conftest$ac_exeext
12543 if { (eval echo "$as_me:12543: \"$ac_link\"") >&5
12544   (eval $ac_link) 2>&5
12545   ac_status=$?
12546   echo "$as_me:12546: \$? = $ac_status" >&5
12547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12548   { (eval echo "$as_me:12548: \"$ac_try\"") >&5
12549   (eval $ac_try) 2>&5
12550   ac_status=$?
12551   echo "$as_me:12551: \$? = $ac_status" >&5
12552   (exit $ac_status); }; }; then
12553   cf_cv_func_mkstemp=yes
12554
12555 else
12556   echo "$as_me: program exited with status $ac_status" >&5
12557 echo "$as_me: failed program was:" >&5
12558 cat conftest.$ac_ext >&5
12559 cf_cv_func_mkstemp=no
12560
12561 fi
12562 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12563 fi
12564
12565 fi
12566 echo "$as_me:12566: result: $cf_cv_func_mkstemp" >&5
12567 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12568 if test "$cf_cv_func_mkstemp" = yes ; then
12569         cat >>confdefs.h <<\EOF
12570 #define HAVE_MKSTEMP 1
12571 EOF
12572
12573 fi
12574
12575 # setup for prototype of fallback for vsscanf()
12576
12577 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12578         HAVE_VSSCANF=1
12579 else
12580         HAVE_VSSCANF=0
12581 fi
12582
12583 if test "$cross_compiling" = yes ; then
12584         { echo "$as_me:12584: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12585 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12586 else
12587         echo "$as_me:12587: checking whether setvbuf arguments are reversed" >&5
12588 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12589 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12590   echo $ECHO_N "(cached) $ECHO_C" >&6
12591 else
12592   if test "$cross_compiling" = yes; then
12593   { { echo "$as_me:12593: error: cannot run test program while cross compiling" >&5
12594 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12595    { (exit 1); exit 1; }; }
12596 else
12597   cat >conftest.$ac_ext <<_ACEOF
12598 #line 12598 "configure"
12599 #include "confdefs.h"
12600 #include <stdio.h>
12601 /* If setvbuf has the reversed format, exit 0. */
12602 int
12603 main ()
12604 {
12605   /* This call has the arguments reversed.
12606      A reversed system may check and see that the address of main
12607      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12608   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12609     $ac_main_return(1);
12610   putc('\r', stdout);
12611   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12612 }
12613 _ACEOF
12614 rm -f conftest$ac_exeext
12615 if { (eval echo "$as_me:12615: \"$ac_link\"") >&5
12616   (eval $ac_link) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12620   { (eval echo "$as_me:12620: \"$ac_try\"") >&5
12621   (eval $ac_try) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit $ac_status); }; }; then
12625   ac_cv_func_setvbuf_reversed=yes
12626 else
12627   echo "$as_me: program exited with status $ac_status" >&5
12628 echo "$as_me: failed program was:" >&5
12629 cat conftest.$ac_ext >&5
12630 ac_cv_func_setvbuf_reversed=no
12631 fi
12632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12633 fi
12634 rm -f core core.* *.core
12635 fi
12636 echo "$as_me:12636: result: $ac_cv_func_setvbuf_reversed" >&5
12637 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12638 if test $ac_cv_func_setvbuf_reversed = yes; then
12639
12640 cat >>confdefs.h <<\EOF
12641 #define SETVBUF_REVERSED 1
12642 EOF
12643
12644 fi
12645
12646 fi
12647 echo "$as_me:12647: checking return type of signal handlers" >&5
12648 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12649 if test "${ac_cv_type_signal+set}" = set; then
12650   echo $ECHO_N "(cached) $ECHO_C" >&6
12651 else
12652   cat >conftest.$ac_ext <<_ACEOF
12653 #line 12653 "configure"
12654 #include "confdefs.h"
12655 #include <sys/types.h>
12656 #include <signal.h>
12657 #ifdef signal
12658 # undef signal
12659 #endif
12660 #ifdef __cplusplus
12661 extern "C" void (*signal (int, void (*)(int)))(int);
12662 #else
12663 void (*signal ()) ();
12664 #endif
12665
12666 int
12667 main ()
12668 {
12669 int i;
12670   ;
12671   return 0;
12672 }
12673 _ACEOF
12674 rm -f conftest.$ac_objext
12675 if { (eval echo "$as_me:12675: \"$ac_compile\"") >&5
12676   (eval $ac_compile) 2>&5
12677   ac_status=$?
12678   echo "$as_me:12678: \$? = $ac_status" >&5
12679   (exit $ac_status); } &&
12680          { ac_try='test -s conftest.$ac_objext'
12681   { (eval echo "$as_me:12681: \"$ac_try\"") >&5
12682   (eval $ac_try) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); }; }; then
12686   ac_cv_type_signal=void
12687 else
12688   echo "$as_me: failed program was:" >&5
12689 cat conftest.$ac_ext >&5
12690 ac_cv_type_signal=int
12691 fi
12692 rm -f conftest.$ac_objext conftest.$ac_ext
12693 fi
12694 echo "$as_me:12694: result: $ac_cv_type_signal" >&5
12695 echo "${ECHO_T}$ac_cv_type_signal" >&6
12696
12697 cat >>confdefs.h <<EOF
12698 #define RETSIGTYPE $ac_cv_type_signal
12699 EOF
12700
12701 echo "$as_me:12701: checking for type sigaction_t" >&5
12702 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12703 if test "${cf_cv_type_sigaction+set}" = set; then
12704   echo $ECHO_N "(cached) $ECHO_C" >&6
12705 else
12706
12707         cat >conftest.$ac_ext <<_ACEOF
12708 #line 12708 "configure"
12709 #include "confdefs.h"
12710
12711 #include <signal.h>
12712 int
12713 main ()
12714 {
12715 sigaction_t x
12716   ;
12717   return 0;
12718 }
12719 _ACEOF
12720 rm -f conftest.$ac_objext
12721 if { (eval echo "$as_me:12721: \"$ac_compile\"") >&5
12722   (eval $ac_compile) 2>&5
12723   ac_status=$?
12724   echo "$as_me:12724: \$? = $ac_status" >&5
12725   (exit $ac_status); } &&
12726          { ac_try='test -s conftest.$ac_objext'
12727   { (eval echo "$as_me:12727: \"$ac_try\"") >&5
12728   (eval $ac_try) 2>&5
12729   ac_status=$?
12730   echo "$as_me:12730: \$? = $ac_status" >&5
12731   (exit $ac_status); }; }; then
12732   cf_cv_type_sigaction=yes
12733 else
12734   echo "$as_me: failed program was:" >&5
12735 cat conftest.$ac_ext >&5
12736 cf_cv_type_sigaction=no
12737 fi
12738 rm -f conftest.$ac_objext conftest.$ac_ext
12739 fi
12740
12741 echo "$as_me:12741: result: $cf_cv_type_sigaction" >&5
12742 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12743 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12744 #define HAVE_TYPE_SIGACTION 1
12745 EOF
12746
12747 echo "$as_me:12747: checking declaration of size-change" >&5
12748 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12749 if test "${cf_cv_sizechange+set}" = set; then
12750   echo $ECHO_N "(cached) $ECHO_C" >&6
12751 else
12752
12753     cf_cv_sizechange=unknown
12754     cf_save_CPPFLAGS="$CPPFLAGS"
12755
12756 for cf_opts in "" "NEED_PTEM_H"
12757 do
12758
12759     CPPFLAGS="$cf_save_CPPFLAGS"
12760     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12761     cat >conftest.$ac_ext <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764 #include <sys/types.h>
12765 #ifdef HAVE_TERMIOS_H
12766 #include <termios.h>
12767 #else
12768 #ifdef HAVE_TERMIO_H
12769 #include <termio.h>
12770 #endif
12771 #endif
12772 #ifdef NEED_PTEM_H
12773 /* This is a workaround for SCO:  they neglected to define struct winsize in
12774  * termios.h -- it's only in termio.h and ptem.h
12775  */
12776 #include        <sys/stream.h>
12777 #include        <sys/ptem.h>
12778 #endif
12779 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12780 #include <sys/ioctl.h>
12781 #endif
12782
12783 int
12784 main ()
12785 {
12786
12787 #ifdef TIOCGSIZE
12788         struct ttysize win;     /* FIXME: what system is this? */
12789         int y = win.ts_lines;
12790         int x = win.ts_cols;
12791 #else
12792 #ifdef TIOCGWINSZ
12793         struct winsize win;
12794         int y = win.ws_row;
12795         int x = win.ws_col;
12796 #else
12797         no TIOCGSIZE or TIOCGWINSZ
12798 #endif /* TIOCGWINSZ */
12799 #endif /* TIOCGSIZE */
12800
12801   ;
12802   return 0;
12803 }
12804 _ACEOF
12805 rm -f conftest.$ac_objext
12806 if { (eval echo "$as_me:12806: \"$ac_compile\"") >&5
12807   (eval $ac_compile) 2>&5
12808   ac_status=$?
12809   echo "$as_me:12809: \$? = $ac_status" >&5
12810   (exit $ac_status); } &&
12811          { ac_try='test -s conftest.$ac_objext'
12812   { (eval echo "$as_me:12812: \"$ac_try\"") >&5
12813   (eval $ac_try) 2>&5
12814   ac_status=$?
12815   echo "$as_me:12815: \$? = $ac_status" >&5
12816   (exit $ac_status); }; }; then
12817   cf_cv_sizechange=yes
12818 else
12819   echo "$as_me: failed program was:" >&5
12820 cat conftest.$ac_ext >&5
12821 cf_cv_sizechange=no
12822 fi
12823 rm -f conftest.$ac_objext conftest.$ac_ext
12824
12825         CPPFLAGS="$cf_save_CPPFLAGS"
12826         if test "$cf_cv_sizechange" = yes ; then
12827                 echo "size-change succeeded ($cf_opts)" >&5
12828                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12829                 break
12830         fi
12831 done
12832
12833 fi
12834 echo "$as_me:12834: result: $cf_cv_sizechange" >&5
12835 echo "${ECHO_T}$cf_cv_sizechange" >&6
12836 if test "$cf_cv_sizechange" != no ; then
12837         cat >>confdefs.h <<\EOF
12838 #define HAVE_SIZECHANGE 1
12839 EOF
12840
12841         case $cf_cv_sizechange in #(vi
12842         NEED*)
12843                 cat >>confdefs.h <<EOF
12844 #define $cf_cv_sizechange  1
12845 EOF
12846
12847                 ;;
12848         esac
12849 fi
12850
12851 echo "$as_me:12851: checking for memmove" >&5
12852 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12853 if test "${ac_cv_func_memmove+set}" = set; then
12854   echo $ECHO_N "(cached) $ECHO_C" >&6
12855 else
12856   cat >conftest.$ac_ext <<_ACEOF
12857 #line 12857 "configure"
12858 #include "confdefs.h"
12859 /* System header to define __stub macros and hopefully few prototypes,
12860     which can conflict with char memmove (); below.  */
12861 #include <assert.h>
12862 /* Override any gcc2 internal prototype to avoid an error.  */
12863 #ifdef __cplusplus
12864 extern "C"
12865 #endif
12866 /* We use char because int might match the return type of a gcc2
12867    builtin and then its argument prototype would still apply.  */
12868 char memmove ();
12869 char (*f) ();
12870
12871 int
12872 main ()
12873 {
12874 /* The GNU C library defines this for functions which it implements
12875     to always fail with ENOSYS.  Some functions are actually named
12876     something starting with __ and the normal name is an alias.  */
12877 #if defined (__stub_memmove) || defined (__stub___memmove)
12878 choke me
12879 #else
12880 f = memmove;
12881 #endif
12882
12883   ;
12884   return 0;
12885 }
12886 _ACEOF
12887 rm -f conftest.$ac_objext conftest$ac_exeext
12888 if { (eval echo "$as_me:12888: \"$ac_link\"") >&5
12889   (eval $ac_link) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); } &&
12893          { ac_try='test -s conftest$ac_exeext'
12894   { (eval echo "$as_me:12894: \"$ac_try\"") >&5
12895   (eval $ac_try) 2>&5
12896   ac_status=$?
12897   echo "$as_me:12897: \$? = $ac_status" >&5
12898   (exit $ac_status); }; }; then
12899   ac_cv_func_memmove=yes
12900 else
12901   echo "$as_me: failed program was:" >&5
12902 cat conftest.$ac_ext >&5
12903 ac_cv_func_memmove=no
12904 fi
12905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12906 fi
12907 echo "$as_me:12907: result: $ac_cv_func_memmove" >&5
12908 echo "${ECHO_T}$ac_cv_func_memmove" >&6
12909 if test $ac_cv_func_memmove = yes; then
12910   :
12911 else
12912
12913 echo "$as_me:12913: checking for bcopy" >&5
12914 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12915 if test "${ac_cv_func_bcopy+set}" = set; then
12916   echo $ECHO_N "(cached) $ECHO_C" >&6
12917 else
12918   cat >conftest.$ac_ext <<_ACEOF
12919 #line 12919 "configure"
12920 #include "confdefs.h"
12921 /* System header to define __stub macros and hopefully few prototypes,
12922     which can conflict with char bcopy (); below.  */
12923 #include <assert.h>
12924 /* Override any gcc2 internal prototype to avoid an error.  */
12925 #ifdef __cplusplus
12926 extern "C"
12927 #endif
12928 /* We use char because int might match the return type of a gcc2
12929    builtin and then its argument prototype would still apply.  */
12930 char bcopy ();
12931 char (*f) ();
12932
12933 int
12934 main ()
12935 {
12936 /* The GNU C library defines this for functions which it implements
12937     to always fail with ENOSYS.  Some functions are actually named
12938     something starting with __ and the normal name is an alias.  */
12939 #if defined (__stub_bcopy) || defined (__stub___bcopy)
12940 choke me
12941 #else
12942 f = bcopy;
12943 #endif
12944
12945   ;
12946   return 0;
12947 }
12948 _ACEOF
12949 rm -f conftest.$ac_objext conftest$ac_exeext
12950 if { (eval echo "$as_me:12950: \"$ac_link\"") >&5
12951   (eval $ac_link) 2>&5
12952   ac_status=$?
12953   echo "$as_me:12953: \$? = $ac_status" >&5
12954   (exit $ac_status); } &&
12955          { ac_try='test -s conftest$ac_exeext'
12956   { (eval echo "$as_me:12956: \"$ac_try\"") >&5
12957   (eval $ac_try) 2>&5
12958   ac_status=$?
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit $ac_status); }; }; then
12961   ac_cv_func_bcopy=yes
12962 else
12963   echo "$as_me: failed program was:" >&5
12964 cat conftest.$ac_ext >&5
12965 ac_cv_func_bcopy=no
12966 fi
12967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12968 fi
12969 echo "$as_me:12969: result: $ac_cv_func_bcopy" >&5
12970 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
12971 if test $ac_cv_func_bcopy = yes; then
12972
12973         echo "$as_me:12973: checking if bcopy does overlapping moves" >&5
12974 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
12975 if test "${cf_cv_good_bcopy+set}" = set; then
12976   echo $ECHO_N "(cached) $ECHO_C" >&6
12977 else
12978
12979                 if test "$cross_compiling" = yes; then
12980   cf_cv_good_bcopy=unknown
12981 else
12982   cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985
12986 int main() {
12987         static char data[] = "abcdefghijklmnopqrstuwwxyz";
12988         char temp[40];
12989         bcopy(data, temp, sizeof(data));
12990         bcopy(temp+10, temp, 15);
12991         bcopy(temp+5, temp+15, 10);
12992         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
12993 }
12994
12995 _ACEOF
12996 rm -f conftest$ac_exeext
12997 if { (eval echo "$as_me:12997: \"$ac_link\"") >&5
12998   (eval $ac_link) 2>&5
12999   ac_status=$?
13000   echo "$as_me:13000: \$? = $ac_status" >&5
13001   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13002   { (eval echo "$as_me:13002: \"$ac_try\"") >&5
13003   (eval $ac_try) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit $ac_status); }; }; then
13007   cf_cv_good_bcopy=yes
13008 else
13009   echo "$as_me: program exited with status $ac_status" >&5
13010 echo "$as_me: failed program was:" >&5
13011 cat conftest.$ac_ext >&5
13012 cf_cv_good_bcopy=no
13013 fi
13014 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13015 fi
13016
13017 fi
13018 echo "$as_me:13018: result: $cf_cv_good_bcopy" >&5
13019 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13020
13021 else
13022   cf_cv_good_bcopy=no
13023 fi
13024
13025         if test "$cf_cv_good_bcopy" = yes ; then
13026                 cat >>confdefs.h <<\EOF
13027 #define USE_OK_BCOPY 1
13028 EOF
13029
13030         else
13031                 cat >>confdefs.h <<\EOF
13032 #define USE_MY_MEMMOVE 1
13033 EOF
13034
13035         fi
13036
13037 fi
13038
13039 echo "$as_me:13039: checking if poll really works" >&5
13040 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13041 if test "${cf_cv_working_poll+set}" = set; then
13042   echo $ECHO_N "(cached) $ECHO_C" >&6
13043 else
13044
13045 if test "$cross_compiling" = yes; then
13046   cf_cv_working_poll=unknown
13047 else
13048   cat >conftest.$ac_ext <<_ACEOF
13049 #line 13049 "configure"
13050 #include "confdefs.h"
13051
13052 #include <stdio.h>
13053 #ifdef HAVE_POLL_H
13054 #include <poll.h>
13055 #else
13056 #include <sys/poll.h>
13057 #endif
13058 int main() {
13059         struct pollfd myfds;
13060         int ret;
13061
13062         myfds.fd = 0;
13063         myfds.events = POLLIN;
13064
13065         ret = poll(&myfds, 1, 100);
13066         ${cf_cv_main_return:-return}(ret != 0);
13067 }
13068 _ACEOF
13069 rm -f conftest$ac_exeext
13070 if { (eval echo "$as_me:13070: \"$ac_link\"") >&5
13071   (eval $ac_link) 2>&5
13072   ac_status=$?
13073   echo "$as_me:13073: \$? = $ac_status" >&5
13074   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13075   { (eval echo "$as_me:13075: \"$ac_try\"") >&5
13076   (eval $ac_try) 2>&5
13077   ac_status=$?
13078   echo "$as_me:13078: \$? = $ac_status" >&5
13079   (exit $ac_status); }; }; then
13080   cf_cv_working_poll=yes
13081 else
13082   echo "$as_me: program exited with status $ac_status" >&5
13083 echo "$as_me: failed program was:" >&5
13084 cat conftest.$ac_ext >&5
13085 cf_cv_working_poll=no
13086 fi
13087 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13088 fi
13089 fi
13090 echo "$as_me:13090: result: $cf_cv_working_poll" >&5
13091 echo "${ECHO_T}$cf_cv_working_poll" >&6
13092 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13093 #define HAVE_WORKING_POLL 1
13094 EOF
13095
13096 if test "$with_hashed_db" != no ; then
13097         cat >>confdefs.h <<\EOF
13098 #define USE_HASHED_DB 1
13099 EOF
13100
13101 echo "$as_me:13101: checking for db.h" >&5
13102 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13103 if test "${ac_cv_header_db_h+set}" = set; then
13104   echo $ECHO_N "(cached) $ECHO_C" >&6
13105 else
13106   cat >conftest.$ac_ext <<_ACEOF
13107 #line 13107 "configure"
13108 #include "confdefs.h"
13109 #include <db.h>
13110 _ACEOF
13111 if { (eval echo "$as_me:13111: \"$ac_cpp conftest.$ac_ext\"") >&5
13112   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13113   ac_status=$?
13114   egrep -v '^ *\+' conftest.er1 >conftest.err
13115   rm -f conftest.er1
13116   cat conftest.err >&5
13117   echo "$as_me:13117: \$? = $ac_status" >&5
13118   (exit $ac_status); } >/dev/null; then
13119   if test -s conftest.err; then
13120     ac_cpp_err=$ac_c_preproc_warn_flag
13121   else
13122     ac_cpp_err=
13123   fi
13124 else
13125   ac_cpp_err=yes
13126 fi
13127 if test -z "$ac_cpp_err"; then
13128   ac_cv_header_db_h=yes
13129 else
13130   echo "$as_me: failed program was:" >&5
13131   cat conftest.$ac_ext >&5
13132   ac_cv_header_db_h=no
13133 fi
13134 rm -f conftest.err conftest.$ac_ext
13135 fi
13136 echo "$as_me:13136: result: $ac_cv_header_db_h" >&5
13137 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13138 if test $ac_cv_header_db_h = yes; then
13139
13140 echo "$as_me:13140: checking for version of db" >&5
13141 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13142 if test "${cf_cv_hashed_db_version+set}" = set; then
13143   echo $ECHO_N "(cached) $ECHO_C" >&6
13144 else
13145
13146 cf_cv_hashed_db_version=unknown
13147
13148 for cf_db_version in 1 2 3 4
13149 do
13150
13151 echo "(line 13151) testing checking for db version $cf_db_version ..." 1>&5
13152
13153         cat >conftest.$ac_ext <<_ACEOF
13154 #line 13154 "configure"
13155 #include "confdefs.h"
13156
13157 $ac_includes_default
13158 #include <db.h>
13159
13160 #ifdef DB_VERSION_MAJOR
13161         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13162 #if $cf_db_version == DB_VERSION_MAJOR
13163         /* ok */
13164 #else
13165         make an error
13166 #endif
13167 #else
13168 #if $cf_db_version == 1
13169         /* ok: assuming this is DB 1.8.5 */
13170 #else
13171         make an error
13172 #endif
13173 #endif
13174
13175 int
13176 main ()
13177 {
13178 DBT *foo = 0
13179   ;
13180   return 0;
13181 }
13182 _ACEOF
13183 rm -f conftest.$ac_objext
13184 if { (eval echo "$as_me:13184: \"$ac_compile\"") >&5
13185   (eval $ac_compile) 2>&5
13186   ac_status=$?
13187   echo "$as_me:13187: \$? = $ac_status" >&5
13188   (exit $ac_status); } &&
13189          { ac_try='test -s conftest.$ac_objext'
13190   { (eval echo "$as_me:13190: \"$ac_try\"") >&5
13191   (eval $ac_try) 2>&5
13192   ac_status=$?
13193   echo "$as_me:13193: \$? = $ac_status" >&5
13194   (exit $ac_status); }; }; then
13195
13196         cf_cv_hashed_db_version=$cf_db_version
13197         break
13198
13199 else
13200   echo "$as_me: failed program was:" >&5
13201 cat conftest.$ac_ext >&5
13202 fi
13203 rm -f conftest.$ac_objext conftest.$ac_ext
13204 done
13205
13206 fi
13207 echo "$as_me:13207: result: $cf_cv_hashed_db_version" >&5
13208 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13209
13210 if test "$cf_cv_hashed_db_version" = unknown ; then
13211         { { echo "$as_me:13211: error: Cannot determine version of db" >&5
13212 echo "$as_me: error: Cannot determine version of db" >&2;}
13213    { (exit 1); exit 1; }; }
13214 else
13215
13216 echo "$as_me:13216: checking for db libraries" >&5
13217 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13218 if test "${cf_cv_hashed_db_libs+set}" = set; then
13219   echo $ECHO_N "(cached) $ECHO_C" >&6
13220 else
13221
13222 cf_cv_hashed_db_libs=unknown
13223 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13224 do
13225         cf_save_libs="$LIBS"
13226         if test -n "$cf_db_libs"; then
13227                 LIBS="-l$cf_db_libs $LIBS"
13228         fi
13229
13230 echo "(line 13230) testing checking for library "$cf_db_libs" ..." 1>&5
13231
13232         cat >conftest.$ac_ext <<_ACEOF
13233 #line 13233 "configure"
13234 #include "confdefs.h"
13235
13236 $ac_includes_default
13237 #include <db.h>
13238
13239 int
13240 main ()
13241 {
13242
13243         char *path = "/tmp/foo";
13244 #ifdef DB_VERSION_MAJOR
13245 #if DB_VERSION_MAJOR >= 4
13246         DB *result = 0;
13247         db_create(&result, NULL, 0);
13248         result->open(result,
13249                 NULL,
13250                 path,
13251                 path,
13252                 DB_HASH,
13253                 DB_CREATE,
13254                 0644);
13255 #elif DB_VERSION_MAJOR >= 3
13256         DB *result = 0;
13257         db_create(&result, NULL, 0);
13258         result->open(result,
13259                 path,
13260                 path,
13261                 DB_HASH,
13262                 DB_CREATE,
13263                 0644);
13264 #elif DB_VERSION_MAJOR >= 2
13265         DB *result = 0;
13266         db_open(path,
13267                 DB_HASH,
13268                 DB_CREATE,
13269                 0644,
13270                 (DB_ENV *) 0,
13271                 (DB_INFO *) 0,
13272                 &result);
13273 #endif /* DB_VERSION_MAJOR */
13274 #else
13275         DB *result = dbopen(path,
13276                      2,
13277                      0644,
13278                      DB_HASH,
13279                      0);
13280 #endif
13281         ${cf_cv_main_return:-return}(result != 0)
13282
13283   ;
13284   return 0;
13285 }
13286 _ACEOF
13287 rm -f conftest.$ac_objext conftest$ac_exeext
13288 if { (eval echo "$as_me:13288: \"$ac_link\"") >&5
13289   (eval $ac_link) 2>&5
13290   ac_status=$?
13291   echo "$as_me:13291: \$? = $ac_status" >&5
13292   (exit $ac_status); } &&
13293          { ac_try='test -s conftest$ac_exeext'
13294   { (eval echo "$as_me:13294: \"$ac_try\"") >&5
13295   (eval $ac_try) 2>&5
13296   ac_status=$?
13297   echo "$as_me:13297: \$? = $ac_status" >&5
13298   (exit $ac_status); }; }; then
13299
13300         if test -n "$cf_db_libs" ; then
13301                 cf_cv_hashed_db_libs=$cf_db_libs
13302         else
13303                 cf_cv_hashed_db_libs=default
13304         fi
13305         LIBS="$cf_save_libs"
13306         break
13307
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat conftest.$ac_ext >&5
13311 fi
13312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13313         LIBS="$cf_save_libs"
13314 done
13315
13316 fi
13317 echo "$as_me:13317: result: $cf_cv_hashed_db_libs" >&5
13318 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13319
13320         if test "$cf_cv_hashed_db_libs" = unknown ; then
13321                 { { echo "$as_me:13321: error: Cannot determine library for db" >&5
13322 echo "$as_me: error: Cannot determine library for db" >&2;}
13323    { (exit 1); exit 1; }; }
13324         elif test "$cf_cv_hashed_db_libs" != default ; then
13325                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13326         fi
13327 fi
13328
13329 else
13330
13331         { { echo "$as_me:13331: error: Cannot find db.h" >&5
13332 echo "$as_me: error: Cannot find db.h" >&2;}
13333    { (exit 1); exit 1; }; }
13334
13335 fi
13336
13337 fi
13338
13339 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13340         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13341         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13342 fi
13343
13344 # Just in case, check if the C compiler has a bool type.
13345
13346 echo "$as_me:13346: checking if we should include stdbool.h" >&5
13347 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13348
13349 if test "${cf_cv_header_stdbool_h+set}" = set; then
13350   echo $ECHO_N "(cached) $ECHO_C" >&6
13351 else
13352
13353         cat >conftest.$ac_ext <<_ACEOF
13354 #line 13354 "configure"
13355 #include "confdefs.h"
13356
13357 int
13358 main ()
13359 {
13360 bool foo = false
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext
13366 if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
13367   (eval $ac_compile) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); } &&
13371          { ac_try='test -s conftest.$ac_objext'
13372   { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373   (eval $ac_try) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); }; }; then
13377   cf_cv_header_stdbool_h=0
13378 else
13379   echo "$as_me: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13381 cat >conftest.$ac_ext <<_ACEOF
13382 #line 13382 "configure"
13383 #include "confdefs.h"
13384
13385 #ifndef __BEOS__
13386 #include <stdbool.h>
13387 #endif
13388
13389 int
13390 main ()
13391 {
13392 bool foo = false
13393   ;
13394   return 0;
13395 }
13396 _ACEOF
13397 rm -f conftest.$ac_objext
13398 if { (eval echo "$as_me:13398: \"$ac_compile\"") >&5
13399   (eval $ac_compile) 2>&5
13400   ac_status=$?
13401   echo "$as_me:13401: \$? = $ac_status" >&5
13402   (exit $ac_status); } &&
13403          { ac_try='test -s conftest.$ac_objext'
13404   { (eval echo "$as_me:13404: \"$ac_try\"") >&5
13405   (eval $ac_try) 2>&5
13406   ac_status=$?
13407   echo "$as_me:13407: \$? = $ac_status" >&5
13408   (exit $ac_status); }; }; then
13409   cf_cv_header_stdbool_h=1
13410 else
13411   echo "$as_me: failed program was:" >&5
13412 cat conftest.$ac_ext >&5
13413 cf_cv_header_stdbool_h=0
13414 fi
13415 rm -f conftest.$ac_objext conftest.$ac_ext
13416 fi
13417 rm -f conftest.$ac_objext conftest.$ac_ext
13418 fi
13419
13420 if test "$cf_cv_header_stdbool_h" = 1
13421 then    echo "$as_me:13421: result: yes" >&5
13422 echo "${ECHO_T}yes" >&6
13423 else    echo "$as_me:13423: result: no" >&5
13424 echo "${ECHO_T}no" >&6
13425 fi
13426
13427 echo "$as_me:13427: checking for builtin bool type" >&5
13428 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13429
13430 if test "${cf_cv_cc_bool_type+set}" = set; then
13431   echo $ECHO_N "(cached) $ECHO_C" >&6
13432 else
13433
13434         cat >conftest.$ac_ext <<_ACEOF
13435 #line 13435 "configure"
13436 #include "confdefs.h"
13437
13438 #include <stdio.h>
13439 #include <sys/types.h>
13440
13441 int
13442 main ()
13443 {
13444 bool x = false
13445   ;
13446   return 0;
13447 }
13448 _ACEOF
13449 rm -f conftest.$ac_objext
13450 if { (eval echo "$as_me:13450: \"$ac_compile\"") >&5
13451   (eval $ac_compile) 2>&5
13452   ac_status=$?
13453   echo "$as_me:13453: \$? = $ac_status" >&5
13454   (exit $ac_status); } &&
13455          { ac_try='test -s conftest.$ac_objext'
13456   { (eval echo "$as_me:13456: \"$ac_try\"") >&5
13457   (eval $ac_try) 2>&5
13458   ac_status=$?
13459   echo "$as_me:13459: \$? = $ac_status" >&5
13460   (exit $ac_status); }; }; then
13461   cf_cv_cc_bool_type=1
13462 else
13463   echo "$as_me: failed program was:" >&5
13464 cat conftest.$ac_ext >&5
13465 cf_cv_cc_bool_type=0
13466 fi
13467 rm -f conftest.$ac_objext conftest.$ac_ext
13468
13469 fi
13470
13471 if test "$cf_cv_cc_bool_type" = 1
13472 then    echo "$as_me:13472: result: yes" >&5
13473 echo "${ECHO_T}yes" >&6
13474 else    echo "$as_me:13474: result: no" >&5
13475 echo "${ECHO_T}no" >&6
13476 fi
13477
13478 # Check for C++ compiler characteristics (and ensure that it's there!)
13479 if test -n "$CXX" ; then
13480         ac_ext=cc
13481 ac_cpp='$CXXCPP $CPPFLAGS'
13482 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13483 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13484 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13485 ac_main_return=return
13486
13487 if test -n "$GXX" ; then
13488 case $cf_cv_system_name in #(vi
13489 os2*) #(vi
13490         cf_stdcpp_libname=stdcpp
13491         ;;
13492 *)
13493         cf_stdcpp_libname=stdc++
13494         ;;
13495 esac
13496 echo "$as_me:13496: checking for library $cf_stdcpp_libname" >&5
13497 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13498 if test "${cf_cv_libstdcpp+set}" = set; then
13499   echo $ECHO_N "(cached) $ECHO_C" >&6
13500 else
13501
13502         cf_save="$LIBS"
13503         LIBS="$LIBS -l$cf_stdcpp_libname"
13504 cat >conftest.$ac_ext <<_ACEOF
13505 #line 13505 "configure"
13506 #include "confdefs.h"
13507
13508 #include <strstream.h>
13509 int
13510 main ()
13511 {
13512
13513 char buf[80];
13514 strstreambuf foo(buf, sizeof(buf))
13515
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext conftest$ac_exeext
13521 if { (eval echo "$as_me:13521: \"$ac_link\"") >&5
13522   (eval $ac_link) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest$ac_exeext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532   cf_cv_libstdcpp=yes
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 cf_cv_libstdcpp=no
13537 fi
13538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13539         LIBS="$cf_save"
13540
13541 fi
13542 echo "$as_me:13542: result: $cf_cv_libstdcpp" >&5
13543 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13544 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13545 fi
13546
13547         echo "$as_me:13547: checking whether $CXX understands -c and -o together" >&5
13548 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13549 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13550   echo $ECHO_N "(cached) $ECHO_C" >&6
13551 else
13552
13553 cat > conftest.$ac_ext <<CF_EOF
13554 #include <stdio.h>
13555 int main()
13556 {
13557         ${cf_cv_main_return:-return}(0);
13558 }
13559 CF_EOF
13560 # We do the test twice because some compilers refuse to overwrite an
13561 # existing .o file with -o, though they will create one.
13562 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13563 if { (eval echo "$as_me:13563: \"$ac_try\"") >&5
13564   (eval $ac_try) 2>&5
13565   ac_status=$?
13566   echo "$as_me:13566: \$? = $ac_status" >&5
13567   (exit $ac_status); } &&
13568   test -f conftest2.$ac_objext && { (eval echo "$as_me:13568: \"$ac_try\"") >&5
13569   (eval $ac_try) 2>&5
13570   ac_status=$?
13571   echo "$as_me:13571: \$? = $ac_status" >&5
13572   (exit $ac_status); };
13573 then
13574   eval cf_cv_prog_CXX_c_o=yes
13575 else
13576   eval cf_cv_prog_CXX_c_o=no
13577 fi
13578 rm -f conftest*
13579
13580 fi
13581 if test $cf_cv_prog_CXX_c_o = yes; then
13582   echo "$as_me:13582: result: yes" >&5
13583 echo "${ECHO_T}yes" >&6
13584 else
13585   echo "$as_me:13585: result: no" >&5
13586 echo "${ECHO_T}no" >&6
13587 fi
13588
13589         case $GXX_VERSION in
13590         1*|2.0-6*)
13591                 cf_cxx_library=yes
13592                 ;;
13593         *-2.7*|2.7*)
13594
13595 cf_cxx_library=unknown
13596 case $cf_cv_system_name in #(vi
13597 os2*) #(vi
13598         cf_gpp_libname=gpp
13599         ;;
13600 *)
13601         cf_gpp_libname=g++
13602         ;;
13603 esac
13604 if test "$GXX" = yes; then
13605         echo "$as_me:13605: checking for lib$cf_gpp_libname" >&5
13606 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13607         cf_save="$LIBS"
13608         LIBS="$LIBS -l$cf_gpp_libname"
13609         cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612
13613 #include <$cf_gpp_libname/builtin.h>
13614
13615 int
13616 main ()
13617 {
13618 two_arg_error_handler_t foo2 = lib_error_handler
13619   ;
13620   return 0;
13621 }
13622 _ACEOF
13623 rm -f conftest.$ac_objext conftest$ac_exeext
13624 if { (eval echo "$as_me:13624: \"$ac_link\"") >&5
13625   (eval $ac_link) 2>&5
13626   ac_status=$?
13627   echo "$as_me:13627: \$? = $ac_status" >&5
13628   (exit $ac_status); } &&
13629          { ac_try='test -s conftest$ac_exeext'
13630   { (eval echo "$as_me:13630: \"$ac_try\"") >&5
13631   (eval $ac_try) 2>&5
13632   ac_status=$?
13633   echo "$as_me:13633: \$? = $ac_status" >&5
13634   (exit $ac_status); }; }; then
13635   cf_cxx_library=yes
13636          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13637          if test "$cf_gpp_libname" = cpp ; then
13638             cat >>confdefs.h <<\EOF
13639 #define HAVE_GPP_BUILTIN_H 1
13640 EOF
13641
13642          else
13643             cat >>confdefs.h <<\EOF
13644 #define HAVE_GXX_BUILTIN_H 1
13645 EOF
13646
13647          fi
13648 else
13649   echo "$as_me: failed program was:" >&5
13650 cat conftest.$ac_ext >&5
13651 cat >conftest.$ac_ext <<_ACEOF
13652 #line 13652 "configure"
13653 #include "confdefs.h"
13654
13655 #include <builtin.h>
13656
13657 int
13658 main ()
13659 {
13660 two_arg_error_handler_t foo2 = lib_error_handler
13661   ;
13662   return 0;
13663 }
13664 _ACEOF
13665 rm -f conftest.$ac_objext conftest$ac_exeext
13666 if { (eval echo "$as_me:13666: \"$ac_link\"") >&5
13667   (eval $ac_link) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit $ac_status); } &&
13671          { ac_try='test -s conftest$ac_exeext'
13672   { (eval echo "$as_me:13672: \"$ac_try\"") >&5
13673   (eval $ac_try) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); }; }; then
13677   cf_cxx_library=yes
13678          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13679          cat >>confdefs.h <<\EOF
13680 #define HAVE_BUILTIN_H 1
13681 EOF
13682
13683 else
13684   echo "$as_me: failed program was:" >&5
13685 cat conftest.$ac_ext >&5
13686 cf_cxx_library=no
13687 fi
13688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13689 fi
13690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13691         LIBS="$cf_save"
13692         echo "$as_me:13692: result: $cf_cxx_library" >&5
13693 echo "${ECHO_T}$cf_cxx_library" >&6
13694 fi
13695
13696                 ;;
13697         *)
13698                 cf_cxx_library=no
13699                 ;;
13700         esac
13701
13702         ac_ext=cc
13703 ac_cpp='$CXXCPP $CPPFLAGS'
13704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13707 ac_main_return=return
13708 echo "$as_me:13708: checking how to run the C++ preprocessor" >&5
13709 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13710 if test -z "$CXXCPP"; then
13711   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13712   echo $ECHO_N "(cached) $ECHO_C" >&6
13713 else
13714       # Double quotes because CXXCPP needs to be expanded
13715     for CXXCPP in "$CXX -E" "/lib/cpp"
13716     do
13717       ac_preproc_ok=false
13718 for ac_cxx_preproc_warn_flag in '' yes
13719 do
13720   # Use a header file that comes with gcc, so configuring glibc
13721   # with a fresh cross-compiler works.
13722   # On the NeXT, cc -E runs the code through the compiler's parser,
13723   # not just through cpp. "Syntax error" is here to catch this case.
13724   cat >conftest.$ac_ext <<_ACEOF
13725 #line 13725 "configure"
13726 #include "confdefs.h"
13727 #include <assert.h>
13728                      Syntax error
13729 _ACEOF
13730 if { (eval echo "$as_me:13730: \"$ac_cpp conftest.$ac_ext\"") >&5
13731   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13732   ac_status=$?
13733   egrep -v '^ *\+' conftest.er1 >conftest.err
13734   rm -f conftest.er1
13735   cat conftest.err >&5
13736   echo "$as_me:13736: \$? = $ac_status" >&5
13737   (exit $ac_status); } >/dev/null; then
13738   if test -s conftest.err; then
13739     ac_cpp_err=$ac_cxx_preproc_warn_flag
13740   else
13741     ac_cpp_err=
13742   fi
13743 else
13744   ac_cpp_err=yes
13745 fi
13746 if test -z "$ac_cpp_err"; then
13747   :
13748 else
13749   echo "$as_me: failed program was:" >&5
13750   cat conftest.$ac_ext >&5
13751   # Broken: fails on valid input.
13752 continue
13753 fi
13754 rm -f conftest.err conftest.$ac_ext
13755
13756   # OK, works on sane cases.  Now check whether non-existent headers
13757   # can be detected and how.
13758   cat >conftest.$ac_ext <<_ACEOF
13759 #line 13759 "configure"
13760 #include "confdefs.h"
13761 #include <ac_nonexistent.h>
13762 _ACEOF
13763 if { (eval echo "$as_me:13763: \"$ac_cpp conftest.$ac_ext\"") >&5
13764   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13765   ac_status=$?
13766   egrep -v '^ *\+' conftest.er1 >conftest.err
13767   rm -f conftest.er1
13768   cat conftest.err >&5
13769   echo "$as_me:13769: \$? = $ac_status" >&5
13770   (exit $ac_status); } >/dev/null; then
13771   if test -s conftest.err; then
13772     ac_cpp_err=$ac_cxx_preproc_warn_flag
13773   else
13774     ac_cpp_err=
13775   fi
13776 else
13777   ac_cpp_err=yes
13778 fi
13779 if test -z "$ac_cpp_err"; then
13780   # Broken: success on invalid input.
13781 continue
13782 else
13783   echo "$as_me: failed program was:" >&5
13784   cat conftest.$ac_ext >&5
13785   # Passes both tests.
13786 ac_preproc_ok=:
13787 break
13788 fi
13789 rm -f conftest.err conftest.$ac_ext
13790
13791 done
13792 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13793 rm -f conftest.err conftest.$ac_ext
13794 if $ac_preproc_ok; then
13795   break
13796 fi
13797
13798     done
13799     ac_cv_prog_CXXCPP=$CXXCPP
13800
13801 fi
13802   CXXCPP=$ac_cv_prog_CXXCPP
13803 else
13804   ac_cv_prog_CXXCPP=$CXXCPP
13805 fi
13806 echo "$as_me:13806: result: $CXXCPP" >&5
13807 echo "${ECHO_T}$CXXCPP" >&6
13808 ac_preproc_ok=false
13809 for ac_cxx_preproc_warn_flag in '' yes
13810 do
13811   # Use a header file that comes with gcc, so configuring glibc
13812   # with a fresh cross-compiler works.
13813   # On the NeXT, cc -E runs the code through the compiler's parser,
13814   # not just through cpp. "Syntax error" is here to catch this case.
13815   cat >conftest.$ac_ext <<_ACEOF
13816 #line 13816 "configure"
13817 #include "confdefs.h"
13818 #include <assert.h>
13819                      Syntax error
13820 _ACEOF
13821 if { (eval echo "$as_me:13821: \"$ac_cpp conftest.$ac_ext\"") >&5
13822   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13823   ac_status=$?
13824   egrep -v '^ *\+' conftest.er1 >conftest.err
13825   rm -f conftest.er1
13826   cat conftest.err >&5
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); } >/dev/null; then
13829   if test -s conftest.err; then
13830     ac_cpp_err=$ac_cxx_preproc_warn_flag
13831   else
13832     ac_cpp_err=
13833   fi
13834 else
13835   ac_cpp_err=yes
13836 fi
13837 if test -z "$ac_cpp_err"; then
13838   :
13839 else
13840   echo "$as_me: failed program was:" >&5
13841   cat conftest.$ac_ext >&5
13842   # Broken: fails on valid input.
13843 continue
13844 fi
13845 rm -f conftest.err conftest.$ac_ext
13846
13847   # OK, works on sane cases.  Now check whether non-existent headers
13848   # can be detected and how.
13849   cat >conftest.$ac_ext <<_ACEOF
13850 #line 13850 "configure"
13851 #include "confdefs.h"
13852 #include <ac_nonexistent.h>
13853 _ACEOF
13854 if { (eval echo "$as_me:13854: \"$ac_cpp conftest.$ac_ext\"") >&5
13855   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13856   ac_status=$?
13857   egrep -v '^ *\+' conftest.er1 >conftest.err
13858   rm -f conftest.er1
13859   cat conftest.err >&5
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); } >/dev/null; then
13862   if test -s conftest.err; then
13863     ac_cpp_err=$ac_cxx_preproc_warn_flag
13864   else
13865     ac_cpp_err=
13866   fi
13867 else
13868   ac_cpp_err=yes
13869 fi
13870 if test -z "$ac_cpp_err"; then
13871   # Broken: success on invalid input.
13872 continue
13873 else
13874   echo "$as_me: failed program was:" >&5
13875   cat conftest.$ac_ext >&5
13876   # Passes both tests.
13877 ac_preproc_ok=:
13878 break
13879 fi
13880 rm -f conftest.err conftest.$ac_ext
13881
13882 done
13883 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13884 rm -f conftest.err conftest.$ac_ext
13885 if $ac_preproc_ok; then
13886   :
13887 else
13888   { { echo "$as_me:13888: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13889 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13890    { (exit 1); exit 1; }; }
13891 fi
13892
13893 ac_ext=cc
13894 ac_cpp='$CXXCPP $CPPFLAGS'
13895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13898 ac_main_return=return
13899
13900 for ac_header in typeinfo
13901 do
13902 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13903 echo "$as_me:13903: checking for $ac_header" >&5
13904 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13905 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13906   echo $ECHO_N "(cached) $ECHO_C" >&6
13907 else
13908   cat >conftest.$ac_ext <<_ACEOF
13909 #line 13909 "configure"
13910 #include "confdefs.h"
13911 #include <$ac_header>
13912 _ACEOF
13913 if { (eval echo "$as_me:13913: \"$ac_cpp conftest.$ac_ext\"") >&5
13914   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13915   ac_status=$?
13916   egrep -v '^ *\+' conftest.er1 >conftest.err
13917   rm -f conftest.er1
13918   cat conftest.err >&5
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit $ac_status); } >/dev/null; then
13921   if test -s conftest.err; then
13922     ac_cpp_err=$ac_cxx_preproc_warn_flag
13923   else
13924     ac_cpp_err=
13925   fi
13926 else
13927   ac_cpp_err=yes
13928 fi
13929 if test -z "$ac_cpp_err"; then
13930   eval "$as_ac_Header=yes"
13931 else
13932   echo "$as_me: failed program was:" >&5
13933   cat conftest.$ac_ext >&5
13934   eval "$as_ac_Header=no"
13935 fi
13936 rm -f conftest.err conftest.$ac_ext
13937 fi
13938 echo "$as_me:13938: result: `eval echo '${'$as_ac_Header'}'`" >&5
13939 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13940 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13941   cat >>confdefs.h <<EOF
13942 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13943 EOF
13944
13945 fi
13946 done
13947
13948 echo "$as_me:13948: checking if we should include stdbool.h" >&5
13949 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13950
13951 if test "${cf_cv_header_stdbool_h+set}" = set; then
13952   echo $ECHO_N "(cached) $ECHO_C" >&6
13953 else
13954
13955         cat >conftest.$ac_ext <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13958
13959 int
13960 main ()
13961 {
13962 bool foo = false
13963   ;
13964   return 0;
13965 }
13966 _ACEOF
13967 rm -f conftest.$ac_objext
13968 if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5
13969   (eval $ac_compile) 2>&5
13970   ac_status=$?
13971   echo "$as_me:13971: \$? = $ac_status" >&5
13972   (exit $ac_status); } &&
13973          { ac_try='test -s conftest.$ac_objext'
13974   { (eval echo "$as_me:13974: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit $ac_status); }; }; then
13979   cf_cv_header_stdbool_h=0
13980 else
13981   echo "$as_me: failed program was:" >&5
13982 cat conftest.$ac_ext >&5
13983 cat >conftest.$ac_ext <<_ACEOF
13984 #line 13984 "configure"
13985 #include "confdefs.h"
13986
13987 #ifndef __BEOS__
13988 #include <stdbool.h>
13989 #endif
13990
13991 int
13992 main ()
13993 {
13994 bool foo = false
13995   ;
13996   return 0;
13997 }
13998 _ACEOF
13999 rm -f conftest.$ac_objext
14000 if { (eval echo "$as_me:14000: \"$ac_compile\"") >&5
14001   (eval $ac_compile) 2>&5
14002   ac_status=$?
14003   echo "$as_me:14003: \$? = $ac_status" >&5
14004   (exit $ac_status); } &&
14005          { ac_try='test -s conftest.$ac_objext'
14006   { (eval echo "$as_me:14006: \"$ac_try\"") >&5
14007   (eval $ac_try) 2>&5
14008   ac_status=$?
14009   echo "$as_me:14009: \$? = $ac_status" >&5
14010   (exit $ac_status); }; }; then
14011   cf_cv_header_stdbool_h=1
14012 else
14013   echo "$as_me: failed program was:" >&5
14014 cat conftest.$ac_ext >&5
14015 cf_cv_header_stdbool_h=0
14016 fi
14017 rm -f conftest.$ac_objext conftest.$ac_ext
14018 fi
14019 rm -f conftest.$ac_objext conftest.$ac_ext
14020 fi
14021
14022 if test "$cf_cv_header_stdbool_h" = 1
14023 then    echo "$as_me:14023: result: yes" >&5
14024 echo "${ECHO_T}yes" >&6
14025 else    echo "$as_me:14025: result: no" >&5
14026 echo "${ECHO_T}no" >&6
14027 fi
14028
14029 echo "$as_me:14029: checking for builtin bool type" >&5
14030 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14031
14032 if test "${cf_cv_builtin_bool+set}" = set; then
14033   echo $ECHO_N "(cached) $ECHO_C" >&6
14034 else
14035
14036         cat >conftest.$ac_ext <<_ACEOF
14037 #line 14037 "configure"
14038 #include "confdefs.h"
14039
14040 #include <stdio.h>
14041 #include <sys/types.h>
14042
14043 int
14044 main ()
14045 {
14046 bool x = false
14047   ;
14048   return 0;
14049 }
14050 _ACEOF
14051 rm -f conftest.$ac_objext
14052 if { (eval echo "$as_me:14052: \"$ac_compile\"") >&5
14053   (eval $ac_compile) 2>&5
14054   ac_status=$?
14055   echo "$as_me:14055: \$? = $ac_status" >&5
14056   (exit $ac_status); } &&
14057          { ac_try='test -s conftest.$ac_objext'
14058   { (eval echo "$as_me:14058: \"$ac_try\"") >&5
14059   (eval $ac_try) 2>&5
14060   ac_status=$?
14061   echo "$as_me:14061: \$? = $ac_status" >&5
14062   (exit $ac_status); }; }; then
14063   cf_cv_builtin_bool=1
14064 else
14065   echo "$as_me: failed program was:" >&5
14066 cat conftest.$ac_ext >&5
14067 cf_cv_builtin_bool=0
14068 fi
14069 rm -f conftest.$ac_objext conftest.$ac_ext
14070
14071 fi
14072
14073 if test "$cf_cv_builtin_bool" = 1
14074 then    echo "$as_me:14074: result: yes" >&5
14075 echo "${ECHO_T}yes" >&6
14076 else    echo "$as_me:14076: result: no" >&5
14077 echo "${ECHO_T}no" >&6
14078 fi
14079
14080 echo "$as_me:14080: checking for size of bool" >&5
14081 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14082 if test "${cf_cv_type_of_bool+set}" = set; then
14083   echo $ECHO_N "(cached) $ECHO_C" >&6
14084 else
14085
14086         rm -f cf_test.out
14087         if test "$cross_compiling" = yes; then
14088   cf_cv_type_of_bool=unknown
14089 else
14090   cat >conftest.$ac_ext <<_ACEOF
14091 #line 14091 "configure"
14092 #include "confdefs.h"
14093
14094 #include <stdlib.h>
14095 #include <stdio.h>
14096
14097 #if defined(__cplusplus)
14098
14099 #ifdef HAVE_GXX_BUILTIN_H
14100 #include <g++/builtin.h>
14101 #elif HAVE_GPP_BUILTIN_H
14102 #include <gpp/builtin.h>
14103 #elif HAVE_BUILTIN_H
14104 #include <builtin.h>
14105 #endif
14106
14107 #else
14108
14109 #if $cf_cv_header_stdbool_h
14110 #include <stdbool.h>
14111 #endif
14112
14113 #endif
14114
14115 main()
14116 {
14117         FILE *fp = fopen("cf_test.out", "w");
14118         if (fp != 0) {
14119                 bool x = true;
14120                 if ((bool)(-x) >= 0)
14121                         fputs("unsigned ", fp);
14122                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14123                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14124                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14125                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14126                 fclose(fp);
14127         }
14128         ${cf_cv_main_return:-return}(0);
14129 }
14130
14131 _ACEOF
14132 rm -f conftest$ac_exeext
14133 if { (eval echo "$as_me:14133: \"$ac_link\"") >&5
14134   (eval $ac_link) 2>&5
14135   ac_status=$?
14136   echo "$as_me:14136: \$? = $ac_status" >&5
14137   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14138   { (eval echo "$as_me:14138: \"$ac_try\"") >&5
14139   (eval $ac_try) 2>&5
14140   ac_status=$?
14141   echo "$as_me:14141: \$? = $ac_status" >&5
14142   (exit $ac_status); }; }; then
14143   cf_cv_type_of_bool=`cat cf_test.out`
14144                  if test -z "$cf_cv_type_of_bool"; then
14145                    cf_cv_type_of_bool=unknown
14146                  fi
14147 else
14148   echo "$as_me: program exited with status $ac_status" >&5
14149 echo "$as_me: failed program was:" >&5
14150 cat conftest.$ac_ext >&5
14151 cf_cv_type_of_bool=unknown
14152 fi
14153 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14154 fi
14155
14156 fi
14157
14158         rm -f cf_test.out
14159 echo "$as_me:14159: result: $cf_cv_type_of_bool" >&5
14160 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14161 if test "$cf_cv_type_of_bool" = unknown ; then
14162         case .$NCURSES_BOOL in #(vi
14163         .auto|.) NCURSES_BOOL=unsigned;;
14164         esac
14165         { echo "$as_me:14165: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14166 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14167         cf_cv_type_of_bool=$NCURSES_BOOL
14168 fi
14169
14170 echo "$as_me:14170: checking for special defines needed for etip.h" >&5
14171 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14172 cf_save_CXXFLAGS="$CXXFLAGS"
14173 cf_result="none"
14174 for cf_math in "" MATH_H
14175 do
14176 for cf_excp in "" MATH_EXCEPTION
14177 do
14178         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14179         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14180         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14181 cat >conftest.$ac_ext <<_ACEOF
14182 #line 14182 "configure"
14183 #include "confdefs.h"
14184
14185 #include <etip.h.in>
14186
14187 int
14188 main ()
14189 {
14190
14191   ;
14192   return 0;
14193 }
14194 _ACEOF
14195 rm -f conftest.$ac_objext
14196 if { (eval echo "$as_me:14196: \"$ac_compile\"") >&5
14197   (eval $ac_compile) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit $ac_status); } &&
14201          { ac_try='test -s conftest.$ac_objext'
14202   { (eval echo "$as_me:14202: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit $ac_status); }; }; then
14207
14208         test -n "$cf_math" && cat >>confdefs.h <<EOF
14209 #define ETIP_NEEDS_${cf_math} 1
14210 EOF
14211
14212         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14213 #define ETIP_NEEDS_${cf_excp} 1
14214 EOF
14215
14216         cf_result="$cf_math $cf_excp"
14217         break
14218
14219 else
14220   echo "$as_me: failed program was:" >&5
14221 cat conftest.$ac_ext >&5
14222 fi
14223 rm -f conftest.$ac_objext conftest.$ac_ext
14224 done
14225 done
14226 echo "$as_me:14226: result: $cf_result" >&5
14227 echo "${ECHO_T}$cf_result" >&6
14228 CXXFLAGS="$cf_save_CXXFLAGS"
14229
14230 if test -n "$CXX"; then
14231 echo "$as_me:14231: checking if $CXX accepts parameter initialization" >&5
14232 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14233 if test "${cf_cv_cpp_param_init+set}" = set; then
14234   echo $ECHO_N "(cached) $ECHO_C" >&6
14235 else
14236
14237         ac_ext=cc
14238 ac_cpp='$CXXCPP $CPPFLAGS'
14239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14242 ac_main_return=return
14243
14244         if test "$cross_compiling" = yes; then
14245   cf_cv_cpp_param_init=unknown
14246 else
14247   cat >conftest.$ac_ext <<_ACEOF
14248 #line 14248 "configure"
14249 #include "confdefs.h"
14250
14251 class TEST {
14252 private:
14253         int value;
14254 public:
14255         TEST(int x = 1);
14256         ~TEST();
14257 };
14258
14259 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14260 {
14261         value = x;
14262 }
14263 void main() { }
14264
14265 _ACEOF
14266 rm -f conftest$ac_exeext
14267 if { (eval echo "$as_me:14267: \"$ac_link\"") >&5
14268   (eval $ac_link) 2>&5
14269   ac_status=$?
14270   echo "$as_me:14270: \$? = $ac_status" >&5
14271   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14272   { (eval echo "$as_me:14272: \"$ac_try\"") >&5
14273   (eval $ac_try) 2>&5
14274   ac_status=$?
14275   echo "$as_me:14275: \$? = $ac_status" >&5
14276   (exit $ac_status); }; }; then
14277   cf_cv_cpp_param_init=yes
14278 else
14279   echo "$as_me: program exited with status $ac_status" >&5
14280 echo "$as_me: failed program was:" >&5
14281 cat conftest.$ac_ext >&5
14282 cf_cv_cpp_param_init=no
14283 fi
14284 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14285 fi
14286         ac_ext=cc
14287 ac_cpp='$CXXCPP $CPPFLAGS'
14288 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14289 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14290 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14291 ac_main_return=return
14292
14293 fi
14294 echo "$as_me:14294: result: $cf_cv_cpp_param_init" >&5
14295 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14296 fi
14297 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14298 #define CPP_HAS_PARAM_INIT 1
14299 EOF
14300
14301 if test -n "$CXX"; then
14302
14303 echo "$as_me:14303: checking if $CXX accepts static_cast" >&5
14304 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14305 if test "${cf_cv_cpp_static_cast+set}" = set; then
14306   echo $ECHO_N "(cached) $ECHO_C" >&6
14307 else
14308
14309         ac_ext=cc
14310 ac_cpp='$CXXCPP $CPPFLAGS'
14311 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14312 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14313 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14314 ac_main_return=return
14315
14316         cat >conftest.$ac_ext <<_ACEOF
14317 #line 14317 "configure"
14318 #include "confdefs.h"
14319
14320 class NCursesPanel
14321 {
14322 public:
14323   NCursesPanel(int nlines,
14324                int ncols,
14325                int begin_y = 0,
14326                int begin_x = 0)
14327   {
14328   }
14329
14330   ~NCursesPanel();
14331 };
14332
14333 template<class T> class NCursesUserPanel : public NCursesPanel
14334 {
14335 public:
14336   NCursesUserPanel (int nlines,
14337                     int ncols,
14338                     int begin_y = 0,
14339                     int begin_x = 0,
14340                     const T* p_UserData = static_cast<T*>(0))
14341     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14342   {
14343   };
14344   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14345   {
14346   };
14347
14348   virtual ~NCursesUserPanel() {};
14349 };
14350
14351 int
14352 main ()
14353 {
14354
14355         const char* p_UserData = static_cast<char*>(0)
14356   ;
14357   return 0;
14358 }
14359 _ACEOF
14360 rm -f conftest.$ac_objext
14361 if { (eval echo "$as_me:14361: \"$ac_compile\"") >&5
14362   (eval $ac_compile) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); } &&
14366          { ac_try='test -s conftest.$ac_objext'
14367   { (eval echo "$as_me:14367: \"$ac_try\"") >&5
14368   (eval $ac_try) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit $ac_status); }; }; then
14372   cf_cv_cpp_static_cast=yes
14373 else
14374   echo "$as_me: failed program was:" >&5
14375 cat conftest.$ac_ext >&5
14376 cf_cv_cpp_static_cast=no
14377 fi
14378 rm -f conftest.$ac_objext conftest.$ac_ext
14379
14380         ac_ext=cc
14381 ac_cpp='$CXXCPP $CPPFLAGS'
14382 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14383 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14384 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14385 ac_main_return=return
14386
14387 fi
14388 echo "$as_me:14388: result: $cf_cv_cpp_static_cast" >&5
14389 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14390
14391 fi
14392
14393 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14394 #define CPP_HAS_STATIC_CAST 1
14395 EOF
14396
14397         CXX_AR='$(AR)'
14398         CXX_AR_OPTS='$(AR_OPTS)'
14399         case $cf_cv_system_name in #(vi
14400         irix*) #(vi
14401             if test "$GXX" != yes ; then
14402                 CXX_AR='$(CXX)'
14403                 CXX_AR_OPTS='-ar -o'
14404             fi
14405             ;;
14406         sco3.2v5*) #(vi
14407             CXXLDFLAGS="-u main"
14408             ;;
14409         solaris2*)
14410             if test "$GXX" != yes ; then
14411                 CXX_AR='$(CXX)'
14412                 CXX_AR_OPTS='-xar -o'
14413             fi
14414             ;;
14415         esac
14416
14417 else
14418         cf_cxx_library=no
14419         cf_cv_builtin_bool=1
14420
14421         # Just because we are not configuring against C++ right now does not
14422         # mean that a user will not want to use C++.  Some distributors disable
14423         # the C++ portion of this configuration as a shortcut (or just to avoid
14424         # compiling the demo in the c++ directory).  So we need a reasonable
14425         # default for the 'bool' type.
14426         #
14427         # Caveat: since the storage of the bool type is not standardized, it
14428         # may change.
14429
14430         if test "$NCURSES_BOOL" != auto ; then
14431                 cf_cv_type_of_bool=$NCURSES_BOOL
14432                 cf_cv_header_stdbool_h=0
14433         else
14434                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14435
14436 echo "$as_me:14436: checking for size of bool" >&5
14437 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14438 if test "${cf_cv_type_of_bool+set}" = set; then
14439   echo $ECHO_N "(cached) $ECHO_C" >&6
14440 else
14441
14442         rm -f cf_test.out
14443         if test "$cross_compiling" = yes; then
14444   cf_cv_type_of_bool=unknown
14445 else
14446   cat >conftest.$ac_ext <<_ACEOF
14447 #line 14447 "configure"
14448 #include "confdefs.h"
14449
14450 #include <stdlib.h>
14451 #include <stdio.h>
14452
14453 #if defined(__cplusplus)
14454
14455 #ifdef HAVE_GXX_BUILTIN_H
14456 #include <g++/builtin.h>
14457 #elif HAVE_GPP_BUILTIN_H
14458 #include <gpp/builtin.h>
14459 #elif HAVE_BUILTIN_H
14460 #include <builtin.h>
14461 #endif
14462
14463 #else
14464
14465 #if $cf_cv_header_stdbool_h
14466 #include <stdbool.h>
14467 #endif
14468
14469 #endif
14470
14471 main()
14472 {
14473         FILE *fp = fopen("cf_test.out", "w");
14474         if (fp != 0) {
14475                 bool x = true;
14476                 if ((bool)(-x) >= 0)
14477                         fputs("unsigned ", fp);
14478                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14479                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14480                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14481                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14482                 fclose(fp);
14483         }
14484         ${cf_cv_main_return:-return}(0);
14485 }
14486
14487 _ACEOF
14488 rm -f conftest$ac_exeext
14489 if { (eval echo "$as_me:14489: \"$ac_link\"") >&5
14490   (eval $ac_link) 2>&5
14491   ac_status=$?
14492   echo "$as_me:14492: \$? = $ac_status" >&5
14493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14494   { (eval echo "$as_me:14494: \"$ac_try\"") >&5
14495   (eval $ac_try) 2>&5
14496   ac_status=$?
14497   echo "$as_me:14497: \$? = $ac_status" >&5
14498   (exit $ac_status); }; }; then
14499   cf_cv_type_of_bool=`cat cf_test.out`
14500                  if test -z "$cf_cv_type_of_bool"; then
14501                    cf_cv_type_of_bool=unknown
14502                  fi
14503 else
14504   echo "$as_me: program exited with status $ac_status" >&5
14505 echo "$as_me: failed program was:" >&5
14506 cat conftest.$ac_ext >&5
14507 cf_cv_type_of_bool=unknown
14508 fi
14509 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14510 fi
14511
14512 fi
14513
14514         rm -f cf_test.out
14515 echo "$as_me:14515: result: $cf_cv_type_of_bool" >&5
14516 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14517 if test "$cf_cv_type_of_bool" = unknown ; then
14518         case .$NCURSES_BOOL in #(vi
14519         .auto|.) NCURSES_BOOL=unsigned;;
14520         esac
14521         { echo "$as_me:14521: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14522 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14523         cf_cv_type_of_bool=$NCURSES_BOOL
14524 fi
14525
14526                 else
14527                         echo "$as_me:14527: checking for fallback type of bool" >&5
14528 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14529                         case "$host_cpu" in #(vi
14530                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14531                         *)      cf_cv_type_of_bool=int  ;;
14532                         esac
14533                         echo "$as_me:14533: result: $cf_cv_type_of_bool" >&5
14534 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14535                 fi
14536         fi
14537 fi
14538
14539 # If the C compiler did not declare bool, and we did not determine that the C++
14540 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14541 # ncurses library use the same type as C++ bool.  Note that this allows one to
14542 # specify the type of bool in a configure-script option and postpone
14543 # integration with the C++ compiler provided that the types are compatible.
14544 USE_CXX_BOOL=1
14545 if test $cf_cv_cc_bool_type = 1
14546 then
14547         # oops: C has a bool.  Unlikely, but C++ could differ.
14548         USE_CXX_BOOL=0
14549 elif test $cf_cv_builtin_bool = 0
14550 then
14551         # C++ has no bool
14552         USE_CXX_BOOL=0
14553 else
14554         # this is the normal case
14555         USE_CXX_BOOL='defined(__cplusplus)'
14556 fi
14557
14558 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14559 if test "$cf_with_ada" != "no" ; then
14560 cf_ada_make=gnatmake
14561 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14562 set dummy $cf_ada_make; ac_word=$2
14563 echo "$as_me:14563: checking for $ac_word" >&5
14564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14565 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14566   echo $ECHO_N "(cached) $ECHO_C" >&6
14567 else
14568   if test -n "$gnat_exists"; then
14569   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14570 else
14571   ac_save_IFS=$IFS; IFS=$ac_path_separator
14572 ac_dummy="$PATH"
14573 for ac_dir in $ac_dummy; do
14574   IFS=$ac_save_IFS
14575   test -z "$ac_dir" && ac_dir=.
14576   $as_executable_p "$ac_dir/$ac_word" || continue
14577 ac_cv_prog_gnat_exists="yes"
14578 echo "$as_me:14578: found $ac_dir/$ac_word" >&5
14579 break
14580 done
14581
14582   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14583 fi
14584 fi
14585 gnat_exists=$ac_cv_prog_gnat_exists
14586 if test -n "$gnat_exists"; then
14587   echo "$as_me:14587: result: $gnat_exists" >&5
14588 echo "${ECHO_T}$gnat_exists" >&6
14589 else
14590   echo "$as_me:14590: result: no" >&5
14591 echo "${ECHO_T}no" >&6
14592 fi
14593
14594 if test "$ac_cv_prog_gnat_exists" = no; then
14595    cf_ada_make=
14596 else
14597
14598 echo "$as_me:14598: checking for gnat version" >&5
14599 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14600 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14601   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14602 echo "$as_me:14602: result: $cf_gnat_version" >&5
14603 echo "${ECHO_T}$cf_gnat_version" >&6
14604
14605 case $cf_gnat_version in
14606   3.1[1-9]*|3.[2-9]*|[4-9].*)
14607     cf_cv_prog_gnat_correct=yes
14608     ;;
14609   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14610      cf_cv_prog_gnat_correct=no
14611      ;;
14612 esac
14613 case $cf_gnat_version in
14614   3.[1-9]*|[4-9].*)
14615       cf_compile_generics=generics
14616       cf_generic_objects="\${GENOBJS}"
14617       ;;
14618   *)  cf_compile_generics=
14619       cf_generic_objects=
14620       ;;
14621 esac
14622
14623    # Extract the first word of "m4", so it can be a program name with args.
14624 set dummy m4; ac_word=$2
14625 echo "$as_me:14625: checking for $ac_word" >&5
14626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14627 if test "${ac_cv_prog_M4_exists+set}" = set; then
14628   echo $ECHO_N "(cached) $ECHO_C" >&6
14629 else
14630   if test -n "$M4_exists"; then
14631   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14632 else
14633   ac_save_IFS=$IFS; IFS=$ac_path_separator
14634 ac_dummy="$PATH"
14635 for ac_dir in $ac_dummy; do
14636   IFS=$ac_save_IFS
14637   test -z "$ac_dir" && ac_dir=.
14638   $as_executable_p "$ac_dir/$ac_word" || continue
14639 ac_cv_prog_M4_exists="yes"
14640 echo "$as_me:14640: found $ac_dir/$ac_word" >&5
14641 break
14642 done
14643
14644   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14645 fi
14646 fi
14647 M4_exists=$ac_cv_prog_M4_exists
14648 if test -n "$M4_exists"; then
14649   echo "$as_me:14649: result: $M4_exists" >&5
14650 echo "${ECHO_T}$M4_exists" >&6
14651 else
14652   echo "$as_me:14652: result: no" >&5
14653 echo "${ECHO_T}no" >&6
14654 fi
14655
14656    if test "$ac_cv_prog_M4_exists" = no; then
14657       cf_cv_prog_gnat_correct=no
14658       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14659    fi
14660    if test "$cf_cv_prog_gnat_correct" = yes; then
14661       echo "$as_me:14661: checking if GNAT works" >&5
14662 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14663
14664 rm -f conftest*
14665 cat >>conftest.ads <<CF_EOF
14666 procedure conftest;
14667 CF_EOF
14668 cat >>conftest.adb <<CF_EOF
14669 with Text_IO;
14670 with GNAT.OS_Lib;
14671 procedure conftest is
14672 begin
14673    Text_IO.Put ("Hello World");
14674    Text_IO.New_Line;
14675    GNAT.OS_Lib.OS_Exit (0);
14676 end conftest;
14677 CF_EOF
14678 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14679    if ( ./conftest 1>&5 2>&1 ) ; then
14680       cf_cv_prog_gnat_correct=yes
14681    else
14682       cf_cv_prog_gnat_correct=no
14683    fi
14684 else
14685    cf_cv_prog_gnat_correct=no
14686 fi
14687 rm -f conftest*
14688
14689       echo "$as_me:14689: result: $cf_cv_prog_gnat_correct" >&5
14690 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14691    fi
14692 fi
14693 if test "$cf_cv_prog_gnat_correct" = yes; then
14694    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14695
14696    echo "$as_me:14696: checking if GNAT pragma Unreferenced works" >&5
14697 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14698
14699 rm -f conftest*
14700 cat >>conftest.ads <<CF_EOF
14701 procedure conftest;
14702 CF_EOF
14703 cat >>conftest.adb <<CF_EOF
14704 with Text_IO;
14705 with GNAT.OS_Lib;
14706 procedure conftest is
14707    test : Integer;
14708    pragma Unreferenced (test);
14709 begin
14710    test := 1;
14711    Text_IO.Put ("Hello World");
14712    Text_IO.New_Line;
14713    GNAT.OS_Lib.OS_Exit (0);
14714 end conftest;
14715 CF_EOF
14716 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14717       cf_cv_pragma_unreferenced=yes
14718 else
14719    cf_cv_pragma_unreferenced=no
14720 fi
14721 rm -f conftest*
14722
14723    echo "$as_me:14723: result: $cf_cv_pragma_unreferenced" >&5
14724 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14725
14726    # if the pragma is supported, use it (needed in the Trace code).
14727    if test $cf_cv_pragma_unreferenced = yes ; then
14728       PRAGMA_UNREF=TRUE
14729    else
14730       PRAGMA_UNREF=FALSE
14731    fi
14732
14733 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14734 if test "${with_ada_compiler+set}" = set; then
14735   withval="$with_ada_compiler"
14736   cf_ada_compiler=$withval
14737 else
14738   cf_ada_compiler=gnatmake
14739 fi;
14740
14741    cf_ada_package=terminal_interface
14742
14743 # Check whether --with-ada-include or --without-ada-include was given.
14744 if test "${with_ada_include+set}" = set; then
14745   withval="$with_ada_include"
14746
14747 else
14748   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14749 fi;
14750 if test "x$prefix" != xNONE; then
14751   cf_path_syntax="$prefix"
14752 else
14753   cf_path_syntax="$ac_default_prefix"
14754 fi
14755
14756 case ".$withval" in #(vi
14757 .\$\(*\)*|.\'*\'*) #(vi
14758   ;;
14759 ..|./*|.\\*) #(vi
14760   ;;
14761 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14762   ;;
14763 .\${*prefix}*) #(vi
14764   eval withval="$withval"
14765   case ".$withval" in #(vi
14766   .NONE/*)
14767     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14768     ;;
14769   esac
14770   ;; #(vi
14771 .no|.NONE/*)
14772   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14773   ;;
14774 *)
14775   { { echo "$as_me:14775: error: expected a pathname, not \"$withval\"" >&5
14776 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14777    { (exit 1); exit 1; }; }
14778   ;;
14779 esac
14780
14781 ADA_INCLUDE="$withval"
14782
14783 # Check whether --with-ada-objects or --without-ada-objects was given.
14784 if test "${with_ada_objects+set}" = set; then
14785   withval="$with_ada_objects"
14786
14787 else
14788   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14789 fi;
14790 if test "x$prefix" != xNONE; then
14791   cf_path_syntax="$prefix"
14792 else
14793   cf_path_syntax="$ac_default_prefix"
14794 fi
14795
14796 case ".$withval" in #(vi
14797 .\$\(*\)*|.\'*\'*) #(vi
14798   ;;
14799 ..|./*|.\\*) #(vi
14800   ;;
14801 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14802   ;;
14803 .\${*prefix}*) #(vi
14804   eval withval="$withval"
14805   case ".$withval" in #(vi
14806   .NONE/*)
14807     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14808     ;;
14809   esac
14810   ;; #(vi
14811 .no|.NONE/*)
14812   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14813   ;;
14814 *)
14815   { { echo "$as_me:14815: error: expected a pathname, not \"$withval\"" >&5
14816 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14817    { (exit 1); exit 1; }; }
14818   ;;
14819 esac
14820
14821 ADA_OBJECTS="$withval"
14822
14823 fi
14824 fi
14825 fi
14826
14827 ### Construct the ncurses library-subsets, if any, from this set of keywords:
14828 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
14829 ###
14830 ### ticlib modules may be a separate library, otherwise contained in termlib.
14831 ### termlib modules may be a separate library, otherwise contained in ncurses.
14832 ###
14833 ### The of "+" or " " between the tokens controls the way the script
14834 ### chooses to split module lists into libraries.
14835 ###
14836 ### (see CF_LIB_RULES).
14837 echo "$as_me:14837: checking for library subsets" >&5
14838 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14839 LIB_SUBSETS=
14840
14841 test "$cf_with_progs"  = yes && LIB_SUBSETS="${LIB_SUBSETS}ticlib"
14842 if test "$with_ticlib" != no ; then
14843         LIB_SUBSETS="${LIB_SUBSETS} "
14844 else
14845         LIB_SUBSETS="${LIB_SUBSETS}+"
14846 fi
14847
14848 LIB_SUBSETS="${LIB_SUBSETS}termlib"
14849 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14850 if test "$with_termlib" != no ; then
14851         LIB_SUBSETS="${LIB_SUBSETS} "
14852 else
14853         LIB_SUBSETS="${LIB_SUBSETS}+"
14854 fi
14855
14856 LIB_SUBSETS="${LIB_SUBSETS}base"
14857 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
14858 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
14859
14860 echo "$as_me:14860: result: $LIB_SUBSETS" >&5
14861 echo "${ECHO_T}$LIB_SUBSETS" >&6
14862
14863 ### Construct the list of include-directories to be generated
14864
14865 CPPFLAGS="-I. -I../include $CPPFLAGS"
14866 if test "$srcdir" != "."; then
14867         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14868 fi
14869 if test "$GCC" != yes; then
14870         CPPFLAGS="$CPPFLAGS -I\${includedir}"
14871 elif test "$includedir" != "/usr/include"; then
14872         if test "$includedir" = '${prefix}/include' ; then
14873                 if test $prefix != /usr ; then
14874                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
14875                 fi
14876         else
14877                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
14878         fi
14879 fi
14880
14881 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
14882 if test "$srcdir" != "."; then
14883         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14884 fi
14885 if test "$GCC" != yes; then
14886         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14887 elif test "$includedir" != "/usr/include"; then
14888         if test "$includedir" = '${prefix}/include' ; then
14889                 if test $prefix != /usr ; then
14890                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14891                 fi
14892         else
14893                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14894         fi
14895 fi
14896
14897 ### Build up pieces for makefile rules
14898 echo "$as_me:14898: checking default library suffix" >&5
14899 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14900
14901         case $DFT_LWR_MODEL in
14902         libtool) DFT_ARG_SUFFIX=''   ;;
14903         normal)  DFT_ARG_SUFFIX=''   ;;
14904         debug)   DFT_ARG_SUFFIX='_g' ;;
14905         profile) DFT_ARG_SUFFIX='_p' ;;
14906         shared)  DFT_ARG_SUFFIX=''   ;;
14907         esac
14908         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14909 echo "$as_me:14909: result: $DFT_ARG_SUFFIX" >&5
14910 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14911
14912 echo "$as_me:14912: checking default library-dependency suffix" >&5
14913 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14914
14915         case $DFT_LWR_MODEL in
14916         libtool) DFT_DEP_SUFFIX='.la'  ;;
14917         normal)  DFT_DEP_SUFFIX='.a'   ;;
14918         debug)   DFT_DEP_SUFFIX='_g.a' ;;
14919         profile) DFT_DEP_SUFFIX='_p.a' ;;
14920         shared)
14921                 case $cf_cv_system_name in
14922                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
14923                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
14924                 hpux*)
14925                         case $target in
14926                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
14927                         *)      DFT_DEP_SUFFIX='.sl' ;;
14928                         esac
14929                         ;;
14930                 *)      DFT_DEP_SUFFIX='.so'  ;;
14931                 esac
14932         esac
14933         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
14934 if test $DFT_LWR_MODEL = shared ; then
14935         case $cf_cv_system_name in #(vi
14936         cygwin*)
14937                 DFT_DEP_SUFFIX=".dll.a"
14938                 ;;
14939         esac
14940 fi
14941 echo "$as_me:14941: result: $DFT_DEP_SUFFIX" >&5
14942 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14943
14944 echo "$as_me:14944: checking default object directory" >&5
14945 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14946
14947         case $DFT_LWR_MODEL in
14948         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
14949         normal)  DFT_OBJ_SUBDIR='objects' ;;
14950         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
14951         profile) DFT_OBJ_SUBDIR='obj_p' ;;
14952         shared)
14953                 case $cf_cv_system_name in #(vi
14954                 cygwin) #(vi
14955                         DFT_OBJ_SUBDIR='objects' ;;
14956                 *)
14957                         DFT_OBJ_SUBDIR='obj_s' ;;
14958                 esac
14959         esac
14960 echo "$as_me:14960: result: $DFT_OBJ_SUBDIR" >&5
14961 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14962
14963 # libtool thinks it can make c++ shared libraries (perhaps only g++)
14964 if test "$cf_with_cxx" = yes ; then
14965 echo "$as_me:14965: checking c++ library-dependency suffix" >&5
14966 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
14967 if test "$with_libtool" != "no"; then
14968         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
14969 else
14970
14971         case normal in
14972         libtool) CXX_LIB_SUFFIX='.la'  ;;
14973         normal)  CXX_LIB_SUFFIX='.a'   ;;
14974         debug)   CXX_LIB_SUFFIX='_g.a' ;;
14975         profile) CXX_LIB_SUFFIX='_p.a' ;;
14976         shared)
14977                 case $cf_cv_system_name in
14978                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
14979                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
14980                 hpux*)
14981                         case $target in
14982                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
14983                         *)      CXX_LIB_SUFFIX='.sl' ;;
14984                         esac
14985                         ;;
14986                 *)      CXX_LIB_SUFFIX='.so'  ;;
14987                 esac
14988         esac
14989         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
14990 fi
14991 echo "$as_me:14991: result: $CXX_LIB_SUFFIX" >&5
14992 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
14993
14994 fi
14995
14996 ### Set up low-level terminfo dependencies for makefiles.
14997
14998 # TICS_LIST and TINFO_LIST are needed to build the libtic.so and libterm.so
14999 TICS_LIST="$SHLIB_LIST"
15000 TINFO_LIST="$SHLIB_LIST"
15001
15002 if test "$with_ticlib" != no ; then
15003
15004         if test "$with_ticlib" != yes ; then
15005                 TICS_NAME=$with_ticlib
15006                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15007                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15008                 TICS_LIB_SUFFIX="${with_ticlib}"
15009         else
15010                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15011                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15012                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15013         fi
15014         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15015 else
15016         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15017 fi
15018
15019 if test "$with_termlib" != no ; then
15020
15021         if test "$with_termlib" != yes ; then
15022                 TINFO_NAME=$with_termlib
15023                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15024                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15025                 TINFO_LIB_SUFFIX="${with_termlib}"
15026         else
15027                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15028                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15029                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15030         fi
15031
15032         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15033         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15034         if test "$DFT_LWR_MODEL" = "libtool"; then
15035                 TEST_ARGS="${TEST_DEPS}"
15036                 TEST_ARG2="${TEST_DEP2}"
15037                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15038         else
15039                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15040                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15041                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15042                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15043         fi
15044 else
15045         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15046 fi
15047
15048 # needed for Ada95
15049 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15050
15051 echo "$as_me:15051: checking where we will install curses.h" >&5
15052 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15053 test "$with_overwrite" = no && \
15054 test "x$includedir" = 'x${prefix}/include' && \
15055         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15056 echo "$as_me:15056: result: $includedir" >&5
15057 echo "${ECHO_T}$includedir" >&6
15058
15059 ### Resolve a conflict between normal and wide-curses by forcing applications
15060 ### that will need libutf8 to add it to their configure script.
15061 if test "$with_overwrite" != no ; then
15062 if test "$NCURSES_LIBUTF8" = 1 ; then
15063         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15064         { echo "$as_me:15064: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15065 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15066 fi
15067 fi
15068
15069 # used to separate tack out of the tree
15070 NCURSES_TREE=
15071
15072 ### predefined stuff for the test programs
15073 cat >>confdefs.h <<\EOF
15074 #define HAVE_SLK_COLOR 1
15075 EOF
15076
15077 ### Construct the list of subdirectories for which we'll customize makefiles
15078 ### with the appropriate compile-rules.
15079
15080 echo "$as_me:15080: checking for src modules" >&5
15081 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15082
15083 # dependencies and linker-arguments for test-programs
15084 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15085 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15086 if test "$DFT_LWR_MODEL" = "libtool"; then
15087         TEST_ARGS="${TEST_DEPS}"
15088         TEST_ARG2="${TEST_DEP2}"
15089 else
15090         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15091         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15092 fi
15093
15094 cf_cv_src_modules=
15095 for cf_dir in $modules_to_build
15096 do
15097         if test -f $srcdir/$cf_dir/modules; then
15098
15099                 # We may/may not have tack in the distribution, though the
15100                 # makefile is.
15101                 if test $cf_dir = tack ; then
15102                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15103                                 continue
15104                         fi
15105                 fi
15106
15107                 if test -z "$cf_cv_src_modules"; then
15108                         cf_cv_src_modules=$cf_dir
15109                 else
15110                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15111                 fi
15112
15113                 # Make the ncurses_cfg.h file record the library interface files as
15114                 # well.  These are header files that are the same name as their
15115                 # directory.  Ncurses is the only library that does not follow
15116                 # that pattern.
15117                 if test $cf_dir = tack ; then
15118                         continue
15119                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15120
15121 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15122
15123                         cat >>confdefs.h <<EOF
15124 #define HAVE_${cf_have_include}_H 1
15125 EOF
15126
15127                         cat >>confdefs.h <<EOF
15128 #define HAVE_LIB${cf_have_include} 1
15129 EOF
15130
15131                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15132                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15133                         if test "$DFT_LWR_MODEL" = "libtool"; then
15134                                 TEST_ARGS="${TEST_DEPS}"
15135                                 TEST_ARG2="${TEST_DEP2}"
15136                         else
15137                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15138                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15139                         fi
15140                 fi
15141         fi
15142 done
15143 echo "$as_me:15143: result: $cf_cv_src_modules" >&5
15144 echo "${ECHO_T}$cf_cv_src_modules" >&6
15145
15146 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15147 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15148
15149 SRC_SUBDIRS="man include"
15150 for cf_dir in $cf_cv_src_modules
15151 do
15152         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15153 done
15154 SRC_SUBDIRS="$SRC_SUBDIRS test"
15155 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15156 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15157
15158 ADA_SUBDIRS=
15159 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15160    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15161    ADA_SUBDIRS="gen src samples"
15162 fi
15163
15164 SUB_MAKEFILES=
15165 for cf_dir in $SRC_SUBDIRS
15166 do
15167         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15168 done
15169
15170 if test -n "$ADA_SUBDIRS"; then
15171    for cf_dir in $ADA_SUBDIRS
15172    do
15173       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15174    done
15175
15176 fi
15177
15178 DIRS_TO_MAKE="lib"
15179 for cf_item in $cf_list_models
15180 do
15181
15182         case $cf_item in
15183         libtool) cf_subdir='obj_lo'  ;;
15184         normal)  cf_subdir='objects' ;;
15185         debug)   cf_subdir='obj_g' ;;
15186         profile) cf_subdir='obj_p' ;;
15187         shared)
15188                 case $cf_cv_system_name in #(vi
15189                 cygwin) #(vi
15190                         cf_subdir='objects' ;;
15191                 *)
15192                         cf_subdir='obj_s' ;;
15193                 esac
15194         esac
15195
15196         for cf_item2 in $DIRS_TO_MAKE
15197         do
15198                 test $cf_item2 = $cf_subdir && break
15199         done
15200         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15201 done
15202 for cf_dir in $DIRS_TO_MAKE
15203 do
15204         test ! -d $cf_dir && mkdir $cf_dir
15205 done
15206
15207 cat >>confdefs.h <<EOF
15208 #define NCURSES_PATHSEP '$PATHSEP'
15209 EOF
15210
15211 cat >>confdefs.h <<EOF
15212 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15213 EOF
15214
15215 ### Now that we're done running tests, add the compiler-warnings, if any
15216
15217 cf_fix_cppflags=no
15218 cf_new_cflags=
15219 cf_new_cppflags=
15220 cf_new_extra_cppflags=
15221
15222 for cf_add_cflags in $EXTRA_CFLAGS
15223 do
15224 case $cf_fix_cppflags in
15225 no)
15226         case $cf_add_cflags in #(vi
15227         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15228                 case $cf_add_cflags in
15229                 -D*)
15230                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15231
15232                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15233                         && test -z "${cf_tst_cflags}" \
15234                         && cf_fix_cppflags=yes
15235
15236                         if test $cf_fix_cppflags = yes ; then
15237                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15238                                 continue
15239                         elif test "${cf_tst_cflags}" = "\"'" ; then
15240                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15241                                 continue
15242                         fi
15243                         ;;
15244                 esac
15245                 case "$CPPFLAGS" in
15246                 *$cf_add_cflags) #(vi
15247                         ;;
15248                 *) #(vi
15249                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15250                         ;;
15251                 esac
15252                 ;;
15253         *)
15254                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15255                 ;;
15256         esac
15257         ;;
15258 yes)
15259         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15260
15261         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15262
15263         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15264         && test -z "${cf_tst_cflags}" \
15265         && cf_fix_cppflags=no
15266         ;;
15267 esac
15268 done
15269
15270 if test -n "$cf_new_cflags" ; then
15271
15272         CFLAGS="$CFLAGS $cf_new_cflags"
15273 fi
15274
15275 if test -n "$cf_new_cppflags" ; then
15276
15277         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15278 fi
15279
15280 if test -n "$cf_new_extra_cppflags" ; then
15281
15282         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15283 fi
15284
15285 ### Define substitutions for header files to avoid name-pollution
15286
15287 if test "$cf_cv_have_tcgetattr" = yes ; then
15288         HAVE_TCGETATTR=1
15289 else
15290         HAVE_TCGETATTR=0
15291 fi
15292
15293 if test "$ac_cv_header_termio_h" = yes ; then
15294         HAVE_TERMIO_H=1
15295 else
15296         HAVE_TERMIO_H=0
15297 fi
15298
15299 if test "$ac_cv_header_termios_h" = yes ; then
15300         HAVE_TERMIOS_H=1
15301 else
15302         HAVE_TERMIOS_H=0
15303 fi
15304
15305 ################################################################################
15306 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15307 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15308 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"
15309 ac_config_commands="$ac_config_commands default"
15310 cat >confcache <<\_ACEOF
15311 # This file is a shell script that caches the results of configure
15312 # tests run on this system so they can be shared between configure
15313 # scripts and configure runs, see configure's option --config-cache.
15314 # It is not useful on other systems.  If it contains results you don't
15315 # want to keep, you may remove or edit it.
15316 #
15317 # config.status only pays attention to the cache file if you give it
15318 # the --recheck option to rerun configure.
15319 #
15320 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15321 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15322 # following values.
15323
15324 _ACEOF
15325
15326 # The following way of writing the cache mishandles newlines in values,
15327 # but we know of no workaround that is simple, portable, and efficient.
15328 # So, don't put newlines in cache variables' values.
15329 # Ultrix sh set writes to stderr and can't be redirected directly,
15330 # and sets the high bit in the cache file unless we assign to the vars.
15331 {
15332   (set) 2>&1 |
15333     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15334     *ac_space=\ *)
15335       # `set' does not quote correctly, so add quotes (double-quote
15336       # substitution turns \\\\ into \\, and sed turns \\ into \).
15337       sed -n \
15338         "s/'/'\\\\''/g;
15339           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15340       ;;
15341     *)
15342       # `set' quotes correctly as required by POSIX, so do not add quotes.
15343       sed -n \
15344         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15345       ;;
15346     esac;
15347 } |
15348   sed '
15349      t clear
15350      : clear
15351      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15352      t end
15353      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15354      : end' >>confcache
15355 if cmp -s $cache_file confcache; then :; else
15356   if test -w $cache_file; then
15357     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15358     cat confcache >$cache_file
15359   else
15360     echo "not updating unwritable cache $cache_file"
15361   fi
15362 fi
15363 rm -f confcache
15364
15365 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15366 # Let make expand exec_prefix.
15367 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15368
15369 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15370 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15371 # trailing colons and then remove the whole line if VPATH becomes empty
15372 # (actually we leave an empty line to preserve line numbers).
15373 if test "x$srcdir" = x.; then
15374   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15375 s/:*\$(srcdir):*/:/;
15376 s/:*\${srcdir}:*/:/;
15377 s/:*@srcdir@:*/:/;
15378 s/^\([^=]*=[    ]*\):*/\1/;
15379 s/:*$//;
15380 s/^[^=]*=[      ]*$//;
15381 }'
15382 fi
15383
15384 DEFS=-DHAVE_CONFIG_H
15385
15386 : ${CONFIG_STATUS=./config.status}
15387 ac_clean_files_save=$ac_clean_files
15388 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15389 { echo "$as_me:15389: creating $CONFIG_STATUS" >&5
15390 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15391 cat >$CONFIG_STATUS <<_ACEOF
15392 #! $SHELL
15393 # Generated automatically by configure.
15394 # Run this file to recreate the current configuration.
15395 # Compiler output produced by configure, useful for debugging
15396 # configure, is in config.log if it exists.
15397
15398 debug=false
15399 SHELL=\${CONFIG_SHELL-$SHELL}
15400 ac_cs_invocation="\$0 \$@"
15401
15402 _ACEOF
15403
15404 cat >>$CONFIG_STATUS <<\_ACEOF
15405 # Be Bourne compatible
15406 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15407   emulate sh
15408   NULLCMD=:
15409 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15410   set -o posix
15411 fi
15412
15413 # Name of the executable.
15414 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15415
15416 if expr a : '\(a\)' >/dev/null 2>&1; then
15417   as_expr=expr
15418 else
15419   as_expr=false
15420 fi
15421
15422 rm -f conf$$ conf$$.exe conf$$.file
15423 echo >conf$$.file
15424 if ln -s conf$$.file conf$$ 2>/dev/null; then
15425   # We could just check for DJGPP; but this test a) works b) is more generic
15426   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15427   if test -f conf$$.exe; then
15428     # Don't use ln at all; we don't have any links
15429     as_ln_s='cp -p'
15430   else
15431     as_ln_s='ln -s'
15432   fi
15433 elif ln conf$$.file conf$$ 2>/dev/null; then
15434   as_ln_s=ln
15435 else
15436   as_ln_s='cp -p'
15437 fi
15438 rm -f conf$$ conf$$.exe conf$$.file
15439
15440 as_executable_p="test -f"
15441
15442 # Support unset when possible.
15443 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15444   as_unset=unset
15445 else
15446   as_unset=false
15447 fi
15448
15449 # NLS nuisances.
15450 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15451 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15452 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15453 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15454 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15455 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15456 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15457 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15458
15459 # IFS
15460 # We need space, tab and new line, in precisely that order.
15461 as_nl='
15462 '
15463 IFS="   $as_nl"
15464
15465 # CDPATH.
15466 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15467
15468 exec 6>&1
15469
15470 _ACEOF
15471
15472 # Files that config.status was made for.
15473 if test -n "$ac_config_files"; then
15474   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15475 fi
15476
15477 if test -n "$ac_config_headers"; then
15478   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15479 fi
15480
15481 if test -n "$ac_config_links"; then
15482   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15483 fi
15484
15485 if test -n "$ac_config_commands"; then
15486   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15487 fi
15488
15489 cat >>$CONFIG_STATUS <<\EOF
15490
15491 ac_cs_usage="\
15492 \`$as_me' instantiates files from templates according to the
15493 current configuration.
15494
15495 Usage: $0 [OPTIONS] [FILE]...
15496
15497   -h, --help       print this help, then exit
15498   -V, --version    print version number, then exit
15499   -d, --debug      don't remove temporary files
15500       --recheck    update $as_me by reconfiguring in the same conditions
15501   --file=FILE[:TEMPLATE]
15502                    instantiate the configuration file FILE
15503   --header=FILE[:TEMPLATE]
15504                    instantiate the configuration header FILE
15505
15506 Configuration files:
15507 $config_files
15508
15509 Configuration headers:
15510 $config_headers
15511
15512 Configuration commands:
15513 $config_commands
15514
15515 Report bugs to <bug-autoconf@gnu.org>."
15516 EOF
15517
15518 cat >>$CONFIG_STATUS <<EOF
15519 ac_cs_version="\\
15520 config.status
15521 configured by $0, generated by GNU Autoconf 2.52.20061216,
15522   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15523
15524 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15525 Free Software Foundation, Inc.
15526 This config.status script is free software; the Free Software Foundation
15527 gives unlimited permission to copy, distribute and modify it."
15528 srcdir=$srcdir
15529 INSTALL="$INSTALL"
15530 EOF
15531
15532 cat >>$CONFIG_STATUS <<\EOF
15533 # If no file are specified by the user, then we need to provide default
15534 # value.  By we need to know if files were specified by the user.
15535 ac_need_defaults=:
15536 while test $# != 0
15537 do
15538   case $1 in
15539   --*=*)
15540     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15541     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15542     shift
15543     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15544     shift
15545     ;;
15546   -*);;
15547   *) # This is not an option, so the user has probably given explicit
15548      # arguments.
15549      ac_need_defaults=false;;
15550   esac
15551
15552   case $1 in
15553   # Handling of the options.
15554 EOF
15555 cat >>$CONFIG_STATUS <<EOF
15556   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15557     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15558     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15559 EOF
15560 cat >>$CONFIG_STATUS <<\EOF
15561   --version | --vers* | -V )
15562     echo "$ac_cs_version"; exit 0 ;;
15563   --he | --h)
15564     # Conflict between --help and --header
15565     { { echo "$as_me:15565: error: ambiguous option: $1
15566 Try \`$0 --help' for more information." >&5
15567 echo "$as_me: error: ambiguous option: $1
15568 Try \`$0 --help' for more information." >&2;}
15569    { (exit 1); exit 1; }; };;
15570   --help | --hel | -h )
15571     echo "$ac_cs_usage"; exit 0 ;;
15572   --debug | --d* | -d )
15573     debug=: ;;
15574   --file | --fil | --fi | --f )
15575     shift
15576     CONFIG_FILES="$CONFIG_FILES $1"
15577     ac_need_defaults=false;;
15578   --header | --heade | --head | --hea )
15579     shift
15580     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15581     ac_need_defaults=false;;
15582
15583   # This is an error.
15584   -*) { { echo "$as_me:15584: error: unrecognized option: $1
15585 Try \`$0 --help' for more information." >&5
15586 echo "$as_me: error: unrecognized option: $1
15587 Try \`$0 --help' for more information." >&2;}
15588    { (exit 1); exit 1; }; } ;;
15589
15590   *) ac_config_targets="$ac_config_targets $1" ;;
15591
15592   esac
15593   shift
15594 done
15595
15596 exec 5>>config.log
15597 cat >&5 << _ACEOF
15598
15599 ## ----------------------- ##
15600 ## Running config.status.  ##
15601 ## ----------------------- ##
15602
15603 This file was extended by $as_me 2.52.20061216, executed with
15604   CONFIG_FILES    = $CONFIG_FILES
15605   CONFIG_HEADERS  = $CONFIG_HEADERS
15606   CONFIG_LINKS    = $CONFIG_LINKS
15607   CONFIG_COMMANDS = $CONFIG_COMMANDS
15608   > $ac_cs_invocation
15609 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15610
15611 _ACEOF
15612 EOF
15613
15614 cat >>$CONFIG_STATUS <<EOF
15615 #
15616 # INIT-COMMANDS section.
15617 #
15618
15619 ### Special initialization commands, used to pass information from the
15620 ### configuration-run into config.status
15621
15622 AWK="$AWK"
15623 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15624 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15625 ECHO_LINK="$ECHO_LINK"
15626 LDCONFIG="$LDCONFIG"
15627 LIB_NAME="$LIB_NAME"
15628 LIB_SUBSETS="$LIB_SUBSETS"
15629 LIB_SUFFIX="$LIB_SUFFIX"
15630 LIB_TRACING="$LIB_TRACING"
15631 MAKE_TERMINFO="$MAKE_TERMINFO"
15632 NCURSES_MAJOR="$NCURSES_MAJOR"
15633 NCURSES_MINOR="$NCURSES_MINOR"
15634 NCURSES_OSPEED="$NCURSES_OSPEED"
15635 NCURSES_PATCH="$NCURSES_PATCH"
15636 SRC_SUBDIRS="$SRC_SUBDIRS"
15637 TERMINFO="$TERMINFO"
15638 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15639 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15640 TINFO_NAME="$TINFO_NAME"
15641 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
15642 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
15643 TICS_NAME="$TICS_NAME"
15644 WITH_CURSES_H="$with_curses_h"
15645 WITH_ECHO="$with_echo"
15646 WITH_OVERWRITE="$with_overwrite"
15647 cf_LIST_MODELS="$cf_list_models"
15648 cf_cv_abi_version="$cf_cv_abi_version"
15649 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15650 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15651 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15652 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15653 cf_cv_rel_version="$cf_cv_rel_version"
15654 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15655 cf_cv_shlib_version="$cf_cv_shlib_version"
15656 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15657 cf_cv_system_name="$cf_cv_system_name"
15658 cf_with_cxx_binding="$cf_with_cxx_binding"
15659 host="$host"
15660 target="$target"
15661
15662 EOF
15663
15664 cat >>$CONFIG_STATUS <<\EOF
15665 for ac_config_target in $ac_config_targets
15666 do
15667   case "$ac_config_target" in
15668   # Handling of arguments.
15669   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15670   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15671   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15672   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15673   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15674   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15675   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15676   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15677   *) { { echo "$as_me:15677: error: invalid argument: $ac_config_target" >&5
15678 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15679    { (exit 1); exit 1; }; };;
15680   esac
15681 done
15682
15683 # If the user did not use the arguments to specify the items to instantiate,
15684 # then the envvar interface is used.  Set only those that are not.
15685 # We use the long form for the default assignment because of an extremely
15686 # bizarre bug on SunOS 4.1.3.
15687 if $ac_need_defaults; then
15688   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15689   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15690   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15691 fi
15692
15693 # Create a temporary directory, and hook for its removal unless debugging.
15694 $debug ||
15695 {
15696   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15697   trap '{ (exit 1); exit 1; }' 1 2 13 15
15698 }
15699
15700 # Create a (secure) tmp directory for tmp files.
15701 : ${TMPDIR=/tmp}
15702 {
15703   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15704   test -n "$tmp" && test -d "$tmp"
15705 }  ||
15706 {
15707   tmp=$TMPDIR/cs$$-$RANDOM
15708   (umask 077 && mkdir $tmp)
15709 } ||
15710 {
15711    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15712    { (exit 1); exit 1; }
15713 }
15714
15715 EOF
15716
15717 cat >>$CONFIG_STATUS <<EOF
15718
15719 #
15720 # CONFIG_FILES section.
15721 #
15722
15723 # No need to generate the scripts if there are no CONFIG_FILES.
15724 # This happens for instance when ./config.status config.h
15725 if test -n "\$CONFIG_FILES"; then
15726   # Protect against being on the right side of a sed subst in config.status.
15727   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15728    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15729 s,@SHELL@,$SHELL,;t t
15730 s,@exec_prefix@,$exec_prefix,;t t
15731 s,@prefix@,$prefix,;t t
15732 s,@program_transform_name@,$program_transform_name,;t t
15733 s,@bindir@,$bindir,;t t
15734 s,@sbindir@,$sbindir,;t t
15735 s,@libexecdir@,$libexecdir,;t t
15736 s,@datadir@,$datadir,;t t
15737 s,@sysconfdir@,$sysconfdir,;t t
15738 s,@sharedstatedir@,$sharedstatedir,;t t
15739 s,@localstatedir@,$localstatedir,;t t
15740 s,@libdir@,$libdir,;t t
15741 s,@includedir@,$includedir,;t t
15742 s,@oldincludedir@,$oldincludedir,;t t
15743 s,@infodir@,$infodir,;t t
15744 s,@mandir@,$mandir,;t t
15745 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15746 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15747 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15748 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15749 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15750 s,@build_alias@,$build_alias,;t t
15751 s,@host_alias@,$host_alias,;t t
15752 s,@target_alias@,$target_alias,;t t
15753 s,@ECHO_C@,$ECHO_C,;t t
15754 s,@ECHO_N@,$ECHO_N,;t t
15755 s,@ECHO_T@,$ECHO_T,;t t
15756 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15757 s,@DEFS@,$DEFS,;t t
15758 s,@LIBS@,$LIBS,;t t
15759 s,@top_builddir@,$top_builddir,;t t
15760 s,@EGREP@,$EGREP,;t t
15761 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15762 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15763 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15764 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15765 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15766 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15767 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15768 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15769 s,@build@,$build,;t t
15770 s,@build_cpu@,$build_cpu,;t t
15771 s,@build_vendor@,$build_vendor,;t t
15772 s,@build_os@,$build_os,;t t
15773 s,@host@,$host,;t t
15774 s,@host_cpu@,$host_cpu,;t t
15775 s,@host_vendor@,$host_vendor,;t t
15776 s,@host_os@,$host_os,;t t
15777 s,@target@,$target,;t t
15778 s,@target_cpu@,$target_cpu,;t t
15779 s,@target_vendor@,$target_vendor,;t t
15780 s,@target_os@,$target_os,;t t
15781 s,@CC@,$CC,;t t
15782 s,@CFLAGS@,$CFLAGS,;t t
15783 s,@LDFLAGS@,$LDFLAGS,;t t
15784 s,@CPPFLAGS@,$CPPFLAGS,;t t
15785 s,@ac_ct_CC@,$ac_ct_CC,;t t
15786 s,@EXEEXT@,$EXEEXT,;t t
15787 s,@OBJEXT@,$OBJEXT,;t t
15788 s,@CPP@,$CPP,;t t
15789 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15790 s,@PROG_EXT@,$PROG_EXT,;t t
15791 s,@LDCONFIG@,$LDCONFIG,;t t
15792 s,@CXX@,$CXX,;t t
15793 s,@CXXFLAGS@,$CXXFLAGS,;t t
15794 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15795 s,@AWK@,$AWK,;t t
15796 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15797 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15798 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15799 s,@LINT@,$LINT,;t t
15800 s,@LINT_OPTS@,$LINT_OPTS,;t t
15801 s,@LN_S@,$LN_S,;t t
15802 s,@SET_MAKE@,$SET_MAKE,;t t
15803 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15804 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15805 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15806 s,@RANLIB@,$RANLIB,;t t
15807 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15808 s,@LD@,$LD,;t t
15809 s,@ac_ct_LD@,$ac_ct_LD,;t t
15810 s,@AR@,$AR,;t t
15811 s,@ac_ct_AR@,$ac_ct_AR,;t t
15812 s,@AR_OPTS@,$AR_OPTS,;t t
15813 s,@DESTDIR@,$DESTDIR,;t t
15814 s,@BUILD_CC@,$BUILD_CC,;t t
15815 s,@BUILD_CPP@,$BUILD_CPP,;t t
15816 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15817 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15818 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15819 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15820 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15821 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15822 s,@cf_list_models@,$cf_list_models,;t t
15823 s,@LIBTOOL@,$LIBTOOL,;t t
15824 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15825 s,@LIB_CREATE@,$LIB_CREATE,;t t
15826 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15827 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15828 s,@LIB_PREP@,$LIB_PREP,;t t
15829 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15830 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15831 s,@LIB_LINK@,$LIB_LINK,;t t
15832 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15833 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15834 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15835 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15836 s,@TICS_NAME@,$TICS_NAME,;t t
15837 s,@TINFO_NAME@,$TINFO_NAME,;t t
15838 s,@LIB_NAME@,$LIB_NAME,;t t
15839 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15840 s,@CC_G_OPT@,$CC_G_OPT,;t t
15841 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
15842 s,@LD_MODEL@,$LD_MODEL,;t t
15843 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15844 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15845 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15846 s,@LINK_PROGS@,$LINK_PROGS,;t t
15847 s,@LINK_TESTS@,$LINK_TESTS,;t t
15848 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15849 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15850 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15851 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15852 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
15853 s,@PATHSEP@,$PATHSEP,;t t
15854 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
15855 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
15856 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
15857 s,@TERMINFO@,$TERMINFO,;t t
15858 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
15859 s,@TERMPATH@,$TERMPATH,;t t
15860 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15861 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
15862 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
15863 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
15864 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
15865 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
15866 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
15867 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
15868 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
15869 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
15870 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
15871 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
15872 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
15873 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
15874 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
15875 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15876 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15877 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
15878 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
15879 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
15880 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
15881 s,@ECHO_LINK@,$ECHO_LINK,;t t
15882 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15883 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
15884 s,@ADA_TRACE@,$ADA_TRACE,;t t
15885 s,@MATH_LIB@,$MATH_LIB,;t t
15886 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
15887 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
15888 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
15889 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
15890 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
15891 s,@CXXCPP@,$CXXCPP,;t t
15892 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
15893 s,@CXX_AR@,$CXX_AR,;t t
15894 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
15895 s,@CXXLIBS@,$CXXLIBS,;t t
15896 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
15897 s,@gnat_exists@,$gnat_exists,;t t
15898 s,@M4_exists@,$M4_exists,;t t
15899 s,@cf_ada_make@,$cf_ada_make,;t t
15900 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15901 s,@cf_ada_package@,$cf_ada_package,;t t
15902 s,@ADAFLAGS@,$ADAFLAGS,;t t
15903 s,@cf_compile_generics@,$cf_compile_generics,;t t
15904 s,@cf_generic_objects@,$cf_generic_objects,;t t
15905 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
15906 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15907 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15908 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15909 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15910 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15911 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15912 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
15913 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
15914 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
15915 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
15916 s,@TICS_ARGS@,$TICS_ARGS,;t t
15917 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
15918 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
15919 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
15920 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15921 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
15922 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
15923 s,@TINFO_LIST@,$TINFO_LIST,;t t
15924 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
15925 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15926 s,@TEST_ARGS@,$TEST_ARGS,;t t
15927 s,@TEST_DEPS@,$TEST_DEPS,;t t
15928 s,@TEST_ARG2@,$TEST_ARG2,;t t
15929 s,@TEST_DEP2@,$TEST_DEP2,;t t
15930 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15931 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
15932 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
15933 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
15934 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
15935 CEOF
15936
15937 EOF
15938
15939   cat >>$CONFIG_STATUS <<\EOF
15940   # Split the substitutions into bite-sized pieces for seds with
15941   # small command number limits, like on Digital OSF/1 and HP-UX.
15942   ac_max_sed_lines=48
15943   ac_sed_frag=1 # Number of current file.
15944   ac_beg=1 # First line for current file.
15945   ac_end=$ac_max_sed_lines # Line after last line for current file.
15946   ac_more_lines=:
15947   ac_sed_cmds=
15948   while $ac_more_lines; do
15949     if test $ac_beg -gt 1; then
15950       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15951     else
15952       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15953     fi
15954     if test ! -s $tmp/subs.frag; then
15955       ac_more_lines=false
15956     else
15957       # The purpose of the label and of the branching condition is to
15958       # speed up the sed processing (if there are no `@' at all, there
15959       # is no need to browse any of the substitutions).
15960       # These are the two extra sed commands mentioned above.
15961       (echo ':t
15962   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15963       if test -z "$ac_sed_cmds"; then
15964         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15965       else
15966         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15967       fi
15968       ac_sed_frag=`expr $ac_sed_frag + 1`
15969       ac_beg=$ac_end
15970       ac_end=`expr $ac_end + $ac_max_sed_lines`
15971     fi
15972   done
15973   if test -z "$ac_sed_cmds"; then
15974     ac_sed_cmds=cat
15975   fi
15976 fi # test -n "$CONFIG_FILES"
15977
15978 EOF
15979 cat >>$CONFIG_STATUS <<\EOF
15980 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15981   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15982   case $ac_file in
15983   - | *:- | *:-:* ) # input from stdin
15984         cat >$tmp/stdin
15985         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15986         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15987   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15988         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15989   * )   ac_file_in=$ac_file.in ;;
15990   esac
15991
15992   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15993   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15994          X"$ac_file" : 'X\(//\)[^/]' \| \
15995          X"$ac_file" : 'X\(//\)$' \| \
15996          X"$ac_file" : 'X\(/\)' \| \
15997          .     : '\(.\)' 2>/dev/null ||
15998 echo X"$ac_file" |
15999     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16000           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16001           /^X\(\/\/\)$/{ s//\1/; q; }
16002           /^X\(\/\).*/{ s//\1/; q; }
16003           s/.*/./; q'`
16004   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16005     { case "$ac_dir" in
16006   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16007   *)                      as_incr_dir=.;;
16008 esac
16009 as_dummy="$ac_dir"
16010 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16011   case $as_mkdir_dir in
16012     # Skip DOS drivespec
16013     ?:) as_incr_dir=$as_mkdir_dir ;;
16014     *)
16015       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16016       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16017     ;;
16018   esac
16019 done; }
16020
16021     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16022     # A "../" for each directory in $ac_dir_suffix.
16023     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16024   else
16025     ac_dir_suffix= ac_dots=
16026   fi
16027
16028   case $srcdir in
16029   .)  ac_srcdir=.
16030       if test -z "$ac_dots"; then
16031          ac_top_srcdir=.
16032       else
16033          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16034       fi ;;
16035   [\\/]* | ?:[\\/]* )
16036       ac_srcdir=$srcdir$ac_dir_suffix;
16037       ac_top_srcdir=$srcdir ;;
16038   *) # Relative path.
16039     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16040     ac_top_srcdir=$ac_dots$srcdir ;;
16041   esac
16042
16043   case $INSTALL in
16044   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16045   *) ac_INSTALL=$ac_dots$INSTALL ;;
16046   esac
16047
16048   if test x"$ac_file" != x-; then
16049     { echo "$as_me:16049: creating $ac_file" >&5
16050 echo "$as_me: creating $ac_file" >&6;}
16051     rm -f "$ac_file"
16052   fi
16053   # Let's still pretend it is `configure' which instantiates (i.e., don't
16054   # use $as_me), people would be surprised to read:
16055   #    /* config.h.  Generated automatically by config.status.  */
16056   configure_input="Generated automatically from `echo $ac_file_in |
16057                                                  sed 's,.*/,,'` by configure."
16058
16059   # First look for the input files in the build tree, otherwise in the
16060   # src tree.
16061   ac_file_inputs=`IFS=:
16062     for f in $ac_file_in; do
16063       case $f in
16064       -) echo $tmp/stdin ;;
16065       [\\/$]*)
16066          # Absolute (can't be DOS-style, as IFS=:)
16067          test -f "$f" || { { echo "$as_me:16067: error: cannot find input file: $f" >&5
16068 echo "$as_me: error: cannot find input file: $f" >&2;}
16069    { (exit 1); exit 1; }; }
16070          echo $f;;
16071       *) # Relative
16072          if test -f "$f"; then
16073            # Build tree
16074            echo $f
16075          elif test -f "$srcdir/$f"; then
16076            # Source tree
16077            echo $srcdir/$f
16078          else
16079            # /dev/null tree
16080            { { echo "$as_me:16080: error: cannot find input file: $f" >&5
16081 echo "$as_me: error: cannot find input file: $f" >&2;}
16082    { (exit 1); exit 1; }; }
16083          fi;;
16084       esac
16085     done` || { (exit 1); exit 1; }
16086 EOF
16087 cat >>$CONFIG_STATUS <<EOF
16088   sed "$ac_vpsub
16089 $extrasub
16090 EOF
16091 cat >>$CONFIG_STATUS <<\EOF
16092 :t
16093 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16094 s,@configure_input@,$configure_input,;t t
16095 s,@srcdir@,$ac_srcdir,;t t
16096 s,@top_srcdir@,$ac_top_srcdir,;t t
16097 s,@INSTALL@,$ac_INSTALL,;t t
16098 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16099   rm -f $tmp/stdin
16100   if test x"$ac_file" != x-; then
16101     mv $tmp/out $ac_file
16102   else
16103     cat $tmp/out
16104     rm -f $tmp/out
16105   fi
16106
16107 done
16108 EOF
16109 cat >>$CONFIG_STATUS <<\EOF
16110
16111 #
16112 # CONFIG_HEADER section.
16113 #
16114
16115 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16116 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16117 #
16118 # ac_d sets the value in "#define NAME VALUE" lines.
16119 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16120 ac_dB='[        ].*$,\1#\2'
16121 ac_dC=' '
16122 ac_dD=',;t'
16123 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16124 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16125 ac_iB='\([      ]\),\1#\2define\3'
16126 ac_iC=' '
16127 ac_iD='\4,;t'
16128 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16129 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16130 ac_uB='$,\1#\2define\3'
16131 ac_uC=' '
16132 ac_uD=',;t'
16133
16134 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16135   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16136   case $ac_file in
16137   - | *:- | *:-:* ) # input from stdin
16138         cat >$tmp/stdin
16139         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16140         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16141   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16142         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16143   * )   ac_file_in=$ac_file.in ;;
16144   esac
16145
16146   test x"$ac_file" != x- && { echo "$as_me:16146: creating $ac_file" >&5
16147 echo "$as_me: creating $ac_file" >&6;}
16148
16149   # First look for the input files in the build tree, otherwise in the
16150   # src tree.
16151   ac_file_inputs=`IFS=:
16152     for f in $ac_file_in; do
16153       case $f in
16154       -) echo $tmp/stdin ;;
16155       [\\/$]*)
16156          # Absolute (can't be DOS-style, as IFS=:)
16157          test -f "$f" || { { echo "$as_me:16157: error: cannot find input file: $f" >&5
16158 echo "$as_me: error: cannot find input file: $f" >&2;}
16159    { (exit 1); exit 1; }; }
16160          echo $f;;
16161       *) # Relative
16162          if test -f "$f"; then
16163            # Build tree
16164            echo $f
16165          elif test -f "$srcdir/$f"; then
16166            # Source tree
16167            echo $srcdir/$f
16168          else
16169            # /dev/null tree
16170            { { echo "$as_me:16170: error: cannot find input file: $f" >&5
16171 echo "$as_me: error: cannot find input file: $f" >&2;}
16172    { (exit 1); exit 1; }; }
16173          fi;;
16174       esac
16175     done` || { (exit 1); exit 1; }
16176   # Remove the trailing spaces.
16177   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16178
16179 EOF
16180
16181 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16182 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16183 # be either 'cat' or 'sort'.
16184 cat confdefs.h | uniq >conftest.vals
16185
16186 # Break up conftest.vals because some shells have a limit on
16187 # the size of here documents, and old seds have small limits too.
16188
16189 rm -f conftest.tail
16190 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16191 while grep . conftest.vals >/dev/null
16192 do
16193   # Write chunks of a limited-size here document to conftest.frag.
16194   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16195   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16196   echo 'CEOF' >> $CONFIG_STATUS
16197   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16198   rm -f conftest.vals
16199   mv conftest.tail conftest.vals
16200 done
16201 rm -f conftest.vals
16202
16203 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16204 # marker @DEFS@.
16205 echo '  cat >> conftest.edit <<CEOF
16206 /@DEFS@/r conftest.frag
16207 /@DEFS@/d
16208 CEOF
16209 sed -f conftest.edit $tmp/in > $tmp/out
16210 rm -f $tmp/in
16211 mv $tmp/out $tmp/in
16212 rm -f conftest.edit conftest.frag
16213 ' >> $CONFIG_STATUS
16214
16215 cat >>$CONFIG_STATUS <<\EOF
16216   # Let's still pretend it is `configure' which instantiates (i.e., don't
16217   # use $as_me), people would be surprised to read:
16218   #    /* config.h.  Generated automatically by config.status.  */
16219   if test x"$ac_file" = x-; then
16220     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16221   else
16222     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16223   fi
16224   cat $tmp/in >>$tmp/config.h
16225   rm -f $tmp/in
16226   if test x"$ac_file" != x-; then
16227     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16228       { echo "$as_me:16228: $ac_file is unchanged" >&5
16229 echo "$as_me: $ac_file is unchanged" >&6;}
16230     else
16231       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16232          X"$ac_file" : 'X\(//\)[^/]' \| \
16233          X"$ac_file" : 'X\(//\)$' \| \
16234          X"$ac_file" : 'X\(/\)' \| \
16235          .     : '\(.\)' 2>/dev/null ||
16236 echo X"$ac_file" |
16237     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16238           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16239           /^X\(\/\/\)$/{ s//\1/; q; }
16240           /^X\(\/\).*/{ s//\1/; q; }
16241           s/.*/./; q'`
16242       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16243         { case "$ac_dir" in
16244   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16245   *)                      as_incr_dir=.;;
16246 esac
16247 as_dummy="$ac_dir"
16248 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16249   case $as_mkdir_dir in
16250     # Skip DOS drivespec
16251     ?:) as_incr_dir=$as_mkdir_dir ;;
16252     *)
16253       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16254       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16255     ;;
16256   esac
16257 done; }
16258
16259       fi
16260       rm -f $ac_file
16261       mv $tmp/config.h $ac_file
16262     fi
16263   else
16264     cat $tmp/config.h
16265     rm -f $tmp/config.h
16266   fi
16267 done
16268 EOF
16269 cat >>$CONFIG_STATUS <<\EOF
16270
16271 #
16272 # CONFIG_COMMANDS section.
16273 #
16274 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16275   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16276   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16277
16278   case $ac_dest in
16279     default )
16280
16281 for cf_dir in test
16282 do
16283         if test ! -d $srcdir/$cf_dir; then
16284                 continue
16285         elif test -f $srcdir/$cf_dir/programs; then
16286                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16287         fi
16288 done
16289
16290         case $cf_cv_system_name in
16291         OS/2*)  LIB_PREFIX=''     ;;
16292         os2*)   LIB_PREFIX=''     ;;
16293         *)      LIB_PREFIX='lib'  ;;
16294         esac
16295 cf_prefix=$LIB_PREFIX
16296
16297 for cf_dir in $SRC_SUBDIRS
16298 do
16299         if test ! -d $srcdir/$cf_dir ; then
16300                 continue
16301         elif test -f $srcdir/$cf_dir/modules; then
16302
16303                 IMPORT_LIB=
16304                 SHARED_LIB=
16305                 LIBS_TO_MAKE=
16306                 for cf_item in $cf_LIST_MODELS
16307                 do
16308
16309         case $cf_item in
16310         libtool) cf_suffix='.la'  ;;
16311         normal)  cf_suffix='.a'   ;;
16312         debug)   cf_suffix='_g.a' ;;
16313         profile) cf_suffix='_p.a' ;;
16314         shared)
16315                 case $cf_cv_system_name in
16316                 cygwin*) cf_suffix='.dll' ;;
16317                 darwin*) cf_suffix='.dylib' ;;
16318                 hpux*)
16319                         case $target in
16320                         ia64*)  cf_suffix='.so' ;;
16321                         *)      cf_suffix='.sl' ;;
16322                         esac
16323                         ;;
16324                 *)      cf_suffix='.so'  ;;
16325                 esac
16326         esac
16327         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16328
16329                         if test $cf_item = shared ; then
16330                         if test "$cf_cv_do_symlinks" = yes ; then
16331                                 case "$cf_cv_shlib_version" in #(vi
16332                                 rel) #(vi
16333                                         case "$cf_cv_system_name" in #(vi
16334                                         darwin*)
16335                                         case .${LIB_SUFFIX} in
16336                                         .w*)
16337                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16338                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16339                                                 ;;
16340                                         *)
16341                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16342                                                 ;;
16343                                         esac
16344                                         ;; #(vi
16345                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16346                                         esac
16347                                         ;;
16348                                 abi)
16349                                         case "$cf_cv_system_name" in #(vi
16350                                         darwin*)
16351                                         case .${LIB_SUFFIX} in
16352                                         .w*)
16353                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16354                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16355                                                 ;;
16356                                         *)
16357                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16358                                                 ;;
16359                                         esac
16360                                         ;; #(vi
16361                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16362                                         esac
16363                                         ;;
16364                                 esac
16365                         fi
16366                         # cygwin needs import library, and has unique naming convention
16367                         # use autodetected ${cf_prefix} for import lib and static lib, but
16368                         # use 'cyg' prefix for shared lib.
16369                         if test $cf_cv_shlib_version = cygdll ; then
16370                                 SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
16371                                 IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
16372                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
16373                                 continue
16374                         fi
16375                         fi
16376                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16377                 done
16378
16379                 if test $cf_dir = ncurses ; then
16380                         cf_subsets="$LIB_SUBSETS"
16381                         cf_r_parts="$cf_subsets"
16382
16383                         while test -n "$cf_r_parts"
16384                         do
16385                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16386                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16387                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16388                                         case $cf_l_parts in #(vi
16389                                         *termlib*) #(vi
16390                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16391                                                 ;;
16392                                         *ticlib*)
16393                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16394                                                 ;;
16395                                         *)
16396                                                 break
16397                                                 ;;
16398                                         esac
16399                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16400                                 else
16401                                         break
16402                                 fi
16403                         done
16404                 else
16405                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16406                 fi
16407
16408                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16409                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
16410                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16411                         $cf_dir/Makefile >$cf_dir/Makefile.out
16412                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16413
16414                 $AWK -f $srcdir/mk-0th.awk \
16415                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16416                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16417
16418                 for cf_subset in $cf_subsets
16419                 do
16420                         cf_subdirs=
16421                         for cf_item in $cf_LIST_MODELS
16422                         do
16423                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16424
16425 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16426
16427         case $cf_item in
16428         libtool) cf_suffix='.la'  ;;
16429         normal)  cf_suffix='.a'   ;;
16430         debug)   cf_suffix='_g.a' ;;
16431         profile) cf_suffix='_p.a' ;;
16432         shared)
16433                 case $cf_cv_system_name in
16434                 cygwin*) cf_suffix='.dll' ;;
16435                 darwin*) cf_suffix='.dylib' ;;
16436                 hpux*)
16437                         case $target in
16438                         ia64*)  cf_suffix='.so' ;;
16439                         *)      cf_suffix='.sl' ;;
16440                         esac
16441                         ;;
16442                 *)      cf_suffix='.so'  ;;
16443                 esac
16444         esac
16445         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16446
16447         case $cf_item in
16448         libtool) cf_subdir='obj_lo'  ;;
16449         normal)  cf_subdir='objects' ;;
16450         debug)   cf_subdir='obj_g' ;;
16451         profile) cf_subdir='obj_p' ;;
16452         shared)
16453                 case $cf_cv_system_name in #(vi
16454                 cygwin) #(vi
16455                         cf_subdir='objects' ;;
16456                 *)
16457                         cf_subdir='obj_s' ;;
16458                 esac
16459         esac
16460
16461                         # Test for case where we build libtinfo with a different name.
16462                         cf_libname=$cf_dir
16463                         if test $cf_dir = ncurses ; then
16464                                 case $cf_subset in
16465                                 *base*)
16466                                         ;;
16467                                 *termlib*)
16468                                         cf_libname=$TINFO_LIB_SUFFIX
16469                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16470                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16471                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16472                                         fi
16473                                         ;;
16474                                 ticlib*)
16475                                         cf_libname=$TICS_LIB_SUFFIX
16476                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16477                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16478                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16479                                         fi
16480                                         ;;
16481                                 esac
16482                         fi
16483
16484                         # These dependencies really are for development, not
16485                         # builds, but they are useful in porting, too.
16486                         cf_depend="../include/ncurses_cfg.h"
16487                         if test "$srcdir" = "."; then
16488                                 cf_reldir="."
16489                         else
16490                                 cf_reldir="\${srcdir}"
16491                         fi
16492
16493                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16494                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16495                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16496                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16497                         fi
16498
16499                         cf_dir_suffix=
16500                         old_cf_suffix="$cf_suffix"
16501                         if test "$cf_cv_shlib_version_infix" = yes ; then
16502                         if test -n "$LIB_SUFFIX" ; then
16503                                 case $LIB_SUFFIX in
16504                                 w*)
16505                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16506                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16507                                         cf_dir_suffix=w
16508                                         ;;
16509                                 esac
16510                         fi
16511                         fi
16512
16513                         $AWK -f $srcdir/mk-1st.awk \
16514                                 name=${cf_libname}${cf_dir_suffix} \
16515                                 traces=$LIB_TRACING \
16516                                 MODEL=$cf_ITEM \
16517                                 model=$cf_subdir \
16518                                 prefix=$cf_prefix \
16519                                 suffix=$cf_suffix \
16520                                 subset=$cf_subset \
16521                                 ShlibVer=$cf_cv_shlib_version \
16522                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16523                                 DoLinks=$cf_cv_do_symlinks \
16524                                 rmSoLocs=$cf_cv_rm_so_locs \
16525                                 ldconfig="$LDCONFIG" \
16526                                 overwrite=$WITH_OVERWRITE \
16527                                 depend="$cf_depend" \
16528                                 host="$host" \
16529                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16530
16531                         cf_suffix="$old_cf_suffix"
16532
16533                         for cf_subdir2 in $cf_subdirs lib
16534                         do
16535                                 test $cf_subdir = $cf_subdir2 && break
16536                         done
16537                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16538                         $AWK -f $srcdir/mk-2nd.awk \
16539                                 name=$cf_dir \
16540                                 traces=$LIB_TRACING \
16541                                 MODEL=$cf_ITEM \
16542                                 model=$cf_subdir \
16543                                 subset=$cf_subset \
16544                                 srcdir=$srcdir \
16545                                 echo=$WITH_ECHO \
16546                                 crenames=$cf_cv_prog_CC_c_o \
16547                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16548                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16549                         cf_subdirs="$cf_subdirs $cf_subdir"
16550                         done
16551                 done
16552         fi
16553
16554         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16555 done
16556
16557 for cf_dir in $SRC_SUBDIRS
16558 do
16559         if test ! -d $srcdir/$cf_dir ; then
16560                 continue
16561         fi
16562
16563         if test -f $cf_dir/Makefile ; then
16564                 case "$cf_dir" in
16565                 Ada95) #(vi
16566                         echo 'libs \' >> Makefile
16567                         echo 'install.libs \' >> Makefile
16568                         echo 'uninstall.libs ::' >> Makefile
16569                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16570                         ;;
16571                 esac
16572         fi
16573
16574         if test -f $srcdir/$cf_dir/modules; then
16575                 echo >> Makefile
16576                 if test -f $srcdir/$cf_dir/headers; then
16577 cat >> Makefile <<CF_EOF
16578 install.includes \\
16579 uninstall.includes \\
16580 CF_EOF
16581                 fi
16582 if test "$cf_dir" != "c++" ; then
16583 echo 'lint \' >> Makefile
16584 fi
16585 cat >> Makefile <<CF_EOF
16586 libs \\
16587 lintlib \\
16588 install.libs \\
16589 uninstall.libs \\
16590 install.$cf_dir \\
16591 uninstall.$cf_dir ::
16592         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16593 CF_EOF
16594         elif test -f $srcdir/$cf_dir/headers; then
16595 cat >> Makefile <<CF_EOF
16596
16597 libs \\
16598 install.libs \\
16599 uninstall.libs \\
16600 install.includes \\
16601 uninstall.includes ::
16602         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16603 CF_EOF
16604 fi
16605 done
16606
16607 cat >> Makefile <<CF_EOF
16608
16609 install.libs uninstall.libs \\
16610 install.data uninstall.data ::
16611 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16612
16613 install.man \\
16614 uninstall.man ::
16615         cd man && \${MAKE} \${CF_MFLAGS} \$@
16616
16617 distclean ::
16618         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16619         rm -f headers.sh headers.sed
16620         rm -rf \${DIRS_TO_MAKE}
16621 CF_EOF
16622
16623 # Special case: tack's manpage lives in its own directory.
16624 if test -d tack ; then
16625 if test -f $srcdir/$tack.h; then
16626 cat >> Makefile <<CF_EOF
16627
16628 install.man \\
16629 uninstall.man ::
16630         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16631 CF_EOF
16632 fi
16633 fi
16634
16635 rm -f headers.sed headers.sh
16636
16637 echo creating headers.sh
16638 cat >headers.sh <<CF_EOF
16639 #! /bin/sh
16640 # This shell script is generated by the 'configure' script.  It is invoked in a
16641 # subdirectory of the build tree.  It generates a sed-script in the parent
16642 # directory that is used to adjust includes for header files that reside in a
16643 # subdirectory of /usr/include, etc.
16644 PRG=""
16645 while test \$# != 3
16646 do
16647 PRG="\$PRG \$1"; shift
16648 done
16649 DST=\$1
16650 REF=\$2
16651 SRC=\$3
16652 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16653 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16654 echo installing \$SRC in \$DST
16655 CF_EOF
16656
16657 if test $WITH_CURSES_H = yes; then
16658         cat >>headers.sh <<CF_EOF
16659 case \$DST in
16660 /*/include/*)
16661         END=\`basename \$DST\`
16662         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16663         do
16664                 NAME=\`basename \$i\`
16665                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16666         done
16667         ;;
16668 *)
16669         echo "" >> \$TMPSED
16670         ;;
16671 esac
16672 CF_EOF
16673
16674 else
16675         cat >>headers.sh <<CF_EOF
16676 case \$DST in
16677 /*/include/*)
16678         END=\`basename \$DST\`
16679         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16680         do
16681                 NAME=\`basename \$i\`
16682                 if test "\$NAME" = "curses.h"
16683                 then
16684                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16685                         NAME=ncurses.h
16686                 fi
16687                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16688         done
16689         ;;
16690 *)
16691         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16692         ;;
16693 esac
16694 CF_EOF
16695 fi
16696 cat >>headers.sh <<CF_EOF
16697 rm -f \$TMPSRC
16698 sed -f \$TMPSED \$SRC > \$TMPSRC
16699 NAME=\`basename \$SRC\`
16700 CF_EOF
16701 if test $WITH_CURSES_H != yes; then
16702         cat >>headers.sh <<CF_EOF
16703 test "\$NAME" = "curses.h" && NAME=ncurses.h
16704 CF_EOF
16705 fi
16706 cat >>headers.sh <<CF_EOF
16707 # Just in case someone gzip'd manpages, remove the conflicting copy.
16708 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16709
16710 eval \$PRG \$TMPSRC \$DST/\$NAME
16711 rm -f \$TMPSRC \$TMPSED
16712 CF_EOF
16713
16714 chmod 0755 headers.sh
16715
16716 for cf_dir in $SRC_SUBDIRS
16717 do
16718         if test ! -d $srcdir/$cf_dir ; then
16719                 continue
16720         fi
16721
16722         if test -f $srcdir/$cf_dir/headers; then
16723                 $AWK -f $srcdir/mk-hdr.awk \
16724                         subset="$LIB_SUBSETS" \
16725                         compat="$WITH_CURSES_H" \
16726                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
16727         fi
16728
16729         if test -f $srcdir/$cf_dir/modules; then
16730                 if test "$cf_dir" != "c++" ; then
16731                         cat >>$cf_dir/Makefile <<"CF_EOF"
16732 depend : ${AUTO_SRC}
16733         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16734
16735 # DO NOT DELETE THIS LINE -- make depend depends on it.
16736 CF_EOF
16737                 fi
16738         fi
16739 done
16740
16741  ;;
16742   esac
16743 done
16744 EOF
16745
16746 cat >>$CONFIG_STATUS <<\EOF
16747
16748 { (exit 0); exit 0; }
16749 EOF
16750 chmod +x $CONFIG_STATUS
16751 ac_clean_files=$ac_clean_files_save
16752
16753 # configure is writing to config.log, and then calls config.status.
16754 # config.status does its own redirection, appending to config.log.
16755 # Unfortunately, on DOS this fails, as config.log is still kept open
16756 # by configure, so config.status won't be able to write to it; its
16757 # output is simply discarded.  So we exec the FD to /dev/null,
16758 # effectively closing config.log, so it can be properly (re)opened and
16759 # appended to by config.status.  When coming back to configure, we
16760 # need to make the FD available again.
16761 if test "$no_create" != yes; then
16762   ac_cs_success=:
16763   exec 5>/dev/null
16764   $SHELL $CONFIG_STATUS || ac_cs_success=false
16765   exec 5>>config.log
16766   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16767   # would make configure fail if this is the last instruction.
16768   $ac_cs_success || { (exit 1); exit 1; }
16769 fi
16770 ${MAKE-make} preinstall