]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070428
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.418 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --with-install-prefix   prefixes actual install-location ($DESTDIR)
703 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710 Options to Specify the Libraries Built/Used:
711   --with-libtool          generate libraries with libtool
712   --with-shared           generate shared-libraries
713   --with-normal           generate normal-libraries (default)
714   --with-debug            generate debug-libraries (default)
715   --with-profile          generate profile-libraries
716   --with-termlib          generate separate terminfo library
717   --with-ticlib           generate separate tic library
718   --with-gpm              use Alessandro Rubini's GPM library
719   --without-dlsym         do not use dlsym() to load GPM dynamically
720   --with-sysmouse         use sysmouse (FreeBSD console)
721   --enable-rpath          use rpath option when generating shared libraries
722   --disable-relink        relink shared libraries during install
723   --with-shlib-version=X  Specify rel or abi version for shared libs
724 Fine-Tuning Your Configuration:
725   --disable-overwrite     leave out the link to -lcurses
726   --disable-database      do not use terminfo, only fallbacks/termcap
727   --with-database=XXX     specify terminfo source to install
728   --with-hashed-db        specify hashed-database library
729   --with-fallbacks=XXX    specify list of fallback terminal descriptions
730   --without-xterm-new     specify if xterm terminfo should be old version
731   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
732   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
733   --disable-big-core      assume machine has little memory
734   --enable-termcap        compile in termcap fallback support
735   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
736   --enable-getcap         fast termcap load, no xrefs to terminfo
737   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
738   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
739   --disable-root-environ  restrict environment when running as root
740   --enable-symlinks       make tic use symbolic links not hard links
741   --enable-broken_linker  compile with broken-linker support code
742   --enable-bsdpad         recognize BSD-style prefix padding
743   --enable-widec          compile with wide-char/UTF-8 code
744   --disable-lp64          allow chtype to be long (ignore _LP64)
745   --disable-largefile     omit support for large files
746   --disable-tparm-varargs compile tparm() without varargs interface
747   --with-bool=TYPE        override fallback type of bool variable
748   --with-caps=alt         compile with alternate Caps file
749   --with-chtype=TYPE      override type of chtype
750   --with-ospeed=TYPE      override type of ospeed variable
751   --with-mmask-t=TYPE     override type of mmask_t
752   --with-rcs-ids          compile-in RCS identifiers
753 Options to Specify How Manpages are Installed:
754   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
755                           optionally formatted/catonly, e.g., gzip,formatted
756   --with-manpage-renames  specify manpage-renaming
757   --with-manpage-aliases  specify manpage-aliases using .so
758   --with-manpage-symlinks specify manpage-aliases using symlinks
759   --with-manpage-tbl      specify manpage processing with tbl
760 Extensions:
761   --disable-ext-funcs     disable function-extensions
762   --enable-const          compile with extra/non-standard const
763   --enable-no-padding     compile with $NCURSES_NO_PADDING code
764   --enable-signed-char    compile using signed Boolean's in term.h
765   --enable-sigwinch       compile with SIGWINCH handler
766   --enable-tcap-names     compile with user-definable terminal capabilities
767 Development Code:
768   --without-develop       disable development options
769   --enable-hard-tabs      compile with hard-tabs code
770   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
771 Experimental Code:
772   --disable-assumed-color do not assume anything about default-colors
773   --disable-hashmap       compile without hashmap scrolling-optimization
774   --enable-colorfgbg      compile with $COLORFGBG code
775   --enable-ext-colors     compile for experimental 256-color support
776   --enable-ext-mouse      compile for experimental mouse-encoding
777   --enable-reentrant      compile with experimental reentrant code
778   --enable-safe-sprintf   compile with experimental safe-sprintf code
779   --disable-scroll-hints  compile without scroll-hints code
780   --enable-wgetch-events  compile with experimental wgetch-events code
781 Testing/development Options:
782   --enable-echo           build: display "compiling" commands (default)
783   --enable-warnings       build: turn on GCC compiler warnings
784   --enable-assertions     test: turn on generation of assertion code
785   --with-dmalloc          test: use Gray Watson's dmalloc library
786   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
787   --with-valgrind         test: use valgrind
788   --disable-leaks         test: free permanent memory, analyze leaks
789   --enable-expanded       test: generate functions for certain macros
790   --disable-macros        test: use functions rather than macros
791   --with-trace            test: add trace() function to all models of ncurses
792 Ada95 Binding Options:
793   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
794   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
795   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
796
797 Some influential environment variables:
798   CC          C compiler command
799   CFLAGS      C compiler flags
800   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
801               nonstandard directory <lib dir>
802   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
803               headers in a nonstandard directory <include dir>
804   CPP         C preprocessor
805   CXX         C++ compiler command
806   CXXFLAGS    C++ compiler flags
807   CXXCPP      C++ preprocessor
808
809 Use these variables to override the choices made by `configure' or to help
810 it to find libraries and programs with nonstandard names/locations.
811
812 EOF
813 fi
814
815 if test "$ac_init_help" = "recursive"; then
816   # If there are subdirs, report their specific --help.
817   ac_popdir=`pwd`
818   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
819     cd $ac_subdir
820     # A "../" for each directory in /$ac_subdir.
821     ac_dots=`echo $ac_subdir |
822              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
823
824     case $srcdir in
825     .) # No --srcdir option.  We are building in place.
826       ac_sub_srcdir=$srcdir ;;
827     [\\/]* | ?:[\\/]* ) # Absolute path.
828       ac_sub_srcdir=$srcdir/$ac_subdir ;;
829     *) # Relative path.
830       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
831     esac
832
833     # Check for guested configure; otherwise get Cygnus style configure.
834     if test -f $ac_sub_srcdir/configure.gnu; then
835       echo
836       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
837     elif test -f $ac_sub_srcdir/configure; then
838       echo
839       $SHELL $ac_sub_srcdir/configure  --help=recursive
840     elif test -f $ac_sub_srcdir/configure.ac ||
841            test -f $ac_sub_srcdir/configure.in; then
842       echo
843       $ac_configure --help
844     else
845       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
846     fi
847     cd $ac_popdir
848   done
849 fi
850
851 test -n "$ac_init_help" && exit 0
852 if $ac_init_version; then
853   cat <<\EOF
854
855 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
856 Free Software Foundation, Inc.
857 This configure script is free software; the Free Software Foundation
858 gives unlimited permission to copy, distribute and modify it.
859 EOF
860   exit 0
861 fi
862 exec 5>config.log
863 cat >&5 <<EOF
864 This file contains any messages produced by compilers while
865 running configure, to aid debugging if configure makes a mistake.
866
867 It was created by $as_me, which was
868 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
869
870   $ $0 $@
871
872 EOF
873 {
874 cat <<_ASUNAME
875 ## ---------- ##
876 ## Platform.  ##
877 ## ---------- ##
878
879 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
880 uname -m = `(uname -m) 2>/dev/null || echo unknown`
881 uname -r = `(uname -r) 2>/dev/null || echo unknown`
882 uname -s = `(uname -s) 2>/dev/null || echo unknown`
883 uname -v = `(uname -v) 2>/dev/null || echo unknown`
884
885 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
886 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
887
888 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
889 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
890 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
891 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
892 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
893 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
894 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
895
896 PATH = $PATH
897
898 _ASUNAME
899 } >&5
900
901 cat >&5 <<EOF
902 ## ------------ ##
903 ## Core tests.  ##
904 ## ------------ ##
905
906 EOF
907
908 # Keep a trace of the command line.
909 # Strip out --no-create and --no-recursion so they do not pile up.
910 # Also quote any args containing shell meta-characters.
911 ac_configure_args=
912 ac_sep=
913 for ac_arg
914 do
915   case $ac_arg in
916   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
917   | --no-cr | --no-c) ;;
918   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
919   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
920   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
921     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
922     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
923     ac_sep=" " ;;
924   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
925      ac_sep=" " ;;
926   esac
927   # Get rid of the leading space.
928 done
929
930 # When interrupted or exit'd, cleanup temporary files, and complete
931 # config.log.  We remove comments because anyway the quotes in there
932 # would cause problems or look ugly.
933 trap 'exit_status=$?
934   # Save into config.log some information that might help in debugging.
935   echo >&5
936   echo "## ----------------- ##" >&5
937   echo "## Cache variables.  ##" >&5
938   echo "## ----------------- ##" >&5
939   echo >&5
940   # The following way of writing the cache mishandles newlines in values,
941 {
942   (set) 2>&1 |
943     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
944     *ac_space=\ *)
945       sed -n \
946         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
947           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
948       ;;
949     *)
950       sed -n \
951         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
952       ;;
953     esac;
954 } >&5
955   sed "/^$/d" confdefs.h >conftest.log
956   if test -s conftest.log; then
957     echo >&5
958     echo "## ------------ ##" >&5
959     echo "## confdefs.h.  ##" >&5
960     echo "## ------------ ##" >&5
961     echo >&5
962     cat conftest.log >&5
963   fi
964   (echo; echo) >&5
965   test "$ac_signal" != 0 &&
966     echo "$as_me: caught signal $ac_signal" >&5
967   echo "$as_me: exit $exit_status" >&5
968   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
969     exit $exit_status
970      ' 0
971 for ac_signal in 1 2 13 15; do
972   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
973 done
974 ac_signal=0
975
976 # confdefs.h avoids OS command line length limits that DEFS can exceed.
977 rm -rf conftest* confdefs.h
978 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
979 echo >confdefs.h
980
981 # Let the site file select an alternate cache file if it wants to.
982 # Prefer explicitly selected file to automatically selected ones.
983 if test -z "$CONFIG_SITE"; then
984   if test "x$prefix" != xNONE; then
985     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
986   else
987     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
988   fi
989 fi
990 for ac_site_file in $CONFIG_SITE; do
991   if test -r "$ac_site_file"; then
992     { echo "$as_me:992: loading site script $ac_site_file" >&5
993 echo "$as_me: loading site script $ac_site_file" >&6;}
994     cat "$ac_site_file" >&5
995     . "$ac_site_file"
996   fi
997 done
998
999 if test -r "$cache_file"; then
1000   # Some versions of bash will fail to source /dev/null (special
1001   # files actually), so we avoid doing that.
1002   if test -f "$cache_file"; then
1003     { echo "$as_me:1003: loading cache $cache_file" >&5
1004 echo "$as_me: loading cache $cache_file" >&6;}
1005     case $cache_file in
1006       [\\/]* | ?:[\\/]* ) . $cache_file;;
1007       *)                      . ./$cache_file;;
1008     esac
1009   fi
1010 else
1011   { echo "$as_me:1011: creating cache $cache_file" >&5
1012 echo "$as_me: creating cache $cache_file" >&6;}
1013   >$cache_file
1014 fi
1015
1016 # Check that the precious variables saved in the cache have kept the same
1017 # value.
1018 ac_cache_corrupted=false
1019 for ac_var in `(set) 2>&1 |
1020                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1021   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1022   eval ac_new_set=\$ac_env_${ac_var}_set
1023   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1024   eval ac_new_val="\$ac_env_${ac_var}_value"
1025   case $ac_old_set,$ac_new_set in
1026     set,)
1027       { echo "$as_me:1027: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1028 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1029       ac_cache_corrupted=: ;;
1030     ,set)
1031       { echo "$as_me:1031: error: \`$ac_var' was not set in the previous run" >&5
1032 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1033       ac_cache_corrupted=: ;;
1034     ,);;
1035     *)
1036       if test "x$ac_old_val" != "x$ac_new_val"; then
1037         { echo "$as_me:1037: error: \`$ac_var' has changed since the previous run:" >&5
1038 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1039         { echo "$as_me:1039:   former value:  $ac_old_val" >&5
1040 echo "$as_me:   former value:  $ac_old_val" >&2;}
1041         { echo "$as_me:1041:   current value: $ac_new_val" >&5
1042 echo "$as_me:   current value: $ac_new_val" >&2;}
1043         ac_cache_corrupted=:
1044       fi;;
1045   esac
1046   # Pass precious variables to config.status.  It doesn't matter if
1047   # we pass some twice (in addition to the command line arguments).
1048   if test "$ac_new_set" = set; then
1049     case $ac_new_val in
1050     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1051       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1052       ac_configure_args="$ac_configure_args '$ac_arg'"
1053       ;;
1054     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1055        ;;
1056     esac
1057   fi
1058 done
1059 if $ac_cache_corrupted; then
1060   { echo "$as_me:1060: error: changes in the environment can compromise the build" >&5
1061 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1062   { { echo "$as_me:1062: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1063 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1064    { (exit 1); exit 1; }; }
1065 fi
1066
1067 ac_ext=c
1068 ac_cpp='$CPP $CPPFLAGS'
1069 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1070 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1071 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1072 ac_main_return=return
1073
1074 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1075   *c*,-n*) ECHO_N= ECHO_C='
1076 ' ECHO_T='      ' ;;
1077   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1078   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1079 esac
1080 echo "#! $SHELL" >conftest.sh
1081 echo  "exit 0"   >>conftest.sh
1082 chmod +x conftest.sh
1083 if { (echo "$as_me:1083: PATH=\".;.\"; conftest.sh") >&5
1084   (PATH=".;."; conftest.sh) 2>&5
1085   ac_status=$?
1086   echo "$as_me:1086: \$? = $ac_status" >&5
1087   (exit $ac_status); }; then
1088   ac_path_separator=';'
1089 else
1090   ac_path_separator=:
1091 fi
1092 PATH_SEPARATOR="$ac_path_separator"
1093 rm -f conftest.sh
1094
1095 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1096
1097 top_builddir=`pwd`
1098
1099 echo "$as_me:1099: checking for egrep" >&5
1100 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1101 if test "${ac_cv_prog_egrep+set}" = set; then
1102   echo $ECHO_N "(cached) $ECHO_C" >&6
1103 else
1104   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1105     then ac_cv_prog_egrep='grep -E'
1106     else ac_cv_prog_egrep='egrep'
1107     fi
1108 fi
1109 echo "$as_me:1109: result: $ac_cv_prog_egrep" >&5
1110 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1111  EGREP=$ac_cv_prog_egrep
1112
1113 test -z "$EGREP" && { { echo "$as_me:1113: error: No egrep program found" >&5
1114 echo "$as_me: error: No egrep program found" >&2;}
1115    { (exit 1); exit 1; }; }
1116
1117 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1118 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1119 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 cf_cv_abi_version=${NCURSES_MAJOR}
1121 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1122 cf_cv_timestamp=`date`
1123 echo "$as_me:1123: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1124 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1125
1126 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1127
1128 # Check whether --with-rel-version or --without-rel-version was given.
1129 if test "${with_rel_version+set}" = set; then
1130   withval="$with_rel_version"
1131   { echo "$as_me:1131: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1132 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1133  cf_cv_rel_version=$withval
1134 fi;
1135
1136  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1137  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1138
1139 if test -n "$NCURSES_MAJOR" ; then
1140   case $NCURSES_MAJOR in #(vi
1141   [0-9]*) #(vi
1142         ;;
1143   *)
1144         { { echo "$as_me:1144: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1145 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1146    { (exit 1); exit 1; }; }
1147         ;;
1148   esac
1149 else
1150   { { echo "$as_me:1150: error: Release major-version value is empty" >&5
1151 echo "$as_me: error: Release major-version value is empty" >&2;}
1152    { (exit 1); exit 1; }; }
1153 fi
1154
1155 if test -n "$NCURSES_MINOR" ; then
1156   case $NCURSES_MINOR in #(vi
1157   [0-9]*) #(vi
1158         ;;
1159   *)
1160         { { echo "$as_me:1160: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1161 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1162    { (exit 1); exit 1; }; }
1163         ;;
1164   esac
1165 else
1166   { { echo "$as_me:1166: error: Release minor-version value is empty" >&5
1167 echo "$as_me: error: Release minor-version value is empty" >&2;}
1168    { (exit 1); exit 1; }; }
1169 fi
1170
1171 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1172
1173 # Check whether --with-abi-version or --without-abi-version was given.
1174 if test "${with_abi_version+set}" = set; then
1175   withval="$with_abi_version"
1176   { echo "$as_me:1176: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1177 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1178  cf_cv_abi_version=$withval
1179 fi;
1180
1181 if test -n "$cf_cv_abi_version" ; then
1182   case $cf_cv_abi_version in #(vi
1183   [0-9]*) #(vi
1184         ;;
1185   *)
1186         { { echo "$as_me:1186: error: ABI version is not a number: $cf_cv_abi_version" >&5
1187 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1188    { (exit 1); exit 1; }; }
1189         ;;
1190   esac
1191 else
1192   { { echo "$as_me:1192: error: ABI version value is empty" >&5
1193 echo "$as_me: error: ABI version value is empty" >&2;}
1194    { (exit 1); exit 1; }; }
1195 fi
1196
1197 ac_aux_dir=
1198 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1199   if test -f $ac_dir/install-sh; then
1200     ac_aux_dir=$ac_dir
1201     ac_install_sh="$ac_aux_dir/install-sh -c"
1202     break
1203   elif test -f $ac_dir/install.sh; then
1204     ac_aux_dir=$ac_dir
1205     ac_install_sh="$ac_aux_dir/install.sh -c"
1206     break
1207   elif test -f $ac_dir/shtool; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/shtool install -c"
1210     break
1211   fi
1212 done
1213 if test -z "$ac_aux_dir"; then
1214   { { echo "$as_me:1214: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1215 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1216    { (exit 1); exit 1; }; }
1217 fi
1218 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1219 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1220 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1221
1222 # Make sure we can run config.sub.
1223 $ac_config_sub sun4 >/dev/null 2>&1 ||
1224   { { echo "$as_me:1224: error: cannot run $ac_config_sub" >&5
1225 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1226    { (exit 1); exit 1; }; }
1227
1228 echo "$as_me:1228: checking build system type" >&5
1229 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1230 if test "${ac_cv_build+set}" = set; then
1231   echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233   ac_cv_build_alias=$build_alias
1234 test -z "$ac_cv_build_alias" &&
1235   ac_cv_build_alias=`$ac_config_guess`
1236 test -z "$ac_cv_build_alias" &&
1237   { { echo "$as_me:1237: error: cannot guess build type; you must specify one" >&5
1238 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1239    { (exit 1); exit 1; }; }
1240 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1241   { { echo "$as_me:1241: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1242 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1243    { (exit 1); exit 1; }; }
1244
1245 fi
1246 echo "$as_me:1246: result: $ac_cv_build" >&5
1247 echo "${ECHO_T}$ac_cv_build" >&6
1248 build=$ac_cv_build
1249 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1250 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1251 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1252
1253 echo "$as_me:1253: checking host system type" >&5
1254 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1255 if test "${ac_cv_host+set}" = set; then
1256   echo $ECHO_N "(cached) $ECHO_C" >&6
1257 else
1258   ac_cv_host_alias=$host_alias
1259 test -z "$ac_cv_host_alias" &&
1260   ac_cv_host_alias=$ac_cv_build_alias
1261 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1262   { { echo "$as_me:1262: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1263 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1264    { (exit 1); exit 1; }; }
1265
1266 fi
1267 echo "$as_me:1267: result: $ac_cv_host" >&5
1268 echo "${ECHO_T}$ac_cv_host" >&6
1269 host=$ac_cv_host
1270 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1271 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1272 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1273
1274 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1275         echo "$as_me:1275: checking target system type" >&5
1276 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1277 if test "${ac_cv_target+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   ac_cv_target_alias=$target_alias
1281 test "x$ac_cv_target_alias" = "x" &&
1282   ac_cv_target_alias=$ac_cv_host_alias
1283 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1284   { { echo "$as_me:1284: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1285 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1286    { (exit 1); exit 1; }; }
1287
1288 fi
1289 echo "$as_me:1289: result: $ac_cv_target" >&5
1290 echo "${ECHO_T}$ac_cv_target" >&6
1291 target=$ac_cv_target
1292 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1293 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1294 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1295
1296 # The aliases save the names the user supplied, while $host etc.
1297 # will get canonicalized.
1298 test -n "$target_alias" &&
1299   test "$program_prefix$program_suffix$program_transform_name" = \
1300     NONENONEs,x,x, &&
1301   program_prefix=${target_alias}-
1302         system_name="$host_os"
1303 else
1304         system_name="`(uname -s -r) 2>/dev/null`"
1305         if test -z "$system_name" ; then
1306                 system_name="`(hostname) 2>/dev/null`"
1307         fi
1308 fi
1309 test -n "$system_name" && cat >>confdefs.h <<EOF
1310 #define SYSTEM_NAME "$system_name"
1311 EOF
1312
1313 if test "${cf_cv_system_name+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   cf_cv_system_name="$system_name"
1317 fi
1318
1319 test -z "$system_name" && system_name="$cf_cv_system_name"
1320 test -n "$cf_cv_system_name" && echo "$as_me:1320: result: Configuring for $cf_cv_system_name" >&5
1321 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1322
1323 if test ".$system_name" != ".$cf_cv_system_name" ; then
1324         echo "$as_me:1324: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1325 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1326         { { echo "$as_me:1326: error: \"Please remove config.cache and try again.\"" >&5
1327 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1328    { (exit 1); exit 1; }; }
1329 fi
1330
1331 # Check whether --with-system-type or --without-system-type was given.
1332 if test "${with_system_type+set}" = set; then
1333   withval="$with_system_type"
1334   { echo "$as_me:1334: WARNING: overriding system type to $withval" >&5
1335 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1336  cf_cv_system_name=$withval
1337 fi;
1338
1339 ###     Save the given $CFLAGS to allow user-override.
1340 cf_user_CFLAGS="$CFLAGS"
1341
1342 ###     Default install-location
1343
1344 echo "$as_me:1344: checking for prefix" >&5
1345 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1346 if test "x$prefix" = "xNONE" ; then
1347         case "$cf_cv_system_name" in
1348                 # non-vendor systems don't have a conflict
1349         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1350                 prefix=/usr
1351                 ;;
1352         *)      prefix=$ac_default_prefix
1353                 ;;
1354         esac
1355 fi
1356 echo "$as_me:1356: result: $prefix" >&5
1357 echo "${ECHO_T}$prefix" >&6
1358
1359 if test "x$prefix" = "xNONE" ; then
1360 echo "$as_me:1360: checking for default include-directory" >&5
1361 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1362 test -n "$verbose" && echo 1>&6
1363 for cf_symbol in \
1364         $includedir \
1365         $includedir/ncurses \
1366         $prefix/include \
1367         $prefix/include/ncurses \
1368         /usr/local/include \
1369         /usr/local/include/ncurses \
1370         /usr/include \
1371         /usr/include/ncurses
1372 do
1373         cf_dir=`eval echo $cf_symbol`
1374         if test -f $cf_dir/curses.h ; then
1375         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1376                 includedir="$cf_symbol"
1377                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1378                 break
1379         fi
1380         fi
1381         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1382 done
1383 echo "$as_me:1383: result: $includedir" >&5
1384 echo "${ECHO_T}$includedir" >&6
1385 fi
1386
1387 ###     Checks for programs.
1388 ac_ext=c
1389 ac_cpp='$CPP $CPPFLAGS'
1390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1393 ac_main_return=return
1394 if test -n "$ac_tool_prefix"; then
1395   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1396 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1397 echo "$as_me:1397: checking for $ac_word" >&5
1398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1399 if test "${ac_cv_prog_CC+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   if test -n "$CC"; then
1403   ac_cv_prog_CC="$CC" # Let the user override the test.
1404 else
1405   ac_save_IFS=$IFS; IFS=$ac_path_separator
1406 ac_dummy="$PATH"
1407 for ac_dir in $ac_dummy; do
1408   IFS=$ac_save_IFS
1409   test -z "$ac_dir" && ac_dir=.
1410   $as_executable_p "$ac_dir/$ac_word" || continue
1411 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1412 echo "$as_me:1412: found $ac_dir/$ac_word" >&5
1413 break
1414 done
1415
1416 fi
1417 fi
1418 CC=$ac_cv_prog_CC
1419 if test -n "$CC"; then
1420   echo "$as_me:1420: result: $CC" >&5
1421 echo "${ECHO_T}$CC" >&6
1422 else
1423   echo "$as_me:1423: result: no" >&5
1424 echo "${ECHO_T}no" >&6
1425 fi
1426
1427 fi
1428 if test -z "$ac_cv_prog_CC"; then
1429   ac_ct_CC=$CC
1430   # Extract the first word of "gcc", so it can be a program name with args.
1431 set dummy gcc; ac_word=$2
1432 echo "$as_me:1432: checking for $ac_word" >&5
1433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   if test -n "$ac_ct_CC"; then
1438   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1439 else
1440   ac_save_IFS=$IFS; IFS=$ac_path_separator
1441 ac_dummy="$PATH"
1442 for ac_dir in $ac_dummy; do
1443   IFS=$ac_save_IFS
1444   test -z "$ac_dir" && ac_dir=.
1445   $as_executable_p "$ac_dir/$ac_word" || continue
1446 ac_cv_prog_ac_ct_CC="gcc"
1447 echo "$as_me:1447: found $ac_dir/$ac_word" >&5
1448 break
1449 done
1450
1451 fi
1452 fi
1453 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1454 if test -n "$ac_ct_CC"; then
1455   echo "$as_me:1455: result: $ac_ct_CC" >&5
1456 echo "${ECHO_T}$ac_ct_CC" >&6
1457 else
1458   echo "$as_me:1458: result: no" >&5
1459 echo "${ECHO_T}no" >&6
1460 fi
1461
1462   CC=$ac_ct_CC
1463 else
1464   CC="$ac_cv_prog_CC"
1465 fi
1466
1467 if test -z "$CC"; then
1468   if test -n "$ac_tool_prefix"; then
1469   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1470 set dummy ${ac_tool_prefix}cc; ac_word=$2
1471 echo "$as_me:1471: checking for $ac_word" >&5
1472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1473 if test "${ac_cv_prog_CC+set}" = set; then
1474   echo $ECHO_N "(cached) $ECHO_C" >&6
1475 else
1476   if test -n "$CC"; then
1477   ac_cv_prog_CC="$CC" # Let the user override the test.
1478 else
1479   ac_save_IFS=$IFS; IFS=$ac_path_separator
1480 ac_dummy="$PATH"
1481 for ac_dir in $ac_dummy; do
1482   IFS=$ac_save_IFS
1483   test -z "$ac_dir" && ac_dir=.
1484   $as_executable_p "$ac_dir/$ac_word" || continue
1485 ac_cv_prog_CC="${ac_tool_prefix}cc"
1486 echo "$as_me:1486: found $ac_dir/$ac_word" >&5
1487 break
1488 done
1489
1490 fi
1491 fi
1492 CC=$ac_cv_prog_CC
1493 if test -n "$CC"; then
1494   echo "$as_me:1494: result: $CC" >&5
1495 echo "${ECHO_T}$CC" >&6
1496 else
1497   echo "$as_me:1497: result: no" >&5
1498 echo "${ECHO_T}no" >&6
1499 fi
1500
1501 fi
1502 if test -z "$ac_cv_prog_CC"; then
1503   ac_ct_CC=$CC
1504   # Extract the first word of "cc", so it can be a program name with args.
1505 set dummy cc; ac_word=$2
1506 echo "$as_me:1506: checking for $ac_word" >&5
1507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1508 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1509   echo $ECHO_N "(cached) $ECHO_C" >&6
1510 else
1511   if test -n "$ac_ct_CC"; then
1512   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1513 else
1514   ac_save_IFS=$IFS; IFS=$ac_path_separator
1515 ac_dummy="$PATH"
1516 for ac_dir in $ac_dummy; do
1517   IFS=$ac_save_IFS
1518   test -z "$ac_dir" && ac_dir=.
1519   $as_executable_p "$ac_dir/$ac_word" || continue
1520 ac_cv_prog_ac_ct_CC="cc"
1521 echo "$as_me:1521: found $ac_dir/$ac_word" >&5
1522 break
1523 done
1524
1525 fi
1526 fi
1527 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1528 if test -n "$ac_ct_CC"; then
1529   echo "$as_me:1529: result: $ac_ct_CC" >&5
1530 echo "${ECHO_T}$ac_ct_CC" >&6
1531 else
1532   echo "$as_me:1532: result: no" >&5
1533 echo "${ECHO_T}no" >&6
1534 fi
1535
1536   CC=$ac_ct_CC
1537 else
1538   CC="$ac_cv_prog_CC"
1539 fi
1540
1541 fi
1542 if test -z "$CC"; then
1543   # Extract the first word of "cc", so it can be a program name with args.
1544 set dummy cc; ac_word=$2
1545 echo "$as_me:1545: checking for $ac_word" >&5
1546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1547 if test "${ac_cv_prog_CC+set}" = set; then
1548   echo $ECHO_N "(cached) $ECHO_C" >&6
1549 else
1550   if test -n "$CC"; then
1551   ac_cv_prog_CC="$CC" # Let the user override the test.
1552 else
1553   ac_prog_rejected=no
1554   ac_save_IFS=$IFS; IFS=$ac_path_separator
1555 ac_dummy="$PATH"
1556 for ac_dir in $ac_dummy; do
1557   IFS=$ac_save_IFS
1558   test -z "$ac_dir" && ac_dir=.
1559   $as_executable_p "$ac_dir/$ac_word" || continue
1560 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1561   ac_prog_rejected=yes
1562   continue
1563 fi
1564 ac_cv_prog_CC="cc"
1565 echo "$as_me:1565: found $ac_dir/$ac_word" >&5
1566 break
1567 done
1568
1569 if test $ac_prog_rejected = yes; then
1570   # We found a bogon in the path, so make sure we never use it.
1571   set dummy $ac_cv_prog_CC
1572   shift
1573   if test $# != 0; then
1574     # We chose a different compiler from the bogus one.
1575     # However, it has the same basename, so the bogon will be chosen
1576     # first if we set CC to just the basename; use the full file name.
1577     shift
1578     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1579     shift
1580     ac_cv_prog_CC="$@"
1581   fi
1582 fi
1583 fi
1584 fi
1585 CC=$ac_cv_prog_CC
1586 if test -n "$CC"; then
1587   echo "$as_me:1587: result: $CC" >&5
1588 echo "${ECHO_T}$CC" >&6
1589 else
1590   echo "$as_me:1590: result: no" >&5
1591 echo "${ECHO_T}no" >&6
1592 fi
1593
1594 fi
1595 if test -z "$CC"; then
1596   if test -n "$ac_tool_prefix"; then
1597   for ac_prog in cl
1598   do
1599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1601 echo "$as_me:1601: checking for $ac_word" >&5
1602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1603 if test "${ac_cv_prog_CC+set}" = set; then
1604   echo $ECHO_N "(cached) $ECHO_C" >&6
1605 else
1606   if test -n "$CC"; then
1607   ac_cv_prog_CC="$CC" # Let the user override the test.
1608 else
1609   ac_save_IFS=$IFS; IFS=$ac_path_separator
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
1612   IFS=$ac_save_IFS
1613   test -z "$ac_dir" && ac_dir=.
1614   $as_executable_p "$ac_dir/$ac_word" || continue
1615 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1616 echo "$as_me:1616: found $ac_dir/$ac_word" >&5
1617 break
1618 done
1619
1620 fi
1621 fi
1622 CC=$ac_cv_prog_CC
1623 if test -n "$CC"; then
1624   echo "$as_me:1624: result: $CC" >&5
1625 echo "${ECHO_T}$CC" >&6
1626 else
1627   echo "$as_me:1627: result: no" >&5
1628 echo "${ECHO_T}no" >&6
1629 fi
1630
1631     test -n "$CC" && break
1632   done
1633 fi
1634 if test -z "$CC"; then
1635   ac_ct_CC=$CC
1636   for ac_prog in cl
1637 do
1638   # Extract the first word of "$ac_prog", so it can be a program name with args.
1639 set dummy $ac_prog; ac_word=$2
1640 echo "$as_me:1640: checking for $ac_word" >&5
1641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1642 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   if test -n "$ac_ct_CC"; then
1646   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1647 else
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   $as_executable_p "$ac_dir/$ac_word" || continue
1654 ac_cv_prog_ac_ct_CC="$ac_prog"
1655 echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656 break
1657 done
1658
1659 fi
1660 fi
1661 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1662 if test -n "$ac_ct_CC"; then
1663   echo "$as_me:1663: result: $ac_ct_CC" >&5
1664 echo "${ECHO_T}$ac_ct_CC" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$ac_ct_CC" && break
1671 done
1672
1673   CC=$ac_ct_CC
1674 fi
1675
1676 fi
1677
1678 test -z "$CC" && { { echo "$as_me:1678: error: no acceptable cc found in \$PATH" >&5
1679 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1680    { (exit 1); exit 1; }; }
1681
1682 # Provide some information about the compiler.
1683 echo "$as_me:1683:" \
1684      "checking for C compiler version" >&5
1685 ac_compiler=`set X $ac_compile; echo $2`
1686 { (eval echo "$as_me:1686: \"$ac_compiler --version </dev/null >&5\"") >&5
1687   (eval $ac_compiler --version </dev/null >&5) 2>&5
1688   ac_status=$?
1689   echo "$as_me:1689: \$? = $ac_status" >&5
1690   (exit $ac_status); }
1691 { (eval echo "$as_me:1691: \"$ac_compiler -v </dev/null >&5\"") >&5
1692   (eval $ac_compiler -v </dev/null >&5) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }
1696 { (eval echo "$as_me:1696: \"$ac_compiler -V </dev/null >&5\"") >&5
1697   (eval $ac_compiler -V </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701
1702 cat >conftest.$ac_ext <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1705
1706 int
1707 main ()
1708 {
1709
1710   ;
1711   return 0;
1712 }
1713 _ACEOF
1714 ac_clean_files_save=$ac_clean_files
1715 ac_clean_files="$ac_clean_files a.out a.exe"
1716 # Try to create an executable without -o first, disregard a.out.
1717 # It will help us diagnose broken compilers, and finding out an intuition
1718 # of exeext.
1719 echo "$as_me:1719: checking for C compiler default output" >&5
1720 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1721 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1722 if { (eval echo "$as_me:1722: \"$ac_link_default\"") >&5
1723   (eval $ac_link_default) 2>&5
1724   ac_status=$?
1725   echo "$as_me:1725: \$? = $ac_status" >&5
1726   (exit $ac_status); }; then
1727   # Find the output, starting from the most likely.  This scheme is
1728 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1729 # resort.
1730 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1731                 ls a.out conftest 2>/dev/null;
1732                 ls a.* conftest.* 2>/dev/null`; do
1733   case $ac_file in
1734     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1735     a.out ) # We found the default executable, but exeext='' is most
1736             # certainly right.
1737             break;;
1738     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1739           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1740           export ac_cv_exeext
1741           break;;
1742     * ) break;;
1743   esac
1744 done
1745 else
1746   echo "$as_me: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 { { echo "$as_me:1748: error: C compiler cannot create executables" >&5
1749 echo "$as_me: error: C compiler cannot create executables" >&2;}
1750    { (exit 77); exit 77; }; }
1751 fi
1752
1753 ac_exeext=$ac_cv_exeext
1754 echo "$as_me:1754: result: $ac_file" >&5
1755 echo "${ECHO_T}$ac_file" >&6
1756
1757 # Check the compiler produces executables we can run.  If not, either
1758 # the compiler is broken, or we cross compile.
1759 echo "$as_me:1759: checking whether the C compiler works" >&5
1760 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1761 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762 # If not cross compiling, check that we can run a simple program.
1763 if test "$cross_compiling" != yes; then
1764   if { ac_try='./$ac_file'
1765   { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766   (eval $ac_try) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); }; }; then
1770     cross_compiling=no
1771   else
1772     if test "$cross_compiling" = maybe; then
1773         cross_compiling=yes
1774     else
1775         { { echo "$as_me:1775: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&5
1777 echo "$as_me: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&2;}
1779    { (exit 1); exit 1; }; }
1780     fi
1781   fi
1782 fi
1783 echo "$as_me:1783: result: yes" >&5
1784 echo "${ECHO_T}yes" >&6
1785
1786 rm -f a.out a.exe conftest$ac_cv_exeext
1787 ac_clean_files=$ac_clean_files_save
1788 # Check the compiler produces executables we can run.  If not, either
1789 # the compiler is broken, or we cross compile.
1790 echo "$as_me:1790: checking whether we are cross compiling" >&5
1791 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1792 echo "$as_me:1792: result: $cross_compiling" >&5
1793 echo "${ECHO_T}$cross_compiling" >&6
1794
1795 echo "$as_me:1795: checking for executable suffix" >&5
1796 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1797 if { (eval echo "$as_me:1797: \"$ac_link\"") >&5
1798   (eval $ac_link) 2>&5
1799   ac_status=$?
1800   echo "$as_me:1800: \$? = $ac_status" >&5
1801   (exit $ac_status); }; then
1802   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1803 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1804 # work properly (i.e., refer to `conftest.exe'), while it won't with
1805 # `rm'.
1806 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1807   case $ac_file in
1808     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1809     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810           export ac_cv_exeext
1811           break;;
1812     * ) break;;
1813   esac
1814 done
1815 else
1816   { { echo "$as_me:1816: error: cannot compute EXEEXT: cannot compile and link" >&5
1817 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1818    { (exit 1); exit 1; }; }
1819 fi
1820
1821 rm -f conftest$ac_cv_exeext
1822 echo "$as_me:1822: result: $ac_cv_exeext" >&5
1823 echo "${ECHO_T}$ac_cv_exeext" >&6
1824
1825 rm -f conftest.$ac_ext
1826 EXEEXT=$ac_cv_exeext
1827 ac_exeext=$EXEEXT
1828 echo "$as_me:1828: checking for object suffix" >&5
1829 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1830 if test "${ac_cv_objext+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833   cat >conftest.$ac_ext <<_ACEOF
1834 #line 1834 "configure"
1835 #include "confdefs.h"
1836
1837 int
1838 main ()
1839 {
1840
1841   ;
1842   return 0;
1843 }
1844 _ACEOF
1845 rm -f conftest.o conftest.obj
1846 if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847   (eval $ac_compile) 2>&5
1848   ac_status=$?
1849   echo "$as_me:1849: \$? = $ac_status" >&5
1850   (exit $ac_status); }; then
1851   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1852   case $ac_file in
1853     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1854     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1855        break;;
1856   esac
1857 done
1858 else
1859   echo "$as_me: failed program was:" >&5
1860 cat conftest.$ac_ext >&5
1861 { { echo "$as_me:1861: error: cannot compute OBJEXT: cannot compile" >&5
1862 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1863    { (exit 1); exit 1; }; }
1864 fi
1865
1866 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1867 fi
1868 echo "$as_me:1868: result: $ac_cv_objext" >&5
1869 echo "${ECHO_T}$ac_cv_objext" >&6
1870 OBJEXT=$ac_cv_objext
1871 ac_objext=$OBJEXT
1872 echo "$as_me:1872: checking whether we are using the GNU C compiler" >&5
1873 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1874 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main ()
1883 {
1884 #ifndef __GNUC__
1885        choke me
1886 #endif
1887
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   ac_compiler_gnu=yes
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 ac_compiler_gnu=no
1909 fi
1910 rm -f conftest.$ac_objext conftest.$ac_ext
1911 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1912
1913 fi
1914 echo "$as_me:1914: result: $ac_cv_c_compiler_gnu" >&5
1915 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1916 GCC=`test $ac_compiler_gnu = yes && echo yes`
1917 ac_test_CFLAGS=${CFLAGS+set}
1918 ac_save_CFLAGS=$CFLAGS
1919 CFLAGS="-g"
1920 echo "$as_me:1920: checking whether $CC accepts -g" >&5
1921 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1922 if test "${ac_cv_prog_cc_g+set}" = set; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.$ac_ext <<_ACEOF
1926 #line 1926 "configure"
1927 #include "confdefs.h"
1928
1929 int
1930 main ()
1931 {
1932
1933   ;
1934   return 0;
1935 }
1936 _ACEOF
1937 rm -f conftest.$ac_objext
1938 if { (eval echo "$as_me:1938: \"$ac_compile\"") >&5
1939   (eval $ac_compile) 2>&5
1940   ac_status=$?
1941   echo "$as_me:1941: \$? = $ac_status" >&5
1942   (exit $ac_status); } &&
1943          { ac_try='test -s conftest.$ac_objext'
1944   { (eval echo "$as_me:1944: \"$ac_try\"") >&5
1945   (eval $ac_try) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); }; }; then
1949   ac_cv_prog_cc_g=yes
1950 else
1951   echo "$as_me: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 ac_cv_prog_cc_g=no
1954 fi
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 fi
1957 echo "$as_me:1957: result: $ac_cv_prog_cc_g" >&5
1958 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1959 if test "$ac_test_CFLAGS" = set; then
1960   CFLAGS=$ac_save_CFLAGS
1961 elif test $ac_cv_prog_cc_g = yes; then
1962   if test "$GCC" = yes; then
1963     CFLAGS="-g -O2"
1964   else
1965     CFLAGS="-g"
1966   fi
1967 else
1968   if test "$GCC" = yes; then
1969     CFLAGS="-O2"
1970   else
1971     CFLAGS=
1972   fi
1973 fi
1974 # Some people use a C++ compiler to compile C.  Since we use `exit',
1975 # in C++ we need to declare it.  In case someone uses the same compiler
1976 # for both compiling C and C++ we need to have the C++ compiler decide
1977 # the declaration of exit, since it's the most demanding environment.
1978 cat >conftest.$ac_ext <<_ACEOF
1979 #ifndef __cplusplus
1980   choke me
1981 #endif
1982 _ACEOF
1983 rm -f conftest.$ac_objext
1984 if { (eval echo "$as_me:1984: \"$ac_compile\"") >&5
1985   (eval $ac_compile) 2>&5
1986   ac_status=$?
1987   echo "$as_me:1987: \$? = $ac_status" >&5
1988   (exit $ac_status); } &&
1989          { ac_try='test -s conftest.$ac_objext'
1990   { (eval echo "$as_me:1990: \"$ac_try\"") >&5
1991   (eval $ac_try) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); }; }; then
1995   for ac_declaration in \
1996    ''\
1997    '#include <stdlib.h>' \
1998    'extern "C" void std::exit (int) throw (); using std::exit;' \
1999    'extern "C" void std::exit (int); using std::exit;' \
2000    'extern "C" void exit (int) throw ();' \
2001    'extern "C" void exit (int);' \
2002    'void exit (int);'
2003 do
2004   cat >conftest.$ac_ext <<_ACEOF
2005 #line 2005 "configure"
2006 #include "confdefs.h"
2007 #include <stdlib.h>
2008 $ac_declaration
2009 int
2010 main ()
2011 {
2012 exit (42);
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019   (eval $ac_compile) 2>&5
2020   ac_status=$?
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } &&
2023          { ac_try='test -s conftest.$ac_objext'
2024   { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2025   (eval $ac_try) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); }; }; then
2029   :
2030 else
2031   echo "$as_me: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 continue
2034 fi
2035 rm -f conftest.$ac_objext conftest.$ac_ext
2036   cat >conftest.$ac_ext <<_ACEOF
2037 #line 2037 "configure"
2038 #include "confdefs.h"
2039 $ac_declaration
2040 int
2041 main ()
2042 {
2043 exit (42);
2044   ;
2045   return 0;
2046 }
2047 _ACEOF
2048 rm -f conftest.$ac_objext
2049 if { (eval echo "$as_me:2049: \"$ac_compile\"") >&5
2050   (eval $ac_compile) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } &&
2054          { ac_try='test -s conftest.$ac_objext'
2055   { (eval echo "$as_me:2055: \"$ac_try\"") >&5
2056   (eval $ac_try) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); }; }; then
2060   break
2061 else
2062   echo "$as_me: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 fi
2065 rm -f conftest.$ac_objext conftest.$ac_ext
2066 done
2067 rm -f conftest*
2068 if test -n "$ac_declaration"; then
2069   echo '#ifdef __cplusplus' >>confdefs.h
2070   echo $ac_declaration      >>confdefs.h
2071   echo '#endif'             >>confdefs.h
2072 fi
2073
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 ac_ext=c
2080 ac_cpp='$CPP $CPPFLAGS'
2081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2084 ac_main_return=return
2085
2086 GCC_VERSION=none
2087 if test "$GCC" = yes ; then
2088         echo "$as_me:2088: checking version of $CC" >&5
2089 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2090         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2091         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2092         echo "$as_me:2092: result: $GCC_VERSION" >&5
2093 echo "${ECHO_T}$GCC_VERSION" >&6
2094 fi
2095
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102 echo "$as_me:2102: checking how to run the C preprocessor" >&5
2103 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2104 # On Suns, sometimes $CPP names a directory.
2105 if test -n "$CPP" && test -d "$CPP"; then
2106   CPP=
2107 fi
2108 if test -z "$CPP"; then
2109   if test "${ac_cv_prog_CPP+set}" = set; then
2110   echo $ECHO_N "(cached) $ECHO_C" >&6
2111 else
2112       # Double quotes because CPP needs to be expanded
2113     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2114     do
2115       ac_preproc_ok=false
2116 for ac_c_preproc_warn_flag in '' yes
2117 do
2118   # Use a header file that comes with gcc, so configuring glibc
2119   # with a fresh cross-compiler works.
2120   # On the NeXT, cc -E runs the code through the compiler's parser,
2121   # not just through cpp. "Syntax error" is here to catch this case.
2122   cat >conftest.$ac_ext <<_ACEOF
2123 #line 2123 "configure"
2124 #include "confdefs.h"
2125 #include <assert.h>
2126                      Syntax error
2127 _ACEOF
2128 if { (eval echo "$as_me:2128: \"$ac_cpp conftest.$ac_ext\"") >&5
2129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2130   ac_status=$?
2131   egrep -v '^ *\+' conftest.er1 >conftest.err
2132   rm -f conftest.er1
2133   cat conftest.err >&5
2134   echo "$as_me:2134: \$? = $ac_status" >&5
2135   (exit $ac_status); } >/dev/null; then
2136   if test -s conftest.err; then
2137     ac_cpp_err=$ac_c_preproc_warn_flag
2138   else
2139     ac_cpp_err=
2140   fi
2141 else
2142   ac_cpp_err=yes
2143 fi
2144 if test -z "$ac_cpp_err"; then
2145   :
2146 else
2147   echo "$as_me: failed program was:" >&5
2148   cat conftest.$ac_ext >&5
2149   # Broken: fails on valid input.
2150 continue
2151 fi
2152 rm -f conftest.err conftest.$ac_ext
2153
2154   # OK, works on sane cases.  Now check whether non-existent headers
2155   # can be detected and how.
2156   cat >conftest.$ac_ext <<_ACEOF
2157 #line 2157 "configure"
2158 #include "confdefs.h"
2159 #include <ac_nonexistent.h>
2160 _ACEOF
2161 if { (eval echo "$as_me:2161: \"$ac_cpp conftest.$ac_ext\"") >&5
2162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2163   ac_status=$?
2164   egrep -v '^ *\+' conftest.er1 >conftest.err
2165   rm -f conftest.er1
2166   cat conftest.err >&5
2167   echo "$as_me:2167: \$? = $ac_status" >&5
2168   (exit $ac_status); } >/dev/null; then
2169   if test -s conftest.err; then
2170     ac_cpp_err=$ac_c_preproc_warn_flag
2171   else
2172     ac_cpp_err=
2173   fi
2174 else
2175   ac_cpp_err=yes
2176 fi
2177 if test -z "$ac_cpp_err"; then
2178   # Broken: success on invalid input.
2179 continue
2180 else
2181   echo "$as_me: failed program was:" >&5
2182   cat conftest.$ac_ext >&5
2183   # Passes both tests.
2184 ac_preproc_ok=:
2185 break
2186 fi
2187 rm -f conftest.err conftest.$ac_ext
2188
2189 done
2190 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2191 rm -f conftest.err conftest.$ac_ext
2192 if $ac_preproc_ok; then
2193   break
2194 fi
2195
2196     done
2197     ac_cv_prog_CPP=$CPP
2198
2199 fi
2200   CPP=$ac_cv_prog_CPP
2201 else
2202   ac_cv_prog_CPP=$CPP
2203 fi
2204 echo "$as_me:2204: result: $CPP" >&5
2205 echo "${ECHO_T}$CPP" >&6
2206 ac_preproc_ok=false
2207 for ac_c_preproc_warn_flag in '' yes
2208 do
2209   # Use a header file that comes with gcc, so configuring glibc
2210   # with a fresh cross-compiler works.
2211   # On the NeXT, cc -E runs the code through the compiler's parser,
2212   # not just through cpp. "Syntax error" is here to catch this case.
2213   cat >conftest.$ac_ext <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 #include <assert.h>
2217                      Syntax error
2218 _ACEOF
2219 if { (eval echo "$as_me:2219: \"$ac_cpp conftest.$ac_ext\"") >&5
2220   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2221   ac_status=$?
2222   egrep -v '^ *\+' conftest.er1 >conftest.err
2223   rm -f conftest.er1
2224   cat conftest.err >&5
2225   echo "$as_me:2225: \$? = $ac_status" >&5
2226   (exit $ac_status); } >/dev/null; then
2227   if test -s conftest.err; then
2228     ac_cpp_err=$ac_c_preproc_warn_flag
2229   else
2230     ac_cpp_err=
2231   fi
2232 else
2233   ac_cpp_err=yes
2234 fi
2235 if test -z "$ac_cpp_err"; then
2236   :
2237 else
2238   echo "$as_me: failed program was:" >&5
2239   cat conftest.$ac_ext >&5
2240   # Broken: fails on valid input.
2241 continue
2242 fi
2243 rm -f conftest.err conftest.$ac_ext
2244
2245   # OK, works on sane cases.  Now check whether non-existent headers
2246   # can be detected and how.
2247   cat >conftest.$ac_ext <<_ACEOF
2248 #line 2248 "configure"
2249 #include "confdefs.h"
2250 #include <ac_nonexistent.h>
2251 _ACEOF
2252 if { (eval echo "$as_me:2252: \"$ac_cpp conftest.$ac_ext\"") >&5
2253   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2254   ac_status=$?
2255   egrep -v '^ *\+' conftest.er1 >conftest.err
2256   rm -f conftest.er1
2257   cat conftest.err >&5
2258   echo "$as_me:2258: \$? = $ac_status" >&5
2259   (exit $ac_status); } >/dev/null; then
2260   if test -s conftest.err; then
2261     ac_cpp_err=$ac_c_preproc_warn_flag
2262   else
2263     ac_cpp_err=
2264   fi
2265 else
2266   ac_cpp_err=yes
2267 fi
2268 if test -z "$ac_cpp_err"; then
2269   # Broken: success on invalid input.
2270 continue
2271 else
2272   echo "$as_me: failed program was:" >&5
2273   cat conftest.$ac_ext >&5
2274   # Passes both tests.
2275 ac_preproc_ok=:
2276 break
2277 fi
2278 rm -f conftest.err conftest.$ac_ext
2279
2280 done
2281 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2282 rm -f conftest.err conftest.$ac_ext
2283 if $ac_preproc_ok; then
2284   :
2285 else
2286   { { echo "$as_me:2286: error: C preprocessor \"$CPP\" fails sanity check" >&5
2287 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2288    { (exit 1); exit 1; }; }
2289 fi
2290
2291 ac_ext=c
2292 ac_cpp='$CPP $CPPFLAGS'
2293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296 ac_main_return=return
2297
2298 if test $ac_cv_c_compiler_gnu = yes; then
2299     echo "$as_me:2299: checking whether $CC needs -traditional" >&5
2300 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2301 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2302   echo $ECHO_N "(cached) $ECHO_C" >&6
2303 else
2304     ac_pattern="Autoconf.*'x'"
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <sgtty.h>
2309 int Autoconf = TIOCGETP;
2310 _ACEOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312   egrep "$ac_pattern" >/dev/null 2>&1; then
2313   ac_cv_prog_gcc_traditional=yes
2314 else
2315   ac_cv_prog_gcc_traditional=no
2316 fi
2317 rm -f conftest*
2318
2319   if test $ac_cv_prog_gcc_traditional = no; then
2320     cat >conftest.$ac_ext <<_ACEOF
2321 #line 2321 "configure"
2322 #include "confdefs.h"
2323 #include <termio.h>
2324 int Autoconf = TCGETA;
2325 _ACEOF
2326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2327   egrep "$ac_pattern" >/dev/null 2>&1; then
2328   ac_cv_prog_gcc_traditional=yes
2329 fi
2330 rm -f conftest*
2331
2332   fi
2333 fi
2334 echo "$as_me:2334: result: $ac_cv_prog_gcc_traditional" >&5
2335 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2336   if test $ac_cv_prog_gcc_traditional = yes; then
2337     CC="$CC -traditional"
2338   fi
2339 fi
2340
2341 echo "$as_me:2341: checking whether $CC understands -c and -o together" >&5
2342 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2343 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346
2347 cat > conftest.$ac_ext <<CF_EOF
2348 #include <stdio.h>
2349 int main()
2350 {
2351         ${cf_cv_main_return:-return}(0);
2352 }
2353 CF_EOF
2354 # We do the test twice because some compilers refuse to overwrite an
2355 # existing .o file with -o, though they will create one.
2356 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2357 if { (eval echo "$as_me:2357: \"$ac_try\"") >&5
2358   (eval $ac_try) 2>&5
2359   ac_status=$?
2360   echo "$as_me:2360: \$? = $ac_status" >&5
2361   (exit $ac_status); } &&
2362   test -f conftest2.$ac_objext && { (eval echo "$as_me:2362: \"$ac_try\"") >&5
2363   (eval $ac_try) 2>&5
2364   ac_status=$?
2365   echo "$as_me:2365: \$? = $ac_status" >&5
2366   (exit $ac_status); };
2367 then
2368   eval cf_cv_prog_CC_c_o=yes
2369 else
2370   eval cf_cv_prog_CC_c_o=no
2371 fi
2372 rm -f conftest*
2373
2374 fi
2375 if test $cf_cv_prog_CC_c_o = yes; then
2376   echo "$as_me:2376: result: yes" >&5
2377 echo "${ECHO_T}yes" >&6
2378 else
2379   echo "$as_me:2379: result: no" >&5
2380 echo "${ECHO_T}no" >&6
2381 fi
2382
2383 echo "$as_me:2383: checking for POSIXized ISC" >&5
2384 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2385 if test -d /etc/conf/kconfig.d &&
2386    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2387 then
2388   echo "$as_me:2388: result: yes" >&5
2389 echo "${ECHO_T}yes" >&6
2390   ISC=yes # If later tests want to check for ISC.
2391
2392 cat >>confdefs.h <<\EOF
2393 #define _POSIX_SOURCE 1
2394 EOF
2395
2396   if test "$GCC" = yes; then
2397     CC="$CC -posix"
2398   else
2399     CC="$CC -Xp"
2400   fi
2401 else
2402   echo "$as_me:2402: result: no" >&5
2403 echo "${ECHO_T}no" >&6
2404   ISC=
2405 fi
2406
2407 echo "$as_me:2407: checking for ${CC-cc} option to accept ANSI C" >&5
2408 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2409 if test "${cf_cv_ansi_cc+set}" = set; then
2410   echo $ECHO_N "(cached) $ECHO_C" >&6
2411 else
2412
2413 cf_cv_ansi_cc=no
2414 cf_save_CFLAGS="$CFLAGS"
2415 cf_save_CPPFLAGS="$CPPFLAGS"
2416 # Don't try gcc -ansi; that turns off useful extensions and
2417 # breaks some systems' header files.
2418 # AIX                   -qlanglvl=ansi
2419 # Ultrix and OSF/1      -std1
2420 # HP-UX                 -Aa -D_HPUX_SOURCE
2421 # SVR4                  -Xc
2422 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2423 for cf_arg in "-DCC_HAS_PROTOS" \
2424         "" \
2425         -qlanglvl=ansi \
2426         -std1 \
2427         -Ae \
2428         "-Aa -D_HPUX_SOURCE" \
2429         -Xc
2430 do
2431
2432 cf_fix_cppflags=no
2433 cf_new_cflags=
2434 cf_new_cppflags=
2435 cf_new_extra_cppflags=
2436
2437 for cf_add_cflags in $cf_arg
2438 do
2439 case $cf_fix_cppflags in
2440 no)
2441         case $cf_add_cflags in #(vi
2442         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2443                 case $cf_add_cflags in
2444                 -D*)
2445                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2446
2447                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2448                         && test -z "${cf_tst_cflags}" \
2449                         && cf_fix_cppflags=yes
2450
2451                         if test $cf_fix_cppflags = yes ; then
2452                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2453                                 continue
2454                         elif test "${cf_tst_cflags}" = "\"'" ; then
2455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2456                                 continue
2457                         fi
2458                         ;;
2459                 esac
2460                 case "$CPPFLAGS" in
2461                 *$cf_add_cflags) #(vi
2462                         ;;
2463                 *) #(vi
2464                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2465                         ;;
2466                 esac
2467                 ;;
2468         *)
2469                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2470                 ;;
2471         esac
2472         ;;
2473 yes)
2474         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2475
2476         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2477
2478         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2479         && test -z "${cf_tst_cflags}" \
2480         && cf_fix_cppflags=no
2481         ;;
2482 esac
2483 done
2484
2485 if test -n "$cf_new_cflags" ; then
2486
2487         CFLAGS="$CFLAGS $cf_new_cflags"
2488 fi
2489
2490 if test -n "$cf_new_cppflags" ; then
2491
2492         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2493 fi
2494
2495 if test -n "$cf_new_extra_cppflags" ; then
2496
2497         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2498 fi
2499
2500         cat >conftest.$ac_ext <<_ACEOF
2501 #line 2501 "configure"
2502 #include "confdefs.h"
2503
2504 #ifndef CC_HAS_PROTOS
2505 #if !defined(__STDC__) || (__STDC__ != 1)
2506 choke me
2507 #endif
2508 #endif
2509
2510 int
2511 main ()
2512 {
2513
2514         int test (int i, double x);
2515         struct s1 {int (*f) (int a);};
2516         struct s2 {int (*f) (double a);};
2517   ;
2518   return 0;
2519 }
2520 _ACEOF
2521 rm -f conftest.$ac_objext
2522 if { (eval echo "$as_me:2522: \"$ac_compile\"") >&5
2523   (eval $ac_compile) 2>&5
2524   ac_status=$?
2525   echo "$as_me:2525: \$? = $ac_status" >&5
2526   (exit $ac_status); } &&
2527          { ac_try='test -s conftest.$ac_objext'
2528   { (eval echo "$as_me:2528: \"$ac_try\"") >&5
2529   (eval $ac_try) 2>&5
2530   ac_status=$?
2531   echo "$as_me:2531: \$? = $ac_status" >&5
2532   (exit $ac_status); }; }; then
2533   cf_cv_ansi_cc="$cf_arg"; break
2534 else
2535   echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 fi
2538 rm -f conftest.$ac_objext conftest.$ac_ext
2539 done
2540 CFLAGS="$cf_save_CFLAGS"
2541 CPPFLAGS="$cf_save_CPPFLAGS"
2542
2543 fi
2544 echo "$as_me:2544: result: $cf_cv_ansi_cc" >&5
2545 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2546
2547 if test "$cf_cv_ansi_cc" != "no"; then
2548 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2549
2550 cf_fix_cppflags=no
2551 cf_new_cflags=
2552 cf_new_cppflags=
2553 cf_new_extra_cppflags=
2554
2555 for cf_add_cflags in $cf_cv_ansi_cc
2556 do
2557 case $cf_fix_cppflags in
2558 no)
2559         case $cf_add_cflags in #(vi
2560         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2561                 case $cf_add_cflags in
2562                 -D*)
2563                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2564
2565                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2566                         && test -z "${cf_tst_cflags}" \
2567                         && cf_fix_cppflags=yes
2568
2569                         if test $cf_fix_cppflags = yes ; then
2570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2571                                 continue
2572                         elif test "${cf_tst_cflags}" = "\"'" ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         fi
2576                         ;;
2577                 esac
2578                 case "$CPPFLAGS" in
2579                 *$cf_add_cflags) #(vi
2580                         ;;
2581                 *) #(vi
2582                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2583                         ;;
2584                 esac
2585                 ;;
2586         *)
2587                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2588                 ;;
2589         esac
2590         ;;
2591 yes)
2592         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2593
2594         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2595
2596         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2597         && test -z "${cf_tst_cflags}" \
2598         && cf_fix_cppflags=no
2599         ;;
2600 esac
2601 done
2602
2603 if test -n "$cf_new_cflags" ; then
2604
2605         CFLAGS="$CFLAGS $cf_new_cflags"
2606 fi
2607
2608 if test -n "$cf_new_cppflags" ; then
2609
2610         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2611 fi
2612
2613 if test -n "$cf_new_extra_cppflags" ; then
2614
2615         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2616 fi
2617
2618 else
2619         cat >>confdefs.h <<\EOF
2620 #define CC_HAS_PROTOS 1
2621 EOF
2622
2623 fi
2624 fi
2625
2626 if test "$cf_cv_ansi_cc" = "no"; then
2627         { { echo "$as_me:2627: error: Your compiler does not appear to recognize prototypes.
2628 You have the following choices:
2629         a. adjust your compiler options
2630         b. get an up-to-date compiler
2631         c. use a wrapper such as unproto" >&5
2632 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2633 You have the following choices:
2634         a. adjust your compiler options
2635         b. get an up-to-date compiler
2636         c. use a wrapper such as unproto" >&2;}
2637    { (exit 1); exit 1; }; }
2638 fi
2639
2640 case $cf_cv_system_name in
2641 os2*)
2642     CFLAGS="$CFLAGS -Zmt"
2643     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2644     CXXFLAGS="$CXXFLAGS -Zmt"
2645     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2646     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2647     ac_cv_exeext=.exe
2648     ;;
2649 esac
2650
2651 PROG_EXT="$EXEEXT"
2652
2653 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2654 #define PROG_EXT "$PROG_EXT"
2655 EOF
2656
2657 if test "$cross_compiling" = yes ; then
2658   LDCONFIG=:
2659 else
2660 case "$cf_cv_system_name" in #(vi
2661 freebsd*) #(vi
2662   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2663   ;;
2664 *) LDPATH=$PATH:/sbin:/usr/sbin
2665   # Extract the first word of "ldconfig", so it can be a program name with args.
2666 set dummy ldconfig; ac_word=$2
2667 echo "$as_me:2667: checking for $ac_word" >&5
2668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2669 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672   case $LDCONFIG in
2673   [\\/]* | ?:[\\/]*)
2674   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2675   ;;
2676   *)
2677   ac_save_IFS=$IFS; IFS=$ac_path_separator
2678 ac_dummy="$LDPATH"
2679 for ac_dir in $ac_dummy; do
2680   IFS=$ac_save_IFS
2681   test -z "$ac_dir" && ac_dir=.
2682   if $as_executable_p "$ac_dir/$ac_word"; then
2683    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2684    echo "$as_me:2684: found $ac_dir/$ac_word" >&5
2685    break
2686 fi
2687 done
2688
2689   ;;
2690 esac
2691 fi
2692 LDCONFIG=$ac_cv_path_LDCONFIG
2693
2694 if test -n "$LDCONFIG"; then
2695   echo "$as_me:2695: result: $LDCONFIG" >&5
2696 echo "${ECHO_T}$LDCONFIG" >&6
2697 else
2698   echo "$as_me:2698: result: no" >&5
2699 echo "${ECHO_T}no" >&6
2700 fi
2701
2702   ;;
2703 esac
2704 fi
2705
2706 echo "$as_me:2706: checking if you want to ensure bool is consistent with C++" >&5
2707 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2708
2709 # Check whether --with-cxx or --without-cxx was given.
2710 if test "${with_cxx+set}" = set; then
2711   withval="$with_cxx"
2712   cf_with_cxx=$withval
2713 else
2714   cf_with_cxx=yes
2715 fi;
2716 echo "$as_me:2716: result: $cf_with_cxx" >&5
2717 echo "${ECHO_T}$cf_with_cxx" >&6
2718 if test "X$cf_with_cxx" = Xno ; then
2719         CXX=""
2720         GXX=""
2721 else
2722         # with autoconf 2.13, we can change the error to a warning:
2723                 ac_ext=cc
2724 ac_cpp='$CXXCPP $CPPFLAGS'
2725 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2726 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2727 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2728 ac_main_return=return
2729 if test -n "$ac_tool_prefix"; then
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731   do
2732     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$CXX"; then
2740   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 CXX=$ac_cv_prog_CXX
2756 if test -n "$CXX"; then
2757   echo "$as_me:2757: result: $CXX" >&5
2758 echo "${ECHO_T}$CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764     test -n "$CXX" && break
2765   done
2766 fi
2767 if test -z "$CXX"; then
2768   ac_ct_CXX=$CXX
2769   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2770 do
2771   # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2776   echo $ECHO_N "(cached) $ECHO_C" >&6
2777 else
2778   if test -n "$ac_ct_CXX"; then
2779   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2780 else
2781   ac_save_IFS=$IFS; IFS=$ac_path_separator
2782 ac_dummy="$PATH"
2783 for ac_dir in $ac_dummy; do
2784   IFS=$ac_save_IFS
2785   test -z "$ac_dir" && ac_dir=.
2786   $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_ac_ct_CXX="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2789 break
2790 done
2791
2792 fi
2793 fi
2794 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2795 if test -n "$ac_ct_CXX"; then
2796   echo "$as_me:2796: result: $ac_ct_CXX" >&5
2797 echo "${ECHO_T}$ac_ct_CXX" >&6
2798 else
2799   echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2801 fi
2802
2803   test -n "$ac_ct_CXX" && break
2804 done
2805 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2806
2807   CXX=$ac_ct_CXX
2808 fi
2809
2810 # Provide some information about the compiler.
2811 echo "$as_me:2811:" \
2812      "checking for C++ compiler version" >&5
2813 ac_compiler=`set X $ac_compile; echo $2`
2814 { (eval echo "$as_me:2814: \"$ac_compiler --version </dev/null >&5\"") >&5
2815   (eval $ac_compiler --version </dev/null >&5) 2>&5
2816   ac_status=$?
2817   echo "$as_me:2817: \$? = $ac_status" >&5
2818   (exit $ac_status); }
2819 { (eval echo "$as_me:2819: \"$ac_compiler -v </dev/null >&5\"") >&5
2820   (eval $ac_compiler -v </dev/null >&5) 2>&5
2821   ac_status=$?
2822   echo "$as_me:2822: \$? = $ac_status" >&5
2823   (exit $ac_status); }
2824 { (eval echo "$as_me:2824: \"$ac_compiler -V </dev/null >&5\"") >&5
2825   (eval $ac_compiler -V </dev/null >&5) 2>&5
2826   ac_status=$?
2827   echo "$as_me:2827: \$? = $ac_status" >&5
2828   (exit $ac_status); }
2829
2830 echo "$as_me:2830: checking whether we are using the GNU C++ compiler" >&5
2831 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2832 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2833   echo $ECHO_N "(cached) $ECHO_C" >&6
2834 else
2835   cat >conftest.$ac_ext <<_ACEOF
2836 #line 2836 "configure"
2837 #include "confdefs.h"
2838
2839 int
2840 main ()
2841 {
2842 #ifndef __GNUC__
2843        choke me
2844 #endif
2845
2846   ;
2847   return 0;
2848 }
2849 _ACEOF
2850 rm -f conftest.$ac_objext
2851 if { (eval echo "$as_me:2851: \"$ac_compile\"") >&5
2852   (eval $ac_compile) 2>&5
2853   ac_status=$?
2854   echo "$as_me:2854: \$? = $ac_status" >&5
2855   (exit $ac_status); } &&
2856          { ac_try='test -s conftest.$ac_objext'
2857   { (eval echo "$as_me:2857: \"$ac_try\"") >&5
2858   (eval $ac_try) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }; }; then
2862   ac_compiler_gnu=yes
2863 else
2864   echo "$as_me: failed program was:" >&5
2865 cat conftest.$ac_ext >&5
2866 ac_compiler_gnu=no
2867 fi
2868 rm -f conftest.$ac_objext conftest.$ac_ext
2869 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2870
2871 fi
2872 echo "$as_me:2872: result: $ac_cv_cxx_compiler_gnu" >&5
2873 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2874 GXX=`test $ac_compiler_gnu = yes && echo yes`
2875 ac_test_CXXFLAGS=${CXXFLAGS+set}
2876 ac_save_CXXFLAGS=$CXXFLAGS
2877 CXXFLAGS="-g"
2878 echo "$as_me:2878: checking whether $CXX accepts -g" >&5
2879 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2880 if test "${ac_cv_prog_cxx_g+set}" = set; then
2881   echo $ECHO_N "(cached) $ECHO_C" >&6
2882 else
2883   cat >conftest.$ac_ext <<_ACEOF
2884 #line 2884 "configure"
2885 #include "confdefs.h"
2886
2887 int
2888 main ()
2889 {
2890
2891   ;
2892   return 0;
2893 }
2894 _ACEOF
2895 rm -f conftest.$ac_objext
2896 if { (eval echo "$as_me:2896: \"$ac_compile\"") >&5
2897   (eval $ac_compile) 2>&5
2898   ac_status=$?
2899   echo "$as_me:2899: \$? = $ac_status" >&5
2900   (exit $ac_status); } &&
2901          { ac_try='test -s conftest.$ac_objext'
2902   { (eval echo "$as_me:2902: \"$ac_try\"") >&5
2903   (eval $ac_try) 2>&5
2904   ac_status=$?
2905   echo "$as_me:2905: \$? = $ac_status" >&5
2906   (exit $ac_status); }; }; then
2907   ac_cv_prog_cxx_g=yes
2908 else
2909   echo "$as_me: failed program was:" >&5
2910 cat conftest.$ac_ext >&5
2911 ac_cv_prog_cxx_g=no
2912 fi
2913 rm -f conftest.$ac_objext conftest.$ac_ext
2914 fi
2915 echo "$as_me:2915: result: $ac_cv_prog_cxx_g" >&5
2916 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2917 if test "$ac_test_CXXFLAGS" = set; then
2918   CXXFLAGS=$ac_save_CXXFLAGS
2919 elif test $ac_cv_prog_cxx_g = yes; then
2920   if test "$GXX" = yes; then
2921     CXXFLAGS="-g -O2"
2922   else
2923     CXXFLAGS="-g"
2924   fi
2925 else
2926   if test "$GXX" = yes; then
2927     CXXFLAGS="-O2"
2928   else
2929     CXXFLAGS=
2930   fi
2931 fi
2932 for ac_declaration in \
2933    ''\
2934    '#include <stdlib.h>' \
2935    'extern "C" void std::exit (int) throw (); using std::exit;' \
2936    'extern "C" void std::exit (int); using std::exit;' \
2937    'extern "C" void exit (int) throw ();' \
2938    'extern "C" void exit (int);' \
2939    'void exit (int);'
2940 do
2941   cat >conftest.$ac_ext <<_ACEOF
2942 #line 2942 "configure"
2943 #include "confdefs.h"
2944 #include <stdlib.h>
2945 $ac_declaration
2946 int
2947 main ()
2948 {
2949 exit (42);
2950   ;
2951   return 0;
2952 }
2953 _ACEOF
2954 rm -f conftest.$ac_objext
2955 if { (eval echo "$as_me:2955: \"$ac_compile\"") >&5
2956   (eval $ac_compile) 2>&5
2957   ac_status=$?
2958   echo "$as_me:2958: \$? = $ac_status" >&5
2959   (exit $ac_status); } &&
2960          { ac_try='test -s conftest.$ac_objext'
2961   { (eval echo "$as_me:2961: \"$ac_try\"") >&5
2962   (eval $ac_try) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); }; }; then
2966   :
2967 else
2968   echo "$as_me: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
2970 continue
2971 fi
2972 rm -f conftest.$ac_objext conftest.$ac_ext
2973   cat >conftest.$ac_ext <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 $ac_declaration
2977 int
2978 main ()
2979 {
2980 exit (42);
2981   ;
2982   return 0;
2983 }
2984 _ACEOF
2985 rm -f conftest.$ac_objext
2986 if { (eval echo "$as_me:2986: \"$ac_compile\"") >&5
2987   (eval $ac_compile) 2>&5
2988   ac_status=$?
2989   echo "$as_me:2989: \$? = $ac_status" >&5
2990   (exit $ac_status); } &&
2991          { ac_try='test -s conftest.$ac_objext'
2992   { (eval echo "$as_me:2992: \"$ac_try\"") >&5
2993   (eval $ac_try) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); }; }; then
2997   break
2998 else
2999   echo "$as_me: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3001 fi
3002 rm -f conftest.$ac_objext conftest.$ac_ext
3003 done
3004 rm -f conftest*
3005 if test -n "$ac_declaration"; then
3006   echo '#ifdef __cplusplus' >>confdefs.h
3007   echo $ac_declaration      >>confdefs.h
3008   echo '#endif'             >>confdefs.h
3009 fi
3010
3011 ac_ext=c
3012 ac_cpp='$CPP $CPPFLAGS'
3013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3016 ac_main_return=return
3017
3018                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3019         if test "$CXX" = "g++" ; then
3020                 # Extract the first word of "g++", so it can be a program name with args.
3021 set dummy g++; ac_word=$2
3022 echo "$as_me:3022: checking for $ac_word" >&5
3023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3024 if test "${ac_cv_path_CXX+set}" = set; then
3025   echo $ECHO_N "(cached) $ECHO_C" >&6
3026 else
3027   case $CXX in
3028   [\\/]* | ?:[\\/]*)
3029   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3030   ;;
3031   *)
3032   ac_save_IFS=$IFS; IFS=$ac_path_separator
3033 ac_dummy="$PATH"
3034 for ac_dir in $ac_dummy; do
3035   IFS=$ac_save_IFS
3036   test -z "$ac_dir" && ac_dir=.
3037   if $as_executable_p "$ac_dir/$ac_word"; then
3038    ac_cv_path_CXX="$ac_dir/$ac_word"
3039    echo "$as_me:3039: found $ac_dir/$ac_word" >&5
3040    break
3041 fi
3042 done
3043
3044   ;;
3045 esac
3046 fi
3047 CXX=$ac_cv_path_CXX
3048
3049 if test -n "$CXX"; then
3050   echo "$as_me:3050: result: $CXX" >&5
3051 echo "${ECHO_T}$CXX" >&6
3052 else
3053   echo "$as_me:3053: result: no" >&5
3054 echo "${ECHO_T}no" >&6
3055 fi
3056
3057         fi
3058         if test "$CXX" = "g++" ; then
3059                 { echo "$as_me:3059: WARNING: ignoring hardcoded g++" >&5
3060 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3061                 cf_with_cxx=no; CXX=""; GXX="";
3062         fi
3063 fi
3064
3065 GXX_VERSION=none
3066 if test "$GXX" = yes; then
3067         echo "$as_me:3067: checking version of g++" >&5
3068 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3069         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3070         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3071         echo "$as_me:3071: result: $GXX_VERSION" >&5
3072 echo "${ECHO_T}$GXX_VERSION" >&6
3073 fi
3074
3075 case $GXX_VERSION in
3076 1*|2.[0-6]*)
3077         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3078         # cf_cxx_library=no
3079         { echo "$as_me:3079: WARNING: templates do not work" >&5
3080 echo "$as_me: WARNING: templates do not work" >&2;}
3081         ;;
3082 esac
3083
3084 echo "$as_me:3084: checking if you want to build C++ binding and demo" >&5
3085 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3086
3087 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3088 if test "${with_cxx_binding+set}" = set; then
3089   withval="$with_cxx_binding"
3090   cf_with_cxx_binding=$withval
3091 else
3092   cf_with_cxx_binding=$cf_with_cxx
3093 fi;
3094 echo "$as_me:3094: result: $cf_with_cxx_binding" >&5
3095 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3096
3097 echo "$as_me:3097: checking if you want to build with Ada95" >&5
3098 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3099
3100 # Check whether --with-ada or --without-ada was given.
3101 if test "${with_ada+set}" = set; then
3102   withval="$with_ada"
3103   cf_with_ada=$withval
3104 else
3105   cf_with_ada=yes
3106 fi;
3107 echo "$as_me:3107: result: $cf_with_ada" >&5
3108 echo "${ECHO_T}$cf_with_ada" >&6
3109
3110 echo "$as_me:3110: checking if you want to build programs such as tic" >&5
3111 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3112
3113 # Check whether --with-progs or --without-progs was given.
3114 if test "${with_progs+set}" = set; then
3115   withval="$with_progs"
3116   cf_with_progs=$withval
3117 else
3118   cf_with_progs=yes
3119 fi;
3120 echo "$as_me:3120: result: $cf_with_progs" >&5
3121 echo "${ECHO_T}$cf_with_progs" >&6
3122
3123 echo "$as_me:3123: checking if you wish to install curses.h" >&5
3124 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3125
3126 # Check whether --with-curses-h or --without-curses-h was given.
3127 if test "${with_curses_h+set}" = set; then
3128   withval="$with_curses_h"
3129   with_curses_h=$withval
3130 else
3131   with_curses_h=yes
3132 fi;
3133 echo "$as_me:3133: result: $with_curses_h" >&5
3134 echo "${ECHO_T}$with_curses_h" >&6
3135
3136 modules_to_build="ncurses"
3137 if test "X$cf_with_progs" != Xno ; then
3138 modules_to_build="$modules_to_build progs tack"
3139 fi
3140 modules_to_build="$modules_to_build panel menu form"
3141
3142 test "$program_prefix" != NONE &&
3143   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3144 # Use a double $ so make ignores it.
3145 test "$program_suffix" != NONE &&
3146   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3147 # Double any \ or $.  echo might interpret backslashes.
3148 # By default was `s,x,x', remove it if useless.
3149 cat <<\_ACEOF >conftest.sed
3150 s/[\\$]/&&/g;s/;s,x,x,$//
3151 _ACEOF
3152 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3153 rm conftest.sed
3154
3155 for ac_prog in mawk gawk nawk awk
3156 do
3157   # Extract the first word of "$ac_prog", so it can be a program name with args.
3158 set dummy $ac_prog; ac_word=$2
3159 echo "$as_me:3159: checking for $ac_word" >&5
3160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3161 if test "${ac_cv_prog_AWK+set}" = set; then
3162   echo $ECHO_N "(cached) $ECHO_C" >&6
3163 else
3164   if test -n "$AWK"; then
3165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3166 else
3167   ac_save_IFS=$IFS; IFS=$ac_path_separator
3168 ac_dummy="$PATH"
3169 for ac_dir in $ac_dummy; do
3170   IFS=$ac_save_IFS
3171   test -z "$ac_dir" && ac_dir=.
3172   $as_executable_p "$ac_dir/$ac_word" || continue
3173 ac_cv_prog_AWK="$ac_prog"
3174 echo "$as_me:3174: found $ac_dir/$ac_word" >&5
3175 break
3176 done
3177
3178 fi
3179 fi
3180 AWK=$ac_cv_prog_AWK
3181 if test -n "$AWK"; then
3182   echo "$as_me:3182: result: $AWK" >&5
3183 echo "${ECHO_T}$AWK" >&6
3184 else
3185   echo "$as_me:3185: result: no" >&5
3186 echo "${ECHO_T}no" >&6
3187 fi
3188
3189   test -n "$AWK" && break
3190 done
3191
3192 test -z "$AWK" && { { echo "$as_me:3192: error: No awk program found" >&5
3193 echo "$as_me: error: No awk program found" >&2;}
3194    { (exit 1); exit 1; }; }
3195
3196 echo "$as_me:3196: checking for egrep" >&5
3197 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3198 if test "${ac_cv_prog_egrep+set}" = set; then
3199   echo $ECHO_N "(cached) $ECHO_C" >&6
3200 else
3201   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3202     then ac_cv_prog_egrep='grep -E'
3203     else ac_cv_prog_egrep='egrep'
3204     fi
3205 fi
3206 echo "$as_me:3206: result: $ac_cv_prog_egrep" >&5
3207 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3208  EGREP=$ac_cv_prog_egrep
3209
3210 test -z "$EGREP" && { { echo "$as_me:3210: error: No egrep program found" >&5
3211 echo "$as_me: error: No egrep program found" >&2;}
3212    { (exit 1); exit 1; }; }
3213
3214 # Find a good install program.  We prefer a C program (faster),
3215 # so one script is as good as another.  But avoid the broken or
3216 # incompatible versions:
3217 # SysV /etc/install, /usr/sbin/install
3218 # SunOS /usr/etc/install
3219 # IRIX /sbin/install
3220 # AIX /bin/install
3221 # AmigaOS /C/install, which installs bootblocks on floppy discs
3222 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3223 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3224 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3225 # ./install, which can be erroneously created by make from ./install.sh.
3226 echo "$as_me:3226: checking for a BSD compatible install" >&5
3227 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3228 if test -z "$INSTALL"; then
3229 if test "${ac_cv_path_install+set}" = set; then
3230   echo $ECHO_N "(cached) $ECHO_C" >&6
3231 else
3232     ac_save_IFS=$IFS; IFS=$ac_path_separator
3233   for ac_dir in $PATH; do
3234     IFS=$ac_save_IFS
3235     # Account for people who put trailing slashes in PATH elements.
3236     case $ac_dir/ in
3237     / | ./ | .// | /cC/* \
3238     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3239     | /usr/ucb/* ) ;;
3240     *)
3241       # OSF1 and SCO ODT 3.0 have their own names for install.
3242       # Don't use installbsd from OSF since it installs stuff as root
3243       # by default.
3244       for ac_prog in ginstall scoinst install; do
3245         if $as_executable_p "$ac_dir/$ac_prog"; then
3246           if test $ac_prog = install &&
3247             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3248             # AIX install.  It has an incompatible calling convention.
3249             :
3250           elif test $ac_prog = install &&
3251             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3252             # program-specific install script used by HP pwplus--don't use.
3253             :
3254           else
3255             ac_cv_path_install="$ac_dir/$ac_prog -c"
3256             break 2
3257           fi
3258         fi
3259       done
3260       ;;
3261     esac
3262   done
3263
3264 fi
3265   if test "${ac_cv_path_install+set}" = set; then
3266     INSTALL=$ac_cv_path_install
3267   else
3268     # As a last resort, use the slow shell script.  We don't cache a
3269     # path for INSTALL within a source directory, because that will
3270     # break other packages using the cache if that directory is
3271     # removed, or if the path is relative.
3272     INSTALL=$ac_install_sh
3273   fi
3274 fi
3275 echo "$as_me:3275: result: $INSTALL" >&5
3276 echo "${ECHO_T}$INSTALL" >&6
3277
3278 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3279 # It thinks the first close brace ends the variable substitution.
3280 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3281
3282 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3283
3284 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3285
3286 case $INSTALL in
3287 /*)
3288   ;;
3289 *)
3290   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3291   test -z "$cf_dir" && cf_dir=.
3292   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3293   ;;
3294 esac
3295
3296 for ac_prog in tdlint lint alint
3297 do
3298   # Extract the first word of "$ac_prog", so it can be a program name with args.
3299 set dummy $ac_prog; ac_word=$2
3300 echo "$as_me:3300: checking for $ac_word" >&5
3301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3302 if test "${ac_cv_prog_LINT+set}" = set; then
3303   echo $ECHO_N "(cached) $ECHO_C" >&6
3304 else
3305   if test -n "$LINT"; then
3306   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3307 else
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   $as_executable_p "$ac_dir/$ac_word" || continue
3314 ac_cv_prog_LINT="$ac_prog"
3315 echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316 break
3317 done
3318
3319 fi
3320 fi
3321 LINT=$ac_cv_prog_LINT
3322 if test -n "$LINT"; then
3323   echo "$as_me:3323: result: $LINT" >&5
3324 echo "${ECHO_T}$LINT" >&6
3325 else
3326   echo "$as_me:3326: result: no" >&5
3327 echo "${ECHO_T}no" >&6
3328 fi
3329
3330   test -n "$LINT" && break
3331 done
3332
3333 echo "$as_me:3333: checking whether ln -s works" >&5
3334 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3335 LN_S=$as_ln_s
3336 if test "$LN_S" = "ln -s"; then
3337   echo "$as_me:3337: result: yes" >&5
3338 echo "${ECHO_T}yes" >&6
3339 else
3340   echo "$as_me:3340: result: no, using $LN_S" >&5
3341 echo "${ECHO_T}no, using $LN_S" >&6
3342 fi
3343
3344 echo "$as_me:3344: checking whether ${MAKE-make} sets \${MAKE}" >&5
3345 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3346 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3347 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3348   echo $ECHO_N "(cached) $ECHO_C" >&6
3349 else
3350   cat >conftest.make <<\EOF
3351 all:
3352         @echo 'ac_maketemp="${MAKE}"'
3353 EOF
3354 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3355 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3356 if test -n "$ac_maketemp"; then
3357   eval ac_cv_prog_make_${ac_make}_set=yes
3358 else
3359   eval ac_cv_prog_make_${ac_make}_set=no
3360 fi
3361 rm -f conftest.make
3362 fi
3363 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3364   echo "$as_me:3364: result: yes" >&5
3365 echo "${ECHO_T}yes" >&6
3366   SET_MAKE=
3367 else
3368   echo "$as_me:3368: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370   SET_MAKE="MAKE=${MAKE-make}"
3371 fi
3372
3373 echo "$as_me:3373: checking if filesystem supports mixed-case filenames" >&5
3374 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3375 if test "${cf_cv_mixedcase+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378
3379 if test "$cross_compiling" = yes ; then
3380         case $target_alias in #(vi
3381         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3382                 cf_cv_mixedcase=no
3383                 ;;
3384         *)
3385                 cf_cv_mixedcase=yes
3386                 ;;
3387         esac
3388 else
3389         rm -f conftest CONFTEST
3390         echo test >conftest
3391         if test -f CONFTEST ; then
3392                 cf_cv_mixedcase=no
3393         else
3394                 cf_cv_mixedcase=yes
3395         fi
3396         rm -f conftest CONFTEST
3397 fi
3398
3399 fi
3400 echo "$as_me:3400: result: $cf_cv_mixedcase" >&5
3401 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3402 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3403 #define MIXEDCASE_FILENAMES 1
3404 EOF
3405
3406 # Extract the first word of "ctags", so it can be a program name with args.
3407 set dummy ctags; ac_word=$2
3408 echo "$as_me:3408: checking for $ac_word" >&5
3409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3410 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3411   echo $ECHO_N "(cached) $ECHO_C" >&6
3412 else
3413   if test -n "$MAKE_LOWER_TAGS"; then
3414   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3415 else
3416   ac_save_IFS=$IFS; IFS=$ac_path_separator
3417 ac_dummy="$PATH"
3418 for ac_dir in $ac_dummy; do
3419   IFS=$ac_save_IFS
3420   test -z "$ac_dir" && ac_dir=.
3421   $as_executable_p "$ac_dir/$ac_word" || continue
3422 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3423 echo "$as_me:3423: found $ac_dir/$ac_word" >&5
3424 break
3425 done
3426
3427   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3428 fi
3429 fi
3430 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3431 if test -n "$MAKE_LOWER_TAGS"; then
3432   echo "$as_me:3432: result: $MAKE_LOWER_TAGS" >&5
3433 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3434 else
3435   echo "$as_me:3435: result: no" >&5
3436 echo "${ECHO_T}no" >&6
3437 fi
3438
3439 if test "$cf_cv_mixedcase" = yes ; then
3440         # Extract the first word of "etags", so it can be a program name with args.
3441 set dummy etags; ac_word=$2
3442 echo "$as_me:3442: checking for $ac_word" >&5
3443 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3444 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3445   echo $ECHO_N "(cached) $ECHO_C" >&6
3446 else
3447   if test -n "$MAKE_UPPER_TAGS"; then
3448   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3449 else
3450   ac_save_IFS=$IFS; IFS=$ac_path_separator
3451 ac_dummy="$PATH"
3452 for ac_dir in $ac_dummy; do
3453   IFS=$ac_save_IFS
3454   test -z "$ac_dir" && ac_dir=.
3455   $as_executable_p "$ac_dir/$ac_word" || continue
3456 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3457 echo "$as_me:3457: found $ac_dir/$ac_word" >&5
3458 break
3459 done
3460
3461   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3462 fi
3463 fi
3464 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3465 if test -n "$MAKE_UPPER_TAGS"; then
3466   echo "$as_me:3466: result: $MAKE_UPPER_TAGS" >&5
3467 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3468 else
3469   echo "$as_me:3469: result: no" >&5
3470 echo "${ECHO_T}no" >&6
3471 fi
3472
3473 else
3474         MAKE_UPPER_TAGS=no
3475 fi
3476
3477 if test "$MAKE_UPPER_TAGS" = yes ; then
3478         MAKE_UPPER_TAGS=
3479 else
3480         MAKE_UPPER_TAGS="#"
3481 fi
3482
3483 if test "$MAKE_LOWER_TAGS" = yes ; then
3484         MAKE_LOWER_TAGS=
3485 else
3486         MAKE_LOWER_TAGS="#"
3487 fi
3488
3489 echo "$as_me:3489: checking for makeflags variable" >&5
3490 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3491 if test "${cf_cv_makeflags+set}" = set; then
3492   echo $ECHO_N "(cached) $ECHO_C" >&6
3493 else
3494
3495         cf_cv_makeflags=''
3496         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3497         do
3498                 cat >cf_makeflags.tmp <<CF_EOF
3499 SHELL = /bin/sh
3500 all :
3501         @ echo '.$cf_option'
3502 CF_EOF
3503                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3504                 case "$cf_result" in
3505                 .*k)
3506                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3507                         case "$cf_result" in
3508                         .*CC=*) cf_cv_makeflags=
3509                                 ;;
3510                         *)      cf_cv_makeflags=$cf_option
3511                                 ;;
3512                         esac
3513                         break
3514                         ;;
3515                 .-)     ;;
3516                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3517                         ;;
3518                 esac
3519         done
3520         rm -f cf_makeflags.tmp
3521
3522 fi
3523 echo "$as_me:3523: result: $cf_cv_makeflags" >&5
3524 echo "${ECHO_T}$cf_cv_makeflags" >&6
3525
3526 echo "$as_me:3526: checking for long file names" >&5
3527 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3528 if test "${ac_cv_sys_long_file_names+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   ac_cv_sys_long_file_names=yes
3532 # Test for long file names in all the places we know might matter:
3533 #      .                the current directory, where building will happen
3534 #      $prefix/lib      where we will be installing things
3535 #      $exec_prefix/lib likewise
3536 # eval it to expand exec_prefix.
3537 #      $TMPDIR          if set, where it might want to write temporary files
3538 # if $TMPDIR is not set:
3539 #      /tmp             where it might want to write temporary files
3540 #      /var/tmp         likewise
3541 #      /usr/tmp         likewise
3542 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3543   ac_tmpdirs=$TMPDIR
3544 else
3545   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3546 fi
3547 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3548   test -d $ac_dir || continue
3549   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3550   ac_xdir=$ac_dir/cf$$
3551   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3552   ac_tf1=$ac_xdir/conftest9012345
3553   ac_tf2=$ac_xdir/conftest9012346
3554   (echo 1 >$ac_tf1) 2>/dev/null
3555   (echo 2 >$ac_tf2) 2>/dev/null
3556   ac_val=`cat $ac_tf1 2>/dev/null`
3557   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3558     ac_cv_sys_long_file_names=no
3559     rm -rf $ac_xdir 2>/dev/null
3560     break
3561   fi
3562   rm -rf $ac_xdir 2>/dev/null
3563 done
3564 fi
3565 echo "$as_me:3565: result: $ac_cv_sys_long_file_names" >&5
3566 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3567 if test $ac_cv_sys_long_file_names = yes; then
3568
3569 cat >>confdefs.h <<\EOF
3570 #define HAVE_LONG_FILE_NAMES 1
3571 EOF
3572
3573 fi
3574
3575 echo "$as_me:3575: checking if filesystem supports mixed-case filenames" >&5
3576 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3577 if test "${cf_cv_mixedcase+set}" = set; then
3578   echo $ECHO_N "(cached) $ECHO_C" >&6
3579 else
3580
3581 if test "$cross_compiling" = yes ; then
3582         case $target_alias in #(vi
3583         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3584                 cf_cv_mixedcase=no
3585                 ;;
3586         *)
3587                 cf_cv_mixedcase=yes
3588                 ;;
3589         esac
3590 else
3591         rm -f conftest CONFTEST
3592         echo test >conftest
3593         if test -f CONFTEST ; then
3594                 cf_cv_mixedcase=no
3595         else
3596                 cf_cv_mixedcase=yes
3597         fi
3598         rm -f conftest CONFTEST
3599 fi
3600
3601 fi
3602 echo "$as_me:3602: result: $cf_cv_mixedcase" >&5
3603 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3604 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3605 #define MIXEDCASE_FILENAMES 1
3606 EOF
3607
3608 if test -n "$ac_tool_prefix"; then
3609   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3610 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3611 echo "$as_me:3611: checking for $ac_word" >&5
3612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3613 if test "${ac_cv_prog_RANLIB+set}" = set; then
3614   echo $ECHO_N "(cached) $ECHO_C" >&6
3615 else
3616   if test -n "$RANLIB"; then
3617   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3618 else
3619   ac_save_IFS=$IFS; IFS=$ac_path_separator
3620 ac_dummy="$PATH"
3621 for ac_dir in $ac_dummy; do
3622   IFS=$ac_save_IFS
3623   test -z "$ac_dir" && ac_dir=.
3624   $as_executable_p "$ac_dir/$ac_word" || continue
3625 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3626 echo "$as_me:3626: found $ac_dir/$ac_word" >&5
3627 break
3628 done
3629
3630 fi
3631 fi
3632 RANLIB=$ac_cv_prog_RANLIB
3633 if test -n "$RANLIB"; then
3634   echo "$as_me:3634: result: $RANLIB" >&5
3635 echo "${ECHO_T}$RANLIB" >&6
3636 else
3637   echo "$as_me:3637: result: no" >&5
3638 echo "${ECHO_T}no" >&6
3639 fi
3640
3641 fi
3642 if test -z "$ac_cv_prog_RANLIB"; then
3643   ac_ct_RANLIB=$RANLIB
3644   # Extract the first word of "ranlib", so it can be a program name with args.
3645 set dummy ranlib; ac_word=$2
3646 echo "$as_me:3646: checking for $ac_word" >&5
3647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3648 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3649   echo $ECHO_N "(cached) $ECHO_C" >&6
3650 else
3651   if test -n "$ac_ct_RANLIB"; then
3652   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3653 else
3654   ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657   IFS=$ac_save_IFS
3658   test -z "$ac_dir" && ac_dir=.
3659   $as_executable_p "$ac_dir/$ac_word" || continue
3660 ac_cv_prog_ac_ct_RANLIB="ranlib"
3661 echo "$as_me:3661: found $ac_dir/$ac_word" >&5
3662 break
3663 done
3664
3665   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3666 fi
3667 fi
3668 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3669 if test -n "$ac_ct_RANLIB"; then
3670   echo "$as_me:3670: result: $ac_ct_RANLIB" >&5
3671 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3672 else
3673   echo "$as_me:3673: result: no" >&5
3674 echo "${ECHO_T}no" >&6
3675 fi
3676
3677   RANLIB=$ac_ct_RANLIB
3678 else
3679   RANLIB="$ac_cv_prog_RANLIB"
3680 fi
3681
3682 if test -n "$ac_tool_prefix"; then
3683   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3684 set dummy ${ac_tool_prefix}ld; ac_word=$2
3685 echo "$as_me:3685: checking for $ac_word" >&5
3686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3687 if test "${ac_cv_prog_LD+set}" = set; then
3688   echo $ECHO_N "(cached) $ECHO_C" >&6
3689 else
3690   if test -n "$LD"; then
3691   ac_cv_prog_LD="$LD" # Let the user override the test.
3692 else
3693   ac_save_IFS=$IFS; IFS=$ac_path_separator
3694 ac_dummy="$PATH"
3695 for ac_dir in $ac_dummy; do
3696   IFS=$ac_save_IFS
3697   test -z "$ac_dir" && ac_dir=.
3698   $as_executable_p "$ac_dir/$ac_word" || continue
3699 ac_cv_prog_LD="${ac_tool_prefix}ld"
3700 echo "$as_me:3700: found $ac_dir/$ac_word" >&5
3701 break
3702 done
3703
3704 fi
3705 fi
3706 LD=$ac_cv_prog_LD
3707 if test -n "$LD"; then
3708   echo "$as_me:3708: result: $LD" >&5
3709 echo "${ECHO_T}$LD" >&6
3710 else
3711   echo "$as_me:3711: result: no" >&5
3712 echo "${ECHO_T}no" >&6
3713 fi
3714
3715 fi
3716 if test -z "$ac_cv_prog_LD"; then
3717   ac_ct_LD=$LD
3718   # Extract the first word of "ld", so it can be a program name with args.
3719 set dummy ld; ac_word=$2
3720 echo "$as_me:3720: checking for $ac_word" >&5
3721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3722 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3723   echo $ECHO_N "(cached) $ECHO_C" >&6
3724 else
3725   if test -n "$ac_ct_LD"; then
3726   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3727 else
3728   ac_save_IFS=$IFS; IFS=$ac_path_separator
3729 ac_dummy="$PATH"
3730 for ac_dir in $ac_dummy; do
3731   IFS=$ac_save_IFS
3732   test -z "$ac_dir" && ac_dir=.
3733   $as_executable_p "$ac_dir/$ac_word" || continue
3734 ac_cv_prog_ac_ct_LD="ld"
3735 echo "$as_me:3735: found $ac_dir/$ac_word" >&5
3736 break
3737 done
3738
3739   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3740 fi
3741 fi
3742 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3743 if test -n "$ac_ct_LD"; then
3744   echo "$as_me:3744: result: $ac_ct_LD" >&5
3745 echo "${ECHO_T}$ac_ct_LD" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751   LD=$ac_ct_LD
3752 else
3753   LD="$ac_cv_prog_LD"
3754 fi
3755
3756 if test -n "$ac_tool_prefix"; then
3757   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3758 set dummy ${ac_tool_prefix}ar; ac_word=$2
3759 echo "$as_me:3759: checking for $ac_word" >&5
3760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3761 if test "${ac_cv_prog_AR+set}" = set; then
3762   echo $ECHO_N "(cached) $ECHO_C" >&6
3763 else
3764   if test -n "$AR"; then
3765   ac_cv_prog_AR="$AR" # Let the user override the test.
3766 else
3767   ac_save_IFS=$IFS; IFS=$ac_path_separator
3768 ac_dummy="$PATH"
3769 for ac_dir in $ac_dummy; do
3770   IFS=$ac_save_IFS
3771   test -z "$ac_dir" && ac_dir=.
3772   $as_executable_p "$ac_dir/$ac_word" || continue
3773 ac_cv_prog_AR="${ac_tool_prefix}ar"
3774 echo "$as_me:3774: found $ac_dir/$ac_word" >&5
3775 break
3776 done
3777
3778 fi
3779 fi
3780 AR=$ac_cv_prog_AR
3781 if test -n "$AR"; then
3782   echo "$as_me:3782: result: $AR" >&5
3783 echo "${ECHO_T}$AR" >&6
3784 else
3785   echo "$as_me:3785: result: no" >&5
3786 echo "${ECHO_T}no" >&6
3787 fi
3788
3789 fi
3790 if test -z "$ac_cv_prog_AR"; then
3791   ac_ct_AR=$AR
3792   # Extract the first word of "ar", so it can be a program name with args.
3793 set dummy ar; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   if test -n "$ac_ct_AR"; then
3800   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3801 else
3802   ac_save_IFS=$IFS; IFS=$ac_path_separator
3803 ac_dummy="$PATH"
3804 for ac_dir in $ac_dummy; do
3805   IFS=$ac_save_IFS
3806   test -z "$ac_dir" && ac_dir=.
3807   $as_executable_p "$ac_dir/$ac_word" || continue
3808 ac_cv_prog_ac_ct_AR="ar"
3809 echo "$as_me:3809: found $ac_dir/$ac_word" >&5
3810 break
3811 done
3812
3813   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3814 fi
3815 fi
3816 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3817 if test -n "$ac_ct_AR"; then
3818   echo "$as_me:3818: result: $ac_ct_AR" >&5
3819 echo "${ECHO_T}$ac_ct_AR" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825   AR=$ac_ct_AR
3826 else
3827   AR="$ac_cv_prog_AR"
3828 fi
3829
3830 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833
3834 echo "$as_me:3834: checking for archiver options (symbol AR_OPTS)" >&5
3835 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3836
3837 if test -z "$AR_OPTS" ; then
3838         AR_OPTS=rv
3839
3840 fi
3841
3842 cf_cv_subst_AR_OPTS=$AR_OPTS
3843 echo "$as_me:3843: result: $AR_OPTS" >&5
3844 echo "${ECHO_T}$AR_OPTS" >&6
3845
3846 fi
3847
3848 echo "$as_me:3848: checking if you have specified an install-prefix" >&5
3849 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3850
3851 # Check whether --with-install-prefix or --without-install-prefix was given.
3852 if test "${with_install_prefix+set}" = set; then
3853   withval="$with_install_prefix"
3854   case "$withval" in #(vi
3855         yes|no) #(vi
3856                 ;;
3857         *)      DESTDIR="$withval"
3858                 ;;
3859         esac
3860 fi;
3861 echo "$as_me:3861: result: $DESTDIR" >&5
3862 echo "${ECHO_T}$DESTDIR" >&6
3863
3864 ###############################################################################
3865
3866 # If we're cross-compiling, allow the user to override the tools and their
3867 # options.  The configure script is oriented toward identifying the host
3868 # compiler, etc., but we need a build compiler to generate parts of the source.
3869
3870 if test "$cross_compiling" = yes ; then
3871
3872         # defaults that we might want to override
3873         : ${BUILD_CFLAGS:=''}
3874         : ${BUILD_CPPFLAGS:=''}
3875         : ${BUILD_LDFLAGS:=''}
3876         : ${BUILD_LIBS:=''}
3877         : ${BUILD_EXEEXT:='$x'}
3878         : ${BUILD_OBJEXT:='o'}
3879
3880 # Check whether --with-build-cc or --without-build-cc was given.
3881 if test "${with_build_cc+set}" = set; then
3882   withval="$with_build_cc"
3883   BUILD_CC="$withval"
3884 else
3885   for ac_prog in gcc cc cl
3886 do
3887   # Extract the first word of "$ac_prog", so it can be a program name with args.
3888 set dummy $ac_prog; ac_word=$2
3889 echo "$as_me:3889: checking for $ac_word" >&5
3890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3891 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3892   echo $ECHO_N "(cached) $ECHO_C" >&6
3893 else
3894   if test -n "$BUILD_CC"; then
3895   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3896 else
3897   ac_save_IFS=$IFS; IFS=$ac_path_separator
3898 ac_dummy="$PATH"
3899 for ac_dir in $ac_dummy; do
3900   IFS=$ac_save_IFS
3901   test -z "$ac_dir" && ac_dir=.
3902   $as_executable_p "$ac_dir/$ac_word" || continue
3903 ac_cv_prog_BUILD_CC="$ac_prog"
3904 echo "$as_me:3904: found $ac_dir/$ac_word" >&5
3905 break
3906 done
3907
3908 fi
3909 fi
3910 BUILD_CC=$ac_cv_prog_BUILD_CC
3911 if test -n "$BUILD_CC"; then
3912   echo "$as_me:3912: result: $BUILD_CC" >&5
3913 echo "${ECHO_T}$BUILD_CC" >&6
3914 else
3915   echo "$as_me:3915: result: no" >&5
3916 echo "${ECHO_T}no" >&6
3917 fi
3918
3919   test -n "$BUILD_CC" && break
3920 done
3921
3922 fi;
3923         echo "$as_me:3923: checking for native build C compiler" >&5
3924 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3925         echo "$as_me:3925: result: $BUILD_CC" >&5
3926 echo "${ECHO_T}$BUILD_CC" >&6
3927
3928         echo "$as_me:3928: checking for native build C preprocessor" >&5
3929 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3930
3931 # Check whether --with-build-cpp or --without-build-cpp was given.
3932 if test "${with_build_cpp+set}" = set; then
3933   withval="$with_build_cpp"
3934   BUILD_CPP="$withval"
3935 else
3936   BUILD_CPP='${BUILD_CC} -E'
3937 fi;
3938         echo "$as_me:3938: result: $BUILD_CPP" >&5
3939 echo "${ECHO_T}$BUILD_CPP" >&6
3940
3941         echo "$as_me:3941: checking for native build C flags" >&5
3942 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3943
3944 # Check whether --with-build-cflags or --without-build-cflags was given.
3945 if test "${with_build_cflags+set}" = set; then
3946   withval="$with_build_cflags"
3947   BUILD_CFLAGS="$withval"
3948 fi;
3949         echo "$as_me:3949: result: $BUILD_CFLAGS" >&5
3950 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3951
3952         echo "$as_me:3952: checking for native build C preprocessor-flags" >&5
3953 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3954
3955 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3956 if test "${with_build_cppflags+set}" = set; then
3957   withval="$with_build_cppflags"
3958   BUILD_CPPFLAGS="$withval"
3959 fi;
3960         echo "$as_me:3960: result: $BUILD_CPPFLAGS" >&5
3961 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3962
3963         echo "$as_me:3963: checking for native build linker-flags" >&5
3964 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3965
3966 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3967 if test "${with_build_ldflags+set}" = set; then
3968   withval="$with_build_ldflags"
3969   BUILD_LDFLAGS="$withval"
3970 fi;
3971         echo "$as_me:3971: result: $BUILD_LDFLAGS" >&5
3972 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3973
3974         echo "$as_me:3974: checking for native build linker-libraries" >&5
3975 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3976
3977 # Check whether --with-build-libs or --without-build-libs was given.
3978 if test "${with_build_libs+set}" = set; then
3979   withval="$with_build_libs"
3980   BUILD_LIBS="$withval"
3981 fi;
3982         echo "$as_me:3982: result: $BUILD_LIBS" >&5
3983 echo "${ECHO_T}$BUILD_LIBS" >&6
3984
3985         # this assumes we're on Unix.
3986         BUILD_EXEEXT=
3987         BUILD_OBJEXT=o
3988
3989         : ${BUILD_CC:='${CC}'}
3990
3991         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3992                 { { echo "$as_me:3992: error: Cross-build requires two compilers.
3993 Use --with-build-cc to specify the native compiler." >&5
3994 echo "$as_me: error: Cross-build requires two compilers.
3995 Use --with-build-cc to specify the native compiler." >&2;}
3996    { (exit 1); exit 1; }; }
3997         fi
3998
3999 else
4000         : ${BUILD_CC:='${CC}'}
4001         : ${BUILD_CPP:='${CPP}'}
4002         : ${BUILD_CFLAGS:='${CFLAGS}'}
4003         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4004         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4005         : ${BUILD_LIBS:='${LIBS}'}
4006         : ${BUILD_EXEEXT:='$x'}
4007         : ${BUILD_OBJEXT:='o'}
4008 fi
4009
4010 ###############################################################################
4011
4012 ### Options to allow the user to specify the set of libraries which are used.
4013 ### Use "--without-normal --with-shared" to allow the default model to be
4014 ### shared, for example.
4015 cf_list_models=""
4016
4017 LIBTOOL=
4018
4019 # common library maintenance symbols that are convenient for libtool scripts:
4020 LIB_CREATE='${AR} -cr'
4021 LIB_OBJECT='${OBJECTS}'
4022 LIB_SUFFIX=.a
4023 LIB_PREP="$RANLIB"
4024
4025 # symbols used to prop libtool up to enable it to determine what it should be
4026 # doing:
4027 LIB_CLEAN=
4028 LIB_COMPILE=
4029 LIB_LINK='${CC}'
4030 LIB_INSTALL=
4031 LIB_UNINSTALL=
4032
4033 echo "$as_me:4033: checking if you want to build libraries with libtool" >&5
4034 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4035
4036 # Check whether --with-libtool or --without-libtool was given.
4037 if test "${with_libtool+set}" = set; then
4038   withval="$with_libtool"
4039   with_libtool=$withval
4040 else
4041   with_libtool=no
4042 fi;
4043 echo "$as_me:4043: result: $with_libtool" >&5
4044 echo "${ECHO_T}$with_libtool" >&6
4045 if test "$with_libtool" != "no"; then
4046
4047         if test "$with_libtool" != "yes" ; then
4048
4049 if test "x$prefix" != xNONE; then
4050   cf_path_syntax="$prefix"
4051 else
4052   cf_path_syntax="$ac_default_prefix"
4053 fi
4054
4055 case ".$with_libtool" in #(vi
4056 .\$\(*\)*|.\'*\'*) #(vi
4057   ;;
4058 ..|./*|.\\*) #(vi
4059   ;;
4060 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4061   ;;
4062 .\${*prefix}*) #(vi
4063   eval with_libtool="$with_libtool"
4064   case ".$with_libtool" in #(vi
4065   .NONE/*)
4066     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4067     ;;
4068   esac
4069   ;; #(vi
4070 .no|.NONE/*)
4071   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4072   ;;
4073 *)
4074   { { echo "$as_me:4074: error: expected a pathname, not \"$with_libtool\"" >&5
4075 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4076    { (exit 1); exit 1; }; }
4077   ;;
4078 esac
4079
4080                 LIBTOOL=$with_libtool
4081         else
4082                 # Extract the first word of "libtool", so it can be a program name with args.
4083 set dummy libtool; ac_word=$2
4084 echo "$as_me:4084: checking for $ac_word" >&5
4085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4086 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4087   echo $ECHO_N "(cached) $ECHO_C" >&6
4088 else
4089   case $LIBTOOL in
4090   [\\/]* | ?:[\\/]*)
4091   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4092   ;;
4093   *)
4094   ac_save_IFS=$IFS; IFS=$ac_path_separator
4095 ac_dummy="$PATH"
4096 for ac_dir in $ac_dummy; do
4097   IFS=$ac_save_IFS
4098   test -z "$ac_dir" && ac_dir=.
4099   if $as_executable_p "$ac_dir/$ac_word"; then
4100    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4101    echo "$as_me:4101: found $ac_dir/$ac_word" >&5
4102    break
4103 fi
4104 done
4105
4106   ;;
4107 esac
4108 fi
4109 LIBTOOL=$ac_cv_path_LIBTOOL
4110
4111 if test -n "$LIBTOOL"; then
4112   echo "$as_me:4112: result: $LIBTOOL" >&5
4113 echo "${ECHO_T}$LIBTOOL" >&6
4114 else
4115   echo "$as_me:4115: result: no" >&5
4116 echo "${ECHO_T}no" >&6
4117 fi
4118
4119         fi
4120         if test -z "$LIBTOOL" ; then
4121                 { { echo "$as_me:4121: error: Cannot find libtool" >&5
4122 echo "$as_me: error: Cannot find libtool" >&2;}
4123    { (exit 1); exit 1; }; }
4124         fi
4125         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4126         LIB_OBJECT='${OBJECTS:.o=.lo}'
4127         LIB_SUFFIX=.la
4128         LIB_CLEAN='${LIBTOOL} --mode=clean'
4129         LIB_COMPILE='${LIBTOOL} --mode=compile'
4130         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4131         LIB_INSTALL='${LIBTOOL} --mode=install'
4132         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4133         LIB_PREP=:
4134
4135         # Show the version of libtool
4136         echo "$as_me:4136: checking version of libtool" >&5
4137 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4138
4139         # Save the version in a cache variable - this is not entirely a good
4140         # thing, but the version string from libtool is very ugly, and for
4141         # bug reports it might be useful to have the original string.
4142         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4143         echo "$as_me:4143: result: $cf_cv_libtool_version" >&5
4144 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4145         if test -z "$cf_cv_libtool_version" ; then
4146                 { { echo "$as_me:4146: error: This is not GNU libtool" >&5
4147 echo "$as_me: error: This is not GNU libtool" >&2;}
4148    { (exit 1); exit 1; }; }
4149         fi
4150
4151         # special hack to add --tag option for C++ compiler
4152         case $cf_cv_libtool_version in
4153         1.[5-9]*|[2-9]*)
4154                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4155                 ;;
4156         *)
4157                 LIBTOOL_CXX="$LIBTOOL"
4158                 ;;
4159         esac
4160 else
4161         LIBTOOL=""
4162         LIBTOOL_CXX=""
4163 fi
4164
4165 test -z "$LIBTOOL" && ECHO_LT=
4166
4167 if test "$with_libtool" != "no" ; then
4168
4169 cf_list_models="$cf_list_models libtool"
4170
4171 else
4172
4173 echo "$as_me:4173: checking if you want to build shared libraries" >&5
4174 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4175
4176 # Check whether --with-shared or --without-shared was given.
4177 if test "${with_shared+set}" = set; then
4178   withval="$with_shared"
4179   with_shared=$withval
4180 else
4181   with_shared=no
4182 fi;
4183 echo "$as_me:4183: result: $with_shared" >&5
4184 echo "${ECHO_T}$with_shared" >&6
4185 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4186
4187 echo "$as_me:4187: checking if you want to build static libraries" >&5
4188 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4189
4190 # Check whether --with-normal or --without-normal was given.
4191 if test "${with_normal+set}" = set; then
4192   withval="$with_normal"
4193   with_normal=$withval
4194 else
4195   with_normal=yes
4196 fi;
4197 echo "$as_me:4197: result: $with_normal" >&5
4198 echo "${ECHO_T}$with_normal" >&6
4199 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4200
4201 echo "$as_me:4201: checking if you want to build debug libraries" >&5
4202 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4203
4204 # Check whether --with-debug or --without-debug was given.
4205 if test "${with_debug+set}" = set; then
4206   withval="$with_debug"
4207   with_debug=$withval
4208 else
4209   with_debug=yes
4210 fi;
4211 echo "$as_me:4211: result: $with_debug" >&5
4212 echo "${ECHO_T}$with_debug" >&6
4213 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4214
4215 echo "$as_me:4215: checking if you want to build profiling libraries" >&5
4216 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4217
4218 # Check whether --with-profile or --without-profile was given.
4219 if test "${with_profile+set}" = set; then
4220   withval="$with_profile"
4221   with_profile=$withval
4222 else
4223   with_profile=no
4224 fi;
4225 echo "$as_me:4225: result: $with_profile" >&5
4226 echo "${ECHO_T}$with_profile" >&6
4227 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4228
4229 fi
4230
4231 ###############################################################################
4232
4233 echo "$as_me:4233: checking for specified models" >&5
4234 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4235 test -z "$cf_list_models" && cf_list_models=normal
4236 test "$with_libtool" != "no" && cf_list_models=libtool
4237 echo "$as_me:4237: result: $cf_list_models" >&5
4238 echo "${ECHO_T}$cf_list_models" >&6
4239
4240 ### Use the first model as the default, and save its suffix for use in building
4241 ### up test-applications.
4242 echo "$as_me:4242: checking for default model" >&5
4243 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4244 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4245 echo "$as_me:4245: result: $DFT_LWR_MODEL" >&5
4246 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4247
4248 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4249
4250 TICS_NAME=tic
4251
4252 TINFO_NAME=tinfo
4253
4254 LIB_NAME=ncurses
4255
4256 LIB_DIR=../lib
4257 LIB_2ND=../../lib
4258
4259         case $cf_cv_system_name in
4260         OS/2*)  LIB_PREFIX=''     ;;
4261         os2*)   LIB_PREFIX=''     ;;
4262         *)      LIB_PREFIX='lib'  ;;
4263         esac
4264 cf_prefix=$LIB_PREFIX
4265
4266 LIB_PREFIX=$cf_prefix
4267
4268 LIB_SUFFIX=
4269
4270 ###############################################################################
4271
4272 echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
4273 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4274
4275 # Check whether --with-termlib or --without-termlib was given.
4276 if test "${with_termlib+set}" = set; then
4277   withval="$with_termlib"
4278   with_termlib=$withval
4279 else
4280   with_termlib=no
4281 fi;
4282 echo "$as_me:4282: result: $with_termlib" >&5
4283 echo "${ECHO_T}$with_termlib" >&6
4284
4285 echo "$as_me:4285: checking if you want to build a separate tic library" >&5
4286 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4287
4288 # Check whether --with-ticlib or --without-ticlib was given.
4289 if test "${with_ticlib+set}" = set; then
4290   withval="$with_ticlib"
4291   with_ticlib=$withval
4292 else
4293   with_ticlib=no
4294 fi;
4295 echo "$as_me:4295: result: $with_ticlib" >&5
4296 echo "${ECHO_T}$with_ticlib" >&6
4297
4298 ### Checks for special libraries, must be done up-front.
4299 SHLIB_LIST=""
4300
4301 echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
4302 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4303
4304 # Check whether --with-gpm or --without-gpm was given.
4305 if test "${with_gpm+set}" = set; then
4306   withval="$with_gpm"
4307   with_gpm=$withval
4308 else
4309   with_gpm=maybe
4310 fi;
4311 echo "$as_me:4311: result: $with_gpm" >&5
4312 echo "${ECHO_T}$with_gpm" >&6
4313
4314 if test "$with_gpm" != no ; then
4315         echo "$as_me:4315: checking for gpm.h" >&5
4316 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4317 if test "${ac_cv_header_gpm_h+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   cat >conftest.$ac_ext <<_ACEOF
4321 #line 4321 "configure"
4322 #include "confdefs.h"
4323 #include <gpm.h>
4324 _ACEOF
4325 if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
4326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4327   ac_status=$?
4328   egrep -v '^ *\+' conftest.er1 >conftest.err
4329   rm -f conftest.er1
4330   cat conftest.err >&5
4331   echo "$as_me:4331: \$? = $ac_status" >&5
4332   (exit $ac_status); } >/dev/null; then
4333   if test -s conftest.err; then
4334     ac_cpp_err=$ac_c_preproc_warn_flag
4335   else
4336     ac_cpp_err=
4337   fi
4338 else
4339   ac_cpp_err=yes
4340 fi
4341 if test -z "$ac_cpp_err"; then
4342   ac_cv_header_gpm_h=yes
4343 else
4344   echo "$as_me: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   ac_cv_header_gpm_h=no
4347 fi
4348 rm -f conftest.err conftest.$ac_ext
4349 fi
4350 echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
4351 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4352 if test $ac_cv_header_gpm_h = yes; then
4353
4354                 cat >>confdefs.h <<\EOF
4355 #define HAVE_GPM_H 1
4356 EOF
4357
4358                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4359                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4360
4361                         cat >>confdefs.h <<\EOF
4362 #define HAVE_LIBGPM 1
4363 EOF
4364
4365                 else
4366                         echo "$as_me:4366: checking for Gpm_Open in -lgpm" >&5
4367 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4368 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   ac_check_lib_save_LIBS=$LIBS
4372 LIBS="-lgpm  $LIBS"
4373 cat >conftest.$ac_ext <<_ACEOF
4374 #line 4374 "configure"
4375 #include "confdefs.h"
4376
4377 /* Override any gcc2 internal prototype to avoid an error.  */
4378 #ifdef __cplusplus
4379 extern "C"
4380 #endif
4381 /* We use char because int might match the return type of a gcc2
4382    builtin and then its argument prototype would still apply.  */
4383 char Gpm_Open ();
4384 int
4385 main ()
4386 {
4387 Gpm_Open ();
4388   ;
4389   return 0;
4390 }
4391 _ACEOF
4392 rm -f conftest.$ac_objext conftest$ac_exeext
4393 if { (eval echo "$as_me:4393: \"$ac_link\"") >&5
4394   (eval $ac_link) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } &&
4398          { ac_try='test -s conftest$ac_exeext'
4399   { (eval echo "$as_me:4399: \"$ac_try\"") >&5
4400   (eval $ac_try) 2>&5
4401   ac_status=$?
4402   echo "$as_me:4402: \$? = $ac_status" >&5
4403   (exit $ac_status); }; }; then
4404   ac_cv_lib_gpm_Gpm_Open=yes
4405 else
4406   echo "$as_me: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 ac_cv_lib_gpm_Gpm_Open=no
4409 fi
4410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4411 LIBS=$ac_check_lib_save_LIBS
4412 fi
4413 echo "$as_me:4413: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4414 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4415 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4416   :
4417 else
4418
4419                                 { { echo "$as_me:4419: error: Cannot link with GPM library" >&5
4420 echo "$as_me: error: Cannot link with GPM library" >&2;}
4421    { (exit 1); exit 1; }; }
4422                 fi
4423                 with_gpm=yes
4424
4425 fi
4426
4427 else
4428
4429                 test "$with_gpm" != maybe && { echo "$as_me:4429: WARNING: Cannot find GPM header" >&5
4430 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4431                 with_gpm=no
4432
4433 fi
4434
4435 fi
4436
4437 if test "$with_gpm" != no ; then
4438         echo "$as_me:4438: checking if you want to load GPM dynamically" >&5
4439 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4440
4441 # Check whether --with-dlsym or --without-dlsym was given.
4442 if test "${with_dlsym+set}" = set; then
4443   withval="$with_dlsym"
4444   with_dlsym=$withval
4445 else
4446   with_dlsym=yes
4447 fi;
4448         echo "$as_me:4448: result: $with_dlsym" >&5
4449 echo "${ECHO_T}$with_dlsym" >&6
4450         if test "$with_dlsym" = yes ; then
4451
4452 cf_have_dlsym=no
4453 echo "$as_me:4453: checking for dlsym" >&5
4454 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4455 if test "${ac_cv_func_dlsym+set}" = set; then
4456   echo $ECHO_N "(cached) $ECHO_C" >&6
4457 else
4458   cat >conftest.$ac_ext <<_ACEOF
4459 #line 4459 "configure"
4460 #include "confdefs.h"
4461 /* System header to define __stub macros and hopefully few prototypes,
4462     which can conflict with char dlsym (); below.  */
4463 #include <assert.h>
4464 /* Override any gcc2 internal prototype to avoid an error.  */
4465 #ifdef __cplusplus
4466 extern "C"
4467 #endif
4468 /* We use char because int might match the return type of a gcc2
4469    builtin and then its argument prototype would still apply.  */
4470 char dlsym ();
4471 char (*f) ();
4472
4473 int
4474 main ()
4475 {
4476 /* The GNU C library defines this for functions which it implements
4477     to always fail with ENOSYS.  Some functions are actually named
4478     something starting with __ and the normal name is an alias.  */
4479 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4480 choke me
4481 #else
4482 f = dlsym;
4483 #endif
4484
4485   ;
4486   return 0;
4487 }
4488 _ACEOF
4489 rm -f conftest.$ac_objext conftest$ac_exeext
4490 if { (eval echo "$as_me:4490: \"$ac_link\"") >&5
4491   (eval $ac_link) 2>&5
4492   ac_status=$?
4493   echo "$as_me:4493: \$? = $ac_status" >&5
4494   (exit $ac_status); } &&
4495          { ac_try='test -s conftest$ac_exeext'
4496   { (eval echo "$as_me:4496: \"$ac_try\"") >&5
4497   (eval $ac_try) 2>&5
4498   ac_status=$?
4499   echo "$as_me:4499: \$? = $ac_status" >&5
4500   (exit $ac_status); }; }; then
4501   ac_cv_func_dlsym=yes
4502 else
4503   echo "$as_me: failed program was:" >&5
4504 cat conftest.$ac_ext >&5
4505 ac_cv_func_dlsym=no
4506 fi
4507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4508 fi
4509 echo "$as_me:4509: result: $ac_cv_func_dlsym" >&5
4510 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4511 if test $ac_cv_func_dlsym = yes; then
4512   cf_have_dlsym=yes
4513 else
4514
4515 cf_have_libdl=no
4516 echo "$as_me:4516: checking for dlsym in -ldl" >&5
4517 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4518 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4519   echo $ECHO_N "(cached) $ECHO_C" >&6
4520 else
4521   ac_check_lib_save_LIBS=$LIBS
4522 LIBS="-ldl  $LIBS"
4523 cat >conftest.$ac_ext <<_ACEOF
4524 #line 4524 "configure"
4525 #include "confdefs.h"
4526
4527 /* Override any gcc2 internal prototype to avoid an error.  */
4528 #ifdef __cplusplus
4529 extern "C"
4530 #endif
4531 /* We use char because int might match the return type of a gcc2
4532    builtin and then its argument prototype would still apply.  */
4533 char dlsym ();
4534 int
4535 main ()
4536 {
4537 dlsym ();
4538   ;
4539   return 0;
4540 }
4541 _ACEOF
4542 rm -f conftest.$ac_objext conftest$ac_exeext
4543 if { (eval echo "$as_me:4543: \"$ac_link\"") >&5
4544   (eval $ac_link) 2>&5
4545   ac_status=$?
4546   echo "$as_me:4546: \$? = $ac_status" >&5
4547   (exit $ac_status); } &&
4548          { ac_try='test -s conftest$ac_exeext'
4549   { (eval echo "$as_me:4549: \"$ac_try\"") >&5
4550   (eval $ac_try) 2>&5
4551   ac_status=$?
4552   echo "$as_me:4552: \$? = $ac_status" >&5
4553   (exit $ac_status); }; }; then
4554   ac_cv_lib_dl_dlsym=yes
4555 else
4556   echo "$as_me: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 ac_cv_lib_dl_dlsym=no
4559 fi
4560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4561 LIBS=$ac_check_lib_save_LIBS
4562 fi
4563 echo "$as_me:4563: result: $ac_cv_lib_dl_dlsym" >&5
4564 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4565 if test $ac_cv_lib_dl_dlsym = yes; then
4566
4567         cf_have_dlsym=yes
4568         cf_have_libdl=yes
4569 fi
4570
4571 fi
4572
4573 if test "$cf_have_dlsym" = yes ; then
4574         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4575
4576         echo "$as_me:4576: checking whether able to link to dl*() functions" >&5
4577 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4578         cat >conftest.$ac_ext <<_ACEOF
4579 #line 4579 "configure"
4580 #include "confdefs.h"
4581 #include <dlfcn.h>
4582 int
4583 main ()
4584 {
4585
4586                 void *obj;
4587                 if ((obj = dlopen("filename", 0)) != 0) {
4588                         if (dlsym(obj, "symbolname") == 0) {
4589                         dlclose(obj);
4590                         }
4591                 }
4592   ;
4593   return 0;
4594 }
4595 _ACEOF
4596 rm -f conftest.$ac_objext conftest$ac_exeext
4597 if { (eval echo "$as_me:4597: \"$ac_link\"") >&5
4598   (eval $ac_link) 2>&5
4599   ac_status=$?
4600   echo "$as_me:4600: \$? = $ac_status" >&5
4601   (exit $ac_status); } &&
4602          { ac_try='test -s conftest$ac_exeext'
4603   { (eval echo "$as_me:4603: \"$ac_try\"") >&5
4604   (eval $ac_try) 2>&5
4605   ac_status=$?
4606   echo "$as_me:4606: \$? = $ac_status" >&5
4607   (exit $ac_status); }; }; then
4608
4609                 cat >>confdefs.h <<\EOF
4610 #define HAVE_LIBDL 1
4611 EOF
4612
4613 else
4614   echo "$as_me: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
4616
4617                 { { echo "$as_me:4617: error: Cannot link test program for libdl" >&5
4618 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4619    { (exit 1); exit 1; }; }
4620 fi
4621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4622         echo "$as_me:4622: result: ok" >&5
4623 echo "${ECHO_T}ok" >&6
4624 else
4625         { { echo "$as_me:4625: error: Cannot find dlsym function" >&5
4626 echo "$as_me: error: Cannot find dlsym function" >&2;}
4627    { (exit 1); exit 1; }; }
4628 fi
4629
4630                 if test "$with_gpm" != yes ; then
4631                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4632
4633                         cf_cv_gpm_soname="$with_gpm"
4634                 else
4635
4636 echo "$as_me:4636: checking for soname of gpm library" >&5
4637 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4638 if test "${cf_cv_gpm_soname+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642 cf_cv_gpm_soname=unknown
4643 if test "$cross_compiling" != yes ; then
4644 cat >conftest.$ac_ext <<CF_EOF
4645 #include <gpm.h>
4646 int main()
4647 {
4648 if (Gpm_Open(0,0)) Gpm_Close();
4649         ${cf_cv_main_return:-return}(0);
4650 }
4651 CF_EOF
4652 cf_save_LIBS="$LIBS"
4653         LIBS="-lgpm $LIBS"
4654         if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655   (eval $ac_compile) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); } ; then
4659                 if { (eval echo "$as_me:4659: \"$ac_link\"") >&5
4660   (eval $ac_link) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); } ; then
4664                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4665                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4666                 fi
4667         fi
4668 rm -f conftest*
4669 LIBS="$cf_save_LIBS"
4670 fi
4671
4672 fi
4673 echo "$as_me:4673: result: $cf_cv_gpm_soname" >&5
4674 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4675
4676                 fi
4677                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4678 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4679 EOF
4680
4681                 SHLIB_LIST="-ldl $SHLIB_LIST"
4682         else
4683                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4684         fi
4685         cat >>confdefs.h <<\EOF
4686 #define HAVE_LIBGPM 1
4687 EOF
4688
4689 echo "$as_me:4689: checking for Gpm_Wgetch in -lgpm" >&5
4690 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4691 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   ac_check_lib_save_LIBS=$LIBS
4695 LIBS="-lgpm  $LIBS"
4696 cat >conftest.$ac_ext <<_ACEOF
4697 #line 4697 "configure"
4698 #include "confdefs.h"
4699
4700 /* Override any gcc2 internal prototype to avoid an error.  */
4701 #ifdef __cplusplus
4702 extern "C"
4703 #endif
4704 /* We use char because int might match the return type of a gcc2
4705    builtin and then its argument prototype would still apply.  */
4706 char Gpm_Wgetch ();
4707 int
4708 main ()
4709 {
4710 Gpm_Wgetch ();
4711   ;
4712   return 0;
4713 }
4714 _ACEOF
4715 rm -f conftest.$ac_objext conftest$ac_exeext
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717   (eval $ac_link) 2>&5
4718   ac_status=$?
4719   echo "$as_me:4719: \$? = $ac_status" >&5
4720   (exit $ac_status); } &&
4721          { ac_try='test -s conftest$ac_exeext'
4722   { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4723   (eval $ac_try) 2>&5
4724   ac_status=$?
4725   echo "$as_me:4725: \$? = $ac_status" >&5
4726   (exit $ac_status); }; }; then
4727   ac_cv_lib_gpm_Gpm_Wgetch=yes
4728 else
4729   echo "$as_me: failed program was:" >&5
4730 cat conftest.$ac_ext >&5
4731 ac_cv_lib_gpm_Gpm_Wgetch=no
4732 fi
4733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4734 LIBS=$ac_check_lib_save_LIBS
4735 fi
4736 echo "$as_me:4736: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4737 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4738 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4739
4740 echo "$as_me:4740: checking if GPM is weakly bound to curses library" >&5
4741 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4742 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745
4746 cf_cv_check_gpm_wgetch=unknown
4747 if test "$cross_compiling" != yes ; then
4748
4749 cat >conftest.$ac_ext <<CF_EOF
4750 #include <gpm.h>
4751 int main()
4752 {
4753         Gpm_Wgetch();
4754         ${cf_cv_main_return:-return}(0);
4755 }
4756 CF_EOF
4757
4758         cf_save_LIBS="$LIBS"
4759         # This only works if we can look at the symbol table.  If a shared
4760         # library is stripped for install, we cannot use that.  So we're forced
4761         # to rely on the static library, noting that some packagers may not
4762         # include it.
4763         LIBS="-static -lgpm -dynamic $LIBS"
4764         if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5
4765   (eval $ac_compile) 2>&5
4766   ac_status=$?
4767   echo "$as_me:4767: \$? = $ac_status" >&5
4768   (exit $ac_status); } ; then
4769                 if { (eval echo "$as_me:4769: \"$ac_link\"") >&5
4770   (eval $ac_link) 2>&5
4771   ac_status=$?
4772   echo "$as_me:4772: \$? = $ac_status" >&5
4773   (exit $ac_status); } ; then
4774                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4775                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4776                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4777                 fi
4778         fi
4779         rm -f conftest*
4780         LIBS="$cf_save_LIBS"
4781 fi
4782
4783 fi
4784 echo "$as_me:4784: result: $cf_cv_check_gpm_wgetch" >&5
4785 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4786
4787 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4788         { echo "$as_me:4788: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4789 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4790 fi
4791
4792 fi
4793
4794 fi
4795
4796 # not everyone has "test -c"
4797 if test -c /dev/sysmouse 2>/dev/null ; then
4798 echo "$as_me:4798: checking if you want to use sysmouse" >&5
4799 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4800
4801 # Check whether --with-sysmouse or --without-sysmouse was given.
4802 if test "${with_sysmouse+set}" = set; then
4803   withval="$with_sysmouse"
4804   cf_with_sysmouse=$withval
4805 else
4806   cf_with_sysmouse=maybe
4807 fi;
4808         if test "$cf_with_sysmouse" != no ; then
4809         cat >conftest.$ac_ext <<_ACEOF
4810 #line 4810 "configure"
4811 #include "confdefs.h"
4812
4813 #include <osreldate.h>
4814 #if (__FreeBSD_version >= 400017)
4815 #include <sys/consio.h>
4816 #include <sys/fbio.h>
4817 #else
4818 #include <machine/console.h>
4819 #endif
4820
4821 int
4822 main ()
4823 {
4824
4825         struct mouse_info the_mouse;
4826         ioctl(0, CONS_MOUSECTL, &the_mouse);
4827
4828   ;
4829   return 0;
4830 }
4831 _ACEOF
4832 rm -f conftest.$ac_objext
4833 if { (eval echo "$as_me:4833: \"$ac_compile\"") >&5
4834   (eval $ac_compile) 2>&5
4835   ac_status=$?
4836   echo "$as_me:4836: \$? = $ac_status" >&5
4837   (exit $ac_status); } &&
4838          { ac_try='test -s conftest.$ac_objext'
4839   { (eval echo "$as_me:4839: \"$ac_try\"") >&5
4840   (eval $ac_try) 2>&5
4841   ac_status=$?
4842   echo "$as_me:4842: \$? = $ac_status" >&5
4843   (exit $ac_status); }; }; then
4844   cf_with_sysmouse=yes
4845 else
4846   echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 cf_with_sysmouse=no
4849 fi
4850 rm -f conftest.$ac_objext conftest.$ac_ext
4851         fi
4852 echo "$as_me:4852: result: $cf_with_sysmouse" >&5
4853 echo "${ECHO_T}$cf_with_sysmouse" >&6
4854 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4855 #define USE_SYSMOUSE 1
4856 EOF
4857
4858 fi
4859
4860 if test X"$CC_G_OPT" = X"" ; then
4861         CC_G_OPT='-g'
4862         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4863 fi
4864
4865 if test X"$CXX_G_OPT" = X"" ; then
4866         CXX_G_OPT='-g'
4867         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4868 fi
4869
4870 echo "$as_me:4870: checking for default loader flags" >&5
4871 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4872 case $DFT_LWR_MODEL in
4873 libtool) LD_MODEL=''   ;;
4874 normal)  LD_MODEL=''   ;;
4875 debug)   LD_MODEL=$CC_G_OPT ;;
4876 profile) LD_MODEL='-pg';;
4877 shared)  LD_MODEL=''   ;;
4878 esac
4879 echo "$as_me:4879: result: $LD_MODEL" >&5
4880 echo "${ECHO_T}$LD_MODEL" >&6
4881
4882 case $DFT_LWR_MODEL in
4883 shared)
4884 echo "$as_me:4884: checking if rpath option should be used" >&5
4885 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4886
4887 # Check whether --enable-rpath or --disable-rpath was given.
4888 if test "${enable_rpath+set}" = set; then
4889   enableval="$enable_rpath"
4890   cf_cv_ld_rpath=$enableval
4891 else
4892   cf_cv_ld_rpath=no
4893 fi;
4894 echo "$as_me:4894: result: $cf_cv_ld_rpath" >&5
4895 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4896 echo "$as_me:4896: checking if shared libraries should be relinked during install" >&5
4897 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4898
4899 # Check whether --enable-rpath or --disable-rpath was given.
4900 if test "${enable_rpath+set}" = set; then
4901   enableval="$enable_rpath"
4902   cf_cv_do_relink=$enableval
4903 else
4904   cf_cv_do_relink=yes
4905 fi;
4906 echo "$as_me:4906: result: $cf_cv_do_relink" >&5
4907 echo "${ECHO_T}$cf_cv_do_relink" >&6
4908         ;;
4909 esac
4910
4911         LOCAL_LDFLAGS=
4912         LOCAL_LDFLAGS2=
4913         LD_SHARED_OPTS=
4914         INSTALL_LIB="-m 644"
4915
4916         cf_cv_do_symlinks=no
4917
4918         echo "$as_me:4918: checking if release/abi version should be used for shared libs" >&5
4919 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4920
4921 # Check whether --with-shlib-version or --without-shlib-version was given.
4922 if test "${with_shlib_version+set}" = set; then
4923   withval="$with_shlib_version"
4924   test -z "$withval" && withval=auto
4925         case $withval in #(vi
4926         yes) #(vi
4927                 cf_cv_shlib_version=auto
4928                 ;;
4929         rel|abi|auto|no) #(vi
4930                 cf_cv_shlib_version=$withval
4931                 ;;
4932         *)
4933                 { { echo "$as_me:4933: error: option value must be one of: rel, abi, auto or no" >&5
4934 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4935    { (exit 1); exit 1; }; }
4936                 ;;
4937         esac
4938
4939 else
4940   cf_cv_shlib_version=auto
4941 fi;
4942         echo "$as_me:4942: result: $cf_cv_shlib_version" >&5
4943 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4944
4945         cf_cv_rm_so_locs=no
4946
4947         # Some less-capable ports of gcc support only -fpic
4948         CC_SHARED_OPTS=
4949         if test "$GCC" = yes
4950         then
4951                 echo "$as_me:4951: checking which $CC option to use" >&5
4952 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4953                 cf_save_CFLAGS="$CFLAGS"
4954                 for CC_SHARED_OPTS in -fPIC -fpic ''
4955                 do
4956                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4957                         cat >conftest.$ac_ext <<_ACEOF
4958 #line 4958 "configure"
4959 #include "confdefs.h"
4960 #include <stdio.h>
4961 int
4962 main ()
4963 {
4964 int x = 1
4965   ;
4966   return 0;
4967 }
4968 _ACEOF
4969 rm -f conftest.$ac_objext
4970 if { (eval echo "$as_me:4970: \"$ac_compile\"") >&5
4971   (eval $ac_compile) 2>&5
4972   ac_status=$?
4973   echo "$as_me:4973: \$? = $ac_status" >&5
4974   (exit $ac_status); } &&
4975          { ac_try='test -s conftest.$ac_objext'
4976   { (eval echo "$as_me:4976: \"$ac_try\"") >&5
4977   (eval $ac_try) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); }; }; then
4981   break
4982 else
4983   echo "$as_me: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 fi
4986 rm -f conftest.$ac_objext conftest.$ac_ext
4987                 done
4988                 echo "$as_me:4988: result: $CC_SHARED_OPTS" >&5
4989 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4990                 CFLAGS="$cf_save_CFLAGS"
4991         fi
4992
4993         cf_cv_shlib_version_infix=no
4994
4995         case $cf_cv_system_name in
4996         beos*)
4997                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4998                 ;;
4999         cygwin*)
5000                 CC_SHARED_OPTS=
5001                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5002                 cf_cv_shlib_version=cygdll
5003                 cf_cv_shlib_version_infix=cygdll
5004                 cat >mk_shared_lib.sh <<-CF_EOF
5005                 #!/bin/sh
5006                 SHARED_LIB=\$1
5007                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5008                 shift
5009                 cat <<-EOF
5010                 Linking shared library
5011                 ** SHARED_LIB \$SHARED_LIB
5012                 ** IMPORT_LIB \$IMPORT_LIB
5013 EOF
5014                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5015 CF_EOF
5016                 chmod +x mk_shared_lib.sh
5017                 ;;
5018         darwin*)
5019                 EXTRA_CFLAGS="-no-cpp-precomp"
5020                 CC_SHARED_OPTS="-dynamic"
5021                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5023                 cf_cv_shlib_version_infix=yes
5024                 echo "$as_me:5024: checking if ld -search_paths_first works" >&5
5025 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5026 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029
5030                         cf_save_LDFLAGS=$LDFLAGS
5031                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5032                         cat >conftest.$ac_ext <<_ACEOF
5033 #line 5033 "configure"
5034 #include "confdefs.h"
5035
5036 int
5037 main ()
5038 {
5039 int i;
5040   ;
5041   return 0;
5042 }
5043 _ACEOF
5044 rm -f conftest.$ac_objext conftest$ac_exeext
5045 if { (eval echo "$as_me:5045: \"$ac_link\"") >&5
5046   (eval $ac_link) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); } &&
5050          { ac_try='test -s conftest$ac_exeext'
5051   { (eval echo "$as_me:5051: \"$ac_try\"") >&5
5052   (eval $ac_try) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); }; }; then
5056   cf_cv_ldflags_search_paths_first=yes
5057 else
5058   echo "$as_me: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5060 cf_cv_ldflags_search_paths_first=no
5061 fi
5062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5063                                 LDFLAGS=$cf_save_LDFLAGS
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_ldflags_search_paths_first" >&5
5066 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5067                 if test $cf_cv_ldflags_search_paths_first = yes; then
5068                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5069                 fi
5070                 ;;
5071         hpux*)
5072                 # (tested with gcc 2.7.2 -- I don't have c89)
5073                 if test "$GCC" = yes; then
5074                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5075                 else
5076                         CC_SHARED_OPTS='+Z'
5077                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5078                 fi
5079                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5080                 # HP-UX shared libraries must be executable, and should be
5081                 # readonly to exploit a quirk in the memory manager.
5082                 INSTALL_LIB="-m 555"
5083                 ;;
5084         irix*)
5085                 if test "$cf_cv_ld_rpath" = yes ; then
5086                         if test "$GCC" = yes; then
5087                                 cf_ld_rpath_opt="-Wl,-rpath,"
5088                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5089                         else
5090                                 cf_ld_rpath_opt="-rpath "
5091                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5092                         fi
5093                 fi
5094                 # tested with IRIX 5.2 and 'cc'.
5095                 if test "$GCC" != yes; then
5096                         CC_SHARED_OPTS='-KPIC'
5097                 fi
5098                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5099                 cf_cv_rm_so_locs=yes
5100                 ;;
5101         linux*|gnu*|k*bsd*-gnu)
5102                 if test "$DFT_LWR_MODEL" = "shared" ; then
5103                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5104                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5105                 fi
5106                 if test "$cf_cv_ld_rpath" = yes ; then
5107                         cf_ld_rpath_opt="-Wl,-rpath,"
5108                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5109                 fi
5110
5111         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5112         if test "$cf_cv_shlib_version" = rel; then
5113                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5114         else
5115                 cf_shared_soname='`basename $@`'
5116         fi
5117
5118                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5119                 ;;
5120         openbsd[2-9].*)
5121                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5122                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5123                 ;;
5124         openbsd*|freebsd[12].*)
5125                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5126                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5127                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5128                 ;;
5129         freebsd*)
5130                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5131                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5132                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5133                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5134                         cf_ld_rpath_opt="-rpath "
5135                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5136                 fi
5137
5138         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5139         if test "$cf_cv_shlib_version" = rel; then
5140                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5141         else
5142                 cf_shared_soname='`basename $@`'
5143         fi
5144
5145                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5146                 ;;
5147         netbsd*)
5148                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5149                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5150                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5151                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5152                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5153                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5154                         if test "$cf_cv_shlib_version" = auto; then
5155                         if test -f /usr/libexec/ld.elf_so; then
5156                                 cf_cv_shlib_version=abi
5157                         else
5158                                 cf_cv_shlib_version=rel
5159                         fi
5160                         fi
5161
5162         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5163         if test "$cf_cv_shlib_version" = rel; then
5164                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165         else
5166                 cf_shared_soname='`basename $@`'
5167         fi
5168
5169                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5170                 else
5171                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5172                 fi
5173                 ;;
5174         osf*|mls+*)
5175                 # tested with OSF/1 V3.2 and 'cc'
5176                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5177                 # link with shared libs).
5178                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5179                 case $host_os in
5180                 osf4*)
5181                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5182                         ;;
5183                 esac
5184                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5185                 if test "$DFT_LWR_MODEL" = "shared" ; then
5186                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5187                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5188                 fi
5189                 if test "$cf_cv_ld_rpath" = yes ; then
5190                         cf_ld_rpath_opt="-rpath"
5191                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5192                 fi
5193                 cf_cv_rm_so_locs=yes
5194                 ;;
5195         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5196                 # tested with osr5.0.5
5197                 if test "$GCC" != yes; then
5198                         CC_SHARED_OPTS='-belf -KPIC'
5199                 fi
5200                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5201                 if test "$cf_cv_ld_rpath" = yes ; then
5202                         # only way is to set LD_RUN_PATH but no switch for it
5203                         RUN_PATH=$libdir
5204                 fi
5205                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5206                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5207                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5208                 ;;
5209         sunos4*)
5210                 # tested with SunOS 4.1.1 and gcc 2.7.0
5211                 if test "$GCC" != yes; then
5212                         CC_SHARED_OPTS='-KPIC'
5213                 fi
5214                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5215                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5216                 ;;
5217         solaris2*)
5218                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5219                 if test "$GCC" != yes; then
5220                         CC_SHARED_OPTS='-KPIC'
5221                 fi
5222                 if test "$DFT_LWR_MODEL" = "shared" ; then
5223                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5225                 fi
5226                 if test "$cf_cv_ld_rpath" = yes ; then
5227                         cf_ld_rpath_opt="-R"
5228                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5229                 fi
5230
5231         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5232         if test "$cf_cv_shlib_version" = rel; then
5233                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5234         else
5235                 cf_shared_soname='`basename $@`'
5236         fi
5237
5238                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5239                 ;;
5240         sysv5uw7*|unix_sv*)
5241                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5242                 if test "$GCC" != yes; then
5243                         CC_SHARED_OPTS='-KPIC'
5244                 fi
5245                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5246                 ;;
5247         *)
5248                 CC_SHARED_OPTS='unknown'
5249                 MK_SHARED_LIB='echo unknown'
5250                 ;;
5251         esac
5252
5253         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5254         case "$cf_cv_shlib_version" in #(vi
5255         rel|abi)
5256                 case "$MK_SHARED_LIB" in #(vi
5257                 *'-o $@')
5258                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5259                         ;;
5260                 *)
5261                         { echo "$as_me:5261: WARNING: ignored --with-shlib-version" >&5
5262 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5263                         ;;
5264                 esac
5265                 ;;
5266         esac
5267
5268         if test -n "$cf_ld_rpath_opt" ; then
5269                 echo "$as_me:5269: checking if we need a space after rpath option" >&5
5270 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5271                 cf_save_LIBS="$LIBS"
5272                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5273                 cat >conftest.$ac_ext <<_ACEOF
5274 #line 5274 "configure"
5275 #include "confdefs.h"
5276
5277 int
5278 main ()
5279 {
5280
5281   ;
5282   return 0;
5283 }
5284 _ACEOF
5285 rm -f conftest.$ac_objext conftest$ac_exeext
5286 if { (eval echo "$as_me:5286: \"$ac_link\"") >&5
5287   (eval $ac_link) 2>&5
5288   ac_status=$?
5289   echo "$as_me:5289: \$? = $ac_status" >&5
5290   (exit $ac_status); } &&
5291          { ac_try='test -s conftest$ac_exeext'
5292   { (eval echo "$as_me:5292: \"$ac_try\"") >&5
5293   (eval $ac_try) 2>&5
5294   ac_status=$?
5295   echo "$as_me:5295: \$? = $ac_status" >&5
5296   (exit $ac_status); }; }; then
5297   cf_rpath_space=no
5298 else
5299   echo "$as_me: failed program was:" >&5
5300 cat conftest.$ac_ext >&5
5301 cf_rpath_space=yes
5302 fi
5303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5304                 LIBS="$cf_save_LIBS"
5305                 echo "$as_me:5305: result: $cf_rpath_space" >&5
5306 echo "${ECHO_T}$cf_rpath_space" >&6
5307                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5308                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5309         fi
5310
5311 if test "$CC_SHARED_OPTS" = "unknown"; then
5312         for model in $cf_list_models; do
5313                 if test "$model" = "shared"; then
5314                         { { echo "$as_me:5314: error: Shared libraries are not supported in this version" >&5
5315 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5316    { (exit 1); exit 1; }; }
5317                 fi
5318         done
5319 fi
5320
5321 ###############################################################################
5322
5323 ###     use option --disable-overwrite to leave out the link to -lcurses
5324 echo "$as_me:5324: checking if you wish to install ncurses overwriting curses" >&5
5325 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5326
5327 # Check whether --enable-overwrite or --disable-overwrite was given.
5328 if test "${enable_overwrite+set}" = set; then
5329   enableval="$enable_overwrite"
5330   with_overwrite=$enableval
5331 else
5332   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5333 fi;
5334 echo "$as_me:5334: result: $with_overwrite" >&5
5335 echo "${ECHO_T}$with_overwrite" >&6
5336
5337 echo "$as_me:5337: checking if external terminfo-database is used" >&5
5338 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5339
5340 # Check whether --enable-database or --disable-database was given.
5341 if test "${enable_database+set}" = set; then
5342   enableval="$enable_database"
5343   use_database=$enableval
5344 else
5345   use_database=yes
5346 fi;
5347 echo "$as_me:5347: result: $use_database" >&5
5348 echo "${ECHO_T}$use_database" >&6
5349
5350 case $host_os in #(vi
5351 os2*) #(vi
5352         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5353         ;;
5354 *) #(vi
5355         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5356         ;;
5357 esac
5358
5359         case $cf_cv_system_name in
5360         os2*)   PATHSEP=';'  ;;
5361         *)      PATHSEP=':'  ;;
5362         esac
5363
5364 if test "$use_database" != no ; then
5365         cat >>confdefs.h <<\EOF
5366 #define USE_DATABASE 1
5367 EOF
5368
5369         echo "$as_me:5369: checking which terminfo source-file will be installed" >&5
5370 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5371
5372 # Check whether --enable-database or --disable-database was given.
5373 if test "${enable_database+set}" = set; then
5374   enableval="$enable_database"
5375   TERMINFO_SRC=$withval
5376 fi;
5377         echo "$as_me:5377: result: $TERMINFO_SRC" >&5
5378 echo "${ECHO_T}$TERMINFO_SRC" >&6
5379
5380         echo "$as_me:5380: checking whether to use hashed database instead of directory/tree" >&5
5381 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5382
5383 # Check whether --with-hashed-db or --without-hashed-db was given.
5384 if test "${with_hashed_db+set}" = set; then
5385   withval="$with_hashed_db"
5386
5387 else
5388   with_hashed_db=no
5389 fi;
5390         echo "$as_me:5390: result: $with_hashed_db" >&5
5391 echo "${ECHO_T}$with_hashed_db" >&6
5392 fi
5393
5394 echo "$as_me:5394: checking for list of fallback descriptions" >&5
5395 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5396
5397 # Check whether --with-fallbacks or --without-fallbacks was given.
5398 if test "${with_fallbacks+set}" = set; then
5399   withval="$with_fallbacks"
5400   with_fallback=$withval
5401 else
5402   with_fallback=
5403 fi;
5404 echo "$as_me:5404: result: $with_fallback" >&5
5405 echo "${ECHO_T}$with_fallback" >&6
5406 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5407
5408 echo "$as_me:5408: checking if you want modern xterm or antique" >&5
5409 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5410
5411 # Check whether --with-xterm-new or --without-xterm-new was given.
5412 if test "${with_xterm_new+set}" = set; then
5413   withval="$with_xterm_new"
5414   with_xterm_new=$withval
5415 else
5416   with_xterm_new=yes
5417 fi;
5418 case $with_xterm_new in
5419 no)     with_xterm_new=xterm-old;;
5420 *)      with_xterm_new=xterm-new;;
5421 esac
5422 echo "$as_me:5422: result: $with_xterm_new" >&5
5423 echo "${ECHO_T}$with_xterm_new" >&6
5424 WHICH_XTERM=$with_xterm_new
5425
5426 MAKE_TERMINFO=
5427 if test "$use_database" = no ; then
5428         TERMINFO="${datadir}/terminfo"
5429         MAKE_TERMINFO="#"
5430 else
5431
5432 echo "$as_me:5432: checking for list of terminfo directories" >&5
5433 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5434
5435 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5436 if test "${with_terminfo_dirs+set}" = set; then
5437   withval="$with_terminfo_dirs"
5438
5439 else
5440   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5441 fi;
5442 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5443 cf_dst_path=
5444 for cf_src_path in $withval
5445 do
5446
5447 if test "x$prefix" != xNONE; then
5448   cf_path_syntax="$prefix"
5449 else
5450   cf_path_syntax="$ac_default_prefix"
5451 fi
5452
5453 case ".$cf_src_path" in #(vi
5454 .\$\(*\)*|.\'*\'*) #(vi
5455   ;;
5456 ..|./*|.\\*) #(vi
5457   ;;
5458 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5459   ;;
5460 .\${*prefix}*) #(vi
5461   eval cf_src_path="$cf_src_path"
5462   case ".$cf_src_path" in #(vi
5463   .NONE/*)
5464     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5465     ;;
5466   esac
5467   ;; #(vi
5468 .no|.NONE/*)
5469   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5470   ;;
5471 *)
5472   { { echo "$as_me:5472: error: expected a pathname, not \"$cf_src_path\"" >&5
5473 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5474    { (exit 1); exit 1; }; }
5475   ;;
5476 esac
5477
5478   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5479   cf_dst_path="${cf_dst_path}${cf_src_path}"
5480 done
5481 IFS="$ac_save_ifs"
5482
5483 eval 'TERMINFO_DIRS="$cf_dst_path"'
5484
5485 echo "$as_me:5485: result: $TERMINFO_DIRS" >&5
5486 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5487 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5488 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5489 EOF
5490
5491 echo "$as_me:5491: checking for default terminfo directory" >&5
5492 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5493
5494 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5495 if test "${with_default_terminfo_dir+set}" = set; then
5496   withval="$with_default_terminfo_dir"
5497
5498 else
5499   withval="${TERMINFO-${datadir}/terminfo}"
5500 fi;
5501 if test "x$prefix" != xNONE; then
5502   cf_path_syntax="$prefix"
5503 else
5504   cf_path_syntax="$ac_default_prefix"
5505 fi
5506
5507 case ".$withval" in #(vi
5508 .\$\(*\)*|.\'*\'*) #(vi
5509   ;;
5510 ..|./*|.\\*) #(vi
5511   ;;
5512 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5513   ;;
5514 .\${*prefix}*) #(vi
5515   eval withval="$withval"
5516   case ".$withval" in #(vi
5517   .NONE/*)
5518     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5519     ;;
5520   esac
5521   ;; #(vi
5522 .no|.NONE/*)
5523   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5524   ;;
5525 *)
5526   { { echo "$as_me:5526: error: expected a pathname, not \"$withval\"" >&5
5527 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5528    { (exit 1); exit 1; }; }
5529   ;;
5530 esac
5531
5532 TERMINFO="$withval"
5533
5534 echo "$as_me:5534: result: $TERMINFO" >&5
5535 echo "${ECHO_T}$TERMINFO" >&6
5536 cat >>confdefs.h <<EOF
5537 #define TERMINFO "$TERMINFO"
5538 EOF
5539
5540 fi
5541
5542 ###     use option --disable-big-core to make tic run on small machines
5543 ###     We need 4Mb, check if we can allocate 50% more than that.
5544 echo "$as_me:5544: checking if big-core option selected" >&5
5545 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5546
5547 # Check whether --enable-big-core or --disable-big-core was given.
5548 if test "${enable_big_core+set}" = set; then
5549   enableval="$enable_big_core"
5550   with_big_core=$enableval
5551 else
5552   if test "$cross_compiling" = yes; then
5553   with_big_core=no
5554 else
5555   cat >conftest.$ac_ext <<_ACEOF
5556 #line 5556 "configure"
5557 #include "confdefs.h"
5558
5559 #include <stdlib.h>
5560 #include <string.h>
5561 int main() {
5562         unsigned long n = 6000000L;
5563         char *s = malloc(n);
5564         if (s != 0)
5565                 s[0] = s[n-1] = 0;
5566         ${cf_cv_main_return:-return}(s == 0);
5567 }
5568 _ACEOF
5569 rm -f conftest$ac_exeext
5570 if { (eval echo "$as_me:5570: \"$ac_link\"") >&5
5571   (eval $ac_link) 2>&5
5572   ac_status=$?
5573   echo "$as_me:5573: \$? = $ac_status" >&5
5574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5575   { (eval echo "$as_me:5575: \"$ac_try\"") >&5
5576   (eval $ac_try) 2>&5
5577   ac_status=$?
5578   echo "$as_me:5578: \$? = $ac_status" >&5
5579   (exit $ac_status); }; }; then
5580   with_big_core=yes
5581 else
5582   echo "$as_me: program exited with status $ac_status" >&5
5583 echo "$as_me: failed program was:" >&5
5584 cat conftest.$ac_ext >&5
5585 with_big_core=no
5586 fi
5587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5588 fi
5589 fi;
5590 echo "$as_me:5590: result: $with_big_core" >&5
5591 echo "${ECHO_T}$with_big_core" >&6
5592 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5593 #define HAVE_BIG_CORE 1
5594 EOF
5595
5596 ###     use option --enable-termcap to compile in the termcap fallback support
5597 echo "$as_me:5597: checking if you want termcap-fallback support" >&5
5598 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5599
5600 # Check whether --enable-termcap or --disable-termcap was given.
5601 if test "${enable_termcap+set}" = set; then
5602   enableval="$enable_termcap"
5603   with_termcap=$enableval
5604 else
5605   with_termcap=no
5606 fi;
5607 echo "$as_me:5607: result: $with_termcap" >&5
5608 echo "${ECHO_T}$with_termcap" >&6
5609
5610 if test "$with_termcap" != "yes" ; then
5611         if test "$use_database" = no ; then
5612                 if test -z "$with_fallback" ; then
5613                         { { echo "$as_me:5613: error: You have disabled the database w/o specifying fallbacks" >&5
5614 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5615    { (exit 1); exit 1; }; }
5616                 fi
5617         fi
5618         cat >>confdefs.h <<\EOF
5619 #define PURE_TERMINFO 1
5620 EOF
5621
5622 else
5623
5624 if test "$with_ticlib" != no ; then
5625         { { echo "$as_me:5625: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5626 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5627    { (exit 1); exit 1; }; }
5628 fi
5629
5630 cat >>confdefs.h <<\EOF
5631 #define USE_TERMCAP 1
5632 EOF
5633
5634 echo "$as_me:5634: checking for list of termcap files" >&5
5635 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5636
5637 # Check whether --with-termpath or --without-termpath was given.
5638 if test "${with_termpath+set}" = set; then
5639   withval="$with_termpath"
5640
5641 else
5642   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5643 fi;
5644 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5645 cf_dst_path=
5646 for cf_src_path in $withval
5647 do
5648
5649 if test "x$prefix" != xNONE; then
5650   cf_path_syntax="$prefix"
5651 else
5652   cf_path_syntax="$ac_default_prefix"
5653 fi
5654
5655 case ".$cf_src_path" in #(vi
5656 .\$\(*\)*|.\'*\'*) #(vi
5657   ;;
5658 ..|./*|.\\*) #(vi
5659   ;;
5660 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5661   ;;
5662 .\${*prefix}*) #(vi
5663   eval cf_src_path="$cf_src_path"
5664   case ".$cf_src_path" in #(vi
5665   .NONE/*)
5666     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5667     ;;
5668   esac
5669   ;; #(vi
5670 .no|.NONE/*)
5671   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5672   ;;
5673 *)
5674   { { echo "$as_me:5674: error: expected a pathname, not \"$cf_src_path\"" >&5
5675 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5676    { (exit 1); exit 1; }; }
5677   ;;
5678 esac
5679
5680   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5681   cf_dst_path="${cf_dst_path}${cf_src_path}"
5682 done
5683 IFS="$ac_save_ifs"
5684
5685 eval 'TERMPATH="$cf_dst_path"'
5686
5687 echo "$as_me:5687: result: $TERMPATH" >&5
5688 echo "${ECHO_T}$TERMPATH" >&6
5689 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5690 #define TERMPATH "$TERMPATH"
5691 EOF
5692
5693 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5694 echo "$as_me:5694: checking if fast termcap-loader is needed" >&5
5695 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5696
5697 # Check whether --enable-getcap or --disable-getcap was given.
5698 if test "${enable_getcap+set}" = set; then
5699   enableval="$enable_getcap"
5700   with_getcap=$enableval
5701 else
5702   with_getcap=no
5703 fi;
5704 echo "$as_me:5704: result: $with_getcap" >&5
5705 echo "${ECHO_T}$with_getcap" >&6
5706 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5707 #define USE_GETCAP 1
5708 EOF
5709
5710 echo "$as_me:5710: checking if translated termcaps will be cached in ~/.terminfo" >&5
5711 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5712
5713 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5714 if test "${enable_getcap_cache+set}" = set; then
5715   enableval="$enable_getcap_cache"
5716   with_getcap_cache=$enableval
5717 else
5718   with_getcap_cache=no
5719 fi;
5720 echo "$as_me:5720: result: $with_getcap_cache" >&5
5721 echo "${ECHO_T}$with_getcap_cache" >&6
5722 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5723 #define USE_GETCAP_CACHE 1
5724 EOF
5725
5726 fi
5727
5728 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5729 echo "$as_me:5729: checking if ~/.terminfo is wanted" >&5
5730 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5731
5732 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5733 if test "${enable_home_terminfo+set}" = set; then
5734   enableval="$enable_home_terminfo"
5735   with_home_terminfo=$enableval
5736 else
5737   with_home_terminfo=yes
5738 fi;
5739 echo "$as_me:5739: result: $with_home_terminfo" >&5
5740 echo "${ECHO_T}$with_home_terminfo" >&6
5741 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5742 #define USE_HOME_TERMINFO 1
5743 EOF
5744
5745 echo "$as_me:5745: checking if you want to use restricted environment when running as root" >&5
5746 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5747
5748 # Check whether --enable-root-environ or --disable-root-environ was given.
5749 if test "${enable_root_environ+set}" = set; then
5750   enableval="$enable_root_environ"
5751   with_root_environ=$enableval
5752 else
5753   with_root_environ=yes
5754 fi;
5755 echo "$as_me:5755: result: $with_root_environ" >&5
5756 echo "${ECHO_T}$with_root_environ" >&6
5757 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5758 #define USE_ROOT_ENVIRON 1
5759 EOF
5760
5761 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5762 ###   to reduce storage requirements for the terminfo database.
5763
5764 for ac_func in \
5765         remove \
5766         unlink
5767 do
5768 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5769 echo "$as_me:5769: checking for $ac_func" >&5
5770 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5771 if eval "test \"\${$as_ac_var+set}\" = set"; then
5772   echo $ECHO_N "(cached) $ECHO_C" >&6
5773 else
5774   cat >conftest.$ac_ext <<_ACEOF
5775 #line 5775 "configure"
5776 #include "confdefs.h"
5777 /* System header to define __stub macros and hopefully few prototypes,
5778     which can conflict with char $ac_func (); below.  */
5779 #include <assert.h>
5780 /* Override any gcc2 internal prototype to avoid an error.  */
5781 #ifdef __cplusplus
5782 extern "C"
5783 #endif
5784 /* We use char because int might match the return type of a gcc2
5785    builtin and then its argument prototype would still apply.  */
5786 char $ac_func ();
5787 char (*f) ();
5788
5789 int
5790 main ()
5791 {
5792 /* The GNU C library defines this for functions which it implements
5793     to always fail with ENOSYS.  Some functions are actually named
5794     something starting with __ and the normal name is an alias.  */
5795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5796 choke me
5797 #else
5798 f = $ac_func;
5799 #endif
5800
5801   ;
5802   return 0;
5803 }
5804 _ACEOF
5805 rm -f conftest.$ac_objext conftest$ac_exeext
5806 if { (eval echo "$as_me:5806: \"$ac_link\"") >&5
5807   (eval $ac_link) 2>&5
5808   ac_status=$?
5809   echo "$as_me:5809: \$? = $ac_status" >&5
5810   (exit $ac_status); } &&
5811          { ac_try='test -s conftest$ac_exeext'
5812   { (eval echo "$as_me:5812: \"$ac_try\"") >&5
5813   (eval $ac_try) 2>&5
5814   ac_status=$?
5815   echo "$as_me:5815: \$? = $ac_status" >&5
5816   (exit $ac_status); }; }; then
5817   eval "$as_ac_var=yes"
5818 else
5819   echo "$as_me: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5821 eval "$as_ac_var=no"
5822 fi
5823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5824 fi
5825 echo "$as_me:5825: result: `eval echo '${'$as_ac_var'}'`" >&5
5826 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5827 if test `eval echo '${'$as_ac_var'}'` = yes; then
5828   cat >>confdefs.h <<EOF
5829 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5830 EOF
5831
5832 fi
5833 done
5834
5835 if test "$cross_compiling" = yes ; then
5836
5837 for ac_func in \
5838                 link \
5839                 symlink
5840 do
5841 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5842 echo "$as_me:5842: checking for $ac_func" >&5
5843 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5844 if eval "test \"\${$as_ac_var+set}\" = set"; then
5845   echo $ECHO_N "(cached) $ECHO_C" >&6
5846 else
5847   cat >conftest.$ac_ext <<_ACEOF
5848 #line 5848 "configure"
5849 #include "confdefs.h"
5850 /* System header to define __stub macros and hopefully few prototypes,
5851     which can conflict with char $ac_func (); below.  */
5852 #include <assert.h>
5853 /* Override any gcc2 internal prototype to avoid an error.  */
5854 #ifdef __cplusplus
5855 extern "C"
5856 #endif
5857 /* We use char because int might match the return type of a gcc2
5858    builtin and then its argument prototype would still apply.  */
5859 char $ac_func ();
5860 char (*f) ();
5861
5862 int
5863 main ()
5864 {
5865 /* The GNU C library defines this for functions which it implements
5866     to always fail with ENOSYS.  Some functions are actually named
5867     something starting with __ and the normal name is an alias.  */
5868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5869 choke me
5870 #else
5871 f = $ac_func;
5872 #endif
5873
5874   ;
5875   return 0;
5876 }
5877 _ACEOF
5878 rm -f conftest.$ac_objext conftest$ac_exeext
5879 if { (eval echo "$as_me:5879: \"$ac_link\"") >&5
5880   (eval $ac_link) 2>&5
5881   ac_status=$?
5882   echo "$as_me:5882: \$? = $ac_status" >&5
5883   (exit $ac_status); } &&
5884          { ac_try='test -s conftest$ac_exeext'
5885   { (eval echo "$as_me:5885: \"$ac_try\"") >&5
5886   (eval $ac_try) 2>&5
5887   ac_status=$?
5888   echo "$as_me:5888: \$? = $ac_status" >&5
5889   (exit $ac_status); }; }; then
5890   eval "$as_ac_var=yes"
5891 else
5892   echo "$as_me: failed program was:" >&5
5893 cat conftest.$ac_ext >&5
5894 eval "$as_ac_var=no"
5895 fi
5896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5897 fi
5898 echo "$as_me:5898: result: `eval echo '${'$as_ac_var'}'`" >&5
5899 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5900 if test `eval echo '${'$as_ac_var'}'` = yes; then
5901   cat >>confdefs.h <<EOF
5902 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5903 EOF
5904
5905 fi
5906 done
5907
5908 else
5909         echo "$as_me:5909: checking if link/symlink functions work" >&5
5910 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5911 if test "${cf_cv_link_funcs+set}" = set; then
5912   echo $ECHO_N "(cached) $ECHO_C" >&6
5913 else
5914
5915                 cf_cv_link_funcs=
5916                 for cf_func in link symlink ; do
5917                         if test "$cross_compiling" = yes; then
5918
5919                         eval 'ac_cv_func_'$cf_func'=error'
5920 else
5921   cat >conftest.$ac_ext <<_ACEOF
5922 #line 5922 "configure"
5923 #include "confdefs.h"
5924
5925 #include <sys/types.h>
5926 #include <sys/stat.h>
5927 #ifdef HAVE_UNISTD_H
5928 #include <unistd.h>
5929 #endif
5930 int main()
5931 {
5932         int fail = 0;
5933         char *src = "config.log";
5934         char *dst = "conftest.chk";
5935         struct stat src_sb;
5936         struct stat dst_sb;
5937
5938         stat(src, &src_sb);
5939         fail = ($cf_func("config.log", "conftest.chk") < 0)
5940             || (stat(dst, &dst_sb) < 0)
5941             || (dst_sb.st_mtime != src_sb.st_mtime);
5942 #ifdef HAVE_UNLINK
5943         unlink(dst);
5944 #else
5945         remove(dst);
5946 #endif
5947         ${cf_cv_main_return:-return} (fail);
5948 }
5949
5950 _ACEOF
5951 rm -f conftest$ac_exeext
5952 if { (eval echo "$as_me:5952: \"$ac_link\"") >&5
5953   (eval $ac_link) 2>&5
5954   ac_status=$?
5955   echo "$as_me:5955: \$? = $ac_status" >&5
5956   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5957   { (eval echo "$as_me:5957: \"$ac_try\"") >&5
5958   (eval $ac_try) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; }; then
5962
5963                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5964                         eval 'ac_cv_func_'$cf_func'=yes'
5965 else
5966   echo "$as_me: program exited with status $ac_status" >&5
5967 echo "$as_me: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5969
5970                         eval 'ac_cv_func_'$cf_func'=no'
5971 fi
5972 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5973 fi
5974                 done
5975                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5976
5977 fi
5978 echo "$as_me:5978: result: $cf_cv_link_funcs" >&5
5979 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5980         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5981 #define HAVE_LINK 1
5982 EOF
5983
5984         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5985 #define HAVE_SYMLINK 1
5986 EOF
5987
5988 fi
5989
5990 with_links=no
5991 with_symlinks=no
5992
5993 # soft links (symbolic links) are useful for some systems where hard links do
5994 # not work, or to make it simpler to copy terminfo trees around.
5995 if test "$ac_cv_func_symlink" = yes ; then
5996     echo "$as_me:5996: checking if tic should use symbolic links" >&5
5997 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5998
5999 # Check whether --enable-symlinks or --disable-symlinks was given.
6000 if test "${enable_symlinks+set}" = set; then
6001   enableval="$enable_symlinks"
6002   with_symlinks=$enableval
6003 else
6004   with_symlinks=no
6005 fi;
6006     echo "$as_me:6006: result: $with_symlinks" >&5
6007 echo "${ECHO_T}$with_symlinks" >&6
6008 fi
6009
6010 # If we have hard links and did not choose to use soft links instead, there is
6011 # no reason to make this choice optional - use the hard links.
6012 if test "$with_symlinks" = no ; then
6013     echo "$as_me:6013: checking if tic should use hard links" >&5
6014 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6015     if test "$ac_cv_func_link" = yes ; then
6016         with_links=yes
6017     else
6018         with_links=no
6019     fi
6020     echo "$as_me:6020: result: $with_links" >&5
6021 echo "${ECHO_T}$with_links" >&6
6022 fi
6023
6024 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6025 #define USE_LINKS 1
6026 EOF
6027
6028 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6029 #define USE_SYMLINKS 1
6030 EOF
6031
6032 ###   use option --enable-broken-linker to force on use of broken-linker support
6033 echo "$as_me:6033: checking if you want broken-linker support code" >&5
6034 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6035
6036 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6037 if test "${enable_broken_linker+set}" = set; then
6038   enableval="$enable_broken_linker"
6039   with_broken_linker=$enableval
6040 else
6041   with_broken_linker=${BROKEN_LINKER-no}
6042 fi;
6043 echo "$as_me:6043: result: $with_broken_linker" >&5
6044 echo "${ECHO_T}$with_broken_linker" >&6
6045
6046 BROKEN_LINKER=0
6047 if test "$with_broken_linker" = yes ; then
6048         cat >>confdefs.h <<\EOF
6049 #define BROKEN_LINKER 1
6050 EOF
6051
6052         BROKEN_LINKER=1
6053 elif test "$DFT_LWR_MODEL" = shared ; then
6054         case $cf_cv_system_name in #(vi
6055         cygwin*)
6056                 cat >>confdefs.h <<\EOF
6057 #define BROKEN_LINKER 1
6058 EOF
6059
6060                 BROKEN_LINKER=1
6061                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6062
6063                 ;;
6064         esac
6065 fi
6066
6067 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6068 echo "$as_me:6068: checking if tputs should process BSD-style prefix padding" >&5
6069 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6070
6071 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6072 if test "${enable_bsdpad+set}" = set; then
6073   enableval="$enable_bsdpad"
6074   with_bsdpad=$enableval
6075 else
6076   with_bsdpad=no
6077 fi;
6078 echo "$as_me:6078: result: $with_bsdpad" >&5
6079 echo "${ECHO_T}$with_bsdpad" >&6
6080 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6081 #define BSD_TPUTS 1
6082 EOF
6083
6084 ###   use option --enable-widec to turn on use of wide-character support
6085 NCURSES_CH_T=chtype
6086 NCURSES_LIBUTF8=0
6087
6088 NEED_WCHAR_H=0
6089 NCURSES_MBSTATE_T=0
6090 NCURSES_WCHAR_T=0
6091 NCURSES_WINT_T=0
6092
6093 # Check to define _XOPEN_SOURCE "automatically"
6094
6095 echo "$as_me:6095: checking if $CC -U and -D options work together" >&5
6096 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6097 if test "${cf_cv_cc_u_d_options+set}" = set; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100
6101         cf_save_CPPFLAGS="$CPPFLAGS"
6102         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6103         cat >conftest.$ac_ext <<_ACEOF
6104 #line 6104 "configure"
6105 #include "confdefs.h"
6106
6107 int
6108 main ()
6109 {
6110
6111 #ifndef U_D_OPTIONS
6112 make an undefined-error
6113 #endif
6114 #ifdef  D_U_OPTIONS
6115 make a defined-error
6116 #endif
6117
6118   ;
6119   return 0;
6120 }
6121 _ACEOF
6122 rm -f conftest.$ac_objext
6123 if { (eval echo "$as_me:6123: \"$ac_compile\"") >&5
6124   (eval $ac_compile) 2>&5
6125   ac_status=$?
6126   echo "$as_me:6126: \$? = $ac_status" >&5
6127   (exit $ac_status); } &&
6128          { ac_try='test -s conftest.$ac_objext'
6129   { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6130   (eval $ac_try) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit $ac_status); }; }; then
6134
6135         cf_cv_cc_u_d_options=yes
6136 else
6137   echo "$as_me: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6139
6140         cf_cv_cc_u_d_options=no
6141 fi
6142 rm -f conftest.$ac_objext conftest.$ac_ext
6143         CPPFLAGS="$cf_save_CPPFLAGS"
6144
6145 fi
6146 echo "$as_me:6146: result: $cf_cv_cc_u_d_options" >&5
6147 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6148
6149 cf_XOPEN_SOURCE=500
6150 cf_POSIX_C_SOURCE=199506L
6151
6152 case $host_os in #(vi
6153 aix[45]*) #(vi
6154         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6155         ;;
6156 freebsd*) #(vi
6157         # 5.x headers associate
6158         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6159         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6160         cf_POSIX_C_SOURCE=200112L
6161         cf_XOPEN_SOURCE=600
6162         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6163         ;;
6164 hpux*) #(vi
6165         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6166         ;;
6167 irix[56].*) #(vi
6168         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6169         ;;
6170 linux*|gnu*|k*bsd*-gnu) #(vi
6171
6172 echo "$as_me:6172: checking if we must define _GNU_SOURCE" >&5
6173 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6174 if test "${cf_cv_gnu_source+set}" = set; then
6175   echo $ECHO_N "(cached) $ECHO_C" >&6
6176 else
6177
6178 cat >conftest.$ac_ext <<_ACEOF
6179 #line 6179 "configure"
6180 #include "confdefs.h"
6181 #include <sys/types.h>
6182 int
6183 main ()
6184 {
6185
6186 #ifndef _XOPEN_SOURCE
6187 make an error
6188 #endif
6189   ;
6190   return 0;
6191 }
6192 _ACEOF
6193 rm -f conftest.$ac_objext
6194 if { (eval echo "$as_me:6194: \"$ac_compile\"") >&5
6195   (eval $ac_compile) 2>&5
6196   ac_status=$?
6197   echo "$as_me:6197: \$? = $ac_status" >&5
6198   (exit $ac_status); } &&
6199          { ac_try='test -s conftest.$ac_objext'
6200   { (eval echo "$as_me:6200: \"$ac_try\"") >&5
6201   (eval $ac_try) 2>&5
6202   ac_status=$?
6203   echo "$as_me:6203: \$? = $ac_status" >&5
6204   (exit $ac_status); }; }; then
6205   cf_cv_gnu_source=no
6206 else
6207   echo "$as_me: failed program was:" >&5
6208 cat conftest.$ac_ext >&5
6209 cf_save="$CPPFLAGS"
6210          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6211          cat >conftest.$ac_ext <<_ACEOF
6212 #line 6212 "configure"
6213 #include "confdefs.h"
6214 #include <sys/types.h>
6215 int
6216 main ()
6217 {
6218
6219 #ifdef _XOPEN_SOURCE
6220 make an error
6221 #endif
6222   ;
6223   return 0;
6224 }
6225 _ACEOF
6226 rm -f conftest.$ac_objext
6227 if { (eval echo "$as_me:6227: \"$ac_compile\"") >&5
6228   (eval $ac_compile) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit $ac_status); } &&
6232          { ac_try='test -s conftest.$ac_objext'
6233   { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6234   (eval $ac_try) 2>&5
6235   ac_status=$?
6236   echo "$as_me:6236: \$? = $ac_status" >&5
6237   (exit $ac_status); }; }; then
6238   cf_cv_gnu_source=no
6239 else
6240   echo "$as_me: failed program was:" >&5
6241 cat conftest.$ac_ext >&5
6242 cf_cv_gnu_source=yes
6243 fi
6244 rm -f conftest.$ac_objext conftest.$ac_ext
6245         CPPFLAGS="$cf_save"
6246
6247 fi
6248 rm -f conftest.$ac_objext conftest.$ac_ext
6249
6250 fi
6251 echo "$as_me:6251: result: $cf_cv_gnu_source" >&5
6252 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6253 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6254
6255         ;;
6256 mirbsd*) #(vi
6257         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6258         ;;
6259 netbsd*) #(vi
6260         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6261         ;;
6262 openbsd*) #(vi
6263         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6264         ;;
6265 osf[45]*) #(vi
6266         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6267         ;;
6268 nto-qnx*) #(vi
6269         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6270         ;;
6271 sco*) #(vi
6272         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6273         ;;
6274 solaris*) #(vi
6275         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6276         ;;
6277 *)
6278         echo "$as_me:6278: checking if we should define _XOPEN_SOURCE" >&5
6279 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6280 if test "${cf_cv_xopen_source+set}" = set; then
6281   echo $ECHO_N "(cached) $ECHO_C" >&6
6282 else
6283
6284         cat >conftest.$ac_ext <<_ACEOF
6285 #line 6285 "configure"
6286 #include "confdefs.h"
6287 #include <sys/types.h>
6288 int
6289 main ()
6290 {
6291
6292 #ifndef _XOPEN_SOURCE
6293 make an error
6294 #endif
6295   ;
6296   return 0;
6297 }
6298 _ACEOF
6299 rm -f conftest.$ac_objext
6300 if { (eval echo "$as_me:6300: \"$ac_compile\"") >&5
6301   (eval $ac_compile) 2>&5
6302   ac_status=$?
6303   echo "$as_me:6303: \$? = $ac_status" >&5
6304   (exit $ac_status); } &&
6305          { ac_try='test -s conftest.$ac_objext'
6306   { (eval echo "$as_me:6306: \"$ac_try\"") >&5
6307   (eval $ac_try) 2>&5
6308   ac_status=$?
6309   echo "$as_me:6309: \$? = $ac_status" >&5
6310   (exit $ac_status); }; }; then
6311   cf_cv_xopen_source=no
6312 else
6313   echo "$as_me: failed program was:" >&5
6314 cat conftest.$ac_ext >&5
6315 cf_save="$CPPFLAGS"
6316          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6317          cat >conftest.$ac_ext <<_ACEOF
6318 #line 6318 "configure"
6319 #include "confdefs.h"
6320 #include <sys/types.h>
6321 int
6322 main ()
6323 {
6324
6325 #ifdef _XOPEN_SOURCE
6326 make an error
6327 #endif
6328   ;
6329   return 0;
6330 }
6331 _ACEOF
6332 rm -f conftest.$ac_objext
6333 if { (eval echo "$as_me:6333: \"$ac_compile\"") >&5
6334   (eval $ac_compile) 2>&5
6335   ac_status=$?
6336   echo "$as_me:6336: \$? = $ac_status" >&5
6337   (exit $ac_status); } &&
6338          { ac_try='test -s conftest.$ac_objext'
6339   { (eval echo "$as_me:6339: \"$ac_try\"") >&5
6340   (eval $ac_try) 2>&5
6341   ac_status=$?
6342   echo "$as_me:6342: \$? = $ac_status" >&5
6343   (exit $ac_status); }; }; then
6344   cf_cv_xopen_source=no
6345 else
6346   echo "$as_me: failed program was:" >&5
6347 cat conftest.$ac_ext >&5
6348 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6349 fi
6350 rm -f conftest.$ac_objext conftest.$ac_ext
6351         CPPFLAGS="$cf_save"
6352
6353 fi
6354 rm -f conftest.$ac_objext conftest.$ac_ext
6355
6356 fi
6357 echo "$as_me:6357: result: $cf_cv_xopen_source" >&5
6358 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6359         if test "$cf_cv_xopen_source" != no ; then
6360
6361 # remove _XOPEN_SOURCE symbol from $CFLAGS
6362 CFLAGS=`echo "$CFLAGS" | \
6363         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6364                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6365
6366 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6367 CPPFLAGS=`echo "$CPPFLAGS" | \
6368         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6369                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6370
6371                 test "$cf_cv_cc_u_d_options" = yes && \
6372                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6373                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6374         fi
6375
6376 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6377
6378 cf_save_CFLAGS="$CFLAGS"
6379 cf_save_CPPFLAGS="$CPPFLAGS"
6380
6381 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6382 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6383         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6384                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6385
6386 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6387 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6388         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6389                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6390
6391 echo "$as_me:6391: checking if we should define _POSIX_C_SOURCE" >&5
6392 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6393 if test "${cf_cv_posix_c_source+set}" = set; then
6394   echo $ECHO_N "(cached) $ECHO_C" >&6
6395 else
6396
6397 echo "(line 6397) testing if the symbol is already defined go no further ..." 1>&5
6398
6399         cat >conftest.$ac_ext <<_ACEOF
6400 #line 6400 "configure"
6401 #include "confdefs.h"
6402 #include <sys/types.h>
6403 int
6404 main ()
6405 {
6406
6407 #ifndef _POSIX_C_SOURCE
6408 make an error
6409 #endif
6410   ;
6411   return 0;
6412 }
6413 _ACEOF
6414 rm -f conftest.$ac_objext
6415 if { (eval echo "$as_me:6415: \"$ac_compile\"") >&5
6416   (eval $ac_compile) 2>&5
6417   ac_status=$?
6418   echo "$as_me:6418: \$? = $ac_status" >&5
6419   (exit $ac_status); } &&
6420          { ac_try='test -s conftest.$ac_objext'
6421   { (eval echo "$as_me:6421: \"$ac_try\"") >&5
6422   (eval $ac_try) 2>&5
6423   ac_status=$?
6424   echo "$as_me:6424: \$? = $ac_status" >&5
6425   (exit $ac_status); }; }; then
6426   cf_cv_posix_c_source=no
6427 else
6428   echo "$as_me: failed program was:" >&5
6429 cat conftest.$ac_ext >&5
6430 cf_want_posix_source=no
6431          case .$cf_POSIX_C_SOURCE in #(vi
6432          .[12]??*) #(vi
6433                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6434                 ;;
6435          .2) #(vi
6436                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6437                 cf_want_posix_source=yes
6438                 ;;
6439          .*)
6440                 cf_want_posix_source=yes
6441                 ;;
6442          esac
6443          if test "$cf_want_posix_source" = yes ; then
6444                 cat >conftest.$ac_ext <<_ACEOF
6445 #line 6445 "configure"
6446 #include "confdefs.h"
6447 #include <sys/types.h>
6448 int
6449 main ()
6450 {
6451
6452 #ifdef _POSIX_SOURCE
6453 make an error
6454 #endif
6455   ;
6456   return 0;
6457 }
6458 _ACEOF
6459 rm -f conftest.$ac_objext
6460 if { (eval echo "$as_me:6460: \"$ac_compile\"") >&5
6461   (eval $ac_compile) 2>&5
6462   ac_status=$?
6463   echo "$as_me:6463: \$? = $ac_status" >&5
6464   (exit $ac_status); } &&
6465          { ac_try='test -s conftest.$ac_objext'
6466   { (eval echo "$as_me:6466: \"$ac_try\"") >&5
6467   (eval $ac_try) 2>&5
6468   ac_status=$?
6469   echo "$as_me:6469: \$? = $ac_status" >&5
6470   (exit $ac_status); }; }; then
6471   :
6472 else
6473   echo "$as_me: failed program was:" >&5
6474 cat conftest.$ac_ext >&5
6475 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6476 fi
6477 rm -f conftest.$ac_objext conftest.$ac_ext
6478          fi
6479
6480 echo "(line 6480) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6481
6482          CFLAGS="$cf_trim_CFLAGS"
6483          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6484
6485 echo "(line 6485) testing if the second compile does not leave our definition intact error ..." 1>&5
6486
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 #ifndef _POSIX_C_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=no
6519 fi
6520 rm -f conftest.$ac_objext conftest.$ac_ext
6521          CFLAGS="$cf_save_CFLAGS"
6522          CPPFLAGS="$cf_save_CPPFLAGS"
6523
6524 fi
6525 rm -f conftest.$ac_objext conftest.$ac_ext
6526
6527 fi
6528 echo "$as_me:6528: result: $cf_cv_posix_c_source" >&5
6529 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6530
6531 if test "$cf_cv_posix_c_source" != no ; then
6532         CFLAGS="$cf_trim_CFLAGS"
6533         CPPFLAGS="$cf_trim_CPPFLAGS"
6534         if test "$cf_cv_cc_u_d_options" = yes ; then
6535                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6536                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6537                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6538         fi
6539         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6540 fi
6541
6542         ;;
6543 esac
6544
6545 # Work around breakage on OS X
6546
6547 echo "$as_me:6547: checking if SIGWINCH is defined" >&5
6548 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6549 if test "${cf_cv_define_sigwinch+set}" = set; then
6550   echo $ECHO_N "(cached) $ECHO_C" >&6
6551 else
6552
6553         cat >conftest.$ac_ext <<_ACEOF
6554 #line 6554 "configure"
6555 #include "confdefs.h"
6556
6557 #include <sys/types.h>
6558 #include <sys/signal.h>
6559
6560 int
6561 main ()
6562 {
6563 int x = SIGWINCH
6564   ;
6565   return 0;
6566 }
6567 _ACEOF
6568 rm -f conftest.$ac_objext
6569 if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
6570   (eval $ac_compile) 2>&5
6571   ac_status=$?
6572   echo "$as_me:6572: \$? = $ac_status" >&5
6573   (exit $ac_status); } &&
6574          { ac_try='test -s conftest.$ac_objext'
6575   { (eval echo "$as_me:6575: \"$ac_try\"") >&5
6576   (eval $ac_try) 2>&5
6577   ac_status=$?
6578   echo "$as_me:6578: \$? = $ac_status" >&5
6579   (exit $ac_status); }; }; then
6580   cf_cv_define_sigwinch=yes
6581 else
6582   echo "$as_me: failed program was:" >&5
6583 cat conftest.$ac_ext >&5
6584 cat >conftest.$ac_ext <<_ACEOF
6585 #line 6585 "configure"
6586 #include "confdefs.h"
6587
6588 #undef _XOPEN_SOURCE
6589 #undef _POSIX_SOURCE
6590 #undef _POSIX_C_SOURCE
6591 #include <sys/types.h>
6592 #include <sys/signal.h>
6593
6594 int
6595 main ()
6596 {
6597 int x = SIGWINCH
6598   ;
6599   return 0;
6600 }
6601 _ACEOF
6602 rm -f conftest.$ac_objext
6603 if { (eval echo "$as_me:6603: \"$ac_compile\"") >&5
6604   (eval $ac_compile) 2>&5
6605   ac_status=$?
6606   echo "$as_me:6606: \$? = $ac_status" >&5
6607   (exit $ac_status); } &&
6608          { ac_try='test -s conftest.$ac_objext'
6609   { (eval echo "$as_me:6609: \"$ac_try\"") >&5
6610   (eval $ac_try) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit $ac_status); }; }; then
6614   cf_cv_define_sigwinch=maybe
6615 else
6616   echo "$as_me: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6618 cf_cv_define_sigwinch=no
6619 fi
6620 rm -f conftest.$ac_objext conftest.$ac_ext
6621
6622 fi
6623 rm -f conftest.$ac_objext conftest.$ac_ext
6624
6625 fi
6626 echo "$as_me:6626: result: $cf_cv_define_sigwinch" >&5
6627 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6628
6629 if test "$cf_cv_define_sigwinch" = maybe ; then
6630 echo "$as_me:6630: checking for actual SIGWINCH definition" >&5
6631 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6632 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6633   echo $ECHO_N "(cached) $ECHO_C" >&6
6634 else
6635
6636 cf_cv_fixup_sigwinch=unknown
6637 cf_sigwinch=32
6638 while test $cf_sigwinch != 1
6639 do
6640         cat >conftest.$ac_ext <<_ACEOF
6641 #line 6641 "configure"
6642 #include "confdefs.h"
6643
6644 #undef _XOPEN_SOURCE
6645 #undef _POSIX_SOURCE
6646 #undef _POSIX_C_SOURCE
6647 #include <sys/types.h>
6648 #include <sys/signal.h>
6649
6650 int
6651 main ()
6652 {
6653
6654 #if SIGWINCH != $cf_sigwinch
6655 make an error
6656 #endif
6657 int x = SIGWINCH
6658   ;
6659   return 0;
6660 }
6661 _ACEOF
6662 rm -f conftest.$ac_objext
6663 if { (eval echo "$as_me:6663: \"$ac_compile\"") >&5
6664   (eval $ac_compile) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); } &&
6668          { ac_try='test -s conftest.$ac_objext'
6669   { (eval echo "$as_me:6669: \"$ac_try\"") >&5
6670   (eval $ac_try) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); }; }; then
6674   cf_cv_fixup_sigwinch=$cf_sigwinch
6675          break
6676 else
6677   echo "$as_me: failed program was:" >&5
6678 cat conftest.$ac_ext >&5
6679 fi
6680 rm -f conftest.$ac_objext conftest.$ac_ext
6681
6682 cf_sigwinch=`expr $cf_sigwinch - 1`
6683 done
6684
6685 fi
6686 echo "$as_me:6686: result: $cf_cv_fixup_sigwinch" >&5
6687 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6688
6689         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6690                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6691         fi
6692 fi
6693
6694 # Checks for CODESET support.
6695
6696   echo "$as_me:6696: checking for nl_langinfo and CODESET" >&5
6697 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6698 if test "${am_cv_langinfo_codeset+set}" = set; then
6699   echo $ECHO_N "(cached) $ECHO_C" >&6
6700 else
6701   cat >conftest.$ac_ext <<_ACEOF
6702 #line 6702 "configure"
6703 #include "confdefs.h"
6704 #include <langinfo.h>
6705 int
6706 main ()
6707 {
6708 char* cs = nl_langinfo(CODESET);
6709   ;
6710   return 0;
6711 }
6712 _ACEOF
6713 rm -f conftest.$ac_objext conftest$ac_exeext
6714 if { (eval echo "$as_me:6714: \"$ac_link\"") >&5
6715   (eval $ac_link) 2>&5
6716   ac_status=$?
6717   echo "$as_me:6717: \$? = $ac_status" >&5
6718   (exit $ac_status); } &&
6719          { ac_try='test -s conftest$ac_exeext'
6720   { (eval echo "$as_me:6720: \"$ac_try\"") >&5
6721   (eval $ac_try) 2>&5
6722   ac_status=$?
6723   echo "$as_me:6723: \$? = $ac_status" >&5
6724   (exit $ac_status); }; }; then
6725   am_cv_langinfo_codeset=yes
6726 else
6727   echo "$as_me: failed program was:" >&5
6728 cat conftest.$ac_ext >&5
6729 am_cv_langinfo_codeset=no
6730 fi
6731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6732
6733 fi
6734 echo "$as_me:6734: result: $am_cv_langinfo_codeset" >&5
6735 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6736   if test $am_cv_langinfo_codeset = yes; then
6737
6738 cat >>confdefs.h <<\EOF
6739 #define HAVE_LANGINFO_CODESET 1
6740 EOF
6741
6742   fi
6743
6744 # use these variables to work around a defect in gcc's fixincludes.
6745 NCURSES_OK_WCHAR_T=
6746 NCURSES_OK_WINT_T=
6747
6748 echo "$as_me:6748: checking if you want wide-character code" >&5
6749 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6750
6751 # Check whether --enable-widec or --disable-widec was given.
6752 if test "${enable_widec+set}" = set; then
6753   enableval="$enable_widec"
6754   with_widec=$enableval
6755 else
6756   with_widec=no
6757 fi;
6758 echo "$as_me:6758: result: $with_widec" >&5
6759 echo "${ECHO_T}$with_widec" >&6
6760 if test "$with_widec" = yes ; then
6761         LIB_SUFFIX="w${LIB_SUFFIX}"
6762         cat >>confdefs.h <<\EOF
6763 #define USE_WIDEC_SUPPORT 1
6764 EOF
6765
6766 echo "$as_me:6766: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6767 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6768 cat >conftest.$ac_ext <<_ACEOF
6769 #line 6769 "configure"
6770 #include "confdefs.h"
6771 #include <sys/types.h>
6772
6773 int
6774 main ()
6775 {
6776
6777 #ifndef _XOPEN_SOURCE_EXTENDED
6778 make an error
6779 #endif
6780   ;
6781   return 0;
6782 }
6783 _ACEOF
6784 rm -f conftest.$ac_objext
6785 if { (eval echo "$as_me:6785: \"$ac_compile\"") >&5
6786   (eval $ac_compile) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); } &&
6790          { ac_try='test -s conftest.$ac_objext'
6791   { (eval echo "$as_me:6791: \"$ac_try\"") >&5
6792   (eval $ac_try) 2>&5
6793   ac_status=$?
6794   echo "$as_me:6794: \$? = $ac_status" >&5
6795   (exit $ac_status); }; }; then
6796   cf_result=no
6797 else
6798   echo "$as_me: failed program was:" >&5
6799 cat conftest.$ac_ext >&5
6800 cf_result=yes
6801 fi
6802 rm -f conftest.$ac_objext conftest.$ac_ext
6803 echo "$as_me:6803: result: $cf_result" >&5
6804 echo "${ECHO_T}$cf_result" >&6
6805
6806 if test "$cf_result" = yes ; then
6807         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6808 elif test "x" != "x" ; then
6809         echo "$as_me:6809: checking checking for compatible value versus " >&5
6810 echo $ECHO_N "checking checking for compatible value versus ... $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 #if _XOPEN_SOURCE_EXTENDED- < 0
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=yes
6840 else
6841   echo "$as_me: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6843 cf_result=no
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         if test "$cf_result" = no ; then
6849                 # perhaps we can override it - try...
6850                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6851         fi
6852 fi
6853
6854         # with_overwrite=no
6855         NCURSES_CH_T=cchar_t
6856
6857 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6858 do
6859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6860 echo "$as_me:6860: checking for $ac_func" >&5
6861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6862 if eval "test \"\${$as_ac_var+set}\" = set"; then
6863   echo $ECHO_N "(cached) $ECHO_C" >&6
6864 else
6865   cat >conftest.$ac_ext <<_ACEOF
6866 #line 6866 "configure"
6867 #include "confdefs.h"
6868 /* System header to define __stub macros and hopefully few prototypes,
6869     which can conflict with char $ac_func (); below.  */
6870 #include <assert.h>
6871 /* Override any gcc2 internal prototype to avoid an error.  */
6872 #ifdef __cplusplus
6873 extern "C"
6874 #endif
6875 /* We use char because int might match the return type of a gcc2
6876    builtin and then its argument prototype would still apply.  */
6877 char $ac_func ();
6878 char (*f) ();
6879
6880 int
6881 main ()
6882 {
6883 /* The GNU C library defines this for functions which it implements
6884     to always fail with ENOSYS.  Some functions are actually named
6885     something starting with __ and the normal name is an alias.  */
6886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6887 choke me
6888 #else
6889 f = $ac_func;
6890 #endif
6891
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f conftest.$ac_objext conftest$ac_exeext
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); } &&
6902          { ac_try='test -s conftest$ac_exeext'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); }; }; then
6908   eval "$as_ac_var=yes"
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 eval "$as_ac_var=no"
6913 fi
6914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6915 fi
6916 echo "$as_me:6916: result: `eval echo '${'$as_ac_var'}'`" >&5
6917 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6918 if test `eval echo '${'$as_ac_var'}'` = yes; then
6919   cat >>confdefs.h <<EOF
6920 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6921 EOF
6922
6923 fi
6924 done
6925
6926         if test "$ac_cv_func_putwc" != yes ; then
6927
6928 echo "$as_me:6928: checking for putwc in libutf8" >&5
6929 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6930 if test "${cf_cv_libutf8+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933
6934         cf_save_LIBS="$LIBS"
6935         LIBS="-lutf8 $LIBS"
6936 cat >conftest.$ac_ext <<_ACEOF
6937 #line 6937 "configure"
6938 #include "confdefs.h"
6939
6940 #include <libutf8.h>
6941 int
6942 main ()
6943 {
6944 putwc(0,0);
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 rm -f conftest.$ac_objext conftest$ac_exeext
6950 if { (eval echo "$as_me:6950: \"$ac_link\"") >&5
6951   (eval $ac_link) 2>&5
6952   ac_status=$?
6953   echo "$as_me:6953: \$? = $ac_status" >&5
6954   (exit $ac_status); } &&
6955          { ac_try='test -s conftest$ac_exeext'
6956   { (eval echo "$as_me:6956: \"$ac_try\"") >&5
6957   (eval $ac_try) 2>&5
6958   ac_status=$?
6959   echo "$as_me:6959: \$? = $ac_status" >&5
6960   (exit $ac_status); }; }; then
6961   cf_cv_libutf8=yes
6962 else
6963   echo "$as_me: failed program was:" >&5
6964 cat conftest.$ac_ext >&5
6965 cf_cv_libutf8=no
6966 fi
6967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6968         LIBS="$cf_save_LIBS"
6969
6970 fi
6971 echo "$as_me:6971: result: $cf_cv_libutf8" >&5
6972 echo "${ECHO_T}$cf_cv_libutf8" >&6
6973
6974 if test "$cf_cv_libutf8" = yes ; then
6975         cat >>confdefs.h <<\EOF
6976 #define HAVE_LIBUTF8_H 1
6977 EOF
6978
6979         LIBS="-lutf8 $LIBS"
6980 fi
6981
6982                 if test "$cf_cv_libutf8" = yes ; then
6983                         NCURSES_LIBUTF8=1
6984                 fi
6985         fi
6986
6987 # This is needed on Tru64 5.0 to declare mbstate_t
6988 echo "$as_me:6988: checking if we must include wchar.h to declare mbstate_t" >&5
6989 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6990 if test "${cf_cv_mbstate_t+set}" = set; then
6991   echo $ECHO_N "(cached) $ECHO_C" >&6
6992 else
6993
6994 cat >conftest.$ac_ext <<_ACEOF
6995 #line 6995 "configure"
6996 #include "confdefs.h"
6997
6998 #include <stdlib.h>
6999 #include <stdarg.h>
7000 #include <stdio.h>
7001 #ifdef HAVE_LIBUTF8_H
7002 #include <libutf8.h>
7003 #endif
7004 int
7005 main ()
7006 {
7007 mbstate_t state
7008   ;
7009   return 0;
7010 }
7011 _ACEOF
7012 rm -f conftest.$ac_objext
7013 if { (eval echo "$as_me:7013: \"$ac_compile\"") >&5
7014   (eval $ac_compile) 2>&5
7015   ac_status=$?
7016   echo "$as_me:7016: \$? = $ac_status" >&5
7017   (exit $ac_status); } &&
7018          { ac_try='test -s conftest.$ac_objext'
7019   { (eval echo "$as_me:7019: \"$ac_try\"") >&5
7020   (eval $ac_try) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); }; }; then
7024   cf_cv_mbstate_t=no
7025 else
7026   echo "$as_me: failed program was:" >&5
7027 cat conftest.$ac_ext >&5
7028 cat >conftest.$ac_ext <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7031
7032 #include <stdlib.h>
7033 #include <stdarg.h>
7034 #include <stdio.h>
7035 #include <wchar.h>
7036 #ifdef HAVE_LIBUTF8_H
7037 #include <libutf8.h>
7038 #endif
7039 int
7040 main ()
7041 {
7042 mbstate_t value
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f conftest.$ac_objext
7048 if { (eval echo "$as_me:7048: \"$ac_compile\"") >&5
7049   (eval $ac_compile) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit $ac_status); } &&
7053          { ac_try='test -s conftest.$ac_objext'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit $ac_status); }; }; then
7059   cf_cv_mbstate_t=yes
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat conftest.$ac_ext >&5
7063 cf_cv_mbstate_t=unknown
7064 fi
7065 rm -f conftest.$ac_objext conftest.$ac_ext
7066 fi
7067 rm -f conftest.$ac_objext conftest.$ac_ext
7068 fi
7069 echo "$as_me:7069: result: $cf_cv_mbstate_t" >&5
7070 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7071
7072 if test "$cf_cv_mbstate_t" = yes ; then
7073         cat >>confdefs.h <<\EOF
7074 #define NEED_WCHAR_H 1
7075 EOF
7076
7077         NEED_WCHAR_H=1
7078 fi
7079
7080 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7081 if test "$cf_cv_mbstate_t" = unknown ; then
7082         NCURSES_MBSTATE_T=1
7083 fi
7084
7085 # This is needed on Tru64 5.0 to declare wchar_t
7086 echo "$as_me:7086: checking if we must include wchar.h to declare wchar_t" >&5
7087 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7088 if test "${cf_cv_wchar_t+set}" = set; then
7089   echo $ECHO_N "(cached) $ECHO_C" >&6
7090 else
7091
7092 cat >conftest.$ac_ext <<_ACEOF
7093 #line 7093 "configure"
7094 #include "confdefs.h"
7095
7096 #include <stdlib.h>
7097 #include <stdarg.h>
7098 #include <stdio.h>
7099 #ifdef HAVE_LIBUTF8_H
7100 #include <libutf8.h>
7101 #endif
7102 int
7103 main ()
7104 {
7105 wchar_t state
7106   ;
7107   return 0;
7108 }
7109 _ACEOF
7110 rm -f conftest.$ac_objext
7111 if { (eval echo "$as_me:7111: \"$ac_compile\"") >&5
7112   (eval $ac_compile) 2>&5
7113   ac_status=$?
7114   echo "$as_me:7114: \$? = $ac_status" >&5
7115   (exit $ac_status); } &&
7116          { ac_try='test -s conftest.$ac_objext'
7117   { (eval echo "$as_me:7117: \"$ac_try\"") >&5
7118   (eval $ac_try) 2>&5
7119   ac_status=$?
7120   echo "$as_me:7120: \$? = $ac_status" >&5
7121   (exit $ac_status); }; }; then
7122   cf_cv_wchar_t=no
7123 else
7124   echo "$as_me: failed program was:" >&5
7125 cat conftest.$ac_ext >&5
7126 cat >conftest.$ac_ext <<_ACEOF
7127 #line 7127 "configure"
7128 #include "confdefs.h"
7129
7130 #include <stdlib.h>
7131 #include <stdarg.h>
7132 #include <stdio.h>
7133 #include <wchar.h>
7134 #ifdef HAVE_LIBUTF8_H
7135 #include <libutf8.h>
7136 #endif
7137 int
7138 main ()
7139 {
7140 wchar_t value
7141   ;
7142   return 0;
7143 }
7144 _ACEOF
7145 rm -f conftest.$ac_objext
7146 if { (eval echo "$as_me:7146: \"$ac_compile\"") >&5
7147   (eval $ac_compile) 2>&5
7148   ac_status=$?
7149   echo "$as_me:7149: \$? = $ac_status" >&5
7150   (exit $ac_status); } &&
7151          { ac_try='test -s conftest.$ac_objext'
7152   { (eval echo "$as_me:7152: \"$ac_try\"") >&5
7153   (eval $ac_try) 2>&5
7154   ac_status=$?
7155   echo "$as_me:7155: \$? = $ac_status" >&5
7156   (exit $ac_status); }; }; then
7157   cf_cv_wchar_t=yes
7158 else
7159   echo "$as_me: failed program was:" >&5
7160 cat conftest.$ac_ext >&5
7161 cf_cv_wchar_t=unknown
7162 fi
7163 rm -f conftest.$ac_objext conftest.$ac_ext
7164 fi
7165 rm -f conftest.$ac_objext conftest.$ac_ext
7166 fi
7167 echo "$as_me:7167: result: $cf_cv_wchar_t" >&5
7168 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7169
7170 if test "$cf_cv_wchar_t" = yes ; then
7171         cat >>confdefs.h <<\EOF
7172 #define NEED_WCHAR_H 1
7173 EOF
7174
7175         NEED_WCHAR_H=1
7176 fi
7177
7178 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7179 if test "$cf_cv_wchar_t" = unknown ; then
7180         NCURSES_WCHAR_T=1
7181 fi
7182
7183 # if we find wchar_t in either place, use substitution to provide a fallback.
7184 if test "$cf_cv_wchar_t" != unknown ; then
7185         NCURSES_OK_WCHAR_T=1
7186 fi
7187
7188 # This is needed on Tru64 5.0 to declare wint_t
7189 echo "$as_me:7189: checking if we must include wchar.h to declare wint_t" >&5
7190 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7191 if test "${cf_cv_wint_t+set}" = set; then
7192   echo $ECHO_N "(cached) $ECHO_C" >&6
7193 else
7194
7195 cat >conftest.$ac_ext <<_ACEOF
7196 #line 7196 "configure"
7197 #include "confdefs.h"
7198
7199 #include <stdlib.h>
7200 #include <stdarg.h>
7201 #include <stdio.h>
7202 #ifdef HAVE_LIBUTF8_H
7203 #include <libutf8.h>
7204 #endif
7205 int
7206 main ()
7207 {
7208 wint_t state
7209   ;
7210   return 0;
7211 }
7212 _ACEOF
7213 rm -f conftest.$ac_objext
7214 if { (eval echo "$as_me:7214: \"$ac_compile\"") >&5
7215   (eval $ac_compile) 2>&5
7216   ac_status=$?
7217   echo "$as_me:7217: \$? = $ac_status" >&5
7218   (exit $ac_status); } &&
7219          { ac_try='test -s conftest.$ac_objext'
7220   { (eval echo "$as_me:7220: \"$ac_try\"") >&5
7221   (eval $ac_try) 2>&5
7222   ac_status=$?
7223   echo "$as_me:7223: \$? = $ac_status" >&5
7224   (exit $ac_status); }; }; then
7225   cf_cv_wint_t=no
7226 else
7227   echo "$as_me: failed program was:" >&5
7228 cat conftest.$ac_ext >&5
7229 cat >conftest.$ac_ext <<_ACEOF
7230 #line 7230 "configure"
7231 #include "confdefs.h"
7232
7233 #include <stdlib.h>
7234 #include <stdarg.h>
7235 #include <stdio.h>
7236 #include <wchar.h>
7237 #ifdef HAVE_LIBUTF8_H
7238 #include <libutf8.h>
7239 #endif
7240 int
7241 main ()
7242 {
7243 wint_t value
7244   ;
7245   return 0;
7246 }
7247 _ACEOF
7248 rm -f conftest.$ac_objext
7249 if { (eval echo "$as_me:7249: \"$ac_compile\"") >&5
7250   (eval $ac_compile) 2>&5
7251   ac_status=$?
7252   echo "$as_me:7252: \$? = $ac_status" >&5
7253   (exit $ac_status); } &&
7254          { ac_try='test -s conftest.$ac_objext'
7255   { (eval echo "$as_me:7255: \"$ac_try\"") >&5
7256   (eval $ac_try) 2>&5
7257   ac_status=$?
7258   echo "$as_me:7258: \$? = $ac_status" >&5
7259   (exit $ac_status); }; }; then
7260   cf_cv_wint_t=yes
7261 else
7262   echo "$as_me: failed program was:" >&5
7263 cat conftest.$ac_ext >&5
7264 cf_cv_wint_t=unknown
7265 fi
7266 rm -f conftest.$ac_objext conftest.$ac_ext
7267 fi
7268 rm -f conftest.$ac_objext conftest.$ac_ext
7269 fi
7270 echo "$as_me:7270: result: $cf_cv_wint_t" >&5
7271 echo "${ECHO_T}$cf_cv_wint_t" >&6
7272
7273 if test "$cf_cv_wint_t" = yes ; then
7274         cat >>confdefs.h <<\EOF
7275 #define NEED_WCHAR_H 1
7276 EOF
7277
7278         NEED_WCHAR_H=1
7279 fi
7280
7281 # if we do not find wint_t in either place, use substitution to provide a fallback.
7282 if test "$cf_cv_wint_t" = unknown ; then
7283         NCURSES_WINT_T=1
7284 fi
7285
7286 # if we find wint_t in either place, use substitution to provide a fallback.
7287 if test "$cf_cv_wint_t" != unknown ; then
7288         NCURSES_OK_WINT_T=1
7289 fi
7290
7291         if test "$NCURSES_MBSTATE_T" != 0; then
7292                 cat >>confdefs.h <<\EOF
7293 #define NEED_MBSTATE_T_DEF 1
7294 EOF
7295
7296         fi
7297 fi
7298
7299 ###   use option --disable-lp64 to allow long chtype
7300 case $cf_cv_abi_version in
7301 [345]*)
7302         default_with_lp64=no
7303         ;;
7304 *)
7305         default_with_lp64=yes
7306         ;;
7307 esac
7308
7309 echo "$as_me:7309: checking whether to enable _LP64 definition in curses.h" >&5
7310 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7311
7312 # Check whether --enable-lp64 or --disable-lp64 was given.
7313 if test "${enable_lp64+set}" = set; then
7314   enableval="$enable_lp64"
7315   with_lp64=$enableval
7316 else
7317   with_lp64=$default_with_lp64
7318 fi;
7319 echo "$as_me:7319: result: $with_lp64" >&5
7320 echo "${ECHO_T}$with_lp64" >&6
7321
7322 if test "$with_lp64" = yes ; then
7323         cf_cv_enable_lp64=1
7324 else
7325         cf_cv_enable_lp64=0
7326 fi
7327
7328 # Check whether --enable-largefile or --disable-largefile was given.
7329 if test "${enable_largefile+set}" = set; then
7330   enableval="$enable_largefile"
7331
7332 fi;
7333 if test "$enable_largefile" != no; then
7334
7335   echo "$as_me:7335: checking for special C compiler options needed for large files" >&5
7336 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7337 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7338   echo $ECHO_N "(cached) $ECHO_C" >&6
7339 else
7340   ac_cv_sys_largefile_CC=no
7341      if test "$GCC" != yes; then
7342        ac_save_CC=$CC
7343        while :; do
7344          # IRIX 6.2 and later do not support large files by default,
7345          # so use the C compiler's -n32 option if that helps.
7346          cat >conftest.$ac_ext <<_ACEOF
7347 #line 7347 "configure"
7348 #include "confdefs.h"
7349 #include <sys/types.h>
7350  /* Check that off_t can represent 2**63 - 1 correctly.
7351     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7352     since some C++ compilers masquerading as C compilers
7353     incorrectly reject 9223372036854775807.  */
7354 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7355   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7356                        && LARGE_OFF_T % 2147483647 == 1)
7357                       ? 1 : -1];
7358 int
7359 main ()
7360 {
7361
7362   ;
7363   return 0;
7364 }
7365 _ACEOF
7366          rm -f conftest.$ac_objext
7367 if { (eval echo "$as_me:7367: \"$ac_compile\"") >&5
7368   (eval $ac_compile) 2>&5
7369   ac_status=$?
7370   echo "$as_me:7370: \$? = $ac_status" >&5
7371   (exit $ac_status); } &&
7372          { ac_try='test -s conftest.$ac_objext'
7373   { (eval echo "$as_me:7373: \"$ac_try\"") >&5
7374   (eval $ac_try) 2>&5
7375   ac_status=$?
7376   echo "$as_me:7376: \$? = $ac_status" >&5
7377   (exit $ac_status); }; }; then
7378   break
7379 else
7380   echo "$as_me: failed program was:" >&5
7381 cat conftest.$ac_ext >&5
7382 fi
7383 rm -f conftest.$ac_objext
7384          CC="$CC -n32"
7385          rm -f conftest.$ac_objext
7386 if { (eval echo "$as_me:7386: \"$ac_compile\"") >&5
7387   (eval $ac_compile) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit $ac_status); } &&
7391          { ac_try='test -s conftest.$ac_objext'
7392   { (eval echo "$as_me:7392: \"$ac_try\"") >&5
7393   (eval $ac_try) 2>&5
7394   ac_status=$?
7395   echo "$as_me:7395: \$? = $ac_status" >&5
7396   (exit $ac_status); }; }; then
7397   ac_cv_sys_largefile_CC=' -n32'; break
7398 else
7399   echo "$as_me: failed program was:" >&5
7400 cat conftest.$ac_ext >&5
7401 fi
7402 rm -f conftest.$ac_objext
7403          break
7404        done
7405        CC=$ac_save_CC
7406        rm -f conftest.$ac_ext
7407     fi
7408 fi
7409 echo "$as_me:7409: result: $ac_cv_sys_largefile_CC" >&5
7410 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7411   if test "$ac_cv_sys_largefile_CC" != no; then
7412     CC=$CC$ac_cv_sys_largefile_CC
7413   fi
7414
7415   echo "$as_me:7415: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7416 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7417 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7418   echo $ECHO_N "(cached) $ECHO_C" >&6
7419 else
7420   while :; do
7421   ac_cv_sys_file_offset_bits=no
7422   cat >conftest.$ac_ext <<_ACEOF
7423 #line 7423 "configure"
7424 #include "confdefs.h"
7425 #include <sys/types.h>
7426  /* Check that off_t can represent 2**63 - 1 correctly.
7427     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7428     since some C++ compilers masquerading as C compilers
7429     incorrectly reject 9223372036854775807.  */
7430 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7431   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7432                        && LARGE_OFF_T % 2147483647 == 1)
7433                       ? 1 : -1];
7434 int
7435 main ()
7436 {
7437
7438   ;
7439   return 0;
7440 }
7441 _ACEOF
7442 rm -f conftest.$ac_objext
7443 if { (eval echo "$as_me:7443: \"$ac_compile\"") >&5
7444   (eval $ac_compile) 2>&5
7445   ac_status=$?
7446   echo "$as_me:7446: \$? = $ac_status" >&5
7447   (exit $ac_status); } &&
7448          { ac_try='test -s conftest.$ac_objext'
7449   { (eval echo "$as_me:7449: \"$ac_try\"") >&5
7450   (eval $ac_try) 2>&5
7451   ac_status=$?
7452   echo "$as_me:7452: \$? = $ac_status" >&5
7453   (exit $ac_status); }; }; then
7454   break
7455 else
7456   echo "$as_me: failed program was:" >&5
7457 cat conftest.$ac_ext >&5
7458 fi
7459 rm -f conftest.$ac_objext conftest.$ac_ext
7460   cat >conftest.$ac_ext <<_ACEOF
7461 #line 7461 "configure"
7462 #include "confdefs.h"
7463 #define _FILE_OFFSET_BITS 64
7464 #include <sys/types.h>
7465  /* Check that off_t can represent 2**63 - 1 correctly.
7466     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7467     since some C++ compilers masquerading as C compilers
7468     incorrectly reject 9223372036854775807.  */
7469 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7470   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7471                        && LARGE_OFF_T % 2147483647 == 1)
7472                       ? 1 : -1];
7473 int
7474 main ()
7475 {
7476
7477   ;
7478   return 0;
7479 }
7480 _ACEOF
7481 rm -f conftest.$ac_objext
7482 if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483   (eval $ac_compile) 2>&5
7484   ac_status=$?
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit $ac_status); } &&
7487          { ac_try='test -s conftest.$ac_objext'
7488   { (eval echo "$as_me:7488: \"$ac_try\"") >&5
7489   (eval $ac_try) 2>&5
7490   ac_status=$?
7491   echo "$as_me:7491: \$? = $ac_status" >&5
7492   (exit $ac_status); }; }; then
7493   ac_cv_sys_file_offset_bits=64; break
7494 else
7495   echo "$as_me: failed program was:" >&5
7496 cat conftest.$ac_ext >&5
7497 fi
7498 rm -f conftest.$ac_objext conftest.$ac_ext
7499   break
7500 done
7501 fi
7502 echo "$as_me:7502: result: $ac_cv_sys_file_offset_bits" >&5
7503 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7504 if test "$ac_cv_sys_file_offset_bits" != no; then
7505
7506 cat >>confdefs.h <<EOF
7507 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7508 EOF
7509
7510 fi
7511 rm -f conftest*
7512   echo "$as_me:7512: checking for _LARGE_FILES value needed for large files" >&5
7513 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7514 if test "${ac_cv_sys_large_files+set}" = set; then
7515   echo $ECHO_N "(cached) $ECHO_C" >&6
7516 else
7517   while :; do
7518   ac_cv_sys_large_files=no
7519   cat >conftest.$ac_ext <<_ACEOF
7520 #line 7520 "configure"
7521 #include "confdefs.h"
7522 #include <sys/types.h>
7523  /* Check that off_t can represent 2**63 - 1 correctly.
7524     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7525     since some C++ compilers masquerading as C compilers
7526     incorrectly reject 9223372036854775807.  */
7527 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7528   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7529                        && LARGE_OFF_T % 2147483647 == 1)
7530                       ? 1 : -1];
7531 int
7532 main ()
7533 {
7534
7535   ;
7536   return 0;
7537 }
7538 _ACEOF
7539 rm -f conftest.$ac_objext
7540 if { (eval echo "$as_me:7540: \"$ac_compile\"") >&5
7541   (eval $ac_compile) 2>&5
7542   ac_status=$?
7543   echo "$as_me:7543: \$? = $ac_status" >&5
7544   (exit $ac_status); } &&
7545          { ac_try='test -s conftest.$ac_objext'
7546   { (eval echo "$as_me:7546: \"$ac_try\"") >&5
7547   (eval $ac_try) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); }; }; then
7551   break
7552 else
7553   echo "$as_me: failed program was:" >&5
7554 cat conftest.$ac_ext >&5
7555 fi
7556 rm -f conftest.$ac_objext conftest.$ac_ext
7557   cat >conftest.$ac_ext <<_ACEOF
7558 #line 7558 "configure"
7559 #include "confdefs.h"
7560 #define _LARGE_FILES 1
7561 #include <sys/types.h>
7562  /* Check that off_t can represent 2**63 - 1 correctly.
7563     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7564     since some C++ compilers masquerading as C compilers
7565     incorrectly reject 9223372036854775807.  */
7566 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7567   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7568                        && LARGE_OFF_T % 2147483647 == 1)
7569                       ? 1 : -1];
7570 int
7571 main ()
7572 {
7573
7574   ;
7575   return 0;
7576 }
7577 _ACEOF
7578 rm -f conftest.$ac_objext
7579 if { (eval echo "$as_me:7579: \"$ac_compile\"") >&5
7580   (eval $ac_compile) 2>&5
7581   ac_status=$?
7582   echo "$as_me:7582: \$? = $ac_status" >&5
7583   (exit $ac_status); } &&
7584          { ac_try='test -s conftest.$ac_objext'
7585   { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7586   (eval $ac_try) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); }; }; then
7590   ac_cv_sys_large_files=1; break
7591 else
7592   echo "$as_me: failed program was:" >&5
7593 cat conftest.$ac_ext >&5
7594 fi
7595 rm -f conftest.$ac_objext conftest.$ac_ext
7596   break
7597 done
7598 fi
7599 echo "$as_me:7599: result: $ac_cv_sys_large_files" >&5
7600 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7601 if test "$ac_cv_sys_large_files" != no; then
7602
7603 cat >>confdefs.h <<EOF
7604 #define _LARGE_FILES $ac_cv_sys_large_files
7605 EOF
7606
7607 fi
7608 rm -f conftest*
7609 fi
7610
7611     if test "$enable_largefile" != no ; then
7612         echo "$as_me:7612: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7613 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7614 if test "${ac_cv_sys_largefile_source+set}" = set; then
7615   echo $ECHO_N "(cached) $ECHO_C" >&6
7616 else
7617   while :; do
7618   ac_cv_sys_largefile_source=no
7619   cat >conftest.$ac_ext <<_ACEOF
7620 #line 7620 "configure"
7621 #include "confdefs.h"
7622 #include <stdio.h>
7623 int
7624 main ()
7625 {
7626 return !fseeko;
7627   ;
7628   return 0;
7629 }
7630 _ACEOF
7631 rm -f conftest.$ac_objext
7632 if { (eval echo "$as_me:7632: \"$ac_compile\"") >&5
7633   (eval $ac_compile) 2>&5
7634   ac_status=$?
7635   echo "$as_me:7635: \$? = $ac_status" >&5
7636   (exit $ac_status); } &&
7637          { ac_try='test -s conftest.$ac_objext'
7638   { (eval echo "$as_me:7638: \"$ac_try\"") >&5
7639   (eval $ac_try) 2>&5
7640   ac_status=$?
7641   echo "$as_me:7641: \$? = $ac_status" >&5
7642   (exit $ac_status); }; }; then
7643   break
7644 else
7645   echo "$as_me: failed program was:" >&5
7646 cat conftest.$ac_ext >&5
7647 fi
7648 rm -f conftest.$ac_objext conftest.$ac_ext
7649   cat >conftest.$ac_ext <<_ACEOF
7650 #line 7650 "configure"
7651 #include "confdefs.h"
7652 #define _LARGEFILE_SOURCE 1
7653 #include <stdio.h>
7654 int
7655 main ()
7656 {
7657 return !fseeko;
7658   ;
7659   return 0;
7660 }
7661 _ACEOF
7662 rm -f conftest.$ac_objext
7663 if { (eval echo "$as_me:7663: \"$ac_compile\"") >&5
7664   (eval $ac_compile) 2>&5
7665   ac_status=$?
7666   echo "$as_me:7666: \$? = $ac_status" >&5
7667   (exit $ac_status); } &&
7668          { ac_try='test -s conftest.$ac_objext'
7669   { (eval echo "$as_me:7669: \"$ac_try\"") >&5
7670   (eval $ac_try) 2>&5
7671   ac_status=$?
7672   echo "$as_me:7672: \$? = $ac_status" >&5
7673   (exit $ac_status); }; }; then
7674   ac_cv_sys_largefile_source=1; break
7675 else
7676   echo "$as_me: failed program was:" >&5
7677 cat conftest.$ac_ext >&5
7678 fi
7679 rm -f conftest.$ac_objext conftest.$ac_ext
7680   break
7681 done
7682 fi
7683 echo "$as_me:7683: result: $ac_cv_sys_largefile_source" >&5
7684 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7685 if test "$ac_cv_sys_largefile_source" != no; then
7686
7687 cat >>confdefs.h <<EOF
7688 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7689 EOF
7690
7691 fi
7692 rm -f conftest*
7693
7694 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7695 # in glibc 2.1.3, but that breaks too many other things.
7696 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7697 echo "$as_me:7697: checking for fseeko" >&5
7698 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7699 if test "${ac_cv_func_fseeko+set}" = set; then
7700   echo $ECHO_N "(cached) $ECHO_C" >&6
7701 else
7702   cat >conftest.$ac_ext <<_ACEOF
7703 #line 7703 "configure"
7704 #include "confdefs.h"
7705 #include <stdio.h>
7706 int
7707 main ()
7708 {
7709 return fseeko && fseeko (stdin, 0, 0);
7710   ;
7711   return 0;
7712 }
7713 _ACEOF
7714 rm -f conftest.$ac_objext conftest$ac_exeext
7715 if { (eval echo "$as_me:7715: \"$ac_link\"") >&5
7716   (eval $ac_link) 2>&5
7717   ac_status=$?
7718   echo "$as_me:7718: \$? = $ac_status" >&5
7719   (exit $ac_status); } &&
7720          { ac_try='test -s conftest$ac_exeext'
7721   { (eval echo "$as_me:7721: \"$ac_try\"") >&5
7722   (eval $ac_try) 2>&5
7723   ac_status=$?
7724   echo "$as_me:7724: \$? = $ac_status" >&5
7725   (exit $ac_status); }; }; then
7726   ac_cv_func_fseeko=yes
7727 else
7728   echo "$as_me: failed program was:" >&5
7729 cat conftest.$ac_ext >&5
7730 ac_cv_func_fseeko=no
7731 fi
7732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7733 fi
7734 echo "$as_me:7734: result: $ac_cv_func_fseeko" >&5
7735 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7736 if test $ac_cv_func_fseeko = yes; then
7737
7738 cat >>confdefs.h <<\EOF
7739 #define HAVE_FSEEKO 1
7740 EOF
7741
7742 fi
7743
7744         # Normally we would collect these definitions in the config.h,
7745         # but (like _XOPEN_SOURCE), some environments rely on having these
7746         # defined before any of the system headers are included.  Another
7747         # case comes up with C++, e.g., on AIX the compiler compiles the
7748         # header files by themselves before looking at the body files it is
7749         # told to compile.  For ncurses, those header files do not include
7750         # the config.h
7751         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7752         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7753
7754         echo "$as_me:7754: checking whether to use struct dirent64" >&5
7755 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7756 if test "${cf_cv_struct_dirent64+set}" = set; then
7757   echo $ECHO_N "(cached) $ECHO_C" >&6
7758 else
7759
7760                 cat >conftest.$ac_ext <<_ACEOF
7761 #line 7761 "configure"
7762 #include "confdefs.h"
7763
7764 #include <sys/types.h>
7765 #include <dirent.h>
7766
7767 int
7768 main ()
7769 {
7770
7771                 /* if transitional largefile support is setup, this is true */
7772                 extern struct dirent64 * readdir(DIR *);
7773                 struct dirent64 *x = readdir((DIR *)0);
7774                 struct dirent *y = readdir((DIR *)0);
7775                 int z = x - y;
7776
7777   ;
7778   return 0;
7779 }
7780 _ACEOF
7781 rm -f conftest.$ac_objext
7782 if { (eval echo "$as_me:7782: \"$ac_compile\"") >&5
7783   (eval $ac_compile) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit $ac_status); } &&
7787          { ac_try='test -s conftest.$ac_objext'
7788   { (eval echo "$as_me:7788: \"$ac_try\"") >&5
7789   (eval $ac_try) 2>&5
7790   ac_status=$?
7791   echo "$as_me:7791: \$? = $ac_status" >&5
7792   (exit $ac_status); }; }; then
7793   cf_cv_struct_dirent64=yes
7794 else
7795   echo "$as_me: failed program was:" >&5
7796 cat conftest.$ac_ext >&5
7797 cf_cv_struct_dirent64=no
7798 fi
7799 rm -f conftest.$ac_objext conftest.$ac_ext
7800
7801 fi
7802 echo "$as_me:7802: result: $cf_cv_struct_dirent64" >&5
7803 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7804         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7805 #define HAVE_STRUCT_DIRENT64 1
7806 EOF
7807
7808     fi
7809
7810 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7811 echo "$as_me:7811: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7812 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7813
7814 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7815 if test "${enable_tparm_varargs+set}" = set; then
7816   enableval="$enable_tparm_varargs"
7817   with_tparm_varargs=$enableval
7818 else
7819   with_tparm_varargs=yes
7820 fi;
7821 echo "$as_me:7821: result: $with_tparm_varargs" >&5
7822 echo "${ECHO_T}$with_tparm_varargs" >&6
7823 NCURSES_TPARM_VARARGS=0
7824 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7825
7826 ###   use option --with-bool to override bool's type
7827 echo "$as_me:7827: checking for type of bool" >&5
7828 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7829
7830 # Check whether --with-bool or --without-bool was given.
7831 if test "${with_bool+set}" = set; then
7832   withval="$with_bool"
7833   NCURSES_BOOL="$withval"
7834 else
7835   NCURSES_BOOL=auto
7836 fi;
7837 echo "$as_me:7837: result: $NCURSES_BOOL" >&5
7838 echo "${ECHO_T}$NCURSES_BOOL" >&6
7839
7840 echo "$as_me:7840: checking for alternate terminal capabilities file" >&5
7841 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7842
7843 # Check whether --with-caps or --without-caps was given.
7844 if test "${with_caps+set}" = set; then
7845   withval="$with_caps"
7846   TERMINFO_CAPS=Caps.$withval
7847 else
7848   TERMINFO_CAPS=Caps
7849 fi;
7850 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7851 echo "$as_me:7851: result: $TERMINFO_CAPS" >&5
7852 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7853
7854 ###   use option --with-chtype to override chtype's type
7855 echo "$as_me:7855: checking for type of chtype" >&5
7856 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7857
7858 # Check whether --with-chtype or --without-chtype was given.
7859 if test "${with_chtype+set}" = set; then
7860   withval="$with_chtype"
7861   NCURSES_CHTYPE="$withval"
7862 else
7863   NCURSES_CHTYPE=auto
7864 fi;
7865 echo "$as_me:7865: result: $NCURSES_CHTYPE" >&5
7866 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7867
7868 ###   use option --with-ospeed to override ospeed's type
7869 echo "$as_me:7869: checking for type of ospeed" >&5
7870 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7871
7872 # Check whether --with-ospeed or --without-ospeed was given.
7873 if test "${with_ospeed+set}" = set; then
7874   withval="$with_ospeed"
7875   NCURSES_OSPEED="$withval"
7876 else
7877   NCURSES_OSPEED=short
7878 fi;
7879 echo "$as_me:7879: result: $NCURSES_OSPEED" >&5
7880 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7881
7882 ###   use option --with-mmask-t to override mmask_t's type
7883 echo "$as_me:7883: checking for type of mmask_t" >&5
7884 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7885
7886 # Check whether --with-mmask-t or --without-mmask-t was given.
7887 if test "${with_mmask_t+set}" = set; then
7888   withval="$with_mmask_t"
7889   NCURSES_MMASK_T="$withval"
7890 else
7891   NCURSES_MMASK_T=auto
7892 fi;
7893 echo "$as_me:7893: result: $NCURSES_MMASK_T" >&5
7894 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7895
7896 ### Enable compiling-in rcs id's
7897 echo "$as_me:7897: checking if RCS identifiers should be compiled-in" >&5
7898 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7899
7900 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7901 if test "${with_rcs_ids+set}" = set; then
7902   withval="$with_rcs_ids"
7903   with_rcs_ids=$withval
7904 else
7905   with_rcs_ids=no
7906 fi;
7907 echo "$as_me:7907: result: $with_rcs_ids" >&5
7908 echo "${ECHO_T}$with_rcs_ids" >&6
7909 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7910 #define USE_RCS_IDS 1
7911 EOF
7912
7913 ###############################################################################
7914
7915 echo "$as_me:7915: checking format of man-pages" >&5
7916 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7917
7918 # Check whether --with-manpage-format or --without-manpage-format was given.
7919 if test "${with_manpage_format+set}" = set; then
7920   withval="$with_manpage_format"
7921   MANPAGE_FORMAT=$withval
7922 else
7923   MANPAGE_FORMAT=unknown
7924 fi;
7925
7926 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7927 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7928
7929 cf_unknown=
7930
7931 case $MANPAGE_FORMAT in
7932 unknown)
7933   if test -z "$MANPATH" ; then
7934     MANPATH="/usr/man:/usr/share/man"
7935   fi
7936
7937   # look for the 'date' man-page (it's most likely to be installed!)
7938   MANPAGE_FORMAT=
7939   cf_preform=no
7940   cf_catonly=yes
7941   cf_example=date
7942
7943   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7944   for cf_dir in $MANPATH; do
7945     test -z "$cf_dir" && cf_dir=/usr/man
7946     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
7947     do
7948       cf_test=`echo $cf_name | sed -e 's/*//'`
7949       if test "x$cf_test" = "x$cf_name" ; then
7950
7951         case "$cf_name" in
7952         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7953         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7954         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7955         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7956         esac
7957
7958         case "$cf_name" in
7959         $cf_dir/man*)
7960           cf_catonly=no
7961           ;;
7962         $cf_dir/cat*)
7963           cf_preform=yes
7964           ;;
7965         esac
7966         break
7967       fi
7968
7969       # if we found a match in either man* or cat*, stop looking
7970       if test -n "$MANPAGE_FORMAT" ; then
7971         cf_found=no
7972         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7973         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7974         case "$cf_name" in
7975         $cf_dir/cat*)
7976           cf_found=yes
7977           ;;
7978         esac
7979         test $cf_found=yes && break
7980       fi
7981     done
7982     # only check the first directory in $MANPATH where we find manpages
7983     if test -n "$MANPAGE_FORMAT" ; then
7984        break
7985     fi
7986   done
7987   # if we did not find the example, just assume it is normal
7988   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7989   IFS="$ac_save_ifs"
7990   ;;
7991 *)
7992   for cf_option in $MANPAGE_FORMAT; do
7993      case $cf_option in #(vi
7994      gzip|compress|BSDI|normal|formatted|catonly)
7995        ;;
7996      *)
7997        cf_unknown="$cf_unknown $cf_option"
7998        ;;
7999      esac
8000   done
8001   ;;
8002 esac
8003
8004 echo "$as_me:8004: result: $MANPAGE_FORMAT" >&5
8005 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8006 if test -n "$cf_unknown" ; then
8007   { echo "$as_me:8007: WARNING: Unexpected manpage-format $cf_unknown" >&5
8008 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8009 fi
8010
8011 echo "$as_me:8011: checking for manpage renaming" >&5
8012 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8013
8014 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8015 if test "${with_manpage_renames+set}" = set; then
8016   withval="$with_manpage_renames"
8017   MANPAGE_RENAMES=$withval
8018 else
8019   MANPAGE_RENAMES=yes
8020 fi;
8021
8022 case ".$MANPAGE_RENAMES" in #(vi
8023 .no) #(vi
8024   ;;
8025 .|.yes)
8026   # Debian 'man' program?
8027   if test -f /etc/debian_version ; then
8028     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8029   else
8030     MANPAGE_RENAMES=no
8031   fi
8032   ;;
8033 esac
8034
8035 if test "$MANPAGE_RENAMES" != no ; then
8036   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8037     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8038   elif test ! -f $MANPAGE_RENAMES ; then
8039     { { echo "$as_me:8039: error: not a filename: $MANPAGE_RENAMES" >&5
8040 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8041    { (exit 1); exit 1; }; }
8042   fi
8043
8044   test ! -d man && mkdir man
8045
8046   # Construct a sed-script to perform renaming within man-pages
8047   if test -n "$MANPAGE_RENAMES" ; then
8048     test ! -d man && mkdir man
8049     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8050   fi
8051 fi
8052
8053 echo "$as_me:8053: result: $MANPAGE_RENAMES" >&5
8054 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8055
8056 echo "$as_me:8056: checking if manpage aliases will be installed" >&5
8057 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8058
8059 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8060 if test "${with_manpage_aliases+set}" = set; then
8061   withval="$with_manpage_aliases"
8062   MANPAGE_ALIASES=$withval
8063 else
8064   MANPAGE_ALIASES=yes
8065 fi;
8066
8067 echo "$as_me:8067: result: $MANPAGE_ALIASES" >&5
8068 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8069
8070 if test "$LN_S" = "ln -s"; then
8071         cf_use_symlinks=yes
8072 else
8073         cf_use_symlinks=no
8074 fi
8075
8076 MANPAGE_SYMLINKS=no
8077 if test "$MANPAGE_ALIASES" = yes ; then
8078 echo "$as_me:8078: checking if manpage symlinks should be used" >&5
8079 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8080
8081 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8082 if test "${with_manpage_symlinks+set}" = set; then
8083   withval="$with_manpage_symlinks"
8084   MANPAGE_SYMLINKS=$withval
8085 else
8086   MANPAGE_SYMLINKS=$cf_use_symlinks
8087 fi;
8088
8089 if test "$$cf_use_symlinks" = no; then
8090 if test "$MANPAGE_SYMLINKS" = yes ; then
8091         { echo "$as_me:8091: WARNING: cannot make symlinks" >&5
8092 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8093         MANPAGE_SYMLINKS=no
8094 fi
8095 fi
8096
8097 echo "$as_me:8097: result: $MANPAGE_SYMLINKS" >&5
8098 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8099 fi
8100
8101 echo "$as_me:8101: checking for manpage tbl" >&5
8102 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8103
8104 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8105 if test "${with_manpage_tbl+set}" = set; then
8106   withval="$with_manpage_tbl"
8107   MANPAGE_TBL=$withval
8108 else
8109   MANPAGE_TBL=no
8110 fi;
8111
8112 echo "$as_me:8112: result: $MANPAGE_TBL" >&5
8113 echo "${ECHO_T}$MANPAGE_TBL" >&6
8114
8115   if test "$prefix" = "NONE" ; then
8116      cf_prefix="$ac_default_prefix"
8117   else
8118      cf_prefix="$prefix"
8119   fi
8120
8121   case "$MANPAGE_FORMAT" in # (vi
8122   *catonly*) # (vi
8123     cf_format=yes
8124     cf_inboth=no
8125     ;;
8126   *formatted*) # (vi
8127     cf_format=yes
8128     cf_inboth=yes
8129     ;;
8130   *)
8131     cf_format=no
8132     cf_inboth=no
8133     ;;
8134   esac
8135
8136 test ! -d man && mkdir man
8137
8138 cf_so_strip=
8139 cf_compress=
8140 case "$MANPAGE_FORMAT" in #(vi
8141 *compress*) #(vi
8142         cf_so_strip="Z"
8143         cf_compress=compress
8144   ;;
8145 *gzip*) #(vi
8146         cf_so_strip="gz"
8147         cf_compress=gzip
8148   ;;
8149 esac
8150
8151 cf_edit_man=./edit_man.sh
8152 cf_man_alias=`pwd`/man_alias.sed
8153
8154 cat >$cf_edit_man <<CF_EOF
8155 #! /bin/sh
8156 # this script is generated by the configure-script CF_MAN_PAGES macro.
8157
8158 prefix="$cf_prefix"
8159 datadir="$datadir"
8160
8161 NCURSES_MAJOR="$NCURSES_MAJOR"
8162 NCURSES_MINOR="$NCURSES_MINOR"
8163 NCURSES_PATCH="$NCURSES_PATCH"
8164
8165 NCURSES_OSPEED="$NCURSES_OSPEED"
8166 TERMINFO="$TERMINFO"
8167
8168 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8169
8170 INSTALL="$INSTALL"
8171 INSTALL_DATA="$INSTALL_DATA"
8172
8173 transform="$program_transform_name"
8174
8175 TMP=\${TMPDIR-/tmp}/man\$\$
8176 trap "rm -f \$TMP" 0 1 2 5 15
8177
8178 form=\$1
8179 shift || exit 1
8180
8181 verb=\$1
8182 shift || exit 1
8183
8184 mandir=\$1
8185 shift || exit 1
8186
8187 srcdir=\$1
8188 top_srcdir=\$srcdir/..
8189 shift || exit 1
8190
8191 if test "\$form" = normal ; then
8192         if test "$cf_format" = yes ; then
8193         if test "$cf_inboth" = no ; then
8194                 sh \$0 format \$verb \$mandir \$srcdir \$*
8195                 exit $?
8196         fi
8197         fi
8198         cf_subdir=\$mandir/man
8199         cf_tables=$MANPAGE_TBL
8200 else
8201         cf_subdir=\$mandir/cat
8202         cf_tables=yes
8203 fi
8204
8205 # process the list of source-files
8206 for i in \$* ; do
8207 case \$i in #(vi
8208 *.orig|*.rej) ;; #(vi
8209 *.[0-9]*)
8210         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8211         if test \$verb = installing ; then
8212         if test ! -d \$cf_subdir\${section} ; then
8213                 \$MKDIRS \$cf_subdir\$section
8214         fi
8215         fi
8216
8217         # replace variables in man page
8218         if test ! -f $cf_man_alias ; then
8219 cat >>$cf_man_alias <<-CF_EOF2
8220                 s,@DATADIR@,\$datadir,g
8221                 s,@TERMINFO@,\$TERMINFO,g
8222                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8223                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8224                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8225                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8226 CF_EOF
8227
8228         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8229         do
8230                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8231                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8232 cat >>$cf_edit_man <<-CF_EOF
8233                 s,@$cf_NAME@,$cf_name,
8234 CF_EOF
8235         done
8236
8237 cat >>$cf_edit_man <<CF_EOF
8238 CF_EOF2
8239                 echo "...made $cf_man_alias"
8240         fi
8241
8242         aliases=
8243         cf_source=\`basename \$i\`
8244         inalias=\$cf_source
8245         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8246         if test ! -f \$inalias ; then
8247                 echo .. skipped \$cf_source
8248                 continue
8249         fi
8250 CF_EOF
8251
8252 if test "$MANPAGE_ALIASES" != no ; then
8253 cat >>$cf_edit_man <<CF_EOF
8254         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8255 CF_EOF
8256 fi
8257
8258 if test "$MANPAGE_RENAMES" = no ; then
8259 cat >>$cf_edit_man <<CF_EOF
8260         # perform program transformations for section 1 man pages
8261         if test \$section = 1 ; then
8262                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8263         else
8264                 cf_target=\$cf_subdir\${section}/\$cf_source
8265         fi
8266 CF_EOF
8267 else
8268 cat >>$cf_edit_man <<CF_EOF
8269         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8270         if test -z "\$cf_target" ; then
8271                 echo '? missing rename for '\$cf_source
8272                 cf_target="\$cf_source"
8273         fi
8274         cf_target="\$cf_subdir\${section}/\${cf_target}"
8275
8276 CF_EOF
8277 fi
8278
8279 cat >>$cf_edit_man <<CF_EOF
8280         sed     -f $cf_man_alias \\
8281 CF_EOF
8282
8283 if test -f $MANPAGE_RENAMES ; then
8284 cat >>$cf_edit_man <<CF_EOF
8285                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8286 CF_EOF
8287 else
8288 cat >>$cf_edit_man <<CF_EOF
8289                 < \$i >\$TMP
8290 CF_EOF
8291 fi
8292
8293 cat >>$cf_edit_man <<CF_EOF
8294 if test \$cf_tables = yes ; then
8295         tbl \$TMP >\$TMP.out
8296         mv \$TMP.out \$TMP
8297 fi
8298 CF_EOF
8299
8300 if test $with_curses_h != yes ; then
8301 cat >>$cf_edit_man <<CF_EOF
8302         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8303         mv \$TMP.out \$TMP
8304 CF_EOF
8305 fi
8306
8307 cat >>$cf_edit_man <<CF_EOF
8308         if test \$form = format ; then
8309                 nroff -man \$TMP >\$TMP.out
8310                 mv \$TMP.out \$TMP
8311         fi
8312 CF_EOF
8313
8314 if test -n "$cf_compress" ; then
8315 cat >>$cf_edit_man <<CF_EOF
8316         if test \$verb = installing ; then
8317         if ( $cf_compress -f \$TMP )
8318         then
8319                 mv \$TMP.$cf_so_strip \$TMP
8320         fi
8321         fi
8322         cf_target="\$cf_target.$cf_so_strip"
8323 CF_EOF
8324 fi
8325
8326 case "$MANPAGE_FORMAT" in #(vi
8327 *BSDI*)
8328 cat >>$cf_edit_man <<CF_EOF
8329         if test \$form = format ; then
8330                 # BSDI installs only .0 suffixes in the cat directories
8331                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8332         fi
8333 CF_EOF
8334   ;;
8335 esac
8336
8337 cat >>$cf_edit_man <<CF_EOF
8338         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8339         if test \$verb = installing ; then
8340                 echo \$verb \$cf_target
8341                 \$INSTALL_DATA \$TMP \$cf_target
8342                 test -d \$cf_subdir\${section} &&
8343                 test -n "\$aliases" && (
8344                         cd \$cf_subdir\${section} && (
8345                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8346                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8347                                 cf_target=\`basename \$cf_target\`
8348                                 for cf_alias in \$aliases
8349                                 do
8350                                         if test \$section = 1 ; then
8351                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8352                                         fi
8353
8354                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8355                                                 if test -f \$cf_alias\${suffix} ; then
8356                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8357                                                         then
8358                                                                 continue
8359                                                         fi
8360                                                 fi
8361                                                 echo .. \$verb alias \$cf_alias\${suffix}
8362                                                 rm -f \$cf_alias\${suffix}
8363                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8364                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8365                                                 echo ".so \$cf_source" >\$TMP
8366 CF_EOF
8367 if test -n "$cf_compress" ; then
8368 cat >>$cf_edit_man <<CF_EOF
8369                                                 if test -n "$cf_so_strip" ; then
8370                                                         $cf_compress -f \$TMP
8371                                                         mv \$TMP.$cf_so_strip \$TMP
8372                                                 fi
8373 CF_EOF
8374 fi
8375 cat >>$cf_edit_man <<CF_EOF
8376                                                 echo .. \$verb alias \$cf_alias\${suffix}
8377                                                 rm -f \$cf_alias\${suffix}
8378                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8379                                         fi
8380                                 done
8381                         )
8382                 )
8383         elif test \$verb = removing ; then
8384                 test -f \$cf_target && (
8385                         echo \$verb \$cf_target
8386                         rm -f \$cf_target
8387                 )
8388                 test -d \$cf_subdir\${section} &&
8389                 test -n "\$aliases" && (
8390                         cd \$cf_subdir\${section} && (
8391                                 for cf_alias in \$aliases
8392                                 do
8393                                         if test \$section = 1 ; then
8394                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8395                                         fi
8396
8397                                         echo .. \$verb alias \$cf_alias\${suffix}
8398                                         rm -f \$cf_alias\${suffix}
8399                                 done
8400                         )
8401                 )
8402         else
8403 #               echo ".hy 0"
8404                 cat \$TMP
8405         fi
8406         ;;
8407 esac
8408 done
8409
8410 if test $cf_inboth = yes ; then
8411 if test \$form != format ; then
8412         sh \$0 format \$verb \$mandir \$srcdir \$*
8413 fi
8414 fi
8415
8416 exit 0
8417 CF_EOF
8418 chmod 755 $cf_edit_man
8419
8420 ###############################################################################
8421
8422 ### Note that some functions (such as const) are normally disabled anyway.
8423 echo "$as_me:8423: checking if you want to build with function extensions" >&5
8424 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8425
8426 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8427 if test "${enable_ext_funcs+set}" = set; then
8428   enableval="$enable_ext_funcs"
8429   with_ext_funcs=$enableval
8430 else
8431   with_ext_funcs=yes
8432 fi;
8433 echo "$as_me:8433: result: $with_ext_funcs" >&5
8434 echo "${ECHO_T}$with_ext_funcs" >&6
8435 if test "$with_ext_funcs" = yes ; then
8436         NCURSES_EXT_FUNCS=1
8437         cat >>confdefs.h <<\EOF
8438 #define HAVE_CURSES_VERSION 1
8439 EOF
8440
8441         cat >>confdefs.h <<\EOF
8442 #define HAVE_HAS_KEY 1
8443 EOF
8444
8445         cat >>confdefs.h <<\EOF
8446 #define HAVE_RESIZETERM 1
8447 EOF
8448
8449         cat >>confdefs.h <<\EOF
8450 #define HAVE_RESIZE_TERM 1
8451 EOF
8452
8453         cat >>confdefs.h <<\EOF
8454 #define HAVE_USE_DEFAULT_COLORS 1
8455 EOF
8456
8457         cat >>confdefs.h <<\EOF
8458 #define HAVE_WRESIZE 1
8459 EOF
8460
8461         cat >>confdefs.h <<\EOF
8462 #define NCURSES_EXT_FUNCS 1
8463 EOF
8464
8465 else
8466         NCURSES_EXT_FUNCS=0
8467 fi
8468
8469 ###   use option --enable-const to turn on use of const beyond that in XSI.
8470 echo "$as_me:8470: checking for extended use of const keyword" >&5
8471 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8472
8473 # Check whether --enable-const or --disable-const was given.
8474 if test "${enable_const+set}" = set; then
8475   enableval="$enable_const"
8476   with_ext_const=$enableval
8477 else
8478   with_ext_const=no
8479 fi;
8480 echo "$as_me:8480: result: $with_ext_const" >&5
8481 echo "${ECHO_T}$with_ext_const" >&6
8482 NCURSES_CONST='/*nothing*/'
8483 if test "$with_ext_const" = yes ; then
8484         NCURSES_CONST=const
8485 fi
8486
8487 echo "$as_me:8487: checking if you want \$NCURSES_NO_PADDING code" >&5
8488 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8489
8490 # Check whether --enable-no-padding or --disable-no-padding was given.
8491 if test "${enable_no_padding+set}" = set; then
8492   enableval="$enable_no_padding"
8493   with_no_padding=$enableval
8494 else
8495   with_no_padding=$with_ext_funcs
8496 fi;
8497 echo "$as_me:8497: result: $with_no_padding" >&5
8498 echo "${ECHO_T}$with_no_padding" >&6
8499 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8500 #define NCURSES_NO_PADDING 1
8501 EOF
8502
8503 echo "$as_me:8503: checking for ANSI C header files" >&5
8504 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8505 if test "${ac_cv_header_stdc+set}" = set; then
8506   echo $ECHO_N "(cached) $ECHO_C" >&6
8507 else
8508   cat >conftest.$ac_ext <<_ACEOF
8509 #line 8509 "configure"
8510 #include "confdefs.h"
8511 #include <stdlib.h>
8512 #include <stdarg.h>
8513 #include <string.h>
8514 #include <float.h>
8515
8516 _ACEOF
8517 if { (eval echo "$as_me:8517: \"$ac_cpp conftest.$ac_ext\"") >&5
8518   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8519   ac_status=$?
8520   egrep -v '^ *\+' conftest.er1 >conftest.err
8521   rm -f conftest.er1
8522   cat conftest.err >&5
8523   echo "$as_me:8523: \$? = $ac_status" >&5
8524   (exit $ac_status); } >/dev/null; then
8525   if test -s conftest.err; then
8526     ac_cpp_err=$ac_c_preproc_warn_flag
8527   else
8528     ac_cpp_err=
8529   fi
8530 else
8531   ac_cpp_err=yes
8532 fi
8533 if test -z "$ac_cpp_err"; then
8534   ac_cv_header_stdc=yes
8535 else
8536   echo "$as_me: failed program was:" >&5
8537   cat conftest.$ac_ext >&5
8538   ac_cv_header_stdc=no
8539 fi
8540 rm -f conftest.err conftest.$ac_ext
8541
8542 if test $ac_cv_header_stdc = yes; then
8543   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8544   cat >conftest.$ac_ext <<_ACEOF
8545 #line 8545 "configure"
8546 #include "confdefs.h"
8547 #include <string.h>
8548
8549 _ACEOF
8550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8551   egrep "memchr" >/dev/null 2>&1; then
8552   :
8553 else
8554   ac_cv_header_stdc=no
8555 fi
8556 rm -f conftest*
8557
8558 fi
8559
8560 if test $ac_cv_header_stdc = yes; then
8561   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8562   cat >conftest.$ac_ext <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 #include <stdlib.h>
8566
8567 _ACEOF
8568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8569   egrep "free" >/dev/null 2>&1; then
8570   :
8571 else
8572   ac_cv_header_stdc=no
8573 fi
8574 rm -f conftest*
8575
8576 fi
8577
8578 if test $ac_cv_header_stdc = yes; then
8579   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8580   if test "$cross_compiling" = yes; then
8581   :
8582 else
8583   cat >conftest.$ac_ext <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586 #include <ctype.h>
8587 #if ((' ' & 0x0FF) == 0x020)
8588 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8589 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8590 #else
8591 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8592                      || ('j' <= (c) && (c) <= 'r') \
8593                      || ('s' <= (c) && (c) <= 'z'))
8594 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8595 #endif
8596
8597 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8598 int
8599 main ()
8600 {
8601   int i;
8602   for (i = 0; i < 256; i++)
8603     if (XOR (islower (i), ISLOWER (i))
8604         || toupper (i) != TOUPPER (i))
8605       $ac_main_return(2);
8606   $ac_main_return (0);
8607 }
8608 _ACEOF
8609 rm -f conftest$ac_exeext
8610 if { (eval echo "$as_me:8610: \"$ac_link\"") >&5
8611   (eval $ac_link) 2>&5
8612   ac_status=$?
8613   echo "$as_me:8613: \$? = $ac_status" >&5
8614   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8615   { (eval echo "$as_me:8615: \"$ac_try\"") >&5
8616   (eval $ac_try) 2>&5
8617   ac_status=$?
8618   echo "$as_me:8618: \$? = $ac_status" >&5
8619   (exit $ac_status); }; }; then
8620   :
8621 else
8622   echo "$as_me: program exited with status $ac_status" >&5
8623 echo "$as_me: failed program was:" >&5
8624 cat conftest.$ac_ext >&5
8625 ac_cv_header_stdc=no
8626 fi
8627 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8628 fi
8629 fi
8630 fi
8631 echo "$as_me:8631: result: $ac_cv_header_stdc" >&5
8632 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8633 if test $ac_cv_header_stdc = yes; then
8634
8635 cat >>confdefs.h <<\EOF
8636 #define STDC_HEADERS 1
8637 EOF
8638
8639 fi
8640
8641 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8642
8643 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8644                   inttypes.h stdint.h unistd.h
8645 do
8646 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8647 echo "$as_me:8647: checking for $ac_header" >&5
8648 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8649 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8650   echo $ECHO_N "(cached) $ECHO_C" >&6
8651 else
8652   cat >conftest.$ac_ext <<_ACEOF
8653 #line 8653 "configure"
8654 #include "confdefs.h"
8655 $ac_includes_default
8656 #include <$ac_header>
8657 _ACEOF
8658 rm -f conftest.$ac_objext
8659 if { (eval echo "$as_me:8659: \"$ac_compile\"") >&5
8660   (eval $ac_compile) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit $ac_status); } &&
8664          { ac_try='test -s conftest.$ac_objext'
8665   { (eval echo "$as_me:8665: \"$ac_try\"") >&5
8666   (eval $ac_try) 2>&5
8667   ac_status=$?
8668   echo "$as_me:8668: \$? = $ac_status" >&5
8669   (exit $ac_status); }; }; then
8670   eval "$as_ac_Header=yes"
8671 else
8672   echo "$as_me: failed program was:" >&5
8673 cat conftest.$ac_ext >&5
8674 eval "$as_ac_Header=no"
8675 fi
8676 rm -f conftest.$ac_objext conftest.$ac_ext
8677 fi
8678 echo "$as_me:8678: result: `eval echo '${'$as_ac_Header'}'`" >&5
8679 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8680 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8681   cat >>confdefs.h <<EOF
8682 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8683 EOF
8684
8685 fi
8686 done
8687
8688 echo "$as_me:8688: checking for signed char" >&5
8689 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8690 if test "${ac_cv_type_signed_char+set}" = set; then
8691   echo $ECHO_N "(cached) $ECHO_C" >&6
8692 else
8693   cat >conftest.$ac_ext <<_ACEOF
8694 #line 8694 "configure"
8695 #include "confdefs.h"
8696 $ac_includes_default
8697 int
8698 main ()
8699 {
8700 if ((signed char *) 0)
8701   return 0;
8702 if (sizeof (signed char))
8703   return 0;
8704   ;
8705   return 0;
8706 }
8707 _ACEOF
8708 rm -f conftest.$ac_objext
8709 if { (eval echo "$as_me:8709: \"$ac_compile\"") >&5
8710   (eval $ac_compile) 2>&5
8711   ac_status=$?
8712   echo "$as_me:8712: \$? = $ac_status" >&5
8713   (exit $ac_status); } &&
8714          { ac_try='test -s conftest.$ac_objext'
8715   { (eval echo "$as_me:8715: \"$ac_try\"") >&5
8716   (eval $ac_try) 2>&5
8717   ac_status=$?
8718   echo "$as_me:8718: \$? = $ac_status" >&5
8719   (exit $ac_status); }; }; then
8720   ac_cv_type_signed_char=yes
8721 else
8722   echo "$as_me: failed program was:" >&5
8723 cat conftest.$ac_ext >&5
8724 ac_cv_type_signed_char=no
8725 fi
8726 rm -f conftest.$ac_objext conftest.$ac_ext
8727 fi
8728 echo "$as_me:8728: result: $ac_cv_type_signed_char" >&5
8729 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8730
8731 echo "$as_me:8731: checking size of signed char" >&5
8732 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8733 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8734   echo $ECHO_N "(cached) $ECHO_C" >&6
8735 else
8736   if test "$ac_cv_type_signed_char" = yes; then
8737   if test "$cross_compiling" = yes; then
8738   # Depending upon the size, compute the lo and hi bounds.
8739 cat >conftest.$ac_ext <<_ACEOF
8740 #line 8740 "configure"
8741 #include "confdefs.h"
8742 $ac_includes_default
8743 int
8744 main ()
8745 {
8746 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 rm -f conftest.$ac_objext
8752 if { (eval echo "$as_me:8752: \"$ac_compile\"") >&5
8753   (eval $ac_compile) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); } &&
8757          { ac_try='test -s conftest.$ac_objext'
8758   { (eval echo "$as_me:8758: \"$ac_try\"") >&5
8759   (eval $ac_try) 2>&5
8760   ac_status=$?
8761   echo "$as_me:8761: \$? = $ac_status" >&5
8762   (exit $ac_status); }; }; then
8763   ac_lo=0 ac_mid=0
8764   while :; do
8765     cat >conftest.$ac_ext <<_ACEOF
8766 #line 8766 "configure"
8767 #include "confdefs.h"
8768 $ac_includes_default
8769 int
8770 main ()
8771 {
8772 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8773   ;
8774   return 0;
8775 }
8776 _ACEOF
8777 rm -f conftest.$ac_objext
8778 if { (eval echo "$as_me:8778: \"$ac_compile\"") >&5
8779   (eval $ac_compile) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); } &&
8783          { ac_try='test -s conftest.$ac_objext'
8784   { (eval echo "$as_me:8784: \"$ac_try\"") >&5
8785   (eval $ac_try) 2>&5
8786   ac_status=$?
8787   echo "$as_me:8787: \$? = $ac_status" >&5
8788   (exit $ac_status); }; }; then
8789   ac_hi=$ac_mid; break
8790 else
8791   echo "$as_me: failed program was:" >&5
8792 cat conftest.$ac_ext >&5
8793 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8794 fi
8795 rm -f conftest.$ac_objext conftest.$ac_ext
8796   done
8797 else
8798   echo "$as_me: failed program was:" >&5
8799 cat conftest.$ac_ext >&5
8800 ac_hi=-1 ac_mid=-1
8801   while :; do
8802     cat >conftest.$ac_ext <<_ACEOF
8803 #line 8803 "configure"
8804 #include "confdefs.h"
8805 $ac_includes_default
8806 int
8807 main ()
8808 {
8809 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8810   ;
8811   return 0;
8812 }
8813 _ACEOF
8814 rm -f conftest.$ac_objext
8815 if { (eval echo "$as_me:8815: \"$ac_compile\"") >&5
8816   (eval $ac_compile) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); } &&
8820          { ac_try='test -s conftest.$ac_objext'
8821   { (eval echo "$as_me:8821: \"$ac_try\"") >&5
8822   (eval $ac_try) 2>&5
8823   ac_status=$?
8824   echo "$as_me:8824: \$? = $ac_status" >&5
8825   (exit $ac_status); }; }; then
8826   ac_lo=$ac_mid; break
8827 else
8828   echo "$as_me: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8831 fi
8832 rm -f conftest.$ac_objext conftest.$ac_ext
8833   done
8834 fi
8835 rm -f conftest.$ac_objext conftest.$ac_ext
8836 # Binary search between lo and hi bounds.
8837 while test "x$ac_lo" != "x$ac_hi"; do
8838   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8839   cat >conftest.$ac_ext <<_ACEOF
8840 #line 8840 "configure"
8841 #include "confdefs.h"
8842 $ac_includes_default
8843 int
8844 main ()
8845 {
8846 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8847   ;
8848   return 0;
8849 }
8850 _ACEOF
8851 rm -f conftest.$ac_objext
8852 if { (eval echo "$as_me:8852: \"$ac_compile\"") >&5
8853   (eval $ac_compile) 2>&5
8854   ac_status=$?
8855   echo "$as_me:8855: \$? = $ac_status" >&5
8856   (exit $ac_status); } &&
8857          { ac_try='test -s conftest.$ac_objext'
8858   { (eval echo "$as_me:8858: \"$ac_try\"") >&5
8859   (eval $ac_try) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); }; }; then
8863   ac_hi=$ac_mid
8864 else
8865   echo "$as_me: failed program was:" >&5
8866 cat conftest.$ac_ext >&5
8867 ac_lo=`expr $ac_mid + 1`
8868 fi
8869 rm -f conftest.$ac_objext conftest.$ac_ext
8870 done
8871 ac_cv_sizeof_signed_char=$ac_lo
8872 else
8873   if test "$cross_compiling" = yes; then
8874   { { echo "$as_me:8874: error: cannot run test program while cross compiling" >&5
8875 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8876    { (exit 1); exit 1; }; }
8877 else
8878   cat >conftest.$ac_ext <<_ACEOF
8879 #line 8879 "configure"
8880 #include "confdefs.h"
8881 $ac_includes_default
8882 int
8883 main ()
8884 {
8885 FILE *f = fopen ("conftest.val", "w");
8886 if (!f)
8887   $ac_main_return (1);
8888 fprintf (f, "%d", (sizeof (signed char)));
8889 fclose (f);
8890   ;
8891   return 0;
8892 }
8893 _ACEOF
8894 rm -f conftest$ac_exeext
8895 if { (eval echo "$as_me:8895: \"$ac_link\"") >&5
8896   (eval $ac_link) 2>&5
8897   ac_status=$?
8898   echo "$as_me:8898: \$? = $ac_status" >&5
8899   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8900   { (eval echo "$as_me:8900: \"$ac_try\"") >&5
8901   (eval $ac_try) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); }; }; then
8905   ac_cv_sizeof_signed_char=`cat conftest.val`
8906 else
8907   echo "$as_me: program exited with status $ac_status" >&5
8908 echo "$as_me: failed program was:" >&5
8909 cat conftest.$ac_ext >&5
8910 fi
8911 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8912 fi
8913 fi
8914 rm -f conftest.val
8915 else
8916   ac_cv_sizeof_signed_char=0
8917 fi
8918 fi
8919 echo "$as_me:8919: result: $ac_cv_sizeof_signed_char" >&5
8920 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8921 cat >>confdefs.h <<EOF
8922 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8923 EOF
8924
8925 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8926         NCURSES_SBOOL="signed char"
8927 else
8928         NCURSES_SBOOL="char"
8929 fi
8930 echo "$as_me:8930: checking if you want to use signed Boolean array in term.h" >&5
8931 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8932
8933 # Check whether --enable-signed-char or --disable-signed-char was given.
8934 if test "${enable_signed_char+set}" = set; then
8935   enableval="$enable_signed_char"
8936   with_signed_char=$enableval
8937 else
8938   with_signed_char=no
8939 fi;
8940 echo "$as_me:8940: result: $with_signed_char" >&5
8941 echo "${ECHO_T}$with_signed_char" >&6
8942 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8943
8944 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8945 echo "$as_me:8945: checking if you want SIGWINCH handler" >&5
8946 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8947
8948 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8949 if test "${enable_sigwinch+set}" = set; then
8950   enableval="$enable_sigwinch"
8951   with_sigwinch=$enableval
8952 else
8953   with_sigwinch=$with_ext_funcs
8954 fi;
8955 echo "$as_me:8955: result: $with_sigwinch" >&5
8956 echo "${ECHO_T}$with_sigwinch" >&6
8957 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8958 #define USE_SIGWINCH 1
8959 EOF
8960
8961 ###   use option --enable-tcap-names to allow user to define new capabilities
8962 echo "$as_me:8962: checking if you want user-definable terminal capabilities like termcap" >&5
8963 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8964
8965 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8966 if test "${enable_tcap_names+set}" = set; then
8967   enableval="$enable_tcap_names"
8968   with_tcap_names=$enableval
8969 else
8970   with_tcap_names=$with_ext_funcs
8971 fi;
8972 echo "$as_me:8972: result: $with_tcap_names" >&5
8973 echo "${ECHO_T}$with_tcap_names" >&6
8974 NCURSES_XNAMES=0
8975 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8976
8977 ###############################################################################
8978 # These options are relatively safe to experiment with.
8979
8980 echo "$as_me:8980: checking if you want all development code" >&5
8981 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8982
8983 # Check whether --with-develop or --without-develop was given.
8984 if test "${with_develop+set}" = set; then
8985   withval="$with_develop"
8986   with_develop=$withval
8987 else
8988   with_develop=no
8989 fi;
8990 echo "$as_me:8990: result: $with_develop" >&5
8991 echo "${ECHO_T}$with_develop" >&6
8992
8993 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8994 echo "$as_me:8994: checking if you want hard-tabs code" >&5
8995 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8996
8997 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8998 if test "${enable_hard_tabs+set}" = set; then
8999   enableval="$enable_hard_tabs"
9000
9001 else
9002   enable_hard_tabs=$with_develop
9003 fi;
9004 echo "$as_me:9004: result: $enable_hard_tabs" >&5
9005 echo "${ECHO_T}$enable_hard_tabs" >&6
9006 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9007 #define USE_HARD_TABS 1
9008 EOF
9009
9010 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9011 echo "$as_me:9011: checking if you want limited support for xmc" >&5
9012 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9013
9014 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9015 if test "${enable_xmc_glitch+set}" = set; then
9016   enableval="$enable_xmc_glitch"
9017
9018 else
9019   enable_xmc_glitch=$with_develop
9020 fi;
9021 echo "$as_me:9021: result: $enable_xmc_glitch" >&5
9022 echo "${ECHO_T}$enable_xmc_glitch" >&6
9023 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9024 #define USE_XMC_SUPPORT 1
9025 EOF
9026
9027 ###############################################################################
9028 # These are just experimental, probably should not be in a package:
9029
9030 echo "$as_me:9030: checking if you do not want to assume colors are white-on-black" >&5
9031 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9032
9033 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9034 if test "${enable_assumed_color+set}" = set; then
9035   enableval="$enable_assumed_color"
9036   with_assumed_color=$enableval
9037 else
9038   with_assumed_color=yes
9039 fi;
9040 echo "$as_me:9040: result: $with_assumed_color" >&5
9041 echo "${ECHO_T}$with_assumed_color" >&6
9042 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9043 #define USE_ASSUMED_COLOR 1
9044 EOF
9045
9046 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9047 echo "$as_me:9047: checking if you want hashmap scrolling-optimization code" >&5
9048 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9049
9050 # Check whether --enable-hashmap or --disable-hashmap was given.
9051 if test "${enable_hashmap+set}" = set; then
9052   enableval="$enable_hashmap"
9053   with_hashmap=$enableval
9054 else
9055   with_hashmap=yes
9056 fi;
9057 echo "$as_me:9057: result: $with_hashmap" >&5
9058 echo "${ECHO_T}$with_hashmap" >&6
9059 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9060 #define USE_HASHMAP 1
9061 EOF
9062
9063 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9064 echo "$as_me:9064: checking if you want colorfgbg code" >&5
9065 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9066
9067 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9068 if test "${enable_colorfgbg+set}" = set; then
9069   enableval="$enable_colorfgbg"
9070   with_colorfgbg=$enableval
9071 else
9072   with_colorfgbg=no
9073 fi;
9074 echo "$as_me:9074: result: $with_colorfgbg" >&5
9075 echo "${ECHO_T}$with_colorfgbg" >&6
9076 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9077 #define USE_COLORFGBG 1
9078 EOF
9079
9080 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9081 echo "$as_me:9081: checking if you want to use experimental extended colors" >&5
9082 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9083
9084 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9085 if test "${enable_ext_colors+set}" = set; then
9086   enableval="$enable_ext_colors"
9087   with_ext_colors=$enableval
9088 else
9089   with_ext_colors=no
9090 fi;
9091 echo "$as_me:9091: result: $with_ext_colors" >&5
9092 echo "${ECHO_T}$with_ext_colors" >&6
9093 NCURSES_EXT_COLORS=0
9094 if test "$with_ext_colors" = yes ; then
9095         if test "$with_widec" != yes ; then
9096                 { { echo "$as_me:9096: error: This option applies only to wide-character library" >&5
9097 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9098    { (exit 1); exit 1; }; }
9099         else
9100                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9101
9102 if test "${with_abi_version+set}" != set; then
9103         case $cf_cv_rel_version in
9104         5.*)
9105                 cf_cv_rel_version=6.0
9106                 cf_cv_abi_version=6
9107                 { echo "$as_me:9107: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9108 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9109                 ;;
9110         esac
9111 fi
9112
9113         fi
9114         NCURSES_EXT_COLORS=1
9115         cat >>confdefs.h <<\EOF
9116 #define NCURSES_EXT_COLORS 1
9117 EOF
9118
9119 fi
9120
9121 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9122 echo "$as_me:9122: checking if you want to use experimental extended mouse encoding" >&5
9123 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9124
9125 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9126 if test "${enable_ext_mouse+set}" = set; then
9127   enableval="$enable_ext_mouse"
9128   with_ext_mouse=$enableval
9129 else
9130   with_ext_mouse=no
9131 fi;
9132 echo "$as_me:9132: result: $with_ext_mouse" >&5
9133 echo "${ECHO_T}$with_ext_mouse" >&6
9134 NCURSES_MOUSE_VERSION=1
9135 if test "$with_ext_mouse" = yes ; then
9136         NCURSES_MOUSE_VERSION=2
9137
9138 if test "${with_abi_version+set}" != set; then
9139         case $cf_cv_rel_version in
9140         5.*)
9141                 cf_cv_rel_version=6.0
9142                 cf_cv_abi_version=6
9143                 { echo "$as_me:9143: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9144 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9145                 ;;
9146         esac
9147 fi
9148
9149 fi
9150
9151 # Reentrant code has to be opaque; there's little advantage to making ncurses
9152 # opaque outside of that, so there is no --enable-opaque option.
9153 echo "$as_me:9153: checking if you want experimental reentrant code" >&5
9154 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9155
9156 # Check whether --enable-reentrant or --disable-reentrant was given.
9157 if test "${enable_reentrant+set}" = set; then
9158   enableval="$enable_reentrant"
9159   with_reentrant=$enableval
9160 else
9161   with_reentrant=no
9162 fi;
9163 echo "$as_me:9163: result: $with_reentrant" >&5
9164 echo "${ECHO_T}$with_reentrant" >&6
9165 if test "$with_reentrant" = yes ; then
9166         cf_cv_enable_reentrant=1
9167         cf_cv_enable_opaque="NCURSES_INTERNALS"
9168         NCURSES_OPAQUE=1
9169         NCURSES_SIZE_T=int
9170         LIB_SUFFIX="t${LIB_SUFFIX}"
9171         cat >>confdefs.h <<\EOF
9172 #define USE_REENTRANT 1
9173 EOF
9174
9175 if test "${with_abi_version+set}" != set; then
9176         case $cf_cv_rel_version in
9177         5.*)
9178                 cf_cv_rel_version=6.0
9179                 cf_cv_abi_version=6
9180                 { echo "$as_me:9180: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9181 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9182                 ;;
9183         esac
9184 fi
9185
9186 else
9187         cf_cv_enable_reentrant=0
9188         cf_cv_enable_opaque="NCURSES_OPAQUE"
9189         NCURSES_OPAQUE=0
9190         NCURSES_SIZE_T=short
9191 fi
9192
9193 echo "$as_me:9193: checking if you want experimental safe-sprintf code" >&5
9194 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9195
9196 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9197 if test "${enable_safe_sprintf+set}" = set; then
9198   enableval="$enable_safe_sprintf"
9199   with_safe_sprintf=$enableval
9200 else
9201   with_safe_sprintf=no
9202 fi;
9203 echo "$as_me:9203: result: $with_safe_sprintf" >&5
9204 echo "${ECHO_T}$with_safe_sprintf" >&6
9205 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9206 #define USE_SAFE_SPRINTF 1
9207 EOF
9208
9209 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9210 # when hashmap is used scroll hints are useless
9211 if test "$with_hashmap" = no ; then
9212 echo "$as_me:9212: checking if you want to experiment without scrolling-hints code" >&5
9213 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9214
9215 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9216 if test "${enable_scroll_hints+set}" = set; then
9217   enableval="$enable_scroll_hints"
9218   with_scroll_hints=$enableval
9219 else
9220   with_scroll_hints=yes
9221 fi;
9222 echo "$as_me:9222: result: $with_scroll_hints" >&5
9223 echo "${ECHO_T}$with_scroll_hints" >&6
9224 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9225 #define USE_SCROLL_HINTS 1
9226 EOF
9227
9228 fi
9229
9230 echo "$as_me:9230: checking if you want experimental wgetch-events code" >&5
9231 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9232
9233 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9234 if test "${enable_wgetch_events+set}" = set; then
9235   enableval="$enable_wgetch_events"
9236   with_wgetch_events=$enableval
9237 else
9238   with_wgetch_events=no
9239 fi;
9240 echo "$as_me:9240: result: $with_wgetch_events" >&5
9241 echo "${ECHO_T}$with_wgetch_events" >&6
9242 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9243 #define NCURSES_WGETCH_EVENTS 1
9244 EOF
9245
9246 ###############################################################################
9247
9248 ###     use option --disable-echo to suppress full display compiling commands
9249 echo "$as_me:9249: checking if you want to display full commands during build" >&5
9250 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9251
9252 # Check whether --enable-echo or --disable-echo was given.
9253 if test "${enable_echo+set}" = set; then
9254   enableval="$enable_echo"
9255   with_echo=$enableval
9256 else
9257   with_echo=yes
9258 fi;
9259 if test "$with_echo" = yes; then
9260         ECHO_LINK=
9261 else
9262         ECHO_LINK='@ echo linking $@ ... ;'
9263         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9264 fi
9265 echo "$as_me:9265: result: $with_echo" >&5
9266 echo "${ECHO_T}$with_echo" >&6
9267
9268 ###     use option --enable-warnings to turn on all gcc warnings
9269 echo "$as_me:9269: checking if you want to see compiler warnings" >&5
9270 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9271
9272 # Check whether --enable-warnings or --disable-warnings was given.
9273 if test "${enable_warnings+set}" = set; then
9274   enableval="$enable_warnings"
9275   with_warnings=$enableval
9276 fi;
9277 echo "$as_me:9277: result: $with_warnings" >&5
9278 echo "${ECHO_T}$with_warnings" >&6
9279
9280 if test -n "$with_warnings"; then
9281         ADAFLAGS="$ADAFLAGS -gnatg"
9282
9283 INTEL_COMPILER=no
9284
9285 if test "$GCC" = yes ; then
9286         case $host_os in
9287         linux*|gnu*)
9288                 echo "$as_me:9288: checking if this is really Intel C compiler" >&5
9289 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9290                 cf_save_CFLAGS="$CFLAGS"
9291                 CFLAGS="$CFLAGS -no-gcc"
9292                 cat >conftest.$ac_ext <<_ACEOF
9293 #line 9293 "configure"
9294 #include "confdefs.h"
9295
9296 int
9297 main ()
9298 {
9299
9300 #ifdef __INTEL_COMPILER
9301 #else
9302 make an error
9303 #endif
9304
9305   ;
9306   return 0;
9307 }
9308 _ACEOF
9309 rm -f conftest.$ac_objext
9310 if { (eval echo "$as_me:9310: \"$ac_compile\"") >&5
9311   (eval $ac_compile) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit $ac_status); } &&
9315          { ac_try='test -s conftest.$ac_objext'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit $ac_status); }; }; then
9321   INTEL_COMPILER=yes
9322 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9323
9324 else
9325   echo "$as_me: failed program was:" >&5
9326 cat conftest.$ac_ext >&5
9327 fi
9328 rm -f conftest.$ac_objext conftest.$ac_ext
9329                 CFLAGS="$cf_save_CFLAGS"
9330                 echo "$as_me:9330: result: $INTEL_COMPILER" >&5
9331 echo "${ECHO_T}$INTEL_COMPILER" >&6
9332                 ;;
9333         esac
9334 fi
9335
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9337 "configure"
9338 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9339 EOF
9340
9341 if test "$INTEL_COMPILER" = yes
9342 then
9343 # The "-wdXXX" options suppress warnings:
9344 # remark #1419: external declaration in primary source file
9345 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9346 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9347 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9348 # remark #193: zero used for undefined preprocessing identifier
9349 # remark #593: variable "curs_sb_left_arrow" was set but never used
9350 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9351 # remark #869: parameter "tw" was never referenced
9352 # remark #981: operands are evaluated in unspecified order
9353 # warning #269: invalid format string conversion
9354
9355         { echo "$as_me:9355: checking for $CC warning options..." >&5
9356 echo "$as_me: checking for $CC warning options..." >&6;}
9357         cf_save_CFLAGS="$CFLAGS"
9358         EXTRA_CFLAGS="-Wall"
9359         for cf_opt in  \
9360                 wd1419 \
9361                 wd1682 \
9362                 wd1683 \
9363                 wd1684 \
9364                 wd193 \
9365                 wd279 \
9366                 wd593 \
9367                 wd810 \
9368                 wd869 \
9369                 wd981
9370         do
9371                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9372                 if { (eval echo "$as_me:9372: \"$ac_compile\"") >&5
9373   (eval $ac_compile) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); }; then
9377                         test -n "$verbose" && echo "$as_me:9377: result: ... -$cf_opt" >&5
9378 echo "${ECHO_T}... -$cf_opt" >&6
9379                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9380                 fi
9381         done
9382         CFLAGS="$cf_save_CFLAGS"
9383
9384 elif test "$GCC" = yes
9385 then
9386         { echo "$as_me:9386: checking for $CC warning options..." >&5
9387 echo "$as_me: checking for $CC warning options..." >&6;}
9388         cf_save_CFLAGS="$CFLAGS"
9389         EXTRA_CFLAGS="-W -Wall"
9390         cf_warn_CONST=""
9391         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9392         for cf_opt in \
9393                 Wbad-function-cast \
9394                 Wcast-align \
9395                 Wcast-qual \
9396                 Winline \
9397                 Wmissing-declarations \
9398                 Wmissing-prototypes \
9399                 Wnested-externs \
9400                 Wpointer-arith \
9401                 Wshadow \
9402                 Wstrict-prototypes \
9403                 Wundef $cf_warn_CONST
9404         do
9405                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9406                 if { (eval echo "$as_me:9406: \"$ac_compile\"") >&5
9407   (eval $ac_compile) 2>&5
9408   ac_status=$?
9409   echo "$as_me:9409: \$? = $ac_status" >&5
9410   (exit $ac_status); }; then
9411                         test -n "$verbose" && echo "$as_me:9411: result: ... -$cf_opt" >&5
9412 echo "${ECHO_T}... -$cf_opt" >&6
9413                         case $cf_opt in #(vi
9414                         Wcast-qual) #(vi
9415                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9416                                 ;;
9417                         Winline) #(vi
9418                                 case $GCC_VERSION in
9419                                 3.3*)
9420                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9421
9422                                         continue;;
9423                                 esac
9424                                 ;;
9425                         esac
9426                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9427                 fi
9428         done
9429         CFLAGS="$cf_save_CFLAGS"
9430 fi
9431 rm -f conftest*
9432
9433         if test "$cf_with_cxx" = yes ; then
9434
9435 INTEL_CPLUSPLUS=no
9436
9437 if test "$GCC" = yes ; then
9438         case $host_os in
9439         linux*|gnu*)
9440                 echo "$as_me:9440: checking if this is really Intel C++ compiler" >&5
9441 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9442                 cf_save_CFLAGS="$CXXFLAGS"
9443                 CXXFLAGS="$CXXFLAGS -no-gcc"
9444                 cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447
9448 int
9449 main ()
9450 {
9451
9452 #ifdef __INTEL_COMPILER
9453 #else
9454 make an error
9455 #endif
9456
9457   ;
9458   return 0;
9459 }
9460 _ACEOF
9461 rm -f conftest.$ac_objext
9462 if { (eval echo "$as_me:9462: \"$ac_compile\"") >&5
9463   (eval $ac_compile) 2>&5
9464   ac_status=$?
9465   echo "$as_me:9465: \$? = $ac_status" >&5
9466   (exit $ac_status); } &&
9467          { ac_try='test -s conftest.$ac_objext'
9468   { (eval echo "$as_me:9468: \"$ac_try\"") >&5
9469   (eval $ac_try) 2>&5
9470   ac_status=$?
9471   echo "$as_me:9471: \$? = $ac_status" >&5
9472   (exit $ac_status); }; }; then
9473   INTEL_CPLUSPLUS=yes
9474 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9475
9476 else
9477   echo "$as_me: failed program was:" >&5
9478 cat conftest.$ac_ext >&5
9479 fi
9480 rm -f conftest.$ac_objext conftest.$ac_ext
9481                 CXXFLAGS="$cf_save_CFLAGS"
9482                 echo "$as_me:9482: result: $INTEL_CPLUSPLUS" >&5
9483 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9484                 ;;
9485         esac
9486 fi
9487
9488 ac_ext=cc
9489 ac_cpp='$CXXCPP $CPPFLAGS'
9490 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9491 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9492 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9493 ac_main_return=return
9494
9495 cat > conftest.$ac_ext <<EOF
9496 #line 9496 "configure"
9497 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9498 EOF
9499
9500 if test "$INTEL_CPLUSPLUS" = yes
9501 then
9502 # The "-wdXXX" options suppress warnings:
9503 # remark #1419: external declaration in primary source file
9504 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9505 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9506 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9507 # remark #193: zero used for undefined preprocessing identifier
9508 # remark #593: variable "curs_sb_left_arrow" was set but never used
9509 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9510 # remark #869: parameter "tw" was never referenced
9511 # remark #981: operands are evaluated in unspecified order
9512 # warning #269: invalid format string conversion
9513
9514         { echo "$as_me:9514: checking for $CC warning options..." >&5
9515 echo "$as_me: checking for $CC warning options..." >&6;}
9516         cf_save_CXXFLAGS="$CXXFLAGS"
9517         EXTRA_CXXFLAGS="-Wall"
9518         for cf_opt in \
9519                 wd1419 \
9520                 wd1682 \
9521                 wd1683 \
9522                 wd1684 \
9523                 wd193 \
9524                 wd279 \
9525                 wd593 \
9526                 wd810 \
9527                 wd869 \
9528                 wd981
9529         do
9530                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9531                 if { (eval echo "$as_me:9531: \"$ac_compile\"") >&5
9532   (eval $ac_compile) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); }; then
9536                         test -n "$verbose" && echo "$as_me:9536: result: ... -$cf_opt" >&5
9537 echo "${ECHO_T}... -$cf_opt" >&6
9538                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9539                 fi
9540         done
9541         CXXFLAGS="$cf_save_CXXFLAGS"
9542
9543 elif test "$GXX" = yes
9544 then
9545         { echo "$as_me:9545: checking for $CXX warning options..." >&5
9546 echo "$as_me: checking for $CXX warning options..." >&6;}
9547         cf_save_CXXFLAGS="$CXXFLAGS"
9548         EXTRA_CXXFLAGS="-W -Wall"
9549         cf_gxx_extra_warnings=""
9550         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9551         case "$GCC_VERSION" in
9552         [1-2].*)
9553                 ;;
9554         *)
9555                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9556                 ;;
9557         esac
9558         for cf_opt in \
9559                 Wabi \
9560                 fabi-version=0 \
9561                 Woverloaded-virtual \
9562                 Wsign-promo \
9563                 Wsynth \
9564                 Wold-style-cast \
9565                 Wcast-align \
9566                 Wcast-qual \
9567                 Wmissing-prototypes \
9568                 Wpointer-arith \
9569                 Wshadow \
9570                 Wstrict-prototypes \
9571                 Wundef $cf_gxx_extra_warnings Wno-unused
9572         do
9573                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9574                 if { (eval echo "$as_me:9574: \"$ac_compile\"") >&5
9575   (eval $ac_compile) 2>&5
9576   ac_status=$?
9577   echo "$as_me:9577: \$? = $ac_status" >&5
9578   (exit $ac_status); }; then
9579                         test -n "$verbose" && echo "$as_me:9579: result: ... -$cf_opt" >&5
9580 echo "${ECHO_T}... -$cf_opt" >&6
9581                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9582                 else
9583                         test -n "$verbose" && echo "$as_me:9583: result: ... no -$cf_opt" >&5
9584 echo "${ECHO_T}... no -$cf_opt" >&6
9585                 fi
9586         done
9587         CXXFLAGS="$cf_save_CXXFLAGS"
9588 fi
9589
9590 rm -f conftest*
9591 ac_ext=c
9592 ac_cpp='$CPP $CPPFLAGS'
9593 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9594 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9595 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9596 ac_main_return=return
9597
9598         fi
9599 fi
9600
9601 if test "$GCC" = yes
9602 then
9603 cat > conftest.i <<EOF
9604 #ifndef GCC_PRINTF
9605 #define GCC_PRINTF 0
9606 #endif
9607 #ifndef GCC_SCANF
9608 #define GCC_SCANF 0
9609 #endif
9610 #ifndef GCC_NORETURN
9611 #define GCC_NORETURN /* nothing */
9612 #endif
9613 #ifndef GCC_UNUSED
9614 #define GCC_UNUSED /* nothing */
9615 #endif
9616 EOF
9617 if test "$GCC" = yes
9618 then
9619         { echo "$as_me:9619: checking for $CC __attribute__ directives..." >&5
9620 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9621 cat > conftest.$ac_ext <<EOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624 #include "conftest.h"
9625 #include "conftest.i"
9626 #if     GCC_PRINTF
9627 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9628 #else
9629 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9630 #endif
9631 #if     GCC_SCANF
9632 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9633 #else
9634 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9635 #endif
9636 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9637 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9638 extern void foo(void) GCC_NORETURN;
9639 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9640 EOF
9641         for cf_attribute in scanf printf unused noreturn
9642         do
9643
9644 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9645
9646                 cf_directive="__attribute__(($cf_attribute))"
9647                 echo "checking for $CC $cf_directive" 1>&5
9648                 case $cf_attribute in
9649                 scanf|printf)
9650                 cat >conftest.h <<EOF
9651 #define GCC_$cf_ATTRIBUTE 1
9652 EOF
9653                         ;;
9654                 *)
9655                 cat >conftest.h <<EOF
9656 #define GCC_$cf_ATTRIBUTE $cf_directive
9657 EOF
9658                         ;;
9659                 esac
9660                 if { (eval echo "$as_me:9660: \"$ac_compile\"") >&5
9661   (eval $ac_compile) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit $ac_status); }; then
9665                         test -n "$verbose" && echo "$as_me:9665: result: ... $cf_attribute" >&5
9666 echo "${ECHO_T}... $cf_attribute" >&6
9667                         cat conftest.h >>confdefs.h
9668                 fi
9669         done
9670 else
9671         fgrep define conftest.i >>confdefs.h
9672 fi
9673 rm -rf conftest*
9674 fi
9675
9676 ###     use option --enable-assertions to turn on generation of assertion code
9677 echo "$as_me:9677: checking if you want to enable runtime assertions" >&5
9678 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9679
9680 # Check whether --enable-assertions or --disable-assertions was given.
9681 if test "${enable_assertions+set}" = set; then
9682   enableval="$enable_assertions"
9683   with_assertions=$enableval
9684 else
9685   with_assertions=no
9686 fi;
9687 echo "$as_me:9687: result: $with_assertions" >&5
9688 echo "${ECHO_T}$with_assertions" >&6
9689 if test -n "$GCC"
9690 then
9691         if test "$with_assertions" = no
9692         then
9693                 cat >>confdefs.h <<\EOF
9694 #define NDEBUG 1
9695 EOF
9696
9697                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9698         else
9699                 ADAFLAGS="$ADAFLAGS -gnata"
9700         fi
9701 fi
9702
9703 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9704
9705 echo "$as_me:9705: checking if you want to use dmalloc for testing" >&5
9706 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9707
9708 # Check whether --with-dmalloc or --without-dmalloc was given.
9709 if test "${with_dmalloc+set}" = set; then
9710   withval="$with_dmalloc"
9711   cat >>confdefs.h <<\EOF
9712 #define USE_DMALLOC 1
9713 EOF
9714
9715         : ${with_cflags:=-g}
9716         : ${with_no_leaks:=yes}
9717          with_dmalloc=yes
9718 else
9719   with_dmalloc=
9720 fi;
9721 echo "$as_me:9721: result: ${with_dmalloc:-no}" >&5
9722 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9723
9724 case .$with_cflags in #(vi
9725 .*-g*)
9726         case .$CFLAGS in #(vi
9727         .*-g*) #(vi
9728                 ;;
9729         *)
9730
9731 cf_fix_cppflags=no
9732 cf_new_cflags=
9733 cf_new_cppflags=
9734 cf_new_extra_cppflags=
9735
9736 for cf_add_cflags in -g
9737 do
9738 case $cf_fix_cppflags in
9739 no)
9740         case $cf_add_cflags in #(vi
9741         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9742                 case $cf_add_cflags in
9743                 -D*)
9744                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9745
9746                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9747                         && test -z "${cf_tst_cflags}" \
9748                         && cf_fix_cppflags=yes
9749
9750                         if test $cf_fix_cppflags = yes ; then
9751                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9752                                 continue
9753                         elif test "${cf_tst_cflags}" = "\"'" ; then
9754                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9755                                 continue
9756                         fi
9757                         ;;
9758                 esac
9759                 case "$CPPFLAGS" in
9760                 *$cf_add_cflags) #(vi
9761                         ;;
9762                 *) #(vi
9763                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9764                         ;;
9765                 esac
9766                 ;;
9767         *)
9768                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9769                 ;;
9770         esac
9771         ;;
9772 yes)
9773         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9774
9775         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9776
9777         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9778         && test -z "${cf_tst_cflags}" \
9779         && cf_fix_cppflags=no
9780         ;;
9781 esac
9782 done
9783
9784 if test -n "$cf_new_cflags" ; then
9785
9786         CFLAGS="$CFLAGS $cf_new_cflags"
9787 fi
9788
9789 if test -n "$cf_new_cppflags" ; then
9790
9791         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9792 fi
9793
9794 if test -n "$cf_new_extra_cppflags" ; then
9795
9796         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9797 fi
9798
9799                 ;;
9800         esac
9801         ;;
9802 esac
9803
9804 if test "$with_dmalloc" = yes ; then
9805         echo "$as_me:9805: checking for dmalloc.h" >&5
9806 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9807 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9808   echo $ECHO_N "(cached) $ECHO_C" >&6
9809 else
9810   cat >conftest.$ac_ext <<_ACEOF
9811 #line 9811 "configure"
9812 #include "confdefs.h"
9813 #include <dmalloc.h>
9814 _ACEOF
9815 if { (eval echo "$as_me:9815: \"$ac_cpp conftest.$ac_ext\"") >&5
9816   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9817   ac_status=$?
9818   egrep -v '^ *\+' conftest.er1 >conftest.err
9819   rm -f conftest.er1
9820   cat conftest.err >&5
9821   echo "$as_me:9821: \$? = $ac_status" >&5
9822   (exit $ac_status); } >/dev/null; then
9823   if test -s conftest.err; then
9824     ac_cpp_err=$ac_c_preproc_warn_flag
9825   else
9826     ac_cpp_err=
9827   fi
9828 else
9829   ac_cpp_err=yes
9830 fi
9831 if test -z "$ac_cpp_err"; then
9832   ac_cv_header_dmalloc_h=yes
9833 else
9834   echo "$as_me: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836   ac_cv_header_dmalloc_h=no
9837 fi
9838 rm -f conftest.err conftest.$ac_ext
9839 fi
9840 echo "$as_me:9840: result: $ac_cv_header_dmalloc_h" >&5
9841 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9842 if test $ac_cv_header_dmalloc_h = yes; then
9843
9844 echo "$as_me:9844: checking for dmalloc_debug in -ldmalloc" >&5
9845 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9846 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9847   echo $ECHO_N "(cached) $ECHO_C" >&6
9848 else
9849   ac_check_lib_save_LIBS=$LIBS
9850 LIBS="-ldmalloc  $LIBS"
9851 cat >conftest.$ac_ext <<_ACEOF
9852 #line 9852 "configure"
9853 #include "confdefs.h"
9854
9855 /* Override any gcc2 internal prototype to avoid an error.  */
9856 #ifdef __cplusplus
9857 extern "C"
9858 #endif
9859 /* We use char because int might match the return type of a gcc2
9860    builtin and then its argument prototype would still apply.  */
9861 char dmalloc_debug ();
9862 int
9863 main ()
9864 {
9865 dmalloc_debug ();
9866   ;
9867   return 0;
9868 }
9869 _ACEOF
9870 rm -f conftest.$ac_objext conftest$ac_exeext
9871 if { (eval echo "$as_me:9871: \"$ac_link\"") >&5
9872   (eval $ac_link) 2>&5
9873   ac_status=$?
9874   echo "$as_me:9874: \$? = $ac_status" >&5
9875   (exit $ac_status); } &&
9876          { ac_try='test -s conftest$ac_exeext'
9877   { (eval echo "$as_me:9877: \"$ac_try\"") >&5
9878   (eval $ac_try) 2>&5
9879   ac_status=$?
9880   echo "$as_me:9880: \$? = $ac_status" >&5
9881   (exit $ac_status); }; }; then
9882   ac_cv_lib_dmalloc_dmalloc_debug=yes
9883 else
9884   echo "$as_me: failed program was:" >&5
9885 cat conftest.$ac_ext >&5
9886 ac_cv_lib_dmalloc_dmalloc_debug=no
9887 fi
9888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9889 LIBS=$ac_check_lib_save_LIBS
9890 fi
9891 echo "$as_me:9891: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9892 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9893 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9894   cat >>confdefs.h <<EOF
9895 #define HAVE_LIBDMALLOC 1
9896 EOF
9897
9898   LIBS="-ldmalloc $LIBS"
9899
9900 fi
9901
9902 fi
9903
9904 fi
9905
9906 echo "$as_me:9906: checking if you want to use dbmalloc for testing" >&5
9907 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9908
9909 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9910 if test "${with_dbmalloc+set}" = set; then
9911   withval="$with_dbmalloc"
9912   cat >>confdefs.h <<\EOF
9913 #define USE_DBMALLOC 1
9914 EOF
9915
9916         : ${with_cflags:=-g}
9917         : ${with_no_leaks:=yes}
9918          with_dbmalloc=yes
9919 else
9920   with_dbmalloc=
9921 fi;
9922 echo "$as_me:9922: result: ${with_dbmalloc:-no}" >&5
9923 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9924
9925 case .$with_cflags in #(vi
9926 .*-g*)
9927         case .$CFLAGS in #(vi
9928         .*-g*) #(vi
9929                 ;;
9930         *)
9931
9932 cf_fix_cppflags=no
9933 cf_new_cflags=
9934 cf_new_cppflags=
9935 cf_new_extra_cppflags=
9936
9937 for cf_add_cflags in -g
9938 do
9939 case $cf_fix_cppflags in
9940 no)
9941         case $cf_add_cflags in #(vi
9942         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9943                 case $cf_add_cflags in
9944                 -D*)
9945                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9946
9947                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9948                         && test -z "${cf_tst_cflags}" \
9949                         && cf_fix_cppflags=yes
9950
9951                         if test $cf_fix_cppflags = yes ; then
9952                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9953                                 continue
9954                         elif test "${cf_tst_cflags}" = "\"'" ; then
9955                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9956                                 continue
9957                         fi
9958                         ;;
9959                 esac
9960                 case "$CPPFLAGS" in
9961                 *$cf_add_cflags) #(vi
9962                         ;;
9963                 *) #(vi
9964                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9965                         ;;
9966                 esac
9967                 ;;
9968         *)
9969                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9970                 ;;
9971         esac
9972         ;;
9973 yes)
9974         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9975
9976         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9977
9978         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9979         && test -z "${cf_tst_cflags}" \
9980         && cf_fix_cppflags=no
9981         ;;
9982 esac
9983 done
9984
9985 if test -n "$cf_new_cflags" ; then
9986
9987         CFLAGS="$CFLAGS $cf_new_cflags"
9988 fi
9989
9990 if test -n "$cf_new_cppflags" ; then
9991
9992         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9993 fi
9994
9995 if test -n "$cf_new_extra_cppflags" ; then
9996
9997         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9998 fi
9999
10000                 ;;
10001         esac
10002         ;;
10003 esac
10004
10005 if test "$with_dbmalloc" = yes ; then
10006         echo "$as_me:10006: checking for dbmalloc.h" >&5
10007 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10008 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10009   echo $ECHO_N "(cached) $ECHO_C" >&6
10010 else
10011   cat >conftest.$ac_ext <<_ACEOF
10012 #line 10012 "configure"
10013 #include "confdefs.h"
10014 #include <dbmalloc.h>
10015 _ACEOF
10016 if { (eval echo "$as_me:10016: \"$ac_cpp conftest.$ac_ext\"") >&5
10017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10018   ac_status=$?
10019   egrep -v '^ *\+' conftest.er1 >conftest.err
10020   rm -f conftest.er1
10021   cat conftest.err >&5
10022   echo "$as_me:10022: \$? = $ac_status" >&5
10023   (exit $ac_status); } >/dev/null; then
10024   if test -s conftest.err; then
10025     ac_cpp_err=$ac_c_preproc_warn_flag
10026   else
10027     ac_cpp_err=
10028   fi
10029 else
10030   ac_cpp_err=yes
10031 fi
10032 if test -z "$ac_cpp_err"; then
10033   ac_cv_header_dbmalloc_h=yes
10034 else
10035   echo "$as_me: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   ac_cv_header_dbmalloc_h=no
10038 fi
10039 rm -f conftest.err conftest.$ac_ext
10040 fi
10041 echo "$as_me:10041: result: $ac_cv_header_dbmalloc_h" >&5
10042 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10043 if test $ac_cv_header_dbmalloc_h = yes; then
10044
10045 echo "$as_me:10045: checking for debug_malloc in -ldbmalloc" >&5
10046 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10047 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 else
10050   ac_check_lib_save_LIBS=$LIBS
10051 LIBS="-ldbmalloc  $LIBS"
10052 cat >conftest.$ac_ext <<_ACEOF
10053 #line 10053 "configure"
10054 #include "confdefs.h"
10055
10056 /* Override any gcc2 internal prototype to avoid an error.  */
10057 #ifdef __cplusplus
10058 extern "C"
10059 #endif
10060 /* We use char because int might match the return type of a gcc2
10061    builtin and then its argument prototype would still apply.  */
10062 char debug_malloc ();
10063 int
10064 main ()
10065 {
10066 debug_malloc ();
10067   ;
10068   return 0;
10069 }
10070 _ACEOF
10071 rm -f conftest.$ac_objext conftest$ac_exeext
10072 if { (eval echo "$as_me:10072: \"$ac_link\"") >&5
10073   (eval $ac_link) 2>&5
10074   ac_status=$?
10075   echo "$as_me:10075: \$? = $ac_status" >&5
10076   (exit $ac_status); } &&
10077          { ac_try='test -s conftest$ac_exeext'
10078   { (eval echo "$as_me:10078: \"$ac_try\"") >&5
10079   (eval $ac_try) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); }; }; then
10083   ac_cv_lib_dbmalloc_debug_malloc=yes
10084 else
10085   echo "$as_me: failed program was:" >&5
10086 cat conftest.$ac_ext >&5
10087 ac_cv_lib_dbmalloc_debug_malloc=no
10088 fi
10089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10090 LIBS=$ac_check_lib_save_LIBS
10091 fi
10092 echo "$as_me:10092: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10093 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10094 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10095   cat >>confdefs.h <<EOF
10096 #define HAVE_LIBDBMALLOC 1
10097 EOF
10098
10099   LIBS="-ldbmalloc $LIBS"
10100
10101 fi
10102
10103 fi
10104
10105 fi
10106
10107 echo "$as_me:10107: checking if you want to use valgrind for testing" >&5
10108 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10109
10110 # Check whether --with-valgrind or --without-valgrind was given.
10111 if test "${with_valgrind+set}" = set; then
10112   withval="$with_valgrind"
10113   cat >>confdefs.h <<\EOF
10114 #define USE_VALGRIND 1
10115 EOF
10116
10117         : ${with_cflags:=-g}
10118         : ${with_no_leaks:=yes}
10119          with_valgrind=yes
10120 else
10121   with_valgrind=
10122 fi;
10123 echo "$as_me:10123: result: ${with_valgrind:-no}" >&5
10124 echo "${ECHO_T}${with_valgrind:-no}" >&6
10125
10126 case .$with_cflags in #(vi
10127 .*-g*)
10128         case .$CFLAGS in #(vi
10129         .*-g*) #(vi
10130                 ;;
10131         *)
10132
10133 cf_fix_cppflags=no
10134 cf_new_cflags=
10135 cf_new_cppflags=
10136 cf_new_extra_cppflags=
10137
10138 for cf_add_cflags in -g
10139 do
10140 case $cf_fix_cppflags in
10141 no)
10142         case $cf_add_cflags in #(vi
10143         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10144                 case $cf_add_cflags in
10145                 -D*)
10146                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10147
10148                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10149                         && test -z "${cf_tst_cflags}" \
10150                         && cf_fix_cppflags=yes
10151
10152                         if test $cf_fix_cppflags = yes ; then
10153                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10154                                 continue
10155                         elif test "${cf_tst_cflags}" = "\"'" ; then
10156                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10157                                 continue
10158                         fi
10159                         ;;
10160                 esac
10161                 case "$CPPFLAGS" in
10162                 *$cf_add_cflags) #(vi
10163                         ;;
10164                 *) #(vi
10165                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10166                         ;;
10167                 esac
10168                 ;;
10169         *)
10170                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10171                 ;;
10172         esac
10173         ;;
10174 yes)
10175         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10176
10177         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10178
10179         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10180         && test -z "${cf_tst_cflags}" \
10181         && cf_fix_cppflags=no
10182         ;;
10183 esac
10184 done
10185
10186 if test -n "$cf_new_cflags" ; then
10187
10188         CFLAGS="$CFLAGS $cf_new_cflags"
10189 fi
10190
10191 if test -n "$cf_new_cppflags" ; then
10192
10193         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10194 fi
10195
10196 if test -n "$cf_new_extra_cppflags" ; then
10197
10198         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10199 fi
10200
10201                 ;;
10202         esac
10203         ;;
10204 esac
10205
10206 echo "$as_me:10206: checking if you want to perform memory-leak testing" >&5
10207 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10208
10209 # Check whether --enable-leaks or --disable-leaks was given.
10210 if test "${enable_leaks+set}" = set; then
10211   enableval="$enable_leaks"
10212   with_no_leaks=yes
10213 else
10214   : ${with_no_leaks:=no}
10215 fi;
10216 echo "$as_me:10216: result: $with_no_leaks" >&5
10217 echo "${ECHO_T}$with_no_leaks" >&6
10218
10219 if test "$with_no_leaks" = yes ; then
10220         cat >>confdefs.h <<\EOF
10221 #define NO_LEAKS 1
10222 EOF
10223
10224 fi
10225
10226 cat >>confdefs.h <<\EOF
10227 #define HAVE_NC_ALLOC_H 1
10228 EOF
10229
10230 ###     use option --enable-expanded to generate certain macros as functions
10231
10232 # Check whether --enable-expanded or --disable-expanded was given.
10233 if test "${enable_expanded+set}" = set; then
10234   enableval="$enable_expanded"
10235   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10236 #define NCURSES_EXPANDED 1
10237 EOF
10238
10239 fi;
10240
10241 ###     use option --disable-macros to suppress macros in favor of functions
10242
10243 # Check whether --enable-macros or --disable-macros was given.
10244 if test "${enable_macros+set}" = set; then
10245   enableval="$enable_macros"
10246   test "$enableval" = no && cat >>confdefs.h <<\EOF
10247 #define NCURSES_NOMACROS 1
10248 EOF
10249
10250 fi;
10251
10252 # Normally we only add trace() to the debug-library.  Allow this to be
10253 # extended to all models of the ncurses library:
10254 cf_all_traces=no
10255 case "$CFLAGS $CPPFLAGS" in
10256 *-DTRACE*)
10257         cf_all_traces=yes
10258         ;;
10259 esac
10260
10261 echo "$as_me:10261: checking whether to add trace feature to all models" >&5
10262 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10263
10264 # Check whether --with-trace or --without-trace was given.
10265 if test "${with_trace+set}" = set; then
10266   withval="$with_trace"
10267   cf_with_trace=$withval
10268 else
10269   cf_with_trace=$cf_all_traces
10270 fi;
10271 echo "$as_me:10271: result: $cf_with_trace" >&5
10272 echo "${ECHO_T}$cf_with_trace" >&6
10273
10274 if test "$cf_with_trace" = yes ; then
10275         LIB_TRACING=all
10276         ADA_TRACE=TRUE
10277
10278 cf_fix_cppflags=no
10279 cf_new_cflags=
10280 cf_new_cppflags=
10281 cf_new_extra_cppflags=
10282
10283 for cf_add_cflags in -DTRACE
10284 do
10285 case $cf_fix_cppflags in
10286 no)
10287         case $cf_add_cflags in #(vi
10288         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10289                 case $cf_add_cflags in
10290                 -D*)
10291                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10292
10293                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10294                         && test -z "${cf_tst_cflags}" \
10295                         && cf_fix_cppflags=yes
10296
10297                         if test $cf_fix_cppflags = yes ; then
10298                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10299                                 continue
10300                         elif test "${cf_tst_cflags}" = "\"'" ; then
10301                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10302                                 continue
10303                         fi
10304                         ;;
10305                 esac
10306                 case "$CPPFLAGS" in
10307                 *$cf_add_cflags) #(vi
10308                         ;;
10309                 *) #(vi
10310                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10311                         ;;
10312                 esac
10313                 ;;
10314         *)
10315                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10316                 ;;
10317         esac
10318         ;;
10319 yes)
10320         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10321
10322         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10323
10324         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10325         && test -z "${cf_tst_cflags}" \
10326         && cf_fix_cppflags=no
10327         ;;
10328 esac
10329 done
10330
10331 if test -n "$cf_new_cflags" ; then
10332
10333         CFLAGS="$CFLAGS $cf_new_cflags"
10334 fi
10335
10336 if test -n "$cf_new_cppflags" ; then
10337
10338         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10339 fi
10340
10341 if test -n "$cf_new_extra_cppflags" ; then
10342
10343         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10344 fi
10345
10346 else
10347         LIB_TRACING=DEBUG
10348         ADA_TRACE=FALSE
10349 fi
10350
10351 ###     Checks for libraries.
10352 echo "$as_me:10352: checking for gettimeofday" >&5
10353 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10354 if test "${ac_cv_func_gettimeofday+set}" = set; then
10355   echo $ECHO_N "(cached) $ECHO_C" >&6
10356 else
10357   cat >conftest.$ac_ext <<_ACEOF
10358 #line 10358 "configure"
10359 #include "confdefs.h"
10360 /* System header to define __stub macros and hopefully few prototypes,
10361     which can conflict with char gettimeofday (); below.  */
10362 #include <assert.h>
10363 /* Override any gcc2 internal prototype to avoid an error.  */
10364 #ifdef __cplusplus
10365 extern "C"
10366 #endif
10367 /* We use char because int might match the return type of a gcc2
10368    builtin and then its argument prototype would still apply.  */
10369 char gettimeofday ();
10370 char (*f) ();
10371
10372 int
10373 main ()
10374 {
10375 /* The GNU C library defines this for functions which it implements
10376     to always fail with ENOSYS.  Some functions are actually named
10377     something starting with __ and the normal name is an alias.  */
10378 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10379 choke me
10380 #else
10381 f = gettimeofday;
10382 #endif
10383
10384   ;
10385   return 0;
10386 }
10387 _ACEOF
10388 rm -f conftest.$ac_objext conftest$ac_exeext
10389 if { (eval echo "$as_me:10389: \"$ac_link\"") >&5
10390   (eval $ac_link) 2>&5
10391   ac_status=$?
10392   echo "$as_me:10392: \$? = $ac_status" >&5
10393   (exit $ac_status); } &&
10394          { ac_try='test -s conftest$ac_exeext'
10395   { (eval echo "$as_me:10395: \"$ac_try\"") >&5
10396   (eval $ac_try) 2>&5
10397   ac_status=$?
10398   echo "$as_me:10398: \$? = $ac_status" >&5
10399   (exit $ac_status); }; }; then
10400   ac_cv_func_gettimeofday=yes
10401 else
10402   echo "$as_me: failed program was:" >&5
10403 cat conftest.$ac_ext >&5
10404 ac_cv_func_gettimeofday=no
10405 fi
10406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10407 fi
10408 echo "$as_me:10408: result: $ac_cv_func_gettimeofday" >&5
10409 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10410 if test $ac_cv_func_gettimeofday = yes; then
10411   cat >>confdefs.h <<\EOF
10412 #define HAVE_GETTIMEOFDAY 1
10413 EOF
10414
10415 else
10416
10417 echo "$as_me:10417: checking for gettimeofday in -lbsd" >&5
10418 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10419 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 else
10422   ac_check_lib_save_LIBS=$LIBS
10423 LIBS="-lbsd  $LIBS"
10424 cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427
10428 /* Override any gcc2 internal prototype to avoid an error.  */
10429 #ifdef __cplusplus
10430 extern "C"
10431 #endif
10432 /* We use char because int might match the return type of a gcc2
10433    builtin and then its argument prototype would still apply.  */
10434 char gettimeofday ();
10435 int
10436 main ()
10437 {
10438 gettimeofday ();
10439   ;
10440   return 0;
10441 }
10442 _ACEOF
10443 rm -f conftest.$ac_objext conftest$ac_exeext
10444 if { (eval echo "$as_me:10444: \"$ac_link\"") >&5
10445   (eval $ac_link) 2>&5
10446   ac_status=$?
10447   echo "$as_me:10447: \$? = $ac_status" >&5
10448   (exit $ac_status); } &&
10449          { ac_try='test -s conftest$ac_exeext'
10450   { (eval echo "$as_me:10450: \"$ac_try\"") >&5
10451   (eval $ac_try) 2>&5
10452   ac_status=$?
10453   echo "$as_me:10453: \$? = $ac_status" >&5
10454   (exit $ac_status); }; }; then
10455   ac_cv_lib_bsd_gettimeofday=yes
10456 else
10457   echo "$as_me: failed program was:" >&5
10458 cat conftest.$ac_ext >&5
10459 ac_cv_lib_bsd_gettimeofday=no
10460 fi
10461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10462 LIBS=$ac_check_lib_save_LIBS
10463 fi
10464 echo "$as_me:10464: result: $ac_cv_lib_bsd_gettimeofday" >&5
10465 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10466 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10467   cat >>confdefs.h <<\EOF
10468 #define HAVE_GETTIMEOFDAY 1
10469 EOF
10470
10471         LIBS="$LIBS -lbsd"
10472 fi
10473
10474 fi
10475
10476 echo "$as_me:10476: checking if -lm needed for math functions" >&5
10477 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10478 if test "${cf_cv_need_libm+set}" = set; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 else
10481
10482         cat >conftest.$ac_ext <<_ACEOF
10483 #line 10483 "configure"
10484 #include "confdefs.h"
10485
10486         #include <stdio.h>
10487         #include <math.h>
10488
10489 int
10490 main ()
10491 {
10492 double x = rand(); printf("result = %g\n", sin(x))
10493   ;
10494   return 0;
10495 }
10496 _ACEOF
10497 rm -f conftest.$ac_objext conftest$ac_exeext
10498 if { (eval echo "$as_me:10498: \"$ac_link\"") >&5
10499   (eval $ac_link) 2>&5
10500   ac_status=$?
10501   echo "$as_me:10501: \$? = $ac_status" >&5
10502   (exit $ac_status); } &&
10503          { ac_try='test -s conftest$ac_exeext'
10504   { (eval echo "$as_me:10504: \"$ac_try\"") >&5
10505   (eval $ac_try) 2>&5
10506   ac_status=$?
10507   echo "$as_me:10507: \$? = $ac_status" >&5
10508   (exit $ac_status); }; }; then
10509   cf_cv_need_libm=no
10510 else
10511   echo "$as_me: failed program was:" >&5
10512 cat conftest.$ac_ext >&5
10513 cf_cv_need_libm=yes
10514 fi
10515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10516 fi
10517 echo "$as_me:10517: result: $cf_cv_need_libm" >&5
10518 echo "${ECHO_T}$cf_cv_need_libm" >&6
10519 if test "$cf_cv_need_libm" = yes
10520 then
10521 MATH_LIB=-lm
10522 fi
10523
10524 ###     Checks for header files.
10525 echo "$as_me:10525: checking for ANSI C header files" >&5
10526 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10527 if test "${ac_cv_header_stdc+set}" = set; then
10528   echo $ECHO_N "(cached) $ECHO_C" >&6
10529 else
10530   cat >conftest.$ac_ext <<_ACEOF
10531 #line 10531 "configure"
10532 #include "confdefs.h"
10533 #include <stdlib.h>
10534 #include <stdarg.h>
10535 #include <string.h>
10536 #include <float.h>
10537
10538 _ACEOF
10539 if { (eval echo "$as_me:10539: \"$ac_cpp conftest.$ac_ext\"") >&5
10540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10541   ac_status=$?
10542   egrep -v '^ *\+' conftest.er1 >conftest.err
10543   rm -f conftest.er1
10544   cat conftest.err >&5
10545   echo "$as_me:10545: \$? = $ac_status" >&5
10546   (exit $ac_status); } >/dev/null; then
10547   if test -s conftest.err; then
10548     ac_cpp_err=$ac_c_preproc_warn_flag
10549   else
10550     ac_cpp_err=
10551   fi
10552 else
10553   ac_cpp_err=yes
10554 fi
10555 if test -z "$ac_cpp_err"; then
10556   ac_cv_header_stdc=yes
10557 else
10558   echo "$as_me: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   ac_cv_header_stdc=no
10561 fi
10562 rm -f conftest.err conftest.$ac_ext
10563
10564 if test $ac_cv_header_stdc = yes; then
10565   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10566   cat >conftest.$ac_ext <<_ACEOF
10567 #line 10567 "configure"
10568 #include "confdefs.h"
10569 #include <string.h>
10570
10571 _ACEOF
10572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10573   egrep "memchr" >/dev/null 2>&1; then
10574   :
10575 else
10576   ac_cv_header_stdc=no
10577 fi
10578 rm -f conftest*
10579
10580 fi
10581
10582 if test $ac_cv_header_stdc = yes; then
10583   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10584   cat >conftest.$ac_ext <<_ACEOF
10585 #line 10585 "configure"
10586 #include "confdefs.h"
10587 #include <stdlib.h>
10588
10589 _ACEOF
10590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10591   egrep "free" >/dev/null 2>&1; then
10592   :
10593 else
10594   ac_cv_header_stdc=no
10595 fi
10596 rm -f conftest*
10597
10598 fi
10599
10600 if test $ac_cv_header_stdc = yes; then
10601   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10602   if test "$cross_compiling" = yes; then
10603   :
10604 else
10605   cat >conftest.$ac_ext <<_ACEOF
10606 #line 10606 "configure"
10607 #include "confdefs.h"
10608 #include <ctype.h>
10609 #if ((' ' & 0x0FF) == 0x020)
10610 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10611 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10612 #else
10613 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10614                      || ('j' <= (c) && (c) <= 'r') \
10615                      || ('s' <= (c) && (c) <= 'z'))
10616 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10617 #endif
10618
10619 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10620 int
10621 main ()
10622 {
10623   int i;
10624   for (i = 0; i < 256; i++)
10625     if (XOR (islower (i), ISLOWER (i))
10626         || toupper (i) != TOUPPER (i))
10627       $ac_main_return(2);
10628   $ac_main_return (0);
10629 }
10630 _ACEOF
10631 rm -f conftest$ac_exeext
10632 if { (eval echo "$as_me:10632: \"$ac_link\"") >&5
10633   (eval $ac_link) 2>&5
10634   ac_status=$?
10635   echo "$as_me:10635: \$? = $ac_status" >&5
10636   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10637   { (eval echo "$as_me:10637: \"$ac_try\"") >&5
10638   (eval $ac_try) 2>&5
10639   ac_status=$?
10640   echo "$as_me:10640: \$? = $ac_status" >&5
10641   (exit $ac_status); }; }; then
10642   :
10643 else
10644   echo "$as_me: program exited with status $ac_status" >&5
10645 echo "$as_me: failed program was:" >&5
10646 cat conftest.$ac_ext >&5
10647 ac_cv_header_stdc=no
10648 fi
10649 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10650 fi
10651 fi
10652 fi
10653 echo "$as_me:10653: result: $ac_cv_header_stdc" >&5
10654 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10655 if test $ac_cv_header_stdc = yes; then
10656
10657 cat >>confdefs.h <<\EOF
10658 #define STDC_HEADERS 1
10659 EOF
10660
10661 fi
10662
10663 ac_header_dirent=no
10664 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10665   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10666 echo "$as_me:10666: checking for $ac_hdr that defines DIR" >&5
10667 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10668 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10669   echo $ECHO_N "(cached) $ECHO_C" >&6
10670 else
10671   cat >conftest.$ac_ext <<_ACEOF
10672 #line 10672 "configure"
10673 #include "confdefs.h"
10674 #include <sys/types.h>
10675 #include <$ac_hdr>
10676
10677 int
10678 main ()
10679 {
10680 if ((DIR *) 0)
10681 return 0;
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 rm -f conftest.$ac_objext
10687 if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
10688   (eval $ac_compile) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit $ac_status); } &&
10692          { ac_try='test -s conftest.$ac_objext'
10693   { (eval echo "$as_me:10693: \"$ac_try\"") >&5
10694   (eval $ac_try) 2>&5
10695   ac_status=$?
10696   echo "$as_me:10696: \$? = $ac_status" >&5
10697   (exit $ac_status); }; }; then
10698   eval "$as_ac_Header=yes"
10699 else
10700   echo "$as_me: failed program was:" >&5
10701 cat conftest.$ac_ext >&5
10702 eval "$as_ac_Header=no"
10703 fi
10704 rm -f conftest.$ac_objext conftest.$ac_ext
10705 fi
10706 echo "$as_me:10706: result: `eval echo '${'$as_ac_Header'}'`" >&5
10707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10708 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10709   cat >>confdefs.h <<EOF
10710 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10711 EOF
10712
10713 ac_header_dirent=$ac_hdr; break
10714 fi
10715
10716 done
10717 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10718 if test $ac_header_dirent = dirent.h; then
10719   echo "$as_me:10719: checking for opendir in -ldir" >&5
10720 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10721 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10722   echo $ECHO_N "(cached) $ECHO_C" >&6
10723 else
10724   ac_check_lib_save_LIBS=$LIBS
10725 LIBS="-ldir  $LIBS"
10726 cat >conftest.$ac_ext <<_ACEOF
10727 #line 10727 "configure"
10728 #include "confdefs.h"
10729
10730 /* Override any gcc2 internal prototype to avoid an error.  */
10731 #ifdef __cplusplus
10732 extern "C"
10733 #endif
10734 /* We use char because int might match the return type of a gcc2
10735    builtin and then its argument prototype would still apply.  */
10736 char opendir ();
10737 int
10738 main ()
10739 {
10740 opendir ();
10741   ;
10742   return 0;
10743 }
10744 _ACEOF
10745 rm -f conftest.$ac_objext conftest$ac_exeext
10746 if { (eval echo "$as_me:10746: \"$ac_link\"") >&5
10747   (eval $ac_link) 2>&5
10748   ac_status=$?
10749   echo "$as_me:10749: \$? = $ac_status" >&5
10750   (exit $ac_status); } &&
10751          { ac_try='test -s conftest$ac_exeext'
10752   { (eval echo "$as_me:10752: \"$ac_try\"") >&5
10753   (eval $ac_try) 2>&5
10754   ac_status=$?
10755   echo "$as_me:10755: \$? = $ac_status" >&5
10756   (exit $ac_status); }; }; then
10757   ac_cv_lib_dir_opendir=yes
10758 else
10759   echo "$as_me: failed program was:" >&5
10760 cat conftest.$ac_ext >&5
10761 ac_cv_lib_dir_opendir=no
10762 fi
10763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10764 LIBS=$ac_check_lib_save_LIBS
10765 fi
10766 echo "$as_me:10766: result: $ac_cv_lib_dir_opendir" >&5
10767 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10768 if test $ac_cv_lib_dir_opendir = yes; then
10769   LIBS="$LIBS -ldir"
10770 fi
10771
10772 else
10773   echo "$as_me:10773: checking for opendir in -lx" >&5
10774 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10775 if test "${ac_cv_lib_x_opendir+set}" = set; then
10776   echo $ECHO_N "(cached) $ECHO_C" >&6
10777 else
10778   ac_check_lib_save_LIBS=$LIBS
10779 LIBS="-lx  $LIBS"
10780 cat >conftest.$ac_ext <<_ACEOF
10781 #line 10781 "configure"
10782 #include "confdefs.h"
10783
10784 /* Override any gcc2 internal prototype to avoid an error.  */
10785 #ifdef __cplusplus
10786 extern "C"
10787 #endif
10788 /* We use char because int might match the return type of a gcc2
10789    builtin and then its argument prototype would still apply.  */
10790 char opendir ();
10791 int
10792 main ()
10793 {
10794 opendir ();
10795   ;
10796   return 0;
10797 }
10798 _ACEOF
10799 rm -f conftest.$ac_objext conftest$ac_exeext
10800 if { (eval echo "$as_me:10800: \"$ac_link\"") >&5
10801   (eval $ac_link) 2>&5
10802   ac_status=$?
10803   echo "$as_me:10803: \$? = $ac_status" >&5
10804   (exit $ac_status); } &&
10805          { ac_try='test -s conftest$ac_exeext'
10806   { (eval echo "$as_me:10806: \"$ac_try\"") >&5
10807   (eval $ac_try) 2>&5
10808   ac_status=$?
10809   echo "$as_me:10809: \$? = $ac_status" >&5
10810   (exit $ac_status); }; }; then
10811   ac_cv_lib_x_opendir=yes
10812 else
10813   echo "$as_me: failed program was:" >&5
10814 cat conftest.$ac_ext >&5
10815 ac_cv_lib_x_opendir=no
10816 fi
10817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10818 LIBS=$ac_check_lib_save_LIBS
10819 fi
10820 echo "$as_me:10820: result: $ac_cv_lib_x_opendir" >&5
10821 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10822 if test $ac_cv_lib_x_opendir = yes; then
10823   LIBS="$LIBS -lx"
10824 fi
10825
10826 fi
10827
10828 echo "$as_me:10828: checking whether time.h and sys/time.h may both be included" >&5
10829 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10830 if test "${ac_cv_header_time+set}" = set; then
10831   echo $ECHO_N "(cached) $ECHO_C" >&6
10832 else
10833   cat >conftest.$ac_ext <<_ACEOF
10834 #line 10834 "configure"
10835 #include "confdefs.h"
10836 #include <sys/types.h>
10837 #include <sys/time.h>
10838 #include <time.h>
10839
10840 int
10841 main ()
10842 {
10843 if ((struct tm *) 0)
10844 return 0;
10845   ;
10846   return 0;
10847 }
10848 _ACEOF
10849 rm -f conftest.$ac_objext
10850 if { (eval echo "$as_me:10850: \"$ac_compile\"") >&5
10851   (eval $ac_compile) 2>&5
10852   ac_status=$?
10853   echo "$as_me:10853: \$? = $ac_status" >&5
10854   (exit $ac_status); } &&
10855          { ac_try='test -s conftest.$ac_objext'
10856   { (eval echo "$as_me:10856: \"$ac_try\"") >&5
10857   (eval $ac_try) 2>&5
10858   ac_status=$?
10859   echo "$as_me:10859: \$? = $ac_status" >&5
10860   (exit $ac_status); }; }; then
10861   ac_cv_header_time=yes
10862 else
10863   echo "$as_me: failed program was:" >&5
10864 cat conftest.$ac_ext >&5
10865 ac_cv_header_time=no
10866 fi
10867 rm -f conftest.$ac_objext conftest.$ac_ext
10868 fi
10869 echo "$as_me:10869: result: $ac_cv_header_time" >&5
10870 echo "${ECHO_T}$ac_cv_header_time" >&6
10871 if test $ac_cv_header_time = yes; then
10872
10873 cat >>confdefs.h <<\EOF
10874 #define TIME_WITH_SYS_TIME 1
10875 EOF
10876
10877 fi
10878
10879 echo "$as_me:10879: checking for regular-expression headers" >&5
10880 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10881 if test "${cf_cv_regex+set}" = set; then
10882   echo $ECHO_N "(cached) $ECHO_C" >&6
10883 else
10884
10885 cat >conftest.$ac_ext <<_ACEOF
10886 #line 10886 "configure"
10887 #include "confdefs.h"
10888 #include <sys/types.h>
10889 #include <regex.h>
10890 int
10891 main ()
10892 {
10893
10894         regex_t *p;
10895         int x = regcomp(p, "", 0);
10896         int y = regexec(p, "", 0, 0, 0);
10897         regfree(p);
10898
10899   ;
10900   return 0;
10901 }
10902 _ACEOF
10903 rm -f conftest.$ac_objext conftest$ac_exeext
10904 if { (eval echo "$as_me:10904: \"$ac_link\"") >&5
10905   (eval $ac_link) 2>&5
10906   ac_status=$?
10907   echo "$as_me:10907: \$? = $ac_status" >&5
10908   (exit $ac_status); } &&
10909          { ac_try='test -s conftest$ac_exeext'
10910   { (eval echo "$as_me:10910: \"$ac_try\"") >&5
10911   (eval $ac_try) 2>&5
10912   ac_status=$?
10913   echo "$as_me:10913: \$? = $ac_status" >&5
10914   (exit $ac_status); }; }; then
10915   cf_cv_regex="regex.h"
10916 else
10917   echo "$as_me: failed program was:" >&5
10918 cat conftest.$ac_ext >&5
10919
10920         cat >conftest.$ac_ext <<_ACEOF
10921 #line 10921 "configure"
10922 #include "confdefs.h"
10923 #include <regexp.h>
10924 int
10925 main ()
10926 {
10927
10928                 char *p = compile("", "", "", 0);
10929                 int x = step("", "");
10930
10931   ;
10932   return 0;
10933 }
10934 _ACEOF
10935 rm -f conftest.$ac_objext conftest$ac_exeext
10936 if { (eval echo "$as_me:10936: \"$ac_link\"") >&5
10937   (eval $ac_link) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); } &&
10941          { ac_try='test -s conftest$ac_exeext'
10942   { (eval echo "$as_me:10942: \"$ac_try\"") >&5
10943   (eval $ac_try) 2>&5
10944   ac_status=$?
10945   echo "$as_me:10945: \$? = $ac_status" >&5
10946   (exit $ac_status); }; }; then
10947   cf_cv_regex="regexp.h"
10948 else
10949   echo "$as_me: failed program was:" >&5
10950 cat conftest.$ac_ext >&5
10951
10952                 cf_save_LIBS="$LIBS"
10953                 LIBS="-lgen $LIBS"
10954                 cat >conftest.$ac_ext <<_ACEOF
10955 #line 10955 "configure"
10956 #include "confdefs.h"
10957 #include <regexpr.h>
10958 int
10959 main ()
10960 {
10961
10962                         char *p = compile("", "", "");
10963                         int x = step("", "");
10964
10965   ;
10966   return 0;
10967 }
10968 _ACEOF
10969 rm -f conftest.$ac_objext conftest$ac_exeext
10970 if { (eval echo "$as_me:10970: \"$ac_link\"") >&5
10971   (eval $ac_link) 2>&5
10972   ac_status=$?
10973   echo "$as_me:10973: \$? = $ac_status" >&5
10974   (exit $ac_status); } &&
10975          { ac_try='test -s conftest$ac_exeext'
10976   { (eval echo "$as_me:10976: \"$ac_try\"") >&5
10977   (eval $ac_try) 2>&5
10978   ac_status=$?
10979   echo "$as_me:10979: \$? = $ac_status" >&5
10980   (exit $ac_status); }; }; then
10981   cf_cv_regex="regexpr.h"
10982 else
10983   echo "$as_me: failed program was:" >&5
10984 cat conftest.$ac_ext >&5
10985 LIBS="$cf_save_LIBS"
10986 fi
10987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10988 fi
10989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10990 fi
10991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10992
10993 fi
10994
10995 echo "$as_me:10995: result: $cf_cv_regex" >&5
10996 echo "${ECHO_T}$cf_cv_regex" >&6
10997 case $cf_cv_regex in
10998         regex.h)   cat >>confdefs.h <<\EOF
10999 #define HAVE_REGEX_H_FUNCS 1
11000 EOF
11001  ;;
11002         regexp.h)  cat >>confdefs.h <<\EOF
11003 #define HAVE_REGEXP_H_FUNCS 1
11004 EOF
11005  ;;
11006         regexpr.h) cat >>confdefs.h <<\EOF
11007 #define HAVE_REGEXPR_H_FUNCS 1
11008 EOF
11009  ;;
11010 esac
11011
11012 for ac_header in \
11013 fcntl.h \
11014 getopt.h \
11015 limits.h \
11016 locale.h \
11017 poll.h \
11018 sys/bsdtypes.h \
11019 sys/ioctl.h \
11020 sys/param.h \
11021 sys/poll.h \
11022 sys/select.h \
11023 sys/time.h \
11024 sys/times.h \
11025 ttyent.h \
11026 unistd.h \
11027 wctype.h \
11028
11029 do
11030 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11031 echo "$as_me:11031: checking for $ac_header" >&5
11032 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11033 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11034   echo $ECHO_N "(cached) $ECHO_C" >&6
11035 else
11036   cat >conftest.$ac_ext <<_ACEOF
11037 #line 11037 "configure"
11038 #include "confdefs.h"
11039 #include <$ac_header>
11040 _ACEOF
11041 if { (eval echo "$as_me:11041: \"$ac_cpp conftest.$ac_ext\"") >&5
11042   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11043   ac_status=$?
11044   egrep -v '^ *\+' conftest.er1 >conftest.err
11045   rm -f conftest.er1
11046   cat conftest.err >&5
11047   echo "$as_me:11047: \$? = $ac_status" >&5
11048   (exit $ac_status); } >/dev/null; then
11049   if test -s conftest.err; then
11050     ac_cpp_err=$ac_c_preproc_warn_flag
11051   else
11052     ac_cpp_err=
11053   fi
11054 else
11055   ac_cpp_err=yes
11056 fi
11057 if test -z "$ac_cpp_err"; then
11058   eval "$as_ac_Header=yes"
11059 else
11060   echo "$as_me: failed program was:" >&5
11061   cat conftest.$ac_ext >&5
11062   eval "$as_ac_Header=no"
11063 fi
11064 rm -f conftest.err conftest.$ac_ext
11065 fi
11066 echo "$as_me:11066: result: `eval echo '${'$as_ac_Header'}'`" >&5
11067 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11068 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11069   cat >>confdefs.h <<EOF
11070 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11071 EOF
11072
11073 fi
11074 done
11075
11076 # check for ISC (this may also define _POSIX_SOURCE)
11077 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11078 if test "$ISC" = yes ; then
11079
11080 echo "$as_me:11080: checking for main in -lcposix" >&5
11081 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11082 if test "${ac_cv_lib_cposix_main+set}" = set; then
11083   echo $ECHO_N "(cached) $ECHO_C" >&6
11084 else
11085   ac_check_lib_save_LIBS=$LIBS
11086 LIBS="-lcposix  $LIBS"
11087 cat >conftest.$ac_ext <<_ACEOF
11088 #line 11088 "configure"
11089 #include "confdefs.h"
11090
11091 int
11092 main ()
11093 {
11094 main ();
11095   ;
11096   return 0;
11097 }
11098 _ACEOF
11099 rm -f conftest.$ac_objext conftest$ac_exeext
11100 if { (eval echo "$as_me:11100: \"$ac_link\"") >&5
11101   (eval $ac_link) 2>&5
11102   ac_status=$?
11103   echo "$as_me:11103: \$? = $ac_status" >&5
11104   (exit $ac_status); } &&
11105          { ac_try='test -s conftest$ac_exeext'
11106   { (eval echo "$as_me:11106: \"$ac_try\"") >&5
11107   (eval $ac_try) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); }; }; then
11111   ac_cv_lib_cposix_main=yes
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 cat conftest.$ac_ext >&5
11115 ac_cv_lib_cposix_main=no
11116 fi
11117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11118 LIBS=$ac_check_lib_save_LIBS
11119 fi
11120 echo "$as_me:11120: result: $ac_cv_lib_cposix_main" >&5
11121 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11122 if test $ac_cv_lib_cposix_main = yes; then
11123   cat >>confdefs.h <<EOF
11124 #define HAVE_LIBCPOSIX 1
11125 EOF
11126
11127   LIBS="-lcposix $LIBS"
11128
11129 fi
11130
11131         echo "$as_me:11131: checking for bzero in -linet" >&5
11132 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11133 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11134   echo $ECHO_N "(cached) $ECHO_C" >&6
11135 else
11136   ac_check_lib_save_LIBS=$LIBS
11137 LIBS="-linet  $LIBS"
11138 cat >conftest.$ac_ext <<_ACEOF
11139 #line 11139 "configure"
11140 #include "confdefs.h"
11141
11142 /* Override any gcc2 internal prototype to avoid an error.  */
11143 #ifdef __cplusplus
11144 extern "C"
11145 #endif
11146 /* We use char because int might match the return type of a gcc2
11147    builtin and then its argument prototype would still apply.  */
11148 char bzero ();
11149 int
11150 main ()
11151 {
11152 bzero ();
11153   ;
11154   return 0;
11155 }
11156 _ACEOF
11157 rm -f conftest.$ac_objext conftest$ac_exeext
11158 if { (eval echo "$as_me:11158: \"$ac_link\"") >&5
11159   (eval $ac_link) 2>&5
11160   ac_status=$?
11161   echo "$as_me:11161: \$? = $ac_status" >&5
11162   (exit $ac_status); } &&
11163          { ac_try='test -s conftest$ac_exeext'
11164   { (eval echo "$as_me:11164: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit $ac_status); }; }; then
11169   ac_cv_lib_inet_bzero=yes
11170 else
11171   echo "$as_me: failed program was:" >&5
11172 cat conftest.$ac_ext >&5
11173 ac_cv_lib_inet_bzero=no
11174 fi
11175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11176 LIBS=$ac_check_lib_save_LIBS
11177 fi
11178 echo "$as_me:11178: result: $ac_cv_lib_inet_bzero" >&5
11179 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11180 if test $ac_cv_lib_inet_bzero = yes; then
11181   LIBS="$LIBS -linet"
11182 fi
11183 fi
11184
11185 echo "$as_me:11185: checking if sys/time.h works with sys/select.h" >&5
11186 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11187 if test "${cf_cv_sys_time_select+set}" = set; then
11188   echo $ECHO_N "(cached) $ECHO_C" >&6
11189 else
11190
11191 cat >conftest.$ac_ext <<_ACEOF
11192 #line 11192 "configure"
11193 #include "confdefs.h"
11194
11195 #include <sys/types.h>
11196 #ifdef HAVE_SYS_TIME_H
11197 #include <sys/time.h>
11198 #endif
11199 #ifdef HAVE_SYS_SELECT_H
11200 #include <sys/select.h>
11201 #endif
11202
11203 int
11204 main ()
11205 {
11206
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 rm -f conftest.$ac_objext
11212 if { (eval echo "$as_me:11212: \"$ac_compile\"") >&5
11213   (eval $ac_compile) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit $ac_status); } &&
11217          { ac_try='test -s conftest.$ac_objext'
11218   { (eval echo "$as_me:11218: \"$ac_try\"") >&5
11219   (eval $ac_try) 2>&5
11220   ac_status=$?
11221   echo "$as_me:11221: \$? = $ac_status" >&5
11222   (exit $ac_status); }; }; then
11223   cf_cv_sys_time_select=yes
11224 else
11225   echo "$as_me: failed program was:" >&5
11226 cat conftest.$ac_ext >&5
11227 cf_cv_sys_time_select=no
11228 fi
11229 rm -f conftest.$ac_objext conftest.$ac_ext
11230
11231 fi
11232
11233 echo "$as_me:11233: result: $cf_cv_sys_time_select" >&5
11234 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11235 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11236 #define HAVE_SYS_TIME_SELECT 1
11237 EOF
11238
11239 ###     checks for compiler characteristics
11240 ac_ext=c
11241 ac_cpp='$CPP $CPPFLAGS'
11242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11245 ac_main_return=return
11246
11247 echo "$as_me:11247: checking for $CC option to accept ANSI C" >&5
11248 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11249 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11250   echo $ECHO_N "(cached) $ECHO_C" >&6
11251 else
11252   ac_cv_prog_cc_stdc=no
11253 ac_save_CC=$CC
11254 cat >conftest.$ac_ext <<_ACEOF
11255 #line 11255 "configure"
11256 #include "confdefs.h"
11257 #include <stdarg.h>
11258 #include <stdio.h>
11259 #include <sys/types.h>
11260 #include <sys/stat.h>
11261 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11262 struct buf { int x; };
11263 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11264 static char *e (p, i)
11265      char **p;
11266      int i;
11267 {
11268   return p[i];
11269 }
11270 static char *f (char * (*g) (char **, int), char **p, ...)
11271 {
11272   char *s;
11273   va_list v;
11274   va_start (v,p);
11275   s = g (p, va_arg (v,int));
11276   va_end (v);
11277   return s;
11278 }
11279 int test (int i, double x);
11280 struct s1 {int (*f) (int a);};
11281 struct s2 {int (*f) (double a);};
11282 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11283 int argc;
11284 char **argv;
11285 int
11286 main ()
11287 {
11288 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11289   ;
11290   return 0;
11291 }
11292 _ACEOF
11293 # Don't try gcc -ansi; that turns off useful extensions and
11294 # breaks some systems' header files.
11295 # AIX                   -qlanglvl=ansi
11296 # Ultrix and OSF/1      -std1
11297 # HP-UX 10.20 and later -Ae
11298 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11299 # SVR4                  -Xc -D__EXTENSIONS__
11300 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11301 do
11302   CC="$ac_save_CC $ac_arg"
11303   rm -f conftest.$ac_objext
11304 if { (eval echo "$as_me:11304: \"$ac_compile\"") >&5
11305   (eval $ac_compile) 2>&5
11306   ac_status=$?
11307   echo "$as_me:11307: \$? = $ac_status" >&5
11308   (exit $ac_status); } &&
11309          { ac_try='test -s conftest.$ac_objext'
11310   { (eval echo "$as_me:11310: \"$ac_try\"") >&5
11311   (eval $ac_try) 2>&5
11312   ac_status=$?
11313   echo "$as_me:11313: \$? = $ac_status" >&5
11314   (exit $ac_status); }; }; then
11315   ac_cv_prog_cc_stdc=$ac_arg
11316 break
11317 else
11318   echo "$as_me: failed program was:" >&5
11319 cat conftest.$ac_ext >&5
11320 fi
11321 rm -f conftest.$ac_objext
11322 done
11323 rm -f conftest.$ac_ext conftest.$ac_objext
11324 CC=$ac_save_CC
11325
11326 fi
11327
11328 case "x$ac_cv_prog_cc_stdc" in
11329   x|xno)
11330     echo "$as_me:11330: result: none needed" >&5
11331 echo "${ECHO_T}none needed" >&6 ;;
11332   *)
11333     echo "$as_me:11333: result: $ac_cv_prog_cc_stdc" >&5
11334 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11335     CC="$CC $ac_cv_prog_cc_stdc" ;;
11336 esac
11337
11338 echo "$as_me:11338: checking for an ANSI C-conforming const" >&5
11339 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11340 if test "${ac_cv_c_const+set}" = set; then
11341   echo $ECHO_N "(cached) $ECHO_C" >&6
11342 else
11343   cat >conftest.$ac_ext <<_ACEOF
11344 #line 11344 "configure"
11345 #include "confdefs.h"
11346
11347 int
11348 main ()
11349 {
11350 /* FIXME: Include the comments suggested by Paul. */
11351 #ifndef __cplusplus
11352   /* Ultrix mips cc rejects this.  */
11353   typedef int charset[2];
11354   const charset x;
11355   /* SunOS 4.1.1 cc rejects this.  */
11356   char const *const *ccp;
11357   char **p;
11358   /* NEC SVR4.0.2 mips cc rejects this.  */
11359   struct point {int x, y;};
11360   static struct point const zero = {0,0};
11361   /* AIX XL C 1.02.0.0 rejects this.
11362      It does not let you subtract one const X* pointer from another in
11363      an arm of an if-expression whose if-part is not a constant
11364      expression */
11365   const char *g = "string";
11366   ccp = &g + (g ? g-g : 0);
11367   /* HPUX 7.0 cc rejects these. */
11368   ++ccp;
11369   p = (char**) ccp;
11370   ccp = (char const *const *) p;
11371   { /* SCO 3.2v4 cc rejects this.  */
11372     char *t;
11373     char const *s = 0 ? (char *) 0 : (char const *) 0;
11374
11375     *t++ = 0;
11376   }
11377   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11378     int x[] = {25, 17};
11379     const int *foo = &x[0];
11380     ++foo;
11381   }
11382   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11383     typedef const int *iptr;
11384     iptr p = 0;
11385     ++p;
11386   }
11387   { /* AIX XL C 1.02.0.0 rejects this saying
11388        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11389     struct s { int j; const int *ap[3]; };
11390     struct s *b; b->j = 5;
11391   }
11392   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11393     const int foo = 10;
11394   }
11395 #endif
11396
11397   ;
11398   return 0;
11399 }
11400 _ACEOF
11401 rm -f conftest.$ac_objext
11402 if { (eval echo "$as_me:11402: \"$ac_compile\"") >&5
11403   (eval $ac_compile) 2>&5
11404   ac_status=$?
11405   echo "$as_me:11405: \$? = $ac_status" >&5
11406   (exit $ac_status); } &&
11407          { ac_try='test -s conftest.$ac_objext'
11408   { (eval echo "$as_me:11408: \"$ac_try\"") >&5
11409   (eval $ac_try) 2>&5
11410   ac_status=$?
11411   echo "$as_me:11411: \$? = $ac_status" >&5
11412   (exit $ac_status); }; }; then
11413   ac_cv_c_const=yes
11414 else
11415   echo "$as_me: failed program was:" >&5
11416 cat conftest.$ac_ext >&5
11417 ac_cv_c_const=no
11418 fi
11419 rm -f conftest.$ac_objext conftest.$ac_ext
11420 fi
11421 echo "$as_me:11421: result: $ac_cv_c_const" >&5
11422 echo "${ECHO_T}$ac_cv_c_const" >&6
11423 if test $ac_cv_c_const = no; then
11424
11425 cat >>confdefs.h <<\EOF
11426 #define const
11427 EOF
11428
11429 fi
11430
11431 echo "$as_me:11431: checking for inline" >&5
11432 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11433 if test "${ac_cv_c_inline+set}" = set; then
11434   echo $ECHO_N "(cached) $ECHO_C" >&6
11435 else
11436   ac_cv_c_inline=no
11437 for ac_kw in inline __inline__ __inline; do
11438   cat >conftest.$ac_ext <<_ACEOF
11439 #line 11439 "configure"
11440 #include "confdefs.h"
11441 #ifndef __cplusplus
11442 static $ac_kw int static_foo () {return 0; }
11443 $ac_kw int foo () {return 0; }
11444 #endif
11445
11446 _ACEOF
11447 rm -f conftest.$ac_objext
11448 if { (eval echo "$as_me:11448: \"$ac_compile\"") >&5
11449   (eval $ac_compile) 2>&5
11450   ac_status=$?
11451   echo "$as_me:11451: \$? = $ac_status" >&5
11452   (exit $ac_status); } &&
11453          { ac_try='test -s conftest.$ac_objext'
11454   { (eval echo "$as_me:11454: \"$ac_try\"") >&5
11455   (eval $ac_try) 2>&5
11456   ac_status=$?
11457   echo "$as_me:11457: \$? = $ac_status" >&5
11458   (exit $ac_status); }; }; then
11459   ac_cv_c_inline=$ac_kw; break
11460 else
11461   echo "$as_me: failed program was:" >&5
11462 cat conftest.$ac_ext >&5
11463 fi
11464 rm -f conftest.$ac_objext conftest.$ac_ext
11465 done
11466
11467 fi
11468 echo "$as_me:11468: result: $ac_cv_c_inline" >&5
11469 echo "${ECHO_T}$ac_cv_c_inline" >&6
11470 case $ac_cv_c_inline in
11471   inline | yes) ;;
11472   no)
11473 cat >>confdefs.h <<\EOF
11474 #define inline
11475 EOF
11476  ;;
11477   *)  cat >>confdefs.h <<EOF
11478 #define inline $ac_cv_c_inline
11479 EOF
11480  ;;
11481 esac
11482
11483 NCURSES_INLINE=
11484 if test "$ac_cv_c_inline" != no ; then
11485         NCURSES_INLINE=inline
11486         if test "$GCC" = yes
11487         then
11488                 echo "$as_me:11488: checking if gcc supports options to tune inlining" >&5
11489 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11490 if test "${cf_cv_gcc_inline+set}" = set; then
11491   echo $ECHO_N "(cached) $ECHO_C" >&6
11492 else
11493
11494                         cf_save_CFLAGS=$CFLAGS
11495                         CFLAGS="$CFLAGS --param max-inline-insns-single=500"
11496                         cat >conftest.$ac_ext <<_ACEOF
11497 #line 11497 "configure"
11498 #include "confdefs.h"
11499 inline int foo(void) { return 1; }
11500 int
11501 main ()
11502 {
11503 ${cf_cv_main_return:-return} foo()
11504   ;
11505   return 0;
11506 }
11507 _ACEOF
11508 rm -f conftest.$ac_objext
11509 if { (eval echo "$as_me:11509: \"$ac_compile\"") >&5
11510   (eval $ac_compile) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); } &&
11514          { ac_try='test -s conftest.$ac_objext'
11515   { (eval echo "$as_me:11515: \"$ac_try\"") >&5
11516   (eval $ac_try) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit $ac_status); }; }; then
11520   cf_cv_gcc_inline=yes
11521 else
11522   echo "$as_me: failed program was:" >&5
11523 cat conftest.$ac_ext >&5
11524 cf_cv_gcc_inline=no
11525 fi
11526 rm -f conftest.$ac_objext conftest.$ac_ext
11527                         CFLAGS=$cf_save_CFLAGS
11528
11529 fi
11530 echo "$as_me:11530: result: $cf_cv_gcc_inline" >&5
11531 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11532                 if test "$cf_cv_gcc_inline" = yes ; then
11533
11534 cf_fix_cppflags=no
11535 cf_new_cflags=
11536 cf_new_cppflags=
11537 cf_new_extra_cppflags=
11538
11539 for cf_add_cflags in --param max-inline-insns-single=500
11540 do
11541 case $cf_fix_cppflags in
11542 no)
11543         case $cf_add_cflags in #(vi
11544         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11545                 case $cf_add_cflags in
11546                 -D*)
11547                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11548
11549                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11550                         && test -z "${cf_tst_cflags}" \
11551                         && cf_fix_cppflags=yes
11552
11553                         if test $cf_fix_cppflags = yes ; then
11554                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11555                                 continue
11556                         elif test "${cf_tst_cflags}" = "\"'" ; then
11557                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11558                                 continue
11559                         fi
11560                         ;;
11561                 esac
11562                 case "$CPPFLAGS" in
11563                 *$cf_add_cflags) #(vi
11564                         ;;
11565                 *) #(vi
11566                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11567                         ;;
11568                 esac
11569                 ;;
11570         *)
11571                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11572                 ;;
11573         esac
11574         ;;
11575 yes)
11576         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11577
11578         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11579
11580         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11581         && test -z "${cf_tst_cflags}" \
11582         && cf_fix_cppflags=no
11583         ;;
11584 esac
11585 done
11586
11587 if test -n "$cf_new_cflags" ; then
11588
11589         CFLAGS="$CFLAGS $cf_new_cflags"
11590 fi
11591
11592 if test -n "$cf_new_cppflags" ; then
11593
11594         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11595 fi
11596
11597 if test -n "$cf_new_extra_cppflags" ; then
11598
11599         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11600 fi
11601
11602                 fi
11603         fi
11604 fi
11605
11606 echo "$as_me:11606: checking for signal global datatype" >&5
11607 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11608 if test "${cf_cv_sig_atomic_t+set}" = set; then
11609   echo $ECHO_N "(cached) $ECHO_C" >&6
11610 else
11611
11612         for cf_type in \
11613                 "volatile sig_atomic_t" \
11614                 "sig_atomic_t" \
11615                 "int"
11616         do
11617         cat >conftest.$ac_ext <<_ACEOF
11618 #line 11618 "configure"
11619 #include "confdefs.h"
11620
11621 #include <sys/types.h>
11622 #include <signal.h>
11623 #include <stdio.h>
11624
11625 extern $cf_type x;
11626 $cf_type x;
11627 static void handler(int sig)
11628 {
11629         x = 5;
11630 }
11631 int
11632 main ()
11633 {
11634 signal(SIGINT, handler);
11635                  x = 1
11636   ;
11637   return 0;
11638 }
11639 _ACEOF
11640 rm -f conftest.$ac_objext
11641 if { (eval echo "$as_me:11641: \"$ac_compile\"") >&5
11642   (eval $ac_compile) 2>&5
11643   ac_status=$?
11644   echo "$as_me:11644: \$? = $ac_status" >&5
11645   (exit $ac_status); } &&
11646          { ac_try='test -s conftest.$ac_objext'
11647   { (eval echo "$as_me:11647: \"$ac_try\"") >&5
11648   (eval $ac_try) 2>&5
11649   ac_status=$?
11650   echo "$as_me:11650: \$? = $ac_status" >&5
11651   (exit $ac_status); }; }; then
11652   cf_cv_sig_atomic_t=$cf_type
11653 else
11654   echo "$as_me: failed program was:" >&5
11655 cat conftest.$ac_ext >&5
11656 cf_cv_sig_atomic_t=no
11657 fi
11658 rm -f conftest.$ac_objext conftest.$ac_ext
11659                 test "$cf_cv_sig_atomic_t" != no && break
11660         done
11661
11662 fi
11663
11664 echo "$as_me:11664: result: $cf_cv_sig_atomic_t" >&5
11665 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11666 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11667 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11668 EOF
11669
11670 if test $NCURSES_CHTYPE = auto ; then
11671
11672 echo "$as_me:11672: checking for type of chtype" >&5
11673 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11674 if test "${cf_cv_typeof_chtype+set}" = set; then
11675   echo $ECHO_N "(cached) $ECHO_C" >&6
11676 else
11677
11678                 if test "$cross_compiling" = yes; then
11679   cf_cv_typeof_chtype=long
11680 else
11681   cat >conftest.$ac_ext <<_ACEOF
11682 #line 11682 "configure"
11683 #include "confdefs.h"
11684
11685 #define WANT_BITS 31
11686 #include <stdio.h>
11687 int main()
11688 {
11689         FILE *fp = fopen("cf_test.out", "w");
11690         if (fp != 0) {
11691                 char *result = "long";
11692                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11693                         int n;
11694                         unsigned int x, y;
11695                         for (n = 0; n < WANT_BITS; n++) {
11696                                 x = (1 << n);
11697                                 y = (x >> n);
11698                                 if (y != 1 || x == 0) {
11699                                         x = 0;
11700                                         break;
11701                                 }
11702                         }
11703                         /*
11704                          * If x is nonzero, an int is big enough for the bits
11705                          * that we want.
11706                          */
11707                         result = (x != 0) ? "int" : "long";
11708                 }
11709                 fputs(result, fp);
11710                 fclose(fp);
11711         }
11712         ${cf_cv_main_return:-return}(0);
11713 }
11714
11715 _ACEOF
11716 rm -f conftest$ac_exeext
11717 if { (eval echo "$as_me:11717: \"$ac_link\"") >&5
11718   (eval $ac_link) 2>&5
11719   ac_status=$?
11720   echo "$as_me:11720: \$? = $ac_status" >&5
11721   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   cf_cv_typeof_chtype=`cat cf_test.out`
11728 else
11729   echo "$as_me: program exited with status $ac_status" >&5
11730 echo "$as_me: failed program was:" >&5
11731 cat conftest.$ac_ext >&5
11732 cf_cv_typeof_chtype=long
11733 fi
11734 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11735 fi
11736                 rm -f cf_test.out
11737
11738 fi
11739
11740 echo "$as_me:11740: result: $cf_cv_typeof_chtype" >&5
11741 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11742
11743 cat >>confdefs.h <<EOF
11744 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11745 EOF
11746
11747 else
11748         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11749 fi
11750 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11751
11752 echo "$as_me:11752: checking if unsigned literals are legal" >&5
11753 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11754 if test "${cf_cv_unsigned_literals+set}" = set; then
11755   echo $ECHO_N "(cached) $ECHO_C" >&6
11756 else
11757
11758         cat >conftest.$ac_ext <<_ACEOF
11759 #line 11759 "configure"
11760 #include "confdefs.h"
11761
11762 int
11763 main ()
11764 {
11765 long x = 1L + 1UL + 1U + 1
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 rm -f conftest.$ac_objext
11771 if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5
11772   (eval $ac_compile) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); } &&
11776          { ac_try='test -s conftest.$ac_objext'
11777   { (eval echo "$as_me:11777: \"$ac_try\"") >&5
11778   (eval $ac_try) 2>&5
11779   ac_status=$?
11780   echo "$as_me:11780: \$? = $ac_status" >&5
11781   (exit $ac_status); }; }; then
11782   cf_cv_unsigned_literals=yes
11783 else
11784   echo "$as_me: failed program was:" >&5
11785 cat conftest.$ac_ext >&5
11786 cf_cv_unsigned_literals=no
11787 fi
11788 rm -f conftest.$ac_objext conftest.$ac_ext
11789
11790 fi
11791
11792 echo "$as_me:11792: result: $cf_cv_unsigned_literals" >&5
11793 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11794
11795 cf_cv_1UL="1"
11796 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11797 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11798
11799 if test $NCURSES_MMASK_T = auto ; then
11800         cf_cv_typeof_mmask_t=long
11801 else
11802         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11803 fi
11804 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11805
11806 ###     Checks for external-data
11807
11808 echo "$as_me:11808: checking if external errno is declared" >&5
11809 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11810 if test "${cf_cv_dcl_errno+set}" = set; then
11811   echo $ECHO_N "(cached) $ECHO_C" >&6
11812 else
11813
11814     cat >conftest.$ac_ext <<_ACEOF
11815 #line 11815 "configure"
11816 #include "confdefs.h"
11817
11818 #ifdef HAVE_STDLIB_H
11819 #include <stdlib.h>
11820 #endif
11821 #include <stdio.h>
11822 #include <sys/types.h>
11823 #include <errno.h>
11824 int
11825 main ()
11826 {
11827 long x = (long) errno
11828   ;
11829   return 0;
11830 }
11831 _ACEOF
11832 rm -f conftest.$ac_objext
11833 if { (eval echo "$as_me:11833: \"$ac_compile\"") >&5
11834   (eval $ac_compile) 2>&5
11835   ac_status=$?
11836   echo "$as_me:11836: \$? = $ac_status" >&5
11837   (exit $ac_status); } &&
11838          { ac_try='test -s conftest.$ac_objext'
11839   { (eval echo "$as_me:11839: \"$ac_try\"") >&5
11840   (eval $ac_try) 2>&5
11841   ac_status=$?
11842   echo "$as_me:11842: \$? = $ac_status" >&5
11843   (exit $ac_status); }; }; then
11844   cf_cv_dcl_errno=yes
11845 else
11846   echo "$as_me: failed program was:" >&5
11847 cat conftest.$ac_ext >&5
11848 cf_cv_dcl_errno=no
11849 fi
11850 rm -f conftest.$ac_objext conftest.$ac_ext
11851
11852 fi
11853 echo "$as_me:11853: result: $cf_cv_dcl_errno" >&5
11854 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11855
11856 if test "$cf_cv_dcl_errno" = no ; then
11857
11858 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11859
11860     cat >>confdefs.h <<EOF
11861 #define $cf_result 1
11862 EOF
11863
11864 fi
11865
11866 # It's possible (for near-UNIX clones) that the data doesn't exist
11867
11868 echo "$as_me:11868: checking if external errno exists" >&5
11869 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11870 if test "${cf_cv_have_errno+set}" = set; then
11871   echo $ECHO_N "(cached) $ECHO_C" >&6
11872 else
11873
11874     cat >conftest.$ac_ext <<_ACEOF
11875 #line 11875 "configure"
11876 #include "confdefs.h"
11877
11878 #undef errno
11879 extern int errno;
11880
11881 int
11882 main ()
11883 {
11884 errno = 2
11885   ;
11886   return 0;
11887 }
11888 _ACEOF
11889 rm -f conftest.$ac_objext conftest$ac_exeext
11890 if { (eval echo "$as_me:11890: \"$ac_link\"") >&5
11891   (eval $ac_link) 2>&5
11892   ac_status=$?
11893   echo "$as_me:11893: \$? = $ac_status" >&5
11894   (exit $ac_status); } &&
11895          { ac_try='test -s conftest$ac_exeext'
11896   { (eval echo "$as_me:11896: \"$ac_try\"") >&5
11897   (eval $ac_try) 2>&5
11898   ac_status=$?
11899   echo "$as_me:11899: \$? = $ac_status" >&5
11900   (exit $ac_status); }; }; then
11901   cf_cv_have_errno=yes
11902 else
11903   echo "$as_me: failed program was:" >&5
11904 cat conftest.$ac_ext >&5
11905 cf_cv_have_errno=no
11906 fi
11907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11908
11909 fi
11910 echo "$as_me:11910: result: $cf_cv_have_errno" >&5
11911 echo "${ECHO_T}$cf_cv_have_errno" >&6
11912
11913 if test "$cf_cv_have_errno" = yes ; then
11914
11915 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11916
11917     cat >>confdefs.h <<EOF
11918 #define $cf_result 1
11919 EOF
11920
11921 fi
11922
11923 echo "$as_me:11923: checking if data-only library module links" >&5
11924 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11925 if test "${cf_cv_link_dataonly+set}" = set; then
11926   echo $ECHO_N "(cached) $ECHO_C" >&6
11927 else
11928
11929         rm -f conftest.a
11930         cat >conftest.$ac_ext <<EOF
11931 #line 11931 "configure"
11932 int     testdata[3] = { 123, 456, 789 };
11933 EOF
11934         if { (eval echo "$as_me:11934: \"$ac_compile\"") >&5
11935   (eval $ac_compile) 2>&5
11936   ac_status=$?
11937   echo "$as_me:11937: \$? = $ac_status" >&5
11938   (exit $ac_status); } ; then
11939                 mv conftest.o data.o && \
11940                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11941         fi
11942         rm -f conftest.$ac_ext data.o
11943         cat >conftest.$ac_ext <<EOF
11944 #line 11944 "configure"
11945 int     testfunc()
11946 {
11947 #if defined(NeXT)
11948         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11949 #else
11950         extern int testdata[3];
11951         return testdata[0] == 123
11952            &&  testdata[1] == 456
11953            &&  testdata[2] == 789;
11954 #endif
11955 }
11956 EOF
11957         if { (eval echo "$as_me:11957: \"$ac_compile\"") >&5
11958   (eval $ac_compile) 2>&5
11959   ac_status=$?
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit $ac_status); }; then
11962                 mv conftest.o func.o && \
11963                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11964         fi
11965         rm -f conftest.$ac_ext func.o
11966         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11967         cf_saveLIBS="$LIBS"
11968         LIBS="conftest.a $LIBS"
11969         if test "$cross_compiling" = yes; then
11970   cf_cv_link_dataonly=unknown
11971 else
11972   cat >conftest.$ac_ext <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975
11976         int main()
11977         {
11978                 extern int testfunc();
11979                 ${cf_cv_main_return:-return} (!testfunc());
11980         }
11981
11982 _ACEOF
11983 rm -f conftest$ac_exeext
11984 if { (eval echo "$as_me:11984: \"$ac_link\"") >&5
11985   (eval $ac_link) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11989   { (eval echo "$as_me:11989: \"$ac_try\"") >&5
11990   (eval $ac_try) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit $ac_status); }; }; then
11994   cf_cv_link_dataonly=yes
11995 else
11996   echo "$as_me: program exited with status $ac_status" >&5
11997 echo "$as_me: failed program was:" >&5
11998 cat conftest.$ac_ext >&5
11999 cf_cv_link_dataonly=no
12000 fi
12001 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12002 fi
12003         LIBS="$cf_saveLIBS"
12004
12005 fi
12006
12007 echo "$as_me:12007: result: $cf_cv_link_dataonly" >&5
12008 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12009
12010 if test "$cf_cv_link_dataonly" = no ; then
12011         cat >>confdefs.h <<\EOF
12012 #define BROKEN_LINKER 1
12013 EOF
12014
12015         BROKEN_LINKER=1
12016 fi
12017
12018 ###     Checks for library functions.
12019
12020 for ac_func in \
12021 getcwd \
12022 getegid \
12023 geteuid \
12024 getttynam \
12025 issetugid \
12026 poll \
12027 remove \
12028 select \
12029 setbuf \
12030 setbuffer \
12031 setvbuf \
12032 sigaction \
12033 sigvec \
12034 strdup \
12035 strstr \
12036 tcgetpgrp \
12037 times \
12038 vsnprintf \
12039
12040 do
12041 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12042 echo "$as_me:12042: checking for $ac_func" >&5
12043 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12044 if eval "test \"\${$as_ac_var+set}\" = set"; then
12045   echo $ECHO_N "(cached) $ECHO_C" >&6
12046 else
12047   cat >conftest.$ac_ext <<_ACEOF
12048 #line 12048 "configure"
12049 #include "confdefs.h"
12050 /* System header to define __stub macros and hopefully few prototypes,
12051     which can conflict with char $ac_func (); below.  */
12052 #include <assert.h>
12053 /* Override any gcc2 internal prototype to avoid an error.  */
12054 #ifdef __cplusplus
12055 extern "C"
12056 #endif
12057 /* We use char because int might match the return type of a gcc2
12058    builtin and then its argument prototype would still apply.  */
12059 char $ac_func ();
12060 char (*f) ();
12061
12062 int
12063 main ()
12064 {
12065 /* The GNU C library defines this for functions which it implements
12066     to always fail with ENOSYS.  Some functions are actually named
12067     something starting with __ and the normal name is an alias.  */
12068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12069 choke me
12070 #else
12071 f = $ac_func;
12072 #endif
12073
12074   ;
12075   return 0;
12076 }
12077 _ACEOF
12078 rm -f conftest.$ac_objext conftest$ac_exeext
12079 if { (eval echo "$as_me:12079: \"$ac_link\"") >&5
12080   (eval $ac_link) 2>&5
12081   ac_status=$?
12082   echo "$as_me:12082: \$? = $ac_status" >&5
12083   (exit $ac_status); } &&
12084          { ac_try='test -s conftest$ac_exeext'
12085   { (eval echo "$as_me:12085: \"$ac_try\"") >&5
12086   (eval $ac_try) 2>&5
12087   ac_status=$?
12088   echo "$as_me:12088: \$? = $ac_status" >&5
12089   (exit $ac_status); }; }; then
12090   eval "$as_ac_var=yes"
12091 else
12092   echo "$as_me: failed program was:" >&5
12093 cat conftest.$ac_ext >&5
12094 eval "$as_ac_var=no"
12095 fi
12096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12097 fi
12098 echo "$as_me:12098: result: `eval echo '${'$as_ac_var'}'`" >&5
12099 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12100 if test `eval echo '${'$as_ac_var'}'` = yes; then
12101   cat >>confdefs.h <<EOF
12102 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12103 EOF
12104
12105 fi
12106 done
12107
12108 if test "$with_getcap" = "yes" ; then
12109
12110 echo "$as_me:12110: checking for terminal-capability database functions" >&5
12111 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12112 if test "${cf_cv_cgetent+set}" = set; then
12113   echo $ECHO_N "(cached) $ECHO_C" >&6
12114 else
12115
12116 cat >conftest.$ac_ext <<_ACEOF
12117 #line 12117 "configure"
12118 #include "confdefs.h"
12119
12120 #include <stdlib.h>
12121 int
12122 main ()
12123 {
12124
12125         char temp[128];
12126         char *buf = temp;
12127         char *db_array = temp;
12128         cgetent(&buf, /* int *, */ &db_array, "vt100");
12129         cgetcap(buf, "tc", '=');
12130         cgetmatch(buf, "tc");
12131
12132   ;
12133   return 0;
12134 }
12135 _ACEOF
12136 rm -f conftest.$ac_objext conftest$ac_exeext
12137 if { (eval echo "$as_me:12137: \"$ac_link\"") >&5
12138   (eval $ac_link) 2>&5
12139   ac_status=$?
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit $ac_status); } &&
12142          { ac_try='test -s conftest$ac_exeext'
12143   { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144   (eval $ac_try) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); }; }; then
12148   cf_cv_cgetent=yes
12149 else
12150   echo "$as_me: failed program was:" >&5
12151 cat conftest.$ac_ext >&5
12152 cf_cv_cgetent=no
12153 fi
12154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12155
12156 fi
12157
12158 echo "$as_me:12158: result: $cf_cv_cgetent" >&5
12159 echo "${ECHO_T}$cf_cv_cgetent" >&6
12160 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12161 #define HAVE_BSD_CGETENT 1
12162 EOF
12163
12164 fi
12165
12166 echo "$as_me:12166: checking for isascii" >&5
12167 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12168 if test "${cf_cv_have_isascii+set}" = set; then
12169   echo $ECHO_N "(cached) $ECHO_C" >&6
12170 else
12171
12172         cat >conftest.$ac_ext <<_ACEOF
12173 #line 12173 "configure"
12174 #include "confdefs.h"
12175 #include <ctype.h>
12176 int
12177 main ()
12178 {
12179 int x = isascii(' ')
12180   ;
12181   return 0;
12182 }
12183 _ACEOF
12184 rm -f conftest.$ac_objext conftest$ac_exeext
12185 if { (eval echo "$as_me:12185: \"$ac_link\"") >&5
12186   (eval $ac_link) 2>&5
12187   ac_status=$?
12188   echo "$as_me:12188: \$? = $ac_status" >&5
12189   (exit $ac_status); } &&
12190          { ac_try='test -s conftest$ac_exeext'
12191   { (eval echo "$as_me:12191: \"$ac_try\"") >&5
12192   (eval $ac_try) 2>&5
12193   ac_status=$?
12194   echo "$as_me:12194: \$? = $ac_status" >&5
12195   (exit $ac_status); }; }; then
12196   cf_cv_have_isascii=yes
12197 else
12198   echo "$as_me: failed program was:" >&5
12199 cat conftest.$ac_ext >&5
12200 cf_cv_have_isascii=no
12201 fi
12202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12203
12204 fi
12205 echo "$as_me:12205: result: $cf_cv_have_isascii" >&5
12206 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12207 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12208 #define HAVE_ISASCII 1
12209 EOF
12210
12211 if test "$ac_cv_func_sigaction" = yes; then
12212 echo "$as_me:12212: checking whether sigaction needs _POSIX_SOURCE" >&5
12213 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12214 cat >conftest.$ac_ext <<_ACEOF
12215 #line 12215 "configure"
12216 #include "confdefs.h"
12217
12218 #include <sys/types.h>
12219 #include <signal.h>
12220 int
12221 main ()
12222 {
12223 struct sigaction act
12224   ;
12225   return 0;
12226 }
12227 _ACEOF
12228 rm -f conftest.$ac_objext
12229 if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
12230   (eval $ac_compile) 2>&5
12231   ac_status=$?
12232   echo "$as_me:12232: \$? = $ac_status" >&5
12233   (exit $ac_status); } &&
12234          { ac_try='test -s conftest.$ac_objext'
12235   { (eval echo "$as_me:12235: \"$ac_try\"") >&5
12236   (eval $ac_try) 2>&5
12237   ac_status=$?
12238   echo "$as_me:12238: \$? = $ac_status" >&5
12239   (exit $ac_status); }; }; then
12240   sigact_bad=no
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 cat conftest.$ac_ext >&5
12244
12245 cat >conftest.$ac_ext <<_ACEOF
12246 #line 12246 "configure"
12247 #include "confdefs.h"
12248
12249 #define _POSIX_SOURCE
12250 #include <sys/types.h>
12251 #include <signal.h>
12252 int
12253 main ()
12254 {
12255 struct sigaction act
12256   ;
12257   return 0;
12258 }
12259 _ACEOF
12260 rm -f conftest.$ac_objext
12261 if { (eval echo "$as_me:12261: \"$ac_compile\"") >&5
12262   (eval $ac_compile) 2>&5
12263   ac_status=$?
12264   echo "$as_me:12264: \$? = $ac_status" >&5
12265   (exit $ac_status); } &&
12266          { ac_try='test -s conftest.$ac_objext'
12267   { (eval echo "$as_me:12267: \"$ac_try\"") >&5
12268   (eval $ac_try) 2>&5
12269   ac_status=$?
12270   echo "$as_me:12270: \$? = $ac_status" >&5
12271   (exit $ac_status); }; }; then
12272   sigact_bad=yes
12273          cat >>confdefs.h <<\EOF
12274 #define SVR4_ACTION 1
12275 EOF
12276
12277 else
12278   echo "$as_me: failed program was:" >&5
12279 cat conftest.$ac_ext >&5
12280 sigact_bad=unknown
12281 fi
12282 rm -f conftest.$ac_objext conftest.$ac_ext
12283 fi
12284 rm -f conftest.$ac_objext conftest.$ac_ext
12285 echo "$as_me:12285: result: $sigact_bad" >&5
12286 echo "${ECHO_T}$sigact_bad" >&6
12287 fi
12288
12289 echo "$as_me:12289: checking if nanosleep really works" >&5
12290 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12291 if test "${cf_cv_func_nanosleep+set}" = set; then
12292   echo $ECHO_N "(cached) $ECHO_C" >&6
12293 else
12294
12295 if test "$cross_compiling" = yes; then
12296   cf_cv_func_nanosleep=unknown
12297 else
12298   cat >conftest.$ac_ext <<_ACEOF
12299 #line 12299 "configure"
12300 #include "confdefs.h"
12301
12302 #include <stdio.h>
12303 #include <errno.h>
12304 #include <time.h>
12305
12306 #ifdef HAVE_SYS_TIME_H
12307 #include <sys/time.h>
12308 #endif
12309
12310 int main() {
12311         struct timespec ts1, ts2;
12312         int code;
12313         ts1.tv_sec  = 0;
12314         ts1.tv_nsec = 750000000;
12315         ts2.tv_sec  = 0;
12316         ts2.tv_nsec = 0;
12317         errno = 0;
12318         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12319         ${cf_cv_main_return:-return}(code != 0);
12320 }
12321
12322 _ACEOF
12323 rm -f conftest$ac_exeext
12324 if { (eval echo "$as_me:12324: \"$ac_link\"") >&5
12325   (eval $ac_link) 2>&5
12326   ac_status=$?
12327   echo "$as_me:12327: \$? = $ac_status" >&5
12328   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12329   { (eval echo "$as_me:12329: \"$ac_try\"") >&5
12330   (eval $ac_try) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); }; }; then
12334   cf_cv_func_nanosleep=yes
12335 else
12336   echo "$as_me: program exited with status $ac_status" >&5
12337 echo "$as_me: failed program was:" >&5
12338 cat conftest.$ac_ext >&5
12339 cf_cv_func_nanosleep=no
12340 fi
12341 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12342 fi
12343 fi
12344 echo "$as_me:12344: result: $cf_cv_func_nanosleep" >&5
12345 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12346
12347 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12348 #define HAVE_NANOSLEEP 1
12349 EOF
12350
12351 for ac_header in \
12352 termio.h \
12353 termios.h \
12354 unistd.h \
12355
12356 do
12357 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12358 echo "$as_me:12358: checking for $ac_header" >&5
12359 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12360 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12361   echo $ECHO_N "(cached) $ECHO_C" >&6
12362 else
12363   cat >conftest.$ac_ext <<_ACEOF
12364 #line 12364 "configure"
12365 #include "confdefs.h"
12366 #include <$ac_header>
12367 _ACEOF
12368 if { (eval echo "$as_me:12368: \"$ac_cpp conftest.$ac_ext\"") >&5
12369   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12370   ac_status=$?
12371   egrep -v '^ *\+' conftest.er1 >conftest.err
12372   rm -f conftest.er1
12373   cat conftest.err >&5
12374   echo "$as_me:12374: \$? = $ac_status" >&5
12375   (exit $ac_status); } >/dev/null; then
12376   if test -s conftest.err; then
12377     ac_cpp_err=$ac_c_preproc_warn_flag
12378   else
12379     ac_cpp_err=
12380   fi
12381 else
12382   ac_cpp_err=yes
12383 fi
12384 if test -z "$ac_cpp_err"; then
12385   eval "$as_ac_Header=yes"
12386 else
12387   echo "$as_me: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   eval "$as_ac_Header=no"
12390 fi
12391 rm -f conftest.err conftest.$ac_ext
12392 fi
12393 echo "$as_me:12393: result: `eval echo '${'$as_ac_Header'}'`" >&5
12394 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12395 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12396   cat >>confdefs.h <<EOF
12397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12398 EOF
12399
12400 fi
12401 done
12402
12403 if test "$ISC" = yes ; then
12404
12405 for ac_header in sys/termio.h
12406 do
12407 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12408 echo "$as_me:12408: checking for $ac_header" >&5
12409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12411   echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413   cat >conftest.$ac_ext <<_ACEOF
12414 #line 12414 "configure"
12415 #include "confdefs.h"
12416 #include <$ac_header>
12417 _ACEOF
12418 if { (eval echo "$as_me:12418: \"$ac_cpp conftest.$ac_ext\"") >&5
12419   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12420   ac_status=$?
12421   egrep -v '^ *\+' conftest.er1 >conftest.err
12422   rm -f conftest.er1
12423   cat conftest.err >&5
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit $ac_status); } >/dev/null; then
12426   if test -s conftest.err; then
12427     ac_cpp_err=$ac_c_preproc_warn_flag
12428   else
12429     ac_cpp_err=
12430   fi
12431 else
12432   ac_cpp_err=yes
12433 fi
12434 if test -z "$ac_cpp_err"; then
12435   eval "$as_ac_Header=yes"
12436 else
12437   echo "$as_me: failed program was:" >&5
12438   cat conftest.$ac_ext >&5
12439   eval "$as_ac_Header=no"
12440 fi
12441 rm -f conftest.err conftest.$ac_ext
12442 fi
12443 echo "$as_me:12443: result: `eval echo '${'$as_ac_Header'}'`" >&5
12444 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12445 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12446   cat >>confdefs.h <<EOF
12447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12448 EOF
12449
12450 fi
12451 done
12452
12453 fi
12454 if test "$ac_cv_header_termios_h" = yes ; then
12455         case "$CFLAGS $CPPFLAGS" in
12456         *-D_POSIX_SOURCE*)
12457                 termios_bad=dunno ;;
12458         *)      termios_bad=maybe ;;
12459         esac
12460         if test "$termios_bad" = maybe ; then
12461         echo "$as_me:12461: checking whether termios.h needs _POSIX_SOURCE" >&5
12462 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12463         cat >conftest.$ac_ext <<_ACEOF
12464 #line 12464 "configure"
12465 #include "confdefs.h"
12466 #include <termios.h>
12467 int
12468 main ()
12469 {
12470 struct termios foo; int x = foo.c_iflag
12471   ;
12472   return 0;
12473 }
12474 _ACEOF
12475 rm -f conftest.$ac_objext
12476 if { (eval echo "$as_me:12476: \"$ac_compile\"") >&5
12477   (eval $ac_compile) 2>&5
12478   ac_status=$?
12479   echo "$as_me:12479: \$? = $ac_status" >&5
12480   (exit $ac_status); } &&
12481          { ac_try='test -s conftest.$ac_objext'
12482   { (eval echo "$as_me:12482: \"$ac_try\"") >&5
12483   (eval $ac_try) 2>&5
12484   ac_status=$?
12485   echo "$as_me:12485: \$? = $ac_status" >&5
12486   (exit $ac_status); }; }; then
12487   termios_bad=no
12488 else
12489   echo "$as_me: failed program was:" >&5
12490 cat conftest.$ac_ext >&5
12491
12492                 cat >conftest.$ac_ext <<_ACEOF
12493 #line 12493 "configure"
12494 #include "confdefs.h"
12495
12496 #define _POSIX_SOURCE
12497 #include <termios.h>
12498 int
12499 main ()
12500 {
12501 struct termios foo; int x = foo.c_iflag
12502   ;
12503   return 0;
12504 }
12505 _ACEOF
12506 rm -f conftest.$ac_objext
12507 if { (eval echo "$as_me:12507: \"$ac_compile\"") >&5
12508   (eval $ac_compile) 2>&5
12509   ac_status=$?
12510   echo "$as_me:12510: \$? = $ac_status" >&5
12511   (exit $ac_status); } &&
12512          { ac_try='test -s conftest.$ac_objext'
12513   { (eval echo "$as_me:12513: \"$ac_try\"") >&5
12514   (eval $ac_try) 2>&5
12515   ac_status=$?
12516   echo "$as_me:12516: \$? = $ac_status" >&5
12517   (exit $ac_status); }; }; then
12518   termios_bad=unknown
12519 else
12520   echo "$as_me: failed program was:" >&5
12521 cat conftest.$ac_ext >&5
12522 termios_bad=yes cat >>confdefs.h <<\EOF
12523 #define SVR4_TERMIO 1
12524 EOF
12525
12526 fi
12527 rm -f conftest.$ac_objext conftest.$ac_ext
12528
12529 fi
12530 rm -f conftest.$ac_objext conftest.$ac_ext
12531         echo "$as_me:12531: result: $termios_bad" >&5
12532 echo "${ECHO_T}$termios_bad" >&6
12533         fi
12534 fi
12535
12536 echo "$as_me:12536: checking for tcgetattr" >&5
12537 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12538 if test "${cf_cv_have_tcgetattr+set}" = set; then
12539   echo $ECHO_N "(cached) $ECHO_C" >&6
12540 else
12541
12542 cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545
12546 #include <sys/types.h>
12547 #ifdef HAVE_UNISTD_H
12548 #include <unistd.h>
12549 #endif
12550 #ifdef HAVE_TERMIOS_H
12551 #include <termios.h>
12552 #define TTY struct termios
12553 #else
12554 #ifdef HAVE_TERMIO_H
12555 #include <termio.h>
12556 #define TTY struct termio
12557 #endif
12558 #endif
12559
12560 int
12561 main ()
12562 {
12563
12564 TTY foo;
12565 tcgetattr(1, &foo);
12566   ;
12567   return 0;
12568 }
12569 _ACEOF
12570 rm -f conftest.$ac_objext conftest$ac_exeext
12571 if { (eval echo "$as_me:12571: \"$ac_link\"") >&5
12572   (eval $ac_link) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest$ac_exeext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   cf_cv_have_tcgetattr=yes
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 cf_cv_have_tcgetattr=no
12587 fi
12588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12589 fi
12590 echo "$as_me:12590: result: $cf_cv_have_tcgetattr" >&5
12591 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12592 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12593 #define HAVE_TCGETATTR 1
12594 EOF
12595
12596 echo "$as_me:12596: checking for vsscanf function or workaround" >&5
12597 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12598 if test "${cf_cv_func_vsscanf+set}" = set; then
12599   echo $ECHO_N "(cached) $ECHO_C" >&6
12600 else
12601
12602 cat >conftest.$ac_ext <<_ACEOF
12603 #line 12603 "configure"
12604 #include "confdefs.h"
12605
12606 #include <stdarg.h>
12607 #include <stdio.h>
12608 int
12609 main ()
12610 {
12611
12612         va_list ap;
12613         vsscanf("from", "%d", ap)
12614   ;
12615   return 0;
12616 }
12617 _ACEOF
12618 rm -f conftest.$ac_objext conftest$ac_exeext
12619 if { (eval echo "$as_me:12619: \"$ac_link\"") >&5
12620   (eval $ac_link) 2>&5
12621   ac_status=$?
12622   echo "$as_me:12622: \$? = $ac_status" >&5
12623   (exit $ac_status); } &&
12624          { ac_try='test -s conftest$ac_exeext'
12625   { (eval echo "$as_me:12625: \"$ac_try\"") >&5
12626   (eval $ac_try) 2>&5
12627   ac_status=$?
12628   echo "$as_me:12628: \$? = $ac_status" >&5
12629   (exit $ac_status); }; }; then
12630   cf_cv_func_vsscanf=vsscanf
12631 else
12632   echo "$as_me: failed program was:" >&5
12633 cat conftest.$ac_ext >&5
12634
12635 cat >conftest.$ac_ext <<_ACEOF
12636 #line 12636 "configure"
12637 #include "confdefs.h"
12638
12639 #include <stdarg.h>
12640 #include <stdio.h>
12641 int
12642 main ()
12643 {
12644
12645     FILE strbuf;
12646     char *str = "from";
12647
12648     strbuf._flag = _IOREAD;
12649     strbuf._ptr = strbuf._base = (unsigned char *) str;
12650     strbuf._cnt = strlen(str);
12651     strbuf._file = _NFILE;
12652     return (vfscanf(&strbuf, "%d", ap))
12653   ;
12654   return 0;
12655 }
12656 _ACEOF
12657 rm -f conftest.$ac_objext conftest$ac_exeext
12658 if { (eval echo "$as_me:12658: \"$ac_link\"") >&5
12659   (eval $ac_link) 2>&5
12660   ac_status=$?
12661   echo "$as_me:12661: \$? = $ac_status" >&5
12662   (exit $ac_status); } &&
12663          { ac_try='test -s conftest$ac_exeext'
12664   { (eval echo "$as_me:12664: \"$ac_try\"") >&5
12665   (eval $ac_try) 2>&5
12666   ac_status=$?
12667   echo "$as_me:12667: \$? = $ac_status" >&5
12668   (exit $ac_status); }; }; then
12669   cf_cv_func_vsscanf=vfscanf
12670 else
12671   echo "$as_me: failed program was:" >&5
12672 cat conftest.$ac_ext >&5
12673
12674 cat >conftest.$ac_ext <<_ACEOF
12675 #line 12675 "configure"
12676 #include "confdefs.h"
12677
12678 #include <stdarg.h>
12679 #include <stdio.h>
12680 int
12681 main ()
12682 {
12683
12684     FILE strbuf;
12685     char *str = "from";
12686
12687     strbuf._flag = _IOREAD;
12688     strbuf._ptr = strbuf._base = (unsigned char *) str;
12689     strbuf._cnt = strlen(str);
12690     strbuf._file = _NFILE;
12691     return (_doscan(&strbuf, "%d", ap))
12692   ;
12693   return 0;
12694 }
12695 _ACEOF
12696 rm -f conftest.$ac_objext conftest$ac_exeext
12697 if { (eval echo "$as_me:12697: \"$ac_link\"") >&5
12698   (eval $ac_link) 2>&5
12699   ac_status=$?
12700   echo "$as_me:12700: \$? = $ac_status" >&5
12701   (exit $ac_status); } &&
12702          { ac_try='test -s conftest$ac_exeext'
12703   { (eval echo "$as_me:12703: \"$ac_try\"") >&5
12704   (eval $ac_try) 2>&5
12705   ac_status=$?
12706   echo "$as_me:12706: \$? = $ac_status" >&5
12707   (exit $ac_status); }; }; then
12708   cf_cv_func_vsscanf=_doscan
12709 else
12710   echo "$as_me: failed program was:" >&5
12711 cat conftest.$ac_ext >&5
12712
12713 cf_cv_func_vsscanf=no
12714 fi
12715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12716 fi
12717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12718 fi
12719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12720 fi
12721 echo "$as_me:12721: result: $cf_cv_func_vsscanf" >&5
12722 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12723
12724 case $cf_cv_func_vsscanf in #(vi
12725 vsscanf) cat >>confdefs.h <<\EOF
12726 #define HAVE_VSSCANF 1
12727 EOF
12728 ;; #(vi
12729 vfscanf) cat >>confdefs.h <<\EOF
12730 #define HAVE_VFSCANF 1
12731 EOF
12732 ;; #(vi
12733 _doscan) cat >>confdefs.h <<\EOF
12734 #define HAVE__DOSCAN 1
12735 EOF
12736 ;;
12737 esac
12738
12739 echo "$as_me:12739: checking for working mkstemp" >&5
12740 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12741 if test "${cf_cv_func_mkstemp+set}" = set; then
12742   echo $ECHO_N "(cached) $ECHO_C" >&6
12743 else
12744
12745 rm -f conftest*
12746 if test "$cross_compiling" = yes; then
12747   echo "$as_me:12747: checking for mkstemp" >&5
12748 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12749 if test "${ac_cv_func_mkstemp+set}" = set; then
12750   echo $ECHO_N "(cached) $ECHO_C" >&6
12751 else
12752   cat >conftest.$ac_ext <<_ACEOF
12753 #line 12753 "configure"
12754 #include "confdefs.h"
12755 /* System header to define __stub macros and hopefully few prototypes,
12756     which can conflict with char mkstemp (); below.  */
12757 #include <assert.h>
12758 /* Override any gcc2 internal prototype to avoid an error.  */
12759 #ifdef __cplusplus
12760 extern "C"
12761 #endif
12762 /* We use char because int might match the return type of a gcc2
12763    builtin and then its argument prototype would still apply.  */
12764 char mkstemp ();
12765 char (*f) ();
12766
12767 int
12768 main ()
12769 {
12770 /* The GNU C library defines this for functions which it implements
12771     to always fail with ENOSYS.  Some functions are actually named
12772     something starting with __ and the normal name is an alias.  */
12773 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12774 choke me
12775 #else
12776 f = mkstemp;
12777 #endif
12778
12779   ;
12780   return 0;
12781 }
12782 _ACEOF
12783 rm -f conftest.$ac_objext conftest$ac_exeext
12784 if { (eval echo "$as_me:12784: \"$ac_link\"") >&5
12785   (eval $ac_link) 2>&5
12786   ac_status=$?
12787   echo "$as_me:12787: \$? = $ac_status" >&5
12788   (exit $ac_status); } &&
12789          { ac_try='test -s conftest$ac_exeext'
12790   { (eval echo "$as_me:12790: \"$ac_try\"") >&5
12791   (eval $ac_try) 2>&5
12792   ac_status=$?
12793   echo "$as_me:12793: \$? = $ac_status" >&5
12794   (exit $ac_status); }; }; then
12795   ac_cv_func_mkstemp=yes
12796 else
12797   echo "$as_me: failed program was:" >&5
12798 cat conftest.$ac_ext >&5
12799 ac_cv_func_mkstemp=no
12800 fi
12801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12802 fi
12803 echo "$as_me:12803: result: $ac_cv_func_mkstemp" >&5
12804 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12805
12806 else
12807   cat >conftest.$ac_ext <<_ACEOF
12808 #line 12808 "configure"
12809 #include "confdefs.h"
12810
12811 #include <sys/types.h>
12812 #include <stdlib.h>
12813 #include <stdio.h>
12814 #include <string.h>
12815 #include <sys/stat.h>
12816 int main()
12817 {
12818         char *tmpl = "conftestXXXXXX";
12819         char name[2][80];
12820         int n;
12821         int result = 0;
12822         int fd;
12823         struct stat sb;
12824
12825         umask(077);
12826         for (n = 0; n < 2; ++n) {
12827                 strcpy(name[n], tmpl);
12828                 if ((fd = mkstemp(name[n])) >= 0) {
12829                         if (!strcmp(name[n], tmpl)
12830                          || stat(name[n], &sb) != 0
12831                          || (sb.st_mode & S_IFMT) != S_IFREG
12832                          || (sb.st_mode & 077) != 0) {
12833                                 result = 1;
12834                         }
12835                         close(fd);
12836                 }
12837         }
12838         if (result == 0
12839          && !strcmp(name[0], name[1]))
12840                 result = 1;
12841         ${cf_cv_main_return:-return}(result);
12842 }
12843
12844 _ACEOF
12845 rm -f conftest$ac_exeext
12846 if { (eval echo "$as_me:12846: \"$ac_link\"") >&5
12847   (eval $ac_link) 2>&5
12848   ac_status=$?
12849   echo "$as_me:12849: \$? = $ac_status" >&5
12850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12851   { (eval echo "$as_me:12851: \"$ac_try\"") >&5
12852   (eval $ac_try) 2>&5
12853   ac_status=$?
12854   echo "$as_me:12854: \$? = $ac_status" >&5
12855   (exit $ac_status); }; }; then
12856   cf_cv_func_mkstemp=yes
12857
12858 else
12859   echo "$as_me: program exited with status $ac_status" >&5
12860 echo "$as_me: failed program was:" >&5
12861 cat conftest.$ac_ext >&5
12862 cf_cv_func_mkstemp=no
12863
12864 fi
12865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12866 fi
12867
12868 fi
12869 echo "$as_me:12869: result: $cf_cv_func_mkstemp" >&5
12870 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12871 if test "$cf_cv_func_mkstemp" = yes ; then
12872         cat >>confdefs.h <<\EOF
12873 #define HAVE_MKSTEMP 1
12874 EOF
12875
12876 fi
12877
12878 # setup for prototype of fallback for vsscanf()
12879
12880 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12881         HAVE_VSSCANF=1
12882 else
12883         HAVE_VSSCANF=0
12884 fi
12885
12886 if test "$cross_compiling" = yes ; then
12887         { echo "$as_me:12887: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12888 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12889 else
12890         echo "$as_me:12890: checking whether setvbuf arguments are reversed" >&5
12891 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12892 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12893   echo $ECHO_N "(cached) $ECHO_C" >&6
12894 else
12895   if test "$cross_compiling" = yes; then
12896   { { echo "$as_me:12896: error: cannot run test program while cross compiling" >&5
12897 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12898    { (exit 1); exit 1; }; }
12899 else
12900   cat >conftest.$ac_ext <<_ACEOF
12901 #line 12901 "configure"
12902 #include "confdefs.h"
12903 #include <stdio.h>
12904 /* If setvbuf has the reversed format, exit 0. */
12905 int
12906 main ()
12907 {
12908   /* This call has the arguments reversed.
12909      A reversed system may check and see that the address of main
12910      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12911   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12912     $ac_main_return(1);
12913   putc('\r', stdout);
12914   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12915 }
12916 _ACEOF
12917 rm -f conftest$ac_exeext
12918 if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
12919   (eval $ac_link) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12923   { (eval echo "$as_me:12923: \"$ac_try\"") >&5
12924   (eval $ac_try) 2>&5
12925   ac_status=$?
12926   echo "$as_me:12926: \$? = $ac_status" >&5
12927   (exit $ac_status); }; }; then
12928   ac_cv_func_setvbuf_reversed=yes
12929 else
12930   echo "$as_me: program exited with status $ac_status" >&5
12931 echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 ac_cv_func_setvbuf_reversed=no
12934 fi
12935 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12936 fi
12937 rm -f core core.* *.core
12938 fi
12939 echo "$as_me:12939: result: $ac_cv_func_setvbuf_reversed" >&5
12940 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12941 if test $ac_cv_func_setvbuf_reversed = yes; then
12942
12943 cat >>confdefs.h <<\EOF
12944 #define SETVBUF_REVERSED 1
12945 EOF
12946
12947 fi
12948
12949 fi
12950 echo "$as_me:12950: checking return type of signal handlers" >&5
12951 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12952 if test "${ac_cv_type_signal+set}" = set; then
12953   echo $ECHO_N "(cached) $ECHO_C" >&6
12954 else
12955   cat >conftest.$ac_ext <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958 #include <sys/types.h>
12959 #include <signal.h>
12960 #ifdef signal
12961 # undef signal
12962 #endif
12963 #ifdef __cplusplus
12964 extern "C" void (*signal (int, void (*)(int)))(int);
12965 #else
12966 void (*signal ()) ();
12967 #endif
12968
12969 int
12970 main ()
12971 {
12972 int i;
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f conftest.$ac_objext
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979   (eval $ac_compile) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit $ac_status); } &&
12983          { ac_try='test -s conftest.$ac_objext'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit $ac_status); }; }; then
12989   ac_cv_type_signal=void
12990 else
12991   echo "$as_me: failed program was:" >&5
12992 cat conftest.$ac_ext >&5
12993 ac_cv_type_signal=int
12994 fi
12995 rm -f conftest.$ac_objext conftest.$ac_ext
12996 fi
12997 echo "$as_me:12997: result: $ac_cv_type_signal" >&5
12998 echo "${ECHO_T}$ac_cv_type_signal" >&6
12999
13000 cat >>confdefs.h <<EOF
13001 #define RETSIGTYPE $ac_cv_type_signal
13002 EOF
13003
13004 echo "$as_me:13004: checking for type sigaction_t" >&5
13005 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13006 if test "${cf_cv_type_sigaction+set}" = set; then
13007   echo $ECHO_N "(cached) $ECHO_C" >&6
13008 else
13009
13010         cat >conftest.$ac_ext <<_ACEOF
13011 #line 13011 "configure"
13012 #include "confdefs.h"
13013
13014 #include <signal.h>
13015 int
13016 main ()
13017 {
13018 sigaction_t x
13019   ;
13020   return 0;
13021 }
13022 _ACEOF
13023 rm -f conftest.$ac_objext
13024 if { (eval echo "$as_me:13024: \"$ac_compile\"") >&5
13025   (eval $ac_compile) 2>&5
13026   ac_status=$?
13027   echo "$as_me:13027: \$? = $ac_status" >&5
13028   (exit $ac_status); } &&
13029          { ac_try='test -s conftest.$ac_objext'
13030   { (eval echo "$as_me:13030: \"$ac_try\"") >&5
13031   (eval $ac_try) 2>&5
13032   ac_status=$?
13033   echo "$as_me:13033: \$? = $ac_status" >&5
13034   (exit $ac_status); }; }; then
13035   cf_cv_type_sigaction=yes
13036 else
13037   echo "$as_me: failed program was:" >&5
13038 cat conftest.$ac_ext >&5
13039 cf_cv_type_sigaction=no
13040 fi
13041 rm -f conftest.$ac_objext conftest.$ac_ext
13042 fi
13043
13044 echo "$as_me:13044: result: $cf_cv_type_sigaction" >&5
13045 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13046 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13047 #define HAVE_TYPE_SIGACTION 1
13048 EOF
13049
13050 echo "$as_me:13050: checking declaration of size-change" >&5
13051 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13052 if test "${cf_cv_sizechange+set}" = set; then
13053   echo $ECHO_N "(cached) $ECHO_C" >&6
13054 else
13055
13056     cf_cv_sizechange=unknown
13057     cf_save_CPPFLAGS="$CPPFLAGS"
13058
13059 for cf_opts in "" "NEED_PTEM_H"
13060 do
13061
13062     CPPFLAGS="$cf_save_CPPFLAGS"
13063     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13064     cat >conftest.$ac_ext <<_ACEOF
13065 #line 13065 "configure"
13066 #include "confdefs.h"
13067 #include <sys/types.h>
13068 #ifdef HAVE_TERMIOS_H
13069 #include <termios.h>
13070 #else
13071 #ifdef HAVE_TERMIO_H
13072 #include <termio.h>
13073 #endif
13074 #endif
13075 #ifdef NEED_PTEM_H
13076 /* This is a workaround for SCO:  they neglected to define struct winsize in
13077  * termios.h -- it's only in termio.h and ptem.h
13078  */
13079 #include        <sys/stream.h>
13080 #include        <sys/ptem.h>
13081 #endif
13082 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13083 #include <sys/ioctl.h>
13084 #endif
13085
13086 int
13087 main ()
13088 {
13089
13090 #ifdef TIOCGSIZE
13091         struct ttysize win;     /* FIXME: what system is this? */
13092         int y = win.ts_lines;
13093         int x = win.ts_cols;
13094 #else
13095 #ifdef TIOCGWINSZ
13096         struct winsize win;
13097         int y = win.ws_row;
13098         int x = win.ws_col;
13099 #else
13100         no TIOCGSIZE or TIOCGWINSZ
13101 #endif /* TIOCGWINSZ */
13102 #endif /* TIOCGSIZE */
13103
13104   ;
13105   return 0;
13106 }
13107 _ACEOF
13108 rm -f conftest.$ac_objext
13109 if { (eval echo "$as_me:13109: \"$ac_compile\"") >&5
13110   (eval $ac_compile) 2>&5
13111   ac_status=$?
13112   echo "$as_me:13112: \$? = $ac_status" >&5
13113   (exit $ac_status); } &&
13114          { ac_try='test -s conftest.$ac_objext'
13115   { (eval echo "$as_me:13115: \"$ac_try\"") >&5
13116   (eval $ac_try) 2>&5
13117   ac_status=$?
13118   echo "$as_me:13118: \$? = $ac_status" >&5
13119   (exit $ac_status); }; }; then
13120   cf_cv_sizechange=yes
13121 else
13122   echo "$as_me: failed program was:" >&5
13123 cat conftest.$ac_ext >&5
13124 cf_cv_sizechange=no
13125 fi
13126 rm -f conftest.$ac_objext conftest.$ac_ext
13127
13128         CPPFLAGS="$cf_save_CPPFLAGS"
13129         if test "$cf_cv_sizechange" = yes ; then
13130                 echo "size-change succeeded ($cf_opts)" >&5
13131                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13132                 break
13133         fi
13134 done
13135
13136 fi
13137 echo "$as_me:13137: result: $cf_cv_sizechange" >&5
13138 echo "${ECHO_T}$cf_cv_sizechange" >&6
13139 if test "$cf_cv_sizechange" != no ; then
13140         cat >>confdefs.h <<\EOF
13141 #define HAVE_SIZECHANGE 1
13142 EOF
13143
13144         case $cf_cv_sizechange in #(vi
13145         NEED*)
13146                 cat >>confdefs.h <<EOF
13147 #define $cf_cv_sizechange  1
13148 EOF
13149
13150                 ;;
13151         esac
13152 fi
13153
13154 echo "$as_me:13154: checking for memmove" >&5
13155 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13156 if test "${ac_cv_func_memmove+set}" = set; then
13157   echo $ECHO_N "(cached) $ECHO_C" >&6
13158 else
13159   cat >conftest.$ac_ext <<_ACEOF
13160 #line 13160 "configure"
13161 #include "confdefs.h"
13162 /* System header to define __stub macros and hopefully few prototypes,
13163     which can conflict with char memmove (); below.  */
13164 #include <assert.h>
13165 /* Override any gcc2 internal prototype to avoid an error.  */
13166 #ifdef __cplusplus
13167 extern "C"
13168 #endif
13169 /* We use char because int might match the return type of a gcc2
13170    builtin and then its argument prototype would still apply.  */
13171 char memmove ();
13172 char (*f) ();
13173
13174 int
13175 main ()
13176 {
13177 /* The GNU C library defines this for functions which it implements
13178     to always fail with ENOSYS.  Some functions are actually named
13179     something starting with __ and the normal name is an alias.  */
13180 #if defined (__stub_memmove) || defined (__stub___memmove)
13181 choke me
13182 #else
13183 f = memmove;
13184 #endif
13185
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 rm -f conftest.$ac_objext conftest$ac_exeext
13191 if { (eval echo "$as_me:13191: \"$ac_link\"") >&5
13192   (eval $ac_link) 2>&5
13193   ac_status=$?
13194   echo "$as_me:13194: \$? = $ac_status" >&5
13195   (exit $ac_status); } &&
13196          { ac_try='test -s conftest$ac_exeext'
13197   { (eval echo "$as_me:13197: \"$ac_try\"") >&5
13198   (eval $ac_try) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); }; }; then
13202   ac_cv_func_memmove=yes
13203 else
13204   echo "$as_me: failed program was:" >&5
13205 cat conftest.$ac_ext >&5
13206 ac_cv_func_memmove=no
13207 fi
13208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13209 fi
13210 echo "$as_me:13210: result: $ac_cv_func_memmove" >&5
13211 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13212 if test $ac_cv_func_memmove = yes; then
13213   :
13214 else
13215
13216 echo "$as_me:13216: checking for bcopy" >&5
13217 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13218 if test "${ac_cv_func_bcopy+set}" = set; then
13219   echo $ECHO_N "(cached) $ECHO_C" >&6
13220 else
13221   cat >conftest.$ac_ext <<_ACEOF
13222 #line 13222 "configure"
13223 #include "confdefs.h"
13224 /* System header to define __stub macros and hopefully few prototypes,
13225     which can conflict with char bcopy (); below.  */
13226 #include <assert.h>
13227 /* Override any gcc2 internal prototype to avoid an error.  */
13228 #ifdef __cplusplus
13229 extern "C"
13230 #endif
13231 /* We use char because int might match the return type of a gcc2
13232    builtin and then its argument prototype would still apply.  */
13233 char bcopy ();
13234 char (*f) ();
13235
13236 int
13237 main ()
13238 {
13239 /* The GNU C library defines this for functions which it implements
13240     to always fail with ENOSYS.  Some functions are actually named
13241     something starting with __ and the normal name is an alias.  */
13242 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13243 choke me
13244 #else
13245 f = bcopy;
13246 #endif
13247
13248   ;
13249   return 0;
13250 }
13251 _ACEOF
13252 rm -f conftest.$ac_objext conftest$ac_exeext
13253 if { (eval echo "$as_me:13253: \"$ac_link\"") >&5
13254   (eval $ac_link) 2>&5
13255   ac_status=$?
13256   echo "$as_me:13256: \$? = $ac_status" >&5
13257   (exit $ac_status); } &&
13258          { ac_try='test -s conftest$ac_exeext'
13259   { (eval echo "$as_me:13259: \"$ac_try\"") >&5
13260   (eval $ac_try) 2>&5
13261   ac_status=$?
13262   echo "$as_me:13262: \$? = $ac_status" >&5
13263   (exit $ac_status); }; }; then
13264   ac_cv_func_bcopy=yes
13265 else
13266   echo "$as_me: failed program was:" >&5
13267 cat conftest.$ac_ext >&5
13268 ac_cv_func_bcopy=no
13269 fi
13270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13271 fi
13272 echo "$as_me:13272: result: $ac_cv_func_bcopy" >&5
13273 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13274 if test $ac_cv_func_bcopy = yes; then
13275
13276         echo "$as_me:13276: checking if bcopy does overlapping moves" >&5
13277 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13278 if test "${cf_cv_good_bcopy+set}" = set; then
13279   echo $ECHO_N "(cached) $ECHO_C" >&6
13280 else
13281
13282                 if test "$cross_compiling" = yes; then
13283   cf_cv_good_bcopy=unknown
13284 else
13285   cat >conftest.$ac_ext <<_ACEOF
13286 #line 13286 "configure"
13287 #include "confdefs.h"
13288
13289 int main() {
13290         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13291         char temp[40];
13292         bcopy(data, temp, sizeof(data));
13293         bcopy(temp+10, temp, 15);
13294         bcopy(temp+5, temp+15, 10);
13295         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13296 }
13297
13298 _ACEOF
13299 rm -f conftest$ac_exeext
13300 if { (eval echo "$as_me:13300: \"$ac_link\"") >&5
13301   (eval $ac_link) 2>&5
13302   ac_status=$?
13303   echo "$as_me:13303: \$? = $ac_status" >&5
13304   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13305   { (eval echo "$as_me:13305: \"$ac_try\"") >&5
13306   (eval $ac_try) 2>&5
13307   ac_status=$?
13308   echo "$as_me:13308: \$? = $ac_status" >&5
13309   (exit $ac_status); }; }; then
13310   cf_cv_good_bcopy=yes
13311 else
13312   echo "$as_me: program exited with status $ac_status" >&5
13313 echo "$as_me: failed program was:" >&5
13314 cat conftest.$ac_ext >&5
13315 cf_cv_good_bcopy=no
13316 fi
13317 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13318 fi
13319
13320 fi
13321 echo "$as_me:13321: result: $cf_cv_good_bcopy" >&5
13322 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13323
13324 else
13325   cf_cv_good_bcopy=no
13326 fi
13327
13328         if test "$cf_cv_good_bcopy" = yes ; then
13329                 cat >>confdefs.h <<\EOF
13330 #define USE_OK_BCOPY 1
13331 EOF
13332
13333         else
13334                 cat >>confdefs.h <<\EOF
13335 #define USE_MY_MEMMOVE 1
13336 EOF
13337
13338         fi
13339
13340 fi
13341
13342 echo "$as_me:13342: checking if poll really works" >&5
13343 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13344 if test "${cf_cv_working_poll+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347
13348 if test "$cross_compiling" = yes; then
13349   cf_cv_working_poll=unknown
13350 else
13351   cat >conftest.$ac_ext <<_ACEOF
13352 #line 13352 "configure"
13353 #include "confdefs.h"
13354
13355 #include <stdio.h>
13356 #ifdef HAVE_POLL_H
13357 #include <poll.h>
13358 #else
13359 #include <sys/poll.h>
13360 #endif
13361 int main() {
13362         struct pollfd myfds;
13363         int ret;
13364
13365         myfds.fd = 0;
13366         myfds.events = POLLIN;
13367
13368         ret = poll(&myfds, 1, 100);
13369         ${cf_cv_main_return:-return}(ret != 0);
13370 }
13371 _ACEOF
13372 rm -f conftest$ac_exeext
13373 if { (eval echo "$as_me:13373: \"$ac_link\"") >&5
13374   (eval $ac_link) 2>&5
13375   ac_status=$?
13376   echo "$as_me:13376: \$? = $ac_status" >&5
13377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13378   { (eval echo "$as_me:13378: \"$ac_try\"") >&5
13379   (eval $ac_try) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit $ac_status); }; }; then
13383   cf_cv_working_poll=yes
13384 else
13385   echo "$as_me: program exited with status $ac_status" >&5
13386 echo "$as_me: failed program was:" >&5
13387 cat conftest.$ac_ext >&5
13388 cf_cv_working_poll=no
13389 fi
13390 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13391 fi
13392 fi
13393 echo "$as_me:13393: result: $cf_cv_working_poll" >&5
13394 echo "${ECHO_T}$cf_cv_working_poll" >&6
13395 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13396 #define HAVE_WORKING_POLL 1
13397 EOF
13398
13399 if test "$with_hashed_db" != no ; then
13400         cat >>confdefs.h <<\EOF
13401 #define USE_HASHED_DB 1
13402 EOF
13403
13404 echo "$as_me:13404: checking for db.h" >&5
13405 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13406 if test "${ac_cv_header_db_h+set}" = set; then
13407   echo $ECHO_N "(cached) $ECHO_C" >&6
13408 else
13409   cat >conftest.$ac_ext <<_ACEOF
13410 #line 13410 "configure"
13411 #include "confdefs.h"
13412 #include <db.h>
13413 _ACEOF
13414 if { (eval echo "$as_me:13414: \"$ac_cpp conftest.$ac_ext\"") >&5
13415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13416   ac_status=$?
13417   egrep -v '^ *\+' conftest.er1 >conftest.err
13418   rm -f conftest.er1
13419   cat conftest.err >&5
13420   echo "$as_me:13420: \$? = $ac_status" >&5
13421   (exit $ac_status); } >/dev/null; then
13422   if test -s conftest.err; then
13423     ac_cpp_err=$ac_c_preproc_warn_flag
13424   else
13425     ac_cpp_err=
13426   fi
13427 else
13428   ac_cpp_err=yes
13429 fi
13430 if test -z "$ac_cpp_err"; then
13431   ac_cv_header_db_h=yes
13432 else
13433   echo "$as_me: failed program was:" >&5
13434   cat conftest.$ac_ext >&5
13435   ac_cv_header_db_h=no
13436 fi
13437 rm -f conftest.err conftest.$ac_ext
13438 fi
13439 echo "$as_me:13439: result: $ac_cv_header_db_h" >&5
13440 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13441 if test $ac_cv_header_db_h = yes; then
13442
13443 echo "$as_me:13443: checking for version of db" >&5
13444 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13445 if test "${cf_cv_hashed_db_version+set}" = set; then
13446   echo $ECHO_N "(cached) $ECHO_C" >&6
13447 else
13448
13449 cf_cv_hashed_db_version=unknown
13450
13451 for cf_db_version in 1 2 3 4
13452 do
13453
13454 echo "(line 13454) testing checking for db version $cf_db_version ..." 1>&5
13455
13456         cat >conftest.$ac_ext <<_ACEOF
13457 #line 13457 "configure"
13458 #include "confdefs.h"
13459
13460 $ac_includes_default
13461 #include <db.h>
13462
13463 #ifdef DB_VERSION_MAJOR
13464         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13465 #if $cf_db_version == DB_VERSION_MAJOR
13466         /* ok */
13467 #else
13468         make an error
13469 #endif
13470 #else
13471 #if $cf_db_version == 1
13472         /* ok: assuming this is DB 1.8.5 */
13473 #else
13474         make an error
13475 #endif
13476 #endif
13477
13478 int
13479 main ()
13480 {
13481 DBT *foo = 0
13482   ;
13483   return 0;
13484 }
13485 _ACEOF
13486 rm -f conftest.$ac_objext
13487 if { (eval echo "$as_me:13487: \"$ac_compile\"") >&5
13488   (eval $ac_compile) 2>&5
13489   ac_status=$?
13490   echo "$as_me:13490: \$? = $ac_status" >&5
13491   (exit $ac_status); } &&
13492          { ac_try='test -s conftest.$ac_objext'
13493   { (eval echo "$as_me:13493: \"$ac_try\"") >&5
13494   (eval $ac_try) 2>&5
13495   ac_status=$?
13496   echo "$as_me:13496: \$? = $ac_status" >&5
13497   (exit $ac_status); }; }; then
13498
13499         cf_cv_hashed_db_version=$cf_db_version
13500         break
13501
13502 else
13503   echo "$as_me: failed program was:" >&5
13504 cat conftest.$ac_ext >&5
13505 fi
13506 rm -f conftest.$ac_objext conftest.$ac_ext
13507 done
13508
13509 fi
13510 echo "$as_me:13510: result: $cf_cv_hashed_db_version" >&5
13511 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13512
13513 if test "$cf_cv_hashed_db_version" = unknown ; then
13514         { { echo "$as_me:13514: error: Cannot determine version of db" >&5
13515 echo "$as_me: error: Cannot determine version of db" >&2;}
13516    { (exit 1); exit 1; }; }
13517 else
13518
13519 echo "$as_me:13519: checking for db libraries" >&5
13520 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13521 if test "${cf_cv_hashed_db_libs+set}" = set; then
13522   echo $ECHO_N "(cached) $ECHO_C" >&6
13523 else
13524
13525 cf_cv_hashed_db_libs=unknown
13526 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13527 do
13528         cf_save_libs="$LIBS"
13529         if test -n "$cf_db_libs"; then
13530                 LIBS="-l$cf_db_libs $LIBS"
13531         fi
13532
13533 echo "(line 13533) testing checking for library "$cf_db_libs" ..." 1>&5
13534
13535         cat >conftest.$ac_ext <<_ACEOF
13536 #line 13536 "configure"
13537 #include "confdefs.h"
13538
13539 $ac_includes_default
13540 #include <db.h>
13541
13542 int
13543 main ()
13544 {
13545
13546         char *path = "/tmp/foo";
13547 #ifdef DB_VERSION_MAJOR
13548 #if DB_VERSION_MAJOR >= 4
13549         DB *result = 0;
13550         db_create(&result, NULL, 0);
13551         result->open(result,
13552                 NULL,
13553                 path,
13554                 path,
13555                 DB_HASH,
13556                 DB_CREATE,
13557                 0644);
13558 #elif DB_VERSION_MAJOR >= 3
13559         DB *result = 0;
13560         db_create(&result, NULL, 0);
13561         result->open(result,
13562                 path,
13563                 path,
13564                 DB_HASH,
13565                 DB_CREATE,
13566                 0644);
13567 #elif DB_VERSION_MAJOR >= 2
13568         DB *result = 0;
13569         db_open(path,
13570                 DB_HASH,
13571                 DB_CREATE,
13572                 0644,
13573                 (DB_ENV *) 0,
13574                 (DB_INFO *) 0,
13575                 &result);
13576 #endif /* DB_VERSION_MAJOR */
13577 #else
13578         DB *result = dbopen(path,
13579                      2,
13580                      0644,
13581                      DB_HASH,
13582                      0);
13583 #endif
13584         ${cf_cv_main_return:-return}(result != 0)
13585
13586   ;
13587   return 0;
13588 }
13589 _ACEOF
13590 rm -f conftest.$ac_objext conftest$ac_exeext
13591 if { (eval echo "$as_me:13591: \"$ac_link\"") >&5
13592   (eval $ac_link) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit $ac_status); } &&
13596          { ac_try='test -s conftest$ac_exeext'
13597   { (eval echo "$as_me:13597: \"$ac_try\"") >&5
13598   (eval $ac_try) 2>&5
13599   ac_status=$?
13600   echo "$as_me:13600: \$? = $ac_status" >&5
13601   (exit $ac_status); }; }; then
13602
13603         if test -n "$cf_db_libs" ; then
13604                 cf_cv_hashed_db_libs=$cf_db_libs
13605         else
13606                 cf_cv_hashed_db_libs=default
13607         fi
13608         LIBS="$cf_save_libs"
13609         break
13610
13611 else
13612   echo "$as_me: failed program was:" >&5
13613 cat conftest.$ac_ext >&5
13614 fi
13615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13616         LIBS="$cf_save_libs"
13617 done
13618
13619 fi
13620 echo "$as_me:13620: result: $cf_cv_hashed_db_libs" >&5
13621 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13622
13623         if test "$cf_cv_hashed_db_libs" = unknown ; then
13624                 { { echo "$as_me:13624: error: Cannot determine library for db" >&5
13625 echo "$as_me: error: Cannot determine library for db" >&2;}
13626    { (exit 1); exit 1; }; }
13627         elif test "$cf_cv_hashed_db_libs" != default ; then
13628                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13629         fi
13630 fi
13631
13632 else
13633
13634         { { echo "$as_me:13634: error: Cannot find db.h" >&5
13635 echo "$as_me: error: Cannot find db.h" >&2;}
13636    { (exit 1); exit 1; }; }
13637
13638 fi
13639
13640 fi
13641
13642 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13643         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13644         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13645 fi
13646
13647 # Just in case, check if the C compiler has a bool type.
13648
13649 echo "$as_me:13649: checking if we should include stdbool.h" >&5
13650 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13651
13652 if test "${cf_cv_header_stdbool_h+set}" = set; then
13653   echo $ECHO_N "(cached) $ECHO_C" >&6
13654 else
13655
13656         cat >conftest.$ac_ext <<_ACEOF
13657 #line 13657 "configure"
13658 #include "confdefs.h"
13659
13660 int
13661 main ()
13662 {
13663 bool foo = false
13664   ;
13665   return 0;
13666 }
13667 _ACEOF
13668 rm -f conftest.$ac_objext
13669 if { (eval echo "$as_me:13669: \"$ac_compile\"") >&5
13670   (eval $ac_compile) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); } &&
13674          { ac_try='test -s conftest.$ac_objext'
13675   { (eval echo "$as_me:13675: \"$ac_try\"") >&5
13676   (eval $ac_try) 2>&5
13677   ac_status=$?
13678   echo "$as_me:13678: \$? = $ac_status" >&5
13679   (exit $ac_status); }; }; then
13680   cf_cv_header_stdbool_h=0
13681 else
13682   echo "$as_me: failed program was:" >&5
13683 cat conftest.$ac_ext >&5
13684 cat >conftest.$ac_ext <<_ACEOF
13685 #line 13685 "configure"
13686 #include "confdefs.h"
13687
13688 #ifndef __BEOS__
13689 #include <stdbool.h>
13690 #endif
13691
13692 int
13693 main ()
13694 {
13695 bool foo = false
13696   ;
13697   return 0;
13698 }
13699 _ACEOF
13700 rm -f conftest.$ac_objext
13701 if { (eval echo "$as_me:13701: \"$ac_compile\"") >&5
13702   (eval $ac_compile) 2>&5
13703   ac_status=$?
13704   echo "$as_me:13704: \$? = $ac_status" >&5
13705   (exit $ac_status); } &&
13706          { ac_try='test -s conftest.$ac_objext'
13707   { (eval echo "$as_me:13707: \"$ac_try\"") >&5
13708   (eval $ac_try) 2>&5
13709   ac_status=$?
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); }; }; then
13712   cf_cv_header_stdbool_h=1
13713 else
13714   echo "$as_me: failed program was:" >&5
13715 cat conftest.$ac_ext >&5
13716 cf_cv_header_stdbool_h=0
13717 fi
13718 rm -f conftest.$ac_objext conftest.$ac_ext
13719 fi
13720 rm -f conftest.$ac_objext conftest.$ac_ext
13721 fi
13722
13723 if test "$cf_cv_header_stdbool_h" = 1
13724 then    echo "$as_me:13724: result: yes" >&5
13725 echo "${ECHO_T}yes" >&6
13726 else    echo "$as_me:13726: result: no" >&5
13727 echo "${ECHO_T}no" >&6
13728 fi
13729
13730 echo "$as_me:13730: checking for builtin bool type" >&5
13731 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13732
13733 if test "${cf_cv_cc_bool_type+set}" = set; then
13734   echo $ECHO_N "(cached) $ECHO_C" >&6
13735 else
13736
13737         cat >conftest.$ac_ext <<_ACEOF
13738 #line 13738 "configure"
13739 #include "confdefs.h"
13740
13741 #include <stdio.h>
13742 #include <sys/types.h>
13743
13744 int
13745 main ()
13746 {
13747 bool x = false
13748   ;
13749   return 0;
13750 }
13751 _ACEOF
13752 rm -f conftest.$ac_objext
13753 if { (eval echo "$as_me:13753: \"$ac_compile\"") >&5
13754   (eval $ac_compile) 2>&5
13755   ac_status=$?
13756   echo "$as_me:13756: \$? = $ac_status" >&5
13757   (exit $ac_status); } &&
13758          { ac_try='test -s conftest.$ac_objext'
13759   { (eval echo "$as_me:13759: \"$ac_try\"") >&5
13760   (eval $ac_try) 2>&5
13761   ac_status=$?
13762   echo "$as_me:13762: \$? = $ac_status" >&5
13763   (exit $ac_status); }; }; then
13764   cf_cv_cc_bool_type=1
13765 else
13766   echo "$as_me: failed program was:" >&5
13767 cat conftest.$ac_ext >&5
13768 cf_cv_cc_bool_type=0
13769 fi
13770 rm -f conftest.$ac_objext conftest.$ac_ext
13771
13772 fi
13773
13774 if test "$cf_cv_cc_bool_type" = 1
13775 then    echo "$as_me:13775: result: yes" >&5
13776 echo "${ECHO_T}yes" >&6
13777 else    echo "$as_me:13777: result: no" >&5
13778 echo "${ECHO_T}no" >&6
13779 fi
13780
13781 # Check for C++ compiler characteristics (and ensure that it's there!)
13782 if test -n "$CXX" ; then
13783         ac_ext=cc
13784 ac_cpp='$CXXCPP $CPPFLAGS'
13785 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13786 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13787 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13788 ac_main_return=return
13789
13790 if test -n "$GXX" ; then
13791 case $cf_cv_system_name in #(vi
13792 os2*) #(vi
13793         cf_stdcpp_libname=stdcpp
13794         ;;
13795 *)
13796         cf_stdcpp_libname=stdc++
13797         ;;
13798 esac
13799 echo "$as_me:13799: checking for library $cf_stdcpp_libname" >&5
13800 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13801 if test "${cf_cv_libstdcpp+set}" = set; then
13802   echo $ECHO_N "(cached) $ECHO_C" >&6
13803 else
13804
13805         cf_save="$LIBS"
13806         LIBS="$LIBS -l$cf_stdcpp_libname"
13807 cat >conftest.$ac_ext <<_ACEOF
13808 #line 13808 "configure"
13809 #include "confdefs.h"
13810
13811 #include <strstream.h>
13812 int
13813 main ()
13814 {
13815
13816 char buf[80];
13817 strstreambuf foo(buf, sizeof(buf))
13818
13819   ;
13820   return 0;
13821 }
13822 _ACEOF
13823 rm -f conftest.$ac_objext conftest$ac_exeext
13824 if { (eval echo "$as_me:13824: \"$ac_link\"") >&5
13825   (eval $ac_link) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); } &&
13829          { ac_try='test -s conftest$ac_exeext'
13830   { (eval echo "$as_me:13830: \"$ac_try\"") >&5
13831   (eval $ac_try) 2>&5
13832   ac_status=$?
13833   echo "$as_me:13833: \$? = $ac_status" >&5
13834   (exit $ac_status); }; }; then
13835   cf_cv_libstdcpp=yes
13836 else
13837   echo "$as_me: failed program was:" >&5
13838 cat conftest.$ac_ext >&5
13839 cf_cv_libstdcpp=no
13840 fi
13841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13842         LIBS="$cf_save"
13843
13844 fi
13845 echo "$as_me:13845: result: $cf_cv_libstdcpp" >&5
13846 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13847 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13848 fi
13849
13850         echo "$as_me:13850: checking whether $CXX understands -c and -o together" >&5
13851 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13852 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13853   echo $ECHO_N "(cached) $ECHO_C" >&6
13854 else
13855
13856 cat > conftest.$ac_ext <<CF_EOF
13857 #include <stdio.h>
13858 int main()
13859 {
13860         ${cf_cv_main_return:-return}(0);
13861 }
13862 CF_EOF
13863 # We do the test twice because some compilers refuse to overwrite an
13864 # existing .o file with -o, though they will create one.
13865 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13866 if { (eval echo "$as_me:13866: \"$ac_try\"") >&5
13867   (eval $ac_try) 2>&5
13868   ac_status=$?
13869   echo "$as_me:13869: \$? = $ac_status" >&5
13870   (exit $ac_status); } &&
13871   test -f conftest2.$ac_objext && { (eval echo "$as_me:13871: \"$ac_try\"") >&5
13872   (eval $ac_try) 2>&5
13873   ac_status=$?
13874   echo "$as_me:13874: \$? = $ac_status" >&5
13875   (exit $ac_status); };
13876 then
13877   eval cf_cv_prog_CXX_c_o=yes
13878 else
13879   eval cf_cv_prog_CXX_c_o=no
13880 fi
13881 rm -f conftest*
13882
13883 fi
13884 if test $cf_cv_prog_CXX_c_o = yes; then
13885   echo "$as_me:13885: result: yes" >&5
13886 echo "${ECHO_T}yes" >&6
13887 else
13888   echo "$as_me:13888: result: no" >&5
13889 echo "${ECHO_T}no" >&6
13890 fi
13891
13892         case $GXX_VERSION in
13893         1*|2.0-6*)
13894                 cf_cxx_library=yes
13895                 ;;
13896         *-2.7*|2.7*)
13897
13898 cf_cxx_library=unknown
13899 case $cf_cv_system_name in #(vi
13900 os2*) #(vi
13901         cf_gpp_libname=gpp
13902         ;;
13903 *)
13904         cf_gpp_libname=g++
13905         ;;
13906 esac
13907 if test "$GXX" = yes; then
13908         echo "$as_me:13908: checking for lib$cf_gpp_libname" >&5
13909 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13910         cf_save="$LIBS"
13911         LIBS="$LIBS -l$cf_gpp_libname"
13912         cat >conftest.$ac_ext <<_ACEOF
13913 #line 13913 "configure"
13914 #include "confdefs.h"
13915
13916 #include <$cf_gpp_libname/builtin.h>
13917
13918 int
13919 main ()
13920 {
13921 two_arg_error_handler_t foo2 = lib_error_handler
13922   ;
13923   return 0;
13924 }
13925 _ACEOF
13926 rm -f conftest.$ac_objext conftest$ac_exeext
13927 if { (eval echo "$as_me:13927: \"$ac_link\"") >&5
13928   (eval $ac_link) 2>&5
13929   ac_status=$?
13930   echo "$as_me:13930: \$? = $ac_status" >&5
13931   (exit $ac_status); } &&
13932          { ac_try='test -s conftest$ac_exeext'
13933   { (eval echo "$as_me:13933: \"$ac_try\"") >&5
13934   (eval $ac_try) 2>&5
13935   ac_status=$?
13936   echo "$as_me:13936: \$? = $ac_status" >&5
13937   (exit $ac_status); }; }; then
13938   cf_cxx_library=yes
13939          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13940          if test "$cf_gpp_libname" = cpp ; then
13941             cat >>confdefs.h <<\EOF
13942 #define HAVE_GPP_BUILTIN_H 1
13943 EOF
13944
13945          else
13946             cat >>confdefs.h <<\EOF
13947 #define HAVE_GXX_BUILTIN_H 1
13948 EOF
13949
13950          fi
13951 else
13952   echo "$as_me: failed program was:" >&5
13953 cat conftest.$ac_ext >&5
13954 cat >conftest.$ac_ext <<_ACEOF
13955 #line 13955 "configure"
13956 #include "confdefs.h"
13957
13958 #include <builtin.h>
13959
13960 int
13961 main ()
13962 {
13963 two_arg_error_handler_t foo2 = lib_error_handler
13964   ;
13965   return 0;
13966 }
13967 _ACEOF
13968 rm -f conftest.$ac_objext conftest$ac_exeext
13969 if { (eval echo "$as_me:13969: \"$ac_link\"") >&5
13970   (eval $ac_link) 2>&5
13971   ac_status=$?
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit $ac_status); } &&
13974          { ac_try='test -s conftest$ac_exeext'
13975   { (eval echo "$as_me:13975: \"$ac_try\"") >&5
13976   (eval $ac_try) 2>&5
13977   ac_status=$?
13978   echo "$as_me:13978: \$? = $ac_status" >&5
13979   (exit $ac_status); }; }; then
13980   cf_cxx_library=yes
13981          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13982          cat >>confdefs.h <<\EOF
13983 #define HAVE_BUILTIN_H 1
13984 EOF
13985
13986 else
13987   echo "$as_me: failed program was:" >&5
13988 cat conftest.$ac_ext >&5
13989 cf_cxx_library=no
13990 fi
13991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13992 fi
13993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13994         LIBS="$cf_save"
13995         echo "$as_me:13995: result: $cf_cxx_library" >&5
13996 echo "${ECHO_T}$cf_cxx_library" >&6
13997 fi
13998
13999                 ;;
14000         *)
14001                 cf_cxx_library=no
14002                 ;;
14003         esac
14004
14005         ac_ext=cc
14006 ac_cpp='$CXXCPP $CPPFLAGS'
14007 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14008 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14009 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14010 ac_main_return=return
14011 echo "$as_me:14011: checking how to run the C++ preprocessor" >&5
14012 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14013 if test -z "$CXXCPP"; then
14014   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14015   echo $ECHO_N "(cached) $ECHO_C" >&6
14016 else
14017       # Double quotes because CXXCPP needs to be expanded
14018     for CXXCPP in "$CXX -E" "/lib/cpp"
14019     do
14020       ac_preproc_ok=false
14021 for ac_cxx_preproc_warn_flag in '' yes
14022 do
14023   # Use a header file that comes with gcc, so configuring glibc
14024   # with a fresh cross-compiler works.
14025   # On the NeXT, cc -E runs the code through the compiler's parser,
14026   # not just through cpp. "Syntax error" is here to catch this case.
14027   cat >conftest.$ac_ext <<_ACEOF
14028 #line 14028 "configure"
14029 #include "confdefs.h"
14030 #include <assert.h>
14031                      Syntax error
14032 _ACEOF
14033 if { (eval echo "$as_me:14033: \"$ac_cpp conftest.$ac_ext\"") >&5
14034   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14035   ac_status=$?
14036   egrep -v '^ *\+' conftest.er1 >conftest.err
14037   rm -f conftest.er1
14038   cat conftest.err >&5
14039   echo "$as_me:14039: \$? = $ac_status" >&5
14040   (exit $ac_status); } >/dev/null; then
14041   if test -s conftest.err; then
14042     ac_cpp_err=$ac_cxx_preproc_warn_flag
14043   else
14044     ac_cpp_err=
14045   fi
14046 else
14047   ac_cpp_err=yes
14048 fi
14049 if test -z "$ac_cpp_err"; then
14050   :
14051 else
14052   echo "$as_me: failed program was:" >&5
14053   cat conftest.$ac_ext >&5
14054   # Broken: fails on valid input.
14055 continue
14056 fi
14057 rm -f conftest.err conftest.$ac_ext
14058
14059   # OK, works on sane cases.  Now check whether non-existent headers
14060   # can be detected and how.
14061   cat >conftest.$ac_ext <<_ACEOF
14062 #line 14062 "configure"
14063 #include "confdefs.h"
14064 #include <ac_nonexistent.h>
14065 _ACEOF
14066 if { (eval echo "$as_me:14066: \"$ac_cpp conftest.$ac_ext\"") >&5
14067   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14068   ac_status=$?
14069   egrep -v '^ *\+' conftest.er1 >conftest.err
14070   rm -f conftest.er1
14071   cat conftest.err >&5
14072   echo "$as_me:14072: \$? = $ac_status" >&5
14073   (exit $ac_status); } >/dev/null; then
14074   if test -s conftest.err; then
14075     ac_cpp_err=$ac_cxx_preproc_warn_flag
14076   else
14077     ac_cpp_err=
14078   fi
14079 else
14080   ac_cpp_err=yes
14081 fi
14082 if test -z "$ac_cpp_err"; then
14083   # Broken: success on invalid input.
14084 continue
14085 else
14086   echo "$as_me: failed program was:" >&5
14087   cat conftest.$ac_ext >&5
14088   # Passes both tests.
14089 ac_preproc_ok=:
14090 break
14091 fi
14092 rm -f conftest.err conftest.$ac_ext
14093
14094 done
14095 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14096 rm -f conftest.err conftest.$ac_ext
14097 if $ac_preproc_ok; then
14098   break
14099 fi
14100
14101     done
14102     ac_cv_prog_CXXCPP=$CXXCPP
14103
14104 fi
14105   CXXCPP=$ac_cv_prog_CXXCPP
14106 else
14107   ac_cv_prog_CXXCPP=$CXXCPP
14108 fi
14109 echo "$as_me:14109: result: $CXXCPP" >&5
14110 echo "${ECHO_T}$CXXCPP" >&6
14111 ac_preproc_ok=false
14112 for ac_cxx_preproc_warn_flag in '' yes
14113 do
14114   # Use a header file that comes with gcc, so configuring glibc
14115   # with a fresh cross-compiler works.
14116   # On the NeXT, cc -E runs the code through the compiler's parser,
14117   # not just through cpp. "Syntax error" is here to catch this case.
14118   cat >conftest.$ac_ext <<_ACEOF
14119 #line 14119 "configure"
14120 #include "confdefs.h"
14121 #include <assert.h>
14122                      Syntax error
14123 _ACEOF
14124 if { (eval echo "$as_me:14124: \"$ac_cpp conftest.$ac_ext\"") >&5
14125   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14126   ac_status=$?
14127   egrep -v '^ *\+' conftest.er1 >conftest.err
14128   rm -f conftest.er1
14129   cat conftest.err >&5
14130   echo "$as_me:14130: \$? = $ac_status" >&5
14131   (exit $ac_status); } >/dev/null; then
14132   if test -s conftest.err; then
14133     ac_cpp_err=$ac_cxx_preproc_warn_flag
14134   else
14135     ac_cpp_err=
14136   fi
14137 else
14138   ac_cpp_err=yes
14139 fi
14140 if test -z "$ac_cpp_err"; then
14141   :
14142 else
14143   echo "$as_me: failed program was:" >&5
14144   cat conftest.$ac_ext >&5
14145   # Broken: fails on valid input.
14146 continue
14147 fi
14148 rm -f conftest.err conftest.$ac_ext
14149
14150   # OK, works on sane cases.  Now check whether non-existent headers
14151   # can be detected and how.
14152   cat >conftest.$ac_ext <<_ACEOF
14153 #line 14153 "configure"
14154 #include "confdefs.h"
14155 #include <ac_nonexistent.h>
14156 _ACEOF
14157 if { (eval echo "$as_me:14157: \"$ac_cpp conftest.$ac_ext\"") >&5
14158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14159   ac_status=$?
14160   egrep -v '^ *\+' conftest.er1 >conftest.err
14161   rm -f conftest.er1
14162   cat conftest.err >&5
14163   echo "$as_me:14163: \$? = $ac_status" >&5
14164   (exit $ac_status); } >/dev/null; then
14165   if test -s conftest.err; then
14166     ac_cpp_err=$ac_cxx_preproc_warn_flag
14167   else
14168     ac_cpp_err=
14169   fi
14170 else
14171   ac_cpp_err=yes
14172 fi
14173 if test -z "$ac_cpp_err"; then
14174   # Broken: success on invalid input.
14175 continue
14176 else
14177   echo "$as_me: failed program was:" >&5
14178   cat conftest.$ac_ext >&5
14179   # Passes both tests.
14180 ac_preproc_ok=:
14181 break
14182 fi
14183 rm -f conftest.err conftest.$ac_ext
14184
14185 done
14186 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14187 rm -f conftest.err conftest.$ac_ext
14188 if $ac_preproc_ok; then
14189   :
14190 else
14191   { { echo "$as_me:14191: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14192 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14193    { (exit 1); exit 1; }; }
14194 fi
14195
14196 ac_ext=cc
14197 ac_cpp='$CXXCPP $CPPFLAGS'
14198 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14199 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14200 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14201 ac_main_return=return
14202
14203 for ac_header in iostream typeinfo
14204 do
14205 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14206 echo "$as_me:14206: checking for $ac_header" >&5
14207 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14208 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14209   echo $ECHO_N "(cached) $ECHO_C" >&6
14210 else
14211   cat >conftest.$ac_ext <<_ACEOF
14212 #line 14212 "configure"
14213 #include "confdefs.h"
14214 #include <$ac_header>
14215 _ACEOF
14216 if { (eval echo "$as_me:14216: \"$ac_cpp conftest.$ac_ext\"") >&5
14217   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14218   ac_status=$?
14219   egrep -v '^ *\+' conftest.er1 >conftest.err
14220   rm -f conftest.er1
14221   cat conftest.err >&5
14222   echo "$as_me:14222: \$? = $ac_status" >&5
14223   (exit $ac_status); } >/dev/null; then
14224   if test -s conftest.err; then
14225     ac_cpp_err=$ac_cxx_preproc_warn_flag
14226   else
14227     ac_cpp_err=
14228   fi
14229 else
14230   ac_cpp_err=yes
14231 fi
14232 if test -z "$ac_cpp_err"; then
14233   eval "$as_ac_Header=yes"
14234 else
14235   echo "$as_me: failed program was:" >&5
14236   cat conftest.$ac_ext >&5
14237   eval "$as_ac_Header=no"
14238 fi
14239 rm -f conftest.err conftest.$ac_ext
14240 fi
14241 echo "$as_me:14241: result: `eval echo '${'$as_ac_Header'}'`" >&5
14242 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14243 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14244   cat >>confdefs.h <<EOF
14245 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14246 EOF
14247
14248 fi
14249 done
14250
14251 echo "$as_me:14251: checking if we should include stdbool.h" >&5
14252 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14253
14254 if test "${cf_cv_header_stdbool_h+set}" = set; then
14255   echo $ECHO_N "(cached) $ECHO_C" >&6
14256 else
14257
14258         cat >conftest.$ac_ext <<_ACEOF
14259 #line 14259 "configure"
14260 #include "confdefs.h"
14261
14262 int
14263 main ()
14264 {
14265 bool foo = false
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f conftest.$ac_objext
14271 if { (eval echo "$as_me:14271: \"$ac_compile\"") >&5
14272   (eval $ac_compile) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit $ac_status); } &&
14276          { ac_try='test -s conftest.$ac_objext'
14277   { (eval echo "$as_me:14277: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:14280: \$? = $ac_status" >&5
14281   (exit $ac_status); }; }; then
14282   cf_cv_header_stdbool_h=0
14283 else
14284   echo "$as_me: failed program was:" >&5
14285 cat conftest.$ac_ext >&5
14286 cat >conftest.$ac_ext <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289
14290 #ifndef __BEOS__
14291 #include <stdbool.h>
14292 #endif
14293
14294 int
14295 main ()
14296 {
14297 bool foo = false
14298   ;
14299   return 0;
14300 }
14301 _ACEOF
14302 rm -f conftest.$ac_objext
14303 if { (eval echo "$as_me:14303: \"$ac_compile\"") >&5
14304   (eval $ac_compile) 2>&5
14305   ac_status=$?
14306   echo "$as_me:14306: \$? = $ac_status" >&5
14307   (exit $ac_status); } &&
14308          { ac_try='test -s conftest.$ac_objext'
14309   { (eval echo "$as_me:14309: \"$ac_try\"") >&5
14310   (eval $ac_try) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); }; }; then
14314   cf_cv_header_stdbool_h=1
14315 else
14316   echo "$as_me: failed program was:" >&5
14317 cat conftest.$ac_ext >&5
14318 cf_cv_header_stdbool_h=0
14319 fi
14320 rm -f conftest.$ac_objext conftest.$ac_ext
14321 fi
14322 rm -f conftest.$ac_objext conftest.$ac_ext
14323 fi
14324
14325 if test "$cf_cv_header_stdbool_h" = 1
14326 then    echo "$as_me:14326: result: yes" >&5
14327 echo "${ECHO_T}yes" >&6
14328 else    echo "$as_me:14328: result: no" >&5
14329 echo "${ECHO_T}no" >&6
14330 fi
14331
14332 echo "$as_me:14332: checking for builtin bool type" >&5
14333 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14334
14335 if test "${cf_cv_builtin_bool+set}" = set; then
14336   echo $ECHO_N "(cached) $ECHO_C" >&6
14337 else
14338
14339         cat >conftest.$ac_ext <<_ACEOF
14340 #line 14340 "configure"
14341 #include "confdefs.h"
14342
14343 #include <stdio.h>
14344 #include <sys/types.h>
14345
14346 int
14347 main ()
14348 {
14349 bool x = false
14350   ;
14351   return 0;
14352 }
14353 _ACEOF
14354 rm -f conftest.$ac_objext
14355 if { (eval echo "$as_me:14355: \"$ac_compile\"") >&5
14356   (eval $ac_compile) 2>&5
14357   ac_status=$?
14358   echo "$as_me:14358: \$? = $ac_status" >&5
14359   (exit $ac_status); } &&
14360          { ac_try='test -s conftest.$ac_objext'
14361   { (eval echo "$as_me:14361: \"$ac_try\"") >&5
14362   (eval $ac_try) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); }; }; then
14366   cf_cv_builtin_bool=1
14367 else
14368   echo "$as_me: failed program was:" >&5
14369 cat conftest.$ac_ext >&5
14370 cf_cv_builtin_bool=0
14371 fi
14372 rm -f conftest.$ac_objext conftest.$ac_ext
14373
14374 fi
14375
14376 if test "$cf_cv_builtin_bool" = 1
14377 then    echo "$as_me:14377: result: yes" >&5
14378 echo "${ECHO_T}yes" >&6
14379 else    echo "$as_me:14379: result: no" >&5
14380 echo "${ECHO_T}no" >&6
14381 fi
14382
14383 echo "$as_me:14383: checking for size of bool" >&5
14384 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14385 if test "${cf_cv_type_of_bool+set}" = set; then
14386   echo $ECHO_N "(cached) $ECHO_C" >&6
14387 else
14388
14389         rm -f cf_test.out
14390         if test "$cross_compiling" = yes; then
14391   cf_cv_type_of_bool=unknown
14392 else
14393   cat >conftest.$ac_ext <<_ACEOF
14394 #line 14394 "configure"
14395 #include "confdefs.h"
14396
14397 #include <stdlib.h>
14398 #include <stdio.h>
14399
14400 #if defined(__cplusplus)
14401
14402 #ifdef HAVE_GXX_BUILTIN_H
14403 #include <g++/builtin.h>
14404 #elif HAVE_GPP_BUILTIN_H
14405 #include <gpp/builtin.h>
14406 #elif HAVE_BUILTIN_H
14407 #include <builtin.h>
14408 #endif
14409
14410 #else
14411
14412 #if $cf_cv_header_stdbool_h
14413 #include <stdbool.h>
14414 #endif
14415
14416 #endif
14417
14418 main()
14419 {
14420         FILE *fp = fopen("cf_test.out", "w");
14421         if (fp != 0) {
14422                 bool x = true;
14423                 if ((bool)(-x) >= 0)
14424                         fputs("unsigned ", fp);
14425                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14426                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14427                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14428                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14429                 fclose(fp);
14430         }
14431         ${cf_cv_main_return:-return}(0);
14432 }
14433
14434 _ACEOF
14435 rm -f conftest$ac_exeext
14436 if { (eval echo "$as_me:14436: \"$ac_link\"") >&5
14437   (eval $ac_link) 2>&5
14438   ac_status=$?
14439   echo "$as_me:14439: \$? = $ac_status" >&5
14440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14441   { (eval echo "$as_me:14441: \"$ac_try\"") >&5
14442   (eval $ac_try) 2>&5
14443   ac_status=$?
14444   echo "$as_me:14444: \$? = $ac_status" >&5
14445   (exit $ac_status); }; }; then
14446   cf_cv_type_of_bool=`cat cf_test.out`
14447                  if test -z "$cf_cv_type_of_bool"; then
14448                    cf_cv_type_of_bool=unknown
14449                  fi
14450 else
14451   echo "$as_me: program exited with status $ac_status" >&5
14452 echo "$as_me: failed program was:" >&5
14453 cat conftest.$ac_ext >&5
14454 cf_cv_type_of_bool=unknown
14455 fi
14456 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14457 fi
14458
14459 fi
14460
14461         rm -f cf_test.out
14462 echo "$as_me:14462: result: $cf_cv_type_of_bool" >&5
14463 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14464 if test "$cf_cv_type_of_bool" = unknown ; then
14465         case .$NCURSES_BOOL in #(vi
14466         .auto|.) NCURSES_BOOL=unsigned;;
14467         esac
14468         { echo "$as_me:14468: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14469 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14470         cf_cv_type_of_bool=$NCURSES_BOOL
14471 fi
14472
14473 echo "$as_me:14473: checking for special defines needed for etip.h" >&5
14474 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14475 cf_save_CXXFLAGS="$CXXFLAGS"
14476 cf_result="none"
14477 for cf_math in "" MATH_H
14478 do
14479 for cf_excp in "" MATH_EXCEPTION
14480 do
14481         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14482         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14483         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14484 cat >conftest.$ac_ext <<_ACEOF
14485 #line 14485 "configure"
14486 #include "confdefs.h"
14487
14488 #include <etip.h.in>
14489
14490 int
14491 main ()
14492 {
14493
14494   ;
14495   return 0;
14496 }
14497 _ACEOF
14498 rm -f conftest.$ac_objext
14499 if { (eval echo "$as_me:14499: \"$ac_compile\"") >&5
14500   (eval $ac_compile) 2>&5
14501   ac_status=$?
14502   echo "$as_me:14502: \$? = $ac_status" >&5
14503   (exit $ac_status); } &&
14504          { ac_try='test -s conftest.$ac_objext'
14505   { (eval echo "$as_me:14505: \"$ac_try\"") >&5
14506   (eval $ac_try) 2>&5
14507   ac_status=$?
14508   echo "$as_me:14508: \$? = $ac_status" >&5
14509   (exit $ac_status); }; }; then
14510
14511         test -n "$cf_math" && cat >>confdefs.h <<EOF
14512 #define ETIP_NEEDS_${cf_math} 1
14513 EOF
14514
14515         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14516 #define ETIP_NEEDS_${cf_excp} 1
14517 EOF
14518
14519         cf_result="$cf_math $cf_excp"
14520         break
14521
14522 else
14523   echo "$as_me: failed program was:" >&5
14524 cat conftest.$ac_ext >&5
14525 fi
14526 rm -f conftest.$ac_objext conftest.$ac_ext
14527 done
14528 done
14529 echo "$as_me:14529: result: $cf_result" >&5
14530 echo "${ECHO_T}$cf_result" >&6
14531 CXXFLAGS="$cf_save_CXXFLAGS"
14532
14533 if test -n "$CXX"; then
14534 echo "$as_me:14534: checking if $CXX accepts parameter initialization" >&5
14535 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14536 if test "${cf_cv_cpp_param_init+set}" = set; then
14537   echo $ECHO_N "(cached) $ECHO_C" >&6
14538 else
14539
14540         ac_ext=cc
14541 ac_cpp='$CXXCPP $CPPFLAGS'
14542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14545 ac_main_return=return
14546
14547         if test "$cross_compiling" = yes; then
14548   cf_cv_cpp_param_init=unknown
14549 else
14550   cat >conftest.$ac_ext <<_ACEOF
14551 #line 14551 "configure"
14552 #include "confdefs.h"
14553
14554 class TEST {
14555 private:
14556         int value;
14557 public:
14558         TEST(int x = 1);
14559         ~TEST();
14560 };
14561
14562 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14563 {
14564         value = x;
14565 }
14566 void main() { }
14567
14568 _ACEOF
14569 rm -f conftest$ac_exeext
14570 if { (eval echo "$as_me:14570: \"$ac_link\"") >&5
14571   (eval $ac_link) 2>&5
14572   ac_status=$?
14573   echo "$as_me:14573: \$? = $ac_status" >&5
14574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14575   { (eval echo "$as_me:14575: \"$ac_try\"") >&5
14576   (eval $ac_try) 2>&5
14577   ac_status=$?
14578   echo "$as_me:14578: \$? = $ac_status" >&5
14579   (exit $ac_status); }; }; then
14580   cf_cv_cpp_param_init=yes
14581 else
14582   echo "$as_me: program exited with status $ac_status" >&5
14583 echo "$as_me: failed program was:" >&5
14584 cat conftest.$ac_ext >&5
14585 cf_cv_cpp_param_init=no
14586 fi
14587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14588 fi
14589         ac_ext=cc
14590 ac_cpp='$CXXCPP $CPPFLAGS'
14591 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14592 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14593 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14594 ac_main_return=return
14595
14596 fi
14597 echo "$as_me:14597: result: $cf_cv_cpp_param_init" >&5
14598 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14599 fi
14600 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14601 #define CPP_HAS_PARAM_INIT 1
14602 EOF
14603
14604 if test -n "$CXX"; then
14605
14606 echo "$as_me:14606: checking if $CXX accepts static_cast" >&5
14607 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14608 if test "${cf_cv_cpp_static_cast+set}" = set; then
14609   echo $ECHO_N "(cached) $ECHO_C" >&6
14610 else
14611
14612         ac_ext=cc
14613 ac_cpp='$CXXCPP $CPPFLAGS'
14614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14615 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14617 ac_main_return=return
14618
14619         cat >conftest.$ac_ext <<_ACEOF
14620 #line 14620 "configure"
14621 #include "confdefs.h"
14622
14623 class NCursesPanel
14624 {
14625 public:
14626   NCursesPanel(int nlines,
14627                int ncols,
14628                int begin_y = 0,
14629                int begin_x = 0)
14630   {
14631   }
14632
14633   ~NCursesPanel();
14634 };
14635
14636 template<class T> class NCursesUserPanel : public NCursesPanel
14637 {
14638 public:
14639   NCursesUserPanel (int nlines,
14640                     int ncols,
14641                     int begin_y = 0,
14642                     int begin_x = 0,
14643                     const T* p_UserData = static_cast<T*>(0))
14644     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14645   {
14646   };
14647   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14648   {
14649   };
14650
14651   virtual ~NCursesUserPanel() {};
14652 };
14653
14654 int
14655 main ()
14656 {
14657
14658         const char* p_UserData = static_cast<char*>(0)
14659   ;
14660   return 0;
14661 }
14662 _ACEOF
14663 rm -f conftest.$ac_objext
14664 if { (eval echo "$as_me:14664: \"$ac_compile\"") >&5
14665   (eval $ac_compile) 2>&5
14666   ac_status=$?
14667   echo "$as_me:14667: \$? = $ac_status" >&5
14668   (exit $ac_status); } &&
14669          { ac_try='test -s conftest.$ac_objext'
14670   { (eval echo "$as_me:14670: \"$ac_try\"") >&5
14671   (eval $ac_try) 2>&5
14672   ac_status=$?
14673   echo "$as_me:14673: \$? = $ac_status" >&5
14674   (exit $ac_status); }; }; then
14675   cf_cv_cpp_static_cast=yes
14676 else
14677   echo "$as_me: failed program was:" >&5
14678 cat conftest.$ac_ext >&5
14679 cf_cv_cpp_static_cast=no
14680 fi
14681 rm -f conftest.$ac_objext conftest.$ac_ext
14682
14683         ac_ext=cc
14684 ac_cpp='$CXXCPP $CPPFLAGS'
14685 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14686 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14687 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14688 ac_main_return=return
14689
14690 fi
14691 echo "$as_me:14691: result: $cf_cv_cpp_static_cast" >&5
14692 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14693
14694 fi
14695
14696 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14697 #define CPP_HAS_STATIC_CAST 1
14698 EOF
14699
14700         CXX_AR='$(AR)'
14701         CXX_AR_OPTS='$(AR_OPTS)'
14702         case $cf_cv_system_name in #(vi
14703         irix*) #(vi
14704             if test "$GXX" != yes ; then
14705                 CXX_AR='$(CXX)'
14706                 CXX_AR_OPTS='-ar -o'
14707             fi
14708             ;;
14709         sco3.2v5*) #(vi
14710             CXXLDFLAGS="-u main"
14711             ;;
14712         solaris2*)
14713             if test "$GXX" != yes ; then
14714                 CXX_AR='$(CXX)'
14715                 CXX_AR_OPTS='-xar -o'
14716             fi
14717             ;;
14718         esac
14719
14720 else
14721         cf_cxx_library=no
14722         cf_cv_builtin_bool=1
14723
14724         # Just because we are not configuring against C++ right now does not
14725         # mean that a user will not want to use C++.  Some distributors disable
14726         # the C++ portion of this configuration as a shortcut (or just to avoid
14727         # compiling the demo in the c++ directory).  So we need a reasonable
14728         # default for the 'bool' type.
14729         #
14730         # Caveat: since the storage of the bool type is not standardized, it
14731         # may change.
14732
14733         if test "$NCURSES_BOOL" != auto ; then
14734                 cf_cv_type_of_bool=$NCURSES_BOOL
14735                 cf_cv_header_stdbool_h=0
14736         else
14737                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14738
14739 echo "$as_me:14739: checking for size of bool" >&5
14740 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14741 if test "${cf_cv_type_of_bool+set}" = set; then
14742   echo $ECHO_N "(cached) $ECHO_C" >&6
14743 else
14744
14745         rm -f cf_test.out
14746         if test "$cross_compiling" = yes; then
14747   cf_cv_type_of_bool=unknown
14748 else
14749   cat >conftest.$ac_ext <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752
14753 #include <stdlib.h>
14754 #include <stdio.h>
14755
14756 #if defined(__cplusplus)
14757
14758 #ifdef HAVE_GXX_BUILTIN_H
14759 #include <g++/builtin.h>
14760 #elif HAVE_GPP_BUILTIN_H
14761 #include <gpp/builtin.h>
14762 #elif HAVE_BUILTIN_H
14763 #include <builtin.h>
14764 #endif
14765
14766 #else
14767
14768 #if $cf_cv_header_stdbool_h
14769 #include <stdbool.h>
14770 #endif
14771
14772 #endif
14773
14774 main()
14775 {
14776         FILE *fp = fopen("cf_test.out", "w");
14777         if (fp != 0) {
14778                 bool x = true;
14779                 if ((bool)(-x) >= 0)
14780                         fputs("unsigned ", fp);
14781                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14782                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14783                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14784                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14785                 fclose(fp);
14786         }
14787         ${cf_cv_main_return:-return}(0);
14788 }
14789
14790 _ACEOF
14791 rm -f conftest$ac_exeext
14792 if { (eval echo "$as_me:14792: \"$ac_link\"") >&5
14793   (eval $ac_link) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14797   { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798   (eval $ac_try) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); }; }; then
14802   cf_cv_type_of_bool=`cat cf_test.out`
14803                  if test -z "$cf_cv_type_of_bool"; then
14804                    cf_cv_type_of_bool=unknown
14805                  fi
14806 else
14807   echo "$as_me: program exited with status $ac_status" >&5
14808 echo "$as_me: failed program was:" >&5
14809 cat conftest.$ac_ext >&5
14810 cf_cv_type_of_bool=unknown
14811 fi
14812 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14813 fi
14814
14815 fi
14816
14817         rm -f cf_test.out
14818 echo "$as_me:14818: result: $cf_cv_type_of_bool" >&5
14819 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14820 if test "$cf_cv_type_of_bool" = unknown ; then
14821         case .$NCURSES_BOOL in #(vi
14822         .auto|.) NCURSES_BOOL=unsigned;;
14823         esac
14824         { echo "$as_me:14824: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14825 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14826         cf_cv_type_of_bool=$NCURSES_BOOL
14827 fi
14828
14829                 else
14830                         echo "$as_me:14830: checking for fallback type of bool" >&5
14831 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14832                         case "$host_cpu" in #(vi
14833                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14834                         *)      cf_cv_type_of_bool=int  ;;
14835                         esac
14836                         echo "$as_me:14836: result: $cf_cv_type_of_bool" >&5
14837 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14838                 fi
14839         fi
14840 fi
14841
14842 # If the C compiler did not declare bool, and we did not determine that the C++
14843 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14844 # ncurses library use the same type as C++ bool.  Note that this allows one to
14845 # specify the type of bool in a configure-script option and postpone
14846 # integration with the C++ compiler provided that the types are compatible.
14847 USE_CXX_BOOL=1
14848 if test $cf_cv_cc_bool_type = 1
14849 then
14850         # oops: C has a bool.  Unlikely, but C++ could differ.
14851         USE_CXX_BOOL=0
14852 elif test $cf_cv_builtin_bool = 0
14853 then
14854         # C++ has no bool
14855         USE_CXX_BOOL=0
14856 else
14857         # this is the normal case
14858         USE_CXX_BOOL='defined(__cplusplus)'
14859 fi
14860
14861 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14862 if test "$cf_with_ada" != "no" ; then
14863 cf_ada_make=gnatmake
14864 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14865 set dummy $cf_ada_make; ac_word=$2
14866 echo "$as_me:14866: checking for $ac_word" >&5
14867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14868 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14869   echo $ECHO_N "(cached) $ECHO_C" >&6
14870 else
14871   if test -n "$gnat_exists"; then
14872   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14873 else
14874   ac_save_IFS=$IFS; IFS=$ac_path_separator
14875 ac_dummy="$PATH"
14876 for ac_dir in $ac_dummy; do
14877   IFS=$ac_save_IFS
14878   test -z "$ac_dir" && ac_dir=.
14879   $as_executable_p "$ac_dir/$ac_word" || continue
14880 ac_cv_prog_gnat_exists="yes"
14881 echo "$as_me:14881: found $ac_dir/$ac_word" >&5
14882 break
14883 done
14884
14885   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14886 fi
14887 fi
14888 gnat_exists=$ac_cv_prog_gnat_exists
14889 if test -n "$gnat_exists"; then
14890   echo "$as_me:14890: result: $gnat_exists" >&5
14891 echo "${ECHO_T}$gnat_exists" >&6
14892 else
14893   echo "$as_me:14893: result: no" >&5
14894 echo "${ECHO_T}no" >&6
14895 fi
14896
14897 if test "$ac_cv_prog_gnat_exists" = no; then
14898    cf_ada_make=
14899 else
14900
14901 echo "$as_me:14901: checking for gnat version" >&5
14902 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14903 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14904   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14905 echo "$as_me:14905: result: $cf_gnat_version" >&5
14906 echo "${ECHO_T}$cf_gnat_version" >&6
14907
14908 case $cf_gnat_version in
14909   3.1[1-9]*|3.[2-9]*|[4-9].*)
14910     cf_cv_prog_gnat_correct=yes
14911     ;;
14912   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14913      cf_cv_prog_gnat_correct=no
14914      ;;
14915 esac
14916 case $cf_gnat_version in
14917   3.[1-9]*|[4-9].*)
14918       cf_compile_generics=generics
14919       cf_generic_objects="\${GENOBJS}"
14920       ;;
14921   *)  cf_compile_generics=
14922       cf_generic_objects=
14923       ;;
14924 esac
14925
14926    # Extract the first word of "m4", so it can be a program name with args.
14927 set dummy m4; ac_word=$2
14928 echo "$as_me:14928: checking for $ac_word" >&5
14929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14930 if test "${ac_cv_prog_M4_exists+set}" = set; then
14931   echo $ECHO_N "(cached) $ECHO_C" >&6
14932 else
14933   if test -n "$M4_exists"; then
14934   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14935 else
14936   ac_save_IFS=$IFS; IFS=$ac_path_separator
14937 ac_dummy="$PATH"
14938 for ac_dir in $ac_dummy; do
14939   IFS=$ac_save_IFS
14940   test -z "$ac_dir" && ac_dir=.
14941   $as_executable_p "$ac_dir/$ac_word" || continue
14942 ac_cv_prog_M4_exists="yes"
14943 echo "$as_me:14943: found $ac_dir/$ac_word" >&5
14944 break
14945 done
14946
14947   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14948 fi
14949 fi
14950 M4_exists=$ac_cv_prog_M4_exists
14951 if test -n "$M4_exists"; then
14952   echo "$as_me:14952: result: $M4_exists" >&5
14953 echo "${ECHO_T}$M4_exists" >&6
14954 else
14955   echo "$as_me:14955: result: no" >&5
14956 echo "${ECHO_T}no" >&6
14957 fi
14958
14959    if test "$ac_cv_prog_M4_exists" = no; then
14960       cf_cv_prog_gnat_correct=no
14961       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14962    fi
14963    if test "$cf_cv_prog_gnat_correct" = yes; then
14964       echo "$as_me:14964: checking if GNAT works" >&5
14965 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14966
14967 rm -f conftest*
14968 cat >>conftest.ads <<CF_EOF
14969 procedure conftest;
14970 CF_EOF
14971 cat >>conftest.adb <<CF_EOF
14972 with Text_IO;
14973 with GNAT.OS_Lib;
14974 procedure conftest is
14975 begin
14976    Text_IO.Put ("Hello World");
14977    Text_IO.New_Line;
14978    GNAT.OS_Lib.OS_Exit (0);
14979 end conftest;
14980 CF_EOF
14981 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14982    if ( ./conftest 1>&5 2>&1 ) ; then
14983       cf_cv_prog_gnat_correct=yes
14984    else
14985       cf_cv_prog_gnat_correct=no
14986    fi
14987 else
14988    cf_cv_prog_gnat_correct=no
14989 fi
14990 rm -f conftest*
14991
14992       echo "$as_me:14992: result: $cf_cv_prog_gnat_correct" >&5
14993 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14994    fi
14995 fi
14996 if test "$cf_cv_prog_gnat_correct" = yes; then
14997    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14998
14999    echo "$as_me:14999: checking if GNAT pragma Unreferenced works" >&5
15000 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15001
15002 rm -f conftest*
15003 cat >>conftest.ads <<CF_EOF
15004 procedure conftest;
15005 CF_EOF
15006 cat >>conftest.adb <<CF_EOF
15007 with Text_IO;
15008 with GNAT.OS_Lib;
15009 procedure conftest is
15010    test : Integer;
15011    pragma Unreferenced (test);
15012 begin
15013    test := 1;
15014    Text_IO.Put ("Hello World");
15015    Text_IO.New_Line;
15016    GNAT.OS_Lib.OS_Exit (0);
15017 end conftest;
15018 CF_EOF
15019 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15020       cf_cv_pragma_unreferenced=yes
15021 else
15022    cf_cv_pragma_unreferenced=no
15023 fi
15024 rm -f conftest*
15025
15026    echo "$as_me:15026: result: $cf_cv_pragma_unreferenced" >&5
15027 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15028
15029    # if the pragma is supported, use it (needed in the Trace code).
15030    if test $cf_cv_pragma_unreferenced = yes ; then
15031       PRAGMA_UNREF=TRUE
15032    else
15033       PRAGMA_UNREF=FALSE
15034    fi
15035
15036 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15037 if test "${with_ada_compiler+set}" = set; then
15038   withval="$with_ada_compiler"
15039   cf_ada_compiler=$withval
15040 else
15041   cf_ada_compiler=gnatmake
15042 fi;
15043
15044    cf_ada_package=terminal_interface
15045
15046 # Check whether --with-ada-include or --without-ada-include was given.
15047 if test "${with_ada_include+set}" = set; then
15048   withval="$with_ada_include"
15049
15050 else
15051   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15052 fi;
15053 if test "x$prefix" != xNONE; then
15054   cf_path_syntax="$prefix"
15055 else
15056   cf_path_syntax="$ac_default_prefix"
15057 fi
15058
15059 case ".$withval" in #(vi
15060 .\$\(*\)*|.\'*\'*) #(vi
15061   ;;
15062 ..|./*|.\\*) #(vi
15063   ;;
15064 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15065   ;;
15066 .\${*prefix}*) #(vi
15067   eval withval="$withval"
15068   case ".$withval" in #(vi
15069   .NONE/*)
15070     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15071     ;;
15072   esac
15073   ;; #(vi
15074 .no|.NONE/*)
15075   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15076   ;;
15077 *)
15078   { { echo "$as_me:15078: error: expected a pathname, not \"$withval\"" >&5
15079 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15080    { (exit 1); exit 1; }; }
15081   ;;
15082 esac
15083
15084 ADA_INCLUDE="$withval"
15085
15086 # Check whether --with-ada-objects or --without-ada-objects was given.
15087 if test "${with_ada_objects+set}" = set; then
15088   withval="$with_ada_objects"
15089
15090 else
15091   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15092 fi;
15093 if test "x$prefix" != xNONE; then
15094   cf_path_syntax="$prefix"
15095 else
15096   cf_path_syntax="$ac_default_prefix"
15097 fi
15098
15099 case ".$withval" in #(vi
15100 .\$\(*\)*|.\'*\'*) #(vi
15101   ;;
15102 ..|./*|.\\*) #(vi
15103   ;;
15104 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15105   ;;
15106 .\${*prefix}*) #(vi
15107   eval withval="$withval"
15108   case ".$withval" in #(vi
15109   .NONE/*)
15110     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15111     ;;
15112   esac
15113   ;; #(vi
15114 .no|.NONE/*)
15115   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15116   ;;
15117 *)
15118   { { echo "$as_me:15118: error: expected a pathname, not \"$withval\"" >&5
15119 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15120    { (exit 1); exit 1; }; }
15121   ;;
15122 esac
15123
15124 ADA_OBJECTS="$withval"
15125
15126 fi
15127 fi
15128 else
15129    cf_with_ada=no
15130 fi
15131
15132 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15133 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15134 ###
15135 ### ticlib modules may be a separate library, otherwise contained in termlib.
15136 ### termlib modules may be a separate library, otherwise contained in ncurses.
15137 ###
15138 ### The of "+" or " " between the tokens controls the way the script
15139 ### chooses to split module lists into libraries.
15140 ###
15141 ### (see CF_LIB_RULES).
15142 echo "$as_me:15142: checking for library subsets" >&5
15143 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15144 LIB_SUBSETS=
15145
15146 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
15147         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15148         if test "$with_ticlib" != no ; then
15149                 LIB_SUBSETS="${LIB_SUBSETS} "
15150         else
15151                 LIB_SUBSETS="${LIB_SUBSETS}+"
15152         fi
15153 fi
15154
15155 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15156 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15157 if test "$with_termlib" != no ; then
15158         LIB_SUBSETS="${LIB_SUBSETS} "
15159 else
15160         LIB_SUBSETS="${LIB_SUBSETS}+"
15161 fi
15162
15163 LIB_SUBSETS="${LIB_SUBSETS}base"
15164 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15165 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15166
15167 echo "$as_me:15167: result: $LIB_SUBSETS" >&5
15168 echo "${ECHO_T}$LIB_SUBSETS" >&6
15169
15170 ### Construct the list of include-directories to be generated
15171
15172 CPPFLAGS="-I. -I../include $CPPFLAGS"
15173 if test "$srcdir" != "."; then
15174         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15175 fi
15176 if test "$GCC" != yes; then
15177         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15178 elif test "$includedir" != "/usr/include"; then
15179         if test "$includedir" = '${prefix}/include' ; then
15180                 if test $prefix != /usr ; then
15181                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15182                 fi
15183         else
15184                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15185         fi
15186 fi
15187
15188 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15189 if test "$srcdir" != "."; then
15190         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15191 fi
15192 if test "$GCC" != yes; then
15193         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15194 elif test "$includedir" != "/usr/include"; then
15195         if test "$includedir" = '${prefix}/include' ; then
15196                 if test $prefix != /usr ; then
15197                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15198                 fi
15199         else
15200                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15201         fi
15202 fi
15203
15204 ### Build up pieces for makefile rules
15205 echo "$as_me:15205: checking default library suffix" >&5
15206 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15207
15208         case $DFT_LWR_MODEL in
15209         libtool) DFT_ARG_SUFFIX=''   ;;
15210         normal)  DFT_ARG_SUFFIX=''   ;;
15211         debug)   DFT_ARG_SUFFIX='_g' ;;
15212         profile) DFT_ARG_SUFFIX='_p' ;;
15213         shared)  DFT_ARG_SUFFIX=''   ;;
15214         esac
15215         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15216 echo "$as_me:15216: result: $DFT_ARG_SUFFIX" >&5
15217 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15218
15219 echo "$as_me:15219: checking default library-dependency suffix" >&5
15220 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15221
15222         case $DFT_LWR_MODEL in
15223         libtool) DFT_DEP_SUFFIX='.la'  ;;
15224         normal)  DFT_DEP_SUFFIX='.a'   ;;
15225         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15226         profile) DFT_DEP_SUFFIX='_p.a' ;;
15227         shared)
15228                 case $cf_cv_system_name in
15229                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15230                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15231                 hpux*)
15232                         case $target in
15233                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15234                         *)      DFT_DEP_SUFFIX='.sl' ;;
15235                         esac
15236                         ;;
15237                 *)      DFT_DEP_SUFFIX='.so'  ;;
15238                 esac
15239         esac
15240         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15241 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15242 if test $DFT_LWR_MODEL = shared ; then
15243         case $cf_cv_system_name in #(vi
15244         cygwin*)
15245                 DFT_DEP_SUFFIX=".dll.a"
15246                 DFT_LIB_SUFFIX=".dll"
15247                 ;;
15248         esac
15249 fi
15250 echo "$as_me:15250: result: $DFT_DEP_SUFFIX" >&5
15251 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15252
15253 echo "$as_me:15253: checking default object directory" >&5
15254 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15255
15256         case $DFT_LWR_MODEL in
15257         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15258         normal)  DFT_OBJ_SUBDIR='objects' ;;
15259         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15260         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15261         shared)
15262                 case $cf_cv_system_name in #(vi
15263                 cygwin) #(vi
15264                         DFT_OBJ_SUBDIR='objects' ;;
15265                 *)
15266                         DFT_OBJ_SUBDIR='obj_s' ;;
15267                 esac
15268         esac
15269 echo "$as_me:15269: result: $DFT_OBJ_SUBDIR" >&5
15270 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15271
15272 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15273 if test "$cf_with_cxx" = yes ; then
15274 echo "$as_me:15274: checking c++ library-dependency suffix" >&5
15275 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15276 if test "$with_libtool" != "no"; then
15277         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15278 else
15279
15280         case normal in
15281         libtool) CXX_LIB_SUFFIX='.la'  ;;
15282         normal)  CXX_LIB_SUFFIX='.a'   ;;
15283         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15284         profile) CXX_LIB_SUFFIX='_p.a' ;;
15285         shared)
15286                 case $cf_cv_system_name in
15287                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15288                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15289                 hpux*)
15290                         case $target in
15291                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15292                         *)      CXX_LIB_SUFFIX='.sl' ;;
15293                         esac
15294                         ;;
15295                 *)      CXX_LIB_SUFFIX='.so'  ;;
15296                 esac
15297         esac
15298         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15299 fi
15300 echo "$as_me:15300: result: $CXX_LIB_SUFFIX" >&5
15301 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15302
15303 fi
15304
15305 # do not want -ldl in build except as needed for -lncurses dependency
15306 if test "$with_dlsym" = yes ; then
15307 if test $DFT_LWR_MODEL = shared || \
15308    test $DFT_LWR_MODEL = libtool ; then
15309
15310 # remove dl library from $LIBS
15311 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15312
15313 fi
15314 fi
15315 ### Set up low-level terminfo dependencies for makefiles.
15316
15317 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15318 # do not need libdl
15319 TICS_LIST=
15320 if test "$with_dlsym" = yes ; then
15321
15322 # remove dl library from $SHLIB_LIST
15323 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15324
15325 fi
15326
15327 if test "$with_ticlib" != no ; then
15328
15329         if test "$with_ticlib" != yes ; then
15330                 TICS_NAME=$with_ticlib
15331                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15332                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15333                 TICS_LIB_SUFFIX="${with_ticlib}"
15334         else
15335                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15336                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15337                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15338         fi
15339         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15340 else
15341         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15342 fi
15343
15344 if test "$with_termlib" != no ; then
15345
15346         if test "$with_termlib" != yes ; then
15347                 TINFO_NAME=$with_termlib
15348                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15349                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15350                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15351                 TINFO_LIB_SUFFIX="${with_termlib}"
15352         else
15353                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15354                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15355                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15356                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15357         fi
15358
15359         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15360         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15361         if test "$DFT_LWR_MODEL" = "libtool"; then
15362                 TEST_ARGS="${TEST_DEPS}"
15363                 TEST_ARG2="${TEST_DEP2}"
15364                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15365         else
15366                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15367                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15368                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15369                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15370                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15371         fi
15372 else
15373         # the next lines are needed for linking libtic over libncurses
15374         TINFO_NAME=${LIB_NAME}
15375         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15376         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15377         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15378
15379         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15380 fi
15381
15382 if test "$DFT_LWR_MODEL" = shared ; then
15383         case $cf_cv_system_name in #(vi
15384         cygwin*)
15385                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15386                 TINFO_SUFFIX=.dll
15387                 ;;
15388         esac
15389 fi
15390
15391 if test "$with_dlsym" = yes ; then
15392
15393 # remove dl library from $TICS_LIST
15394 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15395
15396 fi
15397
15398 # needed for Ada95
15399 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15400
15401 case $DFT_LWR_MODEL in
15402 normal|debug|profile)
15403
15404 if test "$GCC" = yes ; then
15405         LDFLAGS_STATIC=-static
15406         LDFLAGS_SHARED=-dynamic
15407 else
15408         case $cf_cv_system_name in #(
15409         aix[45]*)       #( from ld manpage
15410                 LDFLAGS_STATIC=-bstatic
15411                 LDFLAGS_SHARED=-bdynamic
15412                 ;;
15413         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15414                 # We could also use just "archive" and "shared".
15415                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15416                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15417                 ;;
15418         irix*)          #( from ld manpage IRIX64
15419                 LDFLAGS_STATIC=-Bstatic
15420                 LDFLAGS_SHARED=-Bdynamic
15421                 ;;
15422         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15423                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15424                 LDFLAGS_STATIC=-noso
15425                 LDFLAGS_SHARED=-so_archive
15426                 ;;
15427         solaris2*)
15428                 LDFLAGS_STATIC=-Bstatic
15429                 LDFLAGS_SHARED=-Bdynamic
15430                 ;;
15431         esac
15432 fi
15433
15434         ;;
15435 esac
15436
15437 echo "$as_me:15437: checking where we will install curses.h" >&5
15438 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15439 test "$with_overwrite" = no && \
15440 test "x$includedir" = 'x${prefix}/include' && \
15441         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15442 echo "$as_me:15442: result: $includedir" >&5
15443 echo "${ECHO_T}$includedir" >&6
15444
15445 ### Resolve a conflict between normal and wide-curses by forcing applications
15446 ### that will need libutf8 to add it to their configure script.
15447 if test "$with_overwrite" != no ; then
15448 if test "$NCURSES_LIBUTF8" = 1 ; then
15449         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15450         { echo "$as_me:15450: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15451 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15452 fi
15453 fi
15454
15455 # used to separate tack out of the tree
15456 NCURSES_TREE=
15457
15458 ### predefined stuff for the test programs
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_SLK_COLOR 1
15461 EOF
15462
15463 ### Construct the list of subdirectories for which we'll customize makefiles
15464 ### with the appropriate compile-rules.
15465
15466 echo "$as_me:15466: checking for src modules" >&5
15467 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15468
15469 # dependencies and linker-arguments for test-programs
15470 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15471 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15472 if test "$DFT_LWR_MODEL" = "libtool"; then
15473         TEST_ARGS="${TEST_DEPS}"
15474         TEST_ARG2="${TEST_DEP2}"
15475 else
15476         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15477         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15478 fi
15479
15480 cf_cv_src_modules=
15481 for cf_dir in $modules_to_build
15482 do
15483         if test -f $srcdir/$cf_dir/modules; then
15484
15485                 # We may/may not have tack in the distribution, though the
15486                 # makefile is.
15487                 if test $cf_dir = tack ; then
15488                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15489                                 continue
15490                         fi
15491                 fi
15492
15493                 if test -z "$cf_cv_src_modules"; then
15494                         cf_cv_src_modules=$cf_dir
15495                 else
15496                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15497                 fi
15498
15499                 # Make the ncurses_cfg.h file record the library interface files as
15500                 # well.  These are header files that are the same name as their
15501                 # directory.  Ncurses is the only library that does not follow
15502                 # that pattern.
15503                 if test $cf_dir = tack ; then
15504                         continue
15505                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15506
15507 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15508
15509                         cat >>confdefs.h <<EOF
15510 #define HAVE_${cf_have_include}_H 1
15511 EOF
15512
15513                         cat >>confdefs.h <<EOF
15514 #define HAVE_LIB${cf_have_include} 1
15515 EOF
15516
15517                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15518                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15519                         if test "$DFT_LWR_MODEL" = "libtool"; then
15520                                 TEST_ARGS="${TEST_DEPS}"
15521                                 TEST_ARG2="${TEST_DEP2}"
15522                         else
15523                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15524                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15525                         fi
15526                 fi
15527         fi
15528 done
15529 echo "$as_me:15529: result: $cf_cv_src_modules" >&5
15530 echo "${ECHO_T}$cf_cv_src_modules" >&6
15531
15532 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15533 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15534
15535 SRC_SUBDIRS="man include"
15536 for cf_dir in $cf_cv_src_modules
15537 do
15538         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15539 done
15540 SRC_SUBDIRS="$SRC_SUBDIRS test"
15541 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15542 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15543
15544 ADA_SUBDIRS=
15545 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15546    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15547    ADA_SUBDIRS="gen src samples"
15548 fi
15549
15550 SUB_MAKEFILES=
15551 for cf_dir in $SRC_SUBDIRS
15552 do
15553         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15554 done
15555
15556 if test -n "$ADA_SUBDIRS"; then
15557    for cf_dir in $ADA_SUBDIRS
15558    do
15559       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15560    done
15561
15562 fi
15563
15564 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15565    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15566 fi
15567
15568 DIRS_TO_MAKE="lib"
15569 for cf_item in $cf_list_models
15570 do
15571
15572         case $cf_item in
15573         libtool) cf_subdir='obj_lo'  ;;
15574         normal)  cf_subdir='objects' ;;
15575         debug)   cf_subdir='obj_g' ;;
15576         profile) cf_subdir='obj_p' ;;
15577         shared)
15578                 case $cf_cv_system_name in #(vi
15579                 cygwin) #(vi
15580                         cf_subdir='objects' ;;
15581                 *)
15582                         cf_subdir='obj_s' ;;
15583                 esac
15584         esac
15585
15586         for cf_item2 in $DIRS_TO_MAKE
15587         do
15588                 test $cf_item2 = $cf_subdir && break
15589         done
15590         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15591 done
15592 for cf_dir in $DIRS_TO_MAKE
15593 do
15594         test ! -d $cf_dir && mkdir $cf_dir
15595 done
15596
15597 cat >>confdefs.h <<EOF
15598 #define NCURSES_PATHSEP '$PATHSEP'
15599 EOF
15600
15601 cat >>confdefs.h <<EOF
15602 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15603 EOF
15604
15605 ### Now that we're done running tests, add the compiler-warnings, if any
15606
15607 cf_fix_cppflags=no
15608 cf_new_cflags=
15609 cf_new_cppflags=
15610 cf_new_extra_cppflags=
15611
15612 for cf_add_cflags in $EXTRA_CFLAGS
15613 do
15614 case $cf_fix_cppflags in
15615 no)
15616         case $cf_add_cflags in #(vi
15617         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15618                 case $cf_add_cflags in
15619                 -D*)
15620                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15621
15622                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15623                         && test -z "${cf_tst_cflags}" \
15624                         && cf_fix_cppflags=yes
15625
15626                         if test $cf_fix_cppflags = yes ; then
15627                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15628                                 continue
15629                         elif test "${cf_tst_cflags}" = "\"'" ; then
15630                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15631                                 continue
15632                         fi
15633                         ;;
15634                 esac
15635                 case "$CPPFLAGS" in
15636                 *$cf_add_cflags) #(vi
15637                         ;;
15638                 *) #(vi
15639                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15640                         ;;
15641                 esac
15642                 ;;
15643         *)
15644                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15645                 ;;
15646         esac
15647         ;;
15648 yes)
15649         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15650
15651         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15652
15653         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15654         && test -z "${cf_tst_cflags}" \
15655         && cf_fix_cppflags=no
15656         ;;
15657 esac
15658 done
15659
15660 if test -n "$cf_new_cflags" ; then
15661
15662         CFLAGS="$CFLAGS $cf_new_cflags"
15663 fi
15664
15665 if test -n "$cf_new_cppflags" ; then
15666
15667         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15668 fi
15669
15670 if test -n "$cf_new_extra_cppflags" ; then
15671
15672         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15673 fi
15674
15675 ### Define substitutions for header files to avoid name-pollution
15676
15677 if test "$cf_cv_have_tcgetattr" = yes ; then
15678         HAVE_TCGETATTR=1
15679 else
15680         HAVE_TCGETATTR=0
15681 fi
15682
15683 if test "$ac_cv_header_termio_h" = yes ; then
15684         HAVE_TERMIO_H=1
15685 else
15686         HAVE_TERMIO_H=0
15687 fi
15688
15689 if test "$ac_cv_header_termios_h" = yes ; then
15690         HAVE_TERMIOS_H=1
15691 else
15692         HAVE_TERMIOS_H=0
15693 fi
15694
15695 ################################################################################
15696 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15697 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15698 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"
15699 ac_config_commands="$ac_config_commands default"
15700 cat >confcache <<\_ACEOF
15701 # This file is a shell script that caches the results of configure
15702 # tests run on this system so they can be shared between configure
15703 # scripts and configure runs, see configure's option --config-cache.
15704 # It is not useful on other systems.  If it contains results you don't
15705 # want to keep, you may remove or edit it.
15706 #
15707 # config.status only pays attention to the cache file if you give it
15708 # the --recheck option to rerun configure.
15709 #
15710 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15711 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15712 # following values.
15713
15714 _ACEOF
15715
15716 # The following way of writing the cache mishandles newlines in values,
15717 # but we know of no workaround that is simple, portable, and efficient.
15718 # So, don't put newlines in cache variables' values.
15719 # Ultrix sh set writes to stderr and can't be redirected directly,
15720 # and sets the high bit in the cache file unless we assign to the vars.
15721 {
15722   (set) 2>&1 |
15723     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15724     *ac_space=\ *)
15725       # `set' does not quote correctly, so add quotes (double-quote
15726       # substitution turns \\\\ into \\, and sed turns \\ into \).
15727       sed -n \
15728         "s/'/'\\\\''/g;
15729           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15730       ;;
15731     *)
15732       # `set' quotes correctly as required by POSIX, so do not add quotes.
15733       sed -n \
15734         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15735       ;;
15736     esac;
15737 } |
15738   sed '
15739      t clear
15740      : clear
15741      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15742      t end
15743      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15744      : end' >>confcache
15745 if cmp -s $cache_file confcache; then :; else
15746   if test -w $cache_file; then
15747     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15748     cat confcache >$cache_file
15749   else
15750     echo "not updating unwritable cache $cache_file"
15751   fi
15752 fi
15753 rm -f confcache
15754
15755 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15756 # Let make expand exec_prefix.
15757 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15758
15759 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15760 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15761 # trailing colons and then remove the whole line if VPATH becomes empty
15762 # (actually we leave an empty line to preserve line numbers).
15763 if test "x$srcdir" = x.; then
15764   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15765 s/:*\$(srcdir):*/:/;
15766 s/:*\${srcdir}:*/:/;
15767 s/:*@srcdir@:*/:/;
15768 s/^\([^=]*=[    ]*\):*/\1/;
15769 s/:*$//;
15770 s/^[^=]*=[      ]*$//;
15771 }'
15772 fi
15773
15774 DEFS=-DHAVE_CONFIG_H
15775
15776 : ${CONFIG_STATUS=./config.status}
15777 ac_clean_files_save=$ac_clean_files
15778 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15779 { echo "$as_me:15779: creating $CONFIG_STATUS" >&5
15780 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15781 cat >$CONFIG_STATUS <<_ACEOF
15782 #! $SHELL
15783 # Generated automatically by configure.
15784 # Run this file to recreate the current configuration.
15785 # Compiler output produced by configure, useful for debugging
15786 # configure, is in config.log if it exists.
15787
15788 debug=false
15789 SHELL=\${CONFIG_SHELL-$SHELL}
15790 ac_cs_invocation="\$0 \$@"
15791
15792 _ACEOF
15793
15794 cat >>$CONFIG_STATUS <<\_ACEOF
15795 # Be Bourne compatible
15796 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15797   emulate sh
15798   NULLCMD=:
15799 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15800   set -o posix
15801 fi
15802
15803 # Name of the executable.
15804 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15805
15806 if expr a : '\(a\)' >/dev/null 2>&1; then
15807   as_expr=expr
15808 else
15809   as_expr=false
15810 fi
15811
15812 rm -f conf$$ conf$$.exe conf$$.file
15813 echo >conf$$.file
15814 if ln -s conf$$.file conf$$ 2>/dev/null; then
15815   # We could just check for DJGPP; but this test a) works b) is more generic
15816   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15817   if test -f conf$$.exe; then
15818     # Don't use ln at all; we don't have any links
15819     as_ln_s='cp -p'
15820   else
15821     as_ln_s='ln -s'
15822   fi
15823 elif ln conf$$.file conf$$ 2>/dev/null; then
15824   as_ln_s=ln
15825 else
15826   as_ln_s='cp -p'
15827 fi
15828 rm -f conf$$ conf$$.exe conf$$.file
15829
15830 as_executable_p="test -f"
15831
15832 # Support unset when possible.
15833 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15834   as_unset=unset
15835 else
15836   as_unset=false
15837 fi
15838
15839 # NLS nuisances.
15840 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15841 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15842 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15843 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15844 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15845 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15846 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15847 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15848
15849 # IFS
15850 # We need space, tab and new line, in precisely that order.
15851 as_nl='
15852 '
15853 IFS="   $as_nl"
15854
15855 # CDPATH.
15856 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15857
15858 exec 6>&1
15859
15860 _ACEOF
15861
15862 # Files that config.status was made for.
15863 if test -n "$ac_config_files"; then
15864   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15865 fi
15866
15867 if test -n "$ac_config_headers"; then
15868   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15869 fi
15870
15871 if test -n "$ac_config_links"; then
15872   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15873 fi
15874
15875 if test -n "$ac_config_commands"; then
15876   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15877 fi
15878
15879 cat >>$CONFIG_STATUS <<\EOF
15880
15881 ac_cs_usage="\
15882 \`$as_me' instantiates files from templates according to the
15883 current configuration.
15884
15885 Usage: $0 [OPTIONS] [FILE]...
15886
15887   -h, --help       print this help, then exit
15888   -V, --version    print version number, then exit
15889   -d, --debug      don't remove temporary files
15890       --recheck    update $as_me by reconfiguring in the same conditions
15891   --file=FILE[:TEMPLATE]
15892                    instantiate the configuration file FILE
15893   --header=FILE[:TEMPLATE]
15894                    instantiate the configuration header FILE
15895
15896 Configuration files:
15897 $config_files
15898
15899 Configuration headers:
15900 $config_headers
15901
15902 Configuration commands:
15903 $config_commands
15904
15905 Report bugs to <bug-autoconf@gnu.org>."
15906 EOF
15907
15908 cat >>$CONFIG_STATUS <<EOF
15909 ac_cs_version="\\
15910 config.status
15911 configured by $0, generated by GNU Autoconf 2.52.20061216,
15912   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15913
15914 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15915 Free Software Foundation, Inc.
15916 This config.status script is free software; the Free Software Foundation
15917 gives unlimited permission to copy, distribute and modify it."
15918 srcdir=$srcdir
15919 INSTALL="$INSTALL"
15920 EOF
15921
15922 cat >>$CONFIG_STATUS <<\EOF
15923 # If no file are specified by the user, then we need to provide default
15924 # value.  By we need to know if files were specified by the user.
15925 ac_need_defaults=:
15926 while test $# != 0
15927 do
15928   case $1 in
15929   --*=*)
15930     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15931     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15932     shift
15933     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15934     shift
15935     ;;
15936   -*);;
15937   *) # This is not an option, so the user has probably given explicit
15938      # arguments.
15939      ac_need_defaults=false;;
15940   esac
15941
15942   case $1 in
15943   # Handling of the options.
15944 EOF
15945 cat >>$CONFIG_STATUS <<EOF
15946   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15947     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15948     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15949 EOF
15950 cat >>$CONFIG_STATUS <<\EOF
15951   --version | --vers* | -V )
15952     echo "$ac_cs_version"; exit 0 ;;
15953   --he | --h)
15954     # Conflict between --help and --header
15955     { { echo "$as_me:15955: error: ambiguous option: $1
15956 Try \`$0 --help' for more information." >&5
15957 echo "$as_me: error: ambiguous option: $1
15958 Try \`$0 --help' for more information." >&2;}
15959    { (exit 1); exit 1; }; };;
15960   --help | --hel | -h )
15961     echo "$ac_cs_usage"; exit 0 ;;
15962   --debug | --d* | -d )
15963     debug=: ;;
15964   --file | --fil | --fi | --f )
15965     shift
15966     CONFIG_FILES="$CONFIG_FILES $1"
15967     ac_need_defaults=false;;
15968   --header | --heade | --head | --hea )
15969     shift
15970     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15971     ac_need_defaults=false;;
15972
15973   # This is an error.
15974   -*) { { echo "$as_me:15974: error: unrecognized option: $1
15975 Try \`$0 --help' for more information." >&5
15976 echo "$as_me: error: unrecognized option: $1
15977 Try \`$0 --help' for more information." >&2;}
15978    { (exit 1); exit 1; }; } ;;
15979
15980   *) ac_config_targets="$ac_config_targets $1" ;;
15981
15982   esac
15983   shift
15984 done
15985
15986 exec 5>>config.log
15987 cat >&5 << _ACEOF
15988
15989 ## ----------------------- ##
15990 ## Running config.status.  ##
15991 ## ----------------------- ##
15992
15993 This file was extended by $as_me 2.52.20061216, executed with
15994   CONFIG_FILES    = $CONFIG_FILES
15995   CONFIG_HEADERS  = $CONFIG_HEADERS
15996   CONFIG_LINKS    = $CONFIG_LINKS
15997   CONFIG_COMMANDS = $CONFIG_COMMANDS
15998   > $ac_cs_invocation
15999 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16000
16001 _ACEOF
16002 EOF
16003
16004 cat >>$CONFIG_STATUS <<EOF
16005 #
16006 # INIT-COMMANDS section.
16007 #
16008
16009 ### Special initialization commands, used to pass information from the
16010 ### configuration-run into config.status
16011
16012 AWK="$AWK"
16013 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16014 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16015 ECHO_LINK="$ECHO_LINK"
16016 LDCONFIG="$LDCONFIG"
16017 LIB_NAME="$LIB_NAME"
16018 LIB_SUBSETS="$LIB_SUBSETS"
16019 LIB_SUFFIX="$LIB_SUFFIX"
16020 LIB_TRACING="$LIB_TRACING"
16021 MAKE_TERMINFO="$MAKE_TERMINFO"
16022 NCURSES_MAJOR="$NCURSES_MAJOR"
16023 NCURSES_MINOR="$NCURSES_MINOR"
16024 NCURSES_OSPEED="$NCURSES_OSPEED"
16025 NCURSES_PATCH="$NCURSES_PATCH"
16026 SRC_SUBDIRS="$SRC_SUBDIRS"
16027 TERMINFO="$TERMINFO"
16028 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16029 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16030 TINFO_NAME="$TINFO_NAME"
16031 TINFO_SUFFIX="$TINFO_SUFFIX"
16032 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16033 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16034 TICS_NAME="$TICS_NAME"
16035 WITH_CURSES_H="$with_curses_h"
16036 WITH_ECHO="$with_echo"
16037 WITH_OVERWRITE="$with_overwrite"
16038 cf_LIST_MODELS="$cf_list_models"
16039 cf_cv_abi_version="$cf_cv_abi_version"
16040 cf_cv_do_relink="$cf_cv_do_relink"
16041 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16042 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16043 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16044 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16045 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16046 cf_cv_rel_version="$cf_cv_rel_version"
16047 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16048 cf_cv_shlib_version="$cf_cv_shlib_version"
16049 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16050 cf_cv_system_name="$cf_cv_system_name"
16051 cf_with_cxx_binding="$cf_with_cxx_binding"
16052 host="$host"
16053 target="$target"
16054
16055 EOF
16056
16057 cat >>$CONFIG_STATUS <<\EOF
16058 for ac_config_target in $ac_config_targets
16059 do
16060   case "$ac_config_target" in
16061   # Handling of arguments.
16062   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16063   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16064   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16065   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16066   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16067   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16068   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16069   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16070   *) { { echo "$as_me:16070: error: invalid argument: $ac_config_target" >&5
16071 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16072    { (exit 1); exit 1; }; };;
16073   esac
16074 done
16075
16076 # If the user did not use the arguments to specify the items to instantiate,
16077 # then the envvar interface is used.  Set only those that are not.
16078 # We use the long form for the default assignment because of an extremely
16079 # bizarre bug on SunOS 4.1.3.
16080 if $ac_need_defaults; then
16081   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16082   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16083   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16084 fi
16085
16086 # Create a temporary directory, and hook for its removal unless debugging.
16087 $debug ||
16088 {
16089   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16090   trap '{ (exit 1); exit 1; }' 1 2 13 15
16091 }
16092
16093 # Create a (secure) tmp directory for tmp files.
16094 : ${TMPDIR=/tmp}
16095 {
16096   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16097   test -n "$tmp" && test -d "$tmp"
16098 }  ||
16099 {
16100   tmp=$TMPDIR/cs$$-$RANDOM
16101   (umask 077 && mkdir $tmp)
16102 } ||
16103 {
16104    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16105    { (exit 1); exit 1; }
16106 }
16107
16108 EOF
16109
16110 cat >>$CONFIG_STATUS <<EOF
16111
16112 #
16113 # CONFIG_FILES section.
16114 #
16115
16116 # No need to generate the scripts if there are no CONFIG_FILES.
16117 # This happens for instance when ./config.status config.h
16118 if test -n "\$CONFIG_FILES"; then
16119   # Protect against being on the right side of a sed subst in config.status.
16120   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16121    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16122 s,@SHELL@,$SHELL,;t t
16123 s,@exec_prefix@,$exec_prefix,;t t
16124 s,@prefix@,$prefix,;t t
16125 s,@program_transform_name@,$program_transform_name,;t t
16126 s,@bindir@,$bindir,;t t
16127 s,@sbindir@,$sbindir,;t t
16128 s,@libexecdir@,$libexecdir,;t t
16129 s,@datadir@,$datadir,;t t
16130 s,@sysconfdir@,$sysconfdir,;t t
16131 s,@sharedstatedir@,$sharedstatedir,;t t
16132 s,@localstatedir@,$localstatedir,;t t
16133 s,@libdir@,$libdir,;t t
16134 s,@includedir@,$includedir,;t t
16135 s,@oldincludedir@,$oldincludedir,;t t
16136 s,@infodir@,$infodir,;t t
16137 s,@mandir@,$mandir,;t t
16138 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16139 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16140 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16141 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16142 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16143 s,@build_alias@,$build_alias,;t t
16144 s,@host_alias@,$host_alias,;t t
16145 s,@target_alias@,$target_alias,;t t
16146 s,@ECHO_C@,$ECHO_C,;t t
16147 s,@ECHO_N@,$ECHO_N,;t t
16148 s,@ECHO_T@,$ECHO_T,;t t
16149 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16150 s,@DEFS@,$DEFS,;t t
16151 s,@LIBS@,$LIBS,;t t
16152 s,@top_builddir@,$top_builddir,;t t
16153 s,@EGREP@,$EGREP,;t t
16154 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16155 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16156 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16157 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16158 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16159 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16160 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16161 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16162 s,@build@,$build,;t t
16163 s,@build_cpu@,$build_cpu,;t t
16164 s,@build_vendor@,$build_vendor,;t t
16165 s,@build_os@,$build_os,;t t
16166 s,@host@,$host,;t t
16167 s,@host_cpu@,$host_cpu,;t t
16168 s,@host_vendor@,$host_vendor,;t t
16169 s,@host_os@,$host_os,;t t
16170 s,@target@,$target,;t t
16171 s,@target_cpu@,$target_cpu,;t t
16172 s,@target_vendor@,$target_vendor,;t t
16173 s,@target_os@,$target_os,;t t
16174 s,@CC@,$CC,;t t
16175 s,@CFLAGS@,$CFLAGS,;t t
16176 s,@LDFLAGS@,$LDFLAGS,;t t
16177 s,@CPPFLAGS@,$CPPFLAGS,;t t
16178 s,@ac_ct_CC@,$ac_ct_CC,;t t
16179 s,@EXEEXT@,$EXEEXT,;t t
16180 s,@OBJEXT@,$OBJEXT,;t t
16181 s,@CPP@,$CPP,;t t
16182 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16183 s,@PROG_EXT@,$PROG_EXT,;t t
16184 s,@LDCONFIG@,$LDCONFIG,;t t
16185 s,@CXX@,$CXX,;t t
16186 s,@CXXFLAGS@,$CXXFLAGS,;t t
16187 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16188 s,@AWK@,$AWK,;t t
16189 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16190 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16191 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16192 s,@LINT@,$LINT,;t t
16193 s,@LINT_OPTS@,$LINT_OPTS,;t t
16194 s,@LN_S@,$LN_S,;t t
16195 s,@SET_MAKE@,$SET_MAKE,;t t
16196 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16197 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16198 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16199 s,@RANLIB@,$RANLIB,;t t
16200 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16201 s,@LD@,$LD,;t t
16202 s,@ac_ct_LD@,$ac_ct_LD,;t t
16203 s,@AR@,$AR,;t t
16204 s,@ac_ct_AR@,$ac_ct_AR,;t t
16205 s,@AR_OPTS@,$AR_OPTS,;t t
16206 s,@DESTDIR@,$DESTDIR,;t t
16207 s,@BUILD_CC@,$BUILD_CC,;t t
16208 s,@BUILD_CPP@,$BUILD_CPP,;t t
16209 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16210 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16211 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16212 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16213 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16214 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16215 s,@cf_list_models@,$cf_list_models,;t t
16216 s,@LIBTOOL@,$LIBTOOL,;t t
16217 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16218 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16219 s,@LIB_CREATE@,$LIB_CREATE,;t t
16220 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16221 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16222 s,@LIB_PREP@,$LIB_PREP,;t t
16223 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16224 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16225 s,@LIB_LINK@,$LIB_LINK,;t t
16226 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16227 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16228 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16229 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16230 s,@TICS_NAME@,$TICS_NAME,;t t
16231 s,@TINFO_NAME@,$TINFO_NAME,;t t
16232 s,@LIB_NAME@,$LIB_NAME,;t t
16233 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16234 s,@CC_G_OPT@,$CC_G_OPT,;t t
16235 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16236 s,@LD_MODEL@,$LD_MODEL,;t t
16237 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16238 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16239 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16240 s,@LINK_PROGS@,$LINK_PROGS,;t t
16241 s,@LINK_TESTS@,$LINK_TESTS,;t t
16242 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16243 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16244 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16245 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16246 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16247 s,@PATHSEP@,$PATHSEP,;t t
16248 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16249 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16250 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16251 s,@TERMINFO@,$TERMINFO,;t t
16252 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16253 s,@TERMPATH@,$TERMPATH,;t t
16254 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16255 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16256 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16257 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16258 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16259 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16260 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16261 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16262 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16263 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16264 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16265 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16266 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16267 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16268 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16269 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16270 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16271 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16272 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16273 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16274 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16275 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16276 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16277 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16278 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16279 s,@ECHO_LINK@,$ECHO_LINK,;t t
16280 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16281 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16282 s,@ADA_TRACE@,$ADA_TRACE,;t t
16283 s,@MATH_LIB@,$MATH_LIB,;t t
16284 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16285 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16286 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16287 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16288 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16289 s,@CXXCPP@,$CXXCPP,;t t
16290 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16291 s,@CXX_AR@,$CXX_AR,;t t
16292 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16293 s,@CXXLIBS@,$CXXLIBS,;t t
16294 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16295 s,@gnat_exists@,$gnat_exists,;t t
16296 s,@M4_exists@,$M4_exists,;t t
16297 s,@cf_ada_make@,$cf_ada_make,;t t
16298 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16299 s,@cf_ada_package@,$cf_ada_package,;t t
16300 s,@ADAFLAGS@,$ADAFLAGS,;t t
16301 s,@cf_compile_generics@,$cf_compile_generics,;t t
16302 s,@cf_generic_objects@,$cf_generic_objects,;t t
16303 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16304 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16305 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16306 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16307 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16308 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16309 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16310 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16311 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16312 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16313 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16314 s,@TICS_ARGS@,$TICS_ARGS,;t t
16315 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16316 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16317 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16318 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16319 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16320 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16321 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16322 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16323 s,@TICS_LIST@,$TICS_LIST,;t t
16324 s,@TINFO_LIST@,$TINFO_LIST,;t t
16325 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16326 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16327 s,@TEST_ARGS@,$TEST_ARGS,;t t
16328 s,@TEST_DEPS@,$TEST_DEPS,;t t
16329 s,@TEST_ARG2@,$TEST_ARG2,;t t
16330 s,@TEST_DEP2@,$TEST_DEP2,;t t
16331 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16332 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16333 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16334 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16335 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16336 CEOF
16337
16338 EOF
16339
16340   cat >>$CONFIG_STATUS <<\EOF
16341   # Split the substitutions into bite-sized pieces for seds with
16342   # small command number limits, like on Digital OSF/1 and HP-UX.
16343   ac_max_sed_lines=48
16344   ac_sed_frag=1 # Number of current file.
16345   ac_beg=1 # First line for current file.
16346   ac_end=$ac_max_sed_lines # Line after last line for current file.
16347   ac_more_lines=:
16348   ac_sed_cmds=
16349   while $ac_more_lines; do
16350     if test $ac_beg -gt 1; then
16351       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16352     else
16353       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16354     fi
16355     if test ! -s $tmp/subs.frag; then
16356       ac_more_lines=false
16357     else
16358       # The purpose of the label and of the branching condition is to
16359       # speed up the sed processing (if there are no `@' at all, there
16360       # is no need to browse any of the substitutions).
16361       # These are the two extra sed commands mentioned above.
16362       (echo ':t
16363   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16364       if test -z "$ac_sed_cmds"; then
16365         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16366       else
16367         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16368       fi
16369       ac_sed_frag=`expr $ac_sed_frag + 1`
16370       ac_beg=$ac_end
16371       ac_end=`expr $ac_end + $ac_max_sed_lines`
16372     fi
16373   done
16374   if test -z "$ac_sed_cmds"; then
16375     ac_sed_cmds=cat
16376   fi
16377 fi # test -n "$CONFIG_FILES"
16378
16379 EOF
16380 cat >>$CONFIG_STATUS <<\EOF
16381 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16382   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16383   case $ac_file in
16384   - | *:- | *:-:* ) # input from stdin
16385         cat >$tmp/stdin
16386         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16387         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16388   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16389         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16390   * )   ac_file_in=$ac_file.in ;;
16391   esac
16392
16393   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16394   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16395          X"$ac_file" : 'X\(//\)[^/]' \| \
16396          X"$ac_file" : 'X\(//\)$' \| \
16397          X"$ac_file" : 'X\(/\)' \| \
16398          .     : '\(.\)' 2>/dev/null ||
16399 echo X"$ac_file" |
16400     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16401           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16402           /^X\(\/\/\)$/{ s//\1/; q; }
16403           /^X\(\/\).*/{ s//\1/; q; }
16404           s/.*/./; q'`
16405   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16406     { case "$ac_dir" in
16407   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16408   *)                      as_incr_dir=.;;
16409 esac
16410 as_dummy="$ac_dir"
16411 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16412   case $as_mkdir_dir in
16413     # Skip DOS drivespec
16414     ?:) as_incr_dir=$as_mkdir_dir ;;
16415     *)
16416       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16417       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16418     ;;
16419   esac
16420 done; }
16421
16422     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16423     # A "../" for each directory in $ac_dir_suffix.
16424     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16425   else
16426     ac_dir_suffix= ac_dots=
16427   fi
16428
16429   case $srcdir in
16430   .)  ac_srcdir=.
16431       if test -z "$ac_dots"; then
16432          ac_top_srcdir=.
16433       else
16434          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16435       fi ;;
16436   [\\/]* | ?:[\\/]* )
16437       ac_srcdir=$srcdir$ac_dir_suffix;
16438       ac_top_srcdir=$srcdir ;;
16439   *) # Relative path.
16440     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16441     ac_top_srcdir=$ac_dots$srcdir ;;
16442   esac
16443
16444   case $INSTALL in
16445   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16446   *) ac_INSTALL=$ac_dots$INSTALL ;;
16447   esac
16448
16449   if test x"$ac_file" != x-; then
16450     { echo "$as_me:16450: creating $ac_file" >&5
16451 echo "$as_me: creating $ac_file" >&6;}
16452     rm -f "$ac_file"
16453   fi
16454   # Let's still pretend it is `configure' which instantiates (i.e., don't
16455   # use $as_me), people would be surprised to read:
16456   #    /* config.h.  Generated automatically by config.status.  */
16457   configure_input="Generated automatically from `echo $ac_file_in |
16458                                                  sed 's,.*/,,'` by configure."
16459
16460   # First look for the input files in the build tree, otherwise in the
16461   # src tree.
16462   ac_file_inputs=`IFS=:
16463     for f in $ac_file_in; do
16464       case $f in
16465       -) echo $tmp/stdin ;;
16466       [\\/$]*)
16467          # Absolute (can't be DOS-style, as IFS=:)
16468          test -f "$f" || { { echo "$as_me:16468: error: cannot find input file: $f" >&5
16469 echo "$as_me: error: cannot find input file: $f" >&2;}
16470    { (exit 1); exit 1; }; }
16471          echo $f;;
16472       *) # Relative
16473          if test -f "$f"; then
16474            # Build tree
16475            echo $f
16476          elif test -f "$srcdir/$f"; then
16477            # Source tree
16478            echo $srcdir/$f
16479          else
16480            # /dev/null tree
16481            { { echo "$as_me:16481: error: cannot find input file: $f" >&5
16482 echo "$as_me: error: cannot find input file: $f" >&2;}
16483    { (exit 1); exit 1; }; }
16484          fi;;
16485       esac
16486     done` || { (exit 1); exit 1; }
16487 EOF
16488 cat >>$CONFIG_STATUS <<EOF
16489   sed "$ac_vpsub
16490 $extrasub
16491 EOF
16492 cat >>$CONFIG_STATUS <<\EOF
16493 :t
16494 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16495 s,@configure_input@,$configure_input,;t t
16496 s,@srcdir@,$ac_srcdir,;t t
16497 s,@top_srcdir@,$ac_top_srcdir,;t t
16498 s,@INSTALL@,$ac_INSTALL,;t t
16499 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16500   rm -f $tmp/stdin
16501   if test x"$ac_file" != x-; then
16502     mv $tmp/out $ac_file
16503   else
16504     cat $tmp/out
16505     rm -f $tmp/out
16506   fi
16507
16508 done
16509 EOF
16510 cat >>$CONFIG_STATUS <<\EOF
16511
16512 #
16513 # CONFIG_HEADER section.
16514 #
16515
16516 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16517 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16518 #
16519 # ac_d sets the value in "#define NAME VALUE" lines.
16520 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16521 ac_dB='[        ].*$,\1#\2'
16522 ac_dC=' '
16523 ac_dD=',;t'
16524 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16525 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16526 ac_iB='\([      ]\),\1#\2define\3'
16527 ac_iC=' '
16528 ac_iD='\4,;t'
16529 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16530 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16531 ac_uB='$,\1#\2define\3'
16532 ac_uC=' '
16533 ac_uD=',;t'
16534
16535 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16536   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16537   case $ac_file in
16538   - | *:- | *:-:* ) # input from stdin
16539         cat >$tmp/stdin
16540         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16541         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16542   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16543         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16544   * )   ac_file_in=$ac_file.in ;;
16545   esac
16546
16547   test x"$ac_file" != x- && { echo "$as_me:16547: creating $ac_file" >&5
16548 echo "$as_me: creating $ac_file" >&6;}
16549
16550   # First look for the input files in the build tree, otherwise in the
16551   # src tree.
16552   ac_file_inputs=`IFS=:
16553     for f in $ac_file_in; do
16554       case $f in
16555       -) echo $tmp/stdin ;;
16556       [\\/$]*)
16557          # Absolute (can't be DOS-style, as IFS=:)
16558          test -f "$f" || { { echo "$as_me:16558: error: cannot find input file: $f" >&5
16559 echo "$as_me: error: cannot find input file: $f" >&2;}
16560    { (exit 1); exit 1; }; }
16561          echo $f;;
16562       *) # Relative
16563          if test -f "$f"; then
16564            # Build tree
16565            echo $f
16566          elif test -f "$srcdir/$f"; then
16567            # Source tree
16568            echo $srcdir/$f
16569          else
16570            # /dev/null tree
16571            { { echo "$as_me:16571: error: cannot find input file: $f" >&5
16572 echo "$as_me: error: cannot find input file: $f" >&2;}
16573    { (exit 1); exit 1; }; }
16574          fi;;
16575       esac
16576     done` || { (exit 1); exit 1; }
16577   # Remove the trailing spaces.
16578   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16579
16580 EOF
16581
16582 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16583 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16584 # be either 'cat' or 'sort'.
16585 cat confdefs.h | uniq >conftest.vals
16586
16587 # Break up conftest.vals because some shells have a limit on
16588 # the size of here documents, and old seds have small limits too.
16589
16590 rm -f conftest.tail
16591 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16592 while grep . conftest.vals >/dev/null
16593 do
16594   # Write chunks of a limited-size here document to conftest.frag.
16595   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16596   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16597   echo 'CEOF' >> $CONFIG_STATUS
16598   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16599   rm -f conftest.vals
16600   mv conftest.tail conftest.vals
16601 done
16602 rm -f conftest.vals
16603
16604 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16605 # marker @DEFS@.
16606 echo '  cat >> conftest.edit <<CEOF
16607 /@DEFS@/r conftest.frag
16608 /@DEFS@/d
16609 CEOF
16610 sed -f conftest.edit $tmp/in > $tmp/out
16611 rm -f $tmp/in
16612 mv $tmp/out $tmp/in
16613 rm -f conftest.edit conftest.frag
16614 ' >> $CONFIG_STATUS
16615
16616 cat >>$CONFIG_STATUS <<\EOF
16617   # Let's still pretend it is `configure' which instantiates (i.e., don't
16618   # use $as_me), people would be surprised to read:
16619   #    /* config.h.  Generated automatically by config.status.  */
16620   if test x"$ac_file" = x-; then
16621     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16622   else
16623     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16624   fi
16625   cat $tmp/in >>$tmp/config.h
16626   rm -f $tmp/in
16627   if test x"$ac_file" != x-; then
16628     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16629       { echo "$as_me:16629: $ac_file is unchanged" >&5
16630 echo "$as_me: $ac_file is unchanged" >&6;}
16631     else
16632       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16633          X"$ac_file" : 'X\(//\)[^/]' \| \
16634          X"$ac_file" : 'X\(//\)$' \| \
16635          X"$ac_file" : 'X\(/\)' \| \
16636          .     : '\(.\)' 2>/dev/null ||
16637 echo X"$ac_file" |
16638     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16639           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16640           /^X\(\/\/\)$/{ s//\1/; q; }
16641           /^X\(\/\).*/{ s//\1/; q; }
16642           s/.*/./; q'`
16643       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16644         { case "$ac_dir" in
16645   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16646   *)                      as_incr_dir=.;;
16647 esac
16648 as_dummy="$ac_dir"
16649 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16650   case $as_mkdir_dir in
16651     # Skip DOS drivespec
16652     ?:) as_incr_dir=$as_mkdir_dir ;;
16653     *)
16654       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16655       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16656     ;;
16657   esac
16658 done; }
16659
16660       fi
16661       rm -f $ac_file
16662       mv $tmp/config.h $ac_file
16663     fi
16664   else
16665     cat $tmp/config.h
16666     rm -f $tmp/config.h
16667   fi
16668 done
16669 EOF
16670 cat >>$CONFIG_STATUS <<\EOF
16671
16672 #
16673 # CONFIG_COMMANDS section.
16674 #
16675 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16676   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16677   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16678
16679   case $ac_dest in
16680     default )
16681
16682 for cf_dir in test
16683 do
16684         if test ! -d $srcdir/$cf_dir; then
16685                 continue
16686         elif test -f $srcdir/$cf_dir/programs; then
16687                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16688         fi
16689 done
16690
16691         case $cf_cv_system_name in
16692         OS/2*)  LIB_PREFIX=''     ;;
16693         os2*)   LIB_PREFIX=''     ;;
16694         *)      LIB_PREFIX='lib'  ;;
16695         esac
16696 cf_prefix=$LIB_PREFIX
16697
16698 for cf_dir in $SRC_SUBDIRS
16699 do
16700         if test ! -d $srcdir/$cf_dir ; then
16701                 continue
16702         elif test -f $srcdir/$cf_dir/modules; then
16703
16704                 SHARED_LIB=
16705                 LIBS_TO_MAKE=
16706                 for cf_item in $cf_LIST_MODELS
16707                 do
16708
16709         case $cf_item in
16710         libtool) cf_suffix='.la'  ;;
16711         normal)  cf_suffix='.a'   ;;
16712         debug)   cf_suffix='_g.a' ;;
16713         profile) cf_suffix='_p.a' ;;
16714         shared)
16715                 case $cf_cv_system_name in
16716                 cygwin*) cf_suffix='.dll' ;;
16717                 darwin*) cf_suffix='.dylib' ;;
16718                 hpux*)
16719                         case $target in
16720                         ia64*)  cf_suffix='.so' ;;
16721                         *)      cf_suffix='.sl' ;;
16722                         esac
16723                         ;;
16724                 *)      cf_suffix='.so'  ;;
16725                 esac
16726         esac
16727         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16728
16729                         if test $cf_item = shared ; then
16730                         if test "$cf_cv_do_symlinks" = yes ; then
16731                                 case "$cf_cv_shlib_version" in #(vi
16732                                 rel) #(vi
16733                                         case "$cf_cv_system_name" in #(vi
16734                                         darwin*)
16735                                         case .${LIB_SUFFIX} in
16736                                         .w*)
16737                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16738                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16739                                                 ;;
16740                                         *)
16741                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16742                                                 ;;
16743                                         esac
16744                                         ;; #(vi
16745                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16746                                         esac
16747                                         ;;
16748                                 abi)
16749                                         case "$cf_cv_system_name" in #(vi
16750                                         darwin*)
16751                                         case .${LIB_SUFFIX} in
16752                                         .w*)
16753                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16754                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16755                                                 ;;
16756                                         *)
16757                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16758                                                 ;;
16759                                         esac
16760                                         ;; #(vi
16761                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16762                                         esac
16763                                         ;;
16764                                 esac
16765                         fi
16766                         # cygwin needs import library, and has unique naming convention
16767                         # use autodetected ${cf_prefix} for import lib and static lib, but
16768                         # use 'cyg' prefix for shared lib.
16769                         if test $cf_cv_shlib_version = cygdll ; then
16770                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16771                                 continue
16772                         fi
16773                         fi
16774                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16775                 done
16776
16777                 if test $cf_dir = ncurses ; then
16778                         cf_subsets="$LIB_SUBSETS"
16779                         cf_r_parts="$cf_subsets"
16780
16781                         while test -n "$cf_r_parts"
16782                         do
16783                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16784                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16785                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16786                                         case $cf_l_parts in #(vi
16787                                         *termlib*) #(vi
16788                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16789                                                 ;;
16790                                         *ticlib*)
16791                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16792                                                 ;;
16793                                         *)
16794                                                 break
16795                                                 ;;
16796                                         esac
16797                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16798                                 else
16799                                         break
16800                                 fi
16801                         done
16802                 else
16803                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16804                 fi
16805
16806                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16807                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16808                         $cf_dir/Makefile >$cf_dir/Makefile.out
16809                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16810
16811                 $AWK -f $srcdir/mk-0th.awk \
16812                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16813                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16814
16815                 for cf_subset in $cf_subsets
16816                 do
16817                         cf_subdirs=
16818                         for cf_item in $cf_LIST_MODELS
16819                         do
16820                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16821
16822 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16823
16824         case $cf_item in
16825         libtool) cf_suffix='.la'  ;;
16826         normal)  cf_suffix='.a'   ;;
16827         debug)   cf_suffix='_g.a' ;;
16828         profile) cf_suffix='_p.a' ;;
16829         shared)
16830                 case $cf_cv_system_name in
16831                 cygwin*) cf_suffix='.dll' ;;
16832                 darwin*) cf_suffix='.dylib' ;;
16833                 hpux*)
16834                         case $target in
16835                         ia64*)  cf_suffix='.so' ;;
16836                         *)      cf_suffix='.sl' ;;
16837                         esac
16838                         ;;
16839                 *)      cf_suffix='.so'  ;;
16840                 esac
16841         esac
16842         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16843
16844         case $cf_item in
16845         libtool) cf_subdir='obj_lo'  ;;
16846         normal)  cf_subdir='objects' ;;
16847         debug)   cf_subdir='obj_g' ;;
16848         profile) cf_subdir='obj_p' ;;
16849         shared)
16850                 case $cf_cv_system_name in #(vi
16851                 cygwin) #(vi
16852                         cf_subdir='objects' ;;
16853                 *)
16854                         cf_subdir='obj_s' ;;
16855                 esac
16856         esac
16857
16858                         # Test for case where we build libtinfo with a different name.
16859                         cf_libname=$cf_dir
16860                         if test $cf_dir = ncurses ; then
16861                                 case $cf_subset in
16862                                 *base*)
16863                                         ;;
16864                                 *termlib*)
16865                                         cf_libname=$TINFO_LIB_SUFFIX
16866                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16867                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16868                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16869                                         fi
16870                                         ;;
16871                                 ticlib*)
16872                                         cf_libname=$TICS_LIB_SUFFIX
16873                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16874                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16875                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16876                                         fi
16877                                         ;;
16878                                 esac
16879                         fi
16880
16881                         # These dependencies really are for development, not
16882                         # builds, but they are useful in porting, too.
16883                         cf_depend="../include/ncurses_cfg.h"
16884                         if test "$srcdir" = "."; then
16885                                 cf_reldir="."
16886                         else
16887                                 cf_reldir="\${srcdir}"
16888                         fi
16889
16890                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16891                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16892                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16893                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16894                         fi
16895
16896                         cf_dir_suffix=
16897                         old_cf_suffix="$cf_suffix"
16898                         if test "$cf_cv_shlib_version_infix" = yes ; then
16899                         if test -n "$LIB_SUFFIX" ; then
16900                                 case $LIB_SUFFIX in
16901                                 w*)
16902                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16903                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16904                                         cf_dir_suffix=w
16905                                         ;;
16906                                 esac
16907                         fi
16908                         fi
16909
16910                         $AWK -f $srcdir/mk-1st.awk \
16911                                 name=${cf_libname}${cf_dir_suffix} \
16912                                 traces=$LIB_TRACING \
16913                                 MODEL=$cf_ITEM \
16914                                 model=$cf_subdir \
16915                                 prefix=$cf_prefix \
16916                                 suffix=$cf_suffix \
16917                                 subset=$cf_subset \
16918                                 TermlibRoot=$TINFO_NAME \
16919                                 TermlibSuffix=$TINFO_SUFFIX \
16920                                 ShlibVer=$cf_cv_shlib_version \
16921                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16922                                 ReLink=${cf_cv_do_relink-no} \
16923                                 DoLinks=$cf_cv_do_symlinks \
16924                                 rmSoLocs=$cf_cv_rm_so_locs \
16925                                 ldconfig="$LDCONFIG" \
16926                                 overwrite=$WITH_OVERWRITE \
16927                                 depend="$cf_depend" \
16928                                 host="$host" \
16929                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16930
16931                         cf_suffix="$old_cf_suffix"
16932
16933                         for cf_subdir2 in $cf_subdirs lib
16934                         do
16935                                 test $cf_subdir = $cf_subdir2 && break
16936                         done
16937                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16938                         $AWK -f $srcdir/mk-2nd.awk \
16939                                 name=$cf_dir \
16940                                 traces=$LIB_TRACING \
16941                                 MODEL=$cf_ITEM \
16942                                 model=$cf_subdir \
16943                                 subset=$cf_subset \
16944                                 srcdir=$srcdir \
16945                                 echo=$WITH_ECHO \
16946                                 crenames=$cf_cv_prog_CC_c_o \
16947                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16948                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16949                         cf_subdirs="$cf_subdirs $cf_subdir"
16950                         done
16951                 done
16952         fi
16953
16954         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16955 done
16956
16957 for cf_dir in $SRC_SUBDIRS
16958 do
16959         if test ! -d $srcdir/$cf_dir ; then
16960                 continue
16961         fi
16962
16963         if test -f $cf_dir/Makefile ; then
16964                 case "$cf_dir" in
16965                 Ada95) #(vi
16966                         echo 'libs \' >> Makefile
16967                         echo 'install.libs \' >> Makefile
16968                         echo 'uninstall.libs ::' >> Makefile
16969                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16970                         ;;
16971                 esac
16972         fi
16973
16974         if test -f $srcdir/$cf_dir/modules; then
16975                 echo >> Makefile
16976                 if test -f $srcdir/$cf_dir/headers; then
16977 cat >> Makefile <<CF_EOF
16978 install.includes \\
16979 uninstall.includes \\
16980 CF_EOF
16981                 fi
16982 if test "$cf_dir" != "c++" ; then
16983 echo 'lint \' >> Makefile
16984 fi
16985 cat >> Makefile <<CF_EOF
16986 libs \\
16987 lintlib \\
16988 install.libs \\
16989 uninstall.libs \\
16990 install.$cf_dir \\
16991 uninstall.$cf_dir ::
16992         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16993 CF_EOF
16994         elif test -f $srcdir/$cf_dir/headers; then
16995 cat >> Makefile <<CF_EOF
16996
16997 libs \\
16998 install.libs \\
16999 uninstall.libs \\
17000 install.includes \\
17001 uninstall.includes ::
17002         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17003 CF_EOF
17004 fi
17005 done
17006
17007 cat >> Makefile <<CF_EOF
17008
17009 install.libs uninstall.libs \\
17010 install.data uninstall.data ::
17011 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17012
17013 install.man \\
17014 uninstall.man ::
17015         cd man && \${MAKE} \${CF_MFLAGS} \$@
17016
17017 distclean ::
17018         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17019         rm -f headers.sh headers.sed mk_shared_lib.sh
17020         rm -rf \${DIRS_TO_MAKE}
17021 CF_EOF
17022
17023 # Special case: tack's manpage lives in its own directory.
17024 if test -d tack ; then
17025 if test -f $srcdir/$tack.h; then
17026 cat >> Makefile <<CF_EOF
17027
17028 install.man \\
17029 uninstall.man ::
17030         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17031 CF_EOF
17032 fi
17033 fi
17034
17035 rm -f headers.sed headers.sh
17036
17037 echo creating headers.sh
17038 cat >headers.sh <<CF_EOF
17039 #! /bin/sh
17040 # This shell script is generated by the 'configure' script.  It is invoked in a
17041 # subdirectory of the build tree.  It generates a sed-script in the parent
17042 # directory that is used to adjust includes for header files that reside in a
17043 # subdirectory of /usr/include, etc.
17044 PRG=""
17045 while test \$# != 3
17046 do
17047 PRG="\$PRG \$1"; shift
17048 done
17049 DST=\$1
17050 REF=\$2
17051 SRC=\$3
17052 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17053 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17054 echo installing \$SRC in \$DST
17055 CF_EOF
17056
17057 if test $WITH_CURSES_H = yes; then
17058         cat >>headers.sh <<CF_EOF
17059 case \$DST in
17060 /*/include/*)
17061         END=\`basename \$DST\`
17062         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17063         do
17064                 NAME=\`basename \$i\`
17065                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17066         done
17067         ;;
17068 *)
17069         echo "" >> \$TMPSED
17070         ;;
17071 esac
17072 CF_EOF
17073
17074 else
17075         cat >>headers.sh <<CF_EOF
17076 case \$DST in
17077 /*/include/*)
17078         END=\`basename \$DST\`
17079         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17080         do
17081                 NAME=\`basename \$i\`
17082                 if test "\$NAME" = "curses.h"
17083                 then
17084                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17085                         NAME=ncurses.h
17086                 fi
17087                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17088         done
17089         ;;
17090 *)
17091         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17092         ;;
17093 esac
17094 CF_EOF
17095 fi
17096 cat >>headers.sh <<CF_EOF
17097 rm -f \$TMPSRC
17098 sed -f \$TMPSED \$SRC > \$TMPSRC
17099 NAME=\`basename \$SRC\`
17100 CF_EOF
17101 if test $WITH_CURSES_H != yes; then
17102         cat >>headers.sh <<CF_EOF
17103 test "\$NAME" = "curses.h" && NAME=ncurses.h
17104 CF_EOF
17105 fi
17106 cat >>headers.sh <<CF_EOF
17107 # Just in case someone gzip'd manpages, remove the conflicting copy.
17108 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17109
17110 eval \$PRG \$TMPSRC \$DST/\$NAME
17111 rm -f \$TMPSRC \$TMPSED
17112 CF_EOF
17113
17114 chmod 0755 headers.sh
17115
17116 for cf_dir in $SRC_SUBDIRS
17117 do
17118         if test ! -d $srcdir/$cf_dir ; then
17119                 continue
17120         fi
17121
17122         if test -f $srcdir/$cf_dir/headers; then
17123                 $AWK -f $srcdir/mk-hdr.awk \
17124                         subset="$LIB_SUBSETS" \
17125                         compat="$WITH_CURSES_H" \
17126                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17127         fi
17128
17129         if test -f $srcdir/$cf_dir/modules; then
17130                 if test "$cf_dir" != "c++" ; then
17131                         cat >>$cf_dir/Makefile <<"CF_EOF"
17132 depend : ${AUTO_SRC}
17133         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17134
17135 # DO NOT DELETE THIS LINE -- make depend depends on it.
17136 CF_EOF
17137                 fi
17138         fi
17139 done
17140
17141  ;;
17142   esac
17143 done
17144 EOF
17145
17146 cat >>$CONFIG_STATUS <<\EOF
17147
17148 { (exit 0); exit 0; }
17149 EOF
17150 chmod +x $CONFIG_STATUS
17151 ac_clean_files=$ac_clean_files_save
17152
17153 # configure is writing to config.log, and then calls config.status.
17154 # config.status does its own redirection, appending to config.log.
17155 # Unfortunately, on DOS this fails, as config.log is still kept open
17156 # by configure, so config.status won't be able to write to it; its
17157 # output is simply discarded.  So we exec the FD to /dev/null,
17158 # effectively closing config.log, so it can be properly (re)opened and
17159 # appended to by config.status.  When coming back to configure, we
17160 # need to make the FD available again.
17161 if test "$no_create" != yes; then
17162   ac_cs_success=:
17163   exec 5>/dev/null
17164   $SHELL $CONFIG_STATUS || ac_cs_success=false
17165   exec 5>>config.log
17166   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17167   # would make configure fail if this is the last instruction.
17168   $ac_cs_success || { (exit 1); exit 1; }
17169 fi
17170 ${MAKE-make} preinstall