]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20080705
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.435 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
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   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --with-bool=TYPE        override fallback type of bool variable
750   --with-caps=alt         compile with alternate Caps file
751   --with-chtype=TYPE      override type of chtype
752   --with-ospeed=TYPE      override type of ospeed variable
753   --with-mmask-t=TYPE     override type of mmask_t
754   --with-rcs-ids          compile-in RCS identifiers
755 Options to Specify How Manpages are Installed:
756   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
757                           optionally formatted/catonly, e.g., gzip,formatted
758   --with-manpage-renames  specify manpage-renaming
759   --with-manpage-aliases  specify manpage-aliases using .so
760   --with-manpage-symlinks specify manpage-aliases using symlinks
761   --with-manpage-tbl      specify manpage processing with tbl
762 Extensions:
763   --disable-ext-funcs     disable function-extensions
764   --enable-const          compile with extra/non-standard const
765   --enable-ext-colors     compile for 256-color support
766   --enable-ext-mouse      compile for extended mouse-encoding
767   --enable-no-padding     compile with $NCURSES_NO_PADDING code
768   --enable-signed-char    compile using signed Boolean's in term.h
769   --enable-sigwinch       compile with SIGWINCH handler
770   --enable-tcap-names     compile with user-definable terminal capabilities
771 Development Code:
772   --without-develop       disable development options
773   --enable-hard-tabs      compile with hard-tabs code
774   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
775 Experimental Code:
776   --disable-assumed-color do not assume anything about default-colors
777   --disable-hashmap       compile without hashmap scrolling-optimization
778   --enable-colorfgbg      compile with $COLORFGBG code
779   --with-pthread          use POSIX thread library
780   --enable-reentrant      compile with experimental reentrant code
781   --enable-safe-sprintf   compile with experimental safe-sprintf code
782   --disable-scroll-hints  compile without scroll-hints code
783   --enable-wgetch-events  compile with experimental wgetch-events code
784 Testing/development Options:
785   --enable-echo           build: display "compiling" commands (default)
786   --enable-warnings       build: turn on GCC compiler warnings
787   --enable-assertions     test: turn on generation of assertion code
788   --with-dmalloc          test: use Gray Watson's dmalloc library
789   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
790   --with-valgrind         test: use valgrind
791   --disable-leaks         test: free permanent memory, analyze leaks
792   --enable-expanded       test: generate functions for certain macros
793   --disable-macros        test: use functions rather than macros
794   --with-trace            test: add trace() function to all models of ncurses
795 Ada95 Binding Options:
796   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
797   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
798   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
799
800 Some influential environment variables:
801   CC          C compiler command
802   CFLAGS      C compiler flags
803   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
804               nonstandard directory <lib dir>
805   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
806               headers in a nonstandard directory <include dir>
807   CPP         C preprocessor
808   CXX         C++ compiler command
809   CXXFLAGS    C++ compiler flags
810   CXXCPP      C++ preprocessor
811
812 Use these variables to override the choices made by `configure' or to help
813 it to find libraries and programs with nonstandard names/locations.
814
815 EOF
816 fi
817
818 if test "$ac_init_help" = "recursive"; then
819   # If there are subdirs, report their specific --help.
820   ac_popdir=`pwd`
821   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
822     cd $ac_subdir
823     # A "../" for each directory in /$ac_subdir.
824     ac_dots=`echo $ac_subdir |
825              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
826
827     case $srcdir in
828     .) # No --srcdir option.  We are building in place.
829       ac_sub_srcdir=$srcdir ;;
830     [\\/]* | ?:[\\/]* ) # Absolute path.
831       ac_sub_srcdir=$srcdir/$ac_subdir ;;
832     *) # Relative path.
833       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
834     esac
835
836     # Check for guested configure; otherwise get Cygnus style configure.
837     if test -f $ac_sub_srcdir/configure.gnu; then
838       echo
839       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
840     elif test -f $ac_sub_srcdir/configure; then
841       echo
842       $SHELL $ac_sub_srcdir/configure  --help=recursive
843     elif test -f $ac_sub_srcdir/configure.ac ||
844            test -f $ac_sub_srcdir/configure.in; then
845       echo
846       $ac_configure --help
847     else
848       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
849     fi
850     cd $ac_popdir
851   done
852 fi
853
854 test -n "$ac_init_help" && exit 0
855 if $ac_init_version; then
856   cat <<\EOF
857
858 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
859 Free Software Foundation, Inc.
860 This configure script is free software; the Free Software Foundation
861 gives unlimited permission to copy, distribute and modify it.
862 EOF
863   exit 0
864 fi
865 exec 5>config.log
866 cat >&5 <<EOF
867 This file contains any messages produced by compilers while
868 running configure, to aid debugging if configure makes a mistake.
869
870 It was created by $as_me, which was
871 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
872
873   $ $0 $@
874
875 EOF
876 {
877 cat <<_ASUNAME
878 ## ---------- ##
879 ## Platform.  ##
880 ## ---------- ##
881
882 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
883 uname -m = `(uname -m) 2>/dev/null || echo unknown`
884 uname -r = `(uname -r) 2>/dev/null || echo unknown`
885 uname -s = `(uname -s) 2>/dev/null || echo unknown`
886 uname -v = `(uname -v) 2>/dev/null || echo unknown`
887
888 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
889 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
890
891 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
892 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
893 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
894 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
895 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
896 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
897 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
898
899 PATH = $PATH
900
901 _ASUNAME
902 } >&5
903
904 cat >&5 <<EOF
905 ## ------------ ##
906 ## Core tests.  ##
907 ## ------------ ##
908
909 EOF
910
911 # Keep a trace of the command line.
912 # Strip out --no-create and --no-recursion so they do not pile up.
913 # Also quote any args containing shell meta-characters.
914 ac_configure_args=
915 ac_sep=
916 for ac_arg
917 do
918   case $ac_arg in
919   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
920   | --no-cr | --no-c) ;;
921   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
922   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
923   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
924     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
925     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
926     ac_sep=" " ;;
927   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
928      ac_sep=" " ;;
929   esac
930   # Get rid of the leading space.
931 done
932
933 # When interrupted or exit'd, cleanup temporary files, and complete
934 # config.log.  We remove comments because anyway the quotes in there
935 # would cause problems or look ugly.
936 trap 'exit_status=$?
937   # Save into config.log some information that might help in debugging.
938   echo >&5
939   echo "## ----------------- ##" >&5
940   echo "## Cache variables.  ##" >&5
941   echo "## ----------------- ##" >&5
942   echo >&5
943   # The following way of writing the cache mishandles newlines in values,
944 {
945   (set) 2>&1 |
946     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
947     *ac_space=\ *)
948       sed -n \
949         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
950           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
951       ;;
952     *)
953       sed -n \
954         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
955       ;;
956     esac;
957 } >&5
958   sed "/^$/d" confdefs.h >conftest.log
959   if test -s conftest.log; then
960     echo >&5
961     echo "## ------------ ##" >&5
962     echo "## confdefs.h.  ##" >&5
963     echo "## ------------ ##" >&5
964     echo >&5
965     cat conftest.log >&5
966   fi
967   (echo; echo) >&5
968   test "$ac_signal" != 0 &&
969     echo "$as_me: caught signal $ac_signal" >&5
970   echo "$as_me: exit $exit_status" >&5
971   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
972     exit $exit_status
973      ' 0
974 for ac_signal in 1 2 13 15; do
975   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
976 done
977 ac_signal=0
978
979 # confdefs.h avoids OS command line length limits that DEFS can exceed.
980 rm -rf conftest* confdefs.h
981 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
982 echo >confdefs.h
983
984 # Let the site file select an alternate cache file if it wants to.
985 # Prefer explicitly selected file to automatically selected ones.
986 if test -z "$CONFIG_SITE"; then
987   if test "x$prefix" != xNONE; then
988     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
989   else
990     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
991   fi
992 fi
993 for ac_site_file in $CONFIG_SITE; do
994   if test -r "$ac_site_file"; then
995     { echo "$as_me:995: loading site script $ac_site_file" >&5
996 echo "$as_me: loading site script $ac_site_file" >&6;}
997     cat "$ac_site_file" >&5
998     . "$ac_site_file"
999   fi
1000 done
1001
1002 if test -r "$cache_file"; then
1003   # Some versions of bash will fail to source /dev/null (special
1004   # files actually), so we avoid doing that.
1005   if test -f "$cache_file"; then
1006     { echo "$as_me:1006: loading cache $cache_file" >&5
1007 echo "$as_me: loading cache $cache_file" >&6;}
1008     case $cache_file in
1009       [\\/]* | ?:[\\/]* ) . $cache_file;;
1010       *)                      . ./$cache_file;;
1011     esac
1012   fi
1013 else
1014   { echo "$as_me:1014: creating cache $cache_file" >&5
1015 echo "$as_me: creating cache $cache_file" >&6;}
1016   >$cache_file
1017 fi
1018
1019 # Check that the precious variables saved in the cache have kept the same
1020 # value.
1021 ac_cache_corrupted=false
1022 for ac_var in `(set) 2>&1 |
1023                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1024   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1025   eval ac_new_set=\$ac_env_${ac_var}_set
1026   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1027   eval ac_new_val="\$ac_env_${ac_var}_value"
1028   case $ac_old_set,$ac_new_set in
1029     set,)
1030       { echo "$as_me:1030: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1031 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1032       ac_cache_corrupted=: ;;
1033     ,set)
1034       { echo "$as_me:1034: error: \`$ac_var' was not set in the previous run" >&5
1035 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1036       ac_cache_corrupted=: ;;
1037     ,);;
1038     *)
1039       if test "x$ac_old_val" != "x$ac_new_val"; then
1040         { echo "$as_me:1040: error: \`$ac_var' has changed since the previous run:" >&5
1041 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1042         { echo "$as_me:1042:   former value:  $ac_old_val" >&5
1043 echo "$as_me:   former value:  $ac_old_val" >&2;}
1044         { echo "$as_me:1044:   current value: $ac_new_val" >&5
1045 echo "$as_me:   current value: $ac_new_val" >&2;}
1046         ac_cache_corrupted=:
1047       fi;;
1048   esac
1049   # Pass precious variables to config.status.  It doesn't matter if
1050   # we pass some twice (in addition to the command line arguments).
1051   if test "$ac_new_set" = set; then
1052     case $ac_new_val in
1053     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1054       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1055       ac_configure_args="$ac_configure_args '$ac_arg'"
1056       ;;
1057     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1058        ;;
1059     esac
1060   fi
1061 done
1062 if $ac_cache_corrupted; then
1063   { echo "$as_me:1063: error: changes in the environment can compromise the build" >&5
1064 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1065   { { echo "$as_me:1065: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1066 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1067    { (exit 1); exit 1; }; }
1068 fi
1069
1070 ac_ext=c
1071 ac_cpp='$CPP $CPPFLAGS'
1072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1075 ac_main_return=return
1076
1077 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1078   *c*,-n*) ECHO_N= ECHO_C='
1079 ' ECHO_T='      ' ;;
1080   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1081   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1082 esac
1083 echo "#! $SHELL" >conftest.sh
1084 echo  "exit 0"   >>conftest.sh
1085 chmod +x conftest.sh
1086 if { (echo "$as_me:1086: PATH=\".;.\"; conftest.sh") >&5
1087   (PATH=".;."; conftest.sh) 2>&5
1088   ac_status=$?
1089   echo "$as_me:1089: \$? = $ac_status" >&5
1090   (exit $ac_status); }; then
1091   ac_path_separator=';'
1092 else
1093   ac_path_separator=:
1094 fi
1095 PATH_SEPARATOR="$ac_path_separator"
1096 rm -f conftest.sh
1097
1098 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1099
1100 top_builddir=`pwd`
1101
1102 echo "$as_me:1102: checking for egrep" >&5
1103 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1104 if test "${ac_cv_prog_egrep+set}" = set; then
1105   echo $ECHO_N "(cached) $ECHO_C" >&6
1106 else
1107   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1108     then ac_cv_prog_egrep='grep -E'
1109     else ac_cv_prog_egrep='egrep'
1110     fi
1111 fi
1112 echo "$as_me:1112: result: $ac_cv_prog_egrep" >&5
1113 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1114  EGREP=$ac_cv_prog_egrep
1115
1116 test -z "$EGREP" && { { echo "$as_me:1116: error: No egrep program found" >&5
1117 echo "$as_me: error: No egrep program found" >&2;}
1118    { (exit 1); exit 1; }; }
1119
1120 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1121 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 cf_cv_abi_version=${NCURSES_MAJOR}
1124 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1125 cf_cv_timestamp=`date`
1126 echo "$as_me:1126: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1127 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1128
1129 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1130
1131 # Check whether --with-rel-version or --without-rel-version was given.
1132 if test "${with_rel_version+set}" = set; then
1133   withval="$with_rel_version"
1134   { echo "$as_me:1134: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1135 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1136  cf_cv_rel_version=$withval
1137 fi;
1138
1139  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1140  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1141
1142 if test -n "$NCURSES_MAJOR" ; then
1143   case $NCURSES_MAJOR in #(vi
1144   [0-9]*) #(vi
1145         ;;
1146   *)
1147         { { echo "$as_me:1147: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1148 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1149    { (exit 1); exit 1; }; }
1150         ;;
1151   esac
1152 else
1153   { { echo "$as_me:1153: error: Release major-version value is empty" >&5
1154 echo "$as_me: error: Release major-version value is empty" >&2;}
1155    { (exit 1); exit 1; }; }
1156 fi
1157
1158 if test -n "$NCURSES_MINOR" ; then
1159   case $NCURSES_MINOR in #(vi
1160   [0-9]*) #(vi
1161         ;;
1162   *)
1163         { { echo "$as_me:1163: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1164 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1165    { (exit 1); exit 1; }; }
1166         ;;
1167   esac
1168 else
1169   { { echo "$as_me:1169: error: Release minor-version value is empty" >&5
1170 echo "$as_me: error: Release minor-version value is empty" >&2;}
1171    { (exit 1); exit 1; }; }
1172 fi
1173
1174 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1175
1176 # Check whether --with-abi-version or --without-abi-version was given.
1177 if test "${with_abi_version+set}" = set; then
1178   withval="$with_abi_version"
1179   { echo "$as_me:1179: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1180 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1181  cf_cv_abi_version=$withval
1182 fi;
1183
1184 if test -n "$cf_cv_abi_version" ; then
1185   case $cf_cv_abi_version in #(vi
1186   [0-9]*) #(vi
1187         ;;
1188   *)
1189         { { echo "$as_me:1189: error: ABI version is not a number: $cf_cv_abi_version" >&5
1190 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1191    { (exit 1); exit 1; }; }
1192         ;;
1193   esac
1194 else
1195   { { echo "$as_me:1195: error: ABI version value is empty" >&5
1196 echo "$as_me: error: ABI version value is empty" >&2;}
1197    { (exit 1); exit 1; }; }
1198 fi
1199
1200 ac_aux_dir=
1201 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1202   if test -f $ac_dir/install-sh; then
1203     ac_aux_dir=$ac_dir
1204     ac_install_sh="$ac_aux_dir/install-sh -c"
1205     break
1206   elif test -f $ac_dir/install.sh; then
1207     ac_aux_dir=$ac_dir
1208     ac_install_sh="$ac_aux_dir/install.sh -c"
1209     break
1210   elif test -f $ac_dir/shtool; then
1211     ac_aux_dir=$ac_dir
1212     ac_install_sh="$ac_aux_dir/shtool install -c"
1213     break
1214   fi
1215 done
1216 if test -z "$ac_aux_dir"; then
1217   { { echo "$as_me:1217: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1218 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1219    { (exit 1); exit 1; }; }
1220 fi
1221 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1222 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1223 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1224
1225 # Make sure we can run config.sub.
1226 $ac_config_sub sun4 >/dev/null 2>&1 ||
1227   { { echo "$as_me:1227: error: cannot run $ac_config_sub" >&5
1228 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1229    { (exit 1); exit 1; }; }
1230
1231 echo "$as_me:1231: checking build system type" >&5
1232 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1233 if test "${ac_cv_build+set}" = set; then
1234   echo $ECHO_N "(cached) $ECHO_C" >&6
1235 else
1236   ac_cv_build_alias=$build_alias
1237 test -z "$ac_cv_build_alias" &&
1238   ac_cv_build_alias=`$ac_config_guess`
1239 test -z "$ac_cv_build_alias" &&
1240   { { echo "$as_me:1240: error: cannot guess build type; you must specify one" >&5
1241 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1242    { (exit 1); exit 1; }; }
1243 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1244   { { echo "$as_me:1244: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1245 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1246    { (exit 1); exit 1; }; }
1247
1248 fi
1249 echo "$as_me:1249: result: $ac_cv_build" >&5
1250 echo "${ECHO_T}$ac_cv_build" >&6
1251 build=$ac_cv_build
1252 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1253 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1254 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1255
1256 echo "$as_me:1256: checking host system type" >&5
1257 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1258 if test "${ac_cv_host+set}" = set; then
1259   echo $ECHO_N "(cached) $ECHO_C" >&6
1260 else
1261   ac_cv_host_alias=$host_alias
1262 test -z "$ac_cv_host_alias" &&
1263   ac_cv_host_alias=$ac_cv_build_alias
1264 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1265   { { echo "$as_me:1265: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1266 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1267    { (exit 1); exit 1; }; }
1268
1269 fi
1270 echo "$as_me:1270: result: $ac_cv_host" >&5
1271 echo "${ECHO_T}$ac_cv_host" >&6
1272 host=$ac_cv_host
1273 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1274 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1275 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1276
1277 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1278         echo "$as_me:1278: checking target system type" >&5
1279 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1280 if test "${ac_cv_target+set}" = set; then
1281   echo $ECHO_N "(cached) $ECHO_C" >&6
1282 else
1283   ac_cv_target_alias=$target_alias
1284 test "x$ac_cv_target_alias" = "x" &&
1285   ac_cv_target_alias=$ac_cv_host_alias
1286 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1287   { { echo "$as_me:1287: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1288 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1289    { (exit 1); exit 1; }; }
1290
1291 fi
1292 echo "$as_me:1292: result: $ac_cv_target" >&5
1293 echo "${ECHO_T}$ac_cv_target" >&6
1294 target=$ac_cv_target
1295 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1296 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1297 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1298
1299 # The aliases save the names the user supplied, while $host etc.
1300 # will get canonicalized.
1301 test -n "$target_alias" &&
1302   test "$program_prefix$program_suffix$program_transform_name" = \
1303     NONENONEs,x,x, &&
1304   program_prefix=${target_alias}-
1305         system_name="$host_os"
1306 else
1307         system_name="`(uname -s -r) 2>/dev/null`"
1308         if test -z "$system_name" ; then
1309                 system_name="`(hostname) 2>/dev/null`"
1310         fi
1311 fi
1312 test -n "$system_name" && cat >>confdefs.h <<EOF
1313 #define SYSTEM_NAME "$system_name"
1314 EOF
1315
1316 if test "${cf_cv_system_name+set}" = set; then
1317   echo $ECHO_N "(cached) $ECHO_C" >&6
1318 else
1319   cf_cv_system_name="$system_name"
1320 fi
1321
1322 test -z "$system_name" && system_name="$cf_cv_system_name"
1323 test -n "$cf_cv_system_name" && echo "$as_me:1323: result: Configuring for $cf_cv_system_name" >&5
1324 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1325
1326 if test ".$system_name" != ".$cf_cv_system_name" ; then
1327         echo "$as_me:1327: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1328 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1329         { { echo "$as_me:1329: error: \"Please remove config.cache and try again.\"" >&5
1330 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1331    { (exit 1); exit 1; }; }
1332 fi
1333
1334 # Check whether --with-system-type or --without-system-type was given.
1335 if test "${with_system_type+set}" = set; then
1336   withval="$with_system_type"
1337   { echo "$as_me:1337: WARNING: overriding system type to $withval" >&5
1338 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1339  cf_cv_system_name=$withval
1340 fi;
1341
1342 ###     Save the given $CFLAGS to allow user-override.
1343 cf_user_CFLAGS="$CFLAGS"
1344
1345 ###     Default install-location
1346
1347 echo "$as_me:1347: checking for prefix" >&5
1348 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1349 if test "x$prefix" = "xNONE" ; then
1350         case "$cf_cv_system_name" in
1351                 # non-vendor systems don't have a conflict
1352         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1353                 prefix=/usr
1354                 ;;
1355         *)      prefix=$ac_default_prefix
1356                 ;;
1357         esac
1358 fi
1359 echo "$as_me:1359: result: $prefix" >&5
1360 echo "${ECHO_T}$prefix" >&6
1361
1362 if test "x$prefix" = "xNONE" ; then
1363 echo "$as_me:1363: checking for default include-directory" >&5
1364 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1365 test -n "$verbose" && echo 1>&6
1366 for cf_symbol in \
1367         $includedir \
1368         $includedir/ncurses \
1369         $prefix/include \
1370         $prefix/include/ncurses \
1371         /usr/local/include \
1372         /usr/local/include/ncurses \
1373         /usr/include \
1374         /usr/include/ncurses
1375 do
1376         cf_dir=`eval echo $cf_symbol`
1377         if test -f $cf_dir/curses.h ; then
1378         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1379                 includedir="$cf_symbol"
1380                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1381                 break
1382         fi
1383         fi
1384         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1385 done
1386 echo "$as_me:1386: result: $includedir" >&5
1387 echo "${ECHO_T}$includedir" >&6
1388 fi
1389
1390 ###     Checks for programs.
1391 ac_ext=c
1392 ac_cpp='$CPP $CPPFLAGS'
1393 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1394 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1396 ac_main_return=return
1397 if test -n "$ac_tool_prefix"; then
1398   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1399 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1400 echo "$as_me:1400: checking for $ac_word" >&5
1401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1402 if test "${ac_cv_prog_CC+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   if test -n "$CC"; then
1406   ac_cv_prog_CC="$CC" # Let the user override the test.
1407 else
1408   ac_save_IFS=$IFS; IFS=$ac_path_separator
1409 ac_dummy="$PATH"
1410 for ac_dir in $ac_dummy; do
1411   IFS=$ac_save_IFS
1412   test -z "$ac_dir" && ac_dir=.
1413   $as_executable_p "$ac_dir/$ac_word" || continue
1414 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1415 echo "$as_me:1415: found $ac_dir/$ac_word" >&5
1416 break
1417 done
1418
1419 fi
1420 fi
1421 CC=$ac_cv_prog_CC
1422 if test -n "$CC"; then
1423   echo "$as_me:1423: result: $CC" >&5
1424 echo "${ECHO_T}$CC" >&6
1425 else
1426   echo "$as_me:1426: result: no" >&5
1427 echo "${ECHO_T}no" >&6
1428 fi
1429
1430 fi
1431 if test -z "$ac_cv_prog_CC"; then
1432   ac_ct_CC=$CC
1433   # Extract the first word of "gcc", so it can be a program name with args.
1434 set dummy gcc; ac_word=$2
1435 echo "$as_me:1435: checking for $ac_word" >&5
1436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1437 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1438   echo $ECHO_N "(cached) $ECHO_C" >&6
1439 else
1440   if test -n "$ac_ct_CC"; then
1441   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1442 else
1443   ac_save_IFS=$IFS; IFS=$ac_path_separator
1444 ac_dummy="$PATH"
1445 for ac_dir in $ac_dummy; do
1446   IFS=$ac_save_IFS
1447   test -z "$ac_dir" && ac_dir=.
1448   $as_executable_p "$ac_dir/$ac_word" || continue
1449 ac_cv_prog_ac_ct_CC="gcc"
1450 echo "$as_me:1450: found $ac_dir/$ac_word" >&5
1451 break
1452 done
1453
1454 fi
1455 fi
1456 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1457 if test -n "$ac_ct_CC"; then
1458   echo "$as_me:1458: result: $ac_ct_CC" >&5
1459 echo "${ECHO_T}$ac_ct_CC" >&6
1460 else
1461   echo "$as_me:1461: result: no" >&5
1462 echo "${ECHO_T}no" >&6
1463 fi
1464
1465   CC=$ac_ct_CC
1466 else
1467   CC="$ac_cv_prog_CC"
1468 fi
1469
1470 if test -z "$CC"; then
1471   if test -n "$ac_tool_prefix"; then
1472   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1473 set dummy ${ac_tool_prefix}cc; ac_word=$2
1474 echo "$as_me:1474: checking for $ac_word" >&5
1475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1476 if test "${ac_cv_prog_CC+set}" = set; then
1477   echo $ECHO_N "(cached) $ECHO_C" >&6
1478 else
1479   if test -n "$CC"; then
1480   ac_cv_prog_CC="$CC" # Let the user override the test.
1481 else
1482   ac_save_IFS=$IFS; IFS=$ac_path_separator
1483 ac_dummy="$PATH"
1484 for ac_dir in $ac_dummy; do
1485   IFS=$ac_save_IFS
1486   test -z "$ac_dir" && ac_dir=.
1487   $as_executable_p "$ac_dir/$ac_word" || continue
1488 ac_cv_prog_CC="${ac_tool_prefix}cc"
1489 echo "$as_me:1489: found $ac_dir/$ac_word" >&5
1490 break
1491 done
1492
1493 fi
1494 fi
1495 CC=$ac_cv_prog_CC
1496 if test -n "$CC"; then
1497   echo "$as_me:1497: result: $CC" >&5
1498 echo "${ECHO_T}$CC" >&6
1499 else
1500   echo "$as_me:1500: result: no" >&5
1501 echo "${ECHO_T}no" >&6
1502 fi
1503
1504 fi
1505 if test -z "$ac_cv_prog_CC"; then
1506   ac_ct_CC=$CC
1507   # Extract the first word of "cc", so it can be a program name with args.
1508 set dummy cc; ac_word=$2
1509 echo "$as_me:1509: checking for $ac_word" >&5
1510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1511 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1512   echo $ECHO_N "(cached) $ECHO_C" >&6
1513 else
1514   if test -n "$ac_ct_CC"; then
1515   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1516 else
1517   ac_save_IFS=$IFS; IFS=$ac_path_separator
1518 ac_dummy="$PATH"
1519 for ac_dir in $ac_dummy; do
1520   IFS=$ac_save_IFS
1521   test -z "$ac_dir" && ac_dir=.
1522   $as_executable_p "$ac_dir/$ac_word" || continue
1523 ac_cv_prog_ac_ct_CC="cc"
1524 echo "$as_me:1524: found $ac_dir/$ac_word" >&5
1525 break
1526 done
1527
1528 fi
1529 fi
1530 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1531 if test -n "$ac_ct_CC"; then
1532   echo "$as_me:1532: result: $ac_ct_CC" >&5
1533 echo "${ECHO_T}$ac_ct_CC" >&6
1534 else
1535   echo "$as_me:1535: result: no" >&5
1536 echo "${ECHO_T}no" >&6
1537 fi
1538
1539   CC=$ac_ct_CC
1540 else
1541   CC="$ac_cv_prog_CC"
1542 fi
1543
1544 fi
1545 if test -z "$CC"; then
1546   # Extract the first word of "cc", so it can be a program name with args.
1547 set dummy cc; ac_word=$2
1548 echo "$as_me:1548: checking for $ac_word" >&5
1549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1550 if test "${ac_cv_prog_CC+set}" = set; then
1551   echo $ECHO_N "(cached) $ECHO_C" >&6
1552 else
1553   if test -n "$CC"; then
1554   ac_cv_prog_CC="$CC" # Let the user override the test.
1555 else
1556   ac_prog_rejected=no
1557   ac_save_IFS=$IFS; IFS=$ac_path_separator
1558 ac_dummy="$PATH"
1559 for ac_dir in $ac_dummy; do
1560   IFS=$ac_save_IFS
1561   test -z "$ac_dir" && ac_dir=.
1562   $as_executable_p "$ac_dir/$ac_word" || continue
1563 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1564   ac_prog_rejected=yes
1565   continue
1566 fi
1567 ac_cv_prog_CC="cc"
1568 echo "$as_me:1568: found $ac_dir/$ac_word" >&5
1569 break
1570 done
1571
1572 if test $ac_prog_rejected = yes; then
1573   # We found a bogon in the path, so make sure we never use it.
1574   set dummy $ac_cv_prog_CC
1575   shift
1576   if test $# != 0; then
1577     # We chose a different compiler from the bogus one.
1578     # However, it has the same basename, so the bogon will be chosen
1579     # first if we set CC to just the basename; use the full file name.
1580     shift
1581     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1582     shift
1583     ac_cv_prog_CC="$@"
1584   fi
1585 fi
1586 fi
1587 fi
1588 CC=$ac_cv_prog_CC
1589 if test -n "$CC"; then
1590   echo "$as_me:1590: result: $CC" >&5
1591 echo "${ECHO_T}$CC" >&6
1592 else
1593   echo "$as_me:1593: result: no" >&5
1594 echo "${ECHO_T}no" >&6
1595 fi
1596
1597 fi
1598 if test -z "$CC"; then
1599   if test -n "$ac_tool_prefix"; then
1600   for ac_prog in cl
1601   do
1602     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1603 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1604 echo "$as_me:1604: checking for $ac_word" >&5
1605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1606 if test "${ac_cv_prog_CC+set}" = set; then
1607   echo $ECHO_N "(cached) $ECHO_C" >&6
1608 else
1609   if test -n "$CC"; then
1610   ac_cv_prog_CC="$CC" # Let the user override the test.
1611 else
1612   ac_save_IFS=$IFS; IFS=$ac_path_separator
1613 ac_dummy="$PATH"
1614 for ac_dir in $ac_dummy; do
1615   IFS=$ac_save_IFS
1616   test -z "$ac_dir" && ac_dir=.
1617   $as_executable_p "$ac_dir/$ac_word" || continue
1618 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1619 echo "$as_me:1619: found $ac_dir/$ac_word" >&5
1620 break
1621 done
1622
1623 fi
1624 fi
1625 CC=$ac_cv_prog_CC
1626 if test -n "$CC"; then
1627   echo "$as_me:1627: result: $CC" >&5
1628 echo "${ECHO_T}$CC" >&6
1629 else
1630   echo "$as_me:1630: result: no" >&5
1631 echo "${ECHO_T}no" >&6
1632 fi
1633
1634     test -n "$CC" && break
1635   done
1636 fi
1637 if test -z "$CC"; then
1638   ac_ct_CC=$CC
1639   for ac_prog in cl
1640 do
1641   # Extract the first word of "$ac_prog", so it can be a program name with args.
1642 set dummy $ac_prog; ac_word=$2
1643 echo "$as_me:1643: checking for $ac_word" >&5
1644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1645 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1646   echo $ECHO_N "(cached) $ECHO_C" >&6
1647 else
1648   if test -n "$ac_ct_CC"; then
1649   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1650 else
1651   ac_save_IFS=$IFS; IFS=$ac_path_separator
1652 ac_dummy="$PATH"
1653 for ac_dir in $ac_dummy; do
1654   IFS=$ac_save_IFS
1655   test -z "$ac_dir" && ac_dir=.
1656   $as_executable_p "$ac_dir/$ac_word" || continue
1657 ac_cv_prog_ac_ct_CC="$ac_prog"
1658 echo "$as_me:1658: found $ac_dir/$ac_word" >&5
1659 break
1660 done
1661
1662 fi
1663 fi
1664 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1665 if test -n "$ac_ct_CC"; then
1666   echo "$as_me:1666: result: $ac_ct_CC" >&5
1667 echo "${ECHO_T}$ac_ct_CC" >&6
1668 else
1669   echo "$as_me:1669: result: no" >&5
1670 echo "${ECHO_T}no" >&6
1671 fi
1672
1673   test -n "$ac_ct_CC" && break
1674 done
1675
1676   CC=$ac_ct_CC
1677 fi
1678
1679 fi
1680
1681 test -z "$CC" && { { echo "$as_me:1681: error: no acceptable cc found in \$PATH" >&5
1682 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1683    { (exit 1); exit 1; }; }
1684
1685 # Provide some information about the compiler.
1686 echo "$as_me:1686:" \
1687      "checking for C compiler version" >&5
1688 ac_compiler=`set X $ac_compile; echo $2`
1689 { (eval echo "$as_me:1689: \"$ac_compiler --version </dev/null >&5\"") >&5
1690   (eval $ac_compiler --version </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 { (eval echo "$as_me:1699: \"$ac_compiler -V </dev/null >&5\"") >&5
1700   (eval $ac_compiler -V </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704
1705 cat >conftest.$ac_ext <<_ACEOF
1706 #line 1706 "configure"
1707 #include "confdefs.h"
1708
1709 int
1710 main ()
1711 {
1712
1713   ;
1714   return 0;
1715 }
1716 _ACEOF
1717 ac_clean_files_save=$ac_clean_files
1718 ac_clean_files="$ac_clean_files a.out a.exe"
1719 # Try to create an executable without -o first, disregard a.out.
1720 # It will help us diagnose broken compilers, and finding out an intuition
1721 # of exeext.
1722 echo "$as_me:1722: checking for C compiler default output" >&5
1723 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1724 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1725 if { (eval echo "$as_me:1725: \"$ac_link_default\"") >&5
1726   (eval $ac_link_default) 2>&5
1727   ac_status=$?
1728   echo "$as_me:1728: \$? = $ac_status" >&5
1729   (exit $ac_status); }; then
1730   # Find the output, starting from the most likely.  This scheme is
1731 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1732 # resort.
1733 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1734                 ls a.out conftest 2>/dev/null;
1735                 ls a.* conftest.* 2>/dev/null`; do
1736   case $ac_file in
1737     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1738     a.out ) # We found the default executable, but exeext='' is most
1739             # certainly right.
1740             break;;
1741     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1742           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1743           export ac_cv_exeext
1744           break;;
1745     * ) break;;
1746   esac
1747 done
1748 else
1749   echo "$as_me: failed program was:" >&5
1750 cat conftest.$ac_ext >&5
1751 { { echo "$as_me:1751: error: C compiler cannot create executables" >&5
1752 echo "$as_me: error: C compiler cannot create executables" >&2;}
1753    { (exit 77); exit 77; }; }
1754 fi
1755
1756 ac_exeext=$ac_cv_exeext
1757 echo "$as_me:1757: result: $ac_file" >&5
1758 echo "${ECHO_T}$ac_file" >&6
1759
1760 # Check the compiler produces executables we can run.  If not, either
1761 # the compiler is broken, or we cross compile.
1762 echo "$as_me:1762: checking whether the C compiler works" >&5
1763 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1764 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1765 # If not cross compiling, check that we can run a simple program.
1766 if test "$cross_compiling" != yes; then
1767   if { ac_try='./$ac_file'
1768   { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1769   (eval $ac_try) 2>&5
1770   ac_status=$?
1771   echo "$as_me:1771: \$? = $ac_status" >&5
1772   (exit $ac_status); }; }; then
1773     cross_compiling=no
1774   else
1775     if test "$cross_compiling" = maybe; then
1776         cross_compiling=yes
1777     else
1778         { { echo "$as_me:1778: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&5
1780 echo "$as_me: error: cannot run C compiled programs.
1781 If you meant to cross compile, use \`--host'." >&2;}
1782    { (exit 1); exit 1; }; }
1783     fi
1784   fi
1785 fi
1786 echo "$as_me:1786: result: yes" >&5
1787 echo "${ECHO_T}yes" >&6
1788
1789 rm -f a.out a.exe conftest$ac_cv_exeext
1790 ac_clean_files=$ac_clean_files_save
1791 # Check the compiler produces executables we can run.  If not, either
1792 # the compiler is broken, or we cross compile.
1793 echo "$as_me:1793: checking whether we are cross compiling" >&5
1794 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1795 echo "$as_me:1795: result: $cross_compiling" >&5
1796 echo "${ECHO_T}$cross_compiling" >&6
1797
1798 echo "$as_me:1798: checking for executable suffix" >&5
1799 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1800 if { (eval echo "$as_me:1800: \"$ac_link\"") >&5
1801   (eval $ac_link) 2>&5
1802   ac_status=$?
1803   echo "$as_me:1803: \$? = $ac_status" >&5
1804   (exit $ac_status); }; then
1805   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1806 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1807 # work properly (i.e., refer to `conftest.exe'), while it won't with
1808 # `rm'.
1809 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1810   case $ac_file in
1811     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1812     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813           export ac_cv_exeext
1814           break;;
1815     * ) break;;
1816   esac
1817 done
1818 else
1819   { { echo "$as_me:1819: error: cannot compute EXEEXT: cannot compile and link" >&5
1820 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1821    { (exit 1); exit 1; }; }
1822 fi
1823
1824 rm -f conftest$ac_cv_exeext
1825 echo "$as_me:1825: result: $ac_cv_exeext" >&5
1826 echo "${ECHO_T}$ac_cv_exeext" >&6
1827
1828 rm -f conftest.$ac_ext
1829 EXEEXT=$ac_cv_exeext
1830 ac_exeext=$EXEEXT
1831 echo "$as_me:1831: checking for object suffix" >&5
1832 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1833 if test "${ac_cv_objext+set}" = set; then
1834   echo $ECHO_N "(cached) $ECHO_C" >&6
1835 else
1836   cat >conftest.$ac_ext <<_ACEOF
1837 #line 1837 "configure"
1838 #include "confdefs.h"
1839
1840 int
1841 main ()
1842 {
1843
1844   ;
1845   return 0;
1846 }
1847 _ACEOF
1848 rm -f conftest.o conftest.obj
1849 if { (eval echo "$as_me:1849: \"$ac_compile\"") >&5
1850   (eval $ac_compile) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; then
1854   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1855   case $ac_file in
1856     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1857     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1858        break;;
1859   esac
1860 done
1861 else
1862   echo "$as_me: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1864 { { echo "$as_me:1864: error: cannot compute OBJEXT: cannot compile" >&5
1865 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1866    { (exit 1); exit 1; }; }
1867 fi
1868
1869 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1870 fi
1871 echo "$as_me:1871: result: $ac_cv_objext" >&5
1872 echo "${ECHO_T}$ac_cv_objext" >&6
1873 OBJEXT=$ac_cv_objext
1874 ac_objext=$OBJEXT
1875 echo "$as_me:1875: checking whether we are using the GNU C compiler" >&5
1876 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1877 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1878   echo $ECHO_N "(cached) $ECHO_C" >&6
1879 else
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883
1884 int
1885 main ()
1886 {
1887 #ifndef __GNUC__
1888        choke me
1889 #endif
1890
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   ac_compiler_gnu=yes
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 ac_compiler_gnu=no
1912 fi
1913 rm -f conftest.$ac_objext conftest.$ac_ext
1914 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1915
1916 fi
1917 echo "$as_me:1917: result: $ac_cv_c_compiler_gnu" >&5
1918 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1919 GCC=`test $ac_compiler_gnu = yes && echo yes`
1920 ac_test_CFLAGS=${CFLAGS+set}
1921 ac_save_CFLAGS=$CFLAGS
1922 CFLAGS="-g"
1923 echo "$as_me:1923: checking whether $CC accepts -g" >&5
1924 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1925 if test "${ac_cv_prog_cc_g+set}" = set; then
1926   echo $ECHO_N "(cached) $ECHO_C" >&6
1927 else
1928   cat >conftest.$ac_ext <<_ACEOF
1929 #line 1929 "configure"
1930 #include "confdefs.h"
1931
1932 int
1933 main ()
1934 {
1935
1936   ;
1937   return 0;
1938 }
1939 _ACEOF
1940 rm -f conftest.$ac_objext
1941 if { (eval echo "$as_me:1941: \"$ac_compile\"") >&5
1942   (eval $ac_compile) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); } &&
1946          { ac_try='test -s conftest.$ac_objext'
1947   { (eval echo "$as_me:1947: \"$ac_try\"") >&5
1948   (eval $ac_try) 2>&5
1949   ac_status=$?
1950   echo "$as_me:1950: \$? = $ac_status" >&5
1951   (exit $ac_status); }; }; then
1952   ac_cv_prog_cc_g=yes
1953 else
1954   echo "$as_me: failed program was:" >&5
1955 cat conftest.$ac_ext >&5
1956 ac_cv_prog_cc_g=no
1957 fi
1958 rm -f conftest.$ac_objext conftest.$ac_ext
1959 fi
1960 echo "$as_me:1960: result: $ac_cv_prog_cc_g" >&5
1961 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1962 if test "$ac_test_CFLAGS" = set; then
1963   CFLAGS=$ac_save_CFLAGS
1964 elif test $ac_cv_prog_cc_g = yes; then
1965   if test "$GCC" = yes; then
1966     CFLAGS="-g -O2"
1967   else
1968     CFLAGS="-g"
1969   fi
1970 else
1971   if test "$GCC" = yes; then
1972     CFLAGS="-O2"
1973   else
1974     CFLAGS=
1975   fi
1976 fi
1977 # Some people use a C++ compiler to compile C.  Since we use `exit',
1978 # in C++ we need to declare it.  In case someone uses the same compiler
1979 # for both compiling C and C++ we need to have the C++ compiler decide
1980 # the declaration of exit, since it's the most demanding environment.
1981 cat >conftest.$ac_ext <<_ACEOF
1982 #ifndef __cplusplus
1983   choke me
1984 #endif
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   for ac_declaration in \
1999    ''\
2000    '#include <stdlib.h>' \
2001    'extern "C" void std::exit (int) throw (); using std::exit;' \
2002    'extern "C" void std::exit (int); using std::exit;' \
2003    'extern "C" void exit (int) throw ();' \
2004    'extern "C" void exit (int);' \
2005    'void exit (int);'
2006 do
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <stdlib.h>
2011 $ac_declaration
2012 int
2013 main ()
2014 {
2015 exit (42);
2016   ;
2017   return 0;
2018 }
2019 _ACEOF
2020 rm -f conftest.$ac_objext
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022   (eval $ac_compile) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); } &&
2026          { ac_try='test -s conftest.$ac_objext'
2027   { (eval echo "$as_me:2027: \"$ac_try\"") >&5
2028   (eval $ac_try) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit $ac_status); }; }; then
2032   :
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 continue
2037 fi
2038 rm -f conftest.$ac_objext conftest.$ac_ext
2039   cat >conftest.$ac_ext <<_ACEOF
2040 #line 2040 "configure"
2041 #include "confdefs.h"
2042 $ac_declaration
2043 int
2044 main ()
2045 {
2046 exit (42);
2047   ;
2048   return 0;
2049 }
2050 _ACEOF
2051 rm -f conftest.$ac_objext
2052 if { (eval echo "$as_me:2052: \"$ac_compile\"") >&5
2053   (eval $ac_compile) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); } &&
2057          { ac_try='test -s conftest.$ac_objext'
2058   { (eval echo "$as_me:2058: \"$ac_try\"") >&5
2059   (eval $ac_try) 2>&5
2060   ac_status=$?
2061   echo "$as_me:2061: \$? = $ac_status" >&5
2062   (exit $ac_status); }; }; then
2063   break
2064 else
2065   echo "$as_me: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2067 fi
2068 rm -f conftest.$ac_objext conftest.$ac_ext
2069 done
2070 rm -f conftest*
2071 if test -n "$ac_declaration"; then
2072   echo '#ifdef __cplusplus' >>confdefs.h
2073   echo $ac_declaration      >>confdefs.h
2074   echo '#endif'             >>confdefs.h
2075 fi
2076
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 ac_ext=c
2083 ac_cpp='$CPP $CPPFLAGS'
2084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2087 ac_main_return=return
2088
2089 GCC_VERSION=none
2090 if test "$GCC" = yes ; then
2091         echo "$as_me:2091: checking version of $CC" >&5
2092 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2093         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2094         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2095         echo "$as_me:2095: result: $GCC_VERSION" >&5
2096 echo "${ECHO_T}$GCC_VERSION" >&6
2097 fi
2098
2099 ac_ext=c
2100 ac_cpp='$CPP $CPPFLAGS'
2101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2104 ac_main_return=return
2105 echo "$as_me:2105: checking how to run the C preprocessor" >&5
2106 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2107 # On Suns, sometimes $CPP names a directory.
2108 if test -n "$CPP" && test -d "$CPP"; then
2109   CPP=
2110 fi
2111 if test -z "$CPP"; then
2112   if test "${ac_cv_prog_CPP+set}" = set; then
2113   echo $ECHO_N "(cached) $ECHO_C" >&6
2114 else
2115       # Double quotes because CPP needs to be expanded
2116     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2117     do
2118       ac_preproc_ok=false
2119 for ac_c_preproc_warn_flag in '' yes
2120 do
2121   # Use a header file that comes with gcc, so configuring glibc
2122   # with a fresh cross-compiler works.
2123   # On the NeXT, cc -E runs the code through the compiler's parser,
2124   # not just through cpp. "Syntax error" is here to catch this case.
2125   cat >conftest.$ac_ext <<_ACEOF
2126 #line 2126 "configure"
2127 #include "confdefs.h"
2128 #include <assert.h>
2129                      Syntax error
2130 _ACEOF
2131 if { (eval echo "$as_me:2131: \"$ac_cpp conftest.$ac_ext\"") >&5
2132   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2133   ac_status=$?
2134   egrep -v '^ *\+' conftest.er1 >conftest.err
2135   rm -f conftest.er1
2136   cat conftest.err >&5
2137   echo "$as_me:2137: \$? = $ac_status" >&5
2138   (exit $ac_status); } >/dev/null; then
2139   if test -s conftest.err; then
2140     ac_cpp_err=$ac_c_preproc_warn_flag
2141   else
2142     ac_cpp_err=
2143   fi
2144 else
2145   ac_cpp_err=yes
2146 fi
2147 if test -z "$ac_cpp_err"; then
2148   :
2149 else
2150   echo "$as_me: failed program was:" >&5
2151   cat conftest.$ac_ext >&5
2152   # Broken: fails on valid input.
2153 continue
2154 fi
2155 rm -f conftest.err conftest.$ac_ext
2156
2157   # OK, works on sane cases.  Now check whether non-existent headers
2158   # can be detected and how.
2159   cat >conftest.$ac_ext <<_ACEOF
2160 #line 2160 "configure"
2161 #include "confdefs.h"
2162 #include <ac_nonexistent.h>
2163 _ACEOF
2164 if { (eval echo "$as_me:2164: \"$ac_cpp conftest.$ac_ext\"") >&5
2165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2166   ac_status=$?
2167   egrep -v '^ *\+' conftest.er1 >conftest.err
2168   rm -f conftest.er1
2169   cat conftest.err >&5
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit $ac_status); } >/dev/null; then
2172   if test -s conftest.err; then
2173     ac_cpp_err=$ac_c_preproc_warn_flag
2174   else
2175     ac_cpp_err=
2176   fi
2177 else
2178   ac_cpp_err=yes
2179 fi
2180 if test -z "$ac_cpp_err"; then
2181   # Broken: success on invalid input.
2182 continue
2183 else
2184   echo "$as_me: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   # Passes both tests.
2187 ac_preproc_ok=:
2188 break
2189 fi
2190 rm -f conftest.err conftest.$ac_ext
2191
2192 done
2193 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2194 rm -f conftest.err conftest.$ac_ext
2195 if $ac_preproc_ok; then
2196   break
2197 fi
2198
2199     done
2200     ac_cv_prog_CPP=$CPP
2201
2202 fi
2203   CPP=$ac_cv_prog_CPP
2204 else
2205   ac_cv_prog_CPP=$CPP
2206 fi
2207 echo "$as_me:2207: result: $CPP" >&5
2208 echo "${ECHO_T}$CPP" >&6
2209 ac_preproc_ok=false
2210 for ac_c_preproc_warn_flag in '' yes
2211 do
2212   # Use a header file that comes with gcc, so configuring glibc
2213   # with a fresh cross-compiler works.
2214   # On the NeXT, cc -E runs the code through the compiler's parser,
2215   # not just through cpp. "Syntax error" is here to catch this case.
2216   cat >conftest.$ac_ext <<_ACEOF
2217 #line 2217 "configure"
2218 #include "confdefs.h"
2219 #include <assert.h>
2220                      Syntax error
2221 _ACEOF
2222 if { (eval echo "$as_me:2222: \"$ac_cpp conftest.$ac_ext\"") >&5
2223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2224   ac_status=$?
2225   egrep -v '^ *\+' conftest.er1 >conftest.err
2226   rm -f conftest.er1
2227   cat conftest.err >&5
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit $ac_status); } >/dev/null; then
2230   if test -s conftest.err; then
2231     ac_cpp_err=$ac_c_preproc_warn_flag
2232   else
2233     ac_cpp_err=
2234   fi
2235 else
2236   ac_cpp_err=yes
2237 fi
2238 if test -z "$ac_cpp_err"; then
2239   :
2240 else
2241   echo "$as_me: failed program was:" >&5
2242   cat conftest.$ac_ext >&5
2243   # Broken: fails on valid input.
2244 continue
2245 fi
2246 rm -f conftest.err conftest.$ac_ext
2247
2248   # OK, works on sane cases.  Now check whether non-existent headers
2249   # can be detected and how.
2250   cat >conftest.$ac_ext <<_ACEOF
2251 #line 2251 "configure"
2252 #include "confdefs.h"
2253 #include <ac_nonexistent.h>
2254 _ACEOF
2255 if { (eval echo "$as_me:2255: \"$ac_cpp conftest.$ac_ext\"") >&5
2256   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2257   ac_status=$?
2258   egrep -v '^ *\+' conftest.er1 >conftest.err
2259   rm -f conftest.er1
2260   cat conftest.err >&5
2261   echo "$as_me:2261: \$? = $ac_status" >&5
2262   (exit $ac_status); } >/dev/null; then
2263   if test -s conftest.err; then
2264     ac_cpp_err=$ac_c_preproc_warn_flag
2265   else
2266     ac_cpp_err=
2267   fi
2268 else
2269   ac_cpp_err=yes
2270 fi
2271 if test -z "$ac_cpp_err"; then
2272   # Broken: success on invalid input.
2273 continue
2274 else
2275   echo "$as_me: failed program was:" >&5
2276   cat conftest.$ac_ext >&5
2277   # Passes both tests.
2278 ac_preproc_ok=:
2279 break
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283 done
2284 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2285 rm -f conftest.err conftest.$ac_ext
2286 if $ac_preproc_ok; then
2287   :
2288 else
2289   { { echo "$as_me:2289: error: C preprocessor \"$CPP\" fails sanity check" >&5
2290 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2291    { (exit 1); exit 1; }; }
2292 fi
2293
2294 ac_ext=c
2295 ac_cpp='$CPP $CPPFLAGS'
2296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2299 ac_main_return=return
2300
2301 if test $ac_cv_c_compiler_gnu = yes; then
2302     echo "$as_me:2302: checking whether $CC needs -traditional" >&5
2303 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2304 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2305   echo $ECHO_N "(cached) $ECHO_C" >&6
2306 else
2307     ac_pattern="Autoconf.*'x'"
2308   cat >conftest.$ac_ext <<_ACEOF
2309 #line 2309 "configure"
2310 #include "confdefs.h"
2311 #include <sgtty.h>
2312 int Autoconf = TIOCGETP;
2313 _ACEOF
2314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2315   egrep "$ac_pattern" >/dev/null 2>&1; then
2316   ac_cv_prog_gcc_traditional=yes
2317 else
2318   ac_cv_prog_gcc_traditional=no
2319 fi
2320 rm -f conftest*
2321
2322   if test $ac_cv_prog_gcc_traditional = no; then
2323     cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <termio.h>
2327 int Autoconf = TCGETA;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 fi
2333 rm -f conftest*
2334
2335   fi
2336 fi
2337 echo "$as_me:2337: result: $ac_cv_prog_gcc_traditional" >&5
2338 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2339   if test $ac_cv_prog_gcc_traditional = yes; then
2340     CC="$CC -traditional"
2341   fi
2342 fi
2343
2344 echo "$as_me:2344: checking whether $CC understands -c and -o together" >&5
2345 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2346 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2347   echo $ECHO_N "(cached) $ECHO_C" >&6
2348 else
2349
2350 cat > conftest.$ac_ext <<CF_EOF
2351 #include <stdio.h>
2352 int main()
2353 {
2354         ${cf_cv_main_return:-return}(0);
2355 }
2356 CF_EOF
2357 # We do the test twice because some compilers refuse to overwrite an
2358 # existing .o file with -o, though they will create one.
2359 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2360 if { (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   test -f conftest2.$ac_objext && { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366   (eval $ac_try) 2>&5
2367   ac_status=$?
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit $ac_status); };
2370 then
2371   eval cf_cv_prog_CC_c_o=yes
2372 else
2373   eval cf_cv_prog_CC_c_o=no
2374 fi
2375 rm -f conftest*
2376
2377 fi
2378 if test $cf_cv_prog_CC_c_o = yes; then
2379   echo "$as_me:2379: result: yes" >&5
2380 echo "${ECHO_T}yes" >&6
2381 else
2382   echo "$as_me:2382: result: no" >&5
2383 echo "${ECHO_T}no" >&6
2384 fi
2385
2386 echo "$as_me:2386: checking for POSIXized ISC" >&5
2387 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2388 if test -d /etc/conf/kconfig.d &&
2389    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2390 then
2391   echo "$as_me:2391: result: yes" >&5
2392 echo "${ECHO_T}yes" >&6
2393   ISC=yes # If later tests want to check for ISC.
2394
2395 cat >>confdefs.h <<\EOF
2396 #define _POSIX_SOURCE 1
2397 EOF
2398
2399   if test "$GCC" = yes; then
2400     CC="$CC -posix"
2401   else
2402     CC="$CC -Xp"
2403   fi
2404 else
2405   echo "$as_me:2405: result: no" >&5
2406 echo "${ECHO_T}no" >&6
2407   ISC=
2408 fi
2409
2410 echo "$as_me:2410: checking for ${CC-cc} option to accept ANSI C" >&5
2411 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2412 if test "${cf_cv_ansi_cc+set}" = set; then
2413   echo $ECHO_N "(cached) $ECHO_C" >&6
2414 else
2415
2416 cf_cv_ansi_cc=no
2417 cf_save_CFLAGS="$CFLAGS"
2418 cf_save_CPPFLAGS="$CPPFLAGS"
2419 # Don't try gcc -ansi; that turns off useful extensions and
2420 # breaks some systems' header files.
2421 # AIX                   -qlanglvl=ansi
2422 # Ultrix and OSF/1      -std1
2423 # HP-UX                 -Aa -D_HPUX_SOURCE
2424 # SVR4                  -Xc
2425 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2426 for cf_arg in "-DCC_HAS_PROTOS" \
2427         "" \
2428         -qlanglvl=ansi \
2429         -std1 \
2430         -Ae \
2431         "-Aa -D_HPUX_SOURCE" \
2432         -Xc
2433 do
2434
2435 cf_fix_cppflags=no
2436 cf_new_cflags=
2437 cf_new_cppflags=
2438 cf_new_extra_cppflags=
2439
2440 for cf_add_cflags in $cf_arg
2441 do
2442 case $cf_fix_cppflags in
2443 no)
2444         case $cf_add_cflags in #(vi
2445         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2446                 case $cf_add_cflags in
2447                 -D*)
2448                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2449
2450                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2451                         && test -z "${cf_tst_cflags}" \
2452                         && cf_fix_cppflags=yes
2453
2454                         if test $cf_fix_cppflags = yes ; then
2455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2456                                 continue
2457                         elif test "${cf_tst_cflags}" = "\"'" ; then
2458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2459                                 continue
2460                         fi
2461                         ;;
2462                 esac
2463                 case "$CPPFLAGS" in
2464                 *$cf_add_cflags) #(vi
2465                         ;;
2466                 *) #(vi
2467                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2468                         ;;
2469                 esac
2470                 ;;
2471         *)
2472                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2473                 ;;
2474         esac
2475         ;;
2476 yes)
2477         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2478
2479         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2480
2481         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2482         && test -z "${cf_tst_cflags}" \
2483         && cf_fix_cppflags=no
2484         ;;
2485 esac
2486 done
2487
2488 if test -n "$cf_new_cflags" ; then
2489
2490         CFLAGS="$CFLAGS $cf_new_cflags"
2491 fi
2492
2493 if test -n "$cf_new_cppflags" ; then
2494
2495         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2496 fi
2497
2498 if test -n "$cf_new_extra_cppflags" ; then
2499
2500         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2501 fi
2502
2503         cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506
2507 #ifndef CC_HAS_PROTOS
2508 #if !defined(__STDC__) || (__STDC__ != 1)
2509 choke me
2510 #endif
2511 #endif
2512
2513 int
2514 main ()
2515 {
2516
2517         int test (int i, double x);
2518         struct s1 {int (*f) (int a);};
2519         struct s2 {int (*f) (double a);};
2520   ;
2521   return 0;
2522 }
2523 _ACEOF
2524 rm -f conftest.$ac_objext
2525 if { (eval echo "$as_me:2525: \"$ac_compile\"") >&5
2526   (eval $ac_compile) 2>&5
2527   ac_status=$?
2528   echo "$as_me:2528: \$? = $ac_status" >&5
2529   (exit $ac_status); } &&
2530          { ac_try='test -s conftest.$ac_objext'
2531   { (eval echo "$as_me:2531: \"$ac_try\"") >&5
2532   (eval $ac_try) 2>&5
2533   ac_status=$?
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit $ac_status); }; }; then
2536   cf_cv_ansi_cc="$cf_arg"; break
2537 else
2538   echo "$as_me: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 fi
2541 rm -f conftest.$ac_objext conftest.$ac_ext
2542 done
2543 CFLAGS="$cf_save_CFLAGS"
2544 CPPFLAGS="$cf_save_CPPFLAGS"
2545
2546 fi
2547 echo "$as_me:2547: result: $cf_cv_ansi_cc" >&5
2548 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2549
2550 if test "$cf_cv_ansi_cc" != "no"; then
2551 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2552
2553 cf_fix_cppflags=no
2554 cf_new_cflags=
2555 cf_new_cppflags=
2556 cf_new_extra_cppflags=
2557
2558 for cf_add_cflags in $cf_cv_ansi_cc
2559 do
2560 case $cf_fix_cppflags in
2561 no)
2562         case $cf_add_cflags in #(vi
2563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2564                 case $cf_add_cflags in
2565                 -D*)
2566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2567
2568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2569                         && test -z "${cf_tst_cflags}" \
2570                         && cf_fix_cppflags=yes
2571
2572                         if test $cf_fix_cppflags = yes ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         elif test "${cf_tst_cflags}" = "\"'" ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         fi
2579                         ;;
2580                 esac
2581                 case "$CPPFLAGS" in
2582                 *$cf_add_cflags) #(vi
2583                         ;;
2584                 *) #(vi
2585                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2586                         ;;
2587                 esac
2588                 ;;
2589         *)
2590                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2591                 ;;
2592         esac
2593         ;;
2594 yes)
2595         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2596
2597         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2598
2599         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2600         && test -z "${cf_tst_cflags}" \
2601         && cf_fix_cppflags=no
2602         ;;
2603 esac
2604 done
2605
2606 if test -n "$cf_new_cflags" ; then
2607
2608         CFLAGS="$CFLAGS $cf_new_cflags"
2609 fi
2610
2611 if test -n "$cf_new_cppflags" ; then
2612
2613         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2614 fi
2615
2616 if test -n "$cf_new_extra_cppflags" ; then
2617
2618         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2619 fi
2620
2621 else
2622         cat >>confdefs.h <<\EOF
2623 #define CC_HAS_PROTOS 1
2624 EOF
2625
2626 fi
2627 fi
2628
2629 if test "$cf_cv_ansi_cc" = "no"; then
2630         { { echo "$as_me:2630: 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" >&5
2635 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2636 You have the following choices:
2637         a. adjust your compiler options
2638         b. get an up-to-date compiler
2639         c. use a wrapper such as unproto" >&2;}
2640    { (exit 1); exit 1; }; }
2641 fi
2642
2643 case $cf_cv_system_name in
2644 os2*)
2645     CFLAGS="$CFLAGS -Zmt"
2646     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2647     CXXFLAGS="$CXXFLAGS -Zmt"
2648     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2649     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2650     ac_cv_exeext=.exe
2651     ;;
2652 esac
2653
2654 PROG_EXT="$EXEEXT"
2655
2656 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2657 #define PROG_EXT "$PROG_EXT"
2658 EOF
2659
2660 if test "$cross_compiling" = yes ; then
2661   LDCONFIG=:
2662 else
2663 case "$cf_cv_system_name" in #(vi
2664 freebsd*) #(vi
2665   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2666   ;;
2667 *) LDPATH=$PATH:/sbin:/usr/sbin
2668   # Extract the first word of "ldconfig", so it can be a program name with args.
2669 set dummy ldconfig; ac_word=$2
2670 echo "$as_me:2670: checking for $ac_word" >&5
2671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2672 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2673   echo $ECHO_N "(cached) $ECHO_C" >&6
2674 else
2675   case $LDCONFIG in
2676   [\\/]* | ?:[\\/]*)
2677   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2678   ;;
2679   *)
2680   ac_save_IFS=$IFS; IFS=$ac_path_separator
2681 ac_dummy="$LDPATH"
2682 for ac_dir in $ac_dummy; do
2683   IFS=$ac_save_IFS
2684   test -z "$ac_dir" && ac_dir=.
2685   if $as_executable_p "$ac_dir/$ac_word"; then
2686    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2687    echo "$as_me:2687: found $ac_dir/$ac_word" >&5
2688    break
2689 fi
2690 done
2691
2692   ;;
2693 esac
2694 fi
2695 LDCONFIG=$ac_cv_path_LDCONFIG
2696
2697 if test -n "$LDCONFIG"; then
2698   echo "$as_me:2698: result: $LDCONFIG" >&5
2699 echo "${ECHO_T}$LDCONFIG" >&6
2700 else
2701   echo "$as_me:2701: result: no" >&5
2702 echo "${ECHO_T}no" >&6
2703 fi
2704
2705   ;;
2706 esac
2707 fi
2708
2709 echo "$as_me:2709: checking if you want to ensure bool is consistent with C++" >&5
2710 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2711
2712 # Check whether --with-cxx or --without-cxx was given.
2713 if test "${with_cxx+set}" = set; then
2714   withval="$with_cxx"
2715   cf_with_cxx=$withval
2716 else
2717   cf_with_cxx=yes
2718 fi;
2719 echo "$as_me:2719: result: $cf_with_cxx" >&5
2720 echo "${ECHO_T}$cf_with_cxx" >&6
2721 if test "X$cf_with_cxx" = Xno ; then
2722         CXX=""
2723         GXX=""
2724 else
2725         # with autoconf 2.13, we can change the error to a warning:
2726                 ac_ext=cc
2727 ac_cpp='$CXXCPP $CPPFLAGS'
2728 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2731 ac_main_return=return
2732 if test -n "$ac_tool_prefix"; then
2733   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2734   do
2735     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2736 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2737 echo "$as_me:2737: checking for $ac_word" >&5
2738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2739 if test "${ac_cv_prog_CXX+set}" = set; then
2740   echo $ECHO_N "(cached) $ECHO_C" >&6
2741 else
2742   if test -n "$CXX"; then
2743   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2744 else
2745   ac_save_IFS=$IFS; IFS=$ac_path_separator
2746 ac_dummy="$PATH"
2747 for ac_dir in $ac_dummy; do
2748   IFS=$ac_save_IFS
2749   test -z "$ac_dir" && ac_dir=.
2750   $as_executable_p "$ac_dir/$ac_word" || continue
2751 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2752 echo "$as_me:2752: found $ac_dir/$ac_word" >&5
2753 break
2754 done
2755
2756 fi
2757 fi
2758 CXX=$ac_cv_prog_CXX
2759 if test -n "$CXX"; then
2760   echo "$as_me:2760: result: $CXX" >&5
2761 echo "${ECHO_T}$CXX" >&6
2762 else
2763   echo "$as_me:2763: result: no" >&5
2764 echo "${ECHO_T}no" >&6
2765 fi
2766
2767     test -n "$CXX" && break
2768   done
2769 fi
2770 if test -z "$CXX"; then
2771   ac_ct_CXX=$CXX
2772   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2773 do
2774   # Extract the first word of "$ac_prog", so it can be a program name with args.
2775 set dummy $ac_prog; ac_word=$2
2776 echo "$as_me:2776: checking for $ac_word" >&5
2777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2778 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2779   echo $ECHO_N "(cached) $ECHO_C" >&6
2780 else
2781   if test -n "$ac_ct_CXX"; then
2782   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2783 else
2784   ac_save_IFS=$IFS; IFS=$ac_path_separator
2785 ac_dummy="$PATH"
2786 for ac_dir in $ac_dummy; do
2787   IFS=$ac_save_IFS
2788   test -z "$ac_dir" && ac_dir=.
2789   $as_executable_p "$ac_dir/$ac_word" || continue
2790 ac_cv_prog_ac_ct_CXX="$ac_prog"
2791 echo "$as_me:2791: found $ac_dir/$ac_word" >&5
2792 break
2793 done
2794
2795 fi
2796 fi
2797 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2798 if test -n "$ac_ct_CXX"; then
2799   echo "$as_me:2799: result: $ac_ct_CXX" >&5
2800 echo "${ECHO_T}$ac_ct_CXX" >&6
2801 else
2802   echo "$as_me:2802: result: no" >&5
2803 echo "${ECHO_T}no" >&6
2804 fi
2805
2806   test -n "$ac_ct_CXX" && break
2807 done
2808 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2809
2810   CXX=$ac_ct_CXX
2811 fi
2812
2813 # Provide some information about the compiler.
2814 echo "$as_me:2814:" \
2815      "checking for C++ compiler version" >&5
2816 ac_compiler=`set X $ac_compile; echo $2`
2817 { (eval echo "$as_me:2817: \"$ac_compiler --version </dev/null >&5\"") >&5
2818   (eval $ac_compiler --version </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 { (eval echo "$as_me:2827: \"$ac_compiler -V </dev/null >&5\"") >&5
2828   (eval $ac_compiler -V </dev/null >&5) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); }
2832
2833 echo "$as_me:2833: checking whether we are using the GNU C++ compiler" >&5
2834 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2835 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2836   echo $ECHO_N "(cached) $ECHO_C" >&6
2837 else
2838   cat >conftest.$ac_ext <<_ACEOF
2839 #line 2839 "configure"
2840 #include "confdefs.h"
2841
2842 int
2843 main ()
2844 {
2845 #ifndef __GNUC__
2846        choke me
2847 #endif
2848
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 rm -f conftest.$ac_objext
2854 if { (eval echo "$as_me:2854: \"$ac_compile\"") >&5
2855   (eval $ac_compile) 2>&5
2856   ac_status=$?
2857   echo "$as_me:2857: \$? = $ac_status" >&5
2858   (exit $ac_status); } &&
2859          { ac_try='test -s conftest.$ac_objext'
2860   { (eval echo "$as_me:2860: \"$ac_try\"") >&5
2861   (eval $ac_try) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); }; }; then
2865   ac_compiler_gnu=yes
2866 else
2867   echo "$as_me: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2869 ac_compiler_gnu=no
2870 fi
2871 rm -f conftest.$ac_objext conftest.$ac_ext
2872 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2873
2874 fi
2875 echo "$as_me:2875: result: $ac_cv_cxx_compiler_gnu" >&5
2876 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2877 GXX=`test $ac_compiler_gnu = yes && echo yes`
2878 ac_test_CXXFLAGS=${CXXFLAGS+set}
2879 ac_save_CXXFLAGS=$CXXFLAGS
2880 CXXFLAGS="-g"
2881 echo "$as_me:2881: checking whether $CXX accepts -g" >&5
2882 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2883 if test "${ac_cv_prog_cxx_g+set}" = set; then
2884   echo $ECHO_N "(cached) $ECHO_C" >&6
2885 else
2886   cat >conftest.$ac_ext <<_ACEOF
2887 #line 2887 "configure"
2888 #include "confdefs.h"
2889
2890 int
2891 main ()
2892 {
2893
2894   ;
2895   return 0;
2896 }
2897 _ACEOF
2898 rm -f conftest.$ac_objext
2899 if { (eval echo "$as_me:2899: \"$ac_compile\"") >&5
2900   (eval $ac_compile) 2>&5
2901   ac_status=$?
2902   echo "$as_me:2902: \$? = $ac_status" >&5
2903   (exit $ac_status); } &&
2904          { ac_try='test -s conftest.$ac_objext'
2905   { (eval echo "$as_me:2905: \"$ac_try\"") >&5
2906   (eval $ac_try) 2>&5
2907   ac_status=$?
2908   echo "$as_me:2908: \$? = $ac_status" >&5
2909   (exit $ac_status); }; }; then
2910   ac_cv_prog_cxx_g=yes
2911 else
2912   echo "$as_me: failed program was:" >&5
2913 cat conftest.$ac_ext >&5
2914 ac_cv_prog_cxx_g=no
2915 fi
2916 rm -f conftest.$ac_objext conftest.$ac_ext
2917 fi
2918 echo "$as_me:2918: result: $ac_cv_prog_cxx_g" >&5
2919 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2920 if test "$ac_test_CXXFLAGS" = set; then
2921   CXXFLAGS=$ac_save_CXXFLAGS
2922 elif test $ac_cv_prog_cxx_g = yes; then
2923   if test "$GXX" = yes; then
2924     CXXFLAGS="-g -O2"
2925   else
2926     CXXFLAGS="-g"
2927   fi
2928 else
2929   if test "$GXX" = yes; then
2930     CXXFLAGS="-O2"
2931   else
2932     CXXFLAGS=
2933   fi
2934 fi
2935 for ac_declaration in \
2936    ''\
2937    '#include <stdlib.h>' \
2938    'extern "C" void std::exit (int) throw (); using std::exit;' \
2939    'extern "C" void std::exit (int); using std::exit;' \
2940    'extern "C" void exit (int) throw ();' \
2941    'extern "C" void exit (int);' \
2942    'void exit (int);'
2943 do
2944   cat >conftest.$ac_ext <<_ACEOF
2945 #line 2945 "configure"
2946 #include "confdefs.h"
2947 #include <stdlib.h>
2948 $ac_declaration
2949 int
2950 main ()
2951 {
2952 exit (42);
2953   ;
2954   return 0;
2955 }
2956 _ACEOF
2957 rm -f conftest.$ac_objext
2958 if { (eval echo "$as_me:2958: \"$ac_compile\"") >&5
2959   (eval $ac_compile) 2>&5
2960   ac_status=$?
2961   echo "$as_me:2961: \$? = $ac_status" >&5
2962   (exit $ac_status); } &&
2963          { ac_try='test -s conftest.$ac_objext'
2964   { (eval echo "$as_me:2964: \"$ac_try\"") >&5
2965   (eval $ac_try) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); }; }; then
2969   :
2970 else
2971   echo "$as_me: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
2973 continue
2974 fi
2975 rm -f conftest.$ac_objext conftest.$ac_ext
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979 $ac_declaration
2980 int
2981 main ()
2982 {
2983 exit (42);
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   break
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006 done
3007 rm -f conftest*
3008 if test -n "$ac_declaration"; then
3009   echo '#ifdef __cplusplus' >>confdefs.h
3010   echo $ac_declaration      >>confdefs.h
3011   echo '#endif'             >>confdefs.h
3012 fi
3013
3014 ac_ext=c
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019 ac_main_return=return
3020
3021                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3022         if test "$CXX" = "g++" ; then
3023                 # Extract the first word of "g++", so it can be a program name with args.
3024 set dummy g++; ac_word=$2
3025 echo "$as_me:3025: checking for $ac_word" >&5
3026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3027 if test "${ac_cv_path_CXX+set}" = set; then
3028   echo $ECHO_N "(cached) $ECHO_C" >&6
3029 else
3030   case $CXX in
3031   [\\/]* | ?:[\\/]*)
3032   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3033   ;;
3034   *)
3035   ac_save_IFS=$IFS; IFS=$ac_path_separator
3036 ac_dummy="$PATH"
3037 for ac_dir in $ac_dummy; do
3038   IFS=$ac_save_IFS
3039   test -z "$ac_dir" && ac_dir=.
3040   if $as_executable_p "$ac_dir/$ac_word"; then
3041    ac_cv_path_CXX="$ac_dir/$ac_word"
3042    echo "$as_me:3042: found $ac_dir/$ac_word" >&5
3043    break
3044 fi
3045 done
3046
3047   ;;
3048 esac
3049 fi
3050 CXX=$ac_cv_path_CXX
3051
3052 if test -n "$CXX"; then
3053   echo "$as_me:3053: result: $CXX" >&5
3054 echo "${ECHO_T}$CXX" >&6
3055 else
3056   echo "$as_me:3056: result: no" >&5
3057 echo "${ECHO_T}no" >&6
3058 fi
3059
3060         fi
3061         if test "$CXX" = "g++" ; then
3062                 { echo "$as_me:3062: WARNING: ignoring hardcoded g++" >&5
3063 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3064                 cf_with_cxx=no; CXX=""; GXX="";
3065         fi
3066 fi
3067
3068 GXX_VERSION=none
3069 if test "$GXX" = yes; then
3070         echo "$as_me:3070: checking version of g++" >&5
3071 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3072         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3073         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3074         echo "$as_me:3074: result: $GXX_VERSION" >&5
3075 echo "${ECHO_T}$GXX_VERSION" >&6
3076 fi
3077
3078 case $GXX_VERSION in
3079 1*|2.[0-6]*)
3080         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3081         # cf_cxx_library=no
3082         { echo "$as_me:3082: WARNING: templates do not work" >&5
3083 echo "$as_me: WARNING: templates do not work" >&2;}
3084         ;;
3085 esac
3086
3087 echo "$as_me:3087: checking if you want to build C++ binding and demo" >&5
3088 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3089
3090 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3091 if test "${with_cxx_binding+set}" = set; then
3092   withval="$with_cxx_binding"
3093   cf_with_cxx_binding=$withval
3094 else
3095   cf_with_cxx_binding=$cf_with_cxx
3096 fi;
3097 echo "$as_me:3097: result: $cf_with_cxx_binding" >&5
3098 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3099
3100 echo "$as_me:3100: checking if you want to build with Ada95" >&5
3101 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3102
3103 # Check whether --with-ada or --without-ada was given.
3104 if test "${with_ada+set}" = set; then
3105   withval="$with_ada"
3106   cf_with_ada=$withval
3107 else
3108   cf_with_ada=yes
3109 fi;
3110 echo "$as_me:3110: result: $cf_with_ada" >&5
3111 echo "${ECHO_T}$cf_with_ada" >&6
3112
3113 echo "$as_me:3113: checking if you want to build programs such as tic" >&5
3114 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3115
3116 # Check whether --with-progs or --without-progs was given.
3117 if test "${with_progs+set}" = set; then
3118   withval="$with_progs"
3119   cf_with_progs=$withval
3120 else
3121   cf_with_progs=yes
3122 fi;
3123 echo "$as_me:3123: result: $cf_with_progs" >&5
3124 echo "${ECHO_T}$cf_with_progs" >&6
3125
3126 echo "$as_me:3126: checking if you wish to install curses.h" >&5
3127 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3128
3129 # Check whether --with-curses-h or --without-curses-h was given.
3130 if test "${with_curses_h+set}" = set; then
3131   withval="$with_curses_h"
3132   with_curses_h=$withval
3133 else
3134   with_curses_h=yes
3135 fi;
3136 echo "$as_me:3136: result: $with_curses_h" >&5
3137 echo "${ECHO_T}$with_curses_h" >&6
3138
3139 modules_to_build="ncurses"
3140 if test "X$cf_with_progs" != Xno ; then
3141 modules_to_build="$modules_to_build progs tack"
3142 fi
3143 modules_to_build="$modules_to_build panel menu form"
3144
3145 test "$program_prefix" != NONE &&
3146   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3147 # Use a double $ so make ignores it.
3148 test "$program_suffix" != NONE &&
3149   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3150 # Double any \ or $.  echo might interpret backslashes.
3151 # By default was `s,x,x', remove it if useless.
3152 cat <<\_ACEOF >conftest.sed
3153 s/[\\$]/&&/g;s/;s,x,x,$//
3154 _ACEOF
3155 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3156 rm conftest.sed
3157
3158 for ac_prog in mawk gawk nawk awk
3159 do
3160   # Extract the first word of "$ac_prog", so it can be a program name with args.
3161 set dummy $ac_prog; ac_word=$2
3162 echo "$as_me:3162: checking for $ac_word" >&5
3163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3164 if test "${ac_cv_prog_AWK+set}" = set; then
3165   echo $ECHO_N "(cached) $ECHO_C" >&6
3166 else
3167   if test -n "$AWK"; then
3168   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3169 else
3170   ac_save_IFS=$IFS; IFS=$ac_path_separator
3171 ac_dummy="$PATH"
3172 for ac_dir in $ac_dummy; do
3173   IFS=$ac_save_IFS
3174   test -z "$ac_dir" && ac_dir=.
3175   $as_executable_p "$ac_dir/$ac_word" || continue
3176 ac_cv_prog_AWK="$ac_prog"
3177 echo "$as_me:3177: found $ac_dir/$ac_word" >&5
3178 break
3179 done
3180
3181 fi
3182 fi
3183 AWK=$ac_cv_prog_AWK
3184 if test -n "$AWK"; then
3185   echo "$as_me:3185: result: $AWK" >&5
3186 echo "${ECHO_T}$AWK" >&6
3187 else
3188   echo "$as_me:3188: result: no" >&5
3189 echo "${ECHO_T}no" >&6
3190 fi
3191
3192   test -n "$AWK" && break
3193 done
3194
3195 test -z "$AWK" && { { echo "$as_me:3195: error: No awk program found" >&5
3196 echo "$as_me: error: No awk program found" >&2;}
3197    { (exit 1); exit 1; }; }
3198
3199 echo "$as_me:3199: checking for egrep" >&5
3200 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3201 if test "${ac_cv_prog_egrep+set}" = set; then
3202   echo $ECHO_N "(cached) $ECHO_C" >&6
3203 else
3204   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3205     then ac_cv_prog_egrep='grep -E'
3206     else ac_cv_prog_egrep='egrep'
3207     fi
3208 fi
3209 echo "$as_me:3209: result: $ac_cv_prog_egrep" >&5
3210 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3211  EGREP=$ac_cv_prog_egrep
3212
3213 test -z "$EGREP" && { { echo "$as_me:3213: error: No egrep program found" >&5
3214 echo "$as_me: error: No egrep program found" >&2;}
3215    { (exit 1); exit 1; }; }
3216
3217 # Find a good install program.  We prefer a C program (faster),
3218 # so one script is as good as another.  But avoid the broken or
3219 # incompatible versions:
3220 # SysV /etc/install, /usr/sbin/install
3221 # SunOS /usr/etc/install
3222 # IRIX /sbin/install
3223 # AIX /bin/install
3224 # AmigaOS /C/install, which installs bootblocks on floppy discs
3225 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3226 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3227 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3228 # ./install, which can be erroneously created by make from ./install.sh.
3229 echo "$as_me:3229: checking for a BSD compatible install" >&5
3230 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3231 if test -z "$INSTALL"; then
3232 if test "${ac_cv_path_install+set}" = set; then
3233   echo $ECHO_N "(cached) $ECHO_C" >&6
3234 else
3235     ac_save_IFS=$IFS; IFS=$ac_path_separator
3236   for ac_dir in $PATH; do
3237     IFS=$ac_save_IFS
3238     # Account for people who put trailing slashes in PATH elements.
3239     case $ac_dir/ in
3240     / | ./ | .// | /cC/* \
3241     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3242     | /usr/ucb/* ) ;;
3243     *)
3244       # OSF1 and SCO ODT 3.0 have their own names for install.
3245       # Don't use installbsd from OSF since it installs stuff as root
3246       # by default.
3247       for ac_prog in ginstall scoinst install; do
3248         if $as_executable_p "$ac_dir/$ac_prog"; then
3249           if test $ac_prog = install &&
3250             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3251             # AIX install.  It has an incompatible calling convention.
3252             :
3253           elif test $ac_prog = install &&
3254             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3255             # program-specific install script used by HP pwplus--don't use.
3256             :
3257           else
3258             ac_cv_path_install="$ac_dir/$ac_prog -c"
3259             break 2
3260           fi
3261         fi
3262       done
3263       ;;
3264     esac
3265   done
3266
3267 fi
3268   if test "${ac_cv_path_install+set}" = set; then
3269     INSTALL=$ac_cv_path_install
3270   else
3271     # As a last resort, use the slow shell script.  We don't cache a
3272     # path for INSTALL within a source directory, because that will
3273     # break other packages using the cache if that directory is
3274     # removed, or if the path is relative.
3275     INSTALL=$ac_install_sh
3276   fi
3277 fi
3278 echo "$as_me:3278: result: $INSTALL" >&5
3279 echo "${ECHO_T}$INSTALL" >&6
3280
3281 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3282 # It thinks the first close brace ends the variable substitution.
3283 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3284
3285 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3286
3287 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3288
3289 case $INSTALL in
3290 /*)
3291   ;;
3292 *)
3293   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3294   test -z "$cf_dir" && cf_dir=.
3295   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3296   ;;
3297 esac
3298
3299 for ac_prog in tdlint lint alint
3300 do
3301   # Extract the first word of "$ac_prog", so it can be a program name with args.
3302 set dummy $ac_prog; ac_word=$2
3303 echo "$as_me:3303: checking for $ac_word" >&5
3304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3305 if test "${ac_cv_prog_LINT+set}" = set; then
3306   echo $ECHO_N "(cached) $ECHO_C" >&6
3307 else
3308   if test -n "$LINT"; then
3309   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3310 else
3311   ac_save_IFS=$IFS; IFS=$ac_path_separator
3312 ac_dummy="$PATH"
3313 for ac_dir in $ac_dummy; do
3314   IFS=$ac_save_IFS
3315   test -z "$ac_dir" && ac_dir=.
3316   $as_executable_p "$ac_dir/$ac_word" || continue
3317 ac_cv_prog_LINT="$ac_prog"
3318 echo "$as_me:3318: found $ac_dir/$ac_word" >&5
3319 break
3320 done
3321
3322 fi
3323 fi
3324 LINT=$ac_cv_prog_LINT
3325 if test -n "$LINT"; then
3326   echo "$as_me:3326: result: $LINT" >&5
3327 echo "${ECHO_T}$LINT" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333   test -n "$LINT" && break
3334 done
3335
3336 echo "$as_me:3336: checking whether ln -s works" >&5
3337 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3338 LN_S=$as_ln_s
3339 if test "$LN_S" = "ln -s"; then
3340   echo "$as_me:3340: result: yes" >&5
3341 echo "${ECHO_T}yes" >&6
3342 else
3343   echo "$as_me:3343: result: no, using $LN_S" >&5
3344 echo "${ECHO_T}no, using $LN_S" >&6
3345 fi
3346
3347 echo "$as_me:3347: checking for long file names" >&5
3348 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3349 if test "${ac_cv_sys_long_file_names+set}" = set; then
3350   echo $ECHO_N "(cached) $ECHO_C" >&6
3351 else
3352   ac_cv_sys_long_file_names=yes
3353 # Test for long file names in all the places we know might matter:
3354 #      .                the current directory, where building will happen
3355 #      $prefix/lib      where we will be installing things
3356 #      $exec_prefix/lib likewise
3357 # eval it to expand exec_prefix.
3358 #      $TMPDIR          if set, where it might want to write temporary files
3359 # if $TMPDIR is not set:
3360 #      /tmp             where it might want to write temporary files
3361 #      /var/tmp         likewise
3362 #      /usr/tmp         likewise
3363 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3364   ac_tmpdirs=$TMPDIR
3365 else
3366   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3367 fi
3368 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3369   test -d $ac_dir || continue
3370   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3371   ac_xdir=$ac_dir/cf$$
3372   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3373   ac_tf1=$ac_xdir/conftest9012345
3374   ac_tf2=$ac_xdir/conftest9012346
3375   (echo 1 >$ac_tf1) 2>/dev/null
3376   (echo 2 >$ac_tf2) 2>/dev/null
3377   ac_val=`cat $ac_tf1 2>/dev/null`
3378   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3379     ac_cv_sys_long_file_names=no
3380     rm -rf $ac_xdir 2>/dev/null
3381     break
3382   fi
3383   rm -rf $ac_xdir 2>/dev/null
3384 done
3385 fi
3386 echo "$as_me:3386: result: $ac_cv_sys_long_file_names" >&5
3387 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3388 if test $ac_cv_sys_long_file_names = yes; then
3389
3390 cat >>confdefs.h <<\EOF
3391 #define HAVE_LONG_FILE_NAMES 1
3392 EOF
3393
3394 fi
3395
3396 echo "$as_me:3396: checking if we should assume mixed-case filenames" >&5
3397 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3398
3399 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3400 if test "${enable_mixed_case+set}" = set; then
3401   enableval="$enable_mixed_case"
3402   enable_mixedcase=$enableval
3403 else
3404   enable_mixedcase=auto
3405 fi;
3406 echo "$as_me:3406: result: $enable_mixedcase" >&5
3407 echo "${ECHO_T}$enable_mixedcase" >&6
3408 if test "$enable_mixedcase" = "auto" ; then
3409
3410 echo "$as_me:3410: checking if filesystem supports mixed-case filenames" >&5
3411 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3412 if test "${cf_cv_mixedcase+set}" = set; then
3413   echo $ECHO_N "(cached) $ECHO_C" >&6
3414 else
3415
3416 if test "$cross_compiling" = yes ; then
3417         case $target_alias in #(vi
3418         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3419                 cf_cv_mixedcase=no
3420                 ;;
3421         *)
3422                 cf_cv_mixedcase=yes
3423                 ;;
3424         esac
3425 else
3426         rm -f conftest CONFTEST
3427         echo test >conftest
3428         if test -f CONFTEST ; then
3429                 cf_cv_mixedcase=no
3430         else
3431                 cf_cv_mixedcase=yes
3432         fi
3433         rm -f conftest CONFTEST
3434 fi
3435
3436 fi
3437 echo "$as_me:3437: result: $cf_cv_mixedcase" >&5
3438 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3439 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3440 #define MIXEDCASE_FILENAMES 1
3441 EOF
3442
3443 else
3444     cf_cv_mixedcase=$enable_mixedcase
3445     if test "$enable_mixedcase" = "yes" ; then
3446         cat >>confdefs.h <<\EOF
3447 #define MIXEDCASE_FILENAMES 1
3448 EOF
3449
3450     fi
3451 fi
3452
3453 # do this after mixed-case option (tags/TAGS is not as important as tic).
3454 echo "$as_me:3454: checking whether ${MAKE-make} sets \${MAKE}" >&5
3455 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3456 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3457 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460   cat >conftest.make <<\EOF
3461 all:
3462         @echo 'ac_maketemp="${MAKE}"'
3463 EOF
3464 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3465 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3466 if test -n "$ac_maketemp"; then
3467   eval ac_cv_prog_make_${ac_make}_set=yes
3468 else
3469   eval ac_cv_prog_make_${ac_make}_set=no
3470 fi
3471 rm -f conftest.make
3472 fi
3473 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3474   echo "$as_me:3474: result: yes" >&5
3475 echo "${ECHO_T}yes" >&6
3476   SET_MAKE=
3477 else
3478   echo "$as_me:3478: result: no" >&5
3479 echo "${ECHO_T}no" >&6
3480   SET_MAKE="MAKE=${MAKE-make}"
3481 fi
3482
3483 # Extract the first word of "ctags", so it can be a program name with args.
3484 set dummy ctags; ac_word=$2
3485 echo "$as_me:3485: checking for $ac_word" >&5
3486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3487 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3488   echo $ECHO_N "(cached) $ECHO_C" >&6
3489 else
3490   if test -n "$MAKE_LOWER_TAGS"; then
3491   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3492 else
3493   ac_save_IFS=$IFS; IFS=$ac_path_separator
3494 ac_dummy="$PATH"
3495 for ac_dir in $ac_dummy; do
3496   IFS=$ac_save_IFS
3497   test -z "$ac_dir" && ac_dir=.
3498   $as_executable_p "$ac_dir/$ac_word" || continue
3499 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3500 echo "$as_me:3500: found $ac_dir/$ac_word" >&5
3501 break
3502 done
3503
3504   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3505 fi
3506 fi
3507 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3508 if test -n "$MAKE_LOWER_TAGS"; then
3509   echo "$as_me:3509: result: $MAKE_LOWER_TAGS" >&5
3510 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3511 else
3512   echo "$as_me:3512: result: no" >&5
3513 echo "${ECHO_T}no" >&6
3514 fi
3515
3516 if test "$cf_cv_mixedcase" = yes ; then
3517         # Extract the first word of "etags", so it can be a program name with args.
3518 set dummy etags; ac_word=$2
3519 echo "$as_me:3519: checking for $ac_word" >&5
3520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3521 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3522   echo $ECHO_N "(cached) $ECHO_C" >&6
3523 else
3524   if test -n "$MAKE_UPPER_TAGS"; then
3525   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3526 else
3527   ac_save_IFS=$IFS; IFS=$ac_path_separator
3528 ac_dummy="$PATH"
3529 for ac_dir in $ac_dummy; do
3530   IFS=$ac_save_IFS
3531   test -z "$ac_dir" && ac_dir=.
3532   $as_executable_p "$ac_dir/$ac_word" || continue
3533 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3534 echo "$as_me:3534: found $ac_dir/$ac_word" >&5
3535 break
3536 done
3537
3538   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3539 fi
3540 fi
3541 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3542 if test -n "$MAKE_UPPER_TAGS"; then
3543   echo "$as_me:3543: result: $MAKE_UPPER_TAGS" >&5
3544 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3545 else
3546   echo "$as_me:3546: result: no" >&5
3547 echo "${ECHO_T}no" >&6
3548 fi
3549
3550 else
3551         MAKE_UPPER_TAGS=no
3552 fi
3553
3554 if test "$MAKE_UPPER_TAGS" = yes ; then
3555         MAKE_UPPER_TAGS=
3556 else
3557         MAKE_UPPER_TAGS="#"
3558 fi
3559
3560 if test "$MAKE_LOWER_TAGS" = yes ; then
3561         MAKE_LOWER_TAGS=
3562 else
3563         MAKE_LOWER_TAGS="#"
3564 fi
3565
3566 echo "$as_me:3566: checking for makeflags variable" >&5
3567 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3568 if test "${cf_cv_makeflags+set}" = set; then
3569   echo $ECHO_N "(cached) $ECHO_C" >&6
3570 else
3571
3572         cf_cv_makeflags=''
3573         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3574         do
3575                 cat >cf_makeflags.tmp <<CF_EOF
3576 SHELL = /bin/sh
3577 all :
3578         @ echo '.$cf_option'
3579 CF_EOF
3580                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3581                 case "$cf_result" in
3582                 .*k)
3583                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3584                         case "$cf_result" in
3585                         .*CC=*) cf_cv_makeflags=
3586                                 ;;
3587                         *)      cf_cv_makeflags=$cf_option
3588                                 ;;
3589                         esac
3590                         break
3591                         ;;
3592                 .-)     ;;
3593                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3594                         ;;
3595                 esac
3596         done
3597         rm -f cf_makeflags.tmp
3598
3599 fi
3600 echo "$as_me:3600: result: $cf_cv_makeflags" >&5
3601 echo "${ECHO_T}$cf_cv_makeflags" >&6
3602
3603 if test -n "$ac_tool_prefix"; then
3604   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3605 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3606 echo "$as_me:3606: checking for $ac_word" >&5
3607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3608 if test "${ac_cv_prog_RANLIB+set}" = set; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   if test -n "$RANLIB"; then
3612   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3613 else
3614   ac_save_IFS=$IFS; IFS=$ac_path_separator
3615 ac_dummy="$PATH"
3616 for ac_dir in $ac_dummy; do
3617   IFS=$ac_save_IFS
3618   test -z "$ac_dir" && ac_dir=.
3619   $as_executable_p "$ac_dir/$ac_word" || continue
3620 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3621 echo "$as_me:3621: found $ac_dir/$ac_word" >&5
3622 break
3623 done
3624
3625 fi
3626 fi
3627 RANLIB=$ac_cv_prog_RANLIB
3628 if test -n "$RANLIB"; then
3629   echo "$as_me:3629: result: $RANLIB" >&5
3630 echo "${ECHO_T}$RANLIB" >&6
3631 else
3632   echo "$as_me:3632: result: no" >&5
3633 echo "${ECHO_T}no" >&6
3634 fi
3635
3636 fi
3637 if test -z "$ac_cv_prog_RANLIB"; then
3638   ac_ct_RANLIB=$RANLIB
3639   # Extract the first word of "ranlib", so it can be a program name with args.
3640 set dummy ranlib; ac_word=$2
3641 echo "$as_me:3641: checking for $ac_word" >&5
3642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3643 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3644   echo $ECHO_N "(cached) $ECHO_C" >&6
3645 else
3646   if test -n "$ac_ct_RANLIB"; then
3647   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3648 else
3649   ac_save_IFS=$IFS; IFS=$ac_path_separator
3650 ac_dummy="$PATH"
3651 for ac_dir in $ac_dummy; do
3652   IFS=$ac_save_IFS
3653   test -z "$ac_dir" && ac_dir=.
3654   $as_executable_p "$ac_dir/$ac_word" || continue
3655 ac_cv_prog_ac_ct_RANLIB="ranlib"
3656 echo "$as_me:3656: found $ac_dir/$ac_word" >&5
3657 break
3658 done
3659
3660   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3661 fi
3662 fi
3663 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3664 if test -n "$ac_ct_RANLIB"; then
3665   echo "$as_me:3665: result: $ac_ct_RANLIB" >&5
3666 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3667 else
3668   echo "$as_me:3668: result: no" >&5
3669 echo "${ECHO_T}no" >&6
3670 fi
3671
3672   RANLIB=$ac_ct_RANLIB
3673 else
3674   RANLIB="$ac_cv_prog_RANLIB"
3675 fi
3676
3677 if test -n "$ac_tool_prefix"; then
3678   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3679 set dummy ${ac_tool_prefix}ld; ac_word=$2
3680 echo "$as_me:3680: checking for $ac_word" >&5
3681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3682 if test "${ac_cv_prog_LD+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685   if test -n "$LD"; then
3686   ac_cv_prog_LD="$LD" # Let the user override the test.
3687 else
3688   ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 ac_dummy="$PATH"
3690 for ac_dir in $ac_dummy; do
3691   IFS=$ac_save_IFS
3692   test -z "$ac_dir" && ac_dir=.
3693   $as_executable_p "$ac_dir/$ac_word" || continue
3694 ac_cv_prog_LD="${ac_tool_prefix}ld"
3695 echo "$as_me:3695: found $ac_dir/$ac_word" >&5
3696 break
3697 done
3698
3699 fi
3700 fi
3701 LD=$ac_cv_prog_LD
3702 if test -n "$LD"; then
3703   echo "$as_me:3703: result: $LD" >&5
3704 echo "${ECHO_T}$LD" >&6
3705 else
3706   echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3708 fi
3709
3710 fi
3711 if test -z "$ac_cv_prog_LD"; then
3712   ac_ct_LD=$LD
3713   # Extract the first word of "ld", so it can be a program name with args.
3714 set dummy ld; ac_word=$2
3715 echo "$as_me:3715: checking for $ac_word" >&5
3716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3717 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3718   echo $ECHO_N "(cached) $ECHO_C" >&6
3719 else
3720   if test -n "$ac_ct_LD"; then
3721   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3722 else
3723   ac_save_IFS=$IFS; IFS=$ac_path_separator
3724 ac_dummy="$PATH"
3725 for ac_dir in $ac_dummy; do
3726   IFS=$ac_save_IFS
3727   test -z "$ac_dir" && ac_dir=.
3728   $as_executable_p "$ac_dir/$ac_word" || continue
3729 ac_cv_prog_ac_ct_LD="ld"
3730 echo "$as_me:3730: found $ac_dir/$ac_word" >&5
3731 break
3732 done
3733
3734   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3735 fi
3736 fi
3737 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3738 if test -n "$ac_ct_LD"; then
3739   echo "$as_me:3739: result: $ac_ct_LD" >&5
3740 echo "${ECHO_T}$ac_ct_LD" >&6
3741 else
3742   echo "$as_me:3742: result: no" >&5
3743 echo "${ECHO_T}no" >&6
3744 fi
3745
3746   LD=$ac_ct_LD
3747 else
3748   LD="$ac_cv_prog_LD"
3749 fi
3750
3751 if test -n "$ac_tool_prefix"; then
3752   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3753 set dummy ${ac_tool_prefix}ar; ac_word=$2
3754 echo "$as_me:3754: checking for $ac_word" >&5
3755 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3756 if test "${ac_cv_prog_AR+set}" = set; then
3757   echo $ECHO_N "(cached) $ECHO_C" >&6
3758 else
3759   if test -n "$AR"; then
3760   ac_cv_prog_AR="$AR" # Let the user override the test.
3761 else
3762   ac_save_IFS=$IFS; IFS=$ac_path_separator
3763 ac_dummy="$PATH"
3764 for ac_dir in $ac_dummy; do
3765   IFS=$ac_save_IFS
3766   test -z "$ac_dir" && ac_dir=.
3767   $as_executable_p "$ac_dir/$ac_word" || continue
3768 ac_cv_prog_AR="${ac_tool_prefix}ar"
3769 echo "$as_me:3769: found $ac_dir/$ac_word" >&5
3770 break
3771 done
3772
3773 fi
3774 fi
3775 AR=$ac_cv_prog_AR
3776 if test -n "$AR"; then
3777   echo "$as_me:3777: result: $AR" >&5
3778 echo "${ECHO_T}$AR" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784 fi
3785 if test -z "$ac_cv_prog_AR"; then
3786   ac_ct_AR=$AR
3787   # Extract the first word of "ar", so it can be a program name with args.
3788 set dummy ar; ac_word=$2
3789 echo "$as_me:3789: checking for $ac_word" >&5
3790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3791 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3792   echo $ECHO_N "(cached) $ECHO_C" >&6
3793 else
3794   if test -n "$ac_ct_AR"; then
3795   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3796 else
3797   ac_save_IFS=$IFS; IFS=$ac_path_separator
3798 ac_dummy="$PATH"
3799 for ac_dir in $ac_dummy; do
3800   IFS=$ac_save_IFS
3801   test -z "$ac_dir" && ac_dir=.
3802   $as_executable_p "$ac_dir/$ac_word" || continue
3803 ac_cv_prog_ac_ct_AR="ar"
3804 echo "$as_me:3804: found $ac_dir/$ac_word" >&5
3805 break
3806 done
3807
3808   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3809 fi
3810 fi
3811 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3812 if test -n "$ac_ct_AR"; then
3813   echo "$as_me:3813: result: $ac_ct_AR" >&5
3814 echo "${ECHO_T}$ac_ct_AR" >&6
3815 else
3816   echo "$as_me:3816: result: no" >&5
3817 echo "${ECHO_T}no" >&6
3818 fi
3819
3820   AR=$ac_ct_AR
3821 else
3822   AR="$ac_cv_prog_AR"
3823 fi
3824
3825 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3826   echo $ECHO_N "(cached) $ECHO_C" >&6
3827 else
3828
3829 echo "$as_me:3829: checking for archiver options (symbol AR_OPTS)" >&5
3830 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3831
3832 if test -z "$AR_OPTS" ; then
3833         AR_OPTS=rv
3834
3835 fi
3836
3837 cf_cv_subst_AR_OPTS=$AR_OPTS
3838 echo "$as_me:3838: result: $AR_OPTS" >&5
3839 echo "${ECHO_T}$AR_OPTS" >&6
3840
3841 fi
3842
3843 echo "$as_me:3843: checking if you have specified an install-prefix" >&5
3844 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3845
3846 # Check whether --with-install-prefix or --without-install-prefix was given.
3847 if test "${with_install_prefix+set}" = set; then
3848   withval="$with_install_prefix"
3849   case "$withval" in #(vi
3850         yes|no) #(vi
3851                 ;;
3852         *)      DESTDIR="$withval"
3853                 ;;
3854         esac
3855 fi;
3856 echo "$as_me:3856: result: $DESTDIR" >&5
3857 echo "${ECHO_T}$DESTDIR" >&6
3858
3859 ###############################################################################
3860
3861 # If we're cross-compiling, allow the user to override the tools and their
3862 # options.  The configure script is oriented toward identifying the host
3863 # compiler, etc., but we need a build compiler to generate parts of the source.
3864
3865 if test "$cross_compiling" = yes ; then
3866
3867         # defaults that we might want to override
3868         : ${BUILD_CFLAGS:=''}
3869         : ${BUILD_CPPFLAGS:=''}
3870         : ${BUILD_LDFLAGS:=''}
3871         : ${BUILD_LIBS:=''}
3872         : ${BUILD_EXEEXT:='$x'}
3873         : ${BUILD_OBJEXT:='o'}
3874
3875 # Check whether --with-build-cc or --without-build-cc was given.
3876 if test "${with_build_cc+set}" = set; then
3877   withval="$with_build_cc"
3878   BUILD_CC="$withval"
3879 else
3880   for ac_prog in gcc cc cl
3881 do
3882   # Extract the first word of "$ac_prog", so it can be a program name with args.
3883 set dummy $ac_prog; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$BUILD_CC"; then
3890   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_BUILD_CC="$ac_prog"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903 fi
3904 fi
3905 BUILD_CC=$ac_cv_prog_BUILD_CC
3906 if test -n "$BUILD_CC"; then
3907   echo "$as_me:3907: result: $BUILD_CC" >&5
3908 echo "${ECHO_T}$BUILD_CC" >&6
3909 else
3910   echo "$as_me:3910: result: no" >&5
3911 echo "${ECHO_T}no" >&6
3912 fi
3913
3914   test -n "$BUILD_CC" && break
3915 done
3916
3917 fi;
3918         echo "$as_me:3918: checking for native build C compiler" >&5
3919 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3920         echo "$as_me:3920: result: $BUILD_CC" >&5
3921 echo "${ECHO_T}$BUILD_CC" >&6
3922
3923         echo "$as_me:3923: checking for native build C preprocessor" >&5
3924 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3925
3926 # Check whether --with-build-cpp or --without-build-cpp was given.
3927 if test "${with_build_cpp+set}" = set; then
3928   withval="$with_build_cpp"
3929   BUILD_CPP="$withval"
3930 else
3931   BUILD_CPP='${BUILD_CC} -E'
3932 fi;
3933         echo "$as_me:3933: result: $BUILD_CPP" >&5
3934 echo "${ECHO_T}$BUILD_CPP" >&6
3935
3936         echo "$as_me:3936: checking for native build C flags" >&5
3937 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3938
3939 # Check whether --with-build-cflags or --without-build-cflags was given.
3940 if test "${with_build_cflags+set}" = set; then
3941   withval="$with_build_cflags"
3942   BUILD_CFLAGS="$withval"
3943 fi;
3944         echo "$as_me:3944: result: $BUILD_CFLAGS" >&5
3945 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3946
3947         echo "$as_me:3947: checking for native build C preprocessor-flags" >&5
3948 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3949
3950 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3951 if test "${with_build_cppflags+set}" = set; then
3952   withval="$with_build_cppflags"
3953   BUILD_CPPFLAGS="$withval"
3954 fi;
3955         echo "$as_me:3955: result: $BUILD_CPPFLAGS" >&5
3956 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3957
3958         echo "$as_me:3958: checking for native build linker-flags" >&5
3959 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3960
3961 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3962 if test "${with_build_ldflags+set}" = set; then
3963   withval="$with_build_ldflags"
3964   BUILD_LDFLAGS="$withval"
3965 fi;
3966         echo "$as_me:3966: result: $BUILD_LDFLAGS" >&5
3967 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3968
3969         echo "$as_me:3969: checking for native build linker-libraries" >&5
3970 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3971
3972 # Check whether --with-build-libs or --without-build-libs was given.
3973 if test "${with_build_libs+set}" = set; then
3974   withval="$with_build_libs"
3975   BUILD_LIBS="$withval"
3976 fi;
3977         echo "$as_me:3977: result: $BUILD_LIBS" >&5
3978 echo "${ECHO_T}$BUILD_LIBS" >&6
3979
3980         # this assumes we're on Unix.
3981         BUILD_EXEEXT=
3982         BUILD_OBJEXT=o
3983
3984         : ${BUILD_CC:='${CC}'}
3985
3986         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3987                 { { echo "$as_me:3987: error: Cross-build requires two compilers.
3988 Use --with-build-cc to specify the native compiler." >&5
3989 echo "$as_me: error: Cross-build requires two compilers.
3990 Use --with-build-cc to specify the native compiler." >&2;}
3991    { (exit 1); exit 1; }; }
3992         fi
3993
3994 else
3995         : ${BUILD_CC:='${CC}'}
3996         : ${BUILD_CPP:='${CPP}'}
3997         : ${BUILD_CFLAGS:='${CFLAGS}'}
3998         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3999         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4000         : ${BUILD_LIBS:='${LIBS}'}
4001         : ${BUILD_EXEEXT:='$x'}
4002         : ${BUILD_OBJEXT:='o'}
4003 fi
4004
4005 ###############################################################################
4006
4007 ### Options to allow the user to specify the set of libraries which are used.
4008 ### Use "--without-normal --with-shared" to allow the default model to be
4009 ### shared, for example.
4010 cf_list_models=""
4011
4012 LIBTOOL=
4013
4014 # common library maintenance symbols that are convenient for libtool scripts:
4015 LIB_CREATE='${AR} -cr'
4016 LIB_OBJECT='${OBJECTS}'
4017 LIB_SUFFIX=.a
4018 LIB_PREP="$RANLIB"
4019
4020 # symbols used to prop libtool up to enable it to determine what it should be
4021 # doing:
4022 LIB_CLEAN=
4023 LIB_COMPILE=
4024 LIB_LINK='${CC}'
4025 LIB_INSTALL=
4026 LIB_UNINSTALL=
4027
4028 echo "$as_me:4028: checking if you want to build libraries with libtool" >&5
4029 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4030
4031 # Check whether --with-libtool or --without-libtool was given.
4032 if test "${with_libtool+set}" = set; then
4033   withval="$with_libtool"
4034   with_libtool=$withval
4035 else
4036   with_libtool=no
4037 fi;
4038 echo "$as_me:4038: result: $with_libtool" >&5
4039 echo "${ECHO_T}$with_libtool" >&6
4040 if test "$with_libtool" != "no"; then
4041
4042         if test "$with_libtool" != "yes" ; then
4043
4044 if test "x$prefix" != xNONE; then
4045   cf_path_syntax="$prefix"
4046 else
4047   cf_path_syntax="$ac_default_prefix"
4048 fi
4049
4050 case ".$with_libtool" in #(vi
4051 .\$\(*\)*|.\'*\'*) #(vi
4052   ;;
4053 ..|./*|.\\*) #(vi
4054   ;;
4055 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4056   ;;
4057 .\${*prefix}*) #(vi
4058   eval with_libtool="$with_libtool"
4059   case ".$with_libtool" in #(vi
4060   .NONE/*)
4061     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4062     ;;
4063   esac
4064   ;; #(vi
4065 .no|.NONE/*)
4066   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4067   ;;
4068 *)
4069   { { echo "$as_me:4069: error: expected a pathname, not \"$with_libtool\"" >&5
4070 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4071    { (exit 1); exit 1; }; }
4072   ;;
4073 esac
4074
4075                 LIBTOOL=$with_libtool
4076         else
4077                 # Extract the first word of "libtool", so it can be a program name with args.
4078 set dummy libtool; ac_word=$2
4079 echo "$as_me:4079: checking for $ac_word" >&5
4080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4081 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4082   echo $ECHO_N "(cached) $ECHO_C" >&6
4083 else
4084   case $LIBTOOL in
4085   [\\/]* | ?:[\\/]*)
4086   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4087   ;;
4088   *)
4089   ac_save_IFS=$IFS; IFS=$ac_path_separator
4090 ac_dummy="$PATH"
4091 for ac_dir in $ac_dummy; do
4092   IFS=$ac_save_IFS
4093   test -z "$ac_dir" && ac_dir=.
4094   if $as_executable_p "$ac_dir/$ac_word"; then
4095    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4096    echo "$as_me:4096: found $ac_dir/$ac_word" >&5
4097    break
4098 fi
4099 done
4100
4101   ;;
4102 esac
4103 fi
4104 LIBTOOL=$ac_cv_path_LIBTOOL
4105
4106 if test -n "$LIBTOOL"; then
4107   echo "$as_me:4107: result: $LIBTOOL" >&5
4108 echo "${ECHO_T}$LIBTOOL" >&6
4109 else
4110   echo "$as_me:4110: result: no" >&5
4111 echo "${ECHO_T}no" >&6
4112 fi
4113
4114         fi
4115         if test -z "$LIBTOOL" ; then
4116                 { { echo "$as_me:4116: error: Cannot find libtool" >&5
4117 echo "$as_me: error: Cannot find libtool" >&2;}
4118    { (exit 1); exit 1; }; }
4119         fi
4120         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4121         LIB_OBJECT='${OBJECTS:.o=.lo}'
4122         LIB_SUFFIX=.la
4123         LIB_CLEAN='${LIBTOOL} --mode=clean'
4124         LIB_COMPILE='${LIBTOOL} --mode=compile'
4125         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4126         LIB_INSTALL='${LIBTOOL} --mode=install'
4127         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4128         LIB_PREP=:
4129
4130         # Show the version of libtool
4131         echo "$as_me:4131: checking version of libtool" >&5
4132 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4133
4134         # Save the version in a cache variable - this is not entirely a good
4135         # thing, but the version string from libtool is very ugly, and for
4136         # bug reports it might be useful to have the original string.
4137         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.].*//'`
4138         echo "$as_me:4138: result: $cf_cv_libtool_version" >&5
4139 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4140         if test -z "$cf_cv_libtool_version" ; then
4141                 { { echo "$as_me:4141: error: This is not GNU libtool" >&5
4142 echo "$as_me: error: This is not GNU libtool" >&2;}
4143    { (exit 1); exit 1; }; }
4144         fi
4145
4146         # special hack to add --tag option for C++ compiler
4147         case $cf_cv_libtool_version in
4148         1.[5-9]*|[2-9]*)
4149                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4150                 LIBTOOL="$LIBTOOL --tag=CC"
4151                 ;;
4152         *)
4153                 LIBTOOL_CXX="$LIBTOOL"
4154                 ;;
4155         esac
4156 else
4157         LIBTOOL=""
4158         LIBTOOL_CXX=""
4159 fi
4160
4161 test -z "$LIBTOOL" && ECHO_LT=
4162
4163 if test "$with_libtool" != "no" ; then
4164
4165 cf_list_models="$cf_list_models libtool"
4166
4167 else
4168
4169 echo "$as_me:4169: checking if you want to build shared libraries" >&5
4170 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4171
4172 # Check whether --with-shared or --without-shared was given.
4173 if test "${with_shared+set}" = set; then
4174   withval="$with_shared"
4175   with_shared=$withval
4176 else
4177   with_shared=no
4178 fi;
4179 echo "$as_me:4179: result: $with_shared" >&5
4180 echo "${ECHO_T}$with_shared" >&6
4181 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4182
4183 echo "$as_me:4183: checking if you want to build static libraries" >&5
4184 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4185
4186 # Check whether --with-normal or --without-normal was given.
4187 if test "${with_normal+set}" = set; then
4188   withval="$with_normal"
4189   with_normal=$withval
4190 else
4191   with_normal=yes
4192 fi;
4193 echo "$as_me:4193: result: $with_normal" >&5
4194 echo "${ECHO_T}$with_normal" >&6
4195 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4196
4197 echo "$as_me:4197: checking if you want to build debug libraries" >&5
4198 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4199
4200 # Check whether --with-debug or --without-debug was given.
4201 if test "${with_debug+set}" = set; then
4202   withval="$with_debug"
4203   with_debug=$withval
4204 else
4205   with_debug=yes
4206 fi;
4207 echo "$as_me:4207: result: $with_debug" >&5
4208 echo "${ECHO_T}$with_debug" >&6
4209 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4210
4211 echo "$as_me:4211: checking if you want to build profiling libraries" >&5
4212 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4213
4214 # Check whether --with-profile or --without-profile was given.
4215 if test "${with_profile+set}" = set; then
4216   withval="$with_profile"
4217   with_profile=$withval
4218 else
4219   with_profile=no
4220 fi;
4221 echo "$as_me:4221: result: $with_profile" >&5
4222 echo "${ECHO_T}$with_profile" >&6
4223 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4224
4225 fi
4226
4227 ###############################################################################
4228
4229 echo "$as_me:4229: checking for specified models" >&5
4230 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4231 test -z "$cf_list_models" && cf_list_models=normal
4232 test "$with_libtool" != "no" && cf_list_models=libtool
4233 echo "$as_me:4233: result: $cf_list_models" >&5
4234 echo "${ECHO_T}$cf_list_models" >&6
4235
4236 ### Use the first model as the default, and save its suffix for use in building
4237 ### up test-applications.
4238 echo "$as_me:4238: checking for default model" >&5
4239 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4240 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4241 echo "$as_me:4241: result: $DFT_LWR_MODEL" >&5
4242 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4243
4244 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4245
4246 TICS_NAME=tic
4247
4248 TINFO_NAME=tinfo
4249
4250 LIB_NAME=ncurses
4251
4252 LIB_DIR=../lib
4253 LIB_2ND=../../lib
4254
4255         case $cf_cv_system_name in
4256         OS/2*)  LIB_PREFIX=''     ;;
4257         os2*)   LIB_PREFIX=''     ;;
4258         *)      LIB_PREFIX='lib'  ;;
4259         esac
4260 cf_prefix=$LIB_PREFIX
4261
4262 LIB_PREFIX=$cf_prefix
4263
4264 LIB_SUFFIX=
4265
4266 ###############################################################################
4267
4268 echo "$as_me:4268: checking if you want to build a separate terminfo library" >&5
4269 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4270
4271 # Check whether --with-termlib or --without-termlib was given.
4272 if test "${with_termlib+set}" = set; then
4273   withval="$with_termlib"
4274   with_termlib=$withval
4275 else
4276   with_termlib=no
4277 fi;
4278 echo "$as_me:4278: result: $with_termlib" >&5
4279 echo "${ECHO_T}$with_termlib" >&6
4280
4281 echo "$as_me:4281: checking if you want to build a separate tic library" >&5
4282 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4283
4284 # Check whether --with-ticlib or --without-ticlib was given.
4285 if test "${with_ticlib+set}" = set; then
4286   withval="$with_ticlib"
4287   with_ticlib=$withval
4288 else
4289   with_ticlib=no
4290 fi;
4291 echo "$as_me:4291: result: $with_ticlib" >&5
4292 echo "${ECHO_T}$with_ticlib" >&6
4293
4294 ### Checks for special libraries, must be done up-front.
4295 SHLIB_LIST=""
4296
4297 echo "$as_me:4297: checking if you want to link with the GPM mouse library" >&5
4298 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4299
4300 # Check whether --with-gpm or --without-gpm was given.
4301 if test "${with_gpm+set}" = set; then
4302   withval="$with_gpm"
4303   with_gpm=$withval
4304 else
4305   with_gpm=maybe
4306 fi;
4307 echo "$as_me:4307: result: $with_gpm" >&5
4308 echo "${ECHO_T}$with_gpm" >&6
4309
4310 if test "$with_gpm" != no ; then
4311         echo "$as_me:4311: checking for gpm.h" >&5
4312 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4313 if test "${ac_cv_header_gpm_h+set}" = set; then
4314   echo $ECHO_N "(cached) $ECHO_C" >&6
4315 else
4316   cat >conftest.$ac_ext <<_ACEOF
4317 #line 4317 "configure"
4318 #include "confdefs.h"
4319 #include <gpm.h>
4320 _ACEOF
4321 if { (eval echo "$as_me:4321: \"$ac_cpp conftest.$ac_ext\"") >&5
4322   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4323   ac_status=$?
4324   egrep -v '^ *\+' conftest.er1 >conftest.err
4325   rm -f conftest.er1
4326   cat conftest.err >&5
4327   echo "$as_me:4327: \$? = $ac_status" >&5
4328   (exit $ac_status); } >/dev/null; then
4329   if test -s conftest.err; then
4330     ac_cpp_err=$ac_c_preproc_warn_flag
4331   else
4332     ac_cpp_err=
4333   fi
4334 else
4335   ac_cpp_err=yes
4336 fi
4337 if test -z "$ac_cpp_err"; then
4338   ac_cv_header_gpm_h=yes
4339 else
4340   echo "$as_me: failed program was:" >&5
4341   cat conftest.$ac_ext >&5
4342   ac_cv_header_gpm_h=no
4343 fi
4344 rm -f conftest.err conftest.$ac_ext
4345 fi
4346 echo "$as_me:4346: result: $ac_cv_header_gpm_h" >&5
4347 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4348 if test $ac_cv_header_gpm_h = yes; then
4349
4350                 cat >>confdefs.h <<\EOF
4351 #define HAVE_GPM_H 1
4352 EOF
4353
4354                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4355                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4356
4357 echo "${as_me-configure}:4357: testing assuming we really have GPM library ..." 1>&5
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 echo "${as_me-configure}:4631: testing assuming soname for gpm is $with_gpm ..." 1>&5
4632
4633                         cf_cv_gpm_soname="$with_gpm"
4634                 else
4635
4636 echo "$as_me:4636: checking for soname of gpm library" >&5
4637 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4638 if test "${cf_cv_gpm_soname+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642 cf_cv_gpm_soname=unknown
4643 if test "$cross_compiling" != yes ; then
4644 cat >conftest.$ac_ext <<CF_EOF
4645 #include <gpm.h>
4646 int main()
4647 {
4648 if (Gpm_Open(0,0)) Gpm_Close();
4649         ${cf_cv_main_return:-return}(0);
4650 }
4651 CF_EOF
4652 cf_save_LIBS="$LIBS"
4653         LIBS="-lgpm $LIBS"
4654         if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655   (eval $ac_compile) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); } ; then
4659                 if { (eval echo "$as_me:4659: \"$ac_link\"") >&5
4660   (eval $ac_link) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); } ; then
4664                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4665                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4666                 fi
4667         fi
4668 rm -f conftest*
4669 LIBS="$cf_save_LIBS"
4670 fi
4671
4672 fi
4673 echo "$as_me:4673: result: $cf_cv_gpm_soname" >&5
4674 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4675
4676                 fi
4677                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4678 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4679 EOF
4680
4681                 SHLIB_LIST="-ldl $SHLIB_LIST"
4682         else
4683                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4684         fi
4685         cat >>confdefs.h <<\EOF
4686 #define HAVE_LIBGPM 1
4687 EOF
4688
4689 echo "$as_me:4689: checking for Gpm_Wgetch in -lgpm" >&5
4690 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4691 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   ac_check_lib_save_LIBS=$LIBS
4695 LIBS="-lgpm  $LIBS"
4696 cat >conftest.$ac_ext <<_ACEOF
4697 #line 4697 "configure"
4698 #include "confdefs.h"
4699
4700 /* Override any gcc2 internal prototype to avoid an error.  */
4701 #ifdef __cplusplus
4702 extern "C"
4703 #endif
4704 /* We use char because int might match the return type of a gcc2
4705    builtin and then its argument prototype would still apply.  */
4706 char Gpm_Wgetch ();
4707 int
4708 main ()
4709 {
4710 Gpm_Wgetch ();
4711   ;
4712   return 0;
4713 }
4714 _ACEOF
4715 rm -f conftest.$ac_objext conftest$ac_exeext
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717   (eval $ac_link) 2>&5
4718   ac_status=$?
4719   echo "$as_me:4719: \$? = $ac_status" >&5
4720   (exit $ac_status); } &&
4721          { ac_try='test -s conftest$ac_exeext'
4722   { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4723   (eval $ac_try) 2>&5
4724   ac_status=$?
4725   echo "$as_me:4725: \$? = $ac_status" >&5
4726   (exit $ac_status); }; }; then
4727   ac_cv_lib_gpm_Gpm_Wgetch=yes
4728 else
4729   echo "$as_me: failed program was:" >&5
4730 cat conftest.$ac_ext >&5
4731 ac_cv_lib_gpm_Gpm_Wgetch=no
4732 fi
4733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4734 LIBS=$ac_check_lib_save_LIBS
4735 fi
4736 echo "$as_me:4736: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4737 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4738 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4739
4740 echo "$as_me:4740: checking if GPM is weakly bound to curses library" >&5
4741 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4742 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745
4746 cf_cv_check_gpm_wgetch=unknown
4747 if test "$cross_compiling" != yes ; then
4748
4749 cat >conftest.$ac_ext <<CF_EOF
4750 #include <gpm.h>
4751 int main()
4752 {
4753         Gpm_Wgetch();
4754         ${cf_cv_main_return:-return}(0);
4755 }
4756 CF_EOF
4757
4758         cf_save_LIBS="$LIBS"
4759         # This only works if we can look at the symbol table.  If a shared
4760         # library is stripped for install, we cannot use that.  So we're forced
4761         # to rely on the static library, noting that some packagers may not
4762         # include it.
4763         LIBS="-static -lgpm -dynamic $LIBS"
4764         if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5
4765   (eval $ac_compile) 2>&5
4766   ac_status=$?
4767   echo "$as_me:4767: \$? = $ac_status" >&5
4768   (exit $ac_status); } ; then
4769                 if { (eval echo "$as_me:4769: \"$ac_link\"") >&5
4770   (eval $ac_link) 2>&5
4771   ac_status=$?
4772   echo "$as_me:4772: \$? = $ac_status" >&5
4773   (exit $ac_status); } ; then
4774                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4775                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4776                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4777                 fi
4778         fi
4779         rm -f conftest*
4780         LIBS="$cf_save_LIBS"
4781 fi
4782
4783 fi
4784 echo "$as_me:4784: result: $cf_cv_check_gpm_wgetch" >&5
4785 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4786
4787 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4788         { echo "$as_me:4788: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4789 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4790 fi
4791
4792 fi
4793
4794 fi
4795
4796 # not everyone has "test -c"
4797 if test -c /dev/sysmouse 2>/dev/null ; then
4798 echo "$as_me:4798: checking if you want to use sysmouse" >&5
4799 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4800
4801 # Check whether --with-sysmouse or --without-sysmouse was given.
4802 if test "${with_sysmouse+set}" = set; then
4803   withval="$with_sysmouse"
4804   cf_with_sysmouse=$withval
4805 else
4806   cf_with_sysmouse=maybe
4807 fi;
4808         if test "$cf_with_sysmouse" != no ; then
4809         cat >conftest.$ac_ext <<_ACEOF
4810 #line 4810 "configure"
4811 #include "confdefs.h"
4812
4813 #include <osreldate.h>
4814 #if (__FreeBSD_version >= 400017)
4815 #include <sys/consio.h>
4816 #include <sys/fbio.h>
4817 #else
4818 #include <machine/console.h>
4819 #endif
4820
4821 int
4822 main ()
4823 {
4824
4825         struct mouse_info the_mouse;
4826         ioctl(0, CONS_MOUSECTL, &the_mouse);
4827
4828   ;
4829   return 0;
4830 }
4831 _ACEOF
4832 rm -f conftest.$ac_objext
4833 if { (eval echo "$as_me:4833: \"$ac_compile\"") >&5
4834   (eval $ac_compile) 2>&5
4835   ac_status=$?
4836   echo "$as_me:4836: \$? = $ac_status" >&5
4837   (exit $ac_status); } &&
4838          { ac_try='test -s conftest.$ac_objext'
4839   { (eval echo "$as_me:4839: \"$ac_try\"") >&5
4840   (eval $ac_try) 2>&5
4841   ac_status=$?
4842   echo "$as_me:4842: \$? = $ac_status" >&5
4843   (exit $ac_status); }; }; then
4844   cf_with_sysmouse=yes
4845 else
4846   echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 cf_with_sysmouse=no
4849 fi
4850 rm -f conftest.$ac_objext conftest.$ac_ext
4851         fi
4852 echo "$as_me:4852: result: $cf_with_sysmouse" >&5
4853 echo "${ECHO_T}$cf_with_sysmouse" >&6
4854 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4855 #define USE_SYSMOUSE 1
4856 EOF
4857
4858 fi
4859
4860 if test X"$CC_G_OPT" = X"" ; then
4861         CC_G_OPT='-g'
4862         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4863 fi
4864
4865 if test X"$CXX_G_OPT" = X"" ; then
4866         CXX_G_OPT='-g'
4867         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4868 fi
4869
4870 echo "$as_me:4870: checking for default loader flags" >&5
4871 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4872 case $DFT_LWR_MODEL in
4873 libtool) LD_MODEL=''   ;;
4874 normal)  LD_MODEL=''   ;;
4875 debug)   LD_MODEL=$CC_G_OPT ;;
4876 profile) LD_MODEL='-pg';;
4877 shared)  LD_MODEL=''   ;;
4878 esac
4879 echo "$as_me:4879: result: $LD_MODEL" >&5
4880 echo "${ECHO_T}$LD_MODEL" >&6
4881
4882 case $DFT_LWR_MODEL in
4883 shared)
4884 echo "$as_me:4884: checking if rpath option should be used" >&5
4885 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4886
4887 # Check whether --enable-rpath or --disable-rpath was given.
4888 if test "${enable_rpath+set}" = set; then
4889   enableval="$enable_rpath"
4890   cf_cv_ld_rpath=$enableval
4891 else
4892   cf_cv_ld_rpath=no
4893 fi;
4894 echo "$as_me:4894: result: $cf_cv_ld_rpath" >&5
4895 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4896 echo "$as_me:4896: checking if shared libraries should be relinked during install" >&5
4897 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4898
4899 # Check whether --enable-relink or --disable-relink was given.
4900 if test "${enable_relink+set}" = set; then
4901   enableval="$enable_relink"
4902   cf_cv_do_relink=$enableval
4903 else
4904   cf_cv_do_relink=yes
4905 fi;
4906 echo "$as_me:4906: result: $cf_cv_do_relink" >&5
4907 echo "${ECHO_T}$cf_cv_do_relink" >&6
4908         ;;
4909 esac
4910
4911         LOCAL_LDFLAGS=
4912         LOCAL_LDFLAGS2=
4913         LD_SHARED_OPTS=
4914         INSTALL_LIB="-m 644"
4915
4916         cf_cv_do_symlinks=no
4917
4918         echo "$as_me:4918: checking if release/abi version should be used for shared libs" >&5
4919 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4920
4921 # Check whether --with-shlib-version or --without-shlib-version was given.
4922 if test "${with_shlib_version+set}" = set; then
4923   withval="$with_shlib_version"
4924   test -z "$withval" && withval=auto
4925         case $withval in #(vi
4926         yes) #(vi
4927                 cf_cv_shlib_version=auto
4928                 ;;
4929         rel|abi|auto|no) #(vi
4930                 cf_cv_shlib_version=$withval
4931                 ;;
4932         *)
4933                 { { echo "$as_me:4933: error: option value must be one of: rel, abi, auto or no" >&5
4934 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4935    { (exit 1); exit 1; }; }
4936                 ;;
4937         esac
4938
4939 else
4940   cf_cv_shlib_version=auto
4941 fi;
4942         echo "$as_me:4942: result: $cf_cv_shlib_version" >&5
4943 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4944
4945         cf_cv_rm_so_locs=no
4946
4947         # Some less-capable ports of gcc support only -fpic
4948         CC_SHARED_OPTS=
4949         if test "$GCC" = yes
4950         then
4951                 echo "$as_me:4951: checking which $CC option to use" >&5
4952 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4953                 cf_save_CFLAGS="$CFLAGS"
4954                 for CC_SHARED_OPTS in -fPIC -fpic ''
4955                 do
4956                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4957                         cat >conftest.$ac_ext <<_ACEOF
4958 #line 4958 "configure"
4959 #include "confdefs.h"
4960 #include <stdio.h>
4961 int
4962 main ()
4963 {
4964 int x = 1
4965   ;
4966   return 0;
4967 }
4968 _ACEOF
4969 rm -f conftest.$ac_objext
4970 if { (eval echo "$as_me:4970: \"$ac_compile\"") >&5
4971   (eval $ac_compile) 2>&5
4972   ac_status=$?
4973   echo "$as_me:4973: \$? = $ac_status" >&5
4974   (exit $ac_status); } &&
4975          { ac_try='test -s conftest.$ac_objext'
4976   { (eval echo "$as_me:4976: \"$ac_try\"") >&5
4977   (eval $ac_try) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); }; }; then
4981   break
4982 else
4983   echo "$as_me: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 fi
4986 rm -f conftest.$ac_objext conftest.$ac_ext
4987                 done
4988                 echo "$as_me:4988: result: $CC_SHARED_OPTS" >&5
4989 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4990                 CFLAGS="$cf_save_CFLAGS"
4991         fi
4992
4993         cf_cv_shlib_version_infix=no
4994
4995         case $cf_cv_system_name in
4996         beos*)
4997                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4998                 ;;
4999         cygwin*)
5000                 CC_SHARED_OPTS=
5001                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5002                 cf_cv_shlib_version=cygdll
5003                 cf_cv_shlib_version_infix=cygdll
5004                 cat >mk_shared_lib.sh <<-CF_EOF
5005                 #!/bin/sh
5006                 SHARED_LIB=\$1
5007                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5008                 shift
5009                 cat <<-EOF
5010                 Linking shared library
5011                 ** SHARED_LIB \$SHARED_LIB
5012                 ** IMPORT_LIB \$IMPORT_LIB
5013 EOF
5014                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5015 CF_EOF
5016                 chmod +x mk_shared_lib.sh
5017                 ;;
5018         darwin*)
5019                 EXTRA_CFLAGS="-no-cpp-precomp"
5020                 CC_SHARED_OPTS="-dynamic"
5021                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5023                 cf_cv_shlib_version_infix=yes
5024                 echo "$as_me:5024: checking if ld -search_paths_first works" >&5
5025 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5026 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029
5030                         cf_save_LDFLAGS=$LDFLAGS
5031                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5032                         cat >conftest.$ac_ext <<_ACEOF
5033 #line 5033 "configure"
5034 #include "confdefs.h"
5035
5036 int
5037 main ()
5038 {
5039 int i;
5040   ;
5041   return 0;
5042 }
5043 _ACEOF
5044 rm -f conftest.$ac_objext conftest$ac_exeext
5045 if { (eval echo "$as_me:5045: \"$ac_link\"") >&5
5046   (eval $ac_link) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); } &&
5050          { ac_try='test -s conftest$ac_exeext'
5051   { (eval echo "$as_me:5051: \"$ac_try\"") >&5
5052   (eval $ac_try) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); }; }; then
5056   cf_cv_ldflags_search_paths_first=yes
5057 else
5058   echo "$as_me: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5060 cf_cv_ldflags_search_paths_first=no
5061 fi
5062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5063                                 LDFLAGS=$cf_save_LDFLAGS
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_ldflags_search_paths_first" >&5
5066 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5067                 if test $cf_cv_ldflags_search_paths_first = yes; then
5068                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5069                 fi
5070                 ;;
5071         hpux*)
5072                 # (tested with gcc 2.7.2 -- I don't have c89)
5073                 if test "$GCC" = yes; then
5074                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5075                 else
5076                         CC_SHARED_OPTS='+Z'
5077                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5078                 fi
5079                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5080                 # HP-UX shared libraries must be executable, and should be
5081                 # readonly to exploit a quirk in the memory manager.
5082                 INSTALL_LIB="-m 555"
5083                 ;;
5084         irix*)
5085                 if test "$cf_cv_ld_rpath" = yes ; then
5086                         if test "$GCC" = yes; then
5087                                 cf_ld_rpath_opt="-Wl,-rpath,"
5088                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5089                         else
5090                                 cf_ld_rpath_opt="-rpath "
5091                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5092                         fi
5093                 fi
5094                 # tested with IRIX 5.2 and 'cc'.
5095                 if test "$GCC" != yes; then
5096                         CC_SHARED_OPTS='-KPIC'
5097                 fi
5098                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5099                 cf_cv_rm_so_locs=yes
5100                 ;;
5101         linux*|gnu*|k*bsd*-gnu)
5102                 if test "$DFT_LWR_MODEL" = "shared" ; then
5103                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5104                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5105                 fi
5106                 if test "$cf_cv_ld_rpath" = yes ; then
5107                         cf_ld_rpath_opt="-Wl,-rpath,"
5108                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5109                 fi
5110
5111         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5112         if test "$cf_cv_shlib_version" = rel; then
5113                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5114         else
5115                 cf_shared_soname='`basename $@`'
5116         fi
5117
5118                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5119                 ;;
5120         openbsd[2-9].*)
5121                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5122                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5123                 ;;
5124         openbsd*|freebsd[12].*)
5125                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5126                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5127                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5128                 ;;
5129         freebsd*)
5130                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5131                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5132                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5133                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5134                         cf_ld_rpath_opt="-rpath "
5135                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5136                 fi
5137
5138         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5139         if test "$cf_cv_shlib_version" = rel; then
5140                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5141         else
5142                 cf_shared_soname='`basename $@`'
5143         fi
5144
5145                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5146                 ;;
5147         netbsd*)
5148                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5149                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5150                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5151                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5152                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5153                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5154                         if test "$cf_cv_shlib_version" = auto; then
5155                         if test -f /usr/libexec/ld.elf_so; then
5156                                 cf_cv_shlib_version=abi
5157                         else
5158                                 cf_cv_shlib_version=rel
5159                         fi
5160                         fi
5161
5162         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5163         if test "$cf_cv_shlib_version" = rel; then
5164                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165         else
5166                 cf_shared_soname='`basename $@`'
5167         fi
5168
5169                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5170                 else
5171                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5172                 fi
5173                 ;;
5174         osf*|mls+*)
5175                 # tested with OSF/1 V3.2 and 'cc'
5176                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5177                 # link with shared libs).
5178                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5179                 case $host_os in
5180                 osf4*)
5181                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5182                         ;;
5183                 esac
5184                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5185                 if test "$DFT_LWR_MODEL" = "shared" ; then
5186                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5187                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5188                 fi
5189                 if test "$cf_cv_ld_rpath" = yes ; then
5190                         cf_ld_rpath_opt="-rpath"
5191                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5192                 fi
5193                 cf_cv_rm_so_locs=yes
5194                 ;;
5195         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5196                 # tested with osr5.0.5
5197                 if test "$GCC" != yes; then
5198                         CC_SHARED_OPTS='-belf -KPIC'
5199                 fi
5200                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5201                 if test "$cf_cv_ld_rpath" = yes ; then
5202                         # only way is to set LD_RUN_PATH but no switch for it
5203                         RUN_PATH=$libdir
5204                 fi
5205                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5206                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5207                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5208                 ;;
5209         sunos4*)
5210                 # tested with SunOS 4.1.1 and gcc 2.7.0
5211                 if test "$GCC" != yes; then
5212                         CC_SHARED_OPTS='-KPIC'
5213                 fi
5214                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5215                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5216                 ;;
5217         solaris2*)
5218                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5219                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5220                 if test "$DFT_LWR_MODEL" = "shared" ; then
5221                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5222                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5223                 fi
5224                 if test "$cf_cv_ld_rpath" = yes ; then
5225                         cf_ld_rpath_opt="-R"
5226                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5227                 fi
5228
5229         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5230         if test "$cf_cv_shlib_version" = rel; then
5231                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5232         else
5233                 cf_shared_soname='`basename $@`'
5234         fi
5235
5236                 if test "$GCC" != yes; then
5237                         CC_SHARED_OPTS='-xcode=pic32'
5238                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5239                 else
5240                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_shared_soname' -o $@'
5241                 fi
5242                 ;;
5243         sysv5uw7*|unix_sv*)
5244                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5245                 if test "$GCC" != yes; then
5246                         CC_SHARED_OPTS='-KPIC'
5247                 fi
5248                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5249                 ;;
5250         *)
5251                 CC_SHARED_OPTS='unknown'
5252                 MK_SHARED_LIB='echo unknown'
5253                 ;;
5254         esac
5255
5256         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5257         case "$cf_cv_shlib_version" in #(vi
5258         rel|abi)
5259                 case "$MK_SHARED_LIB" in #(vi
5260                 *'-o $@')
5261                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5262                         ;;
5263                 *)
5264                         { echo "$as_me:5264: WARNING: ignored --with-shlib-version" >&5
5265 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5266                         ;;
5267                 esac
5268                 ;;
5269         esac
5270
5271         if test -n "$cf_ld_rpath_opt" ; then
5272                 echo "$as_me:5272: checking if we need a space after rpath option" >&5
5273 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5274                 cf_save_LIBS="$LIBS"
5275                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5276                 cat >conftest.$ac_ext <<_ACEOF
5277 #line 5277 "configure"
5278 #include "confdefs.h"
5279
5280 int
5281 main ()
5282 {
5283
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 rm -f conftest.$ac_objext conftest$ac_exeext
5289 if { (eval echo "$as_me:5289: \"$ac_link\"") >&5
5290   (eval $ac_link) 2>&5
5291   ac_status=$?
5292   echo "$as_me:5292: \$? = $ac_status" >&5
5293   (exit $ac_status); } &&
5294          { ac_try='test -s conftest$ac_exeext'
5295   { (eval echo "$as_me:5295: \"$ac_try\"") >&5
5296   (eval $ac_try) 2>&5
5297   ac_status=$?
5298   echo "$as_me:5298: \$? = $ac_status" >&5
5299   (exit $ac_status); }; }; then
5300   cf_rpath_space=no
5301 else
5302   echo "$as_me: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5304 cf_rpath_space=yes
5305 fi
5306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5307                 LIBS="$cf_save_LIBS"
5308                 echo "$as_me:5308: result: $cf_rpath_space" >&5
5309 echo "${ECHO_T}$cf_rpath_space" >&6
5310                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5311                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5312         fi
5313
5314 if test "$CC_SHARED_OPTS" = "unknown"; then
5315         for model in $cf_list_models; do
5316                 if test "$model" = "shared"; then
5317                         { { echo "$as_me:5317: error: Shared libraries are not supported in this version" >&5
5318 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5319    { (exit 1); exit 1; }; }
5320                 fi
5321         done
5322 fi
5323
5324 ###############################################################################
5325
5326 ###     use option --disable-overwrite to leave out the link to -lcurses
5327 echo "$as_me:5327: checking if you wish to install ncurses overwriting curses" >&5
5328 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5329
5330 # Check whether --enable-overwrite or --disable-overwrite was given.
5331 if test "${enable_overwrite+set}" = set; then
5332   enableval="$enable_overwrite"
5333   with_overwrite=$enableval
5334 else
5335   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5336 fi;
5337 echo "$as_me:5337: result: $with_overwrite" >&5
5338 echo "${ECHO_T}$with_overwrite" >&6
5339
5340 echo "$as_me:5340: checking if external terminfo-database is used" >&5
5341 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5342
5343 # Check whether --enable-database or --disable-database was given.
5344 if test "${enable_database+set}" = set; then
5345   enableval="$enable_database"
5346   use_database=$enableval
5347 else
5348   use_database=yes
5349 fi;
5350 echo "$as_me:5350: result: $use_database" >&5
5351 echo "${ECHO_T}$use_database" >&6
5352
5353 case $host_os in #(vi
5354 os2*) #(vi
5355         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5356         ;;
5357 *) #(vi
5358         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5359         ;;
5360 esac
5361
5362         case $cf_cv_system_name in
5363         os2*)   PATHSEP=';'  ;;
5364         *)      PATHSEP=':'  ;;
5365         esac
5366
5367 if test "$use_database" != no ; then
5368         cat >>confdefs.h <<\EOF
5369 #define USE_DATABASE 1
5370 EOF
5371
5372         echo "$as_me:5372: checking which terminfo source-file will be installed" >&5
5373 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5374
5375 # Check whether --enable-database or --disable-database was given.
5376 if test "${enable_database+set}" = set; then
5377   enableval="$enable_database"
5378   TERMINFO_SRC=$withval
5379 fi;
5380         echo "$as_me:5380: result: $TERMINFO_SRC" >&5
5381 echo "${ECHO_T}$TERMINFO_SRC" >&6
5382
5383         echo "$as_me:5383: checking whether to use hashed database instead of directory/tree" >&5
5384 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5385
5386 # Check whether --with-hashed-db or --without-hashed-db was given.
5387 if test "${with_hashed_db+set}" = set; then
5388   withval="$with_hashed_db"
5389
5390 else
5391   with_hashed_db=no
5392 fi;
5393         echo "$as_me:5393: result: $with_hashed_db" >&5
5394 echo "${ECHO_T}$with_hashed_db" >&6
5395 fi
5396
5397 echo "$as_me:5397: checking for list of fallback descriptions" >&5
5398 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5399
5400 # Check whether --with-fallbacks or --without-fallbacks was given.
5401 if test "${with_fallbacks+set}" = set; then
5402   withval="$with_fallbacks"
5403   with_fallback=$withval
5404 else
5405   with_fallback=
5406 fi;
5407 echo "$as_me:5407: result: $with_fallback" >&5
5408 echo "${ECHO_T}$with_fallback" >&6
5409 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5410
5411 echo "$as_me:5411: checking if you want modern xterm or antique" >&5
5412 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5413
5414 # Check whether --with-xterm-new or --without-xterm-new was given.
5415 if test "${with_xterm_new+set}" = set; then
5416   withval="$with_xterm_new"
5417   with_xterm_new=$withval
5418 else
5419   with_xterm_new=yes
5420 fi;
5421 case $with_xterm_new in
5422 no)     with_xterm_new=xterm-old;;
5423 *)      with_xterm_new=xterm-new;;
5424 esac
5425 echo "$as_me:5425: result: $with_xterm_new" >&5
5426 echo "${ECHO_T}$with_xterm_new" >&6
5427 WHICH_XTERM=$with_xterm_new
5428
5429 MAKE_TERMINFO=
5430 if test "$use_database" = no ; then
5431         TERMINFO="${datadir}/terminfo"
5432         MAKE_TERMINFO="#"
5433 else
5434
5435 echo "$as_me:5435: checking for list of terminfo directories" >&5
5436 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5437
5438 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5439 if test "${with_terminfo_dirs+set}" = set; then
5440   withval="$with_terminfo_dirs"
5441
5442 else
5443   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5444 fi;
5445 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5446 cf_dst_path=
5447 for cf_src_path in $withval
5448 do
5449
5450 if test "x$prefix" != xNONE; then
5451   cf_path_syntax="$prefix"
5452 else
5453   cf_path_syntax="$ac_default_prefix"
5454 fi
5455
5456 case ".$cf_src_path" in #(vi
5457 .\$\(*\)*|.\'*\'*) #(vi
5458   ;;
5459 ..|./*|.\\*) #(vi
5460   ;;
5461 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5462   ;;
5463 .\${*prefix}*) #(vi
5464   eval cf_src_path="$cf_src_path"
5465   case ".$cf_src_path" in #(vi
5466   .NONE/*)
5467     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5468     ;;
5469   esac
5470   ;; #(vi
5471 .no|.NONE/*)
5472   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5473   ;;
5474 *)
5475   { { echo "$as_me:5475: error: expected a pathname, not \"$cf_src_path\"" >&5
5476 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5477    { (exit 1); exit 1; }; }
5478   ;;
5479 esac
5480
5481   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5482   cf_dst_path="${cf_dst_path}${cf_src_path}"
5483 done
5484 IFS="$ac_save_ifs"
5485
5486 eval 'TERMINFO_DIRS="$cf_dst_path"'
5487
5488 echo "$as_me:5488: result: $TERMINFO_DIRS" >&5
5489 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5490 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5491 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5492 EOF
5493
5494 echo "$as_me:5494: checking for default terminfo directory" >&5
5495 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5496
5497 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5498 if test "${with_default_terminfo_dir+set}" = set; then
5499   withval="$with_default_terminfo_dir"
5500
5501 else
5502   withval="${TERMINFO-${datadir}/terminfo}"
5503 fi; if test -n "${datadir}/terminfo" ; then
5504
5505 if test "x$prefix" != xNONE; then
5506   cf_path_syntax="$prefix"
5507 else
5508   cf_path_syntax="$ac_default_prefix"
5509 fi
5510
5511 case ".$withval" in #(vi
5512 .\$\(*\)*|.\'*\'*) #(vi
5513   ;;
5514 ..|./*|.\\*) #(vi
5515   ;;
5516 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5517   ;;
5518 .\${*prefix}*) #(vi
5519   eval withval="$withval"
5520   case ".$withval" in #(vi
5521   .NONE/*)
5522     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5523     ;;
5524   esac
5525   ;; #(vi
5526 .no|.NONE/*)
5527   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5528   ;;
5529 *)
5530   { { echo "$as_me:5530: error: expected a pathname, not \"$withval\"" >&5
5531 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5532    { (exit 1); exit 1; }; }
5533   ;;
5534 esac
5535
5536 fi
5537 TERMINFO="$withval"
5538
5539 echo "$as_me:5539: result: $TERMINFO" >&5
5540 echo "${ECHO_T}$TERMINFO" >&6
5541 cat >>confdefs.h <<EOF
5542 #define TERMINFO "$TERMINFO"
5543 EOF
5544
5545 fi
5546
5547 ###     use option --disable-big-core to make tic run on small machines
5548 ###     We need 4Mb, check if we can allocate 50% more than that.
5549 echo "$as_me:5549: checking if big-core option selected" >&5
5550 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5551
5552 # Check whether --enable-big-core or --disable-big-core was given.
5553 if test "${enable_big_core+set}" = set; then
5554   enableval="$enable_big_core"
5555   with_big_core=$enableval
5556 else
5557   if test "$cross_compiling" = yes; then
5558   with_big_core=no
5559 else
5560   cat >conftest.$ac_ext <<_ACEOF
5561 #line 5561 "configure"
5562 #include "confdefs.h"
5563
5564 #include <stdlib.h>
5565 #include <string.h>
5566 int main() {
5567         unsigned long n = 6000000L;
5568         char *s = malloc(n);
5569         if (s != 0)
5570                 s[0] = s[n-1] = 0;
5571         ${cf_cv_main_return:-return}(s == 0);
5572 }
5573 _ACEOF
5574 rm -f conftest$ac_exeext
5575 if { (eval echo "$as_me:5575: \"$ac_link\"") >&5
5576   (eval $ac_link) 2>&5
5577   ac_status=$?
5578   echo "$as_me:5578: \$? = $ac_status" >&5
5579   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5580   { (eval echo "$as_me:5580: \"$ac_try\"") >&5
5581   (eval $ac_try) 2>&5
5582   ac_status=$?
5583   echo "$as_me:5583: \$? = $ac_status" >&5
5584   (exit $ac_status); }; }; then
5585   with_big_core=yes
5586 else
5587   echo "$as_me: program exited with status $ac_status" >&5
5588 echo "$as_me: failed program was:" >&5
5589 cat conftest.$ac_ext >&5
5590 with_big_core=no
5591 fi
5592 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5593 fi
5594 fi;
5595 echo "$as_me:5595: result: $with_big_core" >&5
5596 echo "${ECHO_T}$with_big_core" >&6
5597 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5598 #define HAVE_BIG_CORE 1
5599 EOF
5600
5601 ### ISO C only guarantees 512-char strings, we have tables which load faster
5602 ### when constructed using "big" strings.
5603 echo "$as_me:5603: checking if big-strings option selected" >&5
5604 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5605
5606 # Check whether --enable-big-strings or --disable-big-strings was given.
5607 if test "${enable_big_strings+set}" = set; then
5608   enableval="$enable_big_strings"
5609   with_big_strings=no
5610 else
5611   with_big_strings=yes
5612 fi;
5613 echo "$as_me:5613: result: $with_big_strings" >&5
5614 echo "${ECHO_T}$with_big_strings" >&6
5615
5616 USE_BIG_STRINGS=0
5617 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5618
5619 ###     use option --enable-termcap to compile in the termcap fallback support
5620 echo "$as_me:5620: checking if you want termcap-fallback support" >&5
5621 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5622
5623 # Check whether --enable-termcap or --disable-termcap was given.
5624 if test "${enable_termcap+set}" = set; then
5625   enableval="$enable_termcap"
5626   with_termcap=$enableval
5627 else
5628   with_termcap=no
5629 fi;
5630 echo "$as_me:5630: result: $with_termcap" >&5
5631 echo "${ECHO_T}$with_termcap" >&6
5632
5633 if test "$with_termcap" != "yes" ; then
5634         if test "$use_database" = no ; then
5635                 if test -z "$with_fallback" ; then
5636                         { { echo "$as_me:5636: error: You have disabled the database w/o specifying fallbacks" >&5
5637 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 fi
5640         fi
5641         cat >>confdefs.h <<\EOF
5642 #define PURE_TERMINFO 1
5643 EOF
5644
5645 else
5646
5647 if test "$with_ticlib" != no ; then
5648         { { echo "$as_me:5648: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5649 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5650    { (exit 1); exit 1; }; }
5651 fi
5652
5653 cat >>confdefs.h <<\EOF
5654 #define USE_TERMCAP 1
5655 EOF
5656
5657 echo "$as_me:5657: checking for list of termcap files" >&5
5658 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5659
5660 # Check whether --with-termpath or --without-termpath was given.
5661 if test "${with_termpath+set}" = set; then
5662   withval="$with_termpath"
5663
5664 else
5665   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5666 fi;
5667 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5668 cf_dst_path=
5669 for cf_src_path in $withval
5670 do
5671
5672 if test "x$prefix" != xNONE; then
5673   cf_path_syntax="$prefix"
5674 else
5675   cf_path_syntax="$ac_default_prefix"
5676 fi
5677
5678 case ".$cf_src_path" in #(vi
5679 .\$\(*\)*|.\'*\'*) #(vi
5680   ;;
5681 ..|./*|.\\*) #(vi
5682   ;;
5683 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5684   ;;
5685 .\${*prefix}*) #(vi
5686   eval cf_src_path="$cf_src_path"
5687   case ".$cf_src_path" in #(vi
5688   .NONE/*)
5689     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5690     ;;
5691   esac
5692   ;; #(vi
5693 .no|.NONE/*)
5694   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5695   ;;
5696 *)
5697   { { echo "$as_me:5697: error: expected a pathname, not \"$cf_src_path\"" >&5
5698 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5699    { (exit 1); exit 1; }; }
5700   ;;
5701 esac
5702
5703   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5704   cf_dst_path="${cf_dst_path}${cf_src_path}"
5705 done
5706 IFS="$ac_save_ifs"
5707
5708 eval 'TERMPATH="$cf_dst_path"'
5709
5710 echo "$as_me:5710: result: $TERMPATH" >&5
5711 echo "${ECHO_T}$TERMPATH" >&6
5712 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5713 #define TERMPATH "$TERMPATH"
5714 EOF
5715
5716 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5717 echo "$as_me:5717: checking if fast termcap-loader is needed" >&5
5718 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5719
5720 # Check whether --enable-getcap or --disable-getcap was given.
5721 if test "${enable_getcap+set}" = set; then
5722   enableval="$enable_getcap"
5723   with_getcap=$enableval
5724 else
5725   with_getcap=no
5726 fi;
5727 echo "$as_me:5727: result: $with_getcap" >&5
5728 echo "${ECHO_T}$with_getcap" >&6
5729 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5730 #define USE_GETCAP 1
5731 EOF
5732
5733 echo "$as_me:5733: checking if translated termcaps will be cached in ~/.terminfo" >&5
5734 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5735
5736 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5737 if test "${enable_getcap_cache+set}" = set; then
5738   enableval="$enable_getcap_cache"
5739   with_getcap_cache=$enableval
5740 else
5741   with_getcap_cache=no
5742 fi;
5743 echo "$as_me:5743: result: $with_getcap_cache" >&5
5744 echo "${ECHO_T}$with_getcap_cache" >&6
5745 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5746 #define USE_GETCAP_CACHE 1
5747 EOF
5748
5749 fi
5750
5751 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5752 echo "$as_me:5752: checking if ~/.terminfo is wanted" >&5
5753 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5754
5755 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5756 if test "${enable_home_terminfo+set}" = set; then
5757   enableval="$enable_home_terminfo"
5758   with_home_terminfo=$enableval
5759 else
5760   with_home_terminfo=yes
5761 fi;
5762 echo "$as_me:5762: result: $with_home_terminfo" >&5
5763 echo "${ECHO_T}$with_home_terminfo" >&6
5764 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5765 #define USE_HOME_TERMINFO 1
5766 EOF
5767
5768 echo "$as_me:5768: checking if you want to use restricted environment when running as root" >&5
5769 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5770
5771 # Check whether --enable-root-environ or --disable-root-environ was given.
5772 if test "${enable_root_environ+set}" = set; then
5773   enableval="$enable_root_environ"
5774   with_root_environ=$enableval
5775 else
5776   with_root_environ=yes
5777 fi;
5778 echo "$as_me:5778: result: $with_root_environ" >&5
5779 echo "${ECHO_T}$with_root_environ" >&6
5780 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5781 #define USE_ROOT_ENVIRON 1
5782 EOF
5783
5784 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5785 ###   to reduce storage requirements for the terminfo database.
5786
5787 for ac_func in \
5788         remove \
5789         unlink
5790 do
5791 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5792 echo "$as_me:5792: checking for $ac_func" >&5
5793 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5794 if eval "test \"\${$as_ac_var+set}\" = set"; then
5795   echo $ECHO_N "(cached) $ECHO_C" >&6
5796 else
5797   cat >conftest.$ac_ext <<_ACEOF
5798 #line 5798 "configure"
5799 #include "confdefs.h"
5800 /* System header to define __stub macros and hopefully few prototypes,
5801     which can conflict with char $ac_func (); below.  */
5802 #include <assert.h>
5803 /* Override any gcc2 internal prototype to avoid an error.  */
5804 #ifdef __cplusplus
5805 extern "C"
5806 #endif
5807 /* We use char because int might match the return type of a gcc2
5808    builtin and then its argument prototype would still apply.  */
5809 char $ac_func ();
5810 char (*f) ();
5811
5812 int
5813 main ()
5814 {
5815 /* The GNU C library defines this for functions which it implements
5816     to always fail with ENOSYS.  Some functions are actually named
5817     something starting with __ and the normal name is an alias.  */
5818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5819 choke me
5820 #else
5821 f = $ac_func;
5822 #endif
5823
5824   ;
5825   return 0;
5826 }
5827 _ACEOF
5828 rm -f conftest.$ac_objext conftest$ac_exeext
5829 if { (eval echo "$as_me:5829: \"$ac_link\"") >&5
5830   (eval $ac_link) 2>&5
5831   ac_status=$?
5832   echo "$as_me:5832: \$? = $ac_status" >&5
5833   (exit $ac_status); } &&
5834          { ac_try='test -s conftest$ac_exeext'
5835   { (eval echo "$as_me:5835: \"$ac_try\"") >&5
5836   (eval $ac_try) 2>&5
5837   ac_status=$?
5838   echo "$as_me:5838: \$? = $ac_status" >&5
5839   (exit $ac_status); }; }; then
5840   eval "$as_ac_var=yes"
5841 else
5842   echo "$as_me: failed program was:" >&5
5843 cat conftest.$ac_ext >&5
5844 eval "$as_ac_var=no"
5845 fi
5846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5847 fi
5848 echo "$as_me:5848: result: `eval echo '${'$as_ac_var'}'`" >&5
5849 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5850 if test `eval echo '${'$as_ac_var'}'` = yes; then
5851   cat >>confdefs.h <<EOF
5852 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5853 EOF
5854
5855 fi
5856 done
5857
5858 if test "$cross_compiling" = yes ; then
5859
5860 for ac_func in \
5861                 link \
5862                 symlink
5863 do
5864 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5865 echo "$as_me:5865: checking for $ac_func" >&5
5866 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5867 if eval "test \"\${$as_ac_var+set}\" = set"; then
5868   echo $ECHO_N "(cached) $ECHO_C" >&6
5869 else
5870   cat >conftest.$ac_ext <<_ACEOF
5871 #line 5871 "configure"
5872 #include "confdefs.h"
5873 /* System header to define __stub macros and hopefully few prototypes,
5874     which can conflict with char $ac_func (); below.  */
5875 #include <assert.h>
5876 /* Override any gcc2 internal prototype to avoid an error.  */
5877 #ifdef __cplusplus
5878 extern "C"
5879 #endif
5880 /* We use char because int might match the return type of a gcc2
5881    builtin and then its argument prototype would still apply.  */
5882 char $ac_func ();
5883 char (*f) ();
5884
5885 int
5886 main ()
5887 {
5888 /* The GNU C library defines this for functions which it implements
5889     to always fail with ENOSYS.  Some functions are actually named
5890     something starting with __ and the normal name is an alias.  */
5891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5892 choke me
5893 #else
5894 f = $ac_func;
5895 #endif
5896
5897   ;
5898   return 0;
5899 }
5900 _ACEOF
5901 rm -f conftest.$ac_objext conftest$ac_exeext
5902 if { (eval echo "$as_me:5902: \"$ac_link\"") >&5
5903   (eval $ac_link) 2>&5
5904   ac_status=$?
5905   echo "$as_me:5905: \$? = $ac_status" >&5
5906   (exit $ac_status); } &&
5907          { ac_try='test -s conftest$ac_exeext'
5908   { (eval echo "$as_me:5908: \"$ac_try\"") >&5
5909   (eval $ac_try) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); }; }; then
5913   eval "$as_ac_var=yes"
5914 else
5915   echo "$as_me: failed program was:" >&5
5916 cat conftest.$ac_ext >&5
5917 eval "$as_ac_var=no"
5918 fi
5919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5920 fi
5921 echo "$as_me:5921: result: `eval echo '${'$as_ac_var'}'`" >&5
5922 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5923 if test `eval echo '${'$as_ac_var'}'` = yes; then
5924   cat >>confdefs.h <<EOF
5925 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5926 EOF
5927
5928 fi
5929 done
5930
5931 else
5932         echo "$as_me:5932: checking if link/symlink functions work" >&5
5933 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5934 if test "${cf_cv_link_funcs+set}" = set; then
5935   echo $ECHO_N "(cached) $ECHO_C" >&6
5936 else
5937
5938                 cf_cv_link_funcs=
5939                 for cf_func in link symlink ; do
5940                         if test "$cross_compiling" = yes; then
5941
5942                         eval 'ac_cv_func_'$cf_func'=error'
5943 else
5944   cat >conftest.$ac_ext <<_ACEOF
5945 #line 5945 "configure"
5946 #include "confdefs.h"
5947
5948 #include <sys/types.h>
5949 #include <sys/stat.h>
5950 #ifdef HAVE_UNISTD_H
5951 #include <unistd.h>
5952 #endif
5953 int main()
5954 {
5955         int fail = 0;
5956         char *src = "config.log";
5957         char *dst = "conftest.chk";
5958         struct stat src_sb;
5959         struct stat dst_sb;
5960
5961         stat(src, &src_sb);
5962         fail = ($cf_func("config.log", "conftest.chk") < 0)
5963             || (stat(dst, &dst_sb) < 0)
5964             || (dst_sb.st_mtime != src_sb.st_mtime);
5965 #ifdef HAVE_UNLINK
5966         unlink(dst);
5967 #else
5968         remove(dst);
5969 #endif
5970         ${cf_cv_main_return:-return} (fail);
5971 }
5972
5973 _ACEOF
5974 rm -f conftest$ac_exeext
5975 if { (eval echo "$as_me:5975: \"$ac_link\"") >&5
5976   (eval $ac_link) 2>&5
5977   ac_status=$?
5978   echo "$as_me:5978: \$? = $ac_status" >&5
5979   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5980   { (eval echo "$as_me:5980: \"$ac_try\"") >&5
5981   (eval $ac_try) 2>&5
5982   ac_status=$?
5983   echo "$as_me:5983: \$? = $ac_status" >&5
5984   (exit $ac_status); }; }; then
5985
5986                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5987                         eval 'ac_cv_func_'$cf_func'=yes'
5988 else
5989   echo "$as_me: program exited with status $ac_status" >&5
5990 echo "$as_me: failed program was:" >&5
5991 cat conftest.$ac_ext >&5
5992
5993                         eval 'ac_cv_func_'$cf_func'=no'
5994 fi
5995 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5996 fi
5997                 done
5998                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5999
6000 fi
6001 echo "$as_me:6001: result: $cf_cv_link_funcs" >&5
6002 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6003         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6004 #define HAVE_LINK 1
6005 EOF
6006
6007         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6008 #define HAVE_SYMLINK 1
6009 EOF
6010
6011 fi
6012
6013 with_links=no
6014 with_symlinks=no
6015
6016 # soft links (symbolic links) are useful for some systems where hard links do
6017 # not work, or to make it simpler to copy terminfo trees around.
6018 if test "$ac_cv_func_symlink" = yes ; then
6019     echo "$as_me:6019: checking if tic should use symbolic links" >&5
6020 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6021
6022 # Check whether --enable-symlinks or --disable-symlinks was given.
6023 if test "${enable_symlinks+set}" = set; then
6024   enableval="$enable_symlinks"
6025   with_symlinks=$enableval
6026 else
6027   with_symlinks=no
6028 fi;
6029     echo "$as_me:6029: result: $with_symlinks" >&5
6030 echo "${ECHO_T}$with_symlinks" >&6
6031 fi
6032
6033 # If we have hard links and did not choose to use soft links instead, there is
6034 # no reason to make this choice optional - use the hard links.
6035 if test "$with_symlinks" = no ; then
6036     echo "$as_me:6036: checking if tic should use hard links" >&5
6037 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6038     if test "$ac_cv_func_link" = yes ; then
6039         with_links=yes
6040     else
6041         with_links=no
6042     fi
6043     echo "$as_me:6043: result: $with_links" >&5
6044 echo "${ECHO_T}$with_links" >&6
6045 fi
6046
6047 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6048 #define USE_LINKS 1
6049 EOF
6050
6051 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6052 #define USE_SYMLINKS 1
6053 EOF
6054
6055 ###   use option --enable-broken-linker to force on use of broken-linker support
6056 echo "$as_me:6056: checking if you want broken-linker support code" >&5
6057 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6058
6059 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6060 if test "${enable_broken_linker+set}" = set; then
6061   enableval="$enable_broken_linker"
6062   with_broken_linker=$enableval
6063 else
6064   with_broken_linker=${BROKEN_LINKER-no}
6065 fi;
6066 echo "$as_me:6066: result: $with_broken_linker" >&5
6067 echo "${ECHO_T}$with_broken_linker" >&6
6068
6069 BROKEN_LINKER=0
6070 if test "$with_broken_linker" = yes ; then
6071         cat >>confdefs.h <<\EOF
6072 #define BROKEN_LINKER 1
6073 EOF
6074
6075         BROKEN_LINKER=1
6076 elif test "$DFT_LWR_MODEL" = shared ; then
6077         case $cf_cv_system_name in #(vi
6078         cygwin*)
6079                 cat >>confdefs.h <<\EOF
6080 #define BROKEN_LINKER 1
6081 EOF
6082
6083                 BROKEN_LINKER=1
6084                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6085
6086 echo "${as_me-configure}:6086: testing cygwin linker is broken anyway ..." 1>&5
6087
6088                 ;;
6089         esac
6090 fi
6091
6092 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6093 echo "$as_me:6093: checking if tputs should process BSD-style prefix padding" >&5
6094 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6095
6096 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6097 if test "${enable_bsdpad+set}" = set; then
6098   enableval="$enable_bsdpad"
6099   with_bsdpad=$enableval
6100 else
6101   with_bsdpad=no
6102 fi;
6103 echo "$as_me:6103: result: $with_bsdpad" >&5
6104 echo "${ECHO_T}$with_bsdpad" >&6
6105 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6106 #define BSD_TPUTS 1
6107 EOF
6108
6109 ###   use option --enable-widec to turn on use of wide-character support
6110 NCURSES_CH_T=chtype
6111 NCURSES_LIBUTF8=0
6112
6113 NEED_WCHAR_H=0
6114 NCURSES_MBSTATE_T=0
6115 NCURSES_WCHAR_T=0
6116 NCURSES_WINT_T=0
6117
6118 # Check to define _XOPEN_SOURCE "automatically"
6119
6120 echo "$as_me:6120: checking if $CC -U and -D options work together" >&5
6121 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6122 if test "${cf_cv_cc_u_d_options+set}" = set; then
6123   echo $ECHO_N "(cached) $ECHO_C" >&6
6124 else
6125
6126         cf_save_CPPFLAGS="$CPPFLAGS"
6127         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6128         cat >conftest.$ac_ext <<_ACEOF
6129 #line 6129 "configure"
6130 #include "confdefs.h"
6131
6132 int
6133 main ()
6134 {
6135
6136 #ifndef U_D_OPTIONS
6137 make an undefined-error
6138 #endif
6139 #ifdef  D_U_OPTIONS
6140 make a defined-error
6141 #endif
6142
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 rm -f conftest.$ac_objext
6148 if { (eval echo "$as_me:6148: \"$ac_compile\"") >&5
6149   (eval $ac_compile) 2>&5
6150   ac_status=$?
6151   echo "$as_me:6151: \$? = $ac_status" >&5
6152   (exit $ac_status); } &&
6153          { ac_try='test -s conftest.$ac_objext'
6154   { (eval echo "$as_me:6154: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:6157: \$? = $ac_status" >&5
6158   (exit $ac_status); }; }; then
6159
6160         cf_cv_cc_u_d_options=yes
6161 else
6162   echo "$as_me: failed program was:" >&5
6163 cat conftest.$ac_ext >&5
6164
6165         cf_cv_cc_u_d_options=no
6166 fi
6167 rm -f conftest.$ac_objext conftest.$ac_ext
6168         CPPFLAGS="$cf_save_CPPFLAGS"
6169
6170 fi
6171 echo "$as_me:6171: result: $cf_cv_cc_u_d_options" >&5
6172 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6173
6174 cf_XOPEN_SOURCE=500
6175 cf_POSIX_C_SOURCE=199506L
6176
6177 case $host_os in #(vi
6178 aix[45]*) #(vi
6179         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6180         ;;
6181 freebsd*) #(vi
6182         # 5.x headers associate
6183         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6184         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6185         cf_POSIX_C_SOURCE=200112L
6186         cf_XOPEN_SOURCE=600
6187         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6188         ;;
6189 hpux*) #(vi
6190         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6191         ;;
6192 irix[56].*) #(vi
6193         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6194         ;;
6195 linux*|gnu*|k*bsd*-gnu) #(vi
6196
6197 echo "$as_me:6197: checking if we must define _GNU_SOURCE" >&5
6198 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6199 if test "${cf_cv_gnu_source+set}" = set; then
6200   echo $ECHO_N "(cached) $ECHO_C" >&6
6201 else
6202
6203 cat >conftest.$ac_ext <<_ACEOF
6204 #line 6204 "configure"
6205 #include "confdefs.h"
6206 #include <sys/types.h>
6207 int
6208 main ()
6209 {
6210
6211 #ifndef _XOPEN_SOURCE
6212 make an error
6213 #endif
6214   ;
6215   return 0;
6216 }
6217 _ACEOF
6218 rm -f conftest.$ac_objext
6219 if { (eval echo "$as_me:6219: \"$ac_compile\"") >&5
6220   (eval $ac_compile) 2>&5
6221   ac_status=$?
6222   echo "$as_me:6222: \$? = $ac_status" >&5
6223   (exit $ac_status); } &&
6224          { ac_try='test -s conftest.$ac_objext'
6225   { (eval echo "$as_me:6225: \"$ac_try\"") >&5
6226   (eval $ac_try) 2>&5
6227   ac_status=$?
6228   echo "$as_me:6228: \$? = $ac_status" >&5
6229   (exit $ac_status); }; }; then
6230   cf_cv_gnu_source=no
6231 else
6232   echo "$as_me: failed program was:" >&5
6233 cat conftest.$ac_ext >&5
6234 cf_save="$CPPFLAGS"
6235          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6236          cat >conftest.$ac_ext <<_ACEOF
6237 #line 6237 "configure"
6238 #include "confdefs.h"
6239 #include <sys/types.h>
6240 int
6241 main ()
6242 {
6243
6244 #ifdef _XOPEN_SOURCE
6245 make an error
6246 #endif
6247   ;
6248   return 0;
6249 }
6250 _ACEOF
6251 rm -f conftest.$ac_objext
6252 if { (eval echo "$as_me:6252: \"$ac_compile\"") >&5
6253   (eval $ac_compile) 2>&5
6254   ac_status=$?
6255   echo "$as_me:6255: \$? = $ac_status" >&5
6256   (exit $ac_status); } &&
6257          { ac_try='test -s conftest.$ac_objext'
6258   { (eval echo "$as_me:6258: \"$ac_try\"") >&5
6259   (eval $ac_try) 2>&5
6260   ac_status=$?
6261   echo "$as_me:6261: \$? = $ac_status" >&5
6262   (exit $ac_status); }; }; then
6263   cf_cv_gnu_source=no
6264 else
6265   echo "$as_me: failed program was:" >&5
6266 cat conftest.$ac_ext >&5
6267 cf_cv_gnu_source=yes
6268 fi
6269 rm -f conftest.$ac_objext conftest.$ac_ext
6270         CPPFLAGS="$cf_save"
6271
6272 fi
6273 rm -f conftest.$ac_objext conftest.$ac_ext
6274
6275 fi
6276 echo "$as_me:6276: result: $cf_cv_gnu_source" >&5
6277 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6278 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6279
6280         ;;
6281 mirbsd*) #(vi
6282         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6283         ;;
6284 netbsd*) #(vi
6285         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6286         ;;
6287 openbsd*) #(vi
6288         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6289         ;;
6290 osf[45]*) #(vi
6291         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6292         ;;
6293 nto-qnx*) #(vi
6294         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6295         ;;
6296 sco*) #(vi
6297         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6298         ;;
6299 solaris*) #(vi
6300         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6301         ;;
6302 *)
6303         echo "$as_me:6303: checking if we should define _XOPEN_SOURCE" >&5
6304 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6305 if test "${cf_cv_xopen_source+set}" = set; then
6306   echo $ECHO_N "(cached) $ECHO_C" >&6
6307 else
6308
6309         cat >conftest.$ac_ext <<_ACEOF
6310 #line 6310 "configure"
6311 #include "confdefs.h"
6312 #include <sys/types.h>
6313 int
6314 main ()
6315 {
6316
6317 #ifndef _XOPEN_SOURCE
6318 make an error
6319 #endif
6320   ;
6321   return 0;
6322 }
6323 _ACEOF
6324 rm -f conftest.$ac_objext
6325 if { (eval echo "$as_me:6325: \"$ac_compile\"") >&5
6326   (eval $ac_compile) 2>&5
6327   ac_status=$?
6328   echo "$as_me:6328: \$? = $ac_status" >&5
6329   (exit $ac_status); } &&
6330          { ac_try='test -s conftest.$ac_objext'
6331   { (eval echo "$as_me:6331: \"$ac_try\"") >&5
6332   (eval $ac_try) 2>&5
6333   ac_status=$?
6334   echo "$as_me:6334: \$? = $ac_status" >&5
6335   (exit $ac_status); }; }; then
6336   cf_cv_xopen_source=no
6337 else
6338   echo "$as_me: failed program was:" >&5
6339 cat conftest.$ac_ext >&5
6340 cf_save="$CPPFLAGS"
6341          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6342          cat >conftest.$ac_ext <<_ACEOF
6343 #line 6343 "configure"
6344 #include "confdefs.h"
6345 #include <sys/types.h>
6346 int
6347 main ()
6348 {
6349
6350 #ifdef _XOPEN_SOURCE
6351 make an error
6352 #endif
6353   ;
6354   return 0;
6355 }
6356 _ACEOF
6357 rm -f conftest.$ac_objext
6358 if { (eval echo "$as_me:6358: \"$ac_compile\"") >&5
6359   (eval $ac_compile) 2>&5
6360   ac_status=$?
6361   echo "$as_me:6361: \$? = $ac_status" >&5
6362   (exit $ac_status); } &&
6363          { ac_try='test -s conftest.$ac_objext'
6364   { (eval echo "$as_me:6364: \"$ac_try\"") >&5
6365   (eval $ac_try) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); }; }; then
6369   cf_cv_xopen_source=no
6370 else
6371   echo "$as_me: failed program was:" >&5
6372 cat conftest.$ac_ext >&5
6373 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6374 fi
6375 rm -f conftest.$ac_objext conftest.$ac_ext
6376         CPPFLAGS="$cf_save"
6377
6378 fi
6379 rm -f conftest.$ac_objext conftest.$ac_ext
6380
6381 fi
6382 echo "$as_me:6382: result: $cf_cv_xopen_source" >&5
6383 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6384         if test "$cf_cv_xopen_source" != no ; then
6385
6386 # remove _XOPEN_SOURCE symbol from $CFLAGS
6387 CFLAGS=`echo "$CFLAGS" | \
6388         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6389                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6390
6391 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6392 CPPFLAGS=`echo "$CPPFLAGS" | \
6393         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6394                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6395
6396                 test "$cf_cv_cc_u_d_options" = yes && \
6397                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6398                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6399         fi
6400
6401 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6402
6403 cf_save_CFLAGS="$CFLAGS"
6404 cf_save_CPPFLAGS="$CPPFLAGS"
6405
6406 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6407 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6408         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6409                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6410
6411 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6412 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6413         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6414                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6415
6416 echo "$as_me:6416: checking if we should define _POSIX_C_SOURCE" >&5
6417 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6418 if test "${cf_cv_posix_c_source+set}" = set; then
6419   echo $ECHO_N "(cached) $ECHO_C" >&6
6420 else
6421
6422 echo "${as_me-configure}:6422: testing if the symbol is already defined go no further ..." 1>&5
6423
6424         cat >conftest.$ac_ext <<_ACEOF
6425 #line 6425 "configure"
6426 #include "confdefs.h"
6427 #include <sys/types.h>
6428 int
6429 main ()
6430 {
6431
6432 #ifndef _POSIX_C_SOURCE
6433 make an error
6434 #endif
6435   ;
6436   return 0;
6437 }
6438 _ACEOF
6439 rm -f conftest.$ac_objext
6440 if { (eval echo "$as_me:6440: \"$ac_compile\"") >&5
6441   (eval $ac_compile) 2>&5
6442   ac_status=$?
6443   echo "$as_me:6443: \$? = $ac_status" >&5
6444   (exit $ac_status); } &&
6445          { ac_try='test -s conftest.$ac_objext'
6446   { (eval echo "$as_me:6446: \"$ac_try\"") >&5
6447   (eval $ac_try) 2>&5
6448   ac_status=$?
6449   echo "$as_me:6449: \$? = $ac_status" >&5
6450   (exit $ac_status); }; }; then
6451   cf_cv_posix_c_source=no
6452 else
6453   echo "$as_me: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6455 cf_want_posix_source=no
6456          case .$cf_POSIX_C_SOURCE in #(vi
6457          .[12]??*) #(vi
6458                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6459                 ;;
6460          .2) #(vi
6461                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6462                 cf_want_posix_source=yes
6463                 ;;
6464          .*)
6465                 cf_want_posix_source=yes
6466                 ;;
6467          esac
6468          if test "$cf_want_posix_source" = yes ; then
6469                 cat >conftest.$ac_ext <<_ACEOF
6470 #line 6470 "configure"
6471 #include "confdefs.h"
6472 #include <sys/types.h>
6473 int
6474 main ()
6475 {
6476
6477 #ifdef _POSIX_SOURCE
6478 make an error
6479 #endif
6480   ;
6481   return 0;
6482 }
6483 _ACEOF
6484 rm -f conftest.$ac_objext
6485 if { (eval echo "$as_me:6485: \"$ac_compile\"") >&5
6486   (eval $ac_compile) 2>&5
6487   ac_status=$?
6488   echo "$as_me:6488: \$? = $ac_status" >&5
6489   (exit $ac_status); } &&
6490          { ac_try='test -s conftest.$ac_objext'
6491   { (eval echo "$as_me:6491: \"$ac_try\"") >&5
6492   (eval $ac_try) 2>&5
6493   ac_status=$?
6494   echo "$as_me:6494: \$? = $ac_status" >&5
6495   (exit $ac_status); }; }; then
6496   :
6497 else
6498   echo "$as_me: failed program was:" >&5
6499 cat conftest.$ac_ext >&5
6500 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6501 fi
6502 rm -f conftest.$ac_objext conftest.$ac_ext
6503          fi
6504
6505 echo "${as_me-configure}:6505: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6506
6507          CFLAGS="$cf_trim_CFLAGS"
6508          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6509
6510 echo "${as_me-configure}:6510: testing if the second compile does not leave our definition intact error ..." 1>&5
6511
6512          cat >conftest.$ac_ext <<_ACEOF
6513 #line 6513 "configure"
6514 #include "confdefs.h"
6515 #include <sys/types.h>
6516 int
6517 main ()
6518 {
6519
6520 #ifndef _POSIX_C_SOURCE
6521 make an error
6522 #endif
6523   ;
6524   return 0;
6525 }
6526 _ACEOF
6527 rm -f conftest.$ac_objext
6528 if { (eval echo "$as_me:6528: \"$ac_compile\"") >&5
6529   (eval $ac_compile) 2>&5
6530   ac_status=$?
6531   echo "$as_me:6531: \$? = $ac_status" >&5
6532   (exit $ac_status); } &&
6533          { ac_try='test -s conftest.$ac_objext'
6534   { (eval echo "$as_me:6534: \"$ac_try\"") >&5
6535   (eval $ac_try) 2>&5
6536   ac_status=$?
6537   echo "$as_me:6537: \$? = $ac_status" >&5
6538   (exit $ac_status); }; }; then
6539   :
6540 else
6541   echo "$as_me: failed program was:" >&5
6542 cat conftest.$ac_ext >&5
6543 cf_cv_posix_c_source=no
6544 fi
6545 rm -f conftest.$ac_objext conftest.$ac_ext
6546          CFLAGS="$cf_save_CFLAGS"
6547          CPPFLAGS="$cf_save_CPPFLAGS"
6548
6549 fi
6550 rm -f conftest.$ac_objext conftest.$ac_ext
6551
6552 fi
6553 echo "$as_me:6553: result: $cf_cv_posix_c_source" >&5
6554 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6555
6556 if test "$cf_cv_posix_c_source" != no ; then
6557         CFLAGS="$cf_trim_CFLAGS"
6558         CPPFLAGS="$cf_trim_CPPFLAGS"
6559         if test "$cf_cv_cc_u_d_options" = yes ; then
6560                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6561                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6562                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6563         fi
6564         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6565 fi
6566
6567         ;;
6568 esac
6569
6570 # Work around breakage on OS X
6571
6572 echo "$as_me:6572: checking if SIGWINCH is defined" >&5
6573 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6574 if test "${cf_cv_define_sigwinch+set}" = set; then
6575   echo $ECHO_N "(cached) $ECHO_C" >&6
6576 else
6577
6578         cat >conftest.$ac_ext <<_ACEOF
6579 #line 6579 "configure"
6580 #include "confdefs.h"
6581
6582 #include <sys/types.h>
6583 #include <sys/signal.h>
6584
6585 int
6586 main ()
6587 {
6588 int x = SIGWINCH
6589   ;
6590   return 0;
6591 }
6592 _ACEOF
6593 rm -f conftest.$ac_objext
6594 if { (eval echo "$as_me:6594: \"$ac_compile\"") >&5
6595   (eval $ac_compile) 2>&5
6596   ac_status=$?
6597   echo "$as_me:6597: \$? = $ac_status" >&5
6598   (exit $ac_status); } &&
6599          { ac_try='test -s conftest.$ac_objext'
6600   { (eval echo "$as_me:6600: \"$ac_try\"") >&5
6601   (eval $ac_try) 2>&5
6602   ac_status=$?
6603   echo "$as_me:6603: \$? = $ac_status" >&5
6604   (exit $ac_status); }; }; then
6605   cf_cv_define_sigwinch=yes
6606 else
6607   echo "$as_me: failed program was:" >&5
6608 cat conftest.$ac_ext >&5
6609 cat >conftest.$ac_ext <<_ACEOF
6610 #line 6610 "configure"
6611 #include "confdefs.h"
6612
6613 #undef _XOPEN_SOURCE
6614 #undef _POSIX_SOURCE
6615 #undef _POSIX_C_SOURCE
6616 #include <sys/types.h>
6617 #include <sys/signal.h>
6618
6619 int
6620 main ()
6621 {
6622 int x = SIGWINCH
6623   ;
6624   return 0;
6625 }
6626 _ACEOF
6627 rm -f conftest.$ac_objext
6628 if { (eval echo "$as_me:6628: \"$ac_compile\"") >&5
6629   (eval $ac_compile) 2>&5
6630   ac_status=$?
6631   echo "$as_me:6631: \$? = $ac_status" >&5
6632   (exit $ac_status); } &&
6633          { ac_try='test -s conftest.$ac_objext'
6634   { (eval echo "$as_me:6634: \"$ac_try\"") >&5
6635   (eval $ac_try) 2>&5
6636   ac_status=$?
6637   echo "$as_me:6637: \$? = $ac_status" >&5
6638   (exit $ac_status); }; }; then
6639   cf_cv_define_sigwinch=maybe
6640 else
6641   echo "$as_me: failed program was:" >&5
6642 cat conftest.$ac_ext >&5
6643 cf_cv_define_sigwinch=no
6644 fi
6645 rm -f conftest.$ac_objext conftest.$ac_ext
6646
6647 fi
6648 rm -f conftest.$ac_objext conftest.$ac_ext
6649
6650 fi
6651 echo "$as_me:6651: result: $cf_cv_define_sigwinch" >&5
6652 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6653
6654 if test "$cf_cv_define_sigwinch" = maybe ; then
6655 echo "$as_me:6655: checking for actual SIGWINCH definition" >&5
6656 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6657 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6658   echo $ECHO_N "(cached) $ECHO_C" >&6
6659 else
6660
6661 cf_cv_fixup_sigwinch=unknown
6662 cf_sigwinch=32
6663 while test $cf_sigwinch != 1
6664 do
6665         cat >conftest.$ac_ext <<_ACEOF
6666 #line 6666 "configure"
6667 #include "confdefs.h"
6668
6669 #undef _XOPEN_SOURCE
6670 #undef _POSIX_SOURCE
6671 #undef _POSIX_C_SOURCE
6672 #include <sys/types.h>
6673 #include <sys/signal.h>
6674
6675 int
6676 main ()
6677 {
6678
6679 #if SIGWINCH != $cf_sigwinch
6680 make an error
6681 #endif
6682 int x = SIGWINCH
6683   ;
6684   return 0;
6685 }
6686 _ACEOF
6687 rm -f conftest.$ac_objext
6688 if { (eval echo "$as_me:6688: \"$ac_compile\"") >&5
6689   (eval $ac_compile) 2>&5
6690   ac_status=$?
6691   echo "$as_me:6691: \$? = $ac_status" >&5
6692   (exit $ac_status); } &&
6693          { ac_try='test -s conftest.$ac_objext'
6694   { (eval echo "$as_me:6694: \"$ac_try\"") >&5
6695   (eval $ac_try) 2>&5
6696   ac_status=$?
6697   echo "$as_me:6697: \$? = $ac_status" >&5
6698   (exit $ac_status); }; }; then
6699   cf_cv_fixup_sigwinch=$cf_sigwinch
6700          break
6701 else
6702   echo "$as_me: failed program was:" >&5
6703 cat conftest.$ac_ext >&5
6704 fi
6705 rm -f conftest.$ac_objext conftest.$ac_ext
6706
6707 cf_sigwinch=`expr $cf_sigwinch - 1`
6708 done
6709
6710 fi
6711 echo "$as_me:6711: result: $cf_cv_fixup_sigwinch" >&5
6712 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6713
6714         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6715                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6716         fi
6717 fi
6718
6719 # Checks for CODESET support.
6720
6721   echo "$as_me:6721: checking for nl_langinfo and CODESET" >&5
6722 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6723 if test "${am_cv_langinfo_codeset+set}" = set; then
6724   echo $ECHO_N "(cached) $ECHO_C" >&6
6725 else
6726   cat >conftest.$ac_ext <<_ACEOF
6727 #line 6727 "configure"
6728 #include "confdefs.h"
6729 #include <langinfo.h>
6730 int
6731 main ()
6732 {
6733 char* cs = nl_langinfo(CODESET);
6734   ;
6735   return 0;
6736 }
6737 _ACEOF
6738 rm -f conftest.$ac_objext conftest$ac_exeext
6739 if { (eval echo "$as_me:6739: \"$ac_link\"") >&5
6740   (eval $ac_link) 2>&5
6741   ac_status=$?
6742   echo "$as_me:6742: \$? = $ac_status" >&5
6743   (exit $ac_status); } &&
6744          { ac_try='test -s conftest$ac_exeext'
6745   { (eval echo "$as_me:6745: \"$ac_try\"") >&5
6746   (eval $ac_try) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit $ac_status); }; }; then
6750   am_cv_langinfo_codeset=yes
6751 else
6752   echo "$as_me: failed program was:" >&5
6753 cat conftest.$ac_ext >&5
6754 am_cv_langinfo_codeset=no
6755 fi
6756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6757
6758 fi
6759 echo "$as_me:6759: result: $am_cv_langinfo_codeset" >&5
6760 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6761   if test $am_cv_langinfo_codeset = yes; then
6762
6763 cat >>confdefs.h <<\EOF
6764 #define HAVE_LANGINFO_CODESET 1
6765 EOF
6766
6767   fi
6768
6769 # use these variables to work around a defect in gcc's fixincludes.
6770 NCURSES_OK_WCHAR_T=
6771 NCURSES_OK_WINT_T=
6772
6773 echo "$as_me:6773: checking if you want wide-character code" >&5
6774 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6775
6776 # Check whether --enable-widec or --disable-widec was given.
6777 if test "${enable_widec+set}" = set; then
6778   enableval="$enable_widec"
6779   with_widec=$enableval
6780 else
6781   with_widec=no
6782 fi;
6783 echo "$as_me:6783: result: $with_widec" >&5
6784 echo "${ECHO_T}$with_widec" >&6
6785 if test "$with_widec" = yes ; then
6786         LIB_SUFFIX="w${LIB_SUFFIX}"
6787         cat >>confdefs.h <<\EOF
6788 #define USE_WIDEC_SUPPORT 1
6789 EOF
6790
6791 echo "$as_me:6791: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6792 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6793 cat >conftest.$ac_ext <<_ACEOF
6794 #line 6794 "configure"
6795 #include "confdefs.h"
6796 #include <sys/types.h>
6797
6798 int
6799 main ()
6800 {
6801
6802 #ifndef _XOPEN_SOURCE_EXTENDED
6803 make an error
6804 #endif
6805   ;
6806   return 0;
6807 }
6808 _ACEOF
6809 rm -f conftest.$ac_objext
6810 if { (eval echo "$as_me:6810: \"$ac_compile\"") >&5
6811   (eval $ac_compile) 2>&5
6812   ac_status=$?
6813   echo "$as_me:6813: \$? = $ac_status" >&5
6814   (exit $ac_status); } &&
6815          { ac_try='test -s conftest.$ac_objext'
6816   { (eval echo "$as_me:6816: \"$ac_try\"") >&5
6817   (eval $ac_try) 2>&5
6818   ac_status=$?
6819   echo "$as_me:6819: \$? = $ac_status" >&5
6820   (exit $ac_status); }; }; then
6821   cf_result=no
6822 else
6823   echo "$as_me: failed program was:" >&5
6824 cat conftest.$ac_ext >&5
6825 cf_result=yes
6826 fi
6827 rm -f conftest.$ac_objext conftest.$ac_ext
6828 echo "$as_me:6828: result: $cf_result" >&5
6829 echo "${ECHO_T}$cf_result" >&6
6830
6831 if test "$cf_result" = yes ; then
6832         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6833 elif test "x" != "x" ; then
6834         echo "$as_me:6834: checking checking for compatible value versus " >&5
6835 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6836         cat >conftest.$ac_ext <<_ACEOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839 #include <sys/types.h>
6840
6841 int
6842 main ()
6843 {
6844
6845 #if _XOPEN_SOURCE_EXTENDED- < 0
6846 make an error
6847 #endif
6848   ;
6849   return 0;
6850 }
6851 _ACEOF
6852 rm -f conftest.$ac_objext
6853 if { (eval echo "$as_me:6853: \"$ac_compile\"") >&5
6854   (eval $ac_compile) 2>&5
6855   ac_status=$?
6856   echo "$as_me:6856: \$? = $ac_status" >&5
6857   (exit $ac_status); } &&
6858          { ac_try='test -s conftest.$ac_objext'
6859   { (eval echo "$as_me:6859: \"$ac_try\"") >&5
6860   (eval $ac_try) 2>&5
6861   ac_status=$?
6862   echo "$as_me:6862: \$? = $ac_status" >&5
6863   (exit $ac_status); }; }; then
6864   cf_result=yes
6865 else
6866   echo "$as_me: failed program was:" >&5
6867 cat conftest.$ac_ext >&5
6868 cf_result=no
6869 fi
6870 rm -f conftest.$ac_objext conftest.$ac_ext
6871         echo "$as_me:6871: result: $cf_result" >&5
6872 echo "${ECHO_T}$cf_result" >&6
6873         if test "$cf_result" = no ; then
6874                 # perhaps we can override it - try...
6875                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6876         fi
6877 fi
6878
6879         # with_overwrite=no
6880         NCURSES_CH_T=cchar_t
6881
6882 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6883 do
6884 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6885 echo "$as_me:6885: checking for $ac_func" >&5
6886 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6887 if eval "test \"\${$as_ac_var+set}\" = set"; then
6888   echo $ECHO_N "(cached) $ECHO_C" >&6
6889 else
6890   cat >conftest.$ac_ext <<_ACEOF
6891 #line 6891 "configure"
6892 #include "confdefs.h"
6893 /* System header to define __stub macros and hopefully few prototypes,
6894     which can conflict with char $ac_func (); below.  */
6895 #include <assert.h>
6896 /* Override any gcc2 internal prototype to avoid an error.  */
6897 #ifdef __cplusplus
6898 extern "C"
6899 #endif
6900 /* We use char because int might match the return type of a gcc2
6901    builtin and then its argument prototype would still apply.  */
6902 char $ac_func ();
6903 char (*f) ();
6904
6905 int
6906 main ()
6907 {
6908 /* The GNU C library defines this for functions which it implements
6909     to always fail with ENOSYS.  Some functions are actually named
6910     something starting with __ and the normal name is an alias.  */
6911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6912 choke me
6913 #else
6914 f = $ac_func;
6915 #endif
6916
6917   ;
6918   return 0;
6919 }
6920 _ACEOF
6921 rm -f conftest.$ac_objext conftest$ac_exeext
6922 if { (eval echo "$as_me:6922: \"$ac_link\"") >&5
6923   (eval $ac_link) 2>&5
6924   ac_status=$?
6925   echo "$as_me:6925: \$? = $ac_status" >&5
6926   (exit $ac_status); } &&
6927          { ac_try='test -s conftest$ac_exeext'
6928   { (eval echo "$as_me:6928: \"$ac_try\"") >&5
6929   (eval $ac_try) 2>&5
6930   ac_status=$?
6931   echo "$as_me:6931: \$? = $ac_status" >&5
6932   (exit $ac_status); }; }; then
6933   eval "$as_ac_var=yes"
6934 else
6935   echo "$as_me: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6937 eval "$as_ac_var=no"
6938 fi
6939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6940 fi
6941 echo "$as_me:6941: result: `eval echo '${'$as_ac_var'}'`" >&5
6942 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6943 if test `eval echo '${'$as_ac_var'}'` = yes; then
6944   cat >>confdefs.h <<EOF
6945 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6946 EOF
6947
6948 fi
6949 done
6950
6951         if test "$ac_cv_func_putwc" != yes ; then
6952
6953 echo "$as_me:6953: checking for putwc in libutf8" >&5
6954 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6955 if test "${cf_cv_libutf8+set}" = set; then
6956   echo $ECHO_N "(cached) $ECHO_C" >&6
6957 else
6958
6959         cf_save_LIBS="$LIBS"
6960         LIBS="-lutf8 $LIBS"
6961 cat >conftest.$ac_ext <<_ACEOF
6962 #line 6962 "configure"
6963 #include "confdefs.h"
6964
6965 #include <libutf8.h>
6966 int
6967 main ()
6968 {
6969 putwc(0,0);
6970   ;
6971   return 0;
6972 }
6973 _ACEOF
6974 rm -f conftest.$ac_objext conftest$ac_exeext
6975 if { (eval echo "$as_me:6975: \"$ac_link\"") >&5
6976   (eval $ac_link) 2>&5
6977   ac_status=$?
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit $ac_status); } &&
6980          { ac_try='test -s conftest$ac_exeext'
6981   { (eval echo "$as_me:6981: \"$ac_try\"") >&5
6982   (eval $ac_try) 2>&5
6983   ac_status=$?
6984   echo "$as_me:6984: \$? = $ac_status" >&5
6985   (exit $ac_status); }; }; then
6986   cf_cv_libutf8=yes
6987 else
6988   echo "$as_me: failed program was:" >&5
6989 cat conftest.$ac_ext >&5
6990 cf_cv_libutf8=no
6991 fi
6992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6993         LIBS="$cf_save_LIBS"
6994
6995 fi
6996 echo "$as_me:6996: result: $cf_cv_libutf8" >&5
6997 echo "${ECHO_T}$cf_cv_libutf8" >&6
6998
6999 if test "$cf_cv_libutf8" = yes ; then
7000         cat >>confdefs.h <<\EOF
7001 #define HAVE_LIBUTF8_H 1
7002 EOF
7003
7004         LIBS="-lutf8 $LIBS"
7005 fi
7006
7007                 if test "$cf_cv_libutf8" = yes ; then
7008                         NCURSES_LIBUTF8=1
7009                 fi
7010         fi
7011
7012 # This is needed on Tru64 5.0 to declare mbstate_t
7013 echo "$as_me:7013: checking if we must include wchar.h to declare mbstate_t" >&5
7014 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7015 if test "${cf_cv_mbstate_t+set}" = set; then
7016   echo $ECHO_N "(cached) $ECHO_C" >&6
7017 else
7018
7019 cat >conftest.$ac_ext <<_ACEOF
7020 #line 7020 "configure"
7021 #include "confdefs.h"
7022
7023 #include <stdlib.h>
7024 #include <stdarg.h>
7025 #include <stdio.h>
7026 #ifdef HAVE_LIBUTF8_H
7027 #include <libutf8.h>
7028 #endif
7029 int
7030 main ()
7031 {
7032 mbstate_t state
7033   ;
7034   return 0;
7035 }
7036 _ACEOF
7037 rm -f conftest.$ac_objext
7038 if { (eval echo "$as_me:7038: \"$ac_compile\"") >&5
7039   (eval $ac_compile) 2>&5
7040   ac_status=$?
7041   echo "$as_me:7041: \$? = $ac_status" >&5
7042   (exit $ac_status); } &&
7043          { ac_try='test -s conftest.$ac_objext'
7044   { (eval echo "$as_me:7044: \"$ac_try\"") >&5
7045   (eval $ac_try) 2>&5
7046   ac_status=$?
7047   echo "$as_me:7047: \$? = $ac_status" >&5
7048   (exit $ac_status); }; }; then
7049   cf_cv_mbstate_t=no
7050 else
7051   echo "$as_me: failed program was:" >&5
7052 cat conftest.$ac_ext >&5
7053 cat >conftest.$ac_ext <<_ACEOF
7054 #line 7054 "configure"
7055 #include "confdefs.h"
7056
7057 #include <stdlib.h>
7058 #include <stdarg.h>
7059 #include <stdio.h>
7060 #include <wchar.h>
7061 #ifdef HAVE_LIBUTF8_H
7062 #include <libutf8.h>
7063 #endif
7064 int
7065 main ()
7066 {
7067 mbstate_t value
7068   ;
7069   return 0;
7070 }
7071 _ACEOF
7072 rm -f conftest.$ac_objext
7073 if { (eval echo "$as_me:7073: \"$ac_compile\"") >&5
7074   (eval $ac_compile) 2>&5
7075   ac_status=$?
7076   echo "$as_me:7076: \$? = $ac_status" >&5
7077   (exit $ac_status); } &&
7078          { ac_try='test -s conftest.$ac_objext'
7079   { (eval echo "$as_me:7079: \"$ac_try\"") >&5
7080   (eval $ac_try) 2>&5
7081   ac_status=$?
7082   echo "$as_me:7082: \$? = $ac_status" >&5
7083   (exit $ac_status); }; }; then
7084   cf_cv_mbstate_t=yes
7085 else
7086   echo "$as_me: failed program was:" >&5
7087 cat conftest.$ac_ext >&5
7088 cf_cv_mbstate_t=unknown
7089 fi
7090 rm -f conftest.$ac_objext conftest.$ac_ext
7091 fi
7092 rm -f conftest.$ac_objext conftest.$ac_ext
7093 fi
7094 echo "$as_me:7094: result: $cf_cv_mbstate_t" >&5
7095 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7096
7097 if test "$cf_cv_mbstate_t" = yes ; then
7098         cat >>confdefs.h <<\EOF
7099 #define NEED_WCHAR_H 1
7100 EOF
7101
7102         NEED_WCHAR_H=1
7103 fi
7104
7105 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7106 if test "$cf_cv_mbstate_t" = unknown ; then
7107         NCURSES_MBSTATE_T=1
7108 fi
7109
7110 # This is needed on Tru64 5.0 to declare wchar_t
7111 echo "$as_me:7111: checking if we must include wchar.h to declare wchar_t" >&5
7112 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7113 if test "${cf_cv_wchar_t+set}" = set; then
7114   echo $ECHO_N "(cached) $ECHO_C" >&6
7115 else
7116
7117 cat >conftest.$ac_ext <<_ACEOF
7118 #line 7118 "configure"
7119 #include "confdefs.h"
7120
7121 #include <stdlib.h>
7122 #include <stdarg.h>
7123 #include <stdio.h>
7124 #ifdef HAVE_LIBUTF8_H
7125 #include <libutf8.h>
7126 #endif
7127 int
7128 main ()
7129 {
7130 wchar_t state
7131   ;
7132   return 0;
7133 }
7134 _ACEOF
7135 rm -f conftest.$ac_objext
7136 if { (eval echo "$as_me:7136: \"$ac_compile\"") >&5
7137   (eval $ac_compile) 2>&5
7138   ac_status=$?
7139   echo "$as_me:7139: \$? = $ac_status" >&5
7140   (exit $ac_status); } &&
7141          { ac_try='test -s conftest.$ac_objext'
7142   { (eval echo "$as_me:7142: \"$ac_try\"") >&5
7143   (eval $ac_try) 2>&5
7144   ac_status=$?
7145   echo "$as_me:7145: \$? = $ac_status" >&5
7146   (exit $ac_status); }; }; then
7147   cf_cv_wchar_t=no
7148 else
7149   echo "$as_me: failed program was:" >&5
7150 cat conftest.$ac_ext >&5
7151 cat >conftest.$ac_ext <<_ACEOF
7152 #line 7152 "configure"
7153 #include "confdefs.h"
7154
7155 #include <stdlib.h>
7156 #include <stdarg.h>
7157 #include <stdio.h>
7158 #include <wchar.h>
7159 #ifdef HAVE_LIBUTF8_H
7160 #include <libutf8.h>
7161 #endif
7162 int
7163 main ()
7164 {
7165 wchar_t value
7166   ;
7167   return 0;
7168 }
7169 _ACEOF
7170 rm -f conftest.$ac_objext
7171 if { (eval echo "$as_me:7171: \"$ac_compile\"") >&5
7172   (eval $ac_compile) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit $ac_status); } &&
7176          { ac_try='test -s conftest.$ac_objext'
7177   { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7178   (eval $ac_try) 2>&5
7179   ac_status=$?
7180   echo "$as_me:7180: \$? = $ac_status" >&5
7181   (exit $ac_status); }; }; then
7182   cf_cv_wchar_t=yes
7183 else
7184   echo "$as_me: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7186 cf_cv_wchar_t=unknown
7187 fi
7188 rm -f conftest.$ac_objext conftest.$ac_ext
7189 fi
7190 rm -f conftest.$ac_objext conftest.$ac_ext
7191 fi
7192 echo "$as_me:7192: result: $cf_cv_wchar_t" >&5
7193 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7194
7195 if test "$cf_cv_wchar_t" = yes ; then
7196         cat >>confdefs.h <<\EOF
7197 #define NEED_WCHAR_H 1
7198 EOF
7199
7200         NEED_WCHAR_H=1
7201 fi
7202
7203 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7204 if test "$cf_cv_wchar_t" = unknown ; then
7205         NCURSES_WCHAR_T=1
7206 fi
7207
7208 # if we find wchar_t in either place, use substitution to provide a fallback.
7209 if test "$cf_cv_wchar_t" != unknown ; then
7210         NCURSES_OK_WCHAR_T=1
7211 fi
7212
7213 # This is needed on Tru64 5.0 to declare wint_t
7214 echo "$as_me:7214: checking if we must include wchar.h to declare wint_t" >&5
7215 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7216 if test "${cf_cv_wint_t+set}" = set; then
7217   echo $ECHO_N "(cached) $ECHO_C" >&6
7218 else
7219
7220 cat >conftest.$ac_ext <<_ACEOF
7221 #line 7221 "configure"
7222 #include "confdefs.h"
7223
7224 #include <stdlib.h>
7225 #include <stdarg.h>
7226 #include <stdio.h>
7227 #ifdef HAVE_LIBUTF8_H
7228 #include <libutf8.h>
7229 #endif
7230 int
7231 main ()
7232 {
7233 wint_t state
7234   ;
7235   return 0;
7236 }
7237 _ACEOF
7238 rm -f conftest.$ac_objext
7239 if { (eval echo "$as_me:7239: \"$ac_compile\"") >&5
7240   (eval $ac_compile) 2>&5
7241   ac_status=$?
7242   echo "$as_me:7242: \$? = $ac_status" >&5
7243   (exit $ac_status); } &&
7244          { ac_try='test -s conftest.$ac_objext'
7245   { (eval echo "$as_me:7245: \"$ac_try\"") >&5
7246   (eval $ac_try) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit $ac_status); }; }; then
7250   cf_cv_wint_t=no
7251 else
7252   echo "$as_me: failed program was:" >&5
7253 cat conftest.$ac_ext >&5
7254 cat >conftest.$ac_ext <<_ACEOF
7255 #line 7255 "configure"
7256 #include "confdefs.h"
7257
7258 #include <stdlib.h>
7259 #include <stdarg.h>
7260 #include <stdio.h>
7261 #include <wchar.h>
7262 #ifdef HAVE_LIBUTF8_H
7263 #include <libutf8.h>
7264 #endif
7265 int
7266 main ()
7267 {
7268 wint_t value
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f conftest.$ac_objext
7274 if { (eval echo "$as_me:7274: \"$ac_compile\"") >&5
7275   (eval $ac_compile) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit $ac_status); } &&
7279          { ac_try='test -s conftest.$ac_objext'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit $ac_status); }; }; then
7285   cf_cv_wint_t=yes
7286 else
7287   echo "$as_me: failed program was:" >&5
7288 cat conftest.$ac_ext >&5
7289 cf_cv_wint_t=unknown
7290 fi
7291 rm -f conftest.$ac_objext conftest.$ac_ext
7292 fi
7293 rm -f conftest.$ac_objext conftest.$ac_ext
7294 fi
7295 echo "$as_me:7295: result: $cf_cv_wint_t" >&5
7296 echo "${ECHO_T}$cf_cv_wint_t" >&6
7297
7298 if test "$cf_cv_wint_t" = yes ; then
7299         cat >>confdefs.h <<\EOF
7300 #define NEED_WCHAR_H 1
7301 EOF
7302
7303         NEED_WCHAR_H=1
7304 fi
7305
7306 # if we do not find wint_t in either place, use substitution to provide a fallback.
7307 if test "$cf_cv_wint_t" = unknown ; then
7308         NCURSES_WINT_T=1
7309 fi
7310
7311 # if we find wint_t in either place, use substitution to provide a fallback.
7312 if test "$cf_cv_wint_t" != unknown ; then
7313         NCURSES_OK_WINT_T=1
7314 fi
7315
7316         if test "$NCURSES_MBSTATE_T" != 0; then
7317                 cat >>confdefs.h <<\EOF
7318 #define NEED_MBSTATE_T_DEF 1
7319 EOF
7320
7321         fi
7322 fi
7323
7324 ###   use option --disable-lp64 to allow long chtype
7325 case $cf_cv_abi_version in
7326 [345]*)
7327         default_with_lp64=no
7328         ;;
7329 *)
7330         default_with_lp64=yes
7331         ;;
7332 esac
7333
7334 echo "$as_me:7334: checking whether to enable _LP64 definition in curses.h" >&5
7335 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7336
7337 # Check whether --enable-lp64 or --disable-lp64 was given.
7338 if test "${enable_lp64+set}" = set; then
7339   enableval="$enable_lp64"
7340   with_lp64=$enableval
7341 else
7342   with_lp64=$default_with_lp64
7343 fi;
7344 echo "$as_me:7344: result: $with_lp64" >&5
7345 echo "${ECHO_T}$with_lp64" >&6
7346
7347 if test "$with_lp64" = yes ; then
7348         cf_cv_enable_lp64=1
7349 else
7350         cf_cv_enable_lp64=0
7351 fi
7352
7353 # Check whether --enable-largefile or --disable-largefile was given.
7354 if test "${enable_largefile+set}" = set; then
7355   enableval="$enable_largefile"
7356
7357 fi;
7358 if test "$enable_largefile" != no; then
7359
7360   echo "$as_me:7360: checking for special C compiler options needed for large files" >&5
7361 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7362 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7363   echo $ECHO_N "(cached) $ECHO_C" >&6
7364 else
7365   ac_cv_sys_largefile_CC=no
7366      if test "$GCC" != yes; then
7367        ac_save_CC=$CC
7368        while :; do
7369          # IRIX 6.2 and later do not support large files by default,
7370          # so use the C compiler's -n32 option if that helps.
7371          cat >conftest.$ac_ext <<_ACEOF
7372 #line 7372 "configure"
7373 #include "confdefs.h"
7374 #include <sys/types.h>
7375  /* Check that off_t can represent 2**63 - 1 correctly.
7376     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7377     since some C++ compilers masquerading as C compilers
7378     incorrectly reject 9223372036854775807.  */
7379 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7380   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7381                        && LARGE_OFF_T % 2147483647 == 1)
7382                       ? 1 : -1];
7383 int
7384 main ()
7385 {
7386
7387   ;
7388   return 0;
7389 }
7390 _ACEOF
7391          rm -f conftest.$ac_objext
7392 if { (eval echo "$as_me:7392: \"$ac_compile\"") >&5
7393   (eval $ac_compile) 2>&5
7394   ac_status=$?
7395   echo "$as_me:7395: \$? = $ac_status" >&5
7396   (exit $ac_status); } &&
7397          { ac_try='test -s conftest.$ac_objext'
7398   { (eval echo "$as_me:7398: \"$ac_try\"") >&5
7399   (eval $ac_try) 2>&5
7400   ac_status=$?
7401   echo "$as_me:7401: \$? = $ac_status" >&5
7402   (exit $ac_status); }; }; then
7403   break
7404 else
7405   echo "$as_me: failed program was:" >&5
7406 cat conftest.$ac_ext >&5
7407 fi
7408 rm -f conftest.$ac_objext
7409          CC="$CC -n32"
7410          rm -f conftest.$ac_objext
7411 if { (eval echo "$as_me:7411: \"$ac_compile\"") >&5
7412   (eval $ac_compile) 2>&5
7413   ac_status=$?
7414   echo "$as_me:7414: \$? = $ac_status" >&5
7415   (exit $ac_status); } &&
7416          { ac_try='test -s conftest.$ac_objext'
7417   { (eval echo "$as_me:7417: \"$ac_try\"") >&5
7418   (eval $ac_try) 2>&5
7419   ac_status=$?
7420   echo "$as_me:7420: \$? = $ac_status" >&5
7421   (exit $ac_status); }; }; then
7422   ac_cv_sys_largefile_CC=' -n32'; break
7423 else
7424   echo "$as_me: failed program was:" >&5
7425 cat conftest.$ac_ext >&5
7426 fi
7427 rm -f conftest.$ac_objext
7428          break
7429        done
7430        CC=$ac_save_CC
7431        rm -f conftest.$ac_ext
7432     fi
7433 fi
7434 echo "$as_me:7434: result: $ac_cv_sys_largefile_CC" >&5
7435 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7436   if test "$ac_cv_sys_largefile_CC" != no; then
7437     CC=$CC$ac_cv_sys_largefile_CC
7438   fi
7439
7440   echo "$as_me:7440: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7441 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7442 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7443   echo $ECHO_N "(cached) $ECHO_C" >&6
7444 else
7445   while :; do
7446   ac_cv_sys_file_offset_bits=no
7447   cat >conftest.$ac_ext <<_ACEOF
7448 #line 7448 "configure"
7449 #include "confdefs.h"
7450 #include <sys/types.h>
7451  /* Check that off_t can represent 2**63 - 1 correctly.
7452     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7453     since some C++ compilers masquerading as C compilers
7454     incorrectly reject 9223372036854775807.  */
7455 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7456   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7457                        && LARGE_OFF_T % 2147483647 == 1)
7458                       ? 1 : -1];
7459 int
7460 main ()
7461 {
7462
7463   ;
7464   return 0;
7465 }
7466 _ACEOF
7467 rm -f conftest.$ac_objext
7468 if { (eval echo "$as_me:7468: \"$ac_compile\"") >&5
7469   (eval $ac_compile) 2>&5
7470   ac_status=$?
7471   echo "$as_me:7471: \$? = $ac_status" >&5
7472   (exit $ac_status); } &&
7473          { ac_try='test -s conftest.$ac_objext'
7474   { (eval echo "$as_me:7474: \"$ac_try\"") >&5
7475   (eval $ac_try) 2>&5
7476   ac_status=$?
7477   echo "$as_me:7477: \$? = $ac_status" >&5
7478   (exit $ac_status); }; }; then
7479   break
7480 else
7481   echo "$as_me: failed program was:" >&5
7482 cat conftest.$ac_ext >&5
7483 fi
7484 rm -f conftest.$ac_objext conftest.$ac_ext
7485   cat >conftest.$ac_ext <<_ACEOF
7486 #line 7486 "configure"
7487 #include "confdefs.h"
7488 #define _FILE_OFFSET_BITS 64
7489 #include <sys/types.h>
7490  /* Check that off_t can represent 2**63 - 1 correctly.
7491     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7492     since some C++ compilers masquerading as C compilers
7493     incorrectly reject 9223372036854775807.  */
7494 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7495   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7496                        && LARGE_OFF_T % 2147483647 == 1)
7497                       ? 1 : -1];
7498 int
7499 main ()
7500 {
7501
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 rm -f conftest.$ac_objext
7507 if { (eval echo "$as_me:7507: \"$ac_compile\"") >&5
7508   (eval $ac_compile) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); } &&
7512          { ac_try='test -s conftest.$ac_objext'
7513   { (eval echo "$as_me:7513: \"$ac_try\"") >&5
7514   (eval $ac_try) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); }; }; then
7518   ac_cv_sys_file_offset_bits=64; break
7519 else
7520   echo "$as_me: failed program was:" >&5
7521 cat conftest.$ac_ext >&5
7522 fi
7523 rm -f conftest.$ac_objext conftest.$ac_ext
7524   break
7525 done
7526 fi
7527 echo "$as_me:7527: result: $ac_cv_sys_file_offset_bits" >&5
7528 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7529 if test "$ac_cv_sys_file_offset_bits" != no; then
7530
7531 cat >>confdefs.h <<EOF
7532 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7533 EOF
7534
7535 fi
7536 rm -f conftest*
7537   echo "$as_me:7537: checking for _LARGE_FILES value needed for large files" >&5
7538 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7539 if test "${ac_cv_sys_large_files+set}" = set; then
7540   echo $ECHO_N "(cached) $ECHO_C" >&6
7541 else
7542   while :; do
7543   ac_cv_sys_large_files=no
7544   cat >conftest.$ac_ext <<_ACEOF
7545 #line 7545 "configure"
7546 #include "confdefs.h"
7547 #include <sys/types.h>
7548  /* Check that off_t can represent 2**63 - 1 correctly.
7549     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7550     since some C++ compilers masquerading as C compilers
7551     incorrectly reject 9223372036854775807.  */
7552 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7553   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7554                        && LARGE_OFF_T % 2147483647 == 1)
7555                       ? 1 : -1];
7556 int
7557 main ()
7558 {
7559
7560   ;
7561   return 0;
7562 }
7563 _ACEOF
7564 rm -f conftest.$ac_objext
7565 if { (eval echo "$as_me:7565: \"$ac_compile\"") >&5
7566   (eval $ac_compile) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); } &&
7570          { ac_try='test -s conftest.$ac_objext'
7571   { (eval echo "$as_me:7571: \"$ac_try\"") >&5
7572   (eval $ac_try) 2>&5
7573   ac_status=$?
7574   echo "$as_me:7574: \$? = $ac_status" >&5
7575   (exit $ac_status); }; }; then
7576   break
7577 else
7578   echo "$as_me: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 fi
7581 rm -f conftest.$ac_objext conftest.$ac_ext
7582   cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #define _LARGE_FILES 1
7586 #include <sys/types.h>
7587  /* Check that off_t can represent 2**63 - 1 correctly.
7588     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7589     since some C++ compilers masquerading as C compilers
7590     incorrectly reject 9223372036854775807.  */
7591 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7592   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7593                        && LARGE_OFF_T % 2147483647 == 1)
7594                       ? 1 : -1];
7595 int
7596 main ()
7597 {
7598
7599   ;
7600   return 0;
7601 }
7602 _ACEOF
7603 rm -f conftest.$ac_objext
7604 if { (eval echo "$as_me:7604: \"$ac_compile\"") >&5
7605   (eval $ac_compile) 2>&5
7606   ac_status=$?
7607   echo "$as_me:7607: \$? = $ac_status" >&5
7608   (exit $ac_status); } &&
7609          { ac_try='test -s conftest.$ac_objext'
7610   { (eval echo "$as_me:7610: \"$ac_try\"") >&5
7611   (eval $ac_try) 2>&5
7612   ac_status=$?
7613   echo "$as_me:7613: \$? = $ac_status" >&5
7614   (exit $ac_status); }; }; then
7615   ac_cv_sys_large_files=1; break
7616 else
7617   echo "$as_me: failed program was:" >&5
7618 cat conftest.$ac_ext >&5
7619 fi
7620 rm -f conftest.$ac_objext conftest.$ac_ext
7621   break
7622 done
7623 fi
7624 echo "$as_me:7624: result: $ac_cv_sys_large_files" >&5
7625 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7626 if test "$ac_cv_sys_large_files" != no; then
7627
7628 cat >>confdefs.h <<EOF
7629 #define _LARGE_FILES $ac_cv_sys_large_files
7630 EOF
7631
7632 fi
7633 rm -f conftest*
7634 fi
7635
7636     if test "$enable_largefile" != no ; then
7637         echo "$as_me:7637: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7638 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7639 if test "${ac_cv_sys_largefile_source+set}" = set; then
7640   echo $ECHO_N "(cached) $ECHO_C" >&6
7641 else
7642   while :; do
7643   ac_cv_sys_largefile_source=no
7644   cat >conftest.$ac_ext <<_ACEOF
7645 #line 7645 "configure"
7646 #include "confdefs.h"
7647 #include <stdio.h>
7648 int
7649 main ()
7650 {
7651 return !fseeko;
7652   ;
7653   return 0;
7654 }
7655 _ACEOF
7656 rm -f conftest.$ac_objext
7657 if { (eval echo "$as_me:7657: \"$ac_compile\"") >&5
7658   (eval $ac_compile) 2>&5
7659   ac_status=$?
7660   echo "$as_me:7660: \$? = $ac_status" >&5
7661   (exit $ac_status); } &&
7662          { ac_try='test -s conftest.$ac_objext'
7663   { (eval echo "$as_me:7663: \"$ac_try\"") >&5
7664   (eval $ac_try) 2>&5
7665   ac_status=$?
7666   echo "$as_me:7666: \$? = $ac_status" >&5
7667   (exit $ac_status); }; }; then
7668   break
7669 else
7670   echo "$as_me: failed program was:" >&5
7671 cat conftest.$ac_ext >&5
7672 fi
7673 rm -f conftest.$ac_objext conftest.$ac_ext
7674   cat >conftest.$ac_ext <<_ACEOF
7675 #line 7675 "configure"
7676 #include "confdefs.h"
7677 #define _LARGEFILE_SOURCE 1
7678 #include <stdio.h>
7679 int
7680 main ()
7681 {
7682 return !fseeko;
7683   ;
7684   return 0;
7685 }
7686 _ACEOF
7687 rm -f conftest.$ac_objext
7688 if { (eval echo "$as_me:7688: \"$ac_compile\"") >&5
7689   (eval $ac_compile) 2>&5
7690   ac_status=$?
7691   echo "$as_me:7691: \$? = $ac_status" >&5
7692   (exit $ac_status); } &&
7693          { ac_try='test -s conftest.$ac_objext'
7694   { (eval echo "$as_me:7694: \"$ac_try\"") >&5
7695   (eval $ac_try) 2>&5
7696   ac_status=$?
7697   echo "$as_me:7697: \$? = $ac_status" >&5
7698   (exit $ac_status); }; }; then
7699   ac_cv_sys_largefile_source=1; break
7700 else
7701   echo "$as_me: failed program was:" >&5
7702 cat conftest.$ac_ext >&5
7703 fi
7704 rm -f conftest.$ac_objext conftest.$ac_ext
7705   break
7706 done
7707 fi
7708 echo "$as_me:7708: result: $ac_cv_sys_largefile_source" >&5
7709 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7710 if test "$ac_cv_sys_largefile_source" != no; then
7711
7712 cat >>confdefs.h <<EOF
7713 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7714 EOF
7715
7716 fi
7717 rm -f conftest*
7718
7719 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7720 # in glibc 2.1.3, but that breaks too many other things.
7721 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7722 echo "$as_me:7722: checking for fseeko" >&5
7723 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7724 if test "${ac_cv_func_fseeko+set}" = set; then
7725   echo $ECHO_N "(cached) $ECHO_C" >&6
7726 else
7727   cat >conftest.$ac_ext <<_ACEOF
7728 #line 7728 "configure"
7729 #include "confdefs.h"
7730 #include <stdio.h>
7731 int
7732 main ()
7733 {
7734 return fseeko && fseeko (stdin, 0, 0);
7735   ;
7736   return 0;
7737 }
7738 _ACEOF
7739 rm -f conftest.$ac_objext conftest$ac_exeext
7740 if { (eval echo "$as_me:7740: \"$ac_link\"") >&5
7741   (eval $ac_link) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); } &&
7745          { ac_try='test -s conftest$ac_exeext'
7746   { (eval echo "$as_me:7746: \"$ac_try\"") >&5
7747   (eval $ac_try) 2>&5
7748   ac_status=$?
7749   echo "$as_me:7749: \$? = $ac_status" >&5
7750   (exit $ac_status); }; }; then
7751   ac_cv_func_fseeko=yes
7752 else
7753   echo "$as_me: failed program was:" >&5
7754 cat conftest.$ac_ext >&5
7755 ac_cv_func_fseeko=no
7756 fi
7757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7758 fi
7759 echo "$as_me:7759: result: $ac_cv_func_fseeko" >&5
7760 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7761 if test $ac_cv_func_fseeko = yes; then
7762
7763 cat >>confdefs.h <<\EOF
7764 #define HAVE_FSEEKO 1
7765 EOF
7766
7767 fi
7768
7769         # Normally we would collect these definitions in the config.h,
7770         # but (like _XOPEN_SOURCE), some environments rely on having these
7771         # defined before any of the system headers are included.  Another
7772         # case comes up with C++, e.g., on AIX the compiler compiles the
7773         # header files by themselves before looking at the body files it is
7774         # told to compile.  For ncurses, those header files do not include
7775         # the config.h
7776         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7777         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7778         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7779
7780         echo "$as_me:7780: checking whether to use struct dirent64" >&5
7781 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7782 if test "${cf_cv_struct_dirent64+set}" = set; then
7783   echo $ECHO_N "(cached) $ECHO_C" >&6
7784 else
7785
7786                 cat >conftest.$ac_ext <<_ACEOF
7787 #line 7787 "configure"
7788 #include "confdefs.h"
7789
7790 #include <sys/types.h>
7791 #include <dirent.h>
7792
7793 int
7794 main ()
7795 {
7796
7797                 /* if transitional largefile support is setup, this is true */
7798                 extern struct dirent64 * readdir(DIR *);
7799                 struct dirent64 *x = readdir((DIR *)0);
7800                 struct dirent *y = readdir((DIR *)0);
7801                 int z = x - y;
7802
7803   ;
7804   return 0;
7805 }
7806 _ACEOF
7807 rm -f conftest.$ac_objext
7808 if { (eval echo "$as_me:7808: \"$ac_compile\"") >&5
7809   (eval $ac_compile) 2>&5
7810   ac_status=$?
7811   echo "$as_me:7811: \$? = $ac_status" >&5
7812   (exit $ac_status); } &&
7813          { ac_try='test -s conftest.$ac_objext'
7814   { (eval echo "$as_me:7814: \"$ac_try\"") >&5
7815   (eval $ac_try) 2>&5
7816   ac_status=$?
7817   echo "$as_me:7817: \$? = $ac_status" >&5
7818   (exit $ac_status); }; }; then
7819   cf_cv_struct_dirent64=yes
7820 else
7821   echo "$as_me: failed program was:" >&5
7822 cat conftest.$ac_ext >&5
7823 cf_cv_struct_dirent64=no
7824 fi
7825 rm -f conftest.$ac_objext conftest.$ac_ext
7826
7827 fi
7828 echo "$as_me:7828: result: $cf_cv_struct_dirent64" >&5
7829 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7830         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7831 #define HAVE_STRUCT_DIRENT64 1
7832 EOF
7833
7834     fi
7835
7836 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7837 echo "$as_me:7837: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7838 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7839
7840 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7841 if test "${enable_tparm_varargs+set}" = set; then
7842   enableval="$enable_tparm_varargs"
7843   with_tparm_varargs=$enableval
7844 else
7845   with_tparm_varargs=yes
7846 fi;
7847 echo "$as_me:7847: result: $with_tparm_varargs" >&5
7848 echo "${ECHO_T}$with_tparm_varargs" >&6
7849 NCURSES_TPARM_VARARGS=0
7850 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7851
7852 ###   use option --with-bool to override bool's type
7853 echo "$as_me:7853: checking for type of bool" >&5
7854 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7855
7856 # Check whether --with-bool or --without-bool was given.
7857 if test "${with_bool+set}" = set; then
7858   withval="$with_bool"
7859   NCURSES_BOOL="$withval"
7860 else
7861   NCURSES_BOOL=auto
7862 fi;
7863 echo "$as_me:7863: result: $NCURSES_BOOL" >&5
7864 echo "${ECHO_T}$NCURSES_BOOL" >&6
7865
7866 echo "$as_me:7866: checking for alternate terminal capabilities file" >&5
7867 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7868
7869 # Check whether --with-caps or --without-caps was given.
7870 if test "${with_caps+set}" = set; then
7871   withval="$with_caps"
7872   TERMINFO_CAPS=Caps.$withval
7873 else
7874   TERMINFO_CAPS=Caps
7875 fi;
7876 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7877 echo "$as_me:7877: result: $TERMINFO_CAPS" >&5
7878 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7879
7880 ###   use option --with-chtype to override chtype's type
7881 echo "$as_me:7881: checking for type of chtype" >&5
7882 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7883
7884 # Check whether --with-chtype or --without-chtype was given.
7885 if test "${with_chtype+set}" = set; then
7886   withval="$with_chtype"
7887   NCURSES_CHTYPE="$withval"
7888 else
7889   NCURSES_CHTYPE=auto
7890 fi;
7891 echo "$as_me:7891: result: $NCURSES_CHTYPE" >&5
7892 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7893
7894 ###   use option --with-ospeed to override ospeed's type
7895 echo "$as_me:7895: checking for type of ospeed" >&5
7896 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7897
7898 # Check whether --with-ospeed or --without-ospeed was given.
7899 if test "${with_ospeed+set}" = set; then
7900   withval="$with_ospeed"
7901   NCURSES_OSPEED="$withval"
7902 else
7903   NCURSES_OSPEED=short
7904 fi;
7905 echo "$as_me:7905: result: $NCURSES_OSPEED" >&5
7906 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7907
7908 ###   use option --with-mmask-t to override mmask_t's type
7909 echo "$as_me:7909: checking for type of mmask_t" >&5
7910 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7911
7912 # Check whether --with-mmask-t or --without-mmask-t was given.
7913 if test "${with_mmask_t+set}" = set; then
7914   withval="$with_mmask_t"
7915   NCURSES_MMASK_T="$withval"
7916 else
7917   NCURSES_MMASK_T=auto
7918 fi;
7919 echo "$as_me:7919: result: $NCURSES_MMASK_T" >&5
7920 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7921
7922 ### Enable compiling-in rcs id's
7923 echo "$as_me:7923: checking if RCS identifiers should be compiled-in" >&5
7924 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7925
7926 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7927 if test "${with_rcs_ids+set}" = set; then
7928   withval="$with_rcs_ids"
7929   with_rcs_ids=$withval
7930 else
7931   with_rcs_ids=no
7932 fi;
7933 echo "$as_me:7933: result: $with_rcs_ids" >&5
7934 echo "${ECHO_T}$with_rcs_ids" >&6
7935 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7936 #define USE_RCS_IDS 1
7937 EOF
7938
7939 ###############################################################################
7940
7941 echo "$as_me:7941: checking format of man-pages" >&5
7942 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7943
7944 # Check whether --with-manpage-format or --without-manpage-format was given.
7945 if test "${with_manpage_format+set}" = set; then
7946   withval="$with_manpage_format"
7947   MANPAGE_FORMAT=$withval
7948 else
7949   MANPAGE_FORMAT=unknown
7950 fi;
7951
7952 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7953 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7954
7955 cf_unknown=
7956
7957 case $MANPAGE_FORMAT in
7958 unknown)
7959   if test -z "$MANPATH" ; then
7960     MANPATH="/usr/man:/usr/share/man"
7961   fi
7962
7963   # look for the 'date' man-page (it's most likely to be installed!)
7964   MANPAGE_FORMAT=
7965   cf_preform=no
7966   cf_catonly=yes
7967   cf_example=date
7968
7969   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7970   for cf_dir in $MANPATH; do
7971     test -z "$cf_dir" && cf_dir=/usr/man
7972     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
7973     do
7974       cf_test=`echo $cf_name | sed -e 's/*//'`
7975       if test "x$cf_test" = "x$cf_name" ; then
7976
7977         case "$cf_name" in
7978         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7979         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7980         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7981         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7982         esac
7983
7984         case "$cf_name" in
7985         $cf_dir/man*)
7986           cf_catonly=no
7987           ;;
7988         $cf_dir/cat*)
7989           cf_preform=yes
7990           ;;
7991         esac
7992         break
7993       fi
7994
7995       # if we found a match in either man* or cat*, stop looking
7996       if test -n "$MANPAGE_FORMAT" ; then
7997         cf_found=no
7998         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7999         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8000         case "$cf_name" in
8001         $cf_dir/cat*)
8002           cf_found=yes
8003           ;;
8004         esac
8005         test $cf_found=yes && break
8006       fi
8007     done
8008     # only check the first directory in $MANPATH where we find manpages
8009     if test -n "$MANPAGE_FORMAT" ; then
8010        break
8011     fi
8012   done
8013   # if we did not find the example, just assume it is normal
8014   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8015   IFS="$ac_save_ifs"
8016   ;;
8017 *)
8018   for cf_option in $MANPAGE_FORMAT; do
8019      case $cf_option in #(vi
8020      gzip|compress|BSDI|normal|formatted|catonly)
8021        ;;
8022      *)
8023        cf_unknown="$cf_unknown $cf_option"
8024        ;;
8025      esac
8026   done
8027   ;;
8028 esac
8029
8030 echo "$as_me:8030: result: $MANPAGE_FORMAT" >&5
8031 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8032 if test -n "$cf_unknown" ; then
8033   { echo "$as_me:8033: WARNING: Unexpected manpage-format $cf_unknown" >&5
8034 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8035 fi
8036
8037 echo "$as_me:8037: checking for manpage renaming" >&5
8038 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8039
8040 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8041 if test "${with_manpage_renames+set}" = set; then
8042   withval="$with_manpage_renames"
8043   MANPAGE_RENAMES=$withval
8044 else
8045   MANPAGE_RENAMES=yes
8046 fi;
8047
8048 case ".$MANPAGE_RENAMES" in #(vi
8049 .no) #(vi
8050   ;;
8051 .|.yes)
8052   # Debian 'man' program?
8053   if test -f /etc/debian_version ; then
8054     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8055   else
8056     MANPAGE_RENAMES=no
8057   fi
8058   ;;
8059 esac
8060
8061 if test "$MANPAGE_RENAMES" != no ; then
8062   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8063     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8064   elif test ! -f $MANPAGE_RENAMES ; then
8065     { { echo "$as_me:8065: error: not a filename: $MANPAGE_RENAMES" >&5
8066 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8067    { (exit 1); exit 1; }; }
8068   fi
8069
8070   test ! -d man && mkdir man
8071
8072   # Construct a sed-script to perform renaming within man-pages
8073   if test -n "$MANPAGE_RENAMES" ; then
8074     test ! -d man && mkdir man
8075     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8076   fi
8077 fi
8078
8079 echo "$as_me:8079: result: $MANPAGE_RENAMES" >&5
8080 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8081
8082 echo "$as_me:8082: checking if manpage aliases will be installed" >&5
8083 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8084
8085 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8086 if test "${with_manpage_aliases+set}" = set; then
8087   withval="$with_manpage_aliases"
8088   MANPAGE_ALIASES=$withval
8089 else
8090   MANPAGE_ALIASES=yes
8091 fi;
8092
8093 echo "$as_me:8093: result: $MANPAGE_ALIASES" >&5
8094 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8095
8096 if test "$LN_S" = "ln -s"; then
8097         cf_use_symlinks=yes
8098 else
8099         cf_use_symlinks=no
8100 fi
8101
8102 MANPAGE_SYMLINKS=no
8103 if test "$MANPAGE_ALIASES" = yes ; then
8104 echo "$as_me:8104: checking if manpage symlinks should be used" >&5
8105 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8106
8107 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8108 if test "${with_manpage_symlinks+set}" = set; then
8109   withval="$with_manpage_symlinks"
8110   MANPAGE_SYMLINKS=$withval
8111 else
8112   MANPAGE_SYMLINKS=$cf_use_symlinks
8113 fi;
8114
8115 if test "$$cf_use_symlinks" = no; then
8116 if test "$MANPAGE_SYMLINKS" = yes ; then
8117         { echo "$as_me:8117: WARNING: cannot make symlinks" >&5
8118 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8119         MANPAGE_SYMLINKS=no
8120 fi
8121 fi
8122
8123 echo "$as_me:8123: result: $MANPAGE_SYMLINKS" >&5
8124 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8125 fi
8126
8127 echo "$as_me:8127: checking for manpage tbl" >&5
8128 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8129
8130 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8131 if test "${with_manpage_tbl+set}" = set; then
8132   withval="$with_manpage_tbl"
8133   MANPAGE_TBL=$withval
8134 else
8135   MANPAGE_TBL=no
8136 fi;
8137
8138 echo "$as_me:8138: result: $MANPAGE_TBL" >&5
8139 echo "${ECHO_T}$MANPAGE_TBL" >&6
8140
8141   if test "$prefix" = "NONE" ; then
8142      cf_prefix="$ac_default_prefix"
8143   else
8144      cf_prefix="$prefix"
8145   fi
8146
8147   case "$MANPAGE_FORMAT" in # (vi
8148   *catonly*) # (vi
8149     cf_format=yes
8150     cf_inboth=no
8151     ;;
8152   *formatted*) # (vi
8153     cf_format=yes
8154     cf_inboth=yes
8155     ;;
8156   *)
8157     cf_format=no
8158     cf_inboth=no
8159     ;;
8160   esac
8161
8162 test ! -d man && mkdir man
8163
8164 cf_so_strip=
8165 cf_compress=
8166 case "$MANPAGE_FORMAT" in #(vi
8167 *compress*) #(vi
8168         cf_so_strip="Z"
8169         cf_compress=compress
8170   ;;
8171 *gzip*) #(vi
8172         cf_so_strip="gz"
8173         cf_compress=gzip
8174   ;;
8175 esac
8176
8177 cf_edit_man=./edit_man.sh
8178 cf_man_alias=`pwd`/man_alias.sed
8179
8180 cat >$cf_edit_man <<CF_EOF
8181 #! /bin/sh
8182 # this script is generated by the configure-script CF_MAN_PAGES macro.
8183
8184 prefix="$cf_prefix"
8185 datadir="$datadir"
8186
8187 NCURSES_MAJOR="$NCURSES_MAJOR"
8188 NCURSES_MINOR="$NCURSES_MINOR"
8189 NCURSES_PATCH="$NCURSES_PATCH"
8190
8191 NCURSES_OSPEED="$NCURSES_OSPEED"
8192 TERMINFO="$TERMINFO"
8193
8194 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8195
8196 INSTALL="$INSTALL"
8197 INSTALL_DATA="$INSTALL_DATA"
8198
8199 transform="$program_transform_name"
8200
8201 TMP=\${TMPDIR-/tmp}/man\$\$
8202 trap "rm -f \$TMP" 0 1 2 5 15
8203
8204 form=\$1
8205 shift || exit 1
8206
8207 verb=\$1
8208 shift || exit 1
8209
8210 mandir=\$1
8211 shift || exit 1
8212
8213 srcdir=\$1
8214 top_srcdir=\$srcdir/..
8215 shift || exit 1
8216
8217 if test "\$form" = normal ; then
8218         if test "$cf_format" = yes ; then
8219         if test "$cf_inboth" = no ; then
8220                 sh \$0 format \$verb \$mandir \$srcdir \$*
8221                 exit $?
8222         fi
8223         fi
8224         cf_subdir=\$mandir/man
8225         cf_tables=$MANPAGE_TBL
8226 else
8227         cf_subdir=\$mandir/cat
8228         cf_tables=yes
8229 fi
8230
8231 # process the list of source-files
8232 for i in \$* ; do
8233 case \$i in #(vi
8234 *.orig|*.rej) ;; #(vi
8235 *.[0-9]*)
8236         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8237         if test \$verb = installing ; then
8238         if test ! -d \$cf_subdir\${section} ; then
8239                 \$MKDIRS \$cf_subdir\$section
8240         fi
8241         fi
8242
8243         # replace variables in man page
8244         if test ! -f $cf_man_alias ; then
8245 cat >>$cf_man_alias <<-CF_EOF2
8246                 s,@DATADIR@,\$datadir,g
8247                 s,@TERMINFO@,\$TERMINFO,g
8248                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8249                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8250                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8251                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8252 CF_EOF
8253
8254         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8255         do
8256                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8257                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8258 cat >>$cf_edit_man <<-CF_EOF
8259                 s,@$cf_NAME@,$cf_name,
8260 CF_EOF
8261         done
8262
8263 cat >>$cf_edit_man <<CF_EOF
8264 CF_EOF2
8265                 echo "...made $cf_man_alias"
8266         fi
8267
8268         aliases=
8269         cf_source=\`basename \$i\`
8270         inalias=\$cf_source
8271         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8272         if test ! -f \$inalias ; then
8273                 echo .. skipped \$cf_source
8274                 continue
8275         fi
8276 CF_EOF
8277
8278 if test "$MANPAGE_ALIASES" != no ; then
8279 cat >>$cf_edit_man <<CF_EOF
8280         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8281 CF_EOF
8282 fi
8283
8284 if test "$MANPAGE_RENAMES" = no ; then
8285 cat >>$cf_edit_man <<CF_EOF
8286         # perform program transformations for section 1 man pages
8287         if test \$section = 1 ; then
8288                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8289         else
8290                 cf_target=\$cf_subdir\${section}/\$cf_source
8291         fi
8292 CF_EOF
8293 else
8294 cat >>$cf_edit_man <<CF_EOF
8295         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8296         if test -z "\$cf_target" ; then
8297                 echo '? missing rename for '\$cf_source
8298                 cf_target="\$cf_source"
8299         fi
8300         cf_target="\$cf_subdir\${section}/\${cf_target}"
8301
8302 CF_EOF
8303 fi
8304
8305 cat >>$cf_edit_man <<CF_EOF
8306         sed     -f $cf_man_alias \\
8307 CF_EOF
8308
8309 if test -f $MANPAGE_RENAMES ; then
8310 cat >>$cf_edit_man <<CF_EOF
8311                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8312 CF_EOF
8313 else
8314 cat >>$cf_edit_man <<CF_EOF
8315                 < \$i >\$TMP
8316 CF_EOF
8317 fi
8318
8319 cat >>$cf_edit_man <<CF_EOF
8320 if test \$cf_tables = yes ; then
8321         tbl \$TMP >\$TMP.out
8322         mv \$TMP.out \$TMP
8323 fi
8324 CF_EOF
8325
8326 if test $with_curses_h != yes ; then
8327 cat >>$cf_edit_man <<CF_EOF
8328         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8329         mv \$TMP.out \$TMP
8330 CF_EOF
8331 fi
8332
8333 cat >>$cf_edit_man <<CF_EOF
8334         if test \$form = format ; then
8335                 nroff -man \$TMP >\$TMP.out
8336                 mv \$TMP.out \$TMP
8337         fi
8338 CF_EOF
8339
8340 if test -n "$cf_compress" ; then
8341 cat >>$cf_edit_man <<CF_EOF
8342         if test \$verb = installing ; then
8343         if ( $cf_compress -f \$TMP )
8344         then
8345                 mv \$TMP.$cf_so_strip \$TMP
8346         fi
8347         fi
8348         cf_target="\$cf_target.$cf_so_strip"
8349 CF_EOF
8350 fi
8351
8352 case "$MANPAGE_FORMAT" in #(vi
8353 *BSDI*)
8354 cat >>$cf_edit_man <<CF_EOF
8355         if test \$form = format ; then
8356                 # BSDI installs only .0 suffixes in the cat directories
8357                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8358         fi
8359 CF_EOF
8360   ;;
8361 esac
8362
8363 cat >>$cf_edit_man <<CF_EOF
8364         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8365         if test \$verb = installing ; then
8366                 echo \$verb \$cf_target
8367                 \$INSTALL_DATA \$TMP \$cf_target
8368                 test -d \$cf_subdir\${section} &&
8369                 test -n "\$aliases" && (
8370                         cd \$cf_subdir\${section} && (
8371                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8372                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8373                                 cf_target=\`basename \$cf_target\`
8374                                 for cf_alias in \$aliases
8375                                 do
8376                                         if test \$section = 1 ; then
8377                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8378                                         fi
8379
8380                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8381                                                 if test -f \$cf_alias\${suffix} ; then
8382                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8383                                                         then
8384                                                                 continue
8385                                                         fi
8386                                                 fi
8387                                                 echo .. \$verb alias \$cf_alias\${suffix}
8388                                                 rm -f \$cf_alias\${suffix}
8389                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8390                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8391                                                 echo ".so \$cf_source" >\$TMP
8392 CF_EOF
8393 if test -n "$cf_compress" ; then
8394 cat >>$cf_edit_man <<CF_EOF
8395                                                 if test -n "$cf_so_strip" ; then
8396                                                         $cf_compress -f \$TMP
8397                                                         mv \$TMP.$cf_so_strip \$TMP
8398                                                 fi
8399 CF_EOF
8400 fi
8401 cat >>$cf_edit_man <<CF_EOF
8402                                                 echo .. \$verb alias \$cf_alias\${suffix}
8403                                                 rm -f \$cf_alias\${suffix}
8404                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8405                                         fi
8406                                 done
8407                         )
8408                 )
8409         elif test \$verb = removing ; then
8410                 test -f \$cf_target && (
8411                         echo \$verb \$cf_target
8412                         rm -f \$cf_target
8413                 )
8414                 test -d \$cf_subdir\${section} &&
8415                 test -n "\$aliases" && (
8416                         cd \$cf_subdir\${section} && (
8417                                 for cf_alias in \$aliases
8418                                 do
8419                                         if test \$section = 1 ; then
8420                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8421                                         fi
8422
8423                                         echo .. \$verb alias \$cf_alias\${suffix}
8424                                         rm -f \$cf_alias\${suffix}
8425                                 done
8426                         )
8427                 )
8428         else
8429 #               echo ".hy 0"
8430                 cat \$TMP
8431         fi
8432         ;;
8433 esac
8434 done
8435
8436 if test $cf_inboth = yes ; then
8437 if test \$form != format ; then
8438         sh \$0 format \$verb \$mandir \$srcdir \$*
8439 fi
8440 fi
8441
8442 exit 0
8443 CF_EOF
8444 chmod 755 $cf_edit_man
8445
8446 ###############################################################################
8447
8448 ### Note that some functions (such as const) are normally disabled anyway.
8449 echo "$as_me:8449: checking if you want to build with function extensions" >&5
8450 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8451
8452 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8453 if test "${enable_ext_funcs+set}" = set; then
8454   enableval="$enable_ext_funcs"
8455   with_ext_funcs=$enableval
8456 else
8457   with_ext_funcs=yes
8458 fi;
8459 echo "$as_me:8459: result: $with_ext_funcs" >&5
8460 echo "${ECHO_T}$with_ext_funcs" >&6
8461 if test "$with_ext_funcs" = yes ; then
8462         NCURSES_EXT_FUNCS=1
8463         cat >>confdefs.h <<\EOF
8464 #define HAVE_CURSES_VERSION 1
8465 EOF
8466
8467         cat >>confdefs.h <<\EOF
8468 #define HAVE_HAS_KEY 1
8469 EOF
8470
8471         cat >>confdefs.h <<\EOF
8472 #define HAVE_RESIZETERM 1
8473 EOF
8474
8475         cat >>confdefs.h <<\EOF
8476 #define HAVE_RESIZE_TERM 1
8477 EOF
8478
8479         cat >>confdefs.h <<\EOF
8480 #define HAVE_USE_DEFAULT_COLORS 1
8481 EOF
8482
8483         cat >>confdefs.h <<\EOF
8484 #define HAVE_WRESIZE 1
8485 EOF
8486
8487         cat >>confdefs.h <<\EOF
8488 #define NCURSES_EXT_FUNCS 1
8489 EOF
8490
8491 else
8492         NCURSES_EXT_FUNCS=0
8493 fi
8494
8495 ###   use option --enable-const to turn on use of const beyond that in XSI.
8496 echo "$as_me:8496: checking for extended use of const keyword" >&5
8497 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8498
8499 # Check whether --enable-const or --disable-const was given.
8500 if test "${enable_const+set}" = set; then
8501   enableval="$enable_const"
8502   with_ext_const=$enableval
8503 else
8504   with_ext_const=no
8505 fi;
8506 echo "$as_me:8506: result: $with_ext_const" >&5
8507 echo "${ECHO_T}$with_ext_const" >&6
8508 NCURSES_CONST='/*nothing*/'
8509 if test "$with_ext_const" = yes ; then
8510         NCURSES_CONST=const
8511 fi
8512
8513 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8514 echo "$as_me:8514: checking if you want to use extended colors" >&5
8515 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8516
8517 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8518 if test "${enable_ext_colors+set}" = set; then
8519   enableval="$enable_ext_colors"
8520   with_ext_colors=$enableval
8521 else
8522   with_ext_colors=no
8523 fi;
8524 echo "$as_me:8524: result: $with_ext_colors" >&5
8525 echo "${ECHO_T}$with_ext_colors" >&6
8526 NCURSES_EXT_COLORS=0
8527 if test "$with_ext_colors" = yes ; then
8528         if test "$with_widec" != yes ; then
8529                 { { echo "$as_me:8529: error: This option applies only to wide-character library" >&5
8530 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8531    { (exit 1); exit 1; }; }
8532         else
8533                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8534
8535 if test "${with_abi_version+set}" != set; then
8536         case $cf_cv_rel_version in
8537         5.*)
8538                 cf_cv_rel_version=6.0
8539                 cf_cv_abi_version=6
8540                 { echo "$as_me:8540: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8541 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8542                 ;;
8543         esac
8544 fi
8545
8546         fi
8547         NCURSES_EXT_COLORS=1
8548         cat >>confdefs.h <<\EOF
8549 #define NCURSES_EXT_COLORS 1
8550 EOF
8551
8552 fi
8553
8554 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8555 echo "$as_me:8555: checking if you want to use extended mouse encoding" >&5
8556 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
8557
8558 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8559 if test "${enable_ext_mouse+set}" = set; then
8560   enableval="$enable_ext_mouse"
8561   with_ext_mouse=$enableval
8562 else
8563   with_ext_mouse=no
8564 fi;
8565 echo "$as_me:8565: result: $with_ext_mouse" >&5
8566 echo "${ECHO_T}$with_ext_mouse" >&6
8567 NCURSES_MOUSE_VERSION=1
8568 if test "$with_ext_mouse" = yes ; then
8569         NCURSES_MOUSE_VERSION=2
8570
8571 if test "${with_abi_version+set}" != set; then
8572         case $cf_cv_rel_version in
8573         5.*)
8574                 cf_cv_rel_version=6.0
8575                 cf_cv_abi_version=6
8576                 { echo "$as_me:8576: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8577 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8578                 ;;
8579         esac
8580 fi
8581
8582 fi
8583
8584 echo "$as_me:8584: checking if you want \$NCURSES_NO_PADDING code" >&5
8585 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8586
8587 # Check whether --enable-no-padding or --disable-no-padding was given.
8588 if test "${enable_no_padding+set}" = set; then
8589   enableval="$enable_no_padding"
8590   with_no_padding=$enableval
8591 else
8592   with_no_padding=$with_ext_funcs
8593 fi;
8594 echo "$as_me:8594: result: $with_no_padding" >&5
8595 echo "${ECHO_T}$with_no_padding" >&6
8596 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8597 #define NCURSES_NO_PADDING 1
8598 EOF
8599
8600 echo "$as_me:8600: checking for ANSI C header files" >&5
8601 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8602 if test "${ac_cv_header_stdc+set}" = set; then
8603   echo $ECHO_N "(cached) $ECHO_C" >&6
8604 else
8605   cat >conftest.$ac_ext <<_ACEOF
8606 #line 8606 "configure"
8607 #include "confdefs.h"
8608 #include <stdlib.h>
8609 #include <stdarg.h>
8610 #include <string.h>
8611 #include <float.h>
8612
8613 _ACEOF
8614 if { (eval echo "$as_me:8614: \"$ac_cpp conftest.$ac_ext\"") >&5
8615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8616   ac_status=$?
8617   egrep -v '^ *\+' conftest.er1 >conftest.err
8618   rm -f conftest.er1
8619   cat conftest.err >&5
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); } >/dev/null; then
8622   if test -s conftest.err; then
8623     ac_cpp_err=$ac_c_preproc_warn_flag
8624   else
8625     ac_cpp_err=
8626   fi
8627 else
8628   ac_cpp_err=yes
8629 fi
8630 if test -z "$ac_cpp_err"; then
8631   ac_cv_header_stdc=yes
8632 else
8633   echo "$as_me: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   ac_cv_header_stdc=no
8636 fi
8637 rm -f conftest.err conftest.$ac_ext
8638
8639 if test $ac_cv_header_stdc = yes; then
8640   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8641   cat >conftest.$ac_ext <<_ACEOF
8642 #line 8642 "configure"
8643 #include "confdefs.h"
8644 #include <string.h>
8645
8646 _ACEOF
8647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8648   egrep "memchr" >/dev/null 2>&1; then
8649   :
8650 else
8651   ac_cv_header_stdc=no
8652 fi
8653 rm -f conftest*
8654
8655 fi
8656
8657 if test $ac_cv_header_stdc = yes; then
8658   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8659   cat >conftest.$ac_ext <<_ACEOF
8660 #line 8660 "configure"
8661 #include "confdefs.h"
8662 #include <stdlib.h>
8663
8664 _ACEOF
8665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8666   egrep "free" >/dev/null 2>&1; then
8667   :
8668 else
8669   ac_cv_header_stdc=no
8670 fi
8671 rm -f conftest*
8672
8673 fi
8674
8675 if test $ac_cv_header_stdc = yes; then
8676   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8677   if test "$cross_compiling" = yes; then
8678   :
8679 else
8680   cat >conftest.$ac_ext <<_ACEOF
8681 #line 8681 "configure"
8682 #include "confdefs.h"
8683 #include <ctype.h>
8684 #if ((' ' & 0x0FF) == 0x020)
8685 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8686 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8687 #else
8688 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8689                      || ('j' <= (c) && (c) <= 'r') \
8690                      || ('s' <= (c) && (c) <= 'z'))
8691 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8692 #endif
8693
8694 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8695 int
8696 main ()
8697 {
8698   int i;
8699   for (i = 0; i < 256; i++)
8700     if (XOR (islower (i), ISLOWER (i))
8701         || toupper (i) != TOUPPER (i))
8702       $ac_main_return(2);
8703   $ac_main_return (0);
8704 }
8705 _ACEOF
8706 rm -f conftest$ac_exeext
8707 if { (eval echo "$as_me:8707: \"$ac_link\"") >&5
8708   (eval $ac_link) 2>&5
8709   ac_status=$?
8710   echo "$as_me:8710: \$? = $ac_status" >&5
8711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8712   { (eval echo "$as_me:8712: \"$ac_try\"") >&5
8713   (eval $ac_try) 2>&5
8714   ac_status=$?
8715   echo "$as_me:8715: \$? = $ac_status" >&5
8716   (exit $ac_status); }; }; then
8717   :
8718 else
8719   echo "$as_me: program exited with status $ac_status" >&5
8720 echo "$as_me: failed program was:" >&5
8721 cat conftest.$ac_ext >&5
8722 ac_cv_header_stdc=no
8723 fi
8724 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8725 fi
8726 fi
8727 fi
8728 echo "$as_me:8728: result: $ac_cv_header_stdc" >&5
8729 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8730 if test $ac_cv_header_stdc = yes; then
8731
8732 cat >>confdefs.h <<\EOF
8733 #define STDC_HEADERS 1
8734 EOF
8735
8736 fi
8737
8738 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8739
8740 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8741                   inttypes.h stdint.h unistd.h
8742 do
8743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8744 echo "$as_me:8744: checking for $ac_header" >&5
8745 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8747   echo $ECHO_N "(cached) $ECHO_C" >&6
8748 else
8749   cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8752 $ac_includes_default
8753 #include <$ac_header>
8754 _ACEOF
8755 rm -f conftest.$ac_objext
8756 if { (eval echo "$as_me:8756: \"$ac_compile\"") >&5
8757   (eval $ac_compile) 2>&5
8758   ac_status=$?
8759   echo "$as_me:8759: \$? = $ac_status" >&5
8760   (exit $ac_status); } &&
8761          { ac_try='test -s conftest.$ac_objext'
8762   { (eval echo "$as_me:8762: \"$ac_try\"") >&5
8763   (eval $ac_try) 2>&5
8764   ac_status=$?
8765   echo "$as_me:8765: \$? = $ac_status" >&5
8766   (exit $ac_status); }; }; then
8767   eval "$as_ac_Header=yes"
8768 else
8769   echo "$as_me: failed program was:" >&5
8770 cat conftest.$ac_ext >&5
8771 eval "$as_ac_Header=no"
8772 fi
8773 rm -f conftest.$ac_objext conftest.$ac_ext
8774 fi
8775 echo "$as_me:8775: result: `eval echo '${'$as_ac_Header'}'`" >&5
8776 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8777 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8778   cat >>confdefs.h <<EOF
8779 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8780 EOF
8781
8782 fi
8783 done
8784
8785 echo "$as_me:8785: checking for signed char" >&5
8786 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8787 if test "${ac_cv_type_signed_char+set}" = set; then
8788   echo $ECHO_N "(cached) $ECHO_C" >&6
8789 else
8790   cat >conftest.$ac_ext <<_ACEOF
8791 #line 8791 "configure"
8792 #include "confdefs.h"
8793 $ac_includes_default
8794 int
8795 main ()
8796 {
8797 if ((signed char *) 0)
8798   return 0;
8799 if (sizeof (signed char))
8800   return 0;
8801   ;
8802   return 0;
8803 }
8804 _ACEOF
8805 rm -f conftest.$ac_objext
8806 if { (eval echo "$as_me:8806: \"$ac_compile\"") >&5
8807   (eval $ac_compile) 2>&5
8808   ac_status=$?
8809   echo "$as_me:8809: \$? = $ac_status" >&5
8810   (exit $ac_status); } &&
8811          { ac_try='test -s conftest.$ac_objext'
8812   { (eval echo "$as_me:8812: \"$ac_try\"") >&5
8813   (eval $ac_try) 2>&5
8814   ac_status=$?
8815   echo "$as_me:8815: \$? = $ac_status" >&5
8816   (exit $ac_status); }; }; then
8817   ac_cv_type_signed_char=yes
8818 else
8819   echo "$as_me: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 ac_cv_type_signed_char=no
8822 fi
8823 rm -f conftest.$ac_objext conftest.$ac_ext
8824 fi
8825 echo "$as_me:8825: result: $ac_cv_type_signed_char" >&5
8826 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8827
8828 echo "$as_me:8828: checking size of signed char" >&5
8829 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8830 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8831   echo $ECHO_N "(cached) $ECHO_C" >&6
8832 else
8833   if test "$ac_cv_type_signed_char" = yes; then
8834   if test "$cross_compiling" = yes; then
8835   # Depending upon the size, compute the lo and hi bounds.
8836 cat >conftest.$ac_ext <<_ACEOF
8837 #line 8837 "configure"
8838 #include "confdefs.h"
8839 $ac_includes_default
8840 int
8841 main ()
8842 {
8843 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8844   ;
8845   return 0;
8846 }
8847 _ACEOF
8848 rm -f conftest.$ac_objext
8849 if { (eval echo "$as_me:8849: \"$ac_compile\"") >&5
8850   (eval $ac_compile) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); } &&
8854          { ac_try='test -s conftest.$ac_objext'
8855   { (eval echo "$as_me:8855: \"$ac_try\"") >&5
8856   (eval $ac_try) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); }; }; then
8860   ac_lo=0 ac_mid=0
8861   while :; do
8862     cat >conftest.$ac_ext <<_ACEOF
8863 #line 8863 "configure"
8864 #include "confdefs.h"
8865 $ac_includes_default
8866 int
8867 main ()
8868 {
8869 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8870   ;
8871   return 0;
8872 }
8873 _ACEOF
8874 rm -f conftest.$ac_objext
8875 if { (eval echo "$as_me:8875: \"$ac_compile\"") >&5
8876   (eval $ac_compile) 2>&5
8877   ac_status=$?
8878   echo "$as_me:8878: \$? = $ac_status" >&5
8879   (exit $ac_status); } &&
8880          { ac_try='test -s conftest.$ac_objext'
8881   { (eval echo "$as_me:8881: \"$ac_try\"") >&5
8882   (eval $ac_try) 2>&5
8883   ac_status=$?
8884   echo "$as_me:8884: \$? = $ac_status" >&5
8885   (exit $ac_status); }; }; then
8886   ac_hi=$ac_mid; break
8887 else
8888   echo "$as_me: failed program was:" >&5
8889 cat conftest.$ac_ext >&5
8890 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8891 fi
8892 rm -f conftest.$ac_objext conftest.$ac_ext
8893   done
8894 else
8895   echo "$as_me: failed program was:" >&5
8896 cat conftest.$ac_ext >&5
8897 ac_hi=-1 ac_mid=-1
8898   while :; do
8899     cat >conftest.$ac_ext <<_ACEOF
8900 #line 8900 "configure"
8901 #include "confdefs.h"
8902 $ac_includes_default
8903 int
8904 main ()
8905 {
8906 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8907   ;
8908   return 0;
8909 }
8910 _ACEOF
8911 rm -f conftest.$ac_objext
8912 if { (eval echo "$as_me:8912: \"$ac_compile\"") >&5
8913   (eval $ac_compile) 2>&5
8914   ac_status=$?
8915   echo "$as_me:8915: \$? = $ac_status" >&5
8916   (exit $ac_status); } &&
8917          { ac_try='test -s conftest.$ac_objext'
8918   { (eval echo "$as_me:8918: \"$ac_try\"") >&5
8919   (eval $ac_try) 2>&5
8920   ac_status=$?
8921   echo "$as_me:8921: \$? = $ac_status" >&5
8922   (exit $ac_status); }; }; then
8923   ac_lo=$ac_mid; break
8924 else
8925   echo "$as_me: failed program was:" >&5
8926 cat conftest.$ac_ext >&5
8927 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8928 fi
8929 rm -f conftest.$ac_objext conftest.$ac_ext
8930   done
8931 fi
8932 rm -f conftest.$ac_objext conftest.$ac_ext
8933 # Binary search between lo and hi bounds.
8934 while test "x$ac_lo" != "x$ac_hi"; do
8935   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8936   cat >conftest.$ac_ext <<_ACEOF
8937 #line 8937 "configure"
8938 #include "confdefs.h"
8939 $ac_includes_default
8940 int
8941 main ()
8942 {
8943 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8944   ;
8945   return 0;
8946 }
8947 _ACEOF
8948 rm -f conftest.$ac_objext
8949 if { (eval echo "$as_me:8949: \"$ac_compile\"") >&5
8950   (eval $ac_compile) 2>&5
8951   ac_status=$?
8952   echo "$as_me:8952: \$? = $ac_status" >&5
8953   (exit $ac_status); } &&
8954          { ac_try='test -s conftest.$ac_objext'
8955   { (eval echo "$as_me:8955: \"$ac_try\"") >&5
8956   (eval $ac_try) 2>&5
8957   ac_status=$?
8958   echo "$as_me:8958: \$? = $ac_status" >&5
8959   (exit $ac_status); }; }; then
8960   ac_hi=$ac_mid
8961 else
8962   echo "$as_me: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 ac_lo=`expr $ac_mid + 1`
8965 fi
8966 rm -f conftest.$ac_objext conftest.$ac_ext
8967 done
8968 ac_cv_sizeof_signed_char=$ac_lo
8969 else
8970   if test "$cross_compiling" = yes; then
8971   { { echo "$as_me:8971: error: cannot run test program while cross compiling" >&5
8972 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8973    { (exit 1); exit 1; }; }
8974 else
8975   cat >conftest.$ac_ext <<_ACEOF
8976 #line 8976 "configure"
8977 #include "confdefs.h"
8978 $ac_includes_default
8979 int
8980 main ()
8981 {
8982 FILE *f = fopen ("conftest.val", "w");
8983 if (!f)
8984   $ac_main_return (1);
8985 fprintf (f, "%d", (sizeof (signed char)));
8986 fclose (f);
8987   ;
8988   return 0;
8989 }
8990 _ACEOF
8991 rm -f conftest$ac_exeext
8992 if { (eval echo "$as_me:8992: \"$ac_link\"") >&5
8993   (eval $ac_link) 2>&5
8994   ac_status=$?
8995   echo "$as_me:8995: \$? = $ac_status" >&5
8996   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8997   { (eval echo "$as_me:8997: \"$ac_try\"") >&5
8998   (eval $ac_try) 2>&5
8999   ac_status=$?
9000   echo "$as_me:9000: \$? = $ac_status" >&5
9001   (exit $ac_status); }; }; then
9002   ac_cv_sizeof_signed_char=`cat conftest.val`
9003 else
9004   echo "$as_me: program exited with status $ac_status" >&5
9005 echo "$as_me: failed program was:" >&5
9006 cat conftest.$ac_ext >&5
9007 fi
9008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9009 fi
9010 fi
9011 rm -f conftest.val
9012 else
9013   ac_cv_sizeof_signed_char=0
9014 fi
9015 fi
9016 echo "$as_me:9016: result: $ac_cv_sizeof_signed_char" >&5
9017 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9018 cat >>confdefs.h <<EOF
9019 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9020 EOF
9021
9022 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9023         NCURSES_SBOOL="signed char"
9024 else
9025         NCURSES_SBOOL="char"
9026 fi
9027 echo "$as_me:9027: checking if you want to use signed Boolean array in term.h" >&5
9028 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9029
9030 # Check whether --enable-signed-char or --disable-signed-char was given.
9031 if test "${enable_signed_char+set}" = set; then
9032   enableval="$enable_signed_char"
9033   with_signed_char=$enableval
9034 else
9035   with_signed_char=no
9036 fi;
9037 echo "$as_me:9037: result: $with_signed_char" >&5
9038 echo "${ECHO_T}$with_signed_char" >&6
9039 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9040
9041 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9042 echo "$as_me:9042: checking if you want SIGWINCH handler" >&5
9043 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9044
9045 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9046 if test "${enable_sigwinch+set}" = set; then
9047   enableval="$enable_sigwinch"
9048   with_sigwinch=$enableval
9049 else
9050   with_sigwinch=$with_ext_funcs
9051 fi;
9052 echo "$as_me:9052: result: $with_sigwinch" >&5
9053 echo "${ECHO_T}$with_sigwinch" >&6
9054 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9055 #define USE_SIGWINCH 1
9056 EOF
9057
9058 ###   use option --enable-tcap-names to allow user to define new capabilities
9059 echo "$as_me:9059: checking if you want user-definable terminal capabilities like termcap" >&5
9060 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9061
9062 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9063 if test "${enable_tcap_names+set}" = set; then
9064   enableval="$enable_tcap_names"
9065   with_tcap_names=$enableval
9066 else
9067   with_tcap_names=$with_ext_funcs
9068 fi;
9069 echo "$as_me:9069: result: $with_tcap_names" >&5
9070 echo "${ECHO_T}$with_tcap_names" >&6
9071 NCURSES_XNAMES=0
9072 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9073
9074 ###############################################################################
9075 # These options are relatively safe to experiment with.
9076
9077 echo "$as_me:9077: checking if you want all development code" >&5
9078 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9079
9080 # Check whether --with-develop or --without-develop was given.
9081 if test "${with_develop+set}" = set; then
9082   withval="$with_develop"
9083   with_develop=$withval
9084 else
9085   with_develop=no
9086 fi;
9087 echo "$as_me:9087: result: $with_develop" >&5
9088 echo "${ECHO_T}$with_develop" >&6
9089
9090 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9091 echo "$as_me:9091: checking if you want hard-tabs code" >&5
9092 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9093
9094 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9095 if test "${enable_hard_tabs+set}" = set; then
9096   enableval="$enable_hard_tabs"
9097
9098 else
9099   enable_hard_tabs=$with_develop
9100 fi;
9101 echo "$as_me:9101: result: $enable_hard_tabs" >&5
9102 echo "${ECHO_T}$enable_hard_tabs" >&6
9103 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9104 #define USE_HARD_TABS 1
9105 EOF
9106
9107 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9108 echo "$as_me:9108: checking if you want limited support for xmc" >&5
9109 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9110
9111 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9112 if test "${enable_xmc_glitch+set}" = set; then
9113   enableval="$enable_xmc_glitch"
9114
9115 else
9116   enable_xmc_glitch=$with_develop
9117 fi;
9118 echo "$as_me:9118: result: $enable_xmc_glitch" >&5
9119 echo "${ECHO_T}$enable_xmc_glitch" >&6
9120 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9121 #define USE_XMC_SUPPORT 1
9122 EOF
9123
9124 ###############################################################################
9125 # These are just experimental, probably should not be in a package:
9126
9127 echo "$as_me:9127: checking if you do not want to assume colors are white-on-black" >&5
9128 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9129
9130 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9131 if test "${enable_assumed_color+set}" = set; then
9132   enableval="$enable_assumed_color"
9133   with_assumed_color=$enableval
9134 else
9135   with_assumed_color=yes
9136 fi;
9137 echo "$as_me:9137: result: $with_assumed_color" >&5
9138 echo "${ECHO_T}$with_assumed_color" >&6
9139 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9140 #define USE_ASSUMED_COLOR 1
9141 EOF
9142
9143 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9144 echo "$as_me:9144: checking if you want hashmap scrolling-optimization code" >&5
9145 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9146
9147 # Check whether --enable-hashmap or --disable-hashmap was given.
9148 if test "${enable_hashmap+set}" = set; then
9149   enableval="$enable_hashmap"
9150   with_hashmap=$enableval
9151 else
9152   with_hashmap=yes
9153 fi;
9154 echo "$as_me:9154: result: $with_hashmap" >&5
9155 echo "${ECHO_T}$with_hashmap" >&6
9156 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9157 #define USE_HASHMAP 1
9158 EOF
9159
9160 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9161 echo "$as_me:9161: checking if you want colorfgbg code" >&5
9162 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9163
9164 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9165 if test "${enable_colorfgbg+set}" = set; then
9166   enableval="$enable_colorfgbg"
9167   with_colorfgbg=$enableval
9168 else
9169   with_colorfgbg=no
9170 fi;
9171 echo "$as_me:9171: result: $with_colorfgbg" >&5
9172 echo "${ECHO_T}$with_colorfgbg" >&6
9173 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9174 #define USE_COLORFGBG 1
9175 EOF
9176
9177 # This is still experimental (20080329), but should ultimately be moved to
9178 # the script-block --with-normal, etc.
9179
9180 echo "$as_me:9180: checking if you want to link with the pthread library" >&5
9181 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9182
9183 # Check whether --with-pthread or --without-pthread was given.
9184 if test "${with_pthread+set}" = set; then
9185   withval="$with_pthread"
9186   with_pthread=$withval
9187 else
9188   with_pthread=no
9189 fi;
9190 echo "$as_me:9190: result: $with_pthread" >&5
9191 echo "${ECHO_T}$with_pthread" >&6
9192
9193 if test "$with_pthread" != no ; then
9194     echo "$as_me:9194: checking for pthread.h" >&5
9195 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9196 if test "${ac_cv_header_pthread_h+set}" = set; then
9197   echo $ECHO_N "(cached) $ECHO_C" >&6
9198 else
9199   cat >conftest.$ac_ext <<_ACEOF
9200 #line 9200 "configure"
9201 #include "confdefs.h"
9202 #include <pthread.h>
9203 _ACEOF
9204 if { (eval echo "$as_me:9204: \"$ac_cpp conftest.$ac_ext\"") >&5
9205   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9206   ac_status=$?
9207   egrep -v '^ *\+' conftest.er1 >conftest.err
9208   rm -f conftest.er1
9209   cat conftest.err >&5
9210   echo "$as_me:9210: \$? = $ac_status" >&5
9211   (exit $ac_status); } >/dev/null; then
9212   if test -s conftest.err; then
9213     ac_cpp_err=$ac_c_preproc_warn_flag
9214   else
9215     ac_cpp_err=
9216   fi
9217 else
9218   ac_cpp_err=yes
9219 fi
9220 if test -z "$ac_cpp_err"; then
9221   ac_cv_header_pthread_h=yes
9222 else
9223   echo "$as_me: failed program was:" >&5
9224   cat conftest.$ac_ext >&5
9225   ac_cv_header_pthread_h=no
9226 fi
9227 rm -f conftest.err conftest.$ac_ext
9228 fi
9229 echo "$as_me:9229: result: $ac_cv_header_pthread_h" >&5
9230 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9231 if test $ac_cv_header_pthread_h = yes; then
9232
9233         cat >>confdefs.h <<\EOF
9234 #define HAVE_PTHREADS_H 1
9235 EOF
9236
9237         echo "$as_me:9237: checking for pthread_create in -lpthread" >&5
9238 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9239 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
9240   echo $ECHO_N "(cached) $ECHO_C" >&6
9241 else
9242   ac_check_lib_save_LIBS=$LIBS
9243 LIBS="-lpthread  $LIBS"
9244 cat >conftest.$ac_ext <<_ACEOF
9245 #line 9245 "configure"
9246 #include "confdefs.h"
9247
9248 /* Override any gcc2 internal prototype to avoid an error.  */
9249 #ifdef __cplusplus
9250 extern "C"
9251 #endif
9252 /* We use char because int might match the return type of a gcc2
9253    builtin and then its argument prototype would still apply.  */
9254 char pthread_create ();
9255 int
9256 main ()
9257 {
9258 pthread_create ();
9259   ;
9260   return 0;
9261 }
9262 _ACEOF
9263 rm -f conftest.$ac_objext conftest$ac_exeext
9264 if { (eval echo "$as_me:9264: \"$ac_link\"") >&5
9265   (eval $ac_link) 2>&5
9266   ac_status=$?
9267   echo "$as_me:9267: \$? = $ac_status" >&5
9268   (exit $ac_status); } &&
9269          { ac_try='test -s conftest$ac_exeext'
9270   { (eval echo "$as_me:9270: \"$ac_try\"") >&5
9271   (eval $ac_try) 2>&5
9272   ac_status=$?
9273   echo "$as_me:9273: \$? = $ac_status" >&5
9274   (exit $ac_status); }; }; then
9275   ac_cv_lib_pthread_pthread_create=yes
9276 else
9277   echo "$as_me: failed program was:" >&5
9278 cat conftest.$ac_ext >&5
9279 ac_cv_lib_pthread_pthread_create=no
9280 fi
9281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9282 LIBS=$ac_check_lib_save_LIBS
9283 fi
9284 echo "$as_me:9284: result: $ac_cv_lib_pthread_pthread_create" >&5
9285 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
9286 if test $ac_cv_lib_pthread_pthread_create = yes; then
9287
9288             LIBS="-lpthread $LIBS"
9289             cat >>confdefs.h <<\EOF
9290 #define HAVE_LIBPTHREADS 1
9291 EOF
9292
9293             with_pthread=yes
9294
9295 else
9296
9297             { { echo "$as_me:9297: error: Cannot link with pthread library" >&5
9298 echo "$as_me: error: Cannot link with pthread library" >&2;}
9299    { (exit 1); exit 1; }; }
9300
9301 fi
9302
9303 fi
9304
9305 fi
9306
9307 if test "$with_pthread" = "yes" ; then
9308     cat >>confdefs.h <<\EOF
9309 #define USE_PTHREADS 1
9310 EOF
9311
9312     enable_reentrant=yes
9313 fi
9314
9315 # Reentrant code has to be opaque; there's little advantage to making ncurses
9316 # opaque outside of that, so there is no --enable-opaque option.  We can use
9317 # this option without --with-pthreads, but this will be always set for
9318 # pthreads.
9319 echo "$as_me:9319: checking if you want experimental reentrant code" >&5
9320 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9321
9322 # Check whether --enable-reentrant or --disable-reentrant was given.
9323 if test "${enable_reentrant+set}" = set; then
9324   enableval="$enable_reentrant"
9325   with_reentrant=$enableval
9326 else
9327   with_reentrant=no
9328 fi;
9329 echo "$as_me:9329: result: $with_reentrant" >&5
9330 echo "${ECHO_T}$with_reentrant" >&6
9331 if test "$with_reentrant" = yes ; then
9332         cf_cv_enable_reentrant=1
9333         cf_cv_enable_opaque="NCURSES_INTERNALS"
9334         NCURSES_OPAQUE=1
9335         NCURSES_SIZE_T=int
9336         LIB_SUFFIX="t${LIB_SUFFIX}"
9337         cat >>confdefs.h <<\EOF
9338 #define USE_REENTRANT 1
9339 EOF
9340
9341 if test "${with_abi_version+set}" != set; then
9342         case $cf_cv_rel_version in
9343         5.*)
9344                 cf_cv_rel_version=6.0
9345                 cf_cv_abi_version=6
9346                 { echo "$as_me:9346: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9347 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9348                 ;;
9349         esac
9350 fi
9351
9352 else
9353         cf_cv_enable_reentrant=0
9354         cf_cv_enable_opaque="NCURSES_OPAQUE"
9355         NCURSES_OPAQUE=0
9356         NCURSES_SIZE_T=short
9357 fi
9358
9359 echo "$as_me:9359: checking if you want experimental safe-sprintf code" >&5
9360 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9361
9362 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9363 if test "${enable_safe_sprintf+set}" = set; then
9364   enableval="$enable_safe_sprintf"
9365   with_safe_sprintf=$enableval
9366 else
9367   with_safe_sprintf=no
9368 fi;
9369 echo "$as_me:9369: result: $with_safe_sprintf" >&5
9370 echo "${ECHO_T}$with_safe_sprintf" >&6
9371 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9372 #define USE_SAFE_SPRINTF 1
9373 EOF
9374
9375 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9376 # when hashmap is used scroll hints are useless
9377 if test "$with_hashmap" = no ; then
9378 echo "$as_me:9378: checking if you want to experiment without scrolling-hints code" >&5
9379 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9380
9381 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9382 if test "${enable_scroll_hints+set}" = set; then
9383   enableval="$enable_scroll_hints"
9384   with_scroll_hints=$enableval
9385 else
9386   with_scroll_hints=yes
9387 fi;
9388 echo "$as_me:9388: result: $with_scroll_hints" >&5
9389 echo "${ECHO_T}$with_scroll_hints" >&6
9390 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9391 #define USE_SCROLL_HINTS 1
9392 EOF
9393
9394 fi
9395
9396 echo "$as_me:9396: checking if you want experimental wgetch-events code" >&5
9397 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9398
9399 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9400 if test "${enable_wgetch_events+set}" = set; then
9401   enableval="$enable_wgetch_events"
9402   with_wgetch_events=$enableval
9403 else
9404   with_wgetch_events=no
9405 fi;
9406 echo "$as_me:9406: result: $with_wgetch_events" >&5
9407 echo "${ECHO_T}$with_wgetch_events" >&6
9408 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9409 #define NCURSES_WGETCH_EVENTS 1
9410 EOF
9411
9412 ###############################################################################
9413
9414 ###     use option --disable-echo to suppress full display compiling commands
9415 echo "$as_me:9415: checking if you want to display full commands during build" >&5
9416 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9417
9418 # Check whether --enable-echo or --disable-echo was given.
9419 if test "${enable_echo+set}" = set; then
9420   enableval="$enable_echo"
9421   with_echo=$enableval
9422 else
9423   with_echo=yes
9424 fi;
9425 if test "$with_echo" = yes; then
9426         ECHO_LINK=
9427 else
9428         ECHO_LINK='@ echo linking $@ ... ;'
9429         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9430         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9431 fi
9432 echo "$as_me:9432: result: $with_echo" >&5
9433 echo "${ECHO_T}$with_echo" >&6
9434
9435 ###     use option --enable-warnings to turn on all gcc warnings
9436 echo "$as_me:9436: checking if you want to see compiler warnings" >&5
9437 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9438
9439 # Check whether --enable-warnings or --disable-warnings was given.
9440 if test "${enable_warnings+set}" = set; then
9441   enableval="$enable_warnings"
9442   with_warnings=$enableval
9443 fi;
9444 echo "$as_me:9444: result: $with_warnings" >&5
9445 echo "${ECHO_T}$with_warnings" >&6
9446
9447 if test "x$with_warnings" = "xyes"; then
9448         ADAFLAGS="$ADAFLAGS -gnatg"
9449
9450 INTEL_COMPILER=no
9451
9452 if test "$GCC" = yes ; then
9453         case $host_os in
9454         linux*|gnu*)
9455                 echo "$as_me:9455: checking if this is really Intel C compiler" >&5
9456 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9457                 cf_save_CFLAGS="$CFLAGS"
9458                 CFLAGS="$CFLAGS -no-gcc"
9459                 cat >conftest.$ac_ext <<_ACEOF
9460 #line 9460 "configure"
9461 #include "confdefs.h"
9462
9463 int
9464 main ()
9465 {
9466
9467 #ifdef __INTEL_COMPILER
9468 #else
9469 make an error
9470 #endif
9471
9472   ;
9473   return 0;
9474 }
9475 _ACEOF
9476 rm -f conftest.$ac_objext
9477 if { (eval echo "$as_me:9477: \"$ac_compile\"") >&5
9478   (eval $ac_compile) 2>&5
9479   ac_status=$?
9480   echo "$as_me:9480: \$? = $ac_status" >&5
9481   (exit $ac_status); } &&
9482          { ac_try='test -s conftest.$ac_objext'
9483   { (eval echo "$as_me:9483: \"$ac_try\"") >&5
9484   (eval $ac_try) 2>&5
9485   ac_status=$?
9486   echo "$as_me:9486: \$? = $ac_status" >&5
9487   (exit $ac_status); }; }; then
9488   INTEL_COMPILER=yes
9489 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9490
9491 else
9492   echo "$as_me: failed program was:" >&5
9493 cat conftest.$ac_ext >&5
9494 fi
9495 rm -f conftest.$ac_objext conftest.$ac_ext
9496                 CFLAGS="$cf_save_CFLAGS"
9497                 echo "$as_me:9497: result: $INTEL_COMPILER" >&5
9498 echo "${ECHO_T}$INTEL_COMPILER" >&6
9499                 ;;
9500         esac
9501 fi
9502
9503 cat > conftest.$ac_ext <<EOF
9504 #line 9504 "${as_me-configure}"
9505 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9506 EOF
9507
9508 if test "$INTEL_COMPILER" = yes
9509 then
9510 # The "-wdXXX" options suppress warnings:
9511 # remark #1419: external declaration in primary source file
9512 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9513 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9514 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9515 # remark #193: zero used for undefined preprocessing identifier
9516 # remark #593: variable "curs_sb_left_arrow" was set but never used
9517 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9518 # remark #869: parameter "tw" was never referenced
9519 # remark #981: operands are evaluated in unspecified order
9520 # warning #269: invalid format string conversion
9521
9522         { echo "$as_me:9522: checking for $CC warning options..." >&5
9523 echo "$as_me: checking for $CC warning options..." >&6;}
9524         cf_save_CFLAGS="$CFLAGS"
9525         EXTRA_CFLAGS="-Wall"
9526         for cf_opt in \
9527                 wd1419 \
9528                 wd1682 \
9529                 wd1683 \
9530                 wd1684 \
9531                 wd193 \
9532                 wd279 \
9533                 wd593 \
9534                 wd810 \
9535                 wd869 \
9536                 wd981
9537         do
9538                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9539                 if { (eval echo "$as_me:9539: \"$ac_compile\"") >&5
9540   (eval $ac_compile) 2>&5
9541   ac_status=$?
9542   echo "$as_me:9542: \$? = $ac_status" >&5
9543   (exit $ac_status); }; then
9544                         test -n "$verbose" && echo "$as_me:9544: result: ... -$cf_opt" >&5
9545 echo "${ECHO_T}... -$cf_opt" >&6
9546                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9547                 fi
9548         done
9549         CFLAGS="$cf_save_CFLAGS"
9550
9551 elif test "$GCC" = yes
9552 then
9553         { echo "$as_me:9553: checking for $CC warning options..." >&5
9554 echo "$as_me: checking for $CC warning options..." >&6;}
9555         cf_save_CFLAGS="$CFLAGS"
9556         EXTRA_CFLAGS="-W -Wall"
9557         cf_warn_CONST=""
9558         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9559         for cf_opt in \
9560                 Wbad-function-cast \
9561                 Wcast-align \
9562                 Wcast-qual \
9563                 Winline \
9564                 Wmissing-declarations \
9565                 Wmissing-prototypes \
9566                 Wnested-externs \
9567                 Wpointer-arith \
9568                 Wshadow \
9569                 Wstrict-prototypes \
9570                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9571         do
9572                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9573                 if { (eval echo "$as_me:9573: \"$ac_compile\"") >&5
9574   (eval $ac_compile) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); }; then
9578                         test -n "$verbose" && echo "$as_me:9578: result: ... -$cf_opt" >&5
9579 echo "${ECHO_T}... -$cf_opt" >&6
9580                         case $cf_opt in #(vi
9581                         Wcast-qual) #(vi
9582                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9583                                 ;;
9584                         Winline) #(vi
9585                                 case $GCC_VERSION in
9586                                 3.3*)
9587                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9588
9589 echo "${as_me-configure}:9589: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9590
9591                                         continue;;
9592                                 esac
9593                                 ;;
9594                         esac
9595                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9596                 fi
9597         done
9598         CFLAGS="$cf_save_CFLAGS"
9599 fi
9600 rm -f conftest*
9601
9602         if test "$cf_with_cxx" = yes ; then
9603
9604 INTEL_CPLUSPLUS=no
9605
9606 if test "$GCC" = yes ; then
9607         case $host_os in
9608         linux*|gnu*)
9609                 echo "$as_me:9609: checking if this is really Intel C++ compiler" >&5
9610 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9611                 cf_save_CFLAGS="$CXXFLAGS"
9612                 CXXFLAGS="$CXXFLAGS -no-gcc"
9613                 cat >conftest.$ac_ext <<_ACEOF
9614 #line 9614 "configure"
9615 #include "confdefs.h"
9616
9617 int
9618 main ()
9619 {
9620
9621 #ifdef __INTEL_COMPILER
9622 #else
9623 make an error
9624 #endif
9625
9626   ;
9627   return 0;
9628 }
9629 _ACEOF
9630 rm -f conftest.$ac_objext
9631 if { (eval echo "$as_me:9631: \"$ac_compile\"") >&5
9632   (eval $ac_compile) 2>&5
9633   ac_status=$?
9634   echo "$as_me:9634: \$? = $ac_status" >&5
9635   (exit $ac_status); } &&
9636          { ac_try='test -s conftest.$ac_objext'
9637   { (eval echo "$as_me:9637: \"$ac_try\"") >&5
9638   (eval $ac_try) 2>&5
9639   ac_status=$?
9640   echo "$as_me:9640: \$? = $ac_status" >&5
9641   (exit $ac_status); }; }; then
9642   INTEL_CPLUSPLUS=yes
9643 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9644
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 cat conftest.$ac_ext >&5
9648 fi
9649 rm -f conftest.$ac_objext conftest.$ac_ext
9650                 CXXFLAGS="$cf_save_CFLAGS"
9651                 echo "$as_me:9651: result: $INTEL_CPLUSPLUS" >&5
9652 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9653                 ;;
9654         esac
9655 fi
9656
9657 ac_ext=cc
9658 ac_cpp='$CXXCPP $CPPFLAGS'
9659 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9660 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9661 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9662 ac_main_return=return
9663
9664 cat > conftest.$ac_ext <<EOF
9665 #line 9665 "configure"
9666 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9667 EOF
9668
9669 if test "$INTEL_CPLUSPLUS" = yes
9670 then
9671 # The "-wdXXX" options suppress warnings:
9672 # remark #1419: external declaration in primary source file
9673 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9674 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9675 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9676 # remark #193: zero used for undefined preprocessing identifier
9677 # remark #593: variable "curs_sb_left_arrow" was set but never used
9678 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9679 # remark #869: parameter "tw" was never referenced
9680 # remark #981: operands are evaluated in unspecified order
9681 # warning #269: invalid format string conversion
9682
9683         { echo "$as_me:9683: checking for $CC warning options..." >&5
9684 echo "$as_me: checking for $CC warning options..." >&6;}
9685         cf_save_CXXFLAGS="$CXXFLAGS"
9686         EXTRA_CXXFLAGS="-Wall"
9687         for cf_opt in \
9688                 wd1419 \
9689                 wd1682 \
9690                 wd1683 \
9691                 wd1684 \
9692                 wd193 \
9693                 wd279 \
9694                 wd593 \
9695                 wd810 \
9696                 wd869 \
9697                 wd981
9698         do
9699                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9700                 if { (eval echo "$as_me:9700: \"$ac_compile\"") >&5
9701   (eval $ac_compile) 2>&5
9702   ac_status=$?
9703   echo "$as_me:9703: \$? = $ac_status" >&5
9704   (exit $ac_status); }; then
9705                         test -n "$verbose" && echo "$as_me:9705: result: ... -$cf_opt" >&5
9706 echo "${ECHO_T}... -$cf_opt" >&6
9707                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9708                 fi
9709         done
9710         CXXFLAGS="$cf_save_CXXFLAGS"
9711
9712 elif test "$GXX" = yes
9713 then
9714         { echo "$as_me:9714: checking for $CXX warning options..." >&5
9715 echo "$as_me: checking for $CXX warning options..." >&6;}
9716         cf_save_CXXFLAGS="$CXXFLAGS"
9717         EXTRA_CXXFLAGS="-W -Wall"
9718         cf_gxx_extra_warnings=""
9719         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9720         case "$GCC_VERSION" in
9721         [1-2].*)
9722                 ;;
9723         *)
9724                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9725                 ;;
9726         esac
9727         for cf_opt in \
9728                 Wabi \
9729                 fabi-version=0 \
9730                 Woverloaded-virtual \
9731                 Wsign-promo \
9732                 Wsynth \
9733                 Wold-style-cast \
9734                 Wcast-align \
9735                 Wcast-qual \
9736                 Wmissing-prototypes \
9737                 Wpointer-arith \
9738                 Wshadow \
9739                 Wstrict-prototypes \
9740                 Wundef $cf_gxx_extra_warnings Wno-unused
9741         do
9742                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9743                 if { (eval echo "$as_me:9743: \"$ac_compile\"") >&5
9744   (eval $ac_compile) 2>&5
9745   ac_status=$?
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); }; then
9748                         test -n "$verbose" && echo "$as_me:9748: result: ... -$cf_opt" >&5
9749 echo "${ECHO_T}... -$cf_opt" >&6
9750                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9751                 else
9752                         test -n "$verbose" && echo "$as_me:9752: result: ... no -$cf_opt" >&5
9753 echo "${ECHO_T}... no -$cf_opt" >&6
9754                 fi
9755         done
9756         CXXFLAGS="$cf_save_CXXFLAGS"
9757 fi
9758
9759 rm -f conftest*
9760 ac_ext=c
9761 ac_cpp='$CPP $CPPFLAGS'
9762 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9763 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9764 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9765 ac_main_return=return
9766
9767         fi
9768 fi
9769
9770 if test "$GCC" = yes
9771 then
9772 cat > conftest.i <<EOF
9773 #ifndef GCC_PRINTF
9774 #define GCC_PRINTF 0
9775 #endif
9776 #ifndef GCC_SCANF
9777 #define GCC_SCANF 0
9778 #endif
9779 #ifndef GCC_NORETURN
9780 #define GCC_NORETURN /* nothing */
9781 #endif
9782 #ifndef GCC_UNUSED
9783 #define GCC_UNUSED /* nothing */
9784 #endif
9785 EOF
9786 if test "$GCC" = yes
9787 then
9788         { echo "$as_me:9788: checking for $CC __attribute__ directives..." >&5
9789 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9790 cat > conftest.$ac_ext <<EOF
9791 #line 9791 "${as_me-configure}"
9792 #include "confdefs.h"
9793 #include "conftest.h"
9794 #include "conftest.i"
9795 #if     GCC_PRINTF
9796 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9797 #else
9798 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9799 #endif
9800 #if     GCC_SCANF
9801 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9802 #else
9803 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9804 #endif
9805 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9806 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9807 extern void foo(void) GCC_NORETURN;
9808 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9809 EOF
9810         for cf_attribute in scanf printf unused noreturn
9811         do
9812
9813 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9814
9815                 cf_directive="__attribute__(($cf_attribute))"
9816                 echo "checking for $CC $cf_directive" 1>&5
9817                 case $cf_attribute in
9818                 scanf|printf)
9819                 cat >conftest.h <<EOF
9820 #define GCC_$cf_ATTRIBUTE 1
9821 EOF
9822                         ;;
9823                 *)
9824                 cat >conftest.h <<EOF
9825 #define GCC_$cf_ATTRIBUTE $cf_directive
9826 EOF
9827                         ;;
9828                 esac
9829                 if { (eval echo "$as_me:9829: \"$ac_compile\"") >&5
9830   (eval $ac_compile) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit $ac_status); }; then
9834                         test -n "$verbose" && echo "$as_me:9834: result: ... $cf_attribute" >&5
9835 echo "${ECHO_T}... $cf_attribute" >&6
9836                         cat conftest.h >>confdefs.h
9837                 fi
9838         done
9839 else
9840         fgrep define conftest.i >>confdefs.h
9841 fi
9842 rm -rf conftest*
9843 fi
9844
9845 ###     use option --enable-assertions to turn on generation of assertion code
9846 echo "$as_me:9846: checking if you want to enable runtime assertions" >&5
9847 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9848
9849 # Check whether --enable-assertions or --disable-assertions was given.
9850 if test "${enable_assertions+set}" = set; then
9851   enableval="$enable_assertions"
9852   with_assertions=$enableval
9853 else
9854   with_assertions=no
9855 fi;
9856 echo "$as_me:9856: result: $with_assertions" >&5
9857 echo "${ECHO_T}$with_assertions" >&6
9858 if test -n "$GCC"
9859 then
9860         if test "$with_assertions" = no
9861         then
9862                 cat >>confdefs.h <<\EOF
9863 #define NDEBUG 1
9864 EOF
9865
9866                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9867         else
9868                 ADAFLAGS="$ADAFLAGS -gnata"
9869         fi
9870 fi
9871
9872 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9873
9874 echo "$as_me:9874: checking if you want to use dmalloc for testing" >&5
9875 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9876
9877 # Check whether --with-dmalloc or --without-dmalloc was given.
9878 if test "${with_dmalloc+set}" = set; then
9879   withval="$with_dmalloc"
9880   cat >>confdefs.h <<\EOF
9881 #define USE_DMALLOC 1
9882 EOF
9883
9884         : ${with_cflags:=-g}
9885         : ${with_no_leaks:=yes}
9886          with_dmalloc=yes
9887 else
9888   with_dmalloc=
9889 fi;
9890 echo "$as_me:9890: result: ${with_dmalloc:-no}" >&5
9891 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9892
9893 case .$with_cflags in #(vi
9894 .*-g*)
9895         case .$CFLAGS in #(vi
9896         .*-g*) #(vi
9897                 ;;
9898         *)
9899
9900 cf_fix_cppflags=no
9901 cf_new_cflags=
9902 cf_new_cppflags=
9903 cf_new_extra_cppflags=
9904
9905 for cf_add_cflags in -g
9906 do
9907 case $cf_fix_cppflags in
9908 no)
9909         case $cf_add_cflags in #(vi
9910         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9911                 case $cf_add_cflags in
9912                 -D*)
9913                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9914
9915                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9916                         && test -z "${cf_tst_cflags}" \
9917                         && cf_fix_cppflags=yes
9918
9919                         if test $cf_fix_cppflags = yes ; then
9920                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9921                                 continue
9922                         elif test "${cf_tst_cflags}" = "\"'" ; then
9923                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9924                                 continue
9925                         fi
9926                         ;;
9927                 esac
9928                 case "$CPPFLAGS" in
9929                 *$cf_add_cflags) #(vi
9930                         ;;
9931                 *) #(vi
9932                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9933                         ;;
9934                 esac
9935                 ;;
9936         *)
9937                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9938                 ;;
9939         esac
9940         ;;
9941 yes)
9942         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9943
9944         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9945
9946         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9947         && test -z "${cf_tst_cflags}" \
9948         && cf_fix_cppflags=no
9949         ;;
9950 esac
9951 done
9952
9953 if test -n "$cf_new_cflags" ; then
9954
9955         CFLAGS="$CFLAGS $cf_new_cflags"
9956 fi
9957
9958 if test -n "$cf_new_cppflags" ; then
9959
9960         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9961 fi
9962
9963 if test -n "$cf_new_extra_cppflags" ; then
9964
9965         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9966 fi
9967
9968                 ;;
9969         esac
9970         ;;
9971 esac
9972
9973 if test "$with_dmalloc" = yes ; then
9974         echo "$as_me:9974: checking for dmalloc.h" >&5
9975 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9976 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9977   echo $ECHO_N "(cached) $ECHO_C" >&6
9978 else
9979   cat >conftest.$ac_ext <<_ACEOF
9980 #line 9980 "configure"
9981 #include "confdefs.h"
9982 #include <dmalloc.h>
9983 _ACEOF
9984 if { (eval echo "$as_me:9984: \"$ac_cpp conftest.$ac_ext\"") >&5
9985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9986   ac_status=$?
9987   egrep -v '^ *\+' conftest.er1 >conftest.err
9988   rm -f conftest.er1
9989   cat conftest.err >&5
9990   echo "$as_me:9990: \$? = $ac_status" >&5
9991   (exit $ac_status); } >/dev/null; then
9992   if test -s conftest.err; then
9993     ac_cpp_err=$ac_c_preproc_warn_flag
9994   else
9995     ac_cpp_err=
9996   fi
9997 else
9998   ac_cpp_err=yes
9999 fi
10000 if test -z "$ac_cpp_err"; then
10001   ac_cv_header_dmalloc_h=yes
10002 else
10003   echo "$as_me: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   ac_cv_header_dmalloc_h=no
10006 fi
10007 rm -f conftest.err conftest.$ac_ext
10008 fi
10009 echo "$as_me:10009: result: $ac_cv_header_dmalloc_h" >&5
10010 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10011 if test $ac_cv_header_dmalloc_h = yes; then
10012
10013 echo "$as_me:10013: checking for dmalloc_debug in -ldmalloc" >&5
10014 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10015 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10016   echo $ECHO_N "(cached) $ECHO_C" >&6
10017 else
10018   ac_check_lib_save_LIBS=$LIBS
10019 LIBS="-ldmalloc  $LIBS"
10020 cat >conftest.$ac_ext <<_ACEOF
10021 #line 10021 "configure"
10022 #include "confdefs.h"
10023
10024 /* Override any gcc2 internal prototype to avoid an error.  */
10025 #ifdef __cplusplus
10026 extern "C"
10027 #endif
10028 /* We use char because int might match the return type of a gcc2
10029    builtin and then its argument prototype would still apply.  */
10030 char dmalloc_debug ();
10031 int
10032 main ()
10033 {
10034 dmalloc_debug ();
10035   ;
10036   return 0;
10037 }
10038 _ACEOF
10039 rm -f conftest.$ac_objext conftest$ac_exeext
10040 if { (eval echo "$as_me:10040: \"$ac_link\"") >&5
10041   (eval $ac_link) 2>&5
10042   ac_status=$?
10043   echo "$as_me:10043: \$? = $ac_status" >&5
10044   (exit $ac_status); } &&
10045          { ac_try='test -s conftest$ac_exeext'
10046   { (eval echo "$as_me:10046: \"$ac_try\"") >&5
10047   (eval $ac_try) 2>&5
10048   ac_status=$?
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit $ac_status); }; }; then
10051   ac_cv_lib_dmalloc_dmalloc_debug=yes
10052 else
10053   echo "$as_me: failed program was:" >&5
10054 cat conftest.$ac_ext >&5
10055 ac_cv_lib_dmalloc_dmalloc_debug=no
10056 fi
10057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10058 LIBS=$ac_check_lib_save_LIBS
10059 fi
10060 echo "$as_me:10060: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10061 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10062 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10063   cat >>confdefs.h <<EOF
10064 #define HAVE_LIBDMALLOC 1
10065 EOF
10066
10067   LIBS="-ldmalloc $LIBS"
10068
10069 fi
10070
10071 fi
10072
10073 fi
10074
10075 echo "$as_me:10075: checking if you want to use dbmalloc for testing" >&5
10076 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10077
10078 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10079 if test "${with_dbmalloc+set}" = set; then
10080   withval="$with_dbmalloc"
10081   cat >>confdefs.h <<\EOF
10082 #define USE_DBMALLOC 1
10083 EOF
10084
10085         : ${with_cflags:=-g}
10086         : ${with_no_leaks:=yes}
10087          with_dbmalloc=yes
10088 else
10089   with_dbmalloc=
10090 fi;
10091 echo "$as_me:10091: result: ${with_dbmalloc:-no}" >&5
10092 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10093
10094 case .$with_cflags in #(vi
10095 .*-g*)
10096         case .$CFLAGS in #(vi
10097         .*-g*) #(vi
10098                 ;;
10099         *)
10100
10101 cf_fix_cppflags=no
10102 cf_new_cflags=
10103 cf_new_cppflags=
10104 cf_new_extra_cppflags=
10105
10106 for cf_add_cflags in -g
10107 do
10108 case $cf_fix_cppflags in
10109 no)
10110         case $cf_add_cflags in #(vi
10111         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10112                 case $cf_add_cflags in
10113                 -D*)
10114                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10115
10116                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10117                         && test -z "${cf_tst_cflags}" \
10118                         && cf_fix_cppflags=yes
10119
10120                         if test $cf_fix_cppflags = yes ; then
10121                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10122                                 continue
10123                         elif test "${cf_tst_cflags}" = "\"'" ; then
10124                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10125                                 continue
10126                         fi
10127                         ;;
10128                 esac
10129                 case "$CPPFLAGS" in
10130                 *$cf_add_cflags) #(vi
10131                         ;;
10132                 *) #(vi
10133                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10134                         ;;
10135                 esac
10136                 ;;
10137         *)
10138                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10139                 ;;
10140         esac
10141         ;;
10142 yes)
10143         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10144
10145         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10146
10147         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10148         && test -z "${cf_tst_cflags}" \
10149         && cf_fix_cppflags=no
10150         ;;
10151 esac
10152 done
10153
10154 if test -n "$cf_new_cflags" ; then
10155
10156         CFLAGS="$CFLAGS $cf_new_cflags"
10157 fi
10158
10159 if test -n "$cf_new_cppflags" ; then
10160
10161         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10162 fi
10163
10164 if test -n "$cf_new_extra_cppflags" ; then
10165
10166         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10167 fi
10168
10169                 ;;
10170         esac
10171         ;;
10172 esac
10173
10174 if test "$with_dbmalloc" = yes ; then
10175         echo "$as_me:10175: checking for dbmalloc.h" >&5
10176 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10177 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10178   echo $ECHO_N "(cached) $ECHO_C" >&6
10179 else
10180   cat >conftest.$ac_ext <<_ACEOF
10181 #line 10181 "configure"
10182 #include "confdefs.h"
10183 #include <dbmalloc.h>
10184 _ACEOF
10185 if { (eval echo "$as_me:10185: \"$ac_cpp conftest.$ac_ext\"") >&5
10186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10187   ac_status=$?
10188   egrep -v '^ *\+' conftest.er1 >conftest.err
10189   rm -f conftest.er1
10190   cat conftest.err >&5
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); } >/dev/null; then
10193   if test -s conftest.err; then
10194     ac_cpp_err=$ac_c_preproc_warn_flag
10195   else
10196     ac_cpp_err=
10197   fi
10198 else
10199   ac_cpp_err=yes
10200 fi
10201 if test -z "$ac_cpp_err"; then
10202   ac_cv_header_dbmalloc_h=yes
10203 else
10204   echo "$as_me: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   ac_cv_header_dbmalloc_h=no
10207 fi
10208 rm -f conftest.err conftest.$ac_ext
10209 fi
10210 echo "$as_me:10210: result: $ac_cv_header_dbmalloc_h" >&5
10211 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10212 if test $ac_cv_header_dbmalloc_h = yes; then
10213
10214 echo "$as_me:10214: checking for debug_malloc in -ldbmalloc" >&5
10215 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10216 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10217   echo $ECHO_N "(cached) $ECHO_C" >&6
10218 else
10219   ac_check_lib_save_LIBS=$LIBS
10220 LIBS="-ldbmalloc  $LIBS"
10221 cat >conftest.$ac_ext <<_ACEOF
10222 #line 10222 "configure"
10223 #include "confdefs.h"
10224
10225 /* Override any gcc2 internal prototype to avoid an error.  */
10226 #ifdef __cplusplus
10227 extern "C"
10228 #endif
10229 /* We use char because int might match the return type of a gcc2
10230    builtin and then its argument prototype would still apply.  */
10231 char debug_malloc ();
10232 int
10233 main ()
10234 {
10235 debug_malloc ();
10236   ;
10237   return 0;
10238 }
10239 _ACEOF
10240 rm -f conftest.$ac_objext conftest$ac_exeext
10241 if { (eval echo "$as_me:10241: \"$ac_link\"") >&5
10242   (eval $ac_link) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); } &&
10246          { ac_try='test -s conftest$ac_exeext'
10247   { (eval echo "$as_me:10247: \"$ac_try\"") >&5
10248   (eval $ac_try) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); }; }; then
10252   ac_cv_lib_dbmalloc_debug_malloc=yes
10253 else
10254   echo "$as_me: failed program was:" >&5
10255 cat conftest.$ac_ext >&5
10256 ac_cv_lib_dbmalloc_debug_malloc=no
10257 fi
10258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10259 LIBS=$ac_check_lib_save_LIBS
10260 fi
10261 echo "$as_me:10261: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10262 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10263 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10264   cat >>confdefs.h <<EOF
10265 #define HAVE_LIBDBMALLOC 1
10266 EOF
10267
10268   LIBS="-ldbmalloc $LIBS"
10269
10270 fi
10271
10272 fi
10273
10274 fi
10275
10276 echo "$as_me:10276: checking if you want to use valgrind for testing" >&5
10277 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10278
10279 # Check whether --with-valgrind or --without-valgrind was given.
10280 if test "${with_valgrind+set}" = set; then
10281   withval="$with_valgrind"
10282   cat >>confdefs.h <<\EOF
10283 #define USE_VALGRIND 1
10284 EOF
10285
10286         : ${with_cflags:=-g}
10287         : ${with_no_leaks:=yes}
10288          with_valgrind=yes
10289 else
10290   with_valgrind=
10291 fi;
10292 echo "$as_me:10292: result: ${with_valgrind:-no}" >&5
10293 echo "${ECHO_T}${with_valgrind:-no}" >&6
10294
10295 case .$with_cflags in #(vi
10296 .*-g*)
10297         case .$CFLAGS in #(vi
10298         .*-g*) #(vi
10299                 ;;
10300         *)
10301
10302 cf_fix_cppflags=no
10303 cf_new_cflags=
10304 cf_new_cppflags=
10305 cf_new_extra_cppflags=
10306
10307 for cf_add_cflags in -g
10308 do
10309 case $cf_fix_cppflags in
10310 no)
10311         case $cf_add_cflags in #(vi
10312         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10313                 case $cf_add_cflags in
10314                 -D*)
10315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10316
10317                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10318                         && test -z "${cf_tst_cflags}" \
10319                         && cf_fix_cppflags=yes
10320
10321                         if test $cf_fix_cppflags = yes ; then
10322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10323                                 continue
10324                         elif test "${cf_tst_cflags}" = "\"'" ; then
10325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10326                                 continue
10327                         fi
10328                         ;;
10329                 esac
10330                 case "$CPPFLAGS" in
10331                 *$cf_add_cflags) #(vi
10332                         ;;
10333                 *) #(vi
10334                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10335                         ;;
10336                 esac
10337                 ;;
10338         *)
10339                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10340                 ;;
10341         esac
10342         ;;
10343 yes)
10344         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10345
10346         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10347
10348         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10349         && test -z "${cf_tst_cflags}" \
10350         && cf_fix_cppflags=no
10351         ;;
10352 esac
10353 done
10354
10355 if test -n "$cf_new_cflags" ; then
10356
10357         CFLAGS="$CFLAGS $cf_new_cflags"
10358 fi
10359
10360 if test -n "$cf_new_cppflags" ; then
10361
10362         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10363 fi
10364
10365 if test -n "$cf_new_extra_cppflags" ; then
10366
10367         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10368 fi
10369
10370                 ;;
10371         esac
10372         ;;
10373 esac
10374
10375 echo "$as_me:10375: checking if you want to perform memory-leak testing" >&5
10376 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10377
10378 # Check whether --enable-leaks or --disable-leaks was given.
10379 if test "${enable_leaks+set}" = set; then
10380   enableval="$enable_leaks"
10381   with_no_leaks=yes
10382 else
10383   : ${with_no_leaks:=no}
10384 fi;
10385 echo "$as_me:10385: result: $with_no_leaks" >&5
10386 echo "${ECHO_T}$with_no_leaks" >&6
10387
10388 if test "$with_no_leaks" = yes ; then
10389         cat >>confdefs.h <<\EOF
10390 #define NO_LEAKS 1
10391 EOF
10392
10393 fi
10394
10395 cat >>confdefs.h <<\EOF
10396 #define HAVE_NC_ALLOC_H 1
10397 EOF
10398
10399 ###     use option --enable-expanded to generate certain macros as functions
10400
10401 # Check whether --enable-expanded or --disable-expanded was given.
10402 if test "${enable_expanded+set}" = set; then
10403   enableval="$enable_expanded"
10404   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10405 #define NCURSES_EXPANDED 1
10406 EOF
10407
10408 fi;
10409
10410 ###     use option --disable-macros to suppress macros in favor of functions
10411
10412 # Check whether --enable-macros or --disable-macros was given.
10413 if test "${enable_macros+set}" = set; then
10414   enableval="$enable_macros"
10415   test "$enableval" = no && cat >>confdefs.h <<\EOF
10416 #define NCURSES_NOMACROS 1
10417 EOF
10418
10419 fi;
10420
10421 # Normally we only add trace() to the debug-library.  Allow this to be
10422 # extended to all models of the ncurses library:
10423 cf_all_traces=no
10424 case "$CFLAGS $CPPFLAGS" in
10425 *-DTRACE*)
10426         cf_all_traces=yes
10427         ;;
10428 esac
10429
10430 echo "$as_me:10430: checking whether to add trace feature to all models" >&5
10431 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10432
10433 # Check whether --with-trace or --without-trace was given.
10434 if test "${with_trace+set}" = set; then
10435   withval="$with_trace"
10436   cf_with_trace=$withval
10437 else
10438   cf_with_trace=$cf_all_traces
10439 fi;
10440 echo "$as_me:10440: result: $cf_with_trace" >&5
10441 echo "${ECHO_T}$cf_with_trace" >&6
10442
10443 if test "$cf_with_trace" = yes ; then
10444         LIB_TRACING=all
10445         ADA_TRACE=TRUE
10446
10447 cf_fix_cppflags=no
10448 cf_new_cflags=
10449 cf_new_cppflags=
10450 cf_new_extra_cppflags=
10451
10452 for cf_add_cflags in -DTRACE
10453 do
10454 case $cf_fix_cppflags in
10455 no)
10456         case $cf_add_cflags in #(vi
10457         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10458                 case $cf_add_cflags in
10459                 -D*)
10460                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10461
10462                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10463                         && test -z "${cf_tst_cflags}" \
10464                         && cf_fix_cppflags=yes
10465
10466                         if test $cf_fix_cppflags = yes ; then
10467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10468                                 continue
10469                         elif test "${cf_tst_cflags}" = "\"'" ; then
10470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10471                                 continue
10472                         fi
10473                         ;;
10474                 esac
10475                 case "$CPPFLAGS" in
10476                 *$cf_add_cflags) #(vi
10477                         ;;
10478                 *) #(vi
10479                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10480                         ;;
10481                 esac
10482                 ;;
10483         *)
10484                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10485                 ;;
10486         esac
10487         ;;
10488 yes)
10489         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10490
10491         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10492
10493         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10494         && test -z "${cf_tst_cflags}" \
10495         && cf_fix_cppflags=no
10496         ;;
10497 esac
10498 done
10499
10500 if test -n "$cf_new_cflags" ; then
10501
10502         CFLAGS="$CFLAGS $cf_new_cflags"
10503 fi
10504
10505 if test -n "$cf_new_cppflags" ; then
10506
10507         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10508 fi
10509
10510 if test -n "$cf_new_extra_cppflags" ; then
10511
10512         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10513 fi
10514
10515 else
10516         LIB_TRACING=DEBUG
10517         ADA_TRACE=FALSE
10518 fi
10519
10520 ###     Checks for libraries.
10521 echo "$as_me:10521: checking for gettimeofday" >&5
10522 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10523 if test "${ac_cv_func_gettimeofday+set}" = set; then
10524   echo $ECHO_N "(cached) $ECHO_C" >&6
10525 else
10526   cat >conftest.$ac_ext <<_ACEOF
10527 #line 10527 "configure"
10528 #include "confdefs.h"
10529 /* System header to define __stub macros and hopefully few prototypes,
10530     which can conflict with char gettimeofday (); below.  */
10531 #include <assert.h>
10532 /* Override any gcc2 internal prototype to avoid an error.  */
10533 #ifdef __cplusplus
10534 extern "C"
10535 #endif
10536 /* We use char because int might match the return type of a gcc2
10537    builtin and then its argument prototype would still apply.  */
10538 char gettimeofday ();
10539 char (*f) ();
10540
10541 int
10542 main ()
10543 {
10544 /* The GNU C library defines this for functions which it implements
10545     to always fail with ENOSYS.  Some functions are actually named
10546     something starting with __ and the normal name is an alias.  */
10547 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10548 choke me
10549 #else
10550 f = gettimeofday;
10551 #endif
10552
10553   ;
10554   return 0;
10555 }
10556 _ACEOF
10557 rm -f conftest.$ac_objext conftest$ac_exeext
10558 if { (eval echo "$as_me:10558: \"$ac_link\"") >&5
10559   (eval $ac_link) 2>&5
10560   ac_status=$?
10561   echo "$as_me:10561: \$? = $ac_status" >&5
10562   (exit $ac_status); } &&
10563          { ac_try='test -s conftest$ac_exeext'
10564   { (eval echo "$as_me:10564: \"$ac_try\"") >&5
10565   (eval $ac_try) 2>&5
10566   ac_status=$?
10567   echo "$as_me:10567: \$? = $ac_status" >&5
10568   (exit $ac_status); }; }; then
10569   ac_cv_func_gettimeofday=yes
10570 else
10571   echo "$as_me: failed program was:" >&5
10572 cat conftest.$ac_ext >&5
10573 ac_cv_func_gettimeofday=no
10574 fi
10575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10576 fi
10577 echo "$as_me:10577: result: $ac_cv_func_gettimeofday" >&5
10578 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10579 if test $ac_cv_func_gettimeofday = yes; then
10580   cat >>confdefs.h <<\EOF
10581 #define HAVE_GETTIMEOFDAY 1
10582 EOF
10583
10584 else
10585
10586 echo "$as_me:10586: checking for gettimeofday in -lbsd" >&5
10587 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10588 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10589   echo $ECHO_N "(cached) $ECHO_C" >&6
10590 else
10591   ac_check_lib_save_LIBS=$LIBS
10592 LIBS="-lbsd  $LIBS"
10593 cat >conftest.$ac_ext <<_ACEOF
10594 #line 10594 "configure"
10595 #include "confdefs.h"
10596
10597 /* Override any gcc2 internal prototype to avoid an error.  */
10598 #ifdef __cplusplus
10599 extern "C"
10600 #endif
10601 /* We use char because int might match the return type of a gcc2
10602    builtin and then its argument prototype would still apply.  */
10603 char gettimeofday ();
10604 int
10605 main ()
10606 {
10607 gettimeofday ();
10608   ;
10609   return 0;
10610 }
10611 _ACEOF
10612 rm -f conftest.$ac_objext conftest$ac_exeext
10613 if { (eval echo "$as_me:10613: \"$ac_link\"") >&5
10614   (eval $ac_link) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); } &&
10618          { ac_try='test -s conftest$ac_exeext'
10619   { (eval echo "$as_me:10619: \"$ac_try\"") >&5
10620   (eval $ac_try) 2>&5
10621   ac_status=$?
10622   echo "$as_me:10622: \$? = $ac_status" >&5
10623   (exit $ac_status); }; }; then
10624   ac_cv_lib_bsd_gettimeofday=yes
10625 else
10626   echo "$as_me: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628 ac_cv_lib_bsd_gettimeofday=no
10629 fi
10630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10631 LIBS=$ac_check_lib_save_LIBS
10632 fi
10633 echo "$as_me:10633: result: $ac_cv_lib_bsd_gettimeofday" >&5
10634 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10635 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10636   cat >>confdefs.h <<\EOF
10637 #define HAVE_GETTIMEOFDAY 1
10638 EOF
10639
10640         LIBS="$LIBS -lbsd"
10641 fi
10642
10643 fi
10644
10645 echo "$as_me:10645: checking if -lm needed for math functions" >&5
10646 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10647 if test "${cf_cv_need_libm+set}" = set; then
10648   echo $ECHO_N "(cached) $ECHO_C" >&6
10649 else
10650
10651         cat >conftest.$ac_ext <<_ACEOF
10652 #line 10652 "configure"
10653 #include "confdefs.h"
10654
10655         #include <stdio.h>
10656         #include <math.h>
10657
10658 int
10659 main ()
10660 {
10661 double x = rand(); printf("result = %g\n", sin(x))
10662   ;
10663   return 0;
10664 }
10665 _ACEOF
10666 rm -f conftest.$ac_objext conftest$ac_exeext
10667 if { (eval echo "$as_me:10667: \"$ac_link\"") >&5
10668   (eval $ac_link) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); } &&
10672          { ac_try='test -s conftest$ac_exeext'
10673   { (eval echo "$as_me:10673: \"$ac_try\"") >&5
10674   (eval $ac_try) 2>&5
10675   ac_status=$?
10676   echo "$as_me:10676: \$? = $ac_status" >&5
10677   (exit $ac_status); }; }; then
10678   cf_cv_need_libm=no
10679 else
10680   echo "$as_me: failed program was:" >&5
10681 cat conftest.$ac_ext >&5
10682 cf_cv_need_libm=yes
10683 fi
10684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10685 fi
10686 echo "$as_me:10686: result: $cf_cv_need_libm" >&5
10687 echo "${ECHO_T}$cf_cv_need_libm" >&6
10688 if test "$cf_cv_need_libm" = yes
10689 then
10690 MATH_LIB=-lm
10691 fi
10692
10693 ###     Checks for header files.
10694 echo "$as_me:10694: checking for ANSI C header files" >&5
10695 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10696 if test "${ac_cv_header_stdc+set}" = set; then
10697   echo $ECHO_N "(cached) $ECHO_C" >&6
10698 else
10699   cat >conftest.$ac_ext <<_ACEOF
10700 #line 10700 "configure"
10701 #include "confdefs.h"
10702 #include <stdlib.h>
10703 #include <stdarg.h>
10704 #include <string.h>
10705 #include <float.h>
10706
10707 _ACEOF
10708 if { (eval echo "$as_me:10708: \"$ac_cpp conftest.$ac_ext\"") >&5
10709   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10710   ac_status=$?
10711   egrep -v '^ *\+' conftest.er1 >conftest.err
10712   rm -f conftest.er1
10713   cat conftest.err >&5
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit $ac_status); } >/dev/null; then
10716   if test -s conftest.err; then
10717     ac_cpp_err=$ac_c_preproc_warn_flag
10718   else
10719     ac_cpp_err=
10720   fi
10721 else
10722   ac_cpp_err=yes
10723 fi
10724 if test -z "$ac_cpp_err"; then
10725   ac_cv_header_stdc=yes
10726 else
10727   echo "$as_me: failed program was:" >&5
10728   cat conftest.$ac_ext >&5
10729   ac_cv_header_stdc=no
10730 fi
10731 rm -f conftest.err conftest.$ac_ext
10732
10733 if test $ac_cv_header_stdc = yes; then
10734   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10735   cat >conftest.$ac_ext <<_ACEOF
10736 #line 10736 "configure"
10737 #include "confdefs.h"
10738 #include <string.h>
10739
10740 _ACEOF
10741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10742   egrep "memchr" >/dev/null 2>&1; then
10743   :
10744 else
10745   ac_cv_header_stdc=no
10746 fi
10747 rm -f conftest*
10748
10749 fi
10750
10751 if test $ac_cv_header_stdc = yes; then
10752   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10753   cat >conftest.$ac_ext <<_ACEOF
10754 #line 10754 "configure"
10755 #include "confdefs.h"
10756 #include <stdlib.h>
10757
10758 _ACEOF
10759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10760   egrep "free" >/dev/null 2>&1; then
10761   :
10762 else
10763   ac_cv_header_stdc=no
10764 fi
10765 rm -f conftest*
10766
10767 fi
10768
10769 if test $ac_cv_header_stdc = yes; then
10770   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10771   if test "$cross_compiling" = yes; then
10772   :
10773 else
10774   cat >conftest.$ac_ext <<_ACEOF
10775 #line 10775 "configure"
10776 #include "confdefs.h"
10777 #include <ctype.h>
10778 #if ((' ' & 0x0FF) == 0x020)
10779 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10780 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10781 #else
10782 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10783                      || ('j' <= (c) && (c) <= 'r') \
10784                      || ('s' <= (c) && (c) <= 'z'))
10785 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10786 #endif
10787
10788 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10789 int
10790 main ()
10791 {
10792   int i;
10793   for (i = 0; i < 256; i++)
10794     if (XOR (islower (i), ISLOWER (i))
10795         || toupper (i) != TOUPPER (i))
10796       $ac_main_return(2);
10797   $ac_main_return (0);
10798 }
10799 _ACEOF
10800 rm -f conftest$ac_exeext
10801 if { (eval echo "$as_me:10801: \"$ac_link\"") >&5
10802   (eval $ac_link) 2>&5
10803   ac_status=$?
10804   echo "$as_me:10804: \$? = $ac_status" >&5
10805   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10806   { (eval echo "$as_me:10806: \"$ac_try\"") >&5
10807   (eval $ac_try) 2>&5
10808   ac_status=$?
10809   echo "$as_me:10809: \$? = $ac_status" >&5
10810   (exit $ac_status); }; }; then
10811   :
10812 else
10813   echo "$as_me: program exited with status $ac_status" >&5
10814 echo "$as_me: failed program was:" >&5
10815 cat conftest.$ac_ext >&5
10816 ac_cv_header_stdc=no
10817 fi
10818 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10819 fi
10820 fi
10821 fi
10822 echo "$as_me:10822: result: $ac_cv_header_stdc" >&5
10823 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10824 if test $ac_cv_header_stdc = yes; then
10825
10826 cat >>confdefs.h <<\EOF
10827 #define STDC_HEADERS 1
10828 EOF
10829
10830 fi
10831
10832 ac_header_dirent=no
10833 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10834   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10835 echo "$as_me:10835: checking for $ac_hdr that defines DIR" >&5
10836 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10837 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10838   echo $ECHO_N "(cached) $ECHO_C" >&6
10839 else
10840   cat >conftest.$ac_ext <<_ACEOF
10841 #line 10841 "configure"
10842 #include "confdefs.h"
10843 #include <sys/types.h>
10844 #include <$ac_hdr>
10845
10846 int
10847 main ()
10848 {
10849 if ((DIR *) 0)
10850 return 0;
10851   ;
10852   return 0;
10853 }
10854 _ACEOF
10855 rm -f conftest.$ac_objext
10856 if { (eval echo "$as_me:10856: \"$ac_compile\"") >&5
10857   (eval $ac_compile) 2>&5
10858   ac_status=$?
10859   echo "$as_me:10859: \$? = $ac_status" >&5
10860   (exit $ac_status); } &&
10861          { ac_try='test -s conftest.$ac_objext'
10862   { (eval echo "$as_me:10862: \"$ac_try\"") >&5
10863   (eval $ac_try) 2>&5
10864   ac_status=$?
10865   echo "$as_me:10865: \$? = $ac_status" >&5
10866   (exit $ac_status); }; }; then
10867   eval "$as_ac_Header=yes"
10868 else
10869   echo "$as_me: failed program was:" >&5
10870 cat conftest.$ac_ext >&5
10871 eval "$as_ac_Header=no"
10872 fi
10873 rm -f conftest.$ac_objext conftest.$ac_ext
10874 fi
10875 echo "$as_me:10875: result: `eval echo '${'$as_ac_Header'}'`" >&5
10876 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10877 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10878   cat >>confdefs.h <<EOF
10879 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10880 EOF
10881
10882 ac_header_dirent=$ac_hdr; break
10883 fi
10884
10885 done
10886 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10887 if test $ac_header_dirent = dirent.h; then
10888   echo "$as_me:10888: checking for opendir in -ldir" >&5
10889 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10890 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10891   echo $ECHO_N "(cached) $ECHO_C" >&6
10892 else
10893   ac_check_lib_save_LIBS=$LIBS
10894 LIBS="-ldir  $LIBS"
10895 cat >conftest.$ac_ext <<_ACEOF
10896 #line 10896 "configure"
10897 #include "confdefs.h"
10898
10899 /* Override any gcc2 internal prototype to avoid an error.  */
10900 #ifdef __cplusplus
10901 extern "C"
10902 #endif
10903 /* We use char because int might match the return type of a gcc2
10904    builtin and then its argument prototype would still apply.  */
10905 char opendir ();
10906 int
10907 main ()
10908 {
10909 opendir ();
10910   ;
10911   return 0;
10912 }
10913 _ACEOF
10914 rm -f conftest.$ac_objext conftest$ac_exeext
10915 if { (eval echo "$as_me:10915: \"$ac_link\"") >&5
10916   (eval $ac_link) 2>&5
10917   ac_status=$?
10918   echo "$as_me:10918: \$? = $ac_status" >&5
10919   (exit $ac_status); } &&
10920          { ac_try='test -s conftest$ac_exeext'
10921   { (eval echo "$as_me:10921: \"$ac_try\"") >&5
10922   (eval $ac_try) 2>&5
10923   ac_status=$?
10924   echo "$as_me:10924: \$? = $ac_status" >&5
10925   (exit $ac_status); }; }; then
10926   ac_cv_lib_dir_opendir=yes
10927 else
10928   echo "$as_me: failed program was:" >&5
10929 cat conftest.$ac_ext >&5
10930 ac_cv_lib_dir_opendir=no
10931 fi
10932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10933 LIBS=$ac_check_lib_save_LIBS
10934 fi
10935 echo "$as_me:10935: result: $ac_cv_lib_dir_opendir" >&5
10936 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10937 if test $ac_cv_lib_dir_opendir = yes; then
10938   LIBS="$LIBS -ldir"
10939 fi
10940
10941 else
10942   echo "$as_me:10942: checking for opendir in -lx" >&5
10943 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10944 if test "${ac_cv_lib_x_opendir+set}" = set; then
10945   echo $ECHO_N "(cached) $ECHO_C" >&6
10946 else
10947   ac_check_lib_save_LIBS=$LIBS
10948 LIBS="-lx  $LIBS"
10949 cat >conftest.$ac_ext <<_ACEOF
10950 #line 10950 "configure"
10951 #include "confdefs.h"
10952
10953 /* Override any gcc2 internal prototype to avoid an error.  */
10954 #ifdef __cplusplus
10955 extern "C"
10956 #endif
10957 /* We use char because int might match the return type of a gcc2
10958    builtin and then its argument prototype would still apply.  */
10959 char opendir ();
10960 int
10961 main ()
10962 {
10963 opendir ();
10964   ;
10965   return 0;
10966 }
10967 _ACEOF
10968 rm -f conftest.$ac_objext conftest$ac_exeext
10969 if { (eval echo "$as_me:10969: \"$ac_link\"") >&5
10970   (eval $ac_link) 2>&5
10971   ac_status=$?
10972   echo "$as_me:10972: \$? = $ac_status" >&5
10973   (exit $ac_status); } &&
10974          { ac_try='test -s conftest$ac_exeext'
10975   { (eval echo "$as_me:10975: \"$ac_try\"") >&5
10976   (eval $ac_try) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit $ac_status); }; }; then
10980   ac_cv_lib_x_opendir=yes
10981 else
10982   echo "$as_me: failed program was:" >&5
10983 cat conftest.$ac_ext >&5
10984 ac_cv_lib_x_opendir=no
10985 fi
10986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10987 LIBS=$ac_check_lib_save_LIBS
10988 fi
10989 echo "$as_me:10989: result: $ac_cv_lib_x_opendir" >&5
10990 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10991 if test $ac_cv_lib_x_opendir = yes; then
10992   LIBS="$LIBS -lx"
10993 fi
10994
10995 fi
10996
10997 echo "$as_me:10997: checking whether time.h and sys/time.h may both be included" >&5
10998 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10999 if test "${ac_cv_header_time+set}" = set; then
11000   echo $ECHO_N "(cached) $ECHO_C" >&6
11001 else
11002   cat >conftest.$ac_ext <<_ACEOF
11003 #line 11003 "configure"
11004 #include "confdefs.h"
11005 #include <sys/types.h>
11006 #include <sys/time.h>
11007 #include <time.h>
11008
11009 int
11010 main ()
11011 {
11012 if ((struct tm *) 0)
11013 return 0;
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 rm -f conftest.$ac_objext
11019 if { (eval echo "$as_me:11019: \"$ac_compile\"") >&5
11020   (eval $ac_compile) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit $ac_status); } &&
11024          { ac_try='test -s conftest.$ac_objext'
11025   { (eval echo "$as_me:11025: \"$ac_try\"") >&5
11026   (eval $ac_try) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit $ac_status); }; }; then
11030   ac_cv_header_time=yes
11031 else
11032   echo "$as_me: failed program was:" >&5
11033 cat conftest.$ac_ext >&5
11034 ac_cv_header_time=no
11035 fi
11036 rm -f conftest.$ac_objext conftest.$ac_ext
11037 fi
11038 echo "$as_me:11038: result: $ac_cv_header_time" >&5
11039 echo "${ECHO_T}$ac_cv_header_time" >&6
11040 if test $ac_cv_header_time = yes; then
11041
11042 cat >>confdefs.h <<\EOF
11043 #define TIME_WITH_SYS_TIME 1
11044 EOF
11045
11046 fi
11047
11048 echo "$as_me:11048: checking for regular-expression headers" >&5
11049 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11050 if test "${cf_cv_regex+set}" = set; then
11051   echo $ECHO_N "(cached) $ECHO_C" >&6
11052 else
11053
11054 cat >conftest.$ac_ext <<_ACEOF
11055 #line 11055 "configure"
11056 #include "confdefs.h"
11057 #include <sys/types.h>
11058 #include <regex.h>
11059 int
11060 main ()
11061 {
11062
11063         regex_t *p;
11064         int x = regcomp(p, "", 0);
11065         int y = regexec(p, "", 0, 0, 0);
11066         regfree(p);
11067
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 rm -f conftest.$ac_objext conftest$ac_exeext
11073 if { (eval echo "$as_me:11073: \"$ac_link\"") >&5
11074   (eval $ac_link) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit $ac_status); } &&
11078          { ac_try='test -s conftest$ac_exeext'
11079   { (eval echo "$as_me:11079: \"$ac_try\"") >&5
11080   (eval $ac_try) 2>&5
11081   ac_status=$?
11082   echo "$as_me:11082: \$? = $ac_status" >&5
11083   (exit $ac_status); }; }; then
11084   cf_cv_regex="regex.h"
11085 else
11086   echo "$as_me: failed program was:" >&5
11087 cat conftest.$ac_ext >&5
11088
11089         cat >conftest.$ac_ext <<_ACEOF
11090 #line 11090 "configure"
11091 #include "confdefs.h"
11092 #include <regexp.h>
11093 int
11094 main ()
11095 {
11096
11097                 char *p = compile("", "", "", 0);
11098                 int x = step("", "");
11099
11100   ;
11101   return 0;
11102 }
11103 _ACEOF
11104 rm -f conftest.$ac_objext conftest$ac_exeext
11105 if { (eval echo "$as_me:11105: \"$ac_link\"") >&5
11106   (eval $ac_link) 2>&5
11107   ac_status=$?
11108   echo "$as_me:11108: \$? = $ac_status" >&5
11109   (exit $ac_status); } &&
11110          { ac_try='test -s conftest$ac_exeext'
11111   { (eval echo "$as_me:11111: \"$ac_try\"") >&5
11112   (eval $ac_try) 2>&5
11113   ac_status=$?
11114   echo "$as_me:11114: \$? = $ac_status" >&5
11115   (exit $ac_status); }; }; then
11116   cf_cv_regex="regexp.h"
11117 else
11118   echo "$as_me: failed program was:" >&5
11119 cat conftest.$ac_ext >&5
11120
11121                 cf_save_LIBS="$LIBS"
11122                 LIBS="-lgen $LIBS"
11123                 cat >conftest.$ac_ext <<_ACEOF
11124 #line 11124 "configure"
11125 #include "confdefs.h"
11126 #include <regexpr.h>
11127 int
11128 main ()
11129 {
11130
11131                         char *p = compile("", "", "");
11132                         int x = step("", "");
11133
11134   ;
11135   return 0;
11136 }
11137 _ACEOF
11138 rm -f conftest.$ac_objext conftest$ac_exeext
11139 if { (eval echo "$as_me:11139: \"$ac_link\"") >&5
11140   (eval $ac_link) 2>&5
11141   ac_status=$?
11142   echo "$as_me:11142: \$? = $ac_status" >&5
11143   (exit $ac_status); } &&
11144          { ac_try='test -s conftest$ac_exeext'
11145   { (eval echo "$as_me:11145: \"$ac_try\"") >&5
11146   (eval $ac_try) 2>&5
11147   ac_status=$?
11148   echo "$as_me:11148: \$? = $ac_status" >&5
11149   (exit $ac_status); }; }; then
11150   cf_cv_regex="regexpr.h"
11151 else
11152   echo "$as_me: failed program was:" >&5
11153 cat conftest.$ac_ext >&5
11154 LIBS="$cf_save_LIBS"
11155 fi
11156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11157 fi
11158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11159 fi
11160 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11161
11162 fi
11163
11164 echo "$as_me:11164: result: $cf_cv_regex" >&5
11165 echo "${ECHO_T}$cf_cv_regex" >&6
11166 case $cf_cv_regex in
11167         regex.h)   cat >>confdefs.h <<\EOF
11168 #define HAVE_REGEX_H_FUNCS 1
11169 EOF
11170  ;;
11171         regexp.h)  cat >>confdefs.h <<\EOF
11172 #define HAVE_REGEXP_H_FUNCS 1
11173 EOF
11174  ;;
11175         regexpr.h) cat >>confdefs.h <<\EOF
11176 #define HAVE_REGEXPR_H_FUNCS 1
11177 EOF
11178  ;;
11179 esac
11180
11181 for ac_header in \
11182 fcntl.h \
11183 getopt.h \
11184 limits.h \
11185 locale.h \
11186 poll.h \
11187 sys/bsdtypes.h \
11188 sys/ioctl.h \
11189 sys/param.h \
11190 sys/poll.h \
11191 sys/select.h \
11192 sys/time.h \
11193 sys/times.h \
11194 ttyent.h \
11195 unistd.h \
11196 wctype.h \
11197
11198 do
11199 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11200 echo "$as_me:11200: checking for $ac_header" >&5
11201 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11203   echo $ECHO_N "(cached) $ECHO_C" >&6
11204 else
11205   cat >conftest.$ac_ext <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11208 #include <$ac_header>
11209 _ACEOF
11210 if { (eval echo "$as_me:11210: \"$ac_cpp conftest.$ac_ext\"") >&5
11211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11212   ac_status=$?
11213   egrep -v '^ *\+' conftest.er1 >conftest.err
11214   rm -f conftest.er1
11215   cat conftest.err >&5
11216   echo "$as_me:11216: \$? = $ac_status" >&5
11217   (exit $ac_status); } >/dev/null; then
11218   if test -s conftest.err; then
11219     ac_cpp_err=$ac_c_preproc_warn_flag
11220   else
11221     ac_cpp_err=
11222   fi
11223 else
11224   ac_cpp_err=yes
11225 fi
11226 if test -z "$ac_cpp_err"; then
11227   eval "$as_ac_Header=yes"
11228 else
11229   echo "$as_me: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   eval "$as_ac_Header=no"
11232 fi
11233 rm -f conftest.err conftest.$ac_ext
11234 fi
11235 echo "$as_me:11235: result: `eval echo '${'$as_ac_Header'}'`" >&5
11236 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11238   cat >>confdefs.h <<EOF
11239 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11240 EOF
11241
11242 fi
11243 done
11244
11245 # check for ISC (this may also define _POSIX_SOURCE)
11246 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11247 if test "$ISC" = yes ; then
11248
11249 echo "$as_me:11249: checking for main in -lcposix" >&5
11250 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11251 if test "${ac_cv_lib_cposix_main+set}" = set; then
11252   echo $ECHO_N "(cached) $ECHO_C" >&6
11253 else
11254   ac_check_lib_save_LIBS=$LIBS
11255 LIBS="-lcposix  $LIBS"
11256 cat >conftest.$ac_ext <<_ACEOF
11257 #line 11257 "configure"
11258 #include "confdefs.h"
11259
11260 int
11261 main ()
11262 {
11263 main ();
11264   ;
11265   return 0;
11266 }
11267 _ACEOF
11268 rm -f conftest.$ac_objext conftest$ac_exeext
11269 if { (eval echo "$as_me:11269: \"$ac_link\"") >&5
11270   (eval $ac_link) 2>&5
11271   ac_status=$?
11272   echo "$as_me:11272: \$? = $ac_status" >&5
11273   (exit $ac_status); } &&
11274          { ac_try='test -s conftest$ac_exeext'
11275   { (eval echo "$as_me:11275: \"$ac_try\"") >&5
11276   (eval $ac_try) 2>&5
11277   ac_status=$?
11278   echo "$as_me:11278: \$? = $ac_status" >&5
11279   (exit $ac_status); }; }; then
11280   ac_cv_lib_cposix_main=yes
11281 else
11282   echo "$as_me: failed program was:" >&5
11283 cat conftest.$ac_ext >&5
11284 ac_cv_lib_cposix_main=no
11285 fi
11286 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11287 LIBS=$ac_check_lib_save_LIBS
11288 fi
11289 echo "$as_me:11289: result: $ac_cv_lib_cposix_main" >&5
11290 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11291 if test $ac_cv_lib_cposix_main = yes; then
11292   cat >>confdefs.h <<EOF
11293 #define HAVE_LIBCPOSIX 1
11294 EOF
11295
11296   LIBS="-lcposix $LIBS"
11297
11298 fi
11299
11300         echo "$as_me:11300: checking for bzero in -linet" >&5
11301 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11302 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11303   echo $ECHO_N "(cached) $ECHO_C" >&6
11304 else
11305   ac_check_lib_save_LIBS=$LIBS
11306 LIBS="-linet  $LIBS"
11307 cat >conftest.$ac_ext <<_ACEOF
11308 #line 11308 "configure"
11309 #include "confdefs.h"
11310
11311 /* Override any gcc2 internal prototype to avoid an error.  */
11312 #ifdef __cplusplus
11313 extern "C"
11314 #endif
11315 /* We use char because int might match the return type of a gcc2
11316    builtin and then its argument prototype would still apply.  */
11317 char bzero ();
11318 int
11319 main ()
11320 {
11321 bzero ();
11322   ;
11323   return 0;
11324 }
11325 _ACEOF
11326 rm -f conftest.$ac_objext conftest$ac_exeext
11327 if { (eval echo "$as_me:11327: \"$ac_link\"") >&5
11328   (eval $ac_link) 2>&5
11329   ac_status=$?
11330   echo "$as_me:11330: \$? = $ac_status" >&5
11331   (exit $ac_status); } &&
11332          { ac_try='test -s conftest$ac_exeext'
11333   { (eval echo "$as_me:11333: \"$ac_try\"") >&5
11334   (eval $ac_try) 2>&5
11335   ac_status=$?
11336   echo "$as_me:11336: \$? = $ac_status" >&5
11337   (exit $ac_status); }; }; then
11338   ac_cv_lib_inet_bzero=yes
11339 else
11340   echo "$as_me: failed program was:" >&5
11341 cat conftest.$ac_ext >&5
11342 ac_cv_lib_inet_bzero=no
11343 fi
11344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11345 LIBS=$ac_check_lib_save_LIBS
11346 fi
11347 echo "$as_me:11347: result: $ac_cv_lib_inet_bzero" >&5
11348 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11349 if test $ac_cv_lib_inet_bzero = yes; then
11350   LIBS="$LIBS -linet"
11351 fi
11352 fi
11353
11354 echo "$as_me:11354: checking if sys/time.h works with sys/select.h" >&5
11355 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11356 if test "${cf_cv_sys_time_select+set}" = set; then
11357   echo $ECHO_N "(cached) $ECHO_C" >&6
11358 else
11359
11360 cat >conftest.$ac_ext <<_ACEOF
11361 #line 11361 "configure"
11362 #include "confdefs.h"
11363
11364 #include <sys/types.h>
11365 #ifdef HAVE_SYS_TIME_H
11366 #include <sys/time.h>
11367 #endif
11368 #ifdef HAVE_SYS_SELECT_H
11369 #include <sys/select.h>
11370 #endif
11371
11372 int
11373 main ()
11374 {
11375
11376   ;
11377   return 0;
11378 }
11379 _ACEOF
11380 rm -f conftest.$ac_objext
11381 if { (eval echo "$as_me:11381: \"$ac_compile\"") >&5
11382   (eval $ac_compile) 2>&5
11383   ac_status=$?
11384   echo "$as_me:11384: \$? = $ac_status" >&5
11385   (exit $ac_status); } &&
11386          { ac_try='test -s conftest.$ac_objext'
11387   { (eval echo "$as_me:11387: \"$ac_try\"") >&5
11388   (eval $ac_try) 2>&5
11389   ac_status=$?
11390   echo "$as_me:11390: \$? = $ac_status" >&5
11391   (exit $ac_status); }; }; then
11392   cf_cv_sys_time_select=yes
11393 else
11394   echo "$as_me: failed program was:" >&5
11395 cat conftest.$ac_ext >&5
11396 cf_cv_sys_time_select=no
11397 fi
11398 rm -f conftest.$ac_objext conftest.$ac_ext
11399
11400 fi
11401
11402 echo "$as_me:11402: result: $cf_cv_sys_time_select" >&5
11403 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11404 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11405 #define HAVE_SYS_TIME_SELECT 1
11406 EOF
11407
11408 ###     checks for compiler characteristics
11409 ac_ext=c
11410 ac_cpp='$CPP $CPPFLAGS'
11411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11414 ac_main_return=return
11415
11416 echo "$as_me:11416: checking for $CC option to accept ANSI C" >&5
11417 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11418 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11419   echo $ECHO_N "(cached) $ECHO_C" >&6
11420 else
11421   ac_cv_prog_cc_stdc=no
11422 ac_save_CC=$CC
11423 cat >conftest.$ac_ext <<_ACEOF
11424 #line 11424 "configure"
11425 #include "confdefs.h"
11426 #include <stdarg.h>
11427 #include <stdio.h>
11428 #include <sys/types.h>
11429 #include <sys/stat.h>
11430 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11431 struct buf { int x; };
11432 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11433 static char *e (p, i)
11434      char **p;
11435      int i;
11436 {
11437   return p[i];
11438 }
11439 static char *f (char * (*g) (char **, int), char **p, ...)
11440 {
11441   char *s;
11442   va_list v;
11443   va_start (v,p);
11444   s = g (p, va_arg (v,int));
11445   va_end (v);
11446   return s;
11447 }
11448 int test (int i, double x);
11449 struct s1 {int (*f) (int a);};
11450 struct s2 {int (*f) (double a);};
11451 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11452 int argc;
11453 char **argv;
11454 int
11455 main ()
11456 {
11457 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11458   ;
11459   return 0;
11460 }
11461 _ACEOF
11462 # Don't try gcc -ansi; that turns off useful extensions and
11463 # breaks some systems' header files.
11464 # AIX                   -qlanglvl=ansi
11465 # Ultrix and OSF/1      -std1
11466 # HP-UX 10.20 and later -Ae
11467 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11468 # SVR4                  -Xc -D__EXTENSIONS__
11469 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11470 do
11471   CC="$ac_save_CC $ac_arg"
11472   rm -f conftest.$ac_objext
11473 if { (eval echo "$as_me:11473: \"$ac_compile\"") >&5
11474   (eval $ac_compile) 2>&5
11475   ac_status=$?
11476   echo "$as_me:11476: \$? = $ac_status" >&5
11477   (exit $ac_status); } &&
11478          { ac_try='test -s conftest.$ac_objext'
11479   { (eval echo "$as_me:11479: \"$ac_try\"") >&5
11480   (eval $ac_try) 2>&5
11481   ac_status=$?
11482   echo "$as_me:11482: \$? = $ac_status" >&5
11483   (exit $ac_status); }; }; then
11484   ac_cv_prog_cc_stdc=$ac_arg
11485 break
11486 else
11487   echo "$as_me: failed program was:" >&5
11488 cat conftest.$ac_ext >&5
11489 fi
11490 rm -f conftest.$ac_objext
11491 done
11492 rm -f conftest.$ac_ext conftest.$ac_objext
11493 CC=$ac_save_CC
11494
11495 fi
11496
11497 case "x$ac_cv_prog_cc_stdc" in
11498   x|xno)
11499     echo "$as_me:11499: result: none needed" >&5
11500 echo "${ECHO_T}none needed" >&6 ;;
11501   *)
11502     echo "$as_me:11502: result: $ac_cv_prog_cc_stdc" >&5
11503 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11504     CC="$CC $ac_cv_prog_cc_stdc" ;;
11505 esac
11506
11507 echo "$as_me:11507: checking for an ANSI C-conforming const" >&5
11508 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11509 if test "${ac_cv_c_const+set}" = set; then
11510   echo $ECHO_N "(cached) $ECHO_C" >&6
11511 else
11512   cat >conftest.$ac_ext <<_ACEOF
11513 #line 11513 "configure"
11514 #include "confdefs.h"
11515
11516 int
11517 main ()
11518 {
11519 /* FIXME: Include the comments suggested by Paul. */
11520 #ifndef __cplusplus
11521   /* Ultrix mips cc rejects this.  */
11522   typedef int charset[2];
11523   const charset x;
11524   /* SunOS 4.1.1 cc rejects this.  */
11525   char const *const *ccp;
11526   char **p;
11527   /* NEC SVR4.0.2 mips cc rejects this.  */
11528   struct point {int x, y;};
11529   static struct point const zero = {0,0};
11530   /* AIX XL C 1.02.0.0 rejects this.
11531      It does not let you subtract one const X* pointer from another in
11532      an arm of an if-expression whose if-part is not a constant
11533      expression */
11534   const char *g = "string";
11535   ccp = &g + (g ? g-g : 0);
11536   /* HPUX 7.0 cc rejects these. */
11537   ++ccp;
11538   p = (char**) ccp;
11539   ccp = (char const *const *) p;
11540   { /* SCO 3.2v4 cc rejects this.  */
11541     char *t;
11542     char const *s = 0 ? (char *) 0 : (char const *) 0;
11543
11544     *t++ = 0;
11545   }
11546   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11547     int x[] = {25, 17};
11548     const int *foo = &x[0];
11549     ++foo;
11550   }
11551   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11552     typedef const int *iptr;
11553     iptr p = 0;
11554     ++p;
11555   }
11556   { /* AIX XL C 1.02.0.0 rejects this saying
11557        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11558     struct s { int j; const int *ap[3]; };
11559     struct s *b; b->j = 5;
11560   }
11561   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11562     const int foo = 10;
11563   }
11564 #endif
11565
11566   ;
11567   return 0;
11568 }
11569 _ACEOF
11570 rm -f conftest.$ac_objext
11571 if { (eval echo "$as_me:11571: \"$ac_compile\"") >&5
11572   (eval $ac_compile) 2>&5
11573   ac_status=$?
11574   echo "$as_me:11574: \$? = $ac_status" >&5
11575   (exit $ac_status); } &&
11576          { ac_try='test -s conftest.$ac_objext'
11577   { (eval echo "$as_me:11577: \"$ac_try\"") >&5
11578   (eval $ac_try) 2>&5
11579   ac_status=$?
11580   echo "$as_me:11580: \$? = $ac_status" >&5
11581   (exit $ac_status); }; }; then
11582   ac_cv_c_const=yes
11583 else
11584   echo "$as_me: failed program was:" >&5
11585 cat conftest.$ac_ext >&5
11586 ac_cv_c_const=no
11587 fi
11588 rm -f conftest.$ac_objext conftest.$ac_ext
11589 fi
11590 echo "$as_me:11590: result: $ac_cv_c_const" >&5
11591 echo "${ECHO_T}$ac_cv_c_const" >&6
11592 if test $ac_cv_c_const = no; then
11593
11594 cat >>confdefs.h <<\EOF
11595 #define const
11596 EOF
11597
11598 fi
11599
11600 echo "$as_me:11600: checking for inline" >&5
11601 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11602 if test "${ac_cv_c_inline+set}" = set; then
11603   echo $ECHO_N "(cached) $ECHO_C" >&6
11604 else
11605   ac_cv_c_inline=no
11606 for ac_kw in inline __inline__ __inline; do
11607   cat >conftest.$ac_ext <<_ACEOF
11608 #line 11608 "configure"
11609 #include "confdefs.h"
11610 #ifndef __cplusplus
11611 static $ac_kw int static_foo () {return 0; }
11612 $ac_kw int foo () {return 0; }
11613 #endif
11614
11615 _ACEOF
11616 rm -f conftest.$ac_objext
11617 if { (eval echo "$as_me:11617: \"$ac_compile\"") >&5
11618   (eval $ac_compile) 2>&5
11619   ac_status=$?
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit $ac_status); } &&
11622          { ac_try='test -s conftest.$ac_objext'
11623   { (eval echo "$as_me:11623: \"$ac_try\"") >&5
11624   (eval $ac_try) 2>&5
11625   ac_status=$?
11626   echo "$as_me:11626: \$? = $ac_status" >&5
11627   (exit $ac_status); }; }; then
11628   ac_cv_c_inline=$ac_kw; break
11629 else
11630   echo "$as_me: failed program was:" >&5
11631 cat conftest.$ac_ext >&5
11632 fi
11633 rm -f conftest.$ac_objext conftest.$ac_ext
11634 done
11635
11636 fi
11637 echo "$as_me:11637: result: $ac_cv_c_inline" >&5
11638 echo "${ECHO_T}$ac_cv_c_inline" >&6
11639 case $ac_cv_c_inline in
11640   inline | yes) ;;
11641   no)
11642 cat >>confdefs.h <<\EOF
11643 #define inline
11644 EOF
11645  ;;
11646   *)  cat >>confdefs.h <<EOF
11647 #define inline $ac_cv_c_inline
11648 EOF
11649  ;;
11650 esac
11651
11652 NCURSES_INLINE=
11653 if test "$ac_cv_c_inline" != no ; then
11654   NCURSES_INLINE=inline
11655   if test "$INTEL_COMPILER" = yes
11656   then
11657     :
11658   elif test "$GCC" = yes
11659   then
11660     echo "$as_me:11660: checking if gcc supports options to tune inlining" >&5
11661 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11662 if test "${cf_cv_gcc_inline+set}" = set; then
11663   echo $ECHO_N "(cached) $ECHO_C" >&6
11664 else
11665
11666       cf_save_CFLAGS=$CFLAGS
11667       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11668       cat >conftest.$ac_ext <<_ACEOF
11669 #line 11669 "configure"
11670 #include "confdefs.h"
11671 inline int foo(void) { return 1; }
11672 int
11673 main ()
11674 {
11675 ${cf_cv_main_return:-return} foo()
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f conftest.$ac_objext
11681 if { (eval echo "$as_me:11681: \"$ac_compile\"") >&5
11682   (eval $ac_compile) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); } &&
11686          { ac_try='test -s conftest.$ac_objext'
11687   { (eval echo "$as_me:11687: \"$ac_try\"") >&5
11688   (eval $ac_try) 2>&5
11689   ac_status=$?
11690   echo "$as_me:11690: \$? = $ac_status" >&5
11691   (exit $ac_status); }; }; then
11692   cf_cv_gcc_inline=yes
11693 else
11694   echo "$as_me: failed program was:" >&5
11695 cat conftest.$ac_ext >&5
11696 cf_cv_gcc_inline=no
11697 fi
11698 rm -f conftest.$ac_objext conftest.$ac_ext
11699       CFLAGS=$cf_save_CFLAGS
11700
11701 fi
11702 echo "$as_me:11702: result: $cf_cv_gcc_inline" >&5
11703 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11704     if test "$cf_cv_gcc_inline" = yes ; then
11705
11706 cf_fix_cppflags=no
11707 cf_new_cflags=
11708 cf_new_cppflags=
11709 cf_new_extra_cppflags=
11710
11711 for cf_add_cflags in --param max-inline-insns-single=1200
11712 do
11713 case $cf_fix_cppflags in
11714 no)
11715         case $cf_add_cflags in #(vi
11716         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11717                 case $cf_add_cflags in
11718                 -D*)
11719                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11720
11721                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11722                         && test -z "${cf_tst_cflags}" \
11723                         && cf_fix_cppflags=yes
11724
11725                         if test $cf_fix_cppflags = yes ; then
11726                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11727                                 continue
11728                         elif test "${cf_tst_cflags}" = "\"'" ; then
11729                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11730                                 continue
11731                         fi
11732                         ;;
11733                 esac
11734                 case "$CPPFLAGS" in
11735                 *$cf_add_cflags) #(vi
11736                         ;;
11737                 *) #(vi
11738                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11739                         ;;
11740                 esac
11741                 ;;
11742         *)
11743                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11744                 ;;
11745         esac
11746         ;;
11747 yes)
11748         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11749
11750         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11751
11752         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11753         && test -z "${cf_tst_cflags}" \
11754         && cf_fix_cppflags=no
11755         ;;
11756 esac
11757 done
11758
11759 if test -n "$cf_new_cflags" ; then
11760
11761         CFLAGS="$CFLAGS $cf_new_cflags"
11762 fi
11763
11764 if test -n "$cf_new_cppflags" ; then
11765
11766         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11767 fi
11768
11769 if test -n "$cf_new_extra_cppflags" ; then
11770
11771         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11772 fi
11773
11774     fi
11775   fi
11776 fi
11777
11778 echo "$as_me:11778: checking for signal global datatype" >&5
11779 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11780 if test "${cf_cv_sig_atomic_t+set}" = set; then
11781   echo $ECHO_N "(cached) $ECHO_C" >&6
11782 else
11783
11784         for cf_type in \
11785                 "volatile sig_atomic_t" \
11786                 "sig_atomic_t" \
11787                 "int"
11788         do
11789         cat >conftest.$ac_ext <<_ACEOF
11790 #line 11790 "configure"
11791 #include "confdefs.h"
11792
11793 #include <sys/types.h>
11794 #include <signal.h>
11795 #include <stdio.h>
11796
11797 extern $cf_type x;
11798 $cf_type x;
11799 static void handler(int sig)
11800 {
11801         x = 5;
11802 }
11803 int
11804 main ()
11805 {
11806 signal(SIGINT, handler);
11807                  x = 1
11808   ;
11809   return 0;
11810 }
11811 _ACEOF
11812 rm -f conftest.$ac_objext
11813 if { (eval echo "$as_me:11813: \"$ac_compile\"") >&5
11814   (eval $ac_compile) 2>&5
11815   ac_status=$?
11816   echo "$as_me:11816: \$? = $ac_status" >&5
11817   (exit $ac_status); } &&
11818          { ac_try='test -s conftest.$ac_objext'
11819   { (eval echo "$as_me:11819: \"$ac_try\"") >&5
11820   (eval $ac_try) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit $ac_status); }; }; then
11824   cf_cv_sig_atomic_t=$cf_type
11825 else
11826   echo "$as_me: failed program was:" >&5
11827 cat conftest.$ac_ext >&5
11828 cf_cv_sig_atomic_t=no
11829 fi
11830 rm -f conftest.$ac_objext conftest.$ac_ext
11831                 test "$cf_cv_sig_atomic_t" != no && break
11832         done
11833
11834 fi
11835
11836 echo "$as_me:11836: result: $cf_cv_sig_atomic_t" >&5
11837 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11838 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11839 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11840 EOF
11841
11842 if test $NCURSES_CHTYPE = auto ; then
11843
11844 echo "$as_me:11844: checking for type of chtype" >&5
11845 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11846 if test "${cf_cv_typeof_chtype+set}" = set; then
11847   echo $ECHO_N "(cached) $ECHO_C" >&6
11848 else
11849
11850                 if test "$cross_compiling" = yes; then
11851   cf_cv_typeof_chtype=long
11852 else
11853   cat >conftest.$ac_ext <<_ACEOF
11854 #line 11854 "configure"
11855 #include "confdefs.h"
11856
11857 #define WANT_BITS 31
11858 #include <stdio.h>
11859 int main()
11860 {
11861         FILE *fp = fopen("cf_test.out", "w");
11862         if (fp != 0) {
11863                 char *result = "long";
11864                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11865                         int n;
11866                         unsigned int x, y;
11867                         for (n = 0; n < WANT_BITS; n++) {
11868                                 x = (1 << n);
11869                                 y = (x >> n);
11870                                 if (y != 1 || x == 0) {
11871                                         x = 0;
11872                                         break;
11873                                 }
11874                         }
11875                         /*
11876                          * If x is nonzero, an int is big enough for the bits
11877                          * that we want.
11878                          */
11879                         result = (x != 0) ? "int" : "long";
11880                 }
11881                 fputs(result, fp);
11882                 fclose(fp);
11883         }
11884         ${cf_cv_main_return:-return}(0);
11885 }
11886
11887 _ACEOF
11888 rm -f conftest$ac_exeext
11889 if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890   (eval $ac_link) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11894   { (eval echo "$as_me:11894: \"$ac_try\"") >&5
11895   (eval $ac_try) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); }; }; then
11899   cf_cv_typeof_chtype=`cat cf_test.out`
11900 else
11901   echo "$as_me: program exited with status $ac_status" >&5
11902 echo "$as_me: failed program was:" >&5
11903 cat conftest.$ac_ext >&5
11904 cf_cv_typeof_chtype=long
11905 fi
11906 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11907 fi
11908                 rm -f cf_test.out
11909
11910 fi
11911
11912 echo "$as_me:11912: result: $cf_cv_typeof_chtype" >&5
11913 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11914
11915 cat >>confdefs.h <<EOF
11916 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11917 EOF
11918
11919 else
11920         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11921 fi
11922 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11923
11924 echo "$as_me:11924: checking if unsigned literals are legal" >&5
11925 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11926 if test "${cf_cv_unsigned_literals+set}" = set; then
11927   echo $ECHO_N "(cached) $ECHO_C" >&6
11928 else
11929
11930         cat >conftest.$ac_ext <<_ACEOF
11931 #line 11931 "configure"
11932 #include "confdefs.h"
11933
11934 int
11935 main ()
11936 {
11937 long x = 1L + 1UL + 1U + 1
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>&5
11945   ac_status=$?
11946   echo "$as_me:11946: \$? = $ac_status" >&5
11947   (exit $ac_status); } &&
11948          { ac_try='test -s conftest.$ac_objext'
11949   { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950   (eval $ac_try) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); }; }; then
11954   cf_cv_unsigned_literals=yes
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 cf_cv_unsigned_literals=no
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961
11962 fi
11963
11964 echo "$as_me:11964: result: $cf_cv_unsigned_literals" >&5
11965 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11966
11967 cf_cv_1UL="1"
11968 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11969 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11970
11971 if test $NCURSES_MMASK_T = auto ; then
11972         cf_cv_typeof_mmask_t=long
11973 else
11974         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11975 fi
11976 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11977
11978 ###     Checks for external-data
11979
11980 echo "$as_me:11980: checking if external errno is declared" >&5
11981 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11982 if test "${cf_cv_dcl_errno+set}" = set; then
11983   echo $ECHO_N "(cached) $ECHO_C" >&6
11984 else
11985
11986     cat >conftest.$ac_ext <<_ACEOF
11987 #line 11987 "configure"
11988 #include "confdefs.h"
11989
11990 #ifdef HAVE_STDLIB_H
11991 #include <stdlib.h>
11992 #endif
11993 #include <stdio.h>
11994 #include <sys/types.h>
11995 #include <errno.h>
11996 int
11997 main ()
11998 {
11999 long x = (long) errno
12000   ;
12001   return 0;
12002 }
12003 _ACEOF
12004 rm -f conftest.$ac_objext
12005 if { (eval echo "$as_me:12005: \"$ac_compile\"") >&5
12006   (eval $ac_compile) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); } &&
12010          { ac_try='test -s conftest.$ac_objext'
12011   { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012   (eval $ac_try) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); }; }; then
12016   cf_cv_dcl_errno=yes
12017 else
12018   echo "$as_me: failed program was:" >&5
12019 cat conftest.$ac_ext >&5
12020 cf_cv_dcl_errno=no
12021 fi
12022 rm -f conftest.$ac_objext conftest.$ac_ext
12023
12024 fi
12025 echo "$as_me:12025: result: $cf_cv_dcl_errno" >&5
12026 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12027
12028 if test "$cf_cv_dcl_errno" = no ; then
12029
12030 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12031
12032     cat >>confdefs.h <<EOF
12033 #define $cf_result 1
12034 EOF
12035
12036 fi
12037
12038 # It's possible (for near-UNIX clones) that the data doesn't exist
12039
12040 echo "$as_me:12040: checking if external errno exists" >&5
12041 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12042 if test "${cf_cv_have_errno+set}" = set; then
12043   echo $ECHO_N "(cached) $ECHO_C" >&6
12044 else
12045
12046     cat >conftest.$ac_ext <<_ACEOF
12047 #line 12047 "configure"
12048 #include "confdefs.h"
12049
12050 #undef errno
12051 extern int errno;
12052
12053 int
12054 main ()
12055 {
12056 errno = 2
12057   ;
12058   return 0;
12059 }
12060 _ACEOF
12061 rm -f conftest.$ac_objext conftest$ac_exeext
12062 if { (eval echo "$as_me:12062: \"$ac_link\"") >&5
12063   (eval $ac_link) 2>&5
12064   ac_status=$?
12065   echo "$as_me:12065: \$? = $ac_status" >&5
12066   (exit $ac_status); } &&
12067          { ac_try='test -s conftest$ac_exeext'
12068   { (eval echo "$as_me:12068: \"$ac_try\"") >&5
12069   (eval $ac_try) 2>&5
12070   ac_status=$?
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit $ac_status); }; }; then
12073   cf_cv_have_errno=yes
12074 else
12075   echo "$as_me: failed program was:" >&5
12076 cat conftest.$ac_ext >&5
12077 cf_cv_have_errno=no
12078 fi
12079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12080
12081 fi
12082 echo "$as_me:12082: result: $cf_cv_have_errno" >&5
12083 echo "${ECHO_T}$cf_cv_have_errno" >&6
12084
12085 if test "$cf_cv_have_errno" = yes ; then
12086
12087 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12088
12089     cat >>confdefs.h <<EOF
12090 #define $cf_result 1
12091 EOF
12092
12093 fi
12094
12095 echo "$as_me:12095: checking if data-only library module links" >&5
12096 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12097 if test "${cf_cv_link_dataonly+set}" = set; then
12098   echo $ECHO_N "(cached) $ECHO_C" >&6
12099 else
12100
12101         rm -f conftest.a
12102         cat >conftest.$ac_ext <<EOF
12103 #line 12103 "configure"
12104 int     testdata[3] = { 123, 456, 789 };
12105 EOF
12106         if { (eval echo "$as_me:12106: \"$ac_compile\"") >&5
12107   (eval $ac_compile) 2>&5
12108   ac_status=$?
12109   echo "$as_me:12109: \$? = $ac_status" >&5
12110   (exit $ac_status); } ; then
12111                 mv conftest.o data.o && \
12112                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12113         fi
12114         rm -f conftest.$ac_ext data.o
12115         cat >conftest.$ac_ext <<EOF
12116 #line 12116 "configure"
12117 int     testfunc()
12118 {
12119 #if defined(NeXT)
12120         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12121 #else
12122         extern int testdata[3];
12123         return testdata[0] == 123
12124            &&  testdata[1] == 456
12125            &&  testdata[2] == 789;
12126 #endif
12127 }
12128 EOF
12129         if { (eval echo "$as_me:12129: \"$ac_compile\"") >&5
12130   (eval $ac_compile) 2>&5
12131   ac_status=$?
12132   echo "$as_me:12132: \$? = $ac_status" >&5
12133   (exit $ac_status); }; then
12134                 mv conftest.o func.o && \
12135                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12136         fi
12137         rm -f conftest.$ac_ext func.o
12138         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12139         cf_saveLIBS="$LIBS"
12140         LIBS="conftest.a $LIBS"
12141         if test "$cross_compiling" = yes; then
12142   cf_cv_link_dataonly=unknown
12143 else
12144   cat >conftest.$ac_ext <<_ACEOF
12145 #line 12145 "configure"
12146 #include "confdefs.h"
12147
12148         int main()
12149         {
12150                 extern int testfunc();
12151                 ${cf_cv_main_return:-return} (!testfunc());
12152         }
12153
12154 _ACEOF
12155 rm -f conftest$ac_exeext
12156 if { (eval echo "$as_me:12156: \"$ac_link\"") >&5
12157   (eval $ac_link) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12161   { (eval echo "$as_me:12161: \"$ac_try\"") >&5
12162   (eval $ac_try) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit $ac_status); }; }; then
12166   cf_cv_link_dataonly=yes
12167 else
12168   echo "$as_me: program exited with status $ac_status" >&5
12169 echo "$as_me: failed program was:" >&5
12170 cat conftest.$ac_ext >&5
12171 cf_cv_link_dataonly=no
12172 fi
12173 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12174 fi
12175         LIBS="$cf_saveLIBS"
12176
12177 fi
12178
12179 echo "$as_me:12179: result: $cf_cv_link_dataonly" >&5
12180 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12181
12182 if test "$cf_cv_link_dataonly" = no ; then
12183         cat >>confdefs.h <<\EOF
12184 #define BROKEN_LINKER 1
12185 EOF
12186
12187         BROKEN_LINKER=1
12188 fi
12189
12190 ###     Checks for library functions.
12191
12192 for ac_func in \
12193 getcwd \
12194 getegid \
12195 geteuid \
12196 getttynam \
12197 issetugid \
12198 poll \
12199 remove \
12200 select \
12201 setbuf \
12202 setbuffer \
12203 setvbuf \
12204 sigaction \
12205 sigvec \
12206 strdup \
12207 strstr \
12208 tcgetpgrp \
12209 times \
12210 vsnprintf \
12211
12212 do
12213 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12214 echo "$as_me:12214: checking for $ac_func" >&5
12215 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12216 if eval "test \"\${$as_ac_var+set}\" = set"; then
12217   echo $ECHO_N "(cached) $ECHO_C" >&6
12218 else
12219   cat >conftest.$ac_ext <<_ACEOF
12220 #line 12220 "configure"
12221 #include "confdefs.h"
12222 /* System header to define __stub macros and hopefully few prototypes,
12223     which can conflict with char $ac_func (); below.  */
12224 #include <assert.h>
12225 /* Override any gcc2 internal prototype to avoid an error.  */
12226 #ifdef __cplusplus
12227 extern "C"
12228 #endif
12229 /* We use char because int might match the return type of a gcc2
12230    builtin and then its argument prototype would still apply.  */
12231 char $ac_func ();
12232 char (*f) ();
12233
12234 int
12235 main ()
12236 {
12237 /* The GNU C library defines this for functions which it implements
12238     to always fail with ENOSYS.  Some functions are actually named
12239     something starting with __ and the normal name is an alias.  */
12240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12241 choke me
12242 #else
12243 f = $ac_func;
12244 #endif
12245
12246   ;
12247   return 0;
12248 }
12249 _ACEOF
12250 rm -f conftest.$ac_objext conftest$ac_exeext
12251 if { (eval echo "$as_me:12251: \"$ac_link\"") >&5
12252   (eval $ac_link) 2>&5
12253   ac_status=$?
12254   echo "$as_me:12254: \$? = $ac_status" >&5
12255   (exit $ac_status); } &&
12256          { ac_try='test -s conftest$ac_exeext'
12257   { (eval echo "$as_me:12257: \"$ac_try\"") >&5
12258   (eval $ac_try) 2>&5
12259   ac_status=$?
12260   echo "$as_me:12260: \$? = $ac_status" >&5
12261   (exit $ac_status); }; }; then
12262   eval "$as_ac_var=yes"
12263 else
12264   echo "$as_me: failed program was:" >&5
12265 cat conftest.$ac_ext >&5
12266 eval "$as_ac_var=no"
12267 fi
12268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12269 fi
12270 echo "$as_me:12270: result: `eval echo '${'$as_ac_var'}'`" >&5
12271 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12272 if test `eval echo '${'$as_ac_var'}'` = yes; then
12273   cat >>confdefs.h <<EOF
12274 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12275 EOF
12276
12277 fi
12278 done
12279
12280 if test "$with_getcap" = "yes" ; then
12281
12282 echo "$as_me:12282: checking for terminal-capability database functions" >&5
12283 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12284 if test "${cf_cv_cgetent+set}" = set; then
12285   echo $ECHO_N "(cached) $ECHO_C" >&6
12286 else
12287
12288 cat >conftest.$ac_ext <<_ACEOF
12289 #line 12289 "configure"
12290 #include "confdefs.h"
12291
12292 #include <stdlib.h>
12293 int
12294 main ()
12295 {
12296
12297         char temp[128];
12298         char *buf = temp;
12299         char *db_array = temp;
12300         cgetent(&buf, /* int *, */ &db_array, "vt100");
12301         cgetcap(buf, "tc", '=');
12302         cgetmatch(buf, "tc");
12303
12304   ;
12305   return 0;
12306 }
12307 _ACEOF
12308 rm -f conftest.$ac_objext conftest$ac_exeext
12309 if { (eval echo "$as_me:12309: \"$ac_link\"") >&5
12310   (eval $ac_link) 2>&5
12311   ac_status=$?
12312   echo "$as_me:12312: \$? = $ac_status" >&5
12313   (exit $ac_status); } &&
12314          { ac_try='test -s conftest$ac_exeext'
12315   { (eval echo "$as_me:12315: \"$ac_try\"") >&5
12316   (eval $ac_try) 2>&5
12317   ac_status=$?
12318   echo "$as_me:12318: \$? = $ac_status" >&5
12319   (exit $ac_status); }; }; then
12320   cf_cv_cgetent=yes
12321 else
12322   echo "$as_me: failed program was:" >&5
12323 cat conftest.$ac_ext >&5
12324 cf_cv_cgetent=no
12325 fi
12326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12327
12328 fi
12329
12330 echo "$as_me:12330: result: $cf_cv_cgetent" >&5
12331 echo "${ECHO_T}$cf_cv_cgetent" >&6
12332 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12333 #define HAVE_BSD_CGETENT 1
12334 EOF
12335
12336 fi
12337
12338 echo "$as_me:12338: checking for isascii" >&5
12339 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12340 if test "${cf_cv_have_isascii+set}" = set; then
12341   echo $ECHO_N "(cached) $ECHO_C" >&6
12342 else
12343
12344         cat >conftest.$ac_ext <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12347 #include <ctype.h>
12348 int
12349 main ()
12350 {
12351 int x = isascii(' ')
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 rm -f conftest.$ac_objext conftest$ac_exeext
12357 if { (eval echo "$as_me:12357: \"$ac_link\"") >&5
12358   (eval $ac_link) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); } &&
12362          { ac_try='test -s conftest$ac_exeext'
12363   { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); }; }; then
12368   cf_cv_have_isascii=yes
12369 else
12370   echo "$as_me: failed program was:" >&5
12371 cat conftest.$ac_ext >&5
12372 cf_cv_have_isascii=no
12373 fi
12374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12375
12376 fi
12377 echo "$as_me:12377: result: $cf_cv_have_isascii" >&5
12378 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12379 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12380 #define HAVE_ISASCII 1
12381 EOF
12382
12383 if test "$ac_cv_func_sigaction" = yes; then
12384 echo "$as_me:12384: checking whether sigaction needs _POSIX_SOURCE" >&5
12385 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12386 cat >conftest.$ac_ext <<_ACEOF
12387 #line 12387 "configure"
12388 #include "confdefs.h"
12389
12390 #include <sys/types.h>
12391 #include <signal.h>
12392 int
12393 main ()
12394 {
12395 struct sigaction act
12396   ;
12397   return 0;
12398 }
12399 _ACEOF
12400 rm -f conftest.$ac_objext
12401 if { (eval echo "$as_me:12401: \"$ac_compile\"") >&5
12402   (eval $ac_compile) 2>&5
12403   ac_status=$?
12404   echo "$as_me:12404: \$? = $ac_status" >&5
12405   (exit $ac_status); } &&
12406          { ac_try='test -s conftest.$ac_objext'
12407   { (eval echo "$as_me:12407: \"$ac_try\"") >&5
12408   (eval $ac_try) 2>&5
12409   ac_status=$?
12410   echo "$as_me:12410: \$? = $ac_status" >&5
12411   (exit $ac_status); }; }; then
12412   sigact_bad=no
12413 else
12414   echo "$as_me: failed program was:" >&5
12415 cat conftest.$ac_ext >&5
12416
12417 cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 #define _POSIX_SOURCE
12422 #include <sys/types.h>
12423 #include <signal.h>
12424 int
12425 main ()
12426 {
12427 struct sigaction act
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext
12433 if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
12434   (eval $ac_compile) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); } &&
12438          { ac_try='test -s conftest.$ac_objext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   sigact_bad=yes
12445          cat >>confdefs.h <<\EOF
12446 #define SVR4_ACTION 1
12447 EOF
12448
12449 else
12450   echo "$as_me: failed program was:" >&5
12451 cat conftest.$ac_ext >&5
12452 sigact_bad=unknown
12453 fi
12454 rm -f conftest.$ac_objext conftest.$ac_ext
12455 fi
12456 rm -f conftest.$ac_objext conftest.$ac_ext
12457 echo "$as_me:12457: result: $sigact_bad" >&5
12458 echo "${ECHO_T}$sigact_bad" >&6
12459 fi
12460
12461 echo "$as_me:12461: checking if nanosleep really works" >&5
12462 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12463 if test "${cf_cv_func_nanosleep+set}" = set; then
12464   echo $ECHO_N "(cached) $ECHO_C" >&6
12465 else
12466
12467 if test "$cross_compiling" = yes; then
12468   cf_cv_func_nanosleep=unknown
12469 else
12470   cat >conftest.$ac_ext <<_ACEOF
12471 #line 12471 "configure"
12472 #include "confdefs.h"
12473
12474 #include <stdio.h>
12475 #include <errno.h>
12476 #include <time.h>
12477
12478 #ifdef HAVE_SYS_TIME_H
12479 #include <sys/time.h>
12480 #endif
12481
12482 int main() {
12483         struct timespec ts1, ts2;
12484         int code;
12485         ts1.tv_sec  = 0;
12486         ts1.tv_nsec = 750000000;
12487         ts2.tv_sec  = 0;
12488         ts2.tv_nsec = 0;
12489         errno = 0;
12490         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12491         ${cf_cv_main_return:-return}(code != 0);
12492 }
12493
12494 _ACEOF
12495 rm -f conftest$ac_exeext
12496 if { (eval echo "$as_me:12496: \"$ac_link\"") >&5
12497   (eval $ac_link) 2>&5
12498   ac_status=$?
12499   echo "$as_me:12499: \$? = $ac_status" >&5
12500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12501   { (eval echo "$as_me:12501: \"$ac_try\"") >&5
12502   (eval $ac_try) 2>&5
12503   ac_status=$?
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit $ac_status); }; }; then
12506   cf_cv_func_nanosleep=yes
12507 else
12508   echo "$as_me: program exited with status $ac_status" >&5
12509 echo "$as_me: failed program was:" >&5
12510 cat conftest.$ac_ext >&5
12511 cf_cv_func_nanosleep=no
12512 fi
12513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12514 fi
12515 fi
12516 echo "$as_me:12516: result: $cf_cv_func_nanosleep" >&5
12517 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12518
12519 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12520 #define HAVE_NANOSLEEP 1
12521 EOF
12522
12523 for ac_header in \
12524 termio.h \
12525 termios.h \
12526 unistd.h \
12527
12528 do
12529 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12530 echo "$as_me:12530: checking for $ac_header" >&5
12531 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12532 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12533   echo $ECHO_N "(cached) $ECHO_C" >&6
12534 else
12535   cat >conftest.$ac_ext <<_ACEOF
12536 #line 12536 "configure"
12537 #include "confdefs.h"
12538 #include <$ac_header>
12539 _ACEOF
12540 if { (eval echo "$as_me:12540: \"$ac_cpp conftest.$ac_ext\"") >&5
12541   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12542   ac_status=$?
12543   egrep -v '^ *\+' conftest.er1 >conftest.err
12544   rm -f conftest.er1
12545   cat conftest.err >&5
12546   echo "$as_me:12546: \$? = $ac_status" >&5
12547   (exit $ac_status); } >/dev/null; then
12548   if test -s conftest.err; then
12549     ac_cpp_err=$ac_c_preproc_warn_flag
12550   else
12551     ac_cpp_err=
12552   fi
12553 else
12554   ac_cpp_err=yes
12555 fi
12556 if test -z "$ac_cpp_err"; then
12557   eval "$as_ac_Header=yes"
12558 else
12559   echo "$as_me: failed program was:" >&5
12560   cat conftest.$ac_ext >&5
12561   eval "$as_ac_Header=no"
12562 fi
12563 rm -f conftest.err conftest.$ac_ext
12564 fi
12565 echo "$as_me:12565: result: `eval echo '${'$as_ac_Header'}'`" >&5
12566 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12567 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12568   cat >>confdefs.h <<EOF
12569 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12570 EOF
12571
12572 fi
12573 done
12574
12575 if test "$ISC" = yes ; then
12576
12577 for ac_header in sys/termio.h
12578 do
12579 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12580 echo "$as_me:12580: checking for $ac_header" >&5
12581 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12582 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585   cat >conftest.$ac_ext <<_ACEOF
12586 #line 12586 "configure"
12587 #include "confdefs.h"
12588 #include <$ac_header>
12589 _ACEOF
12590 if { (eval echo "$as_me:12590: \"$ac_cpp conftest.$ac_ext\"") >&5
12591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12592   ac_status=$?
12593   egrep -v '^ *\+' conftest.er1 >conftest.err
12594   rm -f conftest.er1
12595   cat conftest.err >&5
12596   echo "$as_me:12596: \$? = $ac_status" >&5
12597   (exit $ac_status); } >/dev/null; then
12598   if test -s conftest.err; then
12599     ac_cpp_err=$ac_c_preproc_warn_flag
12600   else
12601     ac_cpp_err=
12602   fi
12603 else
12604   ac_cpp_err=yes
12605 fi
12606 if test -z "$ac_cpp_err"; then
12607   eval "$as_ac_Header=yes"
12608 else
12609   echo "$as_me: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   eval "$as_ac_Header=no"
12612 fi
12613 rm -f conftest.err conftest.$ac_ext
12614 fi
12615 echo "$as_me:12615: result: `eval echo '${'$as_ac_Header'}'`" >&5
12616 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12617 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12618   cat >>confdefs.h <<EOF
12619 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12620 EOF
12621
12622 fi
12623 done
12624
12625 fi
12626 if test "$ac_cv_header_termios_h" = yes ; then
12627         case "$CFLAGS $CPPFLAGS" in
12628         *-D_POSIX_SOURCE*)
12629                 termios_bad=dunno ;;
12630         *)      termios_bad=maybe ;;
12631         esac
12632         if test "$termios_bad" = maybe ; then
12633         echo "$as_me:12633: checking whether termios.h needs _POSIX_SOURCE" >&5
12634 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12635         cat >conftest.$ac_ext <<_ACEOF
12636 #line 12636 "configure"
12637 #include "confdefs.h"
12638 #include <termios.h>
12639 int
12640 main ()
12641 {
12642 struct termios foo; int x = foo.c_iflag
12643   ;
12644   return 0;
12645 }
12646 _ACEOF
12647 rm -f conftest.$ac_objext
12648 if { (eval echo "$as_me:12648: \"$ac_compile\"") >&5
12649   (eval $ac_compile) 2>&5
12650   ac_status=$?
12651   echo "$as_me:12651: \$? = $ac_status" >&5
12652   (exit $ac_status); } &&
12653          { ac_try='test -s conftest.$ac_objext'
12654   { (eval echo "$as_me:12654: \"$ac_try\"") >&5
12655   (eval $ac_try) 2>&5
12656   ac_status=$?
12657   echo "$as_me:12657: \$? = $ac_status" >&5
12658   (exit $ac_status); }; }; then
12659   termios_bad=no
12660 else
12661   echo "$as_me: failed program was:" >&5
12662 cat conftest.$ac_ext >&5
12663
12664                 cat >conftest.$ac_ext <<_ACEOF
12665 #line 12665 "configure"
12666 #include "confdefs.h"
12667
12668 #define _POSIX_SOURCE
12669 #include <termios.h>
12670 int
12671 main ()
12672 {
12673 struct termios foo; int x = foo.c_iflag
12674   ;
12675   return 0;
12676 }
12677 _ACEOF
12678 rm -f conftest.$ac_objext
12679 if { (eval echo "$as_me:12679: \"$ac_compile\"") >&5
12680   (eval $ac_compile) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); } &&
12684          { ac_try='test -s conftest.$ac_objext'
12685   { (eval echo "$as_me:12685: \"$ac_try\"") >&5
12686   (eval $ac_try) 2>&5
12687   ac_status=$?
12688   echo "$as_me:12688: \$? = $ac_status" >&5
12689   (exit $ac_status); }; }; then
12690   termios_bad=unknown
12691 else
12692   echo "$as_me: failed program was:" >&5
12693 cat conftest.$ac_ext >&5
12694 termios_bad=yes cat >>confdefs.h <<\EOF
12695 #define SVR4_TERMIO 1
12696 EOF
12697
12698 fi
12699 rm -f conftest.$ac_objext conftest.$ac_ext
12700
12701 fi
12702 rm -f conftest.$ac_objext conftest.$ac_ext
12703         echo "$as_me:12703: result: $termios_bad" >&5
12704 echo "${ECHO_T}$termios_bad" >&6
12705         fi
12706 fi
12707
12708 echo "$as_me:12708: checking for tcgetattr" >&5
12709 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12710 if test "${cf_cv_have_tcgetattr+set}" = set; then
12711   echo $ECHO_N "(cached) $ECHO_C" >&6
12712 else
12713
12714 cat >conftest.$ac_ext <<_ACEOF
12715 #line 12715 "configure"
12716 #include "confdefs.h"
12717
12718 #include <sys/types.h>
12719 #ifdef HAVE_UNISTD_H
12720 #include <unistd.h>
12721 #endif
12722 #ifdef HAVE_TERMIOS_H
12723 #include <termios.h>
12724 #define TTY struct termios
12725 #else
12726 #ifdef HAVE_TERMIO_H
12727 #include <termio.h>
12728 #define TTY struct termio
12729 #endif
12730 #endif
12731
12732 int
12733 main ()
12734 {
12735
12736 TTY foo;
12737 tcgetattr(1, &foo);
12738   ;
12739   return 0;
12740 }
12741 _ACEOF
12742 rm -f conftest.$ac_objext conftest$ac_exeext
12743 if { (eval echo "$as_me:12743: \"$ac_link\"") >&5
12744   (eval $ac_link) 2>&5
12745   ac_status=$?
12746   echo "$as_me:12746: \$? = $ac_status" >&5
12747   (exit $ac_status); } &&
12748          { ac_try='test -s conftest$ac_exeext'
12749   { (eval echo "$as_me:12749: \"$ac_try\"") >&5
12750   (eval $ac_try) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); }; }; then
12754   cf_cv_have_tcgetattr=yes
12755 else
12756   echo "$as_me: failed program was:" >&5
12757 cat conftest.$ac_ext >&5
12758 cf_cv_have_tcgetattr=no
12759 fi
12760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12761 fi
12762 echo "$as_me:12762: result: $cf_cv_have_tcgetattr" >&5
12763 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12764 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12765 #define HAVE_TCGETATTR 1
12766 EOF
12767
12768 echo "$as_me:12768: checking for vsscanf function or workaround" >&5
12769 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12770 if test "${cf_cv_func_vsscanf+set}" = set; then
12771   echo $ECHO_N "(cached) $ECHO_C" >&6
12772 else
12773
12774 cat >conftest.$ac_ext <<_ACEOF
12775 #line 12775 "configure"
12776 #include "confdefs.h"
12777
12778 #include <stdarg.h>
12779 #include <stdio.h>
12780 int
12781 main ()
12782 {
12783
12784         va_list ap;
12785         vsscanf("from", "%d", ap)
12786   ;
12787   return 0;
12788 }
12789 _ACEOF
12790 rm -f conftest.$ac_objext conftest$ac_exeext
12791 if { (eval echo "$as_me:12791: \"$ac_link\"") >&5
12792   (eval $ac_link) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); } &&
12796          { ac_try='test -s conftest$ac_exeext'
12797   { (eval echo "$as_me:12797: \"$ac_try\"") >&5
12798   (eval $ac_try) 2>&5
12799   ac_status=$?
12800   echo "$as_me:12800: \$? = $ac_status" >&5
12801   (exit $ac_status); }; }; then
12802   cf_cv_func_vsscanf=vsscanf
12803 else
12804   echo "$as_me: failed program was:" >&5
12805 cat conftest.$ac_ext >&5
12806
12807 cat >conftest.$ac_ext <<_ACEOF
12808 #line 12808 "configure"
12809 #include "confdefs.h"
12810
12811 #include <stdarg.h>
12812 #include <stdio.h>
12813 int
12814 main ()
12815 {
12816
12817     FILE strbuf;
12818     char *str = "from";
12819
12820     strbuf._flag = _IOREAD;
12821     strbuf._ptr = strbuf._base = (unsigned char *) str;
12822     strbuf._cnt = strlen(str);
12823     strbuf._file = _NFILE;
12824     return (vfscanf(&strbuf, "%d", ap))
12825   ;
12826   return 0;
12827 }
12828 _ACEOF
12829 rm -f conftest.$ac_objext conftest$ac_exeext
12830 if { (eval echo "$as_me:12830: \"$ac_link\"") >&5
12831   (eval $ac_link) 2>&5
12832   ac_status=$?
12833   echo "$as_me:12833: \$? = $ac_status" >&5
12834   (exit $ac_status); } &&
12835          { ac_try='test -s conftest$ac_exeext'
12836   { (eval echo "$as_me:12836: \"$ac_try\"") >&5
12837   (eval $ac_try) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit $ac_status); }; }; then
12841   cf_cv_func_vsscanf=vfscanf
12842 else
12843   echo "$as_me: failed program was:" >&5
12844 cat conftest.$ac_ext >&5
12845
12846 cat >conftest.$ac_ext <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849
12850 #include <stdarg.h>
12851 #include <stdio.h>
12852 int
12853 main ()
12854 {
12855
12856     FILE strbuf;
12857     char *str = "from";
12858
12859     strbuf._flag = _IOREAD;
12860     strbuf._ptr = strbuf._base = (unsigned char *) str;
12861     strbuf._cnt = strlen(str);
12862     strbuf._file = _NFILE;
12863     return (_doscan(&strbuf, "%d", ap))
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f conftest.$ac_objext conftest$ac_exeext
12869 if { (eval echo "$as_me:12869: \"$ac_link\"") >&5
12870   (eval $ac_link) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit $ac_status); } &&
12874          { ac_try='test -s conftest$ac_exeext'
12875   { (eval echo "$as_me:12875: \"$ac_try\"") >&5
12876   (eval $ac_try) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit $ac_status); }; }; then
12880   cf_cv_func_vsscanf=_doscan
12881 else
12882   echo "$as_me: failed program was:" >&5
12883 cat conftest.$ac_ext >&5
12884
12885 cf_cv_func_vsscanf=no
12886 fi
12887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12888 fi
12889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12890 fi
12891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12892 fi
12893 echo "$as_me:12893: result: $cf_cv_func_vsscanf" >&5
12894 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12895
12896 case $cf_cv_func_vsscanf in #(vi
12897 vsscanf) cat >>confdefs.h <<\EOF
12898 #define HAVE_VSSCANF 1
12899 EOF
12900 ;; #(vi
12901 vfscanf) cat >>confdefs.h <<\EOF
12902 #define HAVE_VFSCANF 1
12903 EOF
12904 ;; #(vi
12905 _doscan) cat >>confdefs.h <<\EOF
12906 #define HAVE__DOSCAN 1
12907 EOF
12908 ;;
12909 esac
12910
12911 echo "$as_me:12911: checking for working mkstemp" >&5
12912 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12913 if test "${cf_cv_func_mkstemp+set}" = set; then
12914   echo $ECHO_N "(cached) $ECHO_C" >&6
12915 else
12916
12917 rm -f conftest*
12918 if test "$cross_compiling" = yes; then
12919   echo "$as_me:12919: checking for mkstemp" >&5
12920 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12921 if test "${ac_cv_func_mkstemp+set}" = set; then
12922   echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924   cat >conftest.$ac_ext <<_ACEOF
12925 #line 12925 "configure"
12926 #include "confdefs.h"
12927 /* System header to define __stub macros and hopefully few prototypes,
12928     which can conflict with char mkstemp (); below.  */
12929 #include <assert.h>
12930 /* Override any gcc2 internal prototype to avoid an error.  */
12931 #ifdef __cplusplus
12932 extern "C"
12933 #endif
12934 /* We use char because int might match the return type of a gcc2
12935    builtin and then its argument prototype would still apply.  */
12936 char mkstemp ();
12937 char (*f) ();
12938
12939 int
12940 main ()
12941 {
12942 /* The GNU C library defines this for functions which it implements
12943     to always fail with ENOSYS.  Some functions are actually named
12944     something starting with __ and the normal name is an alias.  */
12945 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12946 choke me
12947 #else
12948 f = mkstemp;
12949 #endif
12950
12951   ;
12952   return 0;
12953 }
12954 _ACEOF
12955 rm -f conftest.$ac_objext conftest$ac_exeext
12956 if { (eval echo "$as_me:12956: \"$ac_link\"") >&5
12957   (eval $ac_link) 2>&5
12958   ac_status=$?
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit $ac_status); } &&
12961          { ac_try='test -s conftest$ac_exeext'
12962   { (eval echo "$as_me:12962: \"$ac_try\"") >&5
12963   (eval $ac_try) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); }; }; then
12967   ac_cv_func_mkstemp=yes
12968 else
12969   echo "$as_me: failed program was:" >&5
12970 cat conftest.$ac_ext >&5
12971 ac_cv_func_mkstemp=no
12972 fi
12973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12974 fi
12975 echo "$as_me:12975: result: $ac_cv_func_mkstemp" >&5
12976 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12977
12978 else
12979   cat >conftest.$ac_ext <<_ACEOF
12980 #line 12980 "configure"
12981 #include "confdefs.h"
12982
12983 #include <sys/types.h>
12984 #include <stdlib.h>
12985 #include <stdio.h>
12986 #include <string.h>
12987 #include <sys/stat.h>
12988 int main()
12989 {
12990         char *tmpl = "conftestXXXXXX";
12991         char name[2][80];
12992         int n;
12993         int result = 0;
12994         int fd;
12995         struct stat sb;
12996
12997         umask(077);
12998         for (n = 0; n < 2; ++n) {
12999                 strcpy(name[n], tmpl);
13000                 if ((fd = mkstemp(name[n])) >= 0) {
13001                         if (!strcmp(name[n], tmpl)
13002                          || stat(name[n], &sb) != 0
13003                          || (sb.st_mode & S_IFMT) != S_IFREG
13004                          || (sb.st_mode & 077) != 0) {
13005                                 result = 1;
13006                         }
13007                         close(fd);
13008                 }
13009         }
13010         if (result == 0
13011          && !strcmp(name[0], name[1]))
13012                 result = 1;
13013         ${cf_cv_main_return:-return}(result);
13014 }
13015
13016 _ACEOF
13017 rm -f conftest$ac_exeext
13018 if { (eval echo "$as_me:13018: \"$ac_link\"") >&5
13019   (eval $ac_link) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13023   { (eval echo "$as_me:13023: \"$ac_try\"") >&5
13024   (eval $ac_try) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit $ac_status); }; }; then
13028   cf_cv_func_mkstemp=yes
13029
13030 else
13031   echo "$as_me: program exited with status $ac_status" >&5
13032 echo "$as_me: failed program was:" >&5
13033 cat conftest.$ac_ext >&5
13034 cf_cv_func_mkstemp=no
13035
13036 fi
13037 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13038 fi
13039
13040 fi
13041 echo "$as_me:13041: result: $cf_cv_func_mkstemp" >&5
13042 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13043 if test "$cf_cv_func_mkstemp" = yes ; then
13044         cat >>confdefs.h <<\EOF
13045 #define HAVE_MKSTEMP 1
13046 EOF
13047
13048 fi
13049
13050 # setup for prototype of fallback for vsscanf()
13051
13052 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13053         HAVE_VSSCANF=1
13054 else
13055         HAVE_VSSCANF=0
13056 fi
13057
13058 if test "$cross_compiling" = yes ; then
13059         { echo "$as_me:13059: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13060 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13061 else
13062         echo "$as_me:13062: checking whether setvbuf arguments are reversed" >&5
13063 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13064 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13065   echo $ECHO_N "(cached) $ECHO_C" >&6
13066 else
13067   if test "$cross_compiling" = yes; then
13068   { { echo "$as_me:13068: error: cannot run test program while cross compiling" >&5
13069 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13070    { (exit 1); exit 1; }; }
13071 else
13072   cat >conftest.$ac_ext <<_ACEOF
13073 #line 13073 "configure"
13074 #include "confdefs.h"
13075 #include <stdio.h>
13076 /* If setvbuf has the reversed format, exit 0. */
13077 int
13078 main ()
13079 {
13080   /* This call has the arguments reversed.
13081      A reversed system may check and see that the address of main
13082      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13083   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13084     $ac_main_return(1);
13085   putc('\r', stdout);
13086   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13087 }
13088 _ACEOF
13089 rm -f conftest$ac_exeext
13090 if { (eval echo "$as_me:13090: \"$ac_link\"") >&5
13091   (eval $ac_link) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13095   { (eval echo "$as_me:13095: \"$ac_try\"") >&5
13096   (eval $ac_try) 2>&5
13097   ac_status=$?
13098   echo "$as_me:13098: \$? = $ac_status" >&5
13099   (exit $ac_status); }; }; then
13100   ac_cv_func_setvbuf_reversed=yes
13101 else
13102   echo "$as_me: program exited with status $ac_status" >&5
13103 echo "$as_me: failed program was:" >&5
13104 cat conftest.$ac_ext >&5
13105 ac_cv_func_setvbuf_reversed=no
13106 fi
13107 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13108 fi
13109 rm -f core core.* *.core
13110 fi
13111 echo "$as_me:13111: result: $ac_cv_func_setvbuf_reversed" >&5
13112 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13113 if test $ac_cv_func_setvbuf_reversed = yes; then
13114
13115 cat >>confdefs.h <<\EOF
13116 #define SETVBUF_REVERSED 1
13117 EOF
13118
13119 fi
13120
13121 fi
13122 echo "$as_me:13122: checking return type of signal handlers" >&5
13123 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13124 if test "${ac_cv_type_signal+set}" = set; then
13125   echo $ECHO_N "(cached) $ECHO_C" >&6
13126 else
13127   cat >conftest.$ac_ext <<_ACEOF
13128 #line 13128 "configure"
13129 #include "confdefs.h"
13130 #include <sys/types.h>
13131 #include <signal.h>
13132 #ifdef signal
13133 # undef signal
13134 #endif
13135 #ifdef __cplusplus
13136 extern "C" void (*signal (int, void (*)(int)))(int);
13137 #else
13138 void (*signal ()) ();
13139 #endif
13140
13141 int
13142 main ()
13143 {
13144 int i;
13145   ;
13146   return 0;
13147 }
13148 _ACEOF
13149 rm -f conftest.$ac_objext
13150 if { (eval echo "$as_me:13150: \"$ac_compile\"") >&5
13151   (eval $ac_compile) 2>&5
13152   ac_status=$?
13153   echo "$as_me:13153: \$? = $ac_status" >&5
13154   (exit $ac_status); } &&
13155          { ac_try='test -s conftest.$ac_objext'
13156   { (eval echo "$as_me:13156: \"$ac_try\"") >&5
13157   (eval $ac_try) 2>&5
13158   ac_status=$?
13159   echo "$as_me:13159: \$? = $ac_status" >&5
13160   (exit $ac_status); }; }; then
13161   ac_cv_type_signal=void
13162 else
13163   echo "$as_me: failed program was:" >&5
13164 cat conftest.$ac_ext >&5
13165 ac_cv_type_signal=int
13166 fi
13167 rm -f conftest.$ac_objext conftest.$ac_ext
13168 fi
13169 echo "$as_me:13169: result: $ac_cv_type_signal" >&5
13170 echo "${ECHO_T}$ac_cv_type_signal" >&6
13171
13172 cat >>confdefs.h <<EOF
13173 #define RETSIGTYPE $ac_cv_type_signal
13174 EOF
13175
13176 echo "$as_me:13176: checking for type sigaction_t" >&5
13177 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13178 if test "${cf_cv_type_sigaction+set}" = set; then
13179   echo $ECHO_N "(cached) $ECHO_C" >&6
13180 else
13181
13182         cat >conftest.$ac_ext <<_ACEOF
13183 #line 13183 "configure"
13184 #include "confdefs.h"
13185
13186 #include <signal.h>
13187 int
13188 main ()
13189 {
13190 sigaction_t x
13191   ;
13192   return 0;
13193 }
13194 _ACEOF
13195 rm -f conftest.$ac_objext
13196 if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13197   (eval $ac_compile) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit $ac_status); } &&
13201          { ac_try='test -s conftest.$ac_objext'
13202   { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13203   (eval $ac_try) 2>&5
13204   ac_status=$?
13205   echo "$as_me:13205: \$? = $ac_status" >&5
13206   (exit $ac_status); }; }; then
13207   cf_cv_type_sigaction=yes
13208 else
13209   echo "$as_me: failed program was:" >&5
13210 cat conftest.$ac_ext >&5
13211 cf_cv_type_sigaction=no
13212 fi
13213 rm -f conftest.$ac_objext conftest.$ac_ext
13214 fi
13215
13216 echo "$as_me:13216: result: $cf_cv_type_sigaction" >&5
13217 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13218 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13219 #define HAVE_TYPE_SIGACTION 1
13220 EOF
13221
13222 echo "$as_me:13222: checking declaration of size-change" >&5
13223 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13224 if test "${cf_cv_sizechange+set}" = set; then
13225   echo $ECHO_N "(cached) $ECHO_C" >&6
13226 else
13227
13228     cf_cv_sizechange=unknown
13229     cf_save_CPPFLAGS="$CPPFLAGS"
13230
13231 for cf_opts in "" "NEED_PTEM_H"
13232 do
13233
13234     CPPFLAGS="$cf_save_CPPFLAGS"
13235     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13236     cat >conftest.$ac_ext <<_ACEOF
13237 #line 13237 "configure"
13238 #include "confdefs.h"
13239 #include <sys/types.h>
13240 #ifdef HAVE_TERMIOS_H
13241 #include <termios.h>
13242 #else
13243 #ifdef HAVE_TERMIO_H
13244 #include <termio.h>
13245 #endif
13246 #endif
13247 #ifdef NEED_PTEM_H
13248 /* This is a workaround for SCO:  they neglected to define struct winsize in
13249  * termios.h -- it's only in termio.h and ptem.h
13250  */
13251 #include        <sys/stream.h>
13252 #include        <sys/ptem.h>
13253 #endif
13254 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13255 #include <sys/ioctl.h>
13256 #endif
13257
13258 int
13259 main ()
13260 {
13261
13262 #ifdef TIOCGSIZE
13263         struct ttysize win;     /* FIXME: what system is this? */
13264         int y = win.ts_lines;
13265         int x = win.ts_cols;
13266 #else
13267 #ifdef TIOCGWINSZ
13268         struct winsize win;
13269         int y = win.ws_row;
13270         int x = win.ws_col;
13271 #else
13272         no TIOCGSIZE or TIOCGWINSZ
13273 #endif /* TIOCGWINSZ */
13274 #endif /* TIOCGSIZE */
13275
13276   ;
13277   return 0;
13278 }
13279 _ACEOF
13280 rm -f conftest.$ac_objext
13281 if { (eval echo "$as_me:13281: \"$ac_compile\"") >&5
13282   (eval $ac_compile) 2>&5
13283   ac_status=$?
13284   echo "$as_me:13284: \$? = $ac_status" >&5
13285   (exit $ac_status); } &&
13286          { ac_try='test -s conftest.$ac_objext'
13287   { (eval echo "$as_me:13287: \"$ac_try\"") >&5
13288   (eval $ac_try) 2>&5
13289   ac_status=$?
13290   echo "$as_me:13290: \$? = $ac_status" >&5
13291   (exit $ac_status); }; }; then
13292   cf_cv_sizechange=yes
13293 else
13294   echo "$as_me: failed program was:" >&5
13295 cat conftest.$ac_ext >&5
13296 cf_cv_sizechange=no
13297 fi
13298 rm -f conftest.$ac_objext conftest.$ac_ext
13299
13300         CPPFLAGS="$cf_save_CPPFLAGS"
13301         if test "$cf_cv_sizechange" = yes ; then
13302                 echo "size-change succeeded ($cf_opts)" >&5
13303                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13304                 break
13305         fi
13306 done
13307
13308 fi
13309 echo "$as_me:13309: result: $cf_cv_sizechange" >&5
13310 echo "${ECHO_T}$cf_cv_sizechange" >&6
13311 if test "$cf_cv_sizechange" != no ; then
13312         cat >>confdefs.h <<\EOF
13313 #define HAVE_SIZECHANGE 1
13314 EOF
13315
13316         case $cf_cv_sizechange in #(vi
13317         NEED*)
13318                 cat >>confdefs.h <<EOF
13319 #define $cf_cv_sizechange  1
13320 EOF
13321
13322                 ;;
13323         esac
13324 fi
13325
13326 echo "$as_me:13326: checking for memmove" >&5
13327 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13328 if test "${ac_cv_func_memmove+set}" = set; then
13329   echo $ECHO_N "(cached) $ECHO_C" >&6
13330 else
13331   cat >conftest.$ac_ext <<_ACEOF
13332 #line 13332 "configure"
13333 #include "confdefs.h"
13334 /* System header to define __stub macros and hopefully few prototypes,
13335     which can conflict with char memmove (); below.  */
13336 #include <assert.h>
13337 /* Override any gcc2 internal prototype to avoid an error.  */
13338 #ifdef __cplusplus
13339 extern "C"
13340 #endif
13341 /* We use char because int might match the return type of a gcc2
13342    builtin and then its argument prototype would still apply.  */
13343 char memmove ();
13344 char (*f) ();
13345
13346 int
13347 main ()
13348 {
13349 /* The GNU C library defines this for functions which it implements
13350     to always fail with ENOSYS.  Some functions are actually named
13351     something starting with __ and the normal name is an alias.  */
13352 #if defined (__stub_memmove) || defined (__stub___memmove)
13353 choke me
13354 #else
13355 f = memmove;
13356 #endif
13357
13358   ;
13359   return 0;
13360 }
13361 _ACEOF
13362 rm -f conftest.$ac_objext conftest$ac_exeext
13363 if { (eval echo "$as_me:13363: \"$ac_link\"") >&5
13364   (eval $ac_link) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit $ac_status); } &&
13368          { ac_try='test -s conftest$ac_exeext'
13369   { (eval echo "$as_me:13369: \"$ac_try\"") >&5
13370   (eval $ac_try) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit $ac_status); }; }; then
13374   ac_cv_func_memmove=yes
13375 else
13376   echo "$as_me: failed program was:" >&5
13377 cat conftest.$ac_ext >&5
13378 ac_cv_func_memmove=no
13379 fi
13380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13381 fi
13382 echo "$as_me:13382: result: $ac_cv_func_memmove" >&5
13383 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13384 if test $ac_cv_func_memmove = yes; then
13385   :
13386 else
13387
13388 echo "$as_me:13388: checking for bcopy" >&5
13389 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13390 if test "${ac_cv_func_bcopy+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393   cat >conftest.$ac_ext <<_ACEOF
13394 #line 13394 "configure"
13395 #include "confdefs.h"
13396 /* System header to define __stub macros and hopefully few prototypes,
13397     which can conflict with char bcopy (); below.  */
13398 #include <assert.h>
13399 /* Override any gcc2 internal prototype to avoid an error.  */
13400 #ifdef __cplusplus
13401 extern "C"
13402 #endif
13403 /* We use char because int might match the return type of a gcc2
13404    builtin and then its argument prototype would still apply.  */
13405 char bcopy ();
13406 char (*f) ();
13407
13408 int
13409 main ()
13410 {
13411 /* The GNU C library defines this for functions which it implements
13412     to always fail with ENOSYS.  Some functions are actually named
13413     something starting with __ and the normal name is an alias.  */
13414 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13415 choke me
13416 #else
13417 f = bcopy;
13418 #endif
13419
13420   ;
13421   return 0;
13422 }
13423 _ACEOF
13424 rm -f conftest.$ac_objext conftest$ac_exeext
13425 if { (eval echo "$as_me:13425: \"$ac_link\"") >&5
13426   (eval $ac_link) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit $ac_status); } &&
13430          { ac_try='test -s conftest$ac_exeext'
13431   { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit $ac_status); }; }; then
13436   ac_cv_func_bcopy=yes
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 cat conftest.$ac_ext >&5
13440 ac_cv_func_bcopy=no
13441 fi
13442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13443 fi
13444 echo "$as_me:13444: result: $ac_cv_func_bcopy" >&5
13445 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13446 if test $ac_cv_func_bcopy = yes; then
13447
13448         echo "$as_me:13448: checking if bcopy does overlapping moves" >&5
13449 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13450 if test "${cf_cv_good_bcopy+set}" = set; then
13451   echo $ECHO_N "(cached) $ECHO_C" >&6
13452 else
13453
13454                 if test "$cross_compiling" = yes; then
13455   cf_cv_good_bcopy=unknown
13456 else
13457   cat >conftest.$ac_ext <<_ACEOF
13458 #line 13458 "configure"
13459 #include "confdefs.h"
13460
13461 int main() {
13462         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13463         char temp[40];
13464         bcopy(data, temp, sizeof(data));
13465         bcopy(temp+10, temp, 15);
13466         bcopy(temp+5, temp+15, 10);
13467         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13468 }
13469
13470 _ACEOF
13471 rm -f conftest$ac_exeext
13472 if { (eval echo "$as_me:13472: \"$ac_link\"") >&5
13473   (eval $ac_link) 2>&5
13474   ac_status=$?
13475   echo "$as_me:13475: \$? = $ac_status" >&5
13476   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13477   { (eval echo "$as_me:13477: \"$ac_try\"") >&5
13478   (eval $ac_try) 2>&5
13479   ac_status=$?
13480   echo "$as_me:13480: \$? = $ac_status" >&5
13481   (exit $ac_status); }; }; then
13482   cf_cv_good_bcopy=yes
13483 else
13484   echo "$as_me: program exited with status $ac_status" >&5
13485 echo "$as_me: failed program was:" >&5
13486 cat conftest.$ac_ext >&5
13487 cf_cv_good_bcopy=no
13488 fi
13489 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13490 fi
13491
13492 fi
13493 echo "$as_me:13493: result: $cf_cv_good_bcopy" >&5
13494 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13495
13496 else
13497   cf_cv_good_bcopy=no
13498 fi
13499
13500         if test "$cf_cv_good_bcopy" = yes ; then
13501                 cat >>confdefs.h <<\EOF
13502 #define USE_OK_BCOPY 1
13503 EOF
13504
13505         else
13506                 cat >>confdefs.h <<\EOF
13507 #define USE_MY_MEMMOVE 1
13508 EOF
13509
13510         fi
13511
13512 fi
13513
13514 echo "$as_me:13514: checking if poll really works" >&5
13515 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13516 if test "${cf_cv_working_poll+set}" = set; then
13517   echo $ECHO_N "(cached) $ECHO_C" >&6
13518 else
13519
13520 if test "$cross_compiling" = yes; then
13521   cf_cv_working_poll=unknown
13522 else
13523   cat >conftest.$ac_ext <<_ACEOF
13524 #line 13524 "configure"
13525 #include "confdefs.h"
13526
13527 #include <stdio.h>
13528 #ifdef HAVE_POLL_H
13529 #include <poll.h>
13530 #else
13531 #include <sys/poll.h>
13532 #endif
13533 int main() {
13534         struct pollfd myfds;
13535         int ret;
13536
13537         myfds.fd = 0;
13538         myfds.events = POLLIN;
13539
13540         ret = poll(&myfds, 1, 100);
13541         ${cf_cv_main_return:-return}(ret != 0);
13542 }
13543 _ACEOF
13544 rm -f conftest$ac_exeext
13545 if { (eval echo "$as_me:13545: \"$ac_link\"") >&5
13546   (eval $ac_link) 2>&5
13547   ac_status=$?
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit $ac_status); }; }; then
13555   cf_cv_working_poll=yes
13556 else
13557   echo "$as_me: program exited with status $ac_status" >&5
13558 echo "$as_me: failed program was:" >&5
13559 cat conftest.$ac_ext >&5
13560 cf_cv_working_poll=no
13561 fi
13562 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13563 fi
13564 fi
13565 echo "$as_me:13565: result: $cf_cv_working_poll" >&5
13566 echo "${ECHO_T}$cf_cv_working_poll" >&6
13567 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13568 #define HAVE_WORKING_POLL 1
13569 EOF
13570
13571 # special check for test/ditto.c
13572
13573 echo "$as_me:13573: checking for openpty in -lutil" >&5
13574 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13575 if test "${ac_cv_lib_util_openpty+set}" = set; then
13576   echo $ECHO_N "(cached) $ECHO_C" >&6
13577 else
13578   ac_check_lib_save_LIBS=$LIBS
13579 LIBS="-lutil  $LIBS"
13580 cat >conftest.$ac_ext <<_ACEOF
13581 #line 13581 "configure"
13582 #include "confdefs.h"
13583
13584 /* Override any gcc2 internal prototype to avoid an error.  */
13585 #ifdef __cplusplus
13586 extern "C"
13587 #endif
13588 /* We use char because int might match the return type of a gcc2
13589    builtin and then its argument prototype would still apply.  */
13590 char openpty ();
13591 int
13592 main ()
13593 {
13594 openpty ();
13595   ;
13596   return 0;
13597 }
13598 _ACEOF
13599 rm -f conftest.$ac_objext conftest$ac_exeext
13600 if { (eval echo "$as_me:13600: \"$ac_link\"") >&5
13601   (eval $ac_link) 2>&5
13602   ac_status=$?
13603   echo "$as_me:13603: \$? = $ac_status" >&5
13604   (exit $ac_status); } &&
13605          { ac_try='test -s conftest$ac_exeext'
13606   { (eval echo "$as_me:13606: \"$ac_try\"") >&5
13607   (eval $ac_try) 2>&5
13608   ac_status=$?
13609   echo "$as_me:13609: \$? = $ac_status" >&5
13610   (exit $ac_status); }; }; then
13611   ac_cv_lib_util_openpty=yes
13612 else
13613   echo "$as_me: failed program was:" >&5
13614 cat conftest.$ac_ext >&5
13615 ac_cv_lib_util_openpty=no
13616 fi
13617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13618 LIBS=$ac_check_lib_save_LIBS
13619 fi
13620 echo "$as_me:13620: result: $ac_cv_lib_util_openpty" >&5
13621 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13622 if test $ac_cv_lib_util_openpty = yes; then
13623   cf_cv_lib_util=yes
13624 else
13625   cf_cv_lib_util=no
13626 fi
13627
13628 echo "$as_me:13628: checking for openpty header" >&5
13629 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
13630 if test "${cf_cv_func_openpty+set}" = set; then
13631   echo $ECHO_N "(cached) $ECHO_C" >&6
13632 else
13633
13634     cf_save_LIBS="$LIBS"
13635     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
13636     for cf_header in pty.h libutil.h util.h
13637     do
13638     cat >conftest.$ac_ext <<_ACEOF
13639 #line 13639 "configure"
13640 #include "confdefs.h"
13641
13642 #include <$cf_header>
13643
13644 int
13645 main ()
13646 {
13647
13648     int x = openpty((int *)0, (int *)0, (char *)0,
13649                    (struct termios *)0, (struct winsize *)0);
13650
13651   ;
13652   return 0;
13653 }
13654 _ACEOF
13655 rm -f conftest.$ac_objext conftest$ac_exeext
13656 if { (eval echo "$as_me:13656: \"$ac_link\"") >&5
13657   (eval $ac_link) 2>&5
13658   ac_status=$?
13659   echo "$as_me:13659: \$? = $ac_status" >&5
13660   (exit $ac_status); } &&
13661          { ac_try='test -s conftest$ac_exeext'
13662   { (eval echo "$as_me:13662: \"$ac_try\"") >&5
13663   (eval $ac_try) 2>&5
13664   ac_status=$?
13665   echo "$as_me:13665: \$? = $ac_status" >&5
13666   (exit $ac_status); }; }; then
13667
13668         cf_cv_func_openpty=$cf_header
13669         break
13670
13671 else
13672   echo "$as_me: failed program was:" >&5
13673 cat conftest.$ac_ext >&5
13674
13675         cf_cv_func_openpty=no
13676
13677 fi
13678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13679     done
13680     LIBS="$cf_save_LIBS"
13681
13682 fi
13683 echo "$as_me:13683: result: $cf_cv_func_openpty" >&5
13684 echo "${ECHO_T}$cf_cv_func_openpty" >&6
13685
13686 if test "$cf_cv_func_openpty" != no ; then
13687     cat >>confdefs.h <<EOF
13688 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
13689 EOF
13690
13691     cat >>confdefs.h <<\EOF
13692 #define USE_XTERM_PTY 1
13693 EOF
13694
13695     if test "$cf_cv_lib_util" = yes ; then
13696         TEST_LIBS="-lutil $TEST_LIBS"
13697     fi
13698 fi
13699
13700 if test "$with_hashed_db" != no ; then
13701         cat >>confdefs.h <<\EOF
13702 #define USE_HASHED_DB 1
13703 EOF
13704
13705 case $with_hashed_db in #(vi
13706 yes|*able*) #(vi
13707     ;;
13708 *)
13709     if test -d "$with_hashed_db" ; then
13710
13711 if test -n "$with_hashed_db/include" ; then
13712   for cf_add_incdir in $with_hashed_db/include
13713   do
13714         while test $cf_add_incdir != /usr/include
13715         do
13716           if test -d $cf_add_incdir
13717           then
13718                 cf_have_incdir=no
13719                 if test -n "$CFLAGS$CPPFLAGS" ; then
13720                   # a loop is needed to ensure we can add subdirs of existing dirs
13721                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13722                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13723                           cf_have_incdir=yes; break
13724                         fi
13725                   done
13726                 fi
13727
13728                 if test "$cf_have_incdir" = no ; then
13729           if test "$cf_add_incdir" = /usr/local/include ; then
13730                         if test "$GCC" = yes
13731                         then
13732                           cf_save_CPPFLAGS=$CPPFLAGS
13733                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13734                           cat >conftest.$ac_ext <<_ACEOF
13735 #line 13735 "configure"
13736 #include "confdefs.h"
13737 #include <stdio.h>
13738 int
13739 main ()
13740 {
13741 printf("Hello")
13742   ;
13743   return 0;
13744 }
13745 _ACEOF
13746 rm -f conftest.$ac_objext
13747 if { (eval echo "$as_me:13747: \"$ac_compile\"") >&5
13748   (eval $ac_compile) 2>&5
13749   ac_status=$?
13750   echo "$as_me:13750: \$? = $ac_status" >&5
13751   (exit $ac_status); } &&
13752          { ac_try='test -s conftest.$ac_objext'
13753   { (eval echo "$as_me:13753: \"$ac_try\"") >&5
13754   (eval $ac_try) 2>&5
13755   ac_status=$?
13756   echo "$as_me:13756: \$? = $ac_status" >&5
13757   (exit $ac_status); }; }; then
13758   :
13759 else
13760   echo "$as_me: failed program was:" >&5
13761 cat conftest.$ac_ext >&5
13762 cf_have_incdir=yes
13763 fi
13764 rm -f conftest.$ac_objext conftest.$ac_ext
13765                           CPPFLAGS=$cf_save_CPPFLAGS
13766                         fi
13767                   fi
13768                 fi
13769
13770                 if test "$cf_have_incdir" = no ; then
13771                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13772
13773 echo "${as_me-configure}:13773: testing adding $cf_add_incdir to include-path ..." 1>&5
13774
13775                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13776
13777           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13778           test "$cf_top_incdir" = "$cf_add_incdir" && break
13779           cf_add_incdir="$cf_top_incdir"
13780                 else
13781                   break
13782                 fi
13783           fi
13784         done
13785   done
13786 fi
13787
13788 if test -n "$with_hashed_db/lib" ; then
13789   for cf_add_libdir in $with_hashed_db/lib
13790   do
13791     if test $cf_add_libdir = /usr/lib ; then
13792       :
13793     elif test -d $cf_add_libdir
13794     then
13795       cf_have_libdir=no
13796       if test -n "$LDFLAGS$LIBS" ; then
13797         # a loop is needed to ensure we can add subdirs of existing dirs
13798         for cf_test_libdir in $LDFLAGS $LIBS ; do
13799           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13800             cf_have_libdir=yes; break
13801           fi
13802         done
13803       fi
13804       if test "$cf_have_libdir" = no ; then
13805         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13806
13807 echo "${as_me-configure}:13807: testing adding $cf_add_libdir to library-path ..." 1>&5
13808
13809         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13810       fi
13811     fi
13812   done
13813 fi
13814
13815     fi
13816 esac
13817
13818 echo "$as_me:13818: checking for db.h" >&5
13819 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13820 if test "${ac_cv_header_db_h+set}" = set; then
13821   echo $ECHO_N "(cached) $ECHO_C" >&6
13822 else
13823   cat >conftest.$ac_ext <<_ACEOF
13824 #line 13824 "configure"
13825 #include "confdefs.h"
13826 #include <db.h>
13827 _ACEOF
13828 if { (eval echo "$as_me:13828: \"$ac_cpp conftest.$ac_ext\"") >&5
13829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13830   ac_status=$?
13831   egrep -v '^ *\+' conftest.er1 >conftest.err
13832   rm -f conftest.er1
13833   cat conftest.err >&5
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit $ac_status); } >/dev/null; then
13836   if test -s conftest.err; then
13837     ac_cpp_err=$ac_c_preproc_warn_flag
13838   else
13839     ac_cpp_err=
13840   fi
13841 else
13842   ac_cpp_err=yes
13843 fi
13844 if test -z "$ac_cpp_err"; then
13845   ac_cv_header_db_h=yes
13846 else
13847   echo "$as_me: failed program was:" >&5
13848   cat conftest.$ac_ext >&5
13849   ac_cv_header_db_h=no
13850 fi
13851 rm -f conftest.err conftest.$ac_ext
13852 fi
13853 echo "$as_me:13853: result: $ac_cv_header_db_h" >&5
13854 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13855 if test $ac_cv_header_db_h = yes; then
13856
13857 echo "$as_me:13857: checking for version of db" >&5
13858 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13859 if test "${cf_cv_hashed_db_version+set}" = set; then
13860   echo $ECHO_N "(cached) $ECHO_C" >&6
13861 else
13862
13863 cf_cv_hashed_db_version=unknown
13864
13865 for cf_db_version in 1 2 3 4 5
13866 do
13867
13868 echo "${as_me-configure}:13868: testing checking for db version $cf_db_version ..." 1>&5
13869
13870         cat >conftest.$ac_ext <<_ACEOF
13871 #line 13871 "configure"
13872 #include "confdefs.h"
13873
13874 $ac_includes_default
13875 #include <db.h>
13876
13877 #ifdef DB_VERSION_MAJOR
13878         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13879 #if $cf_db_version == DB_VERSION_MAJOR
13880         /* ok */
13881 #else
13882         make an error
13883 #endif
13884 #else
13885 #if $cf_db_version == 1
13886         /* ok: assuming this is DB 1.8.5 */
13887 #else
13888         make an error
13889 #endif
13890 #endif
13891
13892 int
13893 main ()
13894 {
13895 DBT *foo = 0
13896   ;
13897   return 0;
13898 }
13899 _ACEOF
13900 rm -f conftest.$ac_objext
13901 if { (eval echo "$as_me:13901: \"$ac_compile\"") >&5
13902   (eval $ac_compile) 2>&5
13903   ac_status=$?
13904   echo "$as_me:13904: \$? = $ac_status" >&5
13905   (exit $ac_status); } &&
13906          { ac_try='test -s conftest.$ac_objext'
13907   { (eval echo "$as_me:13907: \"$ac_try\"") >&5
13908   (eval $ac_try) 2>&5
13909   ac_status=$?
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit $ac_status); }; }; then
13912
13913         cf_cv_hashed_db_version=$cf_db_version
13914         break
13915
13916 else
13917   echo "$as_me: failed program was:" >&5
13918 cat conftest.$ac_ext >&5
13919 fi
13920 rm -f conftest.$ac_objext conftest.$ac_ext
13921 done
13922
13923 fi
13924 echo "$as_me:13924: result: $cf_cv_hashed_db_version" >&5
13925 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13926
13927 if test "$cf_cv_hashed_db_version" = unknown ; then
13928         { { echo "$as_me:13928: error: Cannot determine version of db" >&5
13929 echo "$as_me: error: Cannot determine version of db" >&2;}
13930    { (exit 1); exit 1; }; }
13931 else
13932
13933 echo "$as_me:13933: checking for db libraries" >&5
13934 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13935 if test "${cf_cv_hashed_db_libs+set}" = set; then
13936   echo $ECHO_N "(cached) $ECHO_C" >&6
13937 else
13938
13939 cf_cv_hashed_db_libs=unknown
13940 for cf_db_libs in db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
13941 do
13942         cf_save_libs="$LIBS"
13943         if test -n "$cf_db_libs"; then
13944                 LIBS="-l$cf_db_libs $LIBS"
13945         fi
13946
13947 echo "${as_me-configure}:13947: testing checking for library "$cf_db_libs" ..." 1>&5
13948
13949         cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952
13953 $ac_includes_default
13954 #include <db.h>
13955
13956 int
13957 main ()
13958 {
13959
13960         char *path = "/tmp/foo";
13961 #ifdef DB_VERSION_MAJOR
13962 #if DB_VERSION_MAJOR >= 4
13963         DB *result = 0;
13964         db_create(&result, NULL, 0);
13965         result->open(result,
13966                 NULL,
13967                 path,
13968                 path,
13969                 DB_HASH,
13970                 DB_CREATE,
13971                 0644);
13972 #elif DB_VERSION_MAJOR >= 3
13973         DB *result = 0;
13974         db_create(&result, NULL, 0);
13975         result->open(result,
13976                 path,
13977                 path,
13978                 DB_HASH,
13979                 DB_CREATE,
13980                 0644);
13981 #elif DB_VERSION_MAJOR >= 2
13982         DB *result = 0;
13983         db_open(path,
13984                 DB_HASH,
13985                 DB_CREATE,
13986                 0644,
13987                 (DB_ENV *) 0,
13988                 (DB_INFO *) 0,
13989                 &result);
13990 #endif /* DB_VERSION_MAJOR */
13991 #else
13992         DB *result = dbopen(path,
13993                      2,
13994                      0644,
13995                      DB_HASH,
13996                      0);
13997 #endif
13998         ${cf_cv_main_return:-return}(result != 0)
13999
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f conftest.$ac_objext conftest$ac_exeext
14005 if { (eval echo "$as_me:14005: \"$ac_link\"") >&5
14006   (eval $ac_link) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); } &&
14010          { ac_try='test -s conftest$ac_exeext'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit $ac_status); }; }; then
14016
14017         if test -n "$cf_db_libs" ; then
14018                 cf_cv_hashed_db_libs=$cf_db_libs
14019         else
14020                 cf_cv_hashed_db_libs=default
14021         fi
14022         LIBS="$cf_save_libs"
14023         break
14024
14025 else
14026   echo "$as_me: failed program was:" >&5
14027 cat conftest.$ac_ext >&5
14028 fi
14029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14030         LIBS="$cf_save_libs"
14031 done
14032
14033 fi
14034 echo "$as_me:14034: result: $cf_cv_hashed_db_libs" >&5
14035 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14036
14037         if test "$cf_cv_hashed_db_libs" = unknown ; then
14038                 { { echo "$as_me:14038: error: Cannot determine library for db" >&5
14039 echo "$as_me: error: Cannot determine library for db" >&2;}
14040    { (exit 1); exit 1; }; }
14041         elif test "$cf_cv_hashed_db_libs" != default ; then
14042                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14043         fi
14044 fi
14045
14046 else
14047
14048         { { echo "$as_me:14048: error: Cannot find db.h" >&5
14049 echo "$as_me: error: Cannot find db.h" >&2;}
14050    { (exit 1); exit 1; }; }
14051
14052 fi
14053
14054 fi
14055
14056 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14057         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14058         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14059 fi
14060
14061 # Just in case, check if the C compiler has a bool type.
14062
14063 echo "$as_me:14063: checking if we should include stdbool.h" >&5
14064 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14065
14066 if test "${cf_cv_header_stdbool_h+set}" = set; then
14067   echo $ECHO_N "(cached) $ECHO_C" >&6
14068 else
14069
14070         cat >conftest.$ac_ext <<_ACEOF
14071 #line 14071 "configure"
14072 #include "confdefs.h"
14073
14074 int
14075 main ()
14076 {
14077 bool foo = false
14078   ;
14079   return 0;
14080 }
14081 _ACEOF
14082 rm -f conftest.$ac_objext
14083 if { (eval echo "$as_me:14083: \"$ac_compile\"") >&5
14084   (eval $ac_compile) 2>&5
14085   ac_status=$?
14086   echo "$as_me:14086: \$? = $ac_status" >&5
14087   (exit $ac_status); } &&
14088          { ac_try='test -s conftest.$ac_objext'
14089   { (eval echo "$as_me:14089: \"$ac_try\"") >&5
14090   (eval $ac_try) 2>&5
14091   ac_status=$?
14092   echo "$as_me:14092: \$? = $ac_status" >&5
14093   (exit $ac_status); }; }; then
14094   cf_cv_header_stdbool_h=0
14095 else
14096   echo "$as_me: failed program was:" >&5
14097 cat conftest.$ac_ext >&5
14098 cat >conftest.$ac_ext <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101
14102 #ifndef __BEOS__
14103 #include <stdbool.h>
14104 #endif
14105
14106 int
14107 main ()
14108 {
14109 bool foo = false
14110   ;
14111   return 0;
14112 }
14113 _ACEOF
14114 rm -f conftest.$ac_objext
14115 if { (eval echo "$as_me:14115: \"$ac_compile\"") >&5
14116   (eval $ac_compile) 2>&5
14117   ac_status=$?
14118   echo "$as_me:14118: \$? = $ac_status" >&5
14119   (exit $ac_status); } &&
14120          { ac_try='test -s conftest.$ac_objext'
14121   { (eval echo "$as_me:14121: \"$ac_try\"") >&5
14122   (eval $ac_try) 2>&5
14123   ac_status=$?
14124   echo "$as_me:14124: \$? = $ac_status" >&5
14125   (exit $ac_status); }; }; then
14126   cf_cv_header_stdbool_h=1
14127 else
14128   echo "$as_me: failed program was:" >&5
14129 cat conftest.$ac_ext >&5
14130 cf_cv_header_stdbool_h=0
14131 fi
14132 rm -f conftest.$ac_objext conftest.$ac_ext
14133 fi
14134 rm -f conftest.$ac_objext conftest.$ac_ext
14135 fi
14136
14137 if test "$cf_cv_header_stdbool_h" = 1
14138 then    echo "$as_me:14138: result: yes" >&5
14139 echo "${ECHO_T}yes" >&6
14140 else    echo "$as_me:14140: result: no" >&5
14141 echo "${ECHO_T}no" >&6
14142 fi
14143
14144 echo "$as_me:14144: checking for builtin bool type" >&5
14145 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14146
14147 if test "${cf_cv_cc_bool_type+set}" = set; then
14148   echo $ECHO_N "(cached) $ECHO_C" >&6
14149 else
14150
14151         cat >conftest.$ac_ext <<_ACEOF
14152 #line 14152 "configure"
14153 #include "confdefs.h"
14154
14155 #include <stdio.h>
14156 #include <sys/types.h>
14157
14158 int
14159 main ()
14160 {
14161 bool x = false
14162   ;
14163   return 0;
14164 }
14165 _ACEOF
14166 rm -f conftest.$ac_objext
14167 if { (eval echo "$as_me:14167: \"$ac_compile\"") >&5
14168   (eval $ac_compile) 2>&5
14169   ac_status=$?
14170   echo "$as_me:14170: \$? = $ac_status" >&5
14171   (exit $ac_status); } &&
14172          { ac_try='test -s conftest.$ac_objext'
14173   { (eval echo "$as_me:14173: \"$ac_try\"") >&5
14174   (eval $ac_try) 2>&5
14175   ac_status=$?
14176   echo "$as_me:14176: \$? = $ac_status" >&5
14177   (exit $ac_status); }; }; then
14178   cf_cv_cc_bool_type=1
14179 else
14180   echo "$as_me: failed program was:" >&5
14181 cat conftest.$ac_ext >&5
14182 cf_cv_cc_bool_type=0
14183 fi
14184 rm -f conftest.$ac_objext conftest.$ac_ext
14185
14186 fi
14187
14188 if test "$cf_cv_cc_bool_type" = 1
14189 then    echo "$as_me:14189: result: yes" >&5
14190 echo "${ECHO_T}yes" >&6
14191 else    echo "$as_me:14191: result: no" >&5
14192 echo "${ECHO_T}no" >&6
14193 fi
14194
14195 # Check for C++ compiler characteristics (and ensure that it's there!)
14196 if test -n "$CXX" ; then
14197         ac_ext=cc
14198 ac_cpp='$CXXCPP $CPPFLAGS'
14199 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14200 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14201 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14202 ac_main_return=return
14203
14204 if test -n "$GXX" ; then
14205 case $cf_cv_system_name in #(vi
14206 os2*) #(vi
14207         cf_stdcpp_libname=stdcpp
14208         ;;
14209 *)
14210         cf_stdcpp_libname=stdc++
14211         ;;
14212 esac
14213 echo "$as_me:14213: checking for library $cf_stdcpp_libname" >&5
14214 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14215 if test "${cf_cv_libstdcpp+set}" = set; then
14216   echo $ECHO_N "(cached) $ECHO_C" >&6
14217 else
14218
14219         cf_save="$LIBS"
14220         LIBS="$LIBS -l$cf_stdcpp_libname"
14221 cat >conftest.$ac_ext <<_ACEOF
14222 #line 14222 "configure"
14223 #include "confdefs.h"
14224
14225 #include <strstream.h>
14226 int
14227 main ()
14228 {
14229
14230 char buf[80];
14231 strstreambuf foo(buf, sizeof(buf))
14232
14233   ;
14234   return 0;
14235 }
14236 _ACEOF
14237 rm -f conftest.$ac_objext conftest$ac_exeext
14238 if { (eval echo "$as_me:14238: \"$ac_link\"") >&5
14239   (eval $ac_link) 2>&5
14240   ac_status=$?
14241   echo "$as_me:14241: \$? = $ac_status" >&5
14242   (exit $ac_status); } &&
14243          { ac_try='test -s conftest$ac_exeext'
14244   { (eval echo "$as_me:14244: \"$ac_try\"") >&5
14245   (eval $ac_try) 2>&5
14246   ac_status=$?
14247   echo "$as_me:14247: \$? = $ac_status" >&5
14248   (exit $ac_status); }; }; then
14249   cf_cv_libstdcpp=yes
14250 else
14251   echo "$as_me: failed program was:" >&5
14252 cat conftest.$ac_ext >&5
14253 cf_cv_libstdcpp=no
14254 fi
14255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14256         LIBS="$cf_save"
14257
14258 fi
14259 echo "$as_me:14259: result: $cf_cv_libstdcpp" >&5
14260 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14261 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14262 fi
14263
14264         echo "$as_me:14264: checking whether $CXX understands -c and -o together" >&5
14265 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14266 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14267   echo $ECHO_N "(cached) $ECHO_C" >&6
14268 else
14269
14270 cat > conftest.$ac_ext <<CF_EOF
14271 #include <stdio.h>
14272 int main()
14273 {
14274         ${cf_cv_main_return:-return}(0);
14275 }
14276 CF_EOF
14277 # We do the test twice because some compilers refuse to overwrite an
14278 # existing .o file with -o, though they will create one.
14279 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14280 if { (eval echo "$as_me:14280: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } &&
14285   test -f conftest2.$ac_objext && { (eval echo "$as_me:14285: \"$ac_try\"") >&5
14286   (eval $ac_try) 2>&5
14287   ac_status=$?
14288   echo "$as_me:14288: \$? = $ac_status" >&5
14289   (exit $ac_status); };
14290 then
14291   eval cf_cv_prog_CXX_c_o=yes
14292 else
14293   eval cf_cv_prog_CXX_c_o=no
14294 fi
14295 rm -f conftest*
14296
14297 fi
14298 if test $cf_cv_prog_CXX_c_o = yes; then
14299   echo "$as_me:14299: result: yes" >&5
14300 echo "${ECHO_T}yes" >&6
14301 else
14302   echo "$as_me:14302: result: no" >&5
14303 echo "${ECHO_T}no" >&6
14304 fi
14305
14306         case $GXX_VERSION in
14307         1*|2.0-6*)
14308                 cf_cxx_library=yes
14309                 ;;
14310         *-2.7*|2.7*)
14311
14312 cf_cxx_library=unknown
14313 case $cf_cv_system_name in #(vi
14314 os2*) #(vi
14315         cf_gpp_libname=gpp
14316         ;;
14317 *)
14318         cf_gpp_libname=g++
14319         ;;
14320 esac
14321 if test "$GXX" = yes; then
14322         echo "$as_me:14322: checking for lib$cf_gpp_libname" >&5
14323 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14324         cf_save="$LIBS"
14325         LIBS="$LIBS -l$cf_gpp_libname"
14326         cat >conftest.$ac_ext <<_ACEOF
14327 #line 14327 "configure"
14328 #include "confdefs.h"
14329
14330 #include <$cf_gpp_libname/builtin.h>
14331
14332 int
14333 main ()
14334 {
14335 two_arg_error_handler_t foo2 = lib_error_handler
14336   ;
14337   return 0;
14338 }
14339 _ACEOF
14340 rm -f conftest.$ac_objext conftest$ac_exeext
14341 if { (eval echo "$as_me:14341: \"$ac_link\"") >&5
14342   (eval $ac_link) 2>&5
14343   ac_status=$?
14344   echo "$as_me:14344: \$? = $ac_status" >&5
14345   (exit $ac_status); } &&
14346          { ac_try='test -s conftest$ac_exeext'
14347   { (eval echo "$as_me:14347: \"$ac_try\"") >&5
14348   (eval $ac_try) 2>&5
14349   ac_status=$?
14350   echo "$as_me:14350: \$? = $ac_status" >&5
14351   (exit $ac_status); }; }; then
14352   cf_cxx_library=yes
14353          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14354          if test "$cf_gpp_libname" = cpp ; then
14355             cat >>confdefs.h <<\EOF
14356 #define HAVE_GPP_BUILTIN_H 1
14357 EOF
14358
14359          else
14360             cat >>confdefs.h <<\EOF
14361 #define HAVE_GXX_BUILTIN_H 1
14362 EOF
14363
14364          fi
14365 else
14366   echo "$as_me: failed program was:" >&5
14367 cat conftest.$ac_ext >&5
14368 cat >conftest.$ac_ext <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14371
14372 #include <builtin.h>
14373
14374 int
14375 main ()
14376 {
14377 two_arg_error_handler_t foo2 = lib_error_handler
14378   ;
14379   return 0;
14380 }
14381 _ACEOF
14382 rm -f conftest.$ac_objext conftest$ac_exeext
14383 if { (eval echo "$as_me:14383: \"$ac_link\"") >&5
14384   (eval $ac_link) 2>&5
14385   ac_status=$?
14386   echo "$as_me:14386: \$? = $ac_status" >&5
14387   (exit $ac_status); } &&
14388          { ac_try='test -s conftest$ac_exeext'
14389   { (eval echo "$as_me:14389: \"$ac_try\"") >&5
14390   (eval $ac_try) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit $ac_status); }; }; then
14394   cf_cxx_library=yes
14395          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14396          cat >>confdefs.h <<\EOF
14397 #define HAVE_BUILTIN_H 1
14398 EOF
14399
14400 else
14401   echo "$as_me: failed program was:" >&5
14402 cat conftest.$ac_ext >&5
14403 cf_cxx_library=no
14404 fi
14405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14406 fi
14407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14408         LIBS="$cf_save"
14409         echo "$as_me:14409: result: $cf_cxx_library" >&5
14410 echo "${ECHO_T}$cf_cxx_library" >&6
14411 fi
14412
14413                 ;;
14414         *)
14415                 cf_cxx_library=no
14416                 ;;
14417         esac
14418
14419         ac_ext=cc
14420 ac_cpp='$CXXCPP $CPPFLAGS'
14421 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14422 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14423 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14424 ac_main_return=return
14425 echo "$as_me:14425: checking how to run the C++ preprocessor" >&5
14426 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14427 if test -z "$CXXCPP"; then
14428   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14429   echo $ECHO_N "(cached) $ECHO_C" >&6
14430 else
14431       # Double quotes because CXXCPP needs to be expanded
14432     for CXXCPP in "$CXX -E" "/lib/cpp"
14433     do
14434       ac_preproc_ok=false
14435 for ac_cxx_preproc_warn_flag in '' yes
14436 do
14437   # Use a header file that comes with gcc, so configuring glibc
14438   # with a fresh cross-compiler works.
14439   # On the NeXT, cc -E runs the code through the compiler's parser,
14440   # not just through cpp. "Syntax error" is here to catch this case.
14441   cat >conftest.$ac_ext <<_ACEOF
14442 #line 14442 "configure"
14443 #include "confdefs.h"
14444 #include <assert.h>
14445                      Syntax error
14446 _ACEOF
14447 if { (eval echo "$as_me:14447: \"$ac_cpp conftest.$ac_ext\"") >&5
14448   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14449   ac_status=$?
14450   egrep -v '^ *\+' conftest.er1 >conftest.err
14451   rm -f conftest.er1
14452   cat conftest.err >&5
14453   echo "$as_me:14453: \$? = $ac_status" >&5
14454   (exit $ac_status); } >/dev/null; then
14455   if test -s conftest.err; then
14456     ac_cpp_err=$ac_cxx_preproc_warn_flag
14457   else
14458     ac_cpp_err=
14459   fi
14460 else
14461   ac_cpp_err=yes
14462 fi
14463 if test -z "$ac_cpp_err"; then
14464   :
14465 else
14466   echo "$as_me: failed program was:" >&5
14467   cat conftest.$ac_ext >&5
14468   # Broken: fails on valid input.
14469 continue
14470 fi
14471 rm -f conftest.err conftest.$ac_ext
14472
14473   # OK, works on sane cases.  Now check whether non-existent headers
14474   # can be detected and how.
14475   cat >conftest.$ac_ext <<_ACEOF
14476 #line 14476 "configure"
14477 #include "confdefs.h"
14478 #include <ac_nonexistent.h>
14479 _ACEOF
14480 if { (eval echo "$as_me:14480: \"$ac_cpp conftest.$ac_ext\"") >&5
14481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14482   ac_status=$?
14483   egrep -v '^ *\+' conftest.er1 >conftest.err
14484   rm -f conftest.er1
14485   cat conftest.err >&5
14486   echo "$as_me:14486: \$? = $ac_status" >&5
14487   (exit $ac_status); } >/dev/null; then
14488   if test -s conftest.err; then
14489     ac_cpp_err=$ac_cxx_preproc_warn_flag
14490   else
14491     ac_cpp_err=
14492   fi
14493 else
14494   ac_cpp_err=yes
14495 fi
14496 if test -z "$ac_cpp_err"; then
14497   # Broken: success on invalid input.
14498 continue
14499 else
14500   echo "$as_me: failed program was:" >&5
14501   cat conftest.$ac_ext >&5
14502   # Passes both tests.
14503 ac_preproc_ok=:
14504 break
14505 fi
14506 rm -f conftest.err conftest.$ac_ext
14507
14508 done
14509 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14510 rm -f conftest.err conftest.$ac_ext
14511 if $ac_preproc_ok; then
14512   break
14513 fi
14514
14515     done
14516     ac_cv_prog_CXXCPP=$CXXCPP
14517
14518 fi
14519   CXXCPP=$ac_cv_prog_CXXCPP
14520 else
14521   ac_cv_prog_CXXCPP=$CXXCPP
14522 fi
14523 echo "$as_me:14523: result: $CXXCPP" >&5
14524 echo "${ECHO_T}$CXXCPP" >&6
14525 ac_preproc_ok=false
14526 for ac_cxx_preproc_warn_flag in '' yes
14527 do
14528   # Use a header file that comes with gcc, so configuring glibc
14529   # with a fresh cross-compiler works.
14530   # On the NeXT, cc -E runs the code through the compiler's parser,
14531   # not just through cpp. "Syntax error" is here to catch this case.
14532   cat >conftest.$ac_ext <<_ACEOF
14533 #line 14533 "configure"
14534 #include "confdefs.h"
14535 #include <assert.h>
14536                      Syntax error
14537 _ACEOF
14538 if { (eval echo "$as_me:14538: \"$ac_cpp conftest.$ac_ext\"") >&5
14539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14540   ac_status=$?
14541   egrep -v '^ *\+' conftest.er1 >conftest.err
14542   rm -f conftest.er1
14543   cat conftest.err >&5
14544   echo "$as_me:14544: \$? = $ac_status" >&5
14545   (exit $ac_status); } >/dev/null; then
14546   if test -s conftest.err; then
14547     ac_cpp_err=$ac_cxx_preproc_warn_flag
14548   else
14549     ac_cpp_err=
14550   fi
14551 else
14552   ac_cpp_err=yes
14553 fi
14554 if test -z "$ac_cpp_err"; then
14555   :
14556 else
14557   echo "$as_me: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   # Broken: fails on valid input.
14560 continue
14561 fi
14562 rm -f conftest.err conftest.$ac_ext
14563
14564   # OK, works on sane cases.  Now check whether non-existent headers
14565   # can be detected and how.
14566   cat >conftest.$ac_ext <<_ACEOF
14567 #line 14567 "configure"
14568 #include "confdefs.h"
14569 #include <ac_nonexistent.h>
14570 _ACEOF
14571 if { (eval echo "$as_me:14571: \"$ac_cpp conftest.$ac_ext\"") >&5
14572   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14573   ac_status=$?
14574   egrep -v '^ *\+' conftest.er1 >conftest.err
14575   rm -f conftest.er1
14576   cat conftest.err >&5
14577   echo "$as_me:14577: \$? = $ac_status" >&5
14578   (exit $ac_status); } >/dev/null; then
14579   if test -s conftest.err; then
14580     ac_cpp_err=$ac_cxx_preproc_warn_flag
14581   else
14582     ac_cpp_err=
14583   fi
14584 else
14585   ac_cpp_err=yes
14586 fi
14587 if test -z "$ac_cpp_err"; then
14588   # Broken: success on invalid input.
14589 continue
14590 else
14591   echo "$as_me: failed program was:" >&5
14592   cat conftest.$ac_ext >&5
14593   # Passes both tests.
14594 ac_preproc_ok=:
14595 break
14596 fi
14597 rm -f conftest.err conftest.$ac_ext
14598
14599 done
14600 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14601 rm -f conftest.err conftest.$ac_ext
14602 if $ac_preproc_ok; then
14603   :
14604 else
14605   { { echo "$as_me:14605: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14606 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14607    { (exit 1); exit 1; }; }
14608 fi
14609
14610 ac_ext=cc
14611 ac_cpp='$CXXCPP $CPPFLAGS'
14612 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14613 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14614 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14615 ac_main_return=return
14616
14617 for ac_header in iostream typeinfo
14618 do
14619 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14620 echo "$as_me:14620: checking for $ac_header" >&5
14621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14623   echo $ECHO_N "(cached) $ECHO_C" >&6
14624 else
14625   cat >conftest.$ac_ext <<_ACEOF
14626 #line 14626 "configure"
14627 #include "confdefs.h"
14628 #include <$ac_header>
14629 _ACEOF
14630 if { (eval echo "$as_me:14630: \"$ac_cpp conftest.$ac_ext\"") >&5
14631   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14632   ac_status=$?
14633   egrep -v '^ *\+' conftest.er1 >conftest.err
14634   rm -f conftest.er1
14635   cat conftest.err >&5
14636   echo "$as_me:14636: \$? = $ac_status" >&5
14637   (exit $ac_status); } >/dev/null; then
14638   if test -s conftest.err; then
14639     ac_cpp_err=$ac_cxx_preproc_warn_flag
14640   else
14641     ac_cpp_err=
14642   fi
14643 else
14644   ac_cpp_err=yes
14645 fi
14646 if test -z "$ac_cpp_err"; then
14647   eval "$as_ac_Header=yes"
14648 else
14649   echo "$as_me: failed program was:" >&5
14650   cat conftest.$ac_ext >&5
14651   eval "$as_ac_Header=no"
14652 fi
14653 rm -f conftest.err conftest.$ac_ext
14654 fi
14655 echo "$as_me:14655: result: `eval echo '${'$as_ac_Header'}'`" >&5
14656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14657 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14658   cat >>confdefs.h <<EOF
14659 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14660 EOF
14661
14662 fi
14663 done
14664
14665 echo "$as_me:14665: checking if we should include stdbool.h" >&5
14666 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14667
14668 if test "${cf_cv_header_stdbool_h+set}" = set; then
14669   echo $ECHO_N "(cached) $ECHO_C" >&6
14670 else
14671
14672         cat >conftest.$ac_ext <<_ACEOF
14673 #line 14673 "configure"
14674 #include "confdefs.h"
14675
14676 int
14677 main ()
14678 {
14679 bool foo = false
14680   ;
14681   return 0;
14682 }
14683 _ACEOF
14684 rm -f conftest.$ac_objext
14685 if { (eval echo "$as_me:14685: \"$ac_compile\"") >&5
14686   (eval $ac_compile) 2>&5
14687   ac_status=$?
14688   echo "$as_me:14688: \$? = $ac_status" >&5
14689   (exit $ac_status); } &&
14690          { ac_try='test -s conftest.$ac_objext'
14691   { (eval echo "$as_me:14691: \"$ac_try\"") >&5
14692   (eval $ac_try) 2>&5
14693   ac_status=$?
14694   echo "$as_me:14694: \$? = $ac_status" >&5
14695   (exit $ac_status); }; }; then
14696   cf_cv_header_stdbool_h=0
14697 else
14698   echo "$as_me: failed program was:" >&5
14699 cat conftest.$ac_ext >&5
14700 cat >conftest.$ac_ext <<_ACEOF
14701 #line 14701 "configure"
14702 #include "confdefs.h"
14703
14704 #ifndef __BEOS__
14705 #include <stdbool.h>
14706 #endif
14707
14708 int
14709 main ()
14710 {
14711 bool foo = false
14712   ;
14713   return 0;
14714 }
14715 _ACEOF
14716 rm -f conftest.$ac_objext
14717 if { (eval echo "$as_me:14717: \"$ac_compile\"") >&5
14718   (eval $ac_compile) 2>&5
14719   ac_status=$?
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit $ac_status); } &&
14722          { ac_try='test -s conftest.$ac_objext'
14723   { (eval echo "$as_me:14723: \"$ac_try\"") >&5
14724   (eval $ac_try) 2>&5
14725   ac_status=$?
14726   echo "$as_me:14726: \$? = $ac_status" >&5
14727   (exit $ac_status); }; }; then
14728   cf_cv_header_stdbool_h=1
14729 else
14730   echo "$as_me: failed program was:" >&5
14731 cat conftest.$ac_ext >&5
14732 cf_cv_header_stdbool_h=0
14733 fi
14734 rm -f conftest.$ac_objext conftest.$ac_ext
14735 fi
14736 rm -f conftest.$ac_objext conftest.$ac_ext
14737 fi
14738
14739 if test "$cf_cv_header_stdbool_h" = 1
14740 then    echo "$as_me:14740: result: yes" >&5
14741 echo "${ECHO_T}yes" >&6
14742 else    echo "$as_me:14742: result: no" >&5
14743 echo "${ECHO_T}no" >&6
14744 fi
14745
14746 echo "$as_me:14746: checking for builtin bool type" >&5
14747 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14748
14749 if test "${cf_cv_builtin_bool+set}" = set; then
14750   echo $ECHO_N "(cached) $ECHO_C" >&6
14751 else
14752
14753         cat >conftest.$ac_ext <<_ACEOF
14754 #line 14754 "configure"
14755 #include "confdefs.h"
14756
14757 #include <stdio.h>
14758 #include <sys/types.h>
14759
14760 int
14761 main ()
14762 {
14763 bool x = false
14764   ;
14765   return 0;
14766 }
14767 _ACEOF
14768 rm -f conftest.$ac_objext
14769 if { (eval echo "$as_me:14769: \"$ac_compile\"") >&5
14770   (eval $ac_compile) 2>&5
14771   ac_status=$?
14772   echo "$as_me:14772: \$? = $ac_status" >&5
14773   (exit $ac_status); } &&
14774          { ac_try='test -s conftest.$ac_objext'
14775   { (eval echo "$as_me:14775: \"$ac_try\"") >&5
14776   (eval $ac_try) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); }; }; then
14780   cf_cv_builtin_bool=1
14781 else
14782   echo "$as_me: failed program was:" >&5
14783 cat conftest.$ac_ext >&5
14784 cf_cv_builtin_bool=0
14785 fi
14786 rm -f conftest.$ac_objext conftest.$ac_ext
14787
14788 fi
14789
14790 if test "$cf_cv_builtin_bool" = 1
14791 then    echo "$as_me:14791: result: yes" >&5
14792 echo "${ECHO_T}yes" >&6
14793 else    echo "$as_me:14793: result: no" >&5
14794 echo "${ECHO_T}no" >&6
14795 fi
14796
14797 echo "$as_me:14797: checking for size of bool" >&5
14798 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14799 if test "${cf_cv_type_of_bool+set}" = set; then
14800   echo $ECHO_N "(cached) $ECHO_C" >&6
14801 else
14802
14803         rm -f cf_test.out
14804         if test "$cross_compiling" = yes; then
14805   cf_cv_type_of_bool=unknown
14806 else
14807   cat >conftest.$ac_ext <<_ACEOF
14808 #line 14808 "configure"
14809 #include "confdefs.h"
14810
14811 #include <stdlib.h>
14812 #include <stdio.h>
14813
14814 #if defined(__cplusplus)
14815
14816 #ifdef HAVE_GXX_BUILTIN_H
14817 #include <g++/builtin.h>
14818 #elif HAVE_GPP_BUILTIN_H
14819 #include <gpp/builtin.h>
14820 #elif HAVE_BUILTIN_H
14821 #include <builtin.h>
14822 #endif
14823
14824 #else
14825
14826 #if $cf_cv_header_stdbool_h
14827 #include <stdbool.h>
14828 #endif
14829
14830 #endif
14831
14832 main()
14833 {
14834         FILE *fp = fopen("cf_test.out", "w");
14835         if (fp != 0) {
14836                 bool x = true;
14837                 if ((bool)(-x) >= 0)
14838                         fputs("unsigned ", fp);
14839                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14840                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14841                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14842                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14843                 fclose(fp);
14844         }
14845         ${cf_cv_main_return:-return}(0);
14846 }
14847
14848 _ACEOF
14849 rm -f conftest$ac_exeext
14850 if { (eval echo "$as_me:14850: \"$ac_link\"") >&5
14851   (eval $ac_link) 2>&5
14852   ac_status=$?
14853   echo "$as_me:14853: \$? = $ac_status" >&5
14854   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14855   { (eval echo "$as_me:14855: \"$ac_try\"") >&5
14856   (eval $ac_try) 2>&5
14857   ac_status=$?
14858   echo "$as_me:14858: \$? = $ac_status" >&5
14859   (exit $ac_status); }; }; then
14860   cf_cv_type_of_bool=`cat cf_test.out`
14861                  if test -z "$cf_cv_type_of_bool"; then
14862                    cf_cv_type_of_bool=unknown
14863                  fi
14864 else
14865   echo "$as_me: program exited with status $ac_status" >&5
14866 echo "$as_me: failed program was:" >&5
14867 cat conftest.$ac_ext >&5
14868 cf_cv_type_of_bool=unknown
14869 fi
14870 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14871 fi
14872
14873 fi
14874
14875         rm -f cf_test.out
14876 echo "$as_me:14876: result: $cf_cv_type_of_bool" >&5
14877 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14878 if test "$cf_cv_type_of_bool" = unknown ; then
14879         case .$NCURSES_BOOL in #(vi
14880         .auto|.) NCURSES_BOOL=unsigned;;
14881         esac
14882         { echo "$as_me:14882: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14883 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14884         cf_cv_type_of_bool=$NCURSES_BOOL
14885 fi
14886
14887 echo "$as_me:14887: checking for special defines needed for etip.h" >&5
14888 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14889 cf_save_CXXFLAGS="$CXXFLAGS"
14890 cf_result="none"
14891 for cf_math in "" MATH_H
14892 do
14893 for cf_excp in "" MATH_EXCEPTION
14894 do
14895         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14896         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14897         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14898 cat >conftest.$ac_ext <<_ACEOF
14899 #line 14899 "configure"
14900 #include "confdefs.h"
14901
14902 #include <etip.h.in>
14903
14904 int
14905 main ()
14906 {
14907
14908   ;
14909   return 0;
14910 }
14911 _ACEOF
14912 rm -f conftest.$ac_objext
14913 if { (eval echo "$as_me:14913: \"$ac_compile\"") >&5
14914   (eval $ac_compile) 2>&5
14915   ac_status=$?
14916   echo "$as_me:14916: \$? = $ac_status" >&5
14917   (exit $ac_status); } &&
14918          { ac_try='test -s conftest.$ac_objext'
14919   { (eval echo "$as_me:14919: \"$ac_try\"") >&5
14920   (eval $ac_try) 2>&5
14921   ac_status=$?
14922   echo "$as_me:14922: \$? = $ac_status" >&5
14923   (exit $ac_status); }; }; then
14924
14925         test -n "$cf_math" && cat >>confdefs.h <<EOF
14926 #define ETIP_NEEDS_${cf_math} 1
14927 EOF
14928
14929         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14930 #define ETIP_NEEDS_${cf_excp} 1
14931 EOF
14932
14933         cf_result="$cf_math $cf_excp"
14934         break
14935
14936 else
14937   echo "$as_me: failed program was:" >&5
14938 cat conftest.$ac_ext >&5
14939 fi
14940 rm -f conftest.$ac_objext conftest.$ac_ext
14941 done
14942 done
14943 echo "$as_me:14943: result: $cf_result" >&5
14944 echo "${ECHO_T}$cf_result" >&6
14945 CXXFLAGS="$cf_save_CXXFLAGS"
14946
14947 if test -n "$CXX"; then
14948 echo "$as_me:14948: checking if $CXX accepts parameter initialization" >&5
14949 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14950 if test "${cf_cv_cpp_param_init+set}" = set; then
14951   echo $ECHO_N "(cached) $ECHO_C" >&6
14952 else
14953
14954         ac_ext=cc
14955 ac_cpp='$CXXCPP $CPPFLAGS'
14956 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14957 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14958 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14959 ac_main_return=return
14960
14961         if test "$cross_compiling" = yes; then
14962   cf_cv_cpp_param_init=unknown
14963 else
14964   cat >conftest.$ac_ext <<_ACEOF
14965 #line 14965 "configure"
14966 #include "confdefs.h"
14967
14968 class TEST {
14969 private:
14970         int value;
14971 public:
14972         TEST(int x = 1);
14973         ~TEST();
14974 };
14975
14976 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14977 {
14978         value = x;
14979 }
14980 void main() { }
14981
14982 _ACEOF
14983 rm -f conftest$ac_exeext
14984 if { (eval echo "$as_me:14984: \"$ac_link\"") >&5
14985   (eval $ac_link) 2>&5
14986   ac_status=$?
14987   echo "$as_me:14987: \$? = $ac_status" >&5
14988   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14989   { (eval echo "$as_me:14989: \"$ac_try\"") >&5
14990   (eval $ac_try) 2>&5
14991   ac_status=$?
14992   echo "$as_me:14992: \$? = $ac_status" >&5
14993   (exit $ac_status); }; }; then
14994   cf_cv_cpp_param_init=yes
14995 else
14996   echo "$as_me: program exited with status $ac_status" >&5
14997 echo "$as_me: failed program was:" >&5
14998 cat conftest.$ac_ext >&5
14999 cf_cv_cpp_param_init=no
15000 fi
15001 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15002 fi
15003         ac_ext=cc
15004 ac_cpp='$CXXCPP $CPPFLAGS'
15005 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15006 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15007 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15008 ac_main_return=return
15009
15010 fi
15011 echo "$as_me:15011: result: $cf_cv_cpp_param_init" >&5
15012 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15013 fi
15014 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15015 #define CPP_HAS_PARAM_INIT 1
15016 EOF
15017
15018 if test -n "$CXX"; then
15019
15020 echo "$as_me:15020: checking if $CXX accepts static_cast" >&5
15021 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15022 if test "${cf_cv_cpp_static_cast+set}" = set; then
15023   echo $ECHO_N "(cached) $ECHO_C" >&6
15024 else
15025
15026         ac_ext=cc
15027 ac_cpp='$CXXCPP $CPPFLAGS'
15028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15031 ac_main_return=return
15032
15033         cat >conftest.$ac_ext <<_ACEOF
15034 #line 15034 "configure"
15035 #include "confdefs.h"
15036
15037 class NCursesPanel
15038 {
15039 public:
15040   NCursesPanel(int nlines,
15041                int ncols,
15042                int begin_y = 0,
15043                int begin_x = 0)
15044   {
15045   }
15046
15047   ~NCursesPanel();
15048 };
15049
15050 template<class T> class NCursesUserPanel : public NCursesPanel
15051 {
15052 public:
15053   NCursesUserPanel (int nlines,
15054                     int ncols,
15055                     int begin_y = 0,
15056                     int begin_x = 0,
15057                     const T* p_UserData = static_cast<T*>(0))
15058     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15059   {
15060   };
15061   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15062   {
15063   };
15064
15065   virtual ~NCursesUserPanel() {};
15066 };
15067
15068 int
15069 main ()
15070 {
15071
15072         const char* p_UserData = static_cast<char*>(0)
15073   ;
15074   return 0;
15075 }
15076 _ACEOF
15077 rm -f conftest.$ac_objext
15078 if { (eval echo "$as_me:15078: \"$ac_compile\"") >&5
15079   (eval $ac_compile) 2>&5
15080   ac_status=$?
15081   echo "$as_me:15081: \$? = $ac_status" >&5
15082   (exit $ac_status); } &&
15083          { ac_try='test -s conftest.$ac_objext'
15084   { (eval echo "$as_me:15084: \"$ac_try\"") >&5
15085   (eval $ac_try) 2>&5
15086   ac_status=$?
15087   echo "$as_me:15087: \$? = $ac_status" >&5
15088   (exit $ac_status); }; }; then
15089   cf_cv_cpp_static_cast=yes
15090 else
15091   echo "$as_me: failed program was:" >&5
15092 cat conftest.$ac_ext >&5
15093 cf_cv_cpp_static_cast=no
15094 fi
15095 rm -f conftest.$ac_objext conftest.$ac_ext
15096
15097         ac_ext=cc
15098 ac_cpp='$CXXCPP $CPPFLAGS'
15099 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15100 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15101 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15102 ac_main_return=return
15103
15104 fi
15105 echo "$as_me:15105: result: $cf_cv_cpp_static_cast" >&5
15106 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15107
15108 fi
15109
15110 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15111 #define CPP_HAS_STATIC_CAST 1
15112 EOF
15113
15114         CXX_AR='$(AR)'
15115         CXX_AR_OPTS='$(AR_OPTS)'
15116         case $cf_cv_system_name in #(vi
15117         irix*) #(vi
15118             if test "$GXX" != yes ; then
15119                 CXX_AR='$(CXX)'
15120                 CXX_AR_OPTS='-ar -o'
15121             fi
15122             ;;
15123         sco3.2v5*) #(vi
15124             CXXLDFLAGS="-u main"
15125             ;;
15126         solaris2*)
15127             if test "$GXX" != yes ; then
15128                 CXX_AR='$(CXX)'
15129                 CXX_AR_OPTS='-xar -o'
15130             fi
15131             ;;
15132         esac
15133
15134 else
15135         cf_cxx_library=no
15136         cf_cv_builtin_bool=1
15137
15138         # Just because we are not configuring against C++ right now does not
15139         # mean that a user will not want to use C++.  Some distributors disable
15140         # the C++ portion of this configuration as a shortcut (or just to avoid
15141         # compiling the demo in the c++ directory).  So we need a reasonable
15142         # default for the 'bool' type.
15143         #
15144         # Caveat: since the storage of the bool type is not standardized, it
15145         # may change.
15146
15147         if test "$NCURSES_BOOL" != auto ; then
15148                 cf_cv_type_of_bool=$NCURSES_BOOL
15149                 cf_cv_header_stdbool_h=0
15150         else
15151                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15152
15153 echo "$as_me:15153: checking for size of bool" >&5
15154 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15155 if test "${cf_cv_type_of_bool+set}" = set; then
15156   echo $ECHO_N "(cached) $ECHO_C" >&6
15157 else
15158
15159         rm -f cf_test.out
15160         if test "$cross_compiling" = yes; then
15161   cf_cv_type_of_bool=unknown
15162 else
15163   cat >conftest.$ac_ext <<_ACEOF
15164 #line 15164 "configure"
15165 #include "confdefs.h"
15166
15167 #include <stdlib.h>
15168 #include <stdio.h>
15169
15170 #if defined(__cplusplus)
15171
15172 #ifdef HAVE_GXX_BUILTIN_H
15173 #include <g++/builtin.h>
15174 #elif HAVE_GPP_BUILTIN_H
15175 #include <gpp/builtin.h>
15176 #elif HAVE_BUILTIN_H
15177 #include <builtin.h>
15178 #endif
15179
15180 #else
15181
15182 #if $cf_cv_header_stdbool_h
15183 #include <stdbool.h>
15184 #endif
15185
15186 #endif
15187
15188 main()
15189 {
15190         FILE *fp = fopen("cf_test.out", "w");
15191         if (fp != 0) {
15192                 bool x = true;
15193                 if ((bool)(-x) >= 0)
15194                         fputs("unsigned ", fp);
15195                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15196                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15197                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15198                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15199                 fclose(fp);
15200         }
15201         ${cf_cv_main_return:-return}(0);
15202 }
15203
15204 _ACEOF
15205 rm -f conftest$ac_exeext
15206 if { (eval echo "$as_me:15206: \"$ac_link\"") >&5
15207   (eval $ac_link) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15211   { (eval echo "$as_me:15211: \"$ac_try\"") >&5
15212   (eval $ac_try) 2>&5
15213   ac_status=$?
15214   echo "$as_me:15214: \$? = $ac_status" >&5
15215   (exit $ac_status); }; }; then
15216   cf_cv_type_of_bool=`cat cf_test.out`
15217                  if test -z "$cf_cv_type_of_bool"; then
15218                    cf_cv_type_of_bool=unknown
15219                  fi
15220 else
15221   echo "$as_me: program exited with status $ac_status" >&5
15222 echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 cf_cv_type_of_bool=unknown
15225 fi
15226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15227 fi
15228
15229 fi
15230
15231         rm -f cf_test.out
15232 echo "$as_me:15232: result: $cf_cv_type_of_bool" >&5
15233 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15234 if test "$cf_cv_type_of_bool" = unknown ; then
15235         case .$NCURSES_BOOL in #(vi
15236         .auto|.) NCURSES_BOOL=unsigned;;
15237         esac
15238         { echo "$as_me:15238: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15239 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15240         cf_cv_type_of_bool=$NCURSES_BOOL
15241 fi
15242
15243                 else
15244                         echo "$as_me:15244: checking for fallback type of bool" >&5
15245 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15246                         case "$host_cpu" in #(vi
15247                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15248                         *)      cf_cv_type_of_bool=int  ;;
15249                         esac
15250                         echo "$as_me:15250: result: $cf_cv_type_of_bool" >&5
15251 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15252                 fi
15253         fi
15254 fi
15255
15256 # If the C compiler did not declare bool, and we did not determine that the C++
15257 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15258 # ncurses library use the same type as C++ bool.  Note that this allows one to
15259 # specify the type of bool in a configure-script option and postpone
15260 # integration with the C++ compiler provided that the types are compatible.
15261 USE_CXX_BOOL=1
15262 if test $cf_cv_cc_bool_type = 1
15263 then
15264         # oops: C has a bool.  Unlikely, but C++ could differ.
15265         USE_CXX_BOOL=0
15266 elif test $cf_cv_builtin_bool = 0
15267 then
15268         # C++ has no bool
15269         USE_CXX_BOOL=0
15270 else
15271         # this is the normal case
15272         USE_CXX_BOOL='defined(__cplusplus)'
15273 fi
15274
15275 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15276
15277 if test "$cf_with_ada" != "no" ; then
15278     if test "$with_libtool" != "no"; then
15279         { echo "$as_me:15279: WARNING: libtool does not support Ada - disabling feature" >&5
15280 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15281         cf_with_ada=no
15282     fi
15283 fi
15284
15285 if test "$cf_with_ada" != "no" ; then
15286 cf_ada_make=gnatmake
15287 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15288 set dummy $cf_ada_make; ac_word=$2
15289 echo "$as_me:15289: checking for $ac_word" >&5
15290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15291 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15292   echo $ECHO_N "(cached) $ECHO_C" >&6
15293 else
15294   if test -n "$gnat_exists"; then
15295   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15296 else
15297   ac_save_IFS=$IFS; IFS=$ac_path_separator
15298 ac_dummy="$PATH"
15299 for ac_dir in $ac_dummy; do
15300   IFS=$ac_save_IFS
15301   test -z "$ac_dir" && ac_dir=.
15302   $as_executable_p "$ac_dir/$ac_word" || continue
15303 ac_cv_prog_gnat_exists="yes"
15304 echo "$as_me:15304: found $ac_dir/$ac_word" >&5
15305 break
15306 done
15307
15308   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15309 fi
15310 fi
15311 gnat_exists=$ac_cv_prog_gnat_exists
15312 if test -n "$gnat_exists"; then
15313   echo "$as_me:15313: result: $gnat_exists" >&5
15314 echo "${ECHO_T}$gnat_exists" >&6
15315 else
15316   echo "$as_me:15316: result: no" >&5
15317 echo "${ECHO_T}no" >&6
15318 fi
15319
15320 if test "$ac_cv_prog_gnat_exists" = no; then
15321    cf_ada_make=
15322 else
15323
15324 echo "$as_me:15324: checking for gnat version" >&5
15325 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15326 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15327   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15328 echo "$as_me:15328: result: $cf_gnat_version" >&5
15329 echo "${ECHO_T}$cf_gnat_version" >&6
15330
15331 case $cf_gnat_version in
15332   3.1[1-9]*|3.[2-9]*|[4-9].*)
15333     cf_cv_prog_gnat_correct=yes
15334     ;;
15335   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15336      cf_cv_prog_gnat_correct=no
15337      ;;
15338 esac
15339 case $cf_gnat_version in
15340   3.[1-9]*|[4-9].*)
15341       cf_compile_generics=generics
15342       cf_generic_objects="\${GENOBJS}"
15343       ;;
15344   *)  cf_compile_generics=
15345       cf_generic_objects=
15346       ;;
15347 esac
15348
15349    # Extract the first word of "m4", so it can be a program name with args.
15350 set dummy m4; ac_word=$2
15351 echo "$as_me:15351: checking for $ac_word" >&5
15352 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15353 if test "${ac_cv_prog_M4_exists+set}" = set; then
15354   echo $ECHO_N "(cached) $ECHO_C" >&6
15355 else
15356   if test -n "$M4_exists"; then
15357   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15358 else
15359   ac_save_IFS=$IFS; IFS=$ac_path_separator
15360 ac_dummy="$PATH"
15361 for ac_dir in $ac_dummy; do
15362   IFS=$ac_save_IFS
15363   test -z "$ac_dir" && ac_dir=.
15364   $as_executable_p "$ac_dir/$ac_word" || continue
15365 ac_cv_prog_M4_exists="yes"
15366 echo "$as_me:15366: found $ac_dir/$ac_word" >&5
15367 break
15368 done
15369
15370   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15371 fi
15372 fi
15373 M4_exists=$ac_cv_prog_M4_exists
15374 if test -n "$M4_exists"; then
15375   echo "$as_me:15375: result: $M4_exists" >&5
15376 echo "${ECHO_T}$M4_exists" >&6
15377 else
15378   echo "$as_me:15378: result: no" >&5
15379 echo "${ECHO_T}no" >&6
15380 fi
15381
15382    if test "$ac_cv_prog_M4_exists" = no; then
15383       cf_cv_prog_gnat_correct=no
15384       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15385    fi
15386    if test "$cf_cv_prog_gnat_correct" = yes; then
15387       echo "$as_me:15387: checking if GNAT works" >&5
15388 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15389
15390 rm -f conftest*
15391 cat >>conftest.ads <<CF_EOF
15392 procedure conftest;
15393 CF_EOF
15394 cat >>conftest.adb <<CF_EOF
15395 with Text_IO;
15396 with GNAT.OS_Lib;
15397 procedure conftest is
15398 begin
15399    Text_IO.Put ("Hello World");
15400    Text_IO.New_Line;
15401    GNAT.OS_Lib.OS_Exit (0);
15402 end conftest;
15403 CF_EOF
15404 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15405    if ( ./conftest 1>&5 2>&1 ) ; then
15406       cf_cv_prog_gnat_correct=yes
15407    else
15408       cf_cv_prog_gnat_correct=no
15409    fi
15410 else
15411    cf_cv_prog_gnat_correct=no
15412 fi
15413 rm -f conftest*
15414
15415       echo "$as_me:15415: result: $cf_cv_prog_gnat_correct" >&5
15416 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15417    fi
15418 fi
15419 if test "$cf_cv_prog_gnat_correct" = yes; then
15420    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15421
15422    echo "$as_me:15422: checking if GNAT pragma Unreferenced works" >&5
15423 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15424
15425 rm -f conftest*
15426 cat >>conftest.ads <<CF_EOF
15427 procedure conftest;
15428 CF_EOF
15429 cat >>conftest.adb <<CF_EOF
15430 with Text_IO;
15431 with GNAT.OS_Lib;
15432 procedure conftest is
15433    test : Integer;
15434    pragma Unreferenced (test);
15435 begin
15436    test := 1;
15437    Text_IO.Put ("Hello World");
15438    Text_IO.New_Line;
15439    GNAT.OS_Lib.OS_Exit (0);
15440 end conftest;
15441 CF_EOF
15442 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15443       cf_cv_pragma_unreferenced=yes
15444 else
15445    cf_cv_pragma_unreferenced=no
15446 fi
15447 rm -f conftest*
15448
15449    echo "$as_me:15449: result: $cf_cv_pragma_unreferenced" >&5
15450 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15451
15452    # if the pragma is supported, use it (needed in the Trace code).
15453    if test $cf_cv_pragma_unreferenced = yes ; then
15454       PRAGMA_UNREF=TRUE
15455    else
15456       PRAGMA_UNREF=FALSE
15457    fi
15458
15459 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15460 if test "${with_ada_compiler+set}" = set; then
15461   withval="$with_ada_compiler"
15462   cf_ada_compiler=$withval
15463 else
15464   cf_ada_compiler=gnatmake
15465 fi;
15466
15467    cf_ada_package=terminal_interface
15468
15469 # Check whether --with-ada-include or --without-ada-include was given.
15470 if test "${with_ada_include+set}" = set; then
15471   withval="$with_ada_include"
15472
15473 else
15474   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15475 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15476
15477 if test "x$prefix" != xNONE; then
15478   cf_path_syntax="$prefix"
15479 else
15480   cf_path_syntax="$ac_default_prefix"
15481 fi
15482
15483 case ".$withval" in #(vi
15484 .\$\(*\)*|.\'*\'*) #(vi
15485   ;;
15486 ..|./*|.\\*) #(vi
15487   ;;
15488 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15489   ;;
15490 .\${*prefix}*) #(vi
15491   eval withval="$withval"
15492   case ".$withval" in #(vi
15493   .NONE/*)
15494     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15495     ;;
15496   esac
15497   ;; #(vi
15498 .no|.NONE/*)
15499   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15500   ;;
15501 *)
15502   { { echo "$as_me:15502: error: expected a pathname, not \"$withval\"" >&5
15503 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15504    { (exit 1); exit 1; }; }
15505   ;;
15506 esac
15507
15508 fi
15509 ADA_INCLUDE="$withval"
15510
15511 # Check whether --with-ada-objects or --without-ada-objects was given.
15512 if test "${with_ada_objects+set}" = set; then
15513   withval="$with_ada_objects"
15514
15515 else
15516   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15517 fi; if test -n "$prefix/lib/ada/adalib" ; then
15518
15519 if test "x$prefix" != xNONE; then
15520   cf_path_syntax="$prefix"
15521 else
15522   cf_path_syntax="$ac_default_prefix"
15523 fi
15524
15525 case ".$withval" in #(vi
15526 .\$\(*\)*|.\'*\'*) #(vi
15527   ;;
15528 ..|./*|.\\*) #(vi
15529   ;;
15530 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15531   ;;
15532 .\${*prefix}*) #(vi
15533   eval withval="$withval"
15534   case ".$withval" in #(vi
15535   .NONE/*)
15536     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15537     ;;
15538   esac
15539   ;; #(vi
15540 .no|.NONE/*)
15541   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15542   ;;
15543 *)
15544   { { echo "$as_me:15544: error: expected a pathname, not \"$withval\"" >&5
15545 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15546    { (exit 1); exit 1; }; }
15547   ;;
15548 esac
15549
15550 fi
15551 ADA_OBJECTS="$withval"
15552
15553 fi
15554 fi
15555 else
15556    cf_with_ada=no
15557 fi
15558
15559 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15560 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15561 ###
15562 ### ticlib modules may be a separate library, otherwise contained in termlib.
15563 ### termlib modules may be a separate library, otherwise contained in ncurses.
15564 ###
15565 ### The of "+" or " " between the tokens controls the way the script
15566 ### chooses to split module lists into libraries.
15567 ###
15568 ### (see CF_LIB_RULES).
15569 echo "$as_me:15569: checking for library subsets" >&5
15570 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15571 LIB_SUBSETS=
15572
15573 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15574         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15575         if test "$with_ticlib" != no ; then
15576                 LIB_SUBSETS="${LIB_SUBSETS} "
15577         else
15578                 LIB_SUBSETS="${LIB_SUBSETS}+"
15579         fi
15580 fi
15581
15582 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15583 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15584 if test "$with_termlib" != no ; then
15585         LIB_SUBSETS="${LIB_SUBSETS} "
15586 else
15587         LIB_SUBSETS="${LIB_SUBSETS}+"
15588 fi
15589
15590 LIB_SUBSETS="${LIB_SUBSETS}base"
15591 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15592 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15593
15594 echo "$as_me:15594: result: $LIB_SUBSETS" >&5
15595 echo "${ECHO_T}$LIB_SUBSETS" >&6
15596
15597 ### Construct the list of include-directories to be generated
15598
15599 CPPFLAGS="-I. -I../include $CPPFLAGS"
15600 if test "$srcdir" != "."; then
15601         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15602 fi
15603 if test "$GCC" != yes; then
15604         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15605 elif test "$includedir" != "/usr/include"; then
15606         if test "$includedir" = '${prefix}/include' ; then
15607                 if test $prefix != /usr ; then
15608                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15609                 fi
15610         else
15611                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15612         fi
15613 fi
15614
15615 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15616 if test "$srcdir" != "."; then
15617         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15618 fi
15619 if test "$GCC" != yes; then
15620         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15621 elif test "$includedir" != "/usr/include"; then
15622         if test "$includedir" = '${prefix}/include' ; then
15623                 if test $prefix != /usr ; then
15624                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15625                 fi
15626         else
15627                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15628         fi
15629 fi
15630
15631 ### Build up pieces for makefile rules
15632 echo "$as_me:15632: checking default library suffix" >&5
15633 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15634
15635         case $DFT_LWR_MODEL in
15636         libtool) DFT_ARG_SUFFIX=''   ;;
15637         normal)  DFT_ARG_SUFFIX=''   ;;
15638         debug)   DFT_ARG_SUFFIX='_g' ;;
15639         profile) DFT_ARG_SUFFIX='_p' ;;
15640         shared)  DFT_ARG_SUFFIX=''   ;;
15641         esac
15642         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15643 echo "$as_me:15643: result: $DFT_ARG_SUFFIX" >&5
15644 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15645
15646 echo "$as_me:15646: checking default library-dependency suffix" >&5
15647 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15648
15649         case $DFT_LWR_MODEL in
15650         libtool) DFT_DEP_SUFFIX='.la'  ;;
15651         normal)  DFT_DEP_SUFFIX='.a'   ;;
15652         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15653         profile) DFT_DEP_SUFFIX='_p.a' ;;
15654         shared)
15655                 case $cf_cv_system_name in
15656                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15657                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15658                 hpux*)
15659                         case $target in
15660                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15661                         *)      DFT_DEP_SUFFIX='.sl' ;;
15662                         esac
15663                         ;;
15664                 *)      DFT_DEP_SUFFIX='.so'  ;;
15665                 esac
15666         esac
15667         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15668 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15669 if test $DFT_LWR_MODEL = shared ; then
15670         case $cf_cv_system_name in #(vi
15671         cygwin*)
15672                 DFT_DEP_SUFFIX=".dll.a"
15673                 DFT_LIB_SUFFIX=".dll"
15674                 ;;
15675         esac
15676 fi
15677 echo "$as_me:15677: result: $DFT_DEP_SUFFIX" >&5
15678 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15679
15680 echo "$as_me:15680: checking default object directory" >&5
15681 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15682
15683         case $DFT_LWR_MODEL in
15684         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15685         normal)  DFT_OBJ_SUBDIR='objects' ;;
15686         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15687         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15688         shared)
15689                 case $cf_cv_system_name in #(vi
15690                 cygwin) #(vi
15691                         DFT_OBJ_SUBDIR='objects' ;;
15692                 *)
15693                         DFT_OBJ_SUBDIR='obj_s' ;;
15694                 esac
15695         esac
15696 echo "$as_me:15696: result: $DFT_OBJ_SUBDIR" >&5
15697 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15698
15699 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15700 if test "$cf_with_cxx" = yes ; then
15701 echo "$as_me:15701: checking c++ library-dependency suffix" >&5
15702 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15703 if test "$with_libtool" != "no"; then
15704         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15705 else
15706
15707         case normal in
15708         libtool) CXX_LIB_SUFFIX='.la'  ;;
15709         normal)  CXX_LIB_SUFFIX='.a'   ;;
15710         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15711         profile) CXX_LIB_SUFFIX='_p.a' ;;
15712         shared)
15713                 case $cf_cv_system_name in
15714                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15715                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15716                 hpux*)
15717                         case $target in
15718                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15719                         *)      CXX_LIB_SUFFIX='.sl' ;;
15720                         esac
15721                         ;;
15722                 *)      CXX_LIB_SUFFIX='.so'  ;;
15723                 esac
15724         esac
15725         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15726 fi
15727 echo "$as_me:15727: result: $CXX_LIB_SUFFIX" >&5
15728 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15729
15730 fi
15731
15732 # do not want -ldl in build except as needed for -lncurses dependency
15733 if test "$with_dlsym" = yes ; then
15734 if test $DFT_LWR_MODEL = shared || \
15735    test $DFT_LWR_MODEL = libtool ; then
15736
15737 # remove dl library from $LIBS
15738 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15739
15740 fi
15741 fi
15742 ### Set up low-level terminfo dependencies for makefiles.
15743
15744 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15745 # do not need libdl
15746 TICS_LIST=
15747 if test "$with_dlsym" = yes ; then
15748
15749 # remove dl library from $SHLIB_LIST
15750 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15751
15752 fi
15753
15754 if test "$with_ticlib" != no ; then
15755
15756         if test "$with_ticlib" != yes ; then
15757                 TICS_NAME=$with_ticlib
15758                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15759                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15760                 TICS_LIB_SUFFIX="${with_ticlib}"
15761         else
15762                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15763                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15764                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15765         fi
15766         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15767 else
15768         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15769 fi
15770
15771 if test "$with_termlib" != no ; then
15772
15773         if test "$with_termlib" != yes ; then
15774                 TINFO_NAME=$with_termlib
15775                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15776                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15777                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15778                 TINFO_LIB_SUFFIX="${with_termlib}"
15779         else
15780                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15781                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15782                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15783                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15784         fi
15785
15786         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15787         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15788         if test "$DFT_LWR_MODEL" = "libtool"; then
15789                 TEST_ARGS="${TEST_DEPS}"
15790                 TEST_ARG2="${TEST_DEP2}"
15791                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15792         else
15793                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15794                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15795                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15796                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15797                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15798         fi
15799 else
15800         # the next lines are needed for linking libtic over libncurses
15801         TINFO_NAME=${LIB_NAME}
15802         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15803         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15804         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15805
15806         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15807 fi
15808
15809 if test "$DFT_LWR_MODEL" = shared ; then
15810         case $cf_cv_system_name in #(vi
15811         cygwin*)
15812                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15813                 TINFO_SUFFIX=.dll
15814                 ;;
15815         esac
15816 fi
15817
15818 if test "$with_dlsym" = yes ; then
15819
15820 # remove dl library from $TICS_LIST
15821 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15822
15823 fi
15824
15825 if test "$DFT_LWR_MODEL" = "libtool"; then
15826     OBJEXT=lo
15827 fi
15828
15829 # needed for Ada95
15830 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15831
15832 case $DFT_LWR_MODEL in
15833 normal|debug|profile)
15834
15835 if test "$GCC" = yes ; then
15836         case $cf_cv_system_name in #(
15837         aix[45]*)       #( gcc 4.2.4 linkage on AIX is broken
15838                 LDFLAGS_STATIC=
15839                 LDFLAGS_SHARED=
15840                 ;;
15841     *)  #( normally, except when broken
15842         LDFLAGS_STATIC=-static
15843         LDFLAGS_SHARED=-dynamic
15844         ;;
15845     esac
15846 else
15847         case $cf_cv_system_name in #(
15848         aix[45]*)       #( from ld manpage
15849                 LDFLAGS_STATIC=-bstatic
15850                 LDFLAGS_SHARED=-bdynamic
15851                 ;;
15852         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15853                 # We could also use just "archive" and "shared".
15854                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15855                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15856                 ;;
15857         irix*)          #( from ld manpage IRIX64
15858                 LDFLAGS_STATIC=-Bstatic
15859                 LDFLAGS_SHARED=-Bdynamic
15860                 ;;
15861         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15862                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15863                 LDFLAGS_STATIC=-noso
15864                 LDFLAGS_SHARED=-so_archive
15865                 ;;
15866         solaris2*)
15867                 LDFLAGS_STATIC=-Bstatic
15868                 LDFLAGS_SHARED=-Bdynamic
15869                 ;;
15870         esac
15871 fi
15872
15873         ;;
15874 esac
15875
15876 echo "$as_me:15876: checking where we will install curses.h" >&5
15877 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15878 test "$with_overwrite" = no && \
15879 test "x$includedir" = 'x${prefix}/include' && \
15880         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15881 echo "$as_me:15881: result: $includedir" >&5
15882 echo "${ECHO_T}$includedir" >&6
15883
15884 ### Resolve a conflict between normal and wide-curses by forcing applications
15885 ### that will need libutf8 to add it to their configure script.
15886 if test "$with_overwrite" != no ; then
15887 if test "$NCURSES_LIBUTF8" = 1 ; then
15888         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15889         { echo "$as_me:15889: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15890 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15891 fi
15892 fi
15893
15894 # used to separate tack out of the tree
15895 NCURSES_TREE=
15896
15897 ### predefined stuff for the test programs
15898 cat >>confdefs.h <<\EOF
15899 #define HAVE_SLK_COLOR 1
15900 EOF
15901
15902 ### Construct the list of subdirectories for which we'll customize makefiles
15903 ### with the appropriate compile-rules.
15904
15905 echo "$as_me:15905: checking for src modules" >&5
15906 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15907
15908 # dependencies and linker-arguments for test-programs
15909 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15910 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15911 if test "$DFT_LWR_MODEL" = "libtool"; then
15912         TEST_ARGS="${TEST_DEPS}"
15913         TEST_ARG2="${TEST_DEP2}"
15914 else
15915         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15916         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15917 fi
15918
15919 cf_cv_src_modules=
15920 for cf_dir in $modules_to_build
15921 do
15922         if test -f $srcdir/$cf_dir/modules; then
15923
15924                 # We may/may not have tack in the distribution, though the
15925                 # makefile is.
15926                 if test $cf_dir = tack ; then
15927                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15928                                 continue
15929                         fi
15930                 fi
15931
15932                 if test -z "$cf_cv_src_modules"; then
15933                         cf_cv_src_modules=$cf_dir
15934                 else
15935                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15936                 fi
15937
15938                 # Make the ncurses_cfg.h file record the library interface files as
15939                 # well.  These are header files that are the same name as their
15940                 # directory.  Ncurses is the only library that does not follow
15941                 # that pattern.
15942                 if test $cf_dir = tack ; then
15943                         continue
15944                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15945
15946 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15947
15948                         cat >>confdefs.h <<EOF
15949 #define HAVE_${cf_have_include}_H 1
15950 EOF
15951
15952                         cat >>confdefs.h <<EOF
15953 #define HAVE_LIB${cf_have_include} 1
15954 EOF
15955
15956                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15957                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15958                         if test "$DFT_LWR_MODEL" = "libtool"; then
15959                                 TEST_ARGS="${TEST_DEPS}"
15960                                 TEST_ARG2="${TEST_DEP2}"
15961                         else
15962                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15963                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15964                         fi
15965                 fi
15966         fi
15967 done
15968 echo "$as_me:15968: result: $cf_cv_src_modules" >&5
15969 echo "${ECHO_T}$cf_cv_src_modules" >&6
15970
15971 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15972 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15973
15974 SRC_SUBDIRS="man include"
15975 for cf_dir in $cf_cv_src_modules
15976 do
15977         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15978 done
15979 SRC_SUBDIRS="$SRC_SUBDIRS test"
15980 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15981 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15982
15983 ADA_SUBDIRS=
15984 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15985    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15986    ADA_SUBDIRS="gen src samples"
15987 fi
15988
15989 SUB_MAKEFILES=
15990 for cf_dir in $SRC_SUBDIRS
15991 do
15992         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15993 done
15994
15995 if test -n "$ADA_SUBDIRS"; then
15996    for cf_dir in $ADA_SUBDIRS
15997    do
15998       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15999    done
16000
16001 fi
16002
16003 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16004    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16005 fi
16006
16007 DIRS_TO_MAKE="lib"
16008 for cf_item in $cf_list_models
16009 do
16010
16011         case $cf_item in
16012         libtool) cf_subdir='obj_lo'  ;;
16013         normal)  cf_subdir='objects' ;;
16014         debug)   cf_subdir='obj_g' ;;
16015         profile) cf_subdir='obj_p' ;;
16016         shared)
16017                 case $cf_cv_system_name in #(vi
16018                 cygwin) #(vi
16019                         cf_subdir='objects' ;;
16020                 *)
16021                         cf_subdir='obj_s' ;;
16022                 esac
16023         esac
16024
16025         for cf_item2 in $DIRS_TO_MAKE
16026         do
16027                 test $cf_item2 = $cf_subdir && break
16028         done
16029         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16030 done
16031 for cf_dir in $DIRS_TO_MAKE
16032 do
16033         test ! -d $cf_dir && mkdir $cf_dir
16034 done
16035
16036 cat >>confdefs.h <<EOF
16037 #define NCURSES_PATHSEP '$PATHSEP'
16038 EOF
16039
16040 cat >>confdefs.h <<EOF
16041 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16042 EOF
16043
16044 ### Now that we're done running tests, add the compiler-warnings, if any
16045
16046 cf_fix_cppflags=no
16047 cf_new_cflags=
16048 cf_new_cppflags=
16049 cf_new_extra_cppflags=
16050
16051 for cf_add_cflags in $EXTRA_CFLAGS
16052 do
16053 case $cf_fix_cppflags in
16054 no)
16055         case $cf_add_cflags in #(vi
16056         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16057                 case $cf_add_cflags in
16058                 -D*)
16059                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16060
16061                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16062                         && test -z "${cf_tst_cflags}" \
16063                         && cf_fix_cppflags=yes
16064
16065                         if test $cf_fix_cppflags = yes ; then
16066                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16067                                 continue
16068                         elif test "${cf_tst_cflags}" = "\"'" ; then
16069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16070                                 continue
16071                         fi
16072                         ;;
16073                 esac
16074                 case "$CPPFLAGS" in
16075                 *$cf_add_cflags) #(vi
16076                         ;;
16077                 *) #(vi
16078                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16079                         ;;
16080                 esac
16081                 ;;
16082         *)
16083                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16084                 ;;
16085         esac
16086         ;;
16087 yes)
16088         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16089
16090         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16091
16092         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16093         && test -z "${cf_tst_cflags}" \
16094         && cf_fix_cppflags=no
16095         ;;
16096 esac
16097 done
16098
16099 if test -n "$cf_new_cflags" ; then
16100
16101         CFLAGS="$CFLAGS $cf_new_cflags"
16102 fi
16103
16104 if test -n "$cf_new_cppflags" ; then
16105
16106         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16107 fi
16108
16109 if test -n "$cf_new_extra_cppflags" ; then
16110
16111         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16112 fi
16113
16114 ### If we're building with rpath, try to link non-standard libs that way too.
16115 if test "$DFT_LWR_MODEL" = "shared"; then
16116
16117 echo "$as_me:16117: checking for updated LDFLAGS" >&5
16118 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16119 if test -n "$LDFLAGS" ; then
16120 echo "$as_me:16120: result: maybe" >&5
16121 echo "${ECHO_T}maybe" >&6
16122 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16123
16124 echo "${as_me-configure}:16124: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16125
16126 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16127
16128 echo "${as_me-configure}:16128: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16129
16130 case "$EXTRA_LDFLAGS" in #(vi
16131 -Wl,-rpath,*) #(vi
16132     cf_rpath_hack="-Wl,-rpath,"
16133     ;;
16134 -R\ *)
16135     cf_rpath_hack="-R "
16136     ;;
16137 -R*)
16138     cf_rpath_hack="-R"
16139     ;;
16140 *)
16141     cf_rpath_hack=
16142     ;;
16143 esac
16144 if test -n "$cf_rpath_hack" ; then
16145     cf_rpath_dst=
16146     for cf_rpath_src in $LDFLAGS
16147     do
16148         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16149
16150 echo "${as_me-configure}:16150: testing Filtering $cf_rpath_src ..." 1>&5
16151
16152         case $cf_rpath_src in #(vi
16153         -L*) #(vi
16154             if test "$cf_rpath_hack" = "-R " ; then
16155                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16156             else
16157                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16158             fi
16159             test -n "$verbose" && echo "        ...Filter $cf_rpath_tmp" 1>&6
16160
16161 echo "${as_me-configure}:16161: testing ...Filter $cf_rpath_tmp ..." 1>&5
16162
16163             EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16164             ;;
16165         *)
16166             cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16167             ;;
16168         esac
16169     done
16170     LDFLAGS=$cf_rpath_dst
16171     test -n "$verbose" && echo "        ...checked LDFLAGS $LDFLAGS" 1>&6
16172
16173 echo "${as_me-configure}:16173: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16174
16175     test -n "$verbose" && echo "        ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16176
16177 echo "${as_me-configure}:16177: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16178
16179 fi
16180 else
16181 echo "$as_me:16181: result: no" >&5
16182 echo "${ECHO_T}no" >&6
16183 fi
16184
16185 fi
16186
16187 ### Define substitutions for header files to avoid name-pollution
16188
16189 if test "$cf_cv_have_tcgetattr" = yes ; then
16190         HAVE_TCGETATTR=1
16191 else
16192         HAVE_TCGETATTR=0
16193 fi
16194
16195 if test "$ac_cv_header_termio_h" = yes ; then
16196         HAVE_TERMIO_H=1
16197 else
16198         HAVE_TERMIO_H=0
16199 fi
16200
16201 if test "$ac_cv_header_termios_h" = yes ; then
16202         HAVE_TERMIOS_H=1
16203 else
16204         HAVE_TERMIOS_H=0
16205 fi
16206
16207 ################################################################################
16208 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16209 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16210 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"
16211 ac_config_commands="$ac_config_commands default"
16212 cat >confcache <<\_ACEOF
16213 # This file is a shell script that caches the results of configure
16214 # tests run on this system so they can be shared between configure
16215 # scripts and configure runs, see configure's option --config-cache.
16216 # It is not useful on other systems.  If it contains results you don't
16217 # want to keep, you may remove or edit it.
16218 #
16219 # config.status only pays attention to the cache file if you give it
16220 # the --recheck option to rerun configure.
16221 #
16222 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16223 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16224 # following values.
16225
16226 _ACEOF
16227
16228 # The following way of writing the cache mishandles newlines in values,
16229 # but we know of no workaround that is simple, portable, and efficient.
16230 # So, don't put newlines in cache variables' values.
16231 # Ultrix sh set writes to stderr and can't be redirected directly,
16232 # and sets the high bit in the cache file unless we assign to the vars.
16233 {
16234   (set) 2>&1 |
16235     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16236     *ac_space=\ *)
16237       # `set' does not quote correctly, so add quotes (double-quote
16238       # substitution turns \\\\ into \\, and sed turns \\ into \).
16239       sed -n \
16240         "s/'/'\\\\''/g;
16241           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16242       ;;
16243     *)
16244       # `set' quotes correctly as required by POSIX, so do not add quotes.
16245       sed -n \
16246         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16247       ;;
16248     esac;
16249 } |
16250   sed '
16251      t clear
16252      : clear
16253      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16254      t end
16255      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16256      : end' >>confcache
16257 if cmp -s $cache_file confcache; then :; else
16258   if test -w $cache_file; then
16259     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16260     cat confcache >$cache_file
16261   else
16262     echo "not updating unwritable cache $cache_file"
16263   fi
16264 fi
16265 rm -f confcache
16266
16267 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16268 # Let make expand exec_prefix.
16269 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16270
16271 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16272 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16273 # trailing colons and then remove the whole line if VPATH becomes empty
16274 # (actually we leave an empty line to preserve line numbers).
16275 if test "x$srcdir" = x.; then
16276   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16277 s/:*\$(srcdir):*/:/;
16278 s/:*\${srcdir}:*/:/;
16279 s/:*@srcdir@:*/:/;
16280 s/^\([^=]*=[    ]*\):*/\1/;
16281 s/:*$//;
16282 s/^[^=]*=[      ]*$//;
16283 }'
16284 fi
16285
16286 DEFS=-DHAVE_CONFIG_H
16287
16288 : ${CONFIG_STATUS=./config.status}
16289 ac_clean_files_save=$ac_clean_files
16290 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16291 { echo "$as_me:16291: creating $CONFIG_STATUS" >&5
16292 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16293 cat >$CONFIG_STATUS <<_ACEOF
16294 #! $SHELL
16295 # Generated automatically by configure.
16296 # Run this file to recreate the current configuration.
16297 # Compiler output produced by configure, useful for debugging
16298 # configure, is in config.log if it exists.
16299
16300 debug=false
16301 SHELL=\${CONFIG_SHELL-$SHELL}
16302 ac_cs_invocation="\$0 \$@"
16303
16304 _ACEOF
16305
16306 cat >>$CONFIG_STATUS <<\_ACEOF
16307 # Be Bourne compatible
16308 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16309   emulate sh
16310   NULLCMD=:
16311 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16312   set -o posix
16313 fi
16314
16315 # Name of the executable.
16316 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16317
16318 if expr a : '\(a\)' >/dev/null 2>&1; then
16319   as_expr=expr
16320 else
16321   as_expr=false
16322 fi
16323
16324 rm -f conf$$ conf$$.exe conf$$.file
16325 echo >conf$$.file
16326 if ln -s conf$$.file conf$$ 2>/dev/null; then
16327   # We could just check for DJGPP; but this test a) works b) is more generic
16328   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16329   if test -f conf$$.exe; then
16330     # Don't use ln at all; we don't have any links
16331     as_ln_s='cp -p'
16332   else
16333     as_ln_s='ln -s'
16334   fi
16335 elif ln conf$$.file conf$$ 2>/dev/null; then
16336   as_ln_s=ln
16337 else
16338   as_ln_s='cp -p'
16339 fi
16340 rm -f conf$$ conf$$.exe conf$$.file
16341
16342 as_executable_p="test -f"
16343
16344 # Support unset when possible.
16345 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16346   as_unset=unset
16347 else
16348   as_unset=false
16349 fi
16350
16351 # NLS nuisances.
16352 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16353 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16354 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16355 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16356 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16357 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16358 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16359 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16360
16361 # IFS
16362 # We need space, tab and new line, in precisely that order.
16363 as_nl='
16364 '
16365 IFS="   $as_nl"
16366
16367 # CDPATH.
16368 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16369
16370 exec 6>&1
16371
16372 _ACEOF
16373
16374 # Files that config.status was made for.
16375 if test -n "$ac_config_files"; then
16376   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16377 fi
16378
16379 if test -n "$ac_config_headers"; then
16380   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16381 fi
16382
16383 if test -n "$ac_config_links"; then
16384   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16385 fi
16386
16387 if test -n "$ac_config_commands"; then
16388   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16389 fi
16390
16391 cat >>$CONFIG_STATUS <<\EOF
16392
16393 ac_cs_usage="\
16394 \`$as_me' instantiates files from templates according to the
16395 current configuration.
16396
16397 Usage: $0 [OPTIONS] [FILE]...
16398
16399   -h, --help       print this help, then exit
16400   -V, --version    print version number, then exit
16401   -d, --debug      don't remove temporary files
16402       --recheck    update $as_me by reconfiguring in the same conditions
16403   --file=FILE[:TEMPLATE]
16404                    instantiate the configuration file FILE
16405   --header=FILE[:TEMPLATE]
16406                    instantiate the configuration header FILE
16407
16408 Configuration files:
16409 $config_files
16410
16411 Configuration headers:
16412 $config_headers
16413
16414 Configuration commands:
16415 $config_commands
16416
16417 Report bugs to <bug-autoconf@gnu.org>."
16418 EOF
16419
16420 cat >>$CONFIG_STATUS <<EOF
16421 ac_cs_version="\\
16422 config.status
16423 configured by $0, generated by GNU Autoconf 2.52.20080325,
16424   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16425
16426 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16427 Free Software Foundation, Inc.
16428 This config.status script is free software; the Free Software Foundation
16429 gives unlimited permission to copy, distribute and modify it."
16430 srcdir=$srcdir
16431 INSTALL="$INSTALL"
16432 EOF
16433
16434 cat >>$CONFIG_STATUS <<\EOF
16435 # If no file are specified by the user, then we need to provide default
16436 # value.  By we need to know if files were specified by the user.
16437 ac_need_defaults=:
16438 while test $# != 0
16439 do
16440   case $1 in
16441   --*=*)
16442     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16443     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16444     shift
16445     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16446     shift
16447     ;;
16448   -*);;
16449   *) # This is not an option, so the user has probably given explicit
16450      # arguments.
16451      ac_need_defaults=false;;
16452   esac
16453
16454   case $1 in
16455   # Handling of the options.
16456 EOF
16457 cat >>$CONFIG_STATUS <<EOF
16458   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16459     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16460     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16461 EOF
16462 cat >>$CONFIG_STATUS <<\EOF
16463   --version | --vers* | -V )
16464     echo "$ac_cs_version"; exit 0 ;;
16465   --he | --h)
16466     # Conflict between --help and --header
16467     { { echo "$as_me:16467: error: ambiguous option: $1
16468 Try \`$0 --help' for more information." >&5
16469 echo "$as_me: error: ambiguous option: $1
16470 Try \`$0 --help' for more information." >&2;}
16471    { (exit 1); exit 1; }; };;
16472   --help | --hel | -h )
16473     echo "$ac_cs_usage"; exit 0 ;;
16474   --debug | --d* | -d )
16475     debug=: ;;
16476   --file | --fil | --fi | --f )
16477     shift
16478     CONFIG_FILES="$CONFIG_FILES $1"
16479     ac_need_defaults=false;;
16480   --header | --heade | --head | --hea )
16481     shift
16482     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16483     ac_need_defaults=false;;
16484
16485   # This is an error.
16486   -*) { { echo "$as_me:16486: error: unrecognized option: $1
16487 Try \`$0 --help' for more information." >&5
16488 echo "$as_me: error: unrecognized option: $1
16489 Try \`$0 --help' for more information." >&2;}
16490    { (exit 1); exit 1; }; } ;;
16491
16492   *) ac_config_targets="$ac_config_targets $1" ;;
16493
16494   esac
16495   shift
16496 done
16497
16498 exec 5>>config.log
16499 cat >&5 << _ACEOF
16500
16501 ## ----------------------- ##
16502 ## Running config.status.  ##
16503 ## ----------------------- ##
16504
16505 This file was extended by $as_me 2.52.20080325, executed with
16506   CONFIG_FILES    = $CONFIG_FILES
16507   CONFIG_HEADERS  = $CONFIG_HEADERS
16508   CONFIG_LINKS    = $CONFIG_LINKS
16509   CONFIG_COMMANDS = $CONFIG_COMMANDS
16510   > $ac_cs_invocation
16511 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16512
16513 _ACEOF
16514 EOF
16515
16516 cat >>$CONFIG_STATUS <<EOF
16517 #
16518 # INIT-COMMANDS section.
16519 #
16520
16521 ### Special initialization commands, used to pass information from the
16522 ### configuration-run into config.status
16523
16524 AWK="$AWK"
16525 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16526 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16527 ECHO_LINK="$ECHO_LINK"
16528 LDCONFIG="$LDCONFIG"
16529 LIB_NAME="$LIB_NAME"
16530 LIB_SUBSETS="$LIB_SUBSETS"
16531 LIB_SUFFIX="$LIB_SUFFIX"
16532 LIB_TRACING="$LIB_TRACING"
16533 MAKE_TERMINFO="$MAKE_TERMINFO"
16534 NCURSES_MAJOR="$NCURSES_MAJOR"
16535 NCURSES_MINOR="$NCURSES_MINOR"
16536 NCURSES_OSPEED="$NCURSES_OSPEED"
16537 NCURSES_PATCH="$NCURSES_PATCH"
16538 SRC_SUBDIRS="$SRC_SUBDIRS"
16539 TERMINFO="$TERMINFO"
16540 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16541 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16542 TINFO_NAME="$TINFO_NAME"
16543 TINFO_SUFFIX="$TINFO_SUFFIX"
16544 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16545 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16546 TICS_NAME="$TICS_NAME"
16547 WITH_CURSES_H="$with_curses_h"
16548 WITH_ECHO="$with_echo"
16549 WITH_OVERWRITE="$with_overwrite"
16550 cf_LIST_MODELS="$cf_list_models"
16551 cf_cv_abi_version="$cf_cv_abi_version"
16552 cf_cv_do_relink="$cf_cv_do_relink"
16553 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16554 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16555 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16556 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16557 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16558 cf_cv_rel_version="$cf_cv_rel_version"
16559 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16560 cf_cv_shlib_version="$cf_cv_shlib_version"
16561 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16562 cf_cv_system_name="$cf_cv_system_name"
16563 cf_with_cxx_binding="$cf_with_cxx_binding"
16564 host="$host"
16565 target="$target"
16566
16567 EOF
16568
16569 cat >>$CONFIG_STATUS <<\EOF
16570 for ac_config_target in $ac_config_targets
16571 do
16572   case "$ac_config_target" in
16573   # Handling of arguments.
16574   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16575   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16576   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16577   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16578   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16579   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16580   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16581   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16582   *) { { echo "$as_me:16582: error: invalid argument: $ac_config_target" >&5
16583 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16584    { (exit 1); exit 1; }; };;
16585   esac
16586 done
16587
16588 # If the user did not use the arguments to specify the items to instantiate,
16589 # then the envvar interface is used.  Set only those that are not.
16590 # We use the long form for the default assignment because of an extremely
16591 # bizarre bug on SunOS 4.1.3.
16592 if $ac_need_defaults; then
16593   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16594   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16595   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16596 fi
16597
16598 # Create a temporary directory, and hook for its removal unless debugging.
16599 $debug ||
16600 {
16601   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16602   trap '{ (exit 1); exit 1; }' 1 2 13 15
16603 }
16604
16605 # Create a (secure) tmp directory for tmp files.
16606 : ${TMPDIR=/tmp}
16607 {
16608   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16609   test -n "$tmp" && test -d "$tmp"
16610 }  ||
16611 {
16612   tmp=$TMPDIR/cs$$-$RANDOM
16613   (umask 077 && mkdir $tmp)
16614 } ||
16615 {
16616    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16617    { (exit 1); exit 1; }
16618 }
16619
16620 EOF
16621
16622 cat >>$CONFIG_STATUS <<EOF
16623
16624 #
16625 # CONFIG_FILES section.
16626 #
16627
16628 # No need to generate the scripts if there are no CONFIG_FILES.
16629 # This happens for instance when ./config.status config.h
16630 if test -n "\$CONFIG_FILES"; then
16631   # Protect against being on the right side of a sed subst in config.status.
16632   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16633    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16634 s,@SHELL@,$SHELL,;t t
16635 s,@exec_prefix@,$exec_prefix,;t t
16636 s,@prefix@,$prefix,;t t
16637 s,@program_transform_name@,$program_transform_name,;t t
16638 s,@bindir@,$bindir,;t t
16639 s,@sbindir@,$sbindir,;t t
16640 s,@libexecdir@,$libexecdir,;t t
16641 s,@datadir@,$datadir,;t t
16642 s,@sysconfdir@,$sysconfdir,;t t
16643 s,@sharedstatedir@,$sharedstatedir,;t t
16644 s,@localstatedir@,$localstatedir,;t t
16645 s,@libdir@,$libdir,;t t
16646 s,@includedir@,$includedir,;t t
16647 s,@oldincludedir@,$oldincludedir,;t t
16648 s,@infodir@,$infodir,;t t
16649 s,@mandir@,$mandir,;t t
16650 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16651 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16652 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16653 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16654 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16655 s,@build_alias@,$build_alias,;t t
16656 s,@host_alias@,$host_alias,;t t
16657 s,@target_alias@,$target_alias,;t t
16658 s,@ECHO_C@,$ECHO_C,;t t
16659 s,@ECHO_N@,$ECHO_N,;t t
16660 s,@ECHO_T@,$ECHO_T,;t t
16661 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16662 s,@DEFS@,$DEFS,;t t
16663 s,@LIBS@,$LIBS,;t t
16664 s,@top_builddir@,$top_builddir,;t t
16665 s,@EGREP@,$EGREP,;t t
16666 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16667 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16668 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16669 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16670 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16671 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16672 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16673 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16674 s,@build@,$build,;t t
16675 s,@build_cpu@,$build_cpu,;t t
16676 s,@build_vendor@,$build_vendor,;t t
16677 s,@build_os@,$build_os,;t t
16678 s,@host@,$host,;t t
16679 s,@host_cpu@,$host_cpu,;t t
16680 s,@host_vendor@,$host_vendor,;t t
16681 s,@host_os@,$host_os,;t t
16682 s,@target@,$target,;t t
16683 s,@target_cpu@,$target_cpu,;t t
16684 s,@target_vendor@,$target_vendor,;t t
16685 s,@target_os@,$target_os,;t t
16686 s,@CC@,$CC,;t t
16687 s,@CFLAGS@,$CFLAGS,;t t
16688 s,@LDFLAGS@,$LDFLAGS,;t t
16689 s,@CPPFLAGS@,$CPPFLAGS,;t t
16690 s,@ac_ct_CC@,$ac_ct_CC,;t t
16691 s,@EXEEXT@,$EXEEXT,;t t
16692 s,@OBJEXT@,$OBJEXT,;t t
16693 s,@CPP@,$CPP,;t t
16694 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16695 s,@PROG_EXT@,$PROG_EXT,;t t
16696 s,@LDCONFIG@,$LDCONFIG,;t t
16697 s,@CXX@,$CXX,;t t
16698 s,@CXXFLAGS@,$CXXFLAGS,;t t
16699 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16700 s,@AWK@,$AWK,;t t
16701 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16702 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16703 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16704 s,@LINT@,$LINT,;t t
16705 s,@LINT_OPTS@,$LINT_OPTS,;t t
16706 s,@LN_S@,$LN_S,;t t
16707 s,@SET_MAKE@,$SET_MAKE,;t t
16708 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16709 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16710 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16711 s,@RANLIB@,$RANLIB,;t t
16712 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16713 s,@LD@,$LD,;t t
16714 s,@ac_ct_LD@,$ac_ct_LD,;t t
16715 s,@AR@,$AR,;t t
16716 s,@ac_ct_AR@,$ac_ct_AR,;t t
16717 s,@AR_OPTS@,$AR_OPTS,;t t
16718 s,@DESTDIR@,$DESTDIR,;t t
16719 s,@BUILD_CC@,$BUILD_CC,;t t
16720 s,@BUILD_CPP@,$BUILD_CPP,;t t
16721 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16722 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16723 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16724 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16725 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16726 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16727 s,@cf_list_models@,$cf_list_models,;t t
16728 s,@LIBTOOL@,$LIBTOOL,;t t
16729 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16730 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16731 s,@LIB_CREATE@,$LIB_CREATE,;t t
16732 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16733 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16734 s,@LIB_PREP@,$LIB_PREP,;t t
16735 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16736 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16737 s,@LIB_LINK@,$LIB_LINK,;t t
16738 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16739 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16740 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16741 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16742 s,@TICS_NAME@,$TICS_NAME,;t t
16743 s,@TINFO_NAME@,$TINFO_NAME,;t t
16744 s,@LIB_NAME@,$LIB_NAME,;t t
16745 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16746 s,@CC_G_OPT@,$CC_G_OPT,;t t
16747 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16748 s,@LD_MODEL@,$LD_MODEL,;t t
16749 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16750 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16751 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16752 s,@LINK_PROGS@,$LINK_PROGS,;t t
16753 s,@LINK_TESTS@,$LINK_TESTS,;t t
16754 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16755 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16756 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16757 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16758 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16759 s,@PATHSEP@,$PATHSEP,;t t
16760 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16761 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16762 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16763 s,@TERMINFO@,$TERMINFO,;t t
16764 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16765 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16766 s,@TERMPATH@,$TERMPATH,;t t
16767 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16768 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16769 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16770 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16771 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16772 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16773 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16774 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16775 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16776 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16777 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16778 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16779 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16780 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16781 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16782 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16783 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16784 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16785 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16786 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16787 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16788 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16789 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16790 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16791 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16792 s,@ECHO_LINK@,$ECHO_LINK,;t t
16793 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16794 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16795 s,@ADA_TRACE@,$ADA_TRACE,;t t
16796 s,@MATH_LIB@,$MATH_LIB,;t t
16797 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16798 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16799 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16800 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16801 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16802 s,@TEST_LIBS@,$TEST_LIBS,;t t
16803 s,@CXXCPP@,$CXXCPP,;t t
16804 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16805 s,@CXX_AR@,$CXX_AR,;t t
16806 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16807 s,@CXXLIBS@,$CXXLIBS,;t t
16808 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16809 s,@gnat_exists@,$gnat_exists,;t t
16810 s,@M4_exists@,$M4_exists,;t t
16811 s,@cf_ada_make@,$cf_ada_make,;t t
16812 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16813 s,@cf_ada_package@,$cf_ada_package,;t t
16814 s,@ADAFLAGS@,$ADAFLAGS,;t t
16815 s,@cf_compile_generics@,$cf_compile_generics,;t t
16816 s,@cf_generic_objects@,$cf_generic_objects,;t t
16817 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16818 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16819 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16820 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16821 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16822 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16823 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16824 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16825 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16826 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16827 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16828 s,@TICS_ARGS@,$TICS_ARGS,;t t
16829 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16830 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16831 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16832 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16833 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16834 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16835 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16836 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16837 s,@TICS_LIST@,$TICS_LIST,;t t
16838 s,@TINFO_LIST@,$TINFO_LIST,;t t
16839 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16840 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16841 s,@TEST_ARGS@,$TEST_ARGS,;t t
16842 s,@TEST_DEPS@,$TEST_DEPS,;t t
16843 s,@TEST_ARG2@,$TEST_ARG2,;t t
16844 s,@TEST_DEP2@,$TEST_DEP2,;t t
16845 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16846 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16847 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16848 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16849 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16850 CEOF
16851
16852 EOF
16853
16854   cat >>$CONFIG_STATUS <<\EOF
16855   # Split the substitutions into bite-sized pieces for seds with
16856   # small command number limits, like on Digital OSF/1 and HP-UX.
16857   ac_max_sed_lines=48
16858   ac_sed_frag=1 # Number of current file.
16859   ac_beg=1 # First line for current file.
16860   ac_end=$ac_max_sed_lines # Line after last line for current file.
16861   ac_more_lines=:
16862   ac_sed_cmds=
16863   while $ac_more_lines; do
16864     if test $ac_beg -gt 1; then
16865       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16866     else
16867       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16868     fi
16869     if test ! -s $tmp/subs.frag; then
16870       ac_more_lines=false
16871     else
16872       # The purpose of the label and of the branching condition is to
16873       # speed up the sed processing (if there are no `@' at all, there
16874       # is no need to browse any of the substitutions).
16875       # These are the two extra sed commands mentioned above.
16876       (echo ':t
16877   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16878       if test -z "$ac_sed_cmds"; then
16879         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16880       else
16881         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16882       fi
16883       ac_sed_frag=`expr $ac_sed_frag + 1`
16884       ac_beg=$ac_end
16885       ac_end=`expr $ac_end + $ac_max_sed_lines`
16886     fi
16887   done
16888   if test -z "$ac_sed_cmds"; then
16889     ac_sed_cmds=cat
16890   fi
16891 fi # test -n "$CONFIG_FILES"
16892
16893 EOF
16894 cat >>$CONFIG_STATUS <<\EOF
16895 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16896   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16897   case $ac_file in
16898   - | *:- | *:-:* ) # input from stdin
16899         cat >$tmp/stdin
16900         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16901         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16902   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16903         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16904   * )   ac_file_in=$ac_file.in ;;
16905   esac
16906
16907   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16908   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16909          X"$ac_file" : 'X\(//\)[^/]' \| \
16910          X"$ac_file" : 'X\(//\)$' \| \
16911          X"$ac_file" : 'X\(/\)' \| \
16912          .     : '\(.\)' 2>/dev/null ||
16913 echo X"$ac_file" |
16914     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16915           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16916           /^X\(\/\/\)$/{ s//\1/; q; }
16917           /^X\(\/\).*/{ s//\1/; q; }
16918           s/.*/./; q'`
16919   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16920     { case "$ac_dir" in
16921   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16922   *)                      as_incr_dir=.;;
16923 esac
16924 as_dummy="$ac_dir"
16925 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16926   case $as_mkdir_dir in
16927     # Skip DOS drivespec
16928     ?:) as_incr_dir=$as_mkdir_dir ;;
16929     *)
16930       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16931       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16932     ;;
16933   esac
16934 done; }
16935
16936     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16937     # A "../" for each directory in $ac_dir_suffix.
16938     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16939   else
16940     ac_dir_suffix= ac_dots=
16941   fi
16942
16943   case $srcdir in
16944   .)  ac_srcdir=.
16945       if test -z "$ac_dots"; then
16946          ac_top_srcdir=.
16947       else
16948          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16949       fi ;;
16950   [\\/]* | ?:[\\/]* )
16951       ac_srcdir=$srcdir$ac_dir_suffix;
16952       ac_top_srcdir=$srcdir ;;
16953   *) # Relative path.
16954     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16955     ac_top_srcdir=$ac_dots$srcdir ;;
16956   esac
16957
16958   case $INSTALL in
16959   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16960   *) ac_INSTALL=$ac_dots$INSTALL ;;
16961   esac
16962
16963   if test x"$ac_file" != x-; then
16964     { echo "$as_me:16964: creating $ac_file" >&5
16965 echo "$as_me: creating $ac_file" >&6;}
16966     rm -f "$ac_file"
16967   fi
16968   # Let's still pretend it is `configure' which instantiates (i.e., don't
16969   # use $as_me), people would be surprised to read:
16970   #    /* config.h.  Generated automatically by config.status.  */
16971   configure_input="Generated automatically from `echo $ac_file_in |
16972                                                  sed 's,.*/,,'` by configure."
16973
16974   # First look for the input files in the build tree, otherwise in the
16975   # src tree.
16976   ac_file_inputs=`IFS=:
16977     for f in $ac_file_in; do
16978       case $f in
16979       -) echo $tmp/stdin ;;
16980       [\\/$]*)
16981          # Absolute (can't be DOS-style, as IFS=:)
16982          test -f "$f" || { { echo "$as_me:16982: error: cannot find input file: $f" >&5
16983 echo "$as_me: error: cannot find input file: $f" >&2;}
16984    { (exit 1); exit 1; }; }
16985          echo $f;;
16986       *) # Relative
16987          if test -f "$f"; then
16988            # Build tree
16989            echo $f
16990          elif test -f "$srcdir/$f"; then
16991            # Source tree
16992            echo $srcdir/$f
16993          else
16994            # /dev/null tree
16995            { { echo "$as_me:16995: error: cannot find input file: $f" >&5
16996 echo "$as_me: error: cannot find input file: $f" >&2;}
16997    { (exit 1); exit 1; }; }
16998          fi;;
16999       esac
17000     done` || { (exit 1); exit 1; }
17001 EOF
17002 cat >>$CONFIG_STATUS <<EOF
17003   sed "$ac_vpsub
17004 $extrasub
17005 EOF
17006 cat >>$CONFIG_STATUS <<\EOF
17007 :t
17008 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17009 s,@configure_input@,$configure_input,;t t
17010 s,@srcdir@,$ac_srcdir,;t t
17011 s,@top_srcdir@,$ac_top_srcdir,;t t
17012 s,@INSTALL@,$ac_INSTALL,;t t
17013 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17014   rm -f $tmp/stdin
17015   if test x"$ac_file" != x-; then
17016     mv $tmp/out $ac_file
17017   else
17018     cat $tmp/out
17019     rm -f $tmp/out
17020   fi
17021
17022 done
17023 EOF
17024 cat >>$CONFIG_STATUS <<\EOF
17025
17026 #
17027 # CONFIG_HEADER section.
17028 #
17029
17030 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17031 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17032 #
17033 # ac_d sets the value in "#define NAME VALUE" lines.
17034 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17035 ac_dB='[        ].*$,\1#\2'
17036 ac_dC=' '
17037 ac_dD=',;t'
17038 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17039 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17040 ac_iB='\([      ]\),\1#\2define\3'
17041 ac_iC=' '
17042 ac_iD='\4,;t'
17043 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17044 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17045 ac_uB='$,\1#\2define\3'
17046 ac_uC=' '
17047 ac_uD=',;t'
17048
17049 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17050   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17051   case $ac_file in
17052   - | *:- | *:-:* ) # input from stdin
17053         cat >$tmp/stdin
17054         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17055         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17056   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17057         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17058   * )   ac_file_in=$ac_file.in ;;
17059   esac
17060
17061   test x"$ac_file" != x- && { echo "$as_me:17061: creating $ac_file" >&5
17062 echo "$as_me: creating $ac_file" >&6;}
17063
17064   # First look for the input files in the build tree, otherwise in the
17065   # src tree.
17066   ac_file_inputs=`IFS=:
17067     for f in $ac_file_in; do
17068       case $f in
17069       -) echo $tmp/stdin ;;
17070       [\\/$]*)
17071          # Absolute (can't be DOS-style, as IFS=:)
17072          test -f "$f" || { { echo "$as_me:17072: error: cannot find input file: $f" >&5
17073 echo "$as_me: error: cannot find input file: $f" >&2;}
17074    { (exit 1); exit 1; }; }
17075          echo $f;;
17076       *) # Relative
17077          if test -f "$f"; then
17078            # Build tree
17079            echo $f
17080          elif test -f "$srcdir/$f"; then
17081            # Source tree
17082            echo $srcdir/$f
17083          else
17084            # /dev/null tree
17085            { { echo "$as_me:17085: error: cannot find input file: $f" >&5
17086 echo "$as_me: error: cannot find input file: $f" >&2;}
17087    { (exit 1); exit 1; }; }
17088          fi;;
17089       esac
17090     done` || { (exit 1); exit 1; }
17091   # Remove the trailing spaces.
17092   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17093
17094 EOF
17095
17096 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17097 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17098 # be either 'cat' or 'sort'.
17099 cat confdefs.h | uniq >conftest.vals
17100
17101 # Break up conftest.vals because some shells have a limit on
17102 # the size of here documents, and old seds have small limits too.
17103
17104 rm -f conftest.tail
17105 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17106 while grep . conftest.vals >/dev/null
17107 do
17108   # Write chunks of a limited-size here document to conftest.frag.
17109   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17110   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17111   echo 'CEOF' >> $CONFIG_STATUS
17112   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17113   rm -f conftest.vals
17114   mv conftest.tail conftest.vals
17115 done
17116 rm -f conftest.vals
17117
17118 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17119 # marker @DEFS@.
17120 echo '  cat >> conftest.edit <<CEOF
17121 /@DEFS@/r conftest.frag
17122 /@DEFS@/d
17123 CEOF
17124 sed -f conftest.edit $tmp/in > $tmp/out
17125 rm -f $tmp/in
17126 mv $tmp/out $tmp/in
17127 rm -f conftest.edit conftest.frag
17128 ' >> $CONFIG_STATUS
17129
17130 cat >>$CONFIG_STATUS <<\EOF
17131   # Let's still pretend it is `configure' which instantiates (i.e., don't
17132   # use $as_me), people would be surprised to read:
17133   #    /* config.h.  Generated automatically by config.status.  */
17134   if test x"$ac_file" = x-; then
17135     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17136   else
17137     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17138   fi
17139   cat $tmp/in >>$tmp/config.h
17140   rm -f $tmp/in
17141   if test x"$ac_file" != x-; then
17142     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17143       { echo "$as_me:17143: $ac_file is unchanged" >&5
17144 echo "$as_me: $ac_file is unchanged" >&6;}
17145     else
17146       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17147          X"$ac_file" : 'X\(//\)[^/]' \| \
17148          X"$ac_file" : 'X\(//\)$' \| \
17149          X"$ac_file" : 'X\(/\)' \| \
17150          .     : '\(.\)' 2>/dev/null ||
17151 echo X"$ac_file" |
17152     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17153           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17154           /^X\(\/\/\)$/{ s//\1/; q; }
17155           /^X\(\/\).*/{ s//\1/; q; }
17156           s/.*/./; q'`
17157       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17158         { case "$ac_dir" in
17159   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17160   *)                      as_incr_dir=.;;
17161 esac
17162 as_dummy="$ac_dir"
17163 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17164   case $as_mkdir_dir in
17165     # Skip DOS drivespec
17166     ?:) as_incr_dir=$as_mkdir_dir ;;
17167     *)
17168       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17169       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17170     ;;
17171   esac
17172 done; }
17173
17174       fi
17175       rm -f $ac_file
17176       mv $tmp/config.h $ac_file
17177     fi
17178   else
17179     cat $tmp/config.h
17180     rm -f $tmp/config.h
17181   fi
17182 done
17183 EOF
17184 cat >>$CONFIG_STATUS <<\EOF
17185
17186 #
17187 # CONFIG_COMMANDS section.
17188 #
17189 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17190   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17191   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17192
17193   case $ac_dest in
17194     default )
17195
17196 for cf_dir in test
17197 do
17198         if test ! -d $srcdir/$cf_dir; then
17199                 continue
17200         elif test -f $srcdir/$cf_dir/programs; then
17201                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17202         fi
17203 done
17204
17205         case $cf_cv_system_name in
17206         OS/2*)  LIB_PREFIX=''     ;;
17207         os2*)   LIB_PREFIX=''     ;;
17208         *)      LIB_PREFIX='lib'  ;;
17209         esac
17210 cf_prefix=$LIB_PREFIX
17211
17212 for cf_dir in $SRC_SUBDIRS
17213 do
17214         if test ! -d $srcdir/$cf_dir ; then
17215                 continue
17216         elif test -f $srcdir/$cf_dir/modules; then
17217
17218                 SHARED_LIB=
17219                 LIBS_TO_MAKE=
17220                 for cf_item in $cf_LIST_MODELS
17221                 do
17222
17223         case $cf_item in
17224         libtool) cf_suffix='.la'  ;;
17225         normal)  cf_suffix='.a'   ;;
17226         debug)   cf_suffix='_g.a' ;;
17227         profile) cf_suffix='_p.a' ;;
17228         shared)
17229                 case $cf_cv_system_name in
17230                 cygwin*) cf_suffix='.dll' ;;
17231                 darwin*) cf_suffix='.dylib' ;;
17232                 hpux*)
17233                         case $target in
17234                         ia64*)  cf_suffix='.so' ;;
17235                         *)      cf_suffix='.sl' ;;
17236                         esac
17237                         ;;
17238                 *)      cf_suffix='.so'  ;;
17239                 esac
17240         esac
17241         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17242
17243                         if test $cf_item = shared ; then
17244                         if test "$cf_cv_do_symlinks" = yes ; then
17245                                 case "$cf_cv_shlib_version" in #(vi
17246                                 rel) #(vi
17247                                         case "$cf_cv_system_name" in #(vi
17248                                         darwin*)
17249                                         case .${LIB_SUFFIX} in
17250                                         .w*)
17251                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17252                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17253                                                 ;;
17254                                         *)
17255                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17256                                                 ;;
17257                                         esac
17258                                         ;; #(vi
17259                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17260                                         esac
17261                                         ;;
17262                                 abi)
17263                                         case "$cf_cv_system_name" in #(vi
17264                                         darwin*)
17265                                         case .${LIB_SUFFIX} in
17266                                         .w*)
17267                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17268                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17269                                                 ;;
17270                                         *)
17271                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17272                                                 ;;
17273                                         esac
17274                                         ;; #(vi
17275                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17276                                         esac
17277                                         ;;
17278                                 esac
17279                         fi
17280                         # cygwin needs import library, and has unique naming convention
17281                         # use autodetected ${cf_prefix} for import lib and static lib, but
17282                         # use 'cyg' prefix for shared lib.
17283                         if test $cf_cv_shlib_version = cygdll ; then
17284                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
17285                                 continue
17286                         fi
17287                         fi
17288                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17289                 done
17290
17291                 if test $cf_dir = ncurses ; then
17292                         cf_subsets="$LIB_SUBSETS"
17293                         cf_r_parts="$cf_subsets"
17294
17295                         while test -n "$cf_r_parts"
17296                         do
17297                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17298                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17299                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17300                                         case $cf_l_parts in #(vi
17301                                         *termlib*) #(vi
17302                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17303                                                 ;;
17304                                         *ticlib*)
17305                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17306                                                 ;;
17307                                         *)
17308                                                 break
17309                                                 ;;
17310                                         esac
17311                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17312                                 else
17313                                         break
17314                                 fi
17315                         done
17316                 else
17317                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17318                 fi
17319
17320                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17321                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17322                         $cf_dir/Makefile >$cf_dir/Makefile.out
17323                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17324
17325                 $AWK -f $srcdir/mk-0th.awk \
17326                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17327                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17328
17329                 for cf_subset in $cf_subsets
17330                 do
17331                         cf_subdirs=
17332                         for cf_item in $cf_LIST_MODELS
17333                         do
17334                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17335
17336 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17337
17338         case $cf_item in
17339         libtool) cf_suffix='.la'  ;;
17340         normal)  cf_suffix='.a'   ;;
17341         debug)   cf_suffix='_g.a' ;;
17342         profile) cf_suffix='_p.a' ;;
17343         shared)
17344                 case $cf_cv_system_name in
17345                 cygwin*) cf_suffix='.dll' ;;
17346                 darwin*) cf_suffix='.dylib' ;;
17347                 hpux*)
17348                         case $target in
17349                         ia64*)  cf_suffix='.so' ;;
17350                         *)      cf_suffix='.sl' ;;
17351                         esac
17352                         ;;
17353                 *)      cf_suffix='.so'  ;;
17354                 esac
17355         esac
17356         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17357
17358         case $cf_item in
17359         libtool) cf_subdir='obj_lo'  ;;
17360         normal)  cf_subdir='objects' ;;
17361         debug)   cf_subdir='obj_g' ;;
17362         profile) cf_subdir='obj_p' ;;
17363         shared)
17364                 case $cf_cv_system_name in #(vi
17365                 cygwin) #(vi
17366                         cf_subdir='objects' ;;
17367                 *)
17368                         cf_subdir='obj_s' ;;
17369                 esac
17370         esac
17371
17372                         # Test for case where we build libtinfo with a different name.
17373                         cf_libname=$cf_dir
17374                         if test $cf_dir = ncurses ; then
17375                                 case $cf_subset in
17376                                 *base*)
17377                                         ;;
17378                                 *termlib*)
17379                                         cf_libname=$TINFO_LIB_SUFFIX
17380                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17381                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17382                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17383                                         fi
17384                                         ;;
17385                                 ticlib*)
17386                                         cf_libname=$TICS_LIB_SUFFIX
17387                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17388                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17389                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17390                                         fi
17391                                         ;;
17392                                 esac
17393                         fi
17394
17395                         # These dependencies really are for development, not
17396                         # builds, but they are useful in porting, too.
17397                         cf_depend="../include/ncurses_cfg.h"
17398                         if test "$srcdir" = "."; then
17399                                 cf_reldir="."
17400                         else
17401                                 cf_reldir="\${srcdir}"
17402                         fi
17403
17404                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17405                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17406                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17407                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17408                         fi
17409
17410                         cf_dir_suffix=
17411                         old_cf_suffix="$cf_suffix"
17412                         if test "$cf_cv_shlib_version_infix" = yes ; then
17413                         if test -n "$LIB_SUFFIX" ; then
17414                                 case $LIB_SUFFIX in
17415                                 w*)
17416                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17417                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17418                                         cf_dir_suffix=w
17419                                         ;;
17420                                 esac
17421                         fi
17422                         fi
17423
17424                         $AWK -f $srcdir/mk-1st.awk \
17425                                 name=${cf_libname}${cf_dir_suffix} \
17426                                 traces=$LIB_TRACING \
17427                                 MODEL=$cf_ITEM \
17428                                 model=$cf_subdir \
17429                                 prefix=$cf_prefix \
17430                                 suffix=$cf_suffix \
17431                                 subset=$cf_subset \
17432                                 TermlibRoot=$TINFO_NAME \
17433                                 TermlibSuffix=$TINFO_SUFFIX \
17434                                 ShlibVer=$cf_cv_shlib_version \
17435                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17436                                 ReLink=${cf_cv_do_relink-no} \
17437                                 DoLinks=$cf_cv_do_symlinks \
17438                                 rmSoLocs=$cf_cv_rm_so_locs \
17439                                 ldconfig="$LDCONFIG" \
17440                                 overwrite=$WITH_OVERWRITE \
17441                                 depend="$cf_depend" \
17442                                 host="$host" \
17443                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17444
17445                         cf_suffix="$old_cf_suffix"
17446
17447                         for cf_subdir2 in $cf_subdirs lib
17448                         do
17449                                 test $cf_subdir = $cf_subdir2 && break
17450                         done
17451                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17452                         $AWK -f $srcdir/mk-2nd.awk \
17453                                 name=$cf_dir \
17454                                 traces=$LIB_TRACING \
17455                                 MODEL=$cf_ITEM \
17456                                 model=$cf_subdir \
17457                                 subset=$cf_subset \
17458                                 srcdir=$srcdir \
17459                                 echo=$WITH_ECHO \
17460                                 crenames=$cf_cv_prog_CC_c_o \
17461                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17462                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17463                         cf_subdirs="$cf_subdirs $cf_subdir"
17464                         done
17465                 done
17466         fi
17467
17468         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17469 done
17470
17471 for cf_dir in $SRC_SUBDIRS
17472 do
17473         if test ! -d $srcdir/$cf_dir ; then
17474                 continue
17475         fi
17476
17477         if test -f $cf_dir/Makefile ; then
17478                 case "$cf_dir" in
17479                 Ada95) #(vi
17480                         echo 'libs \' >> Makefile
17481                         echo 'install.libs \' >> Makefile
17482                         echo 'uninstall.libs ::' >> Makefile
17483                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17484                         ;;
17485                 esac
17486         fi
17487
17488         if test -f $srcdir/$cf_dir/modules; then
17489                 echo >> Makefile
17490                 if test -f $srcdir/$cf_dir/headers; then
17491 cat >> Makefile <<CF_EOF
17492 install.includes \\
17493 uninstall.includes \\
17494 CF_EOF
17495                 fi
17496 if test "$cf_dir" != "c++" ; then
17497 echo 'lint \' >> Makefile
17498 fi
17499 cat >> Makefile <<CF_EOF
17500 libs \\
17501 lintlib \\
17502 install.libs \\
17503 uninstall.libs \\
17504 install.$cf_dir \\
17505 uninstall.$cf_dir ::
17506         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17507 CF_EOF
17508         elif test -f $srcdir/$cf_dir/headers; then
17509 cat >> Makefile <<CF_EOF
17510
17511 libs \\
17512 install.libs \\
17513 uninstall.libs \\
17514 install.includes \\
17515 uninstall.includes ::
17516         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17517 CF_EOF
17518 fi
17519 done
17520
17521 cat >> Makefile <<CF_EOF
17522
17523 install.libs uninstall.libs \\
17524 install.data uninstall.data ::
17525 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17526
17527 install.man \\
17528 uninstall.man ::
17529         cd man && \${MAKE} \${CF_MFLAGS} \$@
17530
17531 distclean ::
17532         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17533         rm -f headers.sh headers.sed mk_shared_lib.sh
17534         rm -rf \${DIRS_TO_MAKE}
17535 CF_EOF
17536
17537 # Special case: tack's manpage lives in its own directory.
17538 if test -d tack ; then
17539 if test -f $srcdir/$tack.h; then
17540 cat >> Makefile <<CF_EOF
17541
17542 install.man \\
17543 uninstall.man ::
17544         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17545 CF_EOF
17546 fi
17547 fi
17548
17549 rm -f headers.sed headers.sh
17550
17551 echo creating headers.sh
17552 cat >headers.sh <<CF_EOF
17553 #! /bin/sh
17554 # This shell script is generated by the 'configure' script.  It is invoked in a
17555 # subdirectory of the build tree.  It generates a sed-script in the parent
17556 # directory that is used to adjust includes for header files that reside in a
17557 # subdirectory of /usr/include, etc.
17558 PRG=""
17559 while test \$# != 3
17560 do
17561 PRG="\$PRG \$1"; shift
17562 done
17563 DST=\$1
17564 REF=\$2
17565 SRC=\$3
17566 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17567 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17568 echo installing \$SRC in \$DST
17569 CF_EOF
17570
17571 if test $WITH_CURSES_H = yes; then
17572         cat >>headers.sh <<CF_EOF
17573 case \$DST in
17574 /*/include/*)
17575         END=\`basename \$DST\`
17576         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17577         do
17578                 NAME=\`basename \$i\`
17579                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17580         done
17581         ;;
17582 *)
17583         echo "" >> \$TMPSED
17584         ;;
17585 esac
17586 CF_EOF
17587
17588 else
17589         cat >>headers.sh <<CF_EOF
17590 case \$DST in
17591 /*/include/*)
17592         END=\`basename \$DST\`
17593         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17594         do
17595                 NAME=\`basename \$i\`
17596                 if test "\$NAME" = "curses.h"
17597                 then
17598                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17599                         NAME=ncurses.h
17600                 fi
17601                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17602         done
17603         ;;
17604 *)
17605         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17606         ;;
17607 esac
17608 CF_EOF
17609 fi
17610 cat >>headers.sh <<CF_EOF
17611 rm -f \$TMPSRC
17612 sed -f \$TMPSED \$SRC > \$TMPSRC
17613 NAME=\`basename \$SRC\`
17614 CF_EOF
17615 if test $WITH_CURSES_H != yes; then
17616         cat >>headers.sh <<CF_EOF
17617 test "\$NAME" = "curses.h" && NAME=ncurses.h
17618 CF_EOF
17619 fi
17620 cat >>headers.sh <<CF_EOF
17621 # Just in case someone gzip'd manpages, remove the conflicting copy.
17622 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17623
17624 eval \$PRG \$TMPSRC \$DST/\$NAME
17625 rm -f \$TMPSRC \$TMPSED
17626 CF_EOF
17627
17628 chmod 0755 headers.sh
17629
17630 for cf_dir in $SRC_SUBDIRS
17631 do
17632         if test ! -d $srcdir/$cf_dir ; then
17633                 continue
17634         fi
17635
17636         if test -f $srcdir/$cf_dir/headers; then
17637                 $AWK -f $srcdir/mk-hdr.awk \
17638                         subset="$LIB_SUBSETS" \
17639                         compat="$WITH_CURSES_H" \
17640                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17641         fi
17642
17643         if test -f $srcdir/$cf_dir/modules; then
17644                 if test "$cf_dir" != "c++" ; then
17645                         cat >>$cf_dir/Makefile <<"CF_EOF"
17646 depend : ${AUTO_SRC}
17647         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17648
17649 # DO NOT DELETE THIS LINE -- make depend depends on it.
17650 CF_EOF
17651                 fi
17652         fi
17653 done
17654
17655  ;;
17656   esac
17657 done
17658 EOF
17659
17660 cat >>$CONFIG_STATUS <<\EOF
17661
17662 { (exit 0); exit 0; }
17663 EOF
17664 chmod +x $CONFIG_STATUS
17665 ac_clean_files=$ac_clean_files_save
17666
17667 # configure is writing to config.log, and then calls config.status.
17668 # config.status does its own redirection, appending to config.log.
17669 # Unfortunately, on DOS this fails, as config.log is still kept open
17670 # by configure, so config.status won't be able to write to it; its
17671 # output is simply discarded.  So we exec the FD to /dev/null,
17672 # effectively closing config.log, so it can be properly (re)opened and
17673 # appended to by config.status.  When coming back to configure, we
17674 # need to make the FD available again.
17675 if test "$no_create" != yes; then
17676   ac_cs_success=:
17677   exec 5>/dev/null
17678   $SHELL $CONFIG_STATUS || ac_cs_success=false
17679   exec 5>>config.log
17680   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17681   # would make configure fail if this is the last instruction.
17682   $ac_cs_success || { (exit 1); exit 1; }
17683 fi
17684 ${MAKE-make} preinstall