]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20080906
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.446 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --with-bool=TYPE        override fallback type of bool variable
750   --with-caps=alt         compile with alternate Caps file
751   --with-chtype=TYPE      override type of chtype
752   --with-ospeed=TYPE      override type of ospeed variable
753   --with-mmask-t=TYPE     override type of mmask_t
754   --with-rcs-ids          compile-in RCS identifiers
755 Options to Specify How Manpages are Installed:
756   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
757                           optionally formatted/catonly, e.g., gzip,formatted
758   --with-manpage-renames  specify manpage-renaming
759   --with-manpage-aliases  specify manpage-aliases using .so
760   --with-manpage-symlinks specify manpage-aliases using symlinks
761   --with-manpage-tbl      specify manpage processing with tbl
762 Extensions:
763   --disable-ext-funcs     disable function-extensions
764   --enable-const          compile with extra/non-standard const
765   --enable-ext-colors     compile for 256-color support
766   --enable-ext-mouse      compile for extended mouse-encoding
767   --enable-no-padding     compile with $NCURSES_NO_PADDING code
768   --enable-signed-char    compile using signed Boolean's in term.h
769   --enable-sigwinch       compile with SIGWINCH handler
770   --enable-tcap-names     compile with user-definable terminal capabilities
771 Development Code:
772   --without-develop       disable development options
773   --enable-hard-tabs      compile with hard-tabs code
774   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
775 Experimental Code:
776   --disable-assumed-color do not assume anything about default-colors
777   --disable-hashmap       compile without hashmap scrolling-optimization
778   --enable-colorfgbg      compile with $COLORFGBG code
779   --with-pthread          use POSIX thread library
780   --enable-weak-symbols   enable weak-symbols for pthreads
781   --enable-reentrant      compile with experimental reentrant code
782   --enable-safe-sprintf   compile with experimental safe-sprintf code
783   --disable-scroll-hints  compile without scroll-hints code
784   --enable-wgetch-events  compile with experimental wgetch-events code
785 Testing/development Options:
786   --enable-echo           build: display "compiling" commands (default)
787   --enable-warnings       build: turn on GCC compiler warnings
788   --enable-assertions     test: turn on generation of assertion code
789   --with-dmalloc          test: use Gray Watson's dmalloc library
790   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
791   --with-valgrind         test: use valgrind
792   --disable-leaks         test: free permanent memory, analyze leaks
793   --enable-expanded       test: generate functions for certain macros
794   --disable-macros        test: use functions rather than macros
795   --with-trace            test: add trace() function to all models of ncurses
796 Ada95 Binding Options:
797   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
798   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
799   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
800
801 Some influential environment variables:
802   CC          C compiler command
803   CFLAGS      C compiler flags
804   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
805               nonstandard directory <lib dir>
806   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
807               headers in a nonstandard directory <include dir>
808   CPP         C preprocessor
809   CXX         C++ compiler command
810   CXXFLAGS    C++ compiler flags
811   CXXCPP      C++ preprocessor
812
813 Use these variables to override the choices made by `configure' or to help
814 it to find libraries and programs with nonstandard names/locations.
815
816 EOF
817 fi
818
819 if test "$ac_init_help" = "recursive"; then
820   # If there are subdirs, report their specific --help.
821   ac_popdir=`pwd`
822   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
823     cd $ac_subdir
824     # A "../" for each directory in /$ac_subdir.
825     ac_dots=`echo $ac_subdir |
826              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
827
828     case $srcdir in
829     .) # No --srcdir option.  We are building in place.
830       ac_sub_srcdir=$srcdir ;;
831     [\\/]* | ?:[\\/]* ) # Absolute path.
832       ac_sub_srcdir=$srcdir/$ac_subdir ;;
833     *) # Relative path.
834       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
835     esac
836
837     # Check for guested configure; otherwise get Cygnus style configure.
838     if test -f $ac_sub_srcdir/configure.gnu; then
839       echo
840       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
841     elif test -f $ac_sub_srcdir/configure; then
842       echo
843       $SHELL $ac_sub_srcdir/configure  --help=recursive
844     elif test -f $ac_sub_srcdir/configure.ac ||
845            test -f $ac_sub_srcdir/configure.in; then
846       echo
847       $ac_configure --help
848     else
849       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
850     fi
851     cd $ac_popdir
852   done
853 fi
854
855 test -n "$ac_init_help" && exit 0
856 if $ac_init_version; then
857   cat <<\EOF
858
859 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
860 Free Software Foundation, Inc.
861 This configure script is free software; the Free Software Foundation
862 gives unlimited permission to copy, distribute and modify it.
863 EOF
864   exit 0
865 fi
866 exec 5>config.log
867 cat >&5 <<EOF
868 This file contains any messages produced by compilers while
869 running configure, to aid debugging if configure makes a mistake.
870
871 It was created by $as_me, which was
872 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
873
874   $ $0 $@
875
876 EOF
877 {
878 cat <<_ASUNAME
879 ## ---------- ##
880 ## Platform.  ##
881 ## ---------- ##
882
883 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
884 uname -m = `(uname -m) 2>/dev/null || echo unknown`
885 uname -r = `(uname -r) 2>/dev/null || echo unknown`
886 uname -s = `(uname -s) 2>/dev/null || echo unknown`
887 uname -v = `(uname -v) 2>/dev/null || echo unknown`
888
889 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
890 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
891
892 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
893 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
894 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
895 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
896 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
897 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
898 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
899
900 PATH = $PATH
901
902 _ASUNAME
903 } >&5
904
905 cat >&5 <<EOF
906 ## ------------ ##
907 ## Core tests.  ##
908 ## ------------ ##
909
910 EOF
911
912 # Keep a trace of the command line.
913 # Strip out --no-create and --no-recursion so they do not pile up.
914 # Also quote any args containing shell meta-characters.
915 ac_configure_args=
916 ac_sep=
917 for ac_arg
918 do
919   case $ac_arg in
920   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
921   | --no-cr | --no-c) ;;
922   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
923   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
924   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
926     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
927     ac_sep=" " ;;
928   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
929      ac_sep=" " ;;
930   esac
931   # Get rid of the leading space.
932 done
933
934 # When interrupted or exit'd, cleanup temporary files, and complete
935 # config.log.  We remove comments because anyway the quotes in there
936 # would cause problems or look ugly.
937 trap 'exit_status=$?
938   # Save into config.log some information that might help in debugging.
939   echo >&5
940   echo "## ----------------- ##" >&5
941   echo "## Cache variables.  ##" >&5
942   echo "## ----------------- ##" >&5
943   echo >&5
944   # The following way of writing the cache mishandles newlines in values,
945 {
946   (set) 2>&1 |
947     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
948     *ac_space=\ *)
949       sed -n \
950         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
951           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
952       ;;
953     *)
954       sed -n \
955         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
956       ;;
957     esac;
958 } >&5
959   sed "/^$/d" confdefs.h >conftest.log
960   if test -s conftest.log; then
961     echo >&5
962     echo "## ------------ ##" >&5
963     echo "## confdefs.h.  ##" >&5
964     echo "## ------------ ##" >&5
965     echo >&5
966     cat conftest.log >&5
967   fi
968   (echo; echo) >&5
969   test "$ac_signal" != 0 &&
970     echo "$as_me: caught signal $ac_signal" >&5
971   echo "$as_me: exit $exit_status" >&5
972   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
973     exit $exit_status
974      ' 0
975 for ac_signal in 1 2 13 15; do
976   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
977 done
978 ac_signal=0
979
980 # confdefs.h avoids OS command line length limits that DEFS can exceed.
981 rm -rf conftest* confdefs.h
982 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
983 echo >confdefs.h
984
985 # Let the site file select an alternate cache file if it wants to.
986 # Prefer explicitly selected file to automatically selected ones.
987 if test -z "$CONFIG_SITE"; then
988   if test "x$prefix" != xNONE; then
989     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
990   else
991     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
992   fi
993 fi
994 for ac_site_file in $CONFIG_SITE; do
995   if test -r "$ac_site_file"; then
996     { echo "$as_me:996: loading site script $ac_site_file" >&5
997 echo "$as_me: loading site script $ac_site_file" >&6;}
998     cat "$ac_site_file" >&5
999     . "$ac_site_file"
1000   fi
1001 done
1002
1003 if test -r "$cache_file"; then
1004   # Some versions of bash will fail to source /dev/null (special
1005   # files actually), so we avoid doing that.
1006   if test -f "$cache_file"; then
1007     { echo "$as_me:1007: loading cache $cache_file" >&5
1008 echo "$as_me: loading cache $cache_file" >&6;}
1009     case $cache_file in
1010       [\\/]* | ?:[\\/]* ) . $cache_file;;
1011       *)                      . ./$cache_file;;
1012     esac
1013   fi
1014 else
1015   { echo "$as_me:1015: creating cache $cache_file" >&5
1016 echo "$as_me: creating cache $cache_file" >&6;}
1017   >$cache_file
1018 fi
1019
1020 # Check that the precious variables saved in the cache have kept the same
1021 # value.
1022 ac_cache_corrupted=false
1023 for ac_var in `(set) 2>&1 |
1024                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1025   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1026   eval ac_new_set=\$ac_env_${ac_var}_set
1027   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1028   eval ac_new_val="\$ac_env_${ac_var}_value"
1029   case $ac_old_set,$ac_new_set in
1030     set,)
1031       { echo "$as_me:1031: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1032 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1033       ac_cache_corrupted=: ;;
1034     ,set)
1035       { echo "$as_me:1035: error: \`$ac_var' was not set in the previous run" >&5
1036 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1037       ac_cache_corrupted=: ;;
1038     ,);;
1039     *)
1040       if test "x$ac_old_val" != "x$ac_new_val"; then
1041         { echo "$as_me:1041: error: \`$ac_var' has changed since the previous run:" >&5
1042 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1043         { echo "$as_me:1043:   former value:  $ac_old_val" >&5
1044 echo "$as_me:   former value:  $ac_old_val" >&2;}
1045         { echo "$as_me:1045:   current value: $ac_new_val" >&5
1046 echo "$as_me:   current value: $ac_new_val" >&2;}
1047         ac_cache_corrupted=:
1048       fi;;
1049   esac
1050   # Pass precious variables to config.status.  It doesn't matter if
1051   # we pass some twice (in addition to the command line arguments).
1052   if test "$ac_new_set" = set; then
1053     case $ac_new_val in
1054     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1055       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1056       ac_configure_args="$ac_configure_args '$ac_arg'"
1057       ;;
1058     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1059        ;;
1060     esac
1061   fi
1062 done
1063 if $ac_cache_corrupted; then
1064   { echo "$as_me:1064: error: changes in the environment can compromise the build" >&5
1065 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1066   { { echo "$as_me:1066: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1067 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1068    { (exit 1); exit 1; }; }
1069 fi
1070
1071 ac_ext=c
1072 ac_cpp='$CPP $CPPFLAGS'
1073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1076 ac_main_return=return
1077
1078 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1079   *c*,-n*) ECHO_N= ECHO_C='
1080 ' ECHO_T='      ' ;;
1081   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1082   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1083 esac
1084 echo "#! $SHELL" >conftest.sh
1085 echo  "exit 0"   >>conftest.sh
1086 chmod +x conftest.sh
1087 if { (echo "$as_me:1087: PATH=\".;.\"; conftest.sh") >&5
1088   (PATH=".;."; conftest.sh) 2>&5
1089   ac_status=$?
1090   echo "$as_me:1090: \$? = $ac_status" >&5
1091   (exit $ac_status); }; then
1092   ac_path_separator=';'
1093 else
1094   ac_path_separator=:
1095 fi
1096 PATH_SEPARATOR="$ac_path_separator"
1097 rm -f conftest.sh
1098
1099 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1100
1101 top_builddir=`pwd`
1102
1103 echo "$as_me:1103: checking for egrep" >&5
1104 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1105 if test "${ac_cv_prog_egrep+set}" = set; then
1106   echo $ECHO_N "(cached) $ECHO_C" >&6
1107 else
1108   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1109     then ac_cv_prog_egrep='grep -E'
1110     else ac_cv_prog_egrep='egrep'
1111     fi
1112 fi
1113 echo "$as_me:1113: result: $ac_cv_prog_egrep" >&5
1114 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1115  EGREP=$ac_cv_prog_egrep
1116
1117 test -z "$EGREP" && { { echo "$as_me:1117: error: No egrep program found" >&5
1118 echo "$as_me: error: No egrep program found" >&2;}
1119    { (exit 1); exit 1; }; }
1120
1121 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 cf_cv_abi_version=${NCURSES_MAJOR}
1125 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1126 cf_cv_timestamp=`date`
1127 echo "$as_me:1127: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1128 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1129
1130 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1131
1132 # Check whether --with-rel-version or --without-rel-version was given.
1133 if test "${with_rel_version+set}" = set; then
1134   withval="$with_rel_version"
1135   { echo "$as_me:1135: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1136 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1137  cf_cv_rel_version=$withval
1138 fi;
1139
1140  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1141  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1142
1143 if test -n "$NCURSES_MAJOR" ; then
1144   case $NCURSES_MAJOR in #(vi
1145   [0-9]*) #(vi
1146         ;;
1147   *)
1148         { { echo "$as_me:1148: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1149 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1150    { (exit 1); exit 1; }; }
1151         ;;
1152   esac
1153 else
1154   { { echo "$as_me:1154: error: Release major-version value is empty" >&5
1155 echo "$as_me: error: Release major-version value is empty" >&2;}
1156    { (exit 1); exit 1; }; }
1157 fi
1158
1159 if test -n "$NCURSES_MINOR" ; then
1160   case $NCURSES_MINOR in #(vi
1161   [0-9]*) #(vi
1162         ;;
1163   *)
1164         { { echo "$as_me:1164: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1165 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1166    { (exit 1); exit 1; }; }
1167         ;;
1168   esac
1169 else
1170   { { echo "$as_me:1170: error: Release minor-version value is empty" >&5
1171 echo "$as_me: error: Release minor-version value is empty" >&2;}
1172    { (exit 1); exit 1; }; }
1173 fi
1174
1175 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1176
1177 # Check whether --with-abi-version or --without-abi-version was given.
1178 if test "${with_abi_version+set}" = set; then
1179   withval="$with_abi_version"
1180   { echo "$as_me:1180: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1181 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1182  cf_cv_abi_version=$withval
1183 fi;
1184
1185 if test -n "$cf_cv_abi_version" ; then
1186   case $cf_cv_abi_version in #(vi
1187   [0-9]*) #(vi
1188         ;;
1189   *)
1190         { { echo "$as_me:1190: error: ABI version is not a number: $cf_cv_abi_version" >&5
1191 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1192    { (exit 1); exit 1; }; }
1193         ;;
1194   esac
1195 else
1196   { { echo "$as_me:1196: error: ABI version value is empty" >&5
1197 echo "$as_me: error: ABI version value is empty" >&2;}
1198    { (exit 1); exit 1; }; }
1199 fi
1200
1201 ac_aux_dir=
1202 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1203   if test -f $ac_dir/install-sh; then
1204     ac_aux_dir=$ac_dir
1205     ac_install_sh="$ac_aux_dir/install-sh -c"
1206     break
1207   elif test -f $ac_dir/install.sh; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/install.sh -c"
1210     break
1211   elif test -f $ac_dir/shtool; then
1212     ac_aux_dir=$ac_dir
1213     ac_install_sh="$ac_aux_dir/shtool install -c"
1214     break
1215   fi
1216 done
1217 if test -z "$ac_aux_dir"; then
1218   { { echo "$as_me:1218: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1219 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1220    { (exit 1); exit 1; }; }
1221 fi
1222 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1223 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1224 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1225
1226 # Make sure we can run config.sub.
1227 $ac_config_sub sun4 >/dev/null 2>&1 ||
1228   { { echo "$as_me:1228: error: cannot run $ac_config_sub" >&5
1229 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1230    { (exit 1); exit 1; }; }
1231
1232 echo "$as_me:1232: checking build system type" >&5
1233 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1234 if test "${ac_cv_build+set}" = set; then
1235   echo $ECHO_N "(cached) $ECHO_C" >&6
1236 else
1237   ac_cv_build_alias=$build_alias
1238 test -z "$ac_cv_build_alias" &&
1239   ac_cv_build_alias=`$ac_config_guess`
1240 test -z "$ac_cv_build_alias" &&
1241   { { echo "$as_me:1241: error: cannot guess build type; you must specify one" >&5
1242 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1243    { (exit 1); exit 1; }; }
1244 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1245   { { echo "$as_me:1245: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1246 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1247    { (exit 1); exit 1; }; }
1248
1249 fi
1250 echo "$as_me:1250: result: $ac_cv_build" >&5
1251 echo "${ECHO_T}$ac_cv_build" >&6
1252 build=$ac_cv_build
1253 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1254 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1255 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1256
1257 echo "$as_me:1257: checking host system type" >&5
1258 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1259 if test "${ac_cv_host+set}" = set; then
1260   echo $ECHO_N "(cached) $ECHO_C" >&6
1261 else
1262   ac_cv_host_alias=$host_alias
1263 test -z "$ac_cv_host_alias" &&
1264   ac_cv_host_alias=$ac_cv_build_alias
1265 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1266   { { echo "$as_me:1266: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1267 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1268    { (exit 1); exit 1; }; }
1269
1270 fi
1271 echo "$as_me:1271: result: $ac_cv_host" >&5
1272 echo "${ECHO_T}$ac_cv_host" >&6
1273 host=$ac_cv_host
1274 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1275 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1276 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1277
1278 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1279         echo "$as_me:1279: checking target system type" >&5
1280 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1281 if test "${ac_cv_target+set}" = set; then
1282   echo $ECHO_N "(cached) $ECHO_C" >&6
1283 else
1284   ac_cv_target_alias=$target_alias
1285 test "x$ac_cv_target_alias" = "x" &&
1286   ac_cv_target_alias=$ac_cv_host_alias
1287 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1288   { { echo "$as_me:1288: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1289 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1290    { (exit 1); exit 1; }; }
1291
1292 fi
1293 echo "$as_me:1293: result: $ac_cv_target" >&5
1294 echo "${ECHO_T}$ac_cv_target" >&6
1295 target=$ac_cv_target
1296 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1297 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1298 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1299
1300 # The aliases save the names the user supplied, while $host etc.
1301 # will get canonicalized.
1302 test -n "$target_alias" &&
1303   test "$program_prefix$program_suffix$program_transform_name" = \
1304     NONENONEs,x,x, &&
1305   program_prefix=${target_alias}-
1306         system_name="$host_os"
1307 else
1308         system_name="`(uname -s -r) 2>/dev/null`"
1309         if test -z "$system_name" ; then
1310                 system_name="`(hostname) 2>/dev/null`"
1311         fi
1312 fi
1313 test -n "$system_name" && cat >>confdefs.h <<EOF
1314 #define SYSTEM_NAME "$system_name"
1315 EOF
1316
1317 if test "${cf_cv_system_name+set}" = set; then
1318   echo $ECHO_N "(cached) $ECHO_C" >&6
1319 else
1320   cf_cv_system_name="$system_name"
1321 fi
1322
1323 test -z "$system_name" && system_name="$cf_cv_system_name"
1324 test -n "$cf_cv_system_name" && echo "$as_me:1324: result: Configuring for $cf_cv_system_name" >&5
1325 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1326
1327 if test ".$system_name" != ".$cf_cv_system_name" ; then
1328         echo "$as_me:1328: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1329 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1330         { { echo "$as_me:1330: error: \"Please remove config.cache and try again.\"" >&5
1331 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 # Check whether --with-system-type or --without-system-type was given.
1336 if test "${with_system_type+set}" = set; then
1337   withval="$with_system_type"
1338   { echo "$as_me:1338: WARNING: overriding system type to $withval" >&5
1339 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1340  cf_cv_system_name=$withval
1341 fi;
1342
1343 ###     Save the given $CFLAGS to allow user-override.
1344 cf_user_CFLAGS="$CFLAGS"
1345
1346 ###     Default install-location
1347
1348 echo "$as_me:1348: checking for prefix" >&5
1349 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1350 if test "x$prefix" = "xNONE" ; then
1351         case "$cf_cv_system_name" in
1352                 # non-vendor systems don't have a conflict
1353         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1354                 prefix=/usr
1355                 ;;
1356         *)      prefix=$ac_default_prefix
1357                 ;;
1358         esac
1359 fi
1360 echo "$as_me:1360: result: $prefix" >&5
1361 echo "${ECHO_T}$prefix" >&6
1362
1363 if test "x$prefix" = "xNONE" ; then
1364 echo "$as_me:1364: checking for default include-directory" >&5
1365 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1366 test -n "$verbose" && echo 1>&6
1367 for cf_symbol in \
1368         $includedir \
1369         $includedir/ncurses \
1370         $prefix/include \
1371         $prefix/include/ncurses \
1372         /usr/local/include \
1373         /usr/local/include/ncurses \
1374         /usr/include \
1375         /usr/include/ncurses
1376 do
1377         cf_dir=`eval echo $cf_symbol`
1378         if test -f $cf_dir/curses.h ; then
1379         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1380                 includedir="$cf_symbol"
1381                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1382                 break
1383         fi
1384         fi
1385         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1386 done
1387 echo "$as_me:1387: result: $includedir" >&5
1388 echo "${ECHO_T}$includedir" >&6
1389 fi
1390
1391 ###     Checks for programs.
1392 ac_ext=c
1393 ac_cpp='$CPP $CPPFLAGS'
1394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1397 ac_main_return=return
1398 if test -n "$ac_tool_prefix"; then
1399   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1400 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1401 echo "$as_me:1401: checking for $ac_word" >&5
1402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1403 if test "${ac_cv_prog_CC+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   if test -n "$CC"; then
1407   ac_cv_prog_CC="$CC" # Let the user override the test.
1408 else
1409   ac_save_IFS=$IFS; IFS=$ac_path_separator
1410 ac_dummy="$PATH"
1411 for ac_dir in $ac_dummy; do
1412   IFS=$ac_save_IFS
1413   test -z "$ac_dir" && ac_dir=.
1414   $as_executable_p "$ac_dir/$ac_word" || continue
1415 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1416 echo "$as_me:1416: found $ac_dir/$ac_word" >&5
1417 break
1418 done
1419
1420 fi
1421 fi
1422 CC=$ac_cv_prog_CC
1423 if test -n "$CC"; then
1424   echo "$as_me:1424: result: $CC" >&5
1425 echo "${ECHO_T}$CC" >&6
1426 else
1427   echo "$as_me:1427: result: no" >&5
1428 echo "${ECHO_T}no" >&6
1429 fi
1430
1431 fi
1432 if test -z "$ac_cv_prog_CC"; then
1433   ac_ct_CC=$CC
1434   # Extract the first word of "gcc", so it can be a program name with args.
1435 set dummy gcc; ac_word=$2
1436 echo "$as_me:1436: checking for $ac_word" >&5
1437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   if test -n "$ac_ct_CC"; then
1442   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1443 else
1444   ac_save_IFS=$IFS; IFS=$ac_path_separator
1445 ac_dummy="$PATH"
1446 for ac_dir in $ac_dummy; do
1447   IFS=$ac_save_IFS
1448   test -z "$ac_dir" && ac_dir=.
1449   $as_executable_p "$ac_dir/$ac_word" || continue
1450 ac_cv_prog_ac_ct_CC="gcc"
1451 echo "$as_me:1451: found $ac_dir/$ac_word" >&5
1452 break
1453 done
1454
1455 fi
1456 fi
1457 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1458 if test -n "$ac_ct_CC"; then
1459   echo "$as_me:1459: result: $ac_ct_CC" >&5
1460 echo "${ECHO_T}$ac_ct_CC" >&6
1461 else
1462   echo "$as_me:1462: result: no" >&5
1463 echo "${ECHO_T}no" >&6
1464 fi
1465
1466   CC=$ac_ct_CC
1467 else
1468   CC="$ac_cv_prog_CC"
1469 fi
1470
1471 if test -z "$CC"; then
1472   if test -n "$ac_tool_prefix"; then
1473   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1474 set dummy ${ac_tool_prefix}cc; ac_word=$2
1475 echo "$as_me:1475: checking for $ac_word" >&5
1476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1477 if test "${ac_cv_prog_CC+set}" = set; then
1478   echo $ECHO_N "(cached) $ECHO_C" >&6
1479 else
1480   if test -n "$CC"; then
1481   ac_cv_prog_CC="$CC" # Let the user override the test.
1482 else
1483   ac_save_IFS=$IFS; IFS=$ac_path_separator
1484 ac_dummy="$PATH"
1485 for ac_dir in $ac_dummy; do
1486   IFS=$ac_save_IFS
1487   test -z "$ac_dir" && ac_dir=.
1488   $as_executable_p "$ac_dir/$ac_word" || continue
1489 ac_cv_prog_CC="${ac_tool_prefix}cc"
1490 echo "$as_me:1490: found $ac_dir/$ac_word" >&5
1491 break
1492 done
1493
1494 fi
1495 fi
1496 CC=$ac_cv_prog_CC
1497 if test -n "$CC"; then
1498   echo "$as_me:1498: result: $CC" >&5
1499 echo "${ECHO_T}$CC" >&6
1500 else
1501   echo "$as_me:1501: result: no" >&5
1502 echo "${ECHO_T}no" >&6
1503 fi
1504
1505 fi
1506 if test -z "$ac_cv_prog_CC"; then
1507   ac_ct_CC=$CC
1508   # Extract the first word of "cc", so it can be a program name with args.
1509 set dummy cc; ac_word=$2
1510 echo "$as_me:1510: checking for $ac_word" >&5
1511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1512 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1513   echo $ECHO_N "(cached) $ECHO_C" >&6
1514 else
1515   if test -n "$ac_ct_CC"; then
1516   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1517 else
1518   ac_save_IFS=$IFS; IFS=$ac_path_separator
1519 ac_dummy="$PATH"
1520 for ac_dir in $ac_dummy; do
1521   IFS=$ac_save_IFS
1522   test -z "$ac_dir" && ac_dir=.
1523   $as_executable_p "$ac_dir/$ac_word" || continue
1524 ac_cv_prog_ac_ct_CC="cc"
1525 echo "$as_me:1525: found $ac_dir/$ac_word" >&5
1526 break
1527 done
1528
1529 fi
1530 fi
1531 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1532 if test -n "$ac_ct_CC"; then
1533   echo "$as_me:1533: result: $ac_ct_CC" >&5
1534 echo "${ECHO_T}$ac_ct_CC" >&6
1535 else
1536   echo "$as_me:1536: result: no" >&5
1537 echo "${ECHO_T}no" >&6
1538 fi
1539
1540   CC=$ac_ct_CC
1541 else
1542   CC="$ac_cv_prog_CC"
1543 fi
1544
1545 fi
1546 if test -z "$CC"; then
1547   # Extract the first word of "cc", so it can be a program name with args.
1548 set dummy cc; ac_word=$2
1549 echo "$as_me:1549: checking for $ac_word" >&5
1550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1551 if test "${ac_cv_prog_CC+set}" = set; then
1552   echo $ECHO_N "(cached) $ECHO_C" >&6
1553 else
1554   if test -n "$CC"; then
1555   ac_cv_prog_CC="$CC" # Let the user override the test.
1556 else
1557   ac_prog_rejected=no
1558   ac_save_IFS=$IFS; IFS=$ac_path_separator
1559 ac_dummy="$PATH"
1560 for ac_dir in $ac_dummy; do
1561   IFS=$ac_save_IFS
1562   test -z "$ac_dir" && ac_dir=.
1563   $as_executable_p "$ac_dir/$ac_word" || continue
1564 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1565   ac_prog_rejected=yes
1566   continue
1567 fi
1568 ac_cv_prog_CC="cc"
1569 echo "$as_me:1569: found $ac_dir/$ac_word" >&5
1570 break
1571 done
1572
1573 if test $ac_prog_rejected = yes; then
1574   # We found a bogon in the path, so make sure we never use it.
1575   set dummy $ac_cv_prog_CC
1576   shift
1577   if test $# != 0; then
1578     # We chose a different compiler from the bogus one.
1579     # However, it has the same basename, so the bogon will be chosen
1580     # first if we set CC to just the basename; use the full file name.
1581     shift
1582     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1583     shift
1584     ac_cv_prog_CC="$@"
1585   fi
1586 fi
1587 fi
1588 fi
1589 CC=$ac_cv_prog_CC
1590 if test -n "$CC"; then
1591   echo "$as_me:1591: result: $CC" >&5
1592 echo "${ECHO_T}$CC" >&6
1593 else
1594   echo "$as_me:1594: result: no" >&5
1595 echo "${ECHO_T}no" >&6
1596 fi
1597
1598 fi
1599 if test -z "$CC"; then
1600   if test -n "$ac_tool_prefix"; then
1601   for ac_prog in cl
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in cl
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 fi
1681
1682 test -z "$CC" && { { echo "$as_me:1682: error: no acceptable cc found in \$PATH" >&5
1683 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1684    { (exit 1); exit 1; }; }
1685
1686 # Provide some information about the compiler.
1687 echo "$as_me:1687:" \
1688      "checking for C compiler version" >&5
1689 ac_compiler=`set X $ac_compile; echo $2`
1690 { (eval echo "$as_me:1690: \"$ac_compiler --version </dev/null >&5\"") >&5
1691   (eval $ac_compiler --version </dev/null >&5) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }
1695 { (eval echo "$as_me:1695: \"$ac_compiler -v </dev/null >&5\"") >&5
1696   (eval $ac_compiler -v </dev/null >&5) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }
1700 { (eval echo "$as_me:1700: \"$ac_compiler -V </dev/null >&5\"") >&5
1701   (eval $ac_compiler -V </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705
1706 cat >conftest.$ac_ext <<_ACEOF
1707 #line 1707 "configure"
1708 #include "confdefs.h"
1709
1710 int
1711 main ()
1712 {
1713
1714   ;
1715   return 0;
1716 }
1717 _ACEOF
1718 ac_clean_files_save=$ac_clean_files
1719 ac_clean_files="$ac_clean_files a.out a.exe"
1720 # Try to create an executable without -o first, disregard a.out.
1721 # It will help us diagnose broken compilers, and finding out an intuition
1722 # of exeext.
1723 echo "$as_me:1723: checking for C compiler default output" >&5
1724 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1725 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1726 if { (eval echo "$as_me:1726: \"$ac_link_default\"") >&5
1727   (eval $ac_link_default) 2>&5
1728   ac_status=$?
1729   echo "$as_me:1729: \$? = $ac_status" >&5
1730   (exit $ac_status); }; then
1731   # Find the output, starting from the most likely.  This scheme is
1732 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1733 # resort.
1734 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1735                 ls a.out conftest 2>/dev/null;
1736                 ls a.* conftest.* 2>/dev/null`; do
1737   case $ac_file in
1738     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1739     a.out ) # We found the default executable, but exeext='' is most
1740             # certainly right.
1741             break;;
1742     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1743           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1744           export ac_cv_exeext
1745           break;;
1746     * ) break;;
1747   esac
1748 done
1749 else
1750   echo "$as_me: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 { { echo "$as_me:1752: error: C compiler cannot create executables" >&5
1753 echo "$as_me: error: C compiler cannot create executables" >&2;}
1754    { (exit 77); exit 77; }; }
1755 fi
1756
1757 ac_exeext=$ac_cv_exeext
1758 echo "$as_me:1758: result: $ac_file" >&5
1759 echo "${ECHO_T}$ac_file" >&6
1760
1761 # Check the compiler produces executables we can run.  If not, either
1762 # the compiler is broken, or we cross compile.
1763 echo "$as_me:1763: checking whether the C compiler works" >&5
1764 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1765 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1766 # If not cross compiling, check that we can run a simple program.
1767 if test "$cross_compiling" != yes; then
1768   if { ac_try='./$ac_file'
1769   { (eval echo "$as_me:1769: \"$ac_try\"") >&5
1770   (eval $ac_try) 2>&5
1771   ac_status=$?
1772   echo "$as_me:1772: \$? = $ac_status" >&5
1773   (exit $ac_status); }; }; then
1774     cross_compiling=no
1775   else
1776     if test "$cross_compiling" = maybe; then
1777         cross_compiling=yes
1778     else
1779         { { echo "$as_me:1779: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&5
1781 echo "$as_me: error: cannot run C compiled programs.
1782 If you meant to cross compile, use \`--host'." >&2;}
1783    { (exit 1); exit 1; }; }
1784     fi
1785   fi
1786 fi
1787 echo "$as_me:1787: result: yes" >&5
1788 echo "${ECHO_T}yes" >&6
1789
1790 rm -f a.out a.exe conftest$ac_cv_exeext
1791 ac_clean_files=$ac_clean_files_save
1792 # Check the compiler produces executables we can run.  If not, either
1793 # the compiler is broken, or we cross compile.
1794 echo "$as_me:1794: checking whether we are cross compiling" >&5
1795 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1796 echo "$as_me:1796: result: $cross_compiling" >&5
1797 echo "${ECHO_T}$cross_compiling" >&6
1798
1799 echo "$as_me:1799: checking for executable suffix" >&5
1800 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1801 if { (eval echo "$as_me:1801: \"$ac_link\"") >&5
1802   (eval $ac_link) 2>&5
1803   ac_status=$?
1804   echo "$as_me:1804: \$? = $ac_status" >&5
1805   (exit $ac_status); }; then
1806   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1807 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1808 # work properly (i.e., refer to `conftest.exe'), while it won't with
1809 # `rm'.
1810 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1811   case $ac_file in
1812     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1813     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1814           export ac_cv_exeext
1815           break;;
1816     * ) break;;
1817   esac
1818 done
1819 else
1820   { { echo "$as_me:1820: error: cannot compute EXEEXT: cannot compile and link" >&5
1821 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1822    { (exit 1); exit 1; }; }
1823 fi
1824
1825 rm -f conftest$ac_cv_exeext
1826 echo "$as_me:1826: result: $ac_cv_exeext" >&5
1827 echo "${ECHO_T}$ac_cv_exeext" >&6
1828
1829 rm -f conftest.$ac_ext
1830 EXEEXT=$ac_cv_exeext
1831 ac_exeext=$EXEEXT
1832 echo "$as_me:1832: checking for object suffix" >&5
1833 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1834 if test "${ac_cv_objext+set}" = set; then
1835   echo $ECHO_N "(cached) $ECHO_C" >&6
1836 else
1837   cat >conftest.$ac_ext <<_ACEOF
1838 #line 1838 "configure"
1839 #include "confdefs.h"
1840
1841 int
1842 main ()
1843 {
1844
1845   ;
1846   return 0;
1847 }
1848 _ACEOF
1849 rm -f conftest.o conftest.obj
1850 if { (eval echo "$as_me:1850: \"$ac_compile\"") >&5
1851   (eval $ac_compile) 2>&5
1852   ac_status=$?
1853   echo "$as_me:1853: \$? = $ac_status" >&5
1854   (exit $ac_status); }; then
1855   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1856   case $ac_file in
1857     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1858     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1859        break;;
1860   esac
1861 done
1862 else
1863   echo "$as_me: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1865 { { echo "$as_me:1865: error: cannot compute OBJEXT: cannot compile" >&5
1866 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1867    { (exit 1); exit 1; }; }
1868 fi
1869
1870 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1871 fi
1872 echo "$as_me:1872: result: $ac_cv_objext" >&5
1873 echo "${ECHO_T}$ac_cv_objext" >&6
1874 OBJEXT=$ac_cv_objext
1875 ac_objext=$OBJEXT
1876 echo "$as_me:1876: checking whether we are using the GNU C compiler" >&5
1877 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1878 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1879   echo $ECHO_N "(cached) $ECHO_C" >&6
1880 else
1881   cat >conftest.$ac_ext <<_ACEOF
1882 #line 1882 "configure"
1883 #include "confdefs.h"
1884
1885 int
1886 main ()
1887 {
1888 #ifndef __GNUC__
1889        choke me
1890 #endif
1891
1892   ;
1893   return 0;
1894 }
1895 _ACEOF
1896 rm -f conftest.$ac_objext
1897 if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898   (eval $ac_compile) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); } &&
1902          { ac_try='test -s conftest.$ac_objext'
1903   { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904   (eval $ac_try) 2>&5
1905   ac_status=$?
1906   echo "$as_me:1906: \$? = $ac_status" >&5
1907   (exit $ac_status); }; }; then
1908   ac_compiler_gnu=yes
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 ac_compiler_gnu=no
1913 fi
1914 rm -f conftest.$ac_objext conftest.$ac_ext
1915 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1916
1917 fi
1918 echo "$as_me:1918: result: $ac_cv_c_compiler_gnu" >&5
1919 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1920 GCC=`test $ac_compiler_gnu = yes && echo yes`
1921 ac_test_CFLAGS=${CFLAGS+set}
1922 ac_save_CFLAGS=$CFLAGS
1923 CFLAGS="-g"
1924 echo "$as_me:1924: checking whether $CC accepts -g" >&5
1925 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1926 if test "${ac_cv_prog_cc_g+set}" = set; then
1927   echo $ECHO_N "(cached) $ECHO_C" >&6
1928 else
1929   cat >conftest.$ac_ext <<_ACEOF
1930 #line 1930 "configure"
1931 #include "confdefs.h"
1932
1933 int
1934 main ()
1935 {
1936
1937   ;
1938   return 0;
1939 }
1940 _ACEOF
1941 rm -f conftest.$ac_objext
1942 if { (eval echo "$as_me:1942: \"$ac_compile\"") >&5
1943   (eval $ac_compile) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); } &&
1947          { ac_try='test -s conftest.$ac_objext'
1948   { (eval echo "$as_me:1948: \"$ac_try\"") >&5
1949   (eval $ac_try) 2>&5
1950   ac_status=$?
1951   echo "$as_me:1951: \$? = $ac_status" >&5
1952   (exit $ac_status); }; }; then
1953   ac_cv_prog_cc_g=yes
1954 else
1955   echo "$as_me: failed program was:" >&5
1956 cat conftest.$ac_ext >&5
1957 ac_cv_prog_cc_g=no
1958 fi
1959 rm -f conftest.$ac_objext conftest.$ac_ext
1960 fi
1961 echo "$as_me:1961: result: $ac_cv_prog_cc_g" >&5
1962 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1963 if test "$ac_test_CFLAGS" = set; then
1964   CFLAGS=$ac_save_CFLAGS
1965 elif test $ac_cv_prog_cc_g = yes; then
1966   if test "$GCC" = yes; then
1967     CFLAGS="-g -O2"
1968   else
1969     CFLAGS="-g"
1970   fi
1971 else
1972   if test "$GCC" = yes; then
1973     CFLAGS="-O2"
1974   else
1975     CFLAGS=
1976   fi
1977 fi
1978 # Some people use a C++ compiler to compile C.  Since we use `exit',
1979 # in C++ we need to declare it.  In case someone uses the same compiler
1980 # for both compiling C and C++ we need to have the C++ compiler decide
1981 # the declaration of exit, since it's the most demanding environment.
1982 cat >conftest.$ac_ext <<_ACEOF
1983 #ifndef __cplusplus
1984   choke me
1985 #endif
1986 _ACEOF
1987 rm -f conftest.$ac_objext
1988 if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5
1989   (eval $ac_compile) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); } &&
1993          { ac_try='test -s conftest.$ac_objext'
1994   { (eval echo "$as_me:1994: \"$ac_try\"") >&5
1995   (eval $ac_try) 2>&5
1996   ac_status=$?
1997   echo "$as_me:1997: \$? = $ac_status" >&5
1998   (exit $ac_status); }; }; then
1999   for ac_declaration in \
2000    ''\
2001    '#include <stdlib.h>' \
2002    'extern "C" void std::exit (int) throw (); using std::exit;' \
2003    'extern "C" void std::exit (int); using std::exit;' \
2004    'extern "C" void exit (int) throw ();' \
2005    'extern "C" void exit (int);' \
2006    'void exit (int);'
2007 do
2008   cat >conftest.$ac_ext <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011 #include <stdlib.h>
2012 $ac_declaration
2013 int
2014 main ()
2015 {
2016 exit (42);
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.$ac_objext
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); } &&
2027          { ac_try='test -s conftest.$ac_objext'
2028   { (eval echo "$as_me:2028: \"$ac_try\"") >&5
2029   (eval $ac_try) 2>&5
2030   ac_status=$?
2031   echo "$as_me:2031: \$? = $ac_status" >&5
2032   (exit $ac_status); }; }; then
2033   :
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2037 continue
2038 fi
2039 rm -f conftest.$ac_objext conftest.$ac_ext
2040   cat >conftest.$ac_ext <<_ACEOF
2041 #line 2041 "configure"
2042 #include "confdefs.h"
2043 $ac_declaration
2044 int
2045 main ()
2046 {
2047 exit (42);
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 rm -f conftest.$ac_objext
2053 if { (eval echo "$as_me:2053: \"$ac_compile\"") >&5
2054   (eval $ac_compile) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); } &&
2058          { ac_try='test -s conftest.$ac_objext'
2059   { (eval echo "$as_me:2059: \"$ac_try\"") >&5
2060   (eval $ac_try) 2>&5
2061   ac_status=$?
2062   echo "$as_me:2062: \$? = $ac_status" >&5
2063   (exit $ac_status); }; }; then
2064   break
2065 else
2066   echo "$as_me: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2068 fi
2069 rm -f conftest.$ac_objext conftest.$ac_ext
2070 done
2071 rm -f conftest*
2072 if test -n "$ac_declaration"; then
2073   echo '#ifdef __cplusplus' >>confdefs.h
2074   echo $ac_declaration      >>confdefs.h
2075   echo '#endif'             >>confdefs.h
2076 fi
2077
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 ac_ext=c
2084 ac_cpp='$CPP $CPPFLAGS'
2085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2088 ac_main_return=return
2089
2090 GCC_VERSION=none
2091 if test "$GCC" = yes ; then
2092         echo "$as_me:2092: checking version of $CC" >&5
2093 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2094         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2095         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2096         echo "$as_me:2096: result: $GCC_VERSION" >&5
2097 echo "${ECHO_T}$GCC_VERSION" >&6
2098 fi
2099
2100 ac_ext=c
2101 ac_cpp='$CPP $CPPFLAGS'
2102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2105 ac_main_return=return
2106 echo "$as_me:2106: checking how to run the C preprocessor" >&5
2107 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2108 # On Suns, sometimes $CPP names a directory.
2109 if test -n "$CPP" && test -d "$CPP"; then
2110   CPP=
2111 fi
2112 if test -z "$CPP"; then
2113   if test "${ac_cv_prog_CPP+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116       # Double quotes because CPP needs to be expanded
2117     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2118     do
2119       ac_preproc_ok=false
2120 for ac_c_preproc_warn_flag in '' yes
2121 do
2122   # Use a header file that comes with gcc, so configuring glibc
2123   # with a fresh cross-compiler works.
2124   # On the NeXT, cc -E runs the code through the compiler's parser,
2125   # not just through cpp. "Syntax error" is here to catch this case.
2126   cat >conftest.$ac_ext <<_ACEOF
2127 #line 2127 "configure"
2128 #include "confdefs.h"
2129 #include <assert.h>
2130                      Syntax error
2131 _ACEOF
2132 if { (eval echo "$as_me:2132: \"$ac_cpp conftest.$ac_ext\"") >&5
2133   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2134   ac_status=$?
2135   egrep -v '^ *\+' conftest.er1 >conftest.err
2136   rm -f conftest.er1
2137   cat conftest.err >&5
2138   echo "$as_me:2138: \$? = $ac_status" >&5
2139   (exit $ac_status); } >/dev/null; then
2140   if test -s conftest.err; then
2141     ac_cpp_err=$ac_c_preproc_warn_flag
2142   else
2143     ac_cpp_err=
2144   fi
2145 else
2146   ac_cpp_err=yes
2147 fi
2148 if test -z "$ac_cpp_err"; then
2149   :
2150 else
2151   echo "$as_me: failed program was:" >&5
2152   cat conftest.$ac_ext >&5
2153   # Broken: fails on valid input.
2154 continue
2155 fi
2156 rm -f conftest.err conftest.$ac_ext
2157
2158   # OK, works on sane cases.  Now check whether non-existent headers
2159   # can be detected and how.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <ac_nonexistent.h>
2164 _ACEOF
2165 if { (eval echo "$as_me:2165: \"$ac_cpp conftest.$ac_ext\"") >&5
2166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2167   ac_status=$?
2168   egrep -v '^ *\+' conftest.er1 >conftest.err
2169   rm -f conftest.er1
2170   cat conftest.err >&5
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } >/dev/null; then
2173   if test -s conftest.err; then
2174     ac_cpp_err=$ac_c_preproc_warn_flag
2175   else
2176     ac_cpp_err=
2177   fi
2178 else
2179   ac_cpp_err=yes
2180 fi
2181 if test -z "$ac_cpp_err"; then
2182   # Broken: success on invalid input.
2183 continue
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Passes both tests.
2188 ac_preproc_ok=:
2189 break
2190 fi
2191 rm -f conftest.err conftest.$ac_ext
2192
2193 done
2194 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2195 rm -f conftest.err conftest.$ac_ext
2196 if $ac_preproc_ok; then
2197   break
2198 fi
2199
2200     done
2201     ac_cv_prog_CPP=$CPP
2202
2203 fi
2204   CPP=$ac_cv_prog_CPP
2205 else
2206   ac_cv_prog_CPP=$CPP
2207 fi
2208 echo "$as_me:2208: result: $CPP" >&5
2209 echo "${ECHO_T}$CPP" >&6
2210 ac_preproc_ok=false
2211 for ac_c_preproc_warn_flag in '' yes
2212 do
2213   # Use a header file that comes with gcc, so configuring glibc
2214   # with a fresh cross-compiler works.
2215   # On the NeXT, cc -E runs the code through the compiler's parser,
2216   # not just through cpp. "Syntax error" is here to catch this case.
2217   cat >conftest.$ac_ext <<_ACEOF
2218 #line 2218 "configure"
2219 #include "confdefs.h"
2220 #include <assert.h>
2221                      Syntax error
2222 _ACEOF
2223 if { (eval echo "$as_me:2223: \"$ac_cpp conftest.$ac_ext\"") >&5
2224   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2225   ac_status=$?
2226   egrep -v '^ *\+' conftest.er1 >conftest.err
2227   rm -f conftest.er1
2228   cat conftest.err >&5
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit $ac_status); } >/dev/null; then
2231   if test -s conftest.err; then
2232     ac_cpp_err=$ac_c_preproc_warn_flag
2233   else
2234     ac_cpp_err=
2235   fi
2236 else
2237   ac_cpp_err=yes
2238 fi
2239 if test -z "$ac_cpp_err"; then
2240   :
2241 else
2242   echo "$as_me: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   # Broken: fails on valid input.
2245 continue
2246 fi
2247 rm -f conftest.err conftest.$ac_ext
2248
2249   # OK, works on sane cases.  Now check whether non-existent headers
2250   # can be detected and how.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <ac_nonexistent.h>
2255 _ACEOF
2256 if { (eval echo "$as_me:2256: \"$ac_cpp conftest.$ac_ext\"") >&5
2257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258   ac_status=$?
2259   egrep -v '^ *\+' conftest.er1 >conftest.err
2260   rm -f conftest.er1
2261   cat conftest.err >&5
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit $ac_status); } >/dev/null; then
2264   if test -s conftest.err; then
2265     ac_cpp_err=$ac_c_preproc_warn_flag
2266   else
2267     ac_cpp_err=
2268   fi
2269 else
2270   ac_cpp_err=yes
2271 fi
2272 if test -z "$ac_cpp_err"; then
2273   # Broken: success on invalid input.
2274 continue
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Passes both tests.
2279 ac_preproc_ok=:
2280 break
2281 fi
2282 rm -f conftest.err conftest.$ac_ext
2283
2284 done
2285 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2286 rm -f conftest.err conftest.$ac_ext
2287 if $ac_preproc_ok; then
2288   :
2289 else
2290   { { echo "$as_me:2290: error: C preprocessor \"$CPP\" fails sanity check" >&5
2291 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2292    { (exit 1); exit 1; }; }
2293 fi
2294
2295 ac_ext=c
2296 ac_cpp='$CPP $CPPFLAGS'
2297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2300 ac_main_return=return
2301
2302 if test $ac_cv_c_compiler_gnu = yes; then
2303     echo "$as_me:2303: checking whether $CC needs -traditional" >&5
2304 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2305 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2306   echo $ECHO_N "(cached) $ECHO_C" >&6
2307 else
2308     ac_pattern="Autoconf.*'x'"
2309   cat >conftest.$ac_ext <<_ACEOF
2310 #line 2310 "configure"
2311 #include "confdefs.h"
2312 #include <sgtty.h>
2313 int Autoconf = TIOCGETP;
2314 _ACEOF
2315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2316   egrep "$ac_pattern" >/dev/null 2>&1; then
2317   ac_cv_prog_gcc_traditional=yes
2318 else
2319   ac_cv_prog_gcc_traditional=no
2320 fi
2321 rm -f conftest*
2322
2323   if test $ac_cv_prog_gcc_traditional = no; then
2324     cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <termio.h>
2328 int Autoconf = TCGETA;
2329 _ACEOF
2330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331   egrep "$ac_pattern" >/dev/null 2>&1; then
2332   ac_cv_prog_gcc_traditional=yes
2333 fi
2334 rm -f conftest*
2335
2336   fi
2337 fi
2338 echo "$as_me:2338: result: $ac_cv_prog_gcc_traditional" >&5
2339 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2340   if test $ac_cv_prog_gcc_traditional = yes; then
2341     CC="$CC -traditional"
2342   fi
2343 fi
2344
2345 echo "$as_me:2345: checking whether $CC understands -c and -o together" >&5
2346 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2347 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2348   echo $ECHO_N "(cached) $ECHO_C" >&6
2349 else
2350
2351 cat > conftest.$ac_ext <<CF_EOF
2352 #include <stdio.h>
2353 int main()
2354 {
2355         ${cf_cv_main_return:-return}(0);
2356 }
2357 CF_EOF
2358 # We do the test twice because some compilers refuse to overwrite an
2359 # existing .o file with -o, though they will create one.
2360 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2361 if { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit $ac_status); } &&
2366   test -f conftest2.$ac_objext && { (eval echo "$as_me:2366: \"$ac_try\"") >&5
2367   (eval $ac_try) 2>&5
2368   ac_status=$?
2369   echo "$as_me:2369: \$? = $ac_status" >&5
2370   (exit $ac_status); };
2371 then
2372   eval cf_cv_prog_CC_c_o=yes
2373 else
2374   eval cf_cv_prog_CC_c_o=no
2375 fi
2376 rm -f conftest*
2377
2378 fi
2379 if test $cf_cv_prog_CC_c_o = yes; then
2380   echo "$as_me:2380: result: yes" >&5
2381 echo "${ECHO_T}yes" >&6
2382 else
2383   echo "$as_me:2383: result: no" >&5
2384 echo "${ECHO_T}no" >&6
2385 fi
2386
2387 echo "$as_me:2387: checking for POSIXized ISC" >&5
2388 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2389 if test -d /etc/conf/kconfig.d &&
2390    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2391 then
2392   echo "$as_me:2392: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6
2394   ISC=yes # If later tests want to check for ISC.
2395
2396 cat >>confdefs.h <<\EOF
2397 #define _POSIX_SOURCE 1
2398 EOF
2399
2400   if test "$GCC" = yes; then
2401     CC="$CC -posix"
2402   else
2403     CC="$CC -Xp"
2404   fi
2405 else
2406   echo "$as_me:2406: result: no" >&5
2407 echo "${ECHO_T}no" >&6
2408   ISC=
2409 fi
2410
2411 echo "$as_me:2411: checking for ${CC-cc} option to accept ANSI C" >&5
2412 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2413 if test "${cf_cv_ansi_cc+set}" = set; then
2414   echo $ECHO_N "(cached) $ECHO_C" >&6
2415 else
2416
2417 cf_cv_ansi_cc=no
2418 cf_save_CFLAGS="$CFLAGS"
2419 cf_save_CPPFLAGS="$CPPFLAGS"
2420 # Don't try gcc -ansi; that turns off useful extensions and
2421 # breaks some systems' header files.
2422 # AIX                   -qlanglvl=ansi
2423 # Ultrix and OSF/1      -std1
2424 # HP-UX                 -Aa -D_HPUX_SOURCE
2425 # SVR4                  -Xc
2426 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2427 for cf_arg in "-DCC_HAS_PROTOS" \
2428         "" \
2429         -qlanglvl=ansi \
2430         -std1 \
2431         -Ae \
2432         "-Aa -D_HPUX_SOURCE" \
2433         -Xc
2434 do
2435
2436 cf_fix_cppflags=no
2437 cf_new_cflags=
2438 cf_new_cppflags=
2439 cf_new_extra_cppflags=
2440
2441 for cf_add_cflags in $cf_arg
2442 do
2443 case $cf_fix_cppflags in
2444 no)
2445         case $cf_add_cflags in #(vi
2446         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2447                 case $cf_add_cflags in
2448                 -D*)
2449                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2450
2451                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2452                         && test -z "${cf_tst_cflags}" \
2453                         && cf_fix_cppflags=yes
2454
2455                         if test $cf_fix_cppflags = yes ; then
2456                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2457                                 continue
2458                         elif test "${cf_tst_cflags}" = "\"'" ; then
2459                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2460                                 continue
2461                         fi
2462                         ;;
2463                 esac
2464                 case "$CPPFLAGS" in
2465                 *$cf_add_cflags) #(vi
2466                         ;;
2467                 *) #(vi
2468                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2469                         ;;
2470                 esac
2471                 ;;
2472         *)
2473                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2474                 ;;
2475         esac
2476         ;;
2477 yes)
2478         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2479
2480         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2481
2482         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2483         && test -z "${cf_tst_cflags}" \
2484         && cf_fix_cppflags=no
2485         ;;
2486 esac
2487 done
2488
2489 if test -n "$cf_new_cflags" ; then
2490
2491         CFLAGS="$CFLAGS $cf_new_cflags"
2492 fi
2493
2494 if test -n "$cf_new_cppflags" ; then
2495
2496         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2497 fi
2498
2499 if test -n "$cf_new_extra_cppflags" ; then
2500
2501         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2502 fi
2503
2504         cat >conftest.$ac_ext <<_ACEOF
2505 #line 2505 "configure"
2506 #include "confdefs.h"
2507
2508 #ifndef CC_HAS_PROTOS
2509 #if !defined(__STDC__) || (__STDC__ != 1)
2510 choke me
2511 #endif
2512 #endif
2513
2514 int
2515 main ()
2516 {
2517
2518         int test (int i, double x);
2519         struct s1 {int (*f) (int a);};
2520         struct s2 {int (*f) (double a);};
2521   ;
2522   return 0;
2523 }
2524 _ACEOF
2525 rm -f conftest.$ac_objext
2526 if { (eval echo "$as_me:2526: \"$ac_compile\"") >&5
2527   (eval $ac_compile) 2>&5
2528   ac_status=$?
2529   echo "$as_me:2529: \$? = $ac_status" >&5
2530   (exit $ac_status); } &&
2531          { ac_try='test -s conftest.$ac_objext'
2532   { (eval echo "$as_me:2532: \"$ac_try\"") >&5
2533   (eval $ac_try) 2>&5
2534   ac_status=$?
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); }; }; then
2537   cf_cv_ansi_cc="$cf_arg"; break
2538 else
2539   echo "$as_me: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 fi
2542 rm -f conftest.$ac_objext conftest.$ac_ext
2543 done
2544 CFLAGS="$cf_save_CFLAGS"
2545 CPPFLAGS="$cf_save_CPPFLAGS"
2546
2547 fi
2548 echo "$as_me:2548: result: $cf_cv_ansi_cc" >&5
2549 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2550
2551 if test "$cf_cv_ansi_cc" != "no"; then
2552 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2553
2554 cf_fix_cppflags=no
2555 cf_new_cflags=
2556 cf_new_cppflags=
2557 cf_new_extra_cppflags=
2558
2559 for cf_add_cflags in $cf_cv_ansi_cc
2560 do
2561 case $cf_fix_cppflags in
2562 no)
2563         case $cf_add_cflags in #(vi
2564         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2565                 case $cf_add_cflags in
2566                 -D*)
2567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2568
2569                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2570                         && test -z "${cf_tst_cflags}" \
2571                         && cf_fix_cppflags=yes
2572
2573                         if test $cf_fix_cppflags = yes ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         elif test "${cf_tst_cflags}" = "\"'" ; then
2577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2578                                 continue
2579                         fi
2580                         ;;
2581                 esac
2582                 case "$CPPFLAGS" in
2583                 *$cf_add_cflags) #(vi
2584                         ;;
2585                 *) #(vi
2586                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2587                         ;;
2588                 esac
2589                 ;;
2590         *)
2591                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2592                 ;;
2593         esac
2594         ;;
2595 yes)
2596         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597
2598         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2599
2600         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2601         && test -z "${cf_tst_cflags}" \
2602         && cf_fix_cppflags=no
2603         ;;
2604 esac
2605 done
2606
2607 if test -n "$cf_new_cflags" ; then
2608
2609         CFLAGS="$CFLAGS $cf_new_cflags"
2610 fi
2611
2612 if test -n "$cf_new_cppflags" ; then
2613
2614         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2615 fi
2616
2617 if test -n "$cf_new_extra_cppflags" ; then
2618
2619         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2620 fi
2621
2622 else
2623         cat >>confdefs.h <<\EOF
2624 #define CC_HAS_PROTOS 1
2625 EOF
2626
2627 fi
2628 fi
2629
2630 if test "$cf_cv_ansi_cc" = "no"; then
2631         { { echo "$as_me:2631: error: Your compiler does not appear to recognize prototypes.
2632 You have the following choices:
2633         a. adjust your compiler options
2634         b. get an up-to-date compiler
2635         c. use a wrapper such as unproto" >&5
2636 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2637 You have the following choices:
2638         a. adjust your compiler options
2639         b. get an up-to-date compiler
2640         c. use a wrapper such as unproto" >&2;}
2641    { (exit 1); exit 1; }; }
2642 fi
2643
2644 case $cf_cv_system_name in
2645 os2*)
2646     CFLAGS="$CFLAGS -Zmt"
2647     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2648     CXXFLAGS="$CXXFLAGS -Zmt"
2649     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2650     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2651     ac_cv_exeext=.exe
2652     ;;
2653 esac
2654
2655 PROG_EXT="$EXEEXT"
2656
2657 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2658 #define PROG_EXT "$PROG_EXT"
2659 EOF
2660
2661 if test "$cross_compiling" = yes ; then
2662   LDCONFIG=:
2663 else
2664 case "$cf_cv_system_name" in #(vi
2665 freebsd*) #(vi
2666   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2667   ;;
2668 *) LDPATH=$PATH:/sbin:/usr/sbin
2669   # Extract the first word of "ldconfig", so it can be a program name with args.
2670 set dummy ldconfig; ac_word=$2
2671 echo "$as_me:2671: checking for $ac_word" >&5
2672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2673 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2674   echo $ECHO_N "(cached) $ECHO_C" >&6
2675 else
2676   case $LDCONFIG in
2677   [\\/]* | ?:[\\/]*)
2678   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2679   ;;
2680   *)
2681   ac_save_IFS=$IFS; IFS=$ac_path_separator
2682 ac_dummy="$LDPATH"
2683 for ac_dir in $ac_dummy; do
2684   IFS=$ac_save_IFS
2685   test -z "$ac_dir" && ac_dir=.
2686   if $as_executable_p "$ac_dir/$ac_word"; then
2687    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2688    echo "$as_me:2688: found $ac_dir/$ac_word" >&5
2689    break
2690 fi
2691 done
2692
2693   ;;
2694 esac
2695 fi
2696 LDCONFIG=$ac_cv_path_LDCONFIG
2697
2698 if test -n "$LDCONFIG"; then
2699   echo "$as_me:2699: result: $LDCONFIG" >&5
2700 echo "${ECHO_T}$LDCONFIG" >&6
2701 else
2702   echo "$as_me:2702: result: no" >&5
2703 echo "${ECHO_T}no" >&6
2704 fi
2705
2706   ;;
2707 esac
2708 fi
2709
2710 echo "$as_me:2710: checking if you want to ensure bool is consistent with C++" >&5
2711 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2712
2713 # Check whether --with-cxx or --without-cxx was given.
2714 if test "${with_cxx+set}" = set; then
2715   withval="$with_cxx"
2716   cf_with_cxx=$withval
2717 else
2718   cf_with_cxx=yes
2719 fi;
2720 echo "$as_me:2720: result: $cf_with_cxx" >&5
2721 echo "${ECHO_T}$cf_with_cxx" >&6
2722 if test "X$cf_with_cxx" = Xno ; then
2723         CXX=""
2724         GXX=""
2725 else
2726         # with autoconf 2.13, we can change the error to a warning:
2727                 ac_ext=cc
2728 ac_cpp='$CXXCPP $CPPFLAGS'
2729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2732 ac_main_return=return
2733 if test -n "$ac_tool_prefix"; then
2734   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2735   do
2736     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2737 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2738 echo "$as_me:2738: checking for $ac_word" >&5
2739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2740 if test "${ac_cv_prog_CXX+set}" = set; then
2741   echo $ECHO_N "(cached) $ECHO_C" >&6
2742 else
2743   if test -n "$CXX"; then
2744   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2745 else
2746   ac_save_IFS=$IFS; IFS=$ac_path_separator
2747 ac_dummy="$PATH"
2748 for ac_dir in $ac_dummy; do
2749   IFS=$ac_save_IFS
2750   test -z "$ac_dir" && ac_dir=.
2751   $as_executable_p "$ac_dir/$ac_word" || continue
2752 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2753 echo "$as_me:2753: found $ac_dir/$ac_word" >&5
2754 break
2755 done
2756
2757 fi
2758 fi
2759 CXX=$ac_cv_prog_CXX
2760 if test -n "$CXX"; then
2761   echo "$as_me:2761: result: $CXX" >&5
2762 echo "${ECHO_T}$CXX" >&6
2763 else
2764   echo "$as_me:2764: result: no" >&5
2765 echo "${ECHO_T}no" >&6
2766 fi
2767
2768     test -n "$CXX" && break
2769   done
2770 fi
2771 if test -z "$CXX"; then
2772   ac_ct_CXX=$CXX
2773   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2774 do
2775   # Extract the first word of "$ac_prog", so it can be a program name with args.
2776 set dummy $ac_prog; ac_word=$2
2777 echo "$as_me:2777: checking for $ac_word" >&5
2778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2779 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2780   echo $ECHO_N "(cached) $ECHO_C" >&6
2781 else
2782   if test -n "$ac_ct_CXX"; then
2783   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2784 else
2785   ac_save_IFS=$IFS; IFS=$ac_path_separator
2786 ac_dummy="$PATH"
2787 for ac_dir in $ac_dummy; do
2788   IFS=$ac_save_IFS
2789   test -z "$ac_dir" && ac_dir=.
2790   $as_executable_p "$ac_dir/$ac_word" || continue
2791 ac_cv_prog_ac_ct_CXX="$ac_prog"
2792 echo "$as_me:2792: found $ac_dir/$ac_word" >&5
2793 break
2794 done
2795
2796 fi
2797 fi
2798 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2799 if test -n "$ac_ct_CXX"; then
2800   echo "$as_me:2800: result: $ac_ct_CXX" >&5
2801 echo "${ECHO_T}$ac_ct_CXX" >&6
2802 else
2803   echo "$as_me:2803: result: no" >&5
2804 echo "${ECHO_T}no" >&6
2805 fi
2806
2807   test -n "$ac_ct_CXX" && break
2808 done
2809 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2810
2811   CXX=$ac_ct_CXX
2812 fi
2813
2814 # Provide some information about the compiler.
2815 echo "$as_me:2815:" \
2816      "checking for C++ compiler version" >&5
2817 ac_compiler=`set X $ac_compile; echo $2`
2818 { (eval echo "$as_me:2818: \"$ac_compiler --version </dev/null >&5\"") >&5
2819   (eval $ac_compiler --version </dev/null >&5) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }
2823 { (eval echo "$as_me:2823: \"$ac_compiler -v </dev/null >&5\"") >&5
2824   (eval $ac_compiler -v </dev/null >&5) 2>&5
2825   ac_status=$?
2826   echo "$as_me:2826: \$? = $ac_status" >&5
2827   (exit $ac_status); }
2828 { (eval echo "$as_me:2828: \"$ac_compiler -V </dev/null >&5\"") >&5
2829   (eval $ac_compiler -V </dev/null >&5) 2>&5
2830   ac_status=$?
2831   echo "$as_me:2831: \$? = $ac_status" >&5
2832   (exit $ac_status); }
2833
2834 echo "$as_me:2834: checking whether we are using the GNU C++ compiler" >&5
2835 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2836 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2837   echo $ECHO_N "(cached) $ECHO_C" >&6
2838 else
2839   cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842
2843 int
2844 main ()
2845 {
2846 #ifndef __GNUC__
2847        choke me
2848 #endif
2849
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856   (eval $ac_compile) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); } &&
2860          { ac_try='test -s conftest.$ac_objext'
2861   { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2862   (eval $ac_try) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }; }; then
2866   ac_compiler_gnu=yes
2867 else
2868   echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 ac_compiler_gnu=no
2871 fi
2872 rm -f conftest.$ac_objext conftest.$ac_ext
2873 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2874
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_cxx_compiler_gnu" >&5
2877 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2878 GXX=`test $ac_compiler_gnu = yes && echo yes`
2879 ac_test_CXXFLAGS=${CXXFLAGS+set}
2880 ac_save_CXXFLAGS=$CXXFLAGS
2881 CXXFLAGS="-g"
2882 echo "$as_me:2882: checking whether $CXX accepts -g" >&5
2883 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2884 if test "${ac_cv_prog_cxx_g+set}" = set; then
2885   echo $ECHO_N "(cached) $ECHO_C" >&6
2886 else
2887   cat >conftest.$ac_ext <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890
2891 int
2892 main ()
2893 {
2894
2895   ;
2896   return 0;
2897 }
2898 _ACEOF
2899 rm -f conftest.$ac_objext
2900 if { (eval echo "$as_me:2900: \"$ac_compile\"") >&5
2901   (eval $ac_compile) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); } &&
2905          { ac_try='test -s conftest.$ac_objext'
2906   { (eval echo "$as_me:2906: \"$ac_try\"") >&5
2907   (eval $ac_try) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); }; }; then
2911   ac_cv_prog_cxx_g=yes
2912 else
2913   echo "$as_me: failed program was:" >&5
2914 cat conftest.$ac_ext >&5
2915 ac_cv_prog_cxx_g=no
2916 fi
2917 rm -f conftest.$ac_objext conftest.$ac_ext
2918 fi
2919 echo "$as_me:2919: result: $ac_cv_prog_cxx_g" >&5
2920 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2921 if test "$ac_test_CXXFLAGS" = set; then
2922   CXXFLAGS=$ac_save_CXXFLAGS
2923 elif test $ac_cv_prog_cxx_g = yes; then
2924   if test "$GXX" = yes; then
2925     CXXFLAGS="-g -O2"
2926   else
2927     CXXFLAGS="-g"
2928   fi
2929 else
2930   if test "$GXX" = yes; then
2931     CXXFLAGS="-O2"
2932   else
2933     CXXFLAGS=
2934   fi
2935 fi
2936 for ac_declaration in \
2937    ''\
2938    '#include <stdlib.h>' \
2939    'extern "C" void std::exit (int) throw (); using std::exit;' \
2940    'extern "C" void std::exit (int); using std::exit;' \
2941    'extern "C" void exit (int) throw ();' \
2942    'extern "C" void exit (int);' \
2943    'void exit (int);'
2944 do
2945   cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948 #include <stdlib.h>
2949 $ac_declaration
2950 int
2951 main ()
2952 {
2953 exit (42);
2954   ;
2955   return 0;
2956 }
2957 _ACEOF
2958 rm -f conftest.$ac_objext
2959 if { (eval echo "$as_me:2959: \"$ac_compile\"") >&5
2960   (eval $ac_compile) 2>&5
2961   ac_status=$?
2962   echo "$as_me:2962: \$? = $ac_status" >&5
2963   (exit $ac_status); } &&
2964          { ac_try='test -s conftest.$ac_objext'
2965   { (eval echo "$as_me:2965: \"$ac_try\"") >&5
2966   (eval $ac_try) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }; }; then
2970   :
2971 else
2972   echo "$as_me: failed program was:" >&5
2973 cat conftest.$ac_ext >&5
2974 continue
2975 fi
2976 rm -f conftest.$ac_objext conftest.$ac_ext
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 $ac_declaration
2981 int
2982 main ()
2983 {
2984 exit (42);
2985   ;
2986   return 0;
2987 }
2988 _ACEOF
2989 rm -f conftest.$ac_objext
2990 if { (eval echo "$as_me:2990: \"$ac_compile\"") >&5
2991   (eval $ac_compile) 2>&5
2992   ac_status=$?
2993   echo "$as_me:2993: \$? = $ac_status" >&5
2994   (exit $ac_status); } &&
2995          { ac_try='test -s conftest.$ac_objext'
2996   { (eval echo "$as_me:2996: \"$ac_try\"") >&5
2997   (eval $ac_try) 2>&5
2998   ac_status=$?
2999   echo "$as_me:2999: \$? = $ac_status" >&5
3000   (exit $ac_status); }; }; then
3001   break
3002 else
3003   echo "$as_me: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007 done
3008 rm -f conftest*
3009 if test -n "$ac_declaration"; then
3010   echo '#ifdef __cplusplus' >>confdefs.h
3011   echo $ac_declaration      >>confdefs.h
3012   echo '#endif'             >>confdefs.h
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3018 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return=return
3021
3022                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3023         if test "$CXX" = "g++" ; then
3024                 # Extract the first word of "g++", so it can be a program name with args.
3025 set dummy g++; ac_word=$2
3026 echo "$as_me:3026: checking for $ac_word" >&5
3027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3028 if test "${ac_cv_path_CXX+set}" = set; then
3029   echo $ECHO_N "(cached) $ECHO_C" >&6
3030 else
3031   case $CXX in
3032   [\\/]* | ?:[\\/]*)
3033   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3034   ;;
3035   *)
3036   ac_save_IFS=$IFS; IFS=$ac_path_separator
3037 ac_dummy="$PATH"
3038 for ac_dir in $ac_dummy; do
3039   IFS=$ac_save_IFS
3040   test -z "$ac_dir" && ac_dir=.
3041   if $as_executable_p "$ac_dir/$ac_word"; then
3042    ac_cv_path_CXX="$ac_dir/$ac_word"
3043    echo "$as_me:3043: found $ac_dir/$ac_word" >&5
3044    break
3045 fi
3046 done
3047
3048   ;;
3049 esac
3050 fi
3051 CXX=$ac_cv_path_CXX
3052
3053 if test -n "$CXX"; then
3054   echo "$as_me:3054: result: $CXX" >&5
3055 echo "${ECHO_T}$CXX" >&6
3056 else
3057   echo "$as_me:3057: result: no" >&5
3058 echo "${ECHO_T}no" >&6
3059 fi
3060
3061         fi
3062         if test "$CXX" = "g++" ; then
3063                 { echo "$as_me:3063: WARNING: ignoring hardcoded g++" >&5
3064 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3065                 cf_with_cxx=no; CXX=""; GXX="";
3066         fi
3067 fi
3068
3069 GXX_VERSION=none
3070 if test "$GXX" = yes; then
3071         echo "$as_me:3071: checking version of g++" >&5
3072 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3073         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3074         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3075         echo "$as_me:3075: result: $GXX_VERSION" >&5
3076 echo "${ECHO_T}$GXX_VERSION" >&6
3077 fi
3078
3079 case $GXX_VERSION in
3080 1*|2.[0-6]*)
3081         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3082         # cf_cxx_library=no
3083         { echo "$as_me:3083: WARNING: templates do not work" >&5
3084 echo "$as_me: WARNING: templates do not work" >&2;}
3085         ;;
3086 esac
3087
3088 echo "$as_me:3088: checking if you want to build C++ binding and demo" >&5
3089 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3090
3091 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3092 if test "${with_cxx_binding+set}" = set; then
3093   withval="$with_cxx_binding"
3094   cf_with_cxx_binding=$withval
3095 else
3096   cf_with_cxx_binding=$cf_with_cxx
3097 fi;
3098 echo "$as_me:3098: result: $cf_with_cxx_binding" >&5
3099 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3100
3101 echo "$as_me:3101: checking if you want to build with Ada95" >&5
3102 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3103
3104 # Check whether --with-ada or --without-ada was given.
3105 if test "${with_ada+set}" = set; then
3106   withval="$with_ada"
3107   cf_with_ada=$withval
3108 else
3109   cf_with_ada=yes
3110 fi;
3111 echo "$as_me:3111: result: $cf_with_ada" >&5
3112 echo "${ECHO_T}$cf_with_ada" >&6
3113
3114 echo "$as_me:3114: checking if you want to build programs such as tic" >&5
3115 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3116
3117 # Check whether --with-progs or --without-progs was given.
3118 if test "${with_progs+set}" = set; then
3119   withval="$with_progs"
3120   cf_with_progs=$withval
3121 else
3122   cf_with_progs=yes
3123 fi;
3124 echo "$as_me:3124: result: $cf_with_progs" >&5
3125 echo "${ECHO_T}$cf_with_progs" >&6
3126
3127 echo "$as_me:3127: checking if you wish to install curses.h" >&5
3128 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3129
3130 # Check whether --with-curses-h or --without-curses-h was given.
3131 if test "${with_curses_h+set}" = set; then
3132   withval="$with_curses_h"
3133   with_curses_h=$withval
3134 else
3135   with_curses_h=yes
3136 fi;
3137 echo "$as_me:3137: result: $with_curses_h" >&5
3138 echo "${ECHO_T}$with_curses_h" >&6
3139
3140 modules_to_build="ncurses"
3141 if test "X$cf_with_progs" != Xno ; then
3142 modules_to_build="$modules_to_build progs tack"
3143 fi
3144 modules_to_build="$modules_to_build panel menu form"
3145
3146 test "$program_prefix" != NONE &&
3147   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3148 # Use a double $ so make ignores it.
3149 test "$program_suffix" != NONE &&
3150   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3151 # Double any \ or $.  echo might interpret backslashes.
3152 # By default was `s,x,x', remove it if useless.
3153 cat <<\_ACEOF >conftest.sed
3154 s/[\\$]/&&/g;s/;s,x,x,$//
3155 _ACEOF
3156 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3157 rm conftest.sed
3158
3159 for ac_prog in mawk gawk nawk awk
3160 do
3161   # Extract the first word of "$ac_prog", so it can be a program name with args.
3162 set dummy $ac_prog; ac_word=$2
3163 echo "$as_me:3163: checking for $ac_word" >&5
3164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3165 if test "${ac_cv_prog_AWK+set}" = set; then
3166   echo $ECHO_N "(cached) $ECHO_C" >&6
3167 else
3168   if test -n "$AWK"; then
3169   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3170 else
3171   ac_save_IFS=$IFS; IFS=$ac_path_separator
3172 ac_dummy="$PATH"
3173 for ac_dir in $ac_dummy; do
3174   IFS=$ac_save_IFS
3175   test -z "$ac_dir" && ac_dir=.
3176   $as_executable_p "$ac_dir/$ac_word" || continue
3177 ac_cv_prog_AWK="$ac_prog"
3178 echo "$as_me:3178: found $ac_dir/$ac_word" >&5
3179 break
3180 done
3181
3182 fi
3183 fi
3184 AWK=$ac_cv_prog_AWK
3185 if test -n "$AWK"; then
3186   echo "$as_me:3186: result: $AWK" >&5
3187 echo "${ECHO_T}$AWK" >&6
3188 else
3189   echo "$as_me:3189: result: no" >&5
3190 echo "${ECHO_T}no" >&6
3191 fi
3192
3193   test -n "$AWK" && break
3194 done
3195
3196 test -z "$AWK" && { { echo "$as_me:3196: error: No awk program found" >&5
3197 echo "$as_me: error: No awk program found" >&2;}
3198    { (exit 1); exit 1; }; }
3199
3200 echo "$as_me:3200: checking for egrep" >&5
3201 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3202 if test "${ac_cv_prog_egrep+set}" = set; then
3203   echo $ECHO_N "(cached) $ECHO_C" >&6
3204 else
3205   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3206     then ac_cv_prog_egrep='grep -E'
3207     else ac_cv_prog_egrep='egrep'
3208     fi
3209 fi
3210 echo "$as_me:3210: result: $ac_cv_prog_egrep" >&5
3211 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3212  EGREP=$ac_cv_prog_egrep
3213
3214 test -z "$EGREP" && { { echo "$as_me:3214: error: No egrep program found" >&5
3215 echo "$as_me: error: No egrep program found" >&2;}
3216    { (exit 1); exit 1; }; }
3217
3218 # Find a good install program.  We prefer a C program (faster),
3219 # so one script is as good as another.  But avoid the broken or
3220 # incompatible versions:
3221 # SysV /etc/install, /usr/sbin/install
3222 # SunOS /usr/etc/install
3223 # IRIX /sbin/install
3224 # AIX /bin/install
3225 # AmigaOS /C/install, which installs bootblocks on floppy discs
3226 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3227 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3228 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3229 # ./install, which can be erroneously created by make from ./install.sh.
3230 echo "$as_me:3230: checking for a BSD compatible install" >&5
3231 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3232 if test -z "$INSTALL"; then
3233 if test "${ac_cv_path_install+set}" = set; then
3234   echo $ECHO_N "(cached) $ECHO_C" >&6
3235 else
3236     ac_save_IFS=$IFS; IFS=$ac_path_separator
3237   for ac_dir in $PATH; do
3238     IFS=$ac_save_IFS
3239     # Account for people who put trailing slashes in PATH elements.
3240     case $ac_dir/ in
3241     / | ./ | .// | /cC/* \
3242     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3243     | /usr/ucb/* ) ;;
3244     *)
3245       # OSF1 and SCO ODT 3.0 have their own names for install.
3246       # Don't use installbsd from OSF since it installs stuff as root
3247       # by default.
3248       for ac_prog in ginstall scoinst install; do
3249         if $as_executable_p "$ac_dir/$ac_prog"; then
3250           if test $ac_prog = install &&
3251             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3252             # AIX install.  It has an incompatible calling convention.
3253             :
3254           elif test $ac_prog = install &&
3255             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3256             # program-specific install script used by HP pwplus--don't use.
3257             :
3258           else
3259             ac_cv_path_install="$ac_dir/$ac_prog -c"
3260             break 2
3261           fi
3262         fi
3263       done
3264       ;;
3265     esac
3266   done
3267
3268 fi
3269   if test "${ac_cv_path_install+set}" = set; then
3270     INSTALL=$ac_cv_path_install
3271   else
3272     # As a last resort, use the slow shell script.  We don't cache a
3273     # path for INSTALL within a source directory, because that will
3274     # break other packages using the cache if that directory is
3275     # removed, or if the path is relative.
3276     INSTALL=$ac_install_sh
3277   fi
3278 fi
3279 echo "$as_me:3279: result: $INSTALL" >&5
3280 echo "${ECHO_T}$INSTALL" >&6
3281
3282 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3283 # It thinks the first close brace ends the variable substitution.
3284 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3285
3286 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3287
3288 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3289
3290 case $INSTALL in
3291 /*)
3292   ;;
3293 *)
3294   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3295   test -z "$cf_dir" && cf_dir=.
3296   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3297   ;;
3298 esac
3299
3300 for ac_prog in tdlint lint alint
3301 do
3302   # Extract the first word of "$ac_prog", so it can be a program name with args.
3303 set dummy $ac_prog; ac_word=$2
3304 echo "$as_me:3304: checking for $ac_word" >&5
3305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3306 if test "${ac_cv_prog_LINT+set}" = set; then
3307   echo $ECHO_N "(cached) $ECHO_C" >&6
3308 else
3309   if test -n "$LINT"; then
3310   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3311 else
3312   ac_save_IFS=$IFS; IFS=$ac_path_separator
3313 ac_dummy="$PATH"
3314 for ac_dir in $ac_dummy; do
3315   IFS=$ac_save_IFS
3316   test -z "$ac_dir" && ac_dir=.
3317   $as_executable_p "$ac_dir/$ac_word" || continue
3318 ac_cv_prog_LINT="$ac_prog"
3319 echo "$as_me:3319: found $ac_dir/$ac_word" >&5
3320 break
3321 done
3322
3323 fi
3324 fi
3325 LINT=$ac_cv_prog_LINT
3326 if test -n "$LINT"; then
3327   echo "$as_me:3327: result: $LINT" >&5
3328 echo "${ECHO_T}$LINT" >&6
3329 else
3330   echo "$as_me:3330: result: no" >&5
3331 echo "${ECHO_T}no" >&6
3332 fi
3333
3334   test -n "$LINT" && break
3335 done
3336
3337 echo "$as_me:3337: checking whether ln -s works" >&5
3338 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3339 LN_S=$as_ln_s
3340 if test "$LN_S" = "ln -s"; then
3341   echo "$as_me:3341: result: yes" >&5
3342 echo "${ECHO_T}yes" >&6
3343 else
3344   echo "$as_me:3344: result: no, using $LN_S" >&5
3345 echo "${ECHO_T}no, using $LN_S" >&6
3346 fi
3347
3348 echo "$as_me:3348: checking for long file names" >&5
3349 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3350 if test "${ac_cv_sys_long_file_names+set}" = set; then
3351   echo $ECHO_N "(cached) $ECHO_C" >&6
3352 else
3353   ac_cv_sys_long_file_names=yes
3354 # Test for long file names in all the places we know might matter:
3355 #      .                the current directory, where building will happen
3356 #      $prefix/lib      where we will be installing things
3357 #      $exec_prefix/lib likewise
3358 # eval it to expand exec_prefix.
3359 #      $TMPDIR          if set, where it might want to write temporary files
3360 # if $TMPDIR is not set:
3361 #      /tmp             where it might want to write temporary files
3362 #      /var/tmp         likewise
3363 #      /usr/tmp         likewise
3364 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3365   ac_tmpdirs=$TMPDIR
3366 else
3367   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3368 fi
3369 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3370   test -d $ac_dir || continue
3371   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3372   ac_xdir=$ac_dir/cf$$
3373   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3374   ac_tf1=$ac_xdir/conftest9012345
3375   ac_tf2=$ac_xdir/conftest9012346
3376   (echo 1 >$ac_tf1) 2>/dev/null
3377   (echo 2 >$ac_tf2) 2>/dev/null
3378   ac_val=`cat $ac_tf1 2>/dev/null`
3379   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3380     ac_cv_sys_long_file_names=no
3381     rm -rf $ac_xdir 2>/dev/null
3382     break
3383   fi
3384   rm -rf $ac_xdir 2>/dev/null
3385 done
3386 fi
3387 echo "$as_me:3387: result: $ac_cv_sys_long_file_names" >&5
3388 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3389 if test $ac_cv_sys_long_file_names = yes; then
3390
3391 cat >>confdefs.h <<\EOF
3392 #define HAVE_LONG_FILE_NAMES 1
3393 EOF
3394
3395 fi
3396
3397 echo "$as_me:3397: checking if we should assume mixed-case filenames" >&5
3398 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3399
3400 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3401 if test "${enable_mixed_case+set}" = set; then
3402   enableval="$enable_mixed_case"
3403   enable_mixedcase=$enableval
3404 else
3405   enable_mixedcase=auto
3406 fi;
3407 echo "$as_me:3407: result: $enable_mixedcase" >&5
3408 echo "${ECHO_T}$enable_mixedcase" >&6
3409 if test "$enable_mixedcase" = "auto" ; then
3410
3411 echo "$as_me:3411: checking if filesystem supports mixed-case filenames" >&5
3412 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3413 if test "${cf_cv_mixedcase+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416
3417 if test "$cross_compiling" = yes ; then
3418         case $target_alias in #(vi
3419         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3420                 cf_cv_mixedcase=no
3421                 ;;
3422         *)
3423                 cf_cv_mixedcase=yes
3424                 ;;
3425         esac
3426 else
3427         rm -f conftest CONFTEST
3428         echo test >conftest
3429         if test -f CONFTEST ; then
3430                 cf_cv_mixedcase=no
3431         else
3432                 cf_cv_mixedcase=yes
3433         fi
3434         rm -f conftest CONFTEST
3435 fi
3436
3437 fi
3438 echo "$as_me:3438: result: $cf_cv_mixedcase" >&5
3439 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3440 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3441 #define MIXEDCASE_FILENAMES 1
3442 EOF
3443
3444 else
3445     cf_cv_mixedcase=$enable_mixedcase
3446     if test "$enable_mixedcase" = "yes" ; then
3447         cat >>confdefs.h <<\EOF
3448 #define MIXEDCASE_FILENAMES 1
3449 EOF
3450
3451     fi
3452 fi
3453
3454 # do this after mixed-case option (tags/TAGS is not as important as tic).
3455 echo "$as_me:3455: checking whether ${MAKE-make} sets \${MAKE}" >&5
3456 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3457 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3458 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3459   echo $ECHO_N "(cached) $ECHO_C" >&6
3460 else
3461   cat >conftest.make <<\EOF
3462 all:
3463         @echo 'ac_maketemp="${MAKE}"'
3464 EOF
3465 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3466 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3467 if test -n "$ac_maketemp"; then
3468   eval ac_cv_prog_make_${ac_make}_set=yes
3469 else
3470   eval ac_cv_prog_make_${ac_make}_set=no
3471 fi
3472 rm -f conftest.make
3473 fi
3474 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3475   echo "$as_me:3475: result: yes" >&5
3476 echo "${ECHO_T}yes" >&6
3477   SET_MAKE=
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481   SET_MAKE="MAKE=${MAKE-make}"
3482 fi
3483
3484 # Extract the first word of "ctags", so it can be a program name with args.
3485 set dummy ctags; ac_word=$2
3486 echo "$as_me:3486: checking for $ac_word" >&5
3487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3488 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3489   echo $ECHO_N "(cached) $ECHO_C" >&6
3490 else
3491   if test -n "$MAKE_LOWER_TAGS"; then
3492   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3493 else
3494   ac_save_IFS=$IFS; IFS=$ac_path_separator
3495 ac_dummy="$PATH"
3496 for ac_dir in $ac_dummy; do
3497   IFS=$ac_save_IFS
3498   test -z "$ac_dir" && ac_dir=.
3499   $as_executable_p "$ac_dir/$ac_word" || continue
3500 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3501 echo "$as_me:3501: found $ac_dir/$ac_word" >&5
3502 break
3503 done
3504
3505   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3506 fi
3507 fi
3508 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3509 if test -n "$MAKE_LOWER_TAGS"; then
3510   echo "$as_me:3510: result: $MAKE_LOWER_TAGS" >&5
3511 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3512 else
3513   echo "$as_me:3513: result: no" >&5
3514 echo "${ECHO_T}no" >&6
3515 fi
3516
3517 if test "$cf_cv_mixedcase" = yes ; then
3518         # Extract the first word of "etags", so it can be a program name with args.
3519 set dummy etags; ac_word=$2
3520 echo "$as_me:3520: checking for $ac_word" >&5
3521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3522 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3523   echo $ECHO_N "(cached) $ECHO_C" >&6
3524 else
3525   if test -n "$MAKE_UPPER_TAGS"; then
3526   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3527 else
3528   ac_save_IFS=$IFS; IFS=$ac_path_separator
3529 ac_dummy="$PATH"
3530 for ac_dir in $ac_dummy; do
3531   IFS=$ac_save_IFS
3532   test -z "$ac_dir" && ac_dir=.
3533   $as_executable_p "$ac_dir/$ac_word" || continue
3534 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3535 echo "$as_me:3535: found $ac_dir/$ac_word" >&5
3536 break
3537 done
3538
3539   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3540 fi
3541 fi
3542 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3543 if test -n "$MAKE_UPPER_TAGS"; then
3544   echo "$as_me:3544: result: $MAKE_UPPER_TAGS" >&5
3545 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3546 else
3547   echo "$as_me:3547: result: no" >&5
3548 echo "${ECHO_T}no" >&6
3549 fi
3550
3551 else
3552         MAKE_UPPER_TAGS=no
3553 fi
3554
3555 if test "$MAKE_UPPER_TAGS" = yes ; then
3556         MAKE_UPPER_TAGS=
3557 else
3558         MAKE_UPPER_TAGS="#"
3559 fi
3560
3561 if test "$MAKE_LOWER_TAGS" = yes ; then
3562         MAKE_LOWER_TAGS=
3563 else
3564         MAKE_LOWER_TAGS="#"
3565 fi
3566
3567 echo "$as_me:3567: checking for makeflags variable" >&5
3568 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3569 if test "${cf_cv_makeflags+set}" = set; then
3570   echo $ECHO_N "(cached) $ECHO_C" >&6
3571 else
3572
3573         cf_cv_makeflags=''
3574         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3575         do
3576                 cat >cf_makeflags.tmp <<CF_EOF
3577 SHELL = /bin/sh
3578 all :
3579         @ echo '.$cf_option'
3580 CF_EOF
3581                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3582                 case "$cf_result" in
3583                 .*k)
3584                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3585                         case "$cf_result" in
3586                         .*CC=*) cf_cv_makeflags=
3587                                 ;;
3588                         *)      cf_cv_makeflags=$cf_option
3589                                 ;;
3590                         esac
3591                         break
3592                         ;;
3593                 .-)     ;;
3594                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3595                         ;;
3596                 esac
3597         done
3598         rm -f cf_makeflags.tmp
3599
3600 fi
3601 echo "$as_me:3601: result: $cf_cv_makeflags" >&5
3602 echo "${ECHO_T}$cf_cv_makeflags" >&6
3603
3604 if test -n "$ac_tool_prefix"; then
3605   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3606 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3607 echo "$as_me:3607: checking for $ac_word" >&5
3608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3609 if test "${ac_cv_prog_RANLIB+set}" = set; then
3610   echo $ECHO_N "(cached) $ECHO_C" >&6
3611 else
3612   if test -n "$RANLIB"; then
3613   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3614 else
3615   ac_save_IFS=$IFS; IFS=$ac_path_separator
3616 ac_dummy="$PATH"
3617 for ac_dir in $ac_dummy; do
3618   IFS=$ac_save_IFS
3619   test -z "$ac_dir" && ac_dir=.
3620   $as_executable_p "$ac_dir/$ac_word" || continue
3621 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3622 echo "$as_me:3622: found $ac_dir/$ac_word" >&5
3623 break
3624 done
3625
3626 fi
3627 fi
3628 RANLIB=$ac_cv_prog_RANLIB
3629 if test -n "$RANLIB"; then
3630   echo "$as_me:3630: result: $RANLIB" >&5
3631 echo "${ECHO_T}$RANLIB" >&6
3632 else
3633   echo "$as_me:3633: result: no" >&5
3634 echo "${ECHO_T}no" >&6
3635 fi
3636
3637 fi
3638 if test -z "$ac_cv_prog_RANLIB"; then
3639   ac_ct_RANLIB=$RANLIB
3640   # Extract the first word of "ranlib", so it can be a program name with args.
3641 set dummy ranlib; ac_word=$2
3642 echo "$as_me:3642: checking for $ac_word" >&5
3643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3644 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647   if test -n "$ac_ct_RANLIB"; then
3648   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3649 else
3650   ac_save_IFS=$IFS; IFS=$ac_path_separator
3651 ac_dummy="$PATH"
3652 for ac_dir in $ac_dummy; do
3653   IFS=$ac_save_IFS
3654   test -z "$ac_dir" && ac_dir=.
3655   $as_executable_p "$ac_dir/$ac_word" || continue
3656 ac_cv_prog_ac_ct_RANLIB="ranlib"
3657 echo "$as_me:3657: found $ac_dir/$ac_word" >&5
3658 break
3659 done
3660
3661   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3662 fi
3663 fi
3664 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3665 if test -n "$ac_ct_RANLIB"; then
3666   echo "$as_me:3666: result: $ac_ct_RANLIB" >&5
3667 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3668 else
3669   echo "$as_me:3669: result: no" >&5
3670 echo "${ECHO_T}no" >&6
3671 fi
3672
3673   RANLIB=$ac_ct_RANLIB
3674 else
3675   RANLIB="$ac_cv_prog_RANLIB"
3676 fi
3677
3678 if test -n "$ac_tool_prefix"; then
3679   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3680 set dummy ${ac_tool_prefix}ld; ac_word=$2
3681 echo "$as_me:3681: checking for $ac_word" >&5
3682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683 if test "${ac_cv_prog_LD+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686   if test -n "$LD"; then
3687   ac_cv_prog_LD="$LD" # Let the user override the test.
3688 else
3689   ac_save_IFS=$IFS; IFS=$ac_path_separator
3690 ac_dummy="$PATH"
3691 for ac_dir in $ac_dummy; do
3692   IFS=$ac_save_IFS
3693   test -z "$ac_dir" && ac_dir=.
3694   $as_executable_p "$ac_dir/$ac_word" || continue
3695 ac_cv_prog_LD="${ac_tool_prefix}ld"
3696 echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3697 break
3698 done
3699
3700 fi
3701 fi
3702 LD=$ac_cv_prog_LD
3703 if test -n "$LD"; then
3704   echo "$as_me:3704: result: $LD" >&5
3705 echo "${ECHO_T}$LD" >&6
3706 else
3707   echo "$as_me:3707: result: no" >&5
3708 echo "${ECHO_T}no" >&6
3709 fi
3710
3711 fi
3712 if test -z "$ac_cv_prog_LD"; then
3713   ac_ct_LD=$LD
3714   # Extract the first word of "ld", so it can be a program name with args.
3715 set dummy ld; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3719   echo $ECHO_N "(cached) $ECHO_C" >&6
3720 else
3721   if test -n "$ac_ct_LD"; then
3722   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3723 else
3724   ac_save_IFS=$IFS; IFS=$ac_path_separator
3725 ac_dummy="$PATH"
3726 for ac_dir in $ac_dummy; do
3727   IFS=$ac_save_IFS
3728   test -z "$ac_dir" && ac_dir=.
3729   $as_executable_p "$ac_dir/$ac_word" || continue
3730 ac_cv_prog_ac_ct_LD="ld"
3731 echo "$as_me:3731: found $ac_dir/$ac_word" >&5
3732 break
3733 done
3734
3735   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3736 fi
3737 fi
3738 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3739 if test -n "$ac_ct_LD"; then
3740   echo "$as_me:3740: result: $ac_ct_LD" >&5
3741 echo "${ECHO_T}$ac_ct_LD" >&6
3742 else
3743   echo "$as_me:3743: result: no" >&5
3744 echo "${ECHO_T}no" >&6
3745 fi
3746
3747   LD=$ac_ct_LD
3748 else
3749   LD="$ac_cv_prog_LD"
3750 fi
3751
3752 if test -n "$ac_tool_prefix"; then
3753   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3754 set dummy ${ac_tool_prefix}ar; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_AR+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$AR"; then
3761   ac_cv_prog_AR="$AR" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_AR="${ac_tool_prefix}ar"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 AR=$ac_cv_prog_AR
3777 if test -n "$AR"; then
3778   echo "$as_me:3778: result: $AR" >&5
3779 echo "${ECHO_T}$AR" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785 fi
3786 if test -z "$ac_cv_prog_AR"; then
3787   ac_ct_AR=$AR
3788   # Extract the first word of "ar", so it can be a program name with args.
3789 set dummy ar; ac_word=$2
3790 echo "$as_me:3790: checking for $ac_word" >&5
3791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3792 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3793   echo $ECHO_N "(cached) $ECHO_C" >&6
3794 else
3795   if test -n "$ac_ct_AR"; then
3796   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3797 else
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   $as_executable_p "$ac_dir/$ac_word" || continue
3804 ac_cv_prog_ac_ct_AR="ar"
3805 echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806 break
3807 done
3808
3809   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3810 fi
3811 fi
3812 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3813 if test -n "$ac_ct_AR"; then
3814   echo "$as_me:3814: result: $ac_ct_AR" >&5
3815 echo "${ECHO_T}$ac_ct_AR" >&6
3816 else
3817   echo "$as_me:3817: result: no" >&5
3818 echo "${ECHO_T}no" >&6
3819 fi
3820
3821   AR=$ac_ct_AR
3822 else
3823   AR="$ac_cv_prog_AR"
3824 fi
3825
3826 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3827   echo $ECHO_N "(cached) $ECHO_C" >&6
3828 else
3829
3830 echo "$as_me:3830: checking for archiver options (symbol AR_OPTS)" >&5
3831 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3832
3833 if test -z "$AR_OPTS" ; then
3834         AR_OPTS=rv
3835
3836 fi
3837
3838 cf_cv_subst_AR_OPTS=$AR_OPTS
3839 echo "$as_me:3839: result: $AR_OPTS" >&5
3840 echo "${ECHO_T}$AR_OPTS" >&6
3841
3842 fi
3843
3844 echo "$as_me:3844: checking if you have specified an install-prefix" >&5
3845 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3846
3847 # Check whether --with-install-prefix or --without-install-prefix was given.
3848 if test "${with_install_prefix+set}" = set; then
3849   withval="$with_install_prefix"
3850   case "$withval" in #(vi
3851         yes|no) #(vi
3852                 ;;
3853         *)      DESTDIR="$withval"
3854                 ;;
3855         esac
3856 fi;
3857 echo "$as_me:3857: result: $DESTDIR" >&5
3858 echo "${ECHO_T}$DESTDIR" >&6
3859
3860 ###############################################################################
3861
3862 # If we're cross-compiling, allow the user to override the tools and their
3863 # options.  The configure script is oriented toward identifying the host
3864 # compiler, etc., but we need a build compiler to generate parts of the source.
3865
3866 if test "$cross_compiling" = yes ; then
3867
3868         # defaults that we might want to override
3869         : ${BUILD_CFLAGS:=''}
3870         : ${BUILD_CPPFLAGS:=''}
3871         : ${BUILD_LDFLAGS:=''}
3872         : ${BUILD_LIBS:=''}
3873         : ${BUILD_EXEEXT:='$x'}
3874         : ${BUILD_OBJEXT:='o'}
3875
3876 # Check whether --with-build-cc or --without-build-cc was given.
3877 if test "${with_build_cc+set}" = set; then
3878   withval="$with_build_cc"
3879   BUILD_CC="$withval"
3880 else
3881   for ac_prog in gcc cc cl
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$BUILD_CC"; then
3891   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_BUILD_CC="$ac_prog"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 BUILD_CC=$ac_cv_prog_BUILD_CC
3907 if test -n "$BUILD_CC"; then
3908   echo "$as_me:3908: result: $BUILD_CC" >&5
3909 echo "${ECHO_T}$BUILD_CC" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915   test -n "$BUILD_CC" && break
3916 done
3917
3918 fi;
3919         echo "$as_me:3919: checking for native build C compiler" >&5
3920 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3921         echo "$as_me:3921: result: $BUILD_CC" >&5
3922 echo "${ECHO_T}$BUILD_CC" >&6
3923
3924         echo "$as_me:3924: checking for native build C preprocessor" >&5
3925 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3926
3927 # Check whether --with-build-cpp or --without-build-cpp was given.
3928 if test "${with_build_cpp+set}" = set; then
3929   withval="$with_build_cpp"
3930   BUILD_CPP="$withval"
3931 else
3932   BUILD_CPP='${BUILD_CC} -E'
3933 fi;
3934         echo "$as_me:3934: result: $BUILD_CPP" >&5
3935 echo "${ECHO_T}$BUILD_CPP" >&6
3936
3937         echo "$as_me:3937: checking for native build C flags" >&5
3938 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3939
3940 # Check whether --with-build-cflags or --without-build-cflags was given.
3941 if test "${with_build_cflags+set}" = set; then
3942   withval="$with_build_cflags"
3943   BUILD_CFLAGS="$withval"
3944 fi;
3945         echo "$as_me:3945: result: $BUILD_CFLAGS" >&5
3946 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3947
3948         echo "$as_me:3948: checking for native build C preprocessor-flags" >&5
3949 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3950
3951 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3952 if test "${with_build_cppflags+set}" = set; then
3953   withval="$with_build_cppflags"
3954   BUILD_CPPFLAGS="$withval"
3955 fi;
3956         echo "$as_me:3956: result: $BUILD_CPPFLAGS" >&5
3957 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3958
3959         echo "$as_me:3959: checking for native build linker-flags" >&5
3960 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3961
3962 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3963 if test "${with_build_ldflags+set}" = set; then
3964   withval="$with_build_ldflags"
3965   BUILD_LDFLAGS="$withval"
3966 fi;
3967         echo "$as_me:3967: result: $BUILD_LDFLAGS" >&5
3968 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3969
3970         echo "$as_me:3970: checking for native build linker-libraries" >&5
3971 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3972
3973 # Check whether --with-build-libs or --without-build-libs was given.
3974 if test "${with_build_libs+set}" = set; then
3975   withval="$with_build_libs"
3976   BUILD_LIBS="$withval"
3977 fi;
3978         echo "$as_me:3978: result: $BUILD_LIBS" >&5
3979 echo "${ECHO_T}$BUILD_LIBS" >&6
3980
3981         # this assumes we're on Unix.
3982         BUILD_EXEEXT=
3983         BUILD_OBJEXT=o
3984
3985         : ${BUILD_CC:='${CC}'}
3986
3987         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3988                 { { echo "$as_me:3988: error: Cross-build requires two compilers.
3989 Use --with-build-cc to specify the native compiler." >&5
3990 echo "$as_me: error: Cross-build requires two compilers.
3991 Use --with-build-cc to specify the native compiler." >&2;}
3992    { (exit 1); exit 1; }; }
3993         fi
3994
3995 else
3996         : ${BUILD_CC:='${CC}'}
3997         : ${BUILD_CPP:='${CPP}'}
3998         : ${BUILD_CFLAGS:='${CFLAGS}'}
3999         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4000         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4001         : ${BUILD_LIBS:='${LIBS}'}
4002         : ${BUILD_EXEEXT:='$x'}
4003         : ${BUILD_OBJEXT:='o'}
4004 fi
4005
4006 ###############################################################################
4007
4008 ### Options to allow the user to specify the set of libraries which are used.
4009 ### Use "--without-normal --with-shared" to allow the default model to be
4010 ### shared, for example.
4011 cf_list_models=""
4012
4013 LIBTOOL=
4014
4015 # common library maintenance symbols that are convenient for libtool scripts:
4016 LIB_CREATE='${AR} -cr'
4017 LIB_OBJECT='${OBJECTS}'
4018 LIB_SUFFIX=.a
4019 LIB_PREP="$RANLIB"
4020
4021 # symbols used to prop libtool up to enable it to determine what it should be
4022 # doing:
4023 LIB_CLEAN=
4024 LIB_COMPILE=
4025 LIB_LINK='${CC}'
4026 LIB_INSTALL=
4027 LIB_UNINSTALL=
4028
4029 echo "$as_me:4029: checking if you want to build libraries with libtool" >&5
4030 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4031
4032 # Check whether --with-libtool or --without-libtool was given.
4033 if test "${with_libtool+set}" = set; then
4034   withval="$with_libtool"
4035   with_libtool=$withval
4036 else
4037   with_libtool=no
4038 fi;
4039 echo "$as_me:4039: result: $with_libtool" >&5
4040 echo "${ECHO_T}$with_libtool" >&6
4041 if test "$with_libtool" != "no"; then
4042
4043         if test "$with_libtool" != "yes" ; then
4044
4045 if test "x$prefix" != xNONE; then
4046   cf_path_syntax="$prefix"
4047 else
4048   cf_path_syntax="$ac_default_prefix"
4049 fi
4050
4051 case ".$with_libtool" in #(vi
4052 .\$\(*\)*|.\'*\'*) #(vi
4053   ;;
4054 ..|./*|.\\*) #(vi
4055   ;;
4056 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4057   ;;
4058 .\${*prefix}*) #(vi
4059   eval with_libtool="$with_libtool"
4060   case ".$with_libtool" in #(vi
4061   .NONE/*)
4062     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4063     ;;
4064   esac
4065   ;; #(vi
4066 .no|.NONE/*)
4067   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4068   ;;
4069 *)
4070   { { echo "$as_me:4070: error: expected a pathname, not \"$with_libtool\"" >&5
4071 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4072    { (exit 1); exit 1; }; }
4073   ;;
4074 esac
4075
4076                 LIBTOOL=$with_libtool
4077         else
4078                 # Extract the first word of "libtool", so it can be a program name with args.
4079 set dummy libtool; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   case $LIBTOOL in
4086   [\\/]* | ?:[\\/]*)
4087   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4088   ;;
4089   *)
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   if $as_executable_p "$ac_dir/$ac_word"; then
4096    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4097    echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098    break
4099 fi
4100 done
4101
4102   ;;
4103 esac
4104 fi
4105 LIBTOOL=$ac_cv_path_LIBTOOL
4106
4107 if test -n "$LIBTOOL"; then
4108   echo "$as_me:4108: result: $LIBTOOL" >&5
4109 echo "${ECHO_T}$LIBTOOL" >&6
4110 else
4111   echo "$as_me:4111: result: no" >&5
4112 echo "${ECHO_T}no" >&6
4113 fi
4114
4115         fi
4116         if test -z "$LIBTOOL" ; then
4117                 { { echo "$as_me:4117: error: Cannot find libtool" >&5
4118 echo "$as_me: error: Cannot find libtool" >&2;}
4119    { (exit 1); exit 1; }; }
4120         fi
4121         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4122         LIB_OBJECT='${OBJECTS:.o=.lo}'
4123         LIB_SUFFIX=.la
4124         LIB_CLEAN='${LIBTOOL} --mode=clean'
4125         LIB_COMPILE='${LIBTOOL} --mode=compile'
4126         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4127         LIB_INSTALL='${LIBTOOL} --mode=install'
4128         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4129         LIB_PREP=:
4130
4131         # Show the version of libtool
4132         echo "$as_me:4132: checking version of libtool" >&5
4133 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4134
4135         # Save the version in a cache variable - this is not entirely a good
4136         # thing, but the version string from libtool is very ugly, and for
4137         # bug reports it might be useful to have the original string.
4138         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.].*//'`
4139         echo "$as_me:4139: result: $cf_cv_libtool_version" >&5
4140 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4141         if test -z "$cf_cv_libtool_version" ; then
4142                 { { echo "$as_me:4142: error: This is not GNU libtool" >&5
4143 echo "$as_me: error: This is not GNU libtool" >&2;}
4144    { (exit 1); exit 1; }; }
4145         fi
4146
4147         # special hack to add --tag option for C++ compiler
4148         case $cf_cv_libtool_version in
4149         1.[5-9]*|[2-9]*)
4150                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4151                 LIBTOOL="$LIBTOOL --tag=CC"
4152                 ;;
4153         *)
4154                 LIBTOOL_CXX="$LIBTOOL"
4155                 ;;
4156         esac
4157 else
4158         LIBTOOL=""
4159         LIBTOOL_CXX=""
4160 fi
4161
4162 test -z "$LIBTOOL" && ECHO_LT=
4163
4164 if test "$with_libtool" != "no" ; then
4165
4166 cf_list_models="$cf_list_models libtool"
4167
4168 else
4169
4170 echo "$as_me:4170: checking if you want to build shared libraries" >&5
4171 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4172
4173 # Check whether --with-shared or --without-shared was given.
4174 if test "${with_shared+set}" = set; then
4175   withval="$with_shared"
4176   with_shared=$withval
4177 else
4178   with_shared=no
4179 fi;
4180 echo "$as_me:4180: result: $with_shared" >&5
4181 echo "${ECHO_T}$with_shared" >&6
4182 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4183
4184 echo "$as_me:4184: checking if you want to build static libraries" >&5
4185 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4186
4187 # Check whether --with-normal or --without-normal was given.
4188 if test "${with_normal+set}" = set; then
4189   withval="$with_normal"
4190   with_normal=$withval
4191 else
4192   with_normal=yes
4193 fi;
4194 echo "$as_me:4194: result: $with_normal" >&5
4195 echo "${ECHO_T}$with_normal" >&6
4196 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4197
4198 echo "$as_me:4198: checking if you want to build debug libraries" >&5
4199 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4200
4201 # Check whether --with-debug or --without-debug was given.
4202 if test "${with_debug+set}" = set; then
4203   withval="$with_debug"
4204   with_debug=$withval
4205 else
4206   with_debug=yes
4207 fi;
4208 echo "$as_me:4208: result: $with_debug" >&5
4209 echo "${ECHO_T}$with_debug" >&6
4210 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4211
4212 echo "$as_me:4212: checking if you want to build profiling libraries" >&5
4213 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4214
4215 # Check whether --with-profile or --without-profile was given.
4216 if test "${with_profile+set}" = set; then
4217   withval="$with_profile"
4218   with_profile=$withval
4219 else
4220   with_profile=no
4221 fi;
4222 echo "$as_me:4222: result: $with_profile" >&5
4223 echo "${ECHO_T}$with_profile" >&6
4224 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4225
4226 fi
4227
4228 ###############################################################################
4229
4230 echo "$as_me:4230: checking for specified models" >&5
4231 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4232 test -z "$cf_list_models" && cf_list_models=normal
4233 test "$with_libtool" != "no" && cf_list_models=libtool
4234 echo "$as_me:4234: result: $cf_list_models" >&5
4235 echo "${ECHO_T}$cf_list_models" >&6
4236
4237 ### Use the first model as the default, and save its suffix for use in building
4238 ### up test-applications.
4239 echo "$as_me:4239: checking for default model" >&5
4240 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4241 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4242 echo "$as_me:4242: result: $DFT_LWR_MODEL" >&5
4243 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4244
4245 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4246
4247 TICS_NAME=tic
4248
4249 TINFO_NAME=tinfo
4250
4251 LIB_NAME=ncurses
4252
4253 LIB_DIR=../lib
4254 LIB_2ND=../../lib
4255
4256         case $cf_cv_system_name in
4257         OS/2*)  LIB_PREFIX=''     ;;
4258         os2*)   LIB_PREFIX=''     ;;
4259         *)      LIB_PREFIX='lib'  ;;
4260         esac
4261 cf_prefix=$LIB_PREFIX
4262
4263 LIB_PREFIX=$cf_prefix
4264
4265 LIB_SUFFIX=
4266
4267 ###############################################################################
4268
4269 echo "$as_me:4269: checking if you want to build a separate terminfo library" >&5
4270 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4271
4272 # Check whether --with-termlib or --without-termlib was given.
4273 if test "${with_termlib+set}" = set; then
4274   withval="$with_termlib"
4275   with_termlib=$withval
4276 else
4277   with_termlib=no
4278 fi;
4279 echo "$as_me:4279: result: $with_termlib" >&5
4280 echo "${ECHO_T}$with_termlib" >&6
4281
4282 echo "$as_me:4282: checking if you want to build a separate tic library" >&5
4283 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4284
4285 # Check whether --with-ticlib or --without-ticlib was given.
4286 if test "${with_ticlib+set}" = set; then
4287   withval="$with_ticlib"
4288   with_ticlib=$withval
4289 else
4290   with_ticlib=no
4291 fi;
4292 echo "$as_me:4292: result: $with_ticlib" >&5
4293 echo "${ECHO_T}$with_ticlib" >&6
4294
4295 ### Checks for special libraries, must be done up-front.
4296 SHLIB_LIST=""
4297
4298 echo "$as_me:4298: checking if you want to link with the GPM mouse library" >&5
4299 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4300
4301 # Check whether --with-gpm or --without-gpm was given.
4302 if test "${with_gpm+set}" = set; then
4303   withval="$with_gpm"
4304   with_gpm=$withval
4305 else
4306   with_gpm=maybe
4307 fi;
4308 echo "$as_me:4308: result: $with_gpm" >&5
4309 echo "${ECHO_T}$with_gpm" >&6
4310
4311 if test "$with_gpm" != no ; then
4312         echo "$as_me:4312: checking for gpm.h" >&5
4313 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4314 if test "${ac_cv_header_gpm_h+set}" = set; then
4315   echo $ECHO_N "(cached) $ECHO_C" >&6
4316 else
4317   cat >conftest.$ac_ext <<_ACEOF
4318 #line 4318 "configure"
4319 #include "confdefs.h"
4320 #include <gpm.h>
4321 _ACEOF
4322 if { (eval echo "$as_me:4322: \"$ac_cpp conftest.$ac_ext\"") >&5
4323   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4324   ac_status=$?
4325   egrep -v '^ *\+' conftest.er1 >conftest.err
4326   rm -f conftest.er1
4327   cat conftest.err >&5
4328   echo "$as_me:4328: \$? = $ac_status" >&5
4329   (exit $ac_status); } >/dev/null; then
4330   if test -s conftest.err; then
4331     ac_cpp_err=$ac_c_preproc_warn_flag
4332   else
4333     ac_cpp_err=
4334   fi
4335 else
4336   ac_cpp_err=yes
4337 fi
4338 if test -z "$ac_cpp_err"; then
4339   ac_cv_header_gpm_h=yes
4340 else
4341   echo "$as_me: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   ac_cv_header_gpm_h=no
4344 fi
4345 rm -f conftest.err conftest.$ac_ext
4346 fi
4347 echo "$as_me:4347: result: $ac_cv_header_gpm_h" >&5
4348 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4349 if test $ac_cv_header_gpm_h = yes; then
4350
4351                 cat >>confdefs.h <<\EOF
4352 #define HAVE_GPM_H 1
4353 EOF
4354
4355                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4356                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4357
4358 echo "${as_me-configure}:4358: testing assuming we really have GPM library ..." 1>&5
4359
4360                         cat >>confdefs.h <<\EOF
4361 #define HAVE_LIBGPM 1
4362 EOF
4363
4364                 else
4365                         echo "$as_me:4365: checking for Gpm_Open in -lgpm" >&5
4366 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4367 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4368   echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370   ac_check_lib_save_LIBS=$LIBS
4371 LIBS="-lgpm  $LIBS"
4372 cat >conftest.$ac_ext <<_ACEOF
4373 #line 4373 "configure"
4374 #include "confdefs.h"
4375
4376 /* Override any gcc2 internal prototype to avoid an error.  */
4377 #ifdef __cplusplus
4378 extern "C"
4379 #endif
4380 /* We use char because int might match the return type of a gcc2
4381    builtin and then its argument prototype would still apply.  */
4382 char Gpm_Open ();
4383 int
4384 main ()
4385 {
4386 Gpm_Open ();
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 rm -f conftest.$ac_objext conftest$ac_exeext
4392 if { (eval echo "$as_me:4392: \"$ac_link\"") >&5
4393   (eval $ac_link) 2>&5
4394   ac_status=$?
4395   echo "$as_me:4395: \$? = $ac_status" >&5
4396   (exit $ac_status); } &&
4397          { ac_try='test -s conftest$ac_exeext'
4398   { (eval echo "$as_me:4398: \"$ac_try\"") >&5
4399   (eval $ac_try) 2>&5
4400   ac_status=$?
4401   echo "$as_me:4401: \$? = $ac_status" >&5
4402   (exit $ac_status); }; }; then
4403   ac_cv_lib_gpm_Gpm_Open=yes
4404 else
4405   echo "$as_me: failed program was:" >&5
4406 cat conftest.$ac_ext >&5
4407 ac_cv_lib_gpm_Gpm_Open=no
4408 fi
4409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4410 LIBS=$ac_check_lib_save_LIBS
4411 fi
4412 echo "$as_me:4412: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4413 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4414 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4415   :
4416 else
4417
4418                                 { { echo "$as_me:4418: error: Cannot link with GPM library" >&5
4419 echo "$as_me: error: Cannot link with GPM library" >&2;}
4420    { (exit 1); exit 1; }; }
4421                 fi
4422                 with_gpm=yes
4423
4424 fi
4425
4426 else
4427
4428                 test "$with_gpm" != maybe && { echo "$as_me:4428: WARNING: Cannot find GPM header" >&5
4429 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4430                 with_gpm=no
4431
4432 fi
4433
4434 fi
4435
4436 if test "$with_gpm" != no ; then
4437         echo "$as_me:4437: checking if you want to load GPM dynamically" >&5
4438 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4439
4440 # Check whether --with-dlsym or --without-dlsym was given.
4441 if test "${with_dlsym+set}" = set; then
4442   withval="$with_dlsym"
4443   with_dlsym=$withval
4444 else
4445   with_dlsym=yes
4446 fi;
4447         echo "$as_me:4447: result: $with_dlsym" >&5
4448 echo "${ECHO_T}$with_dlsym" >&6
4449         if test "$with_dlsym" = yes ; then
4450
4451 cf_have_dlsym=no
4452 echo "$as_me:4452: checking for dlsym" >&5
4453 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4454 if test "${ac_cv_func_dlsym+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   cat >conftest.$ac_ext <<_ACEOF
4458 #line 4458 "configure"
4459 #include "confdefs.h"
4460 /* System header to define __stub macros and hopefully few prototypes,
4461     which can conflict with char dlsym (); below.  */
4462 #include <assert.h>
4463 /* Override any gcc2 internal prototype to avoid an error.  */
4464 #ifdef __cplusplus
4465 extern "C"
4466 #endif
4467 /* We use char because int might match the return type of a gcc2
4468    builtin and then its argument prototype would still apply.  */
4469 char dlsym ();
4470 char (*f) ();
4471
4472 int
4473 main ()
4474 {
4475 /* The GNU C library defines this for functions which it implements
4476     to always fail with ENOSYS.  Some functions are actually named
4477     something starting with __ and the normal name is an alias.  */
4478 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4479 choke me
4480 #else
4481 f = dlsym;
4482 #endif
4483
4484   ;
4485   return 0;
4486 }
4487 _ACEOF
4488 rm -f conftest.$ac_objext conftest$ac_exeext
4489 if { (eval echo "$as_me:4489: \"$ac_link\"") >&5
4490   (eval $ac_link) 2>&5
4491   ac_status=$?
4492   echo "$as_me:4492: \$? = $ac_status" >&5
4493   (exit $ac_status); } &&
4494          { ac_try='test -s conftest$ac_exeext'
4495   { (eval echo "$as_me:4495: \"$ac_try\"") >&5
4496   (eval $ac_try) 2>&5
4497   ac_status=$?
4498   echo "$as_me:4498: \$? = $ac_status" >&5
4499   (exit $ac_status); }; }; then
4500   ac_cv_func_dlsym=yes
4501 else
4502   echo "$as_me: failed program was:" >&5
4503 cat conftest.$ac_ext >&5
4504 ac_cv_func_dlsym=no
4505 fi
4506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4507 fi
4508 echo "$as_me:4508: result: $ac_cv_func_dlsym" >&5
4509 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4510 if test $ac_cv_func_dlsym = yes; then
4511   cf_have_dlsym=yes
4512 else
4513
4514 cf_have_libdl=no
4515 echo "$as_me:4515: checking for dlsym in -ldl" >&5
4516 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4517 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520   ac_check_lib_save_LIBS=$LIBS
4521 LIBS="-ldl  $LIBS"
4522 cat >conftest.$ac_ext <<_ACEOF
4523 #line 4523 "configure"
4524 #include "confdefs.h"
4525
4526 /* Override any gcc2 internal prototype to avoid an error.  */
4527 #ifdef __cplusplus
4528 extern "C"
4529 #endif
4530 /* We use char because int might match the return type of a gcc2
4531    builtin and then its argument prototype would still apply.  */
4532 char dlsym ();
4533 int
4534 main ()
4535 {
4536 dlsym ();
4537   ;
4538   return 0;
4539 }
4540 _ACEOF
4541 rm -f conftest.$ac_objext conftest$ac_exeext
4542 if { (eval echo "$as_me:4542: \"$ac_link\"") >&5
4543   (eval $ac_link) 2>&5
4544   ac_status=$?
4545   echo "$as_me:4545: \$? = $ac_status" >&5
4546   (exit $ac_status); } &&
4547          { ac_try='test -s conftest$ac_exeext'
4548   { (eval echo "$as_me:4548: \"$ac_try\"") >&5
4549   (eval $ac_try) 2>&5
4550   ac_status=$?
4551   echo "$as_me:4551: \$? = $ac_status" >&5
4552   (exit $ac_status); }; }; then
4553   ac_cv_lib_dl_dlsym=yes
4554 else
4555   echo "$as_me: failed program was:" >&5
4556 cat conftest.$ac_ext >&5
4557 ac_cv_lib_dl_dlsym=no
4558 fi
4559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4560 LIBS=$ac_check_lib_save_LIBS
4561 fi
4562 echo "$as_me:4562: result: $ac_cv_lib_dl_dlsym" >&5
4563 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4564 if test $ac_cv_lib_dl_dlsym = yes; then
4565
4566         cf_have_dlsym=yes
4567         cf_have_libdl=yes
4568 fi
4569
4570 fi
4571
4572 if test "$cf_have_dlsym" = yes ; then
4573         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4574
4575         echo "$as_me:4575: checking whether able to link to dl*() functions" >&5
4576 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4577         cat >conftest.$ac_ext <<_ACEOF
4578 #line 4578 "configure"
4579 #include "confdefs.h"
4580 #include <dlfcn.h>
4581 int
4582 main ()
4583 {
4584
4585                 void *obj;
4586                 if ((obj = dlopen("filename", 0)) != 0) {
4587                         if (dlsym(obj, "symbolname") == 0) {
4588                         dlclose(obj);
4589                         }
4590                 }
4591   ;
4592   return 0;
4593 }
4594 _ACEOF
4595 rm -f conftest.$ac_objext conftest$ac_exeext
4596 if { (eval echo "$as_me:4596: \"$ac_link\"") >&5
4597   (eval $ac_link) 2>&5
4598   ac_status=$?
4599   echo "$as_me:4599: \$? = $ac_status" >&5
4600   (exit $ac_status); } &&
4601          { ac_try='test -s conftest$ac_exeext'
4602   { (eval echo "$as_me:4602: \"$ac_try\"") >&5
4603   (eval $ac_try) 2>&5
4604   ac_status=$?
4605   echo "$as_me:4605: \$? = $ac_status" >&5
4606   (exit $ac_status); }; }; then
4607
4608                 cat >>confdefs.h <<\EOF
4609 #define HAVE_LIBDL 1
4610 EOF
4611
4612 else
4613   echo "$as_me: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4615
4616                 { { echo "$as_me:4616: error: Cannot link test program for libdl" >&5
4617 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4618    { (exit 1); exit 1; }; }
4619 fi
4620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4621         echo "$as_me:4621: result: ok" >&5
4622 echo "${ECHO_T}ok" >&6
4623 else
4624         { { echo "$as_me:4624: error: Cannot find dlsym function" >&5
4625 echo "$as_me: error: Cannot find dlsym function" >&2;}
4626    { (exit 1); exit 1; }; }
4627 fi
4628
4629                 if test "$with_gpm" != yes ; then
4630                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4631
4632 echo "${as_me-configure}:4632: testing assuming soname for gpm is $with_gpm ..." 1>&5
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-relink or --disable-relink was given.
4901 if test "${enable_relink+set}" = set; then
4902   enableval="$enable_relink"
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             MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5099         else
5100             MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5101                 fi
5102                 cf_cv_rm_so_locs=yes
5103                 ;;
5104         linux*|gnu*|k*bsd*-gnu)
5105                 if test "$DFT_LWR_MODEL" = "shared" ; then
5106                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5107                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5108                 fi
5109                 if test "$cf_cv_ld_rpath" = yes ; then
5110                         cf_ld_rpath_opt="-Wl,-rpath,"
5111                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5112                 fi
5113
5114         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5115         if test "$cf_cv_shlib_version" = rel; then
5116                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5117         else
5118                 cf_shared_soname='`basename $@`'
5119         fi
5120
5121                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5122                 ;;
5123         openbsd[2-9].*)
5124                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5125                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5126                 ;;
5127         openbsd*|freebsd[12].*)
5128                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5129                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5130                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5131                 ;;
5132         freebsd*)
5133                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5134                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5135                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5136                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5137                         cf_ld_rpath_opt="-rpath "
5138                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5139                 fi
5140
5141         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5142         if test "$cf_cv_shlib_version" = rel; then
5143                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5144         else
5145                 cf_shared_soname='`basename $@`'
5146         fi
5147
5148                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5149                 ;;
5150         netbsd*)
5151                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5152                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5153                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5154                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5155                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5156                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5157                         if test "$cf_cv_shlib_version" = auto; then
5158                         if test -f /usr/libexec/ld.elf_so; then
5159                                 cf_cv_shlib_version=abi
5160                         else
5161                                 cf_cv_shlib_version=rel
5162                         fi
5163                         fi
5164
5165         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5166         if test "$cf_cv_shlib_version" = rel; then
5167                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5168         else
5169                 cf_shared_soname='`basename $@`'
5170         fi
5171
5172                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5173                 else
5174                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5175                 fi
5176                 ;;
5177         osf*|mls+*)
5178                 # tested with OSF/1 V3.2 and 'cc'
5179                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5180                 # link with shared libs).
5181                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5182                 case $host_os in
5183                 osf4*)
5184                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5185                         ;;
5186                 esac
5187                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5188                 if test "$DFT_LWR_MODEL" = "shared" ; then
5189                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5191                 fi
5192                 if test "$cf_cv_ld_rpath" = yes ; then
5193                         cf_ld_rpath_opt="-rpath"
5194                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5195                 fi
5196                 cf_cv_rm_so_locs=yes
5197                 ;;
5198         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5199                 # tested with osr5.0.5
5200                 if test "$GCC" != yes; then
5201                         CC_SHARED_OPTS='-belf -KPIC'
5202                 fi
5203                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5204                 if test "$cf_cv_ld_rpath" = yes ; then
5205                         # only way is to set LD_RUN_PATH but no switch for it
5206                         RUN_PATH=$libdir
5207                 fi
5208                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5209                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5210                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5211                 ;;
5212         sunos4*)
5213                 # tested with SunOS 4.1.1 and gcc 2.7.0
5214                 if test "$GCC" != yes; then
5215                         CC_SHARED_OPTS='-KPIC'
5216                 fi
5217                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5218                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5219                 ;;
5220         solaris2*)
5221                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5222                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
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                 if test "$GCC" != yes; then
5240                         CC_SHARED_OPTS='-xcode=pic32'
5241                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5242                 else
5243                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_shared_soname' -o $@'
5244                 fi
5245                 ;;
5246         sysv5uw7*|unix_sv*)
5247                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5248                 if test "$GCC" != yes; then
5249                         CC_SHARED_OPTS='-KPIC'
5250                 fi
5251                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5252                 ;;
5253         *)
5254                 CC_SHARED_OPTS='unknown'
5255                 MK_SHARED_LIB='echo unknown'
5256                 ;;
5257         esac
5258
5259         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5260         case "$cf_cv_shlib_version" in #(vi
5261         rel|abi)
5262                 case "$MK_SHARED_LIB" in #(vi
5263                 *'-o $@')
5264                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5265                         ;;
5266                 *)
5267                         { echo "$as_me:5267: WARNING: ignored --with-shlib-version" >&5
5268 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5269                         ;;
5270                 esac
5271                 ;;
5272         esac
5273
5274         if test -n "$cf_ld_rpath_opt" ; then
5275                 echo "$as_me:5275: checking if we need a space after rpath option" >&5
5276 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5277                 cf_save_LIBS="$LIBS"
5278                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5279                 cat >conftest.$ac_ext <<_ACEOF
5280 #line 5280 "configure"
5281 #include "confdefs.h"
5282
5283 int
5284 main ()
5285 {
5286
5287   ;
5288   return 0;
5289 }
5290 _ACEOF
5291 rm -f conftest.$ac_objext conftest$ac_exeext
5292 if { (eval echo "$as_me:5292: \"$ac_link\"") >&5
5293   (eval $ac_link) 2>&5
5294   ac_status=$?
5295   echo "$as_me:5295: \$? = $ac_status" >&5
5296   (exit $ac_status); } &&
5297          { ac_try='test -s conftest$ac_exeext'
5298   { (eval echo "$as_me:5298: \"$ac_try\"") >&5
5299   (eval $ac_try) 2>&5
5300   ac_status=$?
5301   echo "$as_me:5301: \$? = $ac_status" >&5
5302   (exit $ac_status); }; }; then
5303   cf_rpath_space=no
5304 else
5305   echo "$as_me: failed program was:" >&5
5306 cat conftest.$ac_ext >&5
5307 cf_rpath_space=yes
5308 fi
5309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5310                 LIBS="$cf_save_LIBS"
5311                 echo "$as_me:5311: result: $cf_rpath_space" >&5
5312 echo "${ECHO_T}$cf_rpath_space" >&6
5313                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5314                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5315         fi
5316
5317 if test "$CC_SHARED_OPTS" = "unknown"; then
5318         for model in $cf_list_models; do
5319                 if test "$model" = "shared"; then
5320                         { { echo "$as_me:5320: error: Shared libraries are not supported in this version" >&5
5321 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5322    { (exit 1); exit 1; }; }
5323                 fi
5324         done
5325 fi
5326
5327 ###############################################################################
5328
5329 ###     use option --disable-overwrite to leave out the link to -lcurses
5330 echo "$as_me:5330: checking if you wish to install ncurses overwriting curses" >&5
5331 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5332
5333 # Check whether --enable-overwrite or --disable-overwrite was given.
5334 if test "${enable_overwrite+set}" = set; then
5335   enableval="$enable_overwrite"
5336   with_overwrite=$enableval
5337 else
5338   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5339 fi;
5340 echo "$as_me:5340: result: $with_overwrite" >&5
5341 echo "${ECHO_T}$with_overwrite" >&6
5342
5343 echo "$as_me:5343: checking if external terminfo-database is used" >&5
5344 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5345
5346 # Check whether --enable-database or --disable-database was given.
5347 if test "${enable_database+set}" = set; then
5348   enableval="$enable_database"
5349   use_database=$enableval
5350 else
5351   use_database=yes
5352 fi;
5353 echo "$as_me:5353: result: $use_database" >&5
5354 echo "${ECHO_T}$use_database" >&6
5355
5356 case $host_os in #(vi
5357 os2*) #(vi
5358         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5359         ;;
5360 *) #(vi
5361         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5362         ;;
5363 esac
5364
5365         case $cf_cv_system_name in
5366         os2*)   PATHSEP=';'  ;;
5367         *)      PATHSEP=':'  ;;
5368         esac
5369
5370 if test "$use_database" != no ; then
5371         cat >>confdefs.h <<\EOF
5372 #define USE_DATABASE 1
5373 EOF
5374
5375         echo "$as_me:5375: checking which terminfo source-file will be installed" >&5
5376 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5377
5378 # Check whether --enable-database or --disable-database was given.
5379 if test "${enable_database+set}" = set; then
5380   enableval="$enable_database"
5381   TERMINFO_SRC=$withval
5382 fi;
5383         echo "$as_me:5383: result: $TERMINFO_SRC" >&5
5384 echo "${ECHO_T}$TERMINFO_SRC" >&6
5385
5386         echo "$as_me:5386: checking whether to use hashed database instead of directory/tree" >&5
5387 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5388
5389 # Check whether --with-hashed-db or --without-hashed-db was given.
5390 if test "${with_hashed_db+set}" = set; then
5391   withval="$with_hashed_db"
5392
5393 else
5394   with_hashed_db=no
5395 fi;
5396         echo "$as_me:5396: result: $with_hashed_db" >&5
5397 echo "${ECHO_T}$with_hashed_db" >&6
5398 fi
5399
5400 echo "$as_me:5400: checking for list of fallback descriptions" >&5
5401 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5402
5403 # Check whether --with-fallbacks or --without-fallbacks was given.
5404 if test "${with_fallbacks+set}" = set; then
5405   withval="$with_fallbacks"
5406   with_fallback=$withval
5407 else
5408   with_fallback=
5409 fi;
5410 echo "$as_me:5410: result: $with_fallback" >&5
5411 echo "${ECHO_T}$with_fallback" >&6
5412 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5413
5414 echo "$as_me:5414: checking if you want modern xterm or antique" >&5
5415 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5416
5417 # Check whether --with-xterm-new or --without-xterm-new was given.
5418 if test "${with_xterm_new+set}" = set; then
5419   withval="$with_xterm_new"
5420   with_xterm_new=$withval
5421 else
5422   with_xterm_new=yes
5423 fi;
5424 case $with_xterm_new in
5425 no)     with_xterm_new=xterm-old;;
5426 *)      with_xterm_new=xterm-new;;
5427 esac
5428 echo "$as_me:5428: result: $with_xterm_new" >&5
5429 echo "${ECHO_T}$with_xterm_new" >&6
5430 WHICH_XTERM=$with_xterm_new
5431
5432 MAKE_TERMINFO=
5433 if test "$use_database" = no ; then
5434         TERMINFO="${datadir}/terminfo"
5435         MAKE_TERMINFO="#"
5436 else
5437
5438 echo "$as_me:5438: checking for list of terminfo directories" >&5
5439 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5440
5441 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5442 if test "${with_terminfo_dirs+set}" = set; then
5443   withval="$with_terminfo_dirs"
5444
5445 else
5446   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5447 fi;
5448 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5449 cf_dst_path=
5450 for cf_src_path in $withval
5451 do
5452
5453 if test "x$prefix" != xNONE; then
5454   cf_path_syntax="$prefix"
5455 else
5456   cf_path_syntax="$ac_default_prefix"
5457 fi
5458
5459 case ".$cf_src_path" in #(vi
5460 .\$\(*\)*|.\'*\'*) #(vi
5461   ;;
5462 ..|./*|.\\*) #(vi
5463   ;;
5464 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5465   ;;
5466 .\${*prefix}*) #(vi
5467   eval cf_src_path="$cf_src_path"
5468   case ".$cf_src_path" in #(vi
5469   .NONE/*)
5470     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5471     ;;
5472   esac
5473   ;; #(vi
5474 .no|.NONE/*)
5475   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5476   ;;
5477 *)
5478   { { echo "$as_me:5478: error: expected a pathname, not \"$cf_src_path\"" >&5
5479 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5480    { (exit 1); exit 1; }; }
5481   ;;
5482 esac
5483
5484   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5485   cf_dst_path="${cf_dst_path}${cf_src_path}"
5486 done
5487 IFS="$ac_save_ifs"
5488
5489 eval 'TERMINFO_DIRS="$cf_dst_path"'
5490
5491 echo "$as_me:5491: result: $TERMINFO_DIRS" >&5
5492 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5493 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5494 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5495 EOF
5496
5497 echo "$as_me:5497: checking for default terminfo directory" >&5
5498 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5499
5500 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5501 if test "${with_default_terminfo_dir+set}" = set; then
5502   withval="$with_default_terminfo_dir"
5503
5504 else
5505   withval="${TERMINFO-${datadir}/terminfo}"
5506 fi; if test -n "${datadir}/terminfo" ; then
5507
5508 if test "x$prefix" != xNONE; then
5509   cf_path_syntax="$prefix"
5510 else
5511   cf_path_syntax="$ac_default_prefix"
5512 fi
5513
5514 case ".$withval" in #(vi
5515 .\$\(*\)*|.\'*\'*) #(vi
5516   ;;
5517 ..|./*|.\\*) #(vi
5518   ;;
5519 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5520   ;;
5521 .\${*prefix}*) #(vi
5522   eval withval="$withval"
5523   case ".$withval" in #(vi
5524   .NONE/*)
5525     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5526     ;;
5527   esac
5528   ;; #(vi
5529 .no|.NONE/*)
5530   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5531   ;;
5532 *)
5533   { { echo "$as_me:5533: error: expected a pathname, not \"$withval\"" >&5
5534 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5535    { (exit 1); exit 1; }; }
5536   ;;
5537 esac
5538
5539 fi
5540 TERMINFO="$withval"
5541
5542 echo "$as_me:5542: result: $TERMINFO" >&5
5543 echo "${ECHO_T}$TERMINFO" >&6
5544 cat >>confdefs.h <<EOF
5545 #define TERMINFO "$TERMINFO"
5546 EOF
5547
5548 fi
5549
5550 ###     use option --disable-big-core to make tic run on small machines
5551 ###     We need 4Mb, check if we can allocate 50% more than that.
5552 echo "$as_me:5552: checking if big-core option selected" >&5
5553 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5554
5555 # Check whether --enable-big-core or --disable-big-core was given.
5556 if test "${enable_big_core+set}" = set; then
5557   enableval="$enable_big_core"
5558   with_big_core=$enableval
5559 else
5560   if test "$cross_compiling" = yes; then
5561   with_big_core=no
5562 else
5563   cat >conftest.$ac_ext <<_ACEOF
5564 #line 5564 "configure"
5565 #include "confdefs.h"
5566
5567 #include <stdlib.h>
5568 #include <string.h>
5569 int main() {
5570         unsigned long n = 6000000L;
5571         char *s = malloc(n);
5572         if (s != 0)
5573                 s[0] = s[n-1] = 0;
5574         ${cf_cv_main_return:-return}(s == 0);
5575 }
5576 _ACEOF
5577 rm -f conftest$ac_exeext
5578 if { (eval echo "$as_me:5578: \"$ac_link\"") >&5
5579   (eval $ac_link) 2>&5
5580   ac_status=$?
5581   echo "$as_me:5581: \$? = $ac_status" >&5
5582   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5583   { (eval echo "$as_me:5583: \"$ac_try\"") >&5
5584   (eval $ac_try) 2>&5
5585   ac_status=$?
5586   echo "$as_me:5586: \$? = $ac_status" >&5
5587   (exit $ac_status); }; }; then
5588   with_big_core=yes
5589 else
5590   echo "$as_me: program exited with status $ac_status" >&5
5591 echo "$as_me: failed program was:" >&5
5592 cat conftest.$ac_ext >&5
5593 with_big_core=no
5594 fi
5595 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5596 fi
5597 fi;
5598 echo "$as_me:5598: result: $with_big_core" >&5
5599 echo "${ECHO_T}$with_big_core" >&6
5600 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5601 #define HAVE_BIG_CORE 1
5602 EOF
5603
5604 ### ISO C only guarantees 512-char strings, we have tables which load faster
5605 ### when constructed using "big" strings.  More than the C compiler, the awk
5606 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5607 echo "$as_me:5607: checking if big-strings option selected" >&5
5608 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5609
5610 # Check whether --enable-big-strings or --disable-big-strings was given.
5611 if test "${enable_big_strings+set}" = set; then
5612   enableval="$enable_big_strings"
5613   with_big_strings=$enableval
5614 else
5615
5616     case x$AWK in #(vi
5617     x)
5618         eval with_big_strings=no
5619         ;;
5620     *) #(vi
5621         if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 4000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5622             | $AWK '{ if (length($0) != 4000) exit 1; }' 2>/dev/null >/dev/null ); then
5623             eval with_big_strings=yes
5624         else
5625             eval with_big_strings=no
5626         fi
5627         ;;
5628     esac
5629
5630 fi;
5631 echo "$as_me:5631: result: $with_big_strings" >&5
5632 echo "${ECHO_T}$with_big_strings" >&6
5633
5634 USE_BIG_STRINGS=0
5635 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5636
5637 ###     use option --enable-termcap to compile in the termcap fallback support
5638 echo "$as_me:5638: checking if you want termcap-fallback support" >&5
5639 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5640
5641 # Check whether --enable-termcap or --disable-termcap was given.
5642 if test "${enable_termcap+set}" = set; then
5643   enableval="$enable_termcap"
5644   with_termcap=$enableval
5645 else
5646   with_termcap=no
5647 fi;
5648 echo "$as_me:5648: result: $with_termcap" >&5
5649 echo "${ECHO_T}$with_termcap" >&6
5650
5651 if test "$with_termcap" != "yes" ; then
5652         if test "$use_database" = no ; then
5653                 if test -z "$with_fallback" ; then
5654                         { { echo "$as_me:5654: error: You have disabled the database w/o specifying fallbacks" >&5
5655 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5656    { (exit 1); exit 1; }; }
5657                 fi
5658         fi
5659         cat >>confdefs.h <<\EOF
5660 #define PURE_TERMINFO 1
5661 EOF
5662
5663 else
5664
5665 if test "$with_ticlib" != no ; then
5666         { { echo "$as_me:5666: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5667 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5668    { (exit 1); exit 1; }; }
5669 fi
5670
5671 cat >>confdefs.h <<\EOF
5672 #define USE_TERMCAP 1
5673 EOF
5674
5675 echo "$as_me:5675: checking for list of termcap files" >&5
5676 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5677
5678 # Check whether --with-termpath or --without-termpath was given.
5679 if test "${with_termpath+set}" = set; then
5680   withval="$with_termpath"
5681
5682 else
5683   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5684 fi;
5685 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5686 cf_dst_path=
5687 for cf_src_path in $withval
5688 do
5689
5690 if test "x$prefix" != xNONE; then
5691   cf_path_syntax="$prefix"
5692 else
5693   cf_path_syntax="$ac_default_prefix"
5694 fi
5695
5696 case ".$cf_src_path" in #(vi
5697 .\$\(*\)*|.\'*\'*) #(vi
5698   ;;
5699 ..|./*|.\\*) #(vi
5700   ;;
5701 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5702   ;;
5703 .\${*prefix}*) #(vi
5704   eval cf_src_path="$cf_src_path"
5705   case ".$cf_src_path" in #(vi
5706   .NONE/*)
5707     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5708     ;;
5709   esac
5710   ;; #(vi
5711 .no|.NONE/*)
5712   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5713   ;;
5714 *)
5715   { { echo "$as_me:5715: error: expected a pathname, not \"$cf_src_path\"" >&5
5716 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5717    { (exit 1); exit 1; }; }
5718   ;;
5719 esac
5720
5721   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5722   cf_dst_path="${cf_dst_path}${cf_src_path}"
5723 done
5724 IFS="$ac_save_ifs"
5725
5726 eval 'TERMPATH="$cf_dst_path"'
5727
5728 echo "$as_me:5728: result: $TERMPATH" >&5
5729 echo "${ECHO_T}$TERMPATH" >&6
5730 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5731 #define TERMPATH "$TERMPATH"
5732 EOF
5733
5734 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5735 echo "$as_me:5735: checking if fast termcap-loader is needed" >&5
5736 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5737
5738 # Check whether --enable-getcap or --disable-getcap was given.
5739 if test "${enable_getcap+set}" = set; then
5740   enableval="$enable_getcap"
5741   with_getcap=$enableval
5742 else
5743   with_getcap=no
5744 fi;
5745 echo "$as_me:5745: result: $with_getcap" >&5
5746 echo "${ECHO_T}$with_getcap" >&6
5747 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5748 #define USE_GETCAP 1
5749 EOF
5750
5751 echo "$as_me:5751: checking if translated termcaps will be cached in ~/.terminfo" >&5
5752 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5753
5754 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5755 if test "${enable_getcap_cache+set}" = set; then
5756   enableval="$enable_getcap_cache"
5757   with_getcap_cache=$enableval
5758 else
5759   with_getcap_cache=no
5760 fi;
5761 echo "$as_me:5761: result: $with_getcap_cache" >&5
5762 echo "${ECHO_T}$with_getcap_cache" >&6
5763 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5764 #define USE_GETCAP_CACHE 1
5765 EOF
5766
5767 fi
5768
5769 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5770 echo "$as_me:5770: checking if ~/.terminfo is wanted" >&5
5771 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5772
5773 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5774 if test "${enable_home_terminfo+set}" = set; then
5775   enableval="$enable_home_terminfo"
5776   with_home_terminfo=$enableval
5777 else
5778   with_home_terminfo=yes
5779 fi;
5780 echo "$as_me:5780: result: $with_home_terminfo" >&5
5781 echo "${ECHO_T}$with_home_terminfo" >&6
5782 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5783 #define USE_HOME_TERMINFO 1
5784 EOF
5785
5786 echo "$as_me:5786: checking if you want to use restricted environment when running as root" >&5
5787 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5788
5789 # Check whether --enable-root-environ or --disable-root-environ was given.
5790 if test "${enable_root_environ+set}" = set; then
5791   enableval="$enable_root_environ"
5792   with_root_environ=$enableval
5793 else
5794   with_root_environ=yes
5795 fi;
5796 echo "$as_me:5796: result: $with_root_environ" >&5
5797 echo "${ECHO_T}$with_root_environ" >&6
5798 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5799 #define USE_ROOT_ENVIRON 1
5800 EOF
5801
5802 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5803 ###   to reduce storage requirements for the terminfo database.
5804
5805 for ac_func in \
5806         remove \
5807         unlink
5808 do
5809 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5810 echo "$as_me:5810: checking for $ac_func" >&5
5811 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5812 if eval "test \"\${$as_ac_var+set}\" = set"; then
5813   echo $ECHO_N "(cached) $ECHO_C" >&6
5814 else
5815   cat >conftest.$ac_ext <<_ACEOF
5816 #line 5816 "configure"
5817 #include "confdefs.h"
5818 /* System header to define __stub macros and hopefully few prototypes,
5819     which can conflict with char $ac_func (); below.  */
5820 #include <assert.h>
5821 /* Override any gcc2 internal prototype to avoid an error.  */
5822 #ifdef __cplusplus
5823 extern "C"
5824 #endif
5825 /* We use char because int might match the return type of a gcc2
5826    builtin and then its argument prototype would still apply.  */
5827 char $ac_func ();
5828 char (*f) ();
5829
5830 int
5831 main ()
5832 {
5833 /* The GNU C library defines this for functions which it implements
5834     to always fail with ENOSYS.  Some functions are actually named
5835     something starting with __ and the normal name is an alias.  */
5836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5837 choke me
5838 #else
5839 f = $ac_func;
5840 #endif
5841
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 rm -f conftest.$ac_objext conftest$ac_exeext
5847 if { (eval echo "$as_me:5847: \"$ac_link\"") >&5
5848   (eval $ac_link) 2>&5
5849   ac_status=$?
5850   echo "$as_me:5850: \$? = $ac_status" >&5
5851   (exit $ac_status); } &&
5852          { ac_try='test -s conftest$ac_exeext'
5853   { (eval echo "$as_me:5853: \"$ac_try\"") >&5
5854   (eval $ac_try) 2>&5
5855   ac_status=$?
5856   echo "$as_me:5856: \$? = $ac_status" >&5
5857   (exit $ac_status); }; }; then
5858   eval "$as_ac_var=yes"
5859 else
5860   echo "$as_me: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 eval "$as_ac_var=no"
5863 fi
5864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5865 fi
5866 echo "$as_me:5866: result: `eval echo '${'$as_ac_var'}'`" >&5
5867 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5868 if test `eval echo '${'$as_ac_var'}'` = yes; then
5869   cat >>confdefs.h <<EOF
5870 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5871 EOF
5872
5873 fi
5874 done
5875
5876 if test "$cross_compiling" = yes ; then
5877
5878 for ac_func in \
5879                 link \
5880                 symlink
5881 do
5882 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5883 echo "$as_me:5883: checking for $ac_func" >&5
5884 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5885 if eval "test \"\${$as_ac_var+set}\" = set"; then
5886   echo $ECHO_N "(cached) $ECHO_C" >&6
5887 else
5888   cat >conftest.$ac_ext <<_ACEOF
5889 #line 5889 "configure"
5890 #include "confdefs.h"
5891 /* System header to define __stub macros and hopefully few prototypes,
5892     which can conflict with char $ac_func (); below.  */
5893 #include <assert.h>
5894 /* Override any gcc2 internal prototype to avoid an error.  */
5895 #ifdef __cplusplus
5896 extern "C"
5897 #endif
5898 /* We use char because int might match the return type of a gcc2
5899    builtin and then its argument prototype would still apply.  */
5900 char $ac_func ();
5901 char (*f) ();
5902
5903 int
5904 main ()
5905 {
5906 /* The GNU C library defines this for functions which it implements
5907     to always fail with ENOSYS.  Some functions are actually named
5908     something starting with __ and the normal name is an alias.  */
5909 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5910 choke me
5911 #else
5912 f = $ac_func;
5913 #endif
5914
5915   ;
5916   return 0;
5917 }
5918 _ACEOF
5919 rm -f conftest.$ac_objext conftest$ac_exeext
5920 if { (eval echo "$as_me:5920: \"$ac_link\"") >&5
5921   (eval $ac_link) 2>&5
5922   ac_status=$?
5923   echo "$as_me:5923: \$? = $ac_status" >&5
5924   (exit $ac_status); } &&
5925          { ac_try='test -s conftest$ac_exeext'
5926   { (eval echo "$as_me:5926: \"$ac_try\"") >&5
5927   (eval $ac_try) 2>&5
5928   ac_status=$?
5929   echo "$as_me:5929: \$? = $ac_status" >&5
5930   (exit $ac_status); }; }; then
5931   eval "$as_ac_var=yes"
5932 else
5933   echo "$as_me: failed program was:" >&5
5934 cat conftest.$ac_ext >&5
5935 eval "$as_ac_var=no"
5936 fi
5937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5938 fi
5939 echo "$as_me:5939: result: `eval echo '${'$as_ac_var'}'`" >&5
5940 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5941 if test `eval echo '${'$as_ac_var'}'` = yes; then
5942   cat >>confdefs.h <<EOF
5943 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5944 EOF
5945
5946 fi
5947 done
5948
5949 else
5950         echo "$as_me:5950: checking if link/symlink functions work" >&5
5951 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5952 if test "${cf_cv_link_funcs+set}" = set; then
5953   echo $ECHO_N "(cached) $ECHO_C" >&6
5954 else
5955
5956                 cf_cv_link_funcs=
5957                 for cf_func in link symlink ; do
5958                         if test "$cross_compiling" = yes; then
5959
5960                         eval 'ac_cv_func_'$cf_func'=error'
5961 else
5962   cat >conftest.$ac_ext <<_ACEOF
5963 #line 5963 "configure"
5964 #include "confdefs.h"
5965
5966 #include <sys/types.h>
5967 #include <sys/stat.h>
5968 #ifdef HAVE_UNISTD_H
5969 #include <unistd.h>
5970 #endif
5971 int main()
5972 {
5973         int fail = 0;
5974         char *src = "config.log";
5975         char *dst = "conftest.chk";
5976         struct stat src_sb;
5977         struct stat dst_sb;
5978
5979         stat(src, &src_sb);
5980         fail = ($cf_func("config.log", "conftest.chk") < 0)
5981             || (stat(dst, &dst_sb) < 0)
5982             || (dst_sb.st_mtime != src_sb.st_mtime);
5983 #ifdef HAVE_UNLINK
5984         unlink(dst);
5985 #else
5986         remove(dst);
5987 #endif
5988         ${cf_cv_main_return:-return} (fail);
5989 }
5990
5991 _ACEOF
5992 rm -f conftest$ac_exeext
5993 if { (eval echo "$as_me:5993: \"$ac_link\"") >&5
5994   (eval $ac_link) 2>&5
5995   ac_status=$?
5996   echo "$as_me:5996: \$? = $ac_status" >&5
5997   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5998   { (eval echo "$as_me:5998: \"$ac_try\"") >&5
5999   (eval $ac_try) 2>&5
6000   ac_status=$?
6001   echo "$as_me:6001: \$? = $ac_status" >&5
6002   (exit $ac_status); }; }; then
6003
6004                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6005                         eval 'ac_cv_func_'$cf_func'=yes'
6006 else
6007   echo "$as_me: program exited with status $ac_status" >&5
6008 echo "$as_me: failed program was:" >&5
6009 cat conftest.$ac_ext >&5
6010
6011                         eval 'ac_cv_func_'$cf_func'=no'
6012 fi
6013 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6014 fi
6015                 done
6016                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6017
6018 fi
6019 echo "$as_me:6019: result: $cf_cv_link_funcs" >&5
6020 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6021         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6022 #define HAVE_LINK 1
6023 EOF
6024
6025         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6026 #define HAVE_SYMLINK 1
6027 EOF
6028
6029 fi
6030
6031 with_links=no
6032 with_symlinks=no
6033
6034 # soft links (symbolic links) are useful for some systems where hard links do
6035 # not work, or to make it simpler to copy terminfo trees around.
6036 if test "$ac_cv_func_symlink" = yes ; then
6037     echo "$as_me:6037: checking if tic should use symbolic links" >&5
6038 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6039
6040 # Check whether --enable-symlinks or --disable-symlinks was given.
6041 if test "${enable_symlinks+set}" = set; then
6042   enableval="$enable_symlinks"
6043   with_symlinks=$enableval
6044 else
6045   with_symlinks=no
6046 fi;
6047     echo "$as_me:6047: result: $with_symlinks" >&5
6048 echo "${ECHO_T}$with_symlinks" >&6
6049 fi
6050
6051 # If we have hard links and did not choose to use soft links instead, there is
6052 # no reason to make this choice optional - use the hard links.
6053 if test "$with_symlinks" = no ; then
6054     echo "$as_me:6054: checking if tic should use hard links" >&5
6055 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6056     if test "$ac_cv_func_link" = yes ; then
6057         with_links=yes
6058     else
6059         with_links=no
6060     fi
6061     echo "$as_me:6061: result: $with_links" >&5
6062 echo "${ECHO_T}$with_links" >&6
6063 fi
6064
6065 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6066 #define USE_LINKS 1
6067 EOF
6068
6069 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6070 #define USE_SYMLINKS 1
6071 EOF
6072
6073 ###   use option --enable-broken-linker to force on use of broken-linker support
6074 echo "$as_me:6074: checking if you want broken-linker support code" >&5
6075 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6076
6077 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6078 if test "${enable_broken_linker+set}" = set; then
6079   enableval="$enable_broken_linker"
6080   with_broken_linker=$enableval
6081 else
6082   with_broken_linker=${BROKEN_LINKER-no}
6083 fi;
6084 echo "$as_me:6084: result: $with_broken_linker" >&5
6085 echo "${ECHO_T}$with_broken_linker" >&6
6086
6087 BROKEN_LINKER=0
6088 if test "$with_broken_linker" = yes ; then
6089         cat >>confdefs.h <<\EOF
6090 #define BROKEN_LINKER 1
6091 EOF
6092
6093         BROKEN_LINKER=1
6094 elif test "$DFT_LWR_MODEL" = shared ; then
6095         case $cf_cv_system_name in #(vi
6096         cygwin*)
6097                 cat >>confdefs.h <<\EOF
6098 #define BROKEN_LINKER 1
6099 EOF
6100
6101                 BROKEN_LINKER=1
6102                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6103
6104 echo "${as_me-configure}:6104: testing cygwin linker is broken anyway ..." 1>&5
6105
6106                 ;;
6107         esac
6108 fi
6109
6110 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6111 echo "$as_me:6111: checking if tputs should process BSD-style prefix padding" >&5
6112 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6113
6114 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6115 if test "${enable_bsdpad+set}" = set; then
6116   enableval="$enable_bsdpad"
6117   with_bsdpad=$enableval
6118 else
6119   with_bsdpad=no
6120 fi;
6121 echo "$as_me:6121: result: $with_bsdpad" >&5
6122 echo "${ECHO_T}$with_bsdpad" >&6
6123 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6124 #define BSD_TPUTS 1
6125 EOF
6126
6127 ###   use option --enable-widec to turn on use of wide-character support
6128 NCURSES_CH_T=chtype
6129 NCURSES_LIBUTF8=0
6130
6131 NEED_WCHAR_H=0
6132 NCURSES_MBSTATE_T=0
6133 NCURSES_WCHAR_T=0
6134 NCURSES_WINT_T=0
6135
6136 # Check to define _XOPEN_SOURCE "automatically"
6137
6138 echo "$as_me:6138: checking if $CC -U and -D options work together" >&5
6139 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6140 if test "${cf_cv_cc_u_d_options+set}" = set; then
6141   echo $ECHO_N "(cached) $ECHO_C" >&6
6142 else
6143
6144         cf_save_CPPFLAGS="$CPPFLAGS"
6145         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6146         cat >conftest.$ac_ext <<_ACEOF
6147 #line 6147 "configure"
6148 #include "confdefs.h"
6149
6150 int
6151 main ()
6152 {
6153
6154 #ifndef U_D_OPTIONS
6155 make an undefined-error
6156 #endif
6157 #ifdef  D_U_OPTIONS
6158 make a defined-error
6159 #endif
6160
6161   ;
6162   return 0;
6163 }
6164 _ACEOF
6165 rm -f conftest.$ac_objext
6166 if { (eval echo "$as_me:6166: \"$ac_compile\"") >&5
6167   (eval $ac_compile) 2>&5
6168   ac_status=$?
6169   echo "$as_me:6169: \$? = $ac_status" >&5
6170   (exit $ac_status); } &&
6171          { ac_try='test -s conftest.$ac_objext'
6172   { (eval echo "$as_me:6172: \"$ac_try\"") >&5
6173   (eval $ac_try) 2>&5
6174   ac_status=$?
6175   echo "$as_me:6175: \$? = $ac_status" >&5
6176   (exit $ac_status); }; }; then
6177
6178         cf_cv_cc_u_d_options=yes
6179 else
6180   echo "$as_me: failed program was:" >&5
6181 cat conftest.$ac_ext >&5
6182
6183         cf_cv_cc_u_d_options=no
6184 fi
6185 rm -f conftest.$ac_objext conftest.$ac_ext
6186         CPPFLAGS="$cf_save_CPPFLAGS"
6187
6188 fi
6189 echo "$as_me:6189: result: $cf_cv_cc_u_d_options" >&5
6190 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6191
6192 cf_XOPEN_SOURCE=500
6193 cf_POSIX_C_SOURCE=199506L
6194
6195 case $host_os in #(vi
6196 aix[45]*) #(vi
6197         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6198         ;;
6199 freebsd*|dragonfly*) #(vi
6200         # 5.x headers associate
6201         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6202         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6203         cf_POSIX_C_SOURCE=200112L
6204         cf_XOPEN_SOURCE=600
6205         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6206         ;;
6207 hpux*) #(vi
6208         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6209         ;;
6210 irix[56].*) #(vi
6211         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6212         ;;
6213 linux*|gnu*|k*bsd*-gnu) #(vi
6214
6215 echo "$as_me:6215: checking if we must define _GNU_SOURCE" >&5
6216 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6217 if test "${cf_cv_gnu_source+set}" = set; then
6218   echo $ECHO_N "(cached) $ECHO_C" >&6
6219 else
6220
6221 cat >conftest.$ac_ext <<_ACEOF
6222 #line 6222 "configure"
6223 #include "confdefs.h"
6224 #include <sys/types.h>
6225 int
6226 main ()
6227 {
6228
6229 #ifndef _XOPEN_SOURCE
6230 make an error
6231 #endif
6232   ;
6233   return 0;
6234 }
6235 _ACEOF
6236 rm -f conftest.$ac_objext
6237 if { (eval echo "$as_me:6237: \"$ac_compile\"") >&5
6238   (eval $ac_compile) 2>&5
6239   ac_status=$?
6240   echo "$as_me:6240: \$? = $ac_status" >&5
6241   (exit $ac_status); } &&
6242          { ac_try='test -s conftest.$ac_objext'
6243   { (eval echo "$as_me:6243: \"$ac_try\"") >&5
6244   (eval $ac_try) 2>&5
6245   ac_status=$?
6246   echo "$as_me:6246: \$? = $ac_status" >&5
6247   (exit $ac_status); }; }; then
6248   cf_cv_gnu_source=no
6249 else
6250   echo "$as_me: failed program was:" >&5
6251 cat conftest.$ac_ext >&5
6252 cf_save="$CPPFLAGS"
6253          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6254          cat >conftest.$ac_ext <<_ACEOF
6255 #line 6255 "configure"
6256 #include "confdefs.h"
6257 #include <sys/types.h>
6258 int
6259 main ()
6260 {
6261
6262 #ifdef _XOPEN_SOURCE
6263 make an error
6264 #endif
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -f conftest.$ac_objext
6270 if { (eval echo "$as_me:6270: \"$ac_compile\"") >&5
6271   (eval $ac_compile) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); } &&
6275          { ac_try='test -s conftest.$ac_objext'
6276   { (eval echo "$as_me:6276: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:6279: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   cf_cv_gnu_source=no
6282 else
6283   echo "$as_me: failed program was:" >&5
6284 cat conftest.$ac_ext >&5
6285 cf_cv_gnu_source=yes
6286 fi
6287 rm -f conftest.$ac_objext conftest.$ac_ext
6288         CPPFLAGS="$cf_save"
6289
6290 fi
6291 rm -f conftest.$ac_objext conftest.$ac_ext
6292
6293 fi
6294 echo "$as_me:6294: result: $cf_cv_gnu_source" >&5
6295 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6296 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6297
6298         ;;
6299 mirbsd*) #(vi
6300         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6301         ;;
6302 netbsd*) #(vi
6303         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6304         ;;
6305 openbsd*) #(vi
6306         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6307         ;;
6308 osf[45]*) #(vi
6309         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6310         ;;
6311 nto-qnx*) #(vi
6312         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6313         ;;
6314 sco*) #(vi
6315         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6316         ;;
6317 solaris*) #(vi
6318         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6319         ;;
6320 *)
6321         echo "$as_me:6321: checking if we should define _XOPEN_SOURCE" >&5
6322 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6323 if test "${cf_cv_xopen_source+set}" = set; then
6324   echo $ECHO_N "(cached) $ECHO_C" >&6
6325 else
6326
6327         cat >conftest.$ac_ext <<_ACEOF
6328 #line 6328 "configure"
6329 #include "confdefs.h"
6330 #include <sys/types.h>
6331 int
6332 main ()
6333 {
6334
6335 #ifndef _XOPEN_SOURCE
6336 make an error
6337 #endif
6338   ;
6339   return 0;
6340 }
6341 _ACEOF
6342 rm -f conftest.$ac_objext
6343 if { (eval echo "$as_me:6343: \"$ac_compile\"") >&5
6344   (eval $ac_compile) 2>&5
6345   ac_status=$?
6346   echo "$as_me:6346: \$? = $ac_status" >&5
6347   (exit $ac_status); } &&
6348          { ac_try='test -s conftest.$ac_objext'
6349   { (eval echo "$as_me:6349: \"$ac_try\"") >&5
6350   (eval $ac_try) 2>&5
6351   ac_status=$?
6352   echo "$as_me:6352: \$? = $ac_status" >&5
6353   (exit $ac_status); }; }; then
6354   cf_cv_xopen_source=no
6355 else
6356   echo "$as_me: failed program was:" >&5
6357 cat conftest.$ac_ext >&5
6358 cf_save="$CPPFLAGS"
6359          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6360          cat >conftest.$ac_ext <<_ACEOF
6361 #line 6361 "configure"
6362 #include "confdefs.h"
6363 #include <sys/types.h>
6364 int
6365 main ()
6366 {
6367
6368 #ifdef _XOPEN_SOURCE
6369 make an error
6370 #endif
6371   ;
6372   return 0;
6373 }
6374 _ACEOF
6375 rm -f conftest.$ac_objext
6376 if { (eval echo "$as_me:6376: \"$ac_compile\"") >&5
6377   (eval $ac_compile) 2>&5
6378   ac_status=$?
6379   echo "$as_me:6379: \$? = $ac_status" >&5
6380   (exit $ac_status); } &&
6381          { ac_try='test -s conftest.$ac_objext'
6382   { (eval echo "$as_me:6382: \"$ac_try\"") >&5
6383   (eval $ac_try) 2>&5
6384   ac_status=$?
6385   echo "$as_me:6385: \$? = $ac_status" >&5
6386   (exit $ac_status); }; }; then
6387   cf_cv_xopen_source=no
6388 else
6389   echo "$as_me: failed program was:" >&5
6390 cat conftest.$ac_ext >&5
6391 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6392 fi
6393 rm -f conftest.$ac_objext conftest.$ac_ext
6394         CPPFLAGS="$cf_save"
6395
6396 fi
6397 rm -f conftest.$ac_objext conftest.$ac_ext
6398
6399 fi
6400 echo "$as_me:6400: result: $cf_cv_xopen_source" >&5
6401 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6402         if test "$cf_cv_xopen_source" != no ; then
6403
6404 # remove _XOPEN_SOURCE symbol from $CFLAGS
6405 CFLAGS=`echo "$CFLAGS" | \
6406         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6407                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6408
6409 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6410 CPPFLAGS=`echo "$CPPFLAGS" | \
6411         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6412                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6413
6414                 test "$cf_cv_cc_u_d_options" = yes && \
6415                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6416                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6417         fi
6418
6419 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6420
6421 cf_save_CFLAGS="$CFLAGS"
6422 cf_save_CPPFLAGS="$CPPFLAGS"
6423
6424 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6425 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6426         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6427                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6428
6429 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6430 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6431         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6432                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6433
6434 echo "$as_me:6434: checking if we should define _POSIX_C_SOURCE" >&5
6435 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6436 if test "${cf_cv_posix_c_source+set}" = set; then
6437   echo $ECHO_N "(cached) $ECHO_C" >&6
6438 else
6439
6440 echo "${as_me-configure}:6440: testing if the symbol is already defined go no further ..." 1>&5
6441
6442         cat >conftest.$ac_ext <<_ACEOF
6443 #line 6443 "configure"
6444 #include "confdefs.h"
6445 #include <sys/types.h>
6446 int
6447 main ()
6448 {
6449
6450 #ifndef _POSIX_C_SOURCE
6451 make an error
6452 #endif
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 rm -f conftest.$ac_objext
6458 if { (eval echo "$as_me:6458: \"$ac_compile\"") >&5
6459   (eval $ac_compile) 2>&5
6460   ac_status=$?
6461   echo "$as_me:6461: \$? = $ac_status" >&5
6462   (exit $ac_status); } &&
6463          { ac_try='test -s conftest.$ac_objext'
6464   { (eval echo "$as_me:6464: \"$ac_try\"") >&5
6465   (eval $ac_try) 2>&5
6466   ac_status=$?
6467   echo "$as_me:6467: \$? = $ac_status" >&5
6468   (exit $ac_status); }; }; then
6469   cf_cv_posix_c_source=no
6470 else
6471   echo "$as_me: failed program was:" >&5
6472 cat conftest.$ac_ext >&5
6473 cf_want_posix_source=no
6474          case .$cf_POSIX_C_SOURCE in #(vi
6475          .[12]??*) #(vi
6476                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6477                 ;;
6478          .2) #(vi
6479                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6480                 cf_want_posix_source=yes
6481                 ;;
6482          .*)
6483                 cf_want_posix_source=yes
6484                 ;;
6485          esac
6486          if test "$cf_want_posix_source" = yes ; then
6487                 cat >conftest.$ac_ext <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6490 #include <sys/types.h>
6491 int
6492 main ()
6493 {
6494
6495 #ifdef _POSIX_SOURCE
6496 make an error
6497 #endif
6498   ;
6499   return 0;
6500 }
6501 _ACEOF
6502 rm -f conftest.$ac_objext
6503 if { (eval echo "$as_me:6503: \"$ac_compile\"") >&5
6504   (eval $ac_compile) 2>&5
6505   ac_status=$?
6506   echo "$as_me:6506: \$? = $ac_status" >&5
6507   (exit $ac_status); } &&
6508          { ac_try='test -s conftest.$ac_objext'
6509   { (eval echo "$as_me:6509: \"$ac_try\"") >&5
6510   (eval $ac_try) 2>&5
6511   ac_status=$?
6512   echo "$as_me:6512: \$? = $ac_status" >&5
6513   (exit $ac_status); }; }; then
6514   :
6515 else
6516   echo "$as_me: failed program was:" >&5
6517 cat conftest.$ac_ext >&5
6518 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6519 fi
6520 rm -f conftest.$ac_objext conftest.$ac_ext
6521          fi
6522
6523 echo "${as_me-configure}:6523: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6524
6525          CFLAGS="$cf_trim_CFLAGS"
6526          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6527
6528 echo "${as_me-configure}:6528: testing if the second compile does not leave our definition intact error ..." 1>&5
6529
6530          cat >conftest.$ac_ext <<_ACEOF
6531 #line 6531 "configure"
6532 #include "confdefs.h"
6533 #include <sys/types.h>
6534 int
6535 main ()
6536 {
6537
6538 #ifndef _POSIX_C_SOURCE
6539 make an error
6540 #endif
6541   ;
6542   return 0;
6543 }
6544 _ACEOF
6545 rm -f conftest.$ac_objext
6546 if { (eval echo "$as_me:6546: \"$ac_compile\"") >&5
6547   (eval $ac_compile) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); } &&
6551          { ac_try='test -s conftest.$ac_objext'
6552   { (eval echo "$as_me:6552: \"$ac_try\"") >&5
6553   (eval $ac_try) 2>&5
6554   ac_status=$?
6555   echo "$as_me:6555: \$? = $ac_status" >&5
6556   (exit $ac_status); }; }; then
6557   :
6558 else
6559   echo "$as_me: failed program was:" >&5
6560 cat conftest.$ac_ext >&5
6561 cf_cv_posix_c_source=no
6562 fi
6563 rm -f conftest.$ac_objext conftest.$ac_ext
6564          CFLAGS="$cf_save_CFLAGS"
6565          CPPFLAGS="$cf_save_CPPFLAGS"
6566
6567 fi
6568 rm -f conftest.$ac_objext conftest.$ac_ext
6569
6570 fi
6571 echo "$as_me:6571: result: $cf_cv_posix_c_source" >&5
6572 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6573
6574 if test "$cf_cv_posix_c_source" != no ; then
6575         CFLAGS="$cf_trim_CFLAGS"
6576         CPPFLAGS="$cf_trim_CPPFLAGS"
6577         if test "$cf_cv_cc_u_d_options" = yes ; then
6578                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6579                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6580                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6581         fi
6582         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6583 fi
6584
6585         ;;
6586 esac
6587
6588 # Work around breakage on OS X
6589
6590 echo "$as_me:6590: checking if SIGWINCH is defined" >&5
6591 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6592 if test "${cf_cv_define_sigwinch+set}" = set; then
6593   echo $ECHO_N "(cached) $ECHO_C" >&6
6594 else
6595
6596         cat >conftest.$ac_ext <<_ACEOF
6597 #line 6597 "configure"
6598 #include "confdefs.h"
6599
6600 #include <sys/types.h>
6601 #include <sys/signal.h>
6602
6603 int
6604 main ()
6605 {
6606 int x = SIGWINCH
6607   ;
6608   return 0;
6609 }
6610 _ACEOF
6611 rm -f conftest.$ac_objext
6612 if { (eval echo "$as_me:6612: \"$ac_compile\"") >&5
6613   (eval $ac_compile) 2>&5
6614   ac_status=$?
6615   echo "$as_me:6615: \$? = $ac_status" >&5
6616   (exit $ac_status); } &&
6617          { ac_try='test -s conftest.$ac_objext'
6618   { (eval echo "$as_me:6618: \"$ac_try\"") >&5
6619   (eval $ac_try) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit $ac_status); }; }; then
6623   cf_cv_define_sigwinch=yes
6624 else
6625   echo "$as_me: failed program was:" >&5
6626 cat conftest.$ac_ext >&5
6627 cat >conftest.$ac_ext <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630
6631 #undef _XOPEN_SOURCE
6632 #undef _POSIX_SOURCE
6633 #undef _POSIX_C_SOURCE
6634 #include <sys/types.h>
6635 #include <sys/signal.h>
6636
6637 int
6638 main ()
6639 {
6640 int x = SIGWINCH
6641   ;
6642   return 0;
6643 }
6644 _ACEOF
6645 rm -f conftest.$ac_objext
6646 if { (eval echo "$as_me:6646: \"$ac_compile\"") >&5
6647   (eval $ac_compile) 2>&5
6648   ac_status=$?
6649   echo "$as_me:6649: \$? = $ac_status" >&5
6650   (exit $ac_status); } &&
6651          { ac_try='test -s conftest.$ac_objext'
6652   { (eval echo "$as_me:6652: \"$ac_try\"") >&5
6653   (eval $ac_try) 2>&5
6654   ac_status=$?
6655   echo "$as_me:6655: \$? = $ac_status" >&5
6656   (exit $ac_status); }; }; then
6657   cf_cv_define_sigwinch=maybe
6658 else
6659   echo "$as_me: failed program was:" >&5
6660 cat conftest.$ac_ext >&5
6661 cf_cv_define_sigwinch=no
6662 fi
6663 rm -f conftest.$ac_objext conftest.$ac_ext
6664
6665 fi
6666 rm -f conftest.$ac_objext conftest.$ac_ext
6667
6668 fi
6669 echo "$as_me:6669: result: $cf_cv_define_sigwinch" >&5
6670 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6671
6672 if test "$cf_cv_define_sigwinch" = maybe ; then
6673 echo "$as_me:6673: checking for actual SIGWINCH definition" >&5
6674 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6675 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6676   echo $ECHO_N "(cached) $ECHO_C" >&6
6677 else
6678
6679 cf_cv_fixup_sigwinch=unknown
6680 cf_sigwinch=32
6681 while test $cf_sigwinch != 1
6682 do
6683         cat >conftest.$ac_ext <<_ACEOF
6684 #line 6684 "configure"
6685 #include "confdefs.h"
6686
6687 #undef _XOPEN_SOURCE
6688 #undef _POSIX_SOURCE
6689 #undef _POSIX_C_SOURCE
6690 #include <sys/types.h>
6691 #include <sys/signal.h>
6692
6693 int
6694 main ()
6695 {
6696
6697 #if SIGWINCH != $cf_sigwinch
6698 make an error
6699 #endif
6700 int x = SIGWINCH
6701   ;
6702   return 0;
6703 }
6704 _ACEOF
6705 rm -f conftest.$ac_objext
6706 if { (eval echo "$as_me:6706: \"$ac_compile\"") >&5
6707   (eval $ac_compile) 2>&5
6708   ac_status=$?
6709   echo "$as_me:6709: \$? = $ac_status" >&5
6710   (exit $ac_status); } &&
6711          { ac_try='test -s conftest.$ac_objext'
6712   { (eval echo "$as_me:6712: \"$ac_try\"") >&5
6713   (eval $ac_try) 2>&5
6714   ac_status=$?
6715   echo "$as_me:6715: \$? = $ac_status" >&5
6716   (exit $ac_status); }; }; then
6717   cf_cv_fixup_sigwinch=$cf_sigwinch
6718          break
6719 else
6720   echo "$as_me: failed program was:" >&5
6721 cat conftest.$ac_ext >&5
6722 fi
6723 rm -f conftest.$ac_objext conftest.$ac_ext
6724
6725 cf_sigwinch=`expr $cf_sigwinch - 1`
6726 done
6727
6728 fi
6729 echo "$as_me:6729: result: $cf_cv_fixup_sigwinch" >&5
6730 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6731
6732         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6733                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6734         fi
6735 fi
6736
6737 # Checks for CODESET support.
6738
6739   echo "$as_me:6739: checking for nl_langinfo and CODESET" >&5
6740 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6741 if test "${am_cv_langinfo_codeset+set}" = set; then
6742   echo $ECHO_N "(cached) $ECHO_C" >&6
6743 else
6744   cat >conftest.$ac_ext <<_ACEOF
6745 #line 6745 "configure"
6746 #include "confdefs.h"
6747 #include <langinfo.h>
6748 int
6749 main ()
6750 {
6751 char* cs = nl_langinfo(CODESET);
6752   ;
6753   return 0;
6754 }
6755 _ACEOF
6756 rm -f conftest.$ac_objext conftest$ac_exeext
6757 if { (eval echo "$as_me:6757: \"$ac_link\"") >&5
6758   (eval $ac_link) 2>&5
6759   ac_status=$?
6760   echo "$as_me:6760: \$? = $ac_status" >&5
6761   (exit $ac_status); } &&
6762          { ac_try='test -s conftest$ac_exeext'
6763   { (eval echo "$as_me:6763: \"$ac_try\"") >&5
6764   (eval $ac_try) 2>&5
6765   ac_status=$?
6766   echo "$as_me:6766: \$? = $ac_status" >&5
6767   (exit $ac_status); }; }; then
6768   am_cv_langinfo_codeset=yes
6769 else
6770   echo "$as_me: failed program was:" >&5
6771 cat conftest.$ac_ext >&5
6772 am_cv_langinfo_codeset=no
6773 fi
6774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6775
6776 fi
6777 echo "$as_me:6777: result: $am_cv_langinfo_codeset" >&5
6778 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6779   if test $am_cv_langinfo_codeset = yes; then
6780
6781 cat >>confdefs.h <<\EOF
6782 #define HAVE_LANGINFO_CODESET 1
6783 EOF
6784
6785   fi
6786
6787 # use these variables to work around a defect in gcc's fixincludes.
6788 NCURSES_OK_WCHAR_T=
6789 NCURSES_OK_WINT_T=
6790
6791 echo "$as_me:6791: checking if you want wide-character code" >&5
6792 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6793
6794 # Check whether --enable-widec or --disable-widec was given.
6795 if test "${enable_widec+set}" = set; then
6796   enableval="$enable_widec"
6797   with_widec=$enableval
6798 else
6799   with_widec=no
6800 fi;
6801 echo "$as_me:6801: result: $with_widec" >&5
6802 echo "${ECHO_T}$with_widec" >&6
6803 if test "$with_widec" = yes ; then
6804         LIB_SUFFIX="w${LIB_SUFFIX}"
6805         cat >>confdefs.h <<\EOF
6806 #define USE_WIDEC_SUPPORT 1
6807 EOF
6808
6809 echo "$as_me:6809: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6810 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6811 cat >conftest.$ac_ext <<_ACEOF
6812 #line 6812 "configure"
6813 #include "confdefs.h"
6814 #include <sys/types.h>
6815
6816 int
6817 main ()
6818 {
6819
6820 #ifndef _XOPEN_SOURCE_EXTENDED
6821 make an error
6822 #endif
6823   ;
6824   return 0;
6825 }
6826 _ACEOF
6827 rm -f conftest.$ac_objext
6828 if { (eval echo "$as_me:6828: \"$ac_compile\"") >&5
6829   (eval $ac_compile) 2>&5
6830   ac_status=$?
6831   echo "$as_me:6831: \$? = $ac_status" >&5
6832   (exit $ac_status); } &&
6833          { ac_try='test -s conftest.$ac_objext'
6834   { (eval echo "$as_me:6834: \"$ac_try\"") >&5
6835   (eval $ac_try) 2>&5
6836   ac_status=$?
6837   echo "$as_me:6837: \$? = $ac_status" >&5
6838   (exit $ac_status); }; }; then
6839   cf_result=no
6840 else
6841   echo "$as_me: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6843 cf_result=yes
6844 fi
6845 rm -f conftest.$ac_objext conftest.$ac_ext
6846 echo "$as_me:6846: result: $cf_result" >&5
6847 echo "${ECHO_T}$cf_result" >&6
6848
6849 if test "$cf_result" = yes ; then
6850         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6851 elif test "x" != "x" ; then
6852         echo "$as_me:6852: checking checking for compatible value versus " >&5
6853 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6854         cat >conftest.$ac_ext <<_ACEOF
6855 #line 6855 "configure"
6856 #include "confdefs.h"
6857 #include <sys/types.h>
6858
6859 int
6860 main ()
6861 {
6862
6863 #if _XOPEN_SOURCE_EXTENDED- < 0
6864 make an error
6865 #endif
6866   ;
6867   return 0;
6868 }
6869 _ACEOF
6870 rm -f conftest.$ac_objext
6871 if { (eval echo "$as_me:6871: \"$ac_compile\"") >&5
6872   (eval $ac_compile) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); } &&
6876          { ac_try='test -s conftest.$ac_objext'
6877   { (eval echo "$as_me:6877: \"$ac_try\"") >&5
6878   (eval $ac_try) 2>&5
6879   ac_status=$?
6880   echo "$as_me:6880: \$? = $ac_status" >&5
6881   (exit $ac_status); }; }; then
6882   cf_result=yes
6883 else
6884   echo "$as_me: failed program was:" >&5
6885 cat conftest.$ac_ext >&5
6886 cf_result=no
6887 fi
6888 rm -f conftest.$ac_objext conftest.$ac_ext
6889         echo "$as_me:6889: result: $cf_result" >&5
6890 echo "${ECHO_T}$cf_result" >&6
6891         if test "$cf_result" = no ; then
6892                 # perhaps we can override it - try...
6893                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6894         fi
6895 fi
6896
6897         # with_overwrite=no
6898         NCURSES_CH_T=cchar_t
6899
6900 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6901 do
6902 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6903 echo "$as_me:6903: checking for $ac_func" >&5
6904 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6905 if eval "test \"\${$as_ac_var+set}\" = set"; then
6906   echo $ECHO_N "(cached) $ECHO_C" >&6
6907 else
6908   cat >conftest.$ac_ext <<_ACEOF
6909 #line 6909 "configure"
6910 #include "confdefs.h"
6911 /* System header to define __stub macros and hopefully few prototypes,
6912     which can conflict with char $ac_func (); below.  */
6913 #include <assert.h>
6914 /* Override any gcc2 internal prototype to avoid an error.  */
6915 #ifdef __cplusplus
6916 extern "C"
6917 #endif
6918 /* We use char because int might match the return type of a gcc2
6919    builtin and then its argument prototype would still apply.  */
6920 char $ac_func ();
6921 char (*f) ();
6922
6923 int
6924 main ()
6925 {
6926 /* The GNU C library defines this for functions which it implements
6927     to always fail with ENOSYS.  Some functions are actually named
6928     something starting with __ and the normal name is an alias.  */
6929 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6930 choke me
6931 #else
6932 f = $ac_func;
6933 #endif
6934
6935   ;
6936   return 0;
6937 }
6938 _ACEOF
6939 rm -f conftest.$ac_objext conftest$ac_exeext
6940 if { (eval echo "$as_me:6940: \"$ac_link\"") >&5
6941   (eval $ac_link) 2>&5
6942   ac_status=$?
6943   echo "$as_me:6943: \$? = $ac_status" >&5
6944   (exit $ac_status); } &&
6945          { ac_try='test -s conftest$ac_exeext'
6946   { (eval echo "$as_me:6946: \"$ac_try\"") >&5
6947   (eval $ac_try) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit $ac_status); }; }; then
6951   eval "$as_ac_var=yes"
6952 else
6953   echo "$as_me: failed program was:" >&5
6954 cat conftest.$ac_ext >&5
6955 eval "$as_ac_var=no"
6956 fi
6957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6958 fi
6959 echo "$as_me:6959: result: `eval echo '${'$as_ac_var'}'`" >&5
6960 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6961 if test `eval echo '${'$as_ac_var'}'` = yes; then
6962   cat >>confdefs.h <<EOF
6963 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6964 EOF
6965
6966 fi
6967 done
6968
6969         if test "$ac_cv_func_putwc" != yes ; then
6970
6971 echo "$as_me:6971: checking for putwc in libutf8" >&5
6972 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6973 if test "${cf_cv_libutf8+set}" = set; then
6974   echo $ECHO_N "(cached) $ECHO_C" >&6
6975 else
6976
6977         cf_save_LIBS="$LIBS"
6978         LIBS="-lutf8 $LIBS"
6979 cat >conftest.$ac_ext <<_ACEOF
6980 #line 6980 "configure"
6981 #include "confdefs.h"
6982
6983 #include <libutf8.h>
6984 int
6985 main ()
6986 {
6987 putwc(0,0);
6988   ;
6989   return 0;
6990 }
6991 _ACEOF
6992 rm -f conftest.$ac_objext conftest$ac_exeext
6993 if { (eval echo "$as_me:6993: \"$ac_link\"") >&5
6994   (eval $ac_link) 2>&5
6995   ac_status=$?
6996   echo "$as_me:6996: \$? = $ac_status" >&5
6997   (exit $ac_status); } &&
6998          { ac_try='test -s conftest$ac_exeext'
6999   { (eval echo "$as_me:6999: \"$ac_try\"") >&5
7000   (eval $ac_try) 2>&5
7001   ac_status=$?
7002   echo "$as_me:7002: \$? = $ac_status" >&5
7003   (exit $ac_status); }; }; then
7004   cf_cv_libutf8=yes
7005 else
7006   echo "$as_me: failed program was:" >&5
7007 cat conftest.$ac_ext >&5
7008 cf_cv_libutf8=no
7009 fi
7010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7011         LIBS="$cf_save_LIBS"
7012
7013 fi
7014 echo "$as_me:7014: result: $cf_cv_libutf8" >&5
7015 echo "${ECHO_T}$cf_cv_libutf8" >&6
7016
7017 if test "$cf_cv_libutf8" = yes ; then
7018         cat >>confdefs.h <<\EOF
7019 #define HAVE_LIBUTF8_H 1
7020 EOF
7021
7022         LIBS="-lutf8 $LIBS"
7023 fi
7024
7025                 if test "$cf_cv_libutf8" = yes ; then
7026                         NCURSES_LIBUTF8=1
7027                 fi
7028         fi
7029
7030 # This is needed on Tru64 5.0 to declare mbstate_t
7031 echo "$as_me:7031: checking if we must include wchar.h to declare mbstate_t" >&5
7032 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7033 if test "${cf_cv_mbstate_t+set}" = set; then
7034   echo $ECHO_N "(cached) $ECHO_C" >&6
7035 else
7036
7037 cat >conftest.$ac_ext <<_ACEOF
7038 #line 7038 "configure"
7039 #include "confdefs.h"
7040
7041 #include <stdlib.h>
7042 #include <stdarg.h>
7043 #include <stdio.h>
7044 #ifdef HAVE_LIBUTF8_H
7045 #include <libutf8.h>
7046 #endif
7047 int
7048 main ()
7049 {
7050 mbstate_t state
7051   ;
7052   return 0;
7053 }
7054 _ACEOF
7055 rm -f conftest.$ac_objext
7056 if { (eval echo "$as_me:7056: \"$ac_compile\"") >&5
7057   (eval $ac_compile) 2>&5
7058   ac_status=$?
7059   echo "$as_me:7059: \$? = $ac_status" >&5
7060   (exit $ac_status); } &&
7061          { ac_try='test -s conftest.$ac_objext'
7062   { (eval echo "$as_me:7062: \"$ac_try\"") >&5
7063   (eval $ac_try) 2>&5
7064   ac_status=$?
7065   echo "$as_me:7065: \$? = $ac_status" >&5
7066   (exit $ac_status); }; }; then
7067   cf_cv_mbstate_t=no
7068 else
7069   echo "$as_me: failed program was:" >&5
7070 cat conftest.$ac_ext >&5
7071 cat >conftest.$ac_ext <<_ACEOF
7072 #line 7072 "configure"
7073 #include "confdefs.h"
7074
7075 #include <stdlib.h>
7076 #include <stdarg.h>
7077 #include <stdio.h>
7078 #include <wchar.h>
7079 #ifdef HAVE_LIBUTF8_H
7080 #include <libutf8.h>
7081 #endif
7082 int
7083 main ()
7084 {
7085 mbstate_t value
7086   ;
7087   return 0;
7088 }
7089 _ACEOF
7090 rm -f conftest.$ac_objext
7091 if { (eval echo "$as_me:7091: \"$ac_compile\"") >&5
7092   (eval $ac_compile) 2>&5
7093   ac_status=$?
7094   echo "$as_me:7094: \$? = $ac_status" >&5
7095   (exit $ac_status); } &&
7096          { ac_try='test -s conftest.$ac_objext'
7097   { (eval echo "$as_me:7097: \"$ac_try\"") >&5
7098   (eval $ac_try) 2>&5
7099   ac_status=$?
7100   echo "$as_me:7100: \$? = $ac_status" >&5
7101   (exit $ac_status); }; }; then
7102   cf_cv_mbstate_t=yes
7103 else
7104   echo "$as_me: failed program was:" >&5
7105 cat conftest.$ac_ext >&5
7106 cf_cv_mbstate_t=unknown
7107 fi
7108 rm -f conftest.$ac_objext conftest.$ac_ext
7109 fi
7110 rm -f conftest.$ac_objext conftest.$ac_ext
7111 fi
7112 echo "$as_me:7112: result: $cf_cv_mbstate_t" >&5
7113 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7114
7115 if test "$cf_cv_mbstate_t" = yes ; then
7116         cat >>confdefs.h <<\EOF
7117 #define NEED_WCHAR_H 1
7118 EOF
7119
7120         NEED_WCHAR_H=1
7121 fi
7122
7123 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7124 if test "$cf_cv_mbstate_t" = unknown ; then
7125         NCURSES_MBSTATE_T=1
7126 fi
7127
7128 # This is needed on Tru64 5.0 to declare wchar_t
7129 echo "$as_me:7129: checking if we must include wchar.h to declare wchar_t" >&5
7130 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7131 if test "${cf_cv_wchar_t+set}" = set; then
7132   echo $ECHO_N "(cached) $ECHO_C" >&6
7133 else
7134
7135 cat >conftest.$ac_ext <<_ACEOF
7136 #line 7136 "configure"
7137 #include "confdefs.h"
7138
7139 #include <stdlib.h>
7140 #include <stdarg.h>
7141 #include <stdio.h>
7142 #ifdef HAVE_LIBUTF8_H
7143 #include <libutf8.h>
7144 #endif
7145 int
7146 main ()
7147 {
7148 wchar_t state
7149   ;
7150   return 0;
7151 }
7152 _ACEOF
7153 rm -f conftest.$ac_objext
7154 if { (eval echo "$as_me:7154: \"$ac_compile\"") >&5
7155   (eval $ac_compile) 2>&5
7156   ac_status=$?
7157   echo "$as_me:7157: \$? = $ac_status" >&5
7158   (exit $ac_status); } &&
7159          { ac_try='test -s conftest.$ac_objext'
7160   { (eval echo "$as_me:7160: \"$ac_try\"") >&5
7161   (eval $ac_try) 2>&5
7162   ac_status=$?
7163   echo "$as_me:7163: \$? = $ac_status" >&5
7164   (exit $ac_status); }; }; then
7165   cf_cv_wchar_t=no
7166 else
7167   echo "$as_me: failed program was:" >&5
7168 cat conftest.$ac_ext >&5
7169 cat >conftest.$ac_ext <<_ACEOF
7170 #line 7170 "configure"
7171 #include "confdefs.h"
7172
7173 #include <stdlib.h>
7174 #include <stdarg.h>
7175 #include <stdio.h>
7176 #include <wchar.h>
7177 #ifdef HAVE_LIBUTF8_H
7178 #include <libutf8.h>
7179 #endif
7180 int
7181 main ()
7182 {
7183 wchar_t value
7184   ;
7185   return 0;
7186 }
7187 _ACEOF
7188 rm -f conftest.$ac_objext
7189 if { (eval echo "$as_me:7189: \"$ac_compile\"") >&5
7190   (eval $ac_compile) 2>&5
7191   ac_status=$?
7192   echo "$as_me:7192: \$? = $ac_status" >&5
7193   (exit $ac_status); } &&
7194          { ac_try='test -s conftest.$ac_objext'
7195   { (eval echo "$as_me:7195: \"$ac_try\"") >&5
7196   (eval $ac_try) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit $ac_status); }; }; then
7200   cf_cv_wchar_t=yes
7201 else
7202   echo "$as_me: failed program was:" >&5
7203 cat conftest.$ac_ext >&5
7204 cf_cv_wchar_t=unknown
7205 fi
7206 rm -f conftest.$ac_objext conftest.$ac_ext
7207 fi
7208 rm -f conftest.$ac_objext conftest.$ac_ext
7209 fi
7210 echo "$as_me:7210: result: $cf_cv_wchar_t" >&5
7211 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7212
7213 if test "$cf_cv_wchar_t" = yes ; then
7214         cat >>confdefs.h <<\EOF
7215 #define NEED_WCHAR_H 1
7216 EOF
7217
7218         NEED_WCHAR_H=1
7219 fi
7220
7221 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7222 if test "$cf_cv_wchar_t" = unknown ; then
7223         NCURSES_WCHAR_T=1
7224 fi
7225
7226 # if we find wchar_t in either place, use substitution to provide a fallback.
7227 if test "$cf_cv_wchar_t" != unknown ; then
7228         NCURSES_OK_WCHAR_T=1
7229 fi
7230
7231 # This is needed on Tru64 5.0 to declare wint_t
7232 echo "$as_me:7232: checking if we must include wchar.h to declare wint_t" >&5
7233 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7234 if test "${cf_cv_wint_t+set}" = set; then
7235   echo $ECHO_N "(cached) $ECHO_C" >&6
7236 else
7237
7238 cat >conftest.$ac_ext <<_ACEOF
7239 #line 7239 "configure"
7240 #include "confdefs.h"
7241
7242 #include <stdlib.h>
7243 #include <stdarg.h>
7244 #include <stdio.h>
7245 #ifdef HAVE_LIBUTF8_H
7246 #include <libutf8.h>
7247 #endif
7248 int
7249 main ()
7250 {
7251 wint_t state
7252   ;
7253   return 0;
7254 }
7255 _ACEOF
7256 rm -f conftest.$ac_objext
7257 if { (eval echo "$as_me:7257: \"$ac_compile\"") >&5
7258   (eval $ac_compile) 2>&5
7259   ac_status=$?
7260   echo "$as_me:7260: \$? = $ac_status" >&5
7261   (exit $ac_status); } &&
7262          { ac_try='test -s conftest.$ac_objext'
7263   { (eval echo "$as_me:7263: \"$ac_try\"") >&5
7264   (eval $ac_try) 2>&5
7265   ac_status=$?
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); }; }; then
7268   cf_cv_wint_t=no
7269 else
7270   echo "$as_me: failed program was:" >&5
7271 cat conftest.$ac_ext >&5
7272 cat >conftest.$ac_ext <<_ACEOF
7273 #line 7273 "configure"
7274 #include "confdefs.h"
7275
7276 #include <stdlib.h>
7277 #include <stdarg.h>
7278 #include <stdio.h>
7279 #include <wchar.h>
7280 #ifdef HAVE_LIBUTF8_H
7281 #include <libutf8.h>
7282 #endif
7283 int
7284 main ()
7285 {
7286 wint_t value
7287   ;
7288   return 0;
7289 }
7290 _ACEOF
7291 rm -f conftest.$ac_objext
7292 if { (eval echo "$as_me:7292: \"$ac_compile\"") >&5
7293   (eval $ac_compile) 2>&5
7294   ac_status=$?
7295   echo "$as_me:7295: \$? = $ac_status" >&5
7296   (exit $ac_status); } &&
7297          { ac_try='test -s conftest.$ac_objext'
7298   { (eval echo "$as_me:7298: \"$ac_try\"") >&5
7299   (eval $ac_try) 2>&5
7300   ac_status=$?
7301   echo "$as_me:7301: \$? = $ac_status" >&5
7302   (exit $ac_status); }; }; then
7303   cf_cv_wint_t=yes
7304 else
7305   echo "$as_me: failed program was:" >&5
7306 cat conftest.$ac_ext >&5
7307 cf_cv_wint_t=unknown
7308 fi
7309 rm -f conftest.$ac_objext conftest.$ac_ext
7310 fi
7311 rm -f conftest.$ac_objext conftest.$ac_ext
7312 fi
7313 echo "$as_me:7313: result: $cf_cv_wint_t" >&5
7314 echo "${ECHO_T}$cf_cv_wint_t" >&6
7315
7316 if test "$cf_cv_wint_t" = yes ; then
7317         cat >>confdefs.h <<\EOF
7318 #define NEED_WCHAR_H 1
7319 EOF
7320
7321         NEED_WCHAR_H=1
7322 fi
7323
7324 # if we do not find wint_t in either place, use substitution to provide a fallback.
7325 if test "$cf_cv_wint_t" = unknown ; then
7326         NCURSES_WINT_T=1
7327 fi
7328
7329 # if we find wint_t in either place, use substitution to provide a fallback.
7330 if test "$cf_cv_wint_t" != unknown ; then
7331         NCURSES_OK_WINT_T=1
7332 fi
7333
7334         if test "$NCURSES_MBSTATE_T" != 0; then
7335                 cat >>confdefs.h <<\EOF
7336 #define NEED_MBSTATE_T_DEF 1
7337 EOF
7338
7339         fi
7340 fi
7341
7342 ###   use option --disable-lp64 to allow long chtype
7343 case $cf_cv_abi_version in
7344 [345]*)
7345         default_with_lp64=no
7346         ;;
7347 *)
7348         default_with_lp64=yes
7349         ;;
7350 esac
7351
7352 echo "$as_me:7352: checking whether to enable _LP64 definition in curses.h" >&5
7353 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7354
7355 # Check whether --enable-lp64 or --disable-lp64 was given.
7356 if test "${enable_lp64+set}" = set; then
7357   enableval="$enable_lp64"
7358   with_lp64=$enableval
7359 else
7360   with_lp64=$default_with_lp64
7361 fi;
7362 echo "$as_me:7362: result: $with_lp64" >&5
7363 echo "${ECHO_T}$with_lp64" >&6
7364
7365 if test "$with_lp64" = yes ; then
7366         cf_cv_enable_lp64=1
7367 else
7368         cf_cv_enable_lp64=0
7369 fi
7370
7371 # Check whether --enable-largefile or --disable-largefile was given.
7372 if test "${enable_largefile+set}" = set; then
7373   enableval="$enable_largefile"
7374
7375 fi;
7376 if test "$enable_largefile" != no; then
7377
7378   echo "$as_me:7378: checking for special C compiler options needed for large files" >&5
7379 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7380 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7381   echo $ECHO_N "(cached) $ECHO_C" >&6
7382 else
7383   ac_cv_sys_largefile_CC=no
7384      if test "$GCC" != yes; then
7385        ac_save_CC=$CC
7386        while :; do
7387          # IRIX 6.2 and later do not support large files by default,
7388          # so use the C compiler's -n32 option if that helps.
7389          cat >conftest.$ac_ext <<_ACEOF
7390 #line 7390 "configure"
7391 #include "confdefs.h"
7392 #include <sys/types.h>
7393  /* Check that off_t can represent 2**63 - 1 correctly.
7394     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7395     since some C++ compilers masquerading as C compilers
7396     incorrectly reject 9223372036854775807.  */
7397 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7398   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7399                        && LARGE_OFF_T % 2147483647 == 1)
7400                       ? 1 : -1];
7401 int
7402 main ()
7403 {
7404
7405   ;
7406   return 0;
7407 }
7408 _ACEOF
7409          rm -f conftest.$ac_objext
7410 if { (eval echo "$as_me:7410: \"$ac_compile\"") >&5
7411   (eval $ac_compile) 2>&5
7412   ac_status=$?
7413   echo "$as_me:7413: \$? = $ac_status" >&5
7414   (exit $ac_status); } &&
7415          { ac_try='test -s conftest.$ac_objext'
7416   { (eval echo "$as_me:7416: \"$ac_try\"") >&5
7417   (eval $ac_try) 2>&5
7418   ac_status=$?
7419   echo "$as_me:7419: \$? = $ac_status" >&5
7420   (exit $ac_status); }; }; then
7421   break
7422 else
7423   echo "$as_me: failed program was:" >&5
7424 cat conftest.$ac_ext >&5
7425 fi
7426 rm -f conftest.$ac_objext
7427          CC="$CC -n32"
7428          rm -f conftest.$ac_objext
7429 if { (eval echo "$as_me:7429: \"$ac_compile\"") >&5
7430   (eval $ac_compile) 2>&5
7431   ac_status=$?
7432   echo "$as_me:7432: \$? = $ac_status" >&5
7433   (exit $ac_status); } &&
7434          { ac_try='test -s conftest.$ac_objext'
7435   { (eval echo "$as_me:7435: \"$ac_try\"") >&5
7436   (eval $ac_try) 2>&5
7437   ac_status=$?
7438   echo "$as_me:7438: \$? = $ac_status" >&5
7439   (exit $ac_status); }; }; then
7440   ac_cv_sys_largefile_CC=' -n32'; break
7441 else
7442   echo "$as_me: failed program was:" >&5
7443 cat conftest.$ac_ext >&5
7444 fi
7445 rm -f conftest.$ac_objext
7446          break
7447        done
7448        CC=$ac_save_CC
7449        rm -f conftest.$ac_ext
7450     fi
7451 fi
7452 echo "$as_me:7452: result: $ac_cv_sys_largefile_CC" >&5
7453 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7454   if test "$ac_cv_sys_largefile_CC" != no; then
7455     CC=$CC$ac_cv_sys_largefile_CC
7456   fi
7457
7458   echo "$as_me:7458: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7459 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7460 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463   while :; do
7464   ac_cv_sys_file_offset_bits=no
7465   cat >conftest.$ac_ext <<_ACEOF
7466 #line 7466 "configure"
7467 #include "confdefs.h"
7468 #include <sys/types.h>
7469  /* Check that off_t can represent 2**63 - 1 correctly.
7470     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7471     since some C++ compilers masquerading as C compilers
7472     incorrectly reject 9223372036854775807.  */
7473 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7474   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7475                        && LARGE_OFF_T % 2147483647 == 1)
7476                       ? 1 : -1];
7477 int
7478 main ()
7479 {
7480
7481   ;
7482   return 0;
7483 }
7484 _ACEOF
7485 rm -f conftest.$ac_objext
7486 if { (eval echo "$as_me:7486: \"$ac_compile\"") >&5
7487   (eval $ac_compile) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit $ac_status); } &&
7491          { ac_try='test -s conftest.$ac_objext'
7492   { (eval echo "$as_me:7492: \"$ac_try\"") >&5
7493   (eval $ac_try) 2>&5
7494   ac_status=$?
7495   echo "$as_me:7495: \$? = $ac_status" >&5
7496   (exit $ac_status); }; }; then
7497   break
7498 else
7499   echo "$as_me: failed program was:" >&5
7500 cat conftest.$ac_ext >&5
7501 fi
7502 rm -f conftest.$ac_objext conftest.$ac_ext
7503   cat >conftest.$ac_ext <<_ACEOF
7504 #line 7504 "configure"
7505 #include "confdefs.h"
7506 #define _FILE_OFFSET_BITS 64
7507 #include <sys/types.h>
7508  /* Check that off_t can represent 2**63 - 1 correctly.
7509     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7510     since some C++ compilers masquerading as C compilers
7511     incorrectly reject 9223372036854775807.  */
7512 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7513   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7514                        && LARGE_OFF_T % 2147483647 == 1)
7515                       ? 1 : -1];
7516 int
7517 main ()
7518 {
7519
7520   ;
7521   return 0;
7522 }
7523 _ACEOF
7524 rm -f conftest.$ac_objext
7525 if { (eval echo "$as_me:7525: \"$ac_compile\"") >&5
7526   (eval $ac_compile) 2>&5
7527   ac_status=$?
7528   echo "$as_me:7528: \$? = $ac_status" >&5
7529   (exit $ac_status); } &&
7530          { ac_try='test -s conftest.$ac_objext'
7531   { (eval echo "$as_me:7531: \"$ac_try\"") >&5
7532   (eval $ac_try) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); }; }; then
7536   ac_cv_sys_file_offset_bits=64; break
7537 else
7538   echo "$as_me: failed program was:" >&5
7539 cat conftest.$ac_ext >&5
7540 fi
7541 rm -f conftest.$ac_objext conftest.$ac_ext
7542   break
7543 done
7544 fi
7545 echo "$as_me:7545: result: $ac_cv_sys_file_offset_bits" >&5
7546 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7547 if test "$ac_cv_sys_file_offset_bits" != no; then
7548
7549 cat >>confdefs.h <<EOF
7550 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7551 EOF
7552
7553 fi
7554 rm -f conftest*
7555   echo "$as_me:7555: checking for _LARGE_FILES value needed for large files" >&5
7556 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7557 if test "${ac_cv_sys_large_files+set}" = set; then
7558   echo $ECHO_N "(cached) $ECHO_C" >&6
7559 else
7560   while :; do
7561   ac_cv_sys_large_files=no
7562   cat >conftest.$ac_ext <<_ACEOF
7563 #line 7563 "configure"
7564 #include "confdefs.h"
7565 #include <sys/types.h>
7566  /* Check that off_t can represent 2**63 - 1 correctly.
7567     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7568     since some C++ compilers masquerading as C compilers
7569     incorrectly reject 9223372036854775807.  */
7570 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7571   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7572                        && LARGE_OFF_T % 2147483647 == 1)
7573                       ? 1 : -1];
7574 int
7575 main ()
7576 {
7577
7578   ;
7579   return 0;
7580 }
7581 _ACEOF
7582 rm -f conftest.$ac_objext
7583 if { (eval echo "$as_me:7583: \"$ac_compile\"") >&5
7584   (eval $ac_compile) 2>&5
7585   ac_status=$?
7586   echo "$as_me:7586: \$? = $ac_status" >&5
7587   (exit $ac_status); } &&
7588          { ac_try='test -s conftest.$ac_objext'
7589   { (eval echo "$as_me:7589: \"$ac_try\"") >&5
7590   (eval $ac_try) 2>&5
7591   ac_status=$?
7592   echo "$as_me:7592: \$? = $ac_status" >&5
7593   (exit $ac_status); }; }; then
7594   break
7595 else
7596   echo "$as_me: failed program was:" >&5
7597 cat conftest.$ac_ext >&5
7598 fi
7599 rm -f conftest.$ac_objext conftest.$ac_ext
7600   cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #define _LARGE_FILES 1
7604 #include <sys/types.h>
7605  /* Check that off_t can represent 2**63 - 1 correctly.
7606     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7607     since some C++ compilers masquerading as C compilers
7608     incorrectly reject 9223372036854775807.  */
7609 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7610   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7611                        && LARGE_OFF_T % 2147483647 == 1)
7612                       ? 1 : -1];
7613 int
7614 main ()
7615 {
7616
7617   ;
7618   return 0;
7619 }
7620 _ACEOF
7621 rm -f conftest.$ac_objext
7622 if { (eval echo "$as_me:7622: \"$ac_compile\"") >&5
7623   (eval $ac_compile) 2>&5
7624   ac_status=$?
7625   echo "$as_me:7625: \$? = $ac_status" >&5
7626   (exit $ac_status); } &&
7627          { ac_try='test -s conftest.$ac_objext'
7628   { (eval echo "$as_me:7628: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:7631: \$? = $ac_status" >&5
7632   (exit $ac_status); }; }; then
7633   ac_cv_sys_large_files=1; break
7634 else
7635   echo "$as_me: failed program was:" >&5
7636 cat conftest.$ac_ext >&5
7637 fi
7638 rm -f conftest.$ac_objext conftest.$ac_ext
7639   break
7640 done
7641 fi
7642 echo "$as_me:7642: result: $ac_cv_sys_large_files" >&5
7643 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7644 if test "$ac_cv_sys_large_files" != no; then
7645
7646 cat >>confdefs.h <<EOF
7647 #define _LARGE_FILES $ac_cv_sys_large_files
7648 EOF
7649
7650 fi
7651 rm -f conftest*
7652 fi
7653
7654     if test "$enable_largefile" != no ; then
7655         echo "$as_me:7655: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7656 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7657 if test "${ac_cv_sys_largefile_source+set}" = set; then
7658   echo $ECHO_N "(cached) $ECHO_C" >&6
7659 else
7660   while :; do
7661   ac_cv_sys_largefile_source=no
7662   cat >conftest.$ac_ext <<_ACEOF
7663 #line 7663 "configure"
7664 #include "confdefs.h"
7665 #include <stdio.h>
7666 int
7667 main ()
7668 {
7669 return !fseeko;
7670   ;
7671   return 0;
7672 }
7673 _ACEOF
7674 rm -f conftest.$ac_objext
7675 if { (eval echo "$as_me:7675: \"$ac_compile\"") >&5
7676   (eval $ac_compile) 2>&5
7677   ac_status=$?
7678   echo "$as_me:7678: \$? = $ac_status" >&5
7679   (exit $ac_status); } &&
7680          { ac_try='test -s conftest.$ac_objext'
7681   { (eval echo "$as_me:7681: \"$ac_try\"") >&5
7682   (eval $ac_try) 2>&5
7683   ac_status=$?
7684   echo "$as_me:7684: \$? = $ac_status" >&5
7685   (exit $ac_status); }; }; then
7686   break
7687 else
7688   echo "$as_me: failed program was:" >&5
7689 cat conftest.$ac_ext >&5
7690 fi
7691 rm -f conftest.$ac_objext conftest.$ac_ext
7692   cat >conftest.$ac_ext <<_ACEOF
7693 #line 7693 "configure"
7694 #include "confdefs.h"
7695 #define _LARGEFILE_SOURCE 1
7696 #include <stdio.h>
7697 int
7698 main ()
7699 {
7700 return !fseeko;
7701   ;
7702   return 0;
7703 }
7704 _ACEOF
7705 rm -f conftest.$ac_objext
7706 if { (eval echo "$as_me:7706: \"$ac_compile\"") >&5
7707   (eval $ac_compile) 2>&5
7708   ac_status=$?
7709   echo "$as_me:7709: \$? = $ac_status" >&5
7710   (exit $ac_status); } &&
7711          { ac_try='test -s conftest.$ac_objext'
7712   { (eval echo "$as_me:7712: \"$ac_try\"") >&5
7713   (eval $ac_try) 2>&5
7714   ac_status=$?
7715   echo "$as_me:7715: \$? = $ac_status" >&5
7716   (exit $ac_status); }; }; then
7717   ac_cv_sys_largefile_source=1; break
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 cat conftest.$ac_ext >&5
7721 fi
7722 rm -f conftest.$ac_objext conftest.$ac_ext
7723   break
7724 done
7725 fi
7726 echo "$as_me:7726: result: $ac_cv_sys_largefile_source" >&5
7727 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7728 if test "$ac_cv_sys_largefile_source" != no; then
7729
7730 cat >>confdefs.h <<EOF
7731 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7732 EOF
7733
7734 fi
7735 rm -f conftest*
7736
7737 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7738 # in glibc 2.1.3, but that breaks too many other things.
7739 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7740 echo "$as_me:7740: checking for fseeko" >&5
7741 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7742 if test "${ac_cv_func_fseeko+set}" = set; then
7743   echo $ECHO_N "(cached) $ECHO_C" >&6
7744 else
7745   cat >conftest.$ac_ext <<_ACEOF
7746 #line 7746 "configure"
7747 #include "confdefs.h"
7748 #include <stdio.h>
7749 int
7750 main ()
7751 {
7752 return fseeko && fseeko (stdin, 0, 0);
7753   ;
7754   return 0;
7755 }
7756 _ACEOF
7757 rm -f conftest.$ac_objext conftest$ac_exeext
7758 if { (eval echo "$as_me:7758: \"$ac_link\"") >&5
7759   (eval $ac_link) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); } &&
7763          { ac_try='test -s conftest$ac_exeext'
7764   { (eval echo "$as_me:7764: \"$ac_try\"") >&5
7765   (eval $ac_try) 2>&5
7766   ac_status=$?
7767   echo "$as_me:7767: \$? = $ac_status" >&5
7768   (exit $ac_status); }; }; then
7769   ac_cv_func_fseeko=yes
7770 else
7771   echo "$as_me: failed program was:" >&5
7772 cat conftest.$ac_ext >&5
7773 ac_cv_func_fseeko=no
7774 fi
7775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7776 fi
7777 echo "$as_me:7777: result: $ac_cv_func_fseeko" >&5
7778 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7779 if test $ac_cv_func_fseeko = yes; then
7780
7781 cat >>confdefs.h <<\EOF
7782 #define HAVE_FSEEKO 1
7783 EOF
7784
7785 fi
7786
7787         # Normally we would collect these definitions in the config.h,
7788         # but (like _XOPEN_SOURCE), some environments rely on having these
7789         # defined before any of the system headers are included.  Another
7790         # case comes up with C++, e.g., on AIX the compiler compiles the
7791         # header files by themselves before looking at the body files it is
7792         # told to compile.  For ncurses, those header files do not include
7793         # the config.h
7794         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7795         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7796         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7797
7798         echo "$as_me:7798: checking whether to use struct dirent64" >&5
7799 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7800 if test "${cf_cv_struct_dirent64+set}" = set; then
7801   echo $ECHO_N "(cached) $ECHO_C" >&6
7802 else
7803
7804                 cat >conftest.$ac_ext <<_ACEOF
7805 #line 7805 "configure"
7806 #include "confdefs.h"
7807
7808 #include <sys/types.h>
7809 #include <dirent.h>
7810
7811 int
7812 main ()
7813 {
7814
7815                 /* if transitional largefile support is setup, this is true */
7816                 extern struct dirent64 * readdir(DIR *);
7817                 struct dirent64 *x = readdir((DIR *)0);
7818                 struct dirent *y = readdir((DIR *)0);
7819                 int z = x - y;
7820
7821   ;
7822   return 0;
7823 }
7824 _ACEOF
7825 rm -f conftest.$ac_objext
7826 if { (eval echo "$as_me:7826: \"$ac_compile\"") >&5
7827   (eval $ac_compile) 2>&5
7828   ac_status=$?
7829   echo "$as_me:7829: \$? = $ac_status" >&5
7830   (exit $ac_status); } &&
7831          { ac_try='test -s conftest.$ac_objext'
7832   { (eval echo "$as_me:7832: \"$ac_try\"") >&5
7833   (eval $ac_try) 2>&5
7834   ac_status=$?
7835   echo "$as_me:7835: \$? = $ac_status" >&5
7836   (exit $ac_status); }; }; then
7837   cf_cv_struct_dirent64=yes
7838 else
7839   echo "$as_me: failed program was:" >&5
7840 cat conftest.$ac_ext >&5
7841 cf_cv_struct_dirent64=no
7842 fi
7843 rm -f conftest.$ac_objext conftest.$ac_ext
7844
7845 fi
7846 echo "$as_me:7846: result: $cf_cv_struct_dirent64" >&5
7847 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7848         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7849 #define HAVE_STRUCT_DIRENT64 1
7850 EOF
7851
7852     fi
7853
7854 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7855 echo "$as_me:7855: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7856 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7857
7858 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7859 if test "${enable_tparm_varargs+set}" = set; then
7860   enableval="$enable_tparm_varargs"
7861   with_tparm_varargs=$enableval
7862 else
7863   with_tparm_varargs=yes
7864 fi;
7865 echo "$as_me:7865: result: $with_tparm_varargs" >&5
7866 echo "${ECHO_T}$with_tparm_varargs" >&6
7867 NCURSES_TPARM_VARARGS=0
7868 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7869
7870 ###   use option --with-bool to override bool's type
7871 echo "$as_me:7871: checking for type of bool" >&5
7872 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7873
7874 # Check whether --with-bool or --without-bool was given.
7875 if test "${with_bool+set}" = set; then
7876   withval="$with_bool"
7877   NCURSES_BOOL="$withval"
7878 else
7879   NCURSES_BOOL=auto
7880 fi;
7881 echo "$as_me:7881: result: $NCURSES_BOOL" >&5
7882 echo "${ECHO_T}$NCURSES_BOOL" >&6
7883
7884 echo "$as_me:7884: checking for alternate terminal capabilities file" >&5
7885 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7886
7887 # Check whether --with-caps or --without-caps was given.
7888 if test "${with_caps+set}" = set; then
7889   withval="$with_caps"
7890   TERMINFO_CAPS=Caps.$withval
7891 else
7892   TERMINFO_CAPS=Caps
7893 fi;
7894 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7895 echo "$as_me:7895: result: $TERMINFO_CAPS" >&5
7896 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7897
7898 ###   use option --with-chtype to override chtype's type
7899 echo "$as_me:7899: checking for type of chtype" >&5
7900 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7901
7902 # Check whether --with-chtype or --without-chtype was given.
7903 if test "${with_chtype+set}" = set; then
7904   withval="$with_chtype"
7905   NCURSES_CHTYPE="$withval"
7906 else
7907   NCURSES_CHTYPE=auto
7908 fi;
7909 echo "$as_me:7909: result: $NCURSES_CHTYPE" >&5
7910 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7911
7912 ###   use option --with-ospeed to override ospeed's type
7913 echo "$as_me:7913: checking for type of ospeed" >&5
7914 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7915
7916 # Check whether --with-ospeed or --without-ospeed was given.
7917 if test "${with_ospeed+set}" = set; then
7918   withval="$with_ospeed"
7919   NCURSES_OSPEED="$withval"
7920 else
7921   NCURSES_OSPEED=short
7922 fi;
7923 echo "$as_me:7923: result: $NCURSES_OSPEED" >&5
7924 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7925
7926 ###   use option --with-mmask-t to override mmask_t's type
7927 echo "$as_me:7927: checking for type of mmask_t" >&5
7928 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7929
7930 # Check whether --with-mmask-t or --without-mmask-t was given.
7931 if test "${with_mmask_t+set}" = set; then
7932   withval="$with_mmask_t"
7933   NCURSES_MMASK_T="$withval"
7934 else
7935   NCURSES_MMASK_T=auto
7936 fi;
7937 echo "$as_me:7937: result: $NCURSES_MMASK_T" >&5
7938 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7939
7940 ### Enable compiling-in rcs id's
7941 echo "$as_me:7941: checking if RCS identifiers should be compiled-in" >&5
7942 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7943
7944 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7945 if test "${with_rcs_ids+set}" = set; then
7946   withval="$with_rcs_ids"
7947   with_rcs_ids=$withval
7948 else
7949   with_rcs_ids=no
7950 fi;
7951 echo "$as_me:7951: result: $with_rcs_ids" >&5
7952 echo "${ECHO_T}$with_rcs_ids" >&6
7953 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7954 #define USE_RCS_IDS 1
7955 EOF
7956
7957 ###############################################################################
7958
7959 echo "$as_me:7959: checking format of man-pages" >&5
7960 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7961
7962 # Check whether --with-manpage-format or --without-manpage-format was given.
7963 if test "${with_manpage_format+set}" = set; then
7964   withval="$with_manpage_format"
7965   MANPAGE_FORMAT=$withval
7966 else
7967   MANPAGE_FORMAT=unknown
7968 fi;
7969
7970 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7971 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7972
7973 cf_unknown=
7974
7975 case $MANPAGE_FORMAT in
7976 unknown)
7977   if test -z "$MANPATH" ; then
7978     MANPATH="/usr/man:/usr/share/man"
7979   fi
7980
7981   # look for the 'date' man-page (it's most likely to be installed!)
7982   MANPAGE_FORMAT=
7983   cf_preform=no
7984   cf_catonly=yes
7985   cf_example=date
7986
7987   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7988   for cf_dir in $MANPATH; do
7989     test -z "$cf_dir" && cf_dir=/usr/man
7990     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
7991     do
7992       cf_test=`echo $cf_name | sed -e 's/*//'`
7993       if test "x$cf_test" = "x$cf_name" ; then
7994
7995         case "$cf_name" in
7996         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7997         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7998         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7999         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8000         esac
8001
8002         case "$cf_name" in
8003         $cf_dir/man*)
8004           cf_catonly=no
8005           ;;
8006         $cf_dir/cat*)
8007           cf_preform=yes
8008           ;;
8009         esac
8010         break
8011       fi
8012
8013       # if we found a match in either man* or cat*, stop looking
8014       if test -n "$MANPAGE_FORMAT" ; then
8015         cf_found=no
8016         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8017         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8018         case "$cf_name" in
8019         $cf_dir/cat*)
8020           cf_found=yes
8021           ;;
8022         esac
8023         test $cf_found=yes && break
8024       fi
8025     done
8026     # only check the first directory in $MANPATH where we find manpages
8027     if test -n "$MANPAGE_FORMAT" ; then
8028        break
8029     fi
8030   done
8031   # if we did not find the example, just assume it is normal
8032   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8033   IFS="$ac_save_ifs"
8034   ;;
8035 *)
8036   for cf_option in $MANPAGE_FORMAT; do
8037      case $cf_option in #(vi
8038      gzip|compress|BSDI|normal|formatted|catonly)
8039        ;;
8040      *)
8041        cf_unknown="$cf_unknown $cf_option"
8042        ;;
8043      esac
8044   done
8045   ;;
8046 esac
8047
8048 echo "$as_me:8048: result: $MANPAGE_FORMAT" >&5
8049 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8050 if test -n "$cf_unknown" ; then
8051   { echo "$as_me:8051: WARNING: Unexpected manpage-format $cf_unknown" >&5
8052 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8053 fi
8054
8055 echo "$as_me:8055: checking for manpage renaming" >&5
8056 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8057
8058 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8059 if test "${with_manpage_renames+set}" = set; then
8060   withval="$with_manpage_renames"
8061   MANPAGE_RENAMES=$withval
8062 else
8063   MANPAGE_RENAMES=yes
8064 fi;
8065
8066 case ".$MANPAGE_RENAMES" in #(vi
8067 .no) #(vi
8068   ;;
8069 .|.yes)
8070   # Debian 'man' program?
8071   if test -f /etc/debian_version ; then
8072     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8073   else
8074     MANPAGE_RENAMES=no
8075   fi
8076   ;;
8077 esac
8078
8079 if test "$MANPAGE_RENAMES" != no ; then
8080   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8081     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8082   elif test ! -f $MANPAGE_RENAMES ; then
8083     { { echo "$as_me:8083: error: not a filename: $MANPAGE_RENAMES" >&5
8084 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8085    { (exit 1); exit 1; }; }
8086   fi
8087
8088   test ! -d man && mkdir man
8089
8090   # Construct a sed-script to perform renaming within man-pages
8091   if test -n "$MANPAGE_RENAMES" ; then
8092     test ! -d man && mkdir man
8093     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8094   fi
8095 fi
8096
8097 echo "$as_me:8097: result: $MANPAGE_RENAMES" >&5
8098 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8099
8100 echo "$as_me:8100: checking if manpage aliases will be installed" >&5
8101 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8102
8103 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8104 if test "${with_manpage_aliases+set}" = set; then
8105   withval="$with_manpage_aliases"
8106   MANPAGE_ALIASES=$withval
8107 else
8108   MANPAGE_ALIASES=yes
8109 fi;
8110
8111 echo "$as_me:8111: result: $MANPAGE_ALIASES" >&5
8112 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8113
8114 if test "$LN_S" = "ln -s"; then
8115         cf_use_symlinks=yes
8116 else
8117         cf_use_symlinks=no
8118 fi
8119
8120 MANPAGE_SYMLINKS=no
8121 if test "$MANPAGE_ALIASES" = yes ; then
8122 echo "$as_me:8122: checking if manpage symlinks should be used" >&5
8123 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8124
8125 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8126 if test "${with_manpage_symlinks+set}" = set; then
8127   withval="$with_manpage_symlinks"
8128   MANPAGE_SYMLINKS=$withval
8129 else
8130   MANPAGE_SYMLINKS=$cf_use_symlinks
8131 fi;
8132
8133 if test "$$cf_use_symlinks" = no; then
8134 if test "$MANPAGE_SYMLINKS" = yes ; then
8135         { echo "$as_me:8135: WARNING: cannot make symlinks" >&5
8136 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8137         MANPAGE_SYMLINKS=no
8138 fi
8139 fi
8140
8141 echo "$as_me:8141: result: $MANPAGE_SYMLINKS" >&5
8142 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8143 fi
8144
8145 echo "$as_me:8145: checking for manpage tbl" >&5
8146 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8147
8148 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8149 if test "${with_manpage_tbl+set}" = set; then
8150   withval="$with_manpage_tbl"
8151   MANPAGE_TBL=$withval
8152 else
8153   MANPAGE_TBL=no
8154 fi;
8155
8156 echo "$as_me:8156: result: $MANPAGE_TBL" >&5
8157 echo "${ECHO_T}$MANPAGE_TBL" >&6
8158
8159   if test "$prefix" = "NONE" ; then
8160      cf_prefix="$ac_default_prefix"
8161   else
8162      cf_prefix="$prefix"
8163   fi
8164
8165   case "$MANPAGE_FORMAT" in # (vi
8166   *catonly*) # (vi
8167     cf_format=yes
8168     cf_inboth=no
8169     ;;
8170   *formatted*) # (vi
8171     cf_format=yes
8172     cf_inboth=yes
8173     ;;
8174   *)
8175     cf_format=no
8176     cf_inboth=no
8177     ;;
8178   esac
8179
8180 test ! -d man && mkdir man
8181
8182 cf_so_strip=
8183 cf_compress=
8184 case "$MANPAGE_FORMAT" in #(vi
8185 *compress*) #(vi
8186         cf_so_strip="Z"
8187         cf_compress=compress
8188   ;;
8189 *gzip*) #(vi
8190         cf_so_strip="gz"
8191         cf_compress=gzip
8192   ;;
8193 esac
8194
8195 cf_edit_man=./edit_man.sh
8196 cf_man_alias=`pwd`/man_alias.sed
8197
8198 cat >$cf_edit_man <<CF_EOF
8199 #! /bin/sh
8200 # this script is generated by the configure-script CF_MAN_PAGES macro.
8201
8202 prefix="$cf_prefix"
8203 datadir="$datadir"
8204
8205 NCURSES_MAJOR="$NCURSES_MAJOR"
8206 NCURSES_MINOR="$NCURSES_MINOR"
8207 NCURSES_PATCH="$NCURSES_PATCH"
8208
8209 NCURSES_OSPEED="$NCURSES_OSPEED"
8210 TERMINFO="$TERMINFO"
8211
8212 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8213
8214 INSTALL="$INSTALL"
8215 INSTALL_DATA="$INSTALL_DATA"
8216
8217 transform="$program_transform_name"
8218
8219 TMP=\${TMPDIR-/tmp}/man\$\$
8220 trap "rm -f \$TMP" 0 1 2 5 15
8221
8222 form=\$1
8223 shift || exit 1
8224
8225 verb=\$1
8226 shift || exit 1
8227
8228 mandir=\$1
8229 shift || exit 1
8230
8231 srcdir=\$1
8232 top_srcdir=\$srcdir/..
8233 shift || exit 1
8234
8235 if test "\$form" = normal ; then
8236         if test "$cf_format" = yes ; then
8237         if test "$cf_inboth" = no ; then
8238                 sh \$0 format \$verb \$mandir \$srcdir \$*
8239                 exit $?
8240         fi
8241         fi
8242         cf_subdir=\$mandir/man
8243         cf_tables=$MANPAGE_TBL
8244 else
8245         cf_subdir=\$mandir/cat
8246         cf_tables=yes
8247 fi
8248
8249 # process the list of source-files
8250 for i in \$* ; do
8251 case \$i in #(vi
8252 *.orig|*.rej) ;; #(vi
8253 *.[0-9]*)
8254         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8255         if test \$verb = installing ; then
8256         if test ! -d \$cf_subdir\${section} ; then
8257                 \$MKDIRS \$cf_subdir\$section
8258         fi
8259         fi
8260
8261         # replace variables in man page
8262         if test ! -f $cf_man_alias ; then
8263 cat >>$cf_man_alias <<-CF_EOF2
8264                 s,@DATADIR@,\$datadir,g
8265                 s,@TERMINFO@,\$TERMINFO,g
8266                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8267                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8268                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8269                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8270 CF_EOF
8271
8272         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8273         do
8274                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8275                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8276 cat >>$cf_edit_man <<-CF_EOF
8277                 s,@$cf_NAME@,$cf_name,
8278 CF_EOF
8279         done
8280
8281 cat >>$cf_edit_man <<CF_EOF
8282 CF_EOF2
8283                 echo "...made $cf_man_alias"
8284         fi
8285
8286         aliases=
8287         cf_source=\`basename \$i\`
8288         inalias=\$cf_source
8289         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8290         if test ! -f \$inalias ; then
8291                 echo .. skipped \$cf_source
8292                 continue
8293         fi
8294 CF_EOF
8295
8296 if test "$MANPAGE_ALIASES" != no ; then
8297 cat >>$cf_edit_man <<CF_EOF
8298         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8299 CF_EOF
8300 fi
8301
8302 if test "$MANPAGE_RENAMES" = no ; then
8303 cat >>$cf_edit_man <<CF_EOF
8304         # perform program transformations for section 1 man pages
8305         if test \$section = 1 ; then
8306                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8307         else
8308                 cf_target=\$cf_subdir\${section}/\$cf_source
8309         fi
8310 CF_EOF
8311 else
8312 cat >>$cf_edit_man <<CF_EOF
8313         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8314         if test -z "\$cf_target" ; then
8315                 echo '? missing rename for '\$cf_source
8316                 cf_target="\$cf_source"
8317         fi
8318         cf_target="\$cf_subdir\${section}/\${cf_target}"
8319
8320 CF_EOF
8321 fi
8322
8323 cat >>$cf_edit_man <<CF_EOF
8324         sed     -f $cf_man_alias \\
8325 CF_EOF
8326
8327 if test -f $MANPAGE_RENAMES ; then
8328 cat >>$cf_edit_man <<CF_EOF
8329                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8330 CF_EOF
8331 else
8332 cat >>$cf_edit_man <<CF_EOF
8333                 < \$i >\$TMP
8334 CF_EOF
8335 fi
8336
8337 cat >>$cf_edit_man <<CF_EOF
8338 if test \$cf_tables = yes ; then
8339         tbl \$TMP >\$TMP.out
8340         mv \$TMP.out \$TMP
8341 fi
8342 CF_EOF
8343
8344 if test $with_curses_h != yes ; then
8345 cat >>$cf_edit_man <<CF_EOF
8346         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8347         mv \$TMP.out \$TMP
8348 CF_EOF
8349 fi
8350
8351 cat >>$cf_edit_man <<CF_EOF
8352         if test \$form = format ; then
8353                 nroff -man \$TMP >\$TMP.out
8354                 mv \$TMP.out \$TMP
8355         fi
8356 CF_EOF
8357
8358 if test -n "$cf_compress" ; then
8359 cat >>$cf_edit_man <<CF_EOF
8360         if test \$verb = installing ; then
8361         if ( $cf_compress -f \$TMP )
8362         then
8363                 mv \$TMP.$cf_so_strip \$TMP
8364         fi
8365         fi
8366         cf_target="\$cf_target.$cf_so_strip"
8367 CF_EOF
8368 fi
8369
8370 case "$MANPAGE_FORMAT" in #(vi
8371 *BSDI*)
8372 cat >>$cf_edit_man <<CF_EOF
8373         if test \$form = format ; then
8374                 # BSDI installs only .0 suffixes in the cat directories
8375                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8376         fi
8377 CF_EOF
8378   ;;
8379 esac
8380
8381 cat >>$cf_edit_man <<CF_EOF
8382         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8383         if test \$verb = installing ; then
8384                 echo \$verb \$cf_target
8385                 \$INSTALL_DATA \$TMP \$cf_target
8386                 test -d \$cf_subdir\${section} &&
8387                 test -n "\$aliases" && (
8388                         cd \$cf_subdir\${section} && (
8389                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8390                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8391                                 cf_target=\`basename \$cf_target\`
8392                                 for cf_alias in \$aliases
8393                                 do
8394                                         if test \$section = 1 ; then
8395                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8396                                         fi
8397
8398                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8399                                                 if test -f \$cf_alias\${suffix} ; then
8400                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8401                                                         then
8402                                                                 continue
8403                                                         fi
8404                                                 fi
8405                                                 echo .. \$verb alias \$cf_alias\${suffix}
8406                                                 rm -f \$cf_alias\${suffix}
8407                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8408                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8409                                                 echo ".so \$cf_source" >\$TMP
8410 CF_EOF
8411 if test -n "$cf_compress" ; then
8412 cat >>$cf_edit_man <<CF_EOF
8413                                                 if test -n "$cf_so_strip" ; then
8414                                                         $cf_compress -f \$TMP
8415                                                         mv \$TMP.$cf_so_strip \$TMP
8416                                                 fi
8417 CF_EOF
8418 fi
8419 cat >>$cf_edit_man <<CF_EOF
8420                                                 echo .. \$verb alias \$cf_alias\${suffix}
8421                                                 rm -f \$cf_alias\${suffix}
8422                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8423                                         fi
8424                                 done
8425                         )
8426                 )
8427         elif test \$verb = removing ; then
8428                 test -f \$cf_target && (
8429                         echo \$verb \$cf_target
8430                         rm -f \$cf_target
8431                 )
8432                 test -d \$cf_subdir\${section} &&
8433                 test -n "\$aliases" && (
8434                         cd \$cf_subdir\${section} && (
8435                                 for cf_alias in \$aliases
8436                                 do
8437                                         if test \$section = 1 ; then
8438                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8439                                         fi
8440
8441                                         echo .. \$verb alias \$cf_alias\${suffix}
8442                                         rm -f \$cf_alias\${suffix}
8443                                 done
8444                         )
8445                 )
8446         else
8447 #               echo ".hy 0"
8448                 cat \$TMP
8449         fi
8450         ;;
8451 esac
8452 done
8453
8454 if test $cf_inboth = yes ; then
8455 if test \$form != format ; then
8456         sh \$0 format \$verb \$mandir \$srcdir \$*
8457 fi
8458 fi
8459
8460 exit 0
8461 CF_EOF
8462 chmod 755 $cf_edit_man
8463
8464 ###############################################################################
8465
8466 ### Note that some functions (such as const) are normally disabled anyway.
8467 echo "$as_me:8467: checking if you want to build with function extensions" >&5
8468 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8469
8470 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8471 if test "${enable_ext_funcs+set}" = set; then
8472   enableval="$enable_ext_funcs"
8473   with_ext_funcs=$enableval
8474 else
8475   with_ext_funcs=yes
8476 fi;
8477 echo "$as_me:8477: result: $with_ext_funcs" >&5
8478 echo "${ECHO_T}$with_ext_funcs" >&6
8479 if test "$with_ext_funcs" = yes ; then
8480         NCURSES_EXT_FUNCS=1
8481         cat >>confdefs.h <<\EOF
8482 #define HAVE_CURSES_VERSION 1
8483 EOF
8484
8485         cat >>confdefs.h <<\EOF
8486 #define HAVE_HAS_KEY 1
8487 EOF
8488
8489         cat >>confdefs.h <<\EOF
8490 #define HAVE_RESIZETERM 1
8491 EOF
8492
8493         cat >>confdefs.h <<\EOF
8494 #define HAVE_RESIZE_TERM 1
8495 EOF
8496
8497         cat >>confdefs.h <<\EOF
8498 #define HAVE_USE_DEFAULT_COLORS 1
8499 EOF
8500
8501         cat >>confdefs.h <<\EOF
8502 #define HAVE_WRESIZE 1
8503 EOF
8504
8505         cat >>confdefs.h <<\EOF
8506 #define NCURSES_EXT_FUNCS 1
8507 EOF
8508
8509 else
8510         NCURSES_EXT_FUNCS=0
8511 fi
8512
8513 ###   use option --enable-const to turn on use of const beyond that in XSI.
8514 echo "$as_me:8514: checking for extended use of const keyword" >&5
8515 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8516
8517 # Check whether --enable-const or --disable-const was given.
8518 if test "${enable_const+set}" = set; then
8519   enableval="$enable_const"
8520   with_ext_const=$enableval
8521 else
8522   with_ext_const=no
8523 fi;
8524 echo "$as_me:8524: result: $with_ext_const" >&5
8525 echo "${ECHO_T}$with_ext_const" >&6
8526 NCURSES_CONST='/*nothing*/'
8527 if test "$with_ext_const" = yes ; then
8528         NCURSES_CONST=const
8529 fi
8530
8531 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8532 echo "$as_me:8532: checking if you want to use extended colors" >&5
8533 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8534
8535 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8536 if test "${enable_ext_colors+set}" = set; then
8537   enableval="$enable_ext_colors"
8538   with_ext_colors=$enableval
8539 else
8540   with_ext_colors=no
8541 fi;
8542 echo "$as_me:8542: result: $with_ext_colors" >&5
8543 echo "${ECHO_T}$with_ext_colors" >&6
8544 NCURSES_EXT_COLORS=0
8545 if test "$with_ext_colors" = yes ; then
8546         if test "$with_widec" != yes ; then
8547                 { { echo "$as_me:8547: error: This option applies only to wide-character library" >&5
8548 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8549    { (exit 1); exit 1; }; }
8550         else
8551                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8552
8553 if test "${with_abi_version+set}" != set; then
8554         case $cf_cv_rel_version in
8555         5.*)
8556                 cf_cv_rel_version=6.0
8557                 cf_cv_abi_version=6
8558                 { echo "$as_me:8558: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8559 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8560                 ;;
8561         esac
8562 fi
8563
8564         fi
8565         NCURSES_EXT_COLORS=1
8566         cat >>confdefs.h <<\EOF
8567 #define NCURSES_EXT_COLORS 1
8568 EOF
8569
8570 fi
8571
8572 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8573 echo "$as_me:8573: checking if you want to use extended mouse encoding" >&5
8574 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
8575
8576 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8577 if test "${enable_ext_mouse+set}" = set; then
8578   enableval="$enable_ext_mouse"
8579   with_ext_mouse=$enableval
8580 else
8581   with_ext_mouse=no
8582 fi;
8583 echo "$as_me:8583: result: $with_ext_mouse" >&5
8584 echo "${ECHO_T}$with_ext_mouse" >&6
8585 NCURSES_MOUSE_VERSION=1
8586 if test "$with_ext_mouse" = yes ; then
8587         NCURSES_MOUSE_VERSION=2
8588
8589 if test "${with_abi_version+set}" != set; then
8590         case $cf_cv_rel_version in
8591         5.*)
8592                 cf_cv_rel_version=6.0
8593                 cf_cv_abi_version=6
8594                 { echo "$as_me:8594: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8595 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8596                 ;;
8597         esac
8598 fi
8599
8600 fi
8601
8602 echo "$as_me:8602: checking if you want \$NCURSES_NO_PADDING code" >&5
8603 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8604
8605 # Check whether --enable-no-padding or --disable-no-padding was given.
8606 if test "${enable_no_padding+set}" = set; then
8607   enableval="$enable_no_padding"
8608   with_no_padding=$enableval
8609 else
8610   with_no_padding=$with_ext_funcs
8611 fi;
8612 echo "$as_me:8612: result: $with_no_padding" >&5
8613 echo "${ECHO_T}$with_no_padding" >&6
8614 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8615 #define NCURSES_NO_PADDING 1
8616 EOF
8617
8618 echo "$as_me:8618: checking for ANSI C header files" >&5
8619 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8620 if test "${ac_cv_header_stdc+set}" = set; then
8621   echo $ECHO_N "(cached) $ECHO_C" >&6
8622 else
8623   cat >conftest.$ac_ext <<_ACEOF
8624 #line 8624 "configure"
8625 #include "confdefs.h"
8626 #include <stdlib.h>
8627 #include <stdarg.h>
8628 #include <string.h>
8629 #include <float.h>
8630
8631 _ACEOF
8632 if { (eval echo "$as_me:8632: \"$ac_cpp conftest.$ac_ext\"") >&5
8633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8634   ac_status=$?
8635   egrep -v '^ *\+' conftest.er1 >conftest.err
8636   rm -f conftest.er1
8637   cat conftest.err >&5
8638   echo "$as_me:8638: \$? = $ac_status" >&5
8639   (exit $ac_status); } >/dev/null; then
8640   if test -s conftest.err; then
8641     ac_cpp_err=$ac_c_preproc_warn_flag
8642   else
8643     ac_cpp_err=
8644   fi
8645 else
8646   ac_cpp_err=yes
8647 fi
8648 if test -z "$ac_cpp_err"; then
8649   ac_cv_header_stdc=yes
8650 else
8651   echo "$as_me: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   ac_cv_header_stdc=no
8654 fi
8655 rm -f conftest.err conftest.$ac_ext
8656
8657 if test $ac_cv_header_stdc = yes; then
8658   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8659   cat >conftest.$ac_ext <<_ACEOF
8660 #line 8660 "configure"
8661 #include "confdefs.h"
8662 #include <string.h>
8663
8664 _ACEOF
8665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8666   egrep "memchr" >/dev/null 2>&1; then
8667   :
8668 else
8669   ac_cv_header_stdc=no
8670 fi
8671 rm -f conftest*
8672
8673 fi
8674
8675 if test $ac_cv_header_stdc = yes; then
8676   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8677   cat >conftest.$ac_ext <<_ACEOF
8678 #line 8678 "configure"
8679 #include "confdefs.h"
8680 #include <stdlib.h>
8681
8682 _ACEOF
8683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8684   egrep "free" >/dev/null 2>&1; then
8685   :
8686 else
8687   ac_cv_header_stdc=no
8688 fi
8689 rm -f conftest*
8690
8691 fi
8692
8693 if test $ac_cv_header_stdc = yes; then
8694   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8695   if test "$cross_compiling" = yes; then
8696   :
8697 else
8698   cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8701 #include <ctype.h>
8702 #if ((' ' & 0x0FF) == 0x020)
8703 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8704 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8705 #else
8706 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8707                      || ('j' <= (c) && (c) <= 'r') \
8708                      || ('s' <= (c) && (c) <= 'z'))
8709 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8710 #endif
8711
8712 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8713 int
8714 main ()
8715 {
8716   int i;
8717   for (i = 0; i < 256; i++)
8718     if (XOR (islower (i), ISLOWER (i))
8719         || toupper (i) != TOUPPER (i))
8720       $ac_main_return(2);
8721   $ac_main_return (0);
8722 }
8723 _ACEOF
8724 rm -f conftest$ac_exeext
8725 if { (eval echo "$as_me:8725: \"$ac_link\"") >&5
8726   (eval $ac_link) 2>&5
8727   ac_status=$?
8728   echo "$as_me:8728: \$? = $ac_status" >&5
8729   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8730   { (eval echo "$as_me:8730: \"$ac_try\"") >&5
8731   (eval $ac_try) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); }; }; then
8735   :
8736 else
8737   echo "$as_me: program exited with status $ac_status" >&5
8738 echo "$as_me: failed program was:" >&5
8739 cat conftest.$ac_ext >&5
8740 ac_cv_header_stdc=no
8741 fi
8742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8743 fi
8744 fi
8745 fi
8746 echo "$as_me:8746: result: $ac_cv_header_stdc" >&5
8747 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8748 if test $ac_cv_header_stdc = yes; then
8749
8750 cat >>confdefs.h <<\EOF
8751 #define STDC_HEADERS 1
8752 EOF
8753
8754 fi
8755
8756 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8757
8758 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8759                   inttypes.h stdint.h unistd.h
8760 do
8761 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8762 echo "$as_me:8762: checking for $ac_header" >&5
8763 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8764 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8765   echo $ECHO_N "(cached) $ECHO_C" >&6
8766 else
8767   cat >conftest.$ac_ext <<_ACEOF
8768 #line 8768 "configure"
8769 #include "confdefs.h"
8770 $ac_includes_default
8771 #include <$ac_header>
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   eval "$as_ac_Header=yes"
8786 else
8787   echo "$as_me: failed program was:" >&5
8788 cat conftest.$ac_ext >&5
8789 eval "$as_ac_Header=no"
8790 fi
8791 rm -f conftest.$ac_objext conftest.$ac_ext
8792 fi
8793 echo "$as_me:8793: result: `eval echo '${'$as_ac_Header'}'`" >&5
8794 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8795 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8796   cat >>confdefs.h <<EOF
8797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8798 EOF
8799
8800 fi
8801 done
8802
8803 echo "$as_me:8803: checking for signed char" >&5
8804 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8805 if test "${ac_cv_type_signed_char+set}" = set; then
8806   echo $ECHO_N "(cached) $ECHO_C" >&6
8807 else
8808   cat >conftest.$ac_ext <<_ACEOF
8809 #line 8809 "configure"
8810 #include "confdefs.h"
8811 $ac_includes_default
8812 int
8813 main ()
8814 {
8815 if ((signed char *) 0)
8816   return 0;
8817 if (sizeof (signed char))
8818   return 0;
8819   ;
8820   return 0;
8821 }
8822 _ACEOF
8823 rm -f conftest.$ac_objext
8824 if { (eval echo "$as_me:8824: \"$ac_compile\"") >&5
8825   (eval $ac_compile) 2>&5
8826   ac_status=$?
8827   echo "$as_me:8827: \$? = $ac_status" >&5
8828   (exit $ac_status); } &&
8829          { ac_try='test -s conftest.$ac_objext'
8830   { (eval echo "$as_me:8830: \"$ac_try\"") >&5
8831   (eval $ac_try) 2>&5
8832   ac_status=$?
8833   echo "$as_me:8833: \$? = $ac_status" >&5
8834   (exit $ac_status); }; }; then
8835   ac_cv_type_signed_char=yes
8836 else
8837   echo "$as_me: failed program was:" >&5
8838 cat conftest.$ac_ext >&5
8839 ac_cv_type_signed_char=no
8840 fi
8841 rm -f conftest.$ac_objext conftest.$ac_ext
8842 fi
8843 echo "$as_me:8843: result: $ac_cv_type_signed_char" >&5
8844 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8845
8846 echo "$as_me:8846: checking size of signed char" >&5
8847 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8848 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8849   echo $ECHO_N "(cached) $ECHO_C" >&6
8850 else
8851   if test "$ac_cv_type_signed_char" = yes; then
8852   if test "$cross_compiling" = yes; then
8853   # Depending upon the size, compute the lo and hi bounds.
8854 cat >conftest.$ac_ext <<_ACEOF
8855 #line 8855 "configure"
8856 #include "confdefs.h"
8857 $ac_includes_default
8858 int
8859 main ()
8860 {
8861 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8862   ;
8863   return 0;
8864 }
8865 _ACEOF
8866 rm -f conftest.$ac_objext
8867 if { (eval echo "$as_me:8867: \"$ac_compile\"") >&5
8868   (eval $ac_compile) 2>&5
8869   ac_status=$?
8870   echo "$as_me:8870: \$? = $ac_status" >&5
8871   (exit $ac_status); } &&
8872          { ac_try='test -s conftest.$ac_objext'
8873   { (eval echo "$as_me:8873: \"$ac_try\"") >&5
8874   (eval $ac_try) 2>&5
8875   ac_status=$?
8876   echo "$as_me:8876: \$? = $ac_status" >&5
8877   (exit $ac_status); }; }; then
8878   ac_lo=0 ac_mid=0
8879   while :; do
8880     cat >conftest.$ac_ext <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8883 $ac_includes_default
8884 int
8885 main ()
8886 {
8887 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8888   ;
8889   return 0;
8890 }
8891 _ACEOF
8892 rm -f conftest.$ac_objext
8893 if { (eval echo "$as_me:8893: \"$ac_compile\"") >&5
8894   (eval $ac_compile) 2>&5
8895   ac_status=$?
8896   echo "$as_me:8896: \$? = $ac_status" >&5
8897   (exit $ac_status); } &&
8898          { ac_try='test -s conftest.$ac_objext'
8899   { (eval echo "$as_me:8899: \"$ac_try\"") >&5
8900   (eval $ac_try) 2>&5
8901   ac_status=$?
8902   echo "$as_me:8902: \$? = $ac_status" >&5
8903   (exit $ac_status); }; }; then
8904   ac_hi=$ac_mid; break
8905 else
8906   echo "$as_me: failed program was:" >&5
8907 cat conftest.$ac_ext >&5
8908 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8909 fi
8910 rm -f conftest.$ac_objext conftest.$ac_ext
8911   done
8912 else
8913   echo "$as_me: failed program was:" >&5
8914 cat conftest.$ac_ext >&5
8915 ac_hi=-1 ac_mid=-1
8916   while :; do
8917     cat >conftest.$ac_ext <<_ACEOF
8918 #line 8918 "configure"
8919 #include "confdefs.h"
8920 $ac_includes_default
8921 int
8922 main ()
8923 {
8924 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8925   ;
8926   return 0;
8927 }
8928 _ACEOF
8929 rm -f conftest.$ac_objext
8930 if { (eval echo "$as_me:8930: \"$ac_compile\"") >&5
8931   (eval $ac_compile) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); } &&
8935          { ac_try='test -s conftest.$ac_objext'
8936   { (eval echo "$as_me:8936: \"$ac_try\"") >&5
8937   (eval $ac_try) 2>&5
8938   ac_status=$?
8939   echo "$as_me:8939: \$? = $ac_status" >&5
8940   (exit $ac_status); }; }; then
8941   ac_lo=$ac_mid; break
8942 else
8943   echo "$as_me: failed program was:" >&5
8944 cat conftest.$ac_ext >&5
8945 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8946 fi
8947 rm -f conftest.$ac_objext conftest.$ac_ext
8948   done
8949 fi
8950 rm -f conftest.$ac_objext conftest.$ac_ext
8951 # Binary search between lo and hi bounds.
8952 while test "x$ac_lo" != "x$ac_hi"; do
8953   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8954   cat >conftest.$ac_ext <<_ACEOF
8955 #line 8955 "configure"
8956 #include "confdefs.h"
8957 $ac_includes_default
8958 int
8959 main ()
8960 {
8961 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8962   ;
8963   return 0;
8964 }
8965 _ACEOF
8966 rm -f conftest.$ac_objext
8967 if { (eval echo "$as_me:8967: \"$ac_compile\"") >&5
8968   (eval $ac_compile) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); } &&
8972          { ac_try='test -s conftest.$ac_objext'
8973   { (eval echo "$as_me:8973: \"$ac_try\"") >&5
8974   (eval $ac_try) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); }; }; then
8978   ac_hi=$ac_mid
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 ac_lo=`expr $ac_mid + 1`
8983 fi
8984 rm -f conftest.$ac_objext conftest.$ac_ext
8985 done
8986 ac_cv_sizeof_signed_char=$ac_lo
8987 else
8988   if test "$cross_compiling" = yes; then
8989   { { echo "$as_me:8989: error: cannot run test program while cross compiling" >&5
8990 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8991    { (exit 1); exit 1; }; }
8992 else
8993   cat >conftest.$ac_ext <<_ACEOF
8994 #line 8994 "configure"
8995 #include "confdefs.h"
8996 $ac_includes_default
8997 int
8998 main ()
8999 {
9000 FILE *f = fopen ("conftest.val", "w");
9001 if (!f)
9002   $ac_main_return (1);
9003 fprintf (f, "%d", (sizeof (signed char)));
9004 fclose (f);
9005   ;
9006   return 0;
9007 }
9008 _ACEOF
9009 rm -f conftest$ac_exeext
9010 if { (eval echo "$as_me:9010: \"$ac_link\"") >&5
9011   (eval $ac_link) 2>&5
9012   ac_status=$?
9013   echo "$as_me:9013: \$? = $ac_status" >&5
9014   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9015   { (eval echo "$as_me:9015: \"$ac_try\"") >&5
9016   (eval $ac_try) 2>&5
9017   ac_status=$?
9018   echo "$as_me:9018: \$? = $ac_status" >&5
9019   (exit $ac_status); }; }; then
9020   ac_cv_sizeof_signed_char=`cat conftest.val`
9021 else
9022   echo "$as_me: program exited with status $ac_status" >&5
9023 echo "$as_me: failed program was:" >&5
9024 cat conftest.$ac_ext >&5
9025 fi
9026 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9027 fi
9028 fi
9029 rm -f conftest.val
9030 else
9031   ac_cv_sizeof_signed_char=0
9032 fi
9033 fi
9034 echo "$as_me:9034: result: $ac_cv_sizeof_signed_char" >&5
9035 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9036 cat >>confdefs.h <<EOF
9037 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9038 EOF
9039
9040 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9041         NCURSES_SBOOL="signed char"
9042 else
9043         NCURSES_SBOOL="char"
9044 fi
9045 echo "$as_me:9045: checking if you want to use signed Boolean array in term.h" >&5
9046 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9047
9048 # Check whether --enable-signed-char or --disable-signed-char was given.
9049 if test "${enable_signed_char+set}" = set; then
9050   enableval="$enable_signed_char"
9051   with_signed_char=$enableval
9052 else
9053   with_signed_char=no
9054 fi;
9055 echo "$as_me:9055: result: $with_signed_char" >&5
9056 echo "${ECHO_T}$with_signed_char" >&6
9057 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9058
9059 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9060 echo "$as_me:9060: checking if you want SIGWINCH handler" >&5
9061 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9062
9063 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9064 if test "${enable_sigwinch+set}" = set; then
9065   enableval="$enable_sigwinch"
9066   with_sigwinch=$enableval
9067 else
9068   with_sigwinch=$with_ext_funcs
9069 fi;
9070 echo "$as_me:9070: result: $with_sigwinch" >&5
9071 echo "${ECHO_T}$with_sigwinch" >&6
9072 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9073 #define USE_SIGWINCH 1
9074 EOF
9075
9076 ###   use option --enable-tcap-names to allow user to define new capabilities
9077 echo "$as_me:9077: checking if you want user-definable terminal capabilities like termcap" >&5
9078 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9079
9080 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9081 if test "${enable_tcap_names+set}" = set; then
9082   enableval="$enable_tcap_names"
9083   with_tcap_names=$enableval
9084 else
9085   with_tcap_names=$with_ext_funcs
9086 fi;
9087 echo "$as_me:9087: result: $with_tcap_names" >&5
9088 echo "${ECHO_T}$with_tcap_names" >&6
9089 NCURSES_XNAMES=0
9090 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9091
9092 ###############################################################################
9093 # These options are relatively safe to experiment with.
9094
9095 echo "$as_me:9095: checking if you want all development code" >&5
9096 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9097
9098 # Check whether --with-develop or --without-develop was given.
9099 if test "${with_develop+set}" = set; then
9100   withval="$with_develop"
9101   with_develop=$withval
9102 else
9103   with_develop=no
9104 fi;
9105 echo "$as_me:9105: result: $with_develop" >&5
9106 echo "${ECHO_T}$with_develop" >&6
9107
9108 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9109 echo "$as_me:9109: checking if you want hard-tabs code" >&5
9110 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9111
9112 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9113 if test "${enable_hard_tabs+set}" = set; then
9114   enableval="$enable_hard_tabs"
9115
9116 else
9117   enable_hard_tabs=$with_develop
9118 fi;
9119 echo "$as_me:9119: result: $enable_hard_tabs" >&5
9120 echo "${ECHO_T}$enable_hard_tabs" >&6
9121 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9122 #define USE_HARD_TABS 1
9123 EOF
9124
9125 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9126 echo "$as_me:9126: checking if you want limited support for xmc" >&5
9127 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9128
9129 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9130 if test "${enable_xmc_glitch+set}" = set; then
9131   enableval="$enable_xmc_glitch"
9132
9133 else
9134   enable_xmc_glitch=$with_develop
9135 fi;
9136 echo "$as_me:9136: result: $enable_xmc_glitch" >&5
9137 echo "${ECHO_T}$enable_xmc_glitch" >&6
9138 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9139 #define USE_XMC_SUPPORT 1
9140 EOF
9141
9142 ###############################################################################
9143 # These are just experimental, probably should not be in a package:
9144
9145 echo "$as_me:9145: checking if you do not want to assume colors are white-on-black" >&5
9146 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9147
9148 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9149 if test "${enable_assumed_color+set}" = set; then
9150   enableval="$enable_assumed_color"
9151   with_assumed_color=$enableval
9152 else
9153   with_assumed_color=yes
9154 fi;
9155 echo "$as_me:9155: result: $with_assumed_color" >&5
9156 echo "${ECHO_T}$with_assumed_color" >&6
9157 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9158 #define USE_ASSUMED_COLOR 1
9159 EOF
9160
9161 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9162 echo "$as_me:9162: checking if you want hashmap scrolling-optimization code" >&5
9163 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9164
9165 # Check whether --enable-hashmap or --disable-hashmap was given.
9166 if test "${enable_hashmap+set}" = set; then
9167   enableval="$enable_hashmap"
9168   with_hashmap=$enableval
9169 else
9170   with_hashmap=yes
9171 fi;
9172 echo "$as_me:9172: result: $with_hashmap" >&5
9173 echo "${ECHO_T}$with_hashmap" >&6
9174 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9175 #define USE_HASHMAP 1
9176 EOF
9177
9178 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9179 echo "$as_me:9179: checking if you want colorfgbg code" >&5
9180 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9181
9182 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9183 if test "${enable_colorfgbg+set}" = set; then
9184   enableval="$enable_colorfgbg"
9185   with_colorfgbg=$enableval
9186 else
9187   with_colorfgbg=no
9188 fi;
9189 echo "$as_me:9189: result: $with_colorfgbg" >&5
9190 echo "${ECHO_T}$with_colorfgbg" >&6
9191 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9192 #define USE_COLORFGBG 1
9193 EOF
9194
9195 # This is still experimental (20080329), but should ultimately be moved to
9196 # the script-block --with-normal, etc.
9197
9198 echo "$as_me:9198: checking if you want to link with the pthread library" >&5
9199 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9200
9201 # Check whether --with-pthread or --without-pthread was given.
9202 if test "${with_pthread+set}" = set; then
9203   withval="$with_pthread"
9204   with_pthread=$withval
9205 else
9206   with_pthread=no
9207 fi;
9208 echo "$as_me:9208: result: $with_pthread" >&5
9209 echo "${ECHO_T}$with_pthread" >&6
9210
9211 if test "$with_pthread" != no ; then
9212     echo "$as_me:9212: checking for pthread.h" >&5
9213 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9214 if test "${ac_cv_header_pthread_h+set}" = set; then
9215   echo $ECHO_N "(cached) $ECHO_C" >&6
9216 else
9217   cat >conftest.$ac_ext <<_ACEOF
9218 #line 9218 "configure"
9219 #include "confdefs.h"
9220 #include <pthread.h>
9221 _ACEOF
9222 if { (eval echo "$as_me:9222: \"$ac_cpp conftest.$ac_ext\"") >&5
9223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9224   ac_status=$?
9225   egrep -v '^ *\+' conftest.er1 >conftest.err
9226   rm -f conftest.er1
9227   cat conftest.err >&5
9228   echo "$as_me:9228: \$? = $ac_status" >&5
9229   (exit $ac_status); } >/dev/null; then
9230   if test -s conftest.err; then
9231     ac_cpp_err=$ac_c_preproc_warn_flag
9232   else
9233     ac_cpp_err=
9234   fi
9235 else
9236   ac_cpp_err=yes
9237 fi
9238 if test -z "$ac_cpp_err"; then
9239   ac_cv_header_pthread_h=yes
9240 else
9241   echo "$as_me: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   ac_cv_header_pthread_h=no
9244 fi
9245 rm -f conftest.err conftest.$ac_ext
9246 fi
9247 echo "$as_me:9247: result: $ac_cv_header_pthread_h" >&5
9248 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9249 if test $ac_cv_header_pthread_h = yes; then
9250
9251         cat >>confdefs.h <<\EOF
9252 #define HAVE_PTHREADS_H 1
9253 EOF
9254
9255         echo "$as_me:9255: checking if we can link with the pthread library" >&5
9256 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9257         cf_save_LIBS="$LIBS"
9258         LIBS="-lpthread $LIBS"
9259         cat >conftest.$ac_ext <<_ACEOF
9260 #line 9260 "configure"
9261 #include "confdefs.h"
9262
9263 #include <pthread.h>
9264
9265 int
9266 main ()
9267 {
9268
9269         int rc = pthread_create(0,0,0,0);
9270
9271   ;
9272   return 0;
9273 }
9274 _ACEOF
9275 rm -f conftest.$ac_objext conftest$ac_exeext
9276 if { (eval echo "$as_me:9276: \"$ac_link\"") >&5
9277   (eval $ac_link) 2>&5
9278   ac_status=$?
9279   echo "$as_me:9279: \$? = $ac_status" >&5
9280   (exit $ac_status); } &&
9281          { ac_try='test -s conftest$ac_exeext'
9282   { (eval echo "$as_me:9282: \"$ac_try\"") >&5
9283   (eval $ac_try) 2>&5
9284   ac_status=$?
9285   echo "$as_me:9285: \$? = $ac_status" >&5
9286   (exit $ac_status); }; }; then
9287   with_pthread=yes
9288 else
9289   echo "$as_me: failed program was:" >&5
9290 cat conftest.$ac_ext >&5
9291 with_pthread=no
9292 fi
9293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9294         LIBS="$cf_save_LIBS"
9295         echo "$as_me:9295: result: $with_pthread" >&5
9296 echo "${ECHO_T}$with_pthread" >&6
9297
9298         if test "$with_pthread" = yes ; then
9299             LIBS="-lpthread $LIBS"
9300             cat >>confdefs.h <<\EOF
9301 #define HAVE_LIBPTHREADS 1
9302 EOF
9303
9304         else
9305             { { echo "$as_me:9305: error: Cannot link with pthread library" >&5
9306 echo "$as_me: error: Cannot link with pthread library" >&2;}
9307    { (exit 1); exit 1; }; }
9308         fi
9309
9310 fi
9311
9312 fi
9313
9314 echo "$as_me:9314: checking if you want to use weak-symbols for pthreads" >&5
9315 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9316
9317 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9318 if test "${enable_weak_symbols+set}" = set; then
9319   enableval="$enable_weak_symbols"
9320   use_weak_symbols=$withval
9321 else
9322   use_weak_symbols=no
9323 fi;
9324 echo "$as_me:9324: result: $use_weak_symbols" >&5
9325 echo "${ECHO_T}$use_weak_symbols" >&6
9326 if test "$use_weak_symbols" = yes ; then
9327
9328 echo "$as_me:9328: checking if $CC supports weak symbols" >&5
9329 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9330 if test "${cf_cv_weak_symbols+set}" = set; then
9331   echo $ECHO_N "(cached) $ECHO_C" >&6
9332 else
9333
9334 cat >conftest.$ac_ext <<_ACEOF
9335 #line 9335 "configure"
9336 #include "confdefs.h"
9337
9338 #include <stdio.h>
9339 int
9340 main ()
9341 {
9342
9343 #if defined(__GNUC__)
9344 #  if defined __USE_ISOC99
9345 #    define _cat_pragma(exp)    _Pragma(#exp)
9346 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9347 #  else
9348 #    define _weak_pragma(exp)
9349 #  endif
9350 #  define _declare(name)        __extension__ extern __typeof__(name) name
9351 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9352 #endif
9353
9354 weak_symbol(fopen);
9355
9356   ;
9357   return 0;
9358 }
9359 _ACEOF
9360 rm -f conftest.$ac_objext
9361 if { (eval echo "$as_me:9361: \"$ac_compile\"") >&5
9362   (eval $ac_compile) 2>&5
9363   ac_status=$?
9364   echo "$as_me:9364: \$? = $ac_status" >&5
9365   (exit $ac_status); } &&
9366          { ac_try='test -s conftest.$ac_objext'
9367   { (eval echo "$as_me:9367: \"$ac_try\"") >&5
9368   (eval $ac_try) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); }; }; then
9372   cf_cv_weak_symbols=yes
9373 else
9374   echo "$as_me: failed program was:" >&5
9375 cat conftest.$ac_ext >&5
9376 cf_cv_weak_symbols=no
9377 fi
9378 rm -f conftest.$ac_objext conftest.$ac_ext
9379
9380 fi
9381 echo "$as_me:9381: result: $cf_cv_weak_symbols" >&5
9382 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9383
9384 else
9385     cf_cv_weak_symbols=no
9386 fi
9387
9388 if test $cf_cv_weak_symbols = yes ; then
9389     cat >>confdefs.h <<\EOF
9390 #define USE_WEAK_SYMBOLS 1
9391 EOF
9392
9393 fi
9394
9395 PTHREAD=
9396 if test "$with_pthread" = "yes" ; then
9397     cat >>confdefs.h <<\EOF
9398 #define USE_PTHREADS 1
9399 EOF
9400
9401     enable_reentrant=yes
9402     if test $cf_cv_weak_symbols = yes ; then
9403         PTHREAD=-lpthread
9404     fi
9405 fi
9406
9407 # Reentrant code has to be opaque; there's little advantage to making ncurses
9408 # opaque outside of that, so there is no --enable-opaque option.  We can use
9409 # this option without --with-pthreads, but this will be always set for
9410 # pthreads.
9411 echo "$as_me:9411: checking if you want experimental reentrant code" >&5
9412 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9413
9414 # Check whether --enable-reentrant or --disable-reentrant was given.
9415 if test "${enable_reentrant+set}" = set; then
9416   enableval="$enable_reentrant"
9417   with_reentrant=$enableval
9418 else
9419   with_reentrant=no
9420 fi;
9421 echo "$as_me:9421: result: $with_reentrant" >&5
9422 echo "${ECHO_T}$with_reentrant" >&6
9423 if test "$with_reentrant" = yes ; then
9424         cf_cv_enable_reentrant=1
9425         cf_cv_enable_opaque="NCURSES_INTERNALS"
9426         NCURSES_OPAQUE=1
9427         NCURSES_SIZE_T=int
9428     if test $cf_cv_weak_symbols = yes ; then
9429
9430 # remove pthread library from $LIBS
9431 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9432
9433     else
9434         LIB_SUFFIX="t${LIB_SUFFIX}"
9435     fi
9436         cat >>confdefs.h <<\EOF
9437 #define USE_REENTRANT 1
9438 EOF
9439
9440 if test "${with_abi_version+set}" != set; then
9441         case $cf_cv_rel_version in
9442         5.*)
9443                 cf_cv_rel_version=6.0
9444                 cf_cv_abi_version=6
9445                 { echo "$as_me:9445: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9446 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9447                 ;;
9448         esac
9449 fi
9450
9451 else
9452         cf_cv_enable_reentrant=0
9453         cf_cv_enable_opaque="NCURSES_OPAQUE"
9454         NCURSES_OPAQUE=0
9455         NCURSES_SIZE_T=short
9456 fi
9457
9458 echo "$as_me:9458: checking if you want experimental safe-sprintf code" >&5
9459 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9460
9461 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9462 if test "${enable_safe_sprintf+set}" = set; then
9463   enableval="$enable_safe_sprintf"
9464   with_safe_sprintf=$enableval
9465 else
9466   with_safe_sprintf=no
9467 fi;
9468 echo "$as_me:9468: result: $with_safe_sprintf" >&5
9469 echo "${ECHO_T}$with_safe_sprintf" >&6
9470 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9471 #define USE_SAFE_SPRINTF 1
9472 EOF
9473
9474 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9475 # when hashmap is used scroll hints are useless
9476 if test "$with_hashmap" = no ; then
9477 echo "$as_me:9477: checking if you want to experiment without scrolling-hints code" >&5
9478 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9479
9480 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9481 if test "${enable_scroll_hints+set}" = set; then
9482   enableval="$enable_scroll_hints"
9483   with_scroll_hints=$enableval
9484 else
9485   with_scroll_hints=yes
9486 fi;
9487 echo "$as_me:9487: result: $with_scroll_hints" >&5
9488 echo "${ECHO_T}$with_scroll_hints" >&6
9489 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9490 #define USE_SCROLL_HINTS 1
9491 EOF
9492
9493 fi
9494
9495 echo "$as_me:9495: checking if you want experimental wgetch-events code" >&5
9496 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9497
9498 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9499 if test "${enable_wgetch_events+set}" = set; then
9500   enableval="$enable_wgetch_events"
9501   with_wgetch_events=$enableval
9502 else
9503   with_wgetch_events=no
9504 fi;
9505 echo "$as_me:9505: result: $with_wgetch_events" >&5
9506 echo "${ECHO_T}$with_wgetch_events" >&6
9507 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9508 #define NCURSES_WGETCH_EVENTS 1
9509 EOF
9510
9511 ###############################################################################
9512
9513 ###     use option --disable-echo to suppress full display compiling commands
9514 echo "$as_me:9514: checking if you want to display full commands during build" >&5
9515 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9516
9517 # Check whether --enable-echo or --disable-echo was given.
9518 if test "${enable_echo+set}" = set; then
9519   enableval="$enable_echo"
9520   with_echo=$enableval
9521 else
9522   with_echo=yes
9523 fi;
9524 if test "$with_echo" = yes; then
9525         ECHO_LINK=
9526 else
9527         ECHO_LINK='@ echo linking $@ ... ;'
9528         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9529         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9530 fi
9531 echo "$as_me:9531: result: $with_echo" >&5
9532 echo "${ECHO_T}$with_echo" >&6
9533
9534 ###     use option --enable-warnings to turn on all gcc warnings
9535 echo "$as_me:9535: checking if you want to see compiler warnings" >&5
9536 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9537
9538 # Check whether --enable-warnings or --disable-warnings was given.
9539 if test "${enable_warnings+set}" = set; then
9540   enableval="$enable_warnings"
9541   with_warnings=$enableval
9542 fi;
9543 echo "$as_me:9543: result: $with_warnings" >&5
9544 echo "${ECHO_T}$with_warnings" >&6
9545
9546 if test "x$with_warnings" = "xyes"; then
9547         ADAFLAGS="$ADAFLAGS -gnatg"
9548
9549 INTEL_COMPILER=no
9550
9551 if test "$GCC" = yes ; then
9552         case $host_os in
9553         linux*|gnu*)
9554                 echo "$as_me:9554: checking if this is really Intel C compiler" >&5
9555 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9556                 cf_save_CFLAGS="$CFLAGS"
9557                 CFLAGS="$CFLAGS -no-gcc"
9558                 cat >conftest.$ac_ext <<_ACEOF
9559 #line 9559 "configure"
9560 #include "confdefs.h"
9561
9562 int
9563 main ()
9564 {
9565
9566 #ifdef __INTEL_COMPILER
9567 #else
9568 make an error
9569 #endif
9570
9571   ;
9572   return 0;
9573 }
9574 _ACEOF
9575 rm -f conftest.$ac_objext
9576 if { (eval echo "$as_me:9576: \"$ac_compile\"") >&5
9577   (eval $ac_compile) 2>&5
9578   ac_status=$?
9579   echo "$as_me:9579: \$? = $ac_status" >&5
9580   (exit $ac_status); } &&
9581          { ac_try='test -s conftest.$ac_objext'
9582   { (eval echo "$as_me:9582: \"$ac_try\"") >&5
9583   (eval $ac_try) 2>&5
9584   ac_status=$?
9585   echo "$as_me:9585: \$? = $ac_status" >&5
9586   (exit $ac_status); }; }; then
9587   INTEL_COMPILER=yes
9588 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9589
9590 else
9591   echo "$as_me: failed program was:" >&5
9592 cat conftest.$ac_ext >&5
9593 fi
9594 rm -f conftest.$ac_objext conftest.$ac_ext
9595                 CFLAGS="$cf_save_CFLAGS"
9596                 echo "$as_me:9596: result: $INTEL_COMPILER" >&5
9597 echo "${ECHO_T}$INTEL_COMPILER" >&6
9598                 ;;
9599         esac
9600 fi
9601
9602 cat > conftest.$ac_ext <<EOF
9603 #line 9603 "${as_me-configure}"
9604 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9605 EOF
9606
9607 if test "$INTEL_COMPILER" = yes
9608 then
9609 # The "-wdXXX" options suppress warnings:
9610 # remark #1419: external declaration in primary source file
9611 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9612 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9613 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9614 # remark #193: zero used for undefined preprocessing identifier
9615 # remark #593: variable "curs_sb_left_arrow" was set but never used
9616 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9617 # remark #869: parameter "tw" was never referenced
9618 # remark #981: operands are evaluated in unspecified order
9619 # warning #269: invalid format string conversion
9620
9621         { echo "$as_me:9621: checking for $CC warning options..." >&5
9622 echo "$as_me: checking for $CC warning options..." >&6;}
9623         cf_save_CFLAGS="$CFLAGS"
9624         EXTRA_CFLAGS="-Wall"
9625         for cf_opt in \
9626                 wd1419 \
9627                 wd1682 \
9628                 wd1683 \
9629                 wd1684 \
9630                 wd193 \
9631                 wd279 \
9632                 wd593 \
9633                 wd810 \
9634                 wd869 \
9635                 wd981
9636         do
9637                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9638                 if { (eval echo "$as_me:9638: \"$ac_compile\"") >&5
9639   (eval $ac_compile) 2>&5
9640   ac_status=$?
9641   echo "$as_me:9641: \$? = $ac_status" >&5
9642   (exit $ac_status); }; then
9643                         test -n "$verbose" && echo "$as_me:9643: result: ... -$cf_opt" >&5
9644 echo "${ECHO_T}... -$cf_opt" >&6
9645                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9646                 fi
9647         done
9648         CFLAGS="$cf_save_CFLAGS"
9649
9650 elif test "$GCC" = yes
9651 then
9652         { echo "$as_me:9652: checking for $CC warning options..." >&5
9653 echo "$as_me: checking for $CC warning options..." >&6;}
9654         cf_save_CFLAGS="$CFLAGS"
9655         EXTRA_CFLAGS="-W -Wall"
9656         cf_warn_CONST=""
9657         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9658         for cf_opt in \
9659                 Wbad-function-cast \
9660                 Wcast-align \
9661                 Wcast-qual \
9662                 Winline \
9663                 Wmissing-declarations \
9664                 Wmissing-prototypes \
9665                 Wnested-externs \
9666                 Wpointer-arith \
9667                 Wshadow \
9668                 Wstrict-prototypes \
9669                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9670         do
9671                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9672                 if { (eval echo "$as_me:9672: \"$ac_compile\"") >&5
9673   (eval $ac_compile) 2>&5
9674   ac_status=$?
9675   echo "$as_me:9675: \$? = $ac_status" >&5
9676   (exit $ac_status); }; then
9677                         test -n "$verbose" && echo "$as_me:9677: result: ... -$cf_opt" >&5
9678 echo "${ECHO_T}... -$cf_opt" >&6
9679                         case $cf_opt in #(vi
9680                         Wcast-qual) #(vi
9681                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9682                                 ;;
9683                         Winline) #(vi
9684                                 case $GCC_VERSION in
9685                                 [34].*)
9686                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9687
9688 echo "${as_me-configure}:9688: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9689
9690                                         continue;;
9691                                 esac
9692                                 ;;
9693                         esac
9694                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9695                 fi
9696         done
9697         CFLAGS="$cf_save_CFLAGS"
9698 fi
9699 rm -f conftest*
9700
9701         if test "$cf_with_cxx" = yes ; then
9702
9703 INTEL_CPLUSPLUS=no
9704
9705 if test "$GCC" = yes ; then
9706         case $host_os in
9707         linux*|gnu*)
9708                 echo "$as_me:9708: checking if this is really Intel C++ compiler" >&5
9709 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9710                 cf_save_CFLAGS="$CXXFLAGS"
9711                 CXXFLAGS="$CXXFLAGS -no-gcc"
9712                 cat >conftest.$ac_ext <<_ACEOF
9713 #line 9713 "configure"
9714 #include "confdefs.h"
9715
9716 int
9717 main ()
9718 {
9719
9720 #ifdef __INTEL_COMPILER
9721 #else
9722 make an error
9723 #endif
9724
9725   ;
9726   return 0;
9727 }
9728 _ACEOF
9729 rm -f conftest.$ac_objext
9730 if { (eval echo "$as_me:9730: \"$ac_compile\"") >&5
9731   (eval $ac_compile) 2>&5
9732   ac_status=$?
9733   echo "$as_me:9733: \$? = $ac_status" >&5
9734   (exit $ac_status); } &&
9735          { ac_try='test -s conftest.$ac_objext'
9736   { (eval echo "$as_me:9736: \"$ac_try\"") >&5
9737   (eval $ac_try) 2>&5
9738   ac_status=$?
9739   echo "$as_me:9739: \$? = $ac_status" >&5
9740   (exit $ac_status); }; }; then
9741   INTEL_CPLUSPLUS=yes
9742 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9743
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat conftest.$ac_ext >&5
9747 fi
9748 rm -f conftest.$ac_objext conftest.$ac_ext
9749                 CXXFLAGS="$cf_save_CFLAGS"
9750                 echo "$as_me:9750: result: $INTEL_CPLUSPLUS" >&5
9751 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9752                 ;;
9753         esac
9754 fi
9755
9756 ac_ext=cc
9757 ac_cpp='$CXXCPP $CPPFLAGS'
9758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9761 ac_main_return=return
9762
9763 cat > conftest.$ac_ext <<EOF
9764 #line 9764 "configure"
9765 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9766 EOF
9767
9768 if test "$INTEL_CPLUSPLUS" = yes
9769 then
9770 # The "-wdXXX" options suppress warnings:
9771 # remark #1419: external declaration in primary source file
9772 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9773 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9774 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9775 # remark #193: zero used for undefined preprocessing identifier
9776 # remark #593: variable "curs_sb_left_arrow" was set but never used
9777 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9778 # remark #869: parameter "tw" was never referenced
9779 # remark #981: operands are evaluated in unspecified order
9780 # warning #269: invalid format string conversion
9781
9782         { echo "$as_me:9782: checking for $CC warning options..." >&5
9783 echo "$as_me: checking for $CC warning options..." >&6;}
9784         cf_save_CXXFLAGS="$CXXFLAGS"
9785         EXTRA_CXXFLAGS="-Wall"
9786         for cf_opt in \
9787                 wd1419 \
9788                 wd1682 \
9789                 wd1683 \
9790                 wd1684 \
9791                 wd193 \
9792                 wd279 \
9793                 wd593 \
9794                 wd810 \
9795                 wd869 \
9796                 wd981
9797         do
9798                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9799                 if { (eval echo "$as_me:9799: \"$ac_compile\"") >&5
9800   (eval $ac_compile) 2>&5
9801   ac_status=$?
9802   echo "$as_me:9802: \$? = $ac_status" >&5
9803   (exit $ac_status); }; then
9804                         test -n "$verbose" && echo "$as_me:9804: result: ... -$cf_opt" >&5
9805 echo "${ECHO_T}... -$cf_opt" >&6
9806                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9807                 fi
9808         done
9809         CXXFLAGS="$cf_save_CXXFLAGS"
9810
9811 elif test "$GXX" = yes
9812 then
9813         { echo "$as_me:9813: checking for $CXX warning options..." >&5
9814 echo "$as_me: checking for $CXX warning options..." >&6;}
9815         cf_save_CXXFLAGS="$CXXFLAGS"
9816         EXTRA_CXXFLAGS="-W -Wall"
9817         cf_gxx_extra_warnings=""
9818         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9819         case "$GCC_VERSION" in
9820         [1-2].*)
9821                 ;;
9822         *)
9823                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9824                 ;;
9825         esac
9826         for cf_opt in \
9827                 Wabi \
9828                 fabi-version=0 \
9829                 Woverloaded-virtual \
9830                 Wsign-promo \
9831                 Wsynth \
9832                 Wold-style-cast \
9833                 Wcast-align \
9834                 Wcast-qual \
9835                 Wmissing-prototypes \
9836                 Wpointer-arith \
9837                 Wshadow \
9838                 Wstrict-prototypes \
9839                 Wundef $cf_gxx_extra_warnings Wno-unused
9840         do
9841                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9842                 if { (eval echo "$as_me:9842: \"$ac_compile\"") >&5
9843   (eval $ac_compile) 2>&5
9844   ac_status=$?
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit $ac_status); }; then
9847                         test -n "$verbose" && echo "$as_me:9847: result: ... -$cf_opt" >&5
9848 echo "${ECHO_T}... -$cf_opt" >&6
9849                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9850                 else
9851                         test -n "$verbose" && echo "$as_me:9851: result: ... no -$cf_opt" >&5
9852 echo "${ECHO_T}... no -$cf_opt" >&6
9853                 fi
9854         done
9855         CXXFLAGS="$cf_save_CXXFLAGS"
9856 fi
9857
9858 rm -f conftest*
9859 ac_ext=c
9860 ac_cpp='$CPP $CPPFLAGS'
9861 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9862 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9863 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9864 ac_main_return=return
9865
9866         fi
9867 fi
9868
9869 if test "$GCC" = yes
9870 then
9871 cat > conftest.i <<EOF
9872 #ifndef GCC_PRINTF
9873 #define GCC_PRINTF 0
9874 #endif
9875 #ifndef GCC_SCANF
9876 #define GCC_SCANF 0
9877 #endif
9878 #ifndef GCC_NORETURN
9879 #define GCC_NORETURN /* nothing */
9880 #endif
9881 #ifndef GCC_UNUSED
9882 #define GCC_UNUSED /* nothing */
9883 #endif
9884 EOF
9885 if test "$GCC" = yes
9886 then
9887         { echo "$as_me:9887: checking for $CC __attribute__ directives..." >&5
9888 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9889 cat > conftest.$ac_ext <<EOF
9890 #line 9890 "${as_me-configure}"
9891 #include "confdefs.h"
9892 #include "conftest.h"
9893 #include "conftest.i"
9894 #if     GCC_PRINTF
9895 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9896 #else
9897 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9898 #endif
9899 #if     GCC_SCANF
9900 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9901 #else
9902 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9903 #endif
9904 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9905 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9906 extern void foo(void) GCC_NORETURN;
9907 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9908 EOF
9909         for cf_attribute in scanf printf unused noreturn
9910         do
9911
9912 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9913
9914                 cf_directive="__attribute__(($cf_attribute))"
9915                 echo "checking for $CC $cf_directive" 1>&5
9916                 case $cf_attribute in
9917                 scanf|printf)
9918                 cat >conftest.h <<EOF
9919 #define GCC_$cf_ATTRIBUTE 1
9920 EOF
9921                         ;;
9922                 *)
9923                 cat >conftest.h <<EOF
9924 #define GCC_$cf_ATTRIBUTE $cf_directive
9925 EOF
9926                         ;;
9927                 esac
9928                 if { (eval echo "$as_me:9928: \"$ac_compile\"") >&5
9929   (eval $ac_compile) 2>&5
9930   ac_status=$?
9931   echo "$as_me:9931: \$? = $ac_status" >&5
9932   (exit $ac_status); }; then
9933                         test -n "$verbose" && echo "$as_me:9933: result: ... $cf_attribute" >&5
9934 echo "${ECHO_T}... $cf_attribute" >&6
9935                         cat conftest.h >>confdefs.h
9936                 fi
9937         done
9938 else
9939         fgrep define conftest.i >>confdefs.h
9940 fi
9941 rm -rf conftest*
9942 fi
9943
9944 ###     use option --enable-assertions to turn on generation of assertion code
9945 echo "$as_me:9945: checking if you want to enable runtime assertions" >&5
9946 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9947
9948 # Check whether --enable-assertions or --disable-assertions was given.
9949 if test "${enable_assertions+set}" = set; then
9950   enableval="$enable_assertions"
9951   with_assertions=$enableval
9952 else
9953   with_assertions=no
9954 fi;
9955 echo "$as_me:9955: result: $with_assertions" >&5
9956 echo "${ECHO_T}$with_assertions" >&6
9957 if test -n "$GCC"
9958 then
9959         if test "$with_assertions" = no
9960         then
9961                 cat >>confdefs.h <<\EOF
9962 #define NDEBUG 1
9963 EOF
9964
9965                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9966         else
9967                 ADAFLAGS="$ADAFLAGS -gnata"
9968         fi
9969 fi
9970
9971 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9972
9973 echo "$as_me:9973: checking if you want to use dmalloc for testing" >&5
9974 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9975
9976 # Check whether --with-dmalloc or --without-dmalloc was given.
9977 if test "${with_dmalloc+set}" = set; then
9978   withval="$with_dmalloc"
9979   cat >>confdefs.h <<\EOF
9980 #define USE_DMALLOC 1
9981 EOF
9982
9983         : ${with_cflags:=-g}
9984         : ${with_no_leaks:=yes}
9985          with_dmalloc=yes
9986 else
9987   with_dmalloc=
9988 fi;
9989 echo "$as_me:9989: result: ${with_dmalloc:-no}" >&5
9990 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9991
9992 case .$with_cflags in #(vi
9993 .*-g*)
9994         case .$CFLAGS in #(vi
9995         .*-g*) #(vi
9996                 ;;
9997         *)
9998
9999 cf_fix_cppflags=no
10000 cf_new_cflags=
10001 cf_new_cppflags=
10002 cf_new_extra_cppflags=
10003
10004 for cf_add_cflags in -g
10005 do
10006 case $cf_fix_cppflags in
10007 no)
10008         case $cf_add_cflags in #(vi
10009         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10010                 case $cf_add_cflags in
10011                 -D*)
10012                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10013
10014                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10015                         && test -z "${cf_tst_cflags}" \
10016                         && cf_fix_cppflags=yes
10017
10018                         if test $cf_fix_cppflags = yes ; then
10019                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10020                                 continue
10021                         elif test "${cf_tst_cflags}" = "\"'" ; then
10022                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10023                                 continue
10024                         fi
10025                         ;;
10026                 esac
10027                 case "$CPPFLAGS" in
10028                 *$cf_add_cflags) #(vi
10029                         ;;
10030                 *) #(vi
10031                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10032                         ;;
10033                 esac
10034                 ;;
10035         *)
10036                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10037                 ;;
10038         esac
10039         ;;
10040 yes)
10041         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10042
10043         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10044
10045         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10046         && test -z "${cf_tst_cflags}" \
10047         && cf_fix_cppflags=no
10048         ;;
10049 esac
10050 done
10051
10052 if test -n "$cf_new_cflags" ; then
10053
10054         CFLAGS="$CFLAGS $cf_new_cflags"
10055 fi
10056
10057 if test -n "$cf_new_cppflags" ; then
10058
10059         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10060 fi
10061
10062 if test -n "$cf_new_extra_cppflags" ; then
10063
10064         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10065 fi
10066
10067                 ;;
10068         esac
10069         ;;
10070 esac
10071
10072 if test "$with_dmalloc" = yes ; then
10073         echo "$as_me:10073: checking for dmalloc.h" >&5
10074 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10075 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10076   echo $ECHO_N "(cached) $ECHO_C" >&6
10077 else
10078   cat >conftest.$ac_ext <<_ACEOF
10079 #line 10079 "configure"
10080 #include "confdefs.h"
10081 #include <dmalloc.h>
10082 _ACEOF
10083 if { (eval echo "$as_me:10083: \"$ac_cpp conftest.$ac_ext\"") >&5
10084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10085   ac_status=$?
10086   egrep -v '^ *\+' conftest.er1 >conftest.err
10087   rm -f conftest.er1
10088   cat conftest.err >&5
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); } >/dev/null; then
10091   if test -s conftest.err; then
10092     ac_cpp_err=$ac_c_preproc_warn_flag
10093   else
10094     ac_cpp_err=
10095   fi
10096 else
10097   ac_cpp_err=yes
10098 fi
10099 if test -z "$ac_cpp_err"; then
10100   ac_cv_header_dmalloc_h=yes
10101 else
10102   echo "$as_me: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   ac_cv_header_dmalloc_h=no
10105 fi
10106 rm -f conftest.err conftest.$ac_ext
10107 fi
10108 echo "$as_me:10108: result: $ac_cv_header_dmalloc_h" >&5
10109 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10110 if test $ac_cv_header_dmalloc_h = yes; then
10111
10112 echo "$as_me:10112: checking for dmalloc_debug in -ldmalloc" >&5
10113 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10114 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10115   echo $ECHO_N "(cached) $ECHO_C" >&6
10116 else
10117   ac_check_lib_save_LIBS=$LIBS
10118 LIBS="-ldmalloc  $LIBS"
10119 cat >conftest.$ac_ext <<_ACEOF
10120 #line 10120 "configure"
10121 #include "confdefs.h"
10122
10123 /* Override any gcc2 internal prototype to avoid an error.  */
10124 #ifdef __cplusplus
10125 extern "C"
10126 #endif
10127 /* We use char because int might match the return type of a gcc2
10128    builtin and then its argument prototype would still apply.  */
10129 char dmalloc_debug ();
10130 int
10131 main ()
10132 {
10133 dmalloc_debug ();
10134   ;
10135   return 0;
10136 }
10137 _ACEOF
10138 rm -f conftest.$ac_objext conftest$ac_exeext
10139 if { (eval echo "$as_me:10139: \"$ac_link\"") >&5
10140   (eval $ac_link) 2>&5
10141   ac_status=$?
10142   echo "$as_me:10142: \$? = $ac_status" >&5
10143   (exit $ac_status); } &&
10144          { ac_try='test -s conftest$ac_exeext'
10145   { (eval echo "$as_me:10145: \"$ac_try\"") >&5
10146   (eval $ac_try) 2>&5
10147   ac_status=$?
10148   echo "$as_me:10148: \$? = $ac_status" >&5
10149   (exit $ac_status); }; }; then
10150   ac_cv_lib_dmalloc_dmalloc_debug=yes
10151 else
10152   echo "$as_me: failed program was:" >&5
10153 cat conftest.$ac_ext >&5
10154 ac_cv_lib_dmalloc_dmalloc_debug=no
10155 fi
10156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10157 LIBS=$ac_check_lib_save_LIBS
10158 fi
10159 echo "$as_me:10159: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10160 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10161 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10162   cat >>confdefs.h <<EOF
10163 #define HAVE_LIBDMALLOC 1
10164 EOF
10165
10166   LIBS="-ldmalloc $LIBS"
10167
10168 fi
10169
10170 fi
10171
10172 fi
10173
10174 echo "$as_me:10174: checking if you want to use dbmalloc for testing" >&5
10175 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10176
10177 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10178 if test "${with_dbmalloc+set}" = set; then
10179   withval="$with_dbmalloc"
10180   cat >>confdefs.h <<\EOF
10181 #define USE_DBMALLOC 1
10182 EOF
10183
10184         : ${with_cflags:=-g}
10185         : ${with_no_leaks:=yes}
10186          with_dbmalloc=yes
10187 else
10188   with_dbmalloc=
10189 fi;
10190 echo "$as_me:10190: result: ${with_dbmalloc:-no}" >&5
10191 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10192
10193 case .$with_cflags in #(vi
10194 .*-g*)
10195         case .$CFLAGS in #(vi
10196         .*-g*) #(vi
10197                 ;;
10198         *)
10199
10200 cf_fix_cppflags=no
10201 cf_new_cflags=
10202 cf_new_cppflags=
10203 cf_new_extra_cppflags=
10204
10205 for cf_add_cflags in -g
10206 do
10207 case $cf_fix_cppflags in
10208 no)
10209         case $cf_add_cflags in #(vi
10210         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10211                 case $cf_add_cflags in
10212                 -D*)
10213                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10214
10215                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10216                         && test -z "${cf_tst_cflags}" \
10217                         && cf_fix_cppflags=yes
10218
10219                         if test $cf_fix_cppflags = yes ; then
10220                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10221                                 continue
10222                         elif test "${cf_tst_cflags}" = "\"'" ; then
10223                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10224                                 continue
10225                         fi
10226                         ;;
10227                 esac
10228                 case "$CPPFLAGS" in
10229                 *$cf_add_cflags) #(vi
10230                         ;;
10231                 *) #(vi
10232                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10233                         ;;
10234                 esac
10235                 ;;
10236         *)
10237                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10238                 ;;
10239         esac
10240         ;;
10241 yes)
10242         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10243
10244         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10245
10246         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10247         && test -z "${cf_tst_cflags}" \
10248         && cf_fix_cppflags=no
10249         ;;
10250 esac
10251 done
10252
10253 if test -n "$cf_new_cflags" ; then
10254
10255         CFLAGS="$CFLAGS $cf_new_cflags"
10256 fi
10257
10258 if test -n "$cf_new_cppflags" ; then
10259
10260         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10261 fi
10262
10263 if test -n "$cf_new_extra_cppflags" ; then
10264
10265         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10266 fi
10267
10268                 ;;
10269         esac
10270         ;;
10271 esac
10272
10273 if test "$with_dbmalloc" = yes ; then
10274         echo "$as_me:10274: checking for dbmalloc.h" >&5
10275 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10276 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10277   echo $ECHO_N "(cached) $ECHO_C" >&6
10278 else
10279   cat >conftest.$ac_ext <<_ACEOF
10280 #line 10280 "configure"
10281 #include "confdefs.h"
10282 #include <dbmalloc.h>
10283 _ACEOF
10284 if { (eval echo "$as_me:10284: \"$ac_cpp conftest.$ac_ext\"") >&5
10285   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10286   ac_status=$?
10287   egrep -v '^ *\+' conftest.er1 >conftest.err
10288   rm -f conftest.er1
10289   cat conftest.err >&5
10290   echo "$as_me:10290: \$? = $ac_status" >&5
10291   (exit $ac_status); } >/dev/null; then
10292   if test -s conftest.err; then
10293     ac_cpp_err=$ac_c_preproc_warn_flag
10294   else
10295     ac_cpp_err=
10296   fi
10297 else
10298   ac_cpp_err=yes
10299 fi
10300 if test -z "$ac_cpp_err"; then
10301   ac_cv_header_dbmalloc_h=yes
10302 else
10303   echo "$as_me: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   ac_cv_header_dbmalloc_h=no
10306 fi
10307 rm -f conftest.err conftest.$ac_ext
10308 fi
10309 echo "$as_me:10309: result: $ac_cv_header_dbmalloc_h" >&5
10310 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10311 if test $ac_cv_header_dbmalloc_h = yes; then
10312
10313 echo "$as_me:10313: checking for debug_malloc in -ldbmalloc" >&5
10314 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10315 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10316   echo $ECHO_N "(cached) $ECHO_C" >&6
10317 else
10318   ac_check_lib_save_LIBS=$LIBS
10319 LIBS="-ldbmalloc  $LIBS"
10320 cat >conftest.$ac_ext <<_ACEOF
10321 #line 10321 "configure"
10322 #include "confdefs.h"
10323
10324 /* Override any gcc2 internal prototype to avoid an error.  */
10325 #ifdef __cplusplus
10326 extern "C"
10327 #endif
10328 /* We use char because int might match the return type of a gcc2
10329    builtin and then its argument prototype would still apply.  */
10330 char debug_malloc ();
10331 int
10332 main ()
10333 {
10334 debug_malloc ();
10335   ;
10336   return 0;
10337 }
10338 _ACEOF
10339 rm -f conftest.$ac_objext conftest$ac_exeext
10340 if { (eval echo "$as_me:10340: \"$ac_link\"") >&5
10341   (eval $ac_link) 2>&5
10342   ac_status=$?
10343   echo "$as_me:10343: \$? = $ac_status" >&5
10344   (exit $ac_status); } &&
10345          { ac_try='test -s conftest$ac_exeext'
10346   { (eval echo "$as_me:10346: \"$ac_try\"") >&5
10347   (eval $ac_try) 2>&5
10348   ac_status=$?
10349   echo "$as_me:10349: \$? = $ac_status" >&5
10350   (exit $ac_status); }; }; then
10351   ac_cv_lib_dbmalloc_debug_malloc=yes
10352 else
10353   echo "$as_me: failed program was:" >&5
10354 cat conftest.$ac_ext >&5
10355 ac_cv_lib_dbmalloc_debug_malloc=no
10356 fi
10357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10358 LIBS=$ac_check_lib_save_LIBS
10359 fi
10360 echo "$as_me:10360: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10361 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10362 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10363   cat >>confdefs.h <<EOF
10364 #define HAVE_LIBDBMALLOC 1
10365 EOF
10366
10367   LIBS="-ldbmalloc $LIBS"
10368
10369 fi
10370
10371 fi
10372
10373 fi
10374
10375 echo "$as_me:10375: checking if you want to use valgrind for testing" >&5
10376 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10377
10378 # Check whether --with-valgrind or --without-valgrind was given.
10379 if test "${with_valgrind+set}" = set; then
10380   withval="$with_valgrind"
10381   cat >>confdefs.h <<\EOF
10382 #define USE_VALGRIND 1
10383 EOF
10384
10385         : ${with_cflags:=-g}
10386         : ${with_no_leaks:=yes}
10387          with_valgrind=yes
10388 else
10389   with_valgrind=
10390 fi;
10391 echo "$as_me:10391: result: ${with_valgrind:-no}" >&5
10392 echo "${ECHO_T}${with_valgrind:-no}" >&6
10393
10394 case .$with_cflags in #(vi
10395 .*-g*)
10396         case .$CFLAGS in #(vi
10397         .*-g*) #(vi
10398                 ;;
10399         *)
10400
10401 cf_fix_cppflags=no
10402 cf_new_cflags=
10403 cf_new_cppflags=
10404 cf_new_extra_cppflags=
10405
10406 for cf_add_cflags in -g
10407 do
10408 case $cf_fix_cppflags in
10409 no)
10410         case $cf_add_cflags in #(vi
10411         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10412                 case $cf_add_cflags in
10413                 -D*)
10414                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10415
10416                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10417                         && test -z "${cf_tst_cflags}" \
10418                         && cf_fix_cppflags=yes
10419
10420                         if test $cf_fix_cppflags = yes ; then
10421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10422                                 continue
10423                         elif test "${cf_tst_cflags}" = "\"'" ; then
10424                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10425                                 continue
10426                         fi
10427                         ;;
10428                 esac
10429                 case "$CPPFLAGS" in
10430                 *$cf_add_cflags) #(vi
10431                         ;;
10432                 *) #(vi
10433                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10434                         ;;
10435                 esac
10436                 ;;
10437         *)
10438                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10439                 ;;
10440         esac
10441         ;;
10442 yes)
10443         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10444
10445         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10446
10447         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10448         && test -z "${cf_tst_cflags}" \
10449         && cf_fix_cppflags=no
10450         ;;
10451 esac
10452 done
10453
10454 if test -n "$cf_new_cflags" ; then
10455
10456         CFLAGS="$CFLAGS $cf_new_cflags"
10457 fi
10458
10459 if test -n "$cf_new_cppflags" ; then
10460
10461         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10462 fi
10463
10464 if test -n "$cf_new_extra_cppflags" ; then
10465
10466         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10467 fi
10468
10469                 ;;
10470         esac
10471         ;;
10472 esac
10473
10474 echo "$as_me:10474: checking if you want to perform memory-leak testing" >&5
10475 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10476
10477 # Check whether --enable-leaks or --disable-leaks was given.
10478 if test "${enable_leaks+set}" = set; then
10479   enableval="$enable_leaks"
10480   with_no_leaks=yes
10481 else
10482   : ${with_no_leaks:=no}
10483 fi;
10484 echo "$as_me:10484: result: $with_no_leaks" >&5
10485 echo "${ECHO_T}$with_no_leaks" >&6
10486
10487 if test "$with_no_leaks" = yes ; then
10488         cat >>confdefs.h <<\EOF
10489 #define NO_LEAKS 1
10490 EOF
10491
10492 fi
10493
10494 cat >>confdefs.h <<\EOF
10495 #define HAVE_NC_ALLOC_H 1
10496 EOF
10497
10498 ###     use option --enable-expanded to generate certain macros as functions
10499
10500 # Check whether --enable-expanded or --disable-expanded was given.
10501 if test "${enable_expanded+set}" = set; then
10502   enableval="$enable_expanded"
10503   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10504 #define NCURSES_EXPANDED 1
10505 EOF
10506
10507 fi;
10508
10509 ###     use option --disable-macros to suppress macros in favor of functions
10510
10511 # Check whether --enable-macros or --disable-macros was given.
10512 if test "${enable_macros+set}" = set; then
10513   enableval="$enable_macros"
10514   test "$enableval" = no && cat >>confdefs.h <<\EOF
10515 #define NCURSES_NOMACROS 1
10516 EOF
10517
10518 fi;
10519
10520 # Normally we only add trace() to the debug-library.  Allow this to be
10521 # extended to all models of the ncurses library:
10522 cf_all_traces=no
10523 case "$CFLAGS $CPPFLAGS" in
10524 *-DTRACE*)
10525         cf_all_traces=yes
10526         ;;
10527 esac
10528
10529 echo "$as_me:10529: checking whether to add trace feature to all models" >&5
10530 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10531
10532 # Check whether --with-trace or --without-trace was given.
10533 if test "${with_trace+set}" = set; then
10534   withval="$with_trace"
10535   cf_with_trace=$withval
10536 else
10537   cf_with_trace=$cf_all_traces
10538 fi;
10539 echo "$as_me:10539: result: $cf_with_trace" >&5
10540 echo "${ECHO_T}$cf_with_trace" >&6
10541
10542 if test "$cf_with_trace" = yes ; then
10543         LIB_TRACING=all
10544         ADA_TRACE=TRUE
10545
10546 cf_fix_cppflags=no
10547 cf_new_cflags=
10548 cf_new_cppflags=
10549 cf_new_extra_cppflags=
10550
10551 for cf_add_cflags in -DTRACE
10552 do
10553 case $cf_fix_cppflags in
10554 no)
10555         case $cf_add_cflags in #(vi
10556         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10557                 case $cf_add_cflags in
10558                 -D*)
10559                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10560
10561                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10562                         && test -z "${cf_tst_cflags}" \
10563                         && cf_fix_cppflags=yes
10564
10565                         if test $cf_fix_cppflags = yes ; then
10566                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10567                                 continue
10568                         elif test "${cf_tst_cflags}" = "\"'" ; then
10569                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10570                                 continue
10571                         fi
10572                         ;;
10573                 esac
10574                 case "$CPPFLAGS" in
10575                 *$cf_add_cflags) #(vi
10576                         ;;
10577                 *) #(vi
10578                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10579                         ;;
10580                 esac
10581                 ;;
10582         *)
10583                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10584                 ;;
10585         esac
10586         ;;
10587 yes)
10588         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10589
10590         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10591
10592         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10593         && test -z "${cf_tst_cflags}" \
10594         && cf_fix_cppflags=no
10595         ;;
10596 esac
10597 done
10598
10599 if test -n "$cf_new_cflags" ; then
10600
10601         CFLAGS="$CFLAGS $cf_new_cflags"
10602 fi
10603
10604 if test -n "$cf_new_cppflags" ; then
10605
10606         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10607 fi
10608
10609 if test -n "$cf_new_extra_cppflags" ; then
10610
10611         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10612 fi
10613
10614 else
10615         LIB_TRACING=DEBUG
10616         ADA_TRACE=FALSE
10617 fi
10618
10619 ###     Checks for libraries.
10620 echo "$as_me:10620: checking for gettimeofday" >&5
10621 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10622 if test "${ac_cv_func_gettimeofday+set}" = set; then
10623   echo $ECHO_N "(cached) $ECHO_C" >&6
10624 else
10625   cat >conftest.$ac_ext <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628 /* System header to define __stub macros and hopefully few prototypes,
10629     which can conflict with char gettimeofday (); below.  */
10630 #include <assert.h>
10631 /* Override any gcc2 internal prototype to avoid an error.  */
10632 #ifdef __cplusplus
10633 extern "C"
10634 #endif
10635 /* We use char because int might match the return type of a gcc2
10636    builtin and then its argument prototype would still apply.  */
10637 char gettimeofday ();
10638 char (*f) ();
10639
10640 int
10641 main ()
10642 {
10643 /* The GNU C library defines this for functions which it implements
10644     to always fail with ENOSYS.  Some functions are actually named
10645     something starting with __ and the normal name is an alias.  */
10646 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10647 choke me
10648 #else
10649 f = gettimeofday;
10650 #endif
10651
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 rm -f conftest.$ac_objext conftest$ac_exeext
10657 if { (eval echo "$as_me:10657: \"$ac_link\"") >&5
10658   (eval $ac_link) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit $ac_status); } &&
10662          { ac_try='test -s conftest$ac_exeext'
10663   { (eval echo "$as_me:10663: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); }; }; then
10668   ac_cv_func_gettimeofday=yes
10669 else
10670   echo "$as_me: failed program was:" >&5
10671 cat conftest.$ac_ext >&5
10672 ac_cv_func_gettimeofday=no
10673 fi
10674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10675 fi
10676 echo "$as_me:10676: result: $ac_cv_func_gettimeofday" >&5
10677 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10678 if test $ac_cv_func_gettimeofday = yes; then
10679   cat >>confdefs.h <<\EOF
10680 #define HAVE_GETTIMEOFDAY 1
10681 EOF
10682
10683 else
10684
10685 echo "$as_me:10685: checking for gettimeofday in -lbsd" >&5
10686 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10687 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10688   echo $ECHO_N "(cached) $ECHO_C" >&6
10689 else
10690   ac_check_lib_save_LIBS=$LIBS
10691 LIBS="-lbsd  $LIBS"
10692 cat >conftest.$ac_ext <<_ACEOF
10693 #line 10693 "configure"
10694 #include "confdefs.h"
10695
10696 /* Override any gcc2 internal prototype to avoid an error.  */
10697 #ifdef __cplusplus
10698 extern "C"
10699 #endif
10700 /* We use char because int might match the return type of a gcc2
10701    builtin and then its argument prototype would still apply.  */
10702 char gettimeofday ();
10703 int
10704 main ()
10705 {
10706 gettimeofday ();
10707   ;
10708   return 0;
10709 }
10710 _ACEOF
10711 rm -f conftest.$ac_objext conftest$ac_exeext
10712 if { (eval echo "$as_me:10712: \"$ac_link\"") >&5
10713   (eval $ac_link) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit $ac_status); } &&
10717          { ac_try='test -s conftest$ac_exeext'
10718   { (eval echo "$as_me:10718: \"$ac_try\"") >&5
10719   (eval $ac_try) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit $ac_status); }; }; then
10723   ac_cv_lib_bsd_gettimeofday=yes
10724 else
10725   echo "$as_me: failed program was:" >&5
10726 cat conftest.$ac_ext >&5
10727 ac_cv_lib_bsd_gettimeofday=no
10728 fi
10729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10730 LIBS=$ac_check_lib_save_LIBS
10731 fi
10732 echo "$as_me:10732: result: $ac_cv_lib_bsd_gettimeofday" >&5
10733 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10734 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10735   cat >>confdefs.h <<\EOF
10736 #define HAVE_GETTIMEOFDAY 1
10737 EOF
10738
10739         LIBS="$LIBS -lbsd"
10740 fi
10741
10742 fi
10743
10744 echo "$as_me:10744: checking if -lm needed for math functions" >&5
10745 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10746 if test "${cf_cv_need_libm+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749
10750         cat >conftest.$ac_ext <<_ACEOF
10751 #line 10751 "configure"
10752 #include "confdefs.h"
10753
10754         #include <stdio.h>
10755         #include <math.h>
10756
10757 int
10758 main ()
10759 {
10760 double x = rand(); printf("result = %g\n", sin(x))
10761   ;
10762   return 0;
10763 }
10764 _ACEOF
10765 rm -f conftest.$ac_objext conftest$ac_exeext
10766 if { (eval echo "$as_me:10766: \"$ac_link\"") >&5
10767   (eval $ac_link) 2>&5
10768   ac_status=$?
10769   echo "$as_me:10769: \$? = $ac_status" >&5
10770   (exit $ac_status); } &&
10771          { ac_try='test -s conftest$ac_exeext'
10772   { (eval echo "$as_me:10772: \"$ac_try\"") >&5
10773   (eval $ac_try) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); }; }; then
10777   cf_cv_need_libm=no
10778 else
10779   echo "$as_me: failed program was:" >&5
10780 cat conftest.$ac_ext >&5
10781 cf_cv_need_libm=yes
10782 fi
10783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10784 fi
10785 echo "$as_me:10785: result: $cf_cv_need_libm" >&5
10786 echo "${ECHO_T}$cf_cv_need_libm" >&6
10787 if test "$cf_cv_need_libm" = yes
10788 then
10789 MATH_LIB=-lm
10790 fi
10791
10792 ###     Checks for header files.
10793 echo "$as_me:10793: checking for ANSI C header files" >&5
10794 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10795 if test "${ac_cv_header_stdc+set}" = set; then
10796   echo $ECHO_N "(cached) $ECHO_C" >&6
10797 else
10798   cat >conftest.$ac_ext <<_ACEOF
10799 #line 10799 "configure"
10800 #include "confdefs.h"
10801 #include <stdlib.h>
10802 #include <stdarg.h>
10803 #include <string.h>
10804 #include <float.h>
10805
10806 _ACEOF
10807 if { (eval echo "$as_me:10807: \"$ac_cpp conftest.$ac_ext\"") >&5
10808   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10809   ac_status=$?
10810   egrep -v '^ *\+' conftest.er1 >conftest.err
10811   rm -f conftest.er1
10812   cat conftest.err >&5
10813   echo "$as_me:10813: \$? = $ac_status" >&5
10814   (exit $ac_status); } >/dev/null; then
10815   if test -s conftest.err; then
10816     ac_cpp_err=$ac_c_preproc_warn_flag
10817   else
10818     ac_cpp_err=
10819   fi
10820 else
10821   ac_cpp_err=yes
10822 fi
10823 if test -z "$ac_cpp_err"; then
10824   ac_cv_header_stdc=yes
10825 else
10826   echo "$as_me: failed program was:" >&5
10827   cat conftest.$ac_ext >&5
10828   ac_cv_header_stdc=no
10829 fi
10830 rm -f conftest.err conftest.$ac_ext
10831
10832 if test $ac_cv_header_stdc = yes; then
10833   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10834   cat >conftest.$ac_ext <<_ACEOF
10835 #line 10835 "configure"
10836 #include "confdefs.h"
10837 #include <string.h>
10838
10839 _ACEOF
10840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10841   egrep "memchr" >/dev/null 2>&1; then
10842   :
10843 else
10844   ac_cv_header_stdc=no
10845 fi
10846 rm -f conftest*
10847
10848 fi
10849
10850 if test $ac_cv_header_stdc = yes; then
10851   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10852   cat >conftest.$ac_ext <<_ACEOF
10853 #line 10853 "configure"
10854 #include "confdefs.h"
10855 #include <stdlib.h>
10856
10857 _ACEOF
10858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10859   egrep "free" >/dev/null 2>&1; then
10860   :
10861 else
10862   ac_cv_header_stdc=no
10863 fi
10864 rm -f conftest*
10865
10866 fi
10867
10868 if test $ac_cv_header_stdc = yes; then
10869   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10870   if test "$cross_compiling" = yes; then
10871   :
10872 else
10873   cat >conftest.$ac_ext <<_ACEOF
10874 #line 10874 "configure"
10875 #include "confdefs.h"
10876 #include <ctype.h>
10877 #if ((' ' & 0x0FF) == 0x020)
10878 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10879 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10880 #else
10881 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10882                      || ('j' <= (c) && (c) <= 'r') \
10883                      || ('s' <= (c) && (c) <= 'z'))
10884 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10885 #endif
10886
10887 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10888 int
10889 main ()
10890 {
10891   int i;
10892   for (i = 0; i < 256; i++)
10893     if (XOR (islower (i), ISLOWER (i))
10894         || toupper (i) != TOUPPER (i))
10895       $ac_main_return(2);
10896   $ac_main_return (0);
10897 }
10898 _ACEOF
10899 rm -f conftest$ac_exeext
10900 if { (eval echo "$as_me:10900: \"$ac_link\"") >&5
10901   (eval $ac_link) 2>&5
10902   ac_status=$?
10903   echo "$as_me:10903: \$? = $ac_status" >&5
10904   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10905   { (eval echo "$as_me:10905: \"$ac_try\"") >&5
10906   (eval $ac_try) 2>&5
10907   ac_status=$?
10908   echo "$as_me:10908: \$? = $ac_status" >&5
10909   (exit $ac_status); }; }; then
10910   :
10911 else
10912   echo "$as_me: program exited with status $ac_status" >&5
10913 echo "$as_me: failed program was:" >&5
10914 cat conftest.$ac_ext >&5
10915 ac_cv_header_stdc=no
10916 fi
10917 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10918 fi
10919 fi
10920 fi
10921 echo "$as_me:10921: result: $ac_cv_header_stdc" >&5
10922 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10923 if test $ac_cv_header_stdc = yes; then
10924
10925 cat >>confdefs.h <<\EOF
10926 #define STDC_HEADERS 1
10927 EOF
10928
10929 fi
10930
10931 ac_header_dirent=no
10932 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10933   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10934 echo "$as_me:10934: checking for $ac_hdr that defines DIR" >&5
10935 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10937   echo $ECHO_N "(cached) $ECHO_C" >&6
10938 else
10939   cat >conftest.$ac_ext <<_ACEOF
10940 #line 10940 "configure"
10941 #include "confdefs.h"
10942 #include <sys/types.h>
10943 #include <$ac_hdr>
10944
10945 int
10946 main ()
10947 {
10948 if ((DIR *) 0)
10949 return 0;
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 rm -f conftest.$ac_objext
10955 if { (eval echo "$as_me:10955: \"$ac_compile\"") >&5
10956   (eval $ac_compile) 2>&5
10957   ac_status=$?
10958   echo "$as_me:10958: \$? = $ac_status" >&5
10959   (exit $ac_status); } &&
10960          { ac_try='test -s conftest.$ac_objext'
10961   { (eval echo "$as_me:10961: \"$ac_try\"") >&5
10962   (eval $ac_try) 2>&5
10963   ac_status=$?
10964   echo "$as_me:10964: \$? = $ac_status" >&5
10965   (exit $ac_status); }; }; then
10966   eval "$as_ac_Header=yes"
10967 else
10968   echo "$as_me: failed program was:" >&5
10969 cat conftest.$ac_ext >&5
10970 eval "$as_ac_Header=no"
10971 fi
10972 rm -f conftest.$ac_objext conftest.$ac_ext
10973 fi
10974 echo "$as_me:10974: result: `eval echo '${'$as_ac_Header'}'`" >&5
10975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10976 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10977   cat >>confdefs.h <<EOF
10978 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10979 EOF
10980
10981 ac_header_dirent=$ac_hdr; break
10982 fi
10983
10984 done
10985 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10986 if test $ac_header_dirent = dirent.h; then
10987   echo "$as_me:10987: checking for opendir in -ldir" >&5
10988 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10989 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10990   echo $ECHO_N "(cached) $ECHO_C" >&6
10991 else
10992   ac_check_lib_save_LIBS=$LIBS
10993 LIBS="-ldir  $LIBS"
10994 cat >conftest.$ac_ext <<_ACEOF
10995 #line 10995 "configure"
10996 #include "confdefs.h"
10997
10998 /* Override any gcc2 internal prototype to avoid an error.  */
10999 #ifdef __cplusplus
11000 extern "C"
11001 #endif
11002 /* We use char because int might match the return type of a gcc2
11003    builtin and then its argument prototype would still apply.  */
11004 char opendir ();
11005 int
11006 main ()
11007 {
11008 opendir ();
11009   ;
11010   return 0;
11011 }
11012 _ACEOF
11013 rm -f conftest.$ac_objext conftest$ac_exeext
11014 if { (eval echo "$as_me:11014: \"$ac_link\"") >&5
11015   (eval $ac_link) 2>&5
11016   ac_status=$?
11017   echo "$as_me:11017: \$? = $ac_status" >&5
11018   (exit $ac_status); } &&
11019          { ac_try='test -s conftest$ac_exeext'
11020   { (eval echo "$as_me:11020: \"$ac_try\"") >&5
11021   (eval $ac_try) 2>&5
11022   ac_status=$?
11023   echo "$as_me:11023: \$? = $ac_status" >&5
11024   (exit $ac_status); }; }; then
11025   ac_cv_lib_dir_opendir=yes
11026 else
11027   echo "$as_me: failed program was:" >&5
11028 cat conftest.$ac_ext >&5
11029 ac_cv_lib_dir_opendir=no
11030 fi
11031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11032 LIBS=$ac_check_lib_save_LIBS
11033 fi
11034 echo "$as_me:11034: result: $ac_cv_lib_dir_opendir" >&5
11035 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11036 if test $ac_cv_lib_dir_opendir = yes; then
11037   LIBS="$LIBS -ldir"
11038 fi
11039
11040 else
11041   echo "$as_me:11041: checking for opendir in -lx" >&5
11042 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11043 if test "${ac_cv_lib_x_opendir+set}" = set; then
11044   echo $ECHO_N "(cached) $ECHO_C" >&6
11045 else
11046   ac_check_lib_save_LIBS=$LIBS
11047 LIBS="-lx  $LIBS"
11048 cat >conftest.$ac_ext <<_ACEOF
11049 #line 11049 "configure"
11050 #include "confdefs.h"
11051
11052 /* Override any gcc2 internal prototype to avoid an error.  */
11053 #ifdef __cplusplus
11054 extern "C"
11055 #endif
11056 /* We use char because int might match the return type of a gcc2
11057    builtin and then its argument prototype would still apply.  */
11058 char opendir ();
11059 int
11060 main ()
11061 {
11062 opendir ();
11063   ;
11064   return 0;
11065 }
11066 _ACEOF
11067 rm -f conftest.$ac_objext conftest$ac_exeext
11068 if { (eval echo "$as_me:11068: \"$ac_link\"") >&5
11069   (eval $ac_link) 2>&5
11070   ac_status=$?
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit $ac_status); } &&
11073          { ac_try='test -s conftest$ac_exeext'
11074   { (eval echo "$as_me:11074: \"$ac_try\"") >&5
11075   (eval $ac_try) 2>&5
11076   ac_status=$?
11077   echo "$as_me:11077: \$? = $ac_status" >&5
11078   (exit $ac_status); }; }; then
11079   ac_cv_lib_x_opendir=yes
11080 else
11081   echo "$as_me: failed program was:" >&5
11082 cat conftest.$ac_ext >&5
11083 ac_cv_lib_x_opendir=no
11084 fi
11085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11086 LIBS=$ac_check_lib_save_LIBS
11087 fi
11088 echo "$as_me:11088: result: $ac_cv_lib_x_opendir" >&5
11089 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11090 if test $ac_cv_lib_x_opendir = yes; then
11091   LIBS="$LIBS -lx"
11092 fi
11093
11094 fi
11095
11096 echo "$as_me:11096: checking whether time.h and sys/time.h may both be included" >&5
11097 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11098 if test "${ac_cv_header_time+set}" = set; then
11099   echo $ECHO_N "(cached) $ECHO_C" >&6
11100 else
11101   cat >conftest.$ac_ext <<_ACEOF
11102 #line 11102 "configure"
11103 #include "confdefs.h"
11104 #include <sys/types.h>
11105 #include <sys/time.h>
11106 #include <time.h>
11107
11108 int
11109 main ()
11110 {
11111 if ((struct tm *) 0)
11112 return 0;
11113   ;
11114   return 0;
11115 }
11116 _ACEOF
11117 rm -f conftest.$ac_objext
11118 if { (eval echo "$as_me:11118: \"$ac_compile\"") >&5
11119   (eval $ac_compile) 2>&5
11120   ac_status=$?
11121   echo "$as_me:11121: \$? = $ac_status" >&5
11122   (exit $ac_status); } &&
11123          { ac_try='test -s conftest.$ac_objext'
11124   { (eval echo "$as_me:11124: \"$ac_try\"") >&5
11125   (eval $ac_try) 2>&5
11126   ac_status=$?
11127   echo "$as_me:11127: \$? = $ac_status" >&5
11128   (exit $ac_status); }; }; then
11129   ac_cv_header_time=yes
11130 else
11131   echo "$as_me: failed program was:" >&5
11132 cat conftest.$ac_ext >&5
11133 ac_cv_header_time=no
11134 fi
11135 rm -f conftest.$ac_objext conftest.$ac_ext
11136 fi
11137 echo "$as_me:11137: result: $ac_cv_header_time" >&5
11138 echo "${ECHO_T}$ac_cv_header_time" >&6
11139 if test $ac_cv_header_time = yes; then
11140
11141 cat >>confdefs.h <<\EOF
11142 #define TIME_WITH_SYS_TIME 1
11143 EOF
11144
11145 fi
11146
11147 echo "$as_me:11147: checking for regular-expression headers" >&5
11148 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11149 if test "${cf_cv_regex+set}" = set; then
11150   echo $ECHO_N "(cached) $ECHO_C" >&6
11151 else
11152
11153 cat >conftest.$ac_ext <<_ACEOF
11154 #line 11154 "configure"
11155 #include "confdefs.h"
11156 #include <sys/types.h>
11157 #include <regex.h>
11158 int
11159 main ()
11160 {
11161
11162         regex_t *p;
11163         int x = regcomp(p, "", 0);
11164         int y = regexec(p, "", 0, 0, 0);
11165         regfree(p);
11166
11167   ;
11168   return 0;
11169 }
11170 _ACEOF
11171 rm -f conftest.$ac_objext conftest$ac_exeext
11172 if { (eval echo "$as_me:11172: \"$ac_link\"") >&5
11173   (eval $ac_link) 2>&5
11174   ac_status=$?
11175   echo "$as_me:11175: \$? = $ac_status" >&5
11176   (exit $ac_status); } &&
11177          { ac_try='test -s conftest$ac_exeext'
11178   { (eval echo "$as_me:11178: \"$ac_try\"") >&5
11179   (eval $ac_try) 2>&5
11180   ac_status=$?
11181   echo "$as_me:11181: \$? = $ac_status" >&5
11182   (exit $ac_status); }; }; then
11183   cf_cv_regex="regex.h"
11184 else
11185   echo "$as_me: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11187
11188         cat >conftest.$ac_ext <<_ACEOF
11189 #line 11189 "configure"
11190 #include "confdefs.h"
11191 #include <regexp.h>
11192 int
11193 main ()
11194 {
11195
11196                 char *p = compile("", "", "", 0);
11197                 int x = step("", "");
11198
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 rm -f conftest.$ac_objext conftest$ac_exeext
11204 if { (eval echo "$as_me:11204: \"$ac_link\"") >&5
11205   (eval $ac_link) 2>&5
11206   ac_status=$?
11207   echo "$as_me:11207: \$? = $ac_status" >&5
11208   (exit $ac_status); } &&
11209          { ac_try='test -s conftest$ac_exeext'
11210   { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211   (eval $ac_try) 2>&5
11212   ac_status=$?
11213   echo "$as_me:11213: \$? = $ac_status" >&5
11214   (exit $ac_status); }; }; then
11215   cf_cv_regex="regexp.h"
11216 else
11217   echo "$as_me: failed program was:" >&5
11218 cat conftest.$ac_ext >&5
11219
11220                 cf_save_LIBS="$LIBS"
11221                 LIBS="-lgen $LIBS"
11222                 cat >conftest.$ac_ext <<_ACEOF
11223 #line 11223 "configure"
11224 #include "confdefs.h"
11225 #include <regexpr.h>
11226 int
11227 main ()
11228 {
11229
11230                         char *p = compile("", "", "");
11231                         int x = step("", "");
11232
11233   ;
11234   return 0;
11235 }
11236 _ACEOF
11237 rm -f conftest.$ac_objext conftest$ac_exeext
11238 if { (eval echo "$as_me:11238: \"$ac_link\"") >&5
11239   (eval $ac_link) 2>&5
11240   ac_status=$?
11241   echo "$as_me:11241: \$? = $ac_status" >&5
11242   (exit $ac_status); } &&
11243          { ac_try='test -s conftest$ac_exeext'
11244   { (eval echo "$as_me:11244: \"$ac_try\"") >&5
11245   (eval $ac_try) 2>&5
11246   ac_status=$?
11247   echo "$as_me:11247: \$? = $ac_status" >&5
11248   (exit $ac_status); }; }; then
11249   cf_cv_regex="regexpr.h"
11250 else
11251   echo "$as_me: failed program was:" >&5
11252 cat conftest.$ac_ext >&5
11253 LIBS="$cf_save_LIBS"
11254 fi
11255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11256 fi
11257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11258 fi
11259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11260
11261 fi
11262
11263 echo "$as_me:11263: result: $cf_cv_regex" >&5
11264 echo "${ECHO_T}$cf_cv_regex" >&6
11265 case $cf_cv_regex in
11266         regex.h)   cat >>confdefs.h <<\EOF
11267 #define HAVE_REGEX_H_FUNCS 1
11268 EOF
11269  ;;
11270         regexp.h)  cat >>confdefs.h <<\EOF
11271 #define HAVE_REGEXP_H_FUNCS 1
11272 EOF
11273  ;;
11274         regexpr.h) cat >>confdefs.h <<\EOF
11275 #define HAVE_REGEXPR_H_FUNCS 1
11276 EOF
11277  ;;
11278 esac
11279
11280 for ac_header in \
11281 fcntl.h \
11282 getopt.h \
11283 limits.h \
11284 locale.h \
11285 poll.h \
11286 sys/bsdtypes.h \
11287 sys/ioctl.h \
11288 sys/param.h \
11289 sys/poll.h \
11290 sys/select.h \
11291 sys/time.h \
11292 sys/times.h \
11293 ttyent.h \
11294 unistd.h \
11295 wctype.h \
11296
11297 do
11298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11299 echo "$as_me:11299: checking for $ac_header" >&5
11300 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11301 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11302   echo $ECHO_N "(cached) $ECHO_C" >&6
11303 else
11304   cat >conftest.$ac_ext <<_ACEOF
11305 #line 11305 "configure"
11306 #include "confdefs.h"
11307 #include <$ac_header>
11308 _ACEOF
11309 if { (eval echo "$as_me:11309: \"$ac_cpp conftest.$ac_ext\"") >&5
11310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11311   ac_status=$?
11312   egrep -v '^ *\+' conftest.er1 >conftest.err
11313   rm -f conftest.er1
11314   cat conftest.err >&5
11315   echo "$as_me:11315: \$? = $ac_status" >&5
11316   (exit $ac_status); } >/dev/null; then
11317   if test -s conftest.err; then
11318     ac_cpp_err=$ac_c_preproc_warn_flag
11319   else
11320     ac_cpp_err=
11321   fi
11322 else
11323   ac_cpp_err=yes
11324 fi
11325 if test -z "$ac_cpp_err"; then
11326   eval "$as_ac_Header=yes"
11327 else
11328   echo "$as_me: failed program was:" >&5
11329   cat conftest.$ac_ext >&5
11330   eval "$as_ac_Header=no"
11331 fi
11332 rm -f conftest.err conftest.$ac_ext
11333 fi
11334 echo "$as_me:11334: result: `eval echo '${'$as_ac_Header'}'`" >&5
11335 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11336 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11337   cat >>confdefs.h <<EOF
11338 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11339 EOF
11340
11341 fi
11342 done
11343
11344 # check for ISC (this may also define _POSIX_SOURCE)
11345 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11346 if test "$ISC" = yes ; then
11347
11348 echo "$as_me:11348: checking for main in -lcposix" >&5
11349 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11350 if test "${ac_cv_lib_cposix_main+set}" = set; then
11351   echo $ECHO_N "(cached) $ECHO_C" >&6
11352 else
11353   ac_check_lib_save_LIBS=$LIBS
11354 LIBS="-lcposix  $LIBS"
11355 cat >conftest.$ac_ext <<_ACEOF
11356 #line 11356 "configure"
11357 #include "confdefs.h"
11358
11359 int
11360 main ()
11361 {
11362 main ();
11363   ;
11364   return 0;
11365 }
11366 _ACEOF
11367 rm -f conftest.$ac_objext conftest$ac_exeext
11368 if { (eval echo "$as_me:11368: \"$ac_link\"") >&5
11369   (eval $ac_link) 2>&5
11370   ac_status=$?
11371   echo "$as_me:11371: \$? = $ac_status" >&5
11372   (exit $ac_status); } &&
11373          { ac_try='test -s conftest$ac_exeext'
11374   { (eval echo "$as_me:11374: \"$ac_try\"") >&5
11375   (eval $ac_try) 2>&5
11376   ac_status=$?
11377   echo "$as_me:11377: \$? = $ac_status" >&5
11378   (exit $ac_status); }; }; then
11379   ac_cv_lib_cposix_main=yes
11380 else
11381   echo "$as_me: failed program was:" >&5
11382 cat conftest.$ac_ext >&5
11383 ac_cv_lib_cposix_main=no
11384 fi
11385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11386 LIBS=$ac_check_lib_save_LIBS
11387 fi
11388 echo "$as_me:11388: result: $ac_cv_lib_cposix_main" >&5
11389 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11390 if test $ac_cv_lib_cposix_main = yes; then
11391   cat >>confdefs.h <<EOF
11392 #define HAVE_LIBCPOSIX 1
11393 EOF
11394
11395   LIBS="-lcposix $LIBS"
11396
11397 fi
11398
11399         echo "$as_me:11399: checking for bzero in -linet" >&5
11400 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11401 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11402   echo $ECHO_N "(cached) $ECHO_C" >&6
11403 else
11404   ac_check_lib_save_LIBS=$LIBS
11405 LIBS="-linet  $LIBS"
11406 cat >conftest.$ac_ext <<_ACEOF
11407 #line 11407 "configure"
11408 #include "confdefs.h"
11409
11410 /* Override any gcc2 internal prototype to avoid an error.  */
11411 #ifdef __cplusplus
11412 extern "C"
11413 #endif
11414 /* We use char because int might match the return type of a gcc2
11415    builtin and then its argument prototype would still apply.  */
11416 char bzero ();
11417 int
11418 main ()
11419 {
11420 bzero ();
11421   ;
11422   return 0;
11423 }
11424 _ACEOF
11425 rm -f conftest.$ac_objext conftest$ac_exeext
11426 if { (eval echo "$as_me:11426: \"$ac_link\"") >&5
11427   (eval $ac_link) 2>&5
11428   ac_status=$?
11429   echo "$as_me:11429: \$? = $ac_status" >&5
11430   (exit $ac_status); } &&
11431          { ac_try='test -s conftest$ac_exeext'
11432   { (eval echo "$as_me:11432: \"$ac_try\"") >&5
11433   (eval $ac_try) 2>&5
11434   ac_status=$?
11435   echo "$as_me:11435: \$? = $ac_status" >&5
11436   (exit $ac_status); }; }; then
11437   ac_cv_lib_inet_bzero=yes
11438 else
11439   echo "$as_me: failed program was:" >&5
11440 cat conftest.$ac_ext >&5
11441 ac_cv_lib_inet_bzero=no
11442 fi
11443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11444 LIBS=$ac_check_lib_save_LIBS
11445 fi
11446 echo "$as_me:11446: result: $ac_cv_lib_inet_bzero" >&5
11447 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11448 if test $ac_cv_lib_inet_bzero = yes; then
11449   LIBS="$LIBS -linet"
11450 fi
11451 fi
11452
11453 echo "$as_me:11453: checking if sys/time.h works with sys/select.h" >&5
11454 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11455 if test "${cf_cv_sys_time_select+set}" = set; then
11456   echo $ECHO_N "(cached) $ECHO_C" >&6
11457 else
11458
11459 cat >conftest.$ac_ext <<_ACEOF
11460 #line 11460 "configure"
11461 #include "confdefs.h"
11462
11463 #include <sys/types.h>
11464 #ifdef HAVE_SYS_TIME_H
11465 #include <sys/time.h>
11466 #endif
11467 #ifdef HAVE_SYS_SELECT_H
11468 #include <sys/select.h>
11469 #endif
11470
11471 int
11472 main ()
11473 {
11474
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 rm -f conftest.$ac_objext
11480 if { (eval echo "$as_me:11480: \"$ac_compile\"") >&5
11481   (eval $ac_compile) 2>&5
11482   ac_status=$?
11483   echo "$as_me:11483: \$? = $ac_status" >&5
11484   (exit $ac_status); } &&
11485          { ac_try='test -s conftest.$ac_objext'
11486   { (eval echo "$as_me:11486: \"$ac_try\"") >&5
11487   (eval $ac_try) 2>&5
11488   ac_status=$?
11489   echo "$as_me:11489: \$? = $ac_status" >&5
11490   (exit $ac_status); }; }; then
11491   cf_cv_sys_time_select=yes
11492 else
11493   echo "$as_me: failed program was:" >&5
11494 cat conftest.$ac_ext >&5
11495 cf_cv_sys_time_select=no
11496 fi
11497 rm -f conftest.$ac_objext conftest.$ac_ext
11498
11499 fi
11500
11501 echo "$as_me:11501: result: $cf_cv_sys_time_select" >&5
11502 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11503 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11504 #define HAVE_SYS_TIME_SELECT 1
11505 EOF
11506
11507 ###     checks for compiler characteristics
11508 ac_ext=c
11509 ac_cpp='$CPP $CPPFLAGS'
11510 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11511 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11512 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11513 ac_main_return=return
11514
11515 echo "$as_me:11515: checking for $CC option to accept ANSI C" >&5
11516 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11517 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11518   echo $ECHO_N "(cached) $ECHO_C" >&6
11519 else
11520   ac_cv_prog_cc_stdc=no
11521 ac_save_CC=$CC
11522 cat >conftest.$ac_ext <<_ACEOF
11523 #line 11523 "configure"
11524 #include "confdefs.h"
11525 #include <stdarg.h>
11526 #include <stdio.h>
11527 #include <sys/types.h>
11528 #include <sys/stat.h>
11529 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11530 struct buf { int x; };
11531 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11532 static char *e (p, i)
11533      char **p;
11534      int i;
11535 {
11536   return p[i];
11537 }
11538 static char *f (char * (*g) (char **, int), char **p, ...)
11539 {
11540   char *s;
11541   va_list v;
11542   va_start (v,p);
11543   s = g (p, va_arg (v,int));
11544   va_end (v);
11545   return s;
11546 }
11547 int test (int i, double x);
11548 struct s1 {int (*f) (int a);};
11549 struct s2 {int (*f) (double a);};
11550 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11551 int argc;
11552 char **argv;
11553 int
11554 main ()
11555 {
11556 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11557   ;
11558   return 0;
11559 }
11560 _ACEOF
11561 # Don't try gcc -ansi; that turns off useful extensions and
11562 # breaks some systems' header files.
11563 # AIX                   -qlanglvl=ansi
11564 # Ultrix and OSF/1      -std1
11565 # HP-UX 10.20 and later -Ae
11566 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11567 # SVR4                  -Xc -D__EXTENSIONS__
11568 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11569 do
11570   CC="$ac_save_CC $ac_arg"
11571   rm -f conftest.$ac_objext
11572 if { (eval echo "$as_me:11572: \"$ac_compile\"") >&5
11573   (eval $ac_compile) 2>&5
11574   ac_status=$?
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit $ac_status); } &&
11577          { ac_try='test -s conftest.$ac_objext'
11578   { (eval echo "$as_me:11578: \"$ac_try\"") >&5
11579   (eval $ac_try) 2>&5
11580   ac_status=$?
11581   echo "$as_me:11581: \$? = $ac_status" >&5
11582   (exit $ac_status); }; }; then
11583   ac_cv_prog_cc_stdc=$ac_arg
11584 break
11585 else
11586   echo "$as_me: failed program was:" >&5
11587 cat conftest.$ac_ext >&5
11588 fi
11589 rm -f conftest.$ac_objext
11590 done
11591 rm -f conftest.$ac_ext conftest.$ac_objext
11592 CC=$ac_save_CC
11593
11594 fi
11595
11596 case "x$ac_cv_prog_cc_stdc" in
11597   x|xno)
11598     echo "$as_me:11598: result: none needed" >&5
11599 echo "${ECHO_T}none needed" >&6 ;;
11600   *)
11601     echo "$as_me:11601: result: $ac_cv_prog_cc_stdc" >&5
11602 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11603     CC="$CC $ac_cv_prog_cc_stdc" ;;
11604 esac
11605
11606 echo "$as_me:11606: checking for an ANSI C-conforming const" >&5
11607 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11608 if test "${ac_cv_c_const+set}" = set; then
11609   echo $ECHO_N "(cached) $ECHO_C" >&6
11610 else
11611   cat >conftest.$ac_ext <<_ACEOF
11612 #line 11612 "configure"
11613 #include "confdefs.h"
11614
11615 int
11616 main ()
11617 {
11618 /* FIXME: Include the comments suggested by Paul. */
11619 #ifndef __cplusplus
11620   /* Ultrix mips cc rejects this.  */
11621   typedef int charset[2];
11622   const charset x;
11623   /* SunOS 4.1.1 cc rejects this.  */
11624   char const *const *ccp;
11625   char **p;
11626   /* NEC SVR4.0.2 mips cc rejects this.  */
11627   struct point {int x, y;};
11628   static struct point const zero = {0,0};
11629   /* AIX XL C 1.02.0.0 rejects this.
11630      It does not let you subtract one const X* pointer from another in
11631      an arm of an if-expression whose if-part is not a constant
11632      expression */
11633   const char *g = "string";
11634   ccp = &g + (g ? g-g : 0);
11635   /* HPUX 7.0 cc rejects these. */
11636   ++ccp;
11637   p = (char**) ccp;
11638   ccp = (char const *const *) p;
11639   { /* SCO 3.2v4 cc rejects this.  */
11640     char *t;
11641     char const *s = 0 ? (char *) 0 : (char const *) 0;
11642
11643     *t++ = 0;
11644   }
11645   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11646     int x[] = {25, 17};
11647     const int *foo = &x[0];
11648     ++foo;
11649   }
11650   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11651     typedef const int *iptr;
11652     iptr p = 0;
11653     ++p;
11654   }
11655   { /* AIX XL C 1.02.0.0 rejects this saying
11656        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11657     struct s { int j; const int *ap[3]; };
11658     struct s *b; b->j = 5;
11659   }
11660   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11661     const int foo = 10;
11662   }
11663 #endif
11664
11665   ;
11666   return 0;
11667 }
11668 _ACEOF
11669 rm -f conftest.$ac_objext
11670 if { (eval echo "$as_me:11670: \"$ac_compile\"") >&5
11671   (eval $ac_compile) 2>&5
11672   ac_status=$?
11673   echo "$as_me:11673: \$? = $ac_status" >&5
11674   (exit $ac_status); } &&
11675          { ac_try='test -s conftest.$ac_objext'
11676   { (eval echo "$as_me:11676: \"$ac_try\"") >&5
11677   (eval $ac_try) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); }; }; then
11681   ac_cv_c_const=yes
11682 else
11683   echo "$as_me: failed program was:" >&5
11684 cat conftest.$ac_ext >&5
11685 ac_cv_c_const=no
11686 fi
11687 rm -f conftest.$ac_objext conftest.$ac_ext
11688 fi
11689 echo "$as_me:11689: result: $ac_cv_c_const" >&5
11690 echo "${ECHO_T}$ac_cv_c_const" >&6
11691 if test $ac_cv_c_const = no; then
11692
11693 cat >>confdefs.h <<\EOF
11694 #define const
11695 EOF
11696
11697 fi
11698
11699 echo "$as_me:11699: checking for inline" >&5
11700 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11701 if test "${ac_cv_c_inline+set}" = set; then
11702   echo $ECHO_N "(cached) $ECHO_C" >&6
11703 else
11704   ac_cv_c_inline=no
11705 for ac_kw in inline __inline__ __inline; do
11706   cat >conftest.$ac_ext <<_ACEOF
11707 #line 11707 "configure"
11708 #include "confdefs.h"
11709 #ifndef __cplusplus
11710 static $ac_kw int static_foo () {return 0; }
11711 $ac_kw int foo () {return 0; }
11712 #endif
11713
11714 _ACEOF
11715 rm -f conftest.$ac_objext
11716 if { (eval echo "$as_me:11716: \"$ac_compile\"") >&5
11717   (eval $ac_compile) 2>&5
11718   ac_status=$?
11719   echo "$as_me:11719: \$? = $ac_status" >&5
11720   (exit $ac_status); } &&
11721          { ac_try='test -s conftest.$ac_objext'
11722   { (eval echo "$as_me:11722: \"$ac_try\"") >&5
11723   (eval $ac_try) 2>&5
11724   ac_status=$?
11725   echo "$as_me:11725: \$? = $ac_status" >&5
11726   (exit $ac_status); }; }; then
11727   ac_cv_c_inline=$ac_kw; break
11728 else
11729   echo "$as_me: failed program was:" >&5
11730 cat conftest.$ac_ext >&5
11731 fi
11732 rm -f conftest.$ac_objext conftest.$ac_ext
11733 done
11734
11735 fi
11736 echo "$as_me:11736: result: $ac_cv_c_inline" >&5
11737 echo "${ECHO_T}$ac_cv_c_inline" >&6
11738 case $ac_cv_c_inline in
11739   inline | yes) ;;
11740   no)
11741 cat >>confdefs.h <<\EOF
11742 #define inline
11743 EOF
11744  ;;
11745   *)  cat >>confdefs.h <<EOF
11746 #define inline $ac_cv_c_inline
11747 EOF
11748  ;;
11749 esac
11750
11751 NCURSES_INLINE=
11752 if test "$ac_cv_c_inline" != no ; then
11753   NCURSES_INLINE=inline
11754   if test "$INTEL_COMPILER" = yes
11755   then
11756     :
11757   elif test "$GCC" = yes
11758   then
11759     echo "$as_me:11759: checking if gcc supports options to tune inlining" >&5
11760 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11761 if test "${cf_cv_gcc_inline+set}" = set; then
11762   echo $ECHO_N "(cached) $ECHO_C" >&6
11763 else
11764
11765       cf_save_CFLAGS=$CFLAGS
11766       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11767       cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770 inline int foo(void) { return 1; }
11771 int
11772 main ()
11773 {
11774 ${cf_cv_main_return:-return} foo()
11775   ;
11776   return 0;
11777 }
11778 _ACEOF
11779 rm -f conftest.$ac_objext
11780 if { (eval echo "$as_me:11780: \"$ac_compile\"") >&5
11781   (eval $ac_compile) 2>&5
11782   ac_status=$?
11783   echo "$as_me:11783: \$? = $ac_status" >&5
11784   (exit $ac_status); } &&
11785          { ac_try='test -s conftest.$ac_objext'
11786   { (eval echo "$as_me:11786: \"$ac_try\"") >&5
11787   (eval $ac_try) 2>&5
11788   ac_status=$?
11789   echo "$as_me:11789: \$? = $ac_status" >&5
11790   (exit $ac_status); }; }; then
11791   cf_cv_gcc_inline=yes
11792 else
11793   echo "$as_me: failed program was:" >&5
11794 cat conftest.$ac_ext >&5
11795 cf_cv_gcc_inline=no
11796 fi
11797 rm -f conftest.$ac_objext conftest.$ac_ext
11798       CFLAGS=$cf_save_CFLAGS
11799
11800 fi
11801 echo "$as_me:11801: result: $cf_cv_gcc_inline" >&5
11802 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11803     if test "$cf_cv_gcc_inline" = yes ; then
11804
11805 cf_fix_cppflags=no
11806 cf_new_cflags=
11807 cf_new_cppflags=
11808 cf_new_extra_cppflags=
11809
11810 for cf_add_cflags in --param max-inline-insns-single=1200
11811 do
11812 case $cf_fix_cppflags in
11813 no)
11814         case $cf_add_cflags in #(vi
11815         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11816                 case $cf_add_cflags in
11817                 -D*)
11818                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11819
11820                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11821                         && test -z "${cf_tst_cflags}" \
11822                         && cf_fix_cppflags=yes
11823
11824                         if test $cf_fix_cppflags = yes ; then
11825                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11826                                 continue
11827                         elif test "${cf_tst_cflags}" = "\"'" ; then
11828                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11829                                 continue
11830                         fi
11831                         ;;
11832                 esac
11833                 case "$CPPFLAGS" in
11834                 *$cf_add_cflags) #(vi
11835                         ;;
11836                 *) #(vi
11837                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11838                         ;;
11839                 esac
11840                 ;;
11841         *)
11842                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11843                 ;;
11844         esac
11845         ;;
11846 yes)
11847         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11848
11849         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11850
11851         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11852         && test -z "${cf_tst_cflags}" \
11853         && cf_fix_cppflags=no
11854         ;;
11855 esac
11856 done
11857
11858 if test -n "$cf_new_cflags" ; then
11859
11860         CFLAGS="$CFLAGS $cf_new_cflags"
11861 fi
11862
11863 if test -n "$cf_new_cppflags" ; then
11864
11865         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11866 fi
11867
11868 if test -n "$cf_new_extra_cppflags" ; then
11869
11870         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11871 fi
11872
11873     fi
11874   fi
11875 fi
11876
11877 echo "$as_me:11877: checking for signal global datatype" >&5
11878 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11879 if test "${cf_cv_sig_atomic_t+set}" = set; then
11880   echo $ECHO_N "(cached) $ECHO_C" >&6
11881 else
11882
11883         for cf_type in \
11884                 "volatile sig_atomic_t" \
11885                 "sig_atomic_t" \
11886                 "int"
11887         do
11888         cat >conftest.$ac_ext <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891
11892 #include <sys/types.h>
11893 #include <signal.h>
11894 #include <stdio.h>
11895
11896 extern $cf_type x;
11897 $cf_type x;
11898 static void handler(int sig)
11899 {
11900         x = 5;
11901 }
11902 int
11903 main ()
11904 {
11905 signal(SIGINT, handler);
11906                  x = 1
11907   ;
11908   return 0;
11909 }
11910 _ACEOF
11911 rm -f conftest.$ac_objext
11912 if { (eval echo "$as_me:11912: \"$ac_compile\"") >&5
11913   (eval $ac_compile) 2>&5
11914   ac_status=$?
11915   echo "$as_me:11915: \$? = $ac_status" >&5
11916   (exit $ac_status); } &&
11917          { ac_try='test -s conftest.$ac_objext'
11918   { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919   (eval $ac_try) 2>&5
11920   ac_status=$?
11921   echo "$as_me:11921: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   cf_cv_sig_atomic_t=$cf_type
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 cat conftest.$ac_ext >&5
11927 cf_cv_sig_atomic_t=no
11928 fi
11929 rm -f conftest.$ac_objext conftest.$ac_ext
11930                 test "$cf_cv_sig_atomic_t" != no && break
11931         done
11932
11933 fi
11934
11935 echo "$as_me:11935: result: $cf_cv_sig_atomic_t" >&5
11936 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11937 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11938 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11939 EOF
11940
11941 if test $NCURSES_CHTYPE = auto ; then
11942
11943 echo "$as_me:11943: checking for type of chtype" >&5
11944 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11945 if test "${cf_cv_typeof_chtype+set}" = set; then
11946   echo $ECHO_N "(cached) $ECHO_C" >&6
11947 else
11948
11949                 if test "$cross_compiling" = yes; then
11950   cf_cv_typeof_chtype=long
11951 else
11952   cat >conftest.$ac_ext <<_ACEOF
11953 #line 11953 "configure"
11954 #include "confdefs.h"
11955
11956 #define WANT_BITS 31
11957 #include <stdio.h>
11958 int main()
11959 {
11960         FILE *fp = fopen("cf_test.out", "w");
11961         if (fp != 0) {
11962                 char *result = "long";
11963                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11964                         int n;
11965                         unsigned int x, y;
11966                         for (n = 0; n < WANT_BITS; n++) {
11967                                 x = (1 << n);
11968                                 y = (x >> n);
11969                                 if (y != 1 || x == 0) {
11970                                         x = 0;
11971                                         break;
11972                                 }
11973                         }
11974                         /*
11975                          * If x is nonzero, an int is big enough for the bits
11976                          * that we want.
11977                          */
11978                         result = (x != 0) ? "int" : "long";
11979                 }
11980                 fputs(result, fp);
11981                 fclose(fp);
11982         }
11983         ${cf_cv_main_return:-return}(0);
11984 }
11985
11986 _ACEOF
11987 rm -f conftest$ac_exeext
11988 if { (eval echo "$as_me:11988: \"$ac_link\"") >&5
11989   (eval $ac_link) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11993   { (eval echo "$as_me:11993: \"$ac_try\"") >&5
11994   (eval $ac_try) 2>&5
11995   ac_status=$?
11996   echo "$as_me:11996: \$? = $ac_status" >&5
11997   (exit $ac_status); }; }; then
11998   cf_cv_typeof_chtype=`cat cf_test.out`
11999 else
12000   echo "$as_me: program exited with status $ac_status" >&5
12001 echo "$as_me: failed program was:" >&5
12002 cat conftest.$ac_ext >&5
12003 cf_cv_typeof_chtype=long
12004 fi
12005 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12006 fi
12007                 rm -f cf_test.out
12008
12009 fi
12010
12011 echo "$as_me:12011: result: $cf_cv_typeof_chtype" >&5
12012 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12013
12014 cat >>confdefs.h <<EOF
12015 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12016 EOF
12017
12018 else
12019         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12020 fi
12021 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12022
12023 echo "$as_me:12023: checking if unsigned literals are legal" >&5
12024 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12025 if test "${cf_cv_unsigned_literals+set}" = set; then
12026   echo $ECHO_N "(cached) $ECHO_C" >&6
12027 else
12028
12029         cat >conftest.$ac_ext <<_ACEOF
12030 #line 12030 "configure"
12031 #include "confdefs.h"
12032
12033 int
12034 main ()
12035 {
12036 long x = 1L + 1UL + 1U + 1
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 rm -f conftest.$ac_objext
12042 if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
12043   (eval $ac_compile) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit $ac_status); } &&
12047          { ac_try='test -s conftest.$ac_objext'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit $ac_status); }; }; then
12053   cf_cv_unsigned_literals=yes
12054 else
12055   echo "$as_me: failed program was:" >&5
12056 cat conftest.$ac_ext >&5
12057 cf_cv_unsigned_literals=no
12058 fi
12059 rm -f conftest.$ac_objext conftest.$ac_ext
12060
12061 fi
12062
12063 echo "$as_me:12063: result: $cf_cv_unsigned_literals" >&5
12064 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12065
12066 cf_cv_1UL="1"
12067 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12068 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12069
12070 if test $NCURSES_MMASK_T = auto ; then
12071         cf_cv_typeof_mmask_t=long
12072 else
12073         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12074 fi
12075 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12076
12077 ###     Checks for external-data
12078
12079 echo "$as_me:12079: checking if external errno is declared" >&5
12080 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12081 if test "${cf_cv_dcl_errno+set}" = set; then
12082   echo $ECHO_N "(cached) $ECHO_C" >&6
12083 else
12084
12085     cat >conftest.$ac_ext <<_ACEOF
12086 #line 12086 "configure"
12087 #include "confdefs.h"
12088
12089 #ifdef HAVE_STDLIB_H
12090 #include <stdlib.h>
12091 #endif
12092 #include <stdio.h>
12093 #include <sys/types.h>
12094 #include <errno.h>
12095 int
12096 main ()
12097 {
12098 int x = (int) errno
12099   ;
12100   return 0;
12101 }
12102 _ACEOF
12103 rm -f conftest.$ac_objext
12104 if { (eval echo "$as_me:12104: \"$ac_compile\"") >&5
12105   (eval $ac_compile) 2>&5
12106   ac_status=$?
12107   echo "$as_me:12107: \$? = $ac_status" >&5
12108   (exit $ac_status); } &&
12109          { ac_try='test -s conftest.$ac_objext'
12110   { (eval echo "$as_me:12110: \"$ac_try\"") >&5
12111   (eval $ac_try) 2>&5
12112   ac_status=$?
12113   echo "$as_me:12113: \$? = $ac_status" >&5
12114   (exit $ac_status); }; }; then
12115   cf_cv_dcl_errno=yes
12116 else
12117   echo "$as_me: failed program was:" >&5
12118 cat conftest.$ac_ext >&5
12119 cf_cv_dcl_errno=no
12120 fi
12121 rm -f conftest.$ac_objext conftest.$ac_ext
12122
12123 fi
12124 echo "$as_me:12124: result: $cf_cv_dcl_errno" >&5
12125 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12126
12127 if test "$cf_cv_dcl_errno" = no ; then
12128
12129 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12130
12131     cat >>confdefs.h <<EOF
12132 #define $cf_result 1
12133 EOF
12134
12135 fi
12136
12137 # It's possible (for near-UNIX clones) that the data doesn't exist
12138
12139 echo "$as_me:12139: checking if external errno exists" >&5
12140 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12141 if test "${cf_cv_have_errno+set}" = set; then
12142   echo $ECHO_N "(cached) $ECHO_C" >&6
12143 else
12144
12145     cat >conftest.$ac_ext <<_ACEOF
12146 #line 12146 "configure"
12147 #include "confdefs.h"
12148
12149 #undef errno
12150 extern int errno;
12151
12152 int
12153 main ()
12154 {
12155 errno = 2
12156   ;
12157   return 0;
12158 }
12159 _ACEOF
12160 rm -f conftest.$ac_objext conftest$ac_exeext
12161 if { (eval echo "$as_me:12161: \"$ac_link\"") >&5
12162   (eval $ac_link) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit $ac_status); } &&
12166          { ac_try='test -s conftest$ac_exeext'
12167   { (eval echo "$as_me:12167: \"$ac_try\"") >&5
12168   (eval $ac_try) 2>&5
12169   ac_status=$?
12170   echo "$as_me:12170: \$? = $ac_status" >&5
12171   (exit $ac_status); }; }; then
12172   cf_cv_have_errno=yes
12173 else
12174   echo "$as_me: failed program was:" >&5
12175 cat conftest.$ac_ext >&5
12176 cf_cv_have_errno=no
12177 fi
12178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12179
12180 fi
12181 echo "$as_me:12181: result: $cf_cv_have_errno" >&5
12182 echo "${ECHO_T}$cf_cv_have_errno" >&6
12183
12184 if test "$cf_cv_have_errno" = yes ; then
12185
12186 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12187
12188     cat >>confdefs.h <<EOF
12189 #define $cf_result 1
12190 EOF
12191
12192 fi
12193
12194 echo "$as_me:12194: checking if data-only library module links" >&5
12195 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12196 if test "${cf_cv_link_dataonly+set}" = set; then
12197   echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199
12200         rm -f conftest.a
12201         cat >conftest.$ac_ext <<EOF
12202 #line 12202 "configure"
12203 int     testdata[3] = { 123, 456, 789 };
12204 EOF
12205         if { (eval echo "$as_me:12205: \"$ac_compile\"") >&5
12206   (eval $ac_compile) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit $ac_status); } ; then
12210                 mv conftest.o data.o && \
12211                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12212         fi
12213         rm -f conftest.$ac_ext data.o
12214         cat >conftest.$ac_ext <<EOF
12215 #line 12215 "configure"
12216 int     testfunc()
12217 {
12218 #if defined(NeXT)
12219         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12220 #else
12221         extern int testdata[3];
12222         return testdata[0] == 123
12223            &&  testdata[1] == 456
12224            &&  testdata[2] == 789;
12225 #endif
12226 }
12227 EOF
12228         if { (eval echo "$as_me:12228: \"$ac_compile\"") >&5
12229   (eval $ac_compile) 2>&5
12230   ac_status=$?
12231   echo "$as_me:12231: \$? = $ac_status" >&5
12232   (exit $ac_status); }; then
12233                 mv conftest.o func.o && \
12234                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12235         fi
12236         rm -f conftest.$ac_ext func.o
12237         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12238         cf_saveLIBS="$LIBS"
12239         LIBS="conftest.a $LIBS"
12240         if test "$cross_compiling" = yes; then
12241   cf_cv_link_dataonly=unknown
12242 else
12243   cat >conftest.$ac_ext <<_ACEOF
12244 #line 12244 "configure"
12245 #include "confdefs.h"
12246
12247         int main()
12248         {
12249                 extern int testfunc();
12250                 ${cf_cv_main_return:-return} (!testfunc());
12251         }
12252
12253 _ACEOF
12254 rm -f conftest$ac_exeext
12255 if { (eval echo "$as_me:12255: \"$ac_link\"") >&5
12256   (eval $ac_link) 2>&5
12257   ac_status=$?
12258   echo "$as_me:12258: \$? = $ac_status" >&5
12259   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12260   { (eval echo "$as_me:12260: \"$ac_try\"") >&5
12261   (eval $ac_try) 2>&5
12262   ac_status=$?
12263   echo "$as_me:12263: \$? = $ac_status" >&5
12264   (exit $ac_status); }; }; then
12265   cf_cv_link_dataonly=yes
12266 else
12267   echo "$as_me: program exited with status $ac_status" >&5
12268 echo "$as_me: failed program was:" >&5
12269 cat conftest.$ac_ext >&5
12270 cf_cv_link_dataonly=no
12271 fi
12272 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12273 fi
12274         LIBS="$cf_saveLIBS"
12275
12276 fi
12277
12278 echo "$as_me:12278: result: $cf_cv_link_dataonly" >&5
12279 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12280
12281 if test "$cf_cv_link_dataonly" = no ; then
12282         cat >>confdefs.h <<\EOF
12283 #define BROKEN_LINKER 1
12284 EOF
12285
12286         BROKEN_LINKER=1
12287 fi
12288
12289 ###     Checks for library functions.
12290
12291 for ac_func in \
12292 getcwd \
12293 getegid \
12294 geteuid \
12295 getttynam \
12296 issetugid \
12297 poll \
12298 remove \
12299 select \
12300 setbuf \
12301 setbuffer \
12302 setvbuf \
12303 sigaction \
12304 sigvec \
12305 strdup \
12306 strstr \
12307 tcgetpgrp \
12308 times \
12309 vsnprintf \
12310
12311 do
12312 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12313 echo "$as_me:12313: checking for $ac_func" >&5
12314 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12315 if eval "test \"\${$as_ac_var+set}\" = set"; then
12316   echo $ECHO_N "(cached) $ECHO_C" >&6
12317 else
12318   cat >conftest.$ac_ext <<_ACEOF
12319 #line 12319 "configure"
12320 #include "confdefs.h"
12321 /* System header to define __stub macros and hopefully few prototypes,
12322     which can conflict with char $ac_func (); below.  */
12323 #include <assert.h>
12324 /* Override any gcc2 internal prototype to avoid an error.  */
12325 #ifdef __cplusplus
12326 extern "C"
12327 #endif
12328 /* We use char because int might match the return type of a gcc2
12329    builtin and then its argument prototype would still apply.  */
12330 char $ac_func ();
12331 char (*f) ();
12332
12333 int
12334 main ()
12335 {
12336 /* The GNU C library defines this for functions which it implements
12337     to always fail with ENOSYS.  Some functions are actually named
12338     something starting with __ and the normal name is an alias.  */
12339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12340 choke me
12341 #else
12342 f = $ac_func;
12343 #endif
12344
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 rm -f conftest.$ac_objext conftest$ac_exeext
12350 if { (eval echo "$as_me:12350: \"$ac_link\"") >&5
12351   (eval $ac_link) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -s conftest$ac_exeext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   eval "$as_ac_var=yes"
12362 else
12363   echo "$as_me: failed program was:" >&5
12364 cat conftest.$ac_ext >&5
12365 eval "$as_ac_var=no"
12366 fi
12367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12368 fi
12369 echo "$as_me:12369: result: `eval echo '${'$as_ac_var'}'`" >&5
12370 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12371 if test `eval echo '${'$as_ac_var'}'` = yes; then
12372   cat >>confdefs.h <<EOF
12373 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12374 EOF
12375
12376 fi
12377 done
12378
12379 if test "$with_getcap" = "yes" ; then
12380
12381 echo "$as_me:12381: checking for terminal-capability database functions" >&5
12382 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12383 if test "${cf_cv_cgetent+set}" = set; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386
12387 cat >conftest.$ac_ext <<_ACEOF
12388 #line 12388 "configure"
12389 #include "confdefs.h"
12390
12391 #include <stdlib.h>
12392 int
12393 main ()
12394 {
12395
12396         char temp[128];
12397         char *buf = temp;
12398         char *db_array = temp;
12399         cgetent(&buf, /* int *, */ &db_array, "vt100");
12400         cgetcap(buf, "tc", '=');
12401         cgetmatch(buf, "tc");
12402
12403   ;
12404   return 0;
12405 }
12406 _ACEOF
12407 rm -f conftest.$ac_objext conftest$ac_exeext
12408 if { (eval echo "$as_me:12408: \"$ac_link\"") >&5
12409   (eval $ac_link) 2>&5
12410   ac_status=$?
12411   echo "$as_me:12411: \$? = $ac_status" >&5
12412   (exit $ac_status); } &&
12413          { ac_try='test -s conftest$ac_exeext'
12414   { (eval echo "$as_me:12414: \"$ac_try\"") >&5
12415   (eval $ac_try) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); }; }; then
12419   cf_cv_cgetent=yes
12420 else
12421   echo "$as_me: failed program was:" >&5
12422 cat conftest.$ac_ext >&5
12423 cf_cv_cgetent=no
12424 fi
12425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12426
12427 fi
12428
12429 echo "$as_me:12429: result: $cf_cv_cgetent" >&5
12430 echo "${ECHO_T}$cf_cv_cgetent" >&6
12431 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12432 #define HAVE_BSD_CGETENT 1
12433 EOF
12434
12435 fi
12436
12437 echo "$as_me:12437: checking for isascii" >&5
12438 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12439 if test "${cf_cv_have_isascii+set}" = set; then
12440   echo $ECHO_N "(cached) $ECHO_C" >&6
12441 else
12442
12443         cat >conftest.$ac_ext <<_ACEOF
12444 #line 12444 "configure"
12445 #include "confdefs.h"
12446 #include <ctype.h>
12447 int
12448 main ()
12449 {
12450 int x = isascii(' ')
12451   ;
12452   return 0;
12453 }
12454 _ACEOF
12455 rm -f conftest.$ac_objext conftest$ac_exeext
12456 if { (eval echo "$as_me:12456: \"$ac_link\"") >&5
12457   (eval $ac_link) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit $ac_status); } &&
12461          { ac_try='test -s conftest$ac_exeext'
12462   { (eval echo "$as_me:12462: \"$ac_try\"") >&5
12463   (eval $ac_try) 2>&5
12464   ac_status=$?
12465   echo "$as_me:12465: \$? = $ac_status" >&5
12466   (exit $ac_status); }; }; then
12467   cf_cv_have_isascii=yes
12468 else
12469   echo "$as_me: failed program was:" >&5
12470 cat conftest.$ac_ext >&5
12471 cf_cv_have_isascii=no
12472 fi
12473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12474
12475 fi
12476 echo "$as_me:12476: result: $cf_cv_have_isascii" >&5
12477 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12478 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12479 #define HAVE_ISASCII 1
12480 EOF
12481
12482 if test "$ac_cv_func_sigaction" = yes; then
12483 echo "$as_me:12483: checking whether sigaction needs _POSIX_SOURCE" >&5
12484 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12485 cat >conftest.$ac_ext <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12488
12489 #include <sys/types.h>
12490 #include <signal.h>
12491 int
12492 main ()
12493 {
12494 struct sigaction act
12495   ;
12496   return 0;
12497 }
12498 _ACEOF
12499 rm -f conftest.$ac_objext
12500 if { (eval echo "$as_me:12500: \"$ac_compile\"") >&5
12501   (eval $ac_compile) 2>&5
12502   ac_status=$?
12503   echo "$as_me:12503: \$? = $ac_status" >&5
12504   (exit $ac_status); } &&
12505          { ac_try='test -s conftest.$ac_objext'
12506   { (eval echo "$as_me:12506: \"$ac_try\"") >&5
12507   (eval $ac_try) 2>&5
12508   ac_status=$?
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit $ac_status); }; }; then
12511   sigact_bad=no
12512 else
12513   echo "$as_me: failed program was:" >&5
12514 cat conftest.$ac_ext >&5
12515
12516 cat >conftest.$ac_ext <<_ACEOF
12517 #line 12517 "configure"
12518 #include "confdefs.h"
12519
12520 #define _POSIX_SOURCE
12521 #include <sys/types.h>
12522 #include <signal.h>
12523 int
12524 main ()
12525 {
12526 struct sigaction act
12527   ;
12528   return 0;
12529 }
12530 _ACEOF
12531 rm -f conftest.$ac_objext
12532 if { (eval echo "$as_me:12532: \"$ac_compile\"") >&5
12533   (eval $ac_compile) 2>&5
12534   ac_status=$?
12535   echo "$as_me:12535: \$? = $ac_status" >&5
12536   (exit $ac_status); } &&
12537          { ac_try='test -s conftest.$ac_objext'
12538   { (eval echo "$as_me:12538: \"$ac_try\"") >&5
12539   (eval $ac_try) 2>&5
12540   ac_status=$?
12541   echo "$as_me:12541: \$? = $ac_status" >&5
12542   (exit $ac_status); }; }; then
12543   sigact_bad=yes
12544          cat >>confdefs.h <<\EOF
12545 #define SVR4_ACTION 1
12546 EOF
12547
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 sigact_bad=unknown
12552 fi
12553 rm -f conftest.$ac_objext conftest.$ac_ext
12554 fi
12555 rm -f conftest.$ac_objext conftest.$ac_ext
12556 echo "$as_me:12556: result: $sigact_bad" >&5
12557 echo "${ECHO_T}$sigact_bad" >&6
12558 fi
12559
12560 echo "$as_me:12560: checking if nanosleep really works" >&5
12561 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12562 if test "${cf_cv_func_nanosleep+set}" = set; then
12563   echo $ECHO_N "(cached) $ECHO_C" >&6
12564 else
12565
12566 if test "$cross_compiling" = yes; then
12567   cf_cv_func_nanosleep=unknown
12568 else
12569   cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12572
12573 #include <stdio.h>
12574 #include <errno.h>
12575 #include <time.h>
12576
12577 #ifdef HAVE_SYS_TIME_H
12578 #include <sys/time.h>
12579 #endif
12580
12581 int main() {
12582         struct timespec ts1, ts2;
12583         int code;
12584         ts1.tv_sec  = 0;
12585         ts1.tv_nsec = 750000000;
12586         ts2.tv_sec  = 0;
12587         ts2.tv_nsec = 0;
12588         errno = 0;
12589         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12590         ${cf_cv_main_return:-return}(code != 0);
12591 }
12592
12593 _ACEOF
12594 rm -f conftest$ac_exeext
12595 if { (eval echo "$as_me:12595: \"$ac_link\"") >&5
12596   (eval $ac_link) 2>&5
12597   ac_status=$?
12598   echo "$as_me:12598: \$? = $ac_status" >&5
12599   (exit $ac_status); } && { ac_try='./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_func_nanosleep=yes
12606 else
12607   echo "$as_me: program exited with status $ac_status" >&5
12608 echo "$as_me: failed program was:" >&5
12609 cat conftest.$ac_ext >&5
12610 cf_cv_func_nanosleep=no
12611 fi
12612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12613 fi
12614 fi
12615 echo "$as_me:12615: result: $cf_cv_func_nanosleep" >&5
12616 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12617
12618 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12619 #define HAVE_NANOSLEEP 1
12620 EOF
12621
12622 for ac_header in \
12623 termio.h \
12624 termios.h \
12625 unistd.h \
12626
12627 do
12628 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12629 echo "$as_me:12629: checking for $ac_header" >&5
12630 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12631 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12632   echo $ECHO_N "(cached) $ECHO_C" >&6
12633 else
12634   cat >conftest.$ac_ext <<_ACEOF
12635 #line 12635 "configure"
12636 #include "confdefs.h"
12637 #include <$ac_header>
12638 _ACEOF
12639 if { (eval echo "$as_me:12639: \"$ac_cpp conftest.$ac_ext\"") >&5
12640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12641   ac_status=$?
12642   egrep -v '^ *\+' conftest.er1 >conftest.err
12643   rm -f conftest.er1
12644   cat conftest.err >&5
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit $ac_status); } >/dev/null; then
12647   if test -s conftest.err; then
12648     ac_cpp_err=$ac_c_preproc_warn_flag
12649   else
12650     ac_cpp_err=
12651   fi
12652 else
12653   ac_cpp_err=yes
12654 fi
12655 if test -z "$ac_cpp_err"; then
12656   eval "$as_ac_Header=yes"
12657 else
12658   echo "$as_me: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   eval "$as_ac_Header=no"
12661 fi
12662 rm -f conftest.err conftest.$ac_ext
12663 fi
12664 echo "$as_me:12664: result: `eval echo '${'$as_ac_Header'}'`" >&5
12665 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12666 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12667   cat >>confdefs.h <<EOF
12668 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12669 EOF
12670
12671 fi
12672 done
12673
12674 if test "$ISC" = yes ; then
12675
12676 for ac_header in sys/termio.h
12677 do
12678 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12679 echo "$as_me:12679: checking for $ac_header" >&5
12680 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12681 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12682   echo $ECHO_N "(cached) $ECHO_C" >&6
12683 else
12684   cat >conftest.$ac_ext <<_ACEOF
12685 #line 12685 "configure"
12686 #include "confdefs.h"
12687 #include <$ac_header>
12688 _ACEOF
12689 if { (eval echo "$as_me:12689: \"$ac_cpp conftest.$ac_ext\"") >&5
12690   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12691   ac_status=$?
12692   egrep -v '^ *\+' conftest.er1 >conftest.err
12693   rm -f conftest.er1
12694   cat conftest.err >&5
12695   echo "$as_me:12695: \$? = $ac_status" >&5
12696   (exit $ac_status); } >/dev/null; then
12697   if test -s conftest.err; then
12698     ac_cpp_err=$ac_c_preproc_warn_flag
12699   else
12700     ac_cpp_err=
12701   fi
12702 else
12703   ac_cpp_err=yes
12704 fi
12705 if test -z "$ac_cpp_err"; then
12706   eval "$as_ac_Header=yes"
12707 else
12708   echo "$as_me: failed program was:" >&5
12709   cat conftest.$ac_ext >&5
12710   eval "$as_ac_Header=no"
12711 fi
12712 rm -f conftest.err conftest.$ac_ext
12713 fi
12714 echo "$as_me:12714: result: `eval echo '${'$as_ac_Header'}'`" >&5
12715 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12716 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12717   cat >>confdefs.h <<EOF
12718 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12719 EOF
12720
12721 fi
12722 done
12723
12724 fi
12725 if test "$ac_cv_header_termios_h" = yes ; then
12726         case "$CFLAGS $CPPFLAGS" in
12727         *-D_POSIX_SOURCE*)
12728                 termios_bad=dunno ;;
12729         *)      termios_bad=maybe ;;
12730         esac
12731         if test "$termios_bad" = maybe ; then
12732         echo "$as_me:12732: checking whether termios.h needs _POSIX_SOURCE" >&5
12733 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12734         cat >conftest.$ac_ext <<_ACEOF
12735 #line 12735 "configure"
12736 #include "confdefs.h"
12737 #include <termios.h>
12738 int
12739 main ()
12740 {
12741 struct termios foo; int x = foo.c_iflag
12742   ;
12743   return 0;
12744 }
12745 _ACEOF
12746 rm -f conftest.$ac_objext
12747 if { (eval echo "$as_me:12747: \"$ac_compile\"") >&5
12748   (eval $ac_compile) 2>&5
12749   ac_status=$?
12750   echo "$as_me:12750: \$? = $ac_status" >&5
12751   (exit $ac_status); } &&
12752          { ac_try='test -s conftest.$ac_objext'
12753   { (eval echo "$as_me:12753: \"$ac_try\"") >&5
12754   (eval $ac_try) 2>&5
12755   ac_status=$?
12756   echo "$as_me:12756: \$? = $ac_status" >&5
12757   (exit $ac_status); }; }; then
12758   termios_bad=no
12759 else
12760   echo "$as_me: failed program was:" >&5
12761 cat conftest.$ac_ext >&5
12762
12763                 cat >conftest.$ac_ext <<_ACEOF
12764 #line 12764 "configure"
12765 #include "confdefs.h"
12766
12767 #define _POSIX_SOURCE
12768 #include <termios.h>
12769 int
12770 main ()
12771 {
12772 struct termios foo; int x = foo.c_iflag
12773   ;
12774   return 0;
12775 }
12776 _ACEOF
12777 rm -f conftest.$ac_objext
12778 if { (eval echo "$as_me:12778: \"$ac_compile\"") >&5
12779   (eval $ac_compile) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); } &&
12783          { ac_try='test -s conftest.$ac_objext'
12784   { (eval echo "$as_me:12784: \"$ac_try\"") >&5
12785   (eval $ac_try) 2>&5
12786   ac_status=$?
12787   echo "$as_me:12787: \$? = $ac_status" >&5
12788   (exit $ac_status); }; }; then
12789   termios_bad=unknown
12790 else
12791   echo "$as_me: failed program was:" >&5
12792 cat conftest.$ac_ext >&5
12793 termios_bad=yes cat >>confdefs.h <<\EOF
12794 #define SVR4_TERMIO 1
12795 EOF
12796
12797 fi
12798 rm -f conftest.$ac_objext conftest.$ac_ext
12799
12800 fi
12801 rm -f conftest.$ac_objext conftest.$ac_ext
12802         echo "$as_me:12802: result: $termios_bad" >&5
12803 echo "${ECHO_T}$termios_bad" >&6
12804         fi
12805 fi
12806
12807 echo "$as_me:12807: checking for tcgetattr" >&5
12808 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12809 if test "${cf_cv_have_tcgetattr+set}" = set; then
12810   echo $ECHO_N "(cached) $ECHO_C" >&6
12811 else
12812
12813 cat >conftest.$ac_ext <<_ACEOF
12814 #line 12814 "configure"
12815 #include "confdefs.h"
12816
12817 #include <sys/types.h>
12818 #ifdef HAVE_UNISTD_H
12819 #include <unistd.h>
12820 #endif
12821 #ifdef HAVE_TERMIOS_H
12822 #include <termios.h>
12823 #define TTY struct termios
12824 #else
12825 #ifdef HAVE_TERMIO_H
12826 #include <termio.h>
12827 #define TTY struct termio
12828 #endif
12829 #endif
12830
12831 int
12832 main ()
12833 {
12834
12835 TTY foo;
12836 tcgetattr(1, &foo);
12837   ;
12838   return 0;
12839 }
12840 _ACEOF
12841 rm -f conftest.$ac_objext conftest$ac_exeext
12842 if { (eval echo "$as_me:12842: \"$ac_link\"") >&5
12843   (eval $ac_link) 2>&5
12844   ac_status=$?
12845   echo "$as_me:12845: \$? = $ac_status" >&5
12846   (exit $ac_status); } &&
12847          { ac_try='test -s conftest$ac_exeext'
12848   { (eval echo "$as_me:12848: \"$ac_try\"") >&5
12849   (eval $ac_try) 2>&5
12850   ac_status=$?
12851   echo "$as_me:12851: \$? = $ac_status" >&5
12852   (exit $ac_status); }; }; then
12853   cf_cv_have_tcgetattr=yes
12854 else
12855   echo "$as_me: failed program was:" >&5
12856 cat conftest.$ac_ext >&5
12857 cf_cv_have_tcgetattr=no
12858 fi
12859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12860 fi
12861 echo "$as_me:12861: result: $cf_cv_have_tcgetattr" >&5
12862 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12863 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12864 #define HAVE_TCGETATTR 1
12865 EOF
12866
12867 echo "$as_me:12867: checking for vsscanf function or workaround" >&5
12868 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12869 if test "${cf_cv_func_vsscanf+set}" = set; then
12870   echo $ECHO_N "(cached) $ECHO_C" >&6
12871 else
12872
12873 cat >conftest.$ac_ext <<_ACEOF
12874 #line 12874 "configure"
12875 #include "confdefs.h"
12876
12877 #include <stdarg.h>
12878 #include <stdio.h>
12879 int
12880 main ()
12881 {
12882
12883         va_list ap;
12884         vsscanf("from", "%d", ap)
12885   ;
12886   return 0;
12887 }
12888 _ACEOF
12889 rm -f conftest.$ac_objext conftest$ac_exeext
12890 if { (eval echo "$as_me:12890: \"$ac_link\"") >&5
12891   (eval $ac_link) 2>&5
12892   ac_status=$?
12893   echo "$as_me:12893: \$? = $ac_status" >&5
12894   (exit $ac_status); } &&
12895          { ac_try='test -s conftest$ac_exeext'
12896   { (eval echo "$as_me:12896: \"$ac_try\"") >&5
12897   (eval $ac_try) 2>&5
12898   ac_status=$?
12899   echo "$as_me:12899: \$? = $ac_status" >&5
12900   (exit $ac_status); }; }; then
12901   cf_cv_func_vsscanf=vsscanf
12902 else
12903   echo "$as_me: failed program was:" >&5
12904 cat conftest.$ac_ext >&5
12905
12906 cat >conftest.$ac_ext <<_ACEOF
12907 #line 12907 "configure"
12908 #include "confdefs.h"
12909
12910 #include <stdarg.h>
12911 #include <stdio.h>
12912 int
12913 main ()
12914 {
12915
12916     FILE strbuf;
12917     char *str = "from";
12918
12919     strbuf._flag = _IOREAD;
12920     strbuf._ptr = strbuf._base = (unsigned char *) str;
12921     strbuf._cnt = strlen(str);
12922     strbuf._file = _NFILE;
12923     return (vfscanf(&strbuf, "%d", ap))
12924   ;
12925   return 0;
12926 }
12927 _ACEOF
12928 rm -f conftest.$ac_objext conftest$ac_exeext
12929 if { (eval echo "$as_me:12929: \"$ac_link\"") >&5
12930   (eval $ac_link) 2>&5
12931   ac_status=$?
12932   echo "$as_me:12932: \$? = $ac_status" >&5
12933   (exit $ac_status); } &&
12934          { ac_try='test -s conftest$ac_exeext'
12935   { (eval echo "$as_me:12935: \"$ac_try\"") >&5
12936   (eval $ac_try) 2>&5
12937   ac_status=$?
12938   echo "$as_me:12938: \$? = $ac_status" >&5
12939   (exit $ac_status); }; }; then
12940   cf_cv_func_vsscanf=vfscanf
12941 else
12942   echo "$as_me: failed program was:" >&5
12943 cat conftest.$ac_ext >&5
12944
12945 cat >conftest.$ac_ext <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12948
12949 #include <stdarg.h>
12950 #include <stdio.h>
12951 int
12952 main ()
12953 {
12954
12955     FILE strbuf;
12956     char *str = "from";
12957
12958     strbuf._flag = _IOREAD;
12959     strbuf._ptr = strbuf._base = (unsigned char *) str;
12960     strbuf._cnt = strlen(str);
12961     strbuf._file = _NFILE;
12962     return (_doscan(&strbuf, "%d", ap))
12963   ;
12964   return 0;
12965 }
12966 _ACEOF
12967 rm -f conftest.$ac_objext conftest$ac_exeext
12968 if { (eval echo "$as_me:12968: \"$ac_link\"") >&5
12969   (eval $ac_link) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); } &&
12973          { ac_try='test -s conftest$ac_exeext'
12974   { (eval echo "$as_me:12974: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; }; then
12979   cf_cv_func_vsscanf=_doscan
12980 else
12981   echo "$as_me: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12983
12984 cf_cv_func_vsscanf=no
12985 fi
12986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12987 fi
12988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12989 fi
12990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12991 fi
12992 echo "$as_me:12992: result: $cf_cv_func_vsscanf" >&5
12993 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12994
12995 case $cf_cv_func_vsscanf in #(vi
12996 vsscanf) cat >>confdefs.h <<\EOF
12997 #define HAVE_VSSCANF 1
12998 EOF
12999 ;; #(vi
13000 vfscanf) cat >>confdefs.h <<\EOF
13001 #define HAVE_VFSCANF 1
13002 EOF
13003 ;; #(vi
13004 _doscan) cat >>confdefs.h <<\EOF
13005 #define HAVE__DOSCAN 1
13006 EOF
13007 ;;
13008 esac
13009
13010 echo "$as_me:13010: checking for working mkstemp" >&5
13011 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13012 if test "${cf_cv_func_mkstemp+set}" = set; then
13013   echo $ECHO_N "(cached) $ECHO_C" >&6
13014 else
13015
13016 rm -f conftest*
13017 if test "$cross_compiling" = yes; then
13018   echo "$as_me:13018: checking for mkstemp" >&5
13019 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13020 if test "${ac_cv_func_mkstemp+set}" = set; then
13021   echo $ECHO_N "(cached) $ECHO_C" >&6
13022 else
13023   cat >conftest.$ac_ext <<_ACEOF
13024 #line 13024 "configure"
13025 #include "confdefs.h"
13026 /* System header to define __stub macros and hopefully few prototypes,
13027     which can conflict with char mkstemp (); below.  */
13028 #include <assert.h>
13029 /* Override any gcc2 internal prototype to avoid an error.  */
13030 #ifdef __cplusplus
13031 extern "C"
13032 #endif
13033 /* We use char because int might match the return type of a gcc2
13034    builtin and then its argument prototype would still apply.  */
13035 char mkstemp ();
13036 char (*f) ();
13037
13038 int
13039 main ()
13040 {
13041 /* The GNU C library defines this for functions which it implements
13042     to always fail with ENOSYS.  Some functions are actually named
13043     something starting with __ and the normal name is an alias.  */
13044 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13045 choke me
13046 #else
13047 f = mkstemp;
13048 #endif
13049
13050   ;
13051   return 0;
13052 }
13053 _ACEOF
13054 rm -f conftest.$ac_objext conftest$ac_exeext
13055 if { (eval echo "$as_me:13055: \"$ac_link\"") >&5
13056   (eval $ac_link) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); } &&
13060          { ac_try='test -s conftest$ac_exeext'
13061   { (eval echo "$as_me:13061: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit $ac_status); }; }; then
13066   ac_cv_func_mkstemp=yes
13067 else
13068   echo "$as_me: failed program was:" >&5
13069 cat conftest.$ac_ext >&5
13070 ac_cv_func_mkstemp=no
13071 fi
13072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13073 fi
13074 echo "$as_me:13074: result: $ac_cv_func_mkstemp" >&5
13075 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13076
13077 else
13078   cat >conftest.$ac_ext <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13081
13082 #include <sys/types.h>
13083 #include <stdlib.h>
13084 #include <stdio.h>
13085 #include <string.h>
13086 #include <sys/stat.h>
13087 int main()
13088 {
13089         char *tmpl = "conftestXXXXXX";
13090         char name[2][80];
13091         int n;
13092         int result = 0;
13093         int fd;
13094         struct stat sb;
13095
13096         umask(077);
13097         for (n = 0; n < 2; ++n) {
13098                 strcpy(name[n], tmpl);
13099                 if ((fd = mkstemp(name[n])) >= 0) {
13100                         if (!strcmp(name[n], tmpl)
13101                          || stat(name[n], &sb) != 0
13102                          || (sb.st_mode & S_IFMT) != S_IFREG
13103                          || (sb.st_mode & 077) != 0) {
13104                                 result = 1;
13105                         }
13106                         close(fd);
13107                 }
13108         }
13109         if (result == 0
13110          && !strcmp(name[0], name[1]))
13111                 result = 1;
13112         ${cf_cv_main_return:-return}(result);
13113 }
13114
13115 _ACEOF
13116 rm -f conftest$ac_exeext
13117 if { (eval echo "$as_me:13117: \"$ac_link\"") >&5
13118   (eval $ac_link) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13122   { (eval echo "$as_me:13122: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   cf_cv_func_mkstemp=yes
13128
13129 else
13130   echo "$as_me: program exited with status $ac_status" >&5
13131 echo "$as_me: failed program was:" >&5
13132 cat conftest.$ac_ext >&5
13133 cf_cv_func_mkstemp=no
13134
13135 fi
13136 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13137 fi
13138
13139 fi
13140 echo "$as_me:13140: result: $cf_cv_func_mkstemp" >&5
13141 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13142 if test "$cf_cv_func_mkstemp" = yes ; then
13143         cat >>confdefs.h <<\EOF
13144 #define HAVE_MKSTEMP 1
13145 EOF
13146
13147 fi
13148
13149 # setup for prototype of fallback for vsscanf()
13150
13151 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13152         HAVE_VSSCANF=1
13153 else
13154         HAVE_VSSCANF=0
13155 fi
13156
13157 if test "$cross_compiling" = yes ; then
13158         { echo "$as_me:13158: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13159 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13160 else
13161         echo "$as_me:13161: checking whether setvbuf arguments are reversed" >&5
13162 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13163 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13164   echo $ECHO_N "(cached) $ECHO_C" >&6
13165 else
13166   if test "$cross_compiling" = yes; then
13167   { { echo "$as_me:13167: error: cannot run test program while cross compiling" >&5
13168 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13169    { (exit 1); exit 1; }; }
13170 else
13171   cat >conftest.$ac_ext <<_ACEOF
13172 #line 13172 "configure"
13173 #include "confdefs.h"
13174 #include <stdio.h>
13175 /* If setvbuf has the reversed format, exit 0. */
13176 int
13177 main ()
13178 {
13179   /* This call has the arguments reversed.
13180      A reversed system may check and see that the address of main
13181      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13182   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13183     $ac_main_return(1);
13184   putc('\r', stdout);
13185   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13186 }
13187 _ACEOF
13188 rm -f conftest$ac_exeext
13189 if { (eval echo "$as_me:13189: \"$ac_link\"") >&5
13190   (eval $ac_link) 2>&5
13191   ac_status=$?
13192   echo "$as_me:13192: \$? = $ac_status" >&5
13193   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13194   { (eval echo "$as_me:13194: \"$ac_try\"") >&5
13195   (eval $ac_try) 2>&5
13196   ac_status=$?
13197   echo "$as_me:13197: \$? = $ac_status" >&5
13198   (exit $ac_status); }; }; then
13199   ac_cv_func_setvbuf_reversed=yes
13200 else
13201   echo "$as_me: program exited with status $ac_status" >&5
13202 echo "$as_me: failed program was:" >&5
13203 cat conftest.$ac_ext >&5
13204 ac_cv_func_setvbuf_reversed=no
13205 fi
13206 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13207 fi
13208 rm -f core core.* *.core
13209 fi
13210 echo "$as_me:13210: result: $ac_cv_func_setvbuf_reversed" >&5
13211 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13212 if test $ac_cv_func_setvbuf_reversed = yes; then
13213
13214 cat >>confdefs.h <<\EOF
13215 #define SETVBUF_REVERSED 1
13216 EOF
13217
13218 fi
13219
13220 fi
13221 echo "$as_me:13221: checking return type of signal handlers" >&5
13222 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13223 if test "${ac_cv_type_signal+set}" = set; then
13224   echo $ECHO_N "(cached) $ECHO_C" >&6
13225 else
13226   cat >conftest.$ac_ext <<_ACEOF
13227 #line 13227 "configure"
13228 #include "confdefs.h"
13229 #include <sys/types.h>
13230 #include <signal.h>
13231 #ifdef signal
13232 # undef signal
13233 #endif
13234 #ifdef __cplusplus
13235 extern "C" void (*signal (int, void (*)(int)))(int);
13236 #else
13237 void (*signal ()) ();
13238 #endif
13239
13240 int
13241 main ()
13242 {
13243 int i;
13244   ;
13245   return 0;
13246 }
13247 _ACEOF
13248 rm -f conftest.$ac_objext
13249 if { (eval echo "$as_me:13249: \"$ac_compile\"") >&5
13250   (eval $ac_compile) 2>&5
13251   ac_status=$?
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit $ac_status); } &&
13254          { ac_try='test -s conftest.$ac_objext'
13255   { (eval echo "$as_me:13255: \"$ac_try\"") >&5
13256   (eval $ac_try) 2>&5
13257   ac_status=$?
13258   echo "$as_me:13258: \$? = $ac_status" >&5
13259   (exit $ac_status); }; }; then
13260   ac_cv_type_signal=void
13261 else
13262   echo "$as_me: failed program was:" >&5
13263 cat conftest.$ac_ext >&5
13264 ac_cv_type_signal=int
13265 fi
13266 rm -f conftest.$ac_objext conftest.$ac_ext
13267 fi
13268 echo "$as_me:13268: result: $ac_cv_type_signal" >&5
13269 echo "${ECHO_T}$ac_cv_type_signal" >&6
13270
13271 cat >>confdefs.h <<EOF
13272 #define RETSIGTYPE $ac_cv_type_signal
13273 EOF
13274
13275 echo "$as_me:13275: checking for type sigaction_t" >&5
13276 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13277 if test "${cf_cv_type_sigaction+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280
13281         cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284
13285 #include <signal.h>
13286 int
13287 main ()
13288 {
13289 sigaction_t x
13290   ;
13291   return 0;
13292 }
13293 _ACEOF
13294 rm -f conftest.$ac_objext
13295 if { (eval echo "$as_me:13295: \"$ac_compile\"") >&5
13296   (eval $ac_compile) 2>&5
13297   ac_status=$?
13298   echo "$as_me:13298: \$? = $ac_status" >&5
13299   (exit $ac_status); } &&
13300          { ac_try='test -s conftest.$ac_objext'
13301   { (eval echo "$as_me:13301: \"$ac_try\"") >&5
13302   (eval $ac_try) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); }; }; then
13306   cf_cv_type_sigaction=yes
13307 else
13308   echo "$as_me: failed program was:" >&5
13309 cat conftest.$ac_ext >&5
13310 cf_cv_type_sigaction=no
13311 fi
13312 rm -f conftest.$ac_objext conftest.$ac_ext
13313 fi
13314
13315 echo "$as_me:13315: result: $cf_cv_type_sigaction" >&5
13316 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13317 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13318 #define HAVE_TYPE_SIGACTION 1
13319 EOF
13320
13321 echo "$as_me:13321: checking declaration of size-change" >&5
13322 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13323 if test "${cf_cv_sizechange+set}" = set; then
13324   echo $ECHO_N "(cached) $ECHO_C" >&6
13325 else
13326
13327     cf_cv_sizechange=unknown
13328     cf_save_CPPFLAGS="$CPPFLAGS"
13329
13330 for cf_opts in "" "NEED_PTEM_H"
13331 do
13332
13333     CPPFLAGS="$cf_save_CPPFLAGS"
13334     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13335     cat >conftest.$ac_ext <<_ACEOF
13336 #line 13336 "configure"
13337 #include "confdefs.h"
13338 #include <sys/types.h>
13339 #ifdef HAVE_TERMIOS_H
13340 #include <termios.h>
13341 #else
13342 #ifdef HAVE_TERMIO_H
13343 #include <termio.h>
13344 #endif
13345 #endif
13346 #ifdef NEED_PTEM_H
13347 /* This is a workaround for SCO:  they neglected to define struct winsize in
13348  * termios.h -- it's only in termio.h and ptem.h
13349  */
13350 #include        <sys/stream.h>
13351 #include        <sys/ptem.h>
13352 #endif
13353 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13354 #include <sys/ioctl.h>
13355 #endif
13356
13357 int
13358 main ()
13359 {
13360
13361 #ifdef TIOCGSIZE
13362         struct ttysize win;     /* FIXME: what system is this? */
13363         int y = win.ts_lines;
13364         int x = win.ts_cols;
13365 #else
13366 #ifdef TIOCGWINSZ
13367         struct winsize win;
13368         int y = win.ws_row;
13369         int x = win.ws_col;
13370 #else
13371         no TIOCGSIZE or TIOCGWINSZ
13372 #endif /* TIOCGWINSZ */
13373 #endif /* TIOCGSIZE */
13374
13375   ;
13376   return 0;
13377 }
13378 _ACEOF
13379 rm -f conftest.$ac_objext
13380 if { (eval echo "$as_me:13380: \"$ac_compile\"") >&5
13381   (eval $ac_compile) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit $ac_status); } &&
13385          { ac_try='test -s conftest.$ac_objext'
13386   { (eval echo "$as_me:13386: \"$ac_try\"") >&5
13387   (eval $ac_try) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit $ac_status); }; }; then
13391   cf_cv_sizechange=yes
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 cat conftest.$ac_ext >&5
13395 cf_cv_sizechange=no
13396 fi
13397 rm -f conftest.$ac_objext conftest.$ac_ext
13398
13399         CPPFLAGS="$cf_save_CPPFLAGS"
13400         if test "$cf_cv_sizechange" = yes ; then
13401                 echo "size-change succeeded ($cf_opts)" >&5
13402                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13403                 break
13404         fi
13405 done
13406
13407 fi
13408 echo "$as_me:13408: result: $cf_cv_sizechange" >&5
13409 echo "${ECHO_T}$cf_cv_sizechange" >&6
13410 if test "$cf_cv_sizechange" != no ; then
13411         cat >>confdefs.h <<\EOF
13412 #define HAVE_SIZECHANGE 1
13413 EOF
13414
13415         case $cf_cv_sizechange in #(vi
13416         NEED*)
13417                 cat >>confdefs.h <<EOF
13418 #define $cf_cv_sizechange  1
13419 EOF
13420
13421                 ;;
13422         esac
13423 fi
13424
13425 echo "$as_me:13425: checking for memmove" >&5
13426 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13427 if test "${ac_cv_func_memmove+set}" = set; then
13428   echo $ECHO_N "(cached) $ECHO_C" >&6
13429 else
13430   cat >conftest.$ac_ext <<_ACEOF
13431 #line 13431 "configure"
13432 #include "confdefs.h"
13433 /* System header to define __stub macros and hopefully few prototypes,
13434     which can conflict with char memmove (); below.  */
13435 #include <assert.h>
13436 /* Override any gcc2 internal prototype to avoid an error.  */
13437 #ifdef __cplusplus
13438 extern "C"
13439 #endif
13440 /* We use char because int might match the return type of a gcc2
13441    builtin and then its argument prototype would still apply.  */
13442 char memmove ();
13443 char (*f) ();
13444
13445 int
13446 main ()
13447 {
13448 /* The GNU C library defines this for functions which it implements
13449     to always fail with ENOSYS.  Some functions are actually named
13450     something starting with __ and the normal name is an alias.  */
13451 #if defined (__stub_memmove) || defined (__stub___memmove)
13452 choke me
13453 #else
13454 f = memmove;
13455 #endif
13456
13457   ;
13458   return 0;
13459 }
13460 _ACEOF
13461 rm -f conftest.$ac_objext conftest$ac_exeext
13462 if { (eval echo "$as_me:13462: \"$ac_link\"") >&5
13463   (eval $ac_link) 2>&5
13464   ac_status=$?
13465   echo "$as_me:13465: \$? = $ac_status" >&5
13466   (exit $ac_status); } &&
13467          { ac_try='test -s conftest$ac_exeext'
13468   { (eval echo "$as_me:13468: \"$ac_try\"") >&5
13469   (eval $ac_try) 2>&5
13470   ac_status=$?
13471   echo "$as_me:13471: \$? = $ac_status" >&5
13472   (exit $ac_status); }; }; then
13473   ac_cv_func_memmove=yes
13474 else
13475   echo "$as_me: failed program was:" >&5
13476 cat conftest.$ac_ext >&5
13477 ac_cv_func_memmove=no
13478 fi
13479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13480 fi
13481 echo "$as_me:13481: result: $ac_cv_func_memmove" >&5
13482 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13483 if test $ac_cv_func_memmove = yes; then
13484   :
13485 else
13486
13487 echo "$as_me:13487: checking for bcopy" >&5
13488 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13489 if test "${ac_cv_func_bcopy+set}" = set; then
13490   echo $ECHO_N "(cached) $ECHO_C" >&6
13491 else
13492   cat >conftest.$ac_ext <<_ACEOF
13493 #line 13493 "configure"
13494 #include "confdefs.h"
13495 /* System header to define __stub macros and hopefully few prototypes,
13496     which can conflict with char bcopy (); below.  */
13497 #include <assert.h>
13498 /* Override any gcc2 internal prototype to avoid an error.  */
13499 #ifdef __cplusplus
13500 extern "C"
13501 #endif
13502 /* We use char because int might match the return type of a gcc2
13503    builtin and then its argument prototype would still apply.  */
13504 char bcopy ();
13505 char (*f) ();
13506
13507 int
13508 main ()
13509 {
13510 /* The GNU C library defines this for functions which it implements
13511     to always fail with ENOSYS.  Some functions are actually named
13512     something starting with __ and the normal name is an alias.  */
13513 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13514 choke me
13515 #else
13516 f = bcopy;
13517 #endif
13518
13519   ;
13520   return 0;
13521 }
13522 _ACEOF
13523 rm -f conftest.$ac_objext conftest$ac_exeext
13524 if { (eval echo "$as_me:13524: \"$ac_link\"") >&5
13525   (eval $ac_link) 2>&5
13526   ac_status=$?
13527   echo "$as_me:13527: \$? = $ac_status" >&5
13528   (exit $ac_status); } &&
13529          { ac_try='test -s conftest$ac_exeext'
13530   { (eval echo "$as_me:13530: \"$ac_try\"") >&5
13531   (eval $ac_try) 2>&5
13532   ac_status=$?
13533   echo "$as_me:13533: \$? = $ac_status" >&5
13534   (exit $ac_status); }; }; then
13535   ac_cv_func_bcopy=yes
13536 else
13537   echo "$as_me: failed program was:" >&5
13538 cat conftest.$ac_ext >&5
13539 ac_cv_func_bcopy=no
13540 fi
13541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13542 fi
13543 echo "$as_me:13543: result: $ac_cv_func_bcopy" >&5
13544 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13545 if test $ac_cv_func_bcopy = yes; then
13546
13547         echo "$as_me:13547: checking if bcopy does overlapping moves" >&5
13548 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13549 if test "${cf_cv_good_bcopy+set}" = set; then
13550   echo $ECHO_N "(cached) $ECHO_C" >&6
13551 else
13552
13553                 if test "$cross_compiling" = yes; then
13554   cf_cv_good_bcopy=unknown
13555 else
13556   cat >conftest.$ac_ext <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559
13560 int main() {
13561         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13562         char temp[40];
13563         bcopy(data, temp, sizeof(data));
13564         bcopy(temp+10, temp, 15);
13565         bcopy(temp+5, temp+15, 10);
13566         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13567 }
13568
13569 _ACEOF
13570 rm -f conftest$ac_exeext
13571 if { (eval echo "$as_me:13571: \"$ac_link\"") >&5
13572   (eval $ac_link) 2>&5
13573   ac_status=$?
13574   echo "$as_me:13574: \$? = $ac_status" >&5
13575   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13576   { (eval echo "$as_me:13576: \"$ac_try\"") >&5
13577   (eval $ac_try) 2>&5
13578   ac_status=$?
13579   echo "$as_me:13579: \$? = $ac_status" >&5
13580   (exit $ac_status); }; }; then
13581   cf_cv_good_bcopy=yes
13582 else
13583   echo "$as_me: program exited with status $ac_status" >&5
13584 echo "$as_me: failed program was:" >&5
13585 cat conftest.$ac_ext >&5
13586 cf_cv_good_bcopy=no
13587 fi
13588 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13589 fi
13590
13591 fi
13592 echo "$as_me:13592: result: $cf_cv_good_bcopy" >&5
13593 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13594
13595 else
13596   cf_cv_good_bcopy=no
13597 fi
13598
13599         if test "$cf_cv_good_bcopy" = yes ; then
13600                 cat >>confdefs.h <<\EOF
13601 #define USE_OK_BCOPY 1
13602 EOF
13603
13604         else
13605                 cat >>confdefs.h <<\EOF
13606 #define USE_MY_MEMMOVE 1
13607 EOF
13608
13609         fi
13610
13611 fi
13612
13613 echo "$as_me:13613: checking if poll really works" >&5
13614 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13615 if test "${cf_cv_working_poll+set}" = set; then
13616   echo $ECHO_N "(cached) $ECHO_C" >&6
13617 else
13618
13619 if test "$cross_compiling" = yes; then
13620   cf_cv_working_poll=unknown
13621 else
13622   cat >conftest.$ac_ext <<_ACEOF
13623 #line 13623 "configure"
13624 #include "confdefs.h"
13625
13626 #include <stdio.h>
13627 #ifdef HAVE_POLL_H
13628 #include <poll.h>
13629 #else
13630 #include <sys/poll.h>
13631 #endif
13632 int main() {
13633         struct pollfd myfds;
13634         int ret;
13635
13636         myfds.fd = 0;
13637         myfds.events = POLLIN;
13638
13639         ret = poll(&myfds, 1, 100);
13640         ${cf_cv_main_return:-return}(ret != 0);
13641 }
13642 _ACEOF
13643 rm -f conftest$ac_exeext
13644 if { (eval echo "$as_me:13644: \"$ac_link\"") >&5
13645   (eval $ac_link) 2>&5
13646   ac_status=$?
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13649   { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650   (eval $ac_try) 2>&5
13651   ac_status=$?
13652   echo "$as_me:13652: \$? = $ac_status" >&5
13653   (exit $ac_status); }; }; then
13654   cf_cv_working_poll=yes
13655 else
13656   echo "$as_me: program exited with status $ac_status" >&5
13657 echo "$as_me: failed program was:" >&5
13658 cat conftest.$ac_ext >&5
13659 cf_cv_working_poll=no
13660 fi
13661 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13662 fi
13663 fi
13664 echo "$as_me:13664: result: $cf_cv_working_poll" >&5
13665 echo "${ECHO_T}$cf_cv_working_poll" >&6
13666 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13667 #define HAVE_WORKING_POLL 1
13668 EOF
13669
13670 # special check for test/ditto.c
13671
13672 echo "$as_me:13672: checking for openpty in -lutil" >&5
13673 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13674 if test "${ac_cv_lib_util_openpty+set}" = set; then
13675   echo $ECHO_N "(cached) $ECHO_C" >&6
13676 else
13677   ac_check_lib_save_LIBS=$LIBS
13678 LIBS="-lutil  $LIBS"
13679 cat >conftest.$ac_ext <<_ACEOF
13680 #line 13680 "configure"
13681 #include "confdefs.h"
13682
13683 /* Override any gcc2 internal prototype to avoid an error.  */
13684 #ifdef __cplusplus
13685 extern "C"
13686 #endif
13687 /* We use char because int might match the return type of a gcc2
13688    builtin and then its argument prototype would still apply.  */
13689 char openpty ();
13690 int
13691 main ()
13692 {
13693 openpty ();
13694   ;
13695   return 0;
13696 }
13697 _ACEOF
13698 rm -f conftest.$ac_objext conftest$ac_exeext
13699 if { (eval echo "$as_me:13699: \"$ac_link\"") >&5
13700   (eval $ac_link) 2>&5
13701   ac_status=$?
13702   echo "$as_me:13702: \$? = $ac_status" >&5
13703   (exit $ac_status); } &&
13704          { ac_try='test -s conftest$ac_exeext'
13705   { (eval echo "$as_me:13705: \"$ac_try\"") >&5
13706   (eval $ac_try) 2>&5
13707   ac_status=$?
13708   echo "$as_me:13708: \$? = $ac_status" >&5
13709   (exit $ac_status); }; }; then
13710   ac_cv_lib_util_openpty=yes
13711 else
13712   echo "$as_me: failed program was:" >&5
13713 cat conftest.$ac_ext >&5
13714 ac_cv_lib_util_openpty=no
13715 fi
13716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13717 LIBS=$ac_check_lib_save_LIBS
13718 fi
13719 echo "$as_me:13719: result: $ac_cv_lib_util_openpty" >&5
13720 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13721 if test $ac_cv_lib_util_openpty = yes; then
13722   cf_cv_lib_util=yes
13723 else
13724   cf_cv_lib_util=no
13725 fi
13726
13727 echo "$as_me:13727: checking for openpty header" >&5
13728 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
13729 if test "${cf_cv_func_openpty+set}" = set; then
13730   echo $ECHO_N "(cached) $ECHO_C" >&6
13731 else
13732
13733     cf_save_LIBS="$LIBS"
13734     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
13735     for cf_header in pty.h libutil.h util.h
13736     do
13737     cat >conftest.$ac_ext <<_ACEOF
13738 #line 13738 "configure"
13739 #include "confdefs.h"
13740
13741 #include <$cf_header>
13742
13743 int
13744 main ()
13745 {
13746
13747     int x = openpty((int *)0, (int *)0, (char *)0,
13748                    (struct termios *)0, (struct winsize *)0);
13749
13750   ;
13751   return 0;
13752 }
13753 _ACEOF
13754 rm -f conftest.$ac_objext conftest$ac_exeext
13755 if { (eval echo "$as_me:13755: \"$ac_link\"") >&5
13756   (eval $ac_link) 2>&5
13757   ac_status=$?
13758   echo "$as_me:13758: \$? = $ac_status" >&5
13759   (exit $ac_status); } &&
13760          { ac_try='test -s conftest$ac_exeext'
13761   { (eval echo "$as_me:13761: \"$ac_try\"") >&5
13762   (eval $ac_try) 2>&5
13763   ac_status=$?
13764   echo "$as_me:13764: \$? = $ac_status" >&5
13765   (exit $ac_status); }; }; then
13766
13767         cf_cv_func_openpty=$cf_header
13768         break
13769
13770 else
13771   echo "$as_me: failed program was:" >&5
13772 cat conftest.$ac_ext >&5
13773
13774         cf_cv_func_openpty=no
13775
13776 fi
13777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13778     done
13779     LIBS="$cf_save_LIBS"
13780
13781 fi
13782 echo "$as_me:13782: result: $cf_cv_func_openpty" >&5
13783 echo "${ECHO_T}$cf_cv_func_openpty" >&6
13784
13785 if test "$cf_cv_func_openpty" != no ; then
13786     cat >>confdefs.h <<EOF
13787 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
13788 EOF
13789
13790     cat >>confdefs.h <<\EOF
13791 #define USE_XTERM_PTY 1
13792 EOF
13793
13794     if test "$cf_cv_lib_util" = yes ; then
13795         TEST_LIBS="-lutil $TEST_LIBS"
13796     fi
13797 fi
13798
13799 if test "$with_hashed_db" != no ; then
13800         cat >>confdefs.h <<\EOF
13801 #define USE_HASHED_DB 1
13802 EOF
13803
13804 case $with_hashed_db in #(vi
13805 yes|*able*) #(vi
13806     ;;
13807 *)
13808     if test -d "$with_hashed_db" ; then
13809
13810 if test -n "$with_hashed_db/include" ; then
13811   for cf_add_incdir in $with_hashed_db/include
13812   do
13813         while test $cf_add_incdir != /usr/include
13814         do
13815           if test -d $cf_add_incdir
13816           then
13817                 cf_have_incdir=no
13818                 if test -n "$CFLAGS$CPPFLAGS" ; then
13819                   # a loop is needed to ensure we can add subdirs of existing dirs
13820                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13821                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13822                           cf_have_incdir=yes; break
13823                         fi
13824                   done
13825                 fi
13826
13827                 if test "$cf_have_incdir" = no ; then
13828           if test "$cf_add_incdir" = /usr/local/include ; then
13829                         if test "$GCC" = yes
13830                         then
13831                           cf_save_CPPFLAGS=$CPPFLAGS
13832                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13833                           cat >conftest.$ac_ext <<_ACEOF
13834 #line 13834 "configure"
13835 #include "confdefs.h"
13836 #include <stdio.h>
13837 int
13838 main ()
13839 {
13840 printf("Hello")
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 rm -f conftest.$ac_objext
13846 if { (eval echo "$as_me:13846: \"$ac_compile\"") >&5
13847   (eval $ac_compile) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); } &&
13851          { ac_try='test -s conftest.$ac_objext'
13852   { (eval echo "$as_me:13852: \"$ac_try\"") >&5
13853   (eval $ac_try) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit $ac_status); }; }; then
13857   :
13858 else
13859   echo "$as_me: failed program was:" >&5
13860 cat conftest.$ac_ext >&5
13861 cf_have_incdir=yes
13862 fi
13863 rm -f conftest.$ac_objext conftest.$ac_ext
13864                           CPPFLAGS=$cf_save_CPPFLAGS
13865                         fi
13866                   fi
13867                 fi
13868
13869                 if test "$cf_have_incdir" = no ; then
13870                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13871
13872 echo "${as_me-configure}:13872: testing adding $cf_add_incdir to include-path ..." 1>&5
13873
13874                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13875
13876           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13877           test "$cf_top_incdir" = "$cf_add_incdir" && break
13878           cf_add_incdir="$cf_top_incdir"
13879                 else
13880                   break
13881                 fi
13882           fi
13883         done
13884   done
13885 fi
13886
13887 if test -n "$with_hashed_db/lib" ; then
13888   for cf_add_libdir in $with_hashed_db/lib
13889   do
13890     if test $cf_add_libdir = /usr/lib ; then
13891       :
13892     elif test -d $cf_add_libdir
13893     then
13894       cf_have_libdir=no
13895       if test -n "$LDFLAGS$LIBS" ; then
13896         # a loop is needed to ensure we can add subdirs of existing dirs
13897         for cf_test_libdir in $LDFLAGS $LIBS ; do
13898           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13899             cf_have_libdir=yes; break
13900           fi
13901         done
13902       fi
13903       if test "$cf_have_libdir" = no ; then
13904         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13905
13906 echo "${as_me-configure}:13906: testing adding $cf_add_libdir to library-path ..." 1>&5
13907
13908         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13909       fi
13910     fi
13911   done
13912 fi
13913
13914     fi
13915 esac
13916
13917 echo "$as_me:13917: checking for db.h" >&5
13918 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13919 if test "${ac_cv_header_db_h+set}" = set; then
13920   echo $ECHO_N "(cached) $ECHO_C" >&6
13921 else
13922   cat >conftest.$ac_ext <<_ACEOF
13923 #line 13923 "configure"
13924 #include "confdefs.h"
13925 #include <db.h>
13926 _ACEOF
13927 if { (eval echo "$as_me:13927: \"$ac_cpp conftest.$ac_ext\"") >&5
13928   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13929   ac_status=$?
13930   egrep -v '^ *\+' conftest.er1 >conftest.err
13931   rm -f conftest.er1
13932   cat conftest.err >&5
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); } >/dev/null; then
13935   if test -s conftest.err; then
13936     ac_cpp_err=$ac_c_preproc_warn_flag
13937   else
13938     ac_cpp_err=
13939   fi
13940 else
13941   ac_cpp_err=yes
13942 fi
13943 if test -z "$ac_cpp_err"; then
13944   ac_cv_header_db_h=yes
13945 else
13946   echo "$as_me: failed program was:" >&5
13947   cat conftest.$ac_ext >&5
13948   ac_cv_header_db_h=no
13949 fi
13950 rm -f conftest.err conftest.$ac_ext
13951 fi
13952 echo "$as_me:13952: result: $ac_cv_header_db_h" >&5
13953 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13954 if test $ac_cv_header_db_h = yes; then
13955
13956 echo "$as_me:13956: checking for version of db" >&5
13957 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13958 if test "${cf_cv_hashed_db_version+set}" = set; then
13959   echo $ECHO_N "(cached) $ECHO_C" >&6
13960 else
13961
13962 cf_cv_hashed_db_version=unknown
13963
13964 for cf_db_version in 1 2 3 4 5
13965 do
13966
13967 echo "${as_me-configure}:13967: testing checking for db version $cf_db_version ..." 1>&5
13968
13969         cat >conftest.$ac_ext <<_ACEOF
13970 #line 13970 "configure"
13971 #include "confdefs.h"
13972
13973 $ac_includes_default
13974 #include <db.h>
13975
13976 #ifdef DB_VERSION_MAJOR
13977         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13978 #if $cf_db_version == DB_VERSION_MAJOR
13979         /* ok */
13980 #else
13981         make an error
13982 #endif
13983 #else
13984 #if $cf_db_version == 1
13985         /* ok: assuming this is DB 1.8.5 */
13986 #else
13987         make an error
13988 #endif
13989 #endif
13990
13991 int
13992 main ()
13993 {
13994 DBT *foo = 0
13995   ;
13996   return 0;
13997 }
13998 _ACEOF
13999 rm -f conftest.$ac_objext
14000 if { (eval echo "$as_me:14000: \"$ac_compile\"") >&5
14001   (eval $ac_compile) 2>&5
14002   ac_status=$?
14003   echo "$as_me:14003: \$? = $ac_status" >&5
14004   (exit $ac_status); } &&
14005          { ac_try='test -s conftest.$ac_objext'
14006   { (eval echo "$as_me:14006: \"$ac_try\"") >&5
14007   (eval $ac_try) 2>&5
14008   ac_status=$?
14009   echo "$as_me:14009: \$? = $ac_status" >&5
14010   (exit $ac_status); }; }; then
14011
14012         cf_cv_hashed_db_version=$cf_db_version
14013         break
14014
14015 else
14016   echo "$as_me: failed program was:" >&5
14017 cat conftest.$ac_ext >&5
14018 fi
14019 rm -f conftest.$ac_objext conftest.$ac_ext
14020 done
14021
14022 fi
14023 echo "$as_me:14023: result: $cf_cv_hashed_db_version" >&5
14024 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14025
14026 if test "$cf_cv_hashed_db_version" = unknown ; then
14027         { { echo "$as_me:14027: error: Cannot determine version of db" >&5
14028 echo "$as_me: error: Cannot determine version of db" >&2;}
14029    { (exit 1); exit 1; }; }
14030 else
14031
14032 echo "$as_me:14032: checking for db libraries" >&5
14033 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14034 if test "${cf_cv_hashed_db_libs+set}" = set; then
14035   echo $ECHO_N "(cached) $ECHO_C" >&6
14036 else
14037
14038 cf_cv_hashed_db_libs=unknown
14039 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14040 do
14041         cf_save_libs="$LIBS"
14042         if test -n "$cf_db_libs"; then
14043                 LIBS="-l$cf_db_libs $LIBS"
14044         fi
14045
14046 echo "${as_me-configure}:14046: testing checking for library "$cf_db_libs" ..." 1>&5
14047
14048         cat >conftest.$ac_ext <<_ACEOF
14049 #line 14049 "configure"
14050 #include "confdefs.h"
14051
14052 $ac_includes_default
14053 #include <db.h>
14054
14055 int
14056 main ()
14057 {
14058
14059         char *path = "/tmp/foo";
14060 #ifdef DB_VERSION_MAJOR
14061 #if DB_VERSION_MAJOR >= 4
14062         DB *result = 0;
14063         db_create(&result, NULL, 0);
14064         result->open(result,
14065                 NULL,
14066                 path,
14067                 path,
14068                 DB_HASH,
14069                 DB_CREATE,
14070                 0644);
14071 #elif DB_VERSION_MAJOR >= 3
14072         DB *result = 0;
14073         db_create(&result, NULL, 0);
14074         result->open(result,
14075                 path,
14076                 path,
14077                 DB_HASH,
14078                 DB_CREATE,
14079                 0644);
14080 #elif DB_VERSION_MAJOR >= 2
14081         DB *result = 0;
14082         db_open(path,
14083                 DB_HASH,
14084                 DB_CREATE,
14085                 0644,
14086                 (DB_ENV *) 0,
14087                 (DB_INFO *) 0,
14088                 &result);
14089 #endif /* DB_VERSION_MAJOR */
14090 #else
14091         DB *result = dbopen(path,
14092                      2,
14093                      0644,
14094                      DB_HASH,
14095                      0);
14096 #endif
14097         ${cf_cv_main_return:-return}(result != 0)
14098
14099   ;
14100   return 0;
14101 }
14102 _ACEOF
14103 rm -f conftest.$ac_objext conftest$ac_exeext
14104 if { (eval echo "$as_me:14104: \"$ac_link\"") >&5
14105   (eval $ac_link) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); } &&
14109          { ac_try='test -s conftest$ac_exeext'
14110   { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111   (eval $ac_try) 2>&5
14112   ac_status=$?
14113   echo "$as_me:14113: \$? = $ac_status" >&5
14114   (exit $ac_status); }; }; then
14115
14116         if test -n "$cf_db_libs" ; then
14117                 cf_cv_hashed_db_libs=$cf_db_libs
14118         else
14119                 cf_cv_hashed_db_libs=default
14120         fi
14121         LIBS="$cf_save_libs"
14122         break
14123
14124 else
14125   echo "$as_me: failed program was:" >&5
14126 cat conftest.$ac_ext >&5
14127 fi
14128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14129         LIBS="$cf_save_libs"
14130 done
14131
14132 fi
14133 echo "$as_me:14133: result: $cf_cv_hashed_db_libs" >&5
14134 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14135
14136         if test "$cf_cv_hashed_db_libs" = unknown ; then
14137                 { { echo "$as_me:14137: error: Cannot determine library for db" >&5
14138 echo "$as_me: error: Cannot determine library for db" >&2;}
14139    { (exit 1); exit 1; }; }
14140         elif test "$cf_cv_hashed_db_libs" != default ; then
14141                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14142         fi
14143 fi
14144
14145 else
14146
14147         { { echo "$as_me:14147: error: Cannot find db.h" >&5
14148 echo "$as_me: error: Cannot find db.h" >&2;}
14149    { (exit 1); exit 1; }; }
14150
14151 fi
14152
14153 fi
14154
14155 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14156         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14157         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14158 fi
14159
14160 # Just in case, check if the C compiler has a bool type.
14161
14162 echo "$as_me:14162: checking if we should include stdbool.h" >&5
14163 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14164
14165 if test "${cf_cv_header_stdbool_h+set}" = set; then
14166   echo $ECHO_N "(cached) $ECHO_C" >&6
14167 else
14168
14169         cat >conftest.$ac_ext <<_ACEOF
14170 #line 14170 "configure"
14171 #include "confdefs.h"
14172
14173 int
14174 main ()
14175 {
14176 bool foo = false
14177   ;
14178   return 0;
14179 }
14180 _ACEOF
14181 rm -f conftest.$ac_objext
14182 if { (eval echo "$as_me:14182: \"$ac_compile\"") >&5
14183   (eval $ac_compile) 2>&5
14184   ac_status=$?
14185   echo "$as_me:14185: \$? = $ac_status" >&5
14186   (exit $ac_status); } &&
14187          { ac_try='test -s conftest.$ac_objext'
14188   { (eval echo "$as_me:14188: \"$ac_try\"") >&5
14189   (eval $ac_try) 2>&5
14190   ac_status=$?
14191   echo "$as_me:14191: \$? = $ac_status" >&5
14192   (exit $ac_status); }; }; then
14193   cf_cv_header_stdbool_h=0
14194 else
14195   echo "$as_me: failed program was:" >&5
14196 cat conftest.$ac_ext >&5
14197 cat >conftest.$ac_ext <<_ACEOF
14198 #line 14198 "configure"
14199 #include "confdefs.h"
14200
14201 #ifndef __BEOS__
14202 #include <stdbool.h>
14203 #endif
14204
14205 int
14206 main ()
14207 {
14208 bool foo = false
14209   ;
14210   return 0;
14211 }
14212 _ACEOF
14213 rm -f conftest.$ac_objext
14214 if { (eval echo "$as_me:14214: \"$ac_compile\"") >&5
14215   (eval $ac_compile) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit $ac_status); } &&
14219          { ac_try='test -s conftest.$ac_objext'
14220   { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221   (eval $ac_try) 2>&5
14222   ac_status=$?
14223   echo "$as_me:14223: \$? = $ac_status" >&5
14224   (exit $ac_status); }; }; then
14225   cf_cv_header_stdbool_h=1
14226 else
14227   echo "$as_me: failed program was:" >&5
14228 cat conftest.$ac_ext >&5
14229 cf_cv_header_stdbool_h=0
14230 fi
14231 rm -f conftest.$ac_objext conftest.$ac_ext
14232 fi
14233 rm -f conftest.$ac_objext conftest.$ac_ext
14234 fi
14235
14236 if test "$cf_cv_header_stdbool_h" = 1
14237 then    echo "$as_me:14237: result: yes" >&5
14238 echo "${ECHO_T}yes" >&6
14239 else    echo "$as_me:14239: result: no" >&5
14240 echo "${ECHO_T}no" >&6
14241 fi
14242
14243 echo "$as_me:14243: checking for builtin bool type" >&5
14244 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14245
14246 if test "${cf_cv_cc_bool_type+set}" = set; then
14247   echo $ECHO_N "(cached) $ECHO_C" >&6
14248 else
14249
14250         cat >conftest.$ac_ext <<_ACEOF
14251 #line 14251 "configure"
14252 #include "confdefs.h"
14253
14254 #include <stdio.h>
14255 #include <sys/types.h>
14256
14257 int
14258 main ()
14259 {
14260 bool x = false
14261   ;
14262   return 0;
14263 }
14264 _ACEOF
14265 rm -f conftest.$ac_objext
14266 if { (eval echo "$as_me:14266: \"$ac_compile\"") >&5
14267   (eval $ac_compile) 2>&5
14268   ac_status=$?
14269   echo "$as_me:14269: \$? = $ac_status" >&5
14270   (exit $ac_status); } &&
14271          { ac_try='test -s conftest.$ac_objext'
14272   { (eval echo "$as_me:14272: \"$ac_try\"") >&5
14273   (eval $ac_try) 2>&5
14274   ac_status=$?
14275   echo "$as_me:14275: \$? = $ac_status" >&5
14276   (exit $ac_status); }; }; then
14277   cf_cv_cc_bool_type=1
14278 else
14279   echo "$as_me: failed program was:" >&5
14280 cat conftest.$ac_ext >&5
14281 cf_cv_cc_bool_type=0
14282 fi
14283 rm -f conftest.$ac_objext conftest.$ac_ext
14284
14285 fi
14286
14287 if test "$cf_cv_cc_bool_type" = 1
14288 then    echo "$as_me:14288: result: yes" >&5
14289 echo "${ECHO_T}yes" >&6
14290 else    echo "$as_me:14290: result: no" >&5
14291 echo "${ECHO_T}no" >&6
14292 fi
14293
14294 # Check for C++ compiler characteristics (and ensure that it's there!)
14295 if test -n "$CXX" ; then
14296         ac_ext=cc
14297 ac_cpp='$CXXCPP $CPPFLAGS'
14298 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14299 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14300 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14301 ac_main_return=return
14302
14303 if test -n "$GXX" ; then
14304 case $cf_cv_system_name in #(vi
14305 os2*) #(vi
14306         cf_stdcpp_libname=stdcpp
14307         ;;
14308 *)
14309         cf_stdcpp_libname=stdc++
14310         ;;
14311 esac
14312 echo "$as_me:14312: checking for library $cf_stdcpp_libname" >&5
14313 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14314 if test "${cf_cv_libstdcpp+set}" = set; then
14315   echo $ECHO_N "(cached) $ECHO_C" >&6
14316 else
14317
14318         cf_save="$LIBS"
14319         LIBS="$LIBS -l$cf_stdcpp_libname"
14320 cat >conftest.$ac_ext <<_ACEOF
14321 #line 14321 "configure"
14322 #include "confdefs.h"
14323
14324 #include <strstream.h>
14325 int
14326 main ()
14327 {
14328
14329 char buf[80];
14330 strstreambuf foo(buf, sizeof(buf))
14331
14332   ;
14333   return 0;
14334 }
14335 _ACEOF
14336 rm -f conftest.$ac_objext conftest$ac_exeext
14337 if { (eval echo "$as_me:14337: \"$ac_link\"") >&5
14338   (eval $ac_link) 2>&5
14339   ac_status=$?
14340   echo "$as_me:14340: \$? = $ac_status" >&5
14341   (exit $ac_status); } &&
14342          { ac_try='test -s conftest$ac_exeext'
14343   { (eval echo "$as_me:14343: \"$ac_try\"") >&5
14344   (eval $ac_try) 2>&5
14345   ac_status=$?
14346   echo "$as_me:14346: \$? = $ac_status" >&5
14347   (exit $ac_status); }; }; then
14348   cf_cv_libstdcpp=yes
14349 else
14350   echo "$as_me: failed program was:" >&5
14351 cat conftest.$ac_ext >&5
14352 cf_cv_libstdcpp=no
14353 fi
14354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14355         LIBS="$cf_save"
14356
14357 fi
14358 echo "$as_me:14358: result: $cf_cv_libstdcpp" >&5
14359 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14360 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14361 fi
14362
14363         echo "$as_me:14363: checking whether $CXX understands -c and -o together" >&5
14364 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14365 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14366   echo $ECHO_N "(cached) $ECHO_C" >&6
14367 else
14368
14369 cat > conftest.$ac_ext <<CF_EOF
14370 #include <stdio.h>
14371 int main()
14372 {
14373         ${cf_cv_main_return:-return}(0);
14374 }
14375 CF_EOF
14376 # We do the test twice because some compilers refuse to overwrite an
14377 # existing .o file with -o, though they will create one.
14378 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14379 if { (eval echo "$as_me:14379: \"$ac_try\"") >&5
14380   (eval $ac_try) 2>&5
14381   ac_status=$?
14382   echo "$as_me:14382: \$? = $ac_status" >&5
14383   (exit $ac_status); } &&
14384   test -f conftest2.$ac_objext && { (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); };
14389 then
14390   eval cf_cv_prog_CXX_c_o=yes
14391 else
14392   eval cf_cv_prog_CXX_c_o=no
14393 fi
14394 rm -f conftest*
14395
14396 fi
14397 if test $cf_cv_prog_CXX_c_o = yes; then
14398   echo "$as_me:14398: result: yes" >&5
14399 echo "${ECHO_T}yes" >&6
14400 else
14401   echo "$as_me:14401: result: no" >&5
14402 echo "${ECHO_T}no" >&6
14403 fi
14404
14405         case $GXX_VERSION in
14406         1*|2.0-6*)
14407                 cf_cxx_library=yes
14408                 ;;
14409         *-2.7*|2.7*)
14410
14411 cf_cxx_library=unknown
14412 case $cf_cv_system_name in #(vi
14413 os2*) #(vi
14414         cf_gpp_libname=gpp
14415         ;;
14416 *)
14417         cf_gpp_libname=g++
14418         ;;
14419 esac
14420 if test "$GXX" = yes; then
14421         echo "$as_me:14421: checking for lib$cf_gpp_libname" >&5
14422 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14423         cf_save="$LIBS"
14424         LIBS="$LIBS -l$cf_gpp_libname"
14425         cat >conftest.$ac_ext <<_ACEOF
14426 #line 14426 "configure"
14427 #include "confdefs.h"
14428
14429 #include <$cf_gpp_libname/builtin.h>
14430
14431 int
14432 main ()
14433 {
14434 two_arg_error_handler_t foo2 = lib_error_handler
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 rm -f conftest.$ac_objext conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441   (eval $ac_link) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } &&
14445          { ac_try='test -s conftest$ac_exeext'
14446   { (eval echo "$as_me:14446: \"$ac_try\"") >&5
14447   (eval $ac_try) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); }; }; then
14451   cf_cxx_library=yes
14452          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14453          if test "$cf_gpp_libname" = cpp ; then
14454             cat >>confdefs.h <<\EOF
14455 #define HAVE_GPP_BUILTIN_H 1
14456 EOF
14457
14458          else
14459             cat >>confdefs.h <<\EOF
14460 #define HAVE_GXX_BUILTIN_H 1
14461 EOF
14462
14463          fi
14464 else
14465   echo "$as_me: failed program was:" >&5
14466 cat conftest.$ac_ext >&5
14467 cat >conftest.$ac_ext <<_ACEOF
14468 #line 14468 "configure"
14469 #include "confdefs.h"
14470
14471 #include <builtin.h>
14472
14473 int
14474 main ()
14475 {
14476 two_arg_error_handler_t foo2 = lib_error_handler
14477   ;
14478   return 0;
14479 }
14480 _ACEOF
14481 rm -f conftest.$ac_objext conftest$ac_exeext
14482 if { (eval echo "$as_me:14482: \"$ac_link\"") >&5
14483   (eval $ac_link) 2>&5
14484   ac_status=$?
14485   echo "$as_me:14485: \$? = $ac_status" >&5
14486   (exit $ac_status); } &&
14487          { ac_try='test -s conftest$ac_exeext'
14488   { (eval echo "$as_me:14488: \"$ac_try\"") >&5
14489   (eval $ac_try) 2>&5
14490   ac_status=$?
14491   echo "$as_me:14491: \$? = $ac_status" >&5
14492   (exit $ac_status); }; }; then
14493   cf_cxx_library=yes
14494          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14495          cat >>confdefs.h <<\EOF
14496 #define HAVE_BUILTIN_H 1
14497 EOF
14498
14499 else
14500   echo "$as_me: failed program was:" >&5
14501 cat conftest.$ac_ext >&5
14502 cf_cxx_library=no
14503 fi
14504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14505 fi
14506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14507         LIBS="$cf_save"
14508         echo "$as_me:14508: result: $cf_cxx_library" >&5
14509 echo "${ECHO_T}$cf_cxx_library" >&6
14510 fi
14511
14512                 ;;
14513         *)
14514                 cf_cxx_library=no
14515                 ;;
14516         esac
14517
14518         ac_ext=cc
14519 ac_cpp='$CXXCPP $CPPFLAGS'
14520 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14521 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14522 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14523 ac_main_return=return
14524 echo "$as_me:14524: checking how to run the C++ preprocessor" >&5
14525 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14526 if test -z "$CXXCPP"; then
14527   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14528   echo $ECHO_N "(cached) $ECHO_C" >&6
14529 else
14530       # Double quotes because CXXCPP needs to be expanded
14531     for CXXCPP in "$CXX -E" "/lib/cpp"
14532     do
14533       ac_preproc_ok=false
14534 for ac_cxx_preproc_warn_flag in '' yes
14535 do
14536   # Use a header file that comes with gcc, so configuring glibc
14537   # with a fresh cross-compiler works.
14538   # On the NeXT, cc -E runs the code through the compiler's parser,
14539   # not just through cpp. "Syntax error" is here to catch this case.
14540   cat >conftest.$ac_ext <<_ACEOF
14541 #line 14541 "configure"
14542 #include "confdefs.h"
14543 #include <assert.h>
14544                      Syntax error
14545 _ACEOF
14546 if { (eval echo "$as_me:14546: \"$ac_cpp conftest.$ac_ext\"") >&5
14547   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14548   ac_status=$?
14549   egrep -v '^ *\+' conftest.er1 >conftest.err
14550   rm -f conftest.er1
14551   cat conftest.err >&5
14552   echo "$as_me:14552: \$? = $ac_status" >&5
14553   (exit $ac_status); } >/dev/null; then
14554   if test -s conftest.err; then
14555     ac_cpp_err=$ac_cxx_preproc_warn_flag
14556   else
14557     ac_cpp_err=
14558   fi
14559 else
14560   ac_cpp_err=yes
14561 fi
14562 if test -z "$ac_cpp_err"; then
14563   :
14564 else
14565   echo "$as_me: failed program was:" >&5
14566   cat conftest.$ac_ext >&5
14567   # Broken: fails on valid input.
14568 continue
14569 fi
14570 rm -f conftest.err conftest.$ac_ext
14571
14572   # OK, works on sane cases.  Now check whether non-existent headers
14573   # can be detected and how.
14574   cat >conftest.$ac_ext <<_ACEOF
14575 #line 14575 "configure"
14576 #include "confdefs.h"
14577 #include <ac_nonexistent.h>
14578 _ACEOF
14579 if { (eval echo "$as_me:14579: \"$ac_cpp conftest.$ac_ext\"") >&5
14580   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14581   ac_status=$?
14582   egrep -v '^ *\+' conftest.er1 >conftest.err
14583   rm -f conftest.er1
14584   cat conftest.err >&5
14585   echo "$as_me:14585: \$? = $ac_status" >&5
14586   (exit $ac_status); } >/dev/null; then
14587   if test -s conftest.err; then
14588     ac_cpp_err=$ac_cxx_preproc_warn_flag
14589   else
14590     ac_cpp_err=
14591   fi
14592 else
14593   ac_cpp_err=yes
14594 fi
14595 if test -z "$ac_cpp_err"; then
14596   # Broken: success on invalid input.
14597 continue
14598 else
14599   echo "$as_me: failed program was:" >&5
14600   cat conftest.$ac_ext >&5
14601   # Passes both tests.
14602 ac_preproc_ok=:
14603 break
14604 fi
14605 rm -f conftest.err conftest.$ac_ext
14606
14607 done
14608 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14609 rm -f conftest.err conftest.$ac_ext
14610 if $ac_preproc_ok; then
14611   break
14612 fi
14613
14614     done
14615     ac_cv_prog_CXXCPP=$CXXCPP
14616
14617 fi
14618   CXXCPP=$ac_cv_prog_CXXCPP
14619 else
14620   ac_cv_prog_CXXCPP=$CXXCPP
14621 fi
14622 echo "$as_me:14622: result: $CXXCPP" >&5
14623 echo "${ECHO_T}$CXXCPP" >&6
14624 ac_preproc_ok=false
14625 for ac_cxx_preproc_warn_flag in '' yes
14626 do
14627   # Use a header file that comes with gcc, so configuring glibc
14628   # with a fresh cross-compiler works.
14629   # On the NeXT, cc -E runs the code through the compiler's parser,
14630   # not just through cpp. "Syntax error" is here to catch this case.
14631   cat >conftest.$ac_ext <<_ACEOF
14632 #line 14632 "configure"
14633 #include "confdefs.h"
14634 #include <assert.h>
14635                      Syntax error
14636 _ACEOF
14637 if { (eval echo "$as_me:14637: \"$ac_cpp conftest.$ac_ext\"") >&5
14638   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14639   ac_status=$?
14640   egrep -v '^ *\+' conftest.er1 >conftest.err
14641   rm -f conftest.er1
14642   cat conftest.err >&5
14643   echo "$as_me:14643: \$? = $ac_status" >&5
14644   (exit $ac_status); } >/dev/null; then
14645   if test -s conftest.err; then
14646     ac_cpp_err=$ac_cxx_preproc_warn_flag
14647   else
14648     ac_cpp_err=
14649   fi
14650 else
14651   ac_cpp_err=yes
14652 fi
14653 if test -z "$ac_cpp_err"; then
14654   :
14655 else
14656   echo "$as_me: failed program was:" >&5
14657   cat conftest.$ac_ext >&5
14658   # Broken: fails on valid input.
14659 continue
14660 fi
14661 rm -f conftest.err conftest.$ac_ext
14662
14663   # OK, works on sane cases.  Now check whether non-existent headers
14664   # can be detected and how.
14665   cat >conftest.$ac_ext <<_ACEOF
14666 #line 14666 "configure"
14667 #include "confdefs.h"
14668 #include <ac_nonexistent.h>
14669 _ACEOF
14670 if { (eval echo "$as_me:14670: \"$ac_cpp conftest.$ac_ext\"") >&5
14671   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14672   ac_status=$?
14673   egrep -v '^ *\+' conftest.er1 >conftest.err
14674   rm -f conftest.er1
14675   cat conftest.err >&5
14676   echo "$as_me:14676: \$? = $ac_status" >&5
14677   (exit $ac_status); } >/dev/null; then
14678   if test -s conftest.err; then
14679     ac_cpp_err=$ac_cxx_preproc_warn_flag
14680   else
14681     ac_cpp_err=
14682   fi
14683 else
14684   ac_cpp_err=yes
14685 fi
14686 if test -z "$ac_cpp_err"; then
14687   # Broken: success on invalid input.
14688 continue
14689 else
14690   echo "$as_me: failed program was:" >&5
14691   cat conftest.$ac_ext >&5
14692   # Passes both tests.
14693 ac_preproc_ok=:
14694 break
14695 fi
14696 rm -f conftest.err conftest.$ac_ext
14697
14698 done
14699 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14700 rm -f conftest.err conftest.$ac_ext
14701 if $ac_preproc_ok; then
14702   :
14703 else
14704   { { echo "$as_me:14704: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14705 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14706    { (exit 1); exit 1; }; }
14707 fi
14708
14709 ac_ext=cc
14710 ac_cpp='$CXXCPP $CPPFLAGS'
14711 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14712 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14713 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14714 ac_main_return=return
14715
14716 for ac_header in iostream typeinfo
14717 do
14718 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14719 echo "$as_me:14719: checking for $ac_header" >&5
14720 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14721 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14722   echo $ECHO_N "(cached) $ECHO_C" >&6
14723 else
14724   cat >conftest.$ac_ext <<_ACEOF
14725 #line 14725 "configure"
14726 #include "confdefs.h"
14727 #include <$ac_header>
14728 _ACEOF
14729 if { (eval echo "$as_me:14729: \"$ac_cpp conftest.$ac_ext\"") >&5
14730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14731   ac_status=$?
14732   egrep -v '^ *\+' conftest.er1 >conftest.err
14733   rm -f conftest.er1
14734   cat conftest.err >&5
14735   echo "$as_me:14735: \$? = $ac_status" >&5
14736   (exit $ac_status); } >/dev/null; then
14737   if test -s conftest.err; then
14738     ac_cpp_err=$ac_cxx_preproc_warn_flag
14739   else
14740     ac_cpp_err=
14741   fi
14742 else
14743   ac_cpp_err=yes
14744 fi
14745 if test -z "$ac_cpp_err"; then
14746   eval "$as_ac_Header=yes"
14747 else
14748   echo "$as_me: failed program was:" >&5
14749   cat conftest.$ac_ext >&5
14750   eval "$as_ac_Header=no"
14751 fi
14752 rm -f conftest.err conftest.$ac_ext
14753 fi
14754 echo "$as_me:14754: result: `eval echo '${'$as_ac_Header'}'`" >&5
14755 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14756 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14757   cat >>confdefs.h <<EOF
14758 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14759 EOF
14760
14761 fi
14762 done
14763
14764     if test x"$ac_cv_header_iostream" = xyes ; then
14765         echo "$as_me:14765: checking if iostream uses std-namespace" >&5
14766 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
14767         cat >conftest.$ac_ext <<_ACEOF
14768 #line 14768 "configure"
14769 #include "confdefs.h"
14770
14771 #include <iostream>
14772 using std::endl;
14773 using std::cerr;
14774 int
14775 main ()
14776 {
14777
14778 cerr << "testing" << endl;
14779
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext
14785 if { (eval echo "$as_me:14785: \"$ac_compile\"") >&5
14786   (eval $ac_compile) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } &&
14790          { ac_try='test -s conftest.$ac_objext'
14791   { (eval echo "$as_me:14791: \"$ac_try\"") >&5
14792   (eval $ac_try) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); }; }; then
14796   cf_iostream_namespace=yes
14797 else
14798   echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14800 cf_iostream_namespace=no
14801 fi
14802 rm -f conftest.$ac_objext conftest.$ac_ext
14803         echo "$as_me:14803: result: $cf_iostream_namespace" >&5
14804 echo "${ECHO_T}$cf_iostream_namespace" >&6
14805         if test "$cf_iostream_namespace" = yes ; then
14806             cat >>confdefs.h <<\EOF
14807 #define IOSTREAM_NAMESPACE 1
14808 EOF
14809
14810         fi
14811     fi
14812
14813 echo "$as_me:14813: checking if we should include stdbool.h" >&5
14814 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14815
14816 if test "${cf_cv_header_stdbool_h+set}" = set; then
14817   echo $ECHO_N "(cached) $ECHO_C" >&6
14818 else
14819
14820         cat >conftest.$ac_ext <<_ACEOF
14821 #line 14821 "configure"
14822 #include "confdefs.h"
14823
14824 int
14825 main ()
14826 {
14827 bool foo = false
14828   ;
14829   return 0;
14830 }
14831 _ACEOF
14832 rm -f conftest.$ac_objext
14833 if { (eval echo "$as_me:14833: \"$ac_compile\"") >&5
14834   (eval $ac_compile) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); } &&
14838          { ac_try='test -s conftest.$ac_objext'
14839   { (eval echo "$as_me:14839: \"$ac_try\"") >&5
14840   (eval $ac_try) 2>&5
14841   ac_status=$?
14842   echo "$as_me:14842: \$? = $ac_status" >&5
14843   (exit $ac_status); }; }; then
14844   cf_cv_header_stdbool_h=0
14845 else
14846   echo "$as_me: failed program was:" >&5
14847 cat conftest.$ac_ext >&5
14848 cat >conftest.$ac_ext <<_ACEOF
14849 #line 14849 "configure"
14850 #include "confdefs.h"
14851
14852 #ifndef __BEOS__
14853 #include <stdbool.h>
14854 #endif
14855
14856 int
14857 main ()
14858 {
14859 bool foo = false
14860   ;
14861   return 0;
14862 }
14863 _ACEOF
14864 rm -f conftest.$ac_objext
14865 if { (eval echo "$as_me:14865: \"$ac_compile\"") >&5
14866   (eval $ac_compile) 2>&5
14867   ac_status=$?
14868   echo "$as_me:14868: \$? = $ac_status" >&5
14869   (exit $ac_status); } &&
14870          { ac_try='test -s conftest.$ac_objext'
14871   { (eval echo "$as_me:14871: \"$ac_try\"") >&5
14872   (eval $ac_try) 2>&5
14873   ac_status=$?
14874   echo "$as_me:14874: \$? = $ac_status" >&5
14875   (exit $ac_status); }; }; then
14876   cf_cv_header_stdbool_h=1
14877 else
14878   echo "$as_me: failed program was:" >&5
14879 cat conftest.$ac_ext >&5
14880 cf_cv_header_stdbool_h=0
14881 fi
14882 rm -f conftest.$ac_objext conftest.$ac_ext
14883 fi
14884 rm -f conftest.$ac_objext conftest.$ac_ext
14885 fi
14886
14887 if test "$cf_cv_header_stdbool_h" = 1
14888 then    echo "$as_me:14888: result: yes" >&5
14889 echo "${ECHO_T}yes" >&6
14890 else    echo "$as_me:14890: result: no" >&5
14891 echo "${ECHO_T}no" >&6
14892 fi
14893
14894 echo "$as_me:14894: checking for builtin bool type" >&5
14895 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14896
14897 if test "${cf_cv_builtin_bool+set}" = set; then
14898   echo $ECHO_N "(cached) $ECHO_C" >&6
14899 else
14900
14901         cat >conftest.$ac_ext <<_ACEOF
14902 #line 14902 "configure"
14903 #include "confdefs.h"
14904
14905 #include <stdio.h>
14906 #include <sys/types.h>
14907
14908 int
14909 main ()
14910 {
14911 bool x = false
14912   ;
14913   return 0;
14914 }
14915 _ACEOF
14916 rm -f conftest.$ac_objext
14917 if { (eval echo "$as_me:14917: \"$ac_compile\"") >&5
14918   (eval $ac_compile) 2>&5
14919   ac_status=$?
14920   echo "$as_me:14920: \$? = $ac_status" >&5
14921   (exit $ac_status); } &&
14922          { ac_try='test -s conftest.$ac_objext'
14923   { (eval echo "$as_me:14923: \"$ac_try\"") >&5
14924   (eval $ac_try) 2>&5
14925   ac_status=$?
14926   echo "$as_me:14926: \$? = $ac_status" >&5
14927   (exit $ac_status); }; }; then
14928   cf_cv_builtin_bool=1
14929 else
14930   echo "$as_me: failed program was:" >&5
14931 cat conftest.$ac_ext >&5
14932 cf_cv_builtin_bool=0
14933 fi
14934 rm -f conftest.$ac_objext conftest.$ac_ext
14935
14936 fi
14937
14938 if test "$cf_cv_builtin_bool" = 1
14939 then    echo "$as_me:14939: result: yes" >&5
14940 echo "${ECHO_T}yes" >&6
14941 else    echo "$as_me:14941: result: no" >&5
14942 echo "${ECHO_T}no" >&6
14943 fi
14944
14945 echo "$as_me:14945: checking for size of bool" >&5
14946 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14947 if test "${cf_cv_type_of_bool+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950
14951         rm -f cf_test.out
14952         if test "$cross_compiling" = yes; then
14953   cf_cv_type_of_bool=unknown
14954 else
14955   cat >conftest.$ac_ext <<_ACEOF
14956 #line 14956 "configure"
14957 #include "confdefs.h"
14958
14959 #include <stdlib.h>
14960 #include <stdio.h>
14961
14962 #if defined(__cplusplus)
14963
14964 #ifdef HAVE_GXX_BUILTIN_H
14965 #include <g++/builtin.h>
14966 #elif HAVE_GPP_BUILTIN_H
14967 #include <gpp/builtin.h>
14968 #elif HAVE_BUILTIN_H
14969 #include <builtin.h>
14970 #endif
14971
14972 #else
14973
14974 #if $cf_cv_header_stdbool_h
14975 #include <stdbool.h>
14976 #endif
14977
14978 #endif
14979
14980 main()
14981 {
14982         FILE *fp = fopen("cf_test.out", "w");
14983         if (fp != 0) {
14984                 bool x = true;
14985                 if ((bool)(-x) >= 0)
14986                         fputs("unsigned ", fp);
14987                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14988                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14989                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14990                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14991                 fclose(fp);
14992         }
14993         ${cf_cv_main_return:-return}(0);
14994 }
14995
14996 _ACEOF
14997 rm -f conftest$ac_exeext
14998 if { (eval echo "$as_me:14998: \"$ac_link\"") >&5
14999   (eval $ac_link) 2>&5
15000   ac_status=$?
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15003   { (eval echo "$as_me:15003: \"$ac_try\"") >&5
15004   (eval $ac_try) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); }; }; then
15008   cf_cv_type_of_bool=`cat cf_test.out`
15009                  if test -z "$cf_cv_type_of_bool"; then
15010                    cf_cv_type_of_bool=unknown
15011                  fi
15012 else
15013   echo "$as_me: program exited with status $ac_status" >&5
15014 echo "$as_me: failed program was:" >&5
15015 cat conftest.$ac_ext >&5
15016 cf_cv_type_of_bool=unknown
15017 fi
15018 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15019 fi
15020
15021 fi
15022
15023         rm -f cf_test.out
15024 echo "$as_me:15024: result: $cf_cv_type_of_bool" >&5
15025 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15026 if test "$cf_cv_type_of_bool" = unknown ; then
15027         case .$NCURSES_BOOL in #(vi
15028         .auto|.) NCURSES_BOOL=unsigned;;
15029         esac
15030         { echo "$as_me:15030: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15031 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15032         cf_cv_type_of_bool=$NCURSES_BOOL
15033 fi
15034
15035 echo "$as_me:15035: checking for special defines needed for etip.h" >&5
15036 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15037 cf_save_CXXFLAGS="$CXXFLAGS"
15038 cf_result="none"
15039 for cf_math in "" MATH_H
15040 do
15041 for cf_excp in "" MATH_EXCEPTION
15042 do
15043         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15044         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15045         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15046 cat >conftest.$ac_ext <<_ACEOF
15047 #line 15047 "configure"
15048 #include "confdefs.h"
15049
15050 #include <etip.h.in>
15051
15052 int
15053 main ()
15054 {
15055
15056   ;
15057   return 0;
15058 }
15059 _ACEOF
15060 rm -f conftest.$ac_objext
15061 if { (eval echo "$as_me:15061: \"$ac_compile\"") >&5
15062   (eval $ac_compile) 2>&5
15063   ac_status=$?
15064   echo "$as_me:15064: \$? = $ac_status" >&5
15065   (exit $ac_status); } &&
15066          { ac_try='test -s conftest.$ac_objext'
15067   { (eval echo "$as_me:15067: \"$ac_try\"") >&5
15068   (eval $ac_try) 2>&5
15069   ac_status=$?
15070   echo "$as_me:15070: \$? = $ac_status" >&5
15071   (exit $ac_status); }; }; then
15072
15073         test -n "$cf_math" && cat >>confdefs.h <<EOF
15074 #define ETIP_NEEDS_${cf_math} 1
15075 EOF
15076
15077         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15078 #define ETIP_NEEDS_${cf_excp} 1
15079 EOF
15080
15081         cf_result="$cf_math $cf_excp"
15082         break
15083
15084 else
15085   echo "$as_me: failed program was:" >&5
15086 cat conftest.$ac_ext >&5
15087 fi
15088 rm -f conftest.$ac_objext conftest.$ac_ext
15089 done
15090 done
15091 echo "$as_me:15091: result: $cf_result" >&5
15092 echo "${ECHO_T}$cf_result" >&6
15093 CXXFLAGS="$cf_save_CXXFLAGS"
15094
15095 if test -n "$CXX"; then
15096 echo "$as_me:15096: checking if $CXX accepts parameter initialization" >&5
15097 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15098 if test "${cf_cv_cpp_param_init+set}" = set; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101
15102         ac_ext=cc
15103 ac_cpp='$CXXCPP $CPPFLAGS'
15104 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15105 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15106 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15107 ac_main_return=return
15108
15109         if test "$cross_compiling" = yes; then
15110   cf_cv_cpp_param_init=unknown
15111 else
15112   cat >conftest.$ac_ext <<_ACEOF
15113 #line 15113 "configure"
15114 #include "confdefs.h"
15115
15116 class TEST {
15117 private:
15118         int value;
15119 public:
15120         TEST(int x = 1);
15121         ~TEST();
15122 };
15123
15124 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15125 {
15126         value = x;
15127 }
15128 void main() { }
15129
15130 _ACEOF
15131 rm -f conftest$ac_exeext
15132 if { (eval echo "$as_me:15132: \"$ac_link\"") >&5
15133   (eval $ac_link) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15137   { (eval echo "$as_me:15137: \"$ac_try\"") >&5
15138   (eval $ac_try) 2>&5
15139   ac_status=$?
15140   echo "$as_me:15140: \$? = $ac_status" >&5
15141   (exit $ac_status); }; }; then
15142   cf_cv_cpp_param_init=yes
15143 else
15144   echo "$as_me: program exited with status $ac_status" >&5
15145 echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 cf_cv_cpp_param_init=no
15148 fi
15149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15150 fi
15151         ac_ext=cc
15152 ac_cpp='$CXXCPP $CPPFLAGS'
15153 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15154 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15155 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15156 ac_main_return=return
15157
15158 fi
15159 echo "$as_me:15159: result: $cf_cv_cpp_param_init" >&5
15160 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15161 fi
15162 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15163 #define CPP_HAS_PARAM_INIT 1
15164 EOF
15165
15166 if test -n "$CXX"; then
15167
15168 echo "$as_me:15168: checking if $CXX accepts static_cast" >&5
15169 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15170 if test "${cf_cv_cpp_static_cast+set}" = set; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173
15174         ac_ext=cc
15175 ac_cpp='$CXXCPP $CPPFLAGS'
15176 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15177 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15178 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15179 ac_main_return=return
15180
15181         cat >conftest.$ac_ext <<_ACEOF
15182 #line 15182 "configure"
15183 #include "confdefs.h"
15184
15185 class NCursesPanel
15186 {
15187 public:
15188   NCursesPanel(int nlines,
15189                int ncols,
15190                int begin_y = 0,
15191                int begin_x = 0)
15192   {
15193   }
15194
15195   ~NCursesPanel();
15196 };
15197
15198 template<class T> class NCursesUserPanel : public NCursesPanel
15199 {
15200 public:
15201   NCursesUserPanel (int nlines,
15202                     int ncols,
15203                     int begin_y = 0,
15204                     int begin_x = 0,
15205                     const T* p_UserData = static_cast<T*>(0))
15206     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15207   {
15208   };
15209   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15210   {
15211   };
15212
15213   virtual ~NCursesUserPanel() {};
15214 };
15215
15216 int
15217 main ()
15218 {
15219
15220         const char* p_UserData = static_cast<char*>(0)
15221   ;
15222   return 0;
15223 }
15224 _ACEOF
15225 rm -f conftest.$ac_objext
15226 if { (eval echo "$as_me:15226: \"$ac_compile\"") >&5
15227   (eval $ac_compile) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); } &&
15231          { ac_try='test -s conftest.$ac_objext'
15232   { (eval echo "$as_me:15232: \"$ac_try\"") >&5
15233   (eval $ac_try) 2>&5
15234   ac_status=$?
15235   echo "$as_me:15235: \$? = $ac_status" >&5
15236   (exit $ac_status); }; }; then
15237   cf_cv_cpp_static_cast=yes
15238 else
15239   echo "$as_me: failed program was:" >&5
15240 cat conftest.$ac_ext >&5
15241 cf_cv_cpp_static_cast=no
15242 fi
15243 rm -f conftest.$ac_objext conftest.$ac_ext
15244
15245         ac_ext=cc
15246 ac_cpp='$CXXCPP $CPPFLAGS'
15247 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15248 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15249 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15250 ac_main_return=return
15251
15252 fi
15253 echo "$as_me:15253: result: $cf_cv_cpp_static_cast" >&5
15254 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15255
15256 fi
15257
15258 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15259 #define CPP_HAS_STATIC_CAST 1
15260 EOF
15261
15262         CXX_AR='$(AR)'
15263         CXX_AR_OPTS='$(AR_OPTS)'
15264         case $cf_cv_system_name in #(vi
15265         irix*) #(vi
15266             if test "$GXX" != yes ; then
15267                 CXX_AR='$(CXX)'
15268                 CXX_AR_OPTS='-ar -o'
15269             fi
15270             ;;
15271         sco3.2v5*) #(vi
15272             CXXLDFLAGS="-u main"
15273             ;;
15274         solaris2*)
15275             if test "$GXX" != yes ; then
15276                 CXX_AR='$(CXX)'
15277                 CXX_AR_OPTS='-xar -o'
15278             fi
15279             ;;
15280         esac
15281
15282 else
15283         cf_cxx_library=no
15284         cf_cv_builtin_bool=1
15285
15286         # Just because we are not configuring against C++ right now does not
15287         # mean that a user will not want to use C++.  Some distributors disable
15288         # the C++ portion of this configuration as a shortcut (or just to avoid
15289         # compiling the demo in the c++ directory).  So we need a reasonable
15290         # default for the 'bool' type.
15291         #
15292         # Caveat: since the storage of the bool type is not standardized, it
15293         # may change.
15294
15295         if test "$NCURSES_BOOL" != auto ; then
15296                 cf_cv_type_of_bool=$NCURSES_BOOL
15297                 cf_cv_header_stdbool_h=0
15298         else
15299                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15300
15301 echo "$as_me:15301: checking for size of bool" >&5
15302 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15303 if test "${cf_cv_type_of_bool+set}" = set; then
15304   echo $ECHO_N "(cached) $ECHO_C" >&6
15305 else
15306
15307         rm -f cf_test.out
15308         if test "$cross_compiling" = yes; then
15309   cf_cv_type_of_bool=unknown
15310 else
15311   cat >conftest.$ac_ext <<_ACEOF
15312 #line 15312 "configure"
15313 #include "confdefs.h"
15314
15315 #include <stdlib.h>
15316 #include <stdio.h>
15317
15318 #if defined(__cplusplus)
15319
15320 #ifdef HAVE_GXX_BUILTIN_H
15321 #include <g++/builtin.h>
15322 #elif HAVE_GPP_BUILTIN_H
15323 #include <gpp/builtin.h>
15324 #elif HAVE_BUILTIN_H
15325 #include <builtin.h>
15326 #endif
15327
15328 #else
15329
15330 #if $cf_cv_header_stdbool_h
15331 #include <stdbool.h>
15332 #endif
15333
15334 #endif
15335
15336 main()
15337 {
15338         FILE *fp = fopen("cf_test.out", "w");
15339         if (fp != 0) {
15340                 bool x = true;
15341                 if ((bool)(-x) >= 0)
15342                         fputs("unsigned ", fp);
15343                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15344                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15345                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15346                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15347                 fclose(fp);
15348         }
15349         ${cf_cv_main_return:-return}(0);
15350 }
15351
15352 _ACEOF
15353 rm -f conftest$ac_exeext
15354 if { (eval echo "$as_me:15354: \"$ac_link\"") >&5
15355   (eval $ac_link) 2>&5
15356   ac_status=$?
15357   echo "$as_me:15357: \$? = $ac_status" >&5
15358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15359   { (eval echo "$as_me:15359: \"$ac_try\"") >&5
15360   (eval $ac_try) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); }; }; then
15364   cf_cv_type_of_bool=`cat cf_test.out`
15365                  if test -z "$cf_cv_type_of_bool"; then
15366                    cf_cv_type_of_bool=unknown
15367                  fi
15368 else
15369   echo "$as_me: program exited with status $ac_status" >&5
15370 echo "$as_me: failed program was:" >&5
15371 cat conftest.$ac_ext >&5
15372 cf_cv_type_of_bool=unknown
15373 fi
15374 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15375 fi
15376
15377 fi
15378
15379         rm -f cf_test.out
15380 echo "$as_me:15380: result: $cf_cv_type_of_bool" >&5
15381 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15382 if test "$cf_cv_type_of_bool" = unknown ; then
15383         case .$NCURSES_BOOL in #(vi
15384         .auto|.) NCURSES_BOOL=unsigned;;
15385         esac
15386         { echo "$as_me:15386: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15387 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15388         cf_cv_type_of_bool=$NCURSES_BOOL
15389 fi
15390
15391                 else
15392                         echo "$as_me:15392: checking for fallback type of bool" >&5
15393 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15394                         case "$host_cpu" in #(vi
15395                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15396                         *)      cf_cv_type_of_bool=int  ;;
15397                         esac
15398                         echo "$as_me:15398: result: $cf_cv_type_of_bool" >&5
15399 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15400                 fi
15401         fi
15402 fi
15403
15404 # If the C compiler did not declare bool, and we did not determine that the C++
15405 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15406 # ncurses library use the same type as C++ bool.  Note that this allows one to
15407 # specify the type of bool in a configure-script option and postpone
15408 # integration with the C++ compiler provided that the types are compatible.
15409 USE_CXX_BOOL=1
15410 if test $cf_cv_cc_bool_type = 1
15411 then
15412         # oops: C has a bool.  Unlikely, but C++ could differ.
15413         USE_CXX_BOOL=0
15414 elif test $cf_cv_builtin_bool = 0
15415 then
15416         # C++ has no bool
15417         USE_CXX_BOOL=0
15418 else
15419         # this is the normal case
15420         USE_CXX_BOOL='defined(__cplusplus)'
15421 fi
15422
15423 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15424
15425 if test "$cf_with_ada" != "no" ; then
15426     if test "$with_libtool" != "no"; then
15427         { echo "$as_me:15427: WARNING: libtool does not support Ada - disabling feature" >&5
15428 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15429         cf_with_ada=no
15430     fi
15431 fi
15432
15433 if test "$cf_with_ada" != "no" ; then
15434 cf_ada_make=gnatmake
15435 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15436 set dummy $cf_ada_make; ac_word=$2
15437 echo "$as_me:15437: checking for $ac_word" >&5
15438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15439 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15440   echo $ECHO_N "(cached) $ECHO_C" >&6
15441 else
15442   if test -n "$gnat_exists"; then
15443   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15444 else
15445   ac_save_IFS=$IFS; IFS=$ac_path_separator
15446 ac_dummy="$PATH"
15447 for ac_dir in $ac_dummy; do
15448   IFS=$ac_save_IFS
15449   test -z "$ac_dir" && ac_dir=.
15450   $as_executable_p "$ac_dir/$ac_word" || continue
15451 ac_cv_prog_gnat_exists="yes"
15452 echo "$as_me:15452: found $ac_dir/$ac_word" >&5
15453 break
15454 done
15455
15456   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15457 fi
15458 fi
15459 gnat_exists=$ac_cv_prog_gnat_exists
15460 if test -n "$gnat_exists"; then
15461   echo "$as_me:15461: result: $gnat_exists" >&5
15462 echo "${ECHO_T}$gnat_exists" >&6
15463 else
15464   echo "$as_me:15464: result: no" >&5
15465 echo "${ECHO_T}no" >&6
15466 fi
15467
15468 if test "$ac_cv_prog_gnat_exists" = no; then
15469    cf_ada_make=
15470 else
15471
15472 echo "$as_me:15472: checking for gnat version" >&5
15473 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15474 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15475   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15476 echo "$as_me:15476: result: $cf_gnat_version" >&5
15477 echo "${ECHO_T}$cf_gnat_version" >&6
15478
15479 case $cf_gnat_version in
15480   3.1[1-9]*|3.[2-9]*|[4-9].*)
15481     cf_cv_prog_gnat_correct=yes
15482     ;;
15483   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15484      cf_cv_prog_gnat_correct=no
15485      ;;
15486 esac
15487 case $cf_gnat_version in
15488   3.[1-9]*|[4-9].*)
15489       cf_compile_generics=generics
15490       cf_generic_objects="\${GENOBJS}"
15491       ;;
15492   *)  cf_compile_generics=
15493       cf_generic_objects=
15494       ;;
15495 esac
15496
15497    # Extract the first word of "m4", so it can be a program name with args.
15498 set dummy m4; ac_word=$2
15499 echo "$as_me:15499: checking for $ac_word" >&5
15500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15501 if test "${ac_cv_prog_M4_exists+set}" = set; then
15502   echo $ECHO_N "(cached) $ECHO_C" >&6
15503 else
15504   if test -n "$M4_exists"; then
15505   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15506 else
15507   ac_save_IFS=$IFS; IFS=$ac_path_separator
15508 ac_dummy="$PATH"
15509 for ac_dir in $ac_dummy; do
15510   IFS=$ac_save_IFS
15511   test -z "$ac_dir" && ac_dir=.
15512   $as_executable_p "$ac_dir/$ac_word" || continue
15513 ac_cv_prog_M4_exists="yes"
15514 echo "$as_me:15514: found $ac_dir/$ac_word" >&5
15515 break
15516 done
15517
15518   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15519 fi
15520 fi
15521 M4_exists=$ac_cv_prog_M4_exists
15522 if test -n "$M4_exists"; then
15523   echo "$as_me:15523: result: $M4_exists" >&5
15524 echo "${ECHO_T}$M4_exists" >&6
15525 else
15526   echo "$as_me:15526: result: no" >&5
15527 echo "${ECHO_T}no" >&6
15528 fi
15529
15530    if test "$ac_cv_prog_M4_exists" = no; then
15531       cf_cv_prog_gnat_correct=no
15532       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15533    fi
15534    if test "$cf_cv_prog_gnat_correct" = yes; then
15535       echo "$as_me:15535: checking if GNAT works" >&5
15536 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15537
15538 rm -f conftest*
15539 cat >>conftest.ads <<CF_EOF
15540 procedure conftest;
15541 CF_EOF
15542 cat >>conftest.adb <<CF_EOF
15543 with Text_IO;
15544 with GNAT.OS_Lib;
15545 procedure conftest is
15546 begin
15547    Text_IO.Put ("Hello World");
15548    Text_IO.New_Line;
15549    GNAT.OS_Lib.OS_Exit (0);
15550 end conftest;
15551 CF_EOF
15552 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15553    if ( ./conftest 1>&5 2>&1 ) ; then
15554       cf_cv_prog_gnat_correct=yes
15555    else
15556       cf_cv_prog_gnat_correct=no
15557    fi
15558 else
15559    cf_cv_prog_gnat_correct=no
15560 fi
15561 rm -f conftest*
15562
15563       echo "$as_me:15563: result: $cf_cv_prog_gnat_correct" >&5
15564 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15565    fi
15566 fi
15567 if test "$cf_cv_prog_gnat_correct" = yes; then
15568    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15569
15570    echo "$as_me:15570: checking if GNAT pragma Unreferenced works" >&5
15571 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15572
15573 rm -f conftest*
15574 cat >>conftest.ads <<CF_EOF
15575 procedure conftest;
15576 CF_EOF
15577 cat >>conftest.adb <<CF_EOF
15578 with Text_IO;
15579 with GNAT.OS_Lib;
15580 procedure conftest is
15581    test : Integer;
15582    pragma Unreferenced (test);
15583 begin
15584    test := 1;
15585    Text_IO.Put ("Hello World");
15586    Text_IO.New_Line;
15587    GNAT.OS_Lib.OS_Exit (0);
15588 end conftest;
15589 CF_EOF
15590 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15591       cf_cv_pragma_unreferenced=yes
15592 else
15593    cf_cv_pragma_unreferenced=no
15594 fi
15595 rm -f conftest*
15596
15597    echo "$as_me:15597: result: $cf_cv_pragma_unreferenced" >&5
15598 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15599
15600    # if the pragma is supported, use it (needed in the Trace code).
15601    if test $cf_cv_pragma_unreferenced = yes ; then
15602       PRAGMA_UNREF=TRUE
15603    else
15604       PRAGMA_UNREF=FALSE
15605    fi
15606
15607 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15608 if test "${with_ada_compiler+set}" = set; then
15609   withval="$with_ada_compiler"
15610   cf_ada_compiler=$withval
15611 else
15612   cf_ada_compiler=gnatmake
15613 fi;
15614
15615    cf_ada_package=terminal_interface
15616
15617 # Check whether --with-ada-include or --without-ada-include was given.
15618 if test "${with_ada_include+set}" = set; then
15619   withval="$with_ada_include"
15620
15621 else
15622   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15623 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15624
15625 if test "x$prefix" != xNONE; then
15626   cf_path_syntax="$prefix"
15627 else
15628   cf_path_syntax="$ac_default_prefix"
15629 fi
15630
15631 case ".$withval" in #(vi
15632 .\$\(*\)*|.\'*\'*) #(vi
15633   ;;
15634 ..|./*|.\\*) #(vi
15635   ;;
15636 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15637   ;;
15638 .\${*prefix}*) #(vi
15639   eval withval="$withval"
15640   case ".$withval" in #(vi
15641   .NONE/*)
15642     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15643     ;;
15644   esac
15645   ;; #(vi
15646 .no|.NONE/*)
15647   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15648   ;;
15649 *)
15650   { { echo "$as_me:15650: error: expected a pathname, not \"$withval\"" >&5
15651 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15652    { (exit 1); exit 1; }; }
15653   ;;
15654 esac
15655
15656 fi
15657 ADA_INCLUDE="$withval"
15658
15659 # Check whether --with-ada-objects or --without-ada-objects was given.
15660 if test "${with_ada_objects+set}" = set; then
15661   withval="$with_ada_objects"
15662
15663 else
15664   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15665 fi; if test -n "$prefix/lib/ada/adalib" ; then
15666
15667 if test "x$prefix" != xNONE; then
15668   cf_path_syntax="$prefix"
15669 else
15670   cf_path_syntax="$ac_default_prefix"
15671 fi
15672
15673 case ".$withval" in #(vi
15674 .\$\(*\)*|.\'*\'*) #(vi
15675   ;;
15676 ..|./*|.\\*) #(vi
15677   ;;
15678 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15679   ;;
15680 .\${*prefix}*) #(vi
15681   eval withval="$withval"
15682   case ".$withval" in #(vi
15683   .NONE/*)
15684     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15685     ;;
15686   esac
15687   ;; #(vi
15688 .no|.NONE/*)
15689   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15690   ;;
15691 *)
15692   { { echo "$as_me:15692: error: expected a pathname, not \"$withval\"" >&5
15693 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15694    { (exit 1); exit 1; }; }
15695   ;;
15696 esac
15697
15698 fi
15699 ADA_OBJECTS="$withval"
15700
15701 fi
15702 fi
15703 else
15704    cf_with_ada=no
15705 fi
15706
15707 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15708 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15709 ###
15710 ### ticlib modules may be a separate library, otherwise contained in termlib.
15711 ### termlib modules may be a separate library, otherwise contained in ncurses.
15712 ###
15713 ### The of "+" or " " between the tokens controls the way the script
15714 ### chooses to split module lists into libraries.
15715 ###
15716 ### (see CF_LIB_RULES).
15717 echo "$as_me:15717: checking for library subsets" >&5
15718 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15719 LIB_SUBSETS=
15720
15721 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15722         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15723         if test "$with_ticlib" != no ; then
15724                 LIB_SUBSETS="${LIB_SUBSETS} "
15725         else
15726                 LIB_SUBSETS="${LIB_SUBSETS}+"
15727         fi
15728 fi
15729
15730 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15731 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15732 if test "$with_termlib" != no ; then
15733         LIB_SUBSETS="${LIB_SUBSETS} "
15734 else
15735         LIB_SUBSETS="${LIB_SUBSETS}+"
15736 fi
15737
15738 LIB_SUBSETS="${LIB_SUBSETS}base"
15739 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15740 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15741
15742 echo "$as_me:15742: result: $LIB_SUBSETS" >&5
15743 echo "${ECHO_T}$LIB_SUBSETS" >&6
15744
15745 ### Construct the list of include-directories to be generated
15746
15747 CPPFLAGS="-I. -I../include $CPPFLAGS"
15748 if test "$srcdir" != "."; then
15749         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15750 fi
15751 if test "$GCC" != yes; then
15752         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15753 elif test "$includedir" != "/usr/include"; then
15754         if test "$includedir" = '${prefix}/include' ; then
15755                 if test $prefix != /usr ; then
15756                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15757                 fi
15758         else
15759                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15760         fi
15761 fi
15762
15763 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15764 if test "$srcdir" != "."; then
15765         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15766 fi
15767 if test "$GCC" != yes; then
15768         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15769 elif test "$includedir" != "/usr/include"; then
15770         if test "$includedir" = '${prefix}/include' ; then
15771                 if test $prefix != /usr ; then
15772                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15773                 fi
15774         else
15775                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15776         fi
15777 fi
15778
15779 ### Build up pieces for makefile rules
15780 echo "$as_me:15780: checking default library suffix" >&5
15781 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15782
15783         case $DFT_LWR_MODEL in
15784         libtool) DFT_ARG_SUFFIX=''   ;;
15785         normal)  DFT_ARG_SUFFIX=''   ;;
15786         debug)   DFT_ARG_SUFFIX='_g' ;;
15787         profile) DFT_ARG_SUFFIX='_p' ;;
15788         shared)  DFT_ARG_SUFFIX=''   ;;
15789         esac
15790         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15791 echo "$as_me:15791: result: $DFT_ARG_SUFFIX" >&5
15792 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15793
15794 echo "$as_me:15794: checking default library-dependency suffix" >&5
15795 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15796
15797         case $DFT_LWR_MODEL in
15798         libtool) DFT_DEP_SUFFIX='.la'  ;;
15799         normal)  DFT_DEP_SUFFIX='.a'   ;;
15800         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15801         profile) DFT_DEP_SUFFIX='_p.a' ;;
15802         shared)
15803                 case $cf_cv_system_name in
15804                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15805                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15806                 hpux*)
15807                         case $target in
15808                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15809                         *)      DFT_DEP_SUFFIX='.sl' ;;
15810                         esac
15811                         ;;
15812                 *)      DFT_DEP_SUFFIX='.so'  ;;
15813                 esac
15814         esac
15815         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15816 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15817 if test $DFT_LWR_MODEL = shared ; then
15818         case $cf_cv_system_name in #(vi
15819         cygwin*)
15820                 DFT_DEP_SUFFIX=".dll.a"
15821                 DFT_LIB_SUFFIX=".dll"
15822                 ;;
15823         esac
15824 fi
15825 echo "$as_me:15825: result: $DFT_DEP_SUFFIX" >&5
15826 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15827
15828 echo "$as_me:15828: checking default object directory" >&5
15829 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15830
15831         case $DFT_LWR_MODEL in
15832         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15833         normal)  DFT_OBJ_SUBDIR='objects' ;;
15834         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15835         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15836         shared)
15837                 case $cf_cv_system_name in #(vi
15838                 cygwin) #(vi
15839                         DFT_OBJ_SUBDIR='objects' ;;
15840                 *)
15841                         DFT_OBJ_SUBDIR='obj_s' ;;
15842                 esac
15843         esac
15844 echo "$as_me:15844: result: $DFT_OBJ_SUBDIR" >&5
15845 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15846
15847 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15848 if test "$cf_with_cxx" = yes ; then
15849 echo "$as_me:15849: checking c++ library-dependency suffix" >&5
15850 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15851 if test "$with_libtool" != "no"; then
15852         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15853 else
15854
15855         case normal in
15856         libtool) CXX_LIB_SUFFIX='.la'  ;;
15857         normal)  CXX_LIB_SUFFIX='.a'   ;;
15858         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15859         profile) CXX_LIB_SUFFIX='_p.a' ;;
15860         shared)
15861                 case $cf_cv_system_name in
15862                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15863                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15864                 hpux*)
15865                         case $target in
15866                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15867                         *)      CXX_LIB_SUFFIX='.sl' ;;
15868                         esac
15869                         ;;
15870                 *)      CXX_LIB_SUFFIX='.so'  ;;
15871                 esac
15872         esac
15873         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15874 fi
15875 echo "$as_me:15875: result: $CXX_LIB_SUFFIX" >&5
15876 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15877
15878 fi
15879
15880 # do not want -ldl in build except as needed for -lncurses dependency
15881 if test "$with_dlsym" = yes ; then
15882 if test $DFT_LWR_MODEL = shared || \
15883    test $DFT_LWR_MODEL = libtool ; then
15884
15885 # remove dl library from $LIBS
15886 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15887
15888 fi
15889 fi
15890 ### Set up low-level terminfo dependencies for makefiles.
15891
15892 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15893 # do not need libdl
15894 TICS_LIST=
15895 if test "$with_dlsym" = yes ; then
15896
15897 # remove dl library from $SHLIB_LIST
15898 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15899
15900 fi
15901
15902 if test "$with_ticlib" != no ; then
15903
15904         if test "$with_ticlib" != yes ; then
15905                 TICS_NAME=$with_ticlib
15906                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15907                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15908                 TICS_LIB_SUFFIX="${with_ticlib}"
15909         else
15910                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15911                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15912                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15913         fi
15914         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15915 else
15916         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15917 fi
15918
15919 if test "$with_termlib" != no ; then
15920
15921         if test "$with_termlib" != yes ; then
15922                 TINFO_NAME=$with_termlib
15923                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15924                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15925                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15926                 TINFO_LIB_SUFFIX="${with_termlib}"
15927         else
15928                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15929                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15930                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15931                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15932         fi
15933
15934         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15935         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15936         if test "$DFT_LWR_MODEL" = "libtool"; then
15937                 TEST_ARGS="${TEST_DEPS}"
15938                 TEST_ARG2="${TEST_DEP2}"
15939                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15940         else
15941                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15942                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15943                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15944                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15945                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15946         fi
15947 else
15948         # the next lines are needed for linking libtic over libncurses
15949         TINFO_NAME=${LIB_NAME}
15950         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15951         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15952         TICS_LIST="$SHLIB_LIST"
15953
15954         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15955 fi
15956
15957 if test "$DFT_LWR_MODEL" = shared ; then
15958         case $cf_cv_system_name in #(vi
15959         cygwin*)
15960                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15961                 TINFO_SUFFIX=.dll
15962                 ;;
15963         esac
15964 fi
15965
15966 if test "$with_dlsym" = yes ; then
15967
15968 # remove dl library from $TICS_LIST
15969 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15970
15971 fi
15972
15973 if test "$DFT_LWR_MODEL" = "libtool"; then
15974     OBJEXT=lo
15975 fi
15976
15977 # needed for Ada95
15978 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15979
15980 case $DFT_LWR_MODEL in
15981 normal|debug|profile)
15982
15983 if test "$GCC" = yes ; then
15984         case $cf_cv_system_name in #(
15985         aix[45]*)       #( gcc 4.2.4 linkage on AIX is broken
15986                 LDFLAGS_STATIC=
15987                 LDFLAGS_SHARED=
15988                 ;;
15989     *)  #( normally, except when broken
15990         LDFLAGS_STATIC=-static
15991         LDFLAGS_SHARED=-dynamic
15992         ;;
15993     esac
15994 else
15995         case $cf_cv_system_name in #(
15996         aix[45]*)       #( from ld manpage
15997                 LDFLAGS_STATIC=-bstatic
15998                 LDFLAGS_SHARED=-bdynamic
15999                 ;;
16000         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16001                 # We could also use just "archive" and "shared".
16002                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16003                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16004                 ;;
16005         irix*)          #( from ld manpage IRIX64
16006                 LDFLAGS_STATIC=-Bstatic
16007                 LDFLAGS_SHARED=-Bdynamic
16008                 ;;
16009         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16010                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16011                 LDFLAGS_STATIC=-noso
16012                 LDFLAGS_SHARED=-so_archive
16013                 ;;
16014         solaris2*)
16015                 LDFLAGS_STATIC=-Bstatic
16016                 LDFLAGS_SHARED=-Bdynamic
16017                 ;;
16018         esac
16019 fi
16020
16021         ;;
16022 esac
16023
16024 echo "$as_me:16024: checking where we will install curses.h" >&5
16025 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16026 test "$with_overwrite" = no && \
16027 test "x$includedir" = 'x${prefix}/include' && \
16028         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16029 echo "$as_me:16029: result: $includedir" >&5
16030 echo "${ECHO_T}$includedir" >&6
16031
16032 ### Resolve a conflict between normal and wide-curses by forcing applications
16033 ### that will need libutf8 to add it to their configure script.
16034 if test "$with_overwrite" != no ; then
16035 if test "$NCURSES_LIBUTF8" = 1 ; then
16036         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16037         { echo "$as_me:16037: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16038 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16039 fi
16040 fi
16041
16042 # used to separate tack out of the tree
16043 NCURSES_TREE=
16044
16045 ### predefined stuff for the test programs
16046 cat >>confdefs.h <<\EOF
16047 #define HAVE_SLK_COLOR 1
16048 EOF
16049
16050 ### Construct the list of subdirectories for which we'll customize makefiles
16051 ### with the appropriate compile-rules.
16052
16053 echo "$as_me:16053: checking for src modules" >&5
16054 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16055
16056 # dependencies and linker-arguments for test-programs
16057 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16058 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16059 if test "$DFT_LWR_MODEL" = "libtool"; then
16060         TEST_ARGS="${TEST_DEPS}"
16061         TEST_ARG2="${TEST_DEP2}"
16062 else
16063         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16064         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16065 fi
16066
16067 cf_cv_src_modules=
16068 for cf_dir in $modules_to_build
16069 do
16070         if test -f $srcdir/$cf_dir/modules; then
16071
16072                 # We may/may not have tack in the distribution, though the
16073                 # makefile is.
16074                 if test $cf_dir = tack ; then
16075                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16076                                 continue
16077                         fi
16078                 fi
16079
16080                 if test -z "$cf_cv_src_modules"; then
16081                         cf_cv_src_modules=$cf_dir
16082                 else
16083                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16084                 fi
16085
16086                 # Make the ncurses_cfg.h file record the library interface files as
16087                 # well.  These are header files that are the same name as their
16088                 # directory.  Ncurses is the only library that does not follow
16089                 # that pattern.
16090                 if test $cf_dir = tack ; then
16091                         continue
16092                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16093
16094 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16095
16096                         cat >>confdefs.h <<EOF
16097 #define HAVE_${cf_have_include}_H 1
16098 EOF
16099
16100                         cat >>confdefs.h <<EOF
16101 #define HAVE_LIB${cf_have_include} 1
16102 EOF
16103
16104                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16105                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16106                         if test "$DFT_LWR_MODEL" = "libtool"; then
16107                                 TEST_ARGS="${TEST_DEPS}"
16108                                 TEST_ARG2="${TEST_DEP2}"
16109                         else
16110                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16111                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16112                         fi
16113                 fi
16114         fi
16115 done
16116 echo "$as_me:16116: result: $cf_cv_src_modules" >&5
16117 echo "${ECHO_T}$cf_cv_src_modules" >&6
16118
16119 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16120 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16121
16122 SRC_SUBDIRS="man include"
16123 for cf_dir in $cf_cv_src_modules
16124 do
16125         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16126 done
16127 SRC_SUBDIRS="$SRC_SUBDIRS test"
16128 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16129 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16130
16131 ADA_SUBDIRS=
16132 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16133    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16134    ADA_SUBDIRS="gen src samples"
16135 fi
16136
16137 SUB_MAKEFILES=
16138 for cf_dir in $SRC_SUBDIRS
16139 do
16140         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16141 done
16142
16143 if test -n "$ADA_SUBDIRS"; then
16144    for cf_dir in $ADA_SUBDIRS
16145    do
16146       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16147    done
16148
16149 fi
16150
16151 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16152    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16153 fi
16154
16155 DIRS_TO_MAKE="lib"
16156 for cf_item in $cf_list_models
16157 do
16158
16159         case $cf_item in
16160         libtool) cf_subdir='obj_lo'  ;;
16161         normal)  cf_subdir='objects' ;;
16162         debug)   cf_subdir='obj_g' ;;
16163         profile) cf_subdir='obj_p' ;;
16164         shared)
16165                 case $cf_cv_system_name in #(vi
16166                 cygwin) #(vi
16167                         cf_subdir='objects' ;;
16168                 *)
16169                         cf_subdir='obj_s' ;;
16170                 esac
16171         esac
16172
16173         for cf_item2 in $DIRS_TO_MAKE
16174         do
16175                 test $cf_item2 = $cf_subdir && break
16176         done
16177         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16178 done
16179 for cf_dir in $DIRS_TO_MAKE
16180 do
16181         test ! -d $cf_dir && mkdir $cf_dir
16182 done
16183
16184 cat >>confdefs.h <<EOF
16185 #define NCURSES_PATHSEP '$PATHSEP'
16186 EOF
16187
16188 cat >>confdefs.h <<EOF
16189 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16190 EOF
16191
16192 ### Now that we're done running tests, add the compiler-warnings, if any
16193
16194 cf_fix_cppflags=no
16195 cf_new_cflags=
16196 cf_new_cppflags=
16197 cf_new_extra_cppflags=
16198
16199 for cf_add_cflags in $EXTRA_CFLAGS
16200 do
16201 case $cf_fix_cppflags in
16202 no)
16203         case $cf_add_cflags in #(vi
16204         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16205                 case $cf_add_cflags in
16206                 -D*)
16207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16208
16209                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16210                         && test -z "${cf_tst_cflags}" \
16211                         && cf_fix_cppflags=yes
16212
16213                         if test $cf_fix_cppflags = yes ; then
16214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16215                                 continue
16216                         elif test "${cf_tst_cflags}" = "\"'" ; then
16217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16218                                 continue
16219                         fi
16220                         ;;
16221                 esac
16222                 case "$CPPFLAGS" in
16223                 *$cf_add_cflags) #(vi
16224                         ;;
16225                 *) #(vi
16226                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16227                         ;;
16228                 esac
16229                 ;;
16230         *)
16231                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16232                 ;;
16233         esac
16234         ;;
16235 yes)
16236         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16237
16238         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16239
16240         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16241         && test -z "${cf_tst_cflags}" \
16242         && cf_fix_cppflags=no
16243         ;;
16244 esac
16245 done
16246
16247 if test -n "$cf_new_cflags" ; then
16248
16249         CFLAGS="$CFLAGS $cf_new_cflags"
16250 fi
16251
16252 if test -n "$cf_new_cppflags" ; then
16253
16254         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16255 fi
16256
16257 if test -n "$cf_new_extra_cppflags" ; then
16258
16259         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16260 fi
16261
16262 ### If we're building with rpath, try to link non-standard libs that way too.
16263 if test "$DFT_LWR_MODEL" = "shared"; then
16264
16265 echo "$as_me:16265: checking for updated LDFLAGS" >&5
16266 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16267 if test -n "$LDFLAGS" ; then
16268 echo "$as_me:16268: result: maybe" >&5
16269 echo "${ECHO_T}maybe" >&6
16270 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16271
16272 echo "${as_me-configure}:16272: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16273
16274 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16275
16276 echo "${as_me-configure}:16276: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16277
16278 case "$EXTRA_LDFLAGS" in #(vi
16279 -Wl,-rpath,*) #(vi
16280     cf_rpath_hack="-Wl,-rpath,"
16281     ;;
16282 -R\ *)
16283     cf_rpath_hack="-R "
16284     ;;
16285 -R*)
16286     cf_rpath_hack="-R"
16287     ;;
16288 *)
16289     cf_rpath_hack=
16290     ;;
16291 esac
16292 if test -n "$cf_rpath_hack" ; then
16293     cf_rpath_dst=
16294     for cf_rpath_src in $LDFLAGS
16295     do
16296         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16297
16298 echo "${as_me-configure}:16298: testing Filtering $cf_rpath_src ..." 1>&5
16299
16300         case $cf_rpath_src in #(vi
16301         -L*) #(vi
16302             if test "$cf_rpath_hack" = "-R " ; then
16303                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16304             else
16305                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16306             fi
16307             test -n "$verbose" && echo "        ...Filter $cf_rpath_tmp" 1>&6
16308
16309 echo "${as_me-configure}:16309: testing ...Filter $cf_rpath_tmp ..." 1>&5
16310
16311             EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16312             ;;
16313         *)
16314             cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16315             ;;
16316         esac
16317     done
16318     LDFLAGS=$cf_rpath_dst
16319     test -n "$verbose" && echo "        ...checked LDFLAGS $LDFLAGS" 1>&6
16320
16321 echo "${as_me-configure}:16321: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16322
16323     test -n "$verbose" && echo "        ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16324
16325 echo "${as_me-configure}:16325: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16326
16327 fi
16328 else
16329 echo "$as_me:16329: result: no" >&5
16330 echo "${ECHO_T}no" >&6
16331 fi
16332
16333 fi
16334
16335 ### Define substitutions for header files to avoid name-pollution
16336
16337 if test "$cf_cv_have_tcgetattr" = yes ; then
16338         HAVE_TCGETATTR=1
16339 else
16340         HAVE_TCGETATTR=0
16341 fi
16342
16343 if test "$ac_cv_header_termio_h" = yes ; then
16344         HAVE_TERMIO_H=1
16345 else
16346         HAVE_TERMIO_H=0
16347 fi
16348
16349 if test "$ac_cv_header_termios_h" = yes ; then
16350         HAVE_TERMIOS_H=1
16351 else
16352         HAVE_TERMIOS_H=0
16353 fi
16354
16355 ################################################################################
16356 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16357 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16358 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"
16359 ac_config_commands="$ac_config_commands default"
16360 cat >confcache <<\_ACEOF
16361 # This file is a shell script that caches the results of configure
16362 # tests run on this system so they can be shared between configure
16363 # scripts and configure runs, see configure's option --config-cache.
16364 # It is not useful on other systems.  If it contains results you don't
16365 # want to keep, you may remove or edit it.
16366 #
16367 # config.status only pays attention to the cache file if you give it
16368 # the --recheck option to rerun configure.
16369 #
16370 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16371 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16372 # following values.
16373
16374 _ACEOF
16375
16376 # The following way of writing the cache mishandles newlines in values,
16377 # but we know of no workaround that is simple, portable, and efficient.
16378 # So, don't put newlines in cache variables' values.
16379 # Ultrix sh set writes to stderr and can't be redirected directly,
16380 # and sets the high bit in the cache file unless we assign to the vars.
16381 {
16382   (set) 2>&1 |
16383     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16384     *ac_space=\ *)
16385       # `set' does not quote correctly, so add quotes (double-quote
16386       # substitution turns \\\\ into \\, and sed turns \\ into \).
16387       sed -n \
16388         "s/'/'\\\\''/g;
16389           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16390       ;;
16391     *)
16392       # `set' quotes correctly as required by POSIX, so do not add quotes.
16393       sed -n \
16394         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16395       ;;
16396     esac;
16397 } |
16398   sed '
16399      t clear
16400      : clear
16401      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16402      t end
16403      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16404      : end' >>confcache
16405 if cmp -s $cache_file confcache; then :; else
16406   if test -w $cache_file; then
16407     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16408     cat confcache >$cache_file
16409   else
16410     echo "not updating unwritable cache $cache_file"
16411   fi
16412 fi
16413 rm -f confcache
16414
16415 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16416 # Let make expand exec_prefix.
16417 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16418
16419 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16420 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16421 # trailing colons and then remove the whole line if VPATH becomes empty
16422 # (actually we leave an empty line to preserve line numbers).
16423 if test "x$srcdir" = x.; then
16424   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16425 s/:*\$(srcdir):*/:/;
16426 s/:*\${srcdir}:*/:/;
16427 s/:*@srcdir@:*/:/;
16428 s/^\([^=]*=[    ]*\):*/\1/;
16429 s/:*$//;
16430 s/^[^=]*=[      ]*$//;
16431 }'
16432 fi
16433
16434 DEFS=-DHAVE_CONFIG_H
16435
16436 : ${CONFIG_STATUS=./config.status}
16437 ac_clean_files_save=$ac_clean_files
16438 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16439 { echo "$as_me:16439: creating $CONFIG_STATUS" >&5
16440 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16441 cat >$CONFIG_STATUS <<_ACEOF
16442 #! $SHELL
16443 # Generated automatically by configure.
16444 # Run this file to recreate the current configuration.
16445 # Compiler output produced by configure, useful for debugging
16446 # configure, is in config.log if it exists.
16447
16448 debug=false
16449 SHELL=\${CONFIG_SHELL-$SHELL}
16450 ac_cs_invocation="\$0 \$@"
16451
16452 _ACEOF
16453
16454 cat >>$CONFIG_STATUS <<\_ACEOF
16455 # Be Bourne compatible
16456 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16457   emulate sh
16458   NULLCMD=:
16459 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16460   set -o posix
16461 fi
16462
16463 # Name of the executable.
16464 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16465
16466 if expr a : '\(a\)' >/dev/null 2>&1; then
16467   as_expr=expr
16468 else
16469   as_expr=false
16470 fi
16471
16472 rm -f conf$$ conf$$.exe conf$$.file
16473 echo >conf$$.file
16474 if ln -s conf$$.file conf$$ 2>/dev/null; then
16475   # We could just check for DJGPP; but this test a) works b) is more generic
16476   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16477   if test -f conf$$.exe; then
16478     # Don't use ln at all; we don't have any links
16479     as_ln_s='cp -p'
16480   else
16481     as_ln_s='ln -s'
16482   fi
16483 elif ln conf$$.file conf$$ 2>/dev/null; then
16484   as_ln_s=ln
16485 else
16486   as_ln_s='cp -p'
16487 fi
16488 rm -f conf$$ conf$$.exe conf$$.file
16489
16490 as_executable_p="test -f"
16491
16492 # Support unset when possible.
16493 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16494   as_unset=unset
16495 else
16496   as_unset=false
16497 fi
16498
16499 # NLS nuisances.
16500 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16501 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16502 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16503 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16504 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16505 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16506 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16507 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16508
16509 # IFS
16510 # We need space, tab and new line, in precisely that order.
16511 as_nl='
16512 '
16513 IFS="   $as_nl"
16514
16515 # CDPATH.
16516 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16517
16518 exec 6>&1
16519
16520 _ACEOF
16521
16522 # Files that config.status was made for.
16523 if test -n "$ac_config_files"; then
16524   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16525 fi
16526
16527 if test -n "$ac_config_headers"; then
16528   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16529 fi
16530
16531 if test -n "$ac_config_links"; then
16532   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16533 fi
16534
16535 if test -n "$ac_config_commands"; then
16536   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16537 fi
16538
16539 cat >>$CONFIG_STATUS <<\EOF
16540
16541 ac_cs_usage="\
16542 \`$as_me' instantiates files from templates according to the
16543 current configuration.
16544
16545 Usage: $0 [OPTIONS] [FILE]...
16546
16547   -h, --help       print this help, then exit
16548   -V, --version    print version number, then exit
16549   -d, --debug      don't remove temporary files
16550       --recheck    update $as_me by reconfiguring in the same conditions
16551   --file=FILE[:TEMPLATE]
16552                    instantiate the configuration file FILE
16553   --header=FILE[:TEMPLATE]
16554                    instantiate the configuration header FILE
16555
16556 Configuration files:
16557 $config_files
16558
16559 Configuration headers:
16560 $config_headers
16561
16562 Configuration commands:
16563 $config_commands
16564
16565 Report bugs to <bug-autoconf@gnu.org>."
16566 EOF
16567
16568 cat >>$CONFIG_STATUS <<EOF
16569 ac_cs_version="\\
16570 config.status
16571 configured by $0, generated by GNU Autoconf 2.52.20080325,
16572   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16573
16574 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16575 Free Software Foundation, Inc.
16576 This config.status script is free software; the Free Software Foundation
16577 gives unlimited permission to copy, distribute and modify it."
16578 srcdir=$srcdir
16579 INSTALL="$INSTALL"
16580 EOF
16581
16582 cat >>$CONFIG_STATUS <<\EOF
16583 # If no file are specified by the user, then we need to provide default
16584 # value.  By we need to know if files were specified by the user.
16585 ac_need_defaults=:
16586 while test $# != 0
16587 do
16588   case $1 in
16589   --*=*)
16590     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16591     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16592     shift
16593     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16594     shift
16595     ;;
16596   -*);;
16597   *) # This is not an option, so the user has probably given explicit
16598      # arguments.
16599      ac_need_defaults=false;;
16600   esac
16601
16602   case $1 in
16603   # Handling of the options.
16604 EOF
16605 cat >>$CONFIG_STATUS <<EOF
16606   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16607     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16608     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16609 EOF
16610 cat >>$CONFIG_STATUS <<\EOF
16611   --version | --vers* | -V )
16612     echo "$ac_cs_version"; exit 0 ;;
16613   --he | --h)
16614     # Conflict between --help and --header
16615     { { echo "$as_me:16615: error: ambiguous option: $1
16616 Try \`$0 --help' for more information." >&5
16617 echo "$as_me: error: ambiguous option: $1
16618 Try \`$0 --help' for more information." >&2;}
16619    { (exit 1); exit 1; }; };;
16620   --help | --hel | -h )
16621     echo "$ac_cs_usage"; exit 0 ;;
16622   --debug | --d* | -d )
16623     debug=: ;;
16624   --file | --fil | --fi | --f )
16625     shift
16626     CONFIG_FILES="$CONFIG_FILES $1"
16627     ac_need_defaults=false;;
16628   --header | --heade | --head | --hea )
16629     shift
16630     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16631     ac_need_defaults=false;;
16632
16633   # This is an error.
16634   -*) { { echo "$as_me:16634: error: unrecognized option: $1
16635 Try \`$0 --help' for more information." >&5
16636 echo "$as_me: error: unrecognized option: $1
16637 Try \`$0 --help' for more information." >&2;}
16638    { (exit 1); exit 1; }; } ;;
16639
16640   *) ac_config_targets="$ac_config_targets $1" ;;
16641
16642   esac
16643   shift
16644 done
16645
16646 exec 5>>config.log
16647 cat >&5 << _ACEOF
16648
16649 ## ----------------------- ##
16650 ## Running config.status.  ##
16651 ## ----------------------- ##
16652
16653 This file was extended by $as_me 2.52.20080325, executed with
16654   CONFIG_FILES    = $CONFIG_FILES
16655   CONFIG_HEADERS  = $CONFIG_HEADERS
16656   CONFIG_LINKS    = $CONFIG_LINKS
16657   CONFIG_COMMANDS = $CONFIG_COMMANDS
16658   > $ac_cs_invocation
16659 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16660
16661 _ACEOF
16662 EOF
16663
16664 cat >>$CONFIG_STATUS <<EOF
16665 #
16666 # INIT-COMMANDS section.
16667 #
16668
16669 ### Special initialization commands, used to pass information from the
16670 ### configuration-run into config.status
16671
16672 AWK="$AWK"
16673 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16674 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16675 ECHO_LINK="$ECHO_LINK"
16676 LDCONFIG="$LDCONFIG"
16677 LIB_NAME="$LIB_NAME"
16678 LIB_SUBSETS="$LIB_SUBSETS"
16679 LIB_SUFFIX="$LIB_SUFFIX"
16680 LIB_TRACING="$LIB_TRACING"
16681 MAKE_TERMINFO="$MAKE_TERMINFO"
16682 NCURSES_MAJOR="$NCURSES_MAJOR"
16683 NCURSES_MINOR="$NCURSES_MINOR"
16684 NCURSES_OSPEED="$NCURSES_OSPEED"
16685 NCURSES_PATCH="$NCURSES_PATCH"
16686 SRC_SUBDIRS="$SRC_SUBDIRS"
16687 TERMINFO="$TERMINFO"
16688 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16689 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16690 TINFO_NAME="$TINFO_NAME"
16691 TINFO_SUFFIX="$TINFO_SUFFIX"
16692 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16693 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16694 TICS_NAME="$TICS_NAME"
16695 WITH_CURSES_H="$with_curses_h"
16696 WITH_ECHO="$with_echo"
16697 WITH_OVERWRITE="$with_overwrite"
16698 cf_LIST_MODELS="$cf_list_models"
16699 cf_cv_abi_version="$cf_cv_abi_version"
16700 cf_cv_do_relink="$cf_cv_do_relink"
16701 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16702 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16703 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16704 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16705 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16706 cf_cv_rel_version="$cf_cv_rel_version"
16707 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16708 cf_cv_shlib_version="$cf_cv_shlib_version"
16709 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16710 cf_cv_system_name="$cf_cv_system_name"
16711 cf_with_cxx_binding="$cf_with_cxx_binding"
16712 host="$host"
16713 target="$target"
16714
16715 EOF
16716
16717 cat >>$CONFIG_STATUS <<\EOF
16718 for ac_config_target in $ac_config_targets
16719 do
16720   case "$ac_config_target" in
16721   # Handling of arguments.
16722   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16723   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16724   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16725   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16726   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16727   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16728   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16729   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16730   *) { { echo "$as_me:16730: error: invalid argument: $ac_config_target" >&5
16731 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16732    { (exit 1); exit 1; }; };;
16733   esac
16734 done
16735
16736 # If the user did not use the arguments to specify the items to instantiate,
16737 # then the envvar interface is used.  Set only those that are not.
16738 # We use the long form for the default assignment because of an extremely
16739 # bizarre bug on SunOS 4.1.3.
16740 if $ac_need_defaults; then
16741   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16742   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16743   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16744 fi
16745
16746 # Create a temporary directory, and hook for its removal unless debugging.
16747 $debug ||
16748 {
16749   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16750   trap '{ (exit 1); exit 1; }' 1 2 13 15
16751 }
16752
16753 # Create a (secure) tmp directory for tmp files.
16754 : ${TMPDIR=/tmp}
16755 {
16756   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16757   test -n "$tmp" && test -d "$tmp"
16758 }  ||
16759 {
16760   tmp=$TMPDIR/cs$$-$RANDOM
16761   (umask 077 && mkdir $tmp)
16762 } ||
16763 {
16764    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16765    { (exit 1); exit 1; }
16766 }
16767
16768 EOF
16769
16770 cat >>$CONFIG_STATUS <<EOF
16771
16772 #
16773 # CONFIG_FILES section.
16774 #
16775
16776 # No need to generate the scripts if there are no CONFIG_FILES.
16777 # This happens for instance when ./config.status config.h
16778 if test -n "\$CONFIG_FILES"; then
16779   # Protect against being on the right side of a sed subst in config.status.
16780   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16781    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16782 s,@SHELL@,$SHELL,;t t
16783 s,@exec_prefix@,$exec_prefix,;t t
16784 s,@prefix@,$prefix,;t t
16785 s,@program_transform_name@,$program_transform_name,;t t
16786 s,@bindir@,$bindir,;t t
16787 s,@sbindir@,$sbindir,;t t
16788 s,@libexecdir@,$libexecdir,;t t
16789 s,@datadir@,$datadir,;t t
16790 s,@sysconfdir@,$sysconfdir,;t t
16791 s,@sharedstatedir@,$sharedstatedir,;t t
16792 s,@localstatedir@,$localstatedir,;t t
16793 s,@libdir@,$libdir,;t t
16794 s,@includedir@,$includedir,;t t
16795 s,@oldincludedir@,$oldincludedir,;t t
16796 s,@infodir@,$infodir,;t t
16797 s,@mandir@,$mandir,;t t
16798 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16799 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16800 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16801 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16802 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16803 s,@build_alias@,$build_alias,;t t
16804 s,@host_alias@,$host_alias,;t t
16805 s,@target_alias@,$target_alias,;t t
16806 s,@ECHO_C@,$ECHO_C,;t t
16807 s,@ECHO_N@,$ECHO_N,;t t
16808 s,@ECHO_T@,$ECHO_T,;t t
16809 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16810 s,@DEFS@,$DEFS,;t t
16811 s,@LIBS@,$LIBS,;t t
16812 s,@top_builddir@,$top_builddir,;t t
16813 s,@EGREP@,$EGREP,;t t
16814 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16815 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16816 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16817 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16818 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16819 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16820 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16821 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16822 s,@build@,$build,;t t
16823 s,@build_cpu@,$build_cpu,;t t
16824 s,@build_vendor@,$build_vendor,;t t
16825 s,@build_os@,$build_os,;t t
16826 s,@host@,$host,;t t
16827 s,@host_cpu@,$host_cpu,;t t
16828 s,@host_vendor@,$host_vendor,;t t
16829 s,@host_os@,$host_os,;t t
16830 s,@target@,$target,;t t
16831 s,@target_cpu@,$target_cpu,;t t
16832 s,@target_vendor@,$target_vendor,;t t
16833 s,@target_os@,$target_os,;t t
16834 s,@CC@,$CC,;t t
16835 s,@CFLAGS@,$CFLAGS,;t t
16836 s,@LDFLAGS@,$LDFLAGS,;t t
16837 s,@CPPFLAGS@,$CPPFLAGS,;t t
16838 s,@ac_ct_CC@,$ac_ct_CC,;t t
16839 s,@EXEEXT@,$EXEEXT,;t t
16840 s,@OBJEXT@,$OBJEXT,;t t
16841 s,@CPP@,$CPP,;t t
16842 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16843 s,@PROG_EXT@,$PROG_EXT,;t t
16844 s,@LDCONFIG@,$LDCONFIG,;t t
16845 s,@CXX@,$CXX,;t t
16846 s,@CXXFLAGS@,$CXXFLAGS,;t t
16847 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16848 s,@AWK@,$AWK,;t t
16849 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16850 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16851 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16852 s,@LINT@,$LINT,;t t
16853 s,@LINT_OPTS@,$LINT_OPTS,;t t
16854 s,@LN_S@,$LN_S,;t t
16855 s,@SET_MAKE@,$SET_MAKE,;t t
16856 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16857 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16858 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16859 s,@RANLIB@,$RANLIB,;t t
16860 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16861 s,@LD@,$LD,;t t
16862 s,@ac_ct_LD@,$ac_ct_LD,;t t
16863 s,@AR@,$AR,;t t
16864 s,@ac_ct_AR@,$ac_ct_AR,;t t
16865 s,@AR_OPTS@,$AR_OPTS,;t t
16866 s,@DESTDIR@,$DESTDIR,;t t
16867 s,@BUILD_CC@,$BUILD_CC,;t t
16868 s,@BUILD_CPP@,$BUILD_CPP,;t t
16869 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16870 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16871 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16872 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16873 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16874 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16875 s,@cf_list_models@,$cf_list_models,;t t
16876 s,@LIBTOOL@,$LIBTOOL,;t t
16877 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16878 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16879 s,@LIB_CREATE@,$LIB_CREATE,;t t
16880 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16881 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16882 s,@LIB_PREP@,$LIB_PREP,;t t
16883 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16884 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16885 s,@LIB_LINK@,$LIB_LINK,;t t
16886 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16887 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16888 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16889 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16890 s,@TICS_NAME@,$TICS_NAME,;t t
16891 s,@TINFO_NAME@,$TINFO_NAME,;t t
16892 s,@LIB_NAME@,$LIB_NAME,;t t
16893 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16894 s,@CC_G_OPT@,$CC_G_OPT,;t t
16895 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16896 s,@LD_MODEL@,$LD_MODEL,;t t
16897 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16898 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16899 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16900 s,@LINK_PROGS@,$LINK_PROGS,;t t
16901 s,@LINK_TESTS@,$LINK_TESTS,;t t
16902 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16903 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16904 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16905 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16906 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16907 s,@PATHSEP@,$PATHSEP,;t t
16908 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16909 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16910 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16911 s,@TERMINFO@,$TERMINFO,;t t
16912 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16913 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16914 s,@TERMPATH@,$TERMPATH,;t t
16915 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16916 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16917 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16918 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16919 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16920 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16921 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16922 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16923 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16924 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16925 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16926 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16927 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16928 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16929 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16930 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16931 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16932 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16933 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16934 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16935 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16936 s,@PTHREAD@,$PTHREAD,;t t
16937 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16938 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16939 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16940 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16941 s,@ECHO_LINK@,$ECHO_LINK,;t t
16942 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16943 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16944 s,@ADA_TRACE@,$ADA_TRACE,;t t
16945 s,@MATH_LIB@,$MATH_LIB,;t t
16946 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16947 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16948 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16949 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16950 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16951 s,@TEST_LIBS@,$TEST_LIBS,;t t
16952 s,@CXXCPP@,$CXXCPP,;t t
16953 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16954 s,@CXX_AR@,$CXX_AR,;t t
16955 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16956 s,@CXXLIBS@,$CXXLIBS,;t t
16957 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16958 s,@gnat_exists@,$gnat_exists,;t t
16959 s,@M4_exists@,$M4_exists,;t t
16960 s,@cf_ada_make@,$cf_ada_make,;t t
16961 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16962 s,@cf_ada_package@,$cf_ada_package,;t t
16963 s,@ADAFLAGS@,$ADAFLAGS,;t t
16964 s,@cf_compile_generics@,$cf_compile_generics,;t t
16965 s,@cf_generic_objects@,$cf_generic_objects,;t t
16966 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16967 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16968 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16969 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16970 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16971 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16972 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16973 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16974 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16975 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16976 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16977 s,@TICS_ARGS@,$TICS_ARGS,;t t
16978 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16979 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16980 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16981 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16982 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16983 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16984 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16985 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16986 s,@TICS_LIST@,$TICS_LIST,;t t
16987 s,@TINFO_LIST@,$TINFO_LIST,;t t
16988 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16989 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16990 s,@TEST_ARGS@,$TEST_ARGS,;t t
16991 s,@TEST_DEPS@,$TEST_DEPS,;t t
16992 s,@TEST_ARG2@,$TEST_ARG2,;t t
16993 s,@TEST_DEP2@,$TEST_DEP2,;t t
16994 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16995 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16996 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16997 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16998 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16999 CEOF
17000
17001 EOF
17002
17003   cat >>$CONFIG_STATUS <<\EOF
17004   # Split the substitutions into bite-sized pieces for seds with
17005   # small command number limits, like on Digital OSF/1 and HP-UX.
17006   ac_max_sed_lines=48
17007   ac_sed_frag=1 # Number of current file.
17008   ac_beg=1 # First line for current file.
17009   ac_end=$ac_max_sed_lines # Line after last line for current file.
17010   ac_more_lines=:
17011   ac_sed_cmds=
17012   while $ac_more_lines; do
17013     if test $ac_beg -gt 1; then
17014       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17015     else
17016       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17017     fi
17018     if test ! -s $tmp/subs.frag; then
17019       ac_more_lines=false
17020     else
17021       # The purpose of the label and of the branching condition is to
17022       # speed up the sed processing (if there are no `@' at all, there
17023       # is no need to browse any of the substitutions).
17024       # These are the two extra sed commands mentioned above.
17025       (echo ':t
17026   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17027       if test -z "$ac_sed_cmds"; then
17028         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17029       else
17030         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17031       fi
17032       ac_sed_frag=`expr $ac_sed_frag + 1`
17033       ac_beg=$ac_end
17034       ac_end=`expr $ac_end + $ac_max_sed_lines`
17035     fi
17036   done
17037   if test -z "$ac_sed_cmds"; then
17038     ac_sed_cmds=cat
17039   fi
17040 fi # test -n "$CONFIG_FILES"
17041
17042 EOF
17043 cat >>$CONFIG_STATUS <<\EOF
17044 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17045   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17046   case $ac_file in
17047   - | *:- | *:-:* ) # input from stdin
17048         cat >$tmp/stdin
17049         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17050         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17051   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17052         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17053   * )   ac_file_in=$ac_file.in ;;
17054   esac
17055
17056   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17057   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17058          X"$ac_file" : 'X\(//\)[^/]' \| \
17059          X"$ac_file" : 'X\(//\)$' \| \
17060          X"$ac_file" : 'X\(/\)' \| \
17061          .     : '\(.\)' 2>/dev/null ||
17062 echo X"$ac_file" |
17063     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17064           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17065           /^X\(\/\/\)$/{ s//\1/; q; }
17066           /^X\(\/\).*/{ s//\1/; q; }
17067           s/.*/./; q'`
17068   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17069     { case "$ac_dir" in
17070   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17071   *)                      as_incr_dir=.;;
17072 esac
17073 as_dummy="$ac_dir"
17074 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17075   case $as_mkdir_dir in
17076     # Skip DOS drivespec
17077     ?:) as_incr_dir=$as_mkdir_dir ;;
17078     *)
17079       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17080       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17081     ;;
17082   esac
17083 done; }
17084
17085     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17086     # A "../" for each directory in $ac_dir_suffix.
17087     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17088   else
17089     ac_dir_suffix= ac_dots=
17090   fi
17091
17092   case $srcdir in
17093   .)  ac_srcdir=.
17094       if test -z "$ac_dots"; then
17095          ac_top_srcdir=.
17096       else
17097          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17098       fi ;;
17099   [\\/]* | ?:[\\/]* )
17100       ac_srcdir=$srcdir$ac_dir_suffix;
17101       ac_top_srcdir=$srcdir ;;
17102   *) # Relative path.
17103     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17104     ac_top_srcdir=$ac_dots$srcdir ;;
17105   esac
17106
17107   case $INSTALL in
17108   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17109   *) ac_INSTALL=$ac_dots$INSTALL ;;
17110   esac
17111
17112   if test x"$ac_file" != x-; then
17113     { echo "$as_me:17113: creating $ac_file" >&5
17114 echo "$as_me: creating $ac_file" >&6;}
17115     rm -f "$ac_file"
17116   fi
17117   # Let's still pretend it is `configure' which instantiates (i.e., don't
17118   # use $as_me), people would be surprised to read:
17119   #    /* config.h.  Generated automatically by config.status.  */
17120   configure_input="Generated automatically from `echo $ac_file_in |
17121                                                  sed 's,.*/,,'` by configure."
17122
17123   # First look for the input files in the build tree, otherwise in the
17124   # src tree.
17125   ac_file_inputs=`IFS=:
17126     for f in $ac_file_in; do
17127       case $f in
17128       -) echo $tmp/stdin ;;
17129       [\\/$]*)
17130          # Absolute (can't be DOS-style, as IFS=:)
17131          test -f "$f" || { { echo "$as_me:17131: error: cannot find input file: $f" >&5
17132 echo "$as_me: error: cannot find input file: $f" >&2;}
17133    { (exit 1); exit 1; }; }
17134          echo $f;;
17135       *) # Relative
17136          if test -f "$f"; then
17137            # Build tree
17138            echo $f
17139          elif test -f "$srcdir/$f"; then
17140            # Source tree
17141            echo $srcdir/$f
17142          else
17143            # /dev/null tree
17144            { { echo "$as_me:17144: error: cannot find input file: $f" >&5
17145 echo "$as_me: error: cannot find input file: $f" >&2;}
17146    { (exit 1); exit 1; }; }
17147          fi;;
17148       esac
17149     done` || { (exit 1); exit 1; }
17150 EOF
17151 cat >>$CONFIG_STATUS <<EOF
17152   sed "$ac_vpsub
17153 $extrasub
17154 EOF
17155 cat >>$CONFIG_STATUS <<\EOF
17156 :t
17157 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17158 s,@configure_input@,$configure_input,;t t
17159 s,@srcdir@,$ac_srcdir,;t t
17160 s,@top_srcdir@,$ac_top_srcdir,;t t
17161 s,@INSTALL@,$ac_INSTALL,;t t
17162 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17163   rm -f $tmp/stdin
17164   if test x"$ac_file" != x-; then
17165     mv $tmp/out $ac_file
17166   else
17167     cat $tmp/out
17168     rm -f $tmp/out
17169   fi
17170
17171 done
17172 EOF
17173 cat >>$CONFIG_STATUS <<\EOF
17174
17175 #
17176 # CONFIG_HEADER section.
17177 #
17178
17179 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17180 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17181 #
17182 # ac_d sets the value in "#define NAME VALUE" lines.
17183 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17184 ac_dB='[        ].*$,\1#\2'
17185 ac_dC=' '
17186 ac_dD=',;t'
17187 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17188 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17189 ac_iB='\([      ]\),\1#\2define\3'
17190 ac_iC=' '
17191 ac_iD='\4,;t'
17192 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17193 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17194 ac_uB='$,\1#\2define\3'
17195 ac_uC=' '
17196 ac_uD=',;t'
17197
17198 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17199   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17200   case $ac_file in
17201   - | *:- | *:-:* ) # input from stdin
17202         cat >$tmp/stdin
17203         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17204         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17205   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17206         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17207   * )   ac_file_in=$ac_file.in ;;
17208   esac
17209
17210   test x"$ac_file" != x- && { echo "$as_me:17210: creating $ac_file" >&5
17211 echo "$as_me: creating $ac_file" >&6;}
17212
17213   # First look for the input files in the build tree, otherwise in the
17214   # src tree.
17215   ac_file_inputs=`IFS=:
17216     for f in $ac_file_in; do
17217       case $f in
17218       -) echo $tmp/stdin ;;
17219       [\\/$]*)
17220          # Absolute (can't be DOS-style, as IFS=:)
17221          test -f "$f" || { { echo "$as_me:17221: error: cannot find input file: $f" >&5
17222 echo "$as_me: error: cannot find input file: $f" >&2;}
17223    { (exit 1); exit 1; }; }
17224          echo $f;;
17225       *) # Relative
17226          if test -f "$f"; then
17227            # Build tree
17228            echo $f
17229          elif test -f "$srcdir/$f"; then
17230            # Source tree
17231            echo $srcdir/$f
17232          else
17233            # /dev/null tree
17234            { { echo "$as_me:17234: error: cannot find input file: $f" >&5
17235 echo "$as_me: error: cannot find input file: $f" >&2;}
17236    { (exit 1); exit 1; }; }
17237          fi;;
17238       esac
17239     done` || { (exit 1); exit 1; }
17240   # Remove the trailing spaces.
17241   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17242
17243 EOF
17244
17245 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17246 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17247 # be either 'cat' or 'sort'.
17248 cat confdefs.h | uniq >conftest.vals
17249
17250 # Break up conftest.vals because some shells have a limit on
17251 # the size of here documents, and old seds have small limits too.
17252
17253 rm -f conftest.tail
17254 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17255 while grep . conftest.vals >/dev/null
17256 do
17257   # Write chunks of a limited-size here document to conftest.frag.
17258   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17259   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17260   echo 'CEOF' >> $CONFIG_STATUS
17261   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17262   rm -f conftest.vals
17263   mv conftest.tail conftest.vals
17264 done
17265 rm -f conftest.vals
17266
17267 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17268 # marker @DEFS@.
17269 echo '  cat >> conftest.edit <<CEOF
17270 /@DEFS@/r conftest.frag
17271 /@DEFS@/d
17272 CEOF
17273 sed -f conftest.edit $tmp/in > $tmp/out
17274 rm -f $tmp/in
17275 mv $tmp/out $tmp/in
17276 rm -f conftest.edit conftest.frag
17277 ' >> $CONFIG_STATUS
17278
17279 cat >>$CONFIG_STATUS <<\EOF
17280   # Let's still pretend it is `configure' which instantiates (i.e., don't
17281   # use $as_me), people would be surprised to read:
17282   #    /* config.h.  Generated automatically by config.status.  */
17283   if test x"$ac_file" = x-; then
17284     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17285   else
17286     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17287   fi
17288   cat $tmp/in >>$tmp/config.h
17289   rm -f $tmp/in
17290   if test x"$ac_file" != x-; then
17291     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17292       { echo "$as_me:17292: $ac_file is unchanged" >&5
17293 echo "$as_me: $ac_file is unchanged" >&6;}
17294     else
17295       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17296          X"$ac_file" : 'X\(//\)[^/]' \| \
17297          X"$ac_file" : 'X\(//\)$' \| \
17298          X"$ac_file" : 'X\(/\)' \| \
17299          .     : '\(.\)' 2>/dev/null ||
17300 echo X"$ac_file" |
17301     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17302           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17303           /^X\(\/\/\)$/{ s//\1/; q; }
17304           /^X\(\/\).*/{ s//\1/; q; }
17305           s/.*/./; q'`
17306       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17307         { case "$ac_dir" in
17308   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17309   *)                      as_incr_dir=.;;
17310 esac
17311 as_dummy="$ac_dir"
17312 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17313   case $as_mkdir_dir in
17314     # Skip DOS drivespec
17315     ?:) as_incr_dir=$as_mkdir_dir ;;
17316     *)
17317       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17318       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17319     ;;
17320   esac
17321 done; }
17322
17323       fi
17324       rm -f $ac_file
17325       mv $tmp/config.h $ac_file
17326     fi
17327   else
17328     cat $tmp/config.h
17329     rm -f $tmp/config.h
17330   fi
17331 done
17332 EOF
17333 cat >>$CONFIG_STATUS <<\EOF
17334
17335 #
17336 # CONFIG_COMMANDS section.
17337 #
17338 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17339   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17340   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17341
17342   case $ac_dest in
17343     default )
17344
17345 for cf_dir in test
17346 do
17347         if test ! -d $srcdir/$cf_dir; then
17348                 continue
17349         elif test -f $srcdir/$cf_dir/programs; then
17350                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17351         fi
17352 done
17353
17354         case $cf_cv_system_name in
17355         OS/2*)  LIB_PREFIX=''     ;;
17356         os2*)   LIB_PREFIX=''     ;;
17357         *)      LIB_PREFIX='lib'  ;;
17358         esac
17359 cf_prefix=$LIB_PREFIX
17360
17361 for cf_dir in $SRC_SUBDIRS
17362 do
17363         if test ! -d $srcdir/$cf_dir ; then
17364                 continue
17365         elif test -f $srcdir/$cf_dir/modules; then
17366
17367                 SHARED_LIB=
17368                 LIBS_TO_MAKE=
17369                 for cf_item in $cf_LIST_MODELS
17370                 do
17371
17372         case $cf_item in
17373         libtool) cf_suffix='.la'  ;;
17374         normal)  cf_suffix='.a'   ;;
17375         debug)   cf_suffix='_g.a' ;;
17376         profile) cf_suffix='_p.a' ;;
17377         shared)
17378                 case $cf_cv_system_name in
17379                 cygwin*) cf_suffix='.dll' ;;
17380                 darwin*) cf_suffix='.dylib' ;;
17381                 hpux*)
17382                         case $target in
17383                         ia64*)  cf_suffix='.so' ;;
17384                         *)      cf_suffix='.sl' ;;
17385                         esac
17386                         ;;
17387                 *)      cf_suffix='.so'  ;;
17388                 esac
17389         esac
17390         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17391
17392                         if test $cf_item = shared ; then
17393                         if test "$cf_cv_do_symlinks" = yes ; then
17394                                 case "$cf_cv_shlib_version" in #(vi
17395                                 rel) #(vi
17396                                         case "$cf_cv_system_name" in #(vi
17397                                         darwin*)
17398                                         case .${LIB_SUFFIX} in
17399                                         .w*)
17400                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17401                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17402                                                 ;;
17403                                         *)
17404                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17405                                                 ;;
17406                                         esac
17407                                         ;; #(vi
17408                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17409                                         esac
17410                                         ;;
17411                                 abi)
17412                                         case "$cf_cv_system_name" in #(vi
17413                                         darwin*)
17414                                         case .${LIB_SUFFIX} in
17415                                         .w*)
17416                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17417                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17418                                                 ;;
17419                                         *)
17420                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17421                                                 ;;
17422                                         esac
17423                                         ;; #(vi
17424                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17425                                         esac
17426                                         ;;
17427                                 esac
17428                         fi
17429                         # cygwin needs import library, and has unique naming convention
17430                         # use autodetected ${cf_prefix} for import lib and static lib, but
17431                         # use 'cyg' prefix for shared lib.
17432                         if test $cf_cv_shlib_version = cygdll ; then
17433                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
17434                                 continue
17435                         fi
17436                         fi
17437                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17438                 done
17439
17440                 if test $cf_dir = ncurses ; then
17441                         cf_subsets="$LIB_SUBSETS"
17442                         cf_r_parts="$cf_subsets"
17443
17444                         while test -n "$cf_r_parts"
17445                         do
17446                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17447                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17448                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17449                                         case $cf_l_parts in #(vi
17450                                         *termlib*) #(vi
17451                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17452                                                 ;;
17453                                         *ticlib*)
17454                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17455                                                 ;;
17456                                         *)
17457                                                 break
17458                                                 ;;
17459                                         esac
17460                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17461                                 else
17462                                         break
17463                                 fi
17464                         done
17465                 else
17466                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17467                 fi
17468
17469                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17470                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17471                         $cf_dir/Makefile >$cf_dir/Makefile.out
17472                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17473
17474                 $AWK -f $srcdir/mk-0th.awk \
17475                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17476                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17477
17478                 for cf_subset in $cf_subsets
17479                 do
17480                         cf_subdirs=
17481                         for cf_item in $cf_LIST_MODELS
17482                         do
17483                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17484
17485 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17486
17487         case $cf_item in
17488         libtool) cf_suffix='.la'  ;;
17489         normal)  cf_suffix='.a'   ;;
17490         debug)   cf_suffix='_g.a' ;;
17491         profile) cf_suffix='_p.a' ;;
17492         shared)
17493                 case $cf_cv_system_name in
17494                 cygwin*) cf_suffix='.dll' ;;
17495                 darwin*) cf_suffix='.dylib' ;;
17496                 hpux*)
17497                         case $target in
17498                         ia64*)  cf_suffix='.so' ;;
17499                         *)      cf_suffix='.sl' ;;
17500                         esac
17501                         ;;
17502                 *)      cf_suffix='.so'  ;;
17503                 esac
17504         esac
17505         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17506
17507         case $cf_item in
17508         libtool) cf_subdir='obj_lo'  ;;
17509         normal)  cf_subdir='objects' ;;
17510         debug)   cf_subdir='obj_g' ;;
17511         profile) cf_subdir='obj_p' ;;
17512         shared)
17513                 case $cf_cv_system_name in #(vi
17514                 cygwin) #(vi
17515                         cf_subdir='objects' ;;
17516                 *)
17517                         cf_subdir='obj_s' ;;
17518                 esac
17519         esac
17520
17521                         # Test for case where we build libtinfo with a different name.
17522                         cf_libname=$cf_dir
17523                         if test $cf_dir = ncurses ; then
17524                                 case $cf_subset in
17525                                 *base*)
17526                                         ;;
17527                                 *termlib*)
17528                                         cf_libname=$TINFO_LIB_SUFFIX
17529                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17530                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17531                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17532                                         fi
17533                                         ;;
17534                                 ticlib*)
17535                                         cf_libname=$TICS_LIB_SUFFIX
17536                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17537                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17538                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17539                                         fi
17540                                         ;;
17541                                 esac
17542                         fi
17543
17544                         # These dependencies really are for development, not
17545                         # builds, but they are useful in porting, too.
17546                         cf_depend="../include/ncurses_cfg.h"
17547                         if test "$srcdir" = "."; then
17548                                 cf_reldir="."
17549                         else
17550                                 cf_reldir="\${srcdir}"
17551                         fi
17552
17553                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17554                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17555                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17556                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17557                         fi
17558
17559                         cf_dir_suffix=
17560                         old_cf_suffix="$cf_suffix"
17561                         if test "$cf_cv_shlib_version_infix" = yes ; then
17562                         if test -n "$LIB_SUFFIX" ; then
17563                                 case $LIB_SUFFIX in
17564                                 w*)
17565                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17566                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17567                                         cf_dir_suffix=w
17568                                         ;;
17569                                 esac
17570                         fi
17571                         fi
17572
17573                         $AWK -f $srcdir/mk-1st.awk \
17574                                 name=${cf_libname}${cf_dir_suffix} \
17575                                 traces=$LIB_TRACING \
17576                                 MODEL=$cf_ITEM \
17577                                 model=$cf_subdir \
17578                                 prefix=$cf_prefix \
17579                                 suffix=$cf_suffix \
17580                                 subset=$cf_subset \
17581                                 TermlibRoot=$TINFO_NAME \
17582                                 TermlibSuffix=$TINFO_SUFFIX \
17583                                 ShlibVer=$cf_cv_shlib_version \
17584                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17585                                 ReLink=${cf_cv_do_relink-no} \
17586                                 DoLinks=$cf_cv_do_symlinks \
17587                                 rmSoLocs=$cf_cv_rm_so_locs \
17588                                 ldconfig="$LDCONFIG" \
17589                                 overwrite=$WITH_OVERWRITE \
17590                                 depend="$cf_depend" \
17591                                 host="$host" \
17592                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17593
17594                         cf_suffix="$old_cf_suffix"
17595
17596                         for cf_subdir2 in $cf_subdirs lib
17597                         do
17598                                 test $cf_subdir = $cf_subdir2 && break
17599                         done
17600                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17601                         $AWK -f $srcdir/mk-2nd.awk \
17602                                 name=$cf_dir \
17603                                 traces=$LIB_TRACING \
17604                                 MODEL=$cf_ITEM \
17605                                 model=$cf_subdir \
17606                                 subset=$cf_subset \
17607                                 srcdir=$srcdir \
17608                                 echo=$WITH_ECHO \
17609                                 crenames=$cf_cv_prog_CC_c_o \
17610                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17611                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17612                         cf_subdirs="$cf_subdirs $cf_subdir"
17613                         done
17614                 done
17615         fi
17616
17617         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17618 done
17619
17620 for cf_dir in $SRC_SUBDIRS
17621 do
17622         if test ! -d $srcdir/$cf_dir ; then
17623                 continue
17624         fi
17625
17626         if test -f $cf_dir/Makefile ; then
17627                 case "$cf_dir" in
17628                 Ada95) #(vi
17629                         echo 'libs \' >> Makefile
17630                         echo 'install.libs \' >> Makefile
17631                         echo 'uninstall.libs ::' >> Makefile
17632                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17633                         ;;
17634                 esac
17635         fi
17636
17637         if test -f $srcdir/$cf_dir/modules; then
17638                 echo >> Makefile
17639                 if test -f $srcdir/$cf_dir/headers; then
17640 cat >> Makefile <<CF_EOF
17641 install.includes \\
17642 uninstall.includes \\
17643 CF_EOF
17644                 fi
17645 if test "$cf_dir" != "c++" ; then
17646 echo 'lint \' >> Makefile
17647 fi
17648 cat >> Makefile <<CF_EOF
17649 libs \\
17650 lintlib \\
17651 install.libs \\
17652 uninstall.libs \\
17653 install.$cf_dir \\
17654 uninstall.$cf_dir ::
17655         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17656 CF_EOF
17657         elif test -f $srcdir/$cf_dir/headers; then
17658 cat >> Makefile <<CF_EOF
17659
17660 libs \\
17661 install.libs \\
17662 uninstall.libs \\
17663 install.includes \\
17664 uninstall.includes ::
17665         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17666 CF_EOF
17667 fi
17668 done
17669
17670 cat >> Makefile <<CF_EOF
17671
17672 install.libs uninstall.libs \\
17673 install.data uninstall.data ::
17674 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17675
17676 install.man \\
17677 uninstall.man ::
17678         cd man && \${MAKE} \${CF_MFLAGS} \$@
17679
17680 distclean ::
17681         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17682         rm -f headers.sh headers.sed mk_shared_lib.sh
17683         rm -rf \${DIRS_TO_MAKE}
17684 CF_EOF
17685
17686 # Special case: tack's manpage lives in its own directory.
17687 if test -d tack ; then
17688 if test -f $srcdir/$tack.h; then
17689 cat >> Makefile <<CF_EOF
17690
17691 install.man \\
17692 uninstall.man ::
17693         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17694 CF_EOF
17695 fi
17696 fi
17697
17698 rm -f headers.sed headers.sh
17699
17700 echo creating headers.sh
17701 cat >headers.sh <<CF_EOF
17702 #! /bin/sh
17703 # This shell script is generated by the 'configure' script.  It is invoked in a
17704 # subdirectory of the build tree.  It generates a sed-script in the parent
17705 # directory that is used to adjust includes for header files that reside in a
17706 # subdirectory of /usr/include, etc.
17707 PRG=""
17708 while test \$# != 3
17709 do
17710 PRG="\$PRG \$1"; shift
17711 done
17712 DST=\$1
17713 REF=\$2
17714 SRC=\$3
17715 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17716 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17717 echo installing \$SRC in \$DST
17718 CF_EOF
17719
17720 if test $WITH_CURSES_H = yes; then
17721         cat >>headers.sh <<CF_EOF
17722 case \$DST in
17723 /*/include/*)
17724         END=\`basename \$DST\`
17725         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17726         do
17727                 NAME=\`basename \$i\`
17728                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17729         done
17730         ;;
17731 *)
17732         echo "" >> \$TMPSED
17733         ;;
17734 esac
17735 CF_EOF
17736
17737 else
17738         cat >>headers.sh <<CF_EOF
17739 case \$DST in
17740 /*/include/*)
17741         END=\`basename \$DST\`
17742         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17743         do
17744                 NAME=\`basename \$i\`
17745                 if test "\$NAME" = "curses.h"
17746                 then
17747                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17748                         NAME=ncurses.h
17749                 fi
17750                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17751         done
17752         ;;
17753 *)
17754         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17755         ;;
17756 esac
17757 CF_EOF
17758 fi
17759 cat >>headers.sh <<CF_EOF
17760 rm -f \$TMPSRC
17761 sed -f \$TMPSED \$SRC > \$TMPSRC
17762 NAME=\`basename \$SRC\`
17763 CF_EOF
17764 if test $WITH_CURSES_H != yes; then
17765         cat >>headers.sh <<CF_EOF
17766 test "\$NAME" = "curses.h" && NAME=ncurses.h
17767 CF_EOF
17768 fi
17769 cat >>headers.sh <<CF_EOF
17770 # Just in case someone gzip'd manpages, remove the conflicting copy.
17771 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17772
17773 eval \$PRG \$TMPSRC \$DST/\$NAME
17774 rm -f \$TMPSRC \$TMPSED
17775 CF_EOF
17776
17777 chmod 0755 headers.sh
17778
17779 for cf_dir in $SRC_SUBDIRS
17780 do
17781         if test ! -d $srcdir/$cf_dir ; then
17782                 continue
17783         fi
17784
17785         if test -f $srcdir/$cf_dir/headers; then
17786                 $AWK -f $srcdir/mk-hdr.awk \
17787                         subset="$LIB_SUBSETS" \
17788                         compat="$WITH_CURSES_H" \
17789                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17790         fi
17791
17792         if test -f $srcdir/$cf_dir/modules; then
17793                 if test "$cf_dir" != "c++" ; then
17794                         cat >>$cf_dir/Makefile <<"CF_EOF"
17795 depend : ${AUTO_SRC}
17796         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17797
17798 # DO NOT DELETE THIS LINE -- make depend depends on it.
17799 CF_EOF
17800                 fi
17801         fi
17802 done
17803
17804  ;;
17805   esac
17806 done
17807 EOF
17808
17809 cat >>$CONFIG_STATUS <<\EOF
17810
17811 { (exit 0); exit 0; }
17812 EOF
17813 chmod +x $CONFIG_STATUS
17814 ac_clean_files=$ac_clean_files_save
17815
17816 # configure is writing to config.log, and then calls config.status.
17817 # config.status does its own redirection, appending to config.log.
17818 # Unfortunately, on DOS this fails, as config.log is still kept open
17819 # by configure, so config.status won't be able to write to it; its
17820 # output is simply discarded.  So we exec the FD to /dev/null,
17821 # effectively closing config.log, so it can be properly (re)opened and
17822 # appended to by config.status.  When coming back to configure, we
17823 # need to make the FD available again.
17824 if test "$no_create" != yes; then
17825   ac_cs_success=:
17826   exec 5>/dev/null
17827   $SHELL $CONFIG_STATUS || ac_cs_success=false
17828   exec 5>>config.log
17829   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17830   # would make configure fail if this is the last instruction.
17831   $ac_cs_success || { (exit 1); exit 1; }
17832 fi
17833 ${MAKE-make} preinstall