]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070728
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.422 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --with-install-prefix   prefixes actual install-location ($DESTDIR)
703 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710 Options to Specify the Libraries Built/Used:
711   --with-libtool          generate libraries with libtool
712   --with-shared           generate shared-libraries
713   --with-normal           generate normal-libraries (default)
714   --with-debug            generate debug-libraries (default)
715   --with-profile          generate profile-libraries
716   --with-termlib          generate separate terminfo library
717   --with-ticlib           generate separate tic library
718   --with-gpm              use Alessandro Rubini's GPM library
719   --without-dlsym         do not use dlsym() to load GPM dynamically
720   --with-sysmouse         use sysmouse (FreeBSD console)
721   --enable-rpath          use rpath option when generating shared libraries
722   --disable-relink        relink shared libraries during install
723   --with-shlib-version=X  Specify rel or abi version for shared libs
724 Fine-Tuning Your Configuration:
725   --disable-overwrite     leave out the link to -lcurses
726   --disable-database      do not use terminfo, only fallbacks/termcap
727   --with-database=XXX     specify terminfo source to install
728   --with-hashed-db        specify hashed-database library
729   --with-fallbacks=XXX    specify list of fallback terminal descriptions
730   --without-xterm-new     specify if xterm terminfo should be old version
731   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
732   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
733   --disable-big-core      assume machine has little memory
734   --disable-big-strings   assume compiler has only standard-size strings
735   --enable-termcap        compile in termcap fallback support
736   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
737   --enable-getcap         fast termcap load, no xrefs to terminfo
738   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
739   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
740   --disable-root-environ  restrict environment when running as root
741   --enable-symlinks       make tic use symbolic links not hard links
742   --enable-broken_linker  compile with broken-linker support code
743   --enable-bsdpad         recognize BSD-style prefix padding
744   --enable-widec          compile with wide-char/UTF-8 code
745   --disable-lp64          allow chtype to be long (ignore _LP64)
746   --disable-largefile     omit support for large files
747   --disable-tparm-varargs compile tparm() without varargs interface
748   --with-bool=TYPE        override fallback type of bool variable
749   --with-caps=alt         compile with alternate Caps file
750   --with-chtype=TYPE      override type of chtype
751   --with-ospeed=TYPE      override type of ospeed variable
752   --with-mmask-t=TYPE     override type of mmask_t
753   --with-rcs-ids          compile-in RCS identifiers
754 Options to Specify How Manpages are Installed:
755   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
756                           optionally formatted/catonly, e.g., gzip,formatted
757   --with-manpage-renames  specify manpage-renaming
758   --with-manpage-aliases  specify manpage-aliases using .so
759   --with-manpage-symlinks specify manpage-aliases using symlinks
760   --with-manpage-tbl      specify manpage processing with tbl
761 Extensions:
762   --disable-ext-funcs     disable function-extensions
763   --enable-const          compile with extra/non-standard const
764   --enable-no-padding     compile with $NCURSES_NO_PADDING code
765   --enable-signed-char    compile using signed Boolean's in term.h
766   --enable-sigwinch       compile with SIGWINCH handler
767   --enable-tcap-names     compile with user-definable terminal capabilities
768 Development Code:
769   --without-develop       disable development options
770   --enable-hard-tabs      compile with hard-tabs code
771   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
772 Experimental Code:
773   --disable-assumed-color do not assume anything about default-colors
774   --disable-hashmap       compile without hashmap scrolling-optimization
775   --enable-colorfgbg      compile with $COLORFGBG code
776   --enable-ext-colors     compile for experimental 256-color support
777   --enable-ext-mouse      compile for experimental mouse-encoding
778   --enable-reentrant      compile with experimental reentrant code
779   --enable-safe-sprintf   compile with experimental safe-sprintf code
780   --disable-scroll-hints  compile without scroll-hints code
781   --enable-wgetch-events  compile with experimental wgetch-events code
782 Testing/development Options:
783   --enable-echo           build: display "compiling" commands (default)
784   --enable-warnings       build: turn on GCC compiler warnings
785   --enable-assertions     test: turn on generation of assertion code
786   --with-dmalloc          test: use Gray Watson's dmalloc library
787   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
788   --with-valgrind         test: use valgrind
789   --disable-leaks         test: free permanent memory, analyze leaks
790   --enable-expanded       test: generate functions for certain macros
791   --disable-macros        test: use functions rather than macros
792   --with-trace            test: add trace() function to all models of ncurses
793 Ada95 Binding Options:
794   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
795   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
796   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
797
798 Some influential environment variables:
799   CC          C compiler command
800   CFLAGS      C compiler flags
801   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
802               nonstandard directory <lib dir>
803   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
804               headers in a nonstandard directory <include dir>
805   CPP         C preprocessor
806   CXX         C++ compiler command
807   CXXFLAGS    C++ compiler flags
808   CXXCPP      C++ preprocessor
809
810 Use these variables to override the choices made by `configure' or to help
811 it to find libraries and programs with nonstandard names/locations.
812
813 EOF
814 fi
815
816 if test "$ac_init_help" = "recursive"; then
817   # If there are subdirs, report their specific --help.
818   ac_popdir=`pwd`
819   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
820     cd $ac_subdir
821     # A "../" for each directory in /$ac_subdir.
822     ac_dots=`echo $ac_subdir |
823              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
824
825     case $srcdir in
826     .) # No --srcdir option.  We are building in place.
827       ac_sub_srcdir=$srcdir ;;
828     [\\/]* | ?:[\\/]* ) # Absolute path.
829       ac_sub_srcdir=$srcdir/$ac_subdir ;;
830     *) # Relative path.
831       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
832     esac
833
834     # Check for guested configure; otherwise get Cygnus style configure.
835     if test -f $ac_sub_srcdir/configure.gnu; then
836       echo
837       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
838     elif test -f $ac_sub_srcdir/configure; then
839       echo
840       $SHELL $ac_sub_srcdir/configure  --help=recursive
841     elif test -f $ac_sub_srcdir/configure.ac ||
842            test -f $ac_sub_srcdir/configure.in; then
843       echo
844       $ac_configure --help
845     else
846       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
847     fi
848     cd $ac_popdir
849   done
850 fi
851
852 test -n "$ac_init_help" && exit 0
853 if $ac_init_version; then
854   cat <<\EOF
855
856 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
857 Free Software Foundation, Inc.
858 This configure script is free software; the Free Software Foundation
859 gives unlimited permission to copy, distribute and modify it.
860 EOF
861   exit 0
862 fi
863 exec 5>config.log
864 cat >&5 <<EOF
865 This file contains any messages produced by compilers while
866 running configure, to aid debugging if configure makes a mistake.
867
868 It was created by $as_me, which was
869 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
870
871   $ $0 $@
872
873 EOF
874 {
875 cat <<_ASUNAME
876 ## ---------- ##
877 ## Platform.  ##
878 ## ---------- ##
879
880 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
881 uname -m = `(uname -m) 2>/dev/null || echo unknown`
882 uname -r = `(uname -r) 2>/dev/null || echo unknown`
883 uname -s = `(uname -s) 2>/dev/null || echo unknown`
884 uname -v = `(uname -v) 2>/dev/null || echo unknown`
885
886 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
887 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
888
889 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
890 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
891 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
892 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
893 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
894 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
895 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
896
897 PATH = $PATH
898
899 _ASUNAME
900 } >&5
901
902 cat >&5 <<EOF
903 ## ------------ ##
904 ## Core tests.  ##
905 ## ------------ ##
906
907 EOF
908
909 # Keep a trace of the command line.
910 # Strip out --no-create and --no-recursion so they do not pile up.
911 # Also quote any args containing shell meta-characters.
912 ac_configure_args=
913 ac_sep=
914 for ac_arg
915 do
916   case $ac_arg in
917   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
918   | --no-cr | --no-c) ;;
919   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
920   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
921   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
922     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
923     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
924     ac_sep=" " ;;
925   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
926      ac_sep=" " ;;
927   esac
928   # Get rid of the leading space.
929 done
930
931 # When interrupted or exit'd, cleanup temporary files, and complete
932 # config.log.  We remove comments because anyway the quotes in there
933 # would cause problems or look ugly.
934 trap 'exit_status=$?
935   # Save into config.log some information that might help in debugging.
936   echo >&5
937   echo "## ----------------- ##" >&5
938   echo "## Cache variables.  ##" >&5
939   echo "## ----------------- ##" >&5
940   echo >&5
941   # The following way of writing the cache mishandles newlines in values,
942 {
943   (set) 2>&1 |
944     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
945     *ac_space=\ *)
946       sed -n \
947         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
948           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
949       ;;
950     *)
951       sed -n \
952         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
953       ;;
954     esac;
955 } >&5
956   sed "/^$/d" confdefs.h >conftest.log
957   if test -s conftest.log; then
958     echo >&5
959     echo "## ------------ ##" >&5
960     echo "## confdefs.h.  ##" >&5
961     echo "## ------------ ##" >&5
962     echo >&5
963     cat conftest.log >&5
964   fi
965   (echo; echo) >&5
966   test "$ac_signal" != 0 &&
967     echo "$as_me: caught signal $ac_signal" >&5
968   echo "$as_me: exit $exit_status" >&5
969   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
970     exit $exit_status
971      ' 0
972 for ac_signal in 1 2 13 15; do
973   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
974 done
975 ac_signal=0
976
977 # confdefs.h avoids OS command line length limits that DEFS can exceed.
978 rm -rf conftest* confdefs.h
979 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
980 echo >confdefs.h
981
982 # Let the site file select an alternate cache file if it wants to.
983 # Prefer explicitly selected file to automatically selected ones.
984 if test -z "$CONFIG_SITE"; then
985   if test "x$prefix" != xNONE; then
986     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
987   else
988     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
989   fi
990 fi
991 for ac_site_file in $CONFIG_SITE; do
992   if test -r "$ac_site_file"; then
993     { echo "$as_me:993: loading site script $ac_site_file" >&5
994 echo "$as_me: loading site script $ac_site_file" >&6;}
995     cat "$ac_site_file" >&5
996     . "$ac_site_file"
997   fi
998 done
999
1000 if test -r "$cache_file"; then
1001   # Some versions of bash will fail to source /dev/null (special
1002   # files actually), so we avoid doing that.
1003   if test -f "$cache_file"; then
1004     { echo "$as_me:1004: loading cache $cache_file" >&5
1005 echo "$as_me: loading cache $cache_file" >&6;}
1006     case $cache_file in
1007       [\\/]* | ?:[\\/]* ) . $cache_file;;
1008       *)                      . ./$cache_file;;
1009     esac
1010   fi
1011 else
1012   { echo "$as_me:1012: creating cache $cache_file" >&5
1013 echo "$as_me: creating cache $cache_file" >&6;}
1014   >$cache_file
1015 fi
1016
1017 # Check that the precious variables saved in the cache have kept the same
1018 # value.
1019 ac_cache_corrupted=false
1020 for ac_var in `(set) 2>&1 |
1021                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1022   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1023   eval ac_new_set=\$ac_env_${ac_var}_set
1024   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1025   eval ac_new_val="\$ac_env_${ac_var}_value"
1026   case $ac_old_set,$ac_new_set in
1027     set,)
1028       { echo "$as_me:1028: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1029 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1030       ac_cache_corrupted=: ;;
1031     ,set)
1032       { echo "$as_me:1032: error: \`$ac_var' was not set in the previous run" >&5
1033 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1034       ac_cache_corrupted=: ;;
1035     ,);;
1036     *)
1037       if test "x$ac_old_val" != "x$ac_new_val"; then
1038         { echo "$as_me:1038: error: \`$ac_var' has changed since the previous run:" >&5
1039 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1040         { echo "$as_me:1040:   former value:  $ac_old_val" >&5
1041 echo "$as_me:   former value:  $ac_old_val" >&2;}
1042         { echo "$as_me:1042:   current value: $ac_new_val" >&5
1043 echo "$as_me:   current value: $ac_new_val" >&2;}
1044         ac_cache_corrupted=:
1045       fi;;
1046   esac
1047   # Pass precious variables to config.status.  It doesn't matter if
1048   # we pass some twice (in addition to the command line arguments).
1049   if test "$ac_new_set" = set; then
1050     case $ac_new_val in
1051     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1052       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1053       ac_configure_args="$ac_configure_args '$ac_arg'"
1054       ;;
1055     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1056        ;;
1057     esac
1058   fi
1059 done
1060 if $ac_cache_corrupted; then
1061   { echo "$as_me:1061: error: changes in the environment can compromise the build" >&5
1062 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1063   { { echo "$as_me:1063: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1064 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1065    { (exit 1); exit 1; }; }
1066 fi
1067
1068 ac_ext=c
1069 ac_cpp='$CPP $CPPFLAGS'
1070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1073 ac_main_return=return
1074
1075 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1076   *c*,-n*) ECHO_N= ECHO_C='
1077 ' ECHO_T='      ' ;;
1078   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1079   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1080 esac
1081 echo "#! $SHELL" >conftest.sh
1082 echo  "exit 0"   >>conftest.sh
1083 chmod +x conftest.sh
1084 if { (echo "$as_me:1084: PATH=\".;.\"; conftest.sh") >&5
1085   (PATH=".;."; conftest.sh) 2>&5
1086   ac_status=$?
1087   echo "$as_me:1087: \$? = $ac_status" >&5
1088   (exit $ac_status); }; then
1089   ac_path_separator=';'
1090 else
1091   ac_path_separator=:
1092 fi
1093 PATH_SEPARATOR="$ac_path_separator"
1094 rm -f conftest.sh
1095
1096 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1097
1098 top_builddir=`pwd`
1099
1100 echo "$as_me:1100: checking for egrep" >&5
1101 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1102 if test "${ac_cv_prog_egrep+set}" = set; then
1103   echo $ECHO_N "(cached) $ECHO_C" >&6
1104 else
1105   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1106     then ac_cv_prog_egrep='grep -E'
1107     else ac_cv_prog_egrep='egrep'
1108     fi
1109 fi
1110 echo "$as_me:1110: result: $ac_cv_prog_egrep" >&5
1111 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1112  EGREP=$ac_cv_prog_egrep
1113
1114 test -z "$EGREP" && { { echo "$as_me:1114: error: No egrep program found" >&5
1115 echo "$as_me: error: No egrep program found" >&2;}
1116    { (exit 1); exit 1; }; }
1117
1118 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1119 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1121 cf_cv_abi_version=${NCURSES_MAJOR}
1122 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1123 cf_cv_timestamp=`date`
1124 echo "$as_me:1124: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1125 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1126
1127 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1128
1129 # Check whether --with-rel-version or --without-rel-version was given.
1130 if test "${with_rel_version+set}" = set; then
1131   withval="$with_rel_version"
1132   { echo "$as_me:1132: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1133 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1134  cf_cv_rel_version=$withval
1135 fi;
1136
1137  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1138  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1139
1140 if test -n "$NCURSES_MAJOR" ; then
1141   case $NCURSES_MAJOR in #(vi
1142   [0-9]*) #(vi
1143         ;;
1144   *)
1145         { { echo "$as_me:1145: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1146 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1147    { (exit 1); exit 1; }; }
1148         ;;
1149   esac
1150 else
1151   { { echo "$as_me:1151: error: Release major-version value is empty" >&5
1152 echo "$as_me: error: Release major-version value is empty" >&2;}
1153    { (exit 1); exit 1; }; }
1154 fi
1155
1156 if test -n "$NCURSES_MINOR" ; then
1157   case $NCURSES_MINOR in #(vi
1158   [0-9]*) #(vi
1159         ;;
1160   *)
1161         { { echo "$as_me:1161: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1162 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1163    { (exit 1); exit 1; }; }
1164         ;;
1165   esac
1166 else
1167   { { echo "$as_me:1167: error: Release minor-version value is empty" >&5
1168 echo "$as_me: error: Release minor-version value is empty" >&2;}
1169    { (exit 1); exit 1; }; }
1170 fi
1171
1172 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1173
1174 # Check whether --with-abi-version or --without-abi-version was given.
1175 if test "${with_abi_version+set}" = set; then
1176   withval="$with_abi_version"
1177   { echo "$as_me:1177: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1178 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1179  cf_cv_abi_version=$withval
1180 fi;
1181
1182 if test -n "$cf_cv_abi_version" ; then
1183   case $cf_cv_abi_version in #(vi
1184   [0-9]*) #(vi
1185         ;;
1186   *)
1187         { { echo "$as_me:1187: error: ABI version is not a number: $cf_cv_abi_version" >&5
1188 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1189    { (exit 1); exit 1; }; }
1190         ;;
1191   esac
1192 else
1193   { { echo "$as_me:1193: error: ABI version value is empty" >&5
1194 echo "$as_me: error: ABI version value is empty" >&2;}
1195    { (exit 1); exit 1; }; }
1196 fi
1197
1198 ac_aux_dir=
1199 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1200   if test -f $ac_dir/install-sh; then
1201     ac_aux_dir=$ac_dir
1202     ac_install_sh="$ac_aux_dir/install-sh -c"
1203     break
1204   elif test -f $ac_dir/install.sh; then
1205     ac_aux_dir=$ac_dir
1206     ac_install_sh="$ac_aux_dir/install.sh -c"
1207     break
1208   elif test -f $ac_dir/shtool; then
1209     ac_aux_dir=$ac_dir
1210     ac_install_sh="$ac_aux_dir/shtool install -c"
1211     break
1212   fi
1213 done
1214 if test -z "$ac_aux_dir"; then
1215   { { echo "$as_me:1215: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1216 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1217    { (exit 1); exit 1; }; }
1218 fi
1219 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1220 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1221 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1222
1223 # Make sure we can run config.sub.
1224 $ac_config_sub sun4 >/dev/null 2>&1 ||
1225   { { echo "$as_me:1225: error: cannot run $ac_config_sub" >&5
1226 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1227    { (exit 1); exit 1; }; }
1228
1229 echo "$as_me:1229: checking build system type" >&5
1230 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1231 if test "${ac_cv_build+set}" = set; then
1232   echo $ECHO_N "(cached) $ECHO_C" >&6
1233 else
1234   ac_cv_build_alias=$build_alias
1235 test -z "$ac_cv_build_alias" &&
1236   ac_cv_build_alias=`$ac_config_guess`
1237 test -z "$ac_cv_build_alias" &&
1238   { { echo "$as_me:1238: error: cannot guess build type; you must specify one" >&5
1239 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1240    { (exit 1); exit 1; }; }
1241 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1242   { { echo "$as_me:1242: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1243 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 fi
1247 echo "$as_me:1247: result: $ac_cv_build" >&5
1248 echo "${ECHO_T}$ac_cv_build" >&6
1249 build=$ac_cv_build
1250 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1251 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1252 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1253
1254 echo "$as_me:1254: checking host system type" >&5
1255 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1256 if test "${ac_cv_host+set}" = set; then
1257   echo $ECHO_N "(cached) $ECHO_C" >&6
1258 else
1259   ac_cv_host_alias=$host_alias
1260 test -z "$ac_cv_host_alias" &&
1261   ac_cv_host_alias=$ac_cv_build_alias
1262 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1263   { { echo "$as_me:1263: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1264 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1265    { (exit 1); exit 1; }; }
1266
1267 fi
1268 echo "$as_me:1268: result: $ac_cv_host" >&5
1269 echo "${ECHO_T}$ac_cv_host" >&6
1270 host=$ac_cv_host
1271 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1272 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1273 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1274
1275 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1276         echo "$as_me:1276: checking target system type" >&5
1277 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1278 if test "${ac_cv_target+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   ac_cv_target_alias=$target_alias
1282 test "x$ac_cv_target_alias" = "x" &&
1283   ac_cv_target_alias=$ac_cv_host_alias
1284 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1285   { { echo "$as_me:1285: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1286 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1287    { (exit 1); exit 1; }; }
1288
1289 fi
1290 echo "$as_me:1290: result: $ac_cv_target" >&5
1291 echo "${ECHO_T}$ac_cv_target" >&6
1292 target=$ac_cv_target
1293 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296
1297 # The aliases save the names the user supplied, while $host etc.
1298 # will get canonicalized.
1299 test -n "$target_alias" &&
1300   test "$program_prefix$program_suffix$program_transform_name" = \
1301     NONENONEs,x,x, &&
1302   program_prefix=${target_alias}-
1303         system_name="$host_os"
1304 else
1305         system_name="`(uname -s -r) 2>/dev/null`"
1306         if test -z "$system_name" ; then
1307                 system_name="`(hostname) 2>/dev/null`"
1308         fi
1309 fi
1310 test -n "$system_name" && cat >>confdefs.h <<EOF
1311 #define SYSTEM_NAME "$system_name"
1312 EOF
1313
1314 if test "${cf_cv_system_name+set}" = set; then
1315   echo $ECHO_N "(cached) $ECHO_C" >&6
1316 else
1317   cf_cv_system_name="$system_name"
1318 fi
1319
1320 test -z "$system_name" && system_name="$cf_cv_system_name"
1321 test -n "$cf_cv_system_name" && echo "$as_me:1321: result: Configuring for $cf_cv_system_name" >&5
1322 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1323
1324 if test ".$system_name" != ".$cf_cv_system_name" ; then
1325         echo "$as_me:1325: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1326 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1327         { { echo "$as_me:1327: error: \"Please remove config.cache and try again.\"" >&5
1328 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1329    { (exit 1); exit 1; }; }
1330 fi
1331
1332 # Check whether --with-system-type or --without-system-type was given.
1333 if test "${with_system_type+set}" = set; then
1334   withval="$with_system_type"
1335   { echo "$as_me:1335: WARNING: overriding system type to $withval" >&5
1336 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1337  cf_cv_system_name=$withval
1338 fi;
1339
1340 ###     Save the given $CFLAGS to allow user-override.
1341 cf_user_CFLAGS="$CFLAGS"
1342
1343 ###     Default install-location
1344
1345 echo "$as_me:1345: checking for prefix" >&5
1346 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1347 if test "x$prefix" = "xNONE" ; then
1348         case "$cf_cv_system_name" in
1349                 # non-vendor systems don't have a conflict
1350         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1351                 prefix=/usr
1352                 ;;
1353         *)      prefix=$ac_default_prefix
1354                 ;;
1355         esac
1356 fi
1357 echo "$as_me:1357: result: $prefix" >&5
1358 echo "${ECHO_T}$prefix" >&6
1359
1360 if test "x$prefix" = "xNONE" ; then
1361 echo "$as_me:1361: checking for default include-directory" >&5
1362 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1363 test -n "$verbose" && echo 1>&6
1364 for cf_symbol in \
1365         $includedir \
1366         $includedir/ncurses \
1367         $prefix/include \
1368         $prefix/include/ncurses \
1369         /usr/local/include \
1370         /usr/local/include/ncurses \
1371         /usr/include \
1372         /usr/include/ncurses
1373 do
1374         cf_dir=`eval echo $cf_symbol`
1375         if test -f $cf_dir/curses.h ; then
1376         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1377                 includedir="$cf_symbol"
1378                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1379                 break
1380         fi
1381         fi
1382         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1383 done
1384 echo "$as_me:1384: result: $includedir" >&5
1385 echo "${ECHO_T}$includedir" >&6
1386 fi
1387
1388 ###     Checks for programs.
1389 ac_ext=c
1390 ac_cpp='$CPP $CPPFLAGS'
1391 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1392 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1393 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1394 ac_main_return=return
1395 if test -n "$ac_tool_prefix"; then
1396   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1397 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1398 echo "$as_me:1398: checking for $ac_word" >&5
1399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1400 if test "${ac_cv_prog_CC+set}" = set; then
1401   echo $ECHO_N "(cached) $ECHO_C" >&6
1402 else
1403   if test -n "$CC"; then
1404   ac_cv_prog_CC="$CC" # Let the user override the test.
1405 else
1406   ac_save_IFS=$IFS; IFS=$ac_path_separator
1407 ac_dummy="$PATH"
1408 for ac_dir in $ac_dummy; do
1409   IFS=$ac_save_IFS
1410   test -z "$ac_dir" && ac_dir=.
1411   $as_executable_p "$ac_dir/$ac_word" || continue
1412 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1413 echo "$as_me:1413: found $ac_dir/$ac_word" >&5
1414 break
1415 done
1416
1417 fi
1418 fi
1419 CC=$ac_cv_prog_CC
1420 if test -n "$CC"; then
1421   echo "$as_me:1421: result: $CC" >&5
1422 echo "${ECHO_T}$CC" >&6
1423 else
1424   echo "$as_me:1424: result: no" >&5
1425 echo "${ECHO_T}no" >&6
1426 fi
1427
1428 fi
1429 if test -z "$ac_cv_prog_CC"; then
1430   ac_ct_CC=$CC
1431   # Extract the first word of "gcc", so it can be a program name with args.
1432 set dummy gcc; ac_word=$2
1433 echo "$as_me:1433: checking for $ac_word" >&5
1434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1435 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1436   echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438   if test -n "$ac_ct_CC"; then
1439   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1440 else
1441   ac_save_IFS=$IFS; IFS=$ac_path_separator
1442 ac_dummy="$PATH"
1443 for ac_dir in $ac_dummy; do
1444   IFS=$ac_save_IFS
1445   test -z "$ac_dir" && ac_dir=.
1446   $as_executable_p "$ac_dir/$ac_word" || continue
1447 ac_cv_prog_ac_ct_CC="gcc"
1448 echo "$as_me:1448: found $ac_dir/$ac_word" >&5
1449 break
1450 done
1451
1452 fi
1453 fi
1454 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1455 if test -n "$ac_ct_CC"; then
1456   echo "$as_me:1456: result: $ac_ct_CC" >&5
1457 echo "${ECHO_T}$ac_ct_CC" >&6
1458 else
1459   echo "$as_me:1459: result: no" >&5
1460 echo "${ECHO_T}no" >&6
1461 fi
1462
1463   CC=$ac_ct_CC
1464 else
1465   CC="$ac_cv_prog_CC"
1466 fi
1467
1468 if test -z "$CC"; then
1469   if test -n "$ac_tool_prefix"; then
1470   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1471 set dummy ${ac_tool_prefix}cc; ac_word=$2
1472 echo "$as_me:1472: checking for $ac_word" >&5
1473 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1474 if test "${ac_cv_prog_CC+set}" = set; then
1475   echo $ECHO_N "(cached) $ECHO_C" >&6
1476 else
1477   if test -n "$CC"; then
1478   ac_cv_prog_CC="$CC" # Let the user override the test.
1479 else
1480   ac_save_IFS=$IFS; IFS=$ac_path_separator
1481 ac_dummy="$PATH"
1482 for ac_dir in $ac_dummy; do
1483   IFS=$ac_save_IFS
1484   test -z "$ac_dir" && ac_dir=.
1485   $as_executable_p "$ac_dir/$ac_word" || continue
1486 ac_cv_prog_CC="${ac_tool_prefix}cc"
1487 echo "$as_me:1487: found $ac_dir/$ac_word" >&5
1488 break
1489 done
1490
1491 fi
1492 fi
1493 CC=$ac_cv_prog_CC
1494 if test -n "$CC"; then
1495   echo "$as_me:1495: result: $CC" >&5
1496 echo "${ECHO_T}$CC" >&6
1497 else
1498   echo "$as_me:1498: result: no" >&5
1499 echo "${ECHO_T}no" >&6
1500 fi
1501
1502 fi
1503 if test -z "$ac_cv_prog_CC"; then
1504   ac_ct_CC=$CC
1505   # Extract the first word of "cc", so it can be a program name with args.
1506 set dummy cc; ac_word=$2
1507 echo "$as_me:1507: checking for $ac_word" >&5
1508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1509 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1510   echo $ECHO_N "(cached) $ECHO_C" >&6
1511 else
1512   if test -n "$ac_ct_CC"; then
1513   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1514 else
1515   ac_save_IFS=$IFS; IFS=$ac_path_separator
1516 ac_dummy="$PATH"
1517 for ac_dir in $ac_dummy; do
1518   IFS=$ac_save_IFS
1519   test -z "$ac_dir" && ac_dir=.
1520   $as_executable_p "$ac_dir/$ac_word" || continue
1521 ac_cv_prog_ac_ct_CC="cc"
1522 echo "$as_me:1522: found $ac_dir/$ac_word" >&5
1523 break
1524 done
1525
1526 fi
1527 fi
1528 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1529 if test -n "$ac_ct_CC"; then
1530   echo "$as_me:1530: result: $ac_ct_CC" >&5
1531 echo "${ECHO_T}$ac_ct_CC" >&6
1532 else
1533   echo "$as_me:1533: result: no" >&5
1534 echo "${ECHO_T}no" >&6
1535 fi
1536
1537   CC=$ac_ct_CC
1538 else
1539   CC="$ac_cv_prog_CC"
1540 fi
1541
1542 fi
1543 if test -z "$CC"; then
1544   # Extract the first word of "cc", so it can be a program name with args.
1545 set dummy cc; ac_word=$2
1546 echo "$as_me:1546: checking for $ac_word" >&5
1547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1548 if test "${ac_cv_prog_CC+set}" = set; then
1549   echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551   if test -n "$CC"; then
1552   ac_cv_prog_CC="$CC" # Let the user override the test.
1553 else
1554   ac_prog_rejected=no
1555   ac_save_IFS=$IFS; IFS=$ac_path_separator
1556 ac_dummy="$PATH"
1557 for ac_dir in $ac_dummy; do
1558   IFS=$ac_save_IFS
1559   test -z "$ac_dir" && ac_dir=.
1560   $as_executable_p "$ac_dir/$ac_word" || continue
1561 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1562   ac_prog_rejected=yes
1563   continue
1564 fi
1565 ac_cv_prog_CC="cc"
1566 echo "$as_me:1566: found $ac_dir/$ac_word" >&5
1567 break
1568 done
1569
1570 if test $ac_prog_rejected = yes; then
1571   # We found a bogon in the path, so make sure we never use it.
1572   set dummy $ac_cv_prog_CC
1573   shift
1574   if test $# != 0; then
1575     # We chose a different compiler from the bogus one.
1576     # However, it has the same basename, so the bogon will be chosen
1577     # first if we set CC to just the basename; use the full file name.
1578     shift
1579     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1580     shift
1581     ac_cv_prog_CC="$@"
1582   fi
1583 fi
1584 fi
1585 fi
1586 CC=$ac_cv_prog_CC
1587 if test -n "$CC"; then
1588   echo "$as_me:1588: result: $CC" >&5
1589 echo "${ECHO_T}$CC" >&6
1590 else
1591   echo "$as_me:1591: result: no" >&5
1592 echo "${ECHO_T}no" >&6
1593 fi
1594
1595 fi
1596 if test -z "$CC"; then
1597   if test -n "$ac_tool_prefix"; then
1598   for ac_prog in cl
1599   do
1600     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1601 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1602 echo "$as_me:1602: checking for $ac_word" >&5
1603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1604 if test "${ac_cv_prog_CC+set}" = set; then
1605   echo $ECHO_N "(cached) $ECHO_C" >&6
1606 else
1607   if test -n "$CC"; then
1608   ac_cv_prog_CC="$CC" # Let the user override the test.
1609 else
1610   ac_save_IFS=$IFS; IFS=$ac_path_separator
1611 ac_dummy="$PATH"
1612 for ac_dir in $ac_dummy; do
1613   IFS=$ac_save_IFS
1614   test -z "$ac_dir" && ac_dir=.
1615   $as_executable_p "$ac_dir/$ac_word" || continue
1616 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1617 echo "$as_me:1617: found $ac_dir/$ac_word" >&5
1618 break
1619 done
1620
1621 fi
1622 fi
1623 CC=$ac_cv_prog_CC
1624 if test -n "$CC"; then
1625   echo "$as_me:1625: result: $CC" >&5
1626 echo "${ECHO_T}$CC" >&6
1627 else
1628   echo "$as_me:1628: result: no" >&5
1629 echo "${ECHO_T}no" >&6
1630 fi
1631
1632     test -n "$CC" && break
1633   done
1634 fi
1635 if test -z "$CC"; then
1636   ac_ct_CC=$CC
1637   for ac_prog in cl
1638 do
1639   # Extract the first word of "$ac_prog", so it can be a program name with args.
1640 set dummy $ac_prog; ac_word=$2
1641 echo "$as_me:1641: checking for $ac_word" >&5
1642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1643 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1644   echo $ECHO_N "(cached) $ECHO_C" >&6
1645 else
1646   if test -n "$ac_ct_CC"; then
1647   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1648 else
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   $as_executable_p "$ac_dir/$ac_word" || continue
1655 ac_cv_prog_ac_ct_CC="$ac_prog"
1656 echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657 break
1658 done
1659
1660 fi
1661 fi
1662 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1663 if test -n "$ac_ct_CC"; then
1664   echo "$as_me:1664: result: $ac_ct_CC" >&5
1665 echo "${ECHO_T}$ac_ct_CC" >&6
1666 else
1667   echo "$as_me:1667: result: no" >&5
1668 echo "${ECHO_T}no" >&6
1669 fi
1670
1671   test -n "$ac_ct_CC" && break
1672 done
1673
1674   CC=$ac_ct_CC
1675 fi
1676
1677 fi
1678
1679 test -z "$CC" && { { echo "$as_me:1679: error: no acceptable cc found in \$PATH" >&5
1680 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1681    { (exit 1); exit 1; }; }
1682
1683 # Provide some information about the compiler.
1684 echo "$as_me:1684:" \
1685      "checking for C compiler version" >&5
1686 ac_compiler=`set X $ac_compile; echo $2`
1687 { (eval echo "$as_me:1687: \"$ac_compiler --version </dev/null >&5\"") >&5
1688   (eval $ac_compiler --version </dev/null >&5) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); }
1692 { (eval echo "$as_me:1692: \"$ac_compiler -v </dev/null >&5\"") >&5
1693   (eval $ac_compiler -v </dev/null >&5) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }
1697 { (eval echo "$as_me:1697: \"$ac_compiler -V </dev/null >&5\"") >&5
1698   (eval $ac_compiler -V </dev/null >&5) 2>&5
1699   ac_status=$?
1700   echo "$as_me:1700: \$? = $ac_status" >&5
1701   (exit $ac_status); }
1702
1703 cat >conftest.$ac_ext <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1706
1707 int
1708 main ()
1709 {
1710
1711   ;
1712   return 0;
1713 }
1714 _ACEOF
1715 ac_clean_files_save=$ac_clean_files
1716 ac_clean_files="$ac_clean_files a.out a.exe"
1717 # Try to create an executable without -o first, disregard a.out.
1718 # It will help us diagnose broken compilers, and finding out an intuition
1719 # of exeext.
1720 echo "$as_me:1720: checking for C compiler default output" >&5
1721 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1722 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1723 if { (eval echo "$as_me:1723: \"$ac_link_default\"") >&5
1724   (eval $ac_link_default) 2>&5
1725   ac_status=$?
1726   echo "$as_me:1726: \$? = $ac_status" >&5
1727   (exit $ac_status); }; then
1728   # Find the output, starting from the most likely.  This scheme is
1729 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1730 # resort.
1731 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1732                 ls a.out conftest 2>/dev/null;
1733                 ls a.* conftest.* 2>/dev/null`; do
1734   case $ac_file in
1735     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1736     a.out ) # We found the default executable, but exeext='' is most
1737             # certainly right.
1738             break;;
1739     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1740           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1741           export ac_cv_exeext
1742           break;;
1743     * ) break;;
1744   esac
1745 done
1746 else
1747   echo "$as_me: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 { { echo "$as_me:1749: error: C compiler cannot create executables" >&5
1750 echo "$as_me: error: C compiler cannot create executables" >&2;}
1751    { (exit 77); exit 77; }; }
1752 fi
1753
1754 ac_exeext=$ac_cv_exeext
1755 echo "$as_me:1755: result: $ac_file" >&5
1756 echo "${ECHO_T}$ac_file" >&6
1757
1758 # Check the compiler produces executables we can run.  If not, either
1759 # the compiler is broken, or we cross compile.
1760 echo "$as_me:1760: checking whether the C compiler works" >&5
1761 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1762 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1763 # If not cross compiling, check that we can run a simple program.
1764 if test "$cross_compiling" != yes; then
1765   if { ac_try='./$ac_file'
1766   { (eval echo "$as_me:1766: \"$ac_try\"") >&5
1767   (eval $ac_try) 2>&5
1768   ac_status=$?
1769   echo "$as_me:1769: \$? = $ac_status" >&5
1770   (exit $ac_status); }; }; then
1771     cross_compiling=no
1772   else
1773     if test "$cross_compiling" = maybe; then
1774         cross_compiling=yes
1775     else
1776         { { echo "$as_me:1776: error: cannot run C compiled programs.
1777 If you meant to cross compile, use \`--host'." >&5
1778 echo "$as_me: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&2;}
1780    { (exit 1); exit 1; }; }
1781     fi
1782   fi
1783 fi
1784 echo "$as_me:1784: result: yes" >&5
1785 echo "${ECHO_T}yes" >&6
1786
1787 rm -f a.out a.exe conftest$ac_cv_exeext
1788 ac_clean_files=$ac_clean_files_save
1789 # Check the compiler produces executables we can run.  If not, either
1790 # the compiler is broken, or we cross compile.
1791 echo "$as_me:1791: checking whether we are cross compiling" >&5
1792 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1793 echo "$as_me:1793: result: $cross_compiling" >&5
1794 echo "${ECHO_T}$cross_compiling" >&6
1795
1796 echo "$as_me:1796: checking for executable suffix" >&5
1797 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1798 if { (eval echo "$as_me:1798: \"$ac_link\"") >&5
1799   (eval $ac_link) 2>&5
1800   ac_status=$?
1801   echo "$as_me:1801: \$? = $ac_status" >&5
1802   (exit $ac_status); }; then
1803   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1804 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1805 # work properly (i.e., refer to `conftest.exe'), while it won't with
1806 # `rm'.
1807 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1808   case $ac_file in
1809     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1810     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1811           export ac_cv_exeext
1812           break;;
1813     * ) break;;
1814   esac
1815 done
1816 else
1817   { { echo "$as_me:1817: error: cannot compute EXEEXT: cannot compile and link" >&5
1818 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1819    { (exit 1); exit 1; }; }
1820 fi
1821
1822 rm -f conftest$ac_cv_exeext
1823 echo "$as_me:1823: result: $ac_cv_exeext" >&5
1824 echo "${ECHO_T}$ac_cv_exeext" >&6
1825
1826 rm -f conftest.$ac_ext
1827 EXEEXT=$ac_cv_exeext
1828 ac_exeext=$EXEEXT
1829 echo "$as_me:1829: checking for object suffix" >&5
1830 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1831 if test "${ac_cv_objext+set}" = set; then
1832   echo $ECHO_N "(cached) $ECHO_C" >&6
1833 else
1834   cat >conftest.$ac_ext <<_ACEOF
1835 #line 1835 "configure"
1836 #include "confdefs.h"
1837
1838 int
1839 main ()
1840 {
1841
1842   ;
1843   return 0;
1844 }
1845 _ACEOF
1846 rm -f conftest.o conftest.obj
1847 if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5
1848   (eval $ac_compile) 2>&5
1849   ac_status=$?
1850   echo "$as_me:1850: \$? = $ac_status" >&5
1851   (exit $ac_status); }; then
1852   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1853   case $ac_file in
1854     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1855     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1856        break;;
1857   esac
1858 done
1859 else
1860   echo "$as_me: failed program was:" >&5
1861 cat conftest.$ac_ext >&5
1862 { { echo "$as_me:1862: error: cannot compute OBJEXT: cannot compile" >&5
1863 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1864    { (exit 1); exit 1; }; }
1865 fi
1866
1867 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1868 fi
1869 echo "$as_me:1869: result: $ac_cv_objext" >&5
1870 echo "${ECHO_T}$ac_cv_objext" >&6
1871 OBJEXT=$ac_cv_objext
1872 ac_objext=$OBJEXT
1873 echo "$as_me:1873: checking whether we are using the GNU C compiler" >&5
1874 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1875 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1876   echo $ECHO_N "(cached) $ECHO_C" >&6
1877 else
1878   cat >conftest.$ac_ext <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main ()
1884 {
1885 #ifndef __GNUC__
1886        choke me
1887 #endif
1888
1889   ;
1890   return 0;
1891 }
1892 _ACEOF
1893 rm -f conftest.$ac_objext
1894 if { (eval echo "$as_me:1894: \"$ac_compile\"") >&5
1895   (eval $ac_compile) 2>&5
1896   ac_status=$?
1897   echo "$as_me:1897: \$? = $ac_status" >&5
1898   (exit $ac_status); } &&
1899          { ac_try='test -s conftest.$ac_objext'
1900   { (eval echo "$as_me:1900: \"$ac_try\"") >&5
1901   (eval $ac_try) 2>&5
1902   ac_status=$?
1903   echo "$as_me:1903: \$? = $ac_status" >&5
1904   (exit $ac_status); }; }; then
1905   ac_compiler_gnu=yes
1906 else
1907   echo "$as_me: failed program was:" >&5
1908 cat conftest.$ac_ext >&5
1909 ac_compiler_gnu=no
1910 fi
1911 rm -f conftest.$ac_objext conftest.$ac_ext
1912 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1913
1914 fi
1915 echo "$as_me:1915: result: $ac_cv_c_compiler_gnu" >&5
1916 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1917 GCC=`test $ac_compiler_gnu = yes && echo yes`
1918 ac_test_CFLAGS=${CFLAGS+set}
1919 ac_save_CFLAGS=$CFLAGS
1920 CFLAGS="-g"
1921 echo "$as_me:1921: checking whether $CC accepts -g" >&5
1922 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1923 if test "${ac_cv_prog_cc_g+set}" = set; then
1924   echo $ECHO_N "(cached) $ECHO_C" >&6
1925 else
1926   cat >conftest.$ac_ext <<_ACEOF
1927 #line 1927 "configure"
1928 #include "confdefs.h"
1929
1930 int
1931 main ()
1932 {
1933
1934   ;
1935   return 0;
1936 }
1937 _ACEOF
1938 rm -f conftest.$ac_objext
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940   (eval $ac_compile) 2>&5
1941   ac_status=$?
1942   echo "$as_me:1942: \$? = $ac_status" >&5
1943   (exit $ac_status); } &&
1944          { ac_try='test -s conftest.$ac_objext'
1945   { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1946   (eval $ac_try) 2>&5
1947   ac_status=$?
1948   echo "$as_me:1948: \$? = $ac_status" >&5
1949   (exit $ac_status); }; }; then
1950   ac_cv_prog_cc_g=yes
1951 else
1952   echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 ac_cv_prog_cc_g=no
1955 fi
1956 rm -f conftest.$ac_objext conftest.$ac_ext
1957 fi
1958 echo "$as_me:1958: result: $ac_cv_prog_cc_g" >&5
1959 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1960 if test "$ac_test_CFLAGS" = set; then
1961   CFLAGS=$ac_save_CFLAGS
1962 elif test $ac_cv_prog_cc_g = yes; then
1963   if test "$GCC" = yes; then
1964     CFLAGS="-g -O2"
1965   else
1966     CFLAGS="-g"
1967   fi
1968 else
1969   if test "$GCC" = yes; then
1970     CFLAGS="-O2"
1971   else
1972     CFLAGS=
1973   fi
1974 fi
1975 # Some people use a C++ compiler to compile C.  Since we use `exit',
1976 # in C++ we need to declare it.  In case someone uses the same compiler
1977 # for both compiling C and C++ we need to have the C++ compiler decide
1978 # the declaration of exit, since it's the most demanding environment.
1979 cat >conftest.$ac_ext <<_ACEOF
1980 #ifndef __cplusplus
1981   choke me
1982 #endif
1983 _ACEOF
1984 rm -f conftest.$ac_objext
1985 if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986   (eval $ac_compile) 2>&5
1987   ac_status=$?
1988   echo "$as_me:1988: \$? = $ac_status" >&5
1989   (exit $ac_status); } &&
1990          { ac_try='test -s conftest.$ac_objext'
1991   { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992   (eval $ac_try) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit $ac_status); }; }; then
1996   for ac_declaration in \
1997    ''\
1998    '#include <stdlib.h>' \
1999    'extern "C" void std::exit (int) throw (); using std::exit;' \
2000    'extern "C" void std::exit (int); using std::exit;' \
2001    'extern "C" void exit (int) throw ();' \
2002    'extern "C" void exit (int);' \
2003    'void exit (int);'
2004 do
2005   cat >conftest.$ac_ext <<_ACEOF
2006 #line 2006 "configure"
2007 #include "confdefs.h"
2008 #include <stdlib.h>
2009 $ac_declaration
2010 int
2011 main ()
2012 {
2013 exit (42);
2014   ;
2015   return 0;
2016 }
2017 _ACEOF
2018 rm -f conftest.$ac_objext
2019 if { (eval echo "$as_me:2019: \"$ac_compile\"") >&5
2020   (eval $ac_compile) 2>&5
2021   ac_status=$?
2022   echo "$as_me:2022: \$? = $ac_status" >&5
2023   (exit $ac_status); } &&
2024          { ac_try='test -s conftest.$ac_objext'
2025   { (eval echo "$as_me:2025: \"$ac_try\"") >&5
2026   (eval $ac_try) 2>&5
2027   ac_status=$?
2028   echo "$as_me:2028: \$? = $ac_status" >&5
2029   (exit $ac_status); }; }; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 continue
2035 fi
2036 rm -f conftest.$ac_objext conftest.$ac_ext
2037   cat >conftest.$ac_ext <<_ACEOF
2038 #line 2038 "configure"
2039 #include "confdefs.h"
2040 $ac_declaration
2041 int
2042 main ()
2043 {
2044 exit (42);
2045   ;
2046   return 0;
2047 }
2048 _ACEOF
2049 rm -f conftest.$ac_objext
2050 if { (eval echo "$as_me:2050: \"$ac_compile\"") >&5
2051   (eval $ac_compile) 2>&5
2052   ac_status=$?
2053   echo "$as_me:2053: \$? = $ac_status" >&5
2054   (exit $ac_status); } &&
2055          { ac_try='test -s conftest.$ac_objext'
2056   { (eval echo "$as_me:2056: \"$ac_try\"") >&5
2057   (eval $ac_try) 2>&5
2058   ac_status=$?
2059   echo "$as_me:2059: \$? = $ac_status" >&5
2060   (exit $ac_status); }; }; then
2061   break
2062 else
2063   echo "$as_me: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 fi
2066 rm -f conftest.$ac_objext conftest.$ac_ext
2067 done
2068 rm -f conftest*
2069 if test -n "$ac_declaration"; then
2070   echo '#ifdef __cplusplus' >>confdefs.h
2071   echo $ac_declaration      >>confdefs.h
2072   echo '#endif'             >>confdefs.h
2073 fi
2074
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 ac_ext=c
2081 ac_cpp='$CPP $CPPFLAGS'
2082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2085 ac_main_return=return
2086
2087 GCC_VERSION=none
2088 if test "$GCC" = yes ; then
2089         echo "$as_me:2089: checking version of $CC" >&5
2090 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2091         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2092         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2093         echo "$as_me:2093: result: $GCC_VERSION" >&5
2094 echo "${ECHO_T}$GCC_VERSION" >&6
2095 fi
2096
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103 echo "$as_me:2103: checking how to run the C preprocessor" >&5
2104 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2105 # On Suns, sometimes $CPP names a directory.
2106 if test -n "$CPP" && test -d "$CPP"; then
2107   CPP=
2108 fi
2109 if test -z "$CPP"; then
2110   if test "${ac_cv_prog_CPP+set}" = set; then
2111   echo $ECHO_N "(cached) $ECHO_C" >&6
2112 else
2113       # Double quotes because CPP needs to be expanded
2114     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2115     do
2116       ac_preproc_ok=false
2117 for ac_c_preproc_warn_flag in '' yes
2118 do
2119   # Use a header file that comes with gcc, so configuring glibc
2120   # with a fresh cross-compiler works.
2121   # On the NeXT, cc -E runs the code through the compiler's parser,
2122   # not just through cpp. "Syntax error" is here to catch this case.
2123   cat >conftest.$ac_ext <<_ACEOF
2124 #line 2124 "configure"
2125 #include "confdefs.h"
2126 #include <assert.h>
2127                      Syntax error
2128 _ACEOF
2129 if { (eval echo "$as_me:2129: \"$ac_cpp conftest.$ac_ext\"") >&5
2130   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2131   ac_status=$?
2132   egrep -v '^ *\+' conftest.er1 >conftest.err
2133   rm -f conftest.er1
2134   cat conftest.err >&5
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit $ac_status); } >/dev/null; then
2137   if test -s conftest.err; then
2138     ac_cpp_err=$ac_c_preproc_warn_flag
2139   else
2140     ac_cpp_err=
2141   fi
2142 else
2143   ac_cpp_err=yes
2144 fi
2145 if test -z "$ac_cpp_err"; then
2146   :
2147 else
2148   echo "$as_me: failed program was:" >&5
2149   cat conftest.$ac_ext >&5
2150   # Broken: fails on valid input.
2151 continue
2152 fi
2153 rm -f conftest.err conftest.$ac_ext
2154
2155   # OK, works on sane cases.  Now check whether non-existent headers
2156   # can be detected and how.
2157   cat >conftest.$ac_ext <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160 #include <ac_nonexistent.h>
2161 _ACEOF
2162 if { (eval echo "$as_me:2162: \"$ac_cpp conftest.$ac_ext\"") >&5
2163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2164   ac_status=$?
2165   egrep -v '^ *\+' conftest.er1 >conftest.err
2166   rm -f conftest.er1
2167   cat conftest.err >&5
2168   echo "$as_me:2168: \$? = $ac_status" >&5
2169   (exit $ac_status); } >/dev/null; then
2170   if test -s conftest.err; then
2171     ac_cpp_err=$ac_c_preproc_warn_flag
2172   else
2173     ac_cpp_err=
2174   fi
2175 else
2176   ac_cpp_err=yes
2177 fi
2178 if test -z "$ac_cpp_err"; then
2179   # Broken: success on invalid input.
2180 continue
2181 else
2182   echo "$as_me: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   # Passes both tests.
2185 ac_preproc_ok=:
2186 break
2187 fi
2188 rm -f conftest.err conftest.$ac_ext
2189
2190 done
2191 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2192 rm -f conftest.err conftest.$ac_ext
2193 if $ac_preproc_ok; then
2194   break
2195 fi
2196
2197     done
2198     ac_cv_prog_CPP=$CPP
2199
2200 fi
2201   CPP=$ac_cv_prog_CPP
2202 else
2203   ac_cv_prog_CPP=$CPP
2204 fi
2205 echo "$as_me:2205: result: $CPP" >&5
2206 echo "${ECHO_T}$CPP" >&6
2207 ac_preproc_ok=false
2208 for ac_c_preproc_warn_flag in '' yes
2209 do
2210   # Use a header file that comes with gcc, so configuring glibc
2211   # with a fresh cross-compiler works.
2212   # On the NeXT, cc -E runs the code through the compiler's parser,
2213   # not just through cpp. "Syntax error" is here to catch this case.
2214   cat >conftest.$ac_ext <<_ACEOF
2215 #line 2215 "configure"
2216 #include "confdefs.h"
2217 #include <assert.h>
2218                      Syntax error
2219 _ACEOF
2220 if { (eval echo "$as_me:2220: \"$ac_cpp conftest.$ac_ext\"") >&5
2221   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2222   ac_status=$?
2223   egrep -v '^ *\+' conftest.er1 >conftest.err
2224   rm -f conftest.er1
2225   cat conftest.err >&5
2226   echo "$as_me:2226: \$? = $ac_status" >&5
2227   (exit $ac_status); } >/dev/null; then
2228   if test -s conftest.err; then
2229     ac_cpp_err=$ac_c_preproc_warn_flag
2230   else
2231     ac_cpp_err=
2232   fi
2233 else
2234   ac_cpp_err=yes
2235 fi
2236 if test -z "$ac_cpp_err"; then
2237   :
2238 else
2239   echo "$as_me: failed program was:" >&5
2240   cat conftest.$ac_ext >&5
2241   # Broken: fails on valid input.
2242 continue
2243 fi
2244 rm -f conftest.err conftest.$ac_ext
2245
2246   # OK, works on sane cases.  Now check whether non-existent headers
2247   # can be detected and how.
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251 #include <ac_nonexistent.h>
2252 _ACEOF
2253 if { (eval echo "$as_me:2253: \"$ac_cpp conftest.$ac_ext\"") >&5
2254   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2255   ac_status=$?
2256   egrep -v '^ *\+' conftest.er1 >conftest.err
2257   rm -f conftest.er1
2258   cat conftest.err >&5
2259   echo "$as_me:2259: \$? = $ac_status" >&5
2260   (exit $ac_status); } >/dev/null; then
2261   if test -s conftest.err; then
2262     ac_cpp_err=$ac_c_preproc_warn_flag
2263   else
2264     ac_cpp_err=
2265   fi
2266 else
2267   ac_cpp_err=yes
2268 fi
2269 if test -z "$ac_cpp_err"; then
2270   # Broken: success on invalid input.
2271 continue
2272 else
2273   echo "$as_me: failed program was:" >&5
2274   cat conftest.$ac_ext >&5
2275   # Passes both tests.
2276 ac_preproc_ok=:
2277 break
2278 fi
2279 rm -f conftest.err conftest.$ac_ext
2280
2281 done
2282 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2283 rm -f conftest.err conftest.$ac_ext
2284 if $ac_preproc_ok; then
2285   :
2286 else
2287   { { echo "$as_me:2287: error: C preprocessor \"$CPP\" fails sanity check" >&5
2288 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2289    { (exit 1); exit 1; }; }
2290 fi
2291
2292 ac_ext=c
2293 ac_cpp='$CPP $CPPFLAGS'
2294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2297 ac_main_return=return
2298
2299 if test $ac_cv_c_compiler_gnu = yes; then
2300     echo "$as_me:2300: checking whether $CC needs -traditional" >&5
2301 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2302 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2303   echo $ECHO_N "(cached) $ECHO_C" >&6
2304 else
2305     ac_pattern="Autoconf.*'x'"
2306   cat >conftest.$ac_ext <<_ACEOF
2307 #line 2307 "configure"
2308 #include "confdefs.h"
2309 #include <sgtty.h>
2310 int Autoconf = TIOCGETP;
2311 _ACEOF
2312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2313   egrep "$ac_pattern" >/dev/null 2>&1; then
2314   ac_cv_prog_gcc_traditional=yes
2315 else
2316   ac_cv_prog_gcc_traditional=no
2317 fi
2318 rm -f conftest*
2319
2320   if test $ac_cv_prog_gcc_traditional = no; then
2321     cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2324 #include <termio.h>
2325 int Autoconf = TCGETA;
2326 _ACEOF
2327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2328   egrep "$ac_pattern" >/dev/null 2>&1; then
2329   ac_cv_prog_gcc_traditional=yes
2330 fi
2331 rm -f conftest*
2332
2333   fi
2334 fi
2335 echo "$as_me:2335: result: $ac_cv_prog_gcc_traditional" >&5
2336 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2337   if test $ac_cv_prog_gcc_traditional = yes; then
2338     CC="$CC -traditional"
2339   fi
2340 fi
2341
2342 echo "$as_me:2342: checking whether $CC understands -c and -o together" >&5
2343 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2344 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2345   echo $ECHO_N "(cached) $ECHO_C" >&6
2346 else
2347
2348 cat > conftest.$ac_ext <<CF_EOF
2349 #include <stdio.h>
2350 int main()
2351 {
2352         ${cf_cv_main_return:-return}(0);
2353 }
2354 CF_EOF
2355 # We do the test twice because some compilers refuse to overwrite an
2356 # existing .o file with -o, though they will create one.
2357 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2358 if { (eval echo "$as_me:2358: \"$ac_try\"") >&5
2359   (eval $ac_try) 2>&5
2360   ac_status=$?
2361   echo "$as_me:2361: \$? = $ac_status" >&5
2362   (exit $ac_status); } &&
2363   test -f conftest2.$ac_objext && { (eval echo "$as_me:2363: \"$ac_try\"") >&5
2364   (eval $ac_try) 2>&5
2365   ac_status=$?
2366   echo "$as_me:2366: \$? = $ac_status" >&5
2367   (exit $ac_status); };
2368 then
2369   eval cf_cv_prog_CC_c_o=yes
2370 else
2371   eval cf_cv_prog_CC_c_o=no
2372 fi
2373 rm -f conftest*
2374
2375 fi
2376 if test $cf_cv_prog_CC_c_o = yes; then
2377   echo "$as_me:2377: result: yes" >&5
2378 echo "${ECHO_T}yes" >&6
2379 else
2380   echo "$as_me:2380: result: no" >&5
2381 echo "${ECHO_T}no" >&6
2382 fi
2383
2384 echo "$as_me:2384: checking for POSIXized ISC" >&5
2385 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2386 if test -d /etc/conf/kconfig.d &&
2387    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2388 then
2389   echo "$as_me:2389: result: yes" >&5
2390 echo "${ECHO_T}yes" >&6
2391   ISC=yes # If later tests want to check for ISC.
2392
2393 cat >>confdefs.h <<\EOF
2394 #define _POSIX_SOURCE 1
2395 EOF
2396
2397   if test "$GCC" = yes; then
2398     CC="$CC -posix"
2399   else
2400     CC="$CC -Xp"
2401   fi
2402 else
2403   echo "$as_me:2403: result: no" >&5
2404 echo "${ECHO_T}no" >&6
2405   ISC=
2406 fi
2407
2408 echo "$as_me:2408: checking for ${CC-cc} option to accept ANSI C" >&5
2409 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2410 if test "${cf_cv_ansi_cc+set}" = set; then
2411   echo $ECHO_N "(cached) $ECHO_C" >&6
2412 else
2413
2414 cf_cv_ansi_cc=no
2415 cf_save_CFLAGS="$CFLAGS"
2416 cf_save_CPPFLAGS="$CPPFLAGS"
2417 # Don't try gcc -ansi; that turns off useful extensions and
2418 # breaks some systems' header files.
2419 # AIX                   -qlanglvl=ansi
2420 # Ultrix and OSF/1      -std1
2421 # HP-UX                 -Aa -D_HPUX_SOURCE
2422 # SVR4                  -Xc
2423 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2424 for cf_arg in "-DCC_HAS_PROTOS" \
2425         "" \
2426         -qlanglvl=ansi \
2427         -std1 \
2428         -Ae \
2429         "-Aa -D_HPUX_SOURCE" \
2430         -Xc
2431 do
2432
2433 cf_fix_cppflags=no
2434 cf_new_cflags=
2435 cf_new_cppflags=
2436 cf_new_extra_cppflags=
2437
2438 for cf_add_cflags in $cf_arg
2439 do
2440 case $cf_fix_cppflags in
2441 no)
2442         case $cf_add_cflags in #(vi
2443         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2444                 case $cf_add_cflags in
2445                 -D*)
2446                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2447
2448                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2449                         && test -z "${cf_tst_cflags}" \
2450                         && cf_fix_cppflags=yes
2451
2452                         if test $cf_fix_cppflags = yes ; then
2453                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2454                                 continue
2455                         elif test "${cf_tst_cflags}" = "\"'" ; then
2456                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2457                                 continue
2458                         fi
2459                         ;;
2460                 esac
2461                 case "$CPPFLAGS" in
2462                 *$cf_add_cflags) #(vi
2463                         ;;
2464                 *) #(vi
2465                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2466                         ;;
2467                 esac
2468                 ;;
2469         *)
2470                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2471                 ;;
2472         esac
2473         ;;
2474 yes)
2475         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2476
2477         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2478
2479         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2480         && test -z "${cf_tst_cflags}" \
2481         && cf_fix_cppflags=no
2482         ;;
2483 esac
2484 done
2485
2486 if test -n "$cf_new_cflags" ; then
2487
2488         CFLAGS="$CFLAGS $cf_new_cflags"
2489 fi
2490
2491 if test -n "$cf_new_cppflags" ; then
2492
2493         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2494 fi
2495
2496 if test -n "$cf_new_extra_cppflags" ; then
2497
2498         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2499 fi
2500
2501         cat >conftest.$ac_ext <<_ACEOF
2502 #line 2502 "configure"
2503 #include "confdefs.h"
2504
2505 #ifndef CC_HAS_PROTOS
2506 #if !defined(__STDC__) || (__STDC__ != 1)
2507 choke me
2508 #endif
2509 #endif
2510
2511 int
2512 main ()
2513 {
2514
2515         int test (int i, double x);
2516         struct s1 {int (*f) (int a);};
2517         struct s2 {int (*f) (double a);};
2518   ;
2519   return 0;
2520 }
2521 _ACEOF
2522 rm -f conftest.$ac_objext
2523 if { (eval echo "$as_me:2523: \"$ac_compile\"") >&5
2524   (eval $ac_compile) 2>&5
2525   ac_status=$?
2526   echo "$as_me:2526: \$? = $ac_status" >&5
2527   (exit $ac_status); } &&
2528          { ac_try='test -s conftest.$ac_objext'
2529   { (eval echo "$as_me:2529: \"$ac_try\"") >&5
2530   (eval $ac_try) 2>&5
2531   ac_status=$?
2532   echo "$as_me:2532: \$? = $ac_status" >&5
2533   (exit $ac_status); }; }; then
2534   cf_cv_ansi_cc="$cf_arg"; break
2535 else
2536   echo "$as_me: failed program was:" >&5
2537 cat conftest.$ac_ext >&5
2538 fi
2539 rm -f conftest.$ac_objext conftest.$ac_ext
2540 done
2541 CFLAGS="$cf_save_CFLAGS"
2542 CPPFLAGS="$cf_save_CPPFLAGS"
2543
2544 fi
2545 echo "$as_me:2545: result: $cf_cv_ansi_cc" >&5
2546 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2547
2548 if test "$cf_cv_ansi_cc" != "no"; then
2549 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2550
2551 cf_fix_cppflags=no
2552 cf_new_cflags=
2553 cf_new_cppflags=
2554 cf_new_extra_cppflags=
2555
2556 for cf_add_cflags in $cf_cv_ansi_cc
2557 do
2558 case $cf_fix_cppflags in
2559 no)
2560         case $cf_add_cflags in #(vi
2561         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2562                 case $cf_add_cflags in
2563                 -D*)
2564                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2565
2566                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2567                         && test -z "${cf_tst_cflags}" \
2568                         && cf_fix_cppflags=yes
2569
2570                         if test $cf_fix_cppflags = yes ; then
2571                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2572                                 continue
2573                         elif test "${cf_tst_cflags}" = "\"'" ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         fi
2577                         ;;
2578                 esac
2579                 case "$CPPFLAGS" in
2580                 *$cf_add_cflags) #(vi
2581                         ;;
2582                 *) #(vi
2583                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2584                         ;;
2585                 esac
2586                 ;;
2587         *)
2588                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2589                 ;;
2590         esac
2591         ;;
2592 yes)
2593         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594
2595         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2596
2597         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2598         && test -z "${cf_tst_cflags}" \
2599         && cf_fix_cppflags=no
2600         ;;
2601 esac
2602 done
2603
2604 if test -n "$cf_new_cflags" ; then
2605
2606         CFLAGS="$CFLAGS $cf_new_cflags"
2607 fi
2608
2609 if test -n "$cf_new_cppflags" ; then
2610
2611         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2612 fi
2613
2614 if test -n "$cf_new_extra_cppflags" ; then
2615
2616         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2617 fi
2618
2619 else
2620         cat >>confdefs.h <<\EOF
2621 #define CC_HAS_PROTOS 1
2622 EOF
2623
2624 fi
2625 fi
2626
2627 if test "$cf_cv_ansi_cc" = "no"; then
2628         { { echo "$as_me:2628: error: Your compiler does not appear to recognize prototypes.
2629 You have the following choices:
2630         a. adjust your compiler options
2631         b. get an up-to-date compiler
2632         c. use a wrapper such as unproto" >&5
2633 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2634 You have the following choices:
2635         a. adjust your compiler options
2636         b. get an up-to-date compiler
2637         c. use a wrapper such as unproto" >&2;}
2638    { (exit 1); exit 1; }; }
2639 fi
2640
2641 case $cf_cv_system_name in
2642 os2*)
2643     CFLAGS="$CFLAGS -Zmt"
2644     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2645     CXXFLAGS="$CXXFLAGS -Zmt"
2646     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2647     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2648     ac_cv_exeext=.exe
2649     ;;
2650 esac
2651
2652 PROG_EXT="$EXEEXT"
2653
2654 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2655 #define PROG_EXT "$PROG_EXT"
2656 EOF
2657
2658 if test "$cross_compiling" = yes ; then
2659   LDCONFIG=:
2660 else
2661 case "$cf_cv_system_name" in #(vi
2662 freebsd*) #(vi
2663   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2664   ;;
2665 *) LDPATH=$PATH:/sbin:/usr/sbin
2666   # Extract the first word of "ldconfig", so it can be a program name with args.
2667 set dummy ldconfig; ac_word=$2
2668 echo "$as_me:2668: checking for $ac_word" >&5
2669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2670 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2671   echo $ECHO_N "(cached) $ECHO_C" >&6
2672 else
2673   case $LDCONFIG in
2674   [\\/]* | ?:[\\/]*)
2675   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2676   ;;
2677   *)
2678   ac_save_IFS=$IFS; IFS=$ac_path_separator
2679 ac_dummy="$LDPATH"
2680 for ac_dir in $ac_dummy; do
2681   IFS=$ac_save_IFS
2682   test -z "$ac_dir" && ac_dir=.
2683   if $as_executable_p "$ac_dir/$ac_word"; then
2684    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2685    echo "$as_me:2685: found $ac_dir/$ac_word" >&5
2686    break
2687 fi
2688 done
2689
2690   ;;
2691 esac
2692 fi
2693 LDCONFIG=$ac_cv_path_LDCONFIG
2694
2695 if test -n "$LDCONFIG"; then
2696   echo "$as_me:2696: result: $LDCONFIG" >&5
2697 echo "${ECHO_T}$LDCONFIG" >&6
2698 else
2699   echo "$as_me:2699: result: no" >&5
2700 echo "${ECHO_T}no" >&6
2701 fi
2702
2703   ;;
2704 esac
2705 fi
2706
2707 echo "$as_me:2707: checking if you want to ensure bool is consistent with C++" >&5
2708 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2709
2710 # Check whether --with-cxx or --without-cxx was given.
2711 if test "${with_cxx+set}" = set; then
2712   withval="$with_cxx"
2713   cf_with_cxx=$withval
2714 else
2715   cf_with_cxx=yes
2716 fi;
2717 echo "$as_me:2717: result: $cf_with_cxx" >&5
2718 echo "${ECHO_T}$cf_with_cxx" >&6
2719 if test "X$cf_with_cxx" = Xno ; then
2720         CXX=""
2721         GXX=""
2722 else
2723         # with autoconf 2.13, we can change the error to a warning:
2724                 ac_ext=cc
2725 ac_cpp='$CXXCPP $CPPFLAGS'
2726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2729 ac_main_return=return
2730 if test -n "$ac_tool_prefix"; then
2731   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2732   do
2733     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2734 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2735 echo "$as_me:2735: checking for $ac_word" >&5
2736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2737 if test "${ac_cv_prog_CXX+set}" = set; then
2738   echo $ECHO_N "(cached) $ECHO_C" >&6
2739 else
2740   if test -n "$CXX"; then
2741   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2742 else
2743   ac_save_IFS=$IFS; IFS=$ac_path_separator
2744 ac_dummy="$PATH"
2745 for ac_dir in $ac_dummy; do
2746   IFS=$ac_save_IFS
2747   test -z "$ac_dir" && ac_dir=.
2748   $as_executable_p "$ac_dir/$ac_word" || continue
2749 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2750 echo "$as_me:2750: found $ac_dir/$ac_word" >&5
2751 break
2752 done
2753
2754 fi
2755 fi
2756 CXX=$ac_cv_prog_CXX
2757 if test -n "$CXX"; then
2758   echo "$as_me:2758: result: $CXX" >&5
2759 echo "${ECHO_T}$CXX" >&6
2760 else
2761   echo "$as_me:2761: result: no" >&5
2762 echo "${ECHO_T}no" >&6
2763 fi
2764
2765     test -n "$CXX" && break
2766   done
2767 fi
2768 if test -z "$CXX"; then
2769   ac_ct_CXX=$CXX
2770   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2771 do
2772   # Extract the first word of "$ac_prog", so it can be a program name with args.
2773 set dummy $ac_prog; ac_word=$2
2774 echo "$as_me:2774: checking for $ac_word" >&5
2775 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2776 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2777   echo $ECHO_N "(cached) $ECHO_C" >&6
2778 else
2779   if test -n "$ac_ct_CXX"; then
2780   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2781 else
2782   ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 ac_dummy="$PATH"
2784 for ac_dir in $ac_dummy; do
2785   IFS=$ac_save_IFS
2786   test -z "$ac_dir" && ac_dir=.
2787   $as_executable_p "$ac_dir/$ac_word" || continue
2788 ac_cv_prog_ac_ct_CXX="$ac_prog"
2789 echo "$as_me:2789: found $ac_dir/$ac_word" >&5
2790 break
2791 done
2792
2793 fi
2794 fi
2795 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2796 if test -n "$ac_ct_CXX"; then
2797   echo "$as_me:2797: result: $ac_ct_CXX" >&5
2798 echo "${ECHO_T}$ac_ct_CXX" >&6
2799 else
2800   echo "$as_me:2800: result: no" >&5
2801 echo "${ECHO_T}no" >&6
2802 fi
2803
2804   test -n "$ac_ct_CXX" && break
2805 done
2806 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2807
2808   CXX=$ac_ct_CXX
2809 fi
2810
2811 # Provide some information about the compiler.
2812 echo "$as_me:2812:" \
2813      "checking for C++ compiler version" >&5
2814 ac_compiler=`set X $ac_compile; echo $2`
2815 { (eval echo "$as_me:2815: \"$ac_compiler --version </dev/null >&5\"") >&5
2816   (eval $ac_compiler --version </dev/null >&5) 2>&5
2817   ac_status=$?
2818   echo "$as_me:2818: \$? = $ac_status" >&5
2819   (exit $ac_status); }
2820 { (eval echo "$as_me:2820: \"$ac_compiler -v </dev/null >&5\"") >&5
2821   (eval $ac_compiler -v </dev/null >&5) 2>&5
2822   ac_status=$?
2823   echo "$as_me:2823: \$? = $ac_status" >&5
2824   (exit $ac_status); }
2825 { (eval echo "$as_me:2825: \"$ac_compiler -V </dev/null >&5\"") >&5
2826   (eval $ac_compiler -V </dev/null >&5) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); }
2830
2831 echo "$as_me:2831: checking whether we are using the GNU C++ compiler" >&5
2832 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2833 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2834   echo $ECHO_N "(cached) $ECHO_C" >&6
2835 else
2836   cat >conftest.$ac_ext <<_ACEOF
2837 #line 2837 "configure"
2838 #include "confdefs.h"
2839
2840 int
2841 main ()
2842 {
2843 #ifndef __GNUC__
2844        choke me
2845 #endif
2846
2847   ;
2848   return 0;
2849 }
2850 _ACEOF
2851 rm -f conftest.$ac_objext
2852 if { (eval echo "$as_me:2852: \"$ac_compile\"") >&5
2853   (eval $ac_compile) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); } &&
2857          { ac_try='test -s conftest.$ac_objext'
2858   { (eval echo "$as_me:2858: \"$ac_try\"") >&5
2859   (eval $ac_try) 2>&5
2860   ac_status=$?
2861   echo "$as_me:2861: \$? = $ac_status" >&5
2862   (exit $ac_status); }; }; then
2863   ac_compiler_gnu=yes
2864 else
2865   echo "$as_me: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2867 ac_compiler_gnu=no
2868 fi
2869 rm -f conftest.$ac_objext conftest.$ac_ext
2870 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2871
2872 fi
2873 echo "$as_me:2873: result: $ac_cv_cxx_compiler_gnu" >&5
2874 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2875 GXX=`test $ac_compiler_gnu = yes && echo yes`
2876 ac_test_CXXFLAGS=${CXXFLAGS+set}
2877 ac_save_CXXFLAGS=$CXXFLAGS
2878 CXXFLAGS="-g"
2879 echo "$as_me:2879: checking whether $CXX accepts -g" >&5
2880 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2881 if test "${ac_cv_prog_cxx_g+set}" = set; then
2882   echo $ECHO_N "(cached) $ECHO_C" >&6
2883 else
2884   cat >conftest.$ac_ext <<_ACEOF
2885 #line 2885 "configure"
2886 #include "confdefs.h"
2887
2888 int
2889 main ()
2890 {
2891
2892   ;
2893   return 0;
2894 }
2895 _ACEOF
2896 rm -f conftest.$ac_objext
2897 if { (eval echo "$as_me:2897: \"$ac_compile\"") >&5
2898   (eval $ac_compile) 2>&5
2899   ac_status=$?
2900   echo "$as_me:2900: \$? = $ac_status" >&5
2901   (exit $ac_status); } &&
2902          { ac_try='test -s conftest.$ac_objext'
2903   { (eval echo "$as_me:2903: \"$ac_try\"") >&5
2904   (eval $ac_try) 2>&5
2905   ac_status=$?
2906   echo "$as_me:2906: \$? = $ac_status" >&5
2907   (exit $ac_status); }; }; then
2908   ac_cv_prog_cxx_g=yes
2909 else
2910   echo "$as_me: failed program was:" >&5
2911 cat conftest.$ac_ext >&5
2912 ac_cv_prog_cxx_g=no
2913 fi
2914 rm -f conftest.$ac_objext conftest.$ac_ext
2915 fi
2916 echo "$as_me:2916: result: $ac_cv_prog_cxx_g" >&5
2917 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2918 if test "$ac_test_CXXFLAGS" = set; then
2919   CXXFLAGS=$ac_save_CXXFLAGS
2920 elif test $ac_cv_prog_cxx_g = yes; then
2921   if test "$GXX" = yes; then
2922     CXXFLAGS="-g -O2"
2923   else
2924     CXXFLAGS="-g"
2925   fi
2926 else
2927   if test "$GXX" = yes; then
2928     CXXFLAGS="-O2"
2929   else
2930     CXXFLAGS=
2931   fi
2932 fi
2933 for ac_declaration in \
2934    ''\
2935    '#include <stdlib.h>' \
2936    'extern "C" void std::exit (int) throw (); using std::exit;' \
2937    'extern "C" void std::exit (int); using std::exit;' \
2938    'extern "C" void exit (int) throw ();' \
2939    'extern "C" void exit (int);' \
2940    'void exit (int);'
2941 do
2942   cat >conftest.$ac_ext <<_ACEOF
2943 #line 2943 "configure"
2944 #include "confdefs.h"
2945 #include <stdlib.h>
2946 $ac_declaration
2947 int
2948 main ()
2949 {
2950 exit (42);
2951   ;
2952   return 0;
2953 }
2954 _ACEOF
2955 rm -f conftest.$ac_objext
2956 if { (eval echo "$as_me:2956: \"$ac_compile\"") >&5
2957   (eval $ac_compile) 2>&5
2958   ac_status=$?
2959   echo "$as_me:2959: \$? = $ac_status" >&5
2960   (exit $ac_status); } &&
2961          { ac_try='test -s conftest.$ac_objext'
2962   { (eval echo "$as_me:2962: \"$ac_try\"") >&5
2963   (eval $ac_try) 2>&5
2964   ac_status=$?
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit $ac_status); }; }; then
2967   :
2968 else
2969   echo "$as_me: failed program was:" >&5
2970 cat conftest.$ac_ext >&5
2971 continue
2972 fi
2973 rm -f conftest.$ac_objext conftest.$ac_ext
2974   cat >conftest.$ac_ext <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 $ac_declaration
2978 int
2979 main ()
2980 {
2981 exit (42);
2982   ;
2983   return 0;
2984 }
2985 _ACEOF
2986 rm -f conftest.$ac_objext
2987 if { (eval echo "$as_me:2987: \"$ac_compile\"") >&5
2988   (eval $ac_compile) 2>&5
2989   ac_status=$?
2990   echo "$as_me:2990: \$? = $ac_status" >&5
2991   (exit $ac_status); } &&
2992          { ac_try='test -s conftest.$ac_objext'
2993   { (eval echo "$as_me:2993: \"$ac_try\"") >&5
2994   (eval $ac_try) 2>&5
2995   ac_status=$?
2996   echo "$as_me:2996: \$? = $ac_status" >&5
2997   (exit $ac_status); }; }; then
2998   break
2999 else
3000   echo "$as_me: failed program was:" >&5
3001 cat conftest.$ac_ext >&5
3002 fi
3003 rm -f conftest.$ac_objext conftest.$ac_ext
3004 done
3005 rm -f conftest*
3006 if test -n "$ac_declaration"; then
3007   echo '#ifdef __cplusplus' >>confdefs.h
3008   echo $ac_declaration      >>confdefs.h
3009   echo '#endif'             >>confdefs.h
3010 fi
3011
3012 ac_ext=c
3013 ac_cpp='$CPP $CPPFLAGS'
3014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3017 ac_main_return=return
3018
3019                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3020         if test "$CXX" = "g++" ; then
3021                 # Extract the first word of "g++", so it can be a program name with args.
3022 set dummy g++; ac_word=$2
3023 echo "$as_me:3023: checking for $ac_word" >&5
3024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3025 if test "${ac_cv_path_CXX+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028   case $CXX in
3029   [\\/]* | ?:[\\/]*)
3030   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3031   ;;
3032   *)
3033   ac_save_IFS=$IFS; IFS=$ac_path_separator
3034 ac_dummy="$PATH"
3035 for ac_dir in $ac_dummy; do
3036   IFS=$ac_save_IFS
3037   test -z "$ac_dir" && ac_dir=.
3038   if $as_executable_p "$ac_dir/$ac_word"; then
3039    ac_cv_path_CXX="$ac_dir/$ac_word"
3040    echo "$as_me:3040: found $ac_dir/$ac_word" >&5
3041    break
3042 fi
3043 done
3044
3045   ;;
3046 esac
3047 fi
3048 CXX=$ac_cv_path_CXX
3049
3050 if test -n "$CXX"; then
3051   echo "$as_me:3051: result: $CXX" >&5
3052 echo "${ECHO_T}$CXX" >&6
3053 else
3054   echo "$as_me:3054: result: no" >&5
3055 echo "${ECHO_T}no" >&6
3056 fi
3057
3058         fi
3059         if test "$CXX" = "g++" ; then
3060                 { echo "$as_me:3060: WARNING: ignoring hardcoded g++" >&5
3061 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3062                 cf_with_cxx=no; CXX=""; GXX="";
3063         fi
3064 fi
3065
3066 GXX_VERSION=none
3067 if test "$GXX" = yes; then
3068         echo "$as_me:3068: checking version of g++" >&5
3069 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3070         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3071         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3072         echo "$as_me:3072: result: $GXX_VERSION" >&5
3073 echo "${ECHO_T}$GXX_VERSION" >&6
3074 fi
3075
3076 case $GXX_VERSION in
3077 1*|2.[0-6]*)
3078         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3079         # cf_cxx_library=no
3080         { echo "$as_me:3080: WARNING: templates do not work" >&5
3081 echo "$as_me: WARNING: templates do not work" >&2;}
3082         ;;
3083 esac
3084
3085 echo "$as_me:3085: checking if you want to build C++ binding and demo" >&5
3086 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3087
3088 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3089 if test "${with_cxx_binding+set}" = set; then
3090   withval="$with_cxx_binding"
3091   cf_with_cxx_binding=$withval
3092 else
3093   cf_with_cxx_binding=$cf_with_cxx
3094 fi;
3095 echo "$as_me:3095: result: $cf_with_cxx_binding" >&5
3096 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3097
3098 echo "$as_me:3098: checking if you want to build with Ada95" >&5
3099 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3100
3101 # Check whether --with-ada or --without-ada was given.
3102 if test "${with_ada+set}" = set; then
3103   withval="$with_ada"
3104   cf_with_ada=$withval
3105 else
3106   cf_with_ada=yes
3107 fi;
3108 echo "$as_me:3108: result: $cf_with_ada" >&5
3109 echo "${ECHO_T}$cf_with_ada" >&6
3110
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116   withval="$with_progs"
3117   cf_with_progs=$withval
3118 else
3119   cf_with_progs=yes
3120 fi;
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3123
3124 echo "$as_me:3124: checking if you wish to install curses.h" >&5
3125 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3126
3127 # Check whether --with-curses-h or --without-curses-h was given.
3128 if test "${with_curses_h+set}" = set; then
3129   withval="$with_curses_h"
3130   with_curses_h=$withval
3131 else
3132   with_curses_h=yes
3133 fi;
3134 echo "$as_me:3134: result: $with_curses_h" >&5
3135 echo "${ECHO_T}$with_curses_h" >&6
3136
3137 modules_to_build="ncurses"
3138 if test "X$cf_with_progs" != Xno ; then
3139 modules_to_build="$modules_to_build progs tack"
3140 fi
3141 modules_to_build="$modules_to_build panel menu form"
3142
3143 test "$program_prefix" != NONE &&
3144   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3145 # Use a double $ so make ignores it.
3146 test "$program_suffix" != NONE &&
3147   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3148 # Double any \ or $.  echo might interpret backslashes.
3149 # By default was `s,x,x', remove it if useless.
3150 cat <<\_ACEOF >conftest.sed
3151 s/[\\$]/&&/g;s/;s,x,x,$//
3152 _ACEOF
3153 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3154 rm conftest.sed
3155
3156 for ac_prog in mawk gawk nawk awk
3157 do
3158   # Extract the first word of "$ac_prog", so it can be a program name with args.
3159 set dummy $ac_prog; ac_word=$2
3160 echo "$as_me:3160: checking for $ac_word" >&5
3161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3162 if test "${ac_cv_prog_AWK+set}" = set; then
3163   echo $ECHO_N "(cached) $ECHO_C" >&6
3164 else
3165   if test -n "$AWK"; then
3166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3167 else
3168   ac_save_IFS=$IFS; IFS=$ac_path_separator
3169 ac_dummy="$PATH"
3170 for ac_dir in $ac_dummy; do
3171   IFS=$ac_save_IFS
3172   test -z "$ac_dir" && ac_dir=.
3173   $as_executable_p "$ac_dir/$ac_word" || continue
3174 ac_cv_prog_AWK="$ac_prog"
3175 echo "$as_me:3175: found $ac_dir/$ac_word" >&5
3176 break
3177 done
3178
3179 fi
3180 fi
3181 AWK=$ac_cv_prog_AWK
3182 if test -n "$AWK"; then
3183   echo "$as_me:3183: result: $AWK" >&5
3184 echo "${ECHO_T}$AWK" >&6
3185 else
3186   echo "$as_me:3186: result: no" >&5
3187 echo "${ECHO_T}no" >&6
3188 fi
3189
3190   test -n "$AWK" && break
3191 done
3192
3193 test -z "$AWK" && { { echo "$as_me:3193: error: No awk program found" >&5
3194 echo "$as_me: error: No awk program found" >&2;}
3195    { (exit 1); exit 1; }; }
3196
3197 echo "$as_me:3197: checking for egrep" >&5
3198 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3199 if test "${ac_cv_prog_egrep+set}" = set; then
3200   echo $ECHO_N "(cached) $ECHO_C" >&6
3201 else
3202   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3203     then ac_cv_prog_egrep='grep -E'
3204     else ac_cv_prog_egrep='egrep'
3205     fi
3206 fi
3207 echo "$as_me:3207: result: $ac_cv_prog_egrep" >&5
3208 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3209  EGREP=$ac_cv_prog_egrep
3210
3211 test -z "$EGREP" && { { echo "$as_me:3211: error: No egrep program found" >&5
3212 echo "$as_me: error: No egrep program found" >&2;}
3213    { (exit 1); exit 1; }; }
3214
3215 # Find a good install program.  We prefer a C program (faster),
3216 # so one script is as good as another.  But avoid the broken or
3217 # incompatible versions:
3218 # SysV /etc/install, /usr/sbin/install
3219 # SunOS /usr/etc/install
3220 # IRIX /sbin/install
3221 # AIX /bin/install
3222 # AmigaOS /C/install, which installs bootblocks on floppy discs
3223 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3224 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3225 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3226 # ./install, which can be erroneously created by make from ./install.sh.
3227 echo "$as_me:3227: checking for a BSD compatible install" >&5
3228 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3229 if test -z "$INSTALL"; then
3230 if test "${ac_cv_path_install+set}" = set; then
3231   echo $ECHO_N "(cached) $ECHO_C" >&6
3232 else
3233     ac_save_IFS=$IFS; IFS=$ac_path_separator
3234   for ac_dir in $PATH; do
3235     IFS=$ac_save_IFS
3236     # Account for people who put trailing slashes in PATH elements.
3237     case $ac_dir/ in
3238     / | ./ | .// | /cC/* \
3239     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3240     | /usr/ucb/* ) ;;
3241     *)
3242       # OSF1 and SCO ODT 3.0 have their own names for install.
3243       # Don't use installbsd from OSF since it installs stuff as root
3244       # by default.
3245       for ac_prog in ginstall scoinst install; do
3246         if $as_executable_p "$ac_dir/$ac_prog"; then
3247           if test $ac_prog = install &&
3248             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3249             # AIX install.  It has an incompatible calling convention.
3250             :
3251           elif test $ac_prog = install &&
3252             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3253             # program-specific install script used by HP pwplus--don't use.
3254             :
3255           else
3256             ac_cv_path_install="$ac_dir/$ac_prog -c"
3257             break 2
3258           fi
3259         fi
3260       done
3261       ;;
3262     esac
3263   done
3264
3265 fi
3266   if test "${ac_cv_path_install+set}" = set; then
3267     INSTALL=$ac_cv_path_install
3268   else
3269     # As a last resort, use the slow shell script.  We don't cache a
3270     # path for INSTALL within a source directory, because that will
3271     # break other packages using the cache if that directory is
3272     # removed, or if the path is relative.
3273     INSTALL=$ac_install_sh
3274   fi
3275 fi
3276 echo "$as_me:3276: result: $INSTALL" >&5
3277 echo "${ECHO_T}$INSTALL" >&6
3278
3279 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3280 # It thinks the first close brace ends the variable substitution.
3281 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3282
3283 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3284
3285 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3286
3287 case $INSTALL in
3288 /*)
3289   ;;
3290 *)
3291   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3292   test -z "$cf_dir" && cf_dir=.
3293   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3294   ;;
3295 esac
3296
3297 for ac_prog in tdlint lint alint
3298 do
3299   # Extract the first word of "$ac_prog", so it can be a program name with args.
3300 set dummy $ac_prog; ac_word=$2
3301 echo "$as_me:3301: checking for $ac_word" >&5
3302 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3303 if test "${ac_cv_prog_LINT+set}" = set; then
3304   echo $ECHO_N "(cached) $ECHO_C" >&6
3305 else
3306   if test -n "$LINT"; then
3307   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3308 else
3309   ac_save_IFS=$IFS; IFS=$ac_path_separator
3310 ac_dummy="$PATH"
3311 for ac_dir in $ac_dummy; do
3312   IFS=$ac_save_IFS
3313   test -z "$ac_dir" && ac_dir=.
3314   $as_executable_p "$ac_dir/$ac_word" || continue
3315 ac_cv_prog_LINT="$ac_prog"
3316 echo "$as_me:3316: found $ac_dir/$ac_word" >&5
3317 break
3318 done
3319
3320 fi
3321 fi
3322 LINT=$ac_cv_prog_LINT
3323 if test -n "$LINT"; then
3324   echo "$as_me:3324: result: $LINT" >&5
3325 echo "${ECHO_T}$LINT" >&6
3326 else
3327   echo "$as_me:3327: result: no" >&5
3328 echo "${ECHO_T}no" >&6
3329 fi
3330
3331   test -n "$LINT" && break
3332 done
3333
3334 echo "$as_me:3334: checking whether ln -s works" >&5
3335 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3336 LN_S=$as_ln_s
3337 if test "$LN_S" = "ln -s"; then
3338   echo "$as_me:3338: result: yes" >&5
3339 echo "${ECHO_T}yes" >&6
3340 else
3341   echo "$as_me:3341: result: no, using $LN_S" >&5
3342 echo "${ECHO_T}no, using $LN_S" >&6
3343 fi
3344
3345 echo "$as_me:3345: checking whether ${MAKE-make} sets \${MAKE}" >&5
3346 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3347 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3348 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   cat >conftest.make <<\EOF
3352 all:
3353         @echo 'ac_maketemp="${MAKE}"'
3354 EOF
3355 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3356 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3357 if test -n "$ac_maketemp"; then
3358   eval ac_cv_prog_make_${ac_make}_set=yes
3359 else
3360   eval ac_cv_prog_make_${ac_make}_set=no
3361 fi
3362 rm -f conftest.make
3363 fi
3364 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3365   echo "$as_me:3365: result: yes" >&5
3366 echo "${ECHO_T}yes" >&6
3367   SET_MAKE=
3368 else
3369   echo "$as_me:3369: result: no" >&5
3370 echo "${ECHO_T}no" >&6
3371   SET_MAKE="MAKE=${MAKE-make}"
3372 fi
3373
3374 echo "$as_me:3374: checking if filesystem supports mixed-case filenames" >&5
3375 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3376 if test "${cf_cv_mixedcase+set}" = set; then
3377   echo $ECHO_N "(cached) $ECHO_C" >&6
3378 else
3379
3380 if test "$cross_compiling" = yes ; then
3381         case $target_alias in #(vi
3382         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3383                 cf_cv_mixedcase=no
3384                 ;;
3385         *)
3386                 cf_cv_mixedcase=yes
3387                 ;;
3388         esac
3389 else
3390         rm -f conftest CONFTEST
3391         echo test >conftest
3392         if test -f CONFTEST ; then
3393                 cf_cv_mixedcase=no
3394         else
3395                 cf_cv_mixedcase=yes
3396         fi
3397         rm -f conftest CONFTEST
3398 fi
3399
3400 fi
3401 echo "$as_me:3401: result: $cf_cv_mixedcase" >&5
3402 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3403 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3404 #define MIXEDCASE_FILENAMES 1
3405 EOF
3406
3407 # Extract the first word of "ctags", so it can be a program name with args.
3408 set dummy ctags; ac_word=$2
3409 echo "$as_me:3409: checking for $ac_word" >&5
3410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3411 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3412   echo $ECHO_N "(cached) $ECHO_C" >&6
3413 else
3414   if test -n "$MAKE_LOWER_TAGS"; then
3415   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3416 else
3417   ac_save_IFS=$IFS; IFS=$ac_path_separator
3418 ac_dummy="$PATH"
3419 for ac_dir in $ac_dummy; do
3420   IFS=$ac_save_IFS
3421   test -z "$ac_dir" && ac_dir=.
3422   $as_executable_p "$ac_dir/$ac_word" || continue
3423 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3424 echo "$as_me:3424: found $ac_dir/$ac_word" >&5
3425 break
3426 done
3427
3428   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3429 fi
3430 fi
3431 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3432 if test -n "$MAKE_LOWER_TAGS"; then
3433   echo "$as_me:3433: result: $MAKE_LOWER_TAGS" >&5
3434 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3435 else
3436   echo "$as_me:3436: result: no" >&5
3437 echo "${ECHO_T}no" >&6
3438 fi
3439
3440 if test "$cf_cv_mixedcase" = yes ; then
3441         # Extract the first word of "etags", so it can be a program name with args.
3442 set dummy etags; ac_word=$2
3443 echo "$as_me:3443: checking for $ac_word" >&5
3444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3445 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3446   echo $ECHO_N "(cached) $ECHO_C" >&6
3447 else
3448   if test -n "$MAKE_UPPER_TAGS"; then
3449   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3450 else
3451   ac_save_IFS=$IFS; IFS=$ac_path_separator
3452 ac_dummy="$PATH"
3453 for ac_dir in $ac_dummy; do
3454   IFS=$ac_save_IFS
3455   test -z "$ac_dir" && ac_dir=.
3456   $as_executable_p "$ac_dir/$ac_word" || continue
3457 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3458 echo "$as_me:3458: found $ac_dir/$ac_word" >&5
3459 break
3460 done
3461
3462   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3463 fi
3464 fi
3465 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3466 if test -n "$MAKE_UPPER_TAGS"; then
3467   echo "$as_me:3467: result: $MAKE_UPPER_TAGS" >&5
3468 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3469 else
3470   echo "$as_me:3470: result: no" >&5
3471 echo "${ECHO_T}no" >&6
3472 fi
3473
3474 else
3475         MAKE_UPPER_TAGS=no
3476 fi
3477
3478 if test "$MAKE_UPPER_TAGS" = yes ; then
3479         MAKE_UPPER_TAGS=
3480 else
3481         MAKE_UPPER_TAGS="#"
3482 fi
3483
3484 if test "$MAKE_LOWER_TAGS" = yes ; then
3485         MAKE_LOWER_TAGS=
3486 else
3487         MAKE_LOWER_TAGS="#"
3488 fi
3489
3490 echo "$as_me:3490: checking for makeflags variable" >&5
3491 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3492 if test "${cf_cv_makeflags+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495
3496         cf_cv_makeflags=''
3497         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3498         do
3499                 cat >cf_makeflags.tmp <<CF_EOF
3500 SHELL = /bin/sh
3501 all :
3502         @ echo '.$cf_option'
3503 CF_EOF
3504                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3505                 case "$cf_result" in
3506                 .*k)
3507                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3508                         case "$cf_result" in
3509                         .*CC=*) cf_cv_makeflags=
3510                                 ;;
3511                         *)      cf_cv_makeflags=$cf_option
3512                                 ;;
3513                         esac
3514                         break
3515                         ;;
3516                 .-)     ;;
3517                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3518                         ;;
3519                 esac
3520         done
3521         rm -f cf_makeflags.tmp
3522
3523 fi
3524 echo "$as_me:3524: result: $cf_cv_makeflags" >&5
3525 echo "${ECHO_T}$cf_cv_makeflags" >&6
3526
3527 echo "$as_me:3527: checking for long file names" >&5
3528 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3529 if test "${ac_cv_sys_long_file_names+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   ac_cv_sys_long_file_names=yes
3533 # Test for long file names in all the places we know might matter:
3534 #      .                the current directory, where building will happen
3535 #      $prefix/lib      where we will be installing things
3536 #      $exec_prefix/lib likewise
3537 # eval it to expand exec_prefix.
3538 #      $TMPDIR          if set, where it might want to write temporary files
3539 # if $TMPDIR is not set:
3540 #      /tmp             where it might want to write temporary files
3541 #      /var/tmp         likewise
3542 #      /usr/tmp         likewise
3543 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3544   ac_tmpdirs=$TMPDIR
3545 else
3546   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3547 fi
3548 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3549   test -d $ac_dir || continue
3550   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3551   ac_xdir=$ac_dir/cf$$
3552   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3553   ac_tf1=$ac_xdir/conftest9012345
3554   ac_tf2=$ac_xdir/conftest9012346
3555   (echo 1 >$ac_tf1) 2>/dev/null
3556   (echo 2 >$ac_tf2) 2>/dev/null
3557   ac_val=`cat $ac_tf1 2>/dev/null`
3558   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3559     ac_cv_sys_long_file_names=no
3560     rm -rf $ac_xdir 2>/dev/null
3561     break
3562   fi
3563   rm -rf $ac_xdir 2>/dev/null
3564 done
3565 fi
3566 echo "$as_me:3566: result: $ac_cv_sys_long_file_names" >&5
3567 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3568 if test $ac_cv_sys_long_file_names = yes; then
3569
3570 cat >>confdefs.h <<\EOF
3571 #define HAVE_LONG_FILE_NAMES 1
3572 EOF
3573
3574 fi
3575
3576 echo "$as_me:3576: checking if filesystem supports mixed-case filenames" >&5
3577 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3578 if test "${cf_cv_mixedcase+set}" = set; then
3579   echo $ECHO_N "(cached) $ECHO_C" >&6
3580 else
3581
3582 if test "$cross_compiling" = yes ; then
3583         case $target_alias in #(vi
3584         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3585                 cf_cv_mixedcase=no
3586                 ;;
3587         *)
3588                 cf_cv_mixedcase=yes
3589                 ;;
3590         esac
3591 else
3592         rm -f conftest CONFTEST
3593         echo test >conftest
3594         if test -f CONFTEST ; then
3595                 cf_cv_mixedcase=no
3596         else
3597                 cf_cv_mixedcase=yes
3598         fi
3599         rm -f conftest CONFTEST
3600 fi
3601
3602 fi
3603 echo "$as_me:3603: result: $cf_cv_mixedcase" >&5
3604 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3605 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3606 #define MIXEDCASE_FILENAMES 1
3607 EOF
3608
3609 if test -n "$ac_tool_prefix"; then
3610   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3611 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3612 echo "$as_me:3612: checking for $ac_word" >&5
3613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3614 if test "${ac_cv_prog_RANLIB+set}" = set; then
3615   echo $ECHO_N "(cached) $ECHO_C" >&6
3616 else
3617   if test -n "$RANLIB"; then
3618   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3619 else
3620   ac_save_IFS=$IFS; IFS=$ac_path_separator
3621 ac_dummy="$PATH"
3622 for ac_dir in $ac_dummy; do
3623   IFS=$ac_save_IFS
3624   test -z "$ac_dir" && ac_dir=.
3625   $as_executable_p "$ac_dir/$ac_word" || continue
3626 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3627 echo "$as_me:3627: found $ac_dir/$ac_word" >&5
3628 break
3629 done
3630
3631 fi
3632 fi
3633 RANLIB=$ac_cv_prog_RANLIB
3634 if test -n "$RANLIB"; then
3635   echo "$as_me:3635: result: $RANLIB" >&5
3636 echo "${ECHO_T}$RANLIB" >&6
3637 else
3638   echo "$as_me:3638: result: no" >&5
3639 echo "${ECHO_T}no" >&6
3640 fi
3641
3642 fi
3643 if test -z "$ac_cv_prog_RANLIB"; then
3644   ac_ct_RANLIB=$RANLIB
3645   # Extract the first word of "ranlib", so it can be a program name with args.
3646 set dummy ranlib; ac_word=$2
3647 echo "$as_me:3647: checking for $ac_word" >&5
3648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3649 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3650   echo $ECHO_N "(cached) $ECHO_C" >&6
3651 else
3652   if test -n "$ac_ct_RANLIB"; then
3653   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3654 else
3655   ac_save_IFS=$IFS; IFS=$ac_path_separator
3656 ac_dummy="$PATH"
3657 for ac_dir in $ac_dummy; do
3658   IFS=$ac_save_IFS
3659   test -z "$ac_dir" && ac_dir=.
3660   $as_executable_p "$ac_dir/$ac_word" || continue
3661 ac_cv_prog_ac_ct_RANLIB="ranlib"
3662 echo "$as_me:3662: found $ac_dir/$ac_word" >&5
3663 break
3664 done
3665
3666   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3667 fi
3668 fi
3669 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3670 if test -n "$ac_ct_RANLIB"; then
3671   echo "$as_me:3671: result: $ac_ct_RANLIB" >&5
3672 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3673 else
3674   echo "$as_me:3674: result: no" >&5
3675 echo "${ECHO_T}no" >&6
3676 fi
3677
3678   RANLIB=$ac_ct_RANLIB
3679 else
3680   RANLIB="$ac_cv_prog_RANLIB"
3681 fi
3682
3683 if test -n "$ac_tool_prefix"; then
3684   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3685 set dummy ${ac_tool_prefix}ld; ac_word=$2
3686 echo "$as_me:3686: checking for $ac_word" >&5
3687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3688 if test "${ac_cv_prog_LD+set}" = set; then
3689   echo $ECHO_N "(cached) $ECHO_C" >&6
3690 else
3691   if test -n "$LD"; then
3692   ac_cv_prog_LD="$LD" # Let the user override the test.
3693 else
3694   ac_save_IFS=$IFS; IFS=$ac_path_separator
3695 ac_dummy="$PATH"
3696 for ac_dir in $ac_dummy; do
3697   IFS=$ac_save_IFS
3698   test -z "$ac_dir" && ac_dir=.
3699   $as_executable_p "$ac_dir/$ac_word" || continue
3700 ac_cv_prog_LD="${ac_tool_prefix}ld"
3701 echo "$as_me:3701: found $ac_dir/$ac_word" >&5
3702 break
3703 done
3704
3705 fi
3706 fi
3707 LD=$ac_cv_prog_LD
3708 if test -n "$LD"; then
3709   echo "$as_me:3709: result: $LD" >&5
3710 echo "${ECHO_T}$LD" >&6
3711 else
3712   echo "$as_me:3712: result: no" >&5
3713 echo "${ECHO_T}no" >&6
3714 fi
3715
3716 fi
3717 if test -z "$ac_cv_prog_LD"; then
3718   ac_ct_LD=$LD
3719   # Extract the first word of "ld", so it can be a program name with args.
3720 set dummy ld; ac_word=$2
3721 echo "$as_me:3721: checking for $ac_word" >&5
3722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3723 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726   if test -n "$ac_ct_LD"; then
3727   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3728 else
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   $as_executable_p "$ac_dir/$ac_word" || continue
3735 ac_cv_prog_ac_ct_LD="ld"
3736 echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737 break
3738 done
3739
3740   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3741 fi
3742 fi
3743 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3744 if test -n "$ac_ct_LD"; then
3745   echo "$as_me:3745: result: $ac_ct_LD" >&5
3746 echo "${ECHO_T}$ac_ct_LD" >&6
3747 else
3748   echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3750 fi
3751
3752   LD=$ac_ct_LD
3753 else
3754   LD="$ac_cv_prog_LD"
3755 fi
3756
3757 if test -n "$ac_tool_prefix"; then
3758   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3759 set dummy ${ac_tool_prefix}ar; ac_word=$2
3760 echo "$as_me:3760: checking for $ac_word" >&5
3761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3762 if test "${ac_cv_prog_AR+set}" = set; then
3763   echo $ECHO_N "(cached) $ECHO_C" >&6
3764 else
3765   if test -n "$AR"; then
3766   ac_cv_prog_AR="$AR" # Let the user override the test.
3767 else
3768   ac_save_IFS=$IFS; IFS=$ac_path_separator
3769 ac_dummy="$PATH"
3770 for ac_dir in $ac_dummy; do
3771   IFS=$ac_save_IFS
3772   test -z "$ac_dir" && ac_dir=.
3773   $as_executable_p "$ac_dir/$ac_word" || continue
3774 ac_cv_prog_AR="${ac_tool_prefix}ar"
3775 echo "$as_me:3775: found $ac_dir/$ac_word" >&5
3776 break
3777 done
3778
3779 fi
3780 fi
3781 AR=$ac_cv_prog_AR
3782 if test -n "$AR"; then
3783   echo "$as_me:3783: result: $AR" >&5
3784 echo "${ECHO_T}$AR" >&6
3785 else
3786   echo "$as_me:3786: result: no" >&5
3787 echo "${ECHO_T}no" >&6
3788 fi
3789
3790 fi
3791 if test -z "$ac_cv_prog_AR"; then
3792   ac_ct_AR=$AR
3793   # Extract the first word of "ar", so it can be a program name with args.
3794 set dummy ar; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$ac_ct_AR"; then
3801   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_ac_ct_AR="ar"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3815 fi
3816 fi
3817 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3818 if test -n "$ac_ct_AR"; then
3819   echo "$as_me:3819: result: $ac_ct_AR" >&5
3820 echo "${ECHO_T}$ac_ct_AR" >&6
3821 else
3822   echo "$as_me:3822: result: no" >&5
3823 echo "${ECHO_T}no" >&6
3824 fi
3825
3826   AR=$ac_ct_AR
3827 else
3828   AR="$ac_cv_prog_AR"
3829 fi
3830
3831 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3832   echo $ECHO_N "(cached) $ECHO_C" >&6
3833 else
3834
3835 echo "$as_me:3835: checking for archiver options (symbol AR_OPTS)" >&5
3836 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3837
3838 if test -z "$AR_OPTS" ; then
3839         AR_OPTS=rv
3840
3841 fi
3842
3843 cf_cv_subst_AR_OPTS=$AR_OPTS
3844 echo "$as_me:3844: result: $AR_OPTS" >&5
3845 echo "${ECHO_T}$AR_OPTS" >&6
3846
3847 fi
3848
3849 echo "$as_me:3849: checking if you have specified an install-prefix" >&5
3850 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3851
3852 # Check whether --with-install-prefix or --without-install-prefix was given.
3853 if test "${with_install_prefix+set}" = set; then
3854   withval="$with_install_prefix"
3855   case "$withval" in #(vi
3856         yes|no) #(vi
3857                 ;;
3858         *)      DESTDIR="$withval"
3859                 ;;
3860         esac
3861 fi;
3862 echo "$as_me:3862: result: $DESTDIR" >&5
3863 echo "${ECHO_T}$DESTDIR" >&6
3864
3865 ###############################################################################
3866
3867 # If we're cross-compiling, allow the user to override the tools and their
3868 # options.  The configure script is oriented toward identifying the host
3869 # compiler, etc., but we need a build compiler to generate parts of the source.
3870
3871 if test "$cross_compiling" = yes ; then
3872
3873         # defaults that we might want to override
3874         : ${BUILD_CFLAGS:=''}
3875         : ${BUILD_CPPFLAGS:=''}
3876         : ${BUILD_LDFLAGS:=''}
3877         : ${BUILD_LIBS:=''}
3878         : ${BUILD_EXEEXT:='$x'}
3879         : ${BUILD_OBJEXT:='o'}
3880
3881 # Check whether --with-build-cc or --without-build-cc was given.
3882 if test "${with_build_cc+set}" = set; then
3883   withval="$with_build_cc"
3884   BUILD_CC="$withval"
3885 else
3886   for ac_prog in gcc cc cl
3887 do
3888   # Extract the first word of "$ac_prog", so it can be a program name with args.
3889 set dummy $ac_prog; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if test -n "$BUILD_CC"; then
3896   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3897 else
3898   ac_save_IFS=$IFS; IFS=$ac_path_separator
3899 ac_dummy="$PATH"
3900 for ac_dir in $ac_dummy; do
3901   IFS=$ac_save_IFS
3902   test -z "$ac_dir" && ac_dir=.
3903   $as_executable_p "$ac_dir/$ac_word" || continue
3904 ac_cv_prog_BUILD_CC="$ac_prog"
3905 echo "$as_me:3905: found $ac_dir/$ac_word" >&5
3906 break
3907 done
3908
3909 fi
3910 fi
3911 BUILD_CC=$ac_cv_prog_BUILD_CC
3912 if test -n "$BUILD_CC"; then
3913   echo "$as_me:3913: result: $BUILD_CC" >&5
3914 echo "${ECHO_T}$BUILD_CC" >&6
3915 else
3916   echo "$as_me:3916: result: no" >&5
3917 echo "${ECHO_T}no" >&6
3918 fi
3919
3920   test -n "$BUILD_CC" && break
3921 done
3922
3923 fi;
3924         echo "$as_me:3924: checking for native build C compiler" >&5
3925 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3926         echo "$as_me:3926: result: $BUILD_CC" >&5
3927 echo "${ECHO_T}$BUILD_CC" >&6
3928
3929         echo "$as_me:3929: checking for native build C preprocessor" >&5
3930 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3931
3932 # Check whether --with-build-cpp or --without-build-cpp was given.
3933 if test "${with_build_cpp+set}" = set; then
3934   withval="$with_build_cpp"
3935   BUILD_CPP="$withval"
3936 else
3937   BUILD_CPP='${BUILD_CC} -E'
3938 fi;
3939         echo "$as_me:3939: result: $BUILD_CPP" >&5
3940 echo "${ECHO_T}$BUILD_CPP" >&6
3941
3942         echo "$as_me:3942: checking for native build C flags" >&5
3943 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3944
3945 # Check whether --with-build-cflags or --without-build-cflags was given.
3946 if test "${with_build_cflags+set}" = set; then
3947   withval="$with_build_cflags"
3948   BUILD_CFLAGS="$withval"
3949 fi;
3950         echo "$as_me:3950: result: $BUILD_CFLAGS" >&5
3951 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3952
3953         echo "$as_me:3953: checking for native build C preprocessor-flags" >&5
3954 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3955
3956 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3957 if test "${with_build_cppflags+set}" = set; then
3958   withval="$with_build_cppflags"
3959   BUILD_CPPFLAGS="$withval"
3960 fi;
3961         echo "$as_me:3961: result: $BUILD_CPPFLAGS" >&5
3962 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3963
3964         echo "$as_me:3964: checking for native build linker-flags" >&5
3965 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3966
3967 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3968 if test "${with_build_ldflags+set}" = set; then
3969   withval="$with_build_ldflags"
3970   BUILD_LDFLAGS="$withval"
3971 fi;
3972         echo "$as_me:3972: result: $BUILD_LDFLAGS" >&5
3973 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3974
3975         echo "$as_me:3975: checking for native build linker-libraries" >&5
3976 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3977
3978 # Check whether --with-build-libs or --without-build-libs was given.
3979 if test "${with_build_libs+set}" = set; then
3980   withval="$with_build_libs"
3981   BUILD_LIBS="$withval"
3982 fi;
3983         echo "$as_me:3983: result: $BUILD_LIBS" >&5
3984 echo "${ECHO_T}$BUILD_LIBS" >&6
3985
3986         # this assumes we're on Unix.
3987         BUILD_EXEEXT=
3988         BUILD_OBJEXT=o
3989
3990         : ${BUILD_CC:='${CC}'}
3991
3992         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3993                 { { echo "$as_me:3993: error: Cross-build requires two compilers.
3994 Use --with-build-cc to specify the native compiler." >&5
3995 echo "$as_me: error: Cross-build requires two compilers.
3996 Use --with-build-cc to specify the native compiler." >&2;}
3997    { (exit 1); exit 1; }; }
3998         fi
3999
4000 else
4001         : ${BUILD_CC:='${CC}'}
4002         : ${BUILD_CPP:='${CPP}'}
4003         : ${BUILD_CFLAGS:='${CFLAGS}'}
4004         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4005         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4006         : ${BUILD_LIBS:='${LIBS}'}
4007         : ${BUILD_EXEEXT:='$x'}
4008         : ${BUILD_OBJEXT:='o'}
4009 fi
4010
4011 ###############################################################################
4012
4013 ### Options to allow the user to specify the set of libraries which are used.
4014 ### Use "--without-normal --with-shared" to allow the default model to be
4015 ### shared, for example.
4016 cf_list_models=""
4017
4018 LIBTOOL=
4019
4020 # common library maintenance symbols that are convenient for libtool scripts:
4021 LIB_CREATE='${AR} -cr'
4022 LIB_OBJECT='${OBJECTS}'
4023 LIB_SUFFIX=.a
4024 LIB_PREP="$RANLIB"
4025
4026 # symbols used to prop libtool up to enable it to determine what it should be
4027 # doing:
4028 LIB_CLEAN=
4029 LIB_COMPILE=
4030 LIB_LINK='${CC}'
4031 LIB_INSTALL=
4032 LIB_UNINSTALL=
4033
4034 echo "$as_me:4034: checking if you want to build libraries with libtool" >&5
4035 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4036
4037 # Check whether --with-libtool or --without-libtool was given.
4038 if test "${with_libtool+set}" = set; then
4039   withval="$with_libtool"
4040   with_libtool=$withval
4041 else
4042   with_libtool=no
4043 fi;
4044 echo "$as_me:4044: result: $with_libtool" >&5
4045 echo "${ECHO_T}$with_libtool" >&6
4046 if test "$with_libtool" != "no"; then
4047
4048         if test "$with_libtool" != "yes" ; then
4049
4050 if test "x$prefix" != xNONE; then
4051   cf_path_syntax="$prefix"
4052 else
4053   cf_path_syntax="$ac_default_prefix"
4054 fi
4055
4056 case ".$with_libtool" in #(vi
4057 .\$\(*\)*|.\'*\'*) #(vi
4058   ;;
4059 ..|./*|.\\*) #(vi
4060   ;;
4061 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4062   ;;
4063 .\${*prefix}*) #(vi
4064   eval with_libtool="$with_libtool"
4065   case ".$with_libtool" in #(vi
4066   .NONE/*)
4067     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4068     ;;
4069   esac
4070   ;; #(vi
4071 .no|.NONE/*)
4072   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4073   ;;
4074 *)
4075   { { echo "$as_me:4075: error: expected a pathname, not \"$with_libtool\"" >&5
4076 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4077    { (exit 1); exit 1; }; }
4078   ;;
4079 esac
4080
4081                 LIBTOOL=$with_libtool
4082         else
4083                 # Extract the first word of "libtool", so it can be a program name with args.
4084 set dummy libtool; ac_word=$2
4085 echo "$as_me:4085: checking for $ac_word" >&5
4086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4087 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4088   echo $ECHO_N "(cached) $ECHO_C" >&6
4089 else
4090   case $LIBTOOL in
4091   [\\/]* | ?:[\\/]*)
4092   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4093   ;;
4094   *)
4095   ac_save_IFS=$IFS; IFS=$ac_path_separator
4096 ac_dummy="$PATH"
4097 for ac_dir in $ac_dummy; do
4098   IFS=$ac_save_IFS
4099   test -z "$ac_dir" && ac_dir=.
4100   if $as_executable_p "$ac_dir/$ac_word"; then
4101    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4102    echo "$as_me:4102: found $ac_dir/$ac_word" >&5
4103    break
4104 fi
4105 done
4106
4107   ;;
4108 esac
4109 fi
4110 LIBTOOL=$ac_cv_path_LIBTOOL
4111
4112 if test -n "$LIBTOOL"; then
4113   echo "$as_me:4113: result: $LIBTOOL" >&5
4114 echo "${ECHO_T}$LIBTOOL" >&6
4115 else
4116   echo "$as_me:4116: result: no" >&5
4117 echo "${ECHO_T}no" >&6
4118 fi
4119
4120         fi
4121         if test -z "$LIBTOOL" ; then
4122                 { { echo "$as_me:4122: error: Cannot find libtool" >&5
4123 echo "$as_me: error: Cannot find libtool" >&2;}
4124    { (exit 1); exit 1; }; }
4125         fi
4126         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4127         LIB_OBJECT='${OBJECTS:.o=.lo}'
4128         LIB_SUFFIX=.la
4129         LIB_CLEAN='${LIBTOOL} --mode=clean'
4130         LIB_COMPILE='${LIBTOOL} --mode=compile'
4131         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4132         LIB_INSTALL='${LIBTOOL} --mode=install'
4133         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4134         LIB_PREP=:
4135
4136         # Show the version of libtool
4137         echo "$as_me:4137: checking version of libtool" >&5
4138 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4139
4140         # Save the version in a cache variable - this is not entirely a good
4141         # thing, but the version string from libtool is very ugly, and for
4142         # bug reports it might be useful to have the original string.
4143         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.].*//'`
4144         echo "$as_me:4144: result: $cf_cv_libtool_version" >&5
4145 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4146         if test -z "$cf_cv_libtool_version" ; then
4147                 { { echo "$as_me:4147: error: This is not GNU libtool" >&5
4148 echo "$as_me: error: This is not GNU libtool" >&2;}
4149    { (exit 1); exit 1; }; }
4150         fi
4151
4152         # special hack to add --tag option for C++ compiler
4153         case $cf_cv_libtool_version in
4154         1.[5-9]*|[2-9]*)
4155                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4156                 ;;
4157         *)
4158                 LIBTOOL_CXX="$LIBTOOL"
4159                 ;;
4160         esac
4161 else
4162         LIBTOOL=""
4163         LIBTOOL_CXX=""
4164 fi
4165
4166 test -z "$LIBTOOL" && ECHO_LT=
4167
4168 if test "$with_libtool" != "no" ; then
4169
4170 cf_list_models="$cf_list_models libtool"
4171
4172 else
4173
4174 echo "$as_me:4174: checking if you want to build shared libraries" >&5
4175 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4176
4177 # Check whether --with-shared or --without-shared was given.
4178 if test "${with_shared+set}" = set; then
4179   withval="$with_shared"
4180   with_shared=$withval
4181 else
4182   with_shared=no
4183 fi;
4184 echo "$as_me:4184: result: $with_shared" >&5
4185 echo "${ECHO_T}$with_shared" >&6
4186 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4187
4188 echo "$as_me:4188: checking if you want to build static libraries" >&5
4189 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4190
4191 # Check whether --with-normal or --without-normal was given.
4192 if test "${with_normal+set}" = set; then
4193   withval="$with_normal"
4194   with_normal=$withval
4195 else
4196   with_normal=yes
4197 fi;
4198 echo "$as_me:4198: result: $with_normal" >&5
4199 echo "${ECHO_T}$with_normal" >&6
4200 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4201
4202 echo "$as_me:4202: checking if you want to build debug libraries" >&5
4203 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4204
4205 # Check whether --with-debug or --without-debug was given.
4206 if test "${with_debug+set}" = set; then
4207   withval="$with_debug"
4208   with_debug=$withval
4209 else
4210   with_debug=yes
4211 fi;
4212 echo "$as_me:4212: result: $with_debug" >&5
4213 echo "${ECHO_T}$with_debug" >&6
4214 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4215
4216 echo "$as_me:4216: checking if you want to build profiling libraries" >&5
4217 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4218
4219 # Check whether --with-profile or --without-profile was given.
4220 if test "${with_profile+set}" = set; then
4221   withval="$with_profile"
4222   with_profile=$withval
4223 else
4224   with_profile=no
4225 fi;
4226 echo "$as_me:4226: result: $with_profile" >&5
4227 echo "${ECHO_T}$with_profile" >&6
4228 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4229
4230 fi
4231
4232 ###############################################################################
4233
4234 echo "$as_me:4234: checking for specified models" >&5
4235 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4236 test -z "$cf_list_models" && cf_list_models=normal
4237 test "$with_libtool" != "no" && cf_list_models=libtool
4238 echo "$as_me:4238: result: $cf_list_models" >&5
4239 echo "${ECHO_T}$cf_list_models" >&6
4240
4241 ### Use the first model as the default, and save its suffix for use in building
4242 ### up test-applications.
4243 echo "$as_me:4243: checking for default model" >&5
4244 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4245 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4246 echo "$as_me:4246: result: $DFT_LWR_MODEL" >&5
4247 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4248
4249 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4250
4251 TICS_NAME=tic
4252
4253 TINFO_NAME=tinfo
4254
4255 LIB_NAME=ncurses
4256
4257 LIB_DIR=../lib
4258 LIB_2ND=../../lib
4259
4260         case $cf_cv_system_name in
4261         OS/2*)  LIB_PREFIX=''     ;;
4262         os2*)   LIB_PREFIX=''     ;;
4263         *)      LIB_PREFIX='lib'  ;;
4264         esac
4265 cf_prefix=$LIB_PREFIX
4266
4267 LIB_PREFIX=$cf_prefix
4268
4269 LIB_SUFFIX=
4270
4271 ###############################################################################
4272
4273 echo "$as_me:4273: checking if you want to build a separate terminfo library" >&5
4274 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4275
4276 # Check whether --with-termlib or --without-termlib was given.
4277 if test "${with_termlib+set}" = set; then
4278   withval="$with_termlib"
4279   with_termlib=$withval
4280 else
4281   with_termlib=no
4282 fi;
4283 echo "$as_me:4283: result: $with_termlib" >&5
4284 echo "${ECHO_T}$with_termlib" >&6
4285
4286 echo "$as_me:4286: checking if you want to build a separate tic library" >&5
4287 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4288
4289 # Check whether --with-ticlib or --without-ticlib was given.
4290 if test "${with_ticlib+set}" = set; then
4291   withval="$with_ticlib"
4292   with_ticlib=$withval
4293 else
4294   with_ticlib=no
4295 fi;
4296 echo "$as_me:4296: result: $with_ticlib" >&5
4297 echo "${ECHO_T}$with_ticlib" >&6
4298
4299 ### Checks for special libraries, must be done up-front.
4300 SHLIB_LIST=""
4301
4302 echo "$as_me:4302: checking if you want to link with the GPM mouse library" >&5
4303 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4304
4305 # Check whether --with-gpm or --without-gpm was given.
4306 if test "${with_gpm+set}" = set; then
4307   withval="$with_gpm"
4308   with_gpm=$withval
4309 else
4310   with_gpm=maybe
4311 fi;
4312 echo "$as_me:4312: result: $with_gpm" >&5
4313 echo "${ECHO_T}$with_gpm" >&6
4314
4315 if test "$with_gpm" != no ; then
4316         echo "$as_me:4316: checking for gpm.h" >&5
4317 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4318 if test "${ac_cv_header_gpm_h+set}" = set; then
4319   echo $ECHO_N "(cached) $ECHO_C" >&6
4320 else
4321   cat >conftest.$ac_ext <<_ACEOF
4322 #line 4322 "configure"
4323 #include "confdefs.h"
4324 #include <gpm.h>
4325 _ACEOF
4326 if { (eval echo "$as_me:4326: \"$ac_cpp conftest.$ac_ext\"") >&5
4327   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4328   ac_status=$?
4329   egrep -v '^ *\+' conftest.er1 >conftest.err
4330   rm -f conftest.er1
4331   cat conftest.err >&5
4332   echo "$as_me:4332: \$? = $ac_status" >&5
4333   (exit $ac_status); } >/dev/null; then
4334   if test -s conftest.err; then
4335     ac_cpp_err=$ac_c_preproc_warn_flag
4336   else
4337     ac_cpp_err=
4338   fi
4339 else
4340   ac_cpp_err=yes
4341 fi
4342 if test -z "$ac_cpp_err"; then
4343   ac_cv_header_gpm_h=yes
4344 else
4345   echo "$as_me: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   ac_cv_header_gpm_h=no
4348 fi
4349 rm -f conftest.err conftest.$ac_ext
4350 fi
4351 echo "$as_me:4351: result: $ac_cv_header_gpm_h" >&5
4352 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4353 if test $ac_cv_header_gpm_h = yes; then
4354
4355                 cat >>confdefs.h <<\EOF
4356 #define HAVE_GPM_H 1
4357 EOF
4358
4359                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4360                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4361
4362                         cat >>confdefs.h <<\EOF
4363 #define HAVE_LIBGPM 1
4364 EOF
4365
4366                 else
4367                         echo "$as_me:4367: checking for Gpm_Open in -lgpm" >&5
4368 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4369 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   ac_check_lib_save_LIBS=$LIBS
4373 LIBS="-lgpm  $LIBS"
4374 cat >conftest.$ac_ext <<_ACEOF
4375 #line 4375 "configure"
4376 #include "confdefs.h"
4377
4378 /* Override any gcc2 internal prototype to avoid an error.  */
4379 #ifdef __cplusplus
4380 extern "C"
4381 #endif
4382 /* We use char because int might match the return type of a gcc2
4383    builtin and then its argument prototype would still apply.  */
4384 char Gpm_Open ();
4385 int
4386 main ()
4387 {
4388 Gpm_Open ();
4389   ;
4390   return 0;
4391 }
4392 _ACEOF
4393 rm -f conftest.$ac_objext conftest$ac_exeext
4394 if { (eval echo "$as_me:4394: \"$ac_link\"") >&5
4395   (eval $ac_link) 2>&5
4396   ac_status=$?
4397   echo "$as_me:4397: \$? = $ac_status" >&5
4398   (exit $ac_status); } &&
4399          { ac_try='test -s conftest$ac_exeext'
4400   { (eval echo "$as_me:4400: \"$ac_try\"") >&5
4401   (eval $ac_try) 2>&5
4402   ac_status=$?
4403   echo "$as_me:4403: \$? = $ac_status" >&5
4404   (exit $ac_status); }; }; then
4405   ac_cv_lib_gpm_Gpm_Open=yes
4406 else
4407   echo "$as_me: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 ac_cv_lib_gpm_Gpm_Open=no
4410 fi
4411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4412 LIBS=$ac_check_lib_save_LIBS
4413 fi
4414 echo "$as_me:4414: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4415 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4416 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4417   :
4418 else
4419
4420                                 { { echo "$as_me:4420: error: Cannot link with GPM library" >&5
4421 echo "$as_me: error: Cannot link with GPM library" >&2;}
4422    { (exit 1); exit 1; }; }
4423                 fi
4424                 with_gpm=yes
4425
4426 fi
4427
4428 else
4429
4430                 test "$with_gpm" != maybe && { echo "$as_me:4430: WARNING: Cannot find GPM header" >&5
4431 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4432                 with_gpm=no
4433
4434 fi
4435
4436 fi
4437
4438 if test "$with_gpm" != no ; then
4439         echo "$as_me:4439: checking if you want to load GPM dynamically" >&5
4440 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4441
4442 # Check whether --with-dlsym or --without-dlsym was given.
4443 if test "${with_dlsym+set}" = set; then
4444   withval="$with_dlsym"
4445   with_dlsym=$withval
4446 else
4447   with_dlsym=yes
4448 fi;
4449         echo "$as_me:4449: result: $with_dlsym" >&5
4450 echo "${ECHO_T}$with_dlsym" >&6
4451         if test "$with_dlsym" = yes ; then
4452
4453 cf_have_dlsym=no
4454 echo "$as_me:4454: checking for dlsym" >&5
4455 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4456 if test "${ac_cv_func_dlsym+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   cat >conftest.$ac_ext <<_ACEOF
4460 #line 4460 "configure"
4461 #include "confdefs.h"
4462 /* System header to define __stub macros and hopefully few prototypes,
4463     which can conflict with char dlsym (); below.  */
4464 #include <assert.h>
4465 /* Override any gcc2 internal prototype to avoid an error.  */
4466 #ifdef __cplusplus
4467 extern "C"
4468 #endif
4469 /* We use char because int might match the return type of a gcc2
4470    builtin and then its argument prototype would still apply.  */
4471 char dlsym ();
4472 char (*f) ();
4473
4474 int
4475 main ()
4476 {
4477 /* The GNU C library defines this for functions which it implements
4478     to always fail with ENOSYS.  Some functions are actually named
4479     something starting with __ and the normal name is an alias.  */
4480 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4481 choke me
4482 #else
4483 f = dlsym;
4484 #endif
4485
4486   ;
4487   return 0;
4488 }
4489 _ACEOF
4490 rm -f conftest.$ac_objext conftest$ac_exeext
4491 if { (eval echo "$as_me:4491: \"$ac_link\"") >&5
4492   (eval $ac_link) 2>&5
4493   ac_status=$?
4494   echo "$as_me:4494: \$? = $ac_status" >&5
4495   (exit $ac_status); } &&
4496          { ac_try='test -s conftest$ac_exeext'
4497   { (eval echo "$as_me:4497: \"$ac_try\"") >&5
4498   (eval $ac_try) 2>&5
4499   ac_status=$?
4500   echo "$as_me:4500: \$? = $ac_status" >&5
4501   (exit $ac_status); }; }; then
4502   ac_cv_func_dlsym=yes
4503 else
4504   echo "$as_me: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4506 ac_cv_func_dlsym=no
4507 fi
4508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4509 fi
4510 echo "$as_me:4510: result: $ac_cv_func_dlsym" >&5
4511 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4512 if test $ac_cv_func_dlsym = yes; then
4513   cf_have_dlsym=yes
4514 else
4515
4516 cf_have_libdl=no
4517 echo "$as_me:4517: checking for dlsym in -ldl" >&5
4518 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4519 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4520   echo $ECHO_N "(cached) $ECHO_C" >&6
4521 else
4522   ac_check_lib_save_LIBS=$LIBS
4523 LIBS="-ldl  $LIBS"
4524 cat >conftest.$ac_ext <<_ACEOF
4525 #line 4525 "configure"
4526 #include "confdefs.h"
4527
4528 /* Override any gcc2 internal prototype to avoid an error.  */
4529 #ifdef __cplusplus
4530 extern "C"
4531 #endif
4532 /* We use char because int might match the return type of a gcc2
4533    builtin and then its argument prototype would still apply.  */
4534 char dlsym ();
4535 int
4536 main ()
4537 {
4538 dlsym ();
4539   ;
4540   return 0;
4541 }
4542 _ACEOF
4543 rm -f conftest.$ac_objext conftest$ac_exeext
4544 if { (eval echo "$as_me:4544: \"$ac_link\"") >&5
4545   (eval $ac_link) 2>&5
4546   ac_status=$?
4547   echo "$as_me:4547: \$? = $ac_status" >&5
4548   (exit $ac_status); } &&
4549          { ac_try='test -s conftest$ac_exeext'
4550   { (eval echo "$as_me:4550: \"$ac_try\"") >&5
4551   (eval $ac_try) 2>&5
4552   ac_status=$?
4553   echo "$as_me:4553: \$? = $ac_status" >&5
4554   (exit $ac_status); }; }; then
4555   ac_cv_lib_dl_dlsym=yes
4556 else
4557   echo "$as_me: failed program was:" >&5
4558 cat conftest.$ac_ext >&5
4559 ac_cv_lib_dl_dlsym=no
4560 fi
4561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4562 LIBS=$ac_check_lib_save_LIBS
4563 fi
4564 echo "$as_me:4564: result: $ac_cv_lib_dl_dlsym" >&5
4565 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4566 if test $ac_cv_lib_dl_dlsym = yes; then
4567
4568         cf_have_dlsym=yes
4569         cf_have_libdl=yes
4570 fi
4571
4572 fi
4573
4574 if test "$cf_have_dlsym" = yes ; then
4575         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4576
4577         echo "$as_me:4577: checking whether able to link to dl*() functions" >&5
4578 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4579         cat >conftest.$ac_ext <<_ACEOF
4580 #line 4580 "configure"
4581 #include "confdefs.h"
4582 #include <dlfcn.h>
4583 int
4584 main ()
4585 {
4586
4587                 void *obj;
4588                 if ((obj = dlopen("filename", 0)) != 0) {
4589                         if (dlsym(obj, "symbolname") == 0) {
4590                         dlclose(obj);
4591                         }
4592                 }
4593   ;
4594   return 0;
4595 }
4596 _ACEOF
4597 rm -f conftest.$ac_objext conftest$ac_exeext
4598 if { (eval echo "$as_me:4598: \"$ac_link\"") >&5
4599   (eval $ac_link) 2>&5
4600   ac_status=$?
4601   echo "$as_me:4601: \$? = $ac_status" >&5
4602   (exit $ac_status); } &&
4603          { ac_try='test -s conftest$ac_exeext'
4604   { (eval echo "$as_me:4604: \"$ac_try\"") >&5
4605   (eval $ac_try) 2>&5
4606   ac_status=$?
4607   echo "$as_me:4607: \$? = $ac_status" >&5
4608   (exit $ac_status); }; }; then
4609
4610                 cat >>confdefs.h <<\EOF
4611 #define HAVE_LIBDL 1
4612 EOF
4613
4614 else
4615   echo "$as_me: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
4617
4618                 { { echo "$as_me:4618: error: Cannot link test program for libdl" >&5
4619 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4620    { (exit 1); exit 1; }; }
4621 fi
4622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4623         echo "$as_me:4623: result: ok" >&5
4624 echo "${ECHO_T}ok" >&6
4625 else
4626         { { echo "$as_me:4626: error: Cannot find dlsym function" >&5
4627 echo "$as_me: error: Cannot find dlsym function" >&2;}
4628    { (exit 1); exit 1; }; }
4629 fi
4630
4631                 if test "$with_gpm" != yes ; then
4632                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4633
4634                         cf_cv_gpm_soname="$with_gpm"
4635                 else
4636
4637 echo "$as_me:4637: checking for soname of gpm library" >&5
4638 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4639 if test "${cf_cv_gpm_soname+set}" = set; then
4640   echo $ECHO_N "(cached) $ECHO_C" >&6
4641 else
4642
4643 cf_cv_gpm_soname=unknown
4644 if test "$cross_compiling" != yes ; then
4645 cat >conftest.$ac_ext <<CF_EOF
4646 #include <gpm.h>
4647 int main()
4648 {
4649 if (Gpm_Open(0,0)) Gpm_Close();
4650         ${cf_cv_main_return:-return}(0);
4651 }
4652 CF_EOF
4653 cf_save_LIBS="$LIBS"
4654         LIBS="-lgpm $LIBS"
4655         if { (eval echo "$as_me:4655: \"$ac_compile\"") >&5
4656   (eval $ac_compile) 2>&5
4657   ac_status=$?
4658   echo "$as_me:4658: \$? = $ac_status" >&5
4659   (exit $ac_status); } ; then
4660                 if { (eval echo "$as_me:4660: \"$ac_link\"") >&5
4661   (eval $ac_link) 2>&5
4662   ac_status=$?
4663   echo "$as_me:4663: \$? = $ac_status" >&5
4664   (exit $ac_status); } ; then
4665                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4666                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4667                 fi
4668         fi
4669 rm -f conftest*
4670 LIBS="$cf_save_LIBS"
4671 fi
4672
4673 fi
4674 echo "$as_me:4674: result: $cf_cv_gpm_soname" >&5
4675 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4676
4677                 fi
4678                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4679 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4680 EOF
4681
4682                 SHLIB_LIST="-ldl $SHLIB_LIST"
4683         else
4684                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4685         fi
4686         cat >>confdefs.h <<\EOF
4687 #define HAVE_LIBGPM 1
4688 EOF
4689
4690 echo "$as_me:4690: checking for Gpm_Wgetch in -lgpm" >&5
4691 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4692 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4693   echo $ECHO_N "(cached) $ECHO_C" >&6
4694 else
4695   ac_check_lib_save_LIBS=$LIBS
4696 LIBS="-lgpm  $LIBS"
4697 cat >conftest.$ac_ext <<_ACEOF
4698 #line 4698 "configure"
4699 #include "confdefs.h"
4700
4701 /* Override any gcc2 internal prototype to avoid an error.  */
4702 #ifdef __cplusplus
4703 extern "C"
4704 #endif
4705 /* We use char because int might match the return type of a gcc2
4706    builtin and then its argument prototype would still apply.  */
4707 char Gpm_Wgetch ();
4708 int
4709 main ()
4710 {
4711 Gpm_Wgetch ();
4712   ;
4713   return 0;
4714 }
4715 _ACEOF
4716 rm -f conftest.$ac_objext conftest$ac_exeext
4717 if { (eval echo "$as_me:4717: \"$ac_link\"") >&5
4718   (eval $ac_link) 2>&5
4719   ac_status=$?
4720   echo "$as_me:4720: \$? = $ac_status" >&5
4721   (exit $ac_status); } &&
4722          { ac_try='test -s conftest$ac_exeext'
4723   { (eval echo "$as_me:4723: \"$ac_try\"") >&5
4724   (eval $ac_try) 2>&5
4725   ac_status=$?
4726   echo "$as_me:4726: \$? = $ac_status" >&5
4727   (exit $ac_status); }; }; then
4728   ac_cv_lib_gpm_Gpm_Wgetch=yes
4729 else
4730   echo "$as_me: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4732 ac_cv_lib_gpm_Gpm_Wgetch=no
4733 fi
4734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4735 LIBS=$ac_check_lib_save_LIBS
4736 fi
4737 echo "$as_me:4737: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4738 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4739 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4740
4741 echo "$as_me:4741: checking if GPM is weakly bound to curses library" >&5
4742 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4743 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4744   echo $ECHO_N "(cached) $ECHO_C" >&6
4745 else
4746
4747 cf_cv_check_gpm_wgetch=unknown
4748 if test "$cross_compiling" != yes ; then
4749
4750 cat >conftest.$ac_ext <<CF_EOF
4751 #include <gpm.h>
4752 int main()
4753 {
4754         Gpm_Wgetch();
4755         ${cf_cv_main_return:-return}(0);
4756 }
4757 CF_EOF
4758
4759         cf_save_LIBS="$LIBS"
4760         # This only works if we can look at the symbol table.  If a shared
4761         # library is stripped for install, we cannot use that.  So we're forced
4762         # to rely on the static library, noting that some packagers may not
4763         # include it.
4764         LIBS="-static -lgpm -dynamic $LIBS"
4765         if { (eval echo "$as_me:4765: \"$ac_compile\"") >&5
4766   (eval $ac_compile) 2>&5
4767   ac_status=$?
4768   echo "$as_me:4768: \$? = $ac_status" >&5
4769   (exit $ac_status); } ; then
4770                 if { (eval echo "$as_me:4770: \"$ac_link\"") >&5
4771   (eval $ac_link) 2>&5
4772   ac_status=$?
4773   echo "$as_me:4773: \$? = $ac_status" >&5
4774   (exit $ac_status); } ; then
4775                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4776                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4777                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4778                 fi
4779         fi
4780         rm -f conftest*
4781         LIBS="$cf_save_LIBS"
4782 fi
4783
4784 fi
4785 echo "$as_me:4785: result: $cf_cv_check_gpm_wgetch" >&5
4786 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4787
4788 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4789         { echo "$as_me:4789: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4790 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4791 fi
4792
4793 fi
4794
4795 fi
4796
4797 # not everyone has "test -c"
4798 if test -c /dev/sysmouse 2>/dev/null ; then
4799 echo "$as_me:4799: checking if you want to use sysmouse" >&5
4800 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4801
4802 # Check whether --with-sysmouse or --without-sysmouse was given.
4803 if test "${with_sysmouse+set}" = set; then
4804   withval="$with_sysmouse"
4805   cf_with_sysmouse=$withval
4806 else
4807   cf_with_sysmouse=maybe
4808 fi;
4809         if test "$cf_with_sysmouse" != no ; then
4810         cat >conftest.$ac_ext <<_ACEOF
4811 #line 4811 "configure"
4812 #include "confdefs.h"
4813
4814 #include <osreldate.h>
4815 #if (__FreeBSD_version >= 400017)
4816 #include <sys/consio.h>
4817 #include <sys/fbio.h>
4818 #else
4819 #include <machine/console.h>
4820 #endif
4821
4822 int
4823 main ()
4824 {
4825
4826         struct mouse_info the_mouse;
4827         ioctl(0, CONS_MOUSECTL, &the_mouse);
4828
4829   ;
4830   return 0;
4831 }
4832 _ACEOF
4833 rm -f conftest.$ac_objext
4834 if { (eval echo "$as_me:4834: \"$ac_compile\"") >&5
4835   (eval $ac_compile) 2>&5
4836   ac_status=$?
4837   echo "$as_me:4837: \$? = $ac_status" >&5
4838   (exit $ac_status); } &&
4839          { ac_try='test -s conftest.$ac_objext'
4840   { (eval echo "$as_me:4840: \"$ac_try\"") >&5
4841   (eval $ac_try) 2>&5
4842   ac_status=$?
4843   echo "$as_me:4843: \$? = $ac_status" >&5
4844   (exit $ac_status); }; }; then
4845   cf_with_sysmouse=yes
4846 else
4847   echo "$as_me: failed program was:" >&5
4848 cat conftest.$ac_ext >&5
4849 cf_with_sysmouse=no
4850 fi
4851 rm -f conftest.$ac_objext conftest.$ac_ext
4852         fi
4853 echo "$as_me:4853: result: $cf_with_sysmouse" >&5
4854 echo "${ECHO_T}$cf_with_sysmouse" >&6
4855 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4856 #define USE_SYSMOUSE 1
4857 EOF
4858
4859 fi
4860
4861 if test X"$CC_G_OPT" = X"" ; then
4862         CC_G_OPT='-g'
4863         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4864 fi
4865
4866 if test X"$CXX_G_OPT" = X"" ; then
4867         CXX_G_OPT='-g'
4868         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4869 fi
4870
4871 echo "$as_me:4871: checking for default loader flags" >&5
4872 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4873 case $DFT_LWR_MODEL in
4874 libtool) LD_MODEL=''   ;;
4875 normal)  LD_MODEL=''   ;;
4876 debug)   LD_MODEL=$CC_G_OPT ;;
4877 profile) LD_MODEL='-pg';;
4878 shared)  LD_MODEL=''   ;;
4879 esac
4880 echo "$as_me:4880: result: $LD_MODEL" >&5
4881 echo "${ECHO_T}$LD_MODEL" >&6
4882
4883 case $DFT_LWR_MODEL in
4884 shared)
4885 echo "$as_me:4885: checking if rpath option should be used" >&5
4886 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4887
4888 # Check whether --enable-rpath or --disable-rpath was given.
4889 if test "${enable_rpath+set}" = set; then
4890   enableval="$enable_rpath"
4891   cf_cv_ld_rpath=$enableval
4892 else
4893   cf_cv_ld_rpath=no
4894 fi;
4895 echo "$as_me:4895: result: $cf_cv_ld_rpath" >&5
4896 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4897 echo "$as_me:4897: checking if shared libraries should be relinked during install" >&5
4898 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4899
4900 # Check whether --enable-rpath or --disable-rpath was given.
4901 if test "${enable_rpath+set}" = set; then
4902   enableval="$enable_rpath"
4903   cf_cv_do_relink=$enableval
4904 else
4905   cf_cv_do_relink=yes
4906 fi;
4907 echo "$as_me:4907: result: $cf_cv_do_relink" >&5
4908 echo "${ECHO_T}$cf_cv_do_relink" >&6
4909         ;;
4910 esac
4911
4912         LOCAL_LDFLAGS=
4913         LOCAL_LDFLAGS2=
4914         LD_SHARED_OPTS=
4915         INSTALL_LIB="-m 644"
4916
4917         cf_cv_do_symlinks=no
4918
4919         echo "$as_me:4919: checking if release/abi version should be used for shared libs" >&5
4920 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4921
4922 # Check whether --with-shlib-version or --without-shlib-version was given.
4923 if test "${with_shlib_version+set}" = set; then
4924   withval="$with_shlib_version"
4925   test -z "$withval" && withval=auto
4926         case $withval in #(vi
4927         yes) #(vi
4928                 cf_cv_shlib_version=auto
4929                 ;;
4930         rel|abi|auto|no) #(vi
4931                 cf_cv_shlib_version=$withval
4932                 ;;
4933         *)
4934                 { { echo "$as_me:4934: error: option value must be one of: rel, abi, auto or no" >&5
4935 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4936    { (exit 1); exit 1; }; }
4937                 ;;
4938         esac
4939
4940 else
4941   cf_cv_shlib_version=auto
4942 fi;
4943         echo "$as_me:4943: result: $cf_cv_shlib_version" >&5
4944 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4945
4946         cf_cv_rm_so_locs=no
4947
4948         # Some less-capable ports of gcc support only -fpic
4949         CC_SHARED_OPTS=
4950         if test "$GCC" = yes
4951         then
4952                 echo "$as_me:4952: checking which $CC option to use" >&5
4953 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4954                 cf_save_CFLAGS="$CFLAGS"
4955                 for CC_SHARED_OPTS in -fPIC -fpic ''
4956                 do
4957                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4958                         cat >conftest.$ac_ext <<_ACEOF
4959 #line 4959 "configure"
4960 #include "confdefs.h"
4961 #include <stdio.h>
4962 int
4963 main ()
4964 {
4965 int x = 1
4966   ;
4967   return 0;
4968 }
4969 _ACEOF
4970 rm -f conftest.$ac_objext
4971 if { (eval echo "$as_me:4971: \"$ac_compile\"") >&5
4972   (eval $ac_compile) 2>&5
4973   ac_status=$?
4974   echo "$as_me:4974: \$? = $ac_status" >&5
4975   (exit $ac_status); } &&
4976          { ac_try='test -s conftest.$ac_objext'
4977   { (eval echo "$as_me:4977: \"$ac_try\"") >&5
4978   (eval $ac_try) 2>&5
4979   ac_status=$?
4980   echo "$as_me:4980: \$? = $ac_status" >&5
4981   (exit $ac_status); }; }; then
4982   break
4983 else
4984   echo "$as_me: failed program was:" >&5
4985 cat conftest.$ac_ext >&5
4986 fi
4987 rm -f conftest.$ac_objext conftest.$ac_ext
4988                 done
4989                 echo "$as_me:4989: result: $CC_SHARED_OPTS" >&5
4990 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4991                 CFLAGS="$cf_save_CFLAGS"
4992         fi
4993
4994         cf_cv_shlib_version_infix=no
4995
4996         case $cf_cv_system_name in
4997         beos*)
4998                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4999                 ;;
5000         cygwin*)
5001                 CC_SHARED_OPTS=
5002                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5003                 cf_cv_shlib_version=cygdll
5004                 cf_cv_shlib_version_infix=cygdll
5005                 cat >mk_shared_lib.sh <<-CF_EOF
5006                 #!/bin/sh
5007                 SHARED_LIB=\$1
5008                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5009                 shift
5010                 cat <<-EOF
5011                 Linking shared library
5012                 ** SHARED_LIB \$SHARED_LIB
5013                 ** IMPORT_LIB \$IMPORT_LIB
5014 EOF
5015                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5016 CF_EOF
5017                 chmod +x mk_shared_lib.sh
5018                 ;;
5019         darwin*)
5020                 EXTRA_CFLAGS="-no-cpp-precomp"
5021                 CC_SHARED_OPTS="-dynamic"
5022                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5023                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5024                 cf_cv_shlib_version_infix=yes
5025                 echo "$as_me:5025: checking if ld -search_paths_first works" >&5
5026 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5027 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030
5031                         cf_save_LDFLAGS=$LDFLAGS
5032                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5033                         cat >conftest.$ac_ext <<_ACEOF
5034 #line 5034 "configure"
5035 #include "confdefs.h"
5036
5037 int
5038 main ()
5039 {
5040 int i;
5041   ;
5042   return 0;
5043 }
5044 _ACEOF
5045 rm -f conftest.$ac_objext conftest$ac_exeext
5046 if { (eval echo "$as_me:5046: \"$ac_link\"") >&5
5047   (eval $ac_link) 2>&5
5048   ac_status=$?
5049   echo "$as_me:5049: \$? = $ac_status" >&5
5050   (exit $ac_status); } &&
5051          { ac_try='test -s conftest$ac_exeext'
5052   { (eval echo "$as_me:5052: \"$ac_try\"") >&5
5053   (eval $ac_try) 2>&5
5054   ac_status=$?
5055   echo "$as_me:5055: \$? = $ac_status" >&5
5056   (exit $ac_status); }; }; then
5057   cf_cv_ldflags_search_paths_first=yes
5058 else
5059   echo "$as_me: failed program was:" >&5
5060 cat conftest.$ac_ext >&5
5061 cf_cv_ldflags_search_paths_first=no
5062 fi
5063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5064                                 LDFLAGS=$cf_save_LDFLAGS
5065 fi
5066 echo "$as_me:5066: result: $cf_cv_ldflags_search_paths_first" >&5
5067 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5068                 if test $cf_cv_ldflags_search_paths_first = yes; then
5069                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5070                 fi
5071                 ;;
5072         hpux*)
5073                 # (tested with gcc 2.7.2 -- I don't have c89)
5074                 if test "$GCC" = yes; then
5075                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5076                 else
5077                         CC_SHARED_OPTS='+Z'
5078                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5079                 fi
5080                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5081                 # HP-UX shared libraries must be executable, and should be
5082                 # readonly to exploit a quirk in the memory manager.
5083                 INSTALL_LIB="-m 555"
5084                 ;;
5085         irix*)
5086                 if test "$cf_cv_ld_rpath" = yes ; then
5087                         if test "$GCC" = yes; then
5088                                 cf_ld_rpath_opt="-Wl,-rpath,"
5089                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5090                         else
5091                                 cf_ld_rpath_opt="-rpath "
5092                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5093                         fi
5094                 fi
5095                 # tested with IRIX 5.2 and 'cc'.
5096                 if test "$GCC" != yes; then
5097                         CC_SHARED_OPTS='-KPIC'
5098                 fi
5099                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5100                 cf_cv_rm_so_locs=yes
5101                 ;;
5102         linux*|gnu*|k*bsd*-gnu)
5103                 if test "$DFT_LWR_MODEL" = "shared" ; then
5104                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5105                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5106                 fi
5107                 if test "$cf_cv_ld_rpath" = yes ; then
5108                         cf_ld_rpath_opt="-Wl,-rpath,"
5109                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5110                 fi
5111
5112         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5113         if test "$cf_cv_shlib_version" = rel; then
5114                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5115         else
5116                 cf_shared_soname='`basename $@`'
5117         fi
5118
5119                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5120                 ;;
5121         openbsd[2-9].*)
5122                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5123                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5124                 ;;
5125         openbsd*|freebsd[12].*)
5126                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5127                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5128                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5129                 ;;
5130         freebsd*)
5131                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5132                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5133                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5134                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5135                         cf_ld_rpath_opt="-rpath "
5136                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5137                 fi
5138
5139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140         if test "$cf_cv_shlib_version" = rel; then
5141                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5142         else
5143                 cf_shared_soname='`basename $@`'
5144         fi
5145
5146                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5147                 ;;
5148         netbsd*)
5149                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5150                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5151                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5152                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5153                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5154                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5155                         if test "$cf_cv_shlib_version" = auto; then
5156                         if test -f /usr/libexec/ld.elf_so; then
5157                                 cf_cv_shlib_version=abi
5158                         else
5159                                 cf_cv_shlib_version=rel
5160                         fi
5161                         fi
5162
5163         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5164         if test "$cf_cv_shlib_version" = rel; then
5165                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5166         else
5167                 cf_shared_soname='`basename $@`'
5168         fi
5169
5170                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5171                 else
5172                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5173                 fi
5174                 ;;
5175         osf*|mls+*)
5176                 # tested with OSF/1 V3.2 and 'cc'
5177                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5178                 # link with shared libs).
5179                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5180                 case $host_os in
5181                 osf4*)
5182                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5183                         ;;
5184                 esac
5185                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5186                 if test "$DFT_LWR_MODEL" = "shared" ; then
5187                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5188                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5189                 fi
5190                 if test "$cf_cv_ld_rpath" = yes ; then
5191                         cf_ld_rpath_opt="-rpath"
5192                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5193                 fi
5194                 cf_cv_rm_so_locs=yes
5195                 ;;
5196         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5197                 # tested with osr5.0.5
5198                 if test "$GCC" != yes; then
5199                         CC_SHARED_OPTS='-belf -KPIC'
5200                 fi
5201                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5202                 if test "$cf_cv_ld_rpath" = yes ; then
5203                         # only way is to set LD_RUN_PATH but no switch for it
5204                         RUN_PATH=$libdir
5205                 fi
5206                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5207                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5208                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5209                 ;;
5210         sunos4*)
5211                 # tested with SunOS 4.1.1 and gcc 2.7.0
5212                 if test "$GCC" != yes; then
5213                         CC_SHARED_OPTS='-KPIC'
5214                 fi
5215                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5216                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5217                 ;;
5218         solaris2*)
5219                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5220                 if test "$GCC" != yes; then
5221                         CC_SHARED_OPTS='-KPIC'
5222                 fi
5223                 if test "$DFT_LWR_MODEL" = "shared" ; then
5224                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5226                 fi
5227                 if test "$cf_cv_ld_rpath" = yes ; then
5228                         cf_ld_rpath_opt="-R"
5229                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5230                 fi
5231
5232         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5233         if test "$cf_cv_shlib_version" = rel; then
5234                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5235         else
5236                 cf_shared_soname='`basename $@`'
5237         fi
5238
5239                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5240                 ;;
5241         sysv5uw7*|unix_sv*)
5242                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5243                 if test "$GCC" != yes; then
5244                         CC_SHARED_OPTS='-KPIC'
5245                 fi
5246                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5247                 ;;
5248         *)
5249                 CC_SHARED_OPTS='unknown'
5250                 MK_SHARED_LIB='echo unknown'
5251                 ;;
5252         esac
5253
5254         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5255         case "$cf_cv_shlib_version" in #(vi
5256         rel|abi)
5257                 case "$MK_SHARED_LIB" in #(vi
5258                 *'-o $@')
5259                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5260                         ;;
5261                 *)
5262                         { echo "$as_me:5262: WARNING: ignored --with-shlib-version" >&5
5263 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5264                         ;;
5265                 esac
5266                 ;;
5267         esac
5268
5269         if test -n "$cf_ld_rpath_opt" ; then
5270                 echo "$as_me:5270: checking if we need a space after rpath option" >&5
5271 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5272                 cf_save_LIBS="$LIBS"
5273                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5274                 cat >conftest.$ac_ext <<_ACEOF
5275 #line 5275 "configure"
5276 #include "confdefs.h"
5277
5278 int
5279 main ()
5280 {
5281
5282   ;
5283   return 0;
5284 }
5285 _ACEOF
5286 rm -f conftest.$ac_objext conftest$ac_exeext
5287 if { (eval echo "$as_me:5287: \"$ac_link\"") >&5
5288   (eval $ac_link) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); } &&
5292          { ac_try='test -s conftest$ac_exeext'
5293   { (eval echo "$as_me:5293: \"$ac_try\"") >&5
5294   (eval $ac_try) 2>&5
5295   ac_status=$?
5296   echo "$as_me:5296: \$? = $ac_status" >&5
5297   (exit $ac_status); }; }; then
5298   cf_rpath_space=no
5299 else
5300   echo "$as_me: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5302 cf_rpath_space=yes
5303 fi
5304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5305                 LIBS="$cf_save_LIBS"
5306                 echo "$as_me:5306: result: $cf_rpath_space" >&5
5307 echo "${ECHO_T}$cf_rpath_space" >&6
5308                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5309                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5310         fi
5311
5312 if test "$CC_SHARED_OPTS" = "unknown"; then
5313         for model in $cf_list_models; do
5314                 if test "$model" = "shared"; then
5315                         { { echo "$as_me:5315: error: Shared libraries are not supported in this version" >&5
5316 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5317    { (exit 1); exit 1; }; }
5318                 fi
5319         done
5320 fi
5321
5322 ###############################################################################
5323
5324 ###     use option --disable-overwrite to leave out the link to -lcurses
5325 echo "$as_me:5325: checking if you wish to install ncurses overwriting curses" >&5
5326 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5327
5328 # Check whether --enable-overwrite or --disable-overwrite was given.
5329 if test "${enable_overwrite+set}" = set; then
5330   enableval="$enable_overwrite"
5331   with_overwrite=$enableval
5332 else
5333   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5334 fi;
5335 echo "$as_me:5335: result: $with_overwrite" >&5
5336 echo "${ECHO_T}$with_overwrite" >&6
5337
5338 echo "$as_me:5338: checking if external terminfo-database is used" >&5
5339 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5340
5341 # Check whether --enable-database or --disable-database was given.
5342 if test "${enable_database+set}" = set; then
5343   enableval="$enable_database"
5344   use_database=$enableval
5345 else
5346   use_database=yes
5347 fi;
5348 echo "$as_me:5348: result: $use_database" >&5
5349 echo "${ECHO_T}$use_database" >&6
5350
5351 case $host_os in #(vi
5352 os2*) #(vi
5353         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5354         ;;
5355 *) #(vi
5356         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5357         ;;
5358 esac
5359
5360         case $cf_cv_system_name in
5361         os2*)   PATHSEP=';'  ;;
5362         *)      PATHSEP=':'  ;;
5363         esac
5364
5365 if test "$use_database" != no ; then
5366         cat >>confdefs.h <<\EOF
5367 #define USE_DATABASE 1
5368 EOF
5369
5370         echo "$as_me:5370: checking which terminfo source-file will be installed" >&5
5371 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5372
5373 # Check whether --enable-database or --disable-database was given.
5374 if test "${enable_database+set}" = set; then
5375   enableval="$enable_database"
5376   TERMINFO_SRC=$withval
5377 fi;
5378         echo "$as_me:5378: result: $TERMINFO_SRC" >&5
5379 echo "${ECHO_T}$TERMINFO_SRC" >&6
5380
5381         echo "$as_me:5381: checking whether to use hashed database instead of directory/tree" >&5
5382 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5383
5384 # Check whether --with-hashed-db or --without-hashed-db was given.
5385 if test "${with_hashed_db+set}" = set; then
5386   withval="$with_hashed_db"
5387
5388 else
5389   with_hashed_db=no
5390 fi;
5391         echo "$as_me:5391: result: $with_hashed_db" >&5
5392 echo "${ECHO_T}$with_hashed_db" >&6
5393 fi
5394
5395 echo "$as_me:5395: checking for list of fallback descriptions" >&5
5396 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5397
5398 # Check whether --with-fallbacks or --without-fallbacks was given.
5399 if test "${with_fallbacks+set}" = set; then
5400   withval="$with_fallbacks"
5401   with_fallback=$withval
5402 else
5403   with_fallback=
5404 fi;
5405 echo "$as_me:5405: result: $with_fallback" >&5
5406 echo "${ECHO_T}$with_fallback" >&6
5407 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5408
5409 echo "$as_me:5409: checking if you want modern xterm or antique" >&5
5410 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5411
5412 # Check whether --with-xterm-new or --without-xterm-new was given.
5413 if test "${with_xterm_new+set}" = set; then
5414   withval="$with_xterm_new"
5415   with_xterm_new=$withval
5416 else
5417   with_xterm_new=yes
5418 fi;
5419 case $with_xterm_new in
5420 no)     with_xterm_new=xterm-old;;
5421 *)      with_xterm_new=xterm-new;;
5422 esac
5423 echo "$as_me:5423: result: $with_xterm_new" >&5
5424 echo "${ECHO_T}$with_xterm_new" >&6
5425 WHICH_XTERM=$with_xterm_new
5426
5427 MAKE_TERMINFO=
5428 if test "$use_database" = no ; then
5429         TERMINFO="${datadir}/terminfo"
5430         MAKE_TERMINFO="#"
5431 else
5432
5433 echo "$as_me:5433: checking for list of terminfo directories" >&5
5434 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5435
5436 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5437 if test "${with_terminfo_dirs+set}" = set; then
5438   withval="$with_terminfo_dirs"
5439
5440 else
5441   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5442 fi;
5443 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5444 cf_dst_path=
5445 for cf_src_path in $withval
5446 do
5447
5448 if test "x$prefix" != xNONE; then
5449   cf_path_syntax="$prefix"
5450 else
5451   cf_path_syntax="$ac_default_prefix"
5452 fi
5453
5454 case ".$cf_src_path" in #(vi
5455 .\$\(*\)*|.\'*\'*) #(vi
5456   ;;
5457 ..|./*|.\\*) #(vi
5458   ;;
5459 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5460   ;;
5461 .\${*prefix}*) #(vi
5462   eval cf_src_path="$cf_src_path"
5463   case ".$cf_src_path" in #(vi
5464   .NONE/*)
5465     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5466     ;;
5467   esac
5468   ;; #(vi
5469 .no|.NONE/*)
5470   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5471   ;;
5472 *)
5473   { { echo "$as_me:5473: error: expected a pathname, not \"$cf_src_path\"" >&5
5474 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5475    { (exit 1); exit 1; }; }
5476   ;;
5477 esac
5478
5479   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5480   cf_dst_path="${cf_dst_path}${cf_src_path}"
5481 done
5482 IFS="$ac_save_ifs"
5483
5484 eval 'TERMINFO_DIRS="$cf_dst_path"'
5485
5486 echo "$as_me:5486: result: $TERMINFO_DIRS" >&5
5487 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5488 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5489 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5490 EOF
5491
5492 echo "$as_me:5492: checking for default terminfo directory" >&5
5493 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5494
5495 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5496 if test "${with_default_terminfo_dir+set}" = set; then
5497   withval="$with_default_terminfo_dir"
5498
5499 else
5500   withval="${TERMINFO-${datadir}/terminfo}"
5501 fi; if test -n "${datadir}/terminfo" ; then
5502
5503 if test "x$prefix" != xNONE; then
5504   cf_path_syntax="$prefix"
5505 else
5506   cf_path_syntax="$ac_default_prefix"
5507 fi
5508
5509 case ".$withval" in #(vi
5510 .\$\(*\)*|.\'*\'*) #(vi
5511   ;;
5512 ..|./*|.\\*) #(vi
5513   ;;
5514 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5515   ;;
5516 .\${*prefix}*) #(vi
5517   eval withval="$withval"
5518   case ".$withval" in #(vi
5519   .NONE/*)
5520     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5521     ;;
5522   esac
5523   ;; #(vi
5524 .no|.NONE/*)
5525   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5526   ;;
5527 *)
5528   { { echo "$as_me:5528: error: expected a pathname, not \"$withval\"" >&5
5529 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5530    { (exit 1); exit 1; }; }
5531   ;;
5532 esac
5533
5534 fi
5535 TERMINFO="$withval"
5536
5537 echo "$as_me:5537: result: $TERMINFO" >&5
5538 echo "${ECHO_T}$TERMINFO" >&6
5539 cat >>confdefs.h <<EOF
5540 #define TERMINFO "$TERMINFO"
5541 EOF
5542
5543 fi
5544
5545 ###     use option --disable-big-core to make tic run on small machines
5546 ###     We need 4Mb, check if we can allocate 50% more than that.
5547 echo "$as_me:5547: checking if big-core option selected" >&5
5548 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5549
5550 # Check whether --enable-big-core or --disable-big-core was given.
5551 if test "${enable_big_core+set}" = set; then
5552   enableval="$enable_big_core"
5553   with_big_core=$enableval
5554 else
5555   if test "$cross_compiling" = yes; then
5556   with_big_core=no
5557 else
5558   cat >conftest.$ac_ext <<_ACEOF
5559 #line 5559 "configure"
5560 #include "confdefs.h"
5561
5562 #include <stdlib.h>
5563 #include <string.h>
5564 int main() {
5565         unsigned long n = 6000000L;
5566         char *s = malloc(n);
5567         if (s != 0)
5568                 s[0] = s[n-1] = 0;
5569         ${cf_cv_main_return:-return}(s == 0);
5570 }
5571 _ACEOF
5572 rm -f conftest$ac_exeext
5573 if { (eval echo "$as_me:5573: \"$ac_link\"") >&5
5574   (eval $ac_link) 2>&5
5575   ac_status=$?
5576   echo "$as_me:5576: \$? = $ac_status" >&5
5577   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5578   { (eval echo "$as_me:5578: \"$ac_try\"") >&5
5579   (eval $ac_try) 2>&5
5580   ac_status=$?
5581   echo "$as_me:5581: \$? = $ac_status" >&5
5582   (exit $ac_status); }; }; then
5583   with_big_core=yes
5584 else
5585   echo "$as_me: program exited with status $ac_status" >&5
5586 echo "$as_me: failed program was:" >&5
5587 cat conftest.$ac_ext >&5
5588 with_big_core=no
5589 fi
5590 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5591 fi
5592 fi;
5593 echo "$as_me:5593: result: $with_big_core" >&5
5594 echo "${ECHO_T}$with_big_core" >&6
5595 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5596 #define HAVE_BIG_CORE 1
5597 EOF
5598
5599 ### ISO C only guarantees 512-char strings, we have tables which load faster
5600 ### when constructed using "big" strings.
5601 echo "$as_me:5601: checking if big-strings option selected" >&5
5602 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5603
5604 # Check whether --enable-big-strings or --disable-big-strings was given.
5605 if test "${enable_big_strings+set}" = set; then
5606   enableval="$enable_big_strings"
5607   with_big_strings=no
5608 else
5609   with_big_strings=yes
5610 fi;
5611 echo "$as_me:5611: result: $with_big_strings" >&5
5612 echo "${ECHO_T}$with_big_strings" >&6
5613
5614 USE_BIG_STRINGS=0
5615 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5616
5617 ###     use option --enable-termcap to compile in the termcap fallback support
5618 echo "$as_me:5618: checking if you want termcap-fallback support" >&5
5619 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5620
5621 # Check whether --enable-termcap or --disable-termcap was given.
5622 if test "${enable_termcap+set}" = set; then
5623   enableval="$enable_termcap"
5624   with_termcap=$enableval
5625 else
5626   with_termcap=no
5627 fi;
5628 echo "$as_me:5628: result: $with_termcap" >&5
5629 echo "${ECHO_T}$with_termcap" >&6
5630
5631 if test "$with_termcap" != "yes" ; then
5632         if test "$use_database" = no ; then
5633                 if test -z "$with_fallback" ; then
5634                         { { echo "$as_me:5634: error: You have disabled the database w/o specifying fallbacks" >&5
5635 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5636    { (exit 1); exit 1; }; }
5637                 fi
5638         fi
5639         cat >>confdefs.h <<\EOF
5640 #define PURE_TERMINFO 1
5641 EOF
5642
5643 else
5644
5645 if test "$with_ticlib" != no ; then
5646         { { echo "$as_me:5646: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5647 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5648    { (exit 1); exit 1; }; }
5649 fi
5650
5651 cat >>confdefs.h <<\EOF
5652 #define USE_TERMCAP 1
5653 EOF
5654
5655 echo "$as_me:5655: checking for list of termcap files" >&5
5656 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5657
5658 # Check whether --with-termpath or --without-termpath was given.
5659 if test "${with_termpath+set}" = set; then
5660   withval="$with_termpath"
5661
5662 else
5663   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5664 fi;
5665 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5666 cf_dst_path=
5667 for cf_src_path in $withval
5668 do
5669
5670 if test "x$prefix" != xNONE; then
5671   cf_path_syntax="$prefix"
5672 else
5673   cf_path_syntax="$ac_default_prefix"
5674 fi
5675
5676 case ".$cf_src_path" in #(vi
5677 .\$\(*\)*|.\'*\'*) #(vi
5678   ;;
5679 ..|./*|.\\*) #(vi
5680   ;;
5681 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5682   ;;
5683 .\${*prefix}*) #(vi
5684   eval cf_src_path="$cf_src_path"
5685   case ".$cf_src_path" in #(vi
5686   .NONE/*)
5687     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5688     ;;
5689   esac
5690   ;; #(vi
5691 .no|.NONE/*)
5692   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5693   ;;
5694 *)
5695   { { echo "$as_me:5695: error: expected a pathname, not \"$cf_src_path\"" >&5
5696 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5697    { (exit 1); exit 1; }; }
5698   ;;
5699 esac
5700
5701   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5702   cf_dst_path="${cf_dst_path}${cf_src_path}"
5703 done
5704 IFS="$ac_save_ifs"
5705
5706 eval 'TERMPATH="$cf_dst_path"'
5707
5708 echo "$as_me:5708: result: $TERMPATH" >&5
5709 echo "${ECHO_T}$TERMPATH" >&6
5710 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5711 #define TERMPATH "$TERMPATH"
5712 EOF
5713
5714 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5715 echo "$as_me:5715: checking if fast termcap-loader is needed" >&5
5716 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5717
5718 # Check whether --enable-getcap or --disable-getcap was given.
5719 if test "${enable_getcap+set}" = set; then
5720   enableval="$enable_getcap"
5721   with_getcap=$enableval
5722 else
5723   with_getcap=no
5724 fi;
5725 echo "$as_me:5725: result: $with_getcap" >&5
5726 echo "${ECHO_T}$with_getcap" >&6
5727 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5728 #define USE_GETCAP 1
5729 EOF
5730
5731 echo "$as_me:5731: checking if translated termcaps will be cached in ~/.terminfo" >&5
5732 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5733
5734 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5735 if test "${enable_getcap_cache+set}" = set; then
5736   enableval="$enable_getcap_cache"
5737   with_getcap_cache=$enableval
5738 else
5739   with_getcap_cache=no
5740 fi;
5741 echo "$as_me:5741: result: $with_getcap_cache" >&5
5742 echo "${ECHO_T}$with_getcap_cache" >&6
5743 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5744 #define USE_GETCAP_CACHE 1
5745 EOF
5746
5747 fi
5748
5749 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5750 echo "$as_me:5750: checking if ~/.terminfo is wanted" >&5
5751 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5752
5753 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5754 if test "${enable_home_terminfo+set}" = set; then
5755   enableval="$enable_home_terminfo"
5756   with_home_terminfo=$enableval
5757 else
5758   with_home_terminfo=yes
5759 fi;
5760 echo "$as_me:5760: result: $with_home_terminfo" >&5
5761 echo "${ECHO_T}$with_home_terminfo" >&6
5762 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5763 #define USE_HOME_TERMINFO 1
5764 EOF
5765
5766 echo "$as_me:5766: checking if you want to use restricted environment when running as root" >&5
5767 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5768
5769 # Check whether --enable-root-environ or --disable-root-environ was given.
5770 if test "${enable_root_environ+set}" = set; then
5771   enableval="$enable_root_environ"
5772   with_root_environ=$enableval
5773 else
5774   with_root_environ=yes
5775 fi;
5776 echo "$as_me:5776: result: $with_root_environ" >&5
5777 echo "${ECHO_T}$with_root_environ" >&6
5778 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5779 #define USE_ROOT_ENVIRON 1
5780 EOF
5781
5782 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5783 ###   to reduce storage requirements for the terminfo database.
5784
5785 for ac_func in \
5786         remove \
5787         unlink
5788 do
5789 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5790 echo "$as_me:5790: checking for $ac_func" >&5
5791 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5792 if eval "test \"\${$as_ac_var+set}\" = set"; then
5793   echo $ECHO_N "(cached) $ECHO_C" >&6
5794 else
5795   cat >conftest.$ac_ext <<_ACEOF
5796 #line 5796 "configure"
5797 #include "confdefs.h"
5798 /* System header to define __stub macros and hopefully few prototypes,
5799     which can conflict with char $ac_func (); below.  */
5800 #include <assert.h>
5801 /* Override any gcc2 internal prototype to avoid an error.  */
5802 #ifdef __cplusplus
5803 extern "C"
5804 #endif
5805 /* We use char because int might match the return type of a gcc2
5806    builtin and then its argument prototype would still apply.  */
5807 char $ac_func ();
5808 char (*f) ();
5809
5810 int
5811 main ()
5812 {
5813 /* The GNU C library defines this for functions which it implements
5814     to always fail with ENOSYS.  Some functions are actually named
5815     something starting with __ and the normal name is an alias.  */
5816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5817 choke me
5818 #else
5819 f = $ac_func;
5820 #endif
5821
5822   ;
5823   return 0;
5824 }
5825 _ACEOF
5826 rm -f conftest.$ac_objext conftest$ac_exeext
5827 if { (eval echo "$as_me:5827: \"$ac_link\"") >&5
5828   (eval $ac_link) 2>&5
5829   ac_status=$?
5830   echo "$as_me:5830: \$? = $ac_status" >&5
5831   (exit $ac_status); } &&
5832          { ac_try='test -s conftest$ac_exeext'
5833   { (eval echo "$as_me:5833: \"$ac_try\"") >&5
5834   (eval $ac_try) 2>&5
5835   ac_status=$?
5836   echo "$as_me:5836: \$? = $ac_status" >&5
5837   (exit $ac_status); }; }; then
5838   eval "$as_ac_var=yes"
5839 else
5840   echo "$as_me: failed program was:" >&5
5841 cat conftest.$ac_ext >&5
5842 eval "$as_ac_var=no"
5843 fi
5844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5845 fi
5846 echo "$as_me:5846: result: `eval echo '${'$as_ac_var'}'`" >&5
5847 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5848 if test `eval echo '${'$as_ac_var'}'` = yes; then
5849   cat >>confdefs.h <<EOF
5850 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5851 EOF
5852
5853 fi
5854 done
5855
5856 if test "$cross_compiling" = yes ; then
5857
5858 for ac_func in \
5859                 link \
5860                 symlink
5861 do
5862 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5863 echo "$as_me:5863: checking for $ac_func" >&5
5864 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5865 if eval "test \"\${$as_ac_var+set}\" = set"; then
5866   echo $ECHO_N "(cached) $ECHO_C" >&6
5867 else
5868   cat >conftest.$ac_ext <<_ACEOF
5869 #line 5869 "configure"
5870 #include "confdefs.h"
5871 /* System header to define __stub macros and hopefully few prototypes,
5872     which can conflict with char $ac_func (); below.  */
5873 #include <assert.h>
5874 /* Override any gcc2 internal prototype to avoid an error.  */
5875 #ifdef __cplusplus
5876 extern "C"
5877 #endif
5878 /* We use char because int might match the return type of a gcc2
5879    builtin and then its argument prototype would still apply.  */
5880 char $ac_func ();
5881 char (*f) ();
5882
5883 int
5884 main ()
5885 {
5886 /* The GNU C library defines this for functions which it implements
5887     to always fail with ENOSYS.  Some functions are actually named
5888     something starting with __ and the normal name is an alias.  */
5889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5890 choke me
5891 #else
5892 f = $ac_func;
5893 #endif
5894
5895   ;
5896   return 0;
5897 }
5898 _ACEOF
5899 rm -f conftest.$ac_objext conftest$ac_exeext
5900 if { (eval echo "$as_me:5900: \"$ac_link\"") >&5
5901   (eval $ac_link) 2>&5
5902   ac_status=$?
5903   echo "$as_me:5903: \$? = $ac_status" >&5
5904   (exit $ac_status); } &&
5905          { ac_try='test -s conftest$ac_exeext'
5906   { (eval echo "$as_me:5906: \"$ac_try\"") >&5
5907   (eval $ac_try) 2>&5
5908   ac_status=$?
5909   echo "$as_me:5909: \$? = $ac_status" >&5
5910   (exit $ac_status); }; }; then
5911   eval "$as_ac_var=yes"
5912 else
5913   echo "$as_me: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5915 eval "$as_ac_var=no"
5916 fi
5917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5918 fi
5919 echo "$as_me:5919: result: `eval echo '${'$as_ac_var'}'`" >&5
5920 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5921 if test `eval echo '${'$as_ac_var'}'` = yes; then
5922   cat >>confdefs.h <<EOF
5923 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5924 EOF
5925
5926 fi
5927 done
5928
5929 else
5930         echo "$as_me:5930: checking if link/symlink functions work" >&5
5931 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5932 if test "${cf_cv_link_funcs+set}" = set; then
5933   echo $ECHO_N "(cached) $ECHO_C" >&6
5934 else
5935
5936                 cf_cv_link_funcs=
5937                 for cf_func in link symlink ; do
5938                         if test "$cross_compiling" = yes; then
5939
5940                         eval 'ac_cv_func_'$cf_func'=error'
5941 else
5942   cat >conftest.$ac_ext <<_ACEOF
5943 #line 5943 "configure"
5944 #include "confdefs.h"
5945
5946 #include <sys/types.h>
5947 #include <sys/stat.h>
5948 #ifdef HAVE_UNISTD_H
5949 #include <unistd.h>
5950 #endif
5951 int main()
5952 {
5953         int fail = 0;
5954         char *src = "config.log";
5955         char *dst = "conftest.chk";
5956         struct stat src_sb;
5957         struct stat dst_sb;
5958
5959         stat(src, &src_sb);
5960         fail = ($cf_func("config.log", "conftest.chk") < 0)
5961             || (stat(dst, &dst_sb) < 0)
5962             || (dst_sb.st_mtime != src_sb.st_mtime);
5963 #ifdef HAVE_UNLINK
5964         unlink(dst);
5965 #else
5966         remove(dst);
5967 #endif
5968         ${cf_cv_main_return:-return} (fail);
5969 }
5970
5971 _ACEOF
5972 rm -f conftest$ac_exeext
5973 if { (eval echo "$as_me:5973: \"$ac_link\"") >&5
5974   (eval $ac_link) 2>&5
5975   ac_status=$?
5976   echo "$as_me:5976: \$? = $ac_status" >&5
5977   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5978   { (eval echo "$as_me:5978: \"$ac_try\"") >&5
5979   (eval $ac_try) 2>&5
5980   ac_status=$?
5981   echo "$as_me:5981: \$? = $ac_status" >&5
5982   (exit $ac_status); }; }; then
5983
5984                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5985                         eval 'ac_cv_func_'$cf_func'=yes'
5986 else
5987   echo "$as_me: program exited with status $ac_status" >&5
5988 echo "$as_me: failed program was:" >&5
5989 cat conftest.$ac_ext >&5
5990
5991                         eval 'ac_cv_func_'$cf_func'=no'
5992 fi
5993 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5994 fi
5995                 done
5996                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5997
5998 fi
5999 echo "$as_me:5999: result: $cf_cv_link_funcs" >&5
6000 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6001         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6002 #define HAVE_LINK 1
6003 EOF
6004
6005         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6006 #define HAVE_SYMLINK 1
6007 EOF
6008
6009 fi
6010
6011 with_links=no
6012 with_symlinks=no
6013
6014 # soft links (symbolic links) are useful for some systems where hard links do
6015 # not work, or to make it simpler to copy terminfo trees around.
6016 if test "$ac_cv_func_symlink" = yes ; then
6017     echo "$as_me:6017: checking if tic should use symbolic links" >&5
6018 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6019
6020 # Check whether --enable-symlinks or --disable-symlinks was given.
6021 if test "${enable_symlinks+set}" = set; then
6022   enableval="$enable_symlinks"
6023   with_symlinks=$enableval
6024 else
6025   with_symlinks=no
6026 fi;
6027     echo "$as_me:6027: result: $with_symlinks" >&5
6028 echo "${ECHO_T}$with_symlinks" >&6
6029 fi
6030
6031 # If we have hard links and did not choose to use soft links instead, there is
6032 # no reason to make this choice optional - use the hard links.
6033 if test "$with_symlinks" = no ; then
6034     echo "$as_me:6034: checking if tic should use hard links" >&5
6035 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6036     if test "$ac_cv_func_link" = yes ; then
6037         with_links=yes
6038     else
6039         with_links=no
6040     fi
6041     echo "$as_me:6041: result: $with_links" >&5
6042 echo "${ECHO_T}$with_links" >&6
6043 fi
6044
6045 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6046 #define USE_LINKS 1
6047 EOF
6048
6049 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6050 #define USE_SYMLINKS 1
6051 EOF
6052
6053 ###   use option --enable-broken-linker to force on use of broken-linker support
6054 echo "$as_me:6054: checking if you want broken-linker support code" >&5
6055 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6056
6057 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6058 if test "${enable_broken_linker+set}" = set; then
6059   enableval="$enable_broken_linker"
6060   with_broken_linker=$enableval
6061 else
6062   with_broken_linker=${BROKEN_LINKER-no}
6063 fi;
6064 echo "$as_me:6064: result: $with_broken_linker" >&5
6065 echo "${ECHO_T}$with_broken_linker" >&6
6066
6067 BROKEN_LINKER=0
6068 if test "$with_broken_linker" = yes ; then
6069         cat >>confdefs.h <<\EOF
6070 #define BROKEN_LINKER 1
6071 EOF
6072
6073         BROKEN_LINKER=1
6074 elif test "$DFT_LWR_MODEL" = shared ; then
6075         case $cf_cv_system_name in #(vi
6076         cygwin*)
6077                 cat >>confdefs.h <<\EOF
6078 #define BROKEN_LINKER 1
6079 EOF
6080
6081                 BROKEN_LINKER=1
6082                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6083
6084                 ;;
6085         esac
6086 fi
6087
6088 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6089 echo "$as_me:6089: checking if tputs should process BSD-style prefix padding" >&5
6090 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6091
6092 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6093 if test "${enable_bsdpad+set}" = set; then
6094   enableval="$enable_bsdpad"
6095   with_bsdpad=$enableval
6096 else
6097   with_bsdpad=no
6098 fi;
6099 echo "$as_me:6099: result: $with_bsdpad" >&5
6100 echo "${ECHO_T}$with_bsdpad" >&6
6101 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6102 #define BSD_TPUTS 1
6103 EOF
6104
6105 ###   use option --enable-widec to turn on use of wide-character support
6106 NCURSES_CH_T=chtype
6107 NCURSES_LIBUTF8=0
6108
6109 NEED_WCHAR_H=0
6110 NCURSES_MBSTATE_T=0
6111 NCURSES_WCHAR_T=0
6112 NCURSES_WINT_T=0
6113
6114 # Check to define _XOPEN_SOURCE "automatically"
6115
6116 echo "$as_me:6116: checking if $CC -U and -D options work together" >&5
6117 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6118 if test "${cf_cv_cc_u_d_options+set}" = set; then
6119   echo $ECHO_N "(cached) $ECHO_C" >&6
6120 else
6121
6122         cf_save_CPPFLAGS="$CPPFLAGS"
6123         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6124         cat >conftest.$ac_ext <<_ACEOF
6125 #line 6125 "configure"
6126 #include "confdefs.h"
6127
6128 int
6129 main ()
6130 {
6131
6132 #ifndef U_D_OPTIONS
6133 make an undefined-error
6134 #endif
6135 #ifdef  D_U_OPTIONS
6136 make a defined-error
6137 #endif
6138
6139   ;
6140   return 0;
6141 }
6142 _ACEOF
6143 rm -f conftest.$ac_objext
6144 if { (eval echo "$as_me:6144: \"$ac_compile\"") >&5
6145   (eval $ac_compile) 2>&5
6146   ac_status=$?
6147   echo "$as_me:6147: \$? = $ac_status" >&5
6148   (exit $ac_status); } &&
6149          { ac_try='test -s conftest.$ac_objext'
6150   { (eval echo "$as_me:6150: \"$ac_try\"") >&5
6151   (eval $ac_try) 2>&5
6152   ac_status=$?
6153   echo "$as_me:6153: \$? = $ac_status" >&5
6154   (exit $ac_status); }; }; then
6155
6156         cf_cv_cc_u_d_options=yes
6157 else
6158   echo "$as_me: failed program was:" >&5
6159 cat conftest.$ac_ext >&5
6160
6161         cf_cv_cc_u_d_options=no
6162 fi
6163 rm -f conftest.$ac_objext conftest.$ac_ext
6164         CPPFLAGS="$cf_save_CPPFLAGS"
6165
6166 fi
6167 echo "$as_me:6167: result: $cf_cv_cc_u_d_options" >&5
6168 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6169
6170 cf_XOPEN_SOURCE=500
6171 cf_POSIX_C_SOURCE=199506L
6172
6173 case $host_os in #(vi
6174 aix[45]*) #(vi
6175         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6176         ;;
6177 freebsd*) #(vi
6178         # 5.x headers associate
6179         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6180         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6181         cf_POSIX_C_SOURCE=200112L
6182         cf_XOPEN_SOURCE=600
6183         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6184         ;;
6185 hpux*) #(vi
6186         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6187         ;;
6188 irix[56].*) #(vi
6189         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6190         ;;
6191 linux*|gnu*|k*bsd*-gnu) #(vi
6192
6193 echo "$as_me:6193: checking if we must define _GNU_SOURCE" >&5
6194 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6195 if test "${cf_cv_gnu_source+set}" = set; then
6196   echo $ECHO_N "(cached) $ECHO_C" >&6
6197 else
6198
6199 cat >conftest.$ac_ext <<_ACEOF
6200 #line 6200 "configure"
6201 #include "confdefs.h"
6202 #include <sys/types.h>
6203 int
6204 main ()
6205 {
6206
6207 #ifndef _XOPEN_SOURCE
6208 make an error
6209 #endif
6210   ;
6211   return 0;
6212 }
6213 _ACEOF
6214 rm -f conftest.$ac_objext
6215 if { (eval echo "$as_me:6215: \"$ac_compile\"") >&5
6216   (eval $ac_compile) 2>&5
6217   ac_status=$?
6218   echo "$as_me:6218: \$? = $ac_status" >&5
6219   (exit $ac_status); } &&
6220          { ac_try='test -s conftest.$ac_objext'
6221   { (eval echo "$as_me:6221: \"$ac_try\"") >&5
6222   (eval $ac_try) 2>&5
6223   ac_status=$?
6224   echo "$as_me:6224: \$? = $ac_status" >&5
6225   (exit $ac_status); }; }; then
6226   cf_cv_gnu_source=no
6227 else
6228   echo "$as_me: failed program was:" >&5
6229 cat conftest.$ac_ext >&5
6230 cf_save="$CPPFLAGS"
6231          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6232          cat >conftest.$ac_ext <<_ACEOF
6233 #line 6233 "configure"
6234 #include "confdefs.h"
6235 #include <sys/types.h>
6236 int
6237 main ()
6238 {
6239
6240 #ifdef _XOPEN_SOURCE
6241 make an error
6242 #endif
6243   ;
6244   return 0;
6245 }
6246 _ACEOF
6247 rm -f conftest.$ac_objext
6248 if { (eval echo "$as_me:6248: \"$ac_compile\"") >&5
6249   (eval $ac_compile) 2>&5
6250   ac_status=$?
6251   echo "$as_me:6251: \$? = $ac_status" >&5
6252   (exit $ac_status); } &&
6253          { ac_try='test -s conftest.$ac_objext'
6254   { (eval echo "$as_me:6254: \"$ac_try\"") >&5
6255   (eval $ac_try) 2>&5
6256   ac_status=$?
6257   echo "$as_me:6257: \$? = $ac_status" >&5
6258   (exit $ac_status); }; }; then
6259   cf_cv_gnu_source=no
6260 else
6261   echo "$as_me: failed program was:" >&5
6262 cat conftest.$ac_ext >&5
6263 cf_cv_gnu_source=yes
6264 fi
6265 rm -f conftest.$ac_objext conftest.$ac_ext
6266         CPPFLAGS="$cf_save"
6267
6268 fi
6269 rm -f conftest.$ac_objext conftest.$ac_ext
6270
6271 fi
6272 echo "$as_me:6272: result: $cf_cv_gnu_source" >&5
6273 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6274 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6275
6276         ;;
6277 mirbsd*) #(vi
6278         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6279         ;;
6280 netbsd*) #(vi
6281         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6282         ;;
6283 openbsd*) #(vi
6284         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6285         ;;
6286 osf[45]*) #(vi
6287         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6288         ;;
6289 nto-qnx*) #(vi
6290         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6291         ;;
6292 sco*) #(vi
6293         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6294         ;;
6295 solaris*) #(vi
6296         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6297         ;;
6298 *)
6299         echo "$as_me:6299: checking if we should define _XOPEN_SOURCE" >&5
6300 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6301 if test "${cf_cv_xopen_source+set}" = set; then
6302   echo $ECHO_N "(cached) $ECHO_C" >&6
6303 else
6304
6305         cat >conftest.$ac_ext <<_ACEOF
6306 #line 6306 "configure"
6307 #include "confdefs.h"
6308 #include <sys/types.h>
6309 int
6310 main ()
6311 {
6312
6313 #ifndef _XOPEN_SOURCE
6314 make an error
6315 #endif
6316   ;
6317   return 0;
6318 }
6319 _ACEOF
6320 rm -f conftest.$ac_objext
6321 if { (eval echo "$as_me:6321: \"$ac_compile\"") >&5
6322   (eval $ac_compile) 2>&5
6323   ac_status=$?
6324   echo "$as_me:6324: \$? = $ac_status" >&5
6325   (exit $ac_status); } &&
6326          { ac_try='test -s conftest.$ac_objext'
6327   { (eval echo "$as_me:6327: \"$ac_try\"") >&5
6328   (eval $ac_try) 2>&5
6329   ac_status=$?
6330   echo "$as_me:6330: \$? = $ac_status" >&5
6331   (exit $ac_status); }; }; then
6332   cf_cv_xopen_source=no
6333 else
6334   echo "$as_me: failed program was:" >&5
6335 cat conftest.$ac_ext >&5
6336 cf_save="$CPPFLAGS"
6337          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6338          cat >conftest.$ac_ext <<_ACEOF
6339 #line 6339 "configure"
6340 #include "confdefs.h"
6341 #include <sys/types.h>
6342 int
6343 main ()
6344 {
6345
6346 #ifdef _XOPEN_SOURCE
6347 make an error
6348 #endif
6349   ;
6350   return 0;
6351 }
6352 _ACEOF
6353 rm -f conftest.$ac_objext
6354 if { (eval echo "$as_me:6354: \"$ac_compile\"") >&5
6355   (eval $ac_compile) 2>&5
6356   ac_status=$?
6357   echo "$as_me:6357: \$? = $ac_status" >&5
6358   (exit $ac_status); } &&
6359          { ac_try='test -s conftest.$ac_objext'
6360   { (eval echo "$as_me:6360: \"$ac_try\"") >&5
6361   (eval $ac_try) 2>&5
6362   ac_status=$?
6363   echo "$as_me:6363: \$? = $ac_status" >&5
6364   (exit $ac_status); }; }; then
6365   cf_cv_xopen_source=no
6366 else
6367   echo "$as_me: failed program was:" >&5
6368 cat conftest.$ac_ext >&5
6369 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6370 fi
6371 rm -f conftest.$ac_objext conftest.$ac_ext
6372         CPPFLAGS="$cf_save"
6373
6374 fi
6375 rm -f conftest.$ac_objext conftest.$ac_ext
6376
6377 fi
6378 echo "$as_me:6378: result: $cf_cv_xopen_source" >&5
6379 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6380         if test "$cf_cv_xopen_source" != no ; then
6381
6382 # remove _XOPEN_SOURCE symbol from $CFLAGS
6383 CFLAGS=`echo "$CFLAGS" | \
6384         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6385                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6386
6387 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6388 CPPFLAGS=`echo "$CPPFLAGS" | \
6389         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6390                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6391
6392                 test "$cf_cv_cc_u_d_options" = yes && \
6393                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6394                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6395         fi
6396
6397 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6398
6399 cf_save_CFLAGS="$CFLAGS"
6400 cf_save_CPPFLAGS="$CPPFLAGS"
6401
6402 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6403 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6404         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6405                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6406
6407 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6408 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6409         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6410                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6411
6412 echo "$as_me:6412: checking if we should define _POSIX_C_SOURCE" >&5
6413 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6414 if test "${cf_cv_posix_c_source+set}" = set; then
6415   echo $ECHO_N "(cached) $ECHO_C" >&6
6416 else
6417
6418 echo "(line 6418) testing if the symbol is already defined go no further ..." 1>&5
6419
6420         cat >conftest.$ac_ext <<_ACEOF
6421 #line 6421 "configure"
6422 #include "confdefs.h"
6423 #include <sys/types.h>
6424 int
6425 main ()
6426 {
6427
6428 #ifndef _POSIX_C_SOURCE
6429 make an error
6430 #endif
6431   ;
6432   return 0;
6433 }
6434 _ACEOF
6435 rm -f conftest.$ac_objext
6436 if { (eval echo "$as_me:6436: \"$ac_compile\"") >&5
6437   (eval $ac_compile) 2>&5
6438   ac_status=$?
6439   echo "$as_me:6439: \$? = $ac_status" >&5
6440   (exit $ac_status); } &&
6441          { ac_try='test -s conftest.$ac_objext'
6442   { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6443   (eval $ac_try) 2>&5
6444   ac_status=$?
6445   echo "$as_me:6445: \$? = $ac_status" >&5
6446   (exit $ac_status); }; }; then
6447   cf_cv_posix_c_source=no
6448 else
6449   echo "$as_me: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451 cf_want_posix_source=no
6452          case .$cf_POSIX_C_SOURCE in #(vi
6453          .[12]??*) #(vi
6454                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6455                 ;;
6456          .2) #(vi
6457                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6458                 cf_want_posix_source=yes
6459                 ;;
6460          .*)
6461                 cf_want_posix_source=yes
6462                 ;;
6463          esac
6464          if test "$cf_want_posix_source" = yes ; then
6465                 cat >conftest.$ac_ext <<_ACEOF
6466 #line 6466 "configure"
6467 #include "confdefs.h"
6468 #include <sys/types.h>
6469 int
6470 main ()
6471 {
6472
6473 #ifdef _POSIX_SOURCE
6474 make an error
6475 #endif
6476   ;
6477   return 0;
6478 }
6479 _ACEOF
6480 rm -f conftest.$ac_objext
6481 if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
6482   (eval $ac_compile) 2>&5
6483   ac_status=$?
6484   echo "$as_me:6484: \$? = $ac_status" >&5
6485   (exit $ac_status); } &&
6486          { ac_try='test -s conftest.$ac_objext'
6487   { (eval echo "$as_me:6487: \"$ac_try\"") >&5
6488   (eval $ac_try) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); }; }; then
6492   :
6493 else
6494   echo "$as_me: failed program was:" >&5
6495 cat conftest.$ac_ext >&5
6496 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6497 fi
6498 rm -f conftest.$ac_objext conftest.$ac_ext
6499          fi
6500
6501 echo "(line 6501) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6502
6503          CFLAGS="$cf_trim_CFLAGS"
6504          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6505
6506 echo "(line 6506) testing if the second compile does not leave our definition intact error ..." 1>&5
6507
6508          cat >conftest.$ac_ext <<_ACEOF
6509 #line 6509 "configure"
6510 #include "confdefs.h"
6511 #include <sys/types.h>
6512 int
6513 main ()
6514 {
6515
6516 #ifndef _POSIX_C_SOURCE
6517 make an error
6518 #endif
6519   ;
6520   return 0;
6521 }
6522 _ACEOF
6523 rm -f conftest.$ac_objext
6524 if { (eval echo "$as_me:6524: \"$ac_compile\"") >&5
6525   (eval $ac_compile) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit $ac_status); } &&
6529          { ac_try='test -s conftest.$ac_objext'
6530   { (eval echo "$as_me:6530: \"$ac_try\"") >&5
6531   (eval $ac_try) 2>&5
6532   ac_status=$?
6533   echo "$as_me:6533: \$? = $ac_status" >&5
6534   (exit $ac_status); }; }; then
6535   :
6536 else
6537   echo "$as_me: failed program was:" >&5
6538 cat conftest.$ac_ext >&5
6539 cf_cv_posix_c_source=no
6540 fi
6541 rm -f conftest.$ac_objext conftest.$ac_ext
6542          CFLAGS="$cf_save_CFLAGS"
6543          CPPFLAGS="$cf_save_CPPFLAGS"
6544
6545 fi
6546 rm -f conftest.$ac_objext conftest.$ac_ext
6547
6548 fi
6549 echo "$as_me:6549: result: $cf_cv_posix_c_source" >&5
6550 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6551
6552 if test "$cf_cv_posix_c_source" != no ; then
6553         CFLAGS="$cf_trim_CFLAGS"
6554         CPPFLAGS="$cf_trim_CPPFLAGS"
6555         if test "$cf_cv_cc_u_d_options" = yes ; then
6556                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6557                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6558                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6559         fi
6560         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6561 fi
6562
6563         ;;
6564 esac
6565
6566 # Work around breakage on OS X
6567
6568 echo "$as_me:6568: checking if SIGWINCH is defined" >&5
6569 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6570 if test "${cf_cv_define_sigwinch+set}" = set; then
6571   echo $ECHO_N "(cached) $ECHO_C" >&6
6572 else
6573
6574         cat >conftest.$ac_ext <<_ACEOF
6575 #line 6575 "configure"
6576 #include "confdefs.h"
6577
6578 #include <sys/types.h>
6579 #include <sys/signal.h>
6580
6581 int
6582 main ()
6583 {
6584 int x = SIGWINCH
6585   ;
6586   return 0;
6587 }
6588 _ACEOF
6589 rm -f conftest.$ac_objext
6590 if { (eval echo "$as_me:6590: \"$ac_compile\"") >&5
6591   (eval $ac_compile) 2>&5
6592   ac_status=$?
6593   echo "$as_me:6593: \$? = $ac_status" >&5
6594   (exit $ac_status); } &&
6595          { ac_try='test -s conftest.$ac_objext'
6596   { (eval echo "$as_me:6596: \"$ac_try\"") >&5
6597   (eval $ac_try) 2>&5
6598   ac_status=$?
6599   echo "$as_me:6599: \$? = $ac_status" >&5
6600   (exit $ac_status); }; }; then
6601   cf_cv_define_sigwinch=yes
6602 else
6603   echo "$as_me: failed program was:" >&5
6604 cat conftest.$ac_ext >&5
6605 cat >conftest.$ac_ext <<_ACEOF
6606 #line 6606 "configure"
6607 #include "confdefs.h"
6608
6609 #undef _XOPEN_SOURCE
6610 #undef _POSIX_SOURCE
6611 #undef _POSIX_C_SOURCE
6612 #include <sys/types.h>
6613 #include <sys/signal.h>
6614
6615 int
6616 main ()
6617 {
6618 int x = SIGWINCH
6619   ;
6620   return 0;
6621 }
6622 _ACEOF
6623 rm -f conftest.$ac_objext
6624 if { (eval echo "$as_me:6624: \"$ac_compile\"") >&5
6625   (eval $ac_compile) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); } &&
6629          { ac_try='test -s conftest.$ac_objext'
6630   { (eval echo "$as_me:6630: \"$ac_try\"") >&5
6631   (eval $ac_try) 2>&5
6632   ac_status=$?
6633   echo "$as_me:6633: \$? = $ac_status" >&5
6634   (exit $ac_status); }; }; then
6635   cf_cv_define_sigwinch=maybe
6636 else
6637   echo "$as_me: failed program was:" >&5
6638 cat conftest.$ac_ext >&5
6639 cf_cv_define_sigwinch=no
6640 fi
6641 rm -f conftest.$ac_objext conftest.$ac_ext
6642
6643 fi
6644 rm -f conftest.$ac_objext conftest.$ac_ext
6645
6646 fi
6647 echo "$as_me:6647: result: $cf_cv_define_sigwinch" >&5
6648 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6649
6650 if test "$cf_cv_define_sigwinch" = maybe ; then
6651 echo "$as_me:6651: checking for actual SIGWINCH definition" >&5
6652 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6653 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6654   echo $ECHO_N "(cached) $ECHO_C" >&6
6655 else
6656
6657 cf_cv_fixup_sigwinch=unknown
6658 cf_sigwinch=32
6659 while test $cf_sigwinch != 1
6660 do
6661         cat >conftest.$ac_ext <<_ACEOF
6662 #line 6662 "configure"
6663 #include "confdefs.h"
6664
6665 #undef _XOPEN_SOURCE
6666 #undef _POSIX_SOURCE
6667 #undef _POSIX_C_SOURCE
6668 #include <sys/types.h>
6669 #include <sys/signal.h>
6670
6671 int
6672 main ()
6673 {
6674
6675 #if SIGWINCH != $cf_sigwinch
6676 make an error
6677 #endif
6678 int x = SIGWINCH
6679   ;
6680   return 0;
6681 }
6682 _ACEOF
6683 rm -f conftest.$ac_objext
6684 if { (eval echo "$as_me:6684: \"$ac_compile\"") >&5
6685   (eval $ac_compile) 2>&5
6686   ac_status=$?
6687   echo "$as_me:6687: \$? = $ac_status" >&5
6688   (exit $ac_status); } &&
6689          { ac_try='test -s conftest.$ac_objext'
6690   { (eval echo "$as_me:6690: \"$ac_try\"") >&5
6691   (eval $ac_try) 2>&5
6692   ac_status=$?
6693   echo "$as_me:6693: \$? = $ac_status" >&5
6694   (exit $ac_status); }; }; then
6695   cf_cv_fixup_sigwinch=$cf_sigwinch
6696          break
6697 else
6698   echo "$as_me: failed program was:" >&5
6699 cat conftest.$ac_ext >&5
6700 fi
6701 rm -f conftest.$ac_objext conftest.$ac_ext
6702
6703 cf_sigwinch=`expr $cf_sigwinch - 1`
6704 done
6705
6706 fi
6707 echo "$as_me:6707: result: $cf_cv_fixup_sigwinch" >&5
6708 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6709
6710         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6711                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6712         fi
6713 fi
6714
6715 # Checks for CODESET support.
6716
6717   echo "$as_me:6717: checking for nl_langinfo and CODESET" >&5
6718 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6719 if test "${am_cv_langinfo_codeset+set}" = set; then
6720   echo $ECHO_N "(cached) $ECHO_C" >&6
6721 else
6722   cat >conftest.$ac_ext <<_ACEOF
6723 #line 6723 "configure"
6724 #include "confdefs.h"
6725 #include <langinfo.h>
6726 int
6727 main ()
6728 {
6729 char* cs = nl_langinfo(CODESET);
6730   ;
6731   return 0;
6732 }
6733 _ACEOF
6734 rm -f conftest.$ac_objext conftest$ac_exeext
6735 if { (eval echo "$as_me:6735: \"$ac_link\"") >&5
6736   (eval $ac_link) 2>&5
6737   ac_status=$?
6738   echo "$as_me:6738: \$? = $ac_status" >&5
6739   (exit $ac_status); } &&
6740          { ac_try='test -s conftest$ac_exeext'
6741   { (eval echo "$as_me:6741: \"$ac_try\"") >&5
6742   (eval $ac_try) 2>&5
6743   ac_status=$?
6744   echo "$as_me:6744: \$? = $ac_status" >&5
6745   (exit $ac_status); }; }; then
6746   am_cv_langinfo_codeset=yes
6747 else
6748   echo "$as_me: failed program was:" >&5
6749 cat conftest.$ac_ext >&5
6750 am_cv_langinfo_codeset=no
6751 fi
6752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6753
6754 fi
6755 echo "$as_me:6755: result: $am_cv_langinfo_codeset" >&5
6756 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6757   if test $am_cv_langinfo_codeset = yes; then
6758
6759 cat >>confdefs.h <<\EOF
6760 #define HAVE_LANGINFO_CODESET 1
6761 EOF
6762
6763   fi
6764
6765 # use these variables to work around a defect in gcc's fixincludes.
6766 NCURSES_OK_WCHAR_T=
6767 NCURSES_OK_WINT_T=
6768
6769 echo "$as_me:6769: checking if you want wide-character code" >&5
6770 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6771
6772 # Check whether --enable-widec or --disable-widec was given.
6773 if test "${enable_widec+set}" = set; then
6774   enableval="$enable_widec"
6775   with_widec=$enableval
6776 else
6777   with_widec=no
6778 fi;
6779 echo "$as_me:6779: result: $with_widec" >&5
6780 echo "${ECHO_T}$with_widec" >&6
6781 if test "$with_widec" = yes ; then
6782         LIB_SUFFIX="w${LIB_SUFFIX}"
6783         cat >>confdefs.h <<\EOF
6784 #define USE_WIDEC_SUPPORT 1
6785 EOF
6786
6787 echo "$as_me:6787: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6788 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6789 cat >conftest.$ac_ext <<_ACEOF
6790 #line 6790 "configure"
6791 #include "confdefs.h"
6792 #include <sys/types.h>
6793
6794 int
6795 main ()
6796 {
6797
6798 #ifndef _XOPEN_SOURCE_EXTENDED
6799 make an error
6800 #endif
6801   ;
6802   return 0;
6803 }
6804 _ACEOF
6805 rm -f conftest.$ac_objext
6806 if { (eval echo "$as_me:6806: \"$ac_compile\"") >&5
6807   (eval $ac_compile) 2>&5
6808   ac_status=$?
6809   echo "$as_me:6809: \$? = $ac_status" >&5
6810   (exit $ac_status); } &&
6811          { ac_try='test -s conftest.$ac_objext'
6812   { (eval echo "$as_me:6812: \"$ac_try\"") >&5
6813   (eval $ac_try) 2>&5
6814   ac_status=$?
6815   echo "$as_me:6815: \$? = $ac_status" >&5
6816   (exit $ac_status); }; }; then
6817   cf_result=no
6818 else
6819   echo "$as_me: failed program was:" >&5
6820 cat conftest.$ac_ext >&5
6821 cf_result=yes
6822 fi
6823 rm -f conftest.$ac_objext conftest.$ac_ext
6824 echo "$as_me:6824: result: $cf_result" >&5
6825 echo "${ECHO_T}$cf_result" >&6
6826
6827 if test "$cf_result" = yes ; then
6828         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6829 elif test "x" != "x" ; then
6830         echo "$as_me:6830: checking checking for compatible value versus " >&5
6831 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6832         cat >conftest.$ac_ext <<_ACEOF
6833 #line 6833 "configure"
6834 #include "confdefs.h"
6835 #include <sys/types.h>
6836
6837 int
6838 main ()
6839 {
6840
6841 #if _XOPEN_SOURCE_EXTENDED- < 0
6842 make an error
6843 #endif
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 rm -f conftest.$ac_objext
6849 if { (eval echo "$as_me:6849: \"$ac_compile\"") >&5
6850   (eval $ac_compile) 2>&5
6851   ac_status=$?
6852   echo "$as_me:6852: \$? = $ac_status" >&5
6853   (exit $ac_status); } &&
6854          { ac_try='test -s conftest.$ac_objext'
6855   { (eval echo "$as_me:6855: \"$ac_try\"") >&5
6856   (eval $ac_try) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); }; }; then
6860   cf_result=yes
6861 else
6862   echo "$as_me: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864 cf_result=no
6865 fi
6866 rm -f conftest.$ac_objext conftest.$ac_ext
6867         echo "$as_me:6867: result: $cf_result" >&5
6868 echo "${ECHO_T}$cf_result" >&6
6869         if test "$cf_result" = no ; then
6870                 # perhaps we can override it - try...
6871                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6872         fi
6873 fi
6874
6875         # with_overwrite=no
6876         NCURSES_CH_T=cchar_t
6877
6878 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6879 do
6880 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6881 echo "$as_me:6881: checking for $ac_func" >&5
6882 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6883 if eval "test \"\${$as_ac_var+set}\" = set"; then
6884   echo $ECHO_N "(cached) $ECHO_C" >&6
6885 else
6886   cat >conftest.$ac_ext <<_ACEOF
6887 #line 6887 "configure"
6888 #include "confdefs.h"
6889 /* System header to define __stub macros and hopefully few prototypes,
6890     which can conflict with char $ac_func (); below.  */
6891 #include <assert.h>
6892 /* Override any gcc2 internal prototype to avoid an error.  */
6893 #ifdef __cplusplus
6894 extern "C"
6895 #endif
6896 /* We use char because int might match the return type of a gcc2
6897    builtin and then its argument prototype would still apply.  */
6898 char $ac_func ();
6899 char (*f) ();
6900
6901 int
6902 main ()
6903 {
6904 /* The GNU C library defines this for functions which it implements
6905     to always fail with ENOSYS.  Some functions are actually named
6906     something starting with __ and the normal name is an alias.  */
6907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6908 choke me
6909 #else
6910 f = $ac_func;
6911 #endif
6912
6913   ;
6914   return 0;
6915 }
6916 _ACEOF
6917 rm -f conftest.$ac_objext conftest$ac_exeext
6918 if { (eval echo "$as_me:6918: \"$ac_link\"") >&5
6919   (eval $ac_link) 2>&5
6920   ac_status=$?
6921   echo "$as_me:6921: \$? = $ac_status" >&5
6922   (exit $ac_status); } &&
6923          { ac_try='test -s conftest$ac_exeext'
6924   { (eval echo "$as_me:6924: \"$ac_try\"") >&5
6925   (eval $ac_try) 2>&5
6926   ac_status=$?
6927   echo "$as_me:6927: \$? = $ac_status" >&5
6928   (exit $ac_status); }; }; then
6929   eval "$as_ac_var=yes"
6930 else
6931   echo "$as_me: failed program was:" >&5
6932 cat conftest.$ac_ext >&5
6933 eval "$as_ac_var=no"
6934 fi
6935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6936 fi
6937 echo "$as_me:6937: result: `eval echo '${'$as_ac_var'}'`" >&5
6938 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6939 if test `eval echo '${'$as_ac_var'}'` = yes; then
6940   cat >>confdefs.h <<EOF
6941 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6942 EOF
6943
6944 fi
6945 done
6946
6947         if test "$ac_cv_func_putwc" != yes ; then
6948
6949 echo "$as_me:6949: checking for putwc in libutf8" >&5
6950 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6951 if test "${cf_cv_libutf8+set}" = set; then
6952   echo $ECHO_N "(cached) $ECHO_C" >&6
6953 else
6954
6955         cf_save_LIBS="$LIBS"
6956         LIBS="-lutf8 $LIBS"
6957 cat >conftest.$ac_ext <<_ACEOF
6958 #line 6958 "configure"
6959 #include "confdefs.h"
6960
6961 #include <libutf8.h>
6962 int
6963 main ()
6964 {
6965 putwc(0,0);
6966   ;
6967   return 0;
6968 }
6969 _ACEOF
6970 rm -f conftest.$ac_objext conftest$ac_exeext
6971 if { (eval echo "$as_me:6971: \"$ac_link\"") >&5
6972   (eval $ac_link) 2>&5
6973   ac_status=$?
6974   echo "$as_me:6974: \$? = $ac_status" >&5
6975   (exit $ac_status); } &&
6976          { ac_try='test -s conftest$ac_exeext'
6977   { (eval echo "$as_me:6977: \"$ac_try\"") >&5
6978   (eval $ac_try) 2>&5
6979   ac_status=$?
6980   echo "$as_me:6980: \$? = $ac_status" >&5
6981   (exit $ac_status); }; }; then
6982   cf_cv_libutf8=yes
6983 else
6984   echo "$as_me: failed program was:" >&5
6985 cat conftest.$ac_ext >&5
6986 cf_cv_libutf8=no
6987 fi
6988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6989         LIBS="$cf_save_LIBS"
6990
6991 fi
6992 echo "$as_me:6992: result: $cf_cv_libutf8" >&5
6993 echo "${ECHO_T}$cf_cv_libutf8" >&6
6994
6995 if test "$cf_cv_libutf8" = yes ; then
6996         cat >>confdefs.h <<\EOF
6997 #define HAVE_LIBUTF8_H 1
6998 EOF
6999
7000         LIBS="-lutf8 $LIBS"
7001 fi
7002
7003                 if test "$cf_cv_libutf8" = yes ; then
7004                         NCURSES_LIBUTF8=1
7005                 fi
7006         fi
7007
7008 # This is needed on Tru64 5.0 to declare mbstate_t
7009 echo "$as_me:7009: checking if we must include wchar.h to declare mbstate_t" >&5
7010 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7011 if test "${cf_cv_mbstate_t+set}" = set; then
7012   echo $ECHO_N "(cached) $ECHO_C" >&6
7013 else
7014
7015 cat >conftest.$ac_ext <<_ACEOF
7016 #line 7016 "configure"
7017 #include "confdefs.h"
7018
7019 #include <stdlib.h>
7020 #include <stdarg.h>
7021 #include <stdio.h>
7022 #ifdef HAVE_LIBUTF8_H
7023 #include <libutf8.h>
7024 #endif
7025 int
7026 main ()
7027 {
7028 mbstate_t state
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext
7034 if { (eval echo "$as_me:7034: \"$ac_compile\"") >&5
7035   (eval $ac_compile) 2>&5
7036   ac_status=$?
7037   echo "$as_me:7037: \$? = $ac_status" >&5
7038   (exit $ac_status); } &&
7039          { ac_try='test -s conftest.$ac_objext'
7040   { (eval echo "$as_me:7040: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); }; }; then
7045   cf_cv_mbstate_t=no
7046 else
7047   echo "$as_me: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 cat >conftest.$ac_ext <<_ACEOF
7050 #line 7050 "configure"
7051 #include "confdefs.h"
7052
7053 #include <stdlib.h>
7054 #include <stdarg.h>
7055 #include <stdio.h>
7056 #include <wchar.h>
7057 #ifdef HAVE_LIBUTF8_H
7058 #include <libutf8.h>
7059 #endif
7060 int
7061 main ()
7062 {
7063 mbstate_t value
7064   ;
7065   return 0;
7066 }
7067 _ACEOF
7068 rm -f conftest.$ac_objext
7069 if { (eval echo "$as_me:7069: \"$ac_compile\"") >&5
7070   (eval $ac_compile) 2>&5
7071   ac_status=$?
7072   echo "$as_me:7072: \$? = $ac_status" >&5
7073   (exit $ac_status); } &&
7074          { ac_try='test -s conftest.$ac_objext'
7075   { (eval echo "$as_me:7075: \"$ac_try\"") >&5
7076   (eval $ac_try) 2>&5
7077   ac_status=$?
7078   echo "$as_me:7078: \$? = $ac_status" >&5
7079   (exit $ac_status); }; }; then
7080   cf_cv_mbstate_t=yes
7081 else
7082   echo "$as_me: failed program was:" >&5
7083 cat conftest.$ac_ext >&5
7084 cf_cv_mbstate_t=unknown
7085 fi
7086 rm -f conftest.$ac_objext conftest.$ac_ext
7087 fi
7088 rm -f conftest.$ac_objext conftest.$ac_ext
7089 fi
7090 echo "$as_me:7090: result: $cf_cv_mbstate_t" >&5
7091 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7092
7093 if test "$cf_cv_mbstate_t" = yes ; then
7094         cat >>confdefs.h <<\EOF
7095 #define NEED_WCHAR_H 1
7096 EOF
7097
7098         NEED_WCHAR_H=1
7099 fi
7100
7101 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7102 if test "$cf_cv_mbstate_t" = unknown ; then
7103         NCURSES_MBSTATE_T=1
7104 fi
7105
7106 # This is needed on Tru64 5.0 to declare wchar_t
7107 echo "$as_me:7107: checking if we must include wchar.h to declare wchar_t" >&5
7108 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7109 if test "${cf_cv_wchar_t+set}" = set; then
7110   echo $ECHO_N "(cached) $ECHO_C" >&6
7111 else
7112
7113 cat >conftest.$ac_ext <<_ACEOF
7114 #line 7114 "configure"
7115 #include "confdefs.h"
7116
7117 #include <stdlib.h>
7118 #include <stdarg.h>
7119 #include <stdio.h>
7120 #ifdef HAVE_LIBUTF8_H
7121 #include <libutf8.h>
7122 #endif
7123 int
7124 main ()
7125 {
7126 wchar_t state
7127   ;
7128   return 0;
7129 }
7130 _ACEOF
7131 rm -f conftest.$ac_objext
7132 if { (eval echo "$as_me:7132: \"$ac_compile\"") >&5
7133   (eval $ac_compile) 2>&5
7134   ac_status=$?
7135   echo "$as_me:7135: \$? = $ac_status" >&5
7136   (exit $ac_status); } &&
7137          { ac_try='test -s conftest.$ac_objext'
7138   { (eval echo "$as_me:7138: \"$ac_try\"") >&5
7139   (eval $ac_try) 2>&5
7140   ac_status=$?
7141   echo "$as_me:7141: \$? = $ac_status" >&5
7142   (exit $ac_status); }; }; then
7143   cf_cv_wchar_t=no
7144 else
7145   echo "$as_me: failed program was:" >&5
7146 cat conftest.$ac_ext >&5
7147 cat >conftest.$ac_ext <<_ACEOF
7148 #line 7148 "configure"
7149 #include "confdefs.h"
7150
7151 #include <stdlib.h>
7152 #include <stdarg.h>
7153 #include <stdio.h>
7154 #include <wchar.h>
7155 #ifdef HAVE_LIBUTF8_H
7156 #include <libutf8.h>
7157 #endif
7158 int
7159 main ()
7160 {
7161 wchar_t value
7162   ;
7163   return 0;
7164 }
7165 _ACEOF
7166 rm -f conftest.$ac_objext
7167 if { (eval echo "$as_me:7167: \"$ac_compile\"") >&5
7168   (eval $ac_compile) 2>&5
7169   ac_status=$?
7170   echo "$as_me:7170: \$? = $ac_status" >&5
7171   (exit $ac_status); } &&
7172          { ac_try='test -s conftest.$ac_objext'
7173   { (eval echo "$as_me:7173: \"$ac_try\"") >&5
7174   (eval $ac_try) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); }; }; then
7178   cf_cv_wchar_t=yes
7179 else
7180   echo "$as_me: failed program was:" >&5
7181 cat conftest.$ac_ext >&5
7182 cf_cv_wchar_t=unknown
7183 fi
7184 rm -f conftest.$ac_objext conftest.$ac_ext
7185 fi
7186 rm -f conftest.$ac_objext conftest.$ac_ext
7187 fi
7188 echo "$as_me:7188: result: $cf_cv_wchar_t" >&5
7189 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7190
7191 if test "$cf_cv_wchar_t" = yes ; then
7192         cat >>confdefs.h <<\EOF
7193 #define NEED_WCHAR_H 1
7194 EOF
7195
7196         NEED_WCHAR_H=1
7197 fi
7198
7199 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7200 if test "$cf_cv_wchar_t" = unknown ; then
7201         NCURSES_WCHAR_T=1
7202 fi
7203
7204 # if we find wchar_t in either place, use substitution to provide a fallback.
7205 if test "$cf_cv_wchar_t" != unknown ; then
7206         NCURSES_OK_WCHAR_T=1
7207 fi
7208
7209 # This is needed on Tru64 5.0 to declare wint_t
7210 echo "$as_me:7210: checking if we must include wchar.h to declare wint_t" >&5
7211 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7212 if test "${cf_cv_wint_t+set}" = set; then
7213   echo $ECHO_N "(cached) $ECHO_C" >&6
7214 else
7215
7216 cat >conftest.$ac_ext <<_ACEOF
7217 #line 7217 "configure"
7218 #include "confdefs.h"
7219
7220 #include <stdlib.h>
7221 #include <stdarg.h>
7222 #include <stdio.h>
7223 #ifdef HAVE_LIBUTF8_H
7224 #include <libutf8.h>
7225 #endif
7226 int
7227 main ()
7228 {
7229 wint_t state
7230   ;
7231   return 0;
7232 }
7233 _ACEOF
7234 rm -f conftest.$ac_objext
7235 if { (eval echo "$as_me:7235: \"$ac_compile\"") >&5
7236   (eval $ac_compile) 2>&5
7237   ac_status=$?
7238   echo "$as_me:7238: \$? = $ac_status" >&5
7239   (exit $ac_status); } &&
7240          { ac_try='test -s conftest.$ac_objext'
7241   { (eval echo "$as_me:7241: \"$ac_try\"") >&5
7242   (eval $ac_try) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit $ac_status); }; }; then
7246   cf_cv_wint_t=no
7247 else
7248   echo "$as_me: failed program was:" >&5
7249 cat conftest.$ac_ext >&5
7250 cat >conftest.$ac_ext <<_ACEOF
7251 #line 7251 "configure"
7252 #include "confdefs.h"
7253
7254 #include <stdlib.h>
7255 #include <stdarg.h>
7256 #include <stdio.h>
7257 #include <wchar.h>
7258 #ifdef HAVE_LIBUTF8_H
7259 #include <libutf8.h>
7260 #endif
7261 int
7262 main ()
7263 {
7264 wint_t value
7265   ;
7266   return 0;
7267 }
7268 _ACEOF
7269 rm -f conftest.$ac_objext
7270 if { (eval echo "$as_me:7270: \"$ac_compile\"") >&5
7271   (eval $ac_compile) 2>&5
7272   ac_status=$?
7273   echo "$as_me:7273: \$? = $ac_status" >&5
7274   (exit $ac_status); } &&
7275          { ac_try='test -s conftest.$ac_objext'
7276   { (eval echo "$as_me:7276: \"$ac_try\"") >&5
7277   (eval $ac_try) 2>&5
7278   ac_status=$?
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit $ac_status); }; }; then
7281   cf_cv_wint_t=yes
7282 else
7283   echo "$as_me: failed program was:" >&5
7284 cat conftest.$ac_ext >&5
7285 cf_cv_wint_t=unknown
7286 fi
7287 rm -f conftest.$ac_objext conftest.$ac_ext
7288 fi
7289 rm -f conftest.$ac_objext conftest.$ac_ext
7290 fi
7291 echo "$as_me:7291: result: $cf_cv_wint_t" >&5
7292 echo "${ECHO_T}$cf_cv_wint_t" >&6
7293
7294 if test "$cf_cv_wint_t" = yes ; then
7295         cat >>confdefs.h <<\EOF
7296 #define NEED_WCHAR_H 1
7297 EOF
7298
7299         NEED_WCHAR_H=1
7300 fi
7301
7302 # if we do not find wint_t in either place, use substitution to provide a fallback.
7303 if test "$cf_cv_wint_t" = unknown ; then
7304         NCURSES_WINT_T=1
7305 fi
7306
7307 # if we find wint_t in either place, use substitution to provide a fallback.
7308 if test "$cf_cv_wint_t" != unknown ; then
7309         NCURSES_OK_WINT_T=1
7310 fi
7311
7312         if test "$NCURSES_MBSTATE_T" != 0; then
7313                 cat >>confdefs.h <<\EOF
7314 #define NEED_MBSTATE_T_DEF 1
7315 EOF
7316
7317         fi
7318 fi
7319
7320 ###   use option --disable-lp64 to allow long chtype
7321 case $cf_cv_abi_version in
7322 [345]*)
7323         default_with_lp64=no
7324         ;;
7325 *)
7326         default_with_lp64=yes
7327         ;;
7328 esac
7329
7330 echo "$as_me:7330: checking whether to enable _LP64 definition in curses.h" >&5
7331 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7332
7333 # Check whether --enable-lp64 or --disable-lp64 was given.
7334 if test "${enable_lp64+set}" = set; then
7335   enableval="$enable_lp64"
7336   with_lp64=$enableval
7337 else
7338   with_lp64=$default_with_lp64
7339 fi;
7340 echo "$as_me:7340: result: $with_lp64" >&5
7341 echo "${ECHO_T}$with_lp64" >&6
7342
7343 if test "$with_lp64" = yes ; then
7344         cf_cv_enable_lp64=1
7345 else
7346         cf_cv_enable_lp64=0
7347 fi
7348
7349 # Check whether --enable-largefile or --disable-largefile was given.
7350 if test "${enable_largefile+set}" = set; then
7351   enableval="$enable_largefile"
7352
7353 fi;
7354 if test "$enable_largefile" != no; then
7355
7356   echo "$as_me:7356: checking for special C compiler options needed for large files" >&5
7357 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7358 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7359   echo $ECHO_N "(cached) $ECHO_C" >&6
7360 else
7361   ac_cv_sys_largefile_CC=no
7362      if test "$GCC" != yes; then
7363        ac_save_CC=$CC
7364        while :; do
7365          # IRIX 6.2 and later do not support large files by default,
7366          # so use the C compiler's -n32 option if that helps.
7367          cat >conftest.$ac_ext <<_ACEOF
7368 #line 7368 "configure"
7369 #include "confdefs.h"
7370 #include <sys/types.h>
7371  /* Check that off_t can represent 2**63 - 1 correctly.
7372     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7373     since some C++ compilers masquerading as C compilers
7374     incorrectly reject 9223372036854775807.  */
7375 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7376   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7377                        && LARGE_OFF_T % 2147483647 == 1)
7378                       ? 1 : -1];
7379 int
7380 main ()
7381 {
7382
7383   ;
7384   return 0;
7385 }
7386 _ACEOF
7387          rm -f conftest.$ac_objext
7388 if { (eval echo "$as_me:7388: \"$ac_compile\"") >&5
7389   (eval $ac_compile) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -s conftest.$ac_objext'
7394   { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); }; }; then
7399   break
7400 else
7401   echo "$as_me: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 fi
7404 rm -f conftest.$ac_objext
7405          CC="$CC -n32"
7406          rm -f conftest.$ac_objext
7407 if { (eval echo "$as_me:7407: \"$ac_compile\"") >&5
7408   (eval $ac_compile) 2>&5
7409   ac_status=$?
7410   echo "$as_me:7410: \$? = $ac_status" >&5
7411   (exit $ac_status); } &&
7412          { ac_try='test -s conftest.$ac_objext'
7413   { (eval echo "$as_me:7413: \"$ac_try\"") >&5
7414   (eval $ac_try) 2>&5
7415   ac_status=$?
7416   echo "$as_me:7416: \$? = $ac_status" >&5
7417   (exit $ac_status); }; }; then
7418   ac_cv_sys_largefile_CC=' -n32'; break
7419 else
7420   echo "$as_me: failed program was:" >&5
7421 cat conftest.$ac_ext >&5
7422 fi
7423 rm -f conftest.$ac_objext
7424          break
7425        done
7426        CC=$ac_save_CC
7427        rm -f conftest.$ac_ext
7428     fi
7429 fi
7430 echo "$as_me:7430: result: $ac_cv_sys_largefile_CC" >&5
7431 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7432   if test "$ac_cv_sys_largefile_CC" != no; then
7433     CC=$CC$ac_cv_sys_largefile_CC
7434   fi
7435
7436   echo "$as_me:7436: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7437 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7438 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7439   echo $ECHO_N "(cached) $ECHO_C" >&6
7440 else
7441   while :; do
7442   ac_cv_sys_file_offset_bits=no
7443   cat >conftest.$ac_ext <<_ACEOF
7444 #line 7444 "configure"
7445 #include "confdefs.h"
7446 #include <sys/types.h>
7447  /* Check that off_t can represent 2**63 - 1 correctly.
7448     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7449     since some C++ compilers masquerading as C compilers
7450     incorrectly reject 9223372036854775807.  */
7451 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7452   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7453                        && LARGE_OFF_T % 2147483647 == 1)
7454                       ? 1 : -1];
7455 int
7456 main ()
7457 {
7458
7459   ;
7460   return 0;
7461 }
7462 _ACEOF
7463 rm -f conftest.$ac_objext
7464 if { (eval echo "$as_me:7464: \"$ac_compile\"") >&5
7465   (eval $ac_compile) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } &&
7469          { ac_try='test -s conftest.$ac_objext'
7470   { (eval echo "$as_me:7470: \"$ac_try\"") >&5
7471   (eval $ac_try) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); }; }; then
7475   break
7476 else
7477   echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 fi
7480 rm -f conftest.$ac_objext conftest.$ac_ext
7481   cat >conftest.$ac_ext <<_ACEOF
7482 #line 7482 "configure"
7483 #include "confdefs.h"
7484 #define _FILE_OFFSET_BITS 64
7485 #include <sys/types.h>
7486  /* Check that off_t can represent 2**63 - 1 correctly.
7487     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7488     since some C++ compilers masquerading as C compilers
7489     incorrectly reject 9223372036854775807.  */
7490 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7491   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7492                        && LARGE_OFF_T % 2147483647 == 1)
7493                       ? 1 : -1];
7494 int
7495 main ()
7496 {
7497
7498   ;
7499   return 0;
7500 }
7501 _ACEOF
7502 rm -f conftest.$ac_objext
7503 if { (eval echo "$as_me:7503: \"$ac_compile\"") >&5
7504   (eval $ac_compile) 2>&5
7505   ac_status=$?
7506   echo "$as_me:7506: \$? = $ac_status" >&5
7507   (exit $ac_status); } &&
7508          { ac_try='test -s conftest.$ac_objext'
7509   { (eval echo "$as_me:7509: \"$ac_try\"") >&5
7510   (eval $ac_try) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit $ac_status); }; }; then
7514   ac_cv_sys_file_offset_bits=64; break
7515 else
7516   echo "$as_me: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7518 fi
7519 rm -f conftest.$ac_objext conftest.$ac_ext
7520   break
7521 done
7522 fi
7523 echo "$as_me:7523: result: $ac_cv_sys_file_offset_bits" >&5
7524 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7525 if test "$ac_cv_sys_file_offset_bits" != no; then
7526
7527 cat >>confdefs.h <<EOF
7528 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7529 EOF
7530
7531 fi
7532 rm -f conftest*
7533   echo "$as_me:7533: checking for _LARGE_FILES value needed for large files" >&5
7534 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7535 if test "${ac_cv_sys_large_files+set}" = set; then
7536   echo $ECHO_N "(cached) $ECHO_C" >&6
7537 else
7538   while :; do
7539   ac_cv_sys_large_files=no
7540   cat >conftest.$ac_ext <<_ACEOF
7541 #line 7541 "configure"
7542 #include "confdefs.h"
7543 #include <sys/types.h>
7544  /* Check that off_t can represent 2**63 - 1 correctly.
7545     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7546     since some C++ compilers masquerading as C compilers
7547     incorrectly reject 9223372036854775807.  */
7548 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7549   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7550                        && LARGE_OFF_T % 2147483647 == 1)
7551                       ? 1 : -1];
7552 int
7553 main ()
7554 {
7555
7556   ;
7557   return 0;
7558 }
7559 _ACEOF
7560 rm -f conftest.$ac_objext
7561 if { (eval echo "$as_me:7561: \"$ac_compile\"") >&5
7562   (eval $ac_compile) 2>&5
7563   ac_status=$?
7564   echo "$as_me:7564: \$? = $ac_status" >&5
7565   (exit $ac_status); } &&
7566          { ac_try='test -s conftest.$ac_objext'
7567   { (eval echo "$as_me:7567: \"$ac_try\"") >&5
7568   (eval $ac_try) 2>&5
7569   ac_status=$?
7570   echo "$as_me:7570: \$? = $ac_status" >&5
7571   (exit $ac_status); }; }; then
7572   break
7573 else
7574   echo "$as_me: failed program was:" >&5
7575 cat conftest.$ac_ext >&5
7576 fi
7577 rm -f conftest.$ac_objext conftest.$ac_ext
7578   cat >conftest.$ac_ext <<_ACEOF
7579 #line 7579 "configure"
7580 #include "confdefs.h"
7581 #define _LARGE_FILES 1
7582 #include <sys/types.h>
7583  /* Check that off_t can represent 2**63 - 1 correctly.
7584     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7585     since some C++ compilers masquerading as C compilers
7586     incorrectly reject 9223372036854775807.  */
7587 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7588   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7589                        && LARGE_OFF_T % 2147483647 == 1)
7590                       ? 1 : -1];
7591 int
7592 main ()
7593 {
7594
7595   ;
7596   return 0;
7597 }
7598 _ACEOF
7599 rm -f conftest.$ac_objext
7600 if { (eval echo "$as_me:7600: \"$ac_compile\"") >&5
7601   (eval $ac_compile) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); } &&
7605          { ac_try='test -s conftest.$ac_objext'
7606   { (eval echo "$as_me:7606: \"$ac_try\"") >&5
7607   (eval $ac_try) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); }; }; then
7611   ac_cv_sys_large_files=1; break
7612 else
7613   echo "$as_me: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 fi
7616 rm -f conftest.$ac_objext conftest.$ac_ext
7617   break
7618 done
7619 fi
7620 echo "$as_me:7620: result: $ac_cv_sys_large_files" >&5
7621 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7622 if test "$ac_cv_sys_large_files" != no; then
7623
7624 cat >>confdefs.h <<EOF
7625 #define _LARGE_FILES $ac_cv_sys_large_files
7626 EOF
7627
7628 fi
7629 rm -f conftest*
7630 fi
7631
7632     if test "$enable_largefile" != no ; then
7633         echo "$as_me:7633: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7634 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7635 if test "${ac_cv_sys_largefile_source+set}" = set; then
7636   echo $ECHO_N "(cached) $ECHO_C" >&6
7637 else
7638   while :; do
7639   ac_cv_sys_largefile_source=no
7640   cat >conftest.$ac_ext <<_ACEOF
7641 #line 7641 "configure"
7642 #include "confdefs.h"
7643 #include <stdio.h>
7644 int
7645 main ()
7646 {
7647 return !fseeko;
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 rm -f conftest.$ac_objext
7653 if { (eval echo "$as_me:7653: \"$ac_compile\"") >&5
7654   (eval $ac_compile) 2>&5
7655   ac_status=$?
7656   echo "$as_me:7656: \$? = $ac_status" >&5
7657   (exit $ac_status); } &&
7658          { ac_try='test -s conftest.$ac_objext'
7659   { (eval echo "$as_me:7659: \"$ac_try\"") >&5
7660   (eval $ac_try) 2>&5
7661   ac_status=$?
7662   echo "$as_me:7662: \$? = $ac_status" >&5
7663   (exit $ac_status); }; }; then
7664   break
7665 else
7666   echo "$as_me: failed program was:" >&5
7667 cat conftest.$ac_ext >&5
7668 fi
7669 rm -f conftest.$ac_objext conftest.$ac_ext
7670   cat >conftest.$ac_ext <<_ACEOF
7671 #line 7671 "configure"
7672 #include "confdefs.h"
7673 #define _LARGEFILE_SOURCE 1
7674 #include <stdio.h>
7675 int
7676 main ()
7677 {
7678 return !fseeko;
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 rm -f conftest.$ac_objext
7684 if { (eval echo "$as_me:7684: \"$ac_compile\"") >&5
7685   (eval $ac_compile) 2>&5
7686   ac_status=$?
7687   echo "$as_me:7687: \$? = $ac_status" >&5
7688   (exit $ac_status); } &&
7689          { ac_try='test -s conftest.$ac_objext'
7690   { (eval echo "$as_me:7690: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695   ac_cv_sys_largefile_source=1; break
7696 else
7697   echo "$as_me: failed program was:" >&5
7698 cat conftest.$ac_ext >&5
7699 fi
7700 rm -f conftest.$ac_objext conftest.$ac_ext
7701   break
7702 done
7703 fi
7704 echo "$as_me:7704: result: $ac_cv_sys_largefile_source" >&5
7705 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7706 if test "$ac_cv_sys_largefile_source" != no; then
7707
7708 cat >>confdefs.h <<EOF
7709 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7710 EOF
7711
7712 fi
7713 rm -f conftest*
7714
7715 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7716 # in glibc 2.1.3, but that breaks too many other things.
7717 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7718 echo "$as_me:7718: checking for fseeko" >&5
7719 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7720 if test "${ac_cv_func_fseeko+set}" = set; then
7721   echo $ECHO_N "(cached) $ECHO_C" >&6
7722 else
7723   cat >conftest.$ac_ext <<_ACEOF
7724 #line 7724 "configure"
7725 #include "confdefs.h"
7726 #include <stdio.h>
7727 int
7728 main ()
7729 {
7730 return fseeko && fseeko (stdin, 0, 0);
7731   ;
7732   return 0;
7733 }
7734 _ACEOF
7735 rm -f conftest.$ac_objext conftest$ac_exeext
7736 if { (eval echo "$as_me:7736: \"$ac_link\"") >&5
7737   (eval $ac_link) 2>&5
7738   ac_status=$?
7739   echo "$as_me:7739: \$? = $ac_status" >&5
7740   (exit $ac_status); } &&
7741          { ac_try='test -s conftest$ac_exeext'
7742   { (eval echo "$as_me:7742: \"$ac_try\"") >&5
7743   (eval $ac_try) 2>&5
7744   ac_status=$?
7745   echo "$as_me:7745: \$? = $ac_status" >&5
7746   (exit $ac_status); }; }; then
7747   ac_cv_func_fseeko=yes
7748 else
7749   echo "$as_me: failed program was:" >&5
7750 cat conftest.$ac_ext >&5
7751 ac_cv_func_fseeko=no
7752 fi
7753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7754 fi
7755 echo "$as_me:7755: result: $ac_cv_func_fseeko" >&5
7756 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7757 if test $ac_cv_func_fseeko = yes; then
7758
7759 cat >>confdefs.h <<\EOF
7760 #define HAVE_FSEEKO 1
7761 EOF
7762
7763 fi
7764
7765         # Normally we would collect these definitions in the config.h,
7766         # but (like _XOPEN_SOURCE), some environments rely on having these
7767         # defined before any of the system headers are included.  Another
7768         # case comes up with C++, e.g., on AIX the compiler compiles the
7769         # header files by themselves before looking at the body files it is
7770         # told to compile.  For ncurses, those header files do not include
7771         # the config.h
7772         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7773         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7774         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7775
7776         echo "$as_me:7776: checking whether to use struct dirent64" >&5
7777 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7778 if test "${cf_cv_struct_dirent64+set}" = set; then
7779   echo $ECHO_N "(cached) $ECHO_C" >&6
7780 else
7781
7782                 cat >conftest.$ac_ext <<_ACEOF
7783 #line 7783 "configure"
7784 #include "confdefs.h"
7785
7786 #include <sys/types.h>
7787 #include <dirent.h>
7788
7789 int
7790 main ()
7791 {
7792
7793                 /* if transitional largefile support is setup, this is true */
7794                 extern struct dirent64 * readdir(DIR *);
7795                 struct dirent64 *x = readdir((DIR *)0);
7796                 struct dirent *y = readdir((DIR *)0);
7797                 int z = x - y;
7798
7799   ;
7800   return 0;
7801 }
7802 _ACEOF
7803 rm -f conftest.$ac_objext
7804 if { (eval echo "$as_me:7804: \"$ac_compile\"") >&5
7805   (eval $ac_compile) 2>&5
7806   ac_status=$?
7807   echo "$as_me:7807: \$? = $ac_status" >&5
7808   (exit $ac_status); } &&
7809          { ac_try='test -s conftest.$ac_objext'
7810   { (eval echo "$as_me:7810: \"$ac_try\"") >&5
7811   (eval $ac_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:7813: \$? = $ac_status" >&5
7814   (exit $ac_status); }; }; then
7815   cf_cv_struct_dirent64=yes
7816 else
7817   echo "$as_me: failed program was:" >&5
7818 cat conftest.$ac_ext >&5
7819 cf_cv_struct_dirent64=no
7820 fi
7821 rm -f conftest.$ac_objext conftest.$ac_ext
7822
7823 fi
7824 echo "$as_me:7824: result: $cf_cv_struct_dirent64" >&5
7825 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7826         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7827 #define HAVE_STRUCT_DIRENT64 1
7828 EOF
7829
7830     fi
7831
7832 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7833 echo "$as_me:7833: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7834 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7835
7836 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7837 if test "${enable_tparm_varargs+set}" = set; then
7838   enableval="$enable_tparm_varargs"
7839   with_tparm_varargs=$enableval
7840 else
7841   with_tparm_varargs=yes
7842 fi;
7843 echo "$as_me:7843: result: $with_tparm_varargs" >&5
7844 echo "${ECHO_T}$with_tparm_varargs" >&6
7845 NCURSES_TPARM_VARARGS=0
7846 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7847
7848 ###   use option --with-bool to override bool's type
7849 echo "$as_me:7849: checking for type of bool" >&5
7850 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7851
7852 # Check whether --with-bool or --without-bool was given.
7853 if test "${with_bool+set}" = set; then
7854   withval="$with_bool"
7855   NCURSES_BOOL="$withval"
7856 else
7857   NCURSES_BOOL=auto
7858 fi;
7859 echo "$as_me:7859: result: $NCURSES_BOOL" >&5
7860 echo "${ECHO_T}$NCURSES_BOOL" >&6
7861
7862 echo "$as_me:7862: checking for alternate terminal capabilities file" >&5
7863 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7864
7865 # Check whether --with-caps or --without-caps was given.
7866 if test "${with_caps+set}" = set; then
7867   withval="$with_caps"
7868   TERMINFO_CAPS=Caps.$withval
7869 else
7870   TERMINFO_CAPS=Caps
7871 fi;
7872 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7873 echo "$as_me:7873: result: $TERMINFO_CAPS" >&5
7874 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7875
7876 ###   use option --with-chtype to override chtype's type
7877 echo "$as_me:7877: checking for type of chtype" >&5
7878 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7879
7880 # Check whether --with-chtype or --without-chtype was given.
7881 if test "${with_chtype+set}" = set; then
7882   withval="$with_chtype"
7883   NCURSES_CHTYPE="$withval"
7884 else
7885   NCURSES_CHTYPE=auto
7886 fi;
7887 echo "$as_me:7887: result: $NCURSES_CHTYPE" >&5
7888 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7889
7890 ###   use option --with-ospeed to override ospeed's type
7891 echo "$as_me:7891: checking for type of ospeed" >&5
7892 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7893
7894 # Check whether --with-ospeed or --without-ospeed was given.
7895 if test "${with_ospeed+set}" = set; then
7896   withval="$with_ospeed"
7897   NCURSES_OSPEED="$withval"
7898 else
7899   NCURSES_OSPEED=short
7900 fi;
7901 echo "$as_me:7901: result: $NCURSES_OSPEED" >&5
7902 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7903
7904 ###   use option --with-mmask-t to override mmask_t's type
7905 echo "$as_me:7905: checking for type of mmask_t" >&5
7906 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7907
7908 # Check whether --with-mmask-t or --without-mmask-t was given.
7909 if test "${with_mmask_t+set}" = set; then
7910   withval="$with_mmask_t"
7911   NCURSES_MMASK_T="$withval"
7912 else
7913   NCURSES_MMASK_T=auto
7914 fi;
7915 echo "$as_me:7915: result: $NCURSES_MMASK_T" >&5
7916 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7917
7918 ### Enable compiling-in rcs id's
7919 echo "$as_me:7919: checking if RCS identifiers should be compiled-in" >&5
7920 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7921
7922 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7923 if test "${with_rcs_ids+set}" = set; then
7924   withval="$with_rcs_ids"
7925   with_rcs_ids=$withval
7926 else
7927   with_rcs_ids=no
7928 fi;
7929 echo "$as_me:7929: result: $with_rcs_ids" >&5
7930 echo "${ECHO_T}$with_rcs_ids" >&6
7931 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7932 #define USE_RCS_IDS 1
7933 EOF
7934
7935 ###############################################################################
7936
7937 echo "$as_me:7937: checking format of man-pages" >&5
7938 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7939
7940 # Check whether --with-manpage-format or --without-manpage-format was given.
7941 if test "${with_manpage_format+set}" = set; then
7942   withval="$with_manpage_format"
7943   MANPAGE_FORMAT=$withval
7944 else
7945   MANPAGE_FORMAT=unknown
7946 fi;
7947
7948 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7949 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7950
7951 cf_unknown=
7952
7953 case $MANPAGE_FORMAT in
7954 unknown)
7955   if test -z "$MANPATH" ; then
7956     MANPATH="/usr/man:/usr/share/man"
7957   fi
7958
7959   # look for the 'date' man-page (it's most likely to be installed!)
7960   MANPAGE_FORMAT=
7961   cf_preform=no
7962   cf_catonly=yes
7963   cf_example=date
7964
7965   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7966   for cf_dir in $MANPATH; do
7967     test -z "$cf_dir" && cf_dir=/usr/man
7968     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
7969     do
7970       cf_test=`echo $cf_name | sed -e 's/*//'`
7971       if test "x$cf_test" = "x$cf_name" ; then
7972
7973         case "$cf_name" in
7974         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7975         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7976         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7977         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7978         esac
7979
7980         case "$cf_name" in
7981         $cf_dir/man*)
7982           cf_catonly=no
7983           ;;
7984         $cf_dir/cat*)
7985           cf_preform=yes
7986           ;;
7987         esac
7988         break
7989       fi
7990
7991       # if we found a match in either man* or cat*, stop looking
7992       if test -n "$MANPAGE_FORMAT" ; then
7993         cf_found=no
7994         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7995         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7996         case "$cf_name" in
7997         $cf_dir/cat*)
7998           cf_found=yes
7999           ;;
8000         esac
8001         test $cf_found=yes && break
8002       fi
8003     done
8004     # only check the first directory in $MANPATH where we find manpages
8005     if test -n "$MANPAGE_FORMAT" ; then
8006        break
8007     fi
8008   done
8009   # if we did not find the example, just assume it is normal
8010   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8011   IFS="$ac_save_ifs"
8012   ;;
8013 *)
8014   for cf_option in $MANPAGE_FORMAT; do
8015      case $cf_option in #(vi
8016      gzip|compress|BSDI|normal|formatted|catonly)
8017        ;;
8018      *)
8019        cf_unknown="$cf_unknown $cf_option"
8020        ;;
8021      esac
8022   done
8023   ;;
8024 esac
8025
8026 echo "$as_me:8026: result: $MANPAGE_FORMAT" >&5
8027 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8028 if test -n "$cf_unknown" ; then
8029   { echo "$as_me:8029: WARNING: Unexpected manpage-format $cf_unknown" >&5
8030 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8031 fi
8032
8033 echo "$as_me:8033: checking for manpage renaming" >&5
8034 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8035
8036 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8037 if test "${with_manpage_renames+set}" = set; then
8038   withval="$with_manpage_renames"
8039   MANPAGE_RENAMES=$withval
8040 else
8041   MANPAGE_RENAMES=yes
8042 fi;
8043
8044 case ".$MANPAGE_RENAMES" in #(vi
8045 .no) #(vi
8046   ;;
8047 .|.yes)
8048   # Debian 'man' program?
8049   if test -f /etc/debian_version ; then
8050     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8051   else
8052     MANPAGE_RENAMES=no
8053   fi
8054   ;;
8055 esac
8056
8057 if test "$MANPAGE_RENAMES" != no ; then
8058   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8059     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8060   elif test ! -f $MANPAGE_RENAMES ; then
8061     { { echo "$as_me:8061: error: not a filename: $MANPAGE_RENAMES" >&5
8062 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8063    { (exit 1); exit 1; }; }
8064   fi
8065
8066   test ! -d man && mkdir man
8067
8068   # Construct a sed-script to perform renaming within man-pages
8069   if test -n "$MANPAGE_RENAMES" ; then
8070     test ! -d man && mkdir man
8071     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8072   fi
8073 fi
8074
8075 echo "$as_me:8075: result: $MANPAGE_RENAMES" >&5
8076 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8077
8078 echo "$as_me:8078: checking if manpage aliases will be installed" >&5
8079 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8080
8081 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8082 if test "${with_manpage_aliases+set}" = set; then
8083   withval="$with_manpage_aliases"
8084   MANPAGE_ALIASES=$withval
8085 else
8086   MANPAGE_ALIASES=yes
8087 fi;
8088
8089 echo "$as_me:8089: result: $MANPAGE_ALIASES" >&5
8090 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8091
8092 if test "$LN_S" = "ln -s"; then
8093         cf_use_symlinks=yes
8094 else
8095         cf_use_symlinks=no
8096 fi
8097
8098 MANPAGE_SYMLINKS=no
8099 if test "$MANPAGE_ALIASES" = yes ; then
8100 echo "$as_me:8100: checking if manpage symlinks should be used" >&5
8101 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8102
8103 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8104 if test "${with_manpage_symlinks+set}" = set; then
8105   withval="$with_manpage_symlinks"
8106   MANPAGE_SYMLINKS=$withval
8107 else
8108   MANPAGE_SYMLINKS=$cf_use_symlinks
8109 fi;
8110
8111 if test "$$cf_use_symlinks" = no; then
8112 if test "$MANPAGE_SYMLINKS" = yes ; then
8113         { echo "$as_me:8113: WARNING: cannot make symlinks" >&5
8114 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8115         MANPAGE_SYMLINKS=no
8116 fi
8117 fi
8118
8119 echo "$as_me:8119: result: $MANPAGE_SYMLINKS" >&5
8120 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8121 fi
8122
8123 echo "$as_me:8123: checking for manpage tbl" >&5
8124 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8125
8126 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8127 if test "${with_manpage_tbl+set}" = set; then
8128   withval="$with_manpage_tbl"
8129   MANPAGE_TBL=$withval
8130 else
8131   MANPAGE_TBL=no
8132 fi;
8133
8134 echo "$as_me:8134: result: $MANPAGE_TBL" >&5
8135 echo "${ECHO_T}$MANPAGE_TBL" >&6
8136
8137   if test "$prefix" = "NONE" ; then
8138      cf_prefix="$ac_default_prefix"
8139   else
8140      cf_prefix="$prefix"
8141   fi
8142
8143   case "$MANPAGE_FORMAT" in # (vi
8144   *catonly*) # (vi
8145     cf_format=yes
8146     cf_inboth=no
8147     ;;
8148   *formatted*) # (vi
8149     cf_format=yes
8150     cf_inboth=yes
8151     ;;
8152   *)
8153     cf_format=no
8154     cf_inboth=no
8155     ;;
8156   esac
8157
8158 test ! -d man && mkdir man
8159
8160 cf_so_strip=
8161 cf_compress=
8162 case "$MANPAGE_FORMAT" in #(vi
8163 *compress*) #(vi
8164         cf_so_strip="Z"
8165         cf_compress=compress
8166   ;;
8167 *gzip*) #(vi
8168         cf_so_strip="gz"
8169         cf_compress=gzip
8170   ;;
8171 esac
8172
8173 cf_edit_man=./edit_man.sh
8174 cf_man_alias=`pwd`/man_alias.sed
8175
8176 cat >$cf_edit_man <<CF_EOF
8177 #! /bin/sh
8178 # this script is generated by the configure-script CF_MAN_PAGES macro.
8179
8180 prefix="$cf_prefix"
8181 datadir="$datadir"
8182
8183 NCURSES_MAJOR="$NCURSES_MAJOR"
8184 NCURSES_MINOR="$NCURSES_MINOR"
8185 NCURSES_PATCH="$NCURSES_PATCH"
8186
8187 NCURSES_OSPEED="$NCURSES_OSPEED"
8188 TERMINFO="$TERMINFO"
8189
8190 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8191
8192 INSTALL="$INSTALL"
8193 INSTALL_DATA="$INSTALL_DATA"
8194
8195 transform="$program_transform_name"
8196
8197 TMP=\${TMPDIR-/tmp}/man\$\$
8198 trap "rm -f \$TMP" 0 1 2 5 15
8199
8200 form=\$1
8201 shift || exit 1
8202
8203 verb=\$1
8204 shift || exit 1
8205
8206 mandir=\$1
8207 shift || exit 1
8208
8209 srcdir=\$1
8210 top_srcdir=\$srcdir/..
8211 shift || exit 1
8212
8213 if test "\$form" = normal ; then
8214         if test "$cf_format" = yes ; then
8215         if test "$cf_inboth" = no ; then
8216                 sh \$0 format \$verb \$mandir \$srcdir \$*
8217                 exit $?
8218         fi
8219         fi
8220         cf_subdir=\$mandir/man
8221         cf_tables=$MANPAGE_TBL
8222 else
8223         cf_subdir=\$mandir/cat
8224         cf_tables=yes
8225 fi
8226
8227 # process the list of source-files
8228 for i in \$* ; do
8229 case \$i in #(vi
8230 *.orig|*.rej) ;; #(vi
8231 *.[0-9]*)
8232         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8233         if test \$verb = installing ; then
8234         if test ! -d \$cf_subdir\${section} ; then
8235                 \$MKDIRS \$cf_subdir\$section
8236         fi
8237         fi
8238
8239         # replace variables in man page
8240         if test ! -f $cf_man_alias ; then
8241 cat >>$cf_man_alias <<-CF_EOF2
8242                 s,@DATADIR@,\$datadir,g
8243                 s,@TERMINFO@,\$TERMINFO,g
8244                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8245                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8246                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8247                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8248 CF_EOF
8249
8250         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8251         do
8252                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8253                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8254 cat >>$cf_edit_man <<-CF_EOF
8255                 s,@$cf_NAME@,$cf_name,
8256 CF_EOF
8257         done
8258
8259 cat >>$cf_edit_man <<CF_EOF
8260 CF_EOF2
8261                 echo "...made $cf_man_alias"
8262         fi
8263
8264         aliases=
8265         cf_source=\`basename \$i\`
8266         inalias=\$cf_source
8267         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8268         if test ! -f \$inalias ; then
8269                 echo .. skipped \$cf_source
8270                 continue
8271         fi
8272 CF_EOF
8273
8274 if test "$MANPAGE_ALIASES" != no ; then
8275 cat >>$cf_edit_man <<CF_EOF
8276         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8277 CF_EOF
8278 fi
8279
8280 if test "$MANPAGE_RENAMES" = no ; then
8281 cat >>$cf_edit_man <<CF_EOF
8282         # perform program transformations for section 1 man pages
8283         if test \$section = 1 ; then
8284                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8285         else
8286                 cf_target=\$cf_subdir\${section}/\$cf_source
8287         fi
8288 CF_EOF
8289 else
8290 cat >>$cf_edit_man <<CF_EOF
8291         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8292         if test -z "\$cf_target" ; then
8293                 echo '? missing rename for '\$cf_source
8294                 cf_target="\$cf_source"
8295         fi
8296         cf_target="\$cf_subdir\${section}/\${cf_target}"
8297
8298 CF_EOF
8299 fi
8300
8301 cat >>$cf_edit_man <<CF_EOF
8302         sed     -f $cf_man_alias \\
8303 CF_EOF
8304
8305 if test -f $MANPAGE_RENAMES ; then
8306 cat >>$cf_edit_man <<CF_EOF
8307                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8308 CF_EOF
8309 else
8310 cat >>$cf_edit_man <<CF_EOF
8311                 < \$i >\$TMP
8312 CF_EOF
8313 fi
8314
8315 cat >>$cf_edit_man <<CF_EOF
8316 if test \$cf_tables = yes ; then
8317         tbl \$TMP >\$TMP.out
8318         mv \$TMP.out \$TMP
8319 fi
8320 CF_EOF
8321
8322 if test $with_curses_h != yes ; then
8323 cat >>$cf_edit_man <<CF_EOF
8324         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8325         mv \$TMP.out \$TMP
8326 CF_EOF
8327 fi
8328
8329 cat >>$cf_edit_man <<CF_EOF
8330         if test \$form = format ; then
8331                 nroff -man \$TMP >\$TMP.out
8332                 mv \$TMP.out \$TMP
8333         fi
8334 CF_EOF
8335
8336 if test -n "$cf_compress" ; then
8337 cat >>$cf_edit_man <<CF_EOF
8338         if test \$verb = installing ; then
8339         if ( $cf_compress -f \$TMP )
8340         then
8341                 mv \$TMP.$cf_so_strip \$TMP
8342         fi
8343         fi
8344         cf_target="\$cf_target.$cf_so_strip"
8345 CF_EOF
8346 fi
8347
8348 case "$MANPAGE_FORMAT" in #(vi
8349 *BSDI*)
8350 cat >>$cf_edit_man <<CF_EOF
8351         if test \$form = format ; then
8352                 # BSDI installs only .0 suffixes in the cat directories
8353                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8354         fi
8355 CF_EOF
8356   ;;
8357 esac
8358
8359 cat >>$cf_edit_man <<CF_EOF
8360         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8361         if test \$verb = installing ; then
8362                 echo \$verb \$cf_target
8363                 \$INSTALL_DATA \$TMP \$cf_target
8364                 test -d \$cf_subdir\${section} &&
8365                 test -n "\$aliases" && (
8366                         cd \$cf_subdir\${section} && (
8367                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8368                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8369                                 cf_target=\`basename \$cf_target\`
8370                                 for cf_alias in \$aliases
8371                                 do
8372                                         if test \$section = 1 ; then
8373                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8374                                         fi
8375
8376                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8377                                                 if test -f \$cf_alias\${suffix} ; then
8378                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8379                                                         then
8380                                                                 continue
8381                                                         fi
8382                                                 fi
8383                                                 echo .. \$verb alias \$cf_alias\${suffix}
8384                                                 rm -f \$cf_alias\${suffix}
8385                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8386                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8387                                                 echo ".so \$cf_source" >\$TMP
8388 CF_EOF
8389 if test -n "$cf_compress" ; then
8390 cat >>$cf_edit_man <<CF_EOF
8391                                                 if test -n "$cf_so_strip" ; then
8392                                                         $cf_compress -f \$TMP
8393                                                         mv \$TMP.$cf_so_strip \$TMP
8394                                                 fi
8395 CF_EOF
8396 fi
8397 cat >>$cf_edit_man <<CF_EOF
8398                                                 echo .. \$verb alias \$cf_alias\${suffix}
8399                                                 rm -f \$cf_alias\${suffix}
8400                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8401                                         fi
8402                                 done
8403                         )
8404                 )
8405         elif test \$verb = removing ; then
8406                 test -f \$cf_target && (
8407                         echo \$verb \$cf_target
8408                         rm -f \$cf_target
8409                 )
8410                 test -d \$cf_subdir\${section} &&
8411                 test -n "\$aliases" && (
8412                         cd \$cf_subdir\${section} && (
8413                                 for cf_alias in \$aliases
8414                                 do
8415                                         if test \$section = 1 ; then
8416                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8417                                         fi
8418
8419                                         echo .. \$verb alias \$cf_alias\${suffix}
8420                                         rm -f \$cf_alias\${suffix}
8421                                 done
8422                         )
8423                 )
8424         else
8425 #               echo ".hy 0"
8426                 cat \$TMP
8427         fi
8428         ;;
8429 esac
8430 done
8431
8432 if test $cf_inboth = yes ; then
8433 if test \$form != format ; then
8434         sh \$0 format \$verb \$mandir \$srcdir \$*
8435 fi
8436 fi
8437
8438 exit 0
8439 CF_EOF
8440 chmod 755 $cf_edit_man
8441
8442 ###############################################################################
8443
8444 ### Note that some functions (such as const) are normally disabled anyway.
8445 echo "$as_me:8445: checking if you want to build with function extensions" >&5
8446 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8447
8448 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8449 if test "${enable_ext_funcs+set}" = set; then
8450   enableval="$enable_ext_funcs"
8451   with_ext_funcs=$enableval
8452 else
8453   with_ext_funcs=yes
8454 fi;
8455 echo "$as_me:8455: result: $with_ext_funcs" >&5
8456 echo "${ECHO_T}$with_ext_funcs" >&6
8457 if test "$with_ext_funcs" = yes ; then
8458         NCURSES_EXT_FUNCS=1
8459         cat >>confdefs.h <<\EOF
8460 #define HAVE_CURSES_VERSION 1
8461 EOF
8462
8463         cat >>confdefs.h <<\EOF
8464 #define HAVE_HAS_KEY 1
8465 EOF
8466
8467         cat >>confdefs.h <<\EOF
8468 #define HAVE_RESIZETERM 1
8469 EOF
8470
8471         cat >>confdefs.h <<\EOF
8472 #define HAVE_RESIZE_TERM 1
8473 EOF
8474
8475         cat >>confdefs.h <<\EOF
8476 #define HAVE_USE_DEFAULT_COLORS 1
8477 EOF
8478
8479         cat >>confdefs.h <<\EOF
8480 #define HAVE_WRESIZE 1
8481 EOF
8482
8483         cat >>confdefs.h <<\EOF
8484 #define NCURSES_EXT_FUNCS 1
8485 EOF
8486
8487 else
8488         NCURSES_EXT_FUNCS=0
8489 fi
8490
8491 ###   use option --enable-const to turn on use of const beyond that in XSI.
8492 echo "$as_me:8492: checking for extended use of const keyword" >&5
8493 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8494
8495 # Check whether --enable-const or --disable-const was given.
8496 if test "${enable_const+set}" = set; then
8497   enableval="$enable_const"
8498   with_ext_const=$enableval
8499 else
8500   with_ext_const=no
8501 fi;
8502 echo "$as_me:8502: result: $with_ext_const" >&5
8503 echo "${ECHO_T}$with_ext_const" >&6
8504 NCURSES_CONST='/*nothing*/'
8505 if test "$with_ext_const" = yes ; then
8506         NCURSES_CONST=const
8507 fi
8508
8509 echo "$as_me:8509: checking if you want \$NCURSES_NO_PADDING code" >&5
8510 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8511
8512 # Check whether --enable-no-padding or --disable-no-padding was given.
8513 if test "${enable_no_padding+set}" = set; then
8514   enableval="$enable_no_padding"
8515   with_no_padding=$enableval
8516 else
8517   with_no_padding=$with_ext_funcs
8518 fi;
8519 echo "$as_me:8519: result: $with_no_padding" >&5
8520 echo "${ECHO_T}$with_no_padding" >&6
8521 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8522 #define NCURSES_NO_PADDING 1
8523 EOF
8524
8525 echo "$as_me:8525: checking for ANSI C header files" >&5
8526 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8527 if test "${ac_cv_header_stdc+set}" = set; then
8528   echo $ECHO_N "(cached) $ECHO_C" >&6
8529 else
8530   cat >conftest.$ac_ext <<_ACEOF
8531 #line 8531 "configure"
8532 #include "confdefs.h"
8533 #include <stdlib.h>
8534 #include <stdarg.h>
8535 #include <string.h>
8536 #include <float.h>
8537
8538 _ACEOF
8539 if { (eval echo "$as_me:8539: \"$ac_cpp conftest.$ac_ext\"") >&5
8540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8541   ac_status=$?
8542   egrep -v '^ *\+' conftest.er1 >conftest.err
8543   rm -f conftest.er1
8544   cat conftest.err >&5
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit $ac_status); } >/dev/null; then
8547   if test -s conftest.err; then
8548     ac_cpp_err=$ac_c_preproc_warn_flag
8549   else
8550     ac_cpp_err=
8551   fi
8552 else
8553   ac_cpp_err=yes
8554 fi
8555 if test -z "$ac_cpp_err"; then
8556   ac_cv_header_stdc=yes
8557 else
8558   echo "$as_me: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   ac_cv_header_stdc=no
8561 fi
8562 rm -f conftest.err conftest.$ac_ext
8563
8564 if test $ac_cv_header_stdc = yes; then
8565   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8566   cat >conftest.$ac_ext <<_ACEOF
8567 #line 8567 "configure"
8568 #include "confdefs.h"
8569 #include <string.h>
8570
8571 _ACEOF
8572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8573   egrep "memchr" >/dev/null 2>&1; then
8574   :
8575 else
8576   ac_cv_header_stdc=no
8577 fi
8578 rm -f conftest*
8579
8580 fi
8581
8582 if test $ac_cv_header_stdc = yes; then
8583   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8584   cat >conftest.$ac_ext <<_ACEOF
8585 #line 8585 "configure"
8586 #include "confdefs.h"
8587 #include <stdlib.h>
8588
8589 _ACEOF
8590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8591   egrep "free" >/dev/null 2>&1; then
8592   :
8593 else
8594   ac_cv_header_stdc=no
8595 fi
8596 rm -f conftest*
8597
8598 fi
8599
8600 if test $ac_cv_header_stdc = yes; then
8601   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8602   if test "$cross_compiling" = yes; then
8603   :
8604 else
8605   cat >conftest.$ac_ext <<_ACEOF
8606 #line 8606 "configure"
8607 #include "confdefs.h"
8608 #include <ctype.h>
8609 #if ((' ' & 0x0FF) == 0x020)
8610 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8611 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8612 #else
8613 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8614                      || ('j' <= (c) && (c) <= 'r') \
8615                      || ('s' <= (c) && (c) <= 'z'))
8616 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8617 #endif
8618
8619 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8620 int
8621 main ()
8622 {
8623   int i;
8624   for (i = 0; i < 256; i++)
8625     if (XOR (islower (i), ISLOWER (i))
8626         || toupper (i) != TOUPPER (i))
8627       $ac_main_return(2);
8628   $ac_main_return (0);
8629 }
8630 _ACEOF
8631 rm -f conftest$ac_exeext
8632 if { (eval echo "$as_me:8632: \"$ac_link\"") >&5
8633   (eval $ac_link) 2>&5
8634   ac_status=$?
8635   echo "$as_me:8635: \$? = $ac_status" >&5
8636   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8637   { (eval echo "$as_me:8637: \"$ac_try\"") >&5
8638   (eval $ac_try) 2>&5
8639   ac_status=$?
8640   echo "$as_me:8640: \$? = $ac_status" >&5
8641   (exit $ac_status); }; }; then
8642   :
8643 else
8644   echo "$as_me: program exited with status $ac_status" >&5
8645 echo "$as_me: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 ac_cv_header_stdc=no
8648 fi
8649 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8650 fi
8651 fi
8652 fi
8653 echo "$as_me:8653: result: $ac_cv_header_stdc" >&5
8654 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8655 if test $ac_cv_header_stdc = yes; then
8656
8657 cat >>confdefs.h <<\EOF
8658 #define STDC_HEADERS 1
8659 EOF
8660
8661 fi
8662
8663 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8664
8665 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8666                   inttypes.h stdint.h unistd.h
8667 do
8668 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8669 echo "$as_me:8669: checking for $ac_header" >&5
8670 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8671 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8672   echo $ECHO_N "(cached) $ECHO_C" >&6
8673 else
8674   cat >conftest.$ac_ext <<_ACEOF
8675 #line 8675 "configure"
8676 #include "confdefs.h"
8677 $ac_includes_default
8678 #include <$ac_header>
8679 _ACEOF
8680 rm -f conftest.$ac_objext
8681 if { (eval echo "$as_me:8681: \"$ac_compile\"") >&5
8682   (eval $ac_compile) 2>&5
8683   ac_status=$?
8684   echo "$as_me:8684: \$? = $ac_status" >&5
8685   (exit $ac_status); } &&
8686          { ac_try='test -s conftest.$ac_objext'
8687   { (eval echo "$as_me:8687: \"$ac_try\"") >&5
8688   (eval $ac_try) 2>&5
8689   ac_status=$?
8690   echo "$as_me:8690: \$? = $ac_status" >&5
8691   (exit $ac_status); }; }; then
8692   eval "$as_ac_Header=yes"
8693 else
8694   echo "$as_me: failed program was:" >&5
8695 cat conftest.$ac_ext >&5
8696 eval "$as_ac_Header=no"
8697 fi
8698 rm -f conftest.$ac_objext conftest.$ac_ext
8699 fi
8700 echo "$as_me:8700: result: `eval echo '${'$as_ac_Header'}'`" >&5
8701 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8702 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8703   cat >>confdefs.h <<EOF
8704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8705 EOF
8706
8707 fi
8708 done
8709
8710 echo "$as_me:8710: checking for signed char" >&5
8711 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8712 if test "${ac_cv_type_signed_char+set}" = set; then
8713   echo $ECHO_N "(cached) $ECHO_C" >&6
8714 else
8715   cat >conftest.$ac_ext <<_ACEOF
8716 #line 8716 "configure"
8717 #include "confdefs.h"
8718 $ac_includes_default
8719 int
8720 main ()
8721 {
8722 if ((signed char *) 0)
8723   return 0;
8724 if (sizeof (signed char))
8725   return 0;
8726   ;
8727   return 0;
8728 }
8729 _ACEOF
8730 rm -f conftest.$ac_objext
8731 if { (eval echo "$as_me:8731: \"$ac_compile\"") >&5
8732   (eval $ac_compile) 2>&5
8733   ac_status=$?
8734   echo "$as_me:8734: \$? = $ac_status" >&5
8735   (exit $ac_status); } &&
8736          { ac_try='test -s conftest.$ac_objext'
8737   { (eval echo "$as_me:8737: \"$ac_try\"") >&5
8738   (eval $ac_try) 2>&5
8739   ac_status=$?
8740   echo "$as_me:8740: \$? = $ac_status" >&5
8741   (exit $ac_status); }; }; then
8742   ac_cv_type_signed_char=yes
8743 else
8744   echo "$as_me: failed program was:" >&5
8745 cat conftest.$ac_ext >&5
8746 ac_cv_type_signed_char=no
8747 fi
8748 rm -f conftest.$ac_objext conftest.$ac_ext
8749 fi
8750 echo "$as_me:8750: result: $ac_cv_type_signed_char" >&5
8751 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8752
8753 echo "$as_me:8753: checking size of signed char" >&5
8754 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8755 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8756   echo $ECHO_N "(cached) $ECHO_C" >&6
8757 else
8758   if test "$ac_cv_type_signed_char" = yes; then
8759   if test "$cross_compiling" = yes; then
8760   # Depending upon the size, compute the lo and hi bounds.
8761 cat >conftest.$ac_ext <<_ACEOF
8762 #line 8762 "configure"
8763 #include "confdefs.h"
8764 $ac_includes_default
8765 int
8766 main ()
8767 {
8768 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8769   ;
8770   return 0;
8771 }
8772 _ACEOF
8773 rm -f conftest.$ac_objext
8774 if { (eval echo "$as_me:8774: \"$ac_compile\"") >&5
8775   (eval $ac_compile) 2>&5
8776   ac_status=$?
8777   echo "$as_me:8777: \$? = $ac_status" >&5
8778   (exit $ac_status); } &&
8779          { ac_try='test -s conftest.$ac_objext'
8780   { (eval echo "$as_me:8780: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:8783: \$? = $ac_status" >&5
8784   (exit $ac_status); }; }; then
8785   ac_lo=0 ac_mid=0
8786   while :; do
8787     cat >conftest.$ac_ext <<_ACEOF
8788 #line 8788 "configure"
8789 #include "confdefs.h"
8790 $ac_includes_default
8791 int
8792 main ()
8793 {
8794 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8795   ;
8796   return 0;
8797 }
8798 _ACEOF
8799 rm -f conftest.$ac_objext
8800 if { (eval echo "$as_me:8800: \"$ac_compile\"") >&5
8801   (eval $ac_compile) 2>&5
8802   ac_status=$?
8803   echo "$as_me:8803: \$? = $ac_status" >&5
8804   (exit $ac_status); } &&
8805          { ac_try='test -s conftest.$ac_objext'
8806   { (eval echo "$as_me:8806: \"$ac_try\"") >&5
8807   (eval $ac_try) 2>&5
8808   ac_status=$?
8809   echo "$as_me:8809: \$? = $ac_status" >&5
8810   (exit $ac_status); }; }; then
8811   ac_hi=$ac_mid; break
8812 else
8813   echo "$as_me: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8815 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8816 fi
8817 rm -f conftest.$ac_objext conftest.$ac_ext
8818   done
8819 else
8820   echo "$as_me: failed program was:" >&5
8821 cat conftest.$ac_ext >&5
8822 ac_hi=-1 ac_mid=-1
8823   while :; do
8824     cat >conftest.$ac_ext <<_ACEOF
8825 #line 8825 "configure"
8826 #include "confdefs.h"
8827 $ac_includes_default
8828 int
8829 main ()
8830 {
8831 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8832   ;
8833   return 0;
8834 }
8835 _ACEOF
8836 rm -f conftest.$ac_objext
8837 if { (eval echo "$as_me:8837: \"$ac_compile\"") >&5
8838   (eval $ac_compile) 2>&5
8839   ac_status=$?
8840   echo "$as_me:8840: \$? = $ac_status" >&5
8841   (exit $ac_status); } &&
8842          { ac_try='test -s conftest.$ac_objext'
8843   { (eval echo "$as_me:8843: \"$ac_try\"") >&5
8844   (eval $ac_try) 2>&5
8845   ac_status=$?
8846   echo "$as_me:8846: \$? = $ac_status" >&5
8847   (exit $ac_status); }; }; then
8848   ac_lo=$ac_mid; break
8849 else
8850   echo "$as_me: failed program was:" >&5
8851 cat conftest.$ac_ext >&5
8852 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8853 fi
8854 rm -f conftest.$ac_objext conftest.$ac_ext
8855   done
8856 fi
8857 rm -f conftest.$ac_objext conftest.$ac_ext
8858 # Binary search between lo and hi bounds.
8859 while test "x$ac_lo" != "x$ac_hi"; do
8860   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8861   cat >conftest.$ac_ext <<_ACEOF
8862 #line 8862 "configure"
8863 #include "confdefs.h"
8864 $ac_includes_default
8865 int
8866 main ()
8867 {
8868 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8869   ;
8870   return 0;
8871 }
8872 _ACEOF
8873 rm -f conftest.$ac_objext
8874 if { (eval echo "$as_me:8874: \"$ac_compile\"") >&5
8875   (eval $ac_compile) 2>&5
8876   ac_status=$?
8877   echo "$as_me:8877: \$? = $ac_status" >&5
8878   (exit $ac_status); } &&
8879          { ac_try='test -s conftest.$ac_objext'
8880   { (eval echo "$as_me:8880: \"$ac_try\"") >&5
8881   (eval $ac_try) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); }; }; then
8885   ac_hi=$ac_mid
8886 else
8887   echo "$as_me: failed program was:" >&5
8888 cat conftest.$ac_ext >&5
8889 ac_lo=`expr $ac_mid + 1`
8890 fi
8891 rm -f conftest.$ac_objext conftest.$ac_ext
8892 done
8893 ac_cv_sizeof_signed_char=$ac_lo
8894 else
8895   if test "$cross_compiling" = yes; then
8896   { { echo "$as_me:8896: error: cannot run test program while cross compiling" >&5
8897 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8898    { (exit 1); exit 1; }; }
8899 else
8900   cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903 $ac_includes_default
8904 int
8905 main ()
8906 {
8907 FILE *f = fopen ("conftest.val", "w");
8908 if (!f)
8909   $ac_main_return (1);
8910 fprintf (f, "%d", (sizeof (signed char)));
8911 fclose (f);
8912   ;
8913   return 0;
8914 }
8915 _ACEOF
8916 rm -f conftest$ac_exeext
8917 if { (eval echo "$as_me:8917: \"$ac_link\"") >&5
8918   (eval $ac_link) 2>&5
8919   ac_status=$?
8920   echo "$as_me:8920: \$? = $ac_status" >&5
8921   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8922   { (eval echo "$as_me:8922: \"$ac_try\"") >&5
8923   (eval $ac_try) 2>&5
8924   ac_status=$?
8925   echo "$as_me:8925: \$? = $ac_status" >&5
8926   (exit $ac_status); }; }; then
8927   ac_cv_sizeof_signed_char=`cat conftest.val`
8928 else
8929   echo "$as_me: program exited with status $ac_status" >&5
8930 echo "$as_me: failed program was:" >&5
8931 cat conftest.$ac_ext >&5
8932 fi
8933 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8934 fi
8935 fi
8936 rm -f conftest.val
8937 else
8938   ac_cv_sizeof_signed_char=0
8939 fi
8940 fi
8941 echo "$as_me:8941: result: $ac_cv_sizeof_signed_char" >&5
8942 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8943 cat >>confdefs.h <<EOF
8944 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8945 EOF
8946
8947 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8948         NCURSES_SBOOL="signed char"
8949 else
8950         NCURSES_SBOOL="char"
8951 fi
8952 echo "$as_me:8952: checking if you want to use signed Boolean array in term.h" >&5
8953 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8954
8955 # Check whether --enable-signed-char or --disable-signed-char was given.
8956 if test "${enable_signed_char+set}" = set; then
8957   enableval="$enable_signed_char"
8958   with_signed_char=$enableval
8959 else
8960   with_signed_char=no
8961 fi;
8962 echo "$as_me:8962: result: $with_signed_char" >&5
8963 echo "${ECHO_T}$with_signed_char" >&6
8964 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8965
8966 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8967 echo "$as_me:8967: checking if you want SIGWINCH handler" >&5
8968 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8969
8970 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8971 if test "${enable_sigwinch+set}" = set; then
8972   enableval="$enable_sigwinch"
8973   with_sigwinch=$enableval
8974 else
8975   with_sigwinch=$with_ext_funcs
8976 fi;
8977 echo "$as_me:8977: result: $with_sigwinch" >&5
8978 echo "${ECHO_T}$with_sigwinch" >&6
8979 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8980 #define USE_SIGWINCH 1
8981 EOF
8982
8983 ###   use option --enable-tcap-names to allow user to define new capabilities
8984 echo "$as_me:8984: checking if you want user-definable terminal capabilities like termcap" >&5
8985 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8986
8987 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8988 if test "${enable_tcap_names+set}" = set; then
8989   enableval="$enable_tcap_names"
8990   with_tcap_names=$enableval
8991 else
8992   with_tcap_names=$with_ext_funcs
8993 fi;
8994 echo "$as_me:8994: result: $with_tcap_names" >&5
8995 echo "${ECHO_T}$with_tcap_names" >&6
8996 NCURSES_XNAMES=0
8997 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8998
8999 ###############################################################################
9000 # These options are relatively safe to experiment with.
9001
9002 echo "$as_me:9002: checking if you want all development code" >&5
9003 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9004
9005 # Check whether --with-develop or --without-develop was given.
9006 if test "${with_develop+set}" = set; then
9007   withval="$with_develop"
9008   with_develop=$withval
9009 else
9010   with_develop=no
9011 fi;
9012 echo "$as_me:9012: result: $with_develop" >&5
9013 echo "${ECHO_T}$with_develop" >&6
9014
9015 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9016 echo "$as_me:9016: checking if you want hard-tabs code" >&5
9017 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9018
9019 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9020 if test "${enable_hard_tabs+set}" = set; then
9021   enableval="$enable_hard_tabs"
9022
9023 else
9024   enable_hard_tabs=$with_develop
9025 fi;
9026 echo "$as_me:9026: result: $enable_hard_tabs" >&5
9027 echo "${ECHO_T}$enable_hard_tabs" >&6
9028 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9029 #define USE_HARD_TABS 1
9030 EOF
9031
9032 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9033 echo "$as_me:9033: checking if you want limited support for xmc" >&5
9034 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9035
9036 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9037 if test "${enable_xmc_glitch+set}" = set; then
9038   enableval="$enable_xmc_glitch"
9039
9040 else
9041   enable_xmc_glitch=$with_develop
9042 fi;
9043 echo "$as_me:9043: result: $enable_xmc_glitch" >&5
9044 echo "${ECHO_T}$enable_xmc_glitch" >&6
9045 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9046 #define USE_XMC_SUPPORT 1
9047 EOF
9048
9049 ###############################################################################
9050 # These are just experimental, probably should not be in a package:
9051
9052 echo "$as_me:9052: checking if you do not want to assume colors are white-on-black" >&5
9053 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9054
9055 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9056 if test "${enable_assumed_color+set}" = set; then
9057   enableval="$enable_assumed_color"
9058   with_assumed_color=$enableval
9059 else
9060   with_assumed_color=yes
9061 fi;
9062 echo "$as_me:9062: result: $with_assumed_color" >&5
9063 echo "${ECHO_T}$with_assumed_color" >&6
9064 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9065 #define USE_ASSUMED_COLOR 1
9066 EOF
9067
9068 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9069 echo "$as_me:9069: checking if you want hashmap scrolling-optimization code" >&5
9070 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9071
9072 # Check whether --enable-hashmap or --disable-hashmap was given.
9073 if test "${enable_hashmap+set}" = set; then
9074   enableval="$enable_hashmap"
9075   with_hashmap=$enableval
9076 else
9077   with_hashmap=yes
9078 fi;
9079 echo "$as_me:9079: result: $with_hashmap" >&5
9080 echo "${ECHO_T}$with_hashmap" >&6
9081 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9082 #define USE_HASHMAP 1
9083 EOF
9084
9085 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9086 echo "$as_me:9086: checking if you want colorfgbg code" >&5
9087 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9088
9089 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9090 if test "${enable_colorfgbg+set}" = set; then
9091   enableval="$enable_colorfgbg"
9092   with_colorfgbg=$enableval
9093 else
9094   with_colorfgbg=no
9095 fi;
9096 echo "$as_me:9096: result: $with_colorfgbg" >&5
9097 echo "${ECHO_T}$with_colorfgbg" >&6
9098 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9099 #define USE_COLORFGBG 1
9100 EOF
9101
9102 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9103 echo "$as_me:9103: checking if you want to use experimental extended colors" >&5
9104 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9105
9106 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9107 if test "${enable_ext_colors+set}" = set; then
9108   enableval="$enable_ext_colors"
9109   with_ext_colors=$enableval
9110 else
9111   with_ext_colors=no
9112 fi;
9113 echo "$as_me:9113: result: $with_ext_colors" >&5
9114 echo "${ECHO_T}$with_ext_colors" >&6
9115 NCURSES_EXT_COLORS=0
9116 if test "$with_ext_colors" = yes ; then
9117         if test "$with_widec" != yes ; then
9118                 { { echo "$as_me:9118: error: This option applies only to wide-character library" >&5
9119 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9120    { (exit 1); exit 1; }; }
9121         else
9122                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9123
9124 if test "${with_abi_version+set}" != set; then
9125         case $cf_cv_rel_version in
9126         5.*)
9127                 cf_cv_rel_version=6.0
9128                 cf_cv_abi_version=6
9129                 { echo "$as_me:9129: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9130 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9131                 ;;
9132         esac
9133 fi
9134
9135         fi
9136         NCURSES_EXT_COLORS=1
9137         cat >>confdefs.h <<\EOF
9138 #define NCURSES_EXT_COLORS 1
9139 EOF
9140
9141 fi
9142
9143 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9144 echo "$as_me:9144: checking if you want to use experimental extended mouse encoding" >&5
9145 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9146
9147 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9148 if test "${enable_ext_mouse+set}" = set; then
9149   enableval="$enable_ext_mouse"
9150   with_ext_mouse=$enableval
9151 else
9152   with_ext_mouse=no
9153 fi;
9154 echo "$as_me:9154: result: $with_ext_mouse" >&5
9155 echo "${ECHO_T}$with_ext_mouse" >&6
9156 NCURSES_MOUSE_VERSION=1
9157 if test "$with_ext_mouse" = yes ; then
9158         NCURSES_MOUSE_VERSION=2
9159
9160 if test "${with_abi_version+set}" != set; then
9161         case $cf_cv_rel_version in
9162         5.*)
9163                 cf_cv_rel_version=6.0
9164                 cf_cv_abi_version=6
9165                 { echo "$as_me:9165: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9166 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9167                 ;;
9168         esac
9169 fi
9170
9171 fi
9172
9173 # Reentrant code has to be opaque; there's little advantage to making ncurses
9174 # opaque outside of that, so there is no --enable-opaque option.
9175 echo "$as_me:9175: checking if you want experimental reentrant code" >&5
9176 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9177
9178 # Check whether --enable-reentrant or --disable-reentrant was given.
9179 if test "${enable_reentrant+set}" = set; then
9180   enableval="$enable_reentrant"
9181   with_reentrant=$enableval
9182 else
9183   with_reentrant=no
9184 fi;
9185 echo "$as_me:9185: result: $with_reentrant" >&5
9186 echo "${ECHO_T}$with_reentrant" >&6
9187 if test "$with_reentrant" = yes ; then
9188         cf_cv_enable_reentrant=1
9189         cf_cv_enable_opaque="NCURSES_INTERNALS"
9190         NCURSES_OPAQUE=1
9191         NCURSES_SIZE_T=int
9192         LIB_SUFFIX="t${LIB_SUFFIX}"
9193         cat >>confdefs.h <<\EOF
9194 #define USE_REENTRANT 1
9195 EOF
9196
9197 if test "${with_abi_version+set}" != set; then
9198         case $cf_cv_rel_version in
9199         5.*)
9200                 cf_cv_rel_version=6.0
9201                 cf_cv_abi_version=6
9202                 { echo "$as_me:9202: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9203 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9204                 ;;
9205         esac
9206 fi
9207
9208 else
9209         cf_cv_enable_reentrant=0
9210         cf_cv_enable_opaque="NCURSES_OPAQUE"
9211         NCURSES_OPAQUE=0
9212         NCURSES_SIZE_T=short
9213 fi
9214
9215 echo "$as_me:9215: checking if you want experimental safe-sprintf code" >&5
9216 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9217
9218 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9219 if test "${enable_safe_sprintf+set}" = set; then
9220   enableval="$enable_safe_sprintf"
9221   with_safe_sprintf=$enableval
9222 else
9223   with_safe_sprintf=no
9224 fi;
9225 echo "$as_me:9225: result: $with_safe_sprintf" >&5
9226 echo "${ECHO_T}$with_safe_sprintf" >&6
9227 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9228 #define USE_SAFE_SPRINTF 1
9229 EOF
9230
9231 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9232 # when hashmap is used scroll hints are useless
9233 if test "$with_hashmap" = no ; then
9234 echo "$as_me:9234: checking if you want to experiment without scrolling-hints code" >&5
9235 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9236
9237 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9238 if test "${enable_scroll_hints+set}" = set; then
9239   enableval="$enable_scroll_hints"
9240   with_scroll_hints=$enableval
9241 else
9242   with_scroll_hints=yes
9243 fi;
9244 echo "$as_me:9244: result: $with_scroll_hints" >&5
9245 echo "${ECHO_T}$with_scroll_hints" >&6
9246 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9247 #define USE_SCROLL_HINTS 1
9248 EOF
9249
9250 fi
9251
9252 echo "$as_me:9252: checking if you want experimental wgetch-events code" >&5
9253 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9254
9255 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9256 if test "${enable_wgetch_events+set}" = set; then
9257   enableval="$enable_wgetch_events"
9258   with_wgetch_events=$enableval
9259 else
9260   with_wgetch_events=no
9261 fi;
9262 echo "$as_me:9262: result: $with_wgetch_events" >&5
9263 echo "${ECHO_T}$with_wgetch_events" >&6
9264 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9265 #define NCURSES_WGETCH_EVENTS 1
9266 EOF
9267
9268 ###############################################################################
9269
9270 ###     use option --disable-echo to suppress full display compiling commands
9271 echo "$as_me:9271: checking if you want to display full commands during build" >&5
9272 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9273
9274 # Check whether --enable-echo or --disable-echo was given.
9275 if test "${enable_echo+set}" = set; then
9276   enableval="$enable_echo"
9277   with_echo=$enableval
9278 else
9279   with_echo=yes
9280 fi;
9281 if test "$with_echo" = yes; then
9282         ECHO_LINK=
9283 else
9284         ECHO_LINK='@ echo linking $@ ... ;'
9285         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9286         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9287 fi
9288 echo "$as_me:9288: result: $with_echo" >&5
9289 echo "${ECHO_T}$with_echo" >&6
9290
9291 ###     use option --enable-warnings to turn on all gcc warnings
9292 echo "$as_me:9292: checking if you want to see compiler warnings" >&5
9293 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9294
9295 # Check whether --enable-warnings or --disable-warnings was given.
9296 if test "${enable_warnings+set}" = set; then
9297   enableval="$enable_warnings"
9298   with_warnings=$enableval
9299 fi;
9300 echo "$as_me:9300: result: $with_warnings" >&5
9301 echo "${ECHO_T}$with_warnings" >&6
9302
9303 if test -n "$with_warnings"; then
9304         ADAFLAGS="$ADAFLAGS -gnatg"
9305
9306 INTEL_COMPILER=no
9307
9308 if test "$GCC" = yes ; then
9309         case $host_os in
9310         linux*|gnu*)
9311                 echo "$as_me:9311: checking if this is really Intel C compiler" >&5
9312 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9313                 cf_save_CFLAGS="$CFLAGS"
9314                 CFLAGS="$CFLAGS -no-gcc"
9315                 cat >conftest.$ac_ext <<_ACEOF
9316 #line 9316 "configure"
9317 #include "confdefs.h"
9318
9319 int
9320 main ()
9321 {
9322
9323 #ifdef __INTEL_COMPILER
9324 #else
9325 make an error
9326 #endif
9327
9328   ;
9329   return 0;
9330 }
9331 _ACEOF
9332 rm -f conftest.$ac_objext
9333 if { (eval echo "$as_me:9333: \"$ac_compile\"") >&5
9334   (eval $ac_compile) 2>&5
9335   ac_status=$?
9336   echo "$as_me:9336: \$? = $ac_status" >&5
9337   (exit $ac_status); } &&
9338          { ac_try='test -s conftest.$ac_objext'
9339   { (eval echo "$as_me:9339: \"$ac_try\"") >&5
9340   (eval $ac_try) 2>&5
9341   ac_status=$?
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit $ac_status); }; }; then
9344   INTEL_COMPILER=yes
9345 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9346
9347 else
9348   echo "$as_me: failed program was:" >&5
9349 cat conftest.$ac_ext >&5
9350 fi
9351 rm -f conftest.$ac_objext conftest.$ac_ext
9352                 CFLAGS="$cf_save_CFLAGS"
9353                 echo "$as_me:9353: result: $INTEL_COMPILER" >&5
9354 echo "${ECHO_T}$INTEL_COMPILER" >&6
9355                 ;;
9356         esac
9357 fi
9358
9359 cat > conftest.$ac_ext <<EOF
9360 #line 9360 "configure"
9361 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9362 EOF
9363
9364 if test "$INTEL_COMPILER" = yes
9365 then
9366 # The "-wdXXX" options suppress warnings:
9367 # remark #1419: external declaration in primary source file
9368 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9369 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9370 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9371 # remark #193: zero used for undefined preprocessing identifier
9372 # remark #593: variable "curs_sb_left_arrow" was set but never used
9373 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9374 # remark #869: parameter "tw" was never referenced
9375 # remark #981: operands are evaluated in unspecified order
9376 # warning #269: invalid format string conversion
9377
9378         { echo "$as_me:9378: checking for $CC warning options..." >&5
9379 echo "$as_me: checking for $CC warning options..." >&6;}
9380         cf_save_CFLAGS="$CFLAGS"
9381         EXTRA_CFLAGS="-Wall"
9382         for cf_opt in \
9383                 wd1419 \
9384                 wd1682 \
9385                 wd1683 \
9386                 wd1684 \
9387                 wd193 \
9388                 wd279 \
9389                 wd593 \
9390                 wd810 \
9391                 wd869 \
9392                 wd981
9393         do
9394                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9395                 if { (eval echo "$as_me:9395: \"$ac_compile\"") >&5
9396   (eval $ac_compile) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit $ac_status); }; then
9400                         test -n "$verbose" && echo "$as_me:9400: result: ... -$cf_opt" >&5
9401 echo "${ECHO_T}... -$cf_opt" >&6
9402                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9403                 fi
9404         done
9405         CFLAGS="$cf_save_CFLAGS"
9406
9407 elif test "$GCC" = yes
9408 then
9409         { echo "$as_me:9409: checking for $CC warning options..." >&5
9410 echo "$as_me: checking for $CC warning options..." >&6;}
9411         cf_save_CFLAGS="$CFLAGS"
9412         EXTRA_CFLAGS="-W -Wall"
9413         cf_warn_CONST=""
9414         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9415         for cf_opt in \
9416                 Wbad-function-cast \
9417                 Wcast-align \
9418                 Wcast-qual \
9419                 Winline \
9420                 Wmissing-declarations \
9421                 Wmissing-prototypes \
9422                 Wnested-externs \
9423                 Wpointer-arith \
9424                 Wshadow \
9425                 Wstrict-prototypes \
9426                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9427         do
9428                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9429                 if { (eval echo "$as_me:9429: \"$ac_compile\"") >&5
9430   (eval $ac_compile) 2>&5
9431   ac_status=$?
9432   echo "$as_me:9432: \$? = $ac_status" >&5
9433   (exit $ac_status); }; then
9434                         test -n "$verbose" && echo "$as_me:9434: result: ... -$cf_opt" >&5
9435 echo "${ECHO_T}... -$cf_opt" >&6
9436                         case $cf_opt in #(vi
9437                         Wcast-qual) #(vi
9438                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9439                                 ;;
9440                         Winline) #(vi
9441                                 case $GCC_VERSION in
9442                                 3.3*)
9443                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9444
9445                                         continue;;
9446                                 esac
9447                                 ;;
9448                         esac
9449                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9450                 fi
9451         done
9452         CFLAGS="$cf_save_CFLAGS"
9453 fi
9454 rm -f conftest*
9455
9456         if test "$cf_with_cxx" = yes ; then
9457
9458 INTEL_CPLUSPLUS=no
9459
9460 if test "$GCC" = yes ; then
9461         case $host_os in
9462         linux*|gnu*)
9463                 echo "$as_me:9463: checking if this is really Intel C++ compiler" >&5
9464 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9465                 cf_save_CFLAGS="$CXXFLAGS"
9466                 CXXFLAGS="$CXXFLAGS -no-gcc"
9467                 cat >conftest.$ac_ext <<_ACEOF
9468 #line 9468 "configure"
9469 #include "confdefs.h"
9470
9471 int
9472 main ()
9473 {
9474
9475 #ifdef __INTEL_COMPILER
9476 #else
9477 make an error
9478 #endif
9479
9480   ;
9481   return 0;
9482 }
9483 _ACEOF
9484 rm -f conftest.$ac_objext
9485 if { (eval echo "$as_me:9485: \"$ac_compile\"") >&5
9486   (eval $ac_compile) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); } &&
9490          { ac_try='test -s conftest.$ac_objext'
9491   { (eval echo "$as_me:9491: \"$ac_try\"") >&5
9492   (eval $ac_try) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); }; }; then
9496   INTEL_CPLUSPLUS=yes
9497 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9498
9499 else
9500   echo "$as_me: failed program was:" >&5
9501 cat conftest.$ac_ext >&5
9502 fi
9503 rm -f conftest.$ac_objext conftest.$ac_ext
9504                 CXXFLAGS="$cf_save_CFLAGS"
9505                 echo "$as_me:9505: result: $INTEL_CPLUSPLUS" >&5
9506 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9507                 ;;
9508         esac
9509 fi
9510
9511 ac_ext=cc
9512 ac_cpp='$CXXCPP $CPPFLAGS'
9513 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9514 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9515 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9516 ac_main_return=return
9517
9518 cat > conftest.$ac_ext <<EOF
9519 #line 9519 "configure"
9520 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9521 EOF
9522
9523 if test "$INTEL_CPLUSPLUS" = yes
9524 then
9525 # The "-wdXXX" options suppress warnings:
9526 # remark #1419: external declaration in primary source file
9527 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9528 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9529 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9530 # remark #193: zero used for undefined preprocessing identifier
9531 # remark #593: variable "curs_sb_left_arrow" was set but never used
9532 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9533 # remark #869: parameter "tw" was never referenced
9534 # remark #981: operands are evaluated in unspecified order
9535 # warning #269: invalid format string conversion
9536
9537         { echo "$as_me:9537: checking for $CC warning options..." >&5
9538 echo "$as_me: checking for $CC warning options..." >&6;}
9539         cf_save_CXXFLAGS="$CXXFLAGS"
9540         EXTRA_CXXFLAGS="-Wall"
9541         for cf_opt in \
9542                 wd1419 \
9543                 wd1682 \
9544                 wd1683 \
9545                 wd1684 \
9546                 wd193 \
9547                 wd279 \
9548                 wd593 \
9549                 wd810 \
9550                 wd869 \
9551                 wd981
9552         do
9553                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9554                 if { (eval echo "$as_me:9554: \"$ac_compile\"") >&5
9555   (eval $ac_compile) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); }; then
9559                         test -n "$verbose" && echo "$as_me:9559: result: ... -$cf_opt" >&5
9560 echo "${ECHO_T}... -$cf_opt" >&6
9561                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9562                 fi
9563         done
9564         CXXFLAGS="$cf_save_CXXFLAGS"
9565
9566 elif test "$GXX" = yes
9567 then
9568         { echo "$as_me:9568: checking for $CXX warning options..." >&5
9569 echo "$as_me: checking for $CXX warning options..." >&6;}
9570         cf_save_CXXFLAGS="$CXXFLAGS"
9571         EXTRA_CXXFLAGS="-W -Wall"
9572         cf_gxx_extra_warnings=""
9573         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9574         case "$GCC_VERSION" in
9575         [1-2].*)
9576                 ;;
9577         *)
9578                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9579                 ;;
9580         esac
9581         for cf_opt in \
9582                 Wabi \
9583                 fabi-version=0 \
9584                 Woverloaded-virtual \
9585                 Wsign-promo \
9586                 Wsynth \
9587                 Wold-style-cast \
9588                 Wcast-align \
9589                 Wcast-qual \
9590                 Wmissing-prototypes \
9591                 Wpointer-arith \
9592                 Wshadow \
9593                 Wstrict-prototypes \
9594                 Wundef $cf_gxx_extra_warnings Wno-unused
9595         do
9596                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9597                 if { (eval echo "$as_me:9597: \"$ac_compile\"") >&5
9598   (eval $ac_compile) 2>&5
9599   ac_status=$?
9600   echo "$as_me:9600: \$? = $ac_status" >&5
9601   (exit $ac_status); }; then
9602                         test -n "$verbose" && echo "$as_me:9602: result: ... -$cf_opt" >&5
9603 echo "${ECHO_T}... -$cf_opt" >&6
9604                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9605                 else
9606                         test -n "$verbose" && echo "$as_me:9606: result: ... no -$cf_opt" >&5
9607 echo "${ECHO_T}... no -$cf_opt" >&6
9608                 fi
9609         done
9610         CXXFLAGS="$cf_save_CXXFLAGS"
9611 fi
9612
9613 rm -f conftest*
9614 ac_ext=c
9615 ac_cpp='$CPP $CPPFLAGS'
9616 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9617 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9618 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9619 ac_main_return=return
9620
9621         fi
9622 fi
9623
9624 if test "$GCC" = yes
9625 then
9626 cat > conftest.i <<EOF
9627 #ifndef GCC_PRINTF
9628 #define GCC_PRINTF 0
9629 #endif
9630 #ifndef GCC_SCANF
9631 #define GCC_SCANF 0
9632 #endif
9633 #ifndef GCC_NORETURN
9634 #define GCC_NORETURN /* nothing */
9635 #endif
9636 #ifndef GCC_UNUSED
9637 #define GCC_UNUSED /* nothing */
9638 #endif
9639 EOF
9640 if test "$GCC" = yes
9641 then
9642         { echo "$as_me:9642: checking for $CC __attribute__ directives..." >&5
9643 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9644 cat > conftest.$ac_ext <<EOF
9645 #line 9645 "configure"
9646 #include "confdefs.h"
9647 #include "conftest.h"
9648 #include "conftest.i"
9649 #if     GCC_PRINTF
9650 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9651 #else
9652 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9653 #endif
9654 #if     GCC_SCANF
9655 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9656 #else
9657 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9658 #endif
9659 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9660 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9661 extern void foo(void) GCC_NORETURN;
9662 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9663 EOF
9664         for cf_attribute in scanf printf unused noreturn
9665         do
9666
9667 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9668
9669                 cf_directive="__attribute__(($cf_attribute))"
9670                 echo "checking for $CC $cf_directive" 1>&5
9671                 case $cf_attribute in
9672                 scanf|printf)
9673                 cat >conftest.h <<EOF
9674 #define GCC_$cf_ATTRIBUTE 1
9675 EOF
9676                         ;;
9677                 *)
9678                 cat >conftest.h <<EOF
9679 #define GCC_$cf_ATTRIBUTE $cf_directive
9680 EOF
9681                         ;;
9682                 esac
9683                 if { (eval echo "$as_me:9683: \"$ac_compile\"") >&5
9684   (eval $ac_compile) 2>&5
9685   ac_status=$?
9686   echo "$as_me:9686: \$? = $ac_status" >&5
9687   (exit $ac_status); }; then
9688                         test -n "$verbose" && echo "$as_me:9688: result: ... $cf_attribute" >&5
9689 echo "${ECHO_T}... $cf_attribute" >&6
9690                         cat conftest.h >>confdefs.h
9691                 fi
9692         done
9693 else
9694         fgrep define conftest.i >>confdefs.h
9695 fi
9696 rm -rf conftest*
9697 fi
9698
9699 ###     use option --enable-assertions to turn on generation of assertion code
9700 echo "$as_me:9700: checking if you want to enable runtime assertions" >&5
9701 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9702
9703 # Check whether --enable-assertions or --disable-assertions was given.
9704 if test "${enable_assertions+set}" = set; then
9705   enableval="$enable_assertions"
9706   with_assertions=$enableval
9707 else
9708   with_assertions=no
9709 fi;
9710 echo "$as_me:9710: result: $with_assertions" >&5
9711 echo "${ECHO_T}$with_assertions" >&6
9712 if test -n "$GCC"
9713 then
9714         if test "$with_assertions" = no
9715         then
9716                 cat >>confdefs.h <<\EOF
9717 #define NDEBUG 1
9718 EOF
9719
9720                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9721         else
9722                 ADAFLAGS="$ADAFLAGS -gnata"
9723         fi
9724 fi
9725
9726 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9727
9728 echo "$as_me:9728: checking if you want to use dmalloc for testing" >&5
9729 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9730
9731 # Check whether --with-dmalloc or --without-dmalloc was given.
9732 if test "${with_dmalloc+set}" = set; then
9733   withval="$with_dmalloc"
9734   cat >>confdefs.h <<\EOF
9735 #define USE_DMALLOC 1
9736 EOF
9737
9738         : ${with_cflags:=-g}
9739         : ${with_no_leaks:=yes}
9740          with_dmalloc=yes
9741 else
9742   with_dmalloc=
9743 fi;
9744 echo "$as_me:9744: result: ${with_dmalloc:-no}" >&5
9745 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9746
9747 case .$with_cflags in #(vi
9748 .*-g*)
9749         case .$CFLAGS in #(vi
9750         .*-g*) #(vi
9751                 ;;
9752         *)
9753
9754 cf_fix_cppflags=no
9755 cf_new_cflags=
9756 cf_new_cppflags=
9757 cf_new_extra_cppflags=
9758
9759 for cf_add_cflags in -g
9760 do
9761 case $cf_fix_cppflags in
9762 no)
9763         case $cf_add_cflags in #(vi
9764         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9765                 case $cf_add_cflags in
9766                 -D*)
9767                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9768
9769                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9770                         && test -z "${cf_tst_cflags}" \
9771                         && cf_fix_cppflags=yes
9772
9773                         if test $cf_fix_cppflags = yes ; then
9774                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9775                                 continue
9776                         elif test "${cf_tst_cflags}" = "\"'" ; then
9777                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9778                                 continue
9779                         fi
9780                         ;;
9781                 esac
9782                 case "$CPPFLAGS" in
9783                 *$cf_add_cflags) #(vi
9784                         ;;
9785                 *) #(vi
9786                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9787                         ;;
9788                 esac
9789                 ;;
9790         *)
9791                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9792                 ;;
9793         esac
9794         ;;
9795 yes)
9796         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9797
9798         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9799
9800         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9801         && test -z "${cf_tst_cflags}" \
9802         && cf_fix_cppflags=no
9803         ;;
9804 esac
9805 done
9806
9807 if test -n "$cf_new_cflags" ; then
9808
9809         CFLAGS="$CFLAGS $cf_new_cflags"
9810 fi
9811
9812 if test -n "$cf_new_cppflags" ; then
9813
9814         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9815 fi
9816
9817 if test -n "$cf_new_extra_cppflags" ; then
9818
9819         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9820 fi
9821
9822                 ;;
9823         esac
9824         ;;
9825 esac
9826
9827 if test "$with_dmalloc" = yes ; then
9828         echo "$as_me:9828: checking for dmalloc.h" >&5
9829 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9830 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9831   echo $ECHO_N "(cached) $ECHO_C" >&6
9832 else
9833   cat >conftest.$ac_ext <<_ACEOF
9834 #line 9834 "configure"
9835 #include "confdefs.h"
9836 #include <dmalloc.h>
9837 _ACEOF
9838 if { (eval echo "$as_me:9838: \"$ac_cpp conftest.$ac_ext\"") >&5
9839   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9840   ac_status=$?
9841   egrep -v '^ *\+' conftest.er1 >conftest.err
9842   rm -f conftest.er1
9843   cat conftest.err >&5
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); } >/dev/null; then
9846   if test -s conftest.err; then
9847     ac_cpp_err=$ac_c_preproc_warn_flag
9848   else
9849     ac_cpp_err=
9850   fi
9851 else
9852   ac_cpp_err=yes
9853 fi
9854 if test -z "$ac_cpp_err"; then
9855   ac_cv_header_dmalloc_h=yes
9856 else
9857   echo "$as_me: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   ac_cv_header_dmalloc_h=no
9860 fi
9861 rm -f conftest.err conftest.$ac_ext
9862 fi
9863 echo "$as_me:9863: result: $ac_cv_header_dmalloc_h" >&5
9864 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9865 if test $ac_cv_header_dmalloc_h = yes; then
9866
9867 echo "$as_me:9867: checking for dmalloc_debug in -ldmalloc" >&5
9868 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9869 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9870   echo $ECHO_N "(cached) $ECHO_C" >&6
9871 else
9872   ac_check_lib_save_LIBS=$LIBS
9873 LIBS="-ldmalloc  $LIBS"
9874 cat >conftest.$ac_ext <<_ACEOF
9875 #line 9875 "configure"
9876 #include "confdefs.h"
9877
9878 /* Override any gcc2 internal prototype to avoid an error.  */
9879 #ifdef __cplusplus
9880 extern "C"
9881 #endif
9882 /* We use char because int might match the return type of a gcc2
9883    builtin and then its argument prototype would still apply.  */
9884 char dmalloc_debug ();
9885 int
9886 main ()
9887 {
9888 dmalloc_debug ();
9889   ;
9890   return 0;
9891 }
9892 _ACEOF
9893 rm -f conftest.$ac_objext conftest$ac_exeext
9894 if { (eval echo "$as_me:9894: \"$ac_link\"") >&5
9895   (eval $ac_link) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); } &&
9899          { ac_try='test -s conftest$ac_exeext'
9900   { (eval echo "$as_me:9900: \"$ac_try\"") >&5
9901   (eval $ac_try) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); }; }; then
9905   ac_cv_lib_dmalloc_dmalloc_debug=yes
9906 else
9907   echo "$as_me: failed program was:" >&5
9908 cat conftest.$ac_ext >&5
9909 ac_cv_lib_dmalloc_dmalloc_debug=no
9910 fi
9911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9912 LIBS=$ac_check_lib_save_LIBS
9913 fi
9914 echo "$as_me:9914: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9915 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9916 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9917   cat >>confdefs.h <<EOF
9918 #define HAVE_LIBDMALLOC 1
9919 EOF
9920
9921   LIBS="-ldmalloc $LIBS"
9922
9923 fi
9924
9925 fi
9926
9927 fi
9928
9929 echo "$as_me:9929: checking if you want to use dbmalloc for testing" >&5
9930 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9931
9932 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9933 if test "${with_dbmalloc+set}" = set; then
9934   withval="$with_dbmalloc"
9935   cat >>confdefs.h <<\EOF
9936 #define USE_DBMALLOC 1
9937 EOF
9938
9939         : ${with_cflags:=-g}
9940         : ${with_no_leaks:=yes}
9941          with_dbmalloc=yes
9942 else
9943   with_dbmalloc=
9944 fi;
9945 echo "$as_me:9945: result: ${with_dbmalloc:-no}" >&5
9946 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9947
9948 case .$with_cflags in #(vi
9949 .*-g*)
9950         case .$CFLAGS in #(vi
9951         .*-g*) #(vi
9952                 ;;
9953         *)
9954
9955 cf_fix_cppflags=no
9956 cf_new_cflags=
9957 cf_new_cppflags=
9958 cf_new_extra_cppflags=
9959
9960 for cf_add_cflags in -g
9961 do
9962 case $cf_fix_cppflags in
9963 no)
9964         case $cf_add_cflags in #(vi
9965         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9966                 case $cf_add_cflags in
9967                 -D*)
9968                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9969
9970                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9971                         && test -z "${cf_tst_cflags}" \
9972                         && cf_fix_cppflags=yes
9973
9974                         if test $cf_fix_cppflags = yes ; then
9975                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9976                                 continue
9977                         elif test "${cf_tst_cflags}" = "\"'" ; then
9978                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9979                                 continue
9980                         fi
9981                         ;;
9982                 esac
9983                 case "$CPPFLAGS" in
9984                 *$cf_add_cflags) #(vi
9985                         ;;
9986                 *) #(vi
9987                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9988                         ;;
9989                 esac
9990                 ;;
9991         *)
9992                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9993                 ;;
9994         esac
9995         ;;
9996 yes)
9997         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9998
9999         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10000
10001         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10002         && test -z "${cf_tst_cflags}" \
10003         && cf_fix_cppflags=no
10004         ;;
10005 esac
10006 done
10007
10008 if test -n "$cf_new_cflags" ; then
10009
10010         CFLAGS="$CFLAGS $cf_new_cflags"
10011 fi
10012
10013 if test -n "$cf_new_cppflags" ; then
10014
10015         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10016 fi
10017
10018 if test -n "$cf_new_extra_cppflags" ; then
10019
10020         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10021 fi
10022
10023                 ;;
10024         esac
10025         ;;
10026 esac
10027
10028 if test "$with_dbmalloc" = yes ; then
10029         echo "$as_me:10029: checking for dbmalloc.h" >&5
10030 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10031 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10032   echo $ECHO_N "(cached) $ECHO_C" >&6
10033 else
10034   cat >conftest.$ac_ext <<_ACEOF
10035 #line 10035 "configure"
10036 #include "confdefs.h"
10037 #include <dbmalloc.h>
10038 _ACEOF
10039 if { (eval echo "$as_me:10039: \"$ac_cpp conftest.$ac_ext\"") >&5
10040   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10041   ac_status=$?
10042   egrep -v '^ *\+' conftest.er1 >conftest.err
10043   rm -f conftest.er1
10044   cat conftest.err >&5
10045   echo "$as_me:10045: \$? = $ac_status" >&5
10046   (exit $ac_status); } >/dev/null; then
10047   if test -s conftest.err; then
10048     ac_cpp_err=$ac_c_preproc_warn_flag
10049   else
10050     ac_cpp_err=
10051   fi
10052 else
10053   ac_cpp_err=yes
10054 fi
10055 if test -z "$ac_cpp_err"; then
10056   ac_cv_header_dbmalloc_h=yes
10057 else
10058   echo "$as_me: failed program was:" >&5
10059   cat conftest.$ac_ext >&5
10060   ac_cv_header_dbmalloc_h=no
10061 fi
10062 rm -f conftest.err conftest.$ac_ext
10063 fi
10064 echo "$as_me:10064: result: $ac_cv_header_dbmalloc_h" >&5
10065 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10066 if test $ac_cv_header_dbmalloc_h = yes; then
10067
10068 echo "$as_me:10068: checking for debug_malloc in -ldbmalloc" >&5
10069 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10070 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10071   echo $ECHO_N "(cached) $ECHO_C" >&6
10072 else
10073   ac_check_lib_save_LIBS=$LIBS
10074 LIBS="-ldbmalloc  $LIBS"
10075 cat >conftest.$ac_ext <<_ACEOF
10076 #line 10076 "configure"
10077 #include "confdefs.h"
10078
10079 /* Override any gcc2 internal prototype to avoid an error.  */
10080 #ifdef __cplusplus
10081 extern "C"
10082 #endif
10083 /* We use char because int might match the return type of a gcc2
10084    builtin and then its argument prototype would still apply.  */
10085 char debug_malloc ();
10086 int
10087 main ()
10088 {
10089 debug_malloc ();
10090   ;
10091   return 0;
10092 }
10093 _ACEOF
10094 rm -f conftest.$ac_objext conftest$ac_exeext
10095 if { (eval echo "$as_me:10095: \"$ac_link\"") >&5
10096   (eval $ac_link) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); } &&
10100          { ac_try='test -s conftest$ac_exeext'
10101   { (eval echo "$as_me:10101: \"$ac_try\"") >&5
10102   (eval $ac_try) 2>&5
10103   ac_status=$?
10104   echo "$as_me:10104: \$? = $ac_status" >&5
10105   (exit $ac_status); }; }; then
10106   ac_cv_lib_dbmalloc_debug_malloc=yes
10107 else
10108   echo "$as_me: failed program was:" >&5
10109 cat conftest.$ac_ext >&5
10110 ac_cv_lib_dbmalloc_debug_malloc=no
10111 fi
10112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10113 LIBS=$ac_check_lib_save_LIBS
10114 fi
10115 echo "$as_me:10115: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10116 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10117 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10118   cat >>confdefs.h <<EOF
10119 #define HAVE_LIBDBMALLOC 1
10120 EOF
10121
10122   LIBS="-ldbmalloc $LIBS"
10123
10124 fi
10125
10126 fi
10127
10128 fi
10129
10130 echo "$as_me:10130: checking if you want to use valgrind for testing" >&5
10131 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10132
10133 # Check whether --with-valgrind or --without-valgrind was given.
10134 if test "${with_valgrind+set}" = set; then
10135   withval="$with_valgrind"
10136   cat >>confdefs.h <<\EOF
10137 #define USE_VALGRIND 1
10138 EOF
10139
10140         : ${with_cflags:=-g}
10141         : ${with_no_leaks:=yes}
10142          with_valgrind=yes
10143 else
10144   with_valgrind=
10145 fi;
10146 echo "$as_me:10146: result: ${with_valgrind:-no}" >&5
10147 echo "${ECHO_T}${with_valgrind:-no}" >&6
10148
10149 case .$with_cflags in #(vi
10150 .*-g*)
10151         case .$CFLAGS in #(vi
10152         .*-g*) #(vi
10153                 ;;
10154         *)
10155
10156 cf_fix_cppflags=no
10157 cf_new_cflags=
10158 cf_new_cppflags=
10159 cf_new_extra_cppflags=
10160
10161 for cf_add_cflags in -g
10162 do
10163 case $cf_fix_cppflags in
10164 no)
10165         case $cf_add_cflags in #(vi
10166         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10167                 case $cf_add_cflags in
10168                 -D*)
10169                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10170
10171                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10172                         && test -z "${cf_tst_cflags}" \
10173                         && cf_fix_cppflags=yes
10174
10175                         if test $cf_fix_cppflags = yes ; then
10176                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10177                                 continue
10178                         elif test "${cf_tst_cflags}" = "\"'" ; then
10179                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10180                                 continue
10181                         fi
10182                         ;;
10183                 esac
10184                 case "$CPPFLAGS" in
10185                 *$cf_add_cflags) #(vi
10186                         ;;
10187                 *) #(vi
10188                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10189                         ;;
10190                 esac
10191                 ;;
10192         *)
10193                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10194                 ;;
10195         esac
10196         ;;
10197 yes)
10198         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10199
10200         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10201
10202         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10203         && test -z "${cf_tst_cflags}" \
10204         && cf_fix_cppflags=no
10205         ;;
10206 esac
10207 done
10208
10209 if test -n "$cf_new_cflags" ; then
10210
10211         CFLAGS="$CFLAGS $cf_new_cflags"
10212 fi
10213
10214 if test -n "$cf_new_cppflags" ; then
10215
10216         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10217 fi
10218
10219 if test -n "$cf_new_extra_cppflags" ; then
10220
10221         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10222 fi
10223
10224                 ;;
10225         esac
10226         ;;
10227 esac
10228
10229 echo "$as_me:10229: checking if you want to perform memory-leak testing" >&5
10230 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10231
10232 # Check whether --enable-leaks or --disable-leaks was given.
10233 if test "${enable_leaks+set}" = set; then
10234   enableval="$enable_leaks"
10235   with_no_leaks=yes
10236 else
10237   : ${with_no_leaks:=no}
10238 fi;
10239 echo "$as_me:10239: result: $with_no_leaks" >&5
10240 echo "${ECHO_T}$with_no_leaks" >&6
10241
10242 if test "$with_no_leaks" = yes ; then
10243         cat >>confdefs.h <<\EOF
10244 #define NO_LEAKS 1
10245 EOF
10246
10247 fi
10248
10249 cat >>confdefs.h <<\EOF
10250 #define HAVE_NC_ALLOC_H 1
10251 EOF
10252
10253 ###     use option --enable-expanded to generate certain macros as functions
10254
10255 # Check whether --enable-expanded or --disable-expanded was given.
10256 if test "${enable_expanded+set}" = set; then
10257   enableval="$enable_expanded"
10258   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10259 #define NCURSES_EXPANDED 1
10260 EOF
10261
10262 fi;
10263
10264 ###     use option --disable-macros to suppress macros in favor of functions
10265
10266 # Check whether --enable-macros or --disable-macros was given.
10267 if test "${enable_macros+set}" = set; then
10268   enableval="$enable_macros"
10269   test "$enableval" = no && cat >>confdefs.h <<\EOF
10270 #define NCURSES_NOMACROS 1
10271 EOF
10272
10273 fi;
10274
10275 # Normally we only add trace() to the debug-library.  Allow this to be
10276 # extended to all models of the ncurses library:
10277 cf_all_traces=no
10278 case "$CFLAGS $CPPFLAGS" in
10279 *-DTRACE*)
10280         cf_all_traces=yes
10281         ;;
10282 esac
10283
10284 echo "$as_me:10284: checking whether to add trace feature to all models" >&5
10285 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10286
10287 # Check whether --with-trace or --without-trace was given.
10288 if test "${with_trace+set}" = set; then
10289   withval="$with_trace"
10290   cf_with_trace=$withval
10291 else
10292   cf_with_trace=$cf_all_traces
10293 fi;
10294 echo "$as_me:10294: result: $cf_with_trace" >&5
10295 echo "${ECHO_T}$cf_with_trace" >&6
10296
10297 if test "$cf_with_trace" = yes ; then
10298         LIB_TRACING=all
10299         ADA_TRACE=TRUE
10300
10301 cf_fix_cppflags=no
10302 cf_new_cflags=
10303 cf_new_cppflags=
10304 cf_new_extra_cppflags=
10305
10306 for cf_add_cflags in -DTRACE
10307 do
10308 case $cf_fix_cppflags in
10309 no)
10310         case $cf_add_cflags in #(vi
10311         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10312                 case $cf_add_cflags in
10313                 -D*)
10314                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10315
10316                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10317                         && test -z "${cf_tst_cflags}" \
10318                         && cf_fix_cppflags=yes
10319
10320                         if test $cf_fix_cppflags = yes ; then
10321                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10322                                 continue
10323                         elif test "${cf_tst_cflags}" = "\"'" ; then
10324                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10325                                 continue
10326                         fi
10327                         ;;
10328                 esac
10329                 case "$CPPFLAGS" in
10330                 *$cf_add_cflags) #(vi
10331                         ;;
10332                 *) #(vi
10333                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10334                         ;;
10335                 esac
10336                 ;;
10337         *)
10338                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10339                 ;;
10340         esac
10341         ;;
10342 yes)
10343         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10344
10345         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10346
10347         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10348         && test -z "${cf_tst_cflags}" \
10349         && cf_fix_cppflags=no
10350         ;;
10351 esac
10352 done
10353
10354 if test -n "$cf_new_cflags" ; then
10355
10356         CFLAGS="$CFLAGS $cf_new_cflags"
10357 fi
10358
10359 if test -n "$cf_new_cppflags" ; then
10360
10361         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10362 fi
10363
10364 if test -n "$cf_new_extra_cppflags" ; then
10365
10366         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10367 fi
10368
10369 else
10370         LIB_TRACING=DEBUG
10371         ADA_TRACE=FALSE
10372 fi
10373
10374 ###     Checks for libraries.
10375 echo "$as_me:10375: checking for gettimeofday" >&5
10376 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10377 if test "${ac_cv_func_gettimeofday+set}" = set; then
10378   echo $ECHO_N "(cached) $ECHO_C" >&6
10379 else
10380   cat >conftest.$ac_ext <<_ACEOF
10381 #line 10381 "configure"
10382 #include "confdefs.h"
10383 /* System header to define __stub macros and hopefully few prototypes,
10384     which can conflict with char gettimeofday (); below.  */
10385 #include <assert.h>
10386 /* Override any gcc2 internal prototype to avoid an error.  */
10387 #ifdef __cplusplus
10388 extern "C"
10389 #endif
10390 /* We use char because int might match the return type of a gcc2
10391    builtin and then its argument prototype would still apply.  */
10392 char gettimeofday ();
10393 char (*f) ();
10394
10395 int
10396 main ()
10397 {
10398 /* The GNU C library defines this for functions which it implements
10399     to always fail with ENOSYS.  Some functions are actually named
10400     something starting with __ and the normal name is an alias.  */
10401 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10402 choke me
10403 #else
10404 f = gettimeofday;
10405 #endif
10406
10407   ;
10408   return 0;
10409 }
10410 _ACEOF
10411 rm -f conftest.$ac_objext conftest$ac_exeext
10412 if { (eval echo "$as_me:10412: \"$ac_link\"") >&5
10413   (eval $ac_link) 2>&5
10414   ac_status=$?
10415   echo "$as_me:10415: \$? = $ac_status" >&5
10416   (exit $ac_status); } &&
10417          { ac_try='test -s conftest$ac_exeext'
10418   { (eval echo "$as_me:10418: \"$ac_try\"") >&5
10419   (eval $ac_try) 2>&5
10420   ac_status=$?
10421   echo "$as_me:10421: \$? = $ac_status" >&5
10422   (exit $ac_status); }; }; then
10423   ac_cv_func_gettimeofday=yes
10424 else
10425   echo "$as_me: failed program was:" >&5
10426 cat conftest.$ac_ext >&5
10427 ac_cv_func_gettimeofday=no
10428 fi
10429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10430 fi
10431 echo "$as_me:10431: result: $ac_cv_func_gettimeofday" >&5
10432 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10433 if test $ac_cv_func_gettimeofday = yes; then
10434   cat >>confdefs.h <<\EOF
10435 #define HAVE_GETTIMEOFDAY 1
10436 EOF
10437
10438 else
10439
10440 echo "$as_me:10440: checking for gettimeofday in -lbsd" >&5
10441 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10442 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10443   echo $ECHO_N "(cached) $ECHO_C" >&6
10444 else
10445   ac_check_lib_save_LIBS=$LIBS
10446 LIBS="-lbsd  $LIBS"
10447 cat >conftest.$ac_ext <<_ACEOF
10448 #line 10448 "configure"
10449 #include "confdefs.h"
10450
10451 /* Override any gcc2 internal prototype to avoid an error.  */
10452 #ifdef __cplusplus
10453 extern "C"
10454 #endif
10455 /* We use char because int might match the return type of a gcc2
10456    builtin and then its argument prototype would still apply.  */
10457 char gettimeofday ();
10458 int
10459 main ()
10460 {
10461 gettimeofday ();
10462   ;
10463   return 0;
10464 }
10465 _ACEOF
10466 rm -f conftest.$ac_objext conftest$ac_exeext
10467 if { (eval echo "$as_me:10467: \"$ac_link\"") >&5
10468   (eval $ac_link) 2>&5
10469   ac_status=$?
10470   echo "$as_me:10470: \$? = $ac_status" >&5
10471   (exit $ac_status); } &&
10472          { ac_try='test -s conftest$ac_exeext'
10473   { (eval echo "$as_me:10473: \"$ac_try\"") >&5
10474   (eval $ac_try) 2>&5
10475   ac_status=$?
10476   echo "$as_me:10476: \$? = $ac_status" >&5
10477   (exit $ac_status); }; }; then
10478   ac_cv_lib_bsd_gettimeofday=yes
10479 else
10480   echo "$as_me: failed program was:" >&5
10481 cat conftest.$ac_ext >&5
10482 ac_cv_lib_bsd_gettimeofday=no
10483 fi
10484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10485 LIBS=$ac_check_lib_save_LIBS
10486 fi
10487 echo "$as_me:10487: result: $ac_cv_lib_bsd_gettimeofday" >&5
10488 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10489 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10490   cat >>confdefs.h <<\EOF
10491 #define HAVE_GETTIMEOFDAY 1
10492 EOF
10493
10494         LIBS="$LIBS -lbsd"
10495 fi
10496
10497 fi
10498
10499 echo "$as_me:10499: checking if -lm needed for math functions" >&5
10500 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10501 if test "${cf_cv_need_libm+set}" = set; then
10502   echo $ECHO_N "(cached) $ECHO_C" >&6
10503 else
10504
10505         cat >conftest.$ac_ext <<_ACEOF
10506 #line 10506 "configure"
10507 #include "confdefs.h"
10508
10509         #include <stdio.h>
10510         #include <math.h>
10511
10512 int
10513 main ()
10514 {
10515 double x = rand(); printf("result = %g\n", sin(x))
10516   ;
10517   return 0;
10518 }
10519 _ACEOF
10520 rm -f conftest.$ac_objext conftest$ac_exeext
10521 if { (eval echo "$as_me:10521: \"$ac_link\"") >&5
10522   (eval $ac_link) 2>&5
10523   ac_status=$?
10524   echo "$as_me:10524: \$? = $ac_status" >&5
10525   (exit $ac_status); } &&
10526          { ac_try='test -s conftest$ac_exeext'
10527   { (eval echo "$as_me:10527: \"$ac_try\"") >&5
10528   (eval $ac_try) 2>&5
10529   ac_status=$?
10530   echo "$as_me:10530: \$? = $ac_status" >&5
10531   (exit $ac_status); }; }; then
10532   cf_cv_need_libm=no
10533 else
10534   echo "$as_me: failed program was:" >&5
10535 cat conftest.$ac_ext >&5
10536 cf_cv_need_libm=yes
10537 fi
10538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10539 fi
10540 echo "$as_me:10540: result: $cf_cv_need_libm" >&5
10541 echo "${ECHO_T}$cf_cv_need_libm" >&6
10542 if test "$cf_cv_need_libm" = yes
10543 then
10544 MATH_LIB=-lm
10545 fi
10546
10547 ###     Checks for header files.
10548 echo "$as_me:10548: checking for ANSI C header files" >&5
10549 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10550 if test "${ac_cv_header_stdc+set}" = set; then
10551   echo $ECHO_N "(cached) $ECHO_C" >&6
10552 else
10553   cat >conftest.$ac_ext <<_ACEOF
10554 #line 10554 "configure"
10555 #include "confdefs.h"
10556 #include <stdlib.h>
10557 #include <stdarg.h>
10558 #include <string.h>
10559 #include <float.h>
10560
10561 _ACEOF
10562 if { (eval echo "$as_me:10562: \"$ac_cpp conftest.$ac_ext\"") >&5
10563   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10564   ac_status=$?
10565   egrep -v '^ *\+' conftest.er1 >conftest.err
10566   rm -f conftest.er1
10567   cat conftest.err >&5
10568   echo "$as_me:10568: \$? = $ac_status" >&5
10569   (exit $ac_status); } >/dev/null; then
10570   if test -s conftest.err; then
10571     ac_cpp_err=$ac_c_preproc_warn_flag
10572   else
10573     ac_cpp_err=
10574   fi
10575 else
10576   ac_cpp_err=yes
10577 fi
10578 if test -z "$ac_cpp_err"; then
10579   ac_cv_header_stdc=yes
10580 else
10581   echo "$as_me: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   ac_cv_header_stdc=no
10584 fi
10585 rm -f conftest.err conftest.$ac_ext
10586
10587 if test $ac_cv_header_stdc = yes; then
10588   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10589   cat >conftest.$ac_ext <<_ACEOF
10590 #line 10590 "configure"
10591 #include "confdefs.h"
10592 #include <string.h>
10593
10594 _ACEOF
10595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10596   egrep "memchr" >/dev/null 2>&1; then
10597   :
10598 else
10599   ac_cv_header_stdc=no
10600 fi
10601 rm -f conftest*
10602
10603 fi
10604
10605 if test $ac_cv_header_stdc = yes; then
10606   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10607   cat >conftest.$ac_ext <<_ACEOF
10608 #line 10608 "configure"
10609 #include "confdefs.h"
10610 #include <stdlib.h>
10611
10612 _ACEOF
10613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10614   egrep "free" >/dev/null 2>&1; then
10615   :
10616 else
10617   ac_cv_header_stdc=no
10618 fi
10619 rm -f conftest*
10620
10621 fi
10622
10623 if test $ac_cv_header_stdc = yes; then
10624   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10625   if test "$cross_compiling" = yes; then
10626   :
10627 else
10628   cat >conftest.$ac_ext <<_ACEOF
10629 #line 10629 "configure"
10630 #include "confdefs.h"
10631 #include <ctype.h>
10632 #if ((' ' & 0x0FF) == 0x020)
10633 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10634 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10635 #else
10636 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10637                      || ('j' <= (c) && (c) <= 'r') \
10638                      || ('s' <= (c) && (c) <= 'z'))
10639 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10640 #endif
10641
10642 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10643 int
10644 main ()
10645 {
10646   int i;
10647   for (i = 0; i < 256; i++)
10648     if (XOR (islower (i), ISLOWER (i))
10649         || toupper (i) != TOUPPER (i))
10650       $ac_main_return(2);
10651   $ac_main_return (0);
10652 }
10653 _ACEOF
10654 rm -f conftest$ac_exeext
10655 if { (eval echo "$as_me:10655: \"$ac_link\"") >&5
10656   (eval $ac_link) 2>&5
10657   ac_status=$?
10658   echo "$as_me:10658: \$? = $ac_status" >&5
10659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10660   { (eval echo "$as_me:10660: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit $ac_status); }; }; then
10665   :
10666 else
10667   echo "$as_me: program exited with status $ac_status" >&5
10668 echo "$as_me: failed program was:" >&5
10669 cat conftest.$ac_ext >&5
10670 ac_cv_header_stdc=no
10671 fi
10672 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10673 fi
10674 fi
10675 fi
10676 echo "$as_me:10676: result: $ac_cv_header_stdc" >&5
10677 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10678 if test $ac_cv_header_stdc = yes; then
10679
10680 cat >>confdefs.h <<\EOF
10681 #define STDC_HEADERS 1
10682 EOF
10683
10684 fi
10685
10686 ac_header_dirent=no
10687 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10688   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10689 echo "$as_me:10689: checking for $ac_hdr that defines DIR" >&5
10690 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10691 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10692   echo $ECHO_N "(cached) $ECHO_C" >&6
10693 else
10694   cat >conftest.$ac_ext <<_ACEOF
10695 #line 10695 "configure"
10696 #include "confdefs.h"
10697 #include <sys/types.h>
10698 #include <$ac_hdr>
10699
10700 int
10701 main ()
10702 {
10703 if ((DIR *) 0)
10704 return 0;
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f conftest.$ac_objext
10710 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); } &&
10715          { ac_try='test -s conftest.$ac_objext'
10716   { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717   (eval $ac_try) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit $ac_status); }; }; then
10721   eval "$as_ac_Header=yes"
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 cat conftest.$ac_ext >&5
10725 eval "$as_ac_Header=no"
10726 fi
10727 rm -f conftest.$ac_objext conftest.$ac_ext
10728 fi
10729 echo "$as_me:10729: result: `eval echo '${'$as_ac_Header'}'`" >&5
10730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10732   cat >>confdefs.h <<EOF
10733 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10734 EOF
10735
10736 ac_header_dirent=$ac_hdr; break
10737 fi
10738
10739 done
10740 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10741 if test $ac_header_dirent = dirent.h; then
10742   echo "$as_me:10742: checking for opendir in -ldir" >&5
10743 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10744 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10745   echo $ECHO_N "(cached) $ECHO_C" >&6
10746 else
10747   ac_check_lib_save_LIBS=$LIBS
10748 LIBS="-ldir  $LIBS"
10749 cat >conftest.$ac_ext <<_ACEOF
10750 #line 10750 "configure"
10751 #include "confdefs.h"
10752
10753 /* Override any gcc2 internal prototype to avoid an error.  */
10754 #ifdef __cplusplus
10755 extern "C"
10756 #endif
10757 /* We use char because int might match the return type of a gcc2
10758    builtin and then its argument prototype would still apply.  */
10759 char opendir ();
10760 int
10761 main ()
10762 {
10763 opendir ();
10764   ;
10765   return 0;
10766 }
10767 _ACEOF
10768 rm -f conftest.$ac_objext conftest$ac_exeext
10769 if { (eval echo "$as_me:10769: \"$ac_link\"") >&5
10770   (eval $ac_link) 2>&5
10771   ac_status=$?
10772   echo "$as_me:10772: \$? = $ac_status" >&5
10773   (exit $ac_status); } &&
10774          { ac_try='test -s conftest$ac_exeext'
10775   { (eval echo "$as_me:10775: \"$ac_try\"") >&5
10776   (eval $ac_try) 2>&5
10777   ac_status=$?
10778   echo "$as_me:10778: \$? = $ac_status" >&5
10779   (exit $ac_status); }; }; then
10780   ac_cv_lib_dir_opendir=yes
10781 else
10782   echo "$as_me: failed program was:" >&5
10783 cat conftest.$ac_ext >&5
10784 ac_cv_lib_dir_opendir=no
10785 fi
10786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10787 LIBS=$ac_check_lib_save_LIBS
10788 fi
10789 echo "$as_me:10789: result: $ac_cv_lib_dir_opendir" >&5
10790 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10791 if test $ac_cv_lib_dir_opendir = yes; then
10792   LIBS="$LIBS -ldir"
10793 fi
10794
10795 else
10796   echo "$as_me:10796: checking for opendir in -lx" >&5
10797 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10798 if test "${ac_cv_lib_x_opendir+set}" = set; then
10799   echo $ECHO_N "(cached) $ECHO_C" >&6
10800 else
10801   ac_check_lib_save_LIBS=$LIBS
10802 LIBS="-lx  $LIBS"
10803 cat >conftest.$ac_ext <<_ACEOF
10804 #line 10804 "configure"
10805 #include "confdefs.h"
10806
10807 /* Override any gcc2 internal prototype to avoid an error.  */
10808 #ifdef __cplusplus
10809 extern "C"
10810 #endif
10811 /* We use char because int might match the return type of a gcc2
10812    builtin and then its argument prototype would still apply.  */
10813 char opendir ();
10814 int
10815 main ()
10816 {
10817 opendir ();
10818   ;
10819   return 0;
10820 }
10821 _ACEOF
10822 rm -f conftest.$ac_objext conftest$ac_exeext
10823 if { (eval echo "$as_me:10823: \"$ac_link\"") >&5
10824   (eval $ac_link) 2>&5
10825   ac_status=$?
10826   echo "$as_me:10826: \$? = $ac_status" >&5
10827   (exit $ac_status); } &&
10828          { ac_try='test -s conftest$ac_exeext'
10829   { (eval echo "$as_me:10829: \"$ac_try\"") >&5
10830   (eval $ac_try) 2>&5
10831   ac_status=$?
10832   echo "$as_me:10832: \$? = $ac_status" >&5
10833   (exit $ac_status); }; }; then
10834   ac_cv_lib_x_opendir=yes
10835 else
10836   echo "$as_me: failed program was:" >&5
10837 cat conftest.$ac_ext >&5
10838 ac_cv_lib_x_opendir=no
10839 fi
10840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10841 LIBS=$ac_check_lib_save_LIBS
10842 fi
10843 echo "$as_me:10843: result: $ac_cv_lib_x_opendir" >&5
10844 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10845 if test $ac_cv_lib_x_opendir = yes; then
10846   LIBS="$LIBS -lx"
10847 fi
10848
10849 fi
10850
10851 echo "$as_me:10851: checking whether time.h and sys/time.h may both be included" >&5
10852 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10853 if test "${ac_cv_header_time+set}" = set; then
10854   echo $ECHO_N "(cached) $ECHO_C" >&6
10855 else
10856   cat >conftest.$ac_ext <<_ACEOF
10857 #line 10857 "configure"
10858 #include "confdefs.h"
10859 #include <sys/types.h>
10860 #include <sys/time.h>
10861 #include <time.h>
10862
10863 int
10864 main ()
10865 {
10866 if ((struct tm *) 0)
10867 return 0;
10868   ;
10869   return 0;
10870 }
10871 _ACEOF
10872 rm -f conftest.$ac_objext
10873 if { (eval echo "$as_me:10873: \"$ac_compile\"") >&5
10874   (eval $ac_compile) 2>&5
10875   ac_status=$?
10876   echo "$as_me:10876: \$? = $ac_status" >&5
10877   (exit $ac_status); } &&
10878          { ac_try='test -s conftest.$ac_objext'
10879   { (eval echo "$as_me:10879: \"$ac_try\"") >&5
10880   (eval $ac_try) 2>&5
10881   ac_status=$?
10882   echo "$as_me:10882: \$? = $ac_status" >&5
10883   (exit $ac_status); }; }; then
10884   ac_cv_header_time=yes
10885 else
10886   echo "$as_me: failed program was:" >&5
10887 cat conftest.$ac_ext >&5
10888 ac_cv_header_time=no
10889 fi
10890 rm -f conftest.$ac_objext conftest.$ac_ext
10891 fi
10892 echo "$as_me:10892: result: $ac_cv_header_time" >&5
10893 echo "${ECHO_T}$ac_cv_header_time" >&6
10894 if test $ac_cv_header_time = yes; then
10895
10896 cat >>confdefs.h <<\EOF
10897 #define TIME_WITH_SYS_TIME 1
10898 EOF
10899
10900 fi
10901
10902 echo "$as_me:10902: checking for regular-expression headers" >&5
10903 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10904 if test "${cf_cv_regex+set}" = set; then
10905   echo $ECHO_N "(cached) $ECHO_C" >&6
10906 else
10907
10908 cat >conftest.$ac_ext <<_ACEOF
10909 #line 10909 "configure"
10910 #include "confdefs.h"
10911 #include <sys/types.h>
10912 #include <regex.h>
10913 int
10914 main ()
10915 {
10916
10917         regex_t *p;
10918         int x = regcomp(p, "", 0);
10919         int y = regexec(p, "", 0, 0, 0);
10920         regfree(p);
10921
10922   ;
10923   return 0;
10924 }
10925 _ACEOF
10926 rm -f conftest.$ac_objext conftest$ac_exeext
10927 if { (eval echo "$as_me:10927: \"$ac_link\"") >&5
10928   (eval $ac_link) 2>&5
10929   ac_status=$?
10930   echo "$as_me:10930: \$? = $ac_status" >&5
10931   (exit $ac_status); } &&
10932          { ac_try='test -s conftest$ac_exeext'
10933   { (eval echo "$as_me:10933: \"$ac_try\"") >&5
10934   (eval $ac_try) 2>&5
10935   ac_status=$?
10936   echo "$as_me:10936: \$? = $ac_status" >&5
10937   (exit $ac_status); }; }; then
10938   cf_cv_regex="regex.h"
10939 else
10940   echo "$as_me: failed program was:" >&5
10941 cat conftest.$ac_ext >&5
10942
10943         cat >conftest.$ac_ext <<_ACEOF
10944 #line 10944 "configure"
10945 #include "confdefs.h"
10946 #include <regexp.h>
10947 int
10948 main ()
10949 {
10950
10951                 char *p = compile("", "", "", 0);
10952                 int x = step("", "");
10953
10954   ;
10955   return 0;
10956 }
10957 _ACEOF
10958 rm -f conftest.$ac_objext conftest$ac_exeext
10959 if { (eval echo "$as_me:10959: \"$ac_link\"") >&5
10960   (eval $ac_link) 2>&5
10961   ac_status=$?
10962   echo "$as_me:10962: \$? = $ac_status" >&5
10963   (exit $ac_status); } &&
10964          { ac_try='test -s conftest$ac_exeext'
10965   { (eval echo "$as_me:10965: \"$ac_try\"") >&5
10966   (eval $ac_try) 2>&5
10967   ac_status=$?
10968   echo "$as_me:10968: \$? = $ac_status" >&5
10969   (exit $ac_status); }; }; then
10970   cf_cv_regex="regexp.h"
10971 else
10972   echo "$as_me: failed program was:" >&5
10973 cat conftest.$ac_ext >&5
10974
10975                 cf_save_LIBS="$LIBS"
10976                 LIBS="-lgen $LIBS"
10977                 cat >conftest.$ac_ext <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10980 #include <regexpr.h>
10981 int
10982 main ()
10983 {
10984
10985                         char *p = compile("", "", "");
10986                         int x = step("", "");
10987
10988   ;
10989   return 0;
10990 }
10991 _ACEOF
10992 rm -f conftest.$ac_objext conftest$ac_exeext
10993 if { (eval echo "$as_me:10993: \"$ac_link\"") >&5
10994   (eval $ac_link) 2>&5
10995   ac_status=$?
10996   echo "$as_me:10996: \$? = $ac_status" >&5
10997   (exit $ac_status); } &&
10998          { ac_try='test -s conftest$ac_exeext'
10999   { (eval echo "$as_me:10999: \"$ac_try\"") >&5
11000   (eval $ac_try) 2>&5
11001   ac_status=$?
11002   echo "$as_me:11002: \$? = $ac_status" >&5
11003   (exit $ac_status); }; }; then
11004   cf_cv_regex="regexpr.h"
11005 else
11006   echo "$as_me: failed program was:" >&5
11007 cat conftest.$ac_ext >&5
11008 LIBS="$cf_save_LIBS"
11009 fi
11010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11011 fi
11012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11013 fi
11014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11015
11016 fi
11017
11018 echo "$as_me:11018: result: $cf_cv_regex" >&5
11019 echo "${ECHO_T}$cf_cv_regex" >&6
11020 case $cf_cv_regex in
11021         regex.h)   cat >>confdefs.h <<\EOF
11022 #define HAVE_REGEX_H_FUNCS 1
11023 EOF
11024  ;;
11025         regexp.h)  cat >>confdefs.h <<\EOF
11026 #define HAVE_REGEXP_H_FUNCS 1
11027 EOF
11028  ;;
11029         regexpr.h) cat >>confdefs.h <<\EOF
11030 #define HAVE_REGEXPR_H_FUNCS 1
11031 EOF
11032  ;;
11033 esac
11034
11035 for ac_header in \
11036 fcntl.h \
11037 getopt.h \
11038 limits.h \
11039 locale.h \
11040 poll.h \
11041 sys/bsdtypes.h \
11042 sys/ioctl.h \
11043 sys/param.h \
11044 sys/poll.h \
11045 sys/select.h \
11046 sys/time.h \
11047 sys/times.h \
11048 ttyent.h \
11049 unistd.h \
11050 wctype.h \
11051
11052 do
11053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11054 echo "$as_me:11054: checking for $ac_header" >&5
11055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11057   echo $ECHO_N "(cached) $ECHO_C" >&6
11058 else
11059   cat >conftest.$ac_ext <<_ACEOF
11060 #line 11060 "configure"
11061 #include "confdefs.h"
11062 #include <$ac_header>
11063 _ACEOF
11064 if { (eval echo "$as_me:11064: \"$ac_cpp conftest.$ac_ext\"") >&5
11065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11066   ac_status=$?
11067   egrep -v '^ *\+' conftest.er1 >conftest.err
11068   rm -f conftest.er1
11069   cat conftest.err >&5
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit $ac_status); } >/dev/null; then
11072   if test -s conftest.err; then
11073     ac_cpp_err=$ac_c_preproc_warn_flag
11074   else
11075     ac_cpp_err=
11076   fi
11077 else
11078   ac_cpp_err=yes
11079 fi
11080 if test -z "$ac_cpp_err"; then
11081   eval "$as_ac_Header=yes"
11082 else
11083   echo "$as_me: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   eval "$as_ac_Header=no"
11086 fi
11087 rm -f conftest.err conftest.$ac_ext
11088 fi
11089 echo "$as_me:11089: result: `eval echo '${'$as_ac_Header'}'`" >&5
11090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11092   cat >>confdefs.h <<EOF
11093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11094 EOF
11095
11096 fi
11097 done
11098
11099 # check for ISC (this may also define _POSIX_SOURCE)
11100 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11101 if test "$ISC" = yes ; then
11102
11103 echo "$as_me:11103: checking for main in -lcposix" >&5
11104 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11105 if test "${ac_cv_lib_cposix_main+set}" = set; then
11106   echo $ECHO_N "(cached) $ECHO_C" >&6
11107 else
11108   ac_check_lib_save_LIBS=$LIBS
11109 LIBS="-lcposix  $LIBS"
11110 cat >conftest.$ac_ext <<_ACEOF
11111 #line 11111 "configure"
11112 #include "confdefs.h"
11113
11114 int
11115 main ()
11116 {
11117 main ();
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 rm -f conftest.$ac_objext conftest$ac_exeext
11123 if { (eval echo "$as_me:11123: \"$ac_link\"") >&5
11124   (eval $ac_link) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); } &&
11128          { ac_try='test -s conftest$ac_exeext'
11129   { (eval echo "$as_me:11129: \"$ac_try\"") >&5
11130   (eval $ac_try) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); }; }; then
11134   ac_cv_lib_cposix_main=yes
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138 ac_cv_lib_cposix_main=no
11139 fi
11140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11141 LIBS=$ac_check_lib_save_LIBS
11142 fi
11143 echo "$as_me:11143: result: $ac_cv_lib_cposix_main" >&5
11144 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11145 if test $ac_cv_lib_cposix_main = yes; then
11146   cat >>confdefs.h <<EOF
11147 #define HAVE_LIBCPOSIX 1
11148 EOF
11149
11150   LIBS="-lcposix $LIBS"
11151
11152 fi
11153
11154         echo "$as_me:11154: checking for bzero in -linet" >&5
11155 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11156 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11157   echo $ECHO_N "(cached) $ECHO_C" >&6
11158 else
11159   ac_check_lib_save_LIBS=$LIBS
11160 LIBS="-linet  $LIBS"
11161 cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11164
11165 /* Override any gcc2 internal prototype to avoid an error.  */
11166 #ifdef __cplusplus
11167 extern "C"
11168 #endif
11169 /* We use char because int might match the return type of a gcc2
11170    builtin and then its argument prototype would still apply.  */
11171 char bzero ();
11172 int
11173 main ()
11174 {
11175 bzero ();
11176   ;
11177   return 0;
11178 }
11179 _ACEOF
11180 rm -f conftest.$ac_objext conftest$ac_exeext
11181 if { (eval echo "$as_me:11181: \"$ac_link\"") >&5
11182   (eval $ac_link) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); } &&
11186          { ac_try='test -s conftest$ac_exeext'
11187   { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit $ac_status); }; }; then
11192   ac_cv_lib_inet_bzero=yes
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 cat conftest.$ac_ext >&5
11196 ac_cv_lib_inet_bzero=no
11197 fi
11198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11199 LIBS=$ac_check_lib_save_LIBS
11200 fi
11201 echo "$as_me:11201: result: $ac_cv_lib_inet_bzero" >&5
11202 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11203 if test $ac_cv_lib_inet_bzero = yes; then
11204   LIBS="$LIBS -linet"
11205 fi
11206 fi
11207
11208 echo "$as_me:11208: checking if sys/time.h works with sys/select.h" >&5
11209 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11210 if test "${cf_cv_sys_time_select+set}" = set; then
11211   echo $ECHO_N "(cached) $ECHO_C" >&6
11212 else
11213
11214 cat >conftest.$ac_ext <<_ACEOF
11215 #line 11215 "configure"
11216 #include "confdefs.h"
11217
11218 #include <sys/types.h>
11219 #ifdef HAVE_SYS_TIME_H
11220 #include <sys/time.h>
11221 #endif
11222 #ifdef HAVE_SYS_SELECT_H
11223 #include <sys/select.h>
11224 #endif
11225
11226 int
11227 main ()
11228 {
11229
11230   ;
11231   return 0;
11232 }
11233 _ACEOF
11234 rm -f conftest.$ac_objext
11235 if { (eval echo "$as_me:11235: \"$ac_compile\"") >&5
11236   (eval $ac_compile) 2>&5
11237   ac_status=$?
11238   echo "$as_me:11238: \$? = $ac_status" >&5
11239   (exit $ac_status); } &&
11240          { ac_try='test -s conftest.$ac_objext'
11241   { (eval echo "$as_me:11241: \"$ac_try\"") >&5
11242   (eval $ac_try) 2>&5
11243   ac_status=$?
11244   echo "$as_me:11244: \$? = $ac_status" >&5
11245   (exit $ac_status); }; }; then
11246   cf_cv_sys_time_select=yes
11247 else
11248   echo "$as_me: failed program was:" >&5
11249 cat conftest.$ac_ext >&5
11250 cf_cv_sys_time_select=no
11251 fi
11252 rm -f conftest.$ac_objext conftest.$ac_ext
11253
11254 fi
11255
11256 echo "$as_me:11256: result: $cf_cv_sys_time_select" >&5
11257 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11258 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11259 #define HAVE_SYS_TIME_SELECT 1
11260 EOF
11261
11262 ###     checks for compiler characteristics
11263 ac_ext=c
11264 ac_cpp='$CPP $CPPFLAGS'
11265 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11266 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11267 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11268 ac_main_return=return
11269
11270 echo "$as_me:11270: checking for $CC option to accept ANSI C" >&5
11271 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11272 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11273   echo $ECHO_N "(cached) $ECHO_C" >&6
11274 else
11275   ac_cv_prog_cc_stdc=no
11276 ac_save_CC=$CC
11277 cat >conftest.$ac_ext <<_ACEOF
11278 #line 11278 "configure"
11279 #include "confdefs.h"
11280 #include <stdarg.h>
11281 #include <stdio.h>
11282 #include <sys/types.h>
11283 #include <sys/stat.h>
11284 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11285 struct buf { int x; };
11286 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11287 static char *e (p, i)
11288      char **p;
11289      int i;
11290 {
11291   return p[i];
11292 }
11293 static char *f (char * (*g) (char **, int), char **p, ...)
11294 {
11295   char *s;
11296   va_list v;
11297   va_start (v,p);
11298   s = g (p, va_arg (v,int));
11299   va_end (v);
11300   return s;
11301 }
11302 int test (int i, double x);
11303 struct s1 {int (*f) (int a);};
11304 struct s2 {int (*f) (double a);};
11305 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11306 int argc;
11307 char **argv;
11308 int
11309 main ()
11310 {
11311 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11312   ;
11313   return 0;
11314 }
11315 _ACEOF
11316 # Don't try gcc -ansi; that turns off useful extensions and
11317 # breaks some systems' header files.
11318 # AIX                   -qlanglvl=ansi
11319 # Ultrix and OSF/1      -std1
11320 # HP-UX 10.20 and later -Ae
11321 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11322 # SVR4                  -Xc -D__EXTENSIONS__
11323 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11324 do
11325   CC="$ac_save_CC $ac_arg"
11326   rm -f conftest.$ac_objext
11327 if { (eval echo "$as_me:11327: \"$ac_compile\"") >&5
11328   (eval $ac_compile) 2>&5
11329   ac_status=$?
11330   echo "$as_me:11330: \$? = $ac_status" >&5
11331   (exit $ac_status); } &&
11332          { ac_try='test -s conftest.$ac_objext'
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_prog_cc_stdc=$ac_arg
11339 break
11340 else
11341   echo "$as_me: failed program was:" >&5
11342 cat conftest.$ac_ext >&5
11343 fi
11344 rm -f conftest.$ac_objext
11345 done
11346 rm -f conftest.$ac_ext conftest.$ac_objext
11347 CC=$ac_save_CC
11348
11349 fi
11350
11351 case "x$ac_cv_prog_cc_stdc" in
11352   x|xno)
11353     echo "$as_me:11353: result: none needed" >&5
11354 echo "${ECHO_T}none needed" >&6 ;;
11355   *)
11356     echo "$as_me:11356: result: $ac_cv_prog_cc_stdc" >&5
11357 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11358     CC="$CC $ac_cv_prog_cc_stdc" ;;
11359 esac
11360
11361 echo "$as_me:11361: checking for an ANSI C-conforming const" >&5
11362 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11363 if test "${ac_cv_c_const+set}" = set; then
11364   echo $ECHO_N "(cached) $ECHO_C" >&6
11365 else
11366   cat >conftest.$ac_ext <<_ACEOF
11367 #line 11367 "configure"
11368 #include "confdefs.h"
11369
11370 int
11371 main ()
11372 {
11373 /* FIXME: Include the comments suggested by Paul. */
11374 #ifndef __cplusplus
11375   /* Ultrix mips cc rejects this.  */
11376   typedef int charset[2];
11377   const charset x;
11378   /* SunOS 4.1.1 cc rejects this.  */
11379   char const *const *ccp;
11380   char **p;
11381   /* NEC SVR4.0.2 mips cc rejects this.  */
11382   struct point {int x, y;};
11383   static struct point const zero = {0,0};
11384   /* AIX XL C 1.02.0.0 rejects this.
11385      It does not let you subtract one const X* pointer from another in
11386      an arm of an if-expression whose if-part is not a constant
11387      expression */
11388   const char *g = "string";
11389   ccp = &g + (g ? g-g : 0);
11390   /* HPUX 7.0 cc rejects these. */
11391   ++ccp;
11392   p = (char**) ccp;
11393   ccp = (char const *const *) p;
11394   { /* SCO 3.2v4 cc rejects this.  */
11395     char *t;
11396     char const *s = 0 ? (char *) 0 : (char const *) 0;
11397
11398     *t++ = 0;
11399   }
11400   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11401     int x[] = {25, 17};
11402     const int *foo = &x[0];
11403     ++foo;
11404   }
11405   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11406     typedef const int *iptr;
11407     iptr p = 0;
11408     ++p;
11409   }
11410   { /* AIX XL C 1.02.0.0 rejects this saying
11411        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11412     struct s { int j; const int *ap[3]; };
11413     struct s *b; b->j = 5;
11414   }
11415   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11416     const int foo = 10;
11417   }
11418 #endif
11419
11420   ;
11421   return 0;
11422 }
11423 _ACEOF
11424 rm -f conftest.$ac_objext
11425 if { (eval echo "$as_me:11425: \"$ac_compile\"") >&5
11426   (eval $ac_compile) 2>&5
11427   ac_status=$?
11428   echo "$as_me:11428: \$? = $ac_status" >&5
11429   (exit $ac_status); } &&
11430          { ac_try='test -s conftest.$ac_objext'
11431   { (eval echo "$as_me:11431: \"$ac_try\"") >&5
11432   (eval $ac_try) 2>&5
11433   ac_status=$?
11434   echo "$as_me:11434: \$? = $ac_status" >&5
11435   (exit $ac_status); }; }; then
11436   ac_cv_c_const=yes
11437 else
11438   echo "$as_me: failed program was:" >&5
11439 cat conftest.$ac_ext >&5
11440 ac_cv_c_const=no
11441 fi
11442 rm -f conftest.$ac_objext conftest.$ac_ext
11443 fi
11444 echo "$as_me:11444: result: $ac_cv_c_const" >&5
11445 echo "${ECHO_T}$ac_cv_c_const" >&6
11446 if test $ac_cv_c_const = no; then
11447
11448 cat >>confdefs.h <<\EOF
11449 #define const
11450 EOF
11451
11452 fi
11453
11454 echo "$as_me:11454: checking for inline" >&5
11455 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11456 if test "${ac_cv_c_inline+set}" = set; then
11457   echo $ECHO_N "(cached) $ECHO_C" >&6
11458 else
11459   ac_cv_c_inline=no
11460 for ac_kw in inline __inline__ __inline; do
11461   cat >conftest.$ac_ext <<_ACEOF
11462 #line 11462 "configure"
11463 #include "confdefs.h"
11464 #ifndef __cplusplus
11465 static $ac_kw int static_foo () {return 0; }
11466 $ac_kw int foo () {return 0; }
11467 #endif
11468
11469 _ACEOF
11470 rm -f conftest.$ac_objext
11471 if { (eval echo "$as_me:11471: \"$ac_compile\"") >&5
11472   (eval $ac_compile) 2>&5
11473   ac_status=$?
11474   echo "$as_me:11474: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -s conftest.$ac_objext'
11477   { (eval echo "$as_me:11477: \"$ac_try\"") >&5
11478   (eval $ac_try) 2>&5
11479   ac_status=$?
11480   echo "$as_me:11480: \$? = $ac_status" >&5
11481   (exit $ac_status); }; }; then
11482   ac_cv_c_inline=$ac_kw; break
11483 else
11484   echo "$as_me: failed program was:" >&5
11485 cat conftest.$ac_ext >&5
11486 fi
11487 rm -f conftest.$ac_objext conftest.$ac_ext
11488 done
11489
11490 fi
11491 echo "$as_me:11491: result: $ac_cv_c_inline" >&5
11492 echo "${ECHO_T}$ac_cv_c_inline" >&6
11493 case $ac_cv_c_inline in
11494   inline | yes) ;;
11495   no)
11496 cat >>confdefs.h <<\EOF
11497 #define inline
11498 EOF
11499  ;;
11500   *)  cat >>confdefs.h <<EOF
11501 #define inline $ac_cv_c_inline
11502 EOF
11503  ;;
11504 esac
11505
11506 NCURSES_INLINE=
11507 if test "$ac_cv_c_inline" != no ; then
11508         NCURSES_INLINE=inline
11509         if test "$GCC" = yes
11510         then
11511                 echo "$as_me:11511: checking if gcc supports options to tune inlining" >&5
11512 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11513 if test "${cf_cv_gcc_inline+set}" = set; then
11514   echo $ECHO_N "(cached) $ECHO_C" >&6
11515 else
11516
11517                         cf_save_CFLAGS=$CFLAGS
11518                         CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11519                         cat >conftest.$ac_ext <<_ACEOF
11520 #line 11520 "configure"
11521 #include "confdefs.h"
11522 inline int foo(void) { return 1; }
11523 int
11524 main ()
11525 {
11526 ${cf_cv_main_return:-return} foo()
11527   ;
11528   return 0;
11529 }
11530 _ACEOF
11531 rm -f conftest.$ac_objext
11532 if { (eval echo "$as_me:11532: \"$ac_compile\"") >&5
11533   (eval $ac_compile) 2>&5
11534   ac_status=$?
11535   echo "$as_me:11535: \$? = $ac_status" >&5
11536   (exit $ac_status); } &&
11537          { ac_try='test -s conftest.$ac_objext'
11538   { (eval echo "$as_me:11538: \"$ac_try\"") >&5
11539   (eval $ac_try) 2>&5
11540   ac_status=$?
11541   echo "$as_me:11541: \$? = $ac_status" >&5
11542   (exit $ac_status); }; }; then
11543   cf_cv_gcc_inline=yes
11544 else
11545   echo "$as_me: failed program was:" >&5
11546 cat conftest.$ac_ext >&5
11547 cf_cv_gcc_inline=no
11548 fi
11549 rm -f conftest.$ac_objext conftest.$ac_ext
11550                         CFLAGS=$cf_save_CFLAGS
11551
11552 fi
11553 echo "$as_me:11553: result: $cf_cv_gcc_inline" >&5
11554 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11555                 if test "$cf_cv_gcc_inline" = yes ; then
11556
11557 cf_fix_cppflags=no
11558 cf_new_cflags=
11559 cf_new_cppflags=
11560 cf_new_extra_cppflags=
11561
11562 for cf_add_cflags in --param max-inline-insns-single=1200
11563 do
11564 case $cf_fix_cppflags in
11565 no)
11566         case $cf_add_cflags in #(vi
11567         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11568                 case $cf_add_cflags in
11569                 -D*)
11570                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11571
11572                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11573                         && test -z "${cf_tst_cflags}" \
11574                         && cf_fix_cppflags=yes
11575
11576                         if test $cf_fix_cppflags = yes ; then
11577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11578                                 continue
11579                         elif test "${cf_tst_cflags}" = "\"'" ; then
11580                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11581                                 continue
11582                         fi
11583                         ;;
11584                 esac
11585                 case "$CPPFLAGS" in
11586                 *$cf_add_cflags) #(vi
11587                         ;;
11588                 *) #(vi
11589                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11590                         ;;
11591                 esac
11592                 ;;
11593         *)
11594                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11595                 ;;
11596         esac
11597         ;;
11598 yes)
11599         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11600
11601         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11602
11603         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11604         && test -z "${cf_tst_cflags}" \
11605         && cf_fix_cppflags=no
11606         ;;
11607 esac
11608 done
11609
11610 if test -n "$cf_new_cflags" ; then
11611
11612         CFLAGS="$CFLAGS $cf_new_cflags"
11613 fi
11614
11615 if test -n "$cf_new_cppflags" ; then
11616
11617         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11618 fi
11619
11620 if test -n "$cf_new_extra_cppflags" ; then
11621
11622         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11623 fi
11624
11625                 fi
11626         fi
11627 fi
11628
11629 echo "$as_me:11629: checking for signal global datatype" >&5
11630 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11631 if test "${cf_cv_sig_atomic_t+set}" = set; then
11632   echo $ECHO_N "(cached) $ECHO_C" >&6
11633 else
11634
11635         for cf_type in \
11636                 "volatile sig_atomic_t" \
11637                 "sig_atomic_t" \
11638                 "int"
11639         do
11640         cat >conftest.$ac_ext <<_ACEOF
11641 #line 11641 "configure"
11642 #include "confdefs.h"
11643
11644 #include <sys/types.h>
11645 #include <signal.h>
11646 #include <stdio.h>
11647
11648 extern $cf_type x;
11649 $cf_type x;
11650 static void handler(int sig)
11651 {
11652         x = 5;
11653 }
11654 int
11655 main ()
11656 {
11657 signal(SIGINT, handler);
11658                  x = 1
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -f conftest.$ac_objext
11664 if { (eval echo "$as_me:11664: \"$ac_compile\"") >&5
11665   (eval $ac_compile) 2>&5
11666   ac_status=$?
11667   echo "$as_me:11667: \$? = $ac_status" >&5
11668   (exit $ac_status); } &&
11669          { ac_try='test -s conftest.$ac_objext'
11670   { (eval echo "$as_me:11670: \"$ac_try\"") >&5
11671   (eval $ac_try) 2>&5
11672   ac_status=$?
11673   echo "$as_me:11673: \$? = $ac_status" >&5
11674   (exit $ac_status); }; }; then
11675   cf_cv_sig_atomic_t=$cf_type
11676 else
11677   echo "$as_me: failed program was:" >&5
11678 cat conftest.$ac_ext >&5
11679 cf_cv_sig_atomic_t=no
11680 fi
11681 rm -f conftest.$ac_objext conftest.$ac_ext
11682                 test "$cf_cv_sig_atomic_t" != no && break
11683         done
11684
11685 fi
11686
11687 echo "$as_me:11687: result: $cf_cv_sig_atomic_t" >&5
11688 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11689 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11690 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11691 EOF
11692
11693 if test $NCURSES_CHTYPE = auto ; then
11694
11695 echo "$as_me:11695: checking for type of chtype" >&5
11696 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11697 if test "${cf_cv_typeof_chtype+set}" = set; then
11698   echo $ECHO_N "(cached) $ECHO_C" >&6
11699 else
11700
11701                 if test "$cross_compiling" = yes; then
11702   cf_cv_typeof_chtype=long
11703 else
11704   cat >conftest.$ac_ext <<_ACEOF
11705 #line 11705 "configure"
11706 #include "confdefs.h"
11707
11708 #define WANT_BITS 31
11709 #include <stdio.h>
11710 int main()
11711 {
11712         FILE *fp = fopen("cf_test.out", "w");
11713         if (fp != 0) {
11714                 char *result = "long";
11715                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11716                         int n;
11717                         unsigned int x, y;
11718                         for (n = 0; n < WANT_BITS; n++) {
11719                                 x = (1 << n);
11720                                 y = (x >> n);
11721                                 if (y != 1 || x == 0) {
11722                                         x = 0;
11723                                         break;
11724                                 }
11725                         }
11726                         /*
11727                          * If x is nonzero, an int is big enough for the bits
11728                          * that we want.
11729                          */
11730                         result = (x != 0) ? "int" : "long";
11731                 }
11732                 fputs(result, fp);
11733                 fclose(fp);
11734         }
11735         ${cf_cv_main_return:-return}(0);
11736 }
11737
11738 _ACEOF
11739 rm -f conftest$ac_exeext
11740 if { (eval echo "$as_me:11740: \"$ac_link\"") >&5
11741   (eval $ac_link) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11745   { (eval echo "$as_me:11745: \"$ac_try\"") >&5
11746   (eval $ac_try) 2>&5
11747   ac_status=$?
11748   echo "$as_me:11748: \$? = $ac_status" >&5
11749   (exit $ac_status); }; }; then
11750   cf_cv_typeof_chtype=`cat cf_test.out`
11751 else
11752   echo "$as_me: program exited with status $ac_status" >&5
11753 echo "$as_me: failed program was:" >&5
11754 cat conftest.$ac_ext >&5
11755 cf_cv_typeof_chtype=long
11756 fi
11757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11758 fi
11759                 rm -f cf_test.out
11760
11761 fi
11762
11763 echo "$as_me:11763: result: $cf_cv_typeof_chtype" >&5
11764 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11765
11766 cat >>confdefs.h <<EOF
11767 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11768 EOF
11769
11770 else
11771         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11772 fi
11773 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11774
11775 echo "$as_me:11775: checking if unsigned literals are legal" >&5
11776 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11777 if test "${cf_cv_unsigned_literals+set}" = set; then
11778   echo $ECHO_N "(cached) $ECHO_C" >&6
11779 else
11780
11781         cat >conftest.$ac_ext <<_ACEOF
11782 #line 11782 "configure"
11783 #include "confdefs.h"
11784
11785 int
11786 main ()
11787 {
11788 long x = 1L + 1UL + 1U + 1
11789   ;
11790   return 0;
11791 }
11792 _ACEOF
11793 rm -f conftest.$ac_objext
11794 if { (eval echo "$as_me:11794: \"$ac_compile\"") >&5
11795   (eval $ac_compile) 2>&5
11796   ac_status=$?
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); } &&
11799          { ac_try='test -s conftest.$ac_objext'
11800   { (eval echo "$as_me:11800: \"$ac_try\"") >&5
11801   (eval $ac_try) 2>&5
11802   ac_status=$?
11803   echo "$as_me:11803: \$? = $ac_status" >&5
11804   (exit $ac_status); }; }; then
11805   cf_cv_unsigned_literals=yes
11806 else
11807   echo "$as_me: failed program was:" >&5
11808 cat conftest.$ac_ext >&5
11809 cf_cv_unsigned_literals=no
11810 fi
11811 rm -f conftest.$ac_objext conftest.$ac_ext
11812
11813 fi
11814
11815 echo "$as_me:11815: result: $cf_cv_unsigned_literals" >&5
11816 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11817
11818 cf_cv_1UL="1"
11819 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11820 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11821
11822 if test $NCURSES_MMASK_T = auto ; then
11823         cf_cv_typeof_mmask_t=long
11824 else
11825         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11826 fi
11827 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11828
11829 ###     Checks for external-data
11830
11831 echo "$as_me:11831: checking if external errno is declared" >&5
11832 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11833 if test "${cf_cv_dcl_errno+set}" = set; then
11834   echo $ECHO_N "(cached) $ECHO_C" >&6
11835 else
11836
11837     cat >conftest.$ac_ext <<_ACEOF
11838 #line 11838 "configure"
11839 #include "confdefs.h"
11840
11841 #ifdef HAVE_STDLIB_H
11842 #include <stdlib.h>
11843 #endif
11844 #include <stdio.h>
11845 #include <sys/types.h>
11846 #include <errno.h>
11847 int
11848 main ()
11849 {
11850 long x = (long) errno
11851   ;
11852   return 0;
11853 }
11854 _ACEOF
11855 rm -f conftest.$ac_objext
11856 if { (eval echo "$as_me:11856: \"$ac_compile\"") >&5
11857   (eval $ac_compile) 2>&5
11858   ac_status=$?
11859   echo "$as_me:11859: \$? = $ac_status" >&5
11860   (exit $ac_status); } &&
11861          { ac_try='test -s conftest.$ac_objext'
11862   { (eval echo "$as_me:11862: \"$ac_try\"") >&5
11863   (eval $ac_try) 2>&5
11864   ac_status=$?
11865   echo "$as_me:11865: \$? = $ac_status" >&5
11866   (exit $ac_status); }; }; then
11867   cf_cv_dcl_errno=yes
11868 else
11869   echo "$as_me: failed program was:" >&5
11870 cat conftest.$ac_ext >&5
11871 cf_cv_dcl_errno=no
11872 fi
11873 rm -f conftest.$ac_objext conftest.$ac_ext
11874
11875 fi
11876 echo "$as_me:11876: result: $cf_cv_dcl_errno" >&5
11877 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11878
11879 if test "$cf_cv_dcl_errno" = no ; then
11880
11881 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11882
11883     cat >>confdefs.h <<EOF
11884 #define $cf_result 1
11885 EOF
11886
11887 fi
11888
11889 # It's possible (for near-UNIX clones) that the data doesn't exist
11890
11891 echo "$as_me:11891: checking if external errno exists" >&5
11892 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11893 if test "${cf_cv_have_errno+set}" = set; then
11894   echo $ECHO_N "(cached) $ECHO_C" >&6
11895 else
11896
11897     cat >conftest.$ac_ext <<_ACEOF
11898 #line 11898 "configure"
11899 #include "confdefs.h"
11900
11901 #undef errno
11902 extern int errno;
11903
11904 int
11905 main ()
11906 {
11907 errno = 2
11908   ;
11909   return 0;
11910 }
11911 _ACEOF
11912 rm -f conftest.$ac_objext conftest$ac_exeext
11913 if { (eval echo "$as_me:11913: \"$ac_link\"") >&5
11914   (eval $ac_link) 2>&5
11915   ac_status=$?
11916   echo "$as_me:11916: \$? = $ac_status" >&5
11917   (exit $ac_status); } &&
11918          { ac_try='test -s conftest$ac_exeext'
11919   { (eval echo "$as_me:11919: \"$ac_try\"") >&5
11920   (eval $ac_try) 2>&5
11921   ac_status=$?
11922   echo "$as_me:11922: \$? = $ac_status" >&5
11923   (exit $ac_status); }; }; then
11924   cf_cv_have_errno=yes
11925 else
11926   echo "$as_me: failed program was:" >&5
11927 cat conftest.$ac_ext >&5
11928 cf_cv_have_errno=no
11929 fi
11930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11931
11932 fi
11933 echo "$as_me:11933: result: $cf_cv_have_errno" >&5
11934 echo "${ECHO_T}$cf_cv_have_errno" >&6
11935
11936 if test "$cf_cv_have_errno" = yes ; then
11937
11938 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11939
11940     cat >>confdefs.h <<EOF
11941 #define $cf_result 1
11942 EOF
11943
11944 fi
11945
11946 echo "$as_me:11946: checking if data-only library module links" >&5
11947 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11948 if test "${cf_cv_link_dataonly+set}" = set; then
11949   echo $ECHO_N "(cached) $ECHO_C" >&6
11950 else
11951
11952         rm -f conftest.a
11953         cat >conftest.$ac_ext <<EOF
11954 #line 11954 "configure"
11955 int     testdata[3] = { 123, 456, 789 };
11956 EOF
11957         if { (eval echo "$as_me:11957: \"$ac_compile\"") >&5
11958   (eval $ac_compile) 2>&5
11959   ac_status=$?
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit $ac_status); } ; then
11962                 mv conftest.o data.o && \
11963                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11964         fi
11965         rm -f conftest.$ac_ext data.o
11966         cat >conftest.$ac_ext <<EOF
11967 #line 11967 "configure"
11968 int     testfunc()
11969 {
11970 #if defined(NeXT)
11971         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11972 #else
11973         extern int testdata[3];
11974         return testdata[0] == 123
11975            &&  testdata[1] == 456
11976            &&  testdata[2] == 789;
11977 #endif
11978 }
11979 EOF
11980         if { (eval echo "$as_me:11980: \"$ac_compile\"") >&5
11981   (eval $ac_compile) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit $ac_status); }; then
11985                 mv conftest.o func.o && \
11986                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11987         fi
11988         rm -f conftest.$ac_ext func.o
11989         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11990         cf_saveLIBS="$LIBS"
11991         LIBS="conftest.a $LIBS"
11992         if test "$cross_compiling" = yes; then
11993   cf_cv_link_dataonly=unknown
11994 else
11995   cat >conftest.$ac_ext <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
11998
11999         int main()
12000         {
12001                 extern int testfunc();
12002                 ${cf_cv_main_return:-return} (!testfunc());
12003         }
12004
12005 _ACEOF
12006 rm -f conftest$ac_exeext
12007 if { (eval echo "$as_me:12007: \"$ac_link\"") >&5
12008   (eval $ac_link) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12012   { (eval echo "$as_me:12012: \"$ac_try\"") >&5
12013   (eval $ac_try) 2>&5
12014   ac_status=$?
12015   echo "$as_me:12015: \$? = $ac_status" >&5
12016   (exit $ac_status); }; }; then
12017   cf_cv_link_dataonly=yes
12018 else
12019   echo "$as_me: program exited with status $ac_status" >&5
12020 echo "$as_me: failed program was:" >&5
12021 cat conftest.$ac_ext >&5
12022 cf_cv_link_dataonly=no
12023 fi
12024 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12025 fi
12026         LIBS="$cf_saveLIBS"
12027
12028 fi
12029
12030 echo "$as_me:12030: result: $cf_cv_link_dataonly" >&5
12031 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12032
12033 if test "$cf_cv_link_dataonly" = no ; then
12034         cat >>confdefs.h <<\EOF
12035 #define BROKEN_LINKER 1
12036 EOF
12037
12038         BROKEN_LINKER=1
12039 fi
12040
12041 ###     Checks for library functions.
12042
12043 for ac_func in \
12044 getcwd \
12045 getegid \
12046 geteuid \
12047 getttynam \
12048 issetugid \
12049 poll \
12050 remove \
12051 select \
12052 setbuf \
12053 setbuffer \
12054 setvbuf \
12055 sigaction \
12056 sigvec \
12057 strdup \
12058 strstr \
12059 tcgetpgrp \
12060 times \
12061 vsnprintf \
12062
12063 do
12064 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12065 echo "$as_me:12065: checking for $ac_func" >&5
12066 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12067 if eval "test \"\${$as_ac_var+set}\" = set"; then
12068   echo $ECHO_N "(cached) $ECHO_C" >&6
12069 else
12070   cat >conftest.$ac_ext <<_ACEOF
12071 #line 12071 "configure"
12072 #include "confdefs.h"
12073 /* System header to define __stub macros and hopefully few prototypes,
12074     which can conflict with char $ac_func (); below.  */
12075 #include <assert.h>
12076 /* Override any gcc2 internal prototype to avoid an error.  */
12077 #ifdef __cplusplus
12078 extern "C"
12079 #endif
12080 /* We use char because int might match the return type of a gcc2
12081    builtin and then its argument prototype would still apply.  */
12082 char $ac_func ();
12083 char (*f) ();
12084
12085 int
12086 main ()
12087 {
12088 /* The GNU C library defines this for functions which it implements
12089     to always fail with ENOSYS.  Some functions are actually named
12090     something starting with __ and the normal name is an alias.  */
12091 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12092 choke me
12093 #else
12094 f = $ac_func;
12095 #endif
12096
12097   ;
12098   return 0;
12099 }
12100 _ACEOF
12101 rm -f conftest.$ac_objext conftest$ac_exeext
12102 if { (eval echo "$as_me:12102: \"$ac_link\"") >&5
12103   (eval $ac_link) 2>&5
12104   ac_status=$?
12105   echo "$as_me:12105: \$? = $ac_status" >&5
12106   (exit $ac_status); } &&
12107          { ac_try='test -s conftest$ac_exeext'
12108   { (eval echo "$as_me:12108: \"$ac_try\"") >&5
12109   (eval $ac_try) 2>&5
12110   ac_status=$?
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit $ac_status); }; }; then
12113   eval "$as_ac_var=yes"
12114 else
12115   echo "$as_me: failed program was:" >&5
12116 cat conftest.$ac_ext >&5
12117 eval "$as_ac_var=no"
12118 fi
12119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12120 fi
12121 echo "$as_me:12121: result: `eval echo '${'$as_ac_var'}'`" >&5
12122 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12123 if test `eval echo '${'$as_ac_var'}'` = yes; then
12124   cat >>confdefs.h <<EOF
12125 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12126 EOF
12127
12128 fi
12129 done
12130
12131 if test "$with_getcap" = "yes" ; then
12132
12133 echo "$as_me:12133: checking for terminal-capability database functions" >&5
12134 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12135 if test "${cf_cv_cgetent+set}" = set; then
12136   echo $ECHO_N "(cached) $ECHO_C" >&6
12137 else
12138
12139 cat >conftest.$ac_ext <<_ACEOF
12140 #line 12140 "configure"
12141 #include "confdefs.h"
12142
12143 #include <stdlib.h>
12144 int
12145 main ()
12146 {
12147
12148         char temp[128];
12149         char *buf = temp;
12150         char *db_array = temp;
12151         cgetent(&buf, /* int *, */ &db_array, "vt100");
12152         cgetcap(buf, "tc", '=');
12153         cgetmatch(buf, "tc");
12154
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 rm -f conftest.$ac_objext conftest$ac_exeext
12160 if { (eval echo "$as_me:12160: \"$ac_link\"") >&5
12161   (eval $ac_link) 2>&5
12162   ac_status=$?
12163   echo "$as_me:12163: \$? = $ac_status" >&5
12164   (exit $ac_status); } &&
12165          { ac_try='test -s conftest$ac_exeext'
12166   { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167   (eval $ac_try) 2>&5
12168   ac_status=$?
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); }; }; then
12171   cf_cv_cgetent=yes
12172 else
12173   echo "$as_me: failed program was:" >&5
12174 cat conftest.$ac_ext >&5
12175 cf_cv_cgetent=no
12176 fi
12177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12178
12179 fi
12180
12181 echo "$as_me:12181: result: $cf_cv_cgetent" >&5
12182 echo "${ECHO_T}$cf_cv_cgetent" >&6
12183 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12184 #define HAVE_BSD_CGETENT 1
12185 EOF
12186
12187 fi
12188
12189 echo "$as_me:12189: checking for isascii" >&5
12190 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12191 if test "${cf_cv_have_isascii+set}" = set; then
12192   echo $ECHO_N "(cached) $ECHO_C" >&6
12193 else
12194
12195         cat >conftest.$ac_ext <<_ACEOF
12196 #line 12196 "configure"
12197 #include "confdefs.h"
12198 #include <ctype.h>
12199 int
12200 main ()
12201 {
12202 int x = isascii(' ')
12203   ;
12204   return 0;
12205 }
12206 _ACEOF
12207 rm -f conftest.$ac_objext conftest$ac_exeext
12208 if { (eval echo "$as_me:12208: \"$ac_link\"") >&5
12209   (eval $ac_link) 2>&5
12210   ac_status=$?
12211   echo "$as_me:12211: \$? = $ac_status" >&5
12212   (exit $ac_status); } &&
12213          { ac_try='test -s conftest$ac_exeext'
12214   { (eval echo "$as_me:12214: \"$ac_try\"") >&5
12215   (eval $ac_try) 2>&5
12216   ac_status=$?
12217   echo "$as_me:12217: \$? = $ac_status" >&5
12218   (exit $ac_status); }; }; then
12219   cf_cv_have_isascii=yes
12220 else
12221   echo "$as_me: failed program was:" >&5
12222 cat conftest.$ac_ext >&5
12223 cf_cv_have_isascii=no
12224 fi
12225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12226
12227 fi
12228 echo "$as_me:12228: result: $cf_cv_have_isascii" >&5
12229 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12230 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12231 #define HAVE_ISASCII 1
12232 EOF
12233
12234 if test "$ac_cv_func_sigaction" = yes; then
12235 echo "$as_me:12235: checking whether sigaction needs _POSIX_SOURCE" >&5
12236 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12237 cat >conftest.$ac_ext <<_ACEOF
12238 #line 12238 "configure"
12239 #include "confdefs.h"
12240
12241 #include <sys/types.h>
12242 #include <signal.h>
12243 int
12244 main ()
12245 {
12246 struct sigaction act
12247   ;
12248   return 0;
12249 }
12250 _ACEOF
12251 rm -f conftest.$ac_objext
12252 if { (eval echo "$as_me:12252: \"$ac_compile\"") >&5
12253   (eval $ac_compile) 2>&5
12254   ac_status=$?
12255   echo "$as_me:12255: \$? = $ac_status" >&5
12256   (exit $ac_status); } &&
12257          { ac_try='test -s conftest.$ac_objext'
12258   { (eval echo "$as_me:12258: \"$ac_try\"") >&5
12259   (eval $ac_try) 2>&5
12260   ac_status=$?
12261   echo "$as_me:12261: \$? = $ac_status" >&5
12262   (exit $ac_status); }; }; then
12263   sigact_bad=no
12264 else
12265   echo "$as_me: failed program was:" >&5
12266 cat conftest.$ac_ext >&5
12267
12268 cat >conftest.$ac_ext <<_ACEOF
12269 #line 12269 "configure"
12270 #include "confdefs.h"
12271
12272 #define _POSIX_SOURCE
12273 #include <sys/types.h>
12274 #include <signal.h>
12275 int
12276 main ()
12277 {
12278 struct sigaction act
12279   ;
12280   return 0;
12281 }
12282 _ACEOF
12283 rm -f conftest.$ac_objext
12284 if { (eval echo "$as_me:12284: \"$ac_compile\"") >&5
12285   (eval $ac_compile) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit $ac_status); } &&
12289          { ac_try='test -s conftest.$ac_objext'
12290   { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291   (eval $ac_try) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit $ac_status); }; }; then
12295   sigact_bad=yes
12296          cat >>confdefs.h <<\EOF
12297 #define SVR4_ACTION 1
12298 EOF
12299
12300 else
12301   echo "$as_me: failed program was:" >&5
12302 cat conftest.$ac_ext >&5
12303 sigact_bad=unknown
12304 fi
12305 rm -f conftest.$ac_objext conftest.$ac_ext
12306 fi
12307 rm -f conftest.$ac_objext conftest.$ac_ext
12308 echo "$as_me:12308: result: $sigact_bad" >&5
12309 echo "${ECHO_T}$sigact_bad" >&6
12310 fi
12311
12312 echo "$as_me:12312: checking if nanosleep really works" >&5
12313 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12314 if test "${cf_cv_func_nanosleep+set}" = set; then
12315   echo $ECHO_N "(cached) $ECHO_C" >&6
12316 else
12317
12318 if test "$cross_compiling" = yes; then
12319   cf_cv_func_nanosleep=unknown
12320 else
12321   cat >conftest.$ac_ext <<_ACEOF
12322 #line 12322 "configure"
12323 #include "confdefs.h"
12324
12325 #include <stdio.h>
12326 #include <errno.h>
12327 #include <time.h>
12328
12329 #ifdef HAVE_SYS_TIME_H
12330 #include <sys/time.h>
12331 #endif
12332
12333 int main() {
12334         struct timespec ts1, ts2;
12335         int code;
12336         ts1.tv_sec  = 0;
12337         ts1.tv_nsec = 750000000;
12338         ts2.tv_sec  = 0;
12339         ts2.tv_nsec = 0;
12340         errno = 0;
12341         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12342         ${cf_cv_main_return:-return}(code != 0);
12343 }
12344
12345 _ACEOF
12346 rm -f conftest$ac_exeext
12347 if { (eval echo "$as_me:12347: \"$ac_link\"") >&5
12348   (eval $ac_link) 2>&5
12349   ac_status=$?
12350   echo "$as_me:12350: \$? = $ac_status" >&5
12351   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12352   { (eval echo "$as_me:12352: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:12355: \$? = $ac_status" >&5
12356   (exit $ac_status); }; }; then
12357   cf_cv_func_nanosleep=yes
12358 else
12359   echo "$as_me: program exited with status $ac_status" >&5
12360 echo "$as_me: failed program was:" >&5
12361 cat conftest.$ac_ext >&5
12362 cf_cv_func_nanosleep=no
12363 fi
12364 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12365 fi
12366 fi
12367 echo "$as_me:12367: result: $cf_cv_func_nanosleep" >&5
12368 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12369
12370 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12371 #define HAVE_NANOSLEEP 1
12372 EOF
12373
12374 for ac_header in \
12375 termio.h \
12376 termios.h \
12377 unistd.h \
12378
12379 do
12380 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12381 echo "$as_me:12381: checking for $ac_header" >&5
12382 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12383 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386   cat >conftest.$ac_ext <<_ACEOF
12387 #line 12387 "configure"
12388 #include "confdefs.h"
12389 #include <$ac_header>
12390 _ACEOF
12391 if { (eval echo "$as_me:12391: \"$ac_cpp conftest.$ac_ext\"") >&5
12392   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12393   ac_status=$?
12394   egrep -v '^ *\+' conftest.er1 >conftest.err
12395   rm -f conftest.er1
12396   cat conftest.err >&5
12397   echo "$as_me:12397: \$? = $ac_status" >&5
12398   (exit $ac_status); } >/dev/null; then
12399   if test -s conftest.err; then
12400     ac_cpp_err=$ac_c_preproc_warn_flag
12401   else
12402     ac_cpp_err=
12403   fi
12404 else
12405   ac_cpp_err=yes
12406 fi
12407 if test -z "$ac_cpp_err"; then
12408   eval "$as_ac_Header=yes"
12409 else
12410   echo "$as_me: failed program was:" >&5
12411   cat conftest.$ac_ext >&5
12412   eval "$as_ac_Header=no"
12413 fi
12414 rm -f conftest.err conftest.$ac_ext
12415 fi
12416 echo "$as_me:12416: result: `eval echo '${'$as_ac_Header'}'`" >&5
12417 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12418 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12419   cat >>confdefs.h <<EOF
12420 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12421 EOF
12422
12423 fi
12424 done
12425
12426 if test "$ISC" = yes ; then
12427
12428 for ac_header in sys/termio.h
12429 do
12430 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12431 echo "$as_me:12431: checking for $ac_header" >&5
12432 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12433 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12434   echo $ECHO_N "(cached) $ECHO_C" >&6
12435 else
12436   cat >conftest.$ac_ext <<_ACEOF
12437 #line 12437 "configure"
12438 #include "confdefs.h"
12439 #include <$ac_header>
12440 _ACEOF
12441 if { (eval echo "$as_me:12441: \"$ac_cpp conftest.$ac_ext\"") >&5
12442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12443   ac_status=$?
12444   egrep -v '^ *\+' conftest.er1 >conftest.err
12445   rm -f conftest.er1
12446   cat conftest.err >&5
12447   echo "$as_me:12447: \$? = $ac_status" >&5
12448   (exit $ac_status); } >/dev/null; then
12449   if test -s conftest.err; then
12450     ac_cpp_err=$ac_c_preproc_warn_flag
12451   else
12452     ac_cpp_err=
12453   fi
12454 else
12455   ac_cpp_err=yes
12456 fi
12457 if test -z "$ac_cpp_err"; then
12458   eval "$as_ac_Header=yes"
12459 else
12460   echo "$as_me: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   eval "$as_ac_Header=no"
12463 fi
12464 rm -f conftest.err conftest.$ac_ext
12465 fi
12466 echo "$as_me:12466: result: `eval echo '${'$as_ac_Header'}'`" >&5
12467 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12468 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12469   cat >>confdefs.h <<EOF
12470 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12471 EOF
12472
12473 fi
12474 done
12475
12476 fi
12477 if test "$ac_cv_header_termios_h" = yes ; then
12478         case "$CFLAGS $CPPFLAGS" in
12479         *-D_POSIX_SOURCE*)
12480                 termios_bad=dunno ;;
12481         *)      termios_bad=maybe ;;
12482         esac
12483         if test "$termios_bad" = maybe ; then
12484         echo "$as_me:12484: checking whether termios.h needs _POSIX_SOURCE" >&5
12485 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12486         cat >conftest.$ac_ext <<_ACEOF
12487 #line 12487 "configure"
12488 #include "confdefs.h"
12489 #include <termios.h>
12490 int
12491 main ()
12492 {
12493 struct termios foo; int x = foo.c_iflag
12494   ;
12495   return 0;
12496 }
12497 _ACEOF
12498 rm -f conftest.$ac_objext
12499 if { (eval echo "$as_me:12499: \"$ac_compile\"") >&5
12500   (eval $ac_compile) 2>&5
12501   ac_status=$?
12502   echo "$as_me:12502: \$? = $ac_status" >&5
12503   (exit $ac_status); } &&
12504          { ac_try='test -s conftest.$ac_objext'
12505   { (eval echo "$as_me:12505: \"$ac_try\"") >&5
12506   (eval $ac_try) 2>&5
12507   ac_status=$?
12508   echo "$as_me:12508: \$? = $ac_status" >&5
12509   (exit $ac_status); }; }; then
12510   termios_bad=no
12511 else
12512   echo "$as_me: failed program was:" >&5
12513 cat conftest.$ac_ext >&5
12514
12515                 cat >conftest.$ac_ext <<_ACEOF
12516 #line 12516 "configure"
12517 #include "confdefs.h"
12518
12519 #define _POSIX_SOURCE
12520 #include <termios.h>
12521 int
12522 main ()
12523 {
12524 struct termios foo; int x = foo.c_iflag
12525   ;
12526   return 0;
12527 }
12528 _ACEOF
12529 rm -f conftest.$ac_objext
12530 if { (eval echo "$as_me:12530: \"$ac_compile\"") >&5
12531   (eval $ac_compile) 2>&5
12532   ac_status=$?
12533   echo "$as_me:12533: \$? = $ac_status" >&5
12534   (exit $ac_status); } &&
12535          { ac_try='test -s conftest.$ac_objext'
12536   { (eval echo "$as_me:12536: \"$ac_try\"") >&5
12537   (eval $ac_try) 2>&5
12538   ac_status=$?
12539   echo "$as_me:12539: \$? = $ac_status" >&5
12540   (exit $ac_status); }; }; then
12541   termios_bad=unknown
12542 else
12543   echo "$as_me: failed program was:" >&5
12544 cat conftest.$ac_ext >&5
12545 termios_bad=yes cat >>confdefs.h <<\EOF
12546 #define SVR4_TERMIO 1
12547 EOF
12548
12549 fi
12550 rm -f conftest.$ac_objext conftest.$ac_ext
12551
12552 fi
12553 rm -f conftest.$ac_objext conftest.$ac_ext
12554         echo "$as_me:12554: result: $termios_bad" >&5
12555 echo "${ECHO_T}$termios_bad" >&6
12556         fi
12557 fi
12558
12559 echo "$as_me:12559: checking for tcgetattr" >&5
12560 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12561 if test "${cf_cv_have_tcgetattr+set}" = set; then
12562   echo $ECHO_N "(cached) $ECHO_C" >&6
12563 else
12564
12565 cat >conftest.$ac_ext <<_ACEOF
12566 #line 12566 "configure"
12567 #include "confdefs.h"
12568
12569 #include <sys/types.h>
12570 #ifdef HAVE_UNISTD_H
12571 #include <unistd.h>
12572 #endif
12573 #ifdef HAVE_TERMIOS_H
12574 #include <termios.h>
12575 #define TTY struct termios
12576 #else
12577 #ifdef HAVE_TERMIO_H
12578 #include <termio.h>
12579 #define TTY struct termio
12580 #endif
12581 #endif
12582
12583 int
12584 main ()
12585 {
12586
12587 TTY foo;
12588 tcgetattr(1, &foo);
12589   ;
12590   return 0;
12591 }
12592 _ACEOF
12593 rm -f conftest.$ac_objext conftest$ac_exeext
12594 if { (eval echo "$as_me:12594: \"$ac_link\"") >&5
12595   (eval $ac_link) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); } &&
12599          { ac_try='test -s conftest$ac_exeext'
12600   { (eval echo "$as_me:12600: \"$ac_try\"") >&5
12601   (eval $ac_try) 2>&5
12602   ac_status=$?
12603   echo "$as_me:12603: \$? = $ac_status" >&5
12604   (exit $ac_status); }; }; then
12605   cf_cv_have_tcgetattr=yes
12606 else
12607   echo "$as_me: failed program was:" >&5
12608 cat conftest.$ac_ext >&5
12609 cf_cv_have_tcgetattr=no
12610 fi
12611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12612 fi
12613 echo "$as_me:12613: result: $cf_cv_have_tcgetattr" >&5
12614 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12615 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12616 #define HAVE_TCGETATTR 1
12617 EOF
12618
12619 echo "$as_me:12619: checking for vsscanf function or workaround" >&5
12620 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12621 if test "${cf_cv_func_vsscanf+set}" = set; then
12622   echo $ECHO_N "(cached) $ECHO_C" >&6
12623 else
12624
12625 cat >conftest.$ac_ext <<_ACEOF
12626 #line 12626 "configure"
12627 #include "confdefs.h"
12628
12629 #include <stdarg.h>
12630 #include <stdio.h>
12631 int
12632 main ()
12633 {
12634
12635         va_list ap;
12636         vsscanf("from", "%d", ap)
12637   ;
12638   return 0;
12639 }
12640 _ACEOF
12641 rm -f conftest.$ac_objext conftest$ac_exeext
12642 if { (eval echo "$as_me:12642: \"$ac_link\"") >&5
12643   (eval $ac_link) 2>&5
12644   ac_status=$?
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit $ac_status); } &&
12647          { ac_try='test -s conftest$ac_exeext'
12648   { (eval echo "$as_me:12648: \"$ac_try\"") >&5
12649   (eval $ac_try) 2>&5
12650   ac_status=$?
12651   echo "$as_me:12651: \$? = $ac_status" >&5
12652   (exit $ac_status); }; }; then
12653   cf_cv_func_vsscanf=vsscanf
12654 else
12655   echo "$as_me: failed program was:" >&5
12656 cat conftest.$ac_ext >&5
12657
12658 cat >conftest.$ac_ext <<_ACEOF
12659 #line 12659 "configure"
12660 #include "confdefs.h"
12661
12662 #include <stdarg.h>
12663 #include <stdio.h>
12664 int
12665 main ()
12666 {
12667
12668     FILE strbuf;
12669     char *str = "from";
12670
12671     strbuf._flag = _IOREAD;
12672     strbuf._ptr = strbuf._base = (unsigned char *) str;
12673     strbuf._cnt = strlen(str);
12674     strbuf._file = _NFILE;
12675     return (vfscanf(&strbuf, "%d", ap))
12676   ;
12677   return 0;
12678 }
12679 _ACEOF
12680 rm -f conftest.$ac_objext conftest$ac_exeext
12681 if { (eval echo "$as_me:12681: \"$ac_link\"") >&5
12682   (eval $ac_link) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); } &&
12686          { ac_try='test -s conftest$ac_exeext'
12687   { (eval echo "$as_me:12687: \"$ac_try\"") >&5
12688   (eval $ac_try) 2>&5
12689   ac_status=$?
12690   echo "$as_me:12690: \$? = $ac_status" >&5
12691   (exit $ac_status); }; }; then
12692   cf_cv_func_vsscanf=vfscanf
12693 else
12694   echo "$as_me: failed program was:" >&5
12695 cat conftest.$ac_ext >&5
12696
12697 cat >conftest.$ac_ext <<_ACEOF
12698 #line 12698 "configure"
12699 #include "confdefs.h"
12700
12701 #include <stdarg.h>
12702 #include <stdio.h>
12703 int
12704 main ()
12705 {
12706
12707     FILE strbuf;
12708     char *str = "from";
12709
12710     strbuf._flag = _IOREAD;
12711     strbuf._ptr = strbuf._base = (unsigned char *) str;
12712     strbuf._cnt = strlen(str);
12713     strbuf._file = _NFILE;
12714     return (_doscan(&strbuf, "%d", ap))
12715   ;
12716   return 0;
12717 }
12718 _ACEOF
12719 rm -f conftest.$ac_objext conftest$ac_exeext
12720 if { (eval echo "$as_me:12720: \"$ac_link\"") >&5
12721   (eval $ac_link) 2>&5
12722   ac_status=$?
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); } &&
12725          { ac_try='test -s conftest$ac_exeext'
12726   { (eval echo "$as_me:12726: \"$ac_try\"") >&5
12727   (eval $ac_try) 2>&5
12728   ac_status=$?
12729   echo "$as_me:12729: \$? = $ac_status" >&5
12730   (exit $ac_status); }; }; then
12731   cf_cv_func_vsscanf=_doscan
12732 else
12733   echo "$as_me: failed program was:" >&5
12734 cat conftest.$ac_ext >&5
12735
12736 cf_cv_func_vsscanf=no
12737 fi
12738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12739 fi
12740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12741 fi
12742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12743 fi
12744 echo "$as_me:12744: result: $cf_cv_func_vsscanf" >&5
12745 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12746
12747 case $cf_cv_func_vsscanf in #(vi
12748 vsscanf) cat >>confdefs.h <<\EOF
12749 #define HAVE_VSSCANF 1
12750 EOF
12751 ;; #(vi
12752 vfscanf) cat >>confdefs.h <<\EOF
12753 #define HAVE_VFSCANF 1
12754 EOF
12755 ;; #(vi
12756 _doscan) cat >>confdefs.h <<\EOF
12757 #define HAVE__DOSCAN 1
12758 EOF
12759 ;;
12760 esac
12761
12762 echo "$as_me:12762: checking for working mkstemp" >&5
12763 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12764 if test "${cf_cv_func_mkstemp+set}" = set; then
12765   echo $ECHO_N "(cached) $ECHO_C" >&6
12766 else
12767
12768 rm -f conftest*
12769 if test "$cross_compiling" = yes; then
12770   echo "$as_me:12770: checking for mkstemp" >&5
12771 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12772 if test "${ac_cv_func_mkstemp+set}" = set; then
12773   echo $ECHO_N "(cached) $ECHO_C" >&6
12774 else
12775   cat >conftest.$ac_ext <<_ACEOF
12776 #line 12776 "configure"
12777 #include "confdefs.h"
12778 /* System header to define __stub macros and hopefully few prototypes,
12779     which can conflict with char mkstemp (); below.  */
12780 #include <assert.h>
12781 /* Override any gcc2 internal prototype to avoid an error.  */
12782 #ifdef __cplusplus
12783 extern "C"
12784 #endif
12785 /* We use char because int might match the return type of a gcc2
12786    builtin and then its argument prototype would still apply.  */
12787 char mkstemp ();
12788 char (*f) ();
12789
12790 int
12791 main ()
12792 {
12793 /* The GNU C library defines this for functions which it implements
12794     to always fail with ENOSYS.  Some functions are actually named
12795     something starting with __ and the normal name is an alias.  */
12796 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12797 choke me
12798 #else
12799 f = mkstemp;
12800 #endif
12801
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -f conftest.$ac_objext conftest$ac_exeext
12807 if { (eval echo "$as_me:12807: \"$ac_link\"") >&5
12808   (eval $ac_link) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit $ac_status); } &&
12812          { ac_try='test -s conftest$ac_exeext'
12813   { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit $ac_status); }; }; then
12818   ac_cv_func_mkstemp=yes
12819 else
12820   echo "$as_me: failed program was:" >&5
12821 cat conftest.$ac_ext >&5
12822 ac_cv_func_mkstemp=no
12823 fi
12824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12825 fi
12826 echo "$as_me:12826: result: $ac_cv_func_mkstemp" >&5
12827 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12828
12829 else
12830   cat >conftest.$ac_ext <<_ACEOF
12831 #line 12831 "configure"
12832 #include "confdefs.h"
12833
12834 #include <sys/types.h>
12835 #include <stdlib.h>
12836 #include <stdio.h>
12837 #include <string.h>
12838 #include <sys/stat.h>
12839 int main()
12840 {
12841         char *tmpl = "conftestXXXXXX";
12842         char name[2][80];
12843         int n;
12844         int result = 0;
12845         int fd;
12846         struct stat sb;
12847
12848         umask(077);
12849         for (n = 0; n < 2; ++n) {
12850                 strcpy(name[n], tmpl);
12851                 if ((fd = mkstemp(name[n])) >= 0) {
12852                         if (!strcmp(name[n], tmpl)
12853                          || stat(name[n], &sb) != 0
12854                          || (sb.st_mode & S_IFMT) != S_IFREG
12855                          || (sb.st_mode & 077) != 0) {
12856                                 result = 1;
12857                         }
12858                         close(fd);
12859                 }
12860         }
12861         if (result == 0
12862          && !strcmp(name[0], name[1]))
12863                 result = 1;
12864         ${cf_cv_main_return:-return}(result);
12865 }
12866
12867 _ACEOF
12868 rm -f 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); } && { ac_try='./conftest$ac_exeext'
12874   { (eval echo "$as_me:12874: \"$ac_try\"") >&5
12875   (eval $ac_try) 2>&5
12876   ac_status=$?
12877   echo "$as_me:12877: \$? = $ac_status" >&5
12878   (exit $ac_status); }; }; then
12879   cf_cv_func_mkstemp=yes
12880
12881 else
12882   echo "$as_me: program exited with status $ac_status" >&5
12883 echo "$as_me: failed program was:" >&5
12884 cat conftest.$ac_ext >&5
12885 cf_cv_func_mkstemp=no
12886
12887 fi
12888 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12889 fi
12890
12891 fi
12892 echo "$as_me:12892: result: $cf_cv_func_mkstemp" >&5
12893 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12894 if test "$cf_cv_func_mkstemp" = yes ; then
12895         cat >>confdefs.h <<\EOF
12896 #define HAVE_MKSTEMP 1
12897 EOF
12898
12899 fi
12900
12901 # setup for prototype of fallback for vsscanf()
12902
12903 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12904         HAVE_VSSCANF=1
12905 else
12906         HAVE_VSSCANF=0
12907 fi
12908
12909 if test "$cross_compiling" = yes ; then
12910         { echo "$as_me:12910: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12911 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12912 else
12913         echo "$as_me:12913: checking whether setvbuf arguments are reversed" >&5
12914 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12915 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12916   echo $ECHO_N "(cached) $ECHO_C" >&6
12917 else
12918   if test "$cross_compiling" = yes; then
12919   { { echo "$as_me:12919: error: cannot run test program while cross compiling" >&5
12920 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12921    { (exit 1); exit 1; }; }
12922 else
12923   cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926 #include <stdio.h>
12927 /* If setvbuf has the reversed format, exit 0. */
12928 int
12929 main ()
12930 {
12931   /* This call has the arguments reversed.
12932      A reversed system may check and see that the address of main
12933      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12934   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12935     $ac_main_return(1);
12936   putc('\r', stdout);
12937   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12938 }
12939 _ACEOF
12940 rm -f conftest$ac_exeext
12941 if { (eval echo "$as_me:12941: \"$ac_link\"") >&5
12942   (eval $ac_link) 2>&5
12943   ac_status=$?
12944   echo "$as_me:12944: \$? = $ac_status" >&5
12945   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12946   { (eval echo "$as_me:12946: \"$ac_try\"") >&5
12947   (eval $ac_try) 2>&5
12948   ac_status=$?
12949   echo "$as_me:12949: \$? = $ac_status" >&5
12950   (exit $ac_status); }; }; then
12951   ac_cv_func_setvbuf_reversed=yes
12952 else
12953   echo "$as_me: program exited with status $ac_status" >&5
12954 echo "$as_me: failed program was:" >&5
12955 cat conftest.$ac_ext >&5
12956 ac_cv_func_setvbuf_reversed=no
12957 fi
12958 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12959 fi
12960 rm -f core core.* *.core
12961 fi
12962 echo "$as_me:12962: result: $ac_cv_func_setvbuf_reversed" >&5
12963 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12964 if test $ac_cv_func_setvbuf_reversed = yes; then
12965
12966 cat >>confdefs.h <<\EOF
12967 #define SETVBUF_REVERSED 1
12968 EOF
12969
12970 fi
12971
12972 fi
12973 echo "$as_me:12973: checking return type of signal handlers" >&5
12974 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12975 if test "${ac_cv_type_signal+set}" = set; then
12976   echo $ECHO_N "(cached) $ECHO_C" >&6
12977 else
12978   cat >conftest.$ac_ext <<_ACEOF
12979 #line 12979 "configure"
12980 #include "confdefs.h"
12981 #include <sys/types.h>
12982 #include <signal.h>
12983 #ifdef signal
12984 # undef signal
12985 #endif
12986 #ifdef __cplusplus
12987 extern "C" void (*signal (int, void (*)(int)))(int);
12988 #else
12989 void (*signal ()) ();
12990 #endif
12991
12992 int
12993 main ()
12994 {
12995 int i;
12996   ;
12997   return 0;
12998 }
12999 _ACEOF
13000 rm -f conftest.$ac_objext
13001 if { (eval echo "$as_me:13001: \"$ac_compile\"") >&5
13002   (eval $ac_compile) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); } &&
13006          { ac_try='test -s conftest.$ac_objext'
13007   { (eval echo "$as_me:13007: \"$ac_try\"") >&5
13008   (eval $ac_try) 2>&5
13009   ac_status=$?
13010   echo "$as_me:13010: \$? = $ac_status" >&5
13011   (exit $ac_status); }; }; then
13012   ac_cv_type_signal=void
13013 else
13014   echo "$as_me: failed program was:" >&5
13015 cat conftest.$ac_ext >&5
13016 ac_cv_type_signal=int
13017 fi
13018 rm -f conftest.$ac_objext conftest.$ac_ext
13019 fi
13020 echo "$as_me:13020: result: $ac_cv_type_signal" >&5
13021 echo "${ECHO_T}$ac_cv_type_signal" >&6
13022
13023 cat >>confdefs.h <<EOF
13024 #define RETSIGTYPE $ac_cv_type_signal
13025 EOF
13026
13027 echo "$as_me:13027: checking for type sigaction_t" >&5
13028 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13029 if test "${cf_cv_type_sigaction+set}" = set; then
13030   echo $ECHO_N "(cached) $ECHO_C" >&6
13031 else
13032
13033         cat >conftest.$ac_ext <<_ACEOF
13034 #line 13034 "configure"
13035 #include "confdefs.h"
13036
13037 #include <signal.h>
13038 int
13039 main ()
13040 {
13041 sigaction_t x
13042   ;
13043   return 0;
13044 }
13045 _ACEOF
13046 rm -f conftest.$ac_objext
13047 if { (eval echo "$as_me:13047: \"$ac_compile\"") >&5
13048   (eval $ac_compile) 2>&5
13049   ac_status=$?
13050   echo "$as_me:13050: \$? = $ac_status" >&5
13051   (exit $ac_status); } &&
13052          { ac_try='test -s conftest.$ac_objext'
13053   { (eval echo "$as_me:13053: \"$ac_try\"") >&5
13054   (eval $ac_try) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); }; }; then
13058   cf_cv_type_sigaction=yes
13059 else
13060   echo "$as_me: failed program was:" >&5
13061 cat conftest.$ac_ext >&5
13062 cf_cv_type_sigaction=no
13063 fi
13064 rm -f conftest.$ac_objext conftest.$ac_ext
13065 fi
13066
13067 echo "$as_me:13067: result: $cf_cv_type_sigaction" >&5
13068 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13069 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13070 #define HAVE_TYPE_SIGACTION 1
13071 EOF
13072
13073 echo "$as_me:13073: checking declaration of size-change" >&5
13074 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13075 if test "${cf_cv_sizechange+set}" = set; then
13076   echo $ECHO_N "(cached) $ECHO_C" >&6
13077 else
13078
13079     cf_cv_sizechange=unknown
13080     cf_save_CPPFLAGS="$CPPFLAGS"
13081
13082 for cf_opts in "" "NEED_PTEM_H"
13083 do
13084
13085     CPPFLAGS="$cf_save_CPPFLAGS"
13086     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13087     cat >conftest.$ac_ext <<_ACEOF
13088 #line 13088 "configure"
13089 #include "confdefs.h"
13090 #include <sys/types.h>
13091 #ifdef HAVE_TERMIOS_H
13092 #include <termios.h>
13093 #else
13094 #ifdef HAVE_TERMIO_H
13095 #include <termio.h>
13096 #endif
13097 #endif
13098 #ifdef NEED_PTEM_H
13099 /* This is a workaround for SCO:  they neglected to define struct winsize in
13100  * termios.h -- it's only in termio.h and ptem.h
13101  */
13102 #include        <sys/stream.h>
13103 #include        <sys/ptem.h>
13104 #endif
13105 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13106 #include <sys/ioctl.h>
13107 #endif
13108
13109 int
13110 main ()
13111 {
13112
13113 #ifdef TIOCGSIZE
13114         struct ttysize win;     /* FIXME: what system is this? */
13115         int y = win.ts_lines;
13116         int x = win.ts_cols;
13117 #else
13118 #ifdef TIOCGWINSZ
13119         struct winsize win;
13120         int y = win.ws_row;
13121         int x = win.ws_col;
13122 #else
13123         no TIOCGSIZE or TIOCGWINSZ
13124 #endif /* TIOCGWINSZ */
13125 #endif /* TIOCGSIZE */
13126
13127   ;
13128   return 0;
13129 }
13130 _ACEOF
13131 rm -f conftest.$ac_objext
13132 if { (eval echo "$as_me:13132: \"$ac_compile\"") >&5
13133   (eval $ac_compile) 2>&5
13134   ac_status=$?
13135   echo "$as_me:13135: \$? = $ac_status" >&5
13136   (exit $ac_status); } &&
13137          { ac_try='test -s conftest.$ac_objext'
13138   { (eval echo "$as_me:13138: \"$ac_try\"") >&5
13139   (eval $ac_try) 2>&5
13140   ac_status=$?
13141   echo "$as_me:13141: \$? = $ac_status" >&5
13142   (exit $ac_status); }; }; then
13143   cf_cv_sizechange=yes
13144 else
13145   echo "$as_me: failed program was:" >&5
13146 cat conftest.$ac_ext >&5
13147 cf_cv_sizechange=no
13148 fi
13149 rm -f conftest.$ac_objext conftest.$ac_ext
13150
13151         CPPFLAGS="$cf_save_CPPFLAGS"
13152         if test "$cf_cv_sizechange" = yes ; then
13153                 echo "size-change succeeded ($cf_opts)" >&5
13154                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13155                 break
13156         fi
13157 done
13158
13159 fi
13160 echo "$as_me:13160: result: $cf_cv_sizechange" >&5
13161 echo "${ECHO_T}$cf_cv_sizechange" >&6
13162 if test "$cf_cv_sizechange" != no ; then
13163         cat >>confdefs.h <<\EOF
13164 #define HAVE_SIZECHANGE 1
13165 EOF
13166
13167         case $cf_cv_sizechange in #(vi
13168         NEED*)
13169                 cat >>confdefs.h <<EOF
13170 #define $cf_cv_sizechange  1
13171 EOF
13172
13173                 ;;
13174         esac
13175 fi
13176
13177 echo "$as_me:13177: checking for memmove" >&5
13178 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13179 if test "${ac_cv_func_memmove+set}" = set; then
13180   echo $ECHO_N "(cached) $ECHO_C" >&6
13181 else
13182   cat >conftest.$ac_ext <<_ACEOF
13183 #line 13183 "configure"
13184 #include "confdefs.h"
13185 /* System header to define __stub macros and hopefully few prototypes,
13186     which can conflict with char memmove (); below.  */
13187 #include <assert.h>
13188 /* Override any gcc2 internal prototype to avoid an error.  */
13189 #ifdef __cplusplus
13190 extern "C"
13191 #endif
13192 /* We use char because int might match the return type of a gcc2
13193    builtin and then its argument prototype would still apply.  */
13194 char memmove ();
13195 char (*f) ();
13196
13197 int
13198 main ()
13199 {
13200 /* The GNU C library defines this for functions which it implements
13201     to always fail with ENOSYS.  Some functions are actually named
13202     something starting with __ and the normal name is an alias.  */
13203 #if defined (__stub_memmove) || defined (__stub___memmove)
13204 choke me
13205 #else
13206 f = memmove;
13207 #endif
13208
13209   ;
13210   return 0;
13211 }
13212 _ACEOF
13213 rm -f conftest.$ac_objext conftest$ac_exeext
13214 if { (eval echo "$as_me:13214: \"$ac_link\"") >&5
13215   (eval $ac_link) 2>&5
13216   ac_status=$?
13217   echo "$as_me:13217: \$? = $ac_status" >&5
13218   (exit $ac_status); } &&
13219          { ac_try='test -s conftest$ac_exeext'
13220   { (eval echo "$as_me:13220: \"$ac_try\"") >&5
13221   (eval $ac_try) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); }; }; then
13225   ac_cv_func_memmove=yes
13226 else
13227   echo "$as_me: failed program was:" >&5
13228 cat conftest.$ac_ext >&5
13229 ac_cv_func_memmove=no
13230 fi
13231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13232 fi
13233 echo "$as_me:13233: result: $ac_cv_func_memmove" >&5
13234 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13235 if test $ac_cv_func_memmove = yes; then
13236   :
13237 else
13238
13239 echo "$as_me:13239: checking for bcopy" >&5
13240 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13241 if test "${ac_cv_func_bcopy+set}" = set; then
13242   echo $ECHO_N "(cached) $ECHO_C" >&6
13243 else
13244   cat >conftest.$ac_ext <<_ACEOF
13245 #line 13245 "configure"
13246 #include "confdefs.h"
13247 /* System header to define __stub macros and hopefully few prototypes,
13248     which can conflict with char bcopy (); below.  */
13249 #include <assert.h>
13250 /* Override any gcc2 internal prototype to avoid an error.  */
13251 #ifdef __cplusplus
13252 extern "C"
13253 #endif
13254 /* We use char because int might match the return type of a gcc2
13255    builtin and then its argument prototype would still apply.  */
13256 char bcopy ();
13257 char (*f) ();
13258
13259 int
13260 main ()
13261 {
13262 /* The GNU C library defines this for functions which it implements
13263     to always fail with ENOSYS.  Some functions are actually named
13264     something starting with __ and the normal name is an alias.  */
13265 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13266 choke me
13267 #else
13268 f = bcopy;
13269 #endif
13270
13271   ;
13272   return 0;
13273 }
13274 _ACEOF
13275 rm -f conftest.$ac_objext conftest$ac_exeext
13276 if { (eval echo "$as_me:13276: \"$ac_link\"") >&5
13277   (eval $ac_link) 2>&5
13278   ac_status=$?
13279   echo "$as_me:13279: \$? = $ac_status" >&5
13280   (exit $ac_status); } &&
13281          { ac_try='test -s conftest$ac_exeext'
13282   { (eval echo "$as_me:13282: \"$ac_try\"") >&5
13283   (eval $ac_try) 2>&5
13284   ac_status=$?
13285   echo "$as_me:13285: \$? = $ac_status" >&5
13286   (exit $ac_status); }; }; then
13287   ac_cv_func_bcopy=yes
13288 else
13289   echo "$as_me: failed program was:" >&5
13290 cat conftest.$ac_ext >&5
13291 ac_cv_func_bcopy=no
13292 fi
13293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13294 fi
13295 echo "$as_me:13295: result: $ac_cv_func_bcopy" >&5
13296 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13297 if test $ac_cv_func_bcopy = yes; then
13298
13299         echo "$as_me:13299: checking if bcopy does overlapping moves" >&5
13300 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13301 if test "${cf_cv_good_bcopy+set}" = set; then
13302   echo $ECHO_N "(cached) $ECHO_C" >&6
13303 else
13304
13305                 if test "$cross_compiling" = yes; then
13306   cf_cv_good_bcopy=unknown
13307 else
13308   cat >conftest.$ac_ext <<_ACEOF
13309 #line 13309 "configure"
13310 #include "confdefs.h"
13311
13312 int main() {
13313         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13314         char temp[40];
13315         bcopy(data, temp, sizeof(data));
13316         bcopy(temp+10, temp, 15);
13317         bcopy(temp+5, temp+15, 10);
13318         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13319 }
13320
13321 _ACEOF
13322 rm -f conftest$ac_exeext
13323 if { (eval echo "$as_me:13323: \"$ac_link\"") >&5
13324   (eval $ac_link) 2>&5
13325   ac_status=$?
13326   echo "$as_me:13326: \$? = $ac_status" >&5
13327   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13328   { (eval echo "$as_me:13328: \"$ac_try\"") >&5
13329   (eval $ac_try) 2>&5
13330   ac_status=$?
13331   echo "$as_me:13331: \$? = $ac_status" >&5
13332   (exit $ac_status); }; }; then
13333   cf_cv_good_bcopy=yes
13334 else
13335   echo "$as_me: program exited with status $ac_status" >&5
13336 echo "$as_me: failed program was:" >&5
13337 cat conftest.$ac_ext >&5
13338 cf_cv_good_bcopy=no
13339 fi
13340 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13341 fi
13342
13343 fi
13344 echo "$as_me:13344: result: $cf_cv_good_bcopy" >&5
13345 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13346
13347 else
13348   cf_cv_good_bcopy=no
13349 fi
13350
13351         if test "$cf_cv_good_bcopy" = yes ; then
13352                 cat >>confdefs.h <<\EOF
13353 #define USE_OK_BCOPY 1
13354 EOF
13355
13356         else
13357                 cat >>confdefs.h <<\EOF
13358 #define USE_MY_MEMMOVE 1
13359 EOF
13360
13361         fi
13362
13363 fi
13364
13365 echo "$as_me:13365: checking if poll really works" >&5
13366 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13367 if test "${cf_cv_working_poll+set}" = set; then
13368   echo $ECHO_N "(cached) $ECHO_C" >&6
13369 else
13370
13371 if test "$cross_compiling" = yes; then
13372   cf_cv_working_poll=unknown
13373 else
13374   cat >conftest.$ac_ext <<_ACEOF
13375 #line 13375 "configure"
13376 #include "confdefs.h"
13377
13378 #include <stdio.h>
13379 #ifdef HAVE_POLL_H
13380 #include <poll.h>
13381 #else
13382 #include <sys/poll.h>
13383 #endif
13384 int main() {
13385         struct pollfd myfds;
13386         int ret;
13387
13388         myfds.fd = 0;
13389         myfds.events = POLLIN;
13390
13391         ret = poll(&myfds, 1, 100);
13392         ${cf_cv_main_return:-return}(ret != 0);
13393 }
13394 _ACEOF
13395 rm -f conftest$ac_exeext
13396 if { (eval echo "$as_me:13396: \"$ac_link\"") >&5
13397   (eval $ac_link) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13401   { (eval echo "$as_me:13401: \"$ac_try\"") >&5
13402   (eval $ac_try) 2>&5
13403   ac_status=$?
13404   echo "$as_me:13404: \$? = $ac_status" >&5
13405   (exit $ac_status); }; }; then
13406   cf_cv_working_poll=yes
13407 else
13408   echo "$as_me: program exited with status $ac_status" >&5
13409 echo "$as_me: failed program was:" >&5
13410 cat conftest.$ac_ext >&5
13411 cf_cv_working_poll=no
13412 fi
13413 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13414 fi
13415 fi
13416 echo "$as_me:13416: result: $cf_cv_working_poll" >&5
13417 echo "${ECHO_T}$cf_cv_working_poll" >&6
13418 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13419 #define HAVE_WORKING_POLL 1
13420 EOF
13421
13422 if test "$with_hashed_db" != no ; then
13423         cat >>confdefs.h <<\EOF
13424 #define USE_HASHED_DB 1
13425 EOF
13426
13427 echo "$as_me:13427: checking for db.h" >&5
13428 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13429 if test "${ac_cv_header_db_h+set}" = set; then
13430   echo $ECHO_N "(cached) $ECHO_C" >&6
13431 else
13432   cat >conftest.$ac_ext <<_ACEOF
13433 #line 13433 "configure"
13434 #include "confdefs.h"
13435 #include <db.h>
13436 _ACEOF
13437 if { (eval echo "$as_me:13437: \"$ac_cpp conftest.$ac_ext\"") >&5
13438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13439   ac_status=$?
13440   egrep -v '^ *\+' conftest.er1 >conftest.err
13441   rm -f conftest.er1
13442   cat conftest.err >&5
13443   echo "$as_me:13443: \$? = $ac_status" >&5
13444   (exit $ac_status); } >/dev/null; then
13445   if test -s conftest.err; then
13446     ac_cpp_err=$ac_c_preproc_warn_flag
13447   else
13448     ac_cpp_err=
13449   fi
13450 else
13451   ac_cpp_err=yes
13452 fi
13453 if test -z "$ac_cpp_err"; then
13454   ac_cv_header_db_h=yes
13455 else
13456   echo "$as_me: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   ac_cv_header_db_h=no
13459 fi
13460 rm -f conftest.err conftest.$ac_ext
13461 fi
13462 echo "$as_me:13462: result: $ac_cv_header_db_h" >&5
13463 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13464 if test $ac_cv_header_db_h = yes; then
13465
13466 echo "$as_me:13466: checking for version of db" >&5
13467 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13468 if test "${cf_cv_hashed_db_version+set}" = set; then
13469   echo $ECHO_N "(cached) $ECHO_C" >&6
13470 else
13471
13472 cf_cv_hashed_db_version=unknown
13473
13474 for cf_db_version in 1 2 3 4
13475 do
13476
13477 echo "(line 13477) testing checking for db version $cf_db_version ..." 1>&5
13478
13479         cat >conftest.$ac_ext <<_ACEOF
13480 #line 13480 "configure"
13481 #include "confdefs.h"
13482
13483 $ac_includes_default
13484 #include <db.h>
13485
13486 #ifdef DB_VERSION_MAJOR
13487         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13488 #if $cf_db_version == DB_VERSION_MAJOR
13489         /* ok */
13490 #else
13491         make an error
13492 #endif
13493 #else
13494 #if $cf_db_version == 1
13495         /* ok: assuming this is DB 1.8.5 */
13496 #else
13497         make an error
13498 #endif
13499 #endif
13500
13501 int
13502 main ()
13503 {
13504 DBT *foo = 0
13505   ;
13506   return 0;
13507 }
13508 _ACEOF
13509 rm -f conftest.$ac_objext
13510 if { (eval echo "$as_me:13510: \"$ac_compile\"") >&5
13511   (eval $ac_compile) 2>&5
13512   ac_status=$?
13513   echo "$as_me:13513: \$? = $ac_status" >&5
13514   (exit $ac_status); } &&
13515          { ac_try='test -s conftest.$ac_objext'
13516   { (eval echo "$as_me:13516: \"$ac_try\"") >&5
13517   (eval $ac_try) 2>&5
13518   ac_status=$?
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit $ac_status); }; }; then
13521
13522         cf_cv_hashed_db_version=$cf_db_version
13523         break
13524
13525 else
13526   echo "$as_me: failed program was:" >&5
13527 cat conftest.$ac_ext >&5
13528 fi
13529 rm -f conftest.$ac_objext conftest.$ac_ext
13530 done
13531
13532 fi
13533 echo "$as_me:13533: result: $cf_cv_hashed_db_version" >&5
13534 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13535
13536 if test "$cf_cv_hashed_db_version" = unknown ; then
13537         { { echo "$as_me:13537: error: Cannot determine version of db" >&5
13538 echo "$as_me: error: Cannot determine version of db" >&2;}
13539    { (exit 1); exit 1; }; }
13540 else
13541
13542 echo "$as_me:13542: checking for db libraries" >&5
13543 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13544 if test "${cf_cv_hashed_db_libs+set}" = set; then
13545   echo $ECHO_N "(cached) $ECHO_C" >&6
13546 else
13547
13548 cf_cv_hashed_db_libs=unknown
13549 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13550 do
13551         cf_save_libs="$LIBS"
13552         if test -n "$cf_db_libs"; then
13553                 LIBS="-l$cf_db_libs $LIBS"
13554         fi
13555
13556 echo "(line 13556) testing checking for library "$cf_db_libs" ..." 1>&5
13557
13558         cat >conftest.$ac_ext <<_ACEOF
13559 #line 13559 "configure"
13560 #include "confdefs.h"
13561
13562 $ac_includes_default
13563 #include <db.h>
13564
13565 int
13566 main ()
13567 {
13568
13569         char *path = "/tmp/foo";
13570 #ifdef DB_VERSION_MAJOR
13571 #if DB_VERSION_MAJOR >= 4
13572         DB *result = 0;
13573         db_create(&result, NULL, 0);
13574         result->open(result,
13575                 NULL,
13576                 path,
13577                 path,
13578                 DB_HASH,
13579                 DB_CREATE,
13580                 0644);
13581 #elif DB_VERSION_MAJOR >= 3
13582         DB *result = 0;
13583         db_create(&result, NULL, 0);
13584         result->open(result,
13585                 path,
13586                 path,
13587                 DB_HASH,
13588                 DB_CREATE,
13589                 0644);
13590 #elif DB_VERSION_MAJOR >= 2
13591         DB *result = 0;
13592         db_open(path,
13593                 DB_HASH,
13594                 DB_CREATE,
13595                 0644,
13596                 (DB_ENV *) 0,
13597                 (DB_INFO *) 0,
13598                 &result);
13599 #endif /* DB_VERSION_MAJOR */
13600 #else
13601         DB *result = dbopen(path,
13602                      2,
13603                      0644,
13604                      DB_HASH,
13605                      0);
13606 #endif
13607         ${cf_cv_main_return:-return}(result != 0)
13608
13609   ;
13610   return 0;
13611 }
13612 _ACEOF
13613 rm -f conftest.$ac_objext conftest$ac_exeext
13614 if { (eval echo "$as_me:13614: \"$ac_link\"") >&5
13615   (eval $ac_link) 2>&5
13616   ac_status=$?
13617   echo "$as_me:13617: \$? = $ac_status" >&5
13618   (exit $ac_status); } &&
13619          { ac_try='test -s conftest$ac_exeext'
13620   { (eval echo "$as_me:13620: \"$ac_try\"") >&5
13621   (eval $ac_try) 2>&5
13622   ac_status=$?
13623   echo "$as_me:13623: \$? = $ac_status" >&5
13624   (exit $ac_status); }; }; then
13625
13626         if test -n "$cf_db_libs" ; then
13627                 cf_cv_hashed_db_libs=$cf_db_libs
13628         else
13629                 cf_cv_hashed_db_libs=default
13630         fi
13631         LIBS="$cf_save_libs"
13632         break
13633
13634 else
13635   echo "$as_me: failed program was:" >&5
13636 cat conftest.$ac_ext >&5
13637 fi
13638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13639         LIBS="$cf_save_libs"
13640 done
13641
13642 fi
13643 echo "$as_me:13643: result: $cf_cv_hashed_db_libs" >&5
13644 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13645
13646         if test "$cf_cv_hashed_db_libs" = unknown ; then
13647                 { { echo "$as_me:13647: error: Cannot determine library for db" >&5
13648 echo "$as_me: error: Cannot determine library for db" >&2;}
13649    { (exit 1); exit 1; }; }
13650         elif test "$cf_cv_hashed_db_libs" != default ; then
13651                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13652         fi
13653 fi
13654
13655 else
13656
13657         { { echo "$as_me:13657: error: Cannot find db.h" >&5
13658 echo "$as_me: error: Cannot find db.h" >&2;}
13659    { (exit 1); exit 1; }; }
13660
13661 fi
13662
13663 fi
13664
13665 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13666         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13667         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13668 fi
13669
13670 # Just in case, check if the C compiler has a bool type.
13671
13672 echo "$as_me:13672: checking if we should include stdbool.h" >&5
13673 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13674
13675 if test "${cf_cv_header_stdbool_h+set}" = set; then
13676   echo $ECHO_N "(cached) $ECHO_C" >&6
13677 else
13678
13679         cat >conftest.$ac_ext <<_ACEOF
13680 #line 13680 "configure"
13681 #include "confdefs.h"
13682
13683 int
13684 main ()
13685 {
13686 bool foo = false
13687   ;
13688   return 0;
13689 }
13690 _ACEOF
13691 rm -f conftest.$ac_objext
13692 if { (eval echo "$as_me:13692: \"$ac_compile\"") >&5
13693   (eval $ac_compile) 2>&5
13694   ac_status=$?
13695   echo "$as_me:13695: \$? = $ac_status" >&5
13696   (exit $ac_status); } &&
13697          { ac_try='test -s conftest.$ac_objext'
13698   { (eval echo "$as_me:13698: \"$ac_try\"") >&5
13699   (eval $ac_try) 2>&5
13700   ac_status=$?
13701   echo "$as_me:13701: \$? = $ac_status" >&5
13702   (exit $ac_status); }; }; then
13703   cf_cv_header_stdbool_h=0
13704 else
13705   echo "$as_me: failed program was:" >&5
13706 cat conftest.$ac_ext >&5
13707 cat >conftest.$ac_ext <<_ACEOF
13708 #line 13708 "configure"
13709 #include "confdefs.h"
13710
13711 #ifndef __BEOS__
13712 #include <stdbool.h>
13713 #endif
13714
13715 int
13716 main ()
13717 {
13718 bool foo = false
13719   ;
13720   return 0;
13721 }
13722 _ACEOF
13723 rm -f conftest.$ac_objext
13724 if { (eval echo "$as_me:13724: \"$ac_compile\"") >&5
13725   (eval $ac_compile) 2>&5
13726   ac_status=$?
13727   echo "$as_me:13727: \$? = $ac_status" >&5
13728   (exit $ac_status); } &&
13729          { ac_try='test -s conftest.$ac_objext'
13730   { (eval echo "$as_me:13730: \"$ac_try\"") >&5
13731   (eval $ac_try) 2>&5
13732   ac_status=$?
13733   echo "$as_me:13733: \$? = $ac_status" >&5
13734   (exit $ac_status); }; }; then
13735   cf_cv_header_stdbool_h=1
13736 else
13737   echo "$as_me: failed program was:" >&5
13738 cat conftest.$ac_ext >&5
13739 cf_cv_header_stdbool_h=0
13740 fi
13741 rm -f conftest.$ac_objext conftest.$ac_ext
13742 fi
13743 rm -f conftest.$ac_objext conftest.$ac_ext
13744 fi
13745
13746 if test "$cf_cv_header_stdbool_h" = 1
13747 then    echo "$as_me:13747: result: yes" >&5
13748 echo "${ECHO_T}yes" >&6
13749 else    echo "$as_me:13749: result: no" >&5
13750 echo "${ECHO_T}no" >&6
13751 fi
13752
13753 echo "$as_me:13753: checking for builtin bool type" >&5
13754 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13755
13756 if test "${cf_cv_cc_bool_type+set}" = set; then
13757   echo $ECHO_N "(cached) $ECHO_C" >&6
13758 else
13759
13760         cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763
13764 #include <stdio.h>
13765 #include <sys/types.h>
13766
13767 int
13768 main ()
13769 {
13770 bool x = false
13771   ;
13772   return 0;
13773 }
13774 _ACEOF
13775 rm -f conftest.$ac_objext
13776 if { (eval echo "$as_me:13776: \"$ac_compile\"") >&5
13777   (eval $ac_compile) 2>&5
13778   ac_status=$?
13779   echo "$as_me:13779: \$? = $ac_status" >&5
13780   (exit $ac_status); } &&
13781          { ac_try='test -s conftest.$ac_objext'
13782   { (eval echo "$as_me:13782: \"$ac_try\"") >&5
13783   (eval $ac_try) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit $ac_status); }; }; then
13787   cf_cv_cc_bool_type=1
13788 else
13789   echo "$as_me: failed program was:" >&5
13790 cat conftest.$ac_ext >&5
13791 cf_cv_cc_bool_type=0
13792 fi
13793 rm -f conftest.$ac_objext conftest.$ac_ext
13794
13795 fi
13796
13797 if test "$cf_cv_cc_bool_type" = 1
13798 then    echo "$as_me:13798: result: yes" >&5
13799 echo "${ECHO_T}yes" >&6
13800 else    echo "$as_me:13800: result: no" >&5
13801 echo "${ECHO_T}no" >&6
13802 fi
13803
13804 # Check for C++ compiler characteristics (and ensure that it's there!)
13805 if test -n "$CXX" ; then
13806         ac_ext=cc
13807 ac_cpp='$CXXCPP $CPPFLAGS'
13808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13811 ac_main_return=return
13812
13813 if test -n "$GXX" ; then
13814 case $cf_cv_system_name in #(vi
13815 os2*) #(vi
13816         cf_stdcpp_libname=stdcpp
13817         ;;
13818 *)
13819         cf_stdcpp_libname=stdc++
13820         ;;
13821 esac
13822 echo "$as_me:13822: checking for library $cf_stdcpp_libname" >&5
13823 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13824 if test "${cf_cv_libstdcpp+set}" = set; then
13825   echo $ECHO_N "(cached) $ECHO_C" >&6
13826 else
13827
13828         cf_save="$LIBS"
13829         LIBS="$LIBS -l$cf_stdcpp_libname"
13830 cat >conftest.$ac_ext <<_ACEOF
13831 #line 13831 "configure"
13832 #include "confdefs.h"
13833
13834 #include <strstream.h>
13835 int
13836 main ()
13837 {
13838
13839 char buf[80];
13840 strstreambuf foo(buf, sizeof(buf))
13841
13842   ;
13843   return 0;
13844 }
13845 _ACEOF
13846 rm -f conftest.$ac_objext conftest$ac_exeext
13847 if { (eval echo "$as_me:13847: \"$ac_link\"") >&5
13848   (eval $ac_link) 2>&5
13849   ac_status=$?
13850   echo "$as_me:13850: \$? = $ac_status" >&5
13851   (exit $ac_status); } &&
13852          { ac_try='test -s conftest$ac_exeext'
13853   { (eval echo "$as_me:13853: \"$ac_try\"") >&5
13854   (eval $ac_try) 2>&5
13855   ac_status=$?
13856   echo "$as_me:13856: \$? = $ac_status" >&5
13857   (exit $ac_status); }; }; then
13858   cf_cv_libstdcpp=yes
13859 else
13860   echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13862 cf_cv_libstdcpp=no
13863 fi
13864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13865         LIBS="$cf_save"
13866
13867 fi
13868 echo "$as_me:13868: result: $cf_cv_libstdcpp" >&5
13869 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13870 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13871 fi
13872
13873         echo "$as_me:13873: checking whether $CXX understands -c and -o together" >&5
13874 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13875 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13876   echo $ECHO_N "(cached) $ECHO_C" >&6
13877 else
13878
13879 cat > conftest.$ac_ext <<CF_EOF
13880 #include <stdio.h>
13881 int main()
13882 {
13883         ${cf_cv_main_return:-return}(0);
13884 }
13885 CF_EOF
13886 # We do the test twice because some compilers refuse to overwrite an
13887 # existing .o file with -o, though they will create one.
13888 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13889 if { (eval echo "$as_me:13889: \"$ac_try\"") >&5
13890   (eval $ac_try) 2>&5
13891   ac_status=$?
13892   echo "$as_me:13892: \$? = $ac_status" >&5
13893   (exit $ac_status); } &&
13894   test -f conftest2.$ac_objext && { (eval echo "$as_me:13894: \"$ac_try\"") >&5
13895   (eval $ac_try) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit $ac_status); };
13899 then
13900   eval cf_cv_prog_CXX_c_o=yes
13901 else
13902   eval cf_cv_prog_CXX_c_o=no
13903 fi
13904 rm -f conftest*
13905
13906 fi
13907 if test $cf_cv_prog_CXX_c_o = yes; then
13908   echo "$as_me:13908: result: yes" >&5
13909 echo "${ECHO_T}yes" >&6
13910 else
13911   echo "$as_me:13911: result: no" >&5
13912 echo "${ECHO_T}no" >&6
13913 fi
13914
13915         case $GXX_VERSION in
13916         1*|2.0-6*)
13917                 cf_cxx_library=yes
13918                 ;;
13919         *-2.7*|2.7*)
13920
13921 cf_cxx_library=unknown
13922 case $cf_cv_system_name in #(vi
13923 os2*) #(vi
13924         cf_gpp_libname=gpp
13925         ;;
13926 *)
13927         cf_gpp_libname=g++
13928         ;;
13929 esac
13930 if test "$GXX" = yes; then
13931         echo "$as_me:13931: checking for lib$cf_gpp_libname" >&5
13932 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13933         cf_save="$LIBS"
13934         LIBS="$LIBS -l$cf_gpp_libname"
13935         cat >conftest.$ac_ext <<_ACEOF
13936 #line 13936 "configure"
13937 #include "confdefs.h"
13938
13939 #include <$cf_gpp_libname/builtin.h>
13940
13941 int
13942 main ()
13943 {
13944 two_arg_error_handler_t foo2 = lib_error_handler
13945   ;
13946   return 0;
13947 }
13948 _ACEOF
13949 rm -f conftest.$ac_objext conftest$ac_exeext
13950 if { (eval echo "$as_me:13950: \"$ac_link\"") >&5
13951   (eval $ac_link) 2>&5
13952   ac_status=$?
13953   echo "$as_me:13953: \$? = $ac_status" >&5
13954   (exit $ac_status); } &&
13955          { ac_try='test -s conftest$ac_exeext'
13956   { (eval echo "$as_me:13956: \"$ac_try\"") >&5
13957   (eval $ac_try) 2>&5
13958   ac_status=$?
13959   echo "$as_me:13959: \$? = $ac_status" >&5
13960   (exit $ac_status); }; }; then
13961   cf_cxx_library=yes
13962          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13963          if test "$cf_gpp_libname" = cpp ; then
13964             cat >>confdefs.h <<\EOF
13965 #define HAVE_GPP_BUILTIN_H 1
13966 EOF
13967
13968          else
13969             cat >>confdefs.h <<\EOF
13970 #define HAVE_GXX_BUILTIN_H 1
13971 EOF
13972
13973          fi
13974 else
13975   echo "$as_me: failed program was:" >&5
13976 cat conftest.$ac_ext >&5
13977 cat >conftest.$ac_ext <<_ACEOF
13978 #line 13978 "configure"
13979 #include "confdefs.h"
13980
13981 #include <builtin.h>
13982
13983 int
13984 main ()
13985 {
13986 two_arg_error_handler_t foo2 = lib_error_handler
13987   ;
13988   return 0;
13989 }
13990 _ACEOF
13991 rm -f conftest.$ac_objext conftest$ac_exeext
13992 if { (eval echo "$as_me:13992: \"$ac_link\"") >&5
13993   (eval $ac_link) 2>&5
13994   ac_status=$?
13995   echo "$as_me:13995: \$? = $ac_status" >&5
13996   (exit $ac_status); } &&
13997          { ac_try='test -s conftest$ac_exeext'
13998   { (eval echo "$as_me:13998: \"$ac_try\"") >&5
13999   (eval $ac_try) 2>&5
14000   ac_status=$?
14001   echo "$as_me:14001: \$? = $ac_status" >&5
14002   (exit $ac_status); }; }; then
14003   cf_cxx_library=yes
14004          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14005          cat >>confdefs.h <<\EOF
14006 #define HAVE_BUILTIN_H 1
14007 EOF
14008
14009 else
14010   echo "$as_me: failed program was:" >&5
14011 cat conftest.$ac_ext >&5
14012 cf_cxx_library=no
14013 fi
14014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14015 fi
14016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14017         LIBS="$cf_save"
14018         echo "$as_me:14018: result: $cf_cxx_library" >&5
14019 echo "${ECHO_T}$cf_cxx_library" >&6
14020 fi
14021
14022                 ;;
14023         *)
14024                 cf_cxx_library=no
14025                 ;;
14026         esac
14027
14028         ac_ext=cc
14029 ac_cpp='$CXXCPP $CPPFLAGS'
14030 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14031 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14032 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14033 ac_main_return=return
14034 echo "$as_me:14034: checking how to run the C++ preprocessor" >&5
14035 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14036 if test -z "$CXXCPP"; then
14037   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14038   echo $ECHO_N "(cached) $ECHO_C" >&6
14039 else
14040       # Double quotes because CXXCPP needs to be expanded
14041     for CXXCPP in "$CXX -E" "/lib/cpp"
14042     do
14043       ac_preproc_ok=false
14044 for ac_cxx_preproc_warn_flag in '' yes
14045 do
14046   # Use a header file that comes with gcc, so configuring glibc
14047   # with a fresh cross-compiler works.
14048   # On the NeXT, cc -E runs the code through the compiler's parser,
14049   # not just through cpp. "Syntax error" is here to catch this case.
14050   cat >conftest.$ac_ext <<_ACEOF
14051 #line 14051 "configure"
14052 #include "confdefs.h"
14053 #include <assert.h>
14054                      Syntax error
14055 _ACEOF
14056 if { (eval echo "$as_me:14056: \"$ac_cpp conftest.$ac_ext\"") >&5
14057   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14058   ac_status=$?
14059   egrep -v '^ *\+' conftest.er1 >conftest.err
14060   rm -f conftest.er1
14061   cat conftest.err >&5
14062   echo "$as_me:14062: \$? = $ac_status" >&5
14063   (exit $ac_status); } >/dev/null; then
14064   if test -s conftest.err; then
14065     ac_cpp_err=$ac_cxx_preproc_warn_flag
14066   else
14067     ac_cpp_err=
14068   fi
14069 else
14070   ac_cpp_err=yes
14071 fi
14072 if test -z "$ac_cpp_err"; then
14073   :
14074 else
14075   echo "$as_me: failed program was:" >&5
14076   cat conftest.$ac_ext >&5
14077   # Broken: fails on valid input.
14078 continue
14079 fi
14080 rm -f conftest.err conftest.$ac_ext
14081
14082   # OK, works on sane cases.  Now check whether non-existent headers
14083   # can be detected and how.
14084   cat >conftest.$ac_ext <<_ACEOF
14085 #line 14085 "configure"
14086 #include "confdefs.h"
14087 #include <ac_nonexistent.h>
14088 _ACEOF
14089 if { (eval echo "$as_me:14089: \"$ac_cpp conftest.$ac_ext\"") >&5
14090   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14091   ac_status=$?
14092   egrep -v '^ *\+' conftest.er1 >conftest.err
14093   rm -f conftest.er1
14094   cat conftest.err >&5
14095   echo "$as_me:14095: \$? = $ac_status" >&5
14096   (exit $ac_status); } >/dev/null; then
14097   if test -s conftest.err; then
14098     ac_cpp_err=$ac_cxx_preproc_warn_flag
14099   else
14100     ac_cpp_err=
14101   fi
14102 else
14103   ac_cpp_err=yes
14104 fi
14105 if test -z "$ac_cpp_err"; then
14106   # Broken: success on invalid input.
14107 continue
14108 else
14109   echo "$as_me: failed program was:" >&5
14110   cat conftest.$ac_ext >&5
14111   # Passes both tests.
14112 ac_preproc_ok=:
14113 break
14114 fi
14115 rm -f conftest.err conftest.$ac_ext
14116
14117 done
14118 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14119 rm -f conftest.err conftest.$ac_ext
14120 if $ac_preproc_ok; then
14121   break
14122 fi
14123
14124     done
14125     ac_cv_prog_CXXCPP=$CXXCPP
14126
14127 fi
14128   CXXCPP=$ac_cv_prog_CXXCPP
14129 else
14130   ac_cv_prog_CXXCPP=$CXXCPP
14131 fi
14132 echo "$as_me:14132: result: $CXXCPP" >&5
14133 echo "${ECHO_T}$CXXCPP" >&6
14134 ac_preproc_ok=false
14135 for ac_cxx_preproc_warn_flag in '' yes
14136 do
14137   # Use a header file that comes with gcc, so configuring glibc
14138   # with a fresh cross-compiler works.
14139   # On the NeXT, cc -E runs the code through the compiler's parser,
14140   # not just through cpp. "Syntax error" is here to catch this case.
14141   cat >conftest.$ac_ext <<_ACEOF
14142 #line 14142 "configure"
14143 #include "confdefs.h"
14144 #include <assert.h>
14145                      Syntax error
14146 _ACEOF
14147 if { (eval echo "$as_me:14147: \"$ac_cpp conftest.$ac_ext\"") >&5
14148   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14149   ac_status=$?
14150   egrep -v '^ *\+' conftest.er1 >conftest.err
14151   rm -f conftest.er1
14152   cat conftest.err >&5
14153   echo "$as_me:14153: \$? = $ac_status" >&5
14154   (exit $ac_status); } >/dev/null; then
14155   if test -s conftest.err; then
14156     ac_cpp_err=$ac_cxx_preproc_warn_flag
14157   else
14158     ac_cpp_err=
14159   fi
14160 else
14161   ac_cpp_err=yes
14162 fi
14163 if test -z "$ac_cpp_err"; then
14164   :
14165 else
14166   echo "$as_me: failed program was:" >&5
14167   cat conftest.$ac_ext >&5
14168   # Broken: fails on valid input.
14169 continue
14170 fi
14171 rm -f conftest.err conftest.$ac_ext
14172
14173   # OK, works on sane cases.  Now check whether non-existent headers
14174   # can be detected and how.
14175   cat >conftest.$ac_ext <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14178 #include <ac_nonexistent.h>
14179 _ACEOF
14180 if { (eval echo "$as_me:14180: \"$ac_cpp conftest.$ac_ext\"") >&5
14181   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14182   ac_status=$?
14183   egrep -v '^ *\+' conftest.er1 >conftest.err
14184   rm -f conftest.er1
14185   cat conftest.err >&5
14186   echo "$as_me:14186: \$? = $ac_status" >&5
14187   (exit $ac_status); } >/dev/null; then
14188   if test -s conftest.err; then
14189     ac_cpp_err=$ac_cxx_preproc_warn_flag
14190   else
14191     ac_cpp_err=
14192   fi
14193 else
14194   ac_cpp_err=yes
14195 fi
14196 if test -z "$ac_cpp_err"; then
14197   # Broken: success on invalid input.
14198 continue
14199 else
14200   echo "$as_me: failed program was:" >&5
14201   cat conftest.$ac_ext >&5
14202   # Passes both tests.
14203 ac_preproc_ok=:
14204 break
14205 fi
14206 rm -f conftest.err conftest.$ac_ext
14207
14208 done
14209 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14210 rm -f conftest.err conftest.$ac_ext
14211 if $ac_preproc_ok; then
14212   :
14213 else
14214   { { echo "$as_me:14214: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14215 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14216    { (exit 1); exit 1; }; }
14217 fi
14218
14219 ac_ext=cc
14220 ac_cpp='$CXXCPP $CPPFLAGS'
14221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14224 ac_main_return=return
14225
14226 for ac_header in iostream typeinfo
14227 do
14228 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14229 echo "$as_me:14229: checking for $ac_header" >&5
14230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14232   echo $ECHO_N "(cached) $ECHO_C" >&6
14233 else
14234   cat >conftest.$ac_ext <<_ACEOF
14235 #line 14235 "configure"
14236 #include "confdefs.h"
14237 #include <$ac_header>
14238 _ACEOF
14239 if { (eval echo "$as_me:14239: \"$ac_cpp conftest.$ac_ext\"") >&5
14240   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14241   ac_status=$?
14242   egrep -v '^ *\+' conftest.er1 >conftest.err
14243   rm -f conftest.er1
14244   cat conftest.err >&5
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit $ac_status); } >/dev/null; then
14247   if test -s conftest.err; then
14248     ac_cpp_err=$ac_cxx_preproc_warn_flag
14249   else
14250     ac_cpp_err=
14251   fi
14252 else
14253   ac_cpp_err=yes
14254 fi
14255 if test -z "$ac_cpp_err"; then
14256   eval "$as_ac_Header=yes"
14257 else
14258   echo "$as_me: failed program was:" >&5
14259   cat conftest.$ac_ext >&5
14260   eval "$as_ac_Header=no"
14261 fi
14262 rm -f conftest.err conftest.$ac_ext
14263 fi
14264 echo "$as_me:14264: result: `eval echo '${'$as_ac_Header'}'`" >&5
14265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14266 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14267   cat >>confdefs.h <<EOF
14268 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14269 EOF
14270
14271 fi
14272 done
14273
14274 echo "$as_me:14274: checking if we should include stdbool.h" >&5
14275 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14276
14277 if test "${cf_cv_header_stdbool_h+set}" = set; then
14278   echo $ECHO_N "(cached) $ECHO_C" >&6
14279 else
14280
14281         cat >conftest.$ac_ext <<_ACEOF
14282 #line 14282 "configure"
14283 #include "confdefs.h"
14284
14285 int
14286 main ()
14287 {
14288 bool foo = false
14289   ;
14290   return 0;
14291 }
14292 _ACEOF
14293 rm -f conftest.$ac_objext
14294 if { (eval echo "$as_me:14294: \"$ac_compile\"") >&5
14295   (eval $ac_compile) 2>&5
14296   ac_status=$?
14297   echo "$as_me:14297: \$? = $ac_status" >&5
14298   (exit $ac_status); } &&
14299          { ac_try='test -s conftest.$ac_objext'
14300   { (eval echo "$as_me:14300: \"$ac_try\"") >&5
14301   (eval $ac_try) 2>&5
14302   ac_status=$?
14303   echo "$as_me:14303: \$? = $ac_status" >&5
14304   (exit $ac_status); }; }; then
14305   cf_cv_header_stdbool_h=0
14306 else
14307   echo "$as_me: failed program was:" >&5
14308 cat conftest.$ac_ext >&5
14309 cat >conftest.$ac_ext <<_ACEOF
14310 #line 14310 "configure"
14311 #include "confdefs.h"
14312
14313 #ifndef __BEOS__
14314 #include <stdbool.h>
14315 #endif
14316
14317 int
14318 main ()
14319 {
14320 bool foo = false
14321   ;
14322   return 0;
14323 }
14324 _ACEOF
14325 rm -f conftest.$ac_objext
14326 if { (eval echo "$as_me:14326: \"$ac_compile\"") >&5
14327   (eval $ac_compile) 2>&5
14328   ac_status=$?
14329   echo "$as_me:14329: \$? = $ac_status" >&5
14330   (exit $ac_status); } &&
14331          { ac_try='test -s conftest.$ac_objext'
14332   { (eval echo "$as_me:14332: \"$ac_try\"") >&5
14333   (eval $ac_try) 2>&5
14334   ac_status=$?
14335   echo "$as_me:14335: \$? = $ac_status" >&5
14336   (exit $ac_status); }; }; then
14337   cf_cv_header_stdbool_h=1
14338 else
14339   echo "$as_me: failed program was:" >&5
14340 cat conftest.$ac_ext >&5
14341 cf_cv_header_stdbool_h=0
14342 fi
14343 rm -f conftest.$ac_objext conftest.$ac_ext
14344 fi
14345 rm -f conftest.$ac_objext conftest.$ac_ext
14346 fi
14347
14348 if test "$cf_cv_header_stdbool_h" = 1
14349 then    echo "$as_me:14349: result: yes" >&5
14350 echo "${ECHO_T}yes" >&6
14351 else    echo "$as_me:14351: result: no" >&5
14352 echo "${ECHO_T}no" >&6
14353 fi
14354
14355 echo "$as_me:14355: checking for builtin bool type" >&5
14356 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14357
14358 if test "${cf_cv_builtin_bool+set}" = set; then
14359   echo $ECHO_N "(cached) $ECHO_C" >&6
14360 else
14361
14362         cat >conftest.$ac_ext <<_ACEOF
14363 #line 14363 "configure"
14364 #include "confdefs.h"
14365
14366 #include <stdio.h>
14367 #include <sys/types.h>
14368
14369 int
14370 main ()
14371 {
14372 bool x = false
14373   ;
14374   return 0;
14375 }
14376 _ACEOF
14377 rm -f conftest.$ac_objext
14378 if { (eval echo "$as_me:14378: \"$ac_compile\"") >&5
14379   (eval $ac_compile) 2>&5
14380   ac_status=$?
14381   echo "$as_me:14381: \$? = $ac_status" >&5
14382   (exit $ac_status); } &&
14383          { ac_try='test -s conftest.$ac_objext'
14384   { (eval echo "$as_me:14384: \"$ac_try\"") >&5
14385   (eval $ac_try) 2>&5
14386   ac_status=$?
14387   echo "$as_me:14387: \$? = $ac_status" >&5
14388   (exit $ac_status); }; }; then
14389   cf_cv_builtin_bool=1
14390 else
14391   echo "$as_me: failed program was:" >&5
14392 cat conftest.$ac_ext >&5
14393 cf_cv_builtin_bool=0
14394 fi
14395 rm -f conftest.$ac_objext conftest.$ac_ext
14396
14397 fi
14398
14399 if test "$cf_cv_builtin_bool" = 1
14400 then    echo "$as_me:14400: result: yes" >&5
14401 echo "${ECHO_T}yes" >&6
14402 else    echo "$as_me:14402: result: no" >&5
14403 echo "${ECHO_T}no" >&6
14404 fi
14405
14406 echo "$as_me:14406: checking for size of bool" >&5
14407 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14408 if test "${cf_cv_type_of_bool+set}" = set; then
14409   echo $ECHO_N "(cached) $ECHO_C" >&6
14410 else
14411
14412         rm -f cf_test.out
14413         if test "$cross_compiling" = yes; then
14414   cf_cv_type_of_bool=unknown
14415 else
14416   cat >conftest.$ac_ext <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419
14420 #include <stdlib.h>
14421 #include <stdio.h>
14422
14423 #if defined(__cplusplus)
14424
14425 #ifdef HAVE_GXX_BUILTIN_H
14426 #include <g++/builtin.h>
14427 #elif HAVE_GPP_BUILTIN_H
14428 #include <gpp/builtin.h>
14429 #elif HAVE_BUILTIN_H
14430 #include <builtin.h>
14431 #endif
14432
14433 #else
14434
14435 #if $cf_cv_header_stdbool_h
14436 #include <stdbool.h>
14437 #endif
14438
14439 #endif
14440
14441 main()
14442 {
14443         FILE *fp = fopen("cf_test.out", "w");
14444         if (fp != 0) {
14445                 bool x = true;
14446                 if ((bool)(-x) >= 0)
14447                         fputs("unsigned ", fp);
14448                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14449                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14450                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14451                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14452                 fclose(fp);
14453         }
14454         ${cf_cv_main_return:-return}(0);
14455 }
14456
14457 _ACEOF
14458 rm -f conftest$ac_exeext
14459 if { (eval echo "$as_me:14459: \"$ac_link\"") >&5
14460   (eval $ac_link) 2>&5
14461   ac_status=$?
14462   echo "$as_me:14462: \$? = $ac_status" >&5
14463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14464   { (eval echo "$as_me:14464: \"$ac_try\"") >&5
14465   (eval $ac_try) 2>&5
14466   ac_status=$?
14467   echo "$as_me:14467: \$? = $ac_status" >&5
14468   (exit $ac_status); }; }; then
14469   cf_cv_type_of_bool=`cat cf_test.out`
14470                  if test -z "$cf_cv_type_of_bool"; then
14471                    cf_cv_type_of_bool=unknown
14472                  fi
14473 else
14474   echo "$as_me: program exited with status $ac_status" >&5
14475 echo "$as_me: failed program was:" >&5
14476 cat conftest.$ac_ext >&5
14477 cf_cv_type_of_bool=unknown
14478 fi
14479 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14480 fi
14481
14482 fi
14483
14484         rm -f cf_test.out
14485 echo "$as_me:14485: result: $cf_cv_type_of_bool" >&5
14486 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14487 if test "$cf_cv_type_of_bool" = unknown ; then
14488         case .$NCURSES_BOOL in #(vi
14489         .auto|.) NCURSES_BOOL=unsigned;;
14490         esac
14491         { echo "$as_me:14491: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14492 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14493         cf_cv_type_of_bool=$NCURSES_BOOL
14494 fi
14495
14496 echo "$as_me:14496: checking for special defines needed for etip.h" >&5
14497 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14498 cf_save_CXXFLAGS="$CXXFLAGS"
14499 cf_result="none"
14500 for cf_math in "" MATH_H
14501 do
14502 for cf_excp in "" MATH_EXCEPTION
14503 do
14504         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14505         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14506         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14507 cat >conftest.$ac_ext <<_ACEOF
14508 #line 14508 "configure"
14509 #include "confdefs.h"
14510
14511 #include <etip.h.in>
14512
14513 int
14514 main ()
14515 {
14516
14517   ;
14518   return 0;
14519 }
14520 _ACEOF
14521 rm -f conftest.$ac_objext
14522 if { (eval echo "$as_me:14522: \"$ac_compile\"") >&5
14523   (eval $ac_compile) 2>&5
14524   ac_status=$?
14525   echo "$as_me:14525: \$? = $ac_status" >&5
14526   (exit $ac_status); } &&
14527          { ac_try='test -s conftest.$ac_objext'
14528   { (eval echo "$as_me:14528: \"$ac_try\"") >&5
14529   (eval $ac_try) 2>&5
14530   ac_status=$?
14531   echo "$as_me:14531: \$? = $ac_status" >&5
14532   (exit $ac_status); }; }; then
14533
14534         test -n "$cf_math" && cat >>confdefs.h <<EOF
14535 #define ETIP_NEEDS_${cf_math} 1
14536 EOF
14537
14538         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14539 #define ETIP_NEEDS_${cf_excp} 1
14540 EOF
14541
14542         cf_result="$cf_math $cf_excp"
14543         break
14544
14545 else
14546   echo "$as_me: failed program was:" >&5
14547 cat conftest.$ac_ext >&5
14548 fi
14549 rm -f conftest.$ac_objext conftest.$ac_ext
14550 done
14551 done
14552 echo "$as_me:14552: result: $cf_result" >&5
14553 echo "${ECHO_T}$cf_result" >&6
14554 CXXFLAGS="$cf_save_CXXFLAGS"
14555
14556 if test -n "$CXX"; then
14557 echo "$as_me:14557: checking if $CXX accepts parameter initialization" >&5
14558 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14559 if test "${cf_cv_cpp_param_init+set}" = set; then
14560   echo $ECHO_N "(cached) $ECHO_C" >&6
14561 else
14562
14563         ac_ext=cc
14564 ac_cpp='$CXXCPP $CPPFLAGS'
14565 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14566 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14567 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14568 ac_main_return=return
14569
14570         if test "$cross_compiling" = yes; then
14571   cf_cv_cpp_param_init=unknown
14572 else
14573   cat >conftest.$ac_ext <<_ACEOF
14574 #line 14574 "configure"
14575 #include "confdefs.h"
14576
14577 class TEST {
14578 private:
14579         int value;
14580 public:
14581         TEST(int x = 1);
14582         ~TEST();
14583 };
14584
14585 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14586 {
14587         value = x;
14588 }
14589 void main() { }
14590
14591 _ACEOF
14592 rm -f conftest$ac_exeext
14593 if { (eval echo "$as_me:14593: \"$ac_link\"") >&5
14594   (eval $ac_link) 2>&5
14595   ac_status=$?
14596   echo "$as_me:14596: \$? = $ac_status" >&5
14597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14598   { (eval echo "$as_me:14598: \"$ac_try\"") >&5
14599   (eval $ac_try) 2>&5
14600   ac_status=$?
14601   echo "$as_me:14601: \$? = $ac_status" >&5
14602   (exit $ac_status); }; }; then
14603   cf_cv_cpp_param_init=yes
14604 else
14605   echo "$as_me: program exited with status $ac_status" >&5
14606 echo "$as_me: failed program was:" >&5
14607 cat conftest.$ac_ext >&5
14608 cf_cv_cpp_param_init=no
14609 fi
14610 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14611 fi
14612         ac_ext=cc
14613 ac_cpp='$CXXCPP $CPPFLAGS'
14614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14615 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14617 ac_main_return=return
14618
14619 fi
14620 echo "$as_me:14620: result: $cf_cv_cpp_param_init" >&5
14621 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14622 fi
14623 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14624 #define CPP_HAS_PARAM_INIT 1
14625 EOF
14626
14627 if test -n "$CXX"; then
14628
14629 echo "$as_me:14629: checking if $CXX accepts static_cast" >&5
14630 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14631 if test "${cf_cv_cpp_static_cast+set}" = set; then
14632   echo $ECHO_N "(cached) $ECHO_C" >&6
14633 else
14634
14635         ac_ext=cc
14636 ac_cpp='$CXXCPP $CPPFLAGS'
14637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14638 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14640 ac_main_return=return
14641
14642         cat >conftest.$ac_ext <<_ACEOF
14643 #line 14643 "configure"
14644 #include "confdefs.h"
14645
14646 class NCursesPanel
14647 {
14648 public:
14649   NCursesPanel(int nlines,
14650                int ncols,
14651                int begin_y = 0,
14652                int begin_x = 0)
14653   {
14654   }
14655
14656   ~NCursesPanel();
14657 };
14658
14659 template<class T> class NCursesUserPanel : public NCursesPanel
14660 {
14661 public:
14662   NCursesUserPanel (int nlines,
14663                     int ncols,
14664                     int begin_y = 0,
14665                     int begin_x = 0,
14666                     const T* p_UserData = static_cast<T*>(0))
14667     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14668   {
14669   };
14670   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14671   {
14672   };
14673
14674   virtual ~NCursesUserPanel() {};
14675 };
14676
14677 int
14678 main ()
14679 {
14680
14681         const char* p_UserData = static_cast<char*>(0)
14682   ;
14683   return 0;
14684 }
14685 _ACEOF
14686 rm -f conftest.$ac_objext
14687 if { (eval echo "$as_me:14687: \"$ac_compile\"") >&5
14688   (eval $ac_compile) 2>&5
14689   ac_status=$?
14690   echo "$as_me:14690: \$? = $ac_status" >&5
14691   (exit $ac_status); } &&
14692          { ac_try='test -s conftest.$ac_objext'
14693   { (eval echo "$as_me:14693: \"$ac_try\"") >&5
14694   (eval $ac_try) 2>&5
14695   ac_status=$?
14696   echo "$as_me:14696: \$? = $ac_status" >&5
14697   (exit $ac_status); }; }; then
14698   cf_cv_cpp_static_cast=yes
14699 else
14700   echo "$as_me: failed program was:" >&5
14701 cat conftest.$ac_ext >&5
14702 cf_cv_cpp_static_cast=no
14703 fi
14704 rm -f conftest.$ac_objext conftest.$ac_ext
14705
14706         ac_ext=cc
14707 ac_cpp='$CXXCPP $CPPFLAGS'
14708 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14709 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14710 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14711 ac_main_return=return
14712
14713 fi
14714 echo "$as_me:14714: result: $cf_cv_cpp_static_cast" >&5
14715 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14716
14717 fi
14718
14719 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14720 #define CPP_HAS_STATIC_CAST 1
14721 EOF
14722
14723         CXX_AR='$(AR)'
14724         CXX_AR_OPTS='$(AR_OPTS)'
14725         case $cf_cv_system_name in #(vi
14726         irix*) #(vi
14727             if test "$GXX" != yes ; then
14728                 CXX_AR='$(CXX)'
14729                 CXX_AR_OPTS='-ar -o'
14730             fi
14731             ;;
14732         sco3.2v5*) #(vi
14733             CXXLDFLAGS="-u main"
14734             ;;
14735         solaris2*)
14736             if test "$GXX" != yes ; then
14737                 CXX_AR='$(CXX)'
14738                 CXX_AR_OPTS='-xar -o'
14739             fi
14740             ;;
14741         esac
14742
14743 else
14744         cf_cxx_library=no
14745         cf_cv_builtin_bool=1
14746
14747         # Just because we are not configuring against C++ right now does not
14748         # mean that a user will not want to use C++.  Some distributors disable
14749         # the C++ portion of this configuration as a shortcut (or just to avoid
14750         # compiling the demo in the c++ directory).  So we need a reasonable
14751         # default for the 'bool' type.
14752         #
14753         # Caveat: since the storage of the bool type is not standardized, it
14754         # may change.
14755
14756         if test "$NCURSES_BOOL" != auto ; then
14757                 cf_cv_type_of_bool=$NCURSES_BOOL
14758                 cf_cv_header_stdbool_h=0
14759         else
14760                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14761
14762 echo "$as_me:14762: checking for size of bool" >&5
14763 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14764 if test "${cf_cv_type_of_bool+set}" = set; then
14765   echo $ECHO_N "(cached) $ECHO_C" >&6
14766 else
14767
14768         rm -f cf_test.out
14769         if test "$cross_compiling" = yes; then
14770   cf_cv_type_of_bool=unknown
14771 else
14772   cat >conftest.$ac_ext <<_ACEOF
14773 #line 14773 "configure"
14774 #include "confdefs.h"
14775
14776 #include <stdlib.h>
14777 #include <stdio.h>
14778
14779 #if defined(__cplusplus)
14780
14781 #ifdef HAVE_GXX_BUILTIN_H
14782 #include <g++/builtin.h>
14783 #elif HAVE_GPP_BUILTIN_H
14784 #include <gpp/builtin.h>
14785 #elif HAVE_BUILTIN_H
14786 #include <builtin.h>
14787 #endif
14788
14789 #else
14790
14791 #if $cf_cv_header_stdbool_h
14792 #include <stdbool.h>
14793 #endif
14794
14795 #endif
14796
14797 main()
14798 {
14799         FILE *fp = fopen("cf_test.out", "w");
14800         if (fp != 0) {
14801                 bool x = true;
14802                 if ((bool)(-x) >= 0)
14803                         fputs("unsigned ", fp);
14804                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14805                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14806                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14807                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14808                 fclose(fp);
14809         }
14810         ${cf_cv_main_return:-return}(0);
14811 }
14812
14813 _ACEOF
14814 rm -f conftest$ac_exeext
14815 if { (eval echo "$as_me:14815: \"$ac_link\"") >&5
14816   (eval $ac_link) 2>&5
14817   ac_status=$?
14818   echo "$as_me:14818: \$? = $ac_status" >&5
14819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14820   { (eval echo "$as_me:14820: \"$ac_try\"") >&5
14821   (eval $ac_try) 2>&5
14822   ac_status=$?
14823   echo "$as_me:14823: \$? = $ac_status" >&5
14824   (exit $ac_status); }; }; then
14825   cf_cv_type_of_bool=`cat cf_test.out`
14826                  if test -z "$cf_cv_type_of_bool"; then
14827                    cf_cv_type_of_bool=unknown
14828                  fi
14829 else
14830   echo "$as_me: program exited with status $ac_status" >&5
14831 echo "$as_me: failed program was:" >&5
14832 cat conftest.$ac_ext >&5
14833 cf_cv_type_of_bool=unknown
14834 fi
14835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14836 fi
14837
14838 fi
14839
14840         rm -f cf_test.out
14841 echo "$as_me:14841: result: $cf_cv_type_of_bool" >&5
14842 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14843 if test "$cf_cv_type_of_bool" = unknown ; then
14844         case .$NCURSES_BOOL in #(vi
14845         .auto|.) NCURSES_BOOL=unsigned;;
14846         esac
14847         { echo "$as_me:14847: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14848 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14849         cf_cv_type_of_bool=$NCURSES_BOOL
14850 fi
14851
14852                 else
14853                         echo "$as_me:14853: checking for fallback type of bool" >&5
14854 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14855                         case "$host_cpu" in #(vi
14856                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14857                         *)      cf_cv_type_of_bool=int  ;;
14858                         esac
14859                         echo "$as_me:14859: result: $cf_cv_type_of_bool" >&5
14860 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14861                 fi
14862         fi
14863 fi
14864
14865 # If the C compiler did not declare bool, and we did not determine that the C++
14866 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14867 # ncurses library use the same type as C++ bool.  Note that this allows one to
14868 # specify the type of bool in a configure-script option and postpone
14869 # integration with the C++ compiler provided that the types are compatible.
14870 USE_CXX_BOOL=1
14871 if test $cf_cv_cc_bool_type = 1
14872 then
14873         # oops: C has a bool.  Unlikely, but C++ could differ.
14874         USE_CXX_BOOL=0
14875 elif test $cf_cv_builtin_bool = 0
14876 then
14877         # C++ has no bool
14878         USE_CXX_BOOL=0
14879 else
14880         # this is the normal case
14881         USE_CXX_BOOL='defined(__cplusplus)'
14882 fi
14883
14884 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14885
14886 if test "$cf_with_ada" != "no" ; then
14887     if test "$with_libtool" != "no"; then
14888         { echo "$as_me:14888: WARNING: libtool does not support Ada - disabling feature" >&5
14889 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
14890         cf_with_ada=no
14891     fi
14892 fi
14893
14894 if test "$cf_with_ada" != "no" ; then
14895 cf_ada_make=gnatmake
14896 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14897 set dummy $cf_ada_make; ac_word=$2
14898 echo "$as_me:14898: checking for $ac_word" >&5
14899 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14900 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14901   echo $ECHO_N "(cached) $ECHO_C" >&6
14902 else
14903   if test -n "$gnat_exists"; then
14904   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14905 else
14906   ac_save_IFS=$IFS; IFS=$ac_path_separator
14907 ac_dummy="$PATH"
14908 for ac_dir in $ac_dummy; do
14909   IFS=$ac_save_IFS
14910   test -z "$ac_dir" && ac_dir=.
14911   $as_executable_p "$ac_dir/$ac_word" || continue
14912 ac_cv_prog_gnat_exists="yes"
14913 echo "$as_me:14913: found $ac_dir/$ac_word" >&5
14914 break
14915 done
14916
14917   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14918 fi
14919 fi
14920 gnat_exists=$ac_cv_prog_gnat_exists
14921 if test -n "$gnat_exists"; then
14922   echo "$as_me:14922: result: $gnat_exists" >&5
14923 echo "${ECHO_T}$gnat_exists" >&6
14924 else
14925   echo "$as_me:14925: result: no" >&5
14926 echo "${ECHO_T}no" >&6
14927 fi
14928
14929 if test "$ac_cv_prog_gnat_exists" = no; then
14930    cf_ada_make=
14931 else
14932
14933 echo "$as_me:14933: checking for gnat version" >&5
14934 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14935 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14936   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14937 echo "$as_me:14937: result: $cf_gnat_version" >&5
14938 echo "${ECHO_T}$cf_gnat_version" >&6
14939
14940 case $cf_gnat_version in
14941   3.1[1-9]*|3.[2-9]*|[4-9].*)
14942     cf_cv_prog_gnat_correct=yes
14943     ;;
14944   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14945      cf_cv_prog_gnat_correct=no
14946      ;;
14947 esac
14948 case $cf_gnat_version in
14949   3.[1-9]*|[4-9].*)
14950       cf_compile_generics=generics
14951       cf_generic_objects="\${GENOBJS}"
14952       ;;
14953   *)  cf_compile_generics=
14954       cf_generic_objects=
14955       ;;
14956 esac
14957
14958    # Extract the first word of "m4", so it can be a program name with args.
14959 set dummy m4; ac_word=$2
14960 echo "$as_me:14960: checking for $ac_word" >&5
14961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14962 if test "${ac_cv_prog_M4_exists+set}" = set; then
14963   echo $ECHO_N "(cached) $ECHO_C" >&6
14964 else
14965   if test -n "$M4_exists"; then
14966   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14967 else
14968   ac_save_IFS=$IFS; IFS=$ac_path_separator
14969 ac_dummy="$PATH"
14970 for ac_dir in $ac_dummy; do
14971   IFS=$ac_save_IFS
14972   test -z "$ac_dir" && ac_dir=.
14973   $as_executable_p "$ac_dir/$ac_word" || continue
14974 ac_cv_prog_M4_exists="yes"
14975 echo "$as_me:14975: found $ac_dir/$ac_word" >&5
14976 break
14977 done
14978
14979   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14980 fi
14981 fi
14982 M4_exists=$ac_cv_prog_M4_exists
14983 if test -n "$M4_exists"; then
14984   echo "$as_me:14984: result: $M4_exists" >&5
14985 echo "${ECHO_T}$M4_exists" >&6
14986 else
14987   echo "$as_me:14987: result: no" >&5
14988 echo "${ECHO_T}no" >&6
14989 fi
14990
14991    if test "$ac_cv_prog_M4_exists" = no; then
14992       cf_cv_prog_gnat_correct=no
14993       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14994    fi
14995    if test "$cf_cv_prog_gnat_correct" = yes; then
14996       echo "$as_me:14996: checking if GNAT works" >&5
14997 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14998
14999 rm -f conftest*
15000 cat >>conftest.ads <<CF_EOF
15001 procedure conftest;
15002 CF_EOF
15003 cat >>conftest.adb <<CF_EOF
15004 with Text_IO;
15005 with GNAT.OS_Lib;
15006 procedure conftest is
15007 begin
15008    Text_IO.Put ("Hello World");
15009    Text_IO.New_Line;
15010    GNAT.OS_Lib.OS_Exit (0);
15011 end conftest;
15012 CF_EOF
15013 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15014    if ( ./conftest 1>&5 2>&1 ) ; then
15015       cf_cv_prog_gnat_correct=yes
15016    else
15017       cf_cv_prog_gnat_correct=no
15018    fi
15019 else
15020    cf_cv_prog_gnat_correct=no
15021 fi
15022 rm -f conftest*
15023
15024       echo "$as_me:15024: result: $cf_cv_prog_gnat_correct" >&5
15025 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15026    fi
15027 fi
15028 if test "$cf_cv_prog_gnat_correct" = yes; then
15029    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15030
15031    echo "$as_me:15031: checking if GNAT pragma Unreferenced works" >&5
15032 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15033
15034 rm -f conftest*
15035 cat >>conftest.ads <<CF_EOF
15036 procedure conftest;
15037 CF_EOF
15038 cat >>conftest.adb <<CF_EOF
15039 with Text_IO;
15040 with GNAT.OS_Lib;
15041 procedure conftest is
15042    test : Integer;
15043    pragma Unreferenced (test);
15044 begin
15045    test := 1;
15046    Text_IO.Put ("Hello World");
15047    Text_IO.New_Line;
15048    GNAT.OS_Lib.OS_Exit (0);
15049 end conftest;
15050 CF_EOF
15051 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15052       cf_cv_pragma_unreferenced=yes
15053 else
15054    cf_cv_pragma_unreferenced=no
15055 fi
15056 rm -f conftest*
15057
15058    echo "$as_me:15058: result: $cf_cv_pragma_unreferenced" >&5
15059 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15060
15061    # if the pragma is supported, use it (needed in the Trace code).
15062    if test $cf_cv_pragma_unreferenced = yes ; then
15063       PRAGMA_UNREF=TRUE
15064    else
15065       PRAGMA_UNREF=FALSE
15066    fi
15067
15068 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15069 if test "${with_ada_compiler+set}" = set; then
15070   withval="$with_ada_compiler"
15071   cf_ada_compiler=$withval
15072 else
15073   cf_ada_compiler=gnatmake
15074 fi;
15075
15076    cf_ada_package=terminal_interface
15077
15078 # Check whether --with-ada-include or --without-ada-include was given.
15079 if test "${with_ada_include+set}" = set; then
15080   withval="$with_ada_include"
15081
15082 else
15083   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15084 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15085
15086 if test "x$prefix" != xNONE; then
15087   cf_path_syntax="$prefix"
15088 else
15089   cf_path_syntax="$ac_default_prefix"
15090 fi
15091
15092 case ".$withval" in #(vi
15093 .\$\(*\)*|.\'*\'*) #(vi
15094   ;;
15095 ..|./*|.\\*) #(vi
15096   ;;
15097 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15098   ;;
15099 .\${*prefix}*) #(vi
15100   eval withval="$withval"
15101   case ".$withval" in #(vi
15102   .NONE/*)
15103     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15104     ;;
15105   esac
15106   ;; #(vi
15107 .no|.NONE/*)
15108   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15109   ;;
15110 *)
15111   { { echo "$as_me:15111: error: expected a pathname, not \"$withval\"" >&5
15112 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15113    { (exit 1); exit 1; }; }
15114   ;;
15115 esac
15116
15117 fi
15118 ADA_INCLUDE="$withval"
15119
15120 # Check whether --with-ada-objects or --without-ada-objects was given.
15121 if test "${with_ada_objects+set}" = set; then
15122   withval="$with_ada_objects"
15123
15124 else
15125   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15126 fi; if test -n "$prefix/lib/ada/adalib" ; then
15127
15128 if test "x$prefix" != xNONE; then
15129   cf_path_syntax="$prefix"
15130 else
15131   cf_path_syntax="$ac_default_prefix"
15132 fi
15133
15134 case ".$withval" in #(vi
15135 .\$\(*\)*|.\'*\'*) #(vi
15136   ;;
15137 ..|./*|.\\*) #(vi
15138   ;;
15139 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15140   ;;
15141 .\${*prefix}*) #(vi
15142   eval withval="$withval"
15143   case ".$withval" in #(vi
15144   .NONE/*)
15145     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15146     ;;
15147   esac
15148   ;; #(vi
15149 .no|.NONE/*)
15150   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15151   ;;
15152 *)
15153   { { echo "$as_me:15153: error: expected a pathname, not \"$withval\"" >&5
15154 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15155    { (exit 1); exit 1; }; }
15156   ;;
15157 esac
15158
15159 fi
15160 ADA_OBJECTS="$withval"
15161
15162 fi
15163 fi
15164 else
15165    cf_with_ada=no
15166 fi
15167
15168 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15169 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15170 ###
15171 ### ticlib modules may be a separate library, otherwise contained in termlib.
15172 ### termlib modules may be a separate library, otherwise contained in ncurses.
15173 ###
15174 ### The of "+" or " " between the tokens controls the way the script
15175 ### chooses to split module lists into libraries.
15176 ###
15177 ### (see CF_LIB_RULES).
15178 echo "$as_me:15178: checking for library subsets" >&5
15179 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15180 LIB_SUBSETS=
15181
15182 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
15183         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15184         if test "$with_ticlib" != no ; then
15185                 LIB_SUBSETS="${LIB_SUBSETS} "
15186         else
15187                 LIB_SUBSETS="${LIB_SUBSETS}+"
15188         fi
15189 fi
15190
15191 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15192 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15193 if test "$with_termlib" != no ; then
15194         LIB_SUBSETS="${LIB_SUBSETS} "
15195 else
15196         LIB_SUBSETS="${LIB_SUBSETS}+"
15197 fi
15198
15199 LIB_SUBSETS="${LIB_SUBSETS}base"
15200 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15201 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15202
15203 echo "$as_me:15203: result: $LIB_SUBSETS" >&5
15204 echo "${ECHO_T}$LIB_SUBSETS" >&6
15205
15206 ### Construct the list of include-directories to be generated
15207
15208 CPPFLAGS="-I. -I../include $CPPFLAGS"
15209 if test "$srcdir" != "."; then
15210         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15211 fi
15212 if test "$GCC" != yes; then
15213         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15214 elif test "$includedir" != "/usr/include"; then
15215         if test "$includedir" = '${prefix}/include' ; then
15216                 if test $prefix != /usr ; then
15217                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15218                 fi
15219         else
15220                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15221         fi
15222 fi
15223
15224 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15225 if test "$srcdir" != "."; then
15226         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15227 fi
15228 if test "$GCC" != yes; then
15229         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15230 elif test "$includedir" != "/usr/include"; then
15231         if test "$includedir" = '${prefix}/include' ; then
15232                 if test $prefix != /usr ; then
15233                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15234                 fi
15235         else
15236                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15237         fi
15238 fi
15239
15240 ### Build up pieces for makefile rules
15241 echo "$as_me:15241: checking default library suffix" >&5
15242 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15243
15244         case $DFT_LWR_MODEL in
15245         libtool) DFT_ARG_SUFFIX=''   ;;
15246         normal)  DFT_ARG_SUFFIX=''   ;;
15247         debug)   DFT_ARG_SUFFIX='_g' ;;
15248         profile) DFT_ARG_SUFFIX='_p' ;;
15249         shared)  DFT_ARG_SUFFIX=''   ;;
15250         esac
15251         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15252 echo "$as_me:15252: result: $DFT_ARG_SUFFIX" >&5
15253 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15254
15255 echo "$as_me:15255: checking default library-dependency suffix" >&5
15256 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15257
15258         case $DFT_LWR_MODEL in
15259         libtool) DFT_DEP_SUFFIX='.la'  ;;
15260         normal)  DFT_DEP_SUFFIX='.a'   ;;
15261         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15262         profile) DFT_DEP_SUFFIX='_p.a' ;;
15263         shared)
15264                 case $cf_cv_system_name in
15265                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15266                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15267                 hpux*)
15268                         case $target in
15269                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15270                         *)      DFT_DEP_SUFFIX='.sl' ;;
15271                         esac
15272                         ;;
15273                 *)      DFT_DEP_SUFFIX='.so'  ;;
15274                 esac
15275         esac
15276         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15277 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15278 if test $DFT_LWR_MODEL = shared ; then
15279         case $cf_cv_system_name in #(vi
15280         cygwin*)
15281                 DFT_DEP_SUFFIX=".dll.a"
15282                 DFT_LIB_SUFFIX=".dll"
15283                 ;;
15284         esac
15285 fi
15286 echo "$as_me:15286: result: $DFT_DEP_SUFFIX" >&5
15287 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15288
15289 echo "$as_me:15289: checking default object directory" >&5
15290 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15291
15292         case $DFT_LWR_MODEL in
15293         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15294         normal)  DFT_OBJ_SUBDIR='objects' ;;
15295         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15296         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15297         shared)
15298                 case $cf_cv_system_name in #(vi
15299                 cygwin) #(vi
15300                         DFT_OBJ_SUBDIR='objects' ;;
15301                 *)
15302                         DFT_OBJ_SUBDIR='obj_s' ;;
15303                 esac
15304         esac
15305 echo "$as_me:15305: result: $DFT_OBJ_SUBDIR" >&5
15306 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15307
15308 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15309 if test "$cf_with_cxx" = yes ; then
15310 echo "$as_me:15310: checking c++ library-dependency suffix" >&5
15311 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15312 if test "$with_libtool" != "no"; then
15313         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15314 else
15315
15316         case normal in
15317         libtool) CXX_LIB_SUFFIX='.la'  ;;
15318         normal)  CXX_LIB_SUFFIX='.a'   ;;
15319         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15320         profile) CXX_LIB_SUFFIX='_p.a' ;;
15321         shared)
15322                 case $cf_cv_system_name in
15323                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15324                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15325                 hpux*)
15326                         case $target in
15327                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15328                         *)      CXX_LIB_SUFFIX='.sl' ;;
15329                         esac
15330                         ;;
15331                 *)      CXX_LIB_SUFFIX='.so'  ;;
15332                 esac
15333         esac
15334         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15335 fi
15336 echo "$as_me:15336: result: $CXX_LIB_SUFFIX" >&5
15337 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15338
15339 fi
15340
15341 # do not want -ldl in build except as needed for -lncurses dependency
15342 if test "$with_dlsym" = yes ; then
15343 if test $DFT_LWR_MODEL = shared || \
15344    test $DFT_LWR_MODEL = libtool ; then
15345
15346 # remove dl library from $LIBS
15347 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15348
15349 fi
15350 fi
15351 ### Set up low-level terminfo dependencies for makefiles.
15352
15353 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15354 # do not need libdl
15355 TICS_LIST=
15356 if test "$with_dlsym" = yes ; then
15357
15358 # remove dl library from $SHLIB_LIST
15359 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15360
15361 fi
15362
15363 if test "$with_ticlib" != no ; then
15364
15365         if test "$with_ticlib" != yes ; then
15366                 TICS_NAME=$with_ticlib
15367                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15368                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15369                 TICS_LIB_SUFFIX="${with_ticlib}"
15370         else
15371                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15372                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15373                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15374         fi
15375         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15376 else
15377         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15378 fi
15379
15380 if test "$with_termlib" != no ; then
15381
15382         if test "$with_termlib" != yes ; then
15383                 TINFO_NAME=$with_termlib
15384                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15385                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15386                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15387                 TINFO_LIB_SUFFIX="${with_termlib}"
15388         else
15389                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15390                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15391                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15392                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15393         fi
15394
15395         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15396         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15397         if test "$DFT_LWR_MODEL" = "libtool"; then
15398                 TEST_ARGS="${TEST_DEPS}"
15399                 TEST_ARG2="${TEST_DEP2}"
15400                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15401         else
15402                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15403                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15404                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15405                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15406                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15407         fi
15408 else
15409         # the next lines are needed for linking libtic over libncurses
15410         TINFO_NAME=${LIB_NAME}
15411         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15412         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15413         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15414
15415         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15416 fi
15417
15418 if test "$DFT_LWR_MODEL" = shared ; then
15419         case $cf_cv_system_name in #(vi
15420         cygwin*)
15421                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15422                 TINFO_SUFFIX=.dll
15423                 ;;
15424         esac
15425 fi
15426
15427 if test "$with_dlsym" = yes ; then
15428
15429 # remove dl library from $TICS_LIST
15430 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15431
15432 fi
15433
15434 # needed for Ada95
15435 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15436
15437 case $DFT_LWR_MODEL in
15438 normal|debug|profile)
15439
15440 if test "$GCC" = yes ; then
15441         LDFLAGS_STATIC=-static
15442         LDFLAGS_SHARED=-dynamic
15443 else
15444         case $cf_cv_system_name in #(
15445         aix[45]*)       #( from ld manpage
15446                 LDFLAGS_STATIC=-bstatic
15447                 LDFLAGS_SHARED=-bdynamic
15448                 ;;
15449         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15450                 # We could also use just "archive" and "shared".
15451                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15452                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15453                 ;;
15454         irix*)          #( from ld manpage IRIX64
15455                 LDFLAGS_STATIC=-Bstatic
15456                 LDFLAGS_SHARED=-Bdynamic
15457                 ;;
15458         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15459                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15460                 LDFLAGS_STATIC=-noso
15461                 LDFLAGS_SHARED=-so_archive
15462                 ;;
15463         solaris2*)
15464                 LDFLAGS_STATIC=-Bstatic
15465                 LDFLAGS_SHARED=-Bdynamic
15466                 ;;
15467         esac
15468 fi
15469
15470         ;;
15471 esac
15472
15473 echo "$as_me:15473: checking where we will install curses.h" >&5
15474 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15475 test "$with_overwrite" = no && \
15476 test "x$includedir" = 'x${prefix}/include' && \
15477         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15478 echo "$as_me:15478: result: $includedir" >&5
15479 echo "${ECHO_T}$includedir" >&6
15480
15481 ### Resolve a conflict between normal and wide-curses by forcing applications
15482 ### that will need libutf8 to add it to their configure script.
15483 if test "$with_overwrite" != no ; then
15484 if test "$NCURSES_LIBUTF8" = 1 ; then
15485         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15486         { echo "$as_me:15486: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15487 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15488 fi
15489 fi
15490
15491 # used to separate tack out of the tree
15492 NCURSES_TREE=
15493
15494 ### predefined stuff for the test programs
15495 cat >>confdefs.h <<\EOF
15496 #define HAVE_SLK_COLOR 1
15497 EOF
15498
15499 ### Construct the list of subdirectories for which we'll customize makefiles
15500 ### with the appropriate compile-rules.
15501
15502 echo "$as_me:15502: checking for src modules" >&5
15503 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15504
15505 # dependencies and linker-arguments for test-programs
15506 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15507 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15508 if test "$DFT_LWR_MODEL" = "libtool"; then
15509         TEST_ARGS="${TEST_DEPS}"
15510         TEST_ARG2="${TEST_DEP2}"
15511 else
15512         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15513         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15514 fi
15515
15516 cf_cv_src_modules=
15517 for cf_dir in $modules_to_build
15518 do
15519         if test -f $srcdir/$cf_dir/modules; then
15520
15521                 # We may/may not have tack in the distribution, though the
15522                 # makefile is.
15523                 if test $cf_dir = tack ; then
15524                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15525                                 continue
15526                         fi
15527                 fi
15528
15529                 if test -z "$cf_cv_src_modules"; then
15530                         cf_cv_src_modules=$cf_dir
15531                 else
15532                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15533                 fi
15534
15535                 # Make the ncurses_cfg.h file record the library interface files as
15536                 # well.  These are header files that are the same name as their
15537                 # directory.  Ncurses is the only library that does not follow
15538                 # that pattern.
15539                 if test $cf_dir = tack ; then
15540                         continue
15541                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15542
15543 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15544
15545                         cat >>confdefs.h <<EOF
15546 #define HAVE_${cf_have_include}_H 1
15547 EOF
15548
15549                         cat >>confdefs.h <<EOF
15550 #define HAVE_LIB${cf_have_include} 1
15551 EOF
15552
15553                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15554                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15555                         if test "$DFT_LWR_MODEL" = "libtool"; then
15556                                 TEST_ARGS="${TEST_DEPS}"
15557                                 TEST_ARG2="${TEST_DEP2}"
15558                         else
15559                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15560                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15561                         fi
15562                 fi
15563         fi
15564 done
15565 echo "$as_me:15565: result: $cf_cv_src_modules" >&5
15566 echo "${ECHO_T}$cf_cv_src_modules" >&6
15567
15568 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15569 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15570
15571 SRC_SUBDIRS="man include"
15572 for cf_dir in $cf_cv_src_modules
15573 do
15574         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15575 done
15576 SRC_SUBDIRS="$SRC_SUBDIRS test"
15577 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15578 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15579
15580 ADA_SUBDIRS=
15581 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15582    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15583    ADA_SUBDIRS="gen src samples"
15584 fi
15585
15586 SUB_MAKEFILES=
15587 for cf_dir in $SRC_SUBDIRS
15588 do
15589         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15590 done
15591
15592 if test -n "$ADA_SUBDIRS"; then
15593    for cf_dir in $ADA_SUBDIRS
15594    do
15595       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15596    done
15597
15598 fi
15599
15600 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15601    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15602 fi
15603
15604 DIRS_TO_MAKE="lib"
15605 for cf_item in $cf_list_models
15606 do
15607
15608         case $cf_item in
15609         libtool) cf_subdir='obj_lo'  ;;
15610         normal)  cf_subdir='objects' ;;
15611         debug)   cf_subdir='obj_g' ;;
15612         profile) cf_subdir='obj_p' ;;
15613         shared)
15614                 case $cf_cv_system_name in #(vi
15615                 cygwin) #(vi
15616                         cf_subdir='objects' ;;
15617                 *)
15618                         cf_subdir='obj_s' ;;
15619                 esac
15620         esac
15621
15622         for cf_item2 in $DIRS_TO_MAKE
15623         do
15624                 test $cf_item2 = $cf_subdir && break
15625         done
15626         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15627 done
15628 for cf_dir in $DIRS_TO_MAKE
15629 do
15630         test ! -d $cf_dir && mkdir $cf_dir
15631 done
15632
15633 cat >>confdefs.h <<EOF
15634 #define NCURSES_PATHSEP '$PATHSEP'
15635 EOF
15636
15637 cat >>confdefs.h <<EOF
15638 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15639 EOF
15640
15641 ### Now that we're done running tests, add the compiler-warnings, if any
15642
15643 cf_fix_cppflags=no
15644 cf_new_cflags=
15645 cf_new_cppflags=
15646 cf_new_extra_cppflags=
15647
15648 for cf_add_cflags in $EXTRA_CFLAGS
15649 do
15650 case $cf_fix_cppflags in
15651 no)
15652         case $cf_add_cflags in #(vi
15653         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15654                 case $cf_add_cflags in
15655                 -D*)
15656                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15657
15658                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15659                         && test -z "${cf_tst_cflags}" \
15660                         && cf_fix_cppflags=yes
15661
15662                         if test $cf_fix_cppflags = yes ; then
15663                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15664                                 continue
15665                         elif test "${cf_tst_cflags}" = "\"'" ; then
15666                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15667                                 continue
15668                         fi
15669                         ;;
15670                 esac
15671                 case "$CPPFLAGS" in
15672                 *$cf_add_cflags) #(vi
15673                         ;;
15674                 *) #(vi
15675                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15676                         ;;
15677                 esac
15678                 ;;
15679         *)
15680                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15681                 ;;
15682         esac
15683         ;;
15684 yes)
15685         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15686
15687         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15688
15689         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15690         && test -z "${cf_tst_cflags}" \
15691         && cf_fix_cppflags=no
15692         ;;
15693 esac
15694 done
15695
15696 if test -n "$cf_new_cflags" ; then
15697
15698         CFLAGS="$CFLAGS $cf_new_cflags"
15699 fi
15700
15701 if test -n "$cf_new_cppflags" ; then
15702
15703         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15704 fi
15705
15706 if test -n "$cf_new_extra_cppflags" ; then
15707
15708         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15709 fi
15710
15711 ### Define substitutions for header files to avoid name-pollution
15712
15713 if test "$cf_cv_have_tcgetattr" = yes ; then
15714         HAVE_TCGETATTR=1
15715 else
15716         HAVE_TCGETATTR=0
15717 fi
15718
15719 if test "$ac_cv_header_termio_h" = yes ; then
15720         HAVE_TERMIO_H=1
15721 else
15722         HAVE_TERMIO_H=0
15723 fi
15724
15725 if test "$ac_cv_header_termios_h" = yes ; then
15726         HAVE_TERMIOS_H=1
15727 else
15728         HAVE_TERMIOS_H=0
15729 fi
15730
15731 ################################################################################
15732 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15733 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15734 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"
15735 ac_config_commands="$ac_config_commands default"
15736 cat >confcache <<\_ACEOF
15737 # This file is a shell script that caches the results of configure
15738 # tests run on this system so they can be shared between configure
15739 # scripts and configure runs, see configure's option --config-cache.
15740 # It is not useful on other systems.  If it contains results you don't
15741 # want to keep, you may remove or edit it.
15742 #
15743 # config.status only pays attention to the cache file if you give it
15744 # the --recheck option to rerun configure.
15745 #
15746 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15747 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15748 # following values.
15749
15750 _ACEOF
15751
15752 # The following way of writing the cache mishandles newlines in values,
15753 # but we know of no workaround that is simple, portable, and efficient.
15754 # So, don't put newlines in cache variables' values.
15755 # Ultrix sh set writes to stderr and can't be redirected directly,
15756 # and sets the high bit in the cache file unless we assign to the vars.
15757 {
15758   (set) 2>&1 |
15759     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15760     *ac_space=\ *)
15761       # `set' does not quote correctly, so add quotes (double-quote
15762       # substitution turns \\\\ into \\, and sed turns \\ into \).
15763       sed -n \
15764         "s/'/'\\\\''/g;
15765           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15766       ;;
15767     *)
15768       # `set' quotes correctly as required by POSIX, so do not add quotes.
15769       sed -n \
15770         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15771       ;;
15772     esac;
15773 } |
15774   sed '
15775      t clear
15776      : clear
15777      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15778      t end
15779      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15780      : end' >>confcache
15781 if cmp -s $cache_file confcache; then :; else
15782   if test -w $cache_file; then
15783     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15784     cat confcache >$cache_file
15785   else
15786     echo "not updating unwritable cache $cache_file"
15787   fi
15788 fi
15789 rm -f confcache
15790
15791 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15792 # Let make expand exec_prefix.
15793 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15794
15795 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15796 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15797 # trailing colons and then remove the whole line if VPATH becomes empty
15798 # (actually we leave an empty line to preserve line numbers).
15799 if test "x$srcdir" = x.; then
15800   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15801 s/:*\$(srcdir):*/:/;
15802 s/:*\${srcdir}:*/:/;
15803 s/:*@srcdir@:*/:/;
15804 s/^\([^=]*=[    ]*\):*/\1/;
15805 s/:*$//;
15806 s/^[^=]*=[      ]*$//;
15807 }'
15808 fi
15809
15810 DEFS=-DHAVE_CONFIG_H
15811
15812 : ${CONFIG_STATUS=./config.status}
15813 ac_clean_files_save=$ac_clean_files
15814 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15815 { echo "$as_me:15815: creating $CONFIG_STATUS" >&5
15816 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15817 cat >$CONFIG_STATUS <<_ACEOF
15818 #! $SHELL
15819 # Generated automatically by configure.
15820 # Run this file to recreate the current configuration.
15821 # Compiler output produced by configure, useful for debugging
15822 # configure, is in config.log if it exists.
15823
15824 debug=false
15825 SHELL=\${CONFIG_SHELL-$SHELL}
15826 ac_cs_invocation="\$0 \$@"
15827
15828 _ACEOF
15829
15830 cat >>$CONFIG_STATUS <<\_ACEOF
15831 # Be Bourne compatible
15832 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15833   emulate sh
15834   NULLCMD=:
15835 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15836   set -o posix
15837 fi
15838
15839 # Name of the executable.
15840 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15841
15842 if expr a : '\(a\)' >/dev/null 2>&1; then
15843   as_expr=expr
15844 else
15845   as_expr=false
15846 fi
15847
15848 rm -f conf$$ conf$$.exe conf$$.file
15849 echo >conf$$.file
15850 if ln -s conf$$.file conf$$ 2>/dev/null; then
15851   # We could just check for DJGPP; but this test a) works b) is more generic
15852   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15853   if test -f conf$$.exe; then
15854     # Don't use ln at all; we don't have any links
15855     as_ln_s='cp -p'
15856   else
15857     as_ln_s='ln -s'
15858   fi
15859 elif ln conf$$.file conf$$ 2>/dev/null; then
15860   as_ln_s=ln
15861 else
15862   as_ln_s='cp -p'
15863 fi
15864 rm -f conf$$ conf$$.exe conf$$.file
15865
15866 as_executable_p="test -f"
15867
15868 # Support unset when possible.
15869 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15870   as_unset=unset
15871 else
15872   as_unset=false
15873 fi
15874
15875 # NLS nuisances.
15876 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15877 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15878 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15879 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15880 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15881 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15882 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15883 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15884
15885 # IFS
15886 # We need space, tab and new line, in precisely that order.
15887 as_nl='
15888 '
15889 IFS="   $as_nl"
15890
15891 # CDPATH.
15892 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15893
15894 exec 6>&1
15895
15896 _ACEOF
15897
15898 # Files that config.status was made for.
15899 if test -n "$ac_config_files"; then
15900   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15901 fi
15902
15903 if test -n "$ac_config_headers"; then
15904   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15905 fi
15906
15907 if test -n "$ac_config_links"; then
15908   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15909 fi
15910
15911 if test -n "$ac_config_commands"; then
15912   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15913 fi
15914
15915 cat >>$CONFIG_STATUS <<\EOF
15916
15917 ac_cs_usage="\
15918 \`$as_me' instantiates files from templates according to the
15919 current configuration.
15920
15921 Usage: $0 [OPTIONS] [FILE]...
15922
15923   -h, --help       print this help, then exit
15924   -V, --version    print version number, then exit
15925   -d, --debug      don't remove temporary files
15926       --recheck    update $as_me by reconfiguring in the same conditions
15927   --file=FILE[:TEMPLATE]
15928                    instantiate the configuration file FILE
15929   --header=FILE[:TEMPLATE]
15930                    instantiate the configuration header FILE
15931
15932 Configuration files:
15933 $config_files
15934
15935 Configuration headers:
15936 $config_headers
15937
15938 Configuration commands:
15939 $config_commands
15940
15941 Report bugs to <bug-autoconf@gnu.org>."
15942 EOF
15943
15944 cat >>$CONFIG_STATUS <<EOF
15945 ac_cs_version="\\
15946 config.status
15947 configured by $0, generated by GNU Autoconf 2.52.20061216,
15948   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15949
15950 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15951 Free Software Foundation, Inc.
15952 This config.status script is free software; the Free Software Foundation
15953 gives unlimited permission to copy, distribute and modify it."
15954 srcdir=$srcdir
15955 INSTALL="$INSTALL"
15956 EOF
15957
15958 cat >>$CONFIG_STATUS <<\EOF
15959 # If no file are specified by the user, then we need to provide default
15960 # value.  By we need to know if files were specified by the user.
15961 ac_need_defaults=:
15962 while test $# != 0
15963 do
15964   case $1 in
15965   --*=*)
15966     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15967     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15968     shift
15969     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15970     shift
15971     ;;
15972   -*);;
15973   *) # This is not an option, so the user has probably given explicit
15974      # arguments.
15975      ac_need_defaults=false;;
15976   esac
15977
15978   case $1 in
15979   # Handling of the options.
15980 EOF
15981 cat >>$CONFIG_STATUS <<EOF
15982   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15983     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15984     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15985 EOF
15986 cat >>$CONFIG_STATUS <<\EOF
15987   --version | --vers* | -V )
15988     echo "$ac_cs_version"; exit 0 ;;
15989   --he | --h)
15990     # Conflict between --help and --header
15991     { { echo "$as_me:15991: error: ambiguous option: $1
15992 Try \`$0 --help' for more information." >&5
15993 echo "$as_me: error: ambiguous option: $1
15994 Try \`$0 --help' for more information." >&2;}
15995    { (exit 1); exit 1; }; };;
15996   --help | --hel | -h )
15997     echo "$ac_cs_usage"; exit 0 ;;
15998   --debug | --d* | -d )
15999     debug=: ;;
16000   --file | --fil | --fi | --f )
16001     shift
16002     CONFIG_FILES="$CONFIG_FILES $1"
16003     ac_need_defaults=false;;
16004   --header | --heade | --head | --hea )
16005     shift
16006     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16007     ac_need_defaults=false;;
16008
16009   # This is an error.
16010   -*) { { echo "$as_me:16010: error: unrecognized option: $1
16011 Try \`$0 --help' for more information." >&5
16012 echo "$as_me: error: unrecognized option: $1
16013 Try \`$0 --help' for more information." >&2;}
16014    { (exit 1); exit 1; }; } ;;
16015
16016   *) ac_config_targets="$ac_config_targets $1" ;;
16017
16018   esac
16019   shift
16020 done
16021
16022 exec 5>>config.log
16023 cat >&5 << _ACEOF
16024
16025 ## ----------------------- ##
16026 ## Running config.status.  ##
16027 ## ----------------------- ##
16028
16029 This file was extended by $as_me 2.52.20061216, executed with
16030   CONFIG_FILES    = $CONFIG_FILES
16031   CONFIG_HEADERS  = $CONFIG_HEADERS
16032   CONFIG_LINKS    = $CONFIG_LINKS
16033   CONFIG_COMMANDS = $CONFIG_COMMANDS
16034   > $ac_cs_invocation
16035 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16036
16037 _ACEOF
16038 EOF
16039
16040 cat >>$CONFIG_STATUS <<EOF
16041 #
16042 # INIT-COMMANDS section.
16043 #
16044
16045 ### Special initialization commands, used to pass information from the
16046 ### configuration-run into config.status
16047
16048 AWK="$AWK"
16049 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16050 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16051 ECHO_LINK="$ECHO_LINK"
16052 LDCONFIG="$LDCONFIG"
16053 LIB_NAME="$LIB_NAME"
16054 LIB_SUBSETS="$LIB_SUBSETS"
16055 LIB_SUFFIX="$LIB_SUFFIX"
16056 LIB_TRACING="$LIB_TRACING"
16057 MAKE_TERMINFO="$MAKE_TERMINFO"
16058 NCURSES_MAJOR="$NCURSES_MAJOR"
16059 NCURSES_MINOR="$NCURSES_MINOR"
16060 NCURSES_OSPEED="$NCURSES_OSPEED"
16061 NCURSES_PATCH="$NCURSES_PATCH"
16062 SRC_SUBDIRS="$SRC_SUBDIRS"
16063 TERMINFO="$TERMINFO"
16064 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16065 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16066 TINFO_NAME="$TINFO_NAME"
16067 TINFO_SUFFIX="$TINFO_SUFFIX"
16068 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16069 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16070 TICS_NAME="$TICS_NAME"
16071 WITH_CURSES_H="$with_curses_h"
16072 WITH_ECHO="$with_echo"
16073 WITH_OVERWRITE="$with_overwrite"
16074 cf_LIST_MODELS="$cf_list_models"
16075 cf_cv_abi_version="$cf_cv_abi_version"
16076 cf_cv_do_relink="$cf_cv_do_relink"
16077 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16078 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16079 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16080 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16081 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16082 cf_cv_rel_version="$cf_cv_rel_version"
16083 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16084 cf_cv_shlib_version="$cf_cv_shlib_version"
16085 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16086 cf_cv_system_name="$cf_cv_system_name"
16087 cf_with_cxx_binding="$cf_with_cxx_binding"
16088 host="$host"
16089 target="$target"
16090
16091 EOF
16092
16093 cat >>$CONFIG_STATUS <<\EOF
16094 for ac_config_target in $ac_config_targets
16095 do
16096   case "$ac_config_target" in
16097   # Handling of arguments.
16098   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16099   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16100   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16101   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16102   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16103   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16104   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16105   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16106   *) { { echo "$as_me:16106: error: invalid argument: $ac_config_target" >&5
16107 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16108    { (exit 1); exit 1; }; };;
16109   esac
16110 done
16111
16112 # If the user did not use the arguments to specify the items to instantiate,
16113 # then the envvar interface is used.  Set only those that are not.
16114 # We use the long form for the default assignment because of an extremely
16115 # bizarre bug on SunOS 4.1.3.
16116 if $ac_need_defaults; then
16117   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16118   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16119   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16120 fi
16121
16122 # Create a temporary directory, and hook for its removal unless debugging.
16123 $debug ||
16124 {
16125   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16126   trap '{ (exit 1); exit 1; }' 1 2 13 15
16127 }
16128
16129 # Create a (secure) tmp directory for tmp files.
16130 : ${TMPDIR=/tmp}
16131 {
16132   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16133   test -n "$tmp" && test -d "$tmp"
16134 }  ||
16135 {
16136   tmp=$TMPDIR/cs$$-$RANDOM
16137   (umask 077 && mkdir $tmp)
16138 } ||
16139 {
16140    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16141    { (exit 1); exit 1; }
16142 }
16143
16144 EOF
16145
16146 cat >>$CONFIG_STATUS <<EOF
16147
16148 #
16149 # CONFIG_FILES section.
16150 #
16151
16152 # No need to generate the scripts if there are no CONFIG_FILES.
16153 # This happens for instance when ./config.status config.h
16154 if test -n "\$CONFIG_FILES"; then
16155   # Protect against being on the right side of a sed subst in config.status.
16156   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16157    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16158 s,@SHELL@,$SHELL,;t t
16159 s,@exec_prefix@,$exec_prefix,;t t
16160 s,@prefix@,$prefix,;t t
16161 s,@program_transform_name@,$program_transform_name,;t t
16162 s,@bindir@,$bindir,;t t
16163 s,@sbindir@,$sbindir,;t t
16164 s,@libexecdir@,$libexecdir,;t t
16165 s,@datadir@,$datadir,;t t
16166 s,@sysconfdir@,$sysconfdir,;t t
16167 s,@sharedstatedir@,$sharedstatedir,;t t
16168 s,@localstatedir@,$localstatedir,;t t
16169 s,@libdir@,$libdir,;t t
16170 s,@includedir@,$includedir,;t t
16171 s,@oldincludedir@,$oldincludedir,;t t
16172 s,@infodir@,$infodir,;t t
16173 s,@mandir@,$mandir,;t t
16174 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16175 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16176 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16177 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16178 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16179 s,@build_alias@,$build_alias,;t t
16180 s,@host_alias@,$host_alias,;t t
16181 s,@target_alias@,$target_alias,;t t
16182 s,@ECHO_C@,$ECHO_C,;t t
16183 s,@ECHO_N@,$ECHO_N,;t t
16184 s,@ECHO_T@,$ECHO_T,;t t
16185 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16186 s,@DEFS@,$DEFS,;t t
16187 s,@LIBS@,$LIBS,;t t
16188 s,@top_builddir@,$top_builddir,;t t
16189 s,@EGREP@,$EGREP,;t t
16190 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16191 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16192 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16193 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16194 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16195 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16196 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16197 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16198 s,@build@,$build,;t t
16199 s,@build_cpu@,$build_cpu,;t t
16200 s,@build_vendor@,$build_vendor,;t t
16201 s,@build_os@,$build_os,;t t
16202 s,@host@,$host,;t t
16203 s,@host_cpu@,$host_cpu,;t t
16204 s,@host_vendor@,$host_vendor,;t t
16205 s,@host_os@,$host_os,;t t
16206 s,@target@,$target,;t t
16207 s,@target_cpu@,$target_cpu,;t t
16208 s,@target_vendor@,$target_vendor,;t t
16209 s,@target_os@,$target_os,;t t
16210 s,@CC@,$CC,;t t
16211 s,@CFLAGS@,$CFLAGS,;t t
16212 s,@LDFLAGS@,$LDFLAGS,;t t
16213 s,@CPPFLAGS@,$CPPFLAGS,;t t
16214 s,@ac_ct_CC@,$ac_ct_CC,;t t
16215 s,@EXEEXT@,$EXEEXT,;t t
16216 s,@OBJEXT@,$OBJEXT,;t t
16217 s,@CPP@,$CPP,;t t
16218 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16219 s,@PROG_EXT@,$PROG_EXT,;t t
16220 s,@LDCONFIG@,$LDCONFIG,;t t
16221 s,@CXX@,$CXX,;t t
16222 s,@CXXFLAGS@,$CXXFLAGS,;t t
16223 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16224 s,@AWK@,$AWK,;t t
16225 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16226 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16227 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16228 s,@LINT@,$LINT,;t t
16229 s,@LINT_OPTS@,$LINT_OPTS,;t t
16230 s,@LN_S@,$LN_S,;t t
16231 s,@SET_MAKE@,$SET_MAKE,;t t
16232 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16233 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16234 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16235 s,@RANLIB@,$RANLIB,;t t
16236 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16237 s,@LD@,$LD,;t t
16238 s,@ac_ct_LD@,$ac_ct_LD,;t t
16239 s,@AR@,$AR,;t t
16240 s,@ac_ct_AR@,$ac_ct_AR,;t t
16241 s,@AR_OPTS@,$AR_OPTS,;t t
16242 s,@DESTDIR@,$DESTDIR,;t t
16243 s,@BUILD_CC@,$BUILD_CC,;t t
16244 s,@BUILD_CPP@,$BUILD_CPP,;t t
16245 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16246 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16247 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16248 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16249 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16250 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16251 s,@cf_list_models@,$cf_list_models,;t t
16252 s,@LIBTOOL@,$LIBTOOL,;t t
16253 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16254 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16255 s,@LIB_CREATE@,$LIB_CREATE,;t t
16256 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16257 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16258 s,@LIB_PREP@,$LIB_PREP,;t t
16259 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16260 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16261 s,@LIB_LINK@,$LIB_LINK,;t t
16262 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16263 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16264 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16265 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16266 s,@TICS_NAME@,$TICS_NAME,;t t
16267 s,@TINFO_NAME@,$TINFO_NAME,;t t
16268 s,@LIB_NAME@,$LIB_NAME,;t t
16269 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16270 s,@CC_G_OPT@,$CC_G_OPT,;t t
16271 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16272 s,@LD_MODEL@,$LD_MODEL,;t t
16273 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16274 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16275 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16276 s,@LINK_PROGS@,$LINK_PROGS,;t t
16277 s,@LINK_TESTS@,$LINK_TESTS,;t t
16278 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16279 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16280 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16281 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16282 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16283 s,@PATHSEP@,$PATHSEP,;t t
16284 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16285 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16286 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16287 s,@TERMINFO@,$TERMINFO,;t t
16288 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16289 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16290 s,@TERMPATH@,$TERMPATH,;t t
16291 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16292 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16293 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16294 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16295 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16296 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16297 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16298 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16299 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16300 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16301 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16302 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16303 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16304 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16305 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16306 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16307 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16308 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16309 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16310 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16311 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16312 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16313 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16314 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16315 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16316 s,@ECHO_LINK@,$ECHO_LINK,;t t
16317 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16318 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16319 s,@ADA_TRACE@,$ADA_TRACE,;t t
16320 s,@MATH_LIB@,$MATH_LIB,;t t
16321 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16322 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16323 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16324 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16325 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16326 s,@CXXCPP@,$CXXCPP,;t t
16327 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16328 s,@CXX_AR@,$CXX_AR,;t t
16329 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16330 s,@CXXLIBS@,$CXXLIBS,;t t
16331 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16332 s,@gnat_exists@,$gnat_exists,;t t
16333 s,@M4_exists@,$M4_exists,;t t
16334 s,@cf_ada_make@,$cf_ada_make,;t t
16335 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16336 s,@cf_ada_package@,$cf_ada_package,;t t
16337 s,@ADAFLAGS@,$ADAFLAGS,;t t
16338 s,@cf_compile_generics@,$cf_compile_generics,;t t
16339 s,@cf_generic_objects@,$cf_generic_objects,;t t
16340 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16341 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16342 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16343 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16344 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16345 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16346 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16347 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16348 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16349 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16350 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16351 s,@TICS_ARGS@,$TICS_ARGS,;t t
16352 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16353 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16354 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16355 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16356 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16357 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16358 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16359 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16360 s,@TICS_LIST@,$TICS_LIST,;t t
16361 s,@TINFO_LIST@,$TINFO_LIST,;t t
16362 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16363 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16364 s,@TEST_ARGS@,$TEST_ARGS,;t t
16365 s,@TEST_DEPS@,$TEST_DEPS,;t t
16366 s,@TEST_ARG2@,$TEST_ARG2,;t t
16367 s,@TEST_DEP2@,$TEST_DEP2,;t t
16368 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16369 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16370 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16371 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16372 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16373 CEOF
16374
16375 EOF
16376
16377   cat >>$CONFIG_STATUS <<\EOF
16378   # Split the substitutions into bite-sized pieces for seds with
16379   # small command number limits, like on Digital OSF/1 and HP-UX.
16380   ac_max_sed_lines=48
16381   ac_sed_frag=1 # Number of current file.
16382   ac_beg=1 # First line for current file.
16383   ac_end=$ac_max_sed_lines # Line after last line for current file.
16384   ac_more_lines=:
16385   ac_sed_cmds=
16386   while $ac_more_lines; do
16387     if test $ac_beg -gt 1; then
16388       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16389     else
16390       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16391     fi
16392     if test ! -s $tmp/subs.frag; then
16393       ac_more_lines=false
16394     else
16395       # The purpose of the label and of the branching condition is to
16396       # speed up the sed processing (if there are no `@' at all, there
16397       # is no need to browse any of the substitutions).
16398       # These are the two extra sed commands mentioned above.
16399       (echo ':t
16400   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16401       if test -z "$ac_sed_cmds"; then
16402         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16403       else
16404         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16405       fi
16406       ac_sed_frag=`expr $ac_sed_frag + 1`
16407       ac_beg=$ac_end
16408       ac_end=`expr $ac_end + $ac_max_sed_lines`
16409     fi
16410   done
16411   if test -z "$ac_sed_cmds"; then
16412     ac_sed_cmds=cat
16413   fi
16414 fi # test -n "$CONFIG_FILES"
16415
16416 EOF
16417 cat >>$CONFIG_STATUS <<\EOF
16418 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16419   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16420   case $ac_file in
16421   - | *:- | *:-:* ) # input from stdin
16422         cat >$tmp/stdin
16423         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16424         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16425   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16426         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16427   * )   ac_file_in=$ac_file.in ;;
16428   esac
16429
16430   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16431   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16432          X"$ac_file" : 'X\(//\)[^/]' \| \
16433          X"$ac_file" : 'X\(//\)$' \| \
16434          X"$ac_file" : 'X\(/\)' \| \
16435          .     : '\(.\)' 2>/dev/null ||
16436 echo X"$ac_file" |
16437     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16438           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16439           /^X\(\/\/\)$/{ s//\1/; q; }
16440           /^X\(\/\).*/{ s//\1/; q; }
16441           s/.*/./; q'`
16442   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16443     { case "$ac_dir" in
16444   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16445   *)                      as_incr_dir=.;;
16446 esac
16447 as_dummy="$ac_dir"
16448 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16449   case $as_mkdir_dir in
16450     # Skip DOS drivespec
16451     ?:) as_incr_dir=$as_mkdir_dir ;;
16452     *)
16453       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16454       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16455     ;;
16456   esac
16457 done; }
16458
16459     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16460     # A "../" for each directory in $ac_dir_suffix.
16461     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16462   else
16463     ac_dir_suffix= ac_dots=
16464   fi
16465
16466   case $srcdir in
16467   .)  ac_srcdir=.
16468       if test -z "$ac_dots"; then
16469          ac_top_srcdir=.
16470       else
16471          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16472       fi ;;
16473   [\\/]* | ?:[\\/]* )
16474       ac_srcdir=$srcdir$ac_dir_suffix;
16475       ac_top_srcdir=$srcdir ;;
16476   *) # Relative path.
16477     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16478     ac_top_srcdir=$ac_dots$srcdir ;;
16479   esac
16480
16481   case $INSTALL in
16482   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16483   *) ac_INSTALL=$ac_dots$INSTALL ;;
16484   esac
16485
16486   if test x"$ac_file" != x-; then
16487     { echo "$as_me:16487: creating $ac_file" >&5
16488 echo "$as_me: creating $ac_file" >&6;}
16489     rm -f "$ac_file"
16490   fi
16491   # Let's still pretend it is `configure' which instantiates (i.e., don't
16492   # use $as_me), people would be surprised to read:
16493   #    /* config.h.  Generated automatically by config.status.  */
16494   configure_input="Generated automatically from `echo $ac_file_in |
16495                                                  sed 's,.*/,,'` by configure."
16496
16497   # First look for the input files in the build tree, otherwise in the
16498   # src tree.
16499   ac_file_inputs=`IFS=:
16500     for f in $ac_file_in; do
16501       case $f in
16502       -) echo $tmp/stdin ;;
16503       [\\/$]*)
16504          # Absolute (can't be DOS-style, as IFS=:)
16505          test -f "$f" || { { echo "$as_me:16505: error: cannot find input file: $f" >&5
16506 echo "$as_me: error: cannot find input file: $f" >&2;}
16507    { (exit 1); exit 1; }; }
16508          echo $f;;
16509       *) # Relative
16510          if test -f "$f"; then
16511            # Build tree
16512            echo $f
16513          elif test -f "$srcdir/$f"; then
16514            # Source tree
16515            echo $srcdir/$f
16516          else
16517            # /dev/null tree
16518            { { echo "$as_me:16518: error: cannot find input file: $f" >&5
16519 echo "$as_me: error: cannot find input file: $f" >&2;}
16520    { (exit 1); exit 1; }; }
16521          fi;;
16522       esac
16523     done` || { (exit 1); exit 1; }
16524 EOF
16525 cat >>$CONFIG_STATUS <<EOF
16526   sed "$ac_vpsub
16527 $extrasub
16528 EOF
16529 cat >>$CONFIG_STATUS <<\EOF
16530 :t
16531 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16532 s,@configure_input@,$configure_input,;t t
16533 s,@srcdir@,$ac_srcdir,;t t
16534 s,@top_srcdir@,$ac_top_srcdir,;t t
16535 s,@INSTALL@,$ac_INSTALL,;t t
16536 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16537   rm -f $tmp/stdin
16538   if test x"$ac_file" != x-; then
16539     mv $tmp/out $ac_file
16540   else
16541     cat $tmp/out
16542     rm -f $tmp/out
16543   fi
16544
16545 done
16546 EOF
16547 cat >>$CONFIG_STATUS <<\EOF
16548
16549 #
16550 # CONFIG_HEADER section.
16551 #
16552
16553 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16554 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16555 #
16556 # ac_d sets the value in "#define NAME VALUE" lines.
16557 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16558 ac_dB='[        ].*$,\1#\2'
16559 ac_dC=' '
16560 ac_dD=',;t'
16561 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16562 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16563 ac_iB='\([      ]\),\1#\2define\3'
16564 ac_iC=' '
16565 ac_iD='\4,;t'
16566 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16567 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16568 ac_uB='$,\1#\2define\3'
16569 ac_uC=' '
16570 ac_uD=',;t'
16571
16572 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16573   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16574   case $ac_file in
16575   - | *:- | *:-:* ) # input from stdin
16576         cat >$tmp/stdin
16577         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16578         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16579   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16580         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16581   * )   ac_file_in=$ac_file.in ;;
16582   esac
16583
16584   test x"$ac_file" != x- && { echo "$as_me:16584: creating $ac_file" >&5
16585 echo "$as_me: creating $ac_file" >&6;}
16586
16587   # First look for the input files in the build tree, otherwise in the
16588   # src tree.
16589   ac_file_inputs=`IFS=:
16590     for f in $ac_file_in; do
16591       case $f in
16592       -) echo $tmp/stdin ;;
16593       [\\/$]*)
16594          # Absolute (can't be DOS-style, as IFS=:)
16595          test -f "$f" || { { echo "$as_me:16595: error: cannot find input file: $f" >&5
16596 echo "$as_me: error: cannot find input file: $f" >&2;}
16597    { (exit 1); exit 1; }; }
16598          echo $f;;
16599       *) # Relative
16600          if test -f "$f"; then
16601            # Build tree
16602            echo $f
16603          elif test -f "$srcdir/$f"; then
16604            # Source tree
16605            echo $srcdir/$f
16606          else
16607            # /dev/null tree
16608            { { echo "$as_me:16608: error: cannot find input file: $f" >&5
16609 echo "$as_me: error: cannot find input file: $f" >&2;}
16610    { (exit 1); exit 1; }; }
16611          fi;;
16612       esac
16613     done` || { (exit 1); exit 1; }
16614   # Remove the trailing spaces.
16615   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16616
16617 EOF
16618
16619 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16620 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16621 # be either 'cat' or 'sort'.
16622 cat confdefs.h | uniq >conftest.vals
16623
16624 # Break up conftest.vals because some shells have a limit on
16625 # the size of here documents, and old seds have small limits too.
16626
16627 rm -f conftest.tail
16628 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16629 while grep . conftest.vals >/dev/null
16630 do
16631   # Write chunks of a limited-size here document to conftest.frag.
16632   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16633   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16634   echo 'CEOF' >> $CONFIG_STATUS
16635   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16636   rm -f conftest.vals
16637   mv conftest.tail conftest.vals
16638 done
16639 rm -f conftest.vals
16640
16641 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16642 # marker @DEFS@.
16643 echo '  cat >> conftest.edit <<CEOF
16644 /@DEFS@/r conftest.frag
16645 /@DEFS@/d
16646 CEOF
16647 sed -f conftest.edit $tmp/in > $tmp/out
16648 rm -f $tmp/in
16649 mv $tmp/out $tmp/in
16650 rm -f conftest.edit conftest.frag
16651 ' >> $CONFIG_STATUS
16652
16653 cat >>$CONFIG_STATUS <<\EOF
16654   # Let's still pretend it is `configure' which instantiates (i.e., don't
16655   # use $as_me), people would be surprised to read:
16656   #    /* config.h.  Generated automatically by config.status.  */
16657   if test x"$ac_file" = x-; then
16658     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16659   else
16660     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16661   fi
16662   cat $tmp/in >>$tmp/config.h
16663   rm -f $tmp/in
16664   if test x"$ac_file" != x-; then
16665     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16666       { echo "$as_me:16666: $ac_file is unchanged" >&5
16667 echo "$as_me: $ac_file is unchanged" >&6;}
16668     else
16669       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16670          X"$ac_file" : 'X\(//\)[^/]' \| \
16671          X"$ac_file" : 'X\(//\)$' \| \
16672          X"$ac_file" : 'X\(/\)' \| \
16673          .     : '\(.\)' 2>/dev/null ||
16674 echo X"$ac_file" |
16675     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16676           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16677           /^X\(\/\/\)$/{ s//\1/; q; }
16678           /^X\(\/\).*/{ s//\1/; q; }
16679           s/.*/./; q'`
16680       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16681         { case "$ac_dir" in
16682   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16683   *)                      as_incr_dir=.;;
16684 esac
16685 as_dummy="$ac_dir"
16686 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16687   case $as_mkdir_dir in
16688     # Skip DOS drivespec
16689     ?:) as_incr_dir=$as_mkdir_dir ;;
16690     *)
16691       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16692       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16693     ;;
16694   esac
16695 done; }
16696
16697       fi
16698       rm -f $ac_file
16699       mv $tmp/config.h $ac_file
16700     fi
16701   else
16702     cat $tmp/config.h
16703     rm -f $tmp/config.h
16704   fi
16705 done
16706 EOF
16707 cat >>$CONFIG_STATUS <<\EOF
16708
16709 #
16710 # CONFIG_COMMANDS section.
16711 #
16712 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16713   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16714   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16715
16716   case $ac_dest in
16717     default )
16718
16719 for cf_dir in test
16720 do
16721         if test ! -d $srcdir/$cf_dir; then
16722                 continue
16723         elif test -f $srcdir/$cf_dir/programs; then
16724                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16725         fi
16726 done
16727
16728         case $cf_cv_system_name in
16729         OS/2*)  LIB_PREFIX=''     ;;
16730         os2*)   LIB_PREFIX=''     ;;
16731         *)      LIB_PREFIX='lib'  ;;
16732         esac
16733 cf_prefix=$LIB_PREFIX
16734
16735 for cf_dir in $SRC_SUBDIRS
16736 do
16737         if test ! -d $srcdir/$cf_dir ; then
16738                 continue
16739         elif test -f $srcdir/$cf_dir/modules; then
16740
16741                 SHARED_LIB=
16742                 LIBS_TO_MAKE=
16743                 for cf_item in $cf_LIST_MODELS
16744                 do
16745
16746         case $cf_item in
16747         libtool) cf_suffix='.la'  ;;
16748         normal)  cf_suffix='.a'   ;;
16749         debug)   cf_suffix='_g.a' ;;
16750         profile) cf_suffix='_p.a' ;;
16751         shared)
16752                 case $cf_cv_system_name in
16753                 cygwin*) cf_suffix='.dll' ;;
16754                 darwin*) cf_suffix='.dylib' ;;
16755                 hpux*)
16756                         case $target in
16757                         ia64*)  cf_suffix='.so' ;;
16758                         *)      cf_suffix='.sl' ;;
16759                         esac
16760                         ;;
16761                 *)      cf_suffix='.so'  ;;
16762                 esac
16763         esac
16764         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16765
16766                         if test $cf_item = shared ; then
16767                         if test "$cf_cv_do_symlinks" = yes ; then
16768                                 case "$cf_cv_shlib_version" in #(vi
16769                                 rel) #(vi
16770                                         case "$cf_cv_system_name" in #(vi
16771                                         darwin*)
16772                                         case .${LIB_SUFFIX} in
16773                                         .w*)
16774                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16775                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16776                                                 ;;
16777                                         *)
16778                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16779                                                 ;;
16780                                         esac
16781                                         ;; #(vi
16782                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16783                                         esac
16784                                         ;;
16785                                 abi)
16786                                         case "$cf_cv_system_name" in #(vi
16787                                         darwin*)
16788                                         case .${LIB_SUFFIX} in
16789                                         .w*)
16790                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16791                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16792                                                 ;;
16793                                         *)
16794                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16795                                                 ;;
16796                                         esac
16797                                         ;; #(vi
16798                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16799                                         esac
16800                                         ;;
16801                                 esac
16802                         fi
16803                         # cygwin needs import library, and has unique naming convention
16804                         # use autodetected ${cf_prefix} for import lib and static lib, but
16805                         # use 'cyg' prefix for shared lib.
16806                         if test $cf_cv_shlib_version = cygdll ; then
16807                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16808                                 continue
16809                         fi
16810                         fi
16811                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16812                 done
16813
16814                 if test $cf_dir = ncurses ; then
16815                         cf_subsets="$LIB_SUBSETS"
16816                         cf_r_parts="$cf_subsets"
16817
16818                         while test -n "$cf_r_parts"
16819                         do
16820                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16821                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16822                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16823                                         case $cf_l_parts in #(vi
16824                                         *termlib*) #(vi
16825                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16826                                                 ;;
16827                                         *ticlib*)
16828                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16829                                                 ;;
16830                                         *)
16831                                                 break
16832                                                 ;;
16833                                         esac
16834                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16835                                 else
16836                                         break
16837                                 fi
16838                         done
16839                 else
16840                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16841                 fi
16842
16843                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16844                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16845                         $cf_dir/Makefile >$cf_dir/Makefile.out
16846                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16847
16848                 $AWK -f $srcdir/mk-0th.awk \
16849                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16850                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16851
16852                 for cf_subset in $cf_subsets
16853                 do
16854                         cf_subdirs=
16855                         for cf_item in $cf_LIST_MODELS
16856                         do
16857                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16858
16859 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16860
16861         case $cf_item in
16862         libtool) cf_suffix='.la'  ;;
16863         normal)  cf_suffix='.a'   ;;
16864         debug)   cf_suffix='_g.a' ;;
16865         profile) cf_suffix='_p.a' ;;
16866         shared)
16867                 case $cf_cv_system_name in
16868                 cygwin*) cf_suffix='.dll' ;;
16869                 darwin*) cf_suffix='.dylib' ;;
16870                 hpux*)
16871                         case $target in
16872                         ia64*)  cf_suffix='.so' ;;
16873                         *)      cf_suffix='.sl' ;;
16874                         esac
16875                         ;;
16876                 *)      cf_suffix='.so'  ;;
16877                 esac
16878         esac
16879         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16880
16881         case $cf_item in
16882         libtool) cf_subdir='obj_lo'  ;;
16883         normal)  cf_subdir='objects' ;;
16884         debug)   cf_subdir='obj_g' ;;
16885         profile) cf_subdir='obj_p' ;;
16886         shared)
16887                 case $cf_cv_system_name in #(vi
16888                 cygwin) #(vi
16889                         cf_subdir='objects' ;;
16890                 *)
16891                         cf_subdir='obj_s' ;;
16892                 esac
16893         esac
16894
16895                         # Test for case where we build libtinfo with a different name.
16896                         cf_libname=$cf_dir
16897                         if test $cf_dir = ncurses ; then
16898                                 case $cf_subset in
16899                                 *base*)
16900                                         ;;
16901                                 *termlib*)
16902                                         cf_libname=$TINFO_LIB_SUFFIX
16903                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16904                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16905                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16906                                         fi
16907                                         ;;
16908                                 ticlib*)
16909                                         cf_libname=$TICS_LIB_SUFFIX
16910                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16911                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16912                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16913                                         fi
16914                                         ;;
16915                                 esac
16916                         fi
16917
16918                         # These dependencies really are for development, not
16919                         # builds, but they are useful in porting, too.
16920                         cf_depend="../include/ncurses_cfg.h"
16921                         if test "$srcdir" = "."; then
16922                                 cf_reldir="."
16923                         else
16924                                 cf_reldir="\${srcdir}"
16925                         fi
16926
16927                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16928                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16929                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16930                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16931                         fi
16932
16933                         cf_dir_suffix=
16934                         old_cf_suffix="$cf_suffix"
16935                         if test "$cf_cv_shlib_version_infix" = yes ; then
16936                         if test -n "$LIB_SUFFIX" ; then
16937                                 case $LIB_SUFFIX in
16938                                 w*)
16939                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16940                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16941                                         cf_dir_suffix=w
16942                                         ;;
16943                                 esac
16944                         fi
16945                         fi
16946
16947                         $AWK -f $srcdir/mk-1st.awk \
16948                                 name=${cf_libname}${cf_dir_suffix} \
16949                                 traces=$LIB_TRACING \
16950                                 MODEL=$cf_ITEM \
16951                                 model=$cf_subdir \
16952                                 prefix=$cf_prefix \
16953                                 suffix=$cf_suffix \
16954                                 subset=$cf_subset \
16955                                 TermlibRoot=$TINFO_NAME \
16956                                 TermlibSuffix=$TINFO_SUFFIX \
16957                                 ShlibVer=$cf_cv_shlib_version \
16958                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16959                                 ReLink=${cf_cv_do_relink-no} \
16960                                 DoLinks=$cf_cv_do_symlinks \
16961                                 rmSoLocs=$cf_cv_rm_so_locs \
16962                                 ldconfig="$LDCONFIG" \
16963                                 overwrite=$WITH_OVERWRITE \
16964                                 depend="$cf_depend" \
16965                                 host="$host" \
16966                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16967
16968                         cf_suffix="$old_cf_suffix"
16969
16970                         for cf_subdir2 in $cf_subdirs lib
16971                         do
16972                                 test $cf_subdir = $cf_subdir2 && break
16973                         done
16974                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16975                         $AWK -f $srcdir/mk-2nd.awk \
16976                                 name=$cf_dir \
16977                                 traces=$LIB_TRACING \
16978                                 MODEL=$cf_ITEM \
16979                                 model=$cf_subdir \
16980                                 subset=$cf_subset \
16981                                 srcdir=$srcdir \
16982                                 echo=$WITH_ECHO \
16983                                 crenames=$cf_cv_prog_CC_c_o \
16984                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16985                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16986                         cf_subdirs="$cf_subdirs $cf_subdir"
16987                         done
16988                 done
16989         fi
16990
16991         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16992 done
16993
16994 for cf_dir in $SRC_SUBDIRS
16995 do
16996         if test ! -d $srcdir/$cf_dir ; then
16997                 continue
16998         fi
16999
17000         if test -f $cf_dir/Makefile ; then
17001                 case "$cf_dir" in
17002                 Ada95) #(vi
17003                         echo 'libs \' >> Makefile
17004                         echo 'install.libs \' >> Makefile
17005                         echo 'uninstall.libs ::' >> Makefile
17006                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17007                         ;;
17008                 esac
17009         fi
17010
17011         if test -f $srcdir/$cf_dir/modules; then
17012                 echo >> Makefile
17013                 if test -f $srcdir/$cf_dir/headers; then
17014 cat >> Makefile <<CF_EOF
17015 install.includes \\
17016 uninstall.includes \\
17017 CF_EOF
17018                 fi
17019 if test "$cf_dir" != "c++" ; then
17020 echo 'lint \' >> Makefile
17021 fi
17022 cat >> Makefile <<CF_EOF
17023 libs \\
17024 lintlib \\
17025 install.libs \\
17026 uninstall.libs \\
17027 install.$cf_dir \\
17028 uninstall.$cf_dir ::
17029         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17030 CF_EOF
17031         elif test -f $srcdir/$cf_dir/headers; then
17032 cat >> Makefile <<CF_EOF
17033
17034 libs \\
17035 install.libs \\
17036 uninstall.libs \\
17037 install.includes \\
17038 uninstall.includes ::
17039         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17040 CF_EOF
17041 fi
17042 done
17043
17044 cat >> Makefile <<CF_EOF
17045
17046 install.libs uninstall.libs \\
17047 install.data uninstall.data ::
17048 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17049
17050 install.man \\
17051 uninstall.man ::
17052         cd man && \${MAKE} \${CF_MFLAGS} \$@
17053
17054 distclean ::
17055         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17056         rm -f headers.sh headers.sed mk_shared_lib.sh
17057         rm -rf \${DIRS_TO_MAKE}
17058 CF_EOF
17059
17060 # Special case: tack's manpage lives in its own directory.
17061 if test -d tack ; then
17062 if test -f $srcdir/$tack.h; then
17063 cat >> Makefile <<CF_EOF
17064
17065 install.man \\
17066 uninstall.man ::
17067         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17068 CF_EOF
17069 fi
17070 fi
17071
17072 rm -f headers.sed headers.sh
17073
17074 echo creating headers.sh
17075 cat >headers.sh <<CF_EOF
17076 #! /bin/sh
17077 # This shell script is generated by the 'configure' script.  It is invoked in a
17078 # subdirectory of the build tree.  It generates a sed-script in the parent
17079 # directory that is used to adjust includes for header files that reside in a
17080 # subdirectory of /usr/include, etc.
17081 PRG=""
17082 while test \$# != 3
17083 do
17084 PRG="\$PRG \$1"; shift
17085 done
17086 DST=\$1
17087 REF=\$2
17088 SRC=\$3
17089 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17090 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17091 echo installing \$SRC in \$DST
17092 CF_EOF
17093
17094 if test $WITH_CURSES_H = yes; then
17095         cat >>headers.sh <<CF_EOF
17096 case \$DST in
17097 /*/include/*)
17098         END=\`basename \$DST\`
17099         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17100         do
17101                 NAME=\`basename \$i\`
17102                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17103         done
17104         ;;
17105 *)
17106         echo "" >> \$TMPSED
17107         ;;
17108 esac
17109 CF_EOF
17110
17111 else
17112         cat >>headers.sh <<CF_EOF
17113 case \$DST in
17114 /*/include/*)
17115         END=\`basename \$DST\`
17116         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17117         do
17118                 NAME=\`basename \$i\`
17119                 if test "\$NAME" = "curses.h"
17120                 then
17121                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17122                         NAME=ncurses.h
17123                 fi
17124                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17125         done
17126         ;;
17127 *)
17128         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17129         ;;
17130 esac
17131 CF_EOF
17132 fi
17133 cat >>headers.sh <<CF_EOF
17134 rm -f \$TMPSRC
17135 sed -f \$TMPSED \$SRC > \$TMPSRC
17136 NAME=\`basename \$SRC\`
17137 CF_EOF
17138 if test $WITH_CURSES_H != yes; then
17139         cat >>headers.sh <<CF_EOF
17140 test "\$NAME" = "curses.h" && NAME=ncurses.h
17141 CF_EOF
17142 fi
17143 cat >>headers.sh <<CF_EOF
17144 # Just in case someone gzip'd manpages, remove the conflicting copy.
17145 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17146
17147 eval \$PRG \$TMPSRC \$DST/\$NAME
17148 rm -f \$TMPSRC \$TMPSED
17149 CF_EOF
17150
17151 chmod 0755 headers.sh
17152
17153 for cf_dir in $SRC_SUBDIRS
17154 do
17155         if test ! -d $srcdir/$cf_dir ; then
17156                 continue
17157         fi
17158
17159         if test -f $srcdir/$cf_dir/headers; then
17160                 $AWK -f $srcdir/mk-hdr.awk \
17161                         subset="$LIB_SUBSETS" \
17162                         compat="$WITH_CURSES_H" \
17163                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17164         fi
17165
17166         if test -f $srcdir/$cf_dir/modules; then
17167                 if test "$cf_dir" != "c++" ; then
17168                         cat >>$cf_dir/Makefile <<"CF_EOF"
17169 depend : ${AUTO_SRC}
17170         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17171
17172 # DO NOT DELETE THIS LINE -- make depend depends on it.
17173 CF_EOF
17174                 fi
17175         fi
17176 done
17177
17178  ;;
17179   esac
17180 done
17181 EOF
17182
17183 cat >>$CONFIG_STATUS <<\EOF
17184
17185 { (exit 0); exit 0; }
17186 EOF
17187 chmod +x $CONFIG_STATUS
17188 ac_clean_files=$ac_clean_files_save
17189
17190 # configure is writing to config.log, and then calls config.status.
17191 # config.status does its own redirection, appending to config.log.
17192 # Unfortunately, on DOS this fails, as config.log is still kept open
17193 # by configure, so config.status won't be able to write to it; its
17194 # output is simply discarded.  So we exec the FD to /dev/null,
17195 # effectively closing config.log, so it can be properly (re)opened and
17196 # appended to by config.status.  When coming back to configure, we
17197 # need to make the FD available again.
17198 if test "$no_create" != yes; then
17199   ac_cs_success=:
17200   exec 5>/dev/null
17201   $SHELL $CONFIG_STATUS || ac_cs_success=false
17202   exec 5>>config.log
17203   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17204   # would make configure fail if this is the last instruction.
17205   $ac_cs_success || { (exit 1); exit 1; }
17206 fi
17207 ${MAKE-make} preinstall