]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20071201
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.429 .
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   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --with-bool=TYPE        override fallback type of bool variable
750   --with-caps=alt         compile with alternate Caps file
751   --with-chtype=TYPE      override type of chtype
752   --with-ospeed=TYPE      override type of ospeed variable
753   --with-mmask-t=TYPE     override type of mmask_t
754   --with-rcs-ids          compile-in RCS identifiers
755 Options to Specify How Manpages are Installed:
756   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
757                           optionally formatted/catonly, e.g., gzip,formatted
758   --with-manpage-renames  specify manpage-renaming
759   --with-manpage-aliases  specify manpage-aliases using .so
760   --with-manpage-symlinks specify manpage-aliases using symlinks
761   --with-manpage-tbl      specify manpage processing with tbl
762 Extensions:
763   --disable-ext-funcs     disable function-extensions
764   --enable-const          compile with extra/non-standard const
765   --enable-no-padding     compile with $NCURSES_NO_PADDING code
766   --enable-signed-char    compile using signed Boolean's in term.h
767   --enable-sigwinch       compile with SIGWINCH handler
768   --enable-tcap-names     compile with user-definable terminal capabilities
769 Development Code:
770   --without-develop       disable development options
771   --enable-hard-tabs      compile with hard-tabs code
772   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
773 Experimental Code:
774   --disable-assumed-color do not assume anything about default-colors
775   --disable-hashmap       compile without hashmap scrolling-optimization
776   --enable-colorfgbg      compile with $COLORFGBG code
777   --enable-ext-colors     compile for experimental 256-color support
778   --enable-ext-mouse      compile for experimental mouse-encoding
779   --enable-reentrant      compile with experimental reentrant code
780   --enable-safe-sprintf   compile with experimental safe-sprintf code
781   --disable-scroll-hints  compile without scroll-hints code
782   --enable-wgetch-events  compile with experimental wgetch-events code
783 Testing/development Options:
784   --enable-echo           build: display "compiling" commands (default)
785   --enable-warnings       build: turn on GCC compiler warnings
786   --enable-assertions     test: turn on generation of assertion code
787   --with-dmalloc          test: use Gray Watson's dmalloc library
788   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
789   --with-valgrind         test: use valgrind
790   --disable-leaks         test: free permanent memory, analyze leaks
791   --enable-expanded       test: generate functions for certain macros
792   --disable-macros        test: use functions rather than macros
793   --with-trace            test: add trace() function to all models of ncurses
794 Ada95 Binding Options:
795   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
796   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
797   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
798
799 Some influential environment variables:
800   CC          C compiler command
801   CFLAGS      C compiler flags
802   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
803               nonstandard directory <lib dir>
804   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
805               headers in a nonstandard directory <include dir>
806   CPP         C preprocessor
807   CXX         C++ compiler command
808   CXXFLAGS    C++ compiler flags
809   CXXCPP      C++ preprocessor
810
811 Use these variables to override the choices made by `configure' or to help
812 it to find libraries and programs with nonstandard names/locations.
813
814 EOF
815 fi
816
817 if test "$ac_init_help" = "recursive"; then
818   # If there are subdirs, report their specific --help.
819   ac_popdir=`pwd`
820   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
821     cd $ac_subdir
822     # A "../" for each directory in /$ac_subdir.
823     ac_dots=`echo $ac_subdir |
824              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
825
826     case $srcdir in
827     .) # No --srcdir option.  We are building in place.
828       ac_sub_srcdir=$srcdir ;;
829     [\\/]* | ?:[\\/]* ) # Absolute path.
830       ac_sub_srcdir=$srcdir/$ac_subdir ;;
831     *) # Relative path.
832       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
833     esac
834
835     # Check for guested configure; otherwise get Cygnus style configure.
836     if test -f $ac_sub_srcdir/configure.gnu; then
837       echo
838       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
839     elif test -f $ac_sub_srcdir/configure; then
840       echo
841       $SHELL $ac_sub_srcdir/configure  --help=recursive
842     elif test -f $ac_sub_srcdir/configure.ac ||
843            test -f $ac_sub_srcdir/configure.in; then
844       echo
845       $ac_configure --help
846     else
847       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
848     fi
849     cd $ac_popdir
850   done
851 fi
852
853 test -n "$ac_init_help" && exit 0
854 if $ac_init_version; then
855   cat <<\EOF
856
857 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
858 Free Software Foundation, Inc.
859 This configure script is free software; the Free Software Foundation
860 gives unlimited permission to copy, distribute and modify it.
861 EOF
862   exit 0
863 fi
864 exec 5>config.log
865 cat >&5 <<EOF
866 This file contains any messages produced by compilers while
867 running configure, to aid debugging if configure makes a mistake.
868
869 It was created by $as_me, which was
870 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
871
872   $ $0 $@
873
874 EOF
875 {
876 cat <<_ASUNAME
877 ## ---------- ##
878 ## Platform.  ##
879 ## ---------- ##
880
881 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
882 uname -m = `(uname -m) 2>/dev/null || echo unknown`
883 uname -r = `(uname -r) 2>/dev/null || echo unknown`
884 uname -s = `(uname -s) 2>/dev/null || echo unknown`
885 uname -v = `(uname -v) 2>/dev/null || echo unknown`
886
887 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
888 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
889
890 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
891 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
892 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
893 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
894 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
895 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
896 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
897
898 PATH = $PATH
899
900 _ASUNAME
901 } >&5
902
903 cat >&5 <<EOF
904 ## ------------ ##
905 ## Core tests.  ##
906 ## ------------ ##
907
908 EOF
909
910 # Keep a trace of the command line.
911 # Strip out --no-create and --no-recursion so they do not pile up.
912 # Also quote any args containing shell meta-characters.
913 ac_configure_args=
914 ac_sep=
915 for ac_arg
916 do
917   case $ac_arg in
918   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
919   | --no-cr | --no-c) ;;
920   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
921   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
922   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
923     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
924     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
925     ac_sep=" " ;;
926   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
927      ac_sep=" " ;;
928   esac
929   # Get rid of the leading space.
930 done
931
932 # When interrupted or exit'd, cleanup temporary files, and complete
933 # config.log.  We remove comments because anyway the quotes in there
934 # would cause problems or look ugly.
935 trap 'exit_status=$?
936   # Save into config.log some information that might help in debugging.
937   echo >&5
938   echo "## ----------------- ##" >&5
939   echo "## Cache variables.  ##" >&5
940   echo "## ----------------- ##" >&5
941   echo >&5
942   # The following way of writing the cache mishandles newlines in values,
943 {
944   (set) 2>&1 |
945     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
946     *ac_space=\ *)
947       sed -n \
948         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
949           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
950       ;;
951     *)
952       sed -n \
953         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
954       ;;
955     esac;
956 } >&5
957   sed "/^$/d" confdefs.h >conftest.log
958   if test -s conftest.log; then
959     echo >&5
960     echo "## ------------ ##" >&5
961     echo "## confdefs.h.  ##" >&5
962     echo "## ------------ ##" >&5
963     echo >&5
964     cat conftest.log >&5
965   fi
966   (echo; echo) >&5
967   test "$ac_signal" != 0 &&
968     echo "$as_me: caught signal $ac_signal" >&5
969   echo "$as_me: exit $exit_status" >&5
970   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
971     exit $exit_status
972      ' 0
973 for ac_signal in 1 2 13 15; do
974   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
975 done
976 ac_signal=0
977
978 # confdefs.h avoids OS command line length limits that DEFS can exceed.
979 rm -rf conftest* confdefs.h
980 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
981 echo >confdefs.h
982
983 # Let the site file select an alternate cache file if it wants to.
984 # Prefer explicitly selected file to automatically selected ones.
985 if test -z "$CONFIG_SITE"; then
986   if test "x$prefix" != xNONE; then
987     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
988   else
989     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
990   fi
991 fi
992 for ac_site_file in $CONFIG_SITE; do
993   if test -r "$ac_site_file"; then
994     { echo "$as_me:994: loading site script $ac_site_file" >&5
995 echo "$as_me: loading site script $ac_site_file" >&6;}
996     cat "$ac_site_file" >&5
997     . "$ac_site_file"
998   fi
999 done
1000
1001 if test -r "$cache_file"; then
1002   # Some versions of bash will fail to source /dev/null (special
1003   # files actually), so we avoid doing that.
1004   if test -f "$cache_file"; then
1005     { echo "$as_me:1005: loading cache $cache_file" >&5
1006 echo "$as_me: loading cache $cache_file" >&6;}
1007     case $cache_file in
1008       [\\/]* | ?:[\\/]* ) . $cache_file;;
1009       *)                      . ./$cache_file;;
1010     esac
1011   fi
1012 else
1013   { echo "$as_me:1013: creating cache $cache_file" >&5
1014 echo "$as_me: creating cache $cache_file" >&6;}
1015   >$cache_file
1016 fi
1017
1018 # Check that the precious variables saved in the cache have kept the same
1019 # value.
1020 ac_cache_corrupted=false
1021 for ac_var in `(set) 2>&1 |
1022                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1023   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1024   eval ac_new_set=\$ac_env_${ac_var}_set
1025   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1026   eval ac_new_val="\$ac_env_${ac_var}_value"
1027   case $ac_old_set,$ac_new_set in
1028     set,)
1029       { echo "$as_me:1029: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1030 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1031       ac_cache_corrupted=: ;;
1032     ,set)
1033       { echo "$as_me:1033: error: \`$ac_var' was not set in the previous run" >&5
1034 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1035       ac_cache_corrupted=: ;;
1036     ,);;
1037     *)
1038       if test "x$ac_old_val" != "x$ac_new_val"; then
1039         { echo "$as_me:1039: error: \`$ac_var' has changed since the previous run:" >&5
1040 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1041         { echo "$as_me:1041:   former value:  $ac_old_val" >&5
1042 echo "$as_me:   former value:  $ac_old_val" >&2;}
1043         { echo "$as_me:1043:   current value: $ac_new_val" >&5
1044 echo "$as_me:   current value: $ac_new_val" >&2;}
1045         ac_cache_corrupted=:
1046       fi;;
1047   esac
1048   # Pass precious variables to config.status.  It doesn't matter if
1049   # we pass some twice (in addition to the command line arguments).
1050   if test "$ac_new_set" = set; then
1051     case $ac_new_val in
1052     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1053       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1054       ac_configure_args="$ac_configure_args '$ac_arg'"
1055       ;;
1056     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1057        ;;
1058     esac
1059   fi
1060 done
1061 if $ac_cache_corrupted; then
1062   { echo "$as_me:1062: error: changes in the environment can compromise the build" >&5
1063 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1064   { { echo "$as_me:1064: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1065 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1066    { (exit 1); exit 1; }; }
1067 fi
1068
1069 ac_ext=c
1070 ac_cpp='$CPP $CPPFLAGS'
1071 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1072 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1073 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1074 ac_main_return=return
1075
1076 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1077   *c*,-n*) ECHO_N= ECHO_C='
1078 ' ECHO_T='      ' ;;
1079   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1080   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1081 esac
1082 echo "#! $SHELL" >conftest.sh
1083 echo  "exit 0"   >>conftest.sh
1084 chmod +x conftest.sh
1085 if { (echo "$as_me:1085: PATH=\".;.\"; conftest.sh") >&5
1086   (PATH=".;."; conftest.sh) 2>&5
1087   ac_status=$?
1088   echo "$as_me:1088: \$? = $ac_status" >&5
1089   (exit $ac_status); }; then
1090   ac_path_separator=';'
1091 else
1092   ac_path_separator=:
1093 fi
1094 PATH_SEPARATOR="$ac_path_separator"
1095 rm -f conftest.sh
1096
1097 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1098
1099 top_builddir=`pwd`
1100
1101 echo "$as_me:1101: checking for egrep" >&5
1102 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1103 if test "${ac_cv_prog_egrep+set}" = set; then
1104   echo $ECHO_N "(cached) $ECHO_C" >&6
1105 else
1106   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1107     then ac_cv_prog_egrep='grep -E'
1108     else ac_cv_prog_egrep='egrep'
1109     fi
1110 fi
1111 echo "$as_me:1111: result: $ac_cv_prog_egrep" >&5
1112 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1113  EGREP=$ac_cv_prog_egrep
1114
1115 test -z "$EGREP" && { { echo "$as_me:1115: error: No egrep program found" >&5
1116 echo "$as_me: error: No egrep program found" >&2;}
1117    { (exit 1); exit 1; }; }
1118
1119 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1121 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 cf_cv_abi_version=${NCURSES_MAJOR}
1123 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1124 cf_cv_timestamp=`date`
1125 echo "$as_me:1125: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1126 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1127
1128 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1129
1130 # Check whether --with-rel-version or --without-rel-version was given.
1131 if test "${with_rel_version+set}" = set; then
1132   withval="$with_rel_version"
1133   { echo "$as_me:1133: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1134 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1135  cf_cv_rel_version=$withval
1136 fi;
1137
1138  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1139  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1140
1141 if test -n "$NCURSES_MAJOR" ; then
1142   case $NCURSES_MAJOR in #(vi
1143   [0-9]*) #(vi
1144         ;;
1145   *)
1146         { { echo "$as_me:1146: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1147 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1148    { (exit 1); exit 1; }; }
1149         ;;
1150   esac
1151 else
1152   { { echo "$as_me:1152: error: Release major-version value is empty" >&5
1153 echo "$as_me: error: Release major-version value is empty" >&2;}
1154    { (exit 1); exit 1; }; }
1155 fi
1156
1157 if test -n "$NCURSES_MINOR" ; then
1158   case $NCURSES_MINOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1163 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release minor-version value is empty" >&5
1169 echo "$as_me: error: Release minor-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1174
1175 # Check whether --with-abi-version or --without-abi-version was given.
1176 if test "${with_abi_version+set}" = set; then
1177   withval="$with_abi_version"
1178   { echo "$as_me:1178: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1179 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1180  cf_cv_abi_version=$withval
1181 fi;
1182
1183 if test -n "$cf_cv_abi_version" ; then
1184   case $cf_cv_abi_version in #(vi
1185   [0-9]*) #(vi
1186         ;;
1187   *)
1188         { { echo "$as_me:1188: error: ABI version is not a number: $cf_cv_abi_version" >&5
1189 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1190    { (exit 1); exit 1; }; }
1191         ;;
1192   esac
1193 else
1194   { { echo "$as_me:1194: error: ABI version value is empty" >&5
1195 echo "$as_me: error: ABI version value is empty" >&2;}
1196    { (exit 1); exit 1; }; }
1197 fi
1198
1199 ac_aux_dir=
1200 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1201   if test -f $ac_dir/install-sh; then
1202     ac_aux_dir=$ac_dir
1203     ac_install_sh="$ac_aux_dir/install-sh -c"
1204     break
1205   elif test -f $ac_dir/install.sh; then
1206     ac_aux_dir=$ac_dir
1207     ac_install_sh="$ac_aux_dir/install.sh -c"
1208     break
1209   elif test -f $ac_dir/shtool; then
1210     ac_aux_dir=$ac_dir
1211     ac_install_sh="$ac_aux_dir/shtool install -c"
1212     break
1213   fi
1214 done
1215 if test -z "$ac_aux_dir"; then
1216   { { echo "$as_me:1216: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1217 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1218    { (exit 1); exit 1; }; }
1219 fi
1220 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1221 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1222 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1223
1224 # Make sure we can run config.sub.
1225 $ac_config_sub sun4 >/dev/null 2>&1 ||
1226   { { echo "$as_me:1226: error: cannot run $ac_config_sub" >&5
1227 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1228    { (exit 1); exit 1; }; }
1229
1230 echo "$as_me:1230: checking build system type" >&5
1231 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1232 if test "${ac_cv_build+set}" = set; then
1233   echo $ECHO_N "(cached) $ECHO_C" >&6
1234 else
1235   ac_cv_build_alias=$build_alias
1236 test -z "$ac_cv_build_alias" &&
1237   ac_cv_build_alias=`$ac_config_guess`
1238 test -z "$ac_cv_build_alias" &&
1239   { { echo "$as_me:1239: error: cannot guess build type; you must specify one" >&5
1240 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1241    { (exit 1); exit 1; }; }
1242 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1243   { { echo "$as_me:1243: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1244 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1245    { (exit 1); exit 1; }; }
1246
1247 fi
1248 echo "$as_me:1248: result: $ac_cv_build" >&5
1249 echo "${ECHO_T}$ac_cv_build" >&6
1250 build=$ac_cv_build
1251 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1252 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1253 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1254
1255 echo "$as_me:1255: checking host system type" >&5
1256 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1257 if test "${ac_cv_host+set}" = set; then
1258   echo $ECHO_N "(cached) $ECHO_C" >&6
1259 else
1260   ac_cv_host_alias=$host_alias
1261 test -z "$ac_cv_host_alias" &&
1262   ac_cv_host_alias=$ac_cv_build_alias
1263 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1264   { { echo "$as_me:1264: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1265 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1266    { (exit 1); exit 1; }; }
1267
1268 fi
1269 echo "$as_me:1269: result: $ac_cv_host" >&5
1270 echo "${ECHO_T}$ac_cv_host" >&6
1271 host=$ac_cv_host
1272 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1273 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1274 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1275
1276 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1277         echo "$as_me:1277: checking target system type" >&5
1278 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1279 if test "${ac_cv_target+set}" = set; then
1280   echo $ECHO_N "(cached) $ECHO_C" >&6
1281 else
1282   ac_cv_target_alias=$target_alias
1283 test "x$ac_cv_target_alias" = "x" &&
1284   ac_cv_target_alias=$ac_cv_host_alias
1285 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1286   { { echo "$as_me:1286: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1287 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1288    { (exit 1); exit 1; }; }
1289
1290 fi
1291 echo "$as_me:1291: result: $ac_cv_target" >&5
1292 echo "${ECHO_T}$ac_cv_target" >&6
1293 target=$ac_cv_target
1294 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1295 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1296 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1297
1298 # The aliases save the names the user supplied, while $host etc.
1299 # will get canonicalized.
1300 test -n "$target_alias" &&
1301   test "$program_prefix$program_suffix$program_transform_name" = \
1302     NONENONEs,x,x, &&
1303   program_prefix=${target_alias}-
1304         system_name="$host_os"
1305 else
1306         system_name="`(uname -s -r) 2>/dev/null`"
1307         if test -z "$system_name" ; then
1308                 system_name="`(hostname) 2>/dev/null`"
1309         fi
1310 fi
1311 test -n "$system_name" && cat >>confdefs.h <<EOF
1312 #define SYSTEM_NAME "$system_name"
1313 EOF
1314
1315 if test "${cf_cv_system_name+set}" = set; then
1316   echo $ECHO_N "(cached) $ECHO_C" >&6
1317 else
1318   cf_cv_system_name="$system_name"
1319 fi
1320
1321 test -z "$system_name" && system_name="$cf_cv_system_name"
1322 test -n "$cf_cv_system_name" && echo "$as_me:1322: result: Configuring for $cf_cv_system_name" >&5
1323 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1324
1325 if test ".$system_name" != ".$cf_cv_system_name" ; then
1326         echo "$as_me:1326: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1327 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1328         { { echo "$as_me:1328: error: \"Please remove config.cache and try again.\"" >&5
1329 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1330    { (exit 1); exit 1; }; }
1331 fi
1332
1333 # Check whether --with-system-type or --without-system-type was given.
1334 if test "${with_system_type+set}" = set; then
1335   withval="$with_system_type"
1336   { echo "$as_me:1336: WARNING: overriding system type to $withval" >&5
1337 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1338  cf_cv_system_name=$withval
1339 fi;
1340
1341 ###     Save the given $CFLAGS to allow user-override.
1342 cf_user_CFLAGS="$CFLAGS"
1343
1344 ###     Default install-location
1345
1346 echo "$as_me:1346: checking for prefix" >&5
1347 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1348 if test "x$prefix" = "xNONE" ; then
1349         case "$cf_cv_system_name" in
1350                 # non-vendor systems don't have a conflict
1351         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1352                 prefix=/usr
1353                 ;;
1354         *)      prefix=$ac_default_prefix
1355                 ;;
1356         esac
1357 fi
1358 echo "$as_me:1358: result: $prefix" >&5
1359 echo "${ECHO_T}$prefix" >&6
1360
1361 if test "x$prefix" = "xNONE" ; then
1362 echo "$as_me:1362: checking for default include-directory" >&5
1363 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1364 test -n "$verbose" && echo 1>&6
1365 for cf_symbol in \
1366         $includedir \
1367         $includedir/ncurses \
1368         $prefix/include \
1369         $prefix/include/ncurses \
1370         /usr/local/include \
1371         /usr/local/include/ncurses \
1372         /usr/include \
1373         /usr/include/ncurses
1374 do
1375         cf_dir=`eval echo $cf_symbol`
1376         if test -f $cf_dir/curses.h ; then
1377         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1378                 includedir="$cf_symbol"
1379                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1380                 break
1381         fi
1382         fi
1383         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1384 done
1385 echo "$as_me:1385: result: $includedir" >&5
1386 echo "${ECHO_T}$includedir" >&6
1387 fi
1388
1389 ###     Checks for programs.
1390 ac_ext=c
1391 ac_cpp='$CPP $CPPFLAGS'
1392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1395 ac_main_return=return
1396 if test -n "$ac_tool_prefix"; then
1397   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1398 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1399 echo "$as_me:1399: checking for $ac_word" >&5
1400 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1401 if test "${ac_cv_prog_CC+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   if test -n "$CC"; then
1405   ac_cv_prog_CC="$CC" # Let the user override the test.
1406 else
1407   ac_save_IFS=$IFS; IFS=$ac_path_separator
1408 ac_dummy="$PATH"
1409 for ac_dir in $ac_dummy; do
1410   IFS=$ac_save_IFS
1411   test -z "$ac_dir" && ac_dir=.
1412   $as_executable_p "$ac_dir/$ac_word" || continue
1413 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1414 echo "$as_me:1414: found $ac_dir/$ac_word" >&5
1415 break
1416 done
1417
1418 fi
1419 fi
1420 CC=$ac_cv_prog_CC
1421 if test -n "$CC"; then
1422   echo "$as_me:1422: result: $CC" >&5
1423 echo "${ECHO_T}$CC" >&6
1424 else
1425   echo "$as_me:1425: result: no" >&5
1426 echo "${ECHO_T}no" >&6
1427 fi
1428
1429 fi
1430 if test -z "$ac_cv_prog_CC"; then
1431   ac_ct_CC=$CC
1432   # Extract the first word of "gcc", so it can be a program name with args.
1433 set dummy gcc; ac_word=$2
1434 echo "$as_me:1434: checking for $ac_word" >&5
1435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1436 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   if test -n "$ac_ct_CC"; then
1440   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1441 else
1442   ac_save_IFS=$IFS; IFS=$ac_path_separator
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445   IFS=$ac_save_IFS
1446   test -z "$ac_dir" && ac_dir=.
1447   $as_executable_p "$ac_dir/$ac_word" || continue
1448 ac_cv_prog_ac_ct_CC="gcc"
1449 echo "$as_me:1449: found $ac_dir/$ac_word" >&5
1450 break
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:1457: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:1460: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   CC=$ac_ct_CC
1465 else
1466   CC="$ac_cv_prog_CC"
1467 fi
1468
1469 if test -z "$CC"; then
1470   if test -n "$ac_tool_prefix"; then
1471   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1472 set dummy ${ac_tool_prefix}cc; ac_word=$2
1473 echo "$as_me:1473: checking for $ac_word" >&5
1474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1475 if test "${ac_cv_prog_CC+set}" = set; then
1476   echo $ECHO_N "(cached) $ECHO_C" >&6
1477 else
1478   if test -n "$CC"; then
1479   ac_cv_prog_CC="$CC" # Let the user override the test.
1480 else
1481   ac_save_IFS=$IFS; IFS=$ac_path_separator
1482 ac_dummy="$PATH"
1483 for ac_dir in $ac_dummy; do
1484   IFS=$ac_save_IFS
1485   test -z "$ac_dir" && ac_dir=.
1486   $as_executable_p "$ac_dir/$ac_word" || continue
1487 ac_cv_prog_CC="${ac_tool_prefix}cc"
1488 echo "$as_me:1488: found $ac_dir/$ac_word" >&5
1489 break
1490 done
1491
1492 fi
1493 fi
1494 CC=$ac_cv_prog_CC
1495 if test -n "$CC"; then
1496   echo "$as_me:1496: result: $CC" >&5
1497 echo "${ECHO_T}$CC" >&6
1498 else
1499   echo "$as_me:1499: result: no" >&5
1500 echo "${ECHO_T}no" >&6
1501 fi
1502
1503 fi
1504 if test -z "$ac_cv_prog_CC"; then
1505   ac_ct_CC=$CC
1506   # Extract the first word of "cc", so it can be a program name with args.
1507 set dummy cc; ac_word=$2
1508 echo "$as_me:1508: checking for $ac_word" >&5
1509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1510 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1511   echo $ECHO_N "(cached) $ECHO_C" >&6
1512 else
1513   if test -n "$ac_ct_CC"; then
1514   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1515 else
1516   ac_save_IFS=$IFS; IFS=$ac_path_separator
1517 ac_dummy="$PATH"
1518 for ac_dir in $ac_dummy; do
1519   IFS=$ac_save_IFS
1520   test -z "$ac_dir" && ac_dir=.
1521   $as_executable_p "$ac_dir/$ac_word" || continue
1522 ac_cv_prog_ac_ct_CC="cc"
1523 echo "$as_me:1523: found $ac_dir/$ac_word" >&5
1524 break
1525 done
1526
1527 fi
1528 fi
1529 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1530 if test -n "$ac_ct_CC"; then
1531   echo "$as_me:1531: result: $ac_ct_CC" >&5
1532 echo "${ECHO_T}$ac_ct_CC" >&6
1533 else
1534   echo "$as_me:1534: result: no" >&5
1535 echo "${ECHO_T}no" >&6
1536 fi
1537
1538   CC=$ac_ct_CC
1539 else
1540   CC="$ac_cv_prog_CC"
1541 fi
1542
1543 fi
1544 if test -z "$CC"; then
1545   # Extract the first word of "cc", so it can be a program name with args.
1546 set dummy cc; ac_word=$2
1547 echo "$as_me:1547: checking for $ac_word" >&5
1548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1549 if test "${ac_cv_prog_CC+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   if test -n "$CC"; then
1553   ac_cv_prog_CC="$CC" # Let the user override the test.
1554 else
1555   ac_prog_rejected=no
1556   ac_save_IFS=$IFS; IFS=$ac_path_separator
1557 ac_dummy="$PATH"
1558 for ac_dir in $ac_dummy; do
1559   IFS=$ac_save_IFS
1560   test -z "$ac_dir" && ac_dir=.
1561   $as_executable_p "$ac_dir/$ac_word" || continue
1562 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1563   ac_prog_rejected=yes
1564   continue
1565 fi
1566 ac_cv_prog_CC="cc"
1567 echo "$as_me:1567: found $ac_dir/$ac_word" >&5
1568 break
1569 done
1570
1571 if test $ac_prog_rejected = yes; then
1572   # We found a bogon in the path, so make sure we never use it.
1573   set dummy $ac_cv_prog_CC
1574   shift
1575   if test $# != 0; then
1576     # We chose a different compiler from the bogus one.
1577     # However, it has the same basename, so the bogon will be chosen
1578     # first if we set CC to just the basename; use the full file name.
1579     shift
1580     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1581     shift
1582     ac_cv_prog_CC="$@"
1583   fi
1584 fi
1585 fi
1586 fi
1587 CC=$ac_cv_prog_CC
1588 if test -n "$CC"; then
1589   echo "$as_me:1589: result: $CC" >&5
1590 echo "${ECHO_T}$CC" >&6
1591 else
1592   echo "$as_me:1592: result: no" >&5
1593 echo "${ECHO_T}no" >&6
1594 fi
1595
1596 fi
1597 if test -z "$CC"; then
1598   if test -n "$ac_tool_prefix"; then
1599   for ac_prog in cl
1600   do
1601     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1602 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1603 echo "$as_me:1603: checking for $ac_word" >&5
1604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1605 if test "${ac_cv_prog_CC+set}" = set; then
1606   echo $ECHO_N "(cached) $ECHO_C" >&6
1607 else
1608   if test -n "$CC"; then
1609   ac_cv_prog_CC="$CC" # Let the user override the test.
1610 else
1611   ac_save_IFS=$IFS; IFS=$ac_path_separator
1612 ac_dummy="$PATH"
1613 for ac_dir in $ac_dummy; do
1614   IFS=$ac_save_IFS
1615   test -z "$ac_dir" && ac_dir=.
1616   $as_executable_p "$ac_dir/$ac_word" || continue
1617 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1618 echo "$as_me:1618: found $ac_dir/$ac_word" >&5
1619 break
1620 done
1621
1622 fi
1623 fi
1624 CC=$ac_cv_prog_CC
1625 if test -n "$CC"; then
1626   echo "$as_me:1626: result: $CC" >&5
1627 echo "${ECHO_T}$CC" >&6
1628 else
1629   echo "$as_me:1629: result: no" >&5
1630 echo "${ECHO_T}no" >&6
1631 fi
1632
1633     test -n "$CC" && break
1634   done
1635 fi
1636 if test -z "$CC"; then
1637   ac_ct_CC=$CC
1638   for ac_prog in cl
1639 do
1640   # Extract the first word of "$ac_prog", so it can be a program name with args.
1641 set dummy $ac_prog; ac_word=$2
1642 echo "$as_me:1642: checking for $ac_word" >&5
1643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1644 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   if test -n "$ac_ct_CC"; then
1648   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1649 else
1650   ac_save_IFS=$IFS; IFS=$ac_path_separator
1651 ac_dummy="$PATH"
1652 for ac_dir in $ac_dummy; do
1653   IFS=$ac_save_IFS
1654   test -z "$ac_dir" && ac_dir=.
1655   $as_executable_p "$ac_dir/$ac_word" || continue
1656 ac_cv_prog_ac_ct_CC="$ac_prog"
1657 echo "$as_me:1657: found $ac_dir/$ac_word" >&5
1658 break
1659 done
1660
1661 fi
1662 fi
1663 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1664 if test -n "$ac_ct_CC"; then
1665   echo "$as_me:1665: result: $ac_ct_CC" >&5
1666 echo "${ECHO_T}$ac_ct_CC" >&6
1667 else
1668   echo "$as_me:1668: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672   test -n "$ac_ct_CC" && break
1673 done
1674
1675   CC=$ac_ct_CC
1676 fi
1677
1678 fi
1679
1680 test -z "$CC" && { { echo "$as_me:1680: error: no acceptable cc found in \$PATH" >&5
1681 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1682    { (exit 1); exit 1; }; }
1683
1684 # Provide some information about the compiler.
1685 echo "$as_me:1685:" \
1686      "checking for C compiler version" >&5
1687 ac_compiler=`set X $ac_compile; echo $2`
1688 { (eval echo "$as_me:1688: \"$ac_compiler --version </dev/null >&5\"") >&5
1689   (eval $ac_compiler --version </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -v </dev/null >&5\"") >&5
1694   (eval $ac_compiler -v </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698 { (eval echo "$as_me:1698: \"$ac_compiler -V </dev/null >&5\"") >&5
1699   (eval $ac_compiler -V </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703
1704 cat >conftest.$ac_ext <<_ACEOF
1705 #line 1705 "configure"
1706 #include "confdefs.h"
1707
1708 int
1709 main ()
1710 {
1711
1712   ;
1713   return 0;
1714 }
1715 _ACEOF
1716 ac_clean_files_save=$ac_clean_files
1717 ac_clean_files="$ac_clean_files a.out a.exe"
1718 # Try to create an executable without -o first, disregard a.out.
1719 # It will help us diagnose broken compilers, and finding out an intuition
1720 # of exeext.
1721 echo "$as_me:1721: checking for C compiler default output" >&5
1722 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1723 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724 if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
1725   (eval $ac_link_default) 2>&5
1726   ac_status=$?
1727   echo "$as_me:1727: \$? = $ac_status" >&5
1728   (exit $ac_status); }; then
1729   # Find the output, starting from the most likely.  This scheme is
1730 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731 # resort.
1732 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1733                 ls a.out conftest 2>/dev/null;
1734                 ls a.* conftest.* 2>/dev/null`; do
1735   case $ac_file in
1736     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1737     a.out ) # We found the default executable, but exeext='' is most
1738             # certainly right.
1739             break;;
1740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1742           export ac_cv_exeext
1743           break;;
1744     * ) break;;
1745   esac
1746 done
1747 else
1748   echo "$as_me: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 { { echo "$as_me:1750: error: C compiler cannot create executables" >&5
1751 echo "$as_me: error: C compiler cannot create executables" >&2;}
1752    { (exit 77); exit 77; }; }
1753 fi
1754
1755 ac_exeext=$ac_cv_exeext
1756 echo "$as_me:1756: result: $ac_file" >&5
1757 echo "${ECHO_T}$ac_file" >&6
1758
1759 # Check the compiler produces executables we can run.  If not, either
1760 # the compiler is broken, or we cross compile.
1761 echo "$as_me:1761: checking whether the C compiler works" >&5
1762 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1763 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764 # If not cross compiling, check that we can run a simple program.
1765 if test "$cross_compiling" != yes; then
1766   if { ac_try='./$ac_file'
1767   { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1768   (eval $ac_try) 2>&5
1769   ac_status=$?
1770   echo "$as_me:1770: \$? = $ac_status" >&5
1771   (exit $ac_status); }; }; then
1772     cross_compiling=no
1773   else
1774     if test "$cross_compiling" = maybe; then
1775         cross_compiling=yes
1776     else
1777         { { echo "$as_me:1777: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&5
1779 echo "$as_me: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&2;}
1781    { (exit 1); exit 1; }; }
1782     fi
1783   fi
1784 fi
1785 echo "$as_me:1785: result: yes" >&5
1786 echo "${ECHO_T}yes" >&6
1787
1788 rm -f a.out a.exe conftest$ac_cv_exeext
1789 ac_clean_files=$ac_clean_files_save
1790 # Check the compiler produces executables we can run.  If not, either
1791 # the compiler is broken, or we cross compile.
1792 echo "$as_me:1792: checking whether we are cross compiling" >&5
1793 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794 echo "$as_me:1794: result: $cross_compiling" >&5
1795 echo "${ECHO_T}$cross_compiling" >&6
1796
1797 echo "$as_me:1797: checking for executable suffix" >&5
1798 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1799 if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
1800   (eval $ac_link) 2>&5
1801   ac_status=$?
1802   echo "$as_me:1802: \$? = $ac_status" >&5
1803   (exit $ac_status); }; then
1804   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1806 # work properly (i.e., refer to `conftest.exe'), while it won't with
1807 # `rm'.
1808 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1809   case $ac_file in
1810     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812           export ac_cv_exeext
1813           break;;
1814     * ) break;;
1815   esac
1816 done
1817 else
1818   { { echo "$as_me:1818: error: cannot compute EXEEXT: cannot compile and link" >&5
1819 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1820    { (exit 1); exit 1; }; }
1821 fi
1822
1823 rm -f conftest$ac_cv_exeext
1824 echo "$as_me:1824: result: $ac_cv_exeext" >&5
1825 echo "${ECHO_T}$ac_cv_exeext" >&6
1826
1827 rm -f conftest.$ac_ext
1828 EXEEXT=$ac_cv_exeext
1829 ac_exeext=$EXEEXT
1830 echo "$as_me:1830: checking for object suffix" >&5
1831 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1832 if test "${ac_cv_objext+set}" = set; then
1833   echo $ECHO_N "(cached) $ECHO_C" >&6
1834 else
1835   cat >conftest.$ac_ext <<_ACEOF
1836 #line 1836 "configure"
1837 #include "confdefs.h"
1838
1839 int
1840 main ()
1841 {
1842
1843   ;
1844   return 0;
1845 }
1846 _ACEOF
1847 rm -f conftest.o conftest.obj
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849   (eval $ac_compile) 2>&5
1850   ac_status=$?
1851   echo "$as_me:1851: \$? = $ac_status" >&5
1852   (exit $ac_status); }; then
1853   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1854   case $ac_file in
1855     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1856     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1857        break;;
1858   esac
1859 done
1860 else
1861   echo "$as_me: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 { { echo "$as_me:1863: error: cannot compute OBJEXT: cannot compile" >&5
1864 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1869 fi
1870 echo "$as_me:1870: result: $ac_cv_objext" >&5
1871 echo "${ECHO_T}$ac_cv_objext" >&6
1872 OBJEXT=$ac_cv_objext
1873 ac_objext=$OBJEXT
1874 echo "$as_me:1874: checking whether we are using the GNU C compiler" >&5
1875 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1876 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main ()
1885 {
1886 #ifndef __GNUC__
1887        choke me
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   ac_compiler_gnu=yes
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 ac_compiler_gnu=no
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1914
1915 fi
1916 echo "$as_me:1916: result: $ac_cv_c_compiler_gnu" >&5
1917 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1918 GCC=`test $ac_compiler_gnu = yes && echo yes`
1919 ac_test_CFLAGS=${CFLAGS+set}
1920 ac_save_CFLAGS=$CFLAGS
1921 CFLAGS="-g"
1922 echo "$as_me:1922: checking whether $CC accepts -g" >&5
1923 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1924 if test "${ac_cv_prog_cc_g+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   cat >conftest.$ac_ext <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main ()
1933 {
1934
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941   (eval $ac_compile) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit $ac_status); } &&
1945          { ac_try='test -s conftest.$ac_objext'
1946   { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1947   (eval $ac_try) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); }; }; then
1951   ac_cv_prog_cc_g=yes
1952 else
1953   echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 ac_cv_prog_cc_g=no
1956 fi
1957 rm -f conftest.$ac_objext conftest.$ac_ext
1958 fi
1959 echo "$as_me:1959: result: $ac_cv_prog_cc_g" >&5
1960 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1961 if test "$ac_test_CFLAGS" = set; then
1962   CFLAGS=$ac_save_CFLAGS
1963 elif test $ac_cv_prog_cc_g = yes; then
1964   if test "$GCC" = yes; then
1965     CFLAGS="-g -O2"
1966   else
1967     CFLAGS="-g"
1968   fi
1969 else
1970   if test "$GCC" = yes; then
1971     CFLAGS="-O2"
1972   else
1973     CFLAGS=
1974   fi
1975 fi
1976 # Some people use a C++ compiler to compile C.  Since we use `exit',
1977 # in C++ we need to declare it.  In case someone uses the same compiler
1978 # for both compiling C and C++ we need to have the C++ compiler decide
1979 # the declaration of exit, since it's the most demanding environment.
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #ifndef __cplusplus
1982   choke me
1983 #endif
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   for ac_declaration in \
1998    ''\
1999    '#include <stdlib.h>' \
2000    'extern "C" void std::exit (int) throw (); using std::exit;' \
2001    'extern "C" void std::exit (int); using std::exit;' \
2002    'extern "C" void exit (int) throw ();' \
2003    'extern "C" void exit (int);' \
2004    'void exit (int);'
2005 do
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line 2007 "configure"
2008 #include "confdefs.h"
2009 #include <stdlib.h>
2010 $ac_declaration
2011 int
2012 main ()
2013 {
2014 exit (42);
2015   ;
2016   return 0;
2017 }
2018 _ACEOF
2019 rm -f conftest.$ac_objext
2020 if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021   (eval $ac_compile) 2>&5
2022   ac_status=$?
2023   echo "$as_me:2023: \$? = $ac_status" >&5
2024   (exit $ac_status); } &&
2025          { ac_try='test -s conftest.$ac_objext'
2026   { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027   (eval $ac_try) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); }; }; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 continue
2036 fi
2037 rm -f conftest.$ac_objext conftest.$ac_ext
2038   cat >conftest.$ac_ext <<_ACEOF
2039 #line 2039 "configure"
2040 #include "confdefs.h"
2041 $ac_declaration
2042 int
2043 main ()
2044 {
2045 exit (42);
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 rm -f conftest.$ac_objext
2051 if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
2052   (eval $ac_compile) 2>&5
2053   ac_status=$?
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } &&
2056          { ac_try='test -s conftest.$ac_objext'
2057   { (eval echo "$as_me:2057: \"$ac_try\"") >&5
2058   (eval $ac_try) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); }; }; then
2062   break
2063 else
2064   echo "$as_me: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068 done
2069 rm -f conftest*
2070 if test -n "$ac_declaration"; then
2071   echo '#ifdef __cplusplus' >>confdefs.h
2072   echo $ac_declaration      >>confdefs.h
2073   echo '#endif'             >>confdefs.h
2074 fi
2075
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 GCC_VERSION=none
2089 if test "$GCC" = yes ; then
2090         echo "$as_me:2090: checking version of $CC" >&5
2091 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2092         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2093         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2094         echo "$as_me:2094: result: $GCC_VERSION" >&5
2095 echo "${ECHO_T}$GCC_VERSION" >&6
2096 fi
2097
2098 ac_ext=c
2099 ac_cpp='$CPP $CPPFLAGS'
2100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2102 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2103 ac_main_return=return
2104 echo "$as_me:2104: checking how to run the C preprocessor" >&5
2105 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2106 # On Suns, sometimes $CPP names a directory.
2107 if test -n "$CPP" && test -d "$CPP"; then
2108   CPP=
2109 fi
2110 if test -z "$CPP"; then
2111   if test "${ac_cv_prog_CPP+set}" = set; then
2112   echo $ECHO_N "(cached) $ECHO_C" >&6
2113 else
2114       # Double quotes because CPP needs to be expanded
2115     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2116     do
2117       ac_preproc_ok=false
2118 for ac_c_preproc_warn_flag in '' yes
2119 do
2120   # Use a header file that comes with gcc, so configuring glibc
2121   # with a fresh cross-compiler works.
2122   # On the NeXT, cc -E runs the code through the compiler's parser,
2123   # not just through cpp. "Syntax error" is here to catch this case.
2124   cat >conftest.$ac_ext <<_ACEOF
2125 #line 2125 "configure"
2126 #include "confdefs.h"
2127 #include <assert.h>
2128                      Syntax error
2129 _ACEOF
2130 if { (eval echo "$as_me:2130: \"$ac_cpp conftest.$ac_ext\"") >&5
2131   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2132   ac_status=$?
2133   egrep -v '^ *\+' conftest.er1 >conftest.err
2134   rm -f conftest.er1
2135   cat conftest.err >&5
2136   echo "$as_me:2136: \$? = $ac_status" >&5
2137   (exit $ac_status); } >/dev/null; then
2138   if test -s conftest.err; then
2139     ac_cpp_err=$ac_c_preproc_warn_flag
2140   else
2141     ac_cpp_err=
2142   fi
2143 else
2144   ac_cpp_err=yes
2145 fi
2146 if test -z "$ac_cpp_err"; then
2147   :
2148 else
2149   echo "$as_me: failed program was:" >&5
2150   cat conftest.$ac_ext >&5
2151   # Broken: fails on valid input.
2152 continue
2153 fi
2154 rm -f conftest.err conftest.$ac_ext
2155
2156   # OK, works on sane cases.  Now check whether non-existent headers
2157   # can be detected and how.
2158   cat >conftest.$ac_ext <<_ACEOF
2159 #line 2159 "configure"
2160 #include "confdefs.h"
2161 #include <ac_nonexistent.h>
2162 _ACEOF
2163 if { (eval echo "$as_me:2163: \"$ac_cpp conftest.$ac_ext\"") >&5
2164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2165   ac_status=$?
2166   egrep -v '^ *\+' conftest.er1 >conftest.err
2167   rm -f conftest.er1
2168   cat conftest.err >&5
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit $ac_status); } >/dev/null; then
2171   if test -s conftest.err; then
2172     ac_cpp_err=$ac_c_preproc_warn_flag
2173   else
2174     ac_cpp_err=
2175   fi
2176 else
2177   ac_cpp_err=yes
2178 fi
2179 if test -z "$ac_cpp_err"; then
2180   # Broken: success on invalid input.
2181 continue
2182 else
2183   echo "$as_me: failed program was:" >&5
2184   cat conftest.$ac_ext >&5
2185   # Passes both tests.
2186 ac_preproc_ok=:
2187 break
2188 fi
2189 rm -f conftest.err conftest.$ac_ext
2190
2191 done
2192 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2193 rm -f conftest.err conftest.$ac_ext
2194 if $ac_preproc_ok; then
2195   break
2196 fi
2197
2198     done
2199     ac_cv_prog_CPP=$CPP
2200
2201 fi
2202   CPP=$ac_cv_prog_CPP
2203 else
2204   ac_cv_prog_CPP=$CPP
2205 fi
2206 echo "$as_me:2206: result: $CPP" >&5
2207 echo "${ECHO_T}$CPP" >&6
2208 ac_preproc_ok=false
2209 for ac_c_preproc_warn_flag in '' yes
2210 do
2211   # Use a header file that comes with gcc, so configuring glibc
2212   # with a fresh cross-compiler works.
2213   # On the NeXT, cc -E runs the code through the compiler's parser,
2214   # not just through cpp. "Syntax error" is here to catch this case.
2215   cat >conftest.$ac_ext <<_ACEOF
2216 #line 2216 "configure"
2217 #include "confdefs.h"
2218 #include <assert.h>
2219                      Syntax error
2220 _ACEOF
2221 if { (eval echo "$as_me:2221: \"$ac_cpp conftest.$ac_ext\"") >&5
2222   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2223   ac_status=$?
2224   egrep -v '^ *\+' conftest.er1 >conftest.err
2225   rm -f conftest.er1
2226   cat conftest.err >&5
2227   echo "$as_me:2227: \$? = $ac_status" >&5
2228   (exit $ac_status); } >/dev/null; then
2229   if test -s conftest.err; then
2230     ac_cpp_err=$ac_c_preproc_warn_flag
2231   else
2232     ac_cpp_err=
2233   fi
2234 else
2235   ac_cpp_err=yes
2236 fi
2237 if test -z "$ac_cpp_err"; then
2238   :
2239 else
2240   echo "$as_me: failed program was:" >&5
2241   cat conftest.$ac_ext >&5
2242   # Broken: fails on valid input.
2243 continue
2244 fi
2245 rm -f conftest.err conftest.$ac_ext
2246
2247   # OK, works on sane cases.  Now check whether non-existent headers
2248   # can be detected and how.
2249   cat >conftest.$ac_ext <<_ACEOF
2250 #line 2250 "configure"
2251 #include "confdefs.h"
2252 #include <ac_nonexistent.h>
2253 _ACEOF
2254 if { (eval echo "$as_me:2254: \"$ac_cpp conftest.$ac_ext\"") >&5
2255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2256   ac_status=$?
2257   egrep -v '^ *\+' conftest.er1 >conftest.err
2258   rm -f conftest.er1
2259   cat conftest.err >&5
2260   echo "$as_me:2260: \$? = $ac_status" >&5
2261   (exit $ac_status); } >/dev/null; then
2262   if test -s conftest.err; then
2263     ac_cpp_err=$ac_c_preproc_warn_flag
2264   else
2265     ac_cpp_err=
2266   fi
2267 else
2268   ac_cpp_err=yes
2269 fi
2270 if test -z "$ac_cpp_err"; then
2271   # Broken: success on invalid input.
2272 continue
2273 else
2274   echo "$as_me: failed program was:" >&5
2275   cat conftest.$ac_ext >&5
2276   # Passes both tests.
2277 ac_preproc_ok=:
2278 break
2279 fi
2280 rm -f conftest.err conftest.$ac_ext
2281
2282 done
2283 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2284 rm -f conftest.err conftest.$ac_ext
2285 if $ac_preproc_ok; then
2286   :
2287 else
2288   { { echo "$as_me:2288: error: C preprocessor \"$CPP\" fails sanity check" >&5
2289 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2290    { (exit 1); exit 1; }; }
2291 fi
2292
2293 ac_ext=c
2294 ac_cpp='$CPP $CPPFLAGS'
2295 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2296 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2297 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2298 ac_main_return=return
2299
2300 if test $ac_cv_c_compiler_gnu = yes; then
2301     echo "$as_me:2301: checking whether $CC needs -traditional" >&5
2302 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2303 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2304   echo $ECHO_N "(cached) $ECHO_C" >&6
2305 else
2306     ac_pattern="Autoconf.*'x'"
2307   cat >conftest.$ac_ext <<_ACEOF
2308 #line 2308 "configure"
2309 #include "confdefs.h"
2310 #include <sgtty.h>
2311 int Autoconf = TIOCGETP;
2312 _ACEOF
2313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2314   egrep "$ac_pattern" >/dev/null 2>&1; then
2315   ac_cv_prog_gcc_traditional=yes
2316 else
2317   ac_cv_prog_gcc_traditional=no
2318 fi
2319 rm -f conftest*
2320
2321   if test $ac_cv_prog_gcc_traditional = no; then
2322     cat >conftest.$ac_ext <<_ACEOF
2323 #line 2323 "configure"
2324 #include "confdefs.h"
2325 #include <termio.h>
2326 int Autoconf = TCGETA;
2327 _ACEOF
2328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2329   egrep "$ac_pattern" >/dev/null 2>&1; then
2330   ac_cv_prog_gcc_traditional=yes
2331 fi
2332 rm -f conftest*
2333
2334   fi
2335 fi
2336 echo "$as_me:2336: result: $ac_cv_prog_gcc_traditional" >&5
2337 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2338   if test $ac_cv_prog_gcc_traditional = yes; then
2339     CC="$CC -traditional"
2340   fi
2341 fi
2342
2343 echo "$as_me:2343: checking whether $CC understands -c and -o together" >&5
2344 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2345 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2346   echo $ECHO_N "(cached) $ECHO_C" >&6
2347 else
2348
2349 cat > conftest.$ac_ext <<CF_EOF
2350 #include <stdio.h>
2351 int main()
2352 {
2353         ${cf_cv_main_return:-return}(0);
2354 }
2355 CF_EOF
2356 # We do the test twice because some compilers refuse to overwrite an
2357 # existing .o file with -o, though they will create one.
2358 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2359 if { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit $ac_status); } &&
2364   test -f conftest2.$ac_objext && { (eval echo "$as_me:2364: \"$ac_try\"") >&5
2365   (eval $ac_try) 2>&5
2366   ac_status=$?
2367   echo "$as_me:2367: \$? = $ac_status" >&5
2368   (exit $ac_status); };
2369 then
2370   eval cf_cv_prog_CC_c_o=yes
2371 else
2372   eval cf_cv_prog_CC_c_o=no
2373 fi
2374 rm -f conftest*
2375
2376 fi
2377 if test $cf_cv_prog_CC_c_o = yes; then
2378   echo "$as_me:2378: result: yes" >&5
2379 echo "${ECHO_T}yes" >&6
2380 else
2381   echo "$as_me:2381: result: no" >&5
2382 echo "${ECHO_T}no" >&6
2383 fi
2384
2385 echo "$as_me:2385: checking for POSIXized ISC" >&5
2386 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2387 if test -d /etc/conf/kconfig.d &&
2388    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2389 then
2390   echo "$as_me:2390: result: yes" >&5
2391 echo "${ECHO_T}yes" >&6
2392   ISC=yes # If later tests want to check for ISC.
2393
2394 cat >>confdefs.h <<\EOF
2395 #define _POSIX_SOURCE 1
2396 EOF
2397
2398   if test "$GCC" = yes; then
2399     CC="$CC -posix"
2400   else
2401     CC="$CC -Xp"
2402   fi
2403 else
2404   echo "$as_me:2404: result: no" >&5
2405 echo "${ECHO_T}no" >&6
2406   ISC=
2407 fi
2408
2409 echo "$as_me:2409: checking for ${CC-cc} option to accept ANSI C" >&5
2410 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2411 if test "${cf_cv_ansi_cc+set}" = set; then
2412   echo $ECHO_N "(cached) $ECHO_C" >&6
2413 else
2414
2415 cf_cv_ansi_cc=no
2416 cf_save_CFLAGS="$CFLAGS"
2417 cf_save_CPPFLAGS="$CPPFLAGS"
2418 # Don't try gcc -ansi; that turns off useful extensions and
2419 # breaks some systems' header files.
2420 # AIX                   -qlanglvl=ansi
2421 # Ultrix and OSF/1      -std1
2422 # HP-UX                 -Aa -D_HPUX_SOURCE
2423 # SVR4                  -Xc
2424 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2425 for cf_arg in "-DCC_HAS_PROTOS" \
2426         "" \
2427         -qlanglvl=ansi \
2428         -std1 \
2429         -Ae \
2430         "-Aa -D_HPUX_SOURCE" \
2431         -Xc
2432 do
2433
2434 cf_fix_cppflags=no
2435 cf_new_cflags=
2436 cf_new_cppflags=
2437 cf_new_extra_cppflags=
2438
2439 for cf_add_cflags in $cf_arg
2440 do
2441 case $cf_fix_cppflags in
2442 no)
2443         case $cf_add_cflags in #(vi
2444         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2445                 case $cf_add_cflags in
2446                 -D*)
2447                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2448
2449                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2450                         && test -z "${cf_tst_cflags}" \
2451                         && cf_fix_cppflags=yes
2452
2453                         if test $cf_fix_cppflags = yes ; then
2454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2455                                 continue
2456                         elif test "${cf_tst_cflags}" = "\"'" ; then
2457                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2458                                 continue
2459                         fi
2460                         ;;
2461                 esac
2462                 case "$CPPFLAGS" in
2463                 *$cf_add_cflags) #(vi
2464                         ;;
2465                 *) #(vi
2466                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2467                         ;;
2468                 esac
2469                 ;;
2470         *)
2471                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2472                 ;;
2473         esac
2474         ;;
2475 yes)
2476         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2477
2478         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2479
2480         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2481         && test -z "${cf_tst_cflags}" \
2482         && cf_fix_cppflags=no
2483         ;;
2484 esac
2485 done
2486
2487 if test -n "$cf_new_cflags" ; then
2488
2489         CFLAGS="$CFLAGS $cf_new_cflags"
2490 fi
2491
2492 if test -n "$cf_new_cppflags" ; then
2493
2494         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2495 fi
2496
2497 if test -n "$cf_new_extra_cppflags" ; then
2498
2499         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2500 fi
2501
2502         cat >conftest.$ac_ext <<_ACEOF
2503 #line 2503 "configure"
2504 #include "confdefs.h"
2505
2506 #ifndef CC_HAS_PROTOS
2507 #if !defined(__STDC__) || (__STDC__ != 1)
2508 choke me
2509 #endif
2510 #endif
2511
2512 int
2513 main ()
2514 {
2515
2516         int test (int i, double x);
2517         struct s1 {int (*f) (int a);};
2518         struct s2 {int (*f) (double a);};
2519   ;
2520   return 0;
2521 }
2522 _ACEOF
2523 rm -f conftest.$ac_objext
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525   (eval $ac_compile) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit $ac_status); } &&
2529          { ac_try='test -s conftest.$ac_objext'
2530   { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531   (eval $ac_try) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit $ac_status); }; }; then
2535   cf_cv_ansi_cc="$cf_arg"; break
2536 else
2537   echo "$as_me: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 fi
2540 rm -f conftest.$ac_objext conftest.$ac_ext
2541 done
2542 CFLAGS="$cf_save_CFLAGS"
2543 CPPFLAGS="$cf_save_CPPFLAGS"
2544
2545 fi
2546 echo "$as_me:2546: result: $cf_cv_ansi_cc" >&5
2547 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2548
2549 if test "$cf_cv_ansi_cc" != "no"; then
2550 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2551
2552 cf_fix_cppflags=no
2553 cf_new_cflags=
2554 cf_new_cppflags=
2555 cf_new_extra_cppflags=
2556
2557 for cf_add_cflags in $cf_cv_ansi_cc
2558 do
2559 case $cf_fix_cppflags in
2560 no)
2561         case $cf_add_cflags in #(vi
2562         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2563                 case $cf_add_cflags in
2564                 -D*)
2565                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2566
2567                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2568                         && test -z "${cf_tst_cflags}" \
2569                         && cf_fix_cppflags=yes
2570
2571                         if test $cf_fix_cppflags = yes ; then
2572                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2573                                 continue
2574                         elif test "${cf_tst_cflags}" = "\"'" ; then
2575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2576                                 continue
2577                         fi
2578                         ;;
2579                 esac
2580                 case "$CPPFLAGS" in
2581                 *$cf_add_cflags) #(vi
2582                         ;;
2583                 *) #(vi
2584                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2585                         ;;
2586                 esac
2587                 ;;
2588         *)
2589                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2590                 ;;
2591         esac
2592         ;;
2593 yes)
2594         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2595
2596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2597
2598         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2599         && test -z "${cf_tst_cflags}" \
2600         && cf_fix_cppflags=no
2601         ;;
2602 esac
2603 done
2604
2605 if test -n "$cf_new_cflags" ; then
2606
2607         CFLAGS="$CFLAGS $cf_new_cflags"
2608 fi
2609
2610 if test -n "$cf_new_cppflags" ; then
2611
2612         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2613 fi
2614
2615 if test -n "$cf_new_extra_cppflags" ; then
2616
2617         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2618 fi
2619
2620 else
2621         cat >>confdefs.h <<\EOF
2622 #define CC_HAS_PROTOS 1
2623 EOF
2624
2625 fi
2626 fi
2627
2628 if test "$cf_cv_ansi_cc" = "no"; then
2629         { { echo "$as_me:2629: error: Your compiler does not appear to recognize prototypes.
2630 You have the following choices:
2631         a. adjust your compiler options
2632         b. get an up-to-date compiler
2633         c. use a wrapper such as unproto" >&5
2634 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2635 You have the following choices:
2636         a. adjust your compiler options
2637         b. get an up-to-date compiler
2638         c. use a wrapper such as unproto" >&2;}
2639    { (exit 1); exit 1; }; }
2640 fi
2641
2642 case $cf_cv_system_name in
2643 os2*)
2644     CFLAGS="$CFLAGS -Zmt"
2645     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2646     CXXFLAGS="$CXXFLAGS -Zmt"
2647     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2648     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2649     ac_cv_exeext=.exe
2650     ;;
2651 esac
2652
2653 PROG_EXT="$EXEEXT"
2654
2655 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2656 #define PROG_EXT "$PROG_EXT"
2657 EOF
2658
2659 if test "$cross_compiling" = yes ; then
2660   LDCONFIG=:
2661 else
2662 case "$cf_cv_system_name" in #(vi
2663 freebsd*) #(vi
2664   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2665   ;;
2666 *) LDPATH=$PATH:/sbin:/usr/sbin
2667   # Extract the first word of "ldconfig", so it can be a program name with args.
2668 set dummy ldconfig; ac_word=$2
2669 echo "$as_me:2669: checking for $ac_word" >&5
2670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2671 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2672   echo $ECHO_N "(cached) $ECHO_C" >&6
2673 else
2674   case $LDCONFIG in
2675   [\\/]* | ?:[\\/]*)
2676   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2677   ;;
2678   *)
2679   ac_save_IFS=$IFS; IFS=$ac_path_separator
2680 ac_dummy="$LDPATH"
2681 for ac_dir in $ac_dummy; do
2682   IFS=$ac_save_IFS
2683   test -z "$ac_dir" && ac_dir=.
2684   if $as_executable_p "$ac_dir/$ac_word"; then
2685    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2686    echo "$as_me:2686: found $ac_dir/$ac_word" >&5
2687    break
2688 fi
2689 done
2690
2691   ;;
2692 esac
2693 fi
2694 LDCONFIG=$ac_cv_path_LDCONFIG
2695
2696 if test -n "$LDCONFIG"; then
2697   echo "$as_me:2697: result: $LDCONFIG" >&5
2698 echo "${ECHO_T}$LDCONFIG" >&6
2699 else
2700   echo "$as_me:2700: result: no" >&5
2701 echo "${ECHO_T}no" >&6
2702 fi
2703
2704   ;;
2705 esac
2706 fi
2707
2708 echo "$as_me:2708: checking if you want to ensure bool is consistent with C++" >&5
2709 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2710
2711 # Check whether --with-cxx or --without-cxx was given.
2712 if test "${with_cxx+set}" = set; then
2713   withval="$with_cxx"
2714   cf_with_cxx=$withval
2715 else
2716   cf_with_cxx=yes
2717 fi;
2718 echo "$as_me:2718: result: $cf_with_cxx" >&5
2719 echo "${ECHO_T}$cf_with_cxx" >&6
2720 if test "X$cf_with_cxx" = Xno ; then
2721         CXX=""
2722         GXX=""
2723 else
2724         # with autoconf 2.13, we can change the error to a warning:
2725                 ac_ext=cc
2726 ac_cpp='$CXXCPP $CPPFLAGS'
2727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2730 ac_main_return=return
2731 if test -n "$ac_tool_prefix"; then
2732   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2733   do
2734     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2735 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2736 echo "$as_me:2736: checking for $ac_word" >&5
2737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738 if test "${ac_cv_prog_CXX+set}" = set; then
2739   echo $ECHO_N "(cached) $ECHO_C" >&6
2740 else
2741   if test -n "$CXX"; then
2742   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2743 else
2744   ac_save_IFS=$IFS; IFS=$ac_path_separator
2745 ac_dummy="$PATH"
2746 for ac_dir in $ac_dummy; do
2747   IFS=$ac_save_IFS
2748   test -z "$ac_dir" && ac_dir=.
2749   $as_executable_p "$ac_dir/$ac_word" || continue
2750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2751 echo "$as_me:2751: found $ac_dir/$ac_word" >&5
2752 break
2753 done
2754
2755 fi
2756 fi
2757 CXX=$ac_cv_prog_CXX
2758 if test -n "$CXX"; then
2759   echo "$as_me:2759: result: $CXX" >&5
2760 echo "${ECHO_T}$CXX" >&6
2761 else
2762   echo "$as_me:2762: result: no" >&5
2763 echo "${ECHO_T}no" >&6
2764 fi
2765
2766     test -n "$CXX" && break
2767   done
2768 fi
2769 if test -z "$CXX"; then
2770   ac_ct_CXX=$CXX
2771   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2772 do
2773   # Extract the first word of "$ac_prog", so it can be a program name with args.
2774 set dummy $ac_prog; ac_word=$2
2775 echo "$as_me:2775: checking for $ac_word" >&5
2776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2777 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2778   echo $ECHO_N "(cached) $ECHO_C" >&6
2779 else
2780   if test -n "$ac_ct_CXX"; then
2781   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2782 else
2783   ac_save_IFS=$IFS; IFS=$ac_path_separator
2784 ac_dummy="$PATH"
2785 for ac_dir in $ac_dummy; do
2786   IFS=$ac_save_IFS
2787   test -z "$ac_dir" && ac_dir=.
2788   $as_executable_p "$ac_dir/$ac_word" || continue
2789 ac_cv_prog_ac_ct_CXX="$ac_prog"
2790 echo "$as_me:2790: found $ac_dir/$ac_word" >&5
2791 break
2792 done
2793
2794 fi
2795 fi
2796 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2797 if test -n "$ac_ct_CXX"; then
2798   echo "$as_me:2798: result: $ac_ct_CXX" >&5
2799 echo "${ECHO_T}$ac_ct_CXX" >&6
2800 else
2801   echo "$as_me:2801: result: no" >&5
2802 echo "${ECHO_T}no" >&6
2803 fi
2804
2805   test -n "$ac_ct_CXX" && break
2806 done
2807 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2808
2809   CXX=$ac_ct_CXX
2810 fi
2811
2812 # Provide some information about the compiler.
2813 echo "$as_me:2813:" \
2814      "checking for C++ compiler version" >&5
2815 ac_compiler=`set X $ac_compile; echo $2`
2816 { (eval echo "$as_me:2816: \"$ac_compiler --version </dev/null >&5\"") >&5
2817   (eval $ac_compiler --version </dev/null >&5) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }
2821 { (eval echo "$as_me:2821: \"$ac_compiler -v </dev/null >&5\"") >&5
2822   (eval $ac_compiler -v </dev/null >&5) 2>&5
2823   ac_status=$?
2824   echo "$as_me:2824: \$? = $ac_status" >&5
2825   (exit $ac_status); }
2826 { (eval echo "$as_me:2826: \"$ac_compiler -V </dev/null >&5\"") >&5
2827   (eval $ac_compiler -V </dev/null >&5) 2>&5
2828   ac_status=$?
2829   echo "$as_me:2829: \$? = $ac_status" >&5
2830   (exit $ac_status); }
2831
2832 echo "$as_me:2832: checking whether we are using the GNU C++ compiler" >&5
2833 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2834 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2835   echo $ECHO_N "(cached) $ECHO_C" >&6
2836 else
2837   cat >conftest.$ac_ext <<_ACEOF
2838 #line 2838 "configure"
2839 #include "confdefs.h"
2840
2841 int
2842 main ()
2843 {
2844 #ifndef __GNUC__
2845        choke me
2846 #endif
2847
2848   ;
2849   return 0;
2850 }
2851 _ACEOF
2852 rm -f conftest.$ac_objext
2853 if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5
2854   (eval $ac_compile) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -s conftest.$ac_objext'
2859   { (eval echo "$as_me:2859: \"$ac_try\"") >&5
2860   (eval $ac_try) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit $ac_status); }; }; then
2864   ac_compiler_gnu=yes
2865 else
2866   echo "$as_me: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 ac_compiler_gnu=no
2869 fi
2870 rm -f conftest.$ac_objext conftest.$ac_ext
2871 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2872
2873 fi
2874 echo "$as_me:2874: result: $ac_cv_cxx_compiler_gnu" >&5
2875 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2876 GXX=`test $ac_compiler_gnu = yes && echo yes`
2877 ac_test_CXXFLAGS=${CXXFLAGS+set}
2878 ac_save_CXXFLAGS=$CXXFLAGS
2879 CXXFLAGS="-g"
2880 echo "$as_me:2880: checking whether $CXX accepts -g" >&5
2881 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2882 if test "${ac_cv_prog_cxx_g+set}" = set; then
2883   echo $ECHO_N "(cached) $ECHO_C" >&6
2884 else
2885   cat >conftest.$ac_ext <<_ACEOF
2886 #line 2886 "configure"
2887 #include "confdefs.h"
2888
2889 int
2890 main ()
2891 {
2892
2893   ;
2894   return 0;
2895 }
2896 _ACEOF
2897 rm -f conftest.$ac_objext
2898 if { (eval echo "$as_me:2898: \"$ac_compile\"") >&5
2899   (eval $ac_compile) 2>&5
2900   ac_status=$?
2901   echo "$as_me:2901: \$? = $ac_status" >&5
2902   (exit $ac_status); } &&
2903          { ac_try='test -s conftest.$ac_objext'
2904   { (eval echo "$as_me:2904: \"$ac_try\"") >&5
2905   (eval $ac_try) 2>&5
2906   ac_status=$?
2907   echo "$as_me:2907: \$? = $ac_status" >&5
2908   (exit $ac_status); }; }; then
2909   ac_cv_prog_cxx_g=yes
2910 else
2911   echo "$as_me: failed program was:" >&5
2912 cat conftest.$ac_ext >&5
2913 ac_cv_prog_cxx_g=no
2914 fi
2915 rm -f conftest.$ac_objext conftest.$ac_ext
2916 fi
2917 echo "$as_me:2917: result: $ac_cv_prog_cxx_g" >&5
2918 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2919 if test "$ac_test_CXXFLAGS" = set; then
2920   CXXFLAGS=$ac_save_CXXFLAGS
2921 elif test $ac_cv_prog_cxx_g = yes; then
2922   if test "$GXX" = yes; then
2923     CXXFLAGS="-g -O2"
2924   else
2925     CXXFLAGS="-g"
2926   fi
2927 else
2928   if test "$GXX" = yes; then
2929     CXXFLAGS="-O2"
2930   else
2931     CXXFLAGS=
2932   fi
2933 fi
2934 for ac_declaration in \
2935    ''\
2936    '#include <stdlib.h>' \
2937    'extern "C" void std::exit (int) throw (); using std::exit;' \
2938    'extern "C" void std::exit (int); using std::exit;' \
2939    'extern "C" void exit (int) throw ();' \
2940    'extern "C" void exit (int);' \
2941    'void exit (int);'
2942 do
2943   cat >conftest.$ac_ext <<_ACEOF
2944 #line 2944 "configure"
2945 #include "confdefs.h"
2946 #include <stdlib.h>
2947 $ac_declaration
2948 int
2949 main ()
2950 {
2951 exit (42);
2952   ;
2953   return 0;
2954 }
2955 _ACEOF
2956 rm -f conftest.$ac_objext
2957 if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5
2958   (eval $ac_compile) 2>&5
2959   ac_status=$?
2960   echo "$as_me:2960: \$? = $ac_status" >&5
2961   (exit $ac_status); } &&
2962          { ac_try='test -s conftest.$ac_objext'
2963   { (eval echo "$as_me:2963: \"$ac_try\"") >&5
2964   (eval $ac_try) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); }; }; then
2968   :
2969 else
2970   echo "$as_me: failed program was:" >&5
2971 cat conftest.$ac_ext >&5
2972 continue
2973 fi
2974 rm -f conftest.$ac_objext conftest.$ac_ext
2975   cat >conftest.$ac_ext <<_ACEOF
2976 #line 2976 "configure"
2977 #include "confdefs.h"
2978 $ac_declaration
2979 int
2980 main ()
2981 {
2982 exit (42);
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   break
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 fi
3004 rm -f conftest.$ac_objext conftest.$ac_ext
3005 done
3006 rm -f conftest*
3007 if test -n "$ac_declaration"; then
3008   echo '#ifdef __cplusplus' >>confdefs.h
3009   echo $ac_declaration      >>confdefs.h
3010   echo '#endif'             >>confdefs.h
3011 fi
3012
3013 ac_ext=c
3014 ac_cpp='$CPP $CPPFLAGS'
3015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3018 ac_main_return=return
3019
3020                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3021         if test "$CXX" = "g++" ; then
3022                 # Extract the first word of "g++", so it can be a program name with args.
3023 set dummy g++; ac_word=$2
3024 echo "$as_me:3024: checking for $ac_word" >&5
3025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3026 if test "${ac_cv_path_CXX+set}" = set; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029   case $CXX in
3030   [\\/]* | ?:[\\/]*)
3031   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3032   ;;
3033   *)
3034   ac_save_IFS=$IFS; IFS=$ac_path_separator
3035 ac_dummy="$PATH"
3036 for ac_dir in $ac_dummy; do
3037   IFS=$ac_save_IFS
3038   test -z "$ac_dir" && ac_dir=.
3039   if $as_executable_p "$ac_dir/$ac_word"; then
3040    ac_cv_path_CXX="$ac_dir/$ac_word"
3041    echo "$as_me:3041: found $ac_dir/$ac_word" >&5
3042    break
3043 fi
3044 done
3045
3046   ;;
3047 esac
3048 fi
3049 CXX=$ac_cv_path_CXX
3050
3051 if test -n "$CXX"; then
3052   echo "$as_me:3052: result: $CXX" >&5
3053 echo "${ECHO_T}$CXX" >&6
3054 else
3055   echo "$as_me:3055: result: no" >&5
3056 echo "${ECHO_T}no" >&6
3057 fi
3058
3059         fi
3060         if test "$CXX" = "g++" ; then
3061                 { echo "$as_me:3061: WARNING: ignoring hardcoded g++" >&5
3062 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3063                 cf_with_cxx=no; CXX=""; GXX="";
3064         fi
3065 fi
3066
3067 GXX_VERSION=none
3068 if test "$GXX" = yes; then
3069         echo "$as_me:3069: checking version of g++" >&5
3070 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3071         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3072         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3073         echo "$as_me:3073: result: $GXX_VERSION" >&5
3074 echo "${ECHO_T}$GXX_VERSION" >&6
3075 fi
3076
3077 case $GXX_VERSION in
3078 1*|2.[0-6]*)
3079         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3080         # cf_cxx_library=no
3081         { echo "$as_me:3081: WARNING: templates do not work" >&5
3082 echo "$as_me: WARNING: templates do not work" >&2;}
3083         ;;
3084 esac
3085
3086 echo "$as_me:3086: checking if you want to build C++ binding and demo" >&5
3087 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3088
3089 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3090 if test "${with_cxx_binding+set}" = set; then
3091   withval="$with_cxx_binding"
3092   cf_with_cxx_binding=$withval
3093 else
3094   cf_with_cxx_binding=$cf_with_cxx
3095 fi;
3096 echo "$as_me:3096: result: $cf_with_cxx_binding" >&5
3097 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3098
3099 echo "$as_me:3099: checking if you want to build with Ada95" >&5
3100 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3101
3102 # Check whether --with-ada or --without-ada was given.
3103 if test "${with_ada+set}" = set; then
3104   withval="$with_ada"
3105   cf_with_ada=$withval
3106 else
3107   cf_with_ada=yes
3108 fi;
3109 echo "$as_me:3109: result: $cf_with_ada" >&5
3110 echo "${ECHO_T}$cf_with_ada" >&6
3111
3112 echo "$as_me:3112: checking if you want to build programs such as tic" >&5
3113 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3114
3115 # Check whether --with-progs or --without-progs was given.
3116 if test "${with_progs+set}" = set; then
3117   withval="$with_progs"
3118   cf_with_progs=$withval
3119 else
3120   cf_with_progs=yes
3121 fi;
3122 echo "$as_me:3122: result: $cf_with_progs" >&5
3123 echo "${ECHO_T}$cf_with_progs" >&6
3124
3125 echo "$as_me:3125: checking if you wish to install curses.h" >&5
3126 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3127
3128 # Check whether --with-curses-h or --without-curses-h was given.
3129 if test "${with_curses_h+set}" = set; then
3130   withval="$with_curses_h"
3131   with_curses_h=$withval
3132 else
3133   with_curses_h=yes
3134 fi;
3135 echo "$as_me:3135: result: $with_curses_h" >&5
3136 echo "${ECHO_T}$with_curses_h" >&6
3137
3138 modules_to_build="ncurses"
3139 if test "X$cf_with_progs" != Xno ; then
3140 modules_to_build="$modules_to_build progs tack"
3141 fi
3142 modules_to_build="$modules_to_build panel menu form"
3143
3144 test "$program_prefix" != NONE &&
3145   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3146 # Use a double $ so make ignores it.
3147 test "$program_suffix" != NONE &&
3148   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3149 # Double any \ or $.  echo might interpret backslashes.
3150 # By default was `s,x,x', remove it if useless.
3151 cat <<\_ACEOF >conftest.sed
3152 s/[\\$]/&&/g;s/;s,x,x,$//
3153 _ACEOF
3154 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3155 rm conftest.sed
3156
3157 for ac_prog in mawk gawk nawk awk
3158 do
3159   # Extract the first word of "$ac_prog", so it can be a program name with args.
3160 set dummy $ac_prog; ac_word=$2
3161 echo "$as_me:3161: checking for $ac_word" >&5
3162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3163 if test "${ac_cv_prog_AWK+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166   if test -n "$AWK"; then
3167   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3168 else
3169   ac_save_IFS=$IFS; IFS=$ac_path_separator
3170 ac_dummy="$PATH"
3171 for ac_dir in $ac_dummy; do
3172   IFS=$ac_save_IFS
3173   test -z "$ac_dir" && ac_dir=.
3174   $as_executable_p "$ac_dir/$ac_word" || continue
3175 ac_cv_prog_AWK="$ac_prog"
3176 echo "$as_me:3176: found $ac_dir/$ac_word" >&5
3177 break
3178 done
3179
3180 fi
3181 fi
3182 AWK=$ac_cv_prog_AWK
3183 if test -n "$AWK"; then
3184   echo "$as_me:3184: result: $AWK" >&5
3185 echo "${ECHO_T}$AWK" >&6
3186 else
3187   echo "$as_me:3187: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3189 fi
3190
3191   test -n "$AWK" && break
3192 done
3193
3194 test -z "$AWK" && { { echo "$as_me:3194: error: No awk program found" >&5
3195 echo "$as_me: error: No awk program found" >&2;}
3196    { (exit 1); exit 1; }; }
3197
3198 echo "$as_me:3198: checking for egrep" >&5
3199 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3200 if test "${ac_cv_prog_egrep+set}" = set; then
3201   echo $ECHO_N "(cached) $ECHO_C" >&6
3202 else
3203   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3204     then ac_cv_prog_egrep='grep -E'
3205     else ac_cv_prog_egrep='egrep'
3206     fi
3207 fi
3208 echo "$as_me:3208: result: $ac_cv_prog_egrep" >&5
3209 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3210  EGREP=$ac_cv_prog_egrep
3211
3212 test -z "$EGREP" && { { echo "$as_me:3212: error: No egrep program found" >&5
3213 echo "$as_me: error: No egrep program found" >&2;}
3214    { (exit 1); exit 1; }; }
3215
3216 # Find a good install program.  We prefer a C program (faster),
3217 # so one script is as good as another.  But avoid the broken or
3218 # incompatible versions:
3219 # SysV /etc/install, /usr/sbin/install
3220 # SunOS /usr/etc/install
3221 # IRIX /sbin/install
3222 # AIX /bin/install
3223 # AmigaOS /C/install, which installs bootblocks on floppy discs
3224 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3225 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3226 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3227 # ./install, which can be erroneously created by make from ./install.sh.
3228 echo "$as_me:3228: checking for a BSD compatible install" >&5
3229 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3230 if test -z "$INSTALL"; then
3231 if test "${ac_cv_path_install+set}" = set; then
3232   echo $ECHO_N "(cached) $ECHO_C" >&6
3233 else
3234     ac_save_IFS=$IFS; IFS=$ac_path_separator
3235   for ac_dir in $PATH; do
3236     IFS=$ac_save_IFS
3237     # Account for people who put trailing slashes in PATH elements.
3238     case $ac_dir/ in
3239     / | ./ | .// | /cC/* \
3240     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3241     | /usr/ucb/* ) ;;
3242     *)
3243       # OSF1 and SCO ODT 3.0 have their own names for install.
3244       # Don't use installbsd from OSF since it installs stuff as root
3245       # by default.
3246       for ac_prog in ginstall scoinst install; do
3247         if $as_executable_p "$ac_dir/$ac_prog"; then
3248           if test $ac_prog = install &&
3249             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3250             # AIX install.  It has an incompatible calling convention.
3251             :
3252           elif test $ac_prog = install &&
3253             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3254             # program-specific install script used by HP pwplus--don't use.
3255             :
3256           else
3257             ac_cv_path_install="$ac_dir/$ac_prog -c"
3258             break 2
3259           fi
3260         fi
3261       done
3262       ;;
3263     esac
3264   done
3265
3266 fi
3267   if test "${ac_cv_path_install+set}" = set; then
3268     INSTALL=$ac_cv_path_install
3269   else
3270     # As a last resort, use the slow shell script.  We don't cache a
3271     # path for INSTALL within a source directory, because that will
3272     # break other packages using the cache if that directory is
3273     # removed, or if the path is relative.
3274     INSTALL=$ac_install_sh
3275   fi
3276 fi
3277 echo "$as_me:3277: result: $INSTALL" >&5
3278 echo "${ECHO_T}$INSTALL" >&6
3279
3280 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3281 # It thinks the first close brace ends the variable substitution.
3282 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3283
3284 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3285
3286 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3287
3288 case $INSTALL in
3289 /*)
3290   ;;
3291 *)
3292   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3293   test -z "$cf_dir" && cf_dir=.
3294   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3295   ;;
3296 esac
3297
3298 for ac_prog in tdlint lint alint
3299 do
3300   # Extract the first word of "$ac_prog", so it can be a program name with args.
3301 set dummy $ac_prog; ac_word=$2
3302 echo "$as_me:3302: checking for $ac_word" >&5
3303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3304 if test "${ac_cv_prog_LINT+set}" = set; then
3305   echo $ECHO_N "(cached) $ECHO_C" >&6
3306 else
3307   if test -n "$LINT"; then
3308   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3309 else
3310   ac_save_IFS=$IFS; IFS=$ac_path_separator
3311 ac_dummy="$PATH"
3312 for ac_dir in $ac_dummy; do
3313   IFS=$ac_save_IFS
3314   test -z "$ac_dir" && ac_dir=.
3315   $as_executable_p "$ac_dir/$ac_word" || continue
3316 ac_cv_prog_LINT="$ac_prog"
3317 echo "$as_me:3317: found $ac_dir/$ac_word" >&5
3318 break
3319 done
3320
3321 fi
3322 fi
3323 LINT=$ac_cv_prog_LINT
3324 if test -n "$LINT"; then
3325   echo "$as_me:3325: result: $LINT" >&5
3326 echo "${ECHO_T}$LINT" >&6
3327 else
3328   echo "$as_me:3328: result: no" >&5
3329 echo "${ECHO_T}no" >&6
3330 fi
3331
3332   test -n "$LINT" && break
3333 done
3334
3335 echo "$as_me:3335: checking whether ln -s works" >&5
3336 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3337 LN_S=$as_ln_s
3338 if test "$LN_S" = "ln -s"; then
3339   echo "$as_me:3339: result: yes" >&5
3340 echo "${ECHO_T}yes" >&6
3341 else
3342   echo "$as_me:3342: result: no, using $LN_S" >&5
3343 echo "${ECHO_T}no, using $LN_S" >&6
3344 fi
3345
3346 echo "$as_me:3346: checking for long file names" >&5
3347 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3348 if test "${ac_cv_sys_long_file_names+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   ac_cv_sys_long_file_names=yes
3352 # Test for long file names in all the places we know might matter:
3353 #      .                the current directory, where building will happen
3354 #      $prefix/lib      where we will be installing things
3355 #      $exec_prefix/lib likewise
3356 # eval it to expand exec_prefix.
3357 #      $TMPDIR          if set, where it might want to write temporary files
3358 # if $TMPDIR is not set:
3359 #      /tmp             where it might want to write temporary files
3360 #      /var/tmp         likewise
3361 #      /usr/tmp         likewise
3362 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3363   ac_tmpdirs=$TMPDIR
3364 else
3365   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3366 fi
3367 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3368   test -d $ac_dir || continue
3369   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3370   ac_xdir=$ac_dir/cf$$
3371   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3372   ac_tf1=$ac_xdir/conftest9012345
3373   ac_tf2=$ac_xdir/conftest9012346
3374   (echo 1 >$ac_tf1) 2>/dev/null
3375   (echo 2 >$ac_tf2) 2>/dev/null
3376   ac_val=`cat $ac_tf1 2>/dev/null`
3377   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3378     ac_cv_sys_long_file_names=no
3379     rm -rf $ac_xdir 2>/dev/null
3380     break
3381   fi
3382   rm -rf $ac_xdir 2>/dev/null
3383 done
3384 fi
3385 echo "$as_me:3385: result: $ac_cv_sys_long_file_names" >&5
3386 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3387 if test $ac_cv_sys_long_file_names = yes; then
3388
3389 cat >>confdefs.h <<\EOF
3390 #define HAVE_LONG_FILE_NAMES 1
3391 EOF
3392
3393 fi
3394
3395 echo "$as_me:3395: checking if we should assume mixed-case filenames" >&5
3396 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3397
3398 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3399 if test "${enable_mixed_case+set}" = set; then
3400   enableval="$enable_mixed_case"
3401   enable_mixedcase=$enableval
3402 else
3403   enable_mixedcase=auto
3404 fi;
3405 echo "$as_me:3405: result: $enable_mixedcase" >&5
3406 echo "${ECHO_T}$enable_mixedcase" >&6
3407 if test "$enable_mixedcase" = "auto" ; then
3408
3409 echo "$as_me:3409: checking if filesystem supports mixed-case filenames" >&5
3410 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3411 if test "${cf_cv_mixedcase+set}" = set; then
3412   echo $ECHO_N "(cached) $ECHO_C" >&6
3413 else
3414
3415 if test "$cross_compiling" = yes ; then
3416         case $target_alias in #(vi
3417         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3418                 cf_cv_mixedcase=no
3419                 ;;
3420         *)
3421                 cf_cv_mixedcase=yes
3422                 ;;
3423         esac
3424 else
3425         rm -f conftest CONFTEST
3426         echo test >conftest
3427         if test -f CONFTEST ; then
3428                 cf_cv_mixedcase=no
3429         else
3430                 cf_cv_mixedcase=yes
3431         fi
3432         rm -f conftest CONFTEST
3433 fi
3434
3435 fi
3436 echo "$as_me:3436: result: $cf_cv_mixedcase" >&5
3437 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3438 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3439 #define MIXEDCASE_FILENAMES 1
3440 EOF
3441
3442 else
3443     cf_cv_mixedcase=$enable_mixedcase
3444     if test "$enable_mixedcase" = "yes" ; then
3445         cat >>confdefs.h <<\EOF
3446 #define MIXEDCASE_FILENAMES 1
3447 EOF
3448
3449     fi
3450 fi
3451
3452 # do this after mixed-case option (tags/TAGS is not as important as tic).
3453 echo "$as_me:3453: checking whether ${MAKE-make} sets \${MAKE}" >&5
3454 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3455 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3456 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   cat >conftest.make <<\EOF
3460 all:
3461         @echo 'ac_maketemp="${MAKE}"'
3462 EOF
3463 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3464 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3465 if test -n "$ac_maketemp"; then
3466   eval ac_cv_prog_make_${ac_make}_set=yes
3467 else
3468   eval ac_cv_prog_make_${ac_make}_set=no
3469 fi
3470 rm -f conftest.make
3471 fi
3472 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3473   echo "$as_me:3473: result: yes" >&5
3474 echo "${ECHO_T}yes" >&6
3475   SET_MAKE=
3476 else
3477   echo "$as_me:3477: result: no" >&5
3478 echo "${ECHO_T}no" >&6
3479   SET_MAKE="MAKE=${MAKE-make}"
3480 fi
3481
3482 # Extract the first word of "ctags", so it can be a program name with args.
3483 set dummy ctags; ac_word=$2
3484 echo "$as_me:3484: checking for $ac_word" >&5
3485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3486 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3487   echo $ECHO_N "(cached) $ECHO_C" >&6
3488 else
3489   if test -n "$MAKE_LOWER_TAGS"; then
3490   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3491 else
3492   ac_save_IFS=$IFS; IFS=$ac_path_separator
3493 ac_dummy="$PATH"
3494 for ac_dir in $ac_dummy; do
3495   IFS=$ac_save_IFS
3496   test -z "$ac_dir" && ac_dir=.
3497   $as_executable_p "$ac_dir/$ac_word" || continue
3498 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3499 echo "$as_me:3499: found $ac_dir/$ac_word" >&5
3500 break
3501 done
3502
3503   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3504 fi
3505 fi
3506 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3507 if test -n "$MAKE_LOWER_TAGS"; then
3508   echo "$as_me:3508: result: $MAKE_LOWER_TAGS" >&5
3509 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3510 else
3511   echo "$as_me:3511: result: no" >&5
3512 echo "${ECHO_T}no" >&6
3513 fi
3514
3515 if test "$cf_cv_mixedcase" = yes ; then
3516         # Extract the first word of "etags", so it can be a program name with args.
3517 set dummy etags; ac_word=$2
3518 echo "$as_me:3518: checking for $ac_word" >&5
3519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3520 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3521   echo $ECHO_N "(cached) $ECHO_C" >&6
3522 else
3523   if test -n "$MAKE_UPPER_TAGS"; then
3524   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3525 else
3526   ac_save_IFS=$IFS; IFS=$ac_path_separator
3527 ac_dummy="$PATH"
3528 for ac_dir in $ac_dummy; do
3529   IFS=$ac_save_IFS
3530   test -z "$ac_dir" && ac_dir=.
3531   $as_executable_p "$ac_dir/$ac_word" || continue
3532 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3533 echo "$as_me:3533: found $ac_dir/$ac_word" >&5
3534 break
3535 done
3536
3537   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3538 fi
3539 fi
3540 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3541 if test -n "$MAKE_UPPER_TAGS"; then
3542   echo "$as_me:3542: result: $MAKE_UPPER_TAGS" >&5
3543 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3544 else
3545   echo "$as_me:3545: result: no" >&5
3546 echo "${ECHO_T}no" >&6
3547 fi
3548
3549 else
3550         MAKE_UPPER_TAGS=no
3551 fi
3552
3553 if test "$MAKE_UPPER_TAGS" = yes ; then
3554         MAKE_UPPER_TAGS=
3555 else
3556         MAKE_UPPER_TAGS="#"
3557 fi
3558
3559 if test "$MAKE_LOWER_TAGS" = yes ; then
3560         MAKE_LOWER_TAGS=
3561 else
3562         MAKE_LOWER_TAGS="#"
3563 fi
3564
3565 echo "$as_me:3565: checking for makeflags variable" >&5
3566 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3567 if test "${cf_cv_makeflags+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570
3571         cf_cv_makeflags=''
3572         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3573         do
3574                 cat >cf_makeflags.tmp <<CF_EOF
3575 SHELL = /bin/sh
3576 all :
3577         @ echo '.$cf_option'
3578 CF_EOF
3579                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3580                 case "$cf_result" in
3581                 .*k)
3582                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3583                         case "$cf_result" in
3584                         .*CC=*) cf_cv_makeflags=
3585                                 ;;
3586                         *)      cf_cv_makeflags=$cf_option
3587                                 ;;
3588                         esac
3589                         break
3590                         ;;
3591                 .-)     ;;
3592                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3593                         ;;
3594                 esac
3595         done
3596         rm -f cf_makeflags.tmp
3597
3598 fi
3599 echo "$as_me:3599: result: $cf_cv_makeflags" >&5
3600 echo "${ECHO_T}$cf_cv_makeflags" >&6
3601
3602 if test -n "$ac_tool_prefix"; then
3603   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3604 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3605 echo "$as_me:3605: checking for $ac_word" >&5
3606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3607 if test "${ac_cv_prog_RANLIB+set}" = set; then
3608   echo $ECHO_N "(cached) $ECHO_C" >&6
3609 else
3610   if test -n "$RANLIB"; then
3611   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3612 else
3613   ac_save_IFS=$IFS; IFS=$ac_path_separator
3614 ac_dummy="$PATH"
3615 for ac_dir in $ac_dummy; do
3616   IFS=$ac_save_IFS
3617   test -z "$ac_dir" && ac_dir=.
3618   $as_executable_p "$ac_dir/$ac_word" || continue
3619 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3620 echo "$as_me:3620: found $ac_dir/$ac_word" >&5
3621 break
3622 done
3623
3624 fi
3625 fi
3626 RANLIB=$ac_cv_prog_RANLIB
3627 if test -n "$RANLIB"; then
3628   echo "$as_me:3628: result: $RANLIB" >&5
3629 echo "${ECHO_T}$RANLIB" >&6
3630 else
3631   echo "$as_me:3631: result: no" >&5
3632 echo "${ECHO_T}no" >&6
3633 fi
3634
3635 fi
3636 if test -z "$ac_cv_prog_RANLIB"; then
3637   ac_ct_RANLIB=$RANLIB
3638   # Extract the first word of "ranlib", so it can be a program name with args.
3639 set dummy ranlib; ac_word=$2
3640 echo "$as_me:3640: checking for $ac_word" >&5
3641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3642 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3643   echo $ECHO_N "(cached) $ECHO_C" >&6
3644 else
3645   if test -n "$ac_ct_RANLIB"; then
3646   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3647 else
3648   ac_save_IFS=$IFS; IFS=$ac_path_separator
3649 ac_dummy="$PATH"
3650 for ac_dir in $ac_dummy; do
3651   IFS=$ac_save_IFS
3652   test -z "$ac_dir" && ac_dir=.
3653   $as_executable_p "$ac_dir/$ac_word" || continue
3654 ac_cv_prog_ac_ct_RANLIB="ranlib"
3655 echo "$as_me:3655: found $ac_dir/$ac_word" >&5
3656 break
3657 done
3658
3659   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3660 fi
3661 fi
3662 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3663 if test -n "$ac_ct_RANLIB"; then
3664   echo "$as_me:3664: result: $ac_ct_RANLIB" >&5
3665 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3666 else
3667   echo "$as_me:3667: result: no" >&5
3668 echo "${ECHO_T}no" >&6
3669 fi
3670
3671   RANLIB=$ac_ct_RANLIB
3672 else
3673   RANLIB="$ac_cv_prog_RANLIB"
3674 fi
3675
3676 if test -n "$ac_tool_prefix"; then
3677   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3678 set dummy ${ac_tool_prefix}ld; ac_word=$2
3679 echo "$as_me:3679: checking for $ac_word" >&5
3680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3681 if test "${ac_cv_prog_LD+set}" = set; then
3682   echo $ECHO_N "(cached) $ECHO_C" >&6
3683 else
3684   if test -n "$LD"; then
3685   ac_cv_prog_LD="$LD" # Let the user override the test.
3686 else
3687   ac_save_IFS=$IFS; IFS=$ac_path_separator
3688 ac_dummy="$PATH"
3689 for ac_dir in $ac_dummy; do
3690   IFS=$ac_save_IFS
3691   test -z "$ac_dir" && ac_dir=.
3692   $as_executable_p "$ac_dir/$ac_word" || continue
3693 ac_cv_prog_LD="${ac_tool_prefix}ld"
3694 echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3695 break
3696 done
3697
3698 fi
3699 fi
3700 LD=$ac_cv_prog_LD
3701 if test -n "$LD"; then
3702   echo "$as_me:3702: result: $LD" >&5
3703 echo "${ECHO_T}$LD" >&6
3704 else
3705   echo "$as_me:3705: result: no" >&5
3706 echo "${ECHO_T}no" >&6
3707 fi
3708
3709 fi
3710 if test -z "$ac_cv_prog_LD"; then
3711   ac_ct_LD=$LD
3712   # Extract the first word of "ld", so it can be a program name with args.
3713 set dummy ld; ac_word=$2
3714 echo "$as_me:3714: checking for $ac_word" >&5
3715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3716 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3717   echo $ECHO_N "(cached) $ECHO_C" >&6
3718 else
3719   if test -n "$ac_ct_LD"; then
3720   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3721 else
3722   ac_save_IFS=$IFS; IFS=$ac_path_separator
3723 ac_dummy="$PATH"
3724 for ac_dir in $ac_dummy; do
3725   IFS=$ac_save_IFS
3726   test -z "$ac_dir" && ac_dir=.
3727   $as_executable_p "$ac_dir/$ac_word" || continue
3728 ac_cv_prog_ac_ct_LD="ld"
3729 echo "$as_me:3729: found $ac_dir/$ac_word" >&5
3730 break
3731 done
3732
3733   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3734 fi
3735 fi
3736 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3737 if test -n "$ac_ct_LD"; then
3738   echo "$as_me:3738: result: $ac_ct_LD" >&5
3739 echo "${ECHO_T}$ac_ct_LD" >&6
3740 else
3741   echo "$as_me:3741: result: no" >&5
3742 echo "${ECHO_T}no" >&6
3743 fi
3744
3745   LD=$ac_ct_LD
3746 else
3747   LD="$ac_cv_prog_LD"
3748 fi
3749
3750 if test -n "$ac_tool_prefix"; then
3751   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3752 set dummy ${ac_tool_prefix}ar; ac_word=$2
3753 echo "$as_me:3753: checking for $ac_word" >&5
3754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3755 if test "${ac_cv_prog_AR+set}" = set; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   if test -n "$AR"; then
3759   ac_cv_prog_AR="$AR" # Let the user override the test.
3760 else
3761   ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 ac_dummy="$PATH"
3763 for ac_dir in $ac_dummy; do
3764   IFS=$ac_save_IFS
3765   test -z "$ac_dir" && ac_dir=.
3766   $as_executable_p "$ac_dir/$ac_word" || continue
3767 ac_cv_prog_AR="${ac_tool_prefix}ar"
3768 echo "$as_me:3768: found $ac_dir/$ac_word" >&5
3769 break
3770 done
3771
3772 fi
3773 fi
3774 AR=$ac_cv_prog_AR
3775 if test -n "$AR"; then
3776   echo "$as_me:3776: result: $AR" >&5
3777 echo "${ECHO_T}$AR" >&6
3778 else
3779   echo "$as_me:3779: result: no" >&5
3780 echo "${ECHO_T}no" >&6
3781 fi
3782
3783 fi
3784 if test -z "$ac_cv_prog_AR"; then
3785   ac_ct_AR=$AR
3786   # Extract the first word of "ar", so it can be a program name with args.
3787 set dummy ar; ac_word=$2
3788 echo "$as_me:3788: checking for $ac_word" >&5
3789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   if test -n "$ac_ct_AR"; then
3794   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3795 else
3796   ac_save_IFS=$IFS; IFS=$ac_path_separator
3797 ac_dummy="$PATH"
3798 for ac_dir in $ac_dummy; do
3799   IFS=$ac_save_IFS
3800   test -z "$ac_dir" && ac_dir=.
3801   $as_executable_p "$ac_dir/$ac_word" || continue
3802 ac_cv_prog_ac_ct_AR="ar"
3803 echo "$as_me:3803: found $ac_dir/$ac_word" >&5
3804 break
3805 done
3806
3807   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3808 fi
3809 fi
3810 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3811 if test -n "$ac_ct_AR"; then
3812   echo "$as_me:3812: result: $ac_ct_AR" >&5
3813 echo "${ECHO_T}$ac_ct_AR" >&6
3814 else
3815   echo "$as_me:3815: result: no" >&5
3816 echo "${ECHO_T}no" >&6
3817 fi
3818
3819   AR=$ac_ct_AR
3820 else
3821   AR="$ac_cv_prog_AR"
3822 fi
3823
3824 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3825   echo $ECHO_N "(cached) $ECHO_C" >&6
3826 else
3827
3828 echo "$as_me:3828: checking for archiver options (symbol AR_OPTS)" >&5
3829 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3830
3831 if test -z "$AR_OPTS" ; then
3832         AR_OPTS=rv
3833
3834 fi
3835
3836 cf_cv_subst_AR_OPTS=$AR_OPTS
3837 echo "$as_me:3837: result: $AR_OPTS" >&5
3838 echo "${ECHO_T}$AR_OPTS" >&6
3839
3840 fi
3841
3842 echo "$as_me:3842: checking if you have specified an install-prefix" >&5
3843 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3844
3845 # Check whether --with-install-prefix or --without-install-prefix was given.
3846 if test "${with_install_prefix+set}" = set; then
3847   withval="$with_install_prefix"
3848   case "$withval" in #(vi
3849         yes|no) #(vi
3850                 ;;
3851         *)      DESTDIR="$withval"
3852                 ;;
3853         esac
3854 fi;
3855 echo "$as_me:3855: result: $DESTDIR" >&5
3856 echo "${ECHO_T}$DESTDIR" >&6
3857
3858 ###############################################################################
3859
3860 # If we're cross-compiling, allow the user to override the tools and their
3861 # options.  The configure script is oriented toward identifying the host
3862 # compiler, etc., but we need a build compiler to generate parts of the source.
3863
3864 if test "$cross_compiling" = yes ; then
3865
3866         # defaults that we might want to override
3867         : ${BUILD_CFLAGS:=''}
3868         : ${BUILD_CPPFLAGS:=''}
3869         : ${BUILD_LDFLAGS:=''}
3870         : ${BUILD_LIBS:=''}
3871         : ${BUILD_EXEEXT:='$x'}
3872         : ${BUILD_OBJEXT:='o'}
3873
3874 # Check whether --with-build-cc or --without-build-cc was given.
3875 if test "${with_build_cc+set}" = set; then
3876   withval="$with_build_cc"
3877   BUILD_CC="$withval"
3878 else
3879   for ac_prog in gcc cc cl
3880 do
3881   # Extract the first word of "$ac_prog", so it can be a program name with args.
3882 set dummy $ac_prog; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$BUILD_CC"; then
3889   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_BUILD_CC="$ac_prog"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 BUILD_CC=$ac_cv_prog_BUILD_CC
3905 if test -n "$BUILD_CC"; then
3906   echo "$as_me:3906: result: $BUILD_CC" >&5
3907 echo "${ECHO_T}$BUILD_CC" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913   test -n "$BUILD_CC" && break
3914 done
3915
3916 fi;
3917         echo "$as_me:3917: checking for native build C compiler" >&5
3918 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3919         echo "$as_me:3919: result: $BUILD_CC" >&5
3920 echo "${ECHO_T}$BUILD_CC" >&6
3921
3922         echo "$as_me:3922: checking for native build C preprocessor" >&5
3923 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3924
3925 # Check whether --with-build-cpp or --without-build-cpp was given.
3926 if test "${with_build_cpp+set}" = set; then
3927   withval="$with_build_cpp"
3928   BUILD_CPP="$withval"
3929 else
3930   BUILD_CPP='${BUILD_CC} -E'
3931 fi;
3932         echo "$as_me:3932: result: $BUILD_CPP" >&5
3933 echo "${ECHO_T}$BUILD_CPP" >&6
3934
3935         echo "$as_me:3935: checking for native build C flags" >&5
3936 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3937
3938 # Check whether --with-build-cflags or --without-build-cflags was given.
3939 if test "${with_build_cflags+set}" = set; then
3940   withval="$with_build_cflags"
3941   BUILD_CFLAGS="$withval"
3942 fi;
3943         echo "$as_me:3943: result: $BUILD_CFLAGS" >&5
3944 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3945
3946         echo "$as_me:3946: checking for native build C preprocessor-flags" >&5
3947 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3948
3949 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3950 if test "${with_build_cppflags+set}" = set; then
3951   withval="$with_build_cppflags"
3952   BUILD_CPPFLAGS="$withval"
3953 fi;
3954         echo "$as_me:3954: result: $BUILD_CPPFLAGS" >&5
3955 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3956
3957         echo "$as_me:3957: checking for native build linker-flags" >&5
3958 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3959
3960 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3961 if test "${with_build_ldflags+set}" = set; then
3962   withval="$with_build_ldflags"
3963   BUILD_LDFLAGS="$withval"
3964 fi;
3965         echo "$as_me:3965: result: $BUILD_LDFLAGS" >&5
3966 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3967
3968         echo "$as_me:3968: checking for native build linker-libraries" >&5
3969 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3970
3971 # Check whether --with-build-libs or --without-build-libs was given.
3972 if test "${with_build_libs+set}" = set; then
3973   withval="$with_build_libs"
3974   BUILD_LIBS="$withval"
3975 fi;
3976         echo "$as_me:3976: result: $BUILD_LIBS" >&5
3977 echo "${ECHO_T}$BUILD_LIBS" >&6
3978
3979         # this assumes we're on Unix.
3980         BUILD_EXEEXT=
3981         BUILD_OBJEXT=o
3982
3983         : ${BUILD_CC:='${CC}'}
3984
3985         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3986                 { { echo "$as_me:3986: error: Cross-build requires two compilers.
3987 Use --with-build-cc to specify the native compiler." >&5
3988 echo "$as_me: error: Cross-build requires two compilers.
3989 Use --with-build-cc to specify the native compiler." >&2;}
3990    { (exit 1); exit 1; }; }
3991         fi
3992
3993 else
3994         : ${BUILD_CC:='${CC}'}
3995         : ${BUILD_CPP:='${CPP}'}
3996         : ${BUILD_CFLAGS:='${CFLAGS}'}
3997         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3998         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3999         : ${BUILD_LIBS:='${LIBS}'}
4000         : ${BUILD_EXEEXT:='$x'}
4001         : ${BUILD_OBJEXT:='o'}
4002 fi
4003
4004 ###############################################################################
4005
4006 ### Options to allow the user to specify the set of libraries which are used.
4007 ### Use "--without-normal --with-shared" to allow the default model to be
4008 ### shared, for example.
4009 cf_list_models=""
4010
4011 LIBTOOL=
4012
4013 # common library maintenance symbols that are convenient for libtool scripts:
4014 LIB_CREATE='${AR} -cr'
4015 LIB_OBJECT='${OBJECTS}'
4016 LIB_SUFFIX=.a
4017 LIB_PREP="$RANLIB"
4018
4019 # symbols used to prop libtool up to enable it to determine what it should be
4020 # doing:
4021 LIB_CLEAN=
4022 LIB_COMPILE=
4023 LIB_LINK='${CC}'
4024 LIB_INSTALL=
4025 LIB_UNINSTALL=
4026
4027 echo "$as_me:4027: checking if you want to build libraries with libtool" >&5
4028 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4029
4030 # Check whether --with-libtool or --without-libtool was given.
4031 if test "${with_libtool+set}" = set; then
4032   withval="$with_libtool"
4033   with_libtool=$withval
4034 else
4035   with_libtool=no
4036 fi;
4037 echo "$as_me:4037: result: $with_libtool" >&5
4038 echo "${ECHO_T}$with_libtool" >&6
4039 if test "$with_libtool" != "no"; then
4040
4041         if test "$with_libtool" != "yes" ; then
4042
4043 if test "x$prefix" != xNONE; then
4044   cf_path_syntax="$prefix"
4045 else
4046   cf_path_syntax="$ac_default_prefix"
4047 fi
4048
4049 case ".$with_libtool" in #(vi
4050 .\$\(*\)*|.\'*\'*) #(vi
4051   ;;
4052 ..|./*|.\\*) #(vi
4053   ;;
4054 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4055   ;;
4056 .\${*prefix}*) #(vi
4057   eval with_libtool="$with_libtool"
4058   case ".$with_libtool" in #(vi
4059   .NONE/*)
4060     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4061     ;;
4062   esac
4063   ;; #(vi
4064 .no|.NONE/*)
4065   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4066   ;;
4067 *)
4068   { { echo "$as_me:4068: error: expected a pathname, not \"$with_libtool\"" >&5
4069 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4070    { (exit 1); exit 1; }; }
4071   ;;
4072 esac
4073
4074                 LIBTOOL=$with_libtool
4075         else
4076                 # Extract the first word of "libtool", so it can be a program name with args.
4077 set dummy libtool; ac_word=$2
4078 echo "$as_me:4078: checking for $ac_word" >&5
4079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4080 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4081   echo $ECHO_N "(cached) $ECHO_C" >&6
4082 else
4083   case $LIBTOOL in
4084   [\\/]* | ?:[\\/]*)
4085   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4086   ;;
4087   *)
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   if $as_executable_p "$ac_dir/$ac_word"; then
4094    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4095    echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096    break
4097 fi
4098 done
4099
4100   ;;
4101 esac
4102 fi
4103 LIBTOOL=$ac_cv_path_LIBTOOL
4104
4105 if test -n "$LIBTOOL"; then
4106   echo "$as_me:4106: result: $LIBTOOL" >&5
4107 echo "${ECHO_T}$LIBTOOL" >&6
4108 else
4109   echo "$as_me:4109: result: no" >&5
4110 echo "${ECHO_T}no" >&6
4111 fi
4112
4113         fi
4114         if test -z "$LIBTOOL" ; then
4115                 { { echo "$as_me:4115: error: Cannot find libtool" >&5
4116 echo "$as_me: error: Cannot find libtool" >&2;}
4117    { (exit 1); exit 1; }; }
4118         fi
4119         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4120         LIB_OBJECT='${OBJECTS:.o=.lo}'
4121         LIB_SUFFIX=.la
4122         LIB_CLEAN='${LIBTOOL} --mode=clean'
4123         LIB_COMPILE='${LIBTOOL} --mode=compile'
4124         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4125         LIB_INSTALL='${LIBTOOL} --mode=install'
4126         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4127         LIB_PREP=:
4128
4129         # Show the version of libtool
4130         echo "$as_me:4130: checking version of libtool" >&5
4131 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4132
4133         # Save the version in a cache variable - this is not entirely a good
4134         # thing, but the version string from libtool is very ugly, and for
4135         # bug reports it might be useful to have the original string.
4136         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.].*//'`
4137         echo "$as_me:4137: result: $cf_cv_libtool_version" >&5
4138 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4139         if test -z "$cf_cv_libtool_version" ; then
4140                 { { echo "$as_me:4140: error: This is not GNU libtool" >&5
4141 echo "$as_me: error: This is not GNU libtool" >&2;}
4142    { (exit 1); exit 1; }; }
4143         fi
4144
4145         # special hack to add --tag option for C++ compiler
4146         case $cf_cv_libtool_version in
4147         1.[5-9]*|[2-9]*)
4148                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4149                 ;;
4150         *)
4151                 LIBTOOL_CXX="$LIBTOOL"
4152                 ;;
4153         esac
4154 else
4155         LIBTOOL=""
4156         LIBTOOL_CXX=""
4157 fi
4158
4159 test -z "$LIBTOOL" && ECHO_LT=
4160
4161 if test "$with_libtool" != "no" ; then
4162
4163 cf_list_models="$cf_list_models libtool"
4164
4165 else
4166
4167 echo "$as_me:4167: checking if you want to build shared libraries" >&5
4168 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4169
4170 # Check whether --with-shared or --without-shared was given.
4171 if test "${with_shared+set}" = set; then
4172   withval="$with_shared"
4173   with_shared=$withval
4174 else
4175   with_shared=no
4176 fi;
4177 echo "$as_me:4177: result: $with_shared" >&5
4178 echo "${ECHO_T}$with_shared" >&6
4179 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4180
4181 echo "$as_me:4181: checking if you want to build static libraries" >&5
4182 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4183
4184 # Check whether --with-normal or --without-normal was given.
4185 if test "${with_normal+set}" = set; then
4186   withval="$with_normal"
4187   with_normal=$withval
4188 else
4189   with_normal=yes
4190 fi;
4191 echo "$as_me:4191: result: $with_normal" >&5
4192 echo "${ECHO_T}$with_normal" >&6
4193 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4194
4195 echo "$as_me:4195: checking if you want to build debug libraries" >&5
4196 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4197
4198 # Check whether --with-debug or --without-debug was given.
4199 if test "${with_debug+set}" = set; then
4200   withval="$with_debug"
4201   with_debug=$withval
4202 else
4203   with_debug=yes
4204 fi;
4205 echo "$as_me:4205: result: $with_debug" >&5
4206 echo "${ECHO_T}$with_debug" >&6
4207 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4208
4209 echo "$as_me:4209: checking if you want to build profiling libraries" >&5
4210 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4211
4212 # Check whether --with-profile or --without-profile was given.
4213 if test "${with_profile+set}" = set; then
4214   withval="$with_profile"
4215   with_profile=$withval
4216 else
4217   with_profile=no
4218 fi;
4219 echo "$as_me:4219: result: $with_profile" >&5
4220 echo "${ECHO_T}$with_profile" >&6
4221 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4222
4223 fi
4224
4225 ###############################################################################
4226
4227 echo "$as_me:4227: checking for specified models" >&5
4228 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4229 test -z "$cf_list_models" && cf_list_models=normal
4230 test "$with_libtool" != "no" && cf_list_models=libtool
4231 echo "$as_me:4231: result: $cf_list_models" >&5
4232 echo "${ECHO_T}$cf_list_models" >&6
4233
4234 ### Use the first model as the default, and save its suffix for use in building
4235 ### up test-applications.
4236 echo "$as_me:4236: checking for default model" >&5
4237 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4238 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4239 echo "$as_me:4239: result: $DFT_LWR_MODEL" >&5
4240 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4241
4242 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4243
4244 TICS_NAME=tic
4245
4246 TINFO_NAME=tinfo
4247
4248 LIB_NAME=ncurses
4249
4250 LIB_DIR=../lib
4251 LIB_2ND=../../lib
4252
4253         case $cf_cv_system_name in
4254         OS/2*)  LIB_PREFIX=''     ;;
4255         os2*)   LIB_PREFIX=''     ;;
4256         *)      LIB_PREFIX='lib'  ;;
4257         esac
4258 cf_prefix=$LIB_PREFIX
4259
4260 LIB_PREFIX=$cf_prefix
4261
4262 LIB_SUFFIX=
4263
4264 ###############################################################################
4265
4266 echo "$as_me:4266: checking if you want to build a separate terminfo library" >&5
4267 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4268
4269 # Check whether --with-termlib or --without-termlib was given.
4270 if test "${with_termlib+set}" = set; then
4271   withval="$with_termlib"
4272   with_termlib=$withval
4273 else
4274   with_termlib=no
4275 fi;
4276 echo "$as_me:4276: result: $with_termlib" >&5
4277 echo "${ECHO_T}$with_termlib" >&6
4278
4279 echo "$as_me:4279: checking if you want to build a separate tic library" >&5
4280 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4281
4282 # Check whether --with-ticlib or --without-ticlib was given.
4283 if test "${with_ticlib+set}" = set; then
4284   withval="$with_ticlib"
4285   with_ticlib=$withval
4286 else
4287   with_ticlib=no
4288 fi;
4289 echo "$as_me:4289: result: $with_ticlib" >&5
4290 echo "${ECHO_T}$with_ticlib" >&6
4291
4292 ### Checks for special libraries, must be done up-front.
4293 SHLIB_LIST=""
4294
4295 echo "$as_me:4295: checking if you want to link with the GPM mouse library" >&5
4296 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4297
4298 # Check whether --with-gpm or --without-gpm was given.
4299 if test "${with_gpm+set}" = set; then
4300   withval="$with_gpm"
4301   with_gpm=$withval
4302 else
4303   with_gpm=maybe
4304 fi;
4305 echo "$as_me:4305: result: $with_gpm" >&5
4306 echo "${ECHO_T}$with_gpm" >&6
4307
4308 if test "$with_gpm" != no ; then
4309         echo "$as_me:4309: checking for gpm.h" >&5
4310 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4311 if test "${ac_cv_header_gpm_h+set}" = set; then
4312   echo $ECHO_N "(cached) $ECHO_C" >&6
4313 else
4314   cat >conftest.$ac_ext <<_ACEOF
4315 #line 4315 "configure"
4316 #include "confdefs.h"
4317 #include <gpm.h>
4318 _ACEOF
4319 if { (eval echo "$as_me:4319: \"$ac_cpp conftest.$ac_ext\"") >&5
4320   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4321   ac_status=$?
4322   egrep -v '^ *\+' conftest.er1 >conftest.err
4323   rm -f conftest.er1
4324   cat conftest.err >&5
4325   echo "$as_me:4325: \$? = $ac_status" >&5
4326   (exit $ac_status); } >/dev/null; then
4327   if test -s conftest.err; then
4328     ac_cpp_err=$ac_c_preproc_warn_flag
4329   else
4330     ac_cpp_err=
4331   fi
4332 else
4333   ac_cpp_err=yes
4334 fi
4335 if test -z "$ac_cpp_err"; then
4336   ac_cv_header_gpm_h=yes
4337 else
4338   echo "$as_me: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   ac_cv_header_gpm_h=no
4341 fi
4342 rm -f conftest.err conftest.$ac_ext
4343 fi
4344 echo "$as_me:4344: result: $ac_cv_header_gpm_h" >&5
4345 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4346 if test $ac_cv_header_gpm_h = yes; then
4347
4348                 cat >>confdefs.h <<\EOF
4349 #define HAVE_GPM_H 1
4350 EOF
4351
4352                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4353                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4354
4355 echo "${as_me-configure}:4355: testing assuming we really have GPM library ..." 1>&5
4356
4357                         cat >>confdefs.h <<\EOF
4358 #define HAVE_LIBGPM 1
4359 EOF
4360
4361                 else
4362                         echo "$as_me:4362: checking for Gpm_Open in -lgpm" >&5
4363 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4364 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4365   echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367   ac_check_lib_save_LIBS=$LIBS
4368 LIBS="-lgpm  $LIBS"
4369 cat >conftest.$ac_ext <<_ACEOF
4370 #line 4370 "configure"
4371 #include "confdefs.h"
4372
4373 /* Override any gcc2 internal prototype to avoid an error.  */
4374 #ifdef __cplusplus
4375 extern "C"
4376 #endif
4377 /* We use char because int might match the return type of a gcc2
4378    builtin and then its argument prototype would still apply.  */
4379 char Gpm_Open ();
4380 int
4381 main ()
4382 {
4383 Gpm_Open ();
4384   ;
4385   return 0;
4386 }
4387 _ACEOF
4388 rm -f conftest.$ac_objext conftest$ac_exeext
4389 if { (eval echo "$as_me:4389: \"$ac_link\"") >&5
4390   (eval $ac_link) 2>&5
4391   ac_status=$?
4392   echo "$as_me:4392: \$? = $ac_status" >&5
4393   (exit $ac_status); } &&
4394          { ac_try='test -s conftest$ac_exeext'
4395   { (eval echo "$as_me:4395: \"$ac_try\"") >&5
4396   (eval $ac_try) 2>&5
4397   ac_status=$?
4398   echo "$as_me:4398: \$? = $ac_status" >&5
4399   (exit $ac_status); }; }; then
4400   ac_cv_lib_gpm_Gpm_Open=yes
4401 else
4402   echo "$as_me: failed program was:" >&5
4403 cat conftest.$ac_ext >&5
4404 ac_cv_lib_gpm_Gpm_Open=no
4405 fi
4406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4407 LIBS=$ac_check_lib_save_LIBS
4408 fi
4409 echo "$as_me:4409: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4410 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4411 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4412   :
4413 else
4414
4415                                 { { echo "$as_me:4415: error: Cannot link with GPM library" >&5
4416 echo "$as_me: error: Cannot link with GPM library" >&2;}
4417    { (exit 1); exit 1; }; }
4418                 fi
4419                 with_gpm=yes
4420
4421 fi
4422
4423 else
4424
4425                 test "$with_gpm" != maybe && { echo "$as_me:4425: WARNING: Cannot find GPM header" >&5
4426 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4427                 with_gpm=no
4428
4429 fi
4430
4431 fi
4432
4433 if test "$with_gpm" != no ; then
4434         echo "$as_me:4434: checking if you want to load GPM dynamically" >&5
4435 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4436
4437 # Check whether --with-dlsym or --without-dlsym was given.
4438 if test "${with_dlsym+set}" = set; then
4439   withval="$with_dlsym"
4440   with_dlsym=$withval
4441 else
4442   with_dlsym=yes
4443 fi;
4444         echo "$as_me:4444: result: $with_dlsym" >&5
4445 echo "${ECHO_T}$with_dlsym" >&6
4446         if test "$with_dlsym" = yes ; then
4447
4448 cf_have_dlsym=no
4449 echo "$as_me:4449: checking for dlsym" >&5
4450 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4451 if test "${ac_cv_func_dlsym+set}" = set; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   cat >conftest.$ac_ext <<_ACEOF
4455 #line 4455 "configure"
4456 #include "confdefs.h"
4457 /* System header to define __stub macros and hopefully few prototypes,
4458     which can conflict with char dlsym (); below.  */
4459 #include <assert.h>
4460 /* Override any gcc2 internal prototype to avoid an error.  */
4461 #ifdef __cplusplus
4462 extern "C"
4463 #endif
4464 /* We use char because int might match the return type of a gcc2
4465    builtin and then its argument prototype would still apply.  */
4466 char dlsym ();
4467 char (*f) ();
4468
4469 int
4470 main ()
4471 {
4472 /* The GNU C library defines this for functions which it implements
4473     to always fail with ENOSYS.  Some functions are actually named
4474     something starting with __ and the normal name is an alias.  */
4475 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4476 choke me
4477 #else
4478 f = dlsym;
4479 #endif
4480
4481   ;
4482   return 0;
4483 }
4484 _ACEOF
4485 rm -f conftest.$ac_objext conftest$ac_exeext
4486 if { (eval echo "$as_me:4486: \"$ac_link\"") >&5
4487   (eval $ac_link) 2>&5
4488   ac_status=$?
4489   echo "$as_me:4489: \$? = $ac_status" >&5
4490   (exit $ac_status); } &&
4491          { ac_try='test -s conftest$ac_exeext'
4492   { (eval echo "$as_me:4492: \"$ac_try\"") >&5
4493   (eval $ac_try) 2>&5
4494   ac_status=$?
4495   echo "$as_me:4495: \$? = $ac_status" >&5
4496   (exit $ac_status); }; }; then
4497   ac_cv_func_dlsym=yes
4498 else
4499   echo "$as_me: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4501 ac_cv_func_dlsym=no
4502 fi
4503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4504 fi
4505 echo "$as_me:4505: result: $ac_cv_func_dlsym" >&5
4506 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4507 if test $ac_cv_func_dlsym = yes; then
4508   cf_have_dlsym=yes
4509 else
4510
4511 cf_have_libdl=no
4512 echo "$as_me:4512: checking for dlsym in -ldl" >&5
4513 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4514 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4515   echo $ECHO_N "(cached) $ECHO_C" >&6
4516 else
4517   ac_check_lib_save_LIBS=$LIBS
4518 LIBS="-ldl  $LIBS"
4519 cat >conftest.$ac_ext <<_ACEOF
4520 #line 4520 "configure"
4521 #include "confdefs.h"
4522
4523 /* Override any gcc2 internal prototype to avoid an error.  */
4524 #ifdef __cplusplus
4525 extern "C"
4526 #endif
4527 /* We use char because int might match the return type of a gcc2
4528    builtin and then its argument prototype would still apply.  */
4529 char dlsym ();
4530 int
4531 main ()
4532 {
4533 dlsym ();
4534   ;
4535   return 0;
4536 }
4537 _ACEOF
4538 rm -f conftest.$ac_objext conftest$ac_exeext
4539 if { (eval echo "$as_me:4539: \"$ac_link\"") >&5
4540   (eval $ac_link) 2>&5
4541   ac_status=$?
4542   echo "$as_me:4542: \$? = $ac_status" >&5
4543   (exit $ac_status); } &&
4544          { ac_try='test -s conftest$ac_exeext'
4545   { (eval echo "$as_me:4545: \"$ac_try\"") >&5
4546   (eval $ac_try) 2>&5
4547   ac_status=$?
4548   echo "$as_me:4548: \$? = $ac_status" >&5
4549   (exit $ac_status); }; }; then
4550   ac_cv_lib_dl_dlsym=yes
4551 else
4552   echo "$as_me: failed program was:" >&5
4553 cat conftest.$ac_ext >&5
4554 ac_cv_lib_dl_dlsym=no
4555 fi
4556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4557 LIBS=$ac_check_lib_save_LIBS
4558 fi
4559 echo "$as_me:4559: result: $ac_cv_lib_dl_dlsym" >&5
4560 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4561 if test $ac_cv_lib_dl_dlsym = yes; then
4562
4563         cf_have_dlsym=yes
4564         cf_have_libdl=yes
4565 fi
4566
4567 fi
4568
4569 if test "$cf_have_dlsym" = yes ; then
4570         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4571
4572         echo "$as_me:4572: checking whether able to link to dl*() functions" >&5
4573 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4574         cat >conftest.$ac_ext <<_ACEOF
4575 #line 4575 "configure"
4576 #include "confdefs.h"
4577 #include <dlfcn.h>
4578 int
4579 main ()
4580 {
4581
4582                 void *obj;
4583                 if ((obj = dlopen("filename", 0)) != 0) {
4584                         if (dlsym(obj, "symbolname") == 0) {
4585                         dlclose(obj);
4586                         }
4587                 }
4588   ;
4589   return 0;
4590 }
4591 _ACEOF
4592 rm -f conftest.$ac_objext conftest$ac_exeext
4593 if { (eval echo "$as_me:4593: \"$ac_link\"") >&5
4594   (eval $ac_link) 2>&5
4595   ac_status=$?
4596   echo "$as_me:4596: \$? = $ac_status" >&5
4597   (exit $ac_status); } &&
4598          { ac_try='test -s conftest$ac_exeext'
4599   { (eval echo "$as_me:4599: \"$ac_try\"") >&5
4600   (eval $ac_try) 2>&5
4601   ac_status=$?
4602   echo "$as_me:4602: \$? = $ac_status" >&5
4603   (exit $ac_status); }; }; then
4604
4605                 cat >>confdefs.h <<\EOF
4606 #define HAVE_LIBDL 1
4607 EOF
4608
4609 else
4610   echo "$as_me: failed program was:" >&5
4611 cat conftest.$ac_ext >&5
4612
4613                 { { echo "$as_me:4613: error: Cannot link test program for libdl" >&5
4614 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4615    { (exit 1); exit 1; }; }
4616 fi
4617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4618         echo "$as_me:4618: result: ok" >&5
4619 echo "${ECHO_T}ok" >&6
4620 else
4621         { { echo "$as_me:4621: error: Cannot find dlsym function" >&5
4622 echo "$as_me: error: Cannot find dlsym function" >&2;}
4623    { (exit 1); exit 1; }; }
4624 fi
4625
4626                 if test "$with_gpm" != yes ; then
4627                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4628
4629 echo "${as_me-configure}:4629: testing assuming soname for gpm is $with_gpm ..." 1>&5
4630
4631                         cf_cv_gpm_soname="$with_gpm"
4632                 else
4633
4634 echo "$as_me:4634: checking for soname of gpm library" >&5
4635 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4636 if test "${cf_cv_gpm_soname+set}" = set; then
4637   echo $ECHO_N "(cached) $ECHO_C" >&6
4638 else
4639
4640 cf_cv_gpm_soname=unknown
4641 if test "$cross_compiling" != yes ; then
4642 cat >conftest.$ac_ext <<CF_EOF
4643 #include <gpm.h>
4644 int main()
4645 {
4646 if (Gpm_Open(0,0)) Gpm_Close();
4647         ${cf_cv_main_return:-return}(0);
4648 }
4649 CF_EOF
4650 cf_save_LIBS="$LIBS"
4651         LIBS="-lgpm $LIBS"
4652         if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5
4653   (eval $ac_compile) 2>&5
4654   ac_status=$?
4655   echo "$as_me:4655: \$? = $ac_status" >&5
4656   (exit $ac_status); } ; then
4657                 if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
4658   (eval $ac_link) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); } ; then
4662                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4663                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4664                 fi
4665         fi
4666 rm -f conftest*
4667 LIBS="$cf_save_LIBS"
4668 fi
4669
4670 fi
4671 echo "$as_me:4671: result: $cf_cv_gpm_soname" >&5
4672 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4673
4674                 fi
4675                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4676 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4677 EOF
4678
4679                 SHLIB_LIST="-ldl $SHLIB_LIST"
4680         else
4681                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4682         fi
4683         cat >>confdefs.h <<\EOF
4684 #define HAVE_LIBGPM 1
4685 EOF
4686
4687 echo "$as_me:4687: checking for Gpm_Wgetch in -lgpm" >&5
4688 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4689 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4690   echo $ECHO_N "(cached) $ECHO_C" >&6
4691 else
4692   ac_check_lib_save_LIBS=$LIBS
4693 LIBS="-lgpm  $LIBS"
4694 cat >conftest.$ac_ext <<_ACEOF
4695 #line 4695 "configure"
4696 #include "confdefs.h"
4697
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 #ifdef __cplusplus
4700 extern "C"
4701 #endif
4702 /* We use char because int might match the return type of a gcc2
4703    builtin and then its argument prototype would still apply.  */
4704 char Gpm_Wgetch ();
4705 int
4706 main ()
4707 {
4708 Gpm_Wgetch ();
4709   ;
4710   return 0;
4711 }
4712 _ACEOF
4713 rm -f conftest.$ac_objext conftest$ac_exeext
4714 if { (eval echo "$as_me:4714: \"$ac_link\"") >&5
4715   (eval $ac_link) 2>&5
4716   ac_status=$?
4717   echo "$as_me:4717: \$? = $ac_status" >&5
4718   (exit $ac_status); } &&
4719          { ac_try='test -s conftest$ac_exeext'
4720   { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4721   (eval $ac_try) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); }; }; then
4725   ac_cv_lib_gpm_Gpm_Wgetch=yes
4726 else
4727   echo "$as_me: failed program was:" >&5
4728 cat conftest.$ac_ext >&5
4729 ac_cv_lib_gpm_Gpm_Wgetch=no
4730 fi
4731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4732 LIBS=$ac_check_lib_save_LIBS
4733 fi
4734 echo "$as_me:4734: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4735 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4736 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4737
4738 echo "$as_me:4738: checking if GPM is weakly bound to curses library" >&5
4739 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4740 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4741   echo $ECHO_N "(cached) $ECHO_C" >&6
4742 else
4743
4744 cf_cv_check_gpm_wgetch=unknown
4745 if test "$cross_compiling" != yes ; then
4746
4747 cat >conftest.$ac_ext <<CF_EOF
4748 #include <gpm.h>
4749 int main()
4750 {
4751         Gpm_Wgetch();
4752         ${cf_cv_main_return:-return}(0);
4753 }
4754 CF_EOF
4755
4756         cf_save_LIBS="$LIBS"
4757         # This only works if we can look at the symbol table.  If a shared
4758         # library is stripped for install, we cannot use that.  So we're forced
4759         # to rely on the static library, noting that some packagers may not
4760         # include it.
4761         LIBS="-static -lgpm -dynamic $LIBS"
4762         if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
4763   (eval $ac_compile) 2>&5
4764   ac_status=$?
4765   echo "$as_me:4765: \$? = $ac_status" >&5
4766   (exit $ac_status); } ; then
4767                 if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
4768   (eval $ac_link) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } ; then
4772                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4773                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4774                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4775                 fi
4776         fi
4777         rm -f conftest*
4778         LIBS="$cf_save_LIBS"
4779 fi
4780
4781 fi
4782 echo "$as_me:4782: result: $cf_cv_check_gpm_wgetch" >&5
4783 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4784
4785 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4786         { echo "$as_me:4786: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4787 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4788 fi
4789
4790 fi
4791
4792 fi
4793
4794 # not everyone has "test -c"
4795 if test -c /dev/sysmouse 2>/dev/null ; then
4796 echo "$as_me:4796: checking if you want to use sysmouse" >&5
4797 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4798
4799 # Check whether --with-sysmouse or --without-sysmouse was given.
4800 if test "${with_sysmouse+set}" = set; then
4801   withval="$with_sysmouse"
4802   cf_with_sysmouse=$withval
4803 else
4804   cf_with_sysmouse=maybe
4805 fi;
4806         if test "$cf_with_sysmouse" != no ; then
4807         cat >conftest.$ac_ext <<_ACEOF
4808 #line 4808 "configure"
4809 #include "confdefs.h"
4810
4811 #include <osreldate.h>
4812 #if (__FreeBSD_version >= 400017)
4813 #include <sys/consio.h>
4814 #include <sys/fbio.h>
4815 #else
4816 #include <machine/console.h>
4817 #endif
4818
4819 int
4820 main ()
4821 {
4822
4823         struct mouse_info the_mouse;
4824         ioctl(0, CONS_MOUSECTL, &the_mouse);
4825
4826   ;
4827   return 0;
4828 }
4829 _ACEOF
4830 rm -f conftest.$ac_objext
4831 if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832   (eval $ac_compile) 2>&5
4833   ac_status=$?
4834   echo "$as_me:4834: \$? = $ac_status" >&5
4835   (exit $ac_status); } &&
4836          { ac_try='test -s conftest.$ac_objext'
4837   { (eval echo "$as_me:4837: \"$ac_try\"") >&5
4838   (eval $ac_try) 2>&5
4839   ac_status=$?
4840   echo "$as_me:4840: \$? = $ac_status" >&5
4841   (exit $ac_status); }; }; then
4842   cf_with_sysmouse=yes
4843 else
4844   echo "$as_me: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 cf_with_sysmouse=no
4847 fi
4848 rm -f conftest.$ac_objext conftest.$ac_ext
4849         fi
4850 echo "$as_me:4850: result: $cf_with_sysmouse" >&5
4851 echo "${ECHO_T}$cf_with_sysmouse" >&6
4852 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4853 #define USE_SYSMOUSE 1
4854 EOF
4855
4856 fi
4857
4858 if test X"$CC_G_OPT" = X"" ; then
4859         CC_G_OPT='-g'
4860         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4861 fi
4862
4863 if test X"$CXX_G_OPT" = X"" ; then
4864         CXX_G_OPT='-g'
4865         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4866 fi
4867
4868 echo "$as_me:4868: checking for default loader flags" >&5
4869 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4870 case $DFT_LWR_MODEL in
4871 libtool) LD_MODEL=''   ;;
4872 normal)  LD_MODEL=''   ;;
4873 debug)   LD_MODEL=$CC_G_OPT ;;
4874 profile) LD_MODEL='-pg';;
4875 shared)  LD_MODEL=''   ;;
4876 esac
4877 echo "$as_me:4877: result: $LD_MODEL" >&5
4878 echo "${ECHO_T}$LD_MODEL" >&6
4879
4880 case $DFT_LWR_MODEL in
4881 shared)
4882 echo "$as_me:4882: checking if rpath option should be used" >&5
4883 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4884
4885 # Check whether --enable-rpath or --disable-rpath was given.
4886 if test "${enable_rpath+set}" = set; then
4887   enableval="$enable_rpath"
4888   cf_cv_ld_rpath=$enableval
4889 else
4890   cf_cv_ld_rpath=no
4891 fi;
4892 echo "$as_me:4892: result: $cf_cv_ld_rpath" >&5
4893 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4894 echo "$as_me:4894: checking if shared libraries should be relinked during install" >&5
4895 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4896
4897 # Check whether --enable-relink or --disable-relink was given.
4898 if test "${enable_relink+set}" = set; then
4899   enableval="$enable_relink"
4900   cf_cv_do_relink=$enableval
4901 else
4902   cf_cv_do_relink=yes
4903 fi;
4904 echo "$as_me:4904: result: $cf_cv_do_relink" >&5
4905 echo "${ECHO_T}$cf_cv_do_relink" >&6
4906         ;;
4907 esac
4908
4909         LOCAL_LDFLAGS=
4910         LOCAL_LDFLAGS2=
4911         LD_SHARED_OPTS=
4912         INSTALL_LIB="-m 644"
4913
4914         cf_cv_do_symlinks=no
4915
4916         echo "$as_me:4916: checking if release/abi version should be used for shared libs" >&5
4917 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4918
4919 # Check whether --with-shlib-version or --without-shlib-version was given.
4920 if test "${with_shlib_version+set}" = set; then
4921   withval="$with_shlib_version"
4922   test -z "$withval" && withval=auto
4923         case $withval in #(vi
4924         yes) #(vi
4925                 cf_cv_shlib_version=auto
4926                 ;;
4927         rel|abi|auto|no) #(vi
4928                 cf_cv_shlib_version=$withval
4929                 ;;
4930         *)
4931                 { { echo "$as_me:4931: error: option value must be one of: rel, abi, auto or no" >&5
4932 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4933    { (exit 1); exit 1; }; }
4934                 ;;
4935         esac
4936
4937 else
4938   cf_cv_shlib_version=auto
4939 fi;
4940         echo "$as_me:4940: result: $cf_cv_shlib_version" >&5
4941 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4942
4943         cf_cv_rm_so_locs=no
4944
4945         # Some less-capable ports of gcc support only -fpic
4946         CC_SHARED_OPTS=
4947         if test "$GCC" = yes
4948         then
4949                 echo "$as_me:4949: checking which $CC option to use" >&5
4950 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4951                 cf_save_CFLAGS="$CFLAGS"
4952                 for CC_SHARED_OPTS in -fPIC -fpic ''
4953                 do
4954                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4955                         cat >conftest.$ac_ext <<_ACEOF
4956 #line 4956 "configure"
4957 #include "confdefs.h"
4958 #include <stdio.h>
4959 int
4960 main ()
4961 {
4962 int x = 1
4963   ;
4964   return 0;
4965 }
4966 _ACEOF
4967 rm -f conftest.$ac_objext
4968 if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5
4969   (eval $ac_compile) 2>&5
4970   ac_status=$?
4971   echo "$as_me:4971: \$? = $ac_status" >&5
4972   (exit $ac_status); } &&
4973          { ac_try='test -s conftest.$ac_objext'
4974   { (eval echo "$as_me:4974: \"$ac_try\"") >&5
4975   (eval $ac_try) 2>&5
4976   ac_status=$?
4977   echo "$as_me:4977: \$? = $ac_status" >&5
4978   (exit $ac_status); }; }; then
4979   break
4980 else
4981   echo "$as_me: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 fi
4984 rm -f conftest.$ac_objext conftest.$ac_ext
4985                 done
4986                 echo "$as_me:4986: result: $CC_SHARED_OPTS" >&5
4987 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4988                 CFLAGS="$cf_save_CFLAGS"
4989         fi
4990
4991         cf_cv_shlib_version_infix=no
4992
4993         case $cf_cv_system_name in
4994         beos*)
4995                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4996                 ;;
4997         cygwin*)
4998                 CC_SHARED_OPTS=
4999                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5000                 cf_cv_shlib_version=cygdll
5001                 cf_cv_shlib_version_infix=cygdll
5002                 cat >mk_shared_lib.sh <<-CF_EOF
5003                 #!/bin/sh
5004                 SHARED_LIB=\$1
5005                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5006                 shift
5007                 cat <<-EOF
5008                 Linking shared library
5009                 ** SHARED_LIB \$SHARED_LIB
5010                 ** IMPORT_LIB \$IMPORT_LIB
5011 EOF
5012                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5013 CF_EOF
5014                 chmod +x mk_shared_lib.sh
5015                 ;;
5016         darwin*)
5017                 EXTRA_CFLAGS="-no-cpp-precomp"
5018                 CC_SHARED_OPTS="-dynamic"
5019                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5020                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5021                 cf_cv_shlib_version_infix=yes
5022                 echo "$as_me:5022: checking if ld -search_paths_first works" >&5
5023 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5024 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5025   echo $ECHO_N "(cached) $ECHO_C" >&6
5026 else
5027
5028                         cf_save_LDFLAGS=$LDFLAGS
5029                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5030                         cat >conftest.$ac_ext <<_ACEOF
5031 #line 5031 "configure"
5032 #include "confdefs.h"
5033
5034 int
5035 main ()
5036 {
5037 int i;
5038   ;
5039   return 0;
5040 }
5041 _ACEOF
5042 rm -f conftest.$ac_objext conftest$ac_exeext
5043 if { (eval echo "$as_me:5043: \"$ac_link\"") >&5
5044   (eval $ac_link) 2>&5
5045   ac_status=$?
5046   echo "$as_me:5046: \$? = $ac_status" >&5
5047   (exit $ac_status); } &&
5048          { ac_try='test -s conftest$ac_exeext'
5049   { (eval echo "$as_me:5049: \"$ac_try\"") >&5
5050   (eval $ac_try) 2>&5
5051   ac_status=$?
5052   echo "$as_me:5052: \$? = $ac_status" >&5
5053   (exit $ac_status); }; }; then
5054   cf_cv_ldflags_search_paths_first=yes
5055 else
5056   echo "$as_me: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 cf_cv_ldflags_search_paths_first=no
5059 fi
5060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5061                                 LDFLAGS=$cf_save_LDFLAGS
5062 fi
5063 echo "$as_me:5063: result: $cf_cv_ldflags_search_paths_first" >&5
5064 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5065                 if test $cf_cv_ldflags_search_paths_first = yes; then
5066                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5067                 fi
5068                 ;;
5069         hpux*)
5070                 # (tested with gcc 2.7.2 -- I don't have c89)
5071                 if test "$GCC" = yes; then
5072                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5073                 else
5074                         CC_SHARED_OPTS='+Z'
5075                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5076                 fi
5077                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5078                 # HP-UX shared libraries must be executable, and should be
5079                 # readonly to exploit a quirk in the memory manager.
5080                 INSTALL_LIB="-m 555"
5081                 ;;
5082         irix*)
5083                 if test "$cf_cv_ld_rpath" = yes ; then
5084                         if test "$GCC" = yes; then
5085                                 cf_ld_rpath_opt="-Wl,-rpath,"
5086                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5087                         else
5088                                 cf_ld_rpath_opt="-rpath "
5089                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5090                         fi
5091                 fi
5092                 # tested with IRIX 5.2 and 'cc'.
5093                 if test "$GCC" != yes; then
5094                         CC_SHARED_OPTS='-KPIC'
5095                 fi
5096                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5097                 cf_cv_rm_so_locs=yes
5098                 ;;
5099         linux*|gnu*|k*bsd*-gnu)
5100                 if test "$DFT_LWR_MODEL" = "shared" ; then
5101                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5102                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5103                 fi
5104                 if test "$cf_cv_ld_rpath" = yes ; then
5105                         cf_ld_rpath_opt="-Wl,-rpath,"
5106                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5107                 fi
5108
5109         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5110         if test "$cf_cv_shlib_version" = rel; then
5111                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5112         else
5113                 cf_shared_soname='`basename $@`'
5114         fi
5115
5116                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5117                 ;;
5118         openbsd[2-9].*)
5119                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5120                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5121                 ;;
5122         openbsd*|freebsd[12].*)
5123                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5124                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5125                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5126                 ;;
5127         freebsd*)
5128                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5129                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5130                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5131                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5132                         cf_ld_rpath_opt="-rpath "
5133                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5134                 fi
5135
5136         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5137         if test "$cf_cv_shlib_version" = rel; then
5138                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5139         else
5140                 cf_shared_soname='`basename $@`'
5141         fi
5142
5143                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5144                 ;;
5145         netbsd*)
5146                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5147                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5148                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5149                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5150                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5151                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5152                         if test "$cf_cv_shlib_version" = auto; then
5153                         if test -f /usr/libexec/ld.elf_so; then
5154                                 cf_cv_shlib_version=abi
5155                         else
5156                                 cf_cv_shlib_version=rel
5157                         fi
5158                         fi
5159
5160         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5161         if test "$cf_cv_shlib_version" = rel; then
5162                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5163         else
5164                 cf_shared_soname='`basename $@`'
5165         fi
5166
5167                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5168                 else
5169                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5170                 fi
5171                 ;;
5172         osf*|mls+*)
5173                 # tested with OSF/1 V3.2 and 'cc'
5174                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5175                 # link with shared libs).
5176                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5177                 case $host_os in
5178                 osf4*)
5179                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5180                         ;;
5181                 esac
5182                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5183                 if test "$DFT_LWR_MODEL" = "shared" ; then
5184                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5185                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5186                 fi
5187                 if test "$cf_cv_ld_rpath" = yes ; then
5188                         cf_ld_rpath_opt="-rpath"
5189                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5190                 fi
5191                 cf_cv_rm_so_locs=yes
5192                 ;;
5193         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5194                 # tested with osr5.0.5
5195                 if test "$GCC" != yes; then
5196                         CC_SHARED_OPTS='-belf -KPIC'
5197                 fi
5198                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5199                 if test "$cf_cv_ld_rpath" = yes ; then
5200                         # only way is to set LD_RUN_PATH but no switch for it
5201                         RUN_PATH=$libdir
5202                 fi
5203                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5204                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5205                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5206                 ;;
5207         sunos4*)
5208                 # tested with SunOS 4.1.1 and gcc 2.7.0
5209                 if test "$GCC" != yes; then
5210                         CC_SHARED_OPTS='-KPIC'
5211                 fi
5212                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5213                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5214                 ;;
5215         solaris2*)
5216                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5217                 if test "$GCC" != yes; then
5218                         CC_SHARED_OPTS='-KPIC'
5219                 fi
5220                 if test "$DFT_LWR_MODEL" = "shared" ; then
5221                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5222                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5223                 fi
5224                 if test "$cf_cv_ld_rpath" = yes ; then
5225                         cf_ld_rpath_opt="-R"
5226                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5227                 fi
5228
5229         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5230         if test "$cf_cv_shlib_version" = rel; then
5231                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5232         else
5233                 cf_shared_soname='`basename $@`'
5234         fi
5235
5236                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5237                 ;;
5238         sysv5uw7*|unix_sv*)
5239                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5240                 if test "$GCC" != yes; then
5241                         CC_SHARED_OPTS='-KPIC'
5242                 fi
5243                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5244                 ;;
5245         *)
5246                 CC_SHARED_OPTS='unknown'
5247                 MK_SHARED_LIB='echo unknown'
5248                 ;;
5249         esac
5250
5251         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5252         case "$cf_cv_shlib_version" in #(vi
5253         rel|abi)
5254                 case "$MK_SHARED_LIB" in #(vi
5255                 *'-o $@')
5256                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5257                         ;;
5258                 *)
5259                         { echo "$as_me:5259: WARNING: ignored --with-shlib-version" >&5
5260 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5261                         ;;
5262                 esac
5263                 ;;
5264         esac
5265
5266         if test -n "$cf_ld_rpath_opt" ; then
5267                 echo "$as_me:5267: checking if we need a space after rpath option" >&5
5268 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5269                 cf_save_LIBS="$LIBS"
5270                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5271                 cat >conftest.$ac_ext <<_ACEOF
5272 #line 5272 "configure"
5273 #include "confdefs.h"
5274
5275 int
5276 main ()
5277 {
5278
5279   ;
5280   return 0;
5281 }
5282 _ACEOF
5283 rm -f conftest.$ac_objext conftest$ac_exeext
5284 if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
5285   (eval $ac_link) 2>&5
5286   ac_status=$?
5287   echo "$as_me:5287: \$? = $ac_status" >&5
5288   (exit $ac_status); } &&
5289          { ac_try='test -s conftest$ac_exeext'
5290   { (eval echo "$as_me:5290: \"$ac_try\"") >&5
5291   (eval $ac_try) 2>&5
5292   ac_status=$?
5293   echo "$as_me:5293: \$? = $ac_status" >&5
5294   (exit $ac_status); }; }; then
5295   cf_rpath_space=no
5296 else
5297   echo "$as_me: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 cf_rpath_space=yes
5300 fi
5301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5302                 LIBS="$cf_save_LIBS"
5303                 echo "$as_me:5303: result: $cf_rpath_space" >&5
5304 echo "${ECHO_T}$cf_rpath_space" >&6
5305                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5306                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5307         fi
5308
5309 if test "$CC_SHARED_OPTS" = "unknown"; then
5310         for model in $cf_list_models; do
5311                 if test "$model" = "shared"; then
5312                         { { echo "$as_me:5312: error: Shared libraries are not supported in this version" >&5
5313 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5314    { (exit 1); exit 1; }; }
5315                 fi
5316         done
5317 fi
5318
5319 ###############################################################################
5320
5321 ###     use option --disable-overwrite to leave out the link to -lcurses
5322 echo "$as_me:5322: checking if you wish to install ncurses overwriting curses" >&5
5323 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5324
5325 # Check whether --enable-overwrite or --disable-overwrite was given.
5326 if test "${enable_overwrite+set}" = set; then
5327   enableval="$enable_overwrite"
5328   with_overwrite=$enableval
5329 else
5330   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5331 fi;
5332 echo "$as_me:5332: result: $with_overwrite" >&5
5333 echo "${ECHO_T}$with_overwrite" >&6
5334
5335 echo "$as_me:5335: checking if external terminfo-database is used" >&5
5336 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5337
5338 # Check whether --enable-database or --disable-database was given.
5339 if test "${enable_database+set}" = set; then
5340   enableval="$enable_database"
5341   use_database=$enableval
5342 else
5343   use_database=yes
5344 fi;
5345 echo "$as_me:5345: result: $use_database" >&5
5346 echo "${ECHO_T}$use_database" >&6
5347
5348 case $host_os in #(vi
5349 os2*) #(vi
5350         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5351         ;;
5352 *) #(vi
5353         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5354         ;;
5355 esac
5356
5357         case $cf_cv_system_name in
5358         os2*)   PATHSEP=';'  ;;
5359         *)      PATHSEP=':'  ;;
5360         esac
5361
5362 if test "$use_database" != no ; then
5363         cat >>confdefs.h <<\EOF
5364 #define USE_DATABASE 1
5365 EOF
5366
5367         echo "$as_me:5367: checking which terminfo source-file will be installed" >&5
5368 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5369
5370 # Check whether --enable-database or --disable-database was given.
5371 if test "${enable_database+set}" = set; then
5372   enableval="$enable_database"
5373   TERMINFO_SRC=$withval
5374 fi;
5375         echo "$as_me:5375: result: $TERMINFO_SRC" >&5
5376 echo "${ECHO_T}$TERMINFO_SRC" >&6
5377
5378         echo "$as_me:5378: checking whether to use hashed database instead of directory/tree" >&5
5379 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5380
5381 # Check whether --with-hashed-db or --without-hashed-db was given.
5382 if test "${with_hashed_db+set}" = set; then
5383   withval="$with_hashed_db"
5384
5385 else
5386   with_hashed_db=no
5387 fi;
5388         echo "$as_me:5388: result: $with_hashed_db" >&5
5389 echo "${ECHO_T}$with_hashed_db" >&6
5390 fi
5391
5392 echo "$as_me:5392: checking for list of fallback descriptions" >&5
5393 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5394
5395 # Check whether --with-fallbacks or --without-fallbacks was given.
5396 if test "${with_fallbacks+set}" = set; then
5397   withval="$with_fallbacks"
5398   with_fallback=$withval
5399 else
5400   with_fallback=
5401 fi;
5402 echo "$as_me:5402: result: $with_fallback" >&5
5403 echo "${ECHO_T}$with_fallback" >&6
5404 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5405
5406 echo "$as_me:5406: checking if you want modern xterm or antique" >&5
5407 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5408
5409 # Check whether --with-xterm-new or --without-xterm-new was given.
5410 if test "${with_xterm_new+set}" = set; then
5411   withval="$with_xterm_new"
5412   with_xterm_new=$withval
5413 else
5414   with_xterm_new=yes
5415 fi;
5416 case $with_xterm_new in
5417 no)     with_xterm_new=xterm-old;;
5418 *)      with_xterm_new=xterm-new;;
5419 esac
5420 echo "$as_me:5420: result: $with_xterm_new" >&5
5421 echo "${ECHO_T}$with_xterm_new" >&6
5422 WHICH_XTERM=$with_xterm_new
5423
5424 MAKE_TERMINFO=
5425 if test "$use_database" = no ; then
5426         TERMINFO="${datadir}/terminfo"
5427         MAKE_TERMINFO="#"
5428 else
5429
5430 echo "$as_me:5430: checking for list of terminfo directories" >&5
5431 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5432
5433 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5434 if test "${with_terminfo_dirs+set}" = set; then
5435   withval="$with_terminfo_dirs"
5436
5437 else
5438   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5439 fi;
5440 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5441 cf_dst_path=
5442 for cf_src_path in $withval
5443 do
5444
5445 if test "x$prefix" != xNONE; then
5446   cf_path_syntax="$prefix"
5447 else
5448   cf_path_syntax="$ac_default_prefix"
5449 fi
5450
5451 case ".$cf_src_path" in #(vi
5452 .\$\(*\)*|.\'*\'*) #(vi
5453   ;;
5454 ..|./*|.\\*) #(vi
5455   ;;
5456 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5457   ;;
5458 .\${*prefix}*) #(vi
5459   eval cf_src_path="$cf_src_path"
5460   case ".$cf_src_path" in #(vi
5461   .NONE/*)
5462     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5463     ;;
5464   esac
5465   ;; #(vi
5466 .no|.NONE/*)
5467   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5468   ;;
5469 *)
5470   { { echo "$as_me:5470: error: expected a pathname, not \"$cf_src_path\"" >&5
5471 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5472    { (exit 1); exit 1; }; }
5473   ;;
5474 esac
5475
5476   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5477   cf_dst_path="${cf_dst_path}${cf_src_path}"
5478 done
5479 IFS="$ac_save_ifs"
5480
5481 eval 'TERMINFO_DIRS="$cf_dst_path"'
5482
5483 echo "$as_me:5483: result: $TERMINFO_DIRS" >&5
5484 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5485 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5486 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5487 EOF
5488
5489 echo "$as_me:5489: checking for default terminfo directory" >&5
5490 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5491
5492 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5493 if test "${with_default_terminfo_dir+set}" = set; then
5494   withval="$with_default_terminfo_dir"
5495
5496 else
5497   withval="${TERMINFO-${datadir}/terminfo}"
5498 fi; if test -n "${datadir}/terminfo" ; then
5499
5500 if test "x$prefix" != xNONE; then
5501   cf_path_syntax="$prefix"
5502 else
5503   cf_path_syntax="$ac_default_prefix"
5504 fi
5505
5506 case ".$withval" in #(vi
5507 .\$\(*\)*|.\'*\'*) #(vi
5508   ;;
5509 ..|./*|.\\*) #(vi
5510   ;;
5511 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5512   ;;
5513 .\${*prefix}*) #(vi
5514   eval withval="$withval"
5515   case ".$withval" in #(vi
5516   .NONE/*)
5517     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5518     ;;
5519   esac
5520   ;; #(vi
5521 .no|.NONE/*)
5522   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5523   ;;
5524 *)
5525   { { echo "$as_me:5525: error: expected a pathname, not \"$withval\"" >&5
5526 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5527    { (exit 1); exit 1; }; }
5528   ;;
5529 esac
5530
5531 fi
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 ### ISO C only guarantees 512-char strings, we have tables which load faster
5597 ### when constructed using "big" strings.
5598 echo "$as_me:5598: checking if big-strings option selected" >&5
5599 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5600
5601 # Check whether --enable-big-strings or --disable-big-strings was given.
5602 if test "${enable_big_strings+set}" = set; then
5603   enableval="$enable_big_strings"
5604   with_big_strings=no
5605 else
5606   with_big_strings=yes
5607 fi;
5608 echo "$as_me:5608: result: $with_big_strings" >&5
5609 echo "${ECHO_T}$with_big_strings" >&6
5610
5611 USE_BIG_STRINGS=0
5612 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5613
5614 ###     use option --enable-termcap to compile in the termcap fallback support
5615 echo "$as_me:5615: checking if you want termcap-fallback support" >&5
5616 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5617
5618 # Check whether --enable-termcap or --disable-termcap was given.
5619 if test "${enable_termcap+set}" = set; then
5620   enableval="$enable_termcap"
5621   with_termcap=$enableval
5622 else
5623   with_termcap=no
5624 fi;
5625 echo "$as_me:5625: result: $with_termcap" >&5
5626 echo "${ECHO_T}$with_termcap" >&6
5627
5628 if test "$with_termcap" != "yes" ; then
5629         if test "$use_database" = no ; then
5630                 if test -z "$with_fallback" ; then
5631                         { { echo "$as_me:5631: error: You have disabled the database w/o specifying fallbacks" >&5
5632 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5633    { (exit 1); exit 1; }; }
5634                 fi
5635         fi
5636         cat >>confdefs.h <<\EOF
5637 #define PURE_TERMINFO 1
5638 EOF
5639
5640 else
5641
5642 if test "$with_ticlib" != no ; then
5643         { { echo "$as_me:5643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5644 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5645    { (exit 1); exit 1; }; }
5646 fi
5647
5648 cat >>confdefs.h <<\EOF
5649 #define USE_TERMCAP 1
5650 EOF
5651
5652 echo "$as_me:5652: checking for list of termcap files" >&5
5653 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5654
5655 # Check whether --with-termpath or --without-termpath was given.
5656 if test "${with_termpath+set}" = set; then
5657   withval="$with_termpath"
5658
5659 else
5660   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5661 fi;
5662 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5663 cf_dst_path=
5664 for cf_src_path in $withval
5665 do
5666
5667 if test "x$prefix" != xNONE; then
5668   cf_path_syntax="$prefix"
5669 else
5670   cf_path_syntax="$ac_default_prefix"
5671 fi
5672
5673 case ".$cf_src_path" in #(vi
5674 .\$\(*\)*|.\'*\'*) #(vi
5675   ;;
5676 ..|./*|.\\*) #(vi
5677   ;;
5678 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5679   ;;
5680 .\${*prefix}*) #(vi
5681   eval cf_src_path="$cf_src_path"
5682   case ".$cf_src_path" in #(vi
5683   .NONE/*)
5684     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5685     ;;
5686   esac
5687   ;; #(vi
5688 .no|.NONE/*)
5689   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5690   ;;
5691 *)
5692   { { echo "$as_me:5692: error: expected a pathname, not \"$cf_src_path\"" >&5
5693 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5694    { (exit 1); exit 1; }; }
5695   ;;
5696 esac
5697
5698   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5699   cf_dst_path="${cf_dst_path}${cf_src_path}"
5700 done
5701 IFS="$ac_save_ifs"
5702
5703 eval 'TERMPATH="$cf_dst_path"'
5704
5705 echo "$as_me:5705: result: $TERMPATH" >&5
5706 echo "${ECHO_T}$TERMPATH" >&6
5707 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5708 #define TERMPATH "$TERMPATH"
5709 EOF
5710
5711 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5712 echo "$as_me:5712: checking if fast termcap-loader is needed" >&5
5713 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5714
5715 # Check whether --enable-getcap or --disable-getcap was given.
5716 if test "${enable_getcap+set}" = set; then
5717   enableval="$enable_getcap"
5718   with_getcap=$enableval
5719 else
5720   with_getcap=no
5721 fi;
5722 echo "$as_me:5722: result: $with_getcap" >&5
5723 echo "${ECHO_T}$with_getcap" >&6
5724 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5725 #define USE_GETCAP 1
5726 EOF
5727
5728 echo "$as_me:5728: checking if translated termcaps will be cached in ~/.terminfo" >&5
5729 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5730
5731 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5732 if test "${enable_getcap_cache+set}" = set; then
5733   enableval="$enable_getcap_cache"
5734   with_getcap_cache=$enableval
5735 else
5736   with_getcap_cache=no
5737 fi;
5738 echo "$as_me:5738: result: $with_getcap_cache" >&5
5739 echo "${ECHO_T}$with_getcap_cache" >&6
5740 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5741 #define USE_GETCAP_CACHE 1
5742 EOF
5743
5744 fi
5745
5746 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5747 echo "$as_me:5747: checking if ~/.terminfo is wanted" >&5
5748 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5749
5750 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5751 if test "${enable_home_terminfo+set}" = set; then
5752   enableval="$enable_home_terminfo"
5753   with_home_terminfo=$enableval
5754 else
5755   with_home_terminfo=yes
5756 fi;
5757 echo "$as_me:5757: result: $with_home_terminfo" >&5
5758 echo "${ECHO_T}$with_home_terminfo" >&6
5759 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5760 #define USE_HOME_TERMINFO 1
5761 EOF
5762
5763 echo "$as_me:5763: checking if you want to use restricted environment when running as root" >&5
5764 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5765
5766 # Check whether --enable-root-environ or --disable-root-environ was given.
5767 if test "${enable_root_environ+set}" = set; then
5768   enableval="$enable_root_environ"
5769   with_root_environ=$enableval
5770 else
5771   with_root_environ=yes
5772 fi;
5773 echo "$as_me:5773: result: $with_root_environ" >&5
5774 echo "${ECHO_T}$with_root_environ" >&6
5775 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5776 #define USE_ROOT_ENVIRON 1
5777 EOF
5778
5779 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5780 ###   to reduce storage requirements for the terminfo database.
5781
5782 for ac_func in \
5783         remove \
5784         unlink
5785 do
5786 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5787 echo "$as_me:5787: checking for $ac_func" >&5
5788 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5789 if eval "test \"\${$as_ac_var+set}\" = set"; then
5790   echo $ECHO_N "(cached) $ECHO_C" >&6
5791 else
5792   cat >conftest.$ac_ext <<_ACEOF
5793 #line 5793 "configure"
5794 #include "confdefs.h"
5795 /* System header to define __stub macros and hopefully few prototypes,
5796     which can conflict with char $ac_func (); below.  */
5797 #include <assert.h>
5798 /* Override any gcc2 internal prototype to avoid an error.  */
5799 #ifdef __cplusplus
5800 extern "C"
5801 #endif
5802 /* We use char because int might match the return type of a gcc2
5803    builtin and then its argument prototype would still apply.  */
5804 char $ac_func ();
5805 char (*f) ();
5806
5807 int
5808 main ()
5809 {
5810 /* The GNU C library defines this for functions which it implements
5811     to always fail with ENOSYS.  Some functions are actually named
5812     something starting with __ and the normal name is an alias.  */
5813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5814 choke me
5815 #else
5816 f = $ac_func;
5817 #endif
5818
5819   ;
5820   return 0;
5821 }
5822 _ACEOF
5823 rm -f conftest.$ac_objext conftest$ac_exeext
5824 if { (eval echo "$as_me:5824: \"$ac_link\"") >&5
5825   (eval $ac_link) 2>&5
5826   ac_status=$?
5827   echo "$as_me:5827: \$? = $ac_status" >&5
5828   (exit $ac_status); } &&
5829          { ac_try='test -s conftest$ac_exeext'
5830   { (eval echo "$as_me:5830: \"$ac_try\"") >&5
5831   (eval $ac_try) 2>&5
5832   ac_status=$?
5833   echo "$as_me:5833: \$? = $ac_status" >&5
5834   (exit $ac_status); }; }; then
5835   eval "$as_ac_var=yes"
5836 else
5837   echo "$as_me: failed program was:" >&5
5838 cat conftest.$ac_ext >&5
5839 eval "$as_ac_var=no"
5840 fi
5841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5842 fi
5843 echo "$as_me:5843: result: `eval echo '${'$as_ac_var'}'`" >&5
5844 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5845 if test `eval echo '${'$as_ac_var'}'` = yes; then
5846   cat >>confdefs.h <<EOF
5847 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5848 EOF
5849
5850 fi
5851 done
5852
5853 if test "$cross_compiling" = yes ; then
5854
5855 for ac_func in \
5856                 link \
5857                 symlink
5858 do
5859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5860 echo "$as_me:5860: checking for $ac_func" >&5
5861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5862 if eval "test \"\${$as_ac_var+set}\" = set"; then
5863   echo $ECHO_N "(cached) $ECHO_C" >&6
5864 else
5865   cat >conftest.$ac_ext <<_ACEOF
5866 #line 5866 "configure"
5867 #include "confdefs.h"
5868 /* System header to define __stub macros and hopefully few prototypes,
5869     which can conflict with char $ac_func (); below.  */
5870 #include <assert.h>
5871 /* Override any gcc2 internal prototype to avoid an error.  */
5872 #ifdef __cplusplus
5873 extern "C"
5874 #endif
5875 /* We use char because int might match the return type of a gcc2
5876    builtin and then its argument prototype would still apply.  */
5877 char $ac_func ();
5878 char (*f) ();
5879
5880 int
5881 main ()
5882 {
5883 /* The GNU C library defines this for functions which it implements
5884     to always fail with ENOSYS.  Some functions are actually named
5885     something starting with __ and the normal name is an alias.  */
5886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5887 choke me
5888 #else
5889 f = $ac_func;
5890 #endif
5891
5892   ;
5893   return 0;
5894 }
5895 _ACEOF
5896 rm -f conftest.$ac_objext conftest$ac_exeext
5897 if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
5898   (eval $ac_link) 2>&5
5899   ac_status=$?
5900   echo "$as_me:5900: \$? = $ac_status" >&5
5901   (exit $ac_status); } &&
5902          { ac_try='test -s conftest$ac_exeext'
5903   { (eval echo "$as_me:5903: \"$ac_try\"") >&5
5904   (eval $ac_try) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit $ac_status); }; }; then
5908   eval "$as_ac_var=yes"
5909 else
5910   echo "$as_me: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 eval "$as_ac_var=no"
5913 fi
5914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5915 fi
5916 echo "$as_me:5916: result: `eval echo '${'$as_ac_var'}'`" >&5
5917 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5918 if test `eval echo '${'$as_ac_var'}'` = yes; then
5919   cat >>confdefs.h <<EOF
5920 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5921 EOF
5922
5923 fi
5924 done
5925
5926 else
5927         echo "$as_me:5927: checking if link/symlink functions work" >&5
5928 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5929 if test "${cf_cv_link_funcs+set}" = set; then
5930   echo $ECHO_N "(cached) $ECHO_C" >&6
5931 else
5932
5933                 cf_cv_link_funcs=
5934                 for cf_func in link symlink ; do
5935                         if test "$cross_compiling" = yes; then
5936
5937                         eval 'ac_cv_func_'$cf_func'=error'
5938 else
5939   cat >conftest.$ac_ext <<_ACEOF
5940 #line 5940 "configure"
5941 #include "confdefs.h"
5942
5943 #include <sys/types.h>
5944 #include <sys/stat.h>
5945 #ifdef HAVE_UNISTD_H
5946 #include <unistd.h>
5947 #endif
5948 int main()
5949 {
5950         int fail = 0;
5951         char *src = "config.log";
5952         char *dst = "conftest.chk";
5953         struct stat src_sb;
5954         struct stat dst_sb;
5955
5956         stat(src, &src_sb);
5957         fail = ($cf_func("config.log", "conftest.chk") < 0)
5958             || (stat(dst, &dst_sb) < 0)
5959             || (dst_sb.st_mtime != src_sb.st_mtime);
5960 #ifdef HAVE_UNLINK
5961         unlink(dst);
5962 #else
5963         remove(dst);
5964 #endif
5965         ${cf_cv_main_return:-return} (fail);
5966 }
5967
5968 _ACEOF
5969 rm -f conftest$ac_exeext
5970 if { (eval echo "$as_me:5970: \"$ac_link\"") >&5
5971   (eval $ac_link) 2>&5
5972   ac_status=$?
5973   echo "$as_me:5973: \$? = $ac_status" >&5
5974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5975   { (eval echo "$as_me:5975: \"$ac_try\"") >&5
5976   (eval $ac_try) 2>&5
5977   ac_status=$?
5978   echo "$as_me:5978: \$? = $ac_status" >&5
5979   (exit $ac_status); }; }; then
5980
5981                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5982                         eval 'ac_cv_func_'$cf_func'=yes'
5983 else
5984   echo "$as_me: program exited with status $ac_status" >&5
5985 echo "$as_me: failed program was:" >&5
5986 cat conftest.$ac_ext >&5
5987
5988                         eval 'ac_cv_func_'$cf_func'=no'
5989 fi
5990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5991 fi
5992                 done
5993                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5994
5995 fi
5996 echo "$as_me:5996: result: $cf_cv_link_funcs" >&5
5997 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5998         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5999 #define HAVE_LINK 1
6000 EOF
6001
6002         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6003 #define HAVE_SYMLINK 1
6004 EOF
6005
6006 fi
6007
6008 with_links=no
6009 with_symlinks=no
6010
6011 # soft links (symbolic links) are useful for some systems where hard links do
6012 # not work, or to make it simpler to copy terminfo trees around.
6013 if test "$ac_cv_func_symlink" = yes ; then
6014     echo "$as_me:6014: checking if tic should use symbolic links" >&5
6015 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6016
6017 # Check whether --enable-symlinks or --disable-symlinks was given.
6018 if test "${enable_symlinks+set}" = set; then
6019   enableval="$enable_symlinks"
6020   with_symlinks=$enableval
6021 else
6022   with_symlinks=no
6023 fi;
6024     echo "$as_me:6024: result: $with_symlinks" >&5
6025 echo "${ECHO_T}$with_symlinks" >&6
6026 fi
6027
6028 # If we have hard links and did not choose to use soft links instead, there is
6029 # no reason to make this choice optional - use the hard links.
6030 if test "$with_symlinks" = no ; then
6031     echo "$as_me:6031: checking if tic should use hard links" >&5
6032 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6033     if test "$ac_cv_func_link" = yes ; then
6034         with_links=yes
6035     else
6036         with_links=no
6037     fi
6038     echo "$as_me:6038: result: $with_links" >&5
6039 echo "${ECHO_T}$with_links" >&6
6040 fi
6041
6042 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6043 #define USE_LINKS 1
6044 EOF
6045
6046 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6047 #define USE_SYMLINKS 1
6048 EOF
6049
6050 ###   use option --enable-broken-linker to force on use of broken-linker support
6051 echo "$as_me:6051: checking if you want broken-linker support code" >&5
6052 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6053
6054 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6055 if test "${enable_broken_linker+set}" = set; then
6056   enableval="$enable_broken_linker"
6057   with_broken_linker=$enableval
6058 else
6059   with_broken_linker=${BROKEN_LINKER-no}
6060 fi;
6061 echo "$as_me:6061: result: $with_broken_linker" >&5
6062 echo "${ECHO_T}$with_broken_linker" >&6
6063
6064 BROKEN_LINKER=0
6065 if test "$with_broken_linker" = yes ; then
6066         cat >>confdefs.h <<\EOF
6067 #define BROKEN_LINKER 1
6068 EOF
6069
6070         BROKEN_LINKER=1
6071 elif test "$DFT_LWR_MODEL" = shared ; then
6072         case $cf_cv_system_name in #(vi
6073         cygwin*)
6074                 cat >>confdefs.h <<\EOF
6075 #define BROKEN_LINKER 1
6076 EOF
6077
6078                 BROKEN_LINKER=1
6079                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6080
6081 echo "${as_me-configure}:6081: testing cygwin linker is broken anyway ..." 1>&5
6082
6083                 ;;
6084         esac
6085 fi
6086
6087 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6088 echo "$as_me:6088: checking if tputs should process BSD-style prefix padding" >&5
6089 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6090
6091 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6092 if test "${enable_bsdpad+set}" = set; then
6093   enableval="$enable_bsdpad"
6094   with_bsdpad=$enableval
6095 else
6096   with_bsdpad=no
6097 fi;
6098 echo "$as_me:6098: result: $with_bsdpad" >&5
6099 echo "${ECHO_T}$with_bsdpad" >&6
6100 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6101 #define BSD_TPUTS 1
6102 EOF
6103
6104 ###   use option --enable-widec to turn on use of wide-character support
6105 NCURSES_CH_T=chtype
6106 NCURSES_LIBUTF8=0
6107
6108 NEED_WCHAR_H=0
6109 NCURSES_MBSTATE_T=0
6110 NCURSES_WCHAR_T=0
6111 NCURSES_WINT_T=0
6112
6113 # Check to define _XOPEN_SOURCE "automatically"
6114
6115 echo "$as_me:6115: checking if $CC -U and -D options work together" >&5
6116 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6117 if test "${cf_cv_cc_u_d_options+set}" = set; then
6118   echo $ECHO_N "(cached) $ECHO_C" >&6
6119 else
6120
6121         cf_save_CPPFLAGS="$CPPFLAGS"
6122         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6123         cat >conftest.$ac_ext <<_ACEOF
6124 #line 6124 "configure"
6125 #include "confdefs.h"
6126
6127 int
6128 main ()
6129 {
6130
6131 #ifndef U_D_OPTIONS
6132 make an undefined-error
6133 #endif
6134 #ifdef  D_U_OPTIONS
6135 make a defined-error
6136 #endif
6137
6138   ;
6139   return 0;
6140 }
6141 _ACEOF
6142 rm -f conftest.$ac_objext
6143 if { (eval echo "$as_me:6143: \"$ac_compile\"") >&5
6144   (eval $ac_compile) 2>&5
6145   ac_status=$?
6146   echo "$as_me:6146: \$? = $ac_status" >&5
6147   (exit $ac_status); } &&
6148          { ac_try='test -s conftest.$ac_objext'
6149   { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6150   (eval $ac_try) 2>&5
6151   ac_status=$?
6152   echo "$as_me:6152: \$? = $ac_status" >&5
6153   (exit $ac_status); }; }; then
6154
6155         cf_cv_cc_u_d_options=yes
6156 else
6157   echo "$as_me: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6159
6160         cf_cv_cc_u_d_options=no
6161 fi
6162 rm -f conftest.$ac_objext conftest.$ac_ext
6163         CPPFLAGS="$cf_save_CPPFLAGS"
6164
6165 fi
6166 echo "$as_me:6166: result: $cf_cv_cc_u_d_options" >&5
6167 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6168
6169 cf_XOPEN_SOURCE=500
6170 cf_POSIX_C_SOURCE=199506L
6171
6172 case $host_os in #(vi
6173 aix[45]*) #(vi
6174         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6175         ;;
6176 freebsd*) #(vi
6177         # 5.x headers associate
6178         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6179         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6180         cf_POSIX_C_SOURCE=200112L
6181         cf_XOPEN_SOURCE=600
6182         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6183         ;;
6184 hpux*) #(vi
6185         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6186         ;;
6187 irix[56].*) #(vi
6188         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6189         ;;
6190 linux*|gnu*|k*bsd*-gnu) #(vi
6191
6192 echo "$as_me:6192: checking if we must define _GNU_SOURCE" >&5
6193 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6194 if test "${cf_cv_gnu_source+set}" = set; then
6195   echo $ECHO_N "(cached) $ECHO_C" >&6
6196 else
6197
6198 cat >conftest.$ac_ext <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201 #include <sys/types.h>
6202 int
6203 main ()
6204 {
6205
6206 #ifndef _XOPEN_SOURCE
6207 make an error
6208 #endif
6209   ;
6210   return 0;
6211 }
6212 _ACEOF
6213 rm -f conftest.$ac_objext
6214 if { (eval echo "$as_me:6214: \"$ac_compile\"") >&5
6215   (eval $ac_compile) 2>&5
6216   ac_status=$?
6217   echo "$as_me:6217: \$? = $ac_status" >&5
6218   (exit $ac_status); } &&
6219          { ac_try='test -s conftest.$ac_objext'
6220   { (eval echo "$as_me:6220: \"$ac_try\"") >&5
6221   (eval $ac_try) 2>&5
6222   ac_status=$?
6223   echo "$as_me:6223: \$? = $ac_status" >&5
6224   (exit $ac_status); }; }; then
6225   cf_cv_gnu_source=no
6226 else
6227   echo "$as_me: failed program was:" >&5
6228 cat conftest.$ac_ext >&5
6229 cf_save="$CPPFLAGS"
6230          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6231          cat >conftest.$ac_ext <<_ACEOF
6232 #line 6232 "configure"
6233 #include "confdefs.h"
6234 #include <sys/types.h>
6235 int
6236 main ()
6237 {
6238
6239 #ifdef _XOPEN_SOURCE
6240 make an error
6241 #endif
6242   ;
6243   return 0;
6244 }
6245 _ACEOF
6246 rm -f conftest.$ac_objext
6247 if { (eval echo "$as_me:6247: \"$ac_compile\"") >&5
6248   (eval $ac_compile) 2>&5
6249   ac_status=$?
6250   echo "$as_me:6250: \$? = $ac_status" >&5
6251   (exit $ac_status); } &&
6252          { ac_try='test -s conftest.$ac_objext'
6253   { (eval echo "$as_me:6253: \"$ac_try\"") >&5
6254   (eval $ac_try) 2>&5
6255   ac_status=$?
6256   echo "$as_me:6256: \$? = $ac_status" >&5
6257   (exit $ac_status); }; }; then
6258   cf_cv_gnu_source=no
6259 else
6260   echo "$as_me: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6262 cf_cv_gnu_source=yes
6263 fi
6264 rm -f conftest.$ac_objext conftest.$ac_ext
6265         CPPFLAGS="$cf_save"
6266
6267 fi
6268 rm -f conftest.$ac_objext conftest.$ac_ext
6269
6270 fi
6271 echo "$as_me:6271: result: $cf_cv_gnu_source" >&5
6272 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6273 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6274
6275         ;;
6276 mirbsd*) #(vi
6277         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6278         ;;
6279 netbsd*) #(vi
6280         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6281         ;;
6282 openbsd*) #(vi
6283         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6284         ;;
6285 osf[45]*) #(vi
6286         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6287         ;;
6288 nto-qnx*) #(vi
6289         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6290         ;;
6291 sco*) #(vi
6292         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6293         ;;
6294 solaris*) #(vi
6295         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6296         ;;
6297 *)
6298         echo "$as_me:6298: checking if we should define _XOPEN_SOURCE" >&5
6299 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6300 if test "${cf_cv_xopen_source+set}" = set; then
6301   echo $ECHO_N "(cached) $ECHO_C" >&6
6302 else
6303
6304         cat >conftest.$ac_ext <<_ACEOF
6305 #line 6305 "configure"
6306 #include "confdefs.h"
6307 #include <sys/types.h>
6308 int
6309 main ()
6310 {
6311
6312 #ifndef _XOPEN_SOURCE
6313 make an error
6314 #endif
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 rm -f conftest.$ac_objext
6320 if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5
6321   (eval $ac_compile) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit $ac_status); } &&
6325          { ac_try='test -s conftest.$ac_objext'
6326   { (eval echo "$as_me:6326: \"$ac_try\"") >&5
6327   (eval $ac_try) 2>&5
6328   ac_status=$?
6329   echo "$as_me:6329: \$? = $ac_status" >&5
6330   (exit $ac_status); }; }; then
6331   cf_cv_xopen_source=no
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6335 cf_save="$CPPFLAGS"
6336          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6337          cat >conftest.$ac_ext <<_ACEOF
6338 #line 6338 "configure"
6339 #include "confdefs.h"
6340 #include <sys/types.h>
6341 int
6342 main ()
6343 {
6344
6345 #ifdef _XOPEN_SOURCE
6346 make an error
6347 #endif
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext
6353 if { (eval echo "$as_me:6353: \"$ac_compile\"") >&5
6354   (eval $ac_compile) 2>&5
6355   ac_status=$?
6356   echo "$as_me:6356: \$? = $ac_status" >&5
6357   (exit $ac_status); } &&
6358          { ac_try='test -s conftest.$ac_objext'
6359   { (eval echo "$as_me:6359: \"$ac_try\"") >&5
6360   (eval $ac_try) 2>&5
6361   ac_status=$?
6362   echo "$as_me:6362: \$? = $ac_status" >&5
6363   (exit $ac_status); }; }; then
6364   cf_cv_xopen_source=no
6365 else
6366   echo "$as_me: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6369 fi
6370 rm -f conftest.$ac_objext conftest.$ac_ext
6371         CPPFLAGS="$cf_save"
6372
6373 fi
6374 rm -f conftest.$ac_objext conftest.$ac_ext
6375
6376 fi
6377 echo "$as_me:6377: result: $cf_cv_xopen_source" >&5
6378 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6379         if test "$cf_cv_xopen_source" != no ; then
6380
6381 # remove _XOPEN_SOURCE symbol from $CFLAGS
6382 CFLAGS=`echo "$CFLAGS" | \
6383         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6384                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6385
6386 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6387 CPPFLAGS=`echo "$CPPFLAGS" | \
6388         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6389                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6390
6391                 test "$cf_cv_cc_u_d_options" = yes && \
6392                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6393                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6394         fi
6395
6396 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6397
6398 cf_save_CFLAGS="$CFLAGS"
6399 cf_save_CPPFLAGS="$CPPFLAGS"
6400
6401 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6402 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6403         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6404                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6405
6406 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6407 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6408         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6409                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6410
6411 echo "$as_me:6411: checking if we should define _POSIX_C_SOURCE" >&5
6412 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6413 if test "${cf_cv_posix_c_source+set}" = set; then
6414   echo $ECHO_N "(cached) $ECHO_C" >&6
6415 else
6416
6417 echo "${as_me-configure}:6417: testing if the symbol is already defined go no further ..." 1>&5
6418
6419         cat >conftest.$ac_ext <<_ACEOF
6420 #line 6420 "configure"
6421 #include "confdefs.h"
6422 #include <sys/types.h>
6423 int
6424 main ()
6425 {
6426
6427 #ifndef _POSIX_C_SOURCE
6428 make an error
6429 #endif
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
6436   (eval $ac_compile) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest.$ac_objext'
6441   { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446   cf_cv_posix_c_source=no
6447 else
6448   echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6450 cf_want_posix_source=no
6451          case .$cf_POSIX_C_SOURCE in #(vi
6452          .[12]??*) #(vi
6453                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6454                 ;;
6455          .2) #(vi
6456                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6457                 cf_want_posix_source=yes
6458                 ;;
6459          .*)
6460                 cf_want_posix_source=yes
6461                 ;;
6462          esac
6463          if test "$cf_want_posix_source" = yes ; then
6464                 cat >conftest.$ac_ext <<_ACEOF
6465 #line 6465 "configure"
6466 #include "confdefs.h"
6467 #include <sys/types.h>
6468 int
6469 main ()
6470 {
6471
6472 #ifdef _POSIX_SOURCE
6473 make an error
6474 #endif
6475   ;
6476   return 0;
6477 }
6478 _ACEOF
6479 rm -f conftest.$ac_objext
6480 if { (eval echo "$as_me:6480: \"$ac_compile\"") >&5
6481   (eval $ac_compile) 2>&5
6482   ac_status=$?
6483   echo "$as_me:6483: \$? = $ac_status" >&5
6484   (exit $ac_status); } &&
6485          { ac_try='test -s conftest.$ac_objext'
6486   { (eval echo "$as_me:6486: \"$ac_try\"") >&5
6487   (eval $ac_try) 2>&5
6488   ac_status=$?
6489   echo "$as_me:6489: \$? = $ac_status" >&5
6490   (exit $ac_status); }; }; then
6491   :
6492 else
6493   echo "$as_me: failed program was:" >&5
6494 cat conftest.$ac_ext >&5
6495 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6496 fi
6497 rm -f conftest.$ac_objext conftest.$ac_ext
6498          fi
6499
6500 echo "${as_me-configure}:6500: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6501
6502          CFLAGS="$cf_trim_CFLAGS"
6503          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6504
6505 echo "${as_me-configure}:6505: testing if the second compile does not leave our definition intact error ..." 1>&5
6506
6507          cat >conftest.$ac_ext <<_ACEOF
6508 #line 6508 "configure"
6509 #include "confdefs.h"
6510 #include <sys/types.h>
6511 int
6512 main ()
6513 {
6514
6515 #ifndef _POSIX_C_SOURCE
6516 make an error
6517 #endif
6518   ;
6519   return 0;
6520 }
6521 _ACEOF
6522 rm -f conftest.$ac_objext
6523 if { (eval echo "$as_me:6523: \"$ac_compile\"") >&5
6524   (eval $ac_compile) 2>&5
6525   ac_status=$?
6526   echo "$as_me:6526: \$? = $ac_status" >&5
6527   (exit $ac_status); } &&
6528          { ac_try='test -s conftest.$ac_objext'
6529   { (eval echo "$as_me:6529: \"$ac_try\"") >&5
6530   (eval $ac_try) 2>&5
6531   ac_status=$?
6532   echo "$as_me:6532: \$? = $ac_status" >&5
6533   (exit $ac_status); }; }; then
6534   :
6535 else
6536   echo "$as_me: failed program was:" >&5
6537 cat conftest.$ac_ext >&5
6538 cf_cv_posix_c_source=no
6539 fi
6540 rm -f conftest.$ac_objext conftest.$ac_ext
6541          CFLAGS="$cf_save_CFLAGS"
6542          CPPFLAGS="$cf_save_CPPFLAGS"
6543
6544 fi
6545 rm -f conftest.$ac_objext conftest.$ac_ext
6546
6547 fi
6548 echo "$as_me:6548: result: $cf_cv_posix_c_source" >&5
6549 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6550
6551 if test "$cf_cv_posix_c_source" != no ; then
6552         CFLAGS="$cf_trim_CFLAGS"
6553         CPPFLAGS="$cf_trim_CPPFLAGS"
6554         if test "$cf_cv_cc_u_d_options" = yes ; then
6555                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6556                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6557                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6558         fi
6559         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6560 fi
6561
6562         ;;
6563 esac
6564
6565 # Work around breakage on OS X
6566
6567 echo "$as_me:6567: checking if SIGWINCH is defined" >&5
6568 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6569 if test "${cf_cv_define_sigwinch+set}" = set; then
6570   echo $ECHO_N "(cached) $ECHO_C" >&6
6571 else
6572
6573         cat >conftest.$ac_ext <<_ACEOF
6574 #line 6574 "configure"
6575 #include "confdefs.h"
6576
6577 #include <sys/types.h>
6578 #include <sys/signal.h>
6579
6580 int
6581 main ()
6582 {
6583 int x = SIGWINCH
6584   ;
6585   return 0;
6586 }
6587 _ACEOF
6588 rm -f conftest.$ac_objext
6589 if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5
6590   (eval $ac_compile) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); } &&
6594          { ac_try='test -s conftest.$ac_objext'
6595   { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6596   (eval $ac_try) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); }; }; then
6600   cf_cv_define_sigwinch=yes
6601 else
6602   echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 cat >conftest.$ac_ext <<_ACEOF
6605 #line 6605 "configure"
6606 #include "confdefs.h"
6607
6608 #undef _XOPEN_SOURCE
6609 #undef _POSIX_SOURCE
6610 #undef _POSIX_C_SOURCE
6611 #include <sys/types.h>
6612 #include <sys/signal.h>
6613
6614 int
6615 main ()
6616 {
6617 int x = SIGWINCH
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 rm -f conftest.$ac_objext
6623 if { (eval echo "$as_me:6623: \"$ac_compile\"") >&5
6624   (eval $ac_compile) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); } &&
6628          { ac_try='test -s conftest.$ac_objext'
6629   { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:6632: \$? = $ac_status" >&5
6633   (exit $ac_status); }; }; then
6634   cf_cv_define_sigwinch=maybe
6635 else
6636   echo "$as_me: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 cf_cv_define_sigwinch=no
6639 fi
6640 rm -f conftest.$ac_objext conftest.$ac_ext
6641
6642 fi
6643 rm -f conftest.$ac_objext conftest.$ac_ext
6644
6645 fi
6646 echo "$as_me:6646: result: $cf_cv_define_sigwinch" >&5
6647 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6648
6649 if test "$cf_cv_define_sigwinch" = maybe ; then
6650 echo "$as_me:6650: checking for actual SIGWINCH definition" >&5
6651 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6652 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6653   echo $ECHO_N "(cached) $ECHO_C" >&6
6654 else
6655
6656 cf_cv_fixup_sigwinch=unknown
6657 cf_sigwinch=32
6658 while test $cf_sigwinch != 1
6659 do
6660         cat >conftest.$ac_ext <<_ACEOF
6661 #line 6661 "configure"
6662 #include "confdefs.h"
6663
6664 #undef _XOPEN_SOURCE
6665 #undef _POSIX_SOURCE
6666 #undef _POSIX_C_SOURCE
6667 #include <sys/types.h>
6668 #include <sys/signal.h>
6669
6670 int
6671 main ()
6672 {
6673
6674 #if SIGWINCH != $cf_sigwinch
6675 make an error
6676 #endif
6677 int x = SIGWINCH
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext
6683 if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
6684   (eval $ac_compile) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } &&
6688          { ac_try='test -s conftest.$ac_objext'
6689   { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690   (eval $ac_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }; }; then
6694   cf_cv_fixup_sigwinch=$cf_sigwinch
6695          break
6696 else
6697   echo "$as_me: failed program was:" >&5
6698 cat conftest.$ac_ext >&5
6699 fi
6700 rm -f conftest.$ac_objext conftest.$ac_ext
6701
6702 cf_sigwinch=`expr $cf_sigwinch - 1`
6703 done
6704
6705 fi
6706 echo "$as_me:6706: result: $cf_cv_fixup_sigwinch" >&5
6707 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6708
6709         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6710                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6711         fi
6712 fi
6713
6714 # Checks for CODESET support.
6715
6716   echo "$as_me:6716: checking for nl_langinfo and CODESET" >&5
6717 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6718 if test "${am_cv_langinfo_codeset+set}" = set; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721   cat >conftest.$ac_ext <<_ACEOF
6722 #line 6722 "configure"
6723 #include "confdefs.h"
6724 #include <langinfo.h>
6725 int
6726 main ()
6727 {
6728 char* cs = nl_langinfo(CODESET);
6729   ;
6730   return 0;
6731 }
6732 _ACEOF
6733 rm -f conftest.$ac_objext conftest$ac_exeext
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735   (eval $ac_link) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit $ac_status); } &&
6739          { ac_try='test -s conftest$ac_exeext'
6740   { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); }; }; then
6745   am_cv_langinfo_codeset=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6749 am_cv_langinfo_codeset=no
6750 fi
6751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6752
6753 fi
6754 echo "$as_me:6754: result: $am_cv_langinfo_codeset" >&5
6755 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6756   if test $am_cv_langinfo_codeset = yes; then
6757
6758 cat >>confdefs.h <<\EOF
6759 #define HAVE_LANGINFO_CODESET 1
6760 EOF
6761
6762   fi
6763
6764 # use these variables to work around a defect in gcc's fixincludes.
6765 NCURSES_OK_WCHAR_T=
6766 NCURSES_OK_WINT_T=
6767
6768 echo "$as_me:6768: checking if you want wide-character code" >&5
6769 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6770
6771 # Check whether --enable-widec or --disable-widec was given.
6772 if test "${enable_widec+set}" = set; then
6773   enableval="$enable_widec"
6774   with_widec=$enableval
6775 else
6776   with_widec=no
6777 fi;
6778 echo "$as_me:6778: result: $with_widec" >&5
6779 echo "${ECHO_T}$with_widec" >&6
6780 if test "$with_widec" = yes ; then
6781         LIB_SUFFIX="w${LIB_SUFFIX}"
6782         cat >>confdefs.h <<\EOF
6783 #define USE_WIDEC_SUPPORT 1
6784 EOF
6785
6786 echo "$as_me:6786: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6787 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6788 cat >conftest.$ac_ext <<_ACEOF
6789 #line 6789 "configure"
6790 #include "confdefs.h"
6791 #include <sys/types.h>
6792
6793 int
6794 main ()
6795 {
6796
6797 #ifndef _XOPEN_SOURCE_EXTENDED
6798 make an error
6799 #endif
6800   ;
6801   return 0;
6802 }
6803 _ACEOF
6804 rm -f conftest.$ac_objext
6805 if { (eval echo "$as_me:6805: \"$ac_compile\"") >&5
6806   (eval $ac_compile) 2>&5
6807   ac_status=$?
6808   echo "$as_me:6808: \$? = $ac_status" >&5
6809   (exit $ac_status); } &&
6810          { ac_try='test -s conftest.$ac_objext'
6811   { (eval echo "$as_me:6811: \"$ac_try\"") >&5
6812   (eval $ac_try) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit $ac_status); }; }; then
6816   cf_result=no
6817 else
6818   echo "$as_me: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6820 cf_result=yes
6821 fi
6822 rm -f conftest.$ac_objext conftest.$ac_ext
6823 echo "$as_me:6823: result: $cf_result" >&5
6824 echo "${ECHO_T}$cf_result" >&6
6825
6826 if test "$cf_result" = yes ; then
6827         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6828 elif test "x" != "x" ; then
6829         echo "$as_me:6829: checking checking for compatible value versus " >&5
6830 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6831         cat >conftest.$ac_ext <<_ACEOF
6832 #line 6832 "configure"
6833 #include "confdefs.h"
6834 #include <sys/types.h>
6835
6836 int
6837 main ()
6838 {
6839
6840 #if _XOPEN_SOURCE_EXTENDED- < 0
6841 make an error
6842 #endif
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext
6848 if { (eval echo "$as_me:6848: \"$ac_compile\"") >&5
6849   (eval $ac_compile) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest.$ac_objext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   cf_result=yes
6860 else
6861   echo "$as_me: failed program was:" >&5
6862 cat conftest.$ac_ext >&5
6863 cf_result=no
6864 fi
6865 rm -f conftest.$ac_objext conftest.$ac_ext
6866         echo "$as_me:6866: result: $cf_result" >&5
6867 echo "${ECHO_T}$cf_result" >&6
6868         if test "$cf_result" = no ; then
6869                 # perhaps we can override it - try...
6870                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6871         fi
6872 fi
6873
6874         # with_overwrite=no
6875         NCURSES_CH_T=cchar_t
6876
6877 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6878 do
6879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6880 echo "$as_me:6880: checking for $ac_func" >&5
6881 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6882 if eval "test \"\${$as_ac_var+set}\" = set"; then
6883   echo $ECHO_N "(cached) $ECHO_C" >&6
6884 else
6885   cat >conftest.$ac_ext <<_ACEOF
6886 #line 6886 "configure"
6887 #include "confdefs.h"
6888 /* System header to define __stub macros and hopefully few prototypes,
6889     which can conflict with char $ac_func (); below.  */
6890 #include <assert.h>
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 #ifdef __cplusplus
6893 extern "C"
6894 #endif
6895 /* We use char because int might match the return type of a gcc2
6896    builtin and then its argument prototype would still apply.  */
6897 char $ac_func ();
6898 char (*f) ();
6899
6900 int
6901 main ()
6902 {
6903 /* The GNU C library defines this for functions which it implements
6904     to always fail with ENOSYS.  Some functions are actually named
6905     something starting with __ and the normal name is an alias.  */
6906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6907 choke me
6908 #else
6909 f = $ac_func;
6910 #endif
6911
6912   ;
6913   return 0;
6914 }
6915 _ACEOF
6916 rm -f conftest.$ac_objext conftest$ac_exeext
6917 if { (eval echo "$as_me:6917: \"$ac_link\"") >&5
6918   (eval $ac_link) 2>&5
6919   ac_status=$?
6920   echo "$as_me:6920: \$? = $ac_status" >&5
6921   (exit $ac_status); } &&
6922          { ac_try='test -s conftest$ac_exeext'
6923   { (eval echo "$as_me:6923: \"$ac_try\"") >&5
6924   (eval $ac_try) 2>&5
6925   ac_status=$?
6926   echo "$as_me:6926: \$? = $ac_status" >&5
6927   (exit $ac_status); }; }; then
6928   eval "$as_ac_var=yes"
6929 else
6930   echo "$as_me: failed program was:" >&5
6931 cat conftest.$ac_ext >&5
6932 eval "$as_ac_var=no"
6933 fi
6934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6935 fi
6936 echo "$as_me:6936: result: `eval echo '${'$as_ac_var'}'`" >&5
6937 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6938 if test `eval echo '${'$as_ac_var'}'` = yes; then
6939   cat >>confdefs.h <<EOF
6940 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6941 EOF
6942
6943 fi
6944 done
6945
6946         if test "$ac_cv_func_putwc" != yes ; then
6947
6948 echo "$as_me:6948: checking for putwc in libutf8" >&5
6949 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6950 if test "${cf_cv_libutf8+set}" = set; then
6951   echo $ECHO_N "(cached) $ECHO_C" >&6
6952 else
6953
6954         cf_save_LIBS="$LIBS"
6955         LIBS="-lutf8 $LIBS"
6956 cat >conftest.$ac_ext <<_ACEOF
6957 #line 6957 "configure"
6958 #include "confdefs.h"
6959
6960 #include <libutf8.h>
6961 int
6962 main ()
6963 {
6964 putwc(0,0);
6965   ;
6966   return 0;
6967 }
6968 _ACEOF
6969 rm -f conftest.$ac_objext conftest$ac_exeext
6970 if { (eval echo "$as_me:6970: \"$ac_link\"") >&5
6971   (eval $ac_link) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); } &&
6975          { ac_try='test -s conftest$ac_exeext'
6976   { (eval echo "$as_me:6976: \"$ac_try\"") >&5
6977   (eval $ac_try) 2>&5
6978   ac_status=$?
6979   echo "$as_me:6979: \$? = $ac_status" >&5
6980   (exit $ac_status); }; }; then
6981   cf_cv_libutf8=yes
6982 else
6983   echo "$as_me: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 cf_cv_libutf8=no
6986 fi
6987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6988         LIBS="$cf_save_LIBS"
6989
6990 fi
6991 echo "$as_me:6991: result: $cf_cv_libutf8" >&5
6992 echo "${ECHO_T}$cf_cv_libutf8" >&6
6993
6994 if test "$cf_cv_libutf8" = yes ; then
6995         cat >>confdefs.h <<\EOF
6996 #define HAVE_LIBUTF8_H 1
6997 EOF
6998
6999         LIBS="-lutf8 $LIBS"
7000 fi
7001
7002                 if test "$cf_cv_libutf8" = yes ; then
7003                         NCURSES_LIBUTF8=1
7004                 fi
7005         fi
7006
7007 # This is needed on Tru64 5.0 to declare mbstate_t
7008 echo "$as_me:7008: checking if we must include wchar.h to declare mbstate_t" >&5
7009 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7010 if test "${cf_cv_mbstate_t+set}" = set; then
7011   echo $ECHO_N "(cached) $ECHO_C" >&6
7012 else
7013
7014 cat >conftest.$ac_ext <<_ACEOF
7015 #line 7015 "configure"
7016 #include "confdefs.h"
7017
7018 #include <stdlib.h>
7019 #include <stdarg.h>
7020 #include <stdio.h>
7021 #ifdef HAVE_LIBUTF8_H
7022 #include <libutf8.h>
7023 #endif
7024 int
7025 main ()
7026 {
7027 mbstate_t state
7028   ;
7029   return 0;
7030 }
7031 _ACEOF
7032 rm -f conftest.$ac_objext
7033 if { (eval echo "$as_me:7033: \"$ac_compile\"") >&5
7034   (eval $ac_compile) 2>&5
7035   ac_status=$?
7036   echo "$as_me:7036: \$? = $ac_status" >&5
7037   (exit $ac_status); } &&
7038          { ac_try='test -s conftest.$ac_objext'
7039   { (eval echo "$as_me:7039: \"$ac_try\"") >&5
7040   (eval $ac_try) 2>&5
7041   ac_status=$?
7042   echo "$as_me:7042: \$? = $ac_status" >&5
7043   (exit $ac_status); }; }; then
7044   cf_cv_mbstate_t=no
7045 else
7046   echo "$as_me: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7048 cat >conftest.$ac_ext <<_ACEOF
7049 #line 7049 "configure"
7050 #include "confdefs.h"
7051
7052 #include <stdlib.h>
7053 #include <stdarg.h>
7054 #include <stdio.h>
7055 #include <wchar.h>
7056 #ifdef HAVE_LIBUTF8_H
7057 #include <libutf8.h>
7058 #endif
7059 int
7060 main ()
7061 {
7062 mbstate_t value
7063   ;
7064   return 0;
7065 }
7066 _ACEOF
7067 rm -f conftest.$ac_objext
7068 if { (eval echo "$as_me:7068: \"$ac_compile\"") >&5
7069   (eval $ac_compile) 2>&5
7070   ac_status=$?
7071   echo "$as_me:7071: \$? = $ac_status" >&5
7072   (exit $ac_status); } &&
7073          { ac_try='test -s conftest.$ac_objext'
7074   { (eval echo "$as_me:7074: \"$ac_try\"") >&5
7075   (eval $ac_try) 2>&5
7076   ac_status=$?
7077   echo "$as_me:7077: \$? = $ac_status" >&5
7078   (exit $ac_status); }; }; then
7079   cf_cv_mbstate_t=yes
7080 else
7081   echo "$as_me: failed program was:" >&5
7082 cat conftest.$ac_ext >&5
7083 cf_cv_mbstate_t=unknown
7084 fi
7085 rm -f conftest.$ac_objext conftest.$ac_ext
7086 fi
7087 rm -f conftest.$ac_objext conftest.$ac_ext
7088 fi
7089 echo "$as_me:7089: result: $cf_cv_mbstate_t" >&5
7090 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7091
7092 if test "$cf_cv_mbstate_t" = yes ; then
7093         cat >>confdefs.h <<\EOF
7094 #define NEED_WCHAR_H 1
7095 EOF
7096
7097         NEED_WCHAR_H=1
7098 fi
7099
7100 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7101 if test "$cf_cv_mbstate_t" = unknown ; then
7102         NCURSES_MBSTATE_T=1
7103 fi
7104
7105 # This is needed on Tru64 5.0 to declare wchar_t
7106 echo "$as_me:7106: checking if we must include wchar.h to declare wchar_t" >&5
7107 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7108 if test "${cf_cv_wchar_t+set}" = set; then
7109   echo $ECHO_N "(cached) $ECHO_C" >&6
7110 else
7111
7112 cat >conftest.$ac_ext <<_ACEOF
7113 #line 7113 "configure"
7114 #include "confdefs.h"
7115
7116 #include <stdlib.h>
7117 #include <stdarg.h>
7118 #include <stdio.h>
7119 #ifdef HAVE_LIBUTF8_H
7120 #include <libutf8.h>
7121 #endif
7122 int
7123 main ()
7124 {
7125 wchar_t state
7126   ;
7127   return 0;
7128 }
7129 _ACEOF
7130 rm -f conftest.$ac_objext
7131 if { (eval echo "$as_me:7131: \"$ac_compile\"") >&5
7132   (eval $ac_compile) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit $ac_status); } &&
7136          { ac_try='test -s conftest.$ac_objext'
7137   { (eval echo "$as_me:7137: \"$ac_try\"") >&5
7138   (eval $ac_try) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); }; }; then
7142   cf_cv_wchar_t=no
7143 else
7144   echo "$as_me: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 cat >conftest.$ac_ext <<_ACEOF
7147 #line 7147 "configure"
7148 #include "confdefs.h"
7149
7150 #include <stdlib.h>
7151 #include <stdarg.h>
7152 #include <stdio.h>
7153 #include <wchar.h>
7154 #ifdef HAVE_LIBUTF8_H
7155 #include <libutf8.h>
7156 #endif
7157 int
7158 main ()
7159 {
7160 wchar_t value
7161   ;
7162   return 0;
7163 }
7164 _ACEOF
7165 rm -f conftest.$ac_objext
7166 if { (eval echo "$as_me:7166: \"$ac_compile\"") >&5
7167   (eval $ac_compile) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); } &&
7171          { ac_try='test -s conftest.$ac_objext'
7172   { (eval echo "$as_me:7172: \"$ac_try\"") >&5
7173   (eval $ac_try) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit $ac_status); }; }; then
7177   cf_cv_wchar_t=yes
7178 else
7179   echo "$as_me: failed program was:" >&5
7180 cat conftest.$ac_ext >&5
7181 cf_cv_wchar_t=unknown
7182 fi
7183 rm -f conftest.$ac_objext conftest.$ac_ext
7184 fi
7185 rm -f conftest.$ac_objext conftest.$ac_ext
7186 fi
7187 echo "$as_me:7187: result: $cf_cv_wchar_t" >&5
7188 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7189
7190 if test "$cf_cv_wchar_t" = yes ; then
7191         cat >>confdefs.h <<\EOF
7192 #define NEED_WCHAR_H 1
7193 EOF
7194
7195         NEED_WCHAR_H=1
7196 fi
7197
7198 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7199 if test "$cf_cv_wchar_t" = unknown ; then
7200         NCURSES_WCHAR_T=1
7201 fi
7202
7203 # if we find wchar_t in either place, use substitution to provide a fallback.
7204 if test "$cf_cv_wchar_t" != unknown ; then
7205         NCURSES_OK_WCHAR_T=1
7206 fi
7207
7208 # This is needed on Tru64 5.0 to declare wint_t
7209 echo "$as_me:7209: checking if we must include wchar.h to declare wint_t" >&5
7210 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7211 if test "${cf_cv_wint_t+set}" = set; then
7212   echo $ECHO_N "(cached) $ECHO_C" >&6
7213 else
7214
7215 cat >conftest.$ac_ext <<_ACEOF
7216 #line 7216 "configure"
7217 #include "confdefs.h"
7218
7219 #include <stdlib.h>
7220 #include <stdarg.h>
7221 #include <stdio.h>
7222 #ifdef HAVE_LIBUTF8_H
7223 #include <libutf8.h>
7224 #endif
7225 int
7226 main ()
7227 {
7228 wint_t state
7229   ;
7230   return 0;
7231 }
7232 _ACEOF
7233 rm -f conftest.$ac_objext
7234 if { (eval echo "$as_me:7234: \"$ac_compile\"") >&5
7235   (eval $ac_compile) 2>&5
7236   ac_status=$?
7237   echo "$as_me:7237: \$? = $ac_status" >&5
7238   (exit $ac_status); } &&
7239          { ac_try='test -s conftest.$ac_objext'
7240   { (eval echo "$as_me:7240: \"$ac_try\"") >&5
7241   (eval $ac_try) 2>&5
7242   ac_status=$?
7243   echo "$as_me:7243: \$? = $ac_status" >&5
7244   (exit $ac_status); }; }; then
7245   cf_cv_wint_t=no
7246 else
7247   echo "$as_me: failed program was:" >&5
7248 cat conftest.$ac_ext >&5
7249 cat >conftest.$ac_ext <<_ACEOF
7250 #line 7250 "configure"
7251 #include "confdefs.h"
7252
7253 #include <stdlib.h>
7254 #include <stdarg.h>
7255 #include <stdio.h>
7256 #include <wchar.h>
7257 #ifdef HAVE_LIBUTF8_H
7258 #include <libutf8.h>
7259 #endif
7260 int
7261 main ()
7262 {
7263 wint_t value
7264   ;
7265   return 0;
7266 }
7267 _ACEOF
7268 rm -f conftest.$ac_objext
7269 if { (eval echo "$as_me:7269: \"$ac_compile\"") >&5
7270   (eval $ac_compile) 2>&5
7271   ac_status=$?
7272   echo "$as_me:7272: \$? = $ac_status" >&5
7273   (exit $ac_status); } &&
7274          { ac_try='test -s conftest.$ac_objext'
7275   { (eval echo "$as_me:7275: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:7278: \$? = $ac_status" >&5
7279   (exit $ac_status); }; }; then
7280   cf_cv_wint_t=yes
7281 else
7282   echo "$as_me: failed program was:" >&5
7283 cat conftest.$ac_ext >&5
7284 cf_cv_wint_t=unknown
7285 fi
7286 rm -f conftest.$ac_objext conftest.$ac_ext
7287 fi
7288 rm -f conftest.$ac_objext conftest.$ac_ext
7289 fi
7290 echo "$as_me:7290: result: $cf_cv_wint_t" >&5
7291 echo "${ECHO_T}$cf_cv_wint_t" >&6
7292
7293 if test "$cf_cv_wint_t" = yes ; then
7294         cat >>confdefs.h <<\EOF
7295 #define NEED_WCHAR_H 1
7296 EOF
7297
7298         NEED_WCHAR_H=1
7299 fi
7300
7301 # if we do not find wint_t in either place, use substitution to provide a fallback.
7302 if test "$cf_cv_wint_t" = unknown ; then
7303         NCURSES_WINT_T=1
7304 fi
7305
7306 # if we find wint_t in either place, use substitution to provide a fallback.
7307 if test "$cf_cv_wint_t" != unknown ; then
7308         NCURSES_OK_WINT_T=1
7309 fi
7310
7311         if test "$NCURSES_MBSTATE_T" != 0; then
7312                 cat >>confdefs.h <<\EOF
7313 #define NEED_MBSTATE_T_DEF 1
7314 EOF
7315
7316         fi
7317 fi
7318
7319 ###   use option --disable-lp64 to allow long chtype
7320 case $cf_cv_abi_version in
7321 [345]*)
7322         default_with_lp64=no
7323         ;;
7324 *)
7325         default_with_lp64=yes
7326         ;;
7327 esac
7328
7329 echo "$as_me:7329: checking whether to enable _LP64 definition in curses.h" >&5
7330 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7331
7332 # Check whether --enable-lp64 or --disable-lp64 was given.
7333 if test "${enable_lp64+set}" = set; then
7334   enableval="$enable_lp64"
7335   with_lp64=$enableval
7336 else
7337   with_lp64=$default_with_lp64
7338 fi;
7339 echo "$as_me:7339: result: $with_lp64" >&5
7340 echo "${ECHO_T}$with_lp64" >&6
7341
7342 if test "$with_lp64" = yes ; then
7343         cf_cv_enable_lp64=1
7344 else
7345         cf_cv_enable_lp64=0
7346 fi
7347
7348 # Check whether --enable-largefile or --disable-largefile was given.
7349 if test "${enable_largefile+set}" = set; then
7350   enableval="$enable_largefile"
7351
7352 fi;
7353 if test "$enable_largefile" != no; then
7354
7355   echo "$as_me:7355: checking for special C compiler options needed for large files" >&5
7356 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7357 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7358   echo $ECHO_N "(cached) $ECHO_C" >&6
7359 else
7360   ac_cv_sys_largefile_CC=no
7361      if test "$GCC" != yes; then
7362        ac_save_CC=$CC
7363        while :; do
7364          # IRIX 6.2 and later do not support large files by default,
7365          # so use the C compiler's -n32 option if that helps.
7366          cat >conftest.$ac_ext <<_ACEOF
7367 #line 7367 "configure"
7368 #include "confdefs.h"
7369 #include <sys/types.h>
7370  /* Check that off_t can represent 2**63 - 1 correctly.
7371     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7372     since some C++ compilers masquerading as C compilers
7373     incorrectly reject 9223372036854775807.  */
7374 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7375   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7376                        && LARGE_OFF_T % 2147483647 == 1)
7377                       ? 1 : -1];
7378 int
7379 main ()
7380 {
7381
7382   ;
7383   return 0;
7384 }
7385 _ACEOF
7386          rm -f conftest.$ac_objext
7387 if { (eval echo "$as_me:7387: \"$ac_compile\"") >&5
7388   (eval $ac_compile) 2>&5
7389   ac_status=$?
7390   echo "$as_me:7390: \$? = $ac_status" >&5
7391   (exit $ac_status); } &&
7392          { ac_try='test -s conftest.$ac_objext'
7393   { (eval echo "$as_me:7393: \"$ac_try\"") >&5
7394   (eval $ac_try) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); }; }; then
7398   break
7399 else
7400   echo "$as_me: failed program was:" >&5
7401 cat conftest.$ac_ext >&5
7402 fi
7403 rm -f conftest.$ac_objext
7404          CC="$CC -n32"
7405          rm -f conftest.$ac_objext
7406 if { (eval echo "$as_me:7406: \"$ac_compile\"") >&5
7407   (eval $ac_compile) 2>&5
7408   ac_status=$?
7409   echo "$as_me:7409: \$? = $ac_status" >&5
7410   (exit $ac_status); } &&
7411          { ac_try='test -s conftest.$ac_objext'
7412   { (eval echo "$as_me:7412: \"$ac_try\"") >&5
7413   (eval $ac_try) 2>&5
7414   ac_status=$?
7415   echo "$as_me:7415: \$? = $ac_status" >&5
7416   (exit $ac_status); }; }; then
7417   ac_cv_sys_largefile_CC=' -n32'; break
7418 else
7419   echo "$as_me: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7421 fi
7422 rm -f conftest.$ac_objext
7423          break
7424        done
7425        CC=$ac_save_CC
7426        rm -f conftest.$ac_ext
7427     fi
7428 fi
7429 echo "$as_me:7429: result: $ac_cv_sys_largefile_CC" >&5
7430 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7431   if test "$ac_cv_sys_largefile_CC" != no; then
7432     CC=$CC$ac_cv_sys_largefile_CC
7433   fi
7434
7435   echo "$as_me:7435: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7436 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7437 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7438   echo $ECHO_N "(cached) $ECHO_C" >&6
7439 else
7440   while :; do
7441   ac_cv_sys_file_offset_bits=no
7442   cat >conftest.$ac_ext <<_ACEOF
7443 #line 7443 "configure"
7444 #include "confdefs.h"
7445 #include <sys/types.h>
7446  /* Check that off_t can represent 2**63 - 1 correctly.
7447     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7448     since some C++ compilers masquerading as C compilers
7449     incorrectly reject 9223372036854775807.  */
7450 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7451   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7452                        && LARGE_OFF_T % 2147483647 == 1)
7453                       ? 1 : -1];
7454 int
7455 main ()
7456 {
7457
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 rm -f conftest.$ac_objext
7463 if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
7464   (eval $ac_compile) 2>&5
7465   ac_status=$?
7466   echo "$as_me:7466: \$? = $ac_status" >&5
7467   (exit $ac_status); } &&
7468          { ac_try='test -s conftest.$ac_objext'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); }; }; then
7474   break
7475 else
7476   echo "$as_me: failed program was:" >&5
7477 cat conftest.$ac_ext >&5
7478 fi
7479 rm -f conftest.$ac_objext conftest.$ac_ext
7480   cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 #define _FILE_OFFSET_BITS 64
7484 #include <sys/types.h>
7485  /* Check that off_t can represent 2**63 - 1 correctly.
7486     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7487     since some C++ compilers masquerading as C compilers
7488     incorrectly reject 9223372036854775807.  */
7489 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7490   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7491                        && LARGE_OFF_T % 2147483647 == 1)
7492                       ? 1 : -1];
7493 int
7494 main ()
7495 {
7496
7497   ;
7498   return 0;
7499 }
7500 _ACEOF
7501 rm -f conftest.$ac_objext
7502 if { (eval echo "$as_me:7502: \"$ac_compile\"") >&5
7503   (eval $ac_compile) 2>&5
7504   ac_status=$?
7505   echo "$as_me:7505: \$? = $ac_status" >&5
7506   (exit $ac_status); } &&
7507          { ac_try='test -s conftest.$ac_objext'
7508   { (eval echo "$as_me:7508: \"$ac_try\"") >&5
7509   (eval $ac_try) 2>&5
7510   ac_status=$?
7511   echo "$as_me:7511: \$? = $ac_status" >&5
7512   (exit $ac_status); }; }; then
7513   ac_cv_sys_file_offset_bits=64; break
7514 else
7515   echo "$as_me: failed program was:" >&5
7516 cat conftest.$ac_ext >&5
7517 fi
7518 rm -f conftest.$ac_objext conftest.$ac_ext
7519   break
7520 done
7521 fi
7522 echo "$as_me:7522: result: $ac_cv_sys_file_offset_bits" >&5
7523 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7524 if test "$ac_cv_sys_file_offset_bits" != no; then
7525
7526 cat >>confdefs.h <<EOF
7527 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7528 EOF
7529
7530 fi
7531 rm -f conftest*
7532   echo "$as_me:7532: checking for _LARGE_FILES value needed for large files" >&5
7533 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7534 if test "${ac_cv_sys_large_files+set}" = set; then
7535   echo $ECHO_N "(cached) $ECHO_C" >&6
7536 else
7537   while :; do
7538   ac_cv_sys_large_files=no
7539   cat >conftest.$ac_ext <<_ACEOF
7540 #line 7540 "configure"
7541 #include "confdefs.h"
7542 #include <sys/types.h>
7543  /* Check that off_t can represent 2**63 - 1 correctly.
7544     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7545     since some C++ compilers masquerading as C compilers
7546     incorrectly reject 9223372036854775807.  */
7547 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7548   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7549                        && LARGE_OFF_T % 2147483647 == 1)
7550                       ? 1 : -1];
7551 int
7552 main ()
7553 {
7554
7555   ;
7556   return 0;
7557 }
7558 _ACEOF
7559 rm -f conftest.$ac_objext
7560 if { (eval echo "$as_me:7560: \"$ac_compile\"") >&5
7561   (eval $ac_compile) 2>&5
7562   ac_status=$?
7563   echo "$as_me:7563: \$? = $ac_status" >&5
7564   (exit $ac_status); } &&
7565          { ac_try='test -s conftest.$ac_objext'
7566   { (eval echo "$as_me:7566: \"$ac_try\"") >&5
7567   (eval $ac_try) 2>&5
7568   ac_status=$?
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); }; }; then
7571   break
7572 else
7573   echo "$as_me: failed program was:" >&5
7574 cat conftest.$ac_ext >&5
7575 fi
7576 rm -f conftest.$ac_objext conftest.$ac_ext
7577   cat >conftest.$ac_ext <<_ACEOF
7578 #line 7578 "configure"
7579 #include "confdefs.h"
7580 #define _LARGE_FILES 1
7581 #include <sys/types.h>
7582  /* Check that off_t can represent 2**63 - 1 correctly.
7583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7584     since some C++ compilers masquerading as C compilers
7585     incorrectly reject 9223372036854775807.  */
7586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7588                        && LARGE_OFF_T % 2147483647 == 1)
7589                       ? 1 : -1];
7590 int
7591 main ()
7592 {
7593
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 rm -f conftest.$ac_objext
7599 if { (eval echo "$as_me:7599: \"$ac_compile\"") >&5
7600   (eval $ac_compile) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); } &&
7604          { ac_try='test -s conftest.$ac_objext'
7605   { (eval echo "$as_me:7605: \"$ac_try\"") >&5
7606   (eval $ac_try) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); }; }; then
7610   ac_cv_sys_large_files=1; break
7611 else
7612   echo "$as_me: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 fi
7615 rm -f conftest.$ac_objext conftest.$ac_ext
7616   break
7617 done
7618 fi
7619 echo "$as_me:7619: result: $ac_cv_sys_large_files" >&5
7620 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7621 if test "$ac_cv_sys_large_files" != no; then
7622
7623 cat >>confdefs.h <<EOF
7624 #define _LARGE_FILES $ac_cv_sys_large_files
7625 EOF
7626
7627 fi
7628 rm -f conftest*
7629 fi
7630
7631     if test "$enable_largefile" != no ; then
7632         echo "$as_me:7632: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7633 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7634 if test "${ac_cv_sys_largefile_source+set}" = set; then
7635   echo $ECHO_N "(cached) $ECHO_C" >&6
7636 else
7637   while :; do
7638   ac_cv_sys_largefile_source=no
7639   cat >conftest.$ac_ext <<_ACEOF
7640 #line 7640 "configure"
7641 #include "confdefs.h"
7642 #include <stdio.h>
7643 int
7644 main ()
7645 {
7646 return !fseeko;
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 rm -f conftest.$ac_objext
7652 if { (eval echo "$as_me:7652: \"$ac_compile\"") >&5
7653   (eval $ac_compile) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); } &&
7657          { ac_try='test -s conftest.$ac_objext'
7658   { (eval echo "$as_me:7658: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); }; }; then
7663   break
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 fi
7668 rm -f conftest.$ac_objext conftest.$ac_ext
7669   cat >conftest.$ac_ext <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672 #define _LARGEFILE_SOURCE 1
7673 #include <stdio.h>
7674 int
7675 main ()
7676 {
7677 return !fseeko;
7678   ;
7679   return 0;
7680 }
7681 _ACEOF
7682 rm -f conftest.$ac_objext
7683 if { (eval echo "$as_me:7683: \"$ac_compile\"") >&5
7684   (eval $ac_compile) 2>&5
7685   ac_status=$?
7686   echo "$as_me:7686: \$? = $ac_status" >&5
7687   (exit $ac_status); } &&
7688          { ac_try='test -s conftest.$ac_objext'
7689   { (eval echo "$as_me:7689: \"$ac_try\"") >&5
7690   (eval $ac_try) 2>&5
7691   ac_status=$?
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit $ac_status); }; }; then
7694   ac_cv_sys_largefile_source=1; break
7695 else
7696   echo "$as_me: failed program was:" >&5
7697 cat conftest.$ac_ext >&5
7698 fi
7699 rm -f conftest.$ac_objext conftest.$ac_ext
7700   break
7701 done
7702 fi
7703 echo "$as_me:7703: result: $ac_cv_sys_largefile_source" >&5
7704 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7705 if test "$ac_cv_sys_largefile_source" != no; then
7706
7707 cat >>confdefs.h <<EOF
7708 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7709 EOF
7710
7711 fi
7712 rm -f conftest*
7713
7714 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7715 # in glibc 2.1.3, but that breaks too many other things.
7716 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7717 echo "$as_me:7717: checking for fseeko" >&5
7718 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7719 if test "${ac_cv_func_fseeko+set}" = set; then
7720   echo $ECHO_N "(cached) $ECHO_C" >&6
7721 else
7722   cat >conftest.$ac_ext <<_ACEOF
7723 #line 7723 "configure"
7724 #include "confdefs.h"
7725 #include <stdio.h>
7726 int
7727 main ()
7728 {
7729 return fseeko && fseeko (stdin, 0, 0);
7730   ;
7731   return 0;
7732 }
7733 _ACEOF
7734 rm -f conftest.$ac_objext conftest$ac_exeext
7735 if { (eval echo "$as_me:7735: \"$ac_link\"") >&5
7736   (eval $ac_link) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit $ac_status); } &&
7740          { ac_try='test -s conftest$ac_exeext'
7741   { (eval echo "$as_me:7741: \"$ac_try\"") >&5
7742   (eval $ac_try) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); }; }; then
7746   ac_cv_func_fseeko=yes
7747 else
7748   echo "$as_me: failed program was:" >&5
7749 cat conftest.$ac_ext >&5
7750 ac_cv_func_fseeko=no
7751 fi
7752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7753 fi
7754 echo "$as_me:7754: result: $ac_cv_func_fseeko" >&5
7755 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7756 if test $ac_cv_func_fseeko = yes; then
7757
7758 cat >>confdefs.h <<\EOF
7759 #define HAVE_FSEEKO 1
7760 EOF
7761
7762 fi
7763
7764         # Normally we would collect these definitions in the config.h,
7765         # but (like _XOPEN_SOURCE), some environments rely on having these
7766         # defined before any of the system headers are included.  Another
7767         # case comes up with C++, e.g., on AIX the compiler compiles the
7768         # header files by themselves before looking at the body files it is
7769         # told to compile.  For ncurses, those header files do not include
7770         # the config.h
7771         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7772         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7773         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7774
7775         echo "$as_me:7775: checking whether to use struct dirent64" >&5
7776 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7777 if test "${cf_cv_struct_dirent64+set}" = set; then
7778   echo $ECHO_N "(cached) $ECHO_C" >&6
7779 else
7780
7781                 cat >conftest.$ac_ext <<_ACEOF
7782 #line 7782 "configure"
7783 #include "confdefs.h"
7784
7785 #include <sys/types.h>
7786 #include <dirent.h>
7787
7788 int
7789 main ()
7790 {
7791
7792                 /* if transitional largefile support is setup, this is true */
7793                 extern struct dirent64 * readdir(DIR *);
7794                 struct dirent64 *x = readdir((DIR *)0);
7795                 struct dirent *y = readdir((DIR *)0);
7796                 int z = x - y;
7797
7798   ;
7799   return 0;
7800 }
7801 _ACEOF
7802 rm -f conftest.$ac_objext
7803 if { (eval echo "$as_me:7803: \"$ac_compile\"") >&5
7804   (eval $ac_compile) 2>&5
7805   ac_status=$?
7806   echo "$as_me:7806: \$? = $ac_status" >&5
7807   (exit $ac_status); } &&
7808          { ac_try='test -s conftest.$ac_objext'
7809   { (eval echo "$as_me:7809: \"$ac_try\"") >&5
7810   (eval $ac_try) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); }; }; then
7814   cf_cv_struct_dirent64=yes
7815 else
7816   echo "$as_me: failed program was:" >&5
7817 cat conftest.$ac_ext >&5
7818 cf_cv_struct_dirent64=no
7819 fi
7820 rm -f conftest.$ac_objext conftest.$ac_ext
7821
7822 fi
7823 echo "$as_me:7823: result: $cf_cv_struct_dirent64" >&5
7824 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7825         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7826 #define HAVE_STRUCT_DIRENT64 1
7827 EOF
7828
7829     fi
7830
7831 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7832 echo "$as_me:7832: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7833 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7834
7835 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7836 if test "${enable_tparm_varargs+set}" = set; then
7837   enableval="$enable_tparm_varargs"
7838   with_tparm_varargs=$enableval
7839 else
7840   with_tparm_varargs=yes
7841 fi;
7842 echo "$as_me:7842: result: $with_tparm_varargs" >&5
7843 echo "${ECHO_T}$with_tparm_varargs" >&6
7844 NCURSES_TPARM_VARARGS=0
7845 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7846
7847 ###   use option --with-bool to override bool's type
7848 echo "$as_me:7848: checking for type of bool" >&5
7849 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7850
7851 # Check whether --with-bool or --without-bool was given.
7852 if test "${with_bool+set}" = set; then
7853   withval="$with_bool"
7854   NCURSES_BOOL="$withval"
7855 else
7856   NCURSES_BOOL=auto
7857 fi;
7858 echo "$as_me:7858: result: $NCURSES_BOOL" >&5
7859 echo "${ECHO_T}$NCURSES_BOOL" >&6
7860
7861 echo "$as_me:7861: checking for alternate terminal capabilities file" >&5
7862 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7863
7864 # Check whether --with-caps or --without-caps was given.
7865 if test "${with_caps+set}" = set; then
7866   withval="$with_caps"
7867   TERMINFO_CAPS=Caps.$withval
7868 else
7869   TERMINFO_CAPS=Caps
7870 fi;
7871 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7872 echo "$as_me:7872: result: $TERMINFO_CAPS" >&5
7873 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7874
7875 ###   use option --with-chtype to override chtype's type
7876 echo "$as_me:7876: checking for type of chtype" >&5
7877 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7878
7879 # Check whether --with-chtype or --without-chtype was given.
7880 if test "${with_chtype+set}" = set; then
7881   withval="$with_chtype"
7882   NCURSES_CHTYPE="$withval"
7883 else
7884   NCURSES_CHTYPE=auto
7885 fi;
7886 echo "$as_me:7886: result: $NCURSES_CHTYPE" >&5
7887 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7888
7889 ###   use option --with-ospeed to override ospeed's type
7890 echo "$as_me:7890: checking for type of ospeed" >&5
7891 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7892
7893 # Check whether --with-ospeed or --without-ospeed was given.
7894 if test "${with_ospeed+set}" = set; then
7895   withval="$with_ospeed"
7896   NCURSES_OSPEED="$withval"
7897 else
7898   NCURSES_OSPEED=short
7899 fi;
7900 echo "$as_me:7900: result: $NCURSES_OSPEED" >&5
7901 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7902
7903 ###   use option --with-mmask-t to override mmask_t's type
7904 echo "$as_me:7904: checking for type of mmask_t" >&5
7905 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7906
7907 # Check whether --with-mmask-t or --without-mmask-t was given.
7908 if test "${with_mmask_t+set}" = set; then
7909   withval="$with_mmask_t"
7910   NCURSES_MMASK_T="$withval"
7911 else
7912   NCURSES_MMASK_T=auto
7913 fi;
7914 echo "$as_me:7914: result: $NCURSES_MMASK_T" >&5
7915 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7916
7917 ### Enable compiling-in rcs id's
7918 echo "$as_me:7918: checking if RCS identifiers should be compiled-in" >&5
7919 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7920
7921 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7922 if test "${with_rcs_ids+set}" = set; then
7923   withval="$with_rcs_ids"
7924   with_rcs_ids=$withval
7925 else
7926   with_rcs_ids=no
7927 fi;
7928 echo "$as_me:7928: result: $with_rcs_ids" >&5
7929 echo "${ECHO_T}$with_rcs_ids" >&6
7930 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7931 #define USE_RCS_IDS 1
7932 EOF
7933
7934 ###############################################################################
7935
7936 echo "$as_me:7936: checking format of man-pages" >&5
7937 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7938
7939 # Check whether --with-manpage-format or --without-manpage-format was given.
7940 if test "${with_manpage_format+set}" = set; then
7941   withval="$with_manpage_format"
7942   MANPAGE_FORMAT=$withval
7943 else
7944   MANPAGE_FORMAT=unknown
7945 fi;
7946
7947 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7948 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7949
7950 cf_unknown=
7951
7952 case $MANPAGE_FORMAT in
7953 unknown)
7954   if test -z "$MANPATH" ; then
7955     MANPATH="/usr/man:/usr/share/man"
7956   fi
7957
7958   # look for the 'date' man-page (it's most likely to be installed!)
7959   MANPAGE_FORMAT=
7960   cf_preform=no
7961   cf_catonly=yes
7962   cf_example=date
7963
7964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7965   for cf_dir in $MANPATH; do
7966     test -z "$cf_dir" && cf_dir=/usr/man
7967     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
7968     do
7969       cf_test=`echo $cf_name | sed -e 's/*//'`
7970       if test "x$cf_test" = "x$cf_name" ; then
7971
7972         case "$cf_name" in
7973         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7974         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7975         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7976         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7977         esac
7978
7979         case "$cf_name" in
7980         $cf_dir/man*)
7981           cf_catonly=no
7982           ;;
7983         $cf_dir/cat*)
7984           cf_preform=yes
7985           ;;
7986         esac
7987         break
7988       fi
7989
7990       # if we found a match in either man* or cat*, stop looking
7991       if test -n "$MANPAGE_FORMAT" ; then
7992         cf_found=no
7993         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7994         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7995         case "$cf_name" in
7996         $cf_dir/cat*)
7997           cf_found=yes
7998           ;;
7999         esac
8000         test $cf_found=yes && break
8001       fi
8002     done
8003     # only check the first directory in $MANPATH where we find manpages
8004     if test -n "$MANPAGE_FORMAT" ; then
8005        break
8006     fi
8007   done
8008   # if we did not find the example, just assume it is normal
8009   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8010   IFS="$ac_save_ifs"
8011   ;;
8012 *)
8013   for cf_option in $MANPAGE_FORMAT; do
8014      case $cf_option in #(vi
8015      gzip|compress|BSDI|normal|formatted|catonly)
8016        ;;
8017      *)
8018        cf_unknown="$cf_unknown $cf_option"
8019        ;;
8020      esac
8021   done
8022   ;;
8023 esac
8024
8025 echo "$as_me:8025: result: $MANPAGE_FORMAT" >&5
8026 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8027 if test -n "$cf_unknown" ; then
8028   { echo "$as_me:8028: WARNING: Unexpected manpage-format $cf_unknown" >&5
8029 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8030 fi
8031
8032 echo "$as_me:8032: checking for manpage renaming" >&5
8033 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8034
8035 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8036 if test "${with_manpage_renames+set}" = set; then
8037   withval="$with_manpage_renames"
8038   MANPAGE_RENAMES=$withval
8039 else
8040   MANPAGE_RENAMES=yes
8041 fi;
8042
8043 case ".$MANPAGE_RENAMES" in #(vi
8044 .no) #(vi
8045   ;;
8046 .|.yes)
8047   # Debian 'man' program?
8048   if test -f /etc/debian_version ; then
8049     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8050   else
8051     MANPAGE_RENAMES=no
8052   fi
8053   ;;
8054 esac
8055
8056 if test "$MANPAGE_RENAMES" != no ; then
8057   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8058     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8059   elif test ! -f $MANPAGE_RENAMES ; then
8060     { { echo "$as_me:8060: error: not a filename: $MANPAGE_RENAMES" >&5
8061 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8062    { (exit 1); exit 1; }; }
8063   fi
8064
8065   test ! -d man && mkdir man
8066
8067   # Construct a sed-script to perform renaming within man-pages
8068   if test -n "$MANPAGE_RENAMES" ; then
8069     test ! -d man && mkdir man
8070     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8071   fi
8072 fi
8073
8074 echo "$as_me:8074: result: $MANPAGE_RENAMES" >&5
8075 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8076
8077 echo "$as_me:8077: checking if manpage aliases will be installed" >&5
8078 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8079
8080 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8081 if test "${with_manpage_aliases+set}" = set; then
8082   withval="$with_manpage_aliases"
8083   MANPAGE_ALIASES=$withval
8084 else
8085   MANPAGE_ALIASES=yes
8086 fi;
8087
8088 echo "$as_me:8088: result: $MANPAGE_ALIASES" >&5
8089 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8090
8091 if test "$LN_S" = "ln -s"; then
8092         cf_use_symlinks=yes
8093 else
8094         cf_use_symlinks=no
8095 fi
8096
8097 MANPAGE_SYMLINKS=no
8098 if test "$MANPAGE_ALIASES" = yes ; then
8099 echo "$as_me:8099: checking if manpage symlinks should be used" >&5
8100 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8101
8102 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8103 if test "${with_manpage_symlinks+set}" = set; then
8104   withval="$with_manpage_symlinks"
8105   MANPAGE_SYMLINKS=$withval
8106 else
8107   MANPAGE_SYMLINKS=$cf_use_symlinks
8108 fi;
8109
8110 if test "$$cf_use_symlinks" = no; then
8111 if test "$MANPAGE_SYMLINKS" = yes ; then
8112         { echo "$as_me:8112: WARNING: cannot make symlinks" >&5
8113 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8114         MANPAGE_SYMLINKS=no
8115 fi
8116 fi
8117
8118 echo "$as_me:8118: result: $MANPAGE_SYMLINKS" >&5
8119 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8120 fi
8121
8122 echo "$as_me:8122: checking for manpage tbl" >&5
8123 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8124
8125 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8126 if test "${with_manpage_tbl+set}" = set; then
8127   withval="$with_manpage_tbl"
8128   MANPAGE_TBL=$withval
8129 else
8130   MANPAGE_TBL=no
8131 fi;
8132
8133 echo "$as_me:8133: result: $MANPAGE_TBL" >&5
8134 echo "${ECHO_T}$MANPAGE_TBL" >&6
8135
8136   if test "$prefix" = "NONE" ; then
8137      cf_prefix="$ac_default_prefix"
8138   else
8139      cf_prefix="$prefix"
8140   fi
8141
8142   case "$MANPAGE_FORMAT" in # (vi
8143   *catonly*) # (vi
8144     cf_format=yes
8145     cf_inboth=no
8146     ;;
8147   *formatted*) # (vi
8148     cf_format=yes
8149     cf_inboth=yes
8150     ;;
8151   *)
8152     cf_format=no
8153     cf_inboth=no
8154     ;;
8155   esac
8156
8157 test ! -d man && mkdir man
8158
8159 cf_so_strip=
8160 cf_compress=
8161 case "$MANPAGE_FORMAT" in #(vi
8162 *compress*) #(vi
8163         cf_so_strip="Z"
8164         cf_compress=compress
8165   ;;
8166 *gzip*) #(vi
8167         cf_so_strip="gz"
8168         cf_compress=gzip
8169   ;;
8170 esac
8171
8172 cf_edit_man=./edit_man.sh
8173 cf_man_alias=`pwd`/man_alias.sed
8174
8175 cat >$cf_edit_man <<CF_EOF
8176 #! /bin/sh
8177 # this script is generated by the configure-script CF_MAN_PAGES macro.
8178
8179 prefix="$cf_prefix"
8180 datadir="$datadir"
8181
8182 NCURSES_MAJOR="$NCURSES_MAJOR"
8183 NCURSES_MINOR="$NCURSES_MINOR"
8184 NCURSES_PATCH="$NCURSES_PATCH"
8185
8186 NCURSES_OSPEED="$NCURSES_OSPEED"
8187 TERMINFO="$TERMINFO"
8188
8189 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8190
8191 INSTALL="$INSTALL"
8192 INSTALL_DATA="$INSTALL_DATA"
8193
8194 transform="$program_transform_name"
8195
8196 TMP=\${TMPDIR-/tmp}/man\$\$
8197 trap "rm -f \$TMP" 0 1 2 5 15
8198
8199 form=\$1
8200 shift || exit 1
8201
8202 verb=\$1
8203 shift || exit 1
8204
8205 mandir=\$1
8206 shift || exit 1
8207
8208 srcdir=\$1
8209 top_srcdir=\$srcdir/..
8210 shift || exit 1
8211
8212 if test "\$form" = normal ; then
8213         if test "$cf_format" = yes ; then
8214         if test "$cf_inboth" = no ; then
8215                 sh \$0 format \$verb \$mandir \$srcdir \$*
8216                 exit $?
8217         fi
8218         fi
8219         cf_subdir=\$mandir/man
8220         cf_tables=$MANPAGE_TBL
8221 else
8222         cf_subdir=\$mandir/cat
8223         cf_tables=yes
8224 fi
8225
8226 # process the list of source-files
8227 for i in \$* ; do
8228 case \$i in #(vi
8229 *.orig|*.rej) ;; #(vi
8230 *.[0-9]*)
8231         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8232         if test \$verb = installing ; then
8233         if test ! -d \$cf_subdir\${section} ; then
8234                 \$MKDIRS \$cf_subdir\$section
8235         fi
8236         fi
8237
8238         # replace variables in man page
8239         if test ! -f $cf_man_alias ; then
8240 cat >>$cf_man_alias <<-CF_EOF2
8241                 s,@DATADIR@,\$datadir,g
8242                 s,@TERMINFO@,\$TERMINFO,g
8243                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8244                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8245                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8246                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8247 CF_EOF
8248
8249         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8250         do
8251                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8252                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8253 cat >>$cf_edit_man <<-CF_EOF
8254                 s,@$cf_NAME@,$cf_name,
8255 CF_EOF
8256         done
8257
8258 cat >>$cf_edit_man <<CF_EOF
8259 CF_EOF2
8260                 echo "...made $cf_man_alias"
8261         fi
8262
8263         aliases=
8264         cf_source=\`basename \$i\`
8265         inalias=\$cf_source
8266         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8267         if test ! -f \$inalias ; then
8268                 echo .. skipped \$cf_source
8269                 continue
8270         fi
8271 CF_EOF
8272
8273 if test "$MANPAGE_ALIASES" != no ; then
8274 cat >>$cf_edit_man <<CF_EOF
8275         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8276 CF_EOF
8277 fi
8278
8279 if test "$MANPAGE_RENAMES" = no ; then
8280 cat >>$cf_edit_man <<CF_EOF
8281         # perform program transformations for section 1 man pages
8282         if test \$section = 1 ; then
8283                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8284         else
8285                 cf_target=\$cf_subdir\${section}/\$cf_source
8286         fi
8287 CF_EOF
8288 else
8289 cat >>$cf_edit_man <<CF_EOF
8290         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8291         if test -z "\$cf_target" ; then
8292                 echo '? missing rename for '\$cf_source
8293                 cf_target="\$cf_source"
8294         fi
8295         cf_target="\$cf_subdir\${section}/\${cf_target}"
8296
8297 CF_EOF
8298 fi
8299
8300 cat >>$cf_edit_man <<CF_EOF
8301         sed     -f $cf_man_alias \\
8302 CF_EOF
8303
8304 if test -f $MANPAGE_RENAMES ; then
8305 cat >>$cf_edit_man <<CF_EOF
8306                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8307 CF_EOF
8308 else
8309 cat >>$cf_edit_man <<CF_EOF
8310                 < \$i >\$TMP
8311 CF_EOF
8312 fi
8313
8314 cat >>$cf_edit_man <<CF_EOF
8315 if test \$cf_tables = yes ; then
8316         tbl \$TMP >\$TMP.out
8317         mv \$TMP.out \$TMP
8318 fi
8319 CF_EOF
8320
8321 if test $with_curses_h != yes ; then
8322 cat >>$cf_edit_man <<CF_EOF
8323         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8324         mv \$TMP.out \$TMP
8325 CF_EOF
8326 fi
8327
8328 cat >>$cf_edit_man <<CF_EOF
8329         if test \$form = format ; then
8330                 nroff -man \$TMP >\$TMP.out
8331                 mv \$TMP.out \$TMP
8332         fi
8333 CF_EOF
8334
8335 if test -n "$cf_compress" ; then
8336 cat >>$cf_edit_man <<CF_EOF
8337         if test \$verb = installing ; then
8338         if ( $cf_compress -f \$TMP )
8339         then
8340                 mv \$TMP.$cf_so_strip \$TMP
8341         fi
8342         fi
8343         cf_target="\$cf_target.$cf_so_strip"
8344 CF_EOF
8345 fi
8346
8347 case "$MANPAGE_FORMAT" in #(vi
8348 *BSDI*)
8349 cat >>$cf_edit_man <<CF_EOF
8350         if test \$form = format ; then
8351                 # BSDI installs only .0 suffixes in the cat directories
8352                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8353         fi
8354 CF_EOF
8355   ;;
8356 esac
8357
8358 cat >>$cf_edit_man <<CF_EOF
8359         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8360         if test \$verb = installing ; then
8361                 echo \$verb \$cf_target
8362                 \$INSTALL_DATA \$TMP \$cf_target
8363                 test -d \$cf_subdir\${section} &&
8364                 test -n "\$aliases" && (
8365                         cd \$cf_subdir\${section} && (
8366                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8367                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8368                                 cf_target=\`basename \$cf_target\`
8369                                 for cf_alias in \$aliases
8370                                 do
8371                                         if test \$section = 1 ; then
8372                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8373                                         fi
8374
8375                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8376                                                 if test -f \$cf_alias\${suffix} ; then
8377                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8378                                                         then
8379                                                                 continue
8380                                                         fi
8381                                                 fi
8382                                                 echo .. \$verb alias \$cf_alias\${suffix}
8383                                                 rm -f \$cf_alias\${suffix}
8384                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8385                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8386                                                 echo ".so \$cf_source" >\$TMP
8387 CF_EOF
8388 if test -n "$cf_compress" ; then
8389 cat >>$cf_edit_man <<CF_EOF
8390                                                 if test -n "$cf_so_strip" ; then
8391                                                         $cf_compress -f \$TMP
8392                                                         mv \$TMP.$cf_so_strip \$TMP
8393                                                 fi
8394 CF_EOF
8395 fi
8396 cat >>$cf_edit_man <<CF_EOF
8397                                                 echo .. \$verb alias \$cf_alias\${suffix}
8398                                                 rm -f \$cf_alias\${suffix}
8399                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8400                                         fi
8401                                 done
8402                         )
8403                 )
8404         elif test \$verb = removing ; then
8405                 test -f \$cf_target && (
8406                         echo \$verb \$cf_target
8407                         rm -f \$cf_target
8408                 )
8409                 test -d \$cf_subdir\${section} &&
8410                 test -n "\$aliases" && (
8411                         cd \$cf_subdir\${section} && (
8412                                 for cf_alias in \$aliases
8413                                 do
8414                                         if test \$section = 1 ; then
8415                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8416                                         fi
8417
8418                                         echo .. \$verb alias \$cf_alias\${suffix}
8419                                         rm -f \$cf_alias\${suffix}
8420                                 done
8421                         )
8422                 )
8423         else
8424 #               echo ".hy 0"
8425                 cat \$TMP
8426         fi
8427         ;;
8428 esac
8429 done
8430
8431 if test $cf_inboth = yes ; then
8432 if test \$form != format ; then
8433         sh \$0 format \$verb \$mandir \$srcdir \$*
8434 fi
8435 fi
8436
8437 exit 0
8438 CF_EOF
8439 chmod 755 $cf_edit_man
8440
8441 ###############################################################################
8442
8443 ### Note that some functions (such as const) are normally disabled anyway.
8444 echo "$as_me:8444: checking if you want to build with function extensions" >&5
8445 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8446
8447 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8448 if test "${enable_ext_funcs+set}" = set; then
8449   enableval="$enable_ext_funcs"
8450   with_ext_funcs=$enableval
8451 else
8452   with_ext_funcs=yes
8453 fi;
8454 echo "$as_me:8454: result: $with_ext_funcs" >&5
8455 echo "${ECHO_T}$with_ext_funcs" >&6
8456 if test "$with_ext_funcs" = yes ; then
8457         NCURSES_EXT_FUNCS=1
8458         cat >>confdefs.h <<\EOF
8459 #define HAVE_CURSES_VERSION 1
8460 EOF
8461
8462         cat >>confdefs.h <<\EOF
8463 #define HAVE_HAS_KEY 1
8464 EOF
8465
8466         cat >>confdefs.h <<\EOF
8467 #define HAVE_RESIZETERM 1
8468 EOF
8469
8470         cat >>confdefs.h <<\EOF
8471 #define HAVE_RESIZE_TERM 1
8472 EOF
8473
8474         cat >>confdefs.h <<\EOF
8475 #define HAVE_USE_DEFAULT_COLORS 1
8476 EOF
8477
8478         cat >>confdefs.h <<\EOF
8479 #define HAVE_WRESIZE 1
8480 EOF
8481
8482         cat >>confdefs.h <<\EOF
8483 #define NCURSES_EXT_FUNCS 1
8484 EOF
8485
8486 else
8487         NCURSES_EXT_FUNCS=0
8488 fi
8489
8490 ###   use option --enable-const to turn on use of const beyond that in XSI.
8491 echo "$as_me:8491: checking for extended use of const keyword" >&5
8492 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8493
8494 # Check whether --enable-const or --disable-const was given.
8495 if test "${enable_const+set}" = set; then
8496   enableval="$enable_const"
8497   with_ext_const=$enableval
8498 else
8499   with_ext_const=no
8500 fi;
8501 echo "$as_me:8501: result: $with_ext_const" >&5
8502 echo "${ECHO_T}$with_ext_const" >&6
8503 NCURSES_CONST='/*nothing*/'
8504 if test "$with_ext_const" = yes ; then
8505         NCURSES_CONST=const
8506 fi
8507
8508 echo "$as_me:8508: checking if you want \$NCURSES_NO_PADDING code" >&5
8509 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8510
8511 # Check whether --enable-no-padding or --disable-no-padding was given.
8512 if test "${enable_no_padding+set}" = set; then
8513   enableval="$enable_no_padding"
8514   with_no_padding=$enableval
8515 else
8516   with_no_padding=$with_ext_funcs
8517 fi;
8518 echo "$as_me:8518: result: $with_no_padding" >&5
8519 echo "${ECHO_T}$with_no_padding" >&6
8520 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8521 #define NCURSES_NO_PADDING 1
8522 EOF
8523
8524 echo "$as_me:8524: checking for ANSI C header files" >&5
8525 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8526 if test "${ac_cv_header_stdc+set}" = set; then
8527   echo $ECHO_N "(cached) $ECHO_C" >&6
8528 else
8529   cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532 #include <stdlib.h>
8533 #include <stdarg.h>
8534 #include <string.h>
8535 #include <float.h>
8536
8537 _ACEOF
8538 if { (eval echo "$as_me:8538: \"$ac_cpp conftest.$ac_ext\"") >&5
8539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8540   ac_status=$?
8541   egrep -v '^ *\+' conftest.er1 >conftest.err
8542   rm -f conftest.er1
8543   cat conftest.err >&5
8544   echo "$as_me:8544: \$? = $ac_status" >&5
8545   (exit $ac_status); } >/dev/null; then
8546   if test -s conftest.err; then
8547     ac_cpp_err=$ac_c_preproc_warn_flag
8548   else
8549     ac_cpp_err=
8550   fi
8551 else
8552   ac_cpp_err=yes
8553 fi
8554 if test -z "$ac_cpp_err"; then
8555   ac_cv_header_stdc=yes
8556 else
8557   echo "$as_me: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   ac_cv_header_stdc=no
8560 fi
8561 rm -f conftest.err conftest.$ac_ext
8562
8563 if test $ac_cv_header_stdc = yes; then
8564   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8565   cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568 #include <string.h>
8569
8570 _ACEOF
8571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8572   egrep "memchr" >/dev/null 2>&1; then
8573   :
8574 else
8575   ac_cv_header_stdc=no
8576 fi
8577 rm -f conftest*
8578
8579 fi
8580
8581 if test $ac_cv_header_stdc = yes; then
8582   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8583   cat >conftest.$ac_ext <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586 #include <stdlib.h>
8587
8588 _ACEOF
8589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8590   egrep "free" >/dev/null 2>&1; then
8591   :
8592 else
8593   ac_cv_header_stdc=no
8594 fi
8595 rm -f conftest*
8596
8597 fi
8598
8599 if test $ac_cv_header_stdc = yes; then
8600   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8601   if test "$cross_compiling" = yes; then
8602   :
8603 else
8604   cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607 #include <ctype.h>
8608 #if ((' ' & 0x0FF) == 0x020)
8609 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8610 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8611 #else
8612 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8613                      || ('j' <= (c) && (c) <= 'r') \
8614                      || ('s' <= (c) && (c) <= 'z'))
8615 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8616 #endif
8617
8618 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8619 int
8620 main ()
8621 {
8622   int i;
8623   for (i = 0; i < 256; i++)
8624     if (XOR (islower (i), ISLOWER (i))
8625         || toupper (i) != TOUPPER (i))
8626       $ac_main_return(2);
8627   $ac_main_return (0);
8628 }
8629 _ACEOF
8630 rm -f conftest$ac_exeext
8631 if { (eval echo "$as_me:8631: \"$ac_link\"") >&5
8632   (eval $ac_link) 2>&5
8633   ac_status=$?
8634   echo "$as_me:8634: \$? = $ac_status" >&5
8635   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8636   { (eval echo "$as_me:8636: \"$ac_try\"") >&5
8637   (eval $ac_try) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); }; }; then
8641   :
8642 else
8643   echo "$as_me: program exited with status $ac_status" >&5
8644 echo "$as_me: failed program was:" >&5
8645 cat conftest.$ac_ext >&5
8646 ac_cv_header_stdc=no
8647 fi
8648 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8649 fi
8650 fi
8651 fi
8652 echo "$as_me:8652: result: $ac_cv_header_stdc" >&5
8653 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8654 if test $ac_cv_header_stdc = yes; then
8655
8656 cat >>confdefs.h <<\EOF
8657 #define STDC_HEADERS 1
8658 EOF
8659
8660 fi
8661
8662 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8663
8664 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8665                   inttypes.h stdint.h unistd.h
8666 do
8667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8668 echo "$as_me:8668: checking for $ac_header" >&5
8669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8671   echo $ECHO_N "(cached) $ECHO_C" >&6
8672 else
8673   cat >conftest.$ac_ext <<_ACEOF
8674 #line 8674 "configure"
8675 #include "confdefs.h"
8676 $ac_includes_default
8677 #include <$ac_header>
8678 _ACEOF
8679 rm -f conftest.$ac_objext
8680 if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5
8681   (eval $ac_compile) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); } &&
8685          { ac_try='test -s conftest.$ac_objext'
8686   { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687   (eval $ac_try) 2>&5
8688   ac_status=$?
8689   echo "$as_me:8689: \$? = $ac_status" >&5
8690   (exit $ac_status); }; }; then
8691   eval "$as_ac_Header=yes"
8692 else
8693   echo "$as_me: failed program was:" >&5
8694 cat conftest.$ac_ext >&5
8695 eval "$as_ac_Header=no"
8696 fi
8697 rm -f conftest.$ac_objext conftest.$ac_ext
8698 fi
8699 echo "$as_me:8699: result: `eval echo '${'$as_ac_Header'}'`" >&5
8700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8701 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8702   cat >>confdefs.h <<EOF
8703 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8704 EOF
8705
8706 fi
8707 done
8708
8709 echo "$as_me:8709: checking for signed char" >&5
8710 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8711 if test "${ac_cv_type_signed_char+set}" = set; then
8712   echo $ECHO_N "(cached) $ECHO_C" >&6
8713 else
8714   cat >conftest.$ac_ext <<_ACEOF
8715 #line 8715 "configure"
8716 #include "confdefs.h"
8717 $ac_includes_default
8718 int
8719 main ()
8720 {
8721 if ((signed char *) 0)
8722   return 0;
8723 if (sizeof (signed char))
8724   return 0;
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext
8730 if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
8731   (eval $ac_compile) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); } &&
8735          { ac_try='test -s conftest.$ac_objext'
8736   { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737   (eval $ac_try) 2>&5
8738   ac_status=$?
8739   echo "$as_me:8739: \$? = $ac_status" >&5
8740   (exit $ac_status); }; }; then
8741   ac_cv_type_signed_char=yes
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 ac_cv_type_signed_char=no
8746 fi
8747 rm -f conftest.$ac_objext conftest.$ac_ext
8748 fi
8749 echo "$as_me:8749: result: $ac_cv_type_signed_char" >&5
8750 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8751
8752 echo "$as_me:8752: checking size of signed char" >&5
8753 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8754 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8755   echo $ECHO_N "(cached) $ECHO_C" >&6
8756 else
8757   if test "$ac_cv_type_signed_char" = yes; then
8758   if test "$cross_compiling" = yes; then
8759   # Depending upon the size, compute the lo and hi bounds.
8760 cat >conftest.$ac_ext <<_ACEOF
8761 #line 8761 "configure"
8762 #include "confdefs.h"
8763 $ac_includes_default
8764 int
8765 main ()
8766 {
8767 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8768   ;
8769   return 0;
8770 }
8771 _ACEOF
8772 rm -f conftest.$ac_objext
8773 if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5
8774   (eval $ac_compile) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); } &&
8778          { ac_try='test -s conftest.$ac_objext'
8779   { (eval echo "$as_me:8779: \"$ac_try\"") >&5
8780   (eval $ac_try) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); }; }; then
8784   ac_lo=0 ac_mid=0
8785   while :; do
8786     cat >conftest.$ac_ext <<_ACEOF
8787 #line 8787 "configure"
8788 #include "confdefs.h"
8789 $ac_includes_default
8790 int
8791 main ()
8792 {
8793 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8794   ;
8795   return 0;
8796 }
8797 _ACEOF
8798 rm -f conftest.$ac_objext
8799 if { (eval echo "$as_me:8799: \"$ac_compile\"") >&5
8800   (eval $ac_compile) 2>&5
8801   ac_status=$?
8802   echo "$as_me:8802: \$? = $ac_status" >&5
8803   (exit $ac_status); } &&
8804          { ac_try='test -s conftest.$ac_objext'
8805   { (eval echo "$as_me:8805: \"$ac_try\"") >&5
8806   (eval $ac_try) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); }; }; then
8810   ac_hi=$ac_mid; break
8811 else
8812   echo "$as_me: failed program was:" >&5
8813 cat conftest.$ac_ext >&5
8814 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8815 fi
8816 rm -f conftest.$ac_objext conftest.$ac_ext
8817   done
8818 else
8819   echo "$as_me: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 ac_hi=-1 ac_mid=-1
8822   while :; do
8823     cat >conftest.$ac_ext <<_ACEOF
8824 #line 8824 "configure"
8825 #include "confdefs.h"
8826 $ac_includes_default
8827 int
8828 main ()
8829 {
8830 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8831   ;
8832   return 0;
8833 }
8834 _ACEOF
8835 rm -f conftest.$ac_objext
8836 if { (eval echo "$as_me:8836: \"$ac_compile\"") >&5
8837   (eval $ac_compile) 2>&5
8838   ac_status=$?
8839   echo "$as_me:8839: \$? = $ac_status" >&5
8840   (exit $ac_status); } &&
8841          { ac_try='test -s conftest.$ac_objext'
8842   { (eval echo "$as_me:8842: \"$ac_try\"") >&5
8843   (eval $ac_try) 2>&5
8844   ac_status=$?
8845   echo "$as_me:8845: \$? = $ac_status" >&5
8846   (exit $ac_status); }; }; then
8847   ac_lo=$ac_mid; break
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8851 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8852 fi
8853 rm -f conftest.$ac_objext conftest.$ac_ext
8854   done
8855 fi
8856 rm -f conftest.$ac_objext conftest.$ac_ext
8857 # Binary search between lo and hi bounds.
8858 while test "x$ac_lo" != "x$ac_hi"; do
8859   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8860   cat >conftest.$ac_ext <<_ACEOF
8861 #line 8861 "configure"
8862 #include "confdefs.h"
8863 $ac_includes_default
8864 int
8865 main ()
8866 {
8867 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8868   ;
8869   return 0;
8870 }
8871 _ACEOF
8872 rm -f conftest.$ac_objext
8873 if { (eval echo "$as_me:8873: \"$ac_compile\"") >&5
8874   (eval $ac_compile) 2>&5
8875   ac_status=$?
8876   echo "$as_me:8876: \$? = $ac_status" >&5
8877   (exit $ac_status); } &&
8878          { ac_try='test -s conftest.$ac_objext'
8879   { (eval echo "$as_me:8879: \"$ac_try\"") >&5
8880   (eval $ac_try) 2>&5
8881   ac_status=$?
8882   echo "$as_me:8882: \$? = $ac_status" >&5
8883   (exit $ac_status); }; }; then
8884   ac_hi=$ac_mid
8885 else
8886   echo "$as_me: failed program was:" >&5
8887 cat conftest.$ac_ext >&5
8888 ac_lo=`expr $ac_mid + 1`
8889 fi
8890 rm -f conftest.$ac_objext conftest.$ac_ext
8891 done
8892 ac_cv_sizeof_signed_char=$ac_lo
8893 else
8894   if test "$cross_compiling" = yes; then
8895   { { echo "$as_me:8895: error: cannot run test program while cross compiling" >&5
8896 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8897    { (exit 1); exit 1; }; }
8898 else
8899   cat >conftest.$ac_ext <<_ACEOF
8900 #line 8900 "configure"
8901 #include "confdefs.h"
8902 $ac_includes_default
8903 int
8904 main ()
8905 {
8906 FILE *f = fopen ("conftest.val", "w");
8907 if (!f)
8908   $ac_main_return (1);
8909 fprintf (f, "%d", (sizeof (signed char)));
8910 fclose (f);
8911   ;
8912   return 0;
8913 }
8914 _ACEOF
8915 rm -f conftest$ac_exeext
8916 if { (eval echo "$as_me:8916: \"$ac_link\"") >&5
8917   (eval $ac_link) 2>&5
8918   ac_status=$?
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8921   { (eval echo "$as_me:8921: \"$ac_try\"") >&5
8922   (eval $ac_try) 2>&5
8923   ac_status=$?
8924   echo "$as_me:8924: \$? = $ac_status" >&5
8925   (exit $ac_status); }; }; then
8926   ac_cv_sizeof_signed_char=`cat conftest.val`
8927 else
8928   echo "$as_me: program exited with status $ac_status" >&5
8929 echo "$as_me: failed program was:" >&5
8930 cat conftest.$ac_ext >&5
8931 fi
8932 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8933 fi
8934 fi
8935 rm -f conftest.val
8936 else
8937   ac_cv_sizeof_signed_char=0
8938 fi
8939 fi
8940 echo "$as_me:8940: result: $ac_cv_sizeof_signed_char" >&5
8941 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8942 cat >>confdefs.h <<EOF
8943 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8944 EOF
8945
8946 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8947         NCURSES_SBOOL="signed char"
8948 else
8949         NCURSES_SBOOL="char"
8950 fi
8951 echo "$as_me:8951: checking if you want to use signed Boolean array in term.h" >&5
8952 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8953
8954 # Check whether --enable-signed-char or --disable-signed-char was given.
8955 if test "${enable_signed_char+set}" = set; then
8956   enableval="$enable_signed_char"
8957   with_signed_char=$enableval
8958 else
8959   with_signed_char=no
8960 fi;
8961 echo "$as_me:8961: result: $with_signed_char" >&5
8962 echo "${ECHO_T}$with_signed_char" >&6
8963 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8964
8965 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8966 echo "$as_me:8966: checking if you want SIGWINCH handler" >&5
8967 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8968
8969 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8970 if test "${enable_sigwinch+set}" = set; then
8971   enableval="$enable_sigwinch"
8972   with_sigwinch=$enableval
8973 else
8974   with_sigwinch=$with_ext_funcs
8975 fi;
8976 echo "$as_me:8976: result: $with_sigwinch" >&5
8977 echo "${ECHO_T}$with_sigwinch" >&6
8978 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8979 #define USE_SIGWINCH 1
8980 EOF
8981
8982 ###   use option --enable-tcap-names to allow user to define new capabilities
8983 echo "$as_me:8983: checking if you want user-definable terminal capabilities like termcap" >&5
8984 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8985
8986 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8987 if test "${enable_tcap_names+set}" = set; then
8988   enableval="$enable_tcap_names"
8989   with_tcap_names=$enableval
8990 else
8991   with_tcap_names=$with_ext_funcs
8992 fi;
8993 echo "$as_me:8993: result: $with_tcap_names" >&5
8994 echo "${ECHO_T}$with_tcap_names" >&6
8995 NCURSES_XNAMES=0
8996 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8997
8998 ###############################################################################
8999 # These options are relatively safe to experiment with.
9000
9001 echo "$as_me:9001: checking if you want all development code" >&5
9002 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9003
9004 # Check whether --with-develop or --without-develop was given.
9005 if test "${with_develop+set}" = set; then
9006   withval="$with_develop"
9007   with_develop=$withval
9008 else
9009   with_develop=no
9010 fi;
9011 echo "$as_me:9011: result: $with_develop" >&5
9012 echo "${ECHO_T}$with_develop" >&6
9013
9014 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9015 echo "$as_me:9015: checking if you want hard-tabs code" >&5
9016 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9017
9018 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9019 if test "${enable_hard_tabs+set}" = set; then
9020   enableval="$enable_hard_tabs"
9021
9022 else
9023   enable_hard_tabs=$with_develop
9024 fi;
9025 echo "$as_me:9025: result: $enable_hard_tabs" >&5
9026 echo "${ECHO_T}$enable_hard_tabs" >&6
9027 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9028 #define USE_HARD_TABS 1
9029 EOF
9030
9031 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9032 echo "$as_me:9032: checking if you want limited support for xmc" >&5
9033 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9034
9035 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9036 if test "${enable_xmc_glitch+set}" = set; then
9037   enableval="$enable_xmc_glitch"
9038
9039 else
9040   enable_xmc_glitch=$with_develop
9041 fi;
9042 echo "$as_me:9042: result: $enable_xmc_glitch" >&5
9043 echo "${ECHO_T}$enable_xmc_glitch" >&6
9044 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9045 #define USE_XMC_SUPPORT 1
9046 EOF
9047
9048 ###############################################################################
9049 # These are just experimental, probably should not be in a package:
9050
9051 echo "$as_me:9051: checking if you do not want to assume colors are white-on-black" >&5
9052 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9053
9054 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9055 if test "${enable_assumed_color+set}" = set; then
9056   enableval="$enable_assumed_color"
9057   with_assumed_color=$enableval
9058 else
9059   with_assumed_color=yes
9060 fi;
9061 echo "$as_me:9061: result: $with_assumed_color" >&5
9062 echo "${ECHO_T}$with_assumed_color" >&6
9063 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9064 #define USE_ASSUMED_COLOR 1
9065 EOF
9066
9067 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9068 echo "$as_me:9068: checking if you want hashmap scrolling-optimization code" >&5
9069 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9070
9071 # Check whether --enable-hashmap or --disable-hashmap was given.
9072 if test "${enable_hashmap+set}" = set; then
9073   enableval="$enable_hashmap"
9074   with_hashmap=$enableval
9075 else
9076   with_hashmap=yes
9077 fi;
9078 echo "$as_me:9078: result: $with_hashmap" >&5
9079 echo "${ECHO_T}$with_hashmap" >&6
9080 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9081 #define USE_HASHMAP 1
9082 EOF
9083
9084 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9085 echo "$as_me:9085: checking if you want colorfgbg code" >&5
9086 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9087
9088 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9089 if test "${enable_colorfgbg+set}" = set; then
9090   enableval="$enable_colorfgbg"
9091   with_colorfgbg=$enableval
9092 else
9093   with_colorfgbg=no
9094 fi;
9095 echo "$as_me:9095: result: $with_colorfgbg" >&5
9096 echo "${ECHO_T}$with_colorfgbg" >&6
9097 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9098 #define USE_COLORFGBG 1
9099 EOF
9100
9101 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9102 echo "$as_me:9102: checking if you want to use experimental extended colors" >&5
9103 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9104
9105 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9106 if test "${enable_ext_colors+set}" = set; then
9107   enableval="$enable_ext_colors"
9108   with_ext_colors=$enableval
9109 else
9110   with_ext_colors=no
9111 fi;
9112 echo "$as_me:9112: result: $with_ext_colors" >&5
9113 echo "${ECHO_T}$with_ext_colors" >&6
9114 NCURSES_EXT_COLORS=0
9115 if test "$with_ext_colors" = yes ; then
9116         if test "$with_widec" != yes ; then
9117                 { { echo "$as_me:9117: error: This option applies only to wide-character library" >&5
9118 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9119    { (exit 1); exit 1; }; }
9120         else
9121                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9122
9123 if test "${with_abi_version+set}" != set; then
9124         case $cf_cv_rel_version in
9125         5.*)
9126                 cf_cv_rel_version=6.0
9127                 cf_cv_abi_version=6
9128                 { echo "$as_me:9128: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9129 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9130                 ;;
9131         esac
9132 fi
9133
9134         fi
9135         NCURSES_EXT_COLORS=1
9136         cat >>confdefs.h <<\EOF
9137 #define NCURSES_EXT_COLORS 1
9138 EOF
9139
9140 fi
9141
9142 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9143 echo "$as_me:9143: checking if you want to use experimental extended mouse encoding" >&5
9144 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9145
9146 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9147 if test "${enable_ext_mouse+set}" = set; then
9148   enableval="$enable_ext_mouse"
9149   with_ext_mouse=$enableval
9150 else
9151   with_ext_mouse=no
9152 fi;
9153 echo "$as_me:9153: result: $with_ext_mouse" >&5
9154 echo "${ECHO_T}$with_ext_mouse" >&6
9155 NCURSES_MOUSE_VERSION=1
9156 if test "$with_ext_mouse" = yes ; then
9157         NCURSES_MOUSE_VERSION=2
9158
9159 if test "${with_abi_version+set}" != set; then
9160         case $cf_cv_rel_version in
9161         5.*)
9162                 cf_cv_rel_version=6.0
9163                 cf_cv_abi_version=6
9164                 { echo "$as_me:9164: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9165 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9166                 ;;
9167         esac
9168 fi
9169
9170 fi
9171
9172 # Reentrant code has to be opaque; there's little advantage to making ncurses
9173 # opaque outside of that, so there is no --enable-opaque option.
9174 echo "$as_me:9174: checking if you want experimental reentrant code" >&5
9175 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9176
9177 # Check whether --enable-reentrant or --disable-reentrant was given.
9178 if test "${enable_reentrant+set}" = set; then
9179   enableval="$enable_reentrant"
9180   with_reentrant=$enableval
9181 else
9182   with_reentrant=no
9183 fi;
9184 echo "$as_me:9184: result: $with_reentrant" >&5
9185 echo "${ECHO_T}$with_reentrant" >&6
9186 if test "$with_reentrant" = yes ; then
9187         cf_cv_enable_reentrant=1
9188         cf_cv_enable_opaque="NCURSES_INTERNALS"
9189         NCURSES_OPAQUE=1
9190         NCURSES_SIZE_T=int
9191         LIB_SUFFIX="t${LIB_SUFFIX}"
9192         cat >>confdefs.h <<\EOF
9193 #define USE_REENTRANT 1
9194 EOF
9195
9196 if test "${with_abi_version+set}" != set; then
9197         case $cf_cv_rel_version in
9198         5.*)
9199                 cf_cv_rel_version=6.0
9200                 cf_cv_abi_version=6
9201                 { echo "$as_me:9201: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9202 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9203                 ;;
9204         esac
9205 fi
9206
9207 else
9208         cf_cv_enable_reentrant=0
9209         cf_cv_enable_opaque="NCURSES_OPAQUE"
9210         NCURSES_OPAQUE=0
9211         NCURSES_SIZE_T=short
9212 fi
9213
9214 echo "$as_me:9214: checking if you want experimental safe-sprintf code" >&5
9215 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9216
9217 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9218 if test "${enable_safe_sprintf+set}" = set; then
9219   enableval="$enable_safe_sprintf"
9220   with_safe_sprintf=$enableval
9221 else
9222   with_safe_sprintf=no
9223 fi;
9224 echo "$as_me:9224: result: $with_safe_sprintf" >&5
9225 echo "${ECHO_T}$with_safe_sprintf" >&6
9226 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9227 #define USE_SAFE_SPRINTF 1
9228 EOF
9229
9230 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9231 # when hashmap is used scroll hints are useless
9232 if test "$with_hashmap" = no ; then
9233 echo "$as_me:9233: checking if you want to experiment without scrolling-hints code" >&5
9234 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9235
9236 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9237 if test "${enable_scroll_hints+set}" = set; then
9238   enableval="$enable_scroll_hints"
9239   with_scroll_hints=$enableval
9240 else
9241   with_scroll_hints=yes
9242 fi;
9243 echo "$as_me:9243: result: $with_scroll_hints" >&5
9244 echo "${ECHO_T}$with_scroll_hints" >&6
9245 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9246 #define USE_SCROLL_HINTS 1
9247 EOF
9248
9249 fi
9250
9251 echo "$as_me:9251: checking if you want experimental wgetch-events code" >&5
9252 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9253
9254 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9255 if test "${enable_wgetch_events+set}" = set; then
9256   enableval="$enable_wgetch_events"
9257   with_wgetch_events=$enableval
9258 else
9259   with_wgetch_events=no
9260 fi;
9261 echo "$as_me:9261: result: $with_wgetch_events" >&5
9262 echo "${ECHO_T}$with_wgetch_events" >&6
9263 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9264 #define NCURSES_WGETCH_EVENTS 1
9265 EOF
9266
9267 ###############################################################################
9268
9269 ###     use option --disable-echo to suppress full display compiling commands
9270 echo "$as_me:9270: checking if you want to display full commands during build" >&5
9271 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9272
9273 # Check whether --enable-echo or --disable-echo was given.
9274 if test "${enable_echo+set}" = set; then
9275   enableval="$enable_echo"
9276   with_echo=$enableval
9277 else
9278   with_echo=yes
9279 fi;
9280 if test "$with_echo" = yes; then
9281         ECHO_LINK=
9282 else
9283         ECHO_LINK='@ echo linking $@ ... ;'
9284         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9285         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9286 fi
9287 echo "$as_me:9287: result: $with_echo" >&5
9288 echo "${ECHO_T}$with_echo" >&6
9289
9290 ###     use option --enable-warnings to turn on all gcc warnings
9291 echo "$as_me:9291: checking if you want to see compiler warnings" >&5
9292 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9293
9294 # Check whether --enable-warnings or --disable-warnings was given.
9295 if test "${enable_warnings+set}" = set; then
9296   enableval="$enable_warnings"
9297   with_warnings=$enableval
9298 fi;
9299 echo "$as_me:9299: result: $with_warnings" >&5
9300 echo "${ECHO_T}$with_warnings" >&6
9301
9302 if test "x$with_warnings" = "xyes"; then
9303         ADAFLAGS="$ADAFLAGS -gnatg"
9304
9305 INTEL_COMPILER=no
9306
9307 if test "$GCC" = yes ; then
9308         case $host_os in
9309         linux*|gnu*)
9310                 echo "$as_me:9310: checking if this is really Intel C compiler" >&5
9311 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9312                 cf_save_CFLAGS="$CFLAGS"
9313                 CFLAGS="$CFLAGS -no-gcc"
9314                 cat >conftest.$ac_ext <<_ACEOF
9315 #line 9315 "configure"
9316 #include "confdefs.h"
9317
9318 int
9319 main ()
9320 {
9321
9322 #ifdef __INTEL_COMPILER
9323 #else
9324 make an error
9325 #endif
9326
9327   ;
9328   return 0;
9329 }
9330 _ACEOF
9331 rm -f conftest.$ac_objext
9332 if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5
9333   (eval $ac_compile) 2>&5
9334   ac_status=$?
9335   echo "$as_me:9335: \$? = $ac_status" >&5
9336   (exit $ac_status); } &&
9337          { ac_try='test -s conftest.$ac_objext'
9338   { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9339   (eval $ac_try) 2>&5
9340   ac_status=$?
9341   echo "$as_me:9341: \$? = $ac_status" >&5
9342   (exit $ac_status); }; }; then
9343   INTEL_COMPILER=yes
9344 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9345
9346 else
9347   echo "$as_me: failed program was:" >&5
9348 cat conftest.$ac_ext >&5
9349 fi
9350 rm -f conftest.$ac_objext conftest.$ac_ext
9351                 CFLAGS="$cf_save_CFLAGS"
9352                 echo "$as_me:9352: result: $INTEL_COMPILER" >&5
9353 echo "${ECHO_T}$INTEL_COMPILER" >&6
9354                 ;;
9355         esac
9356 fi
9357
9358 cat > conftest.$ac_ext <<EOF
9359 #line 9359 "${as_me-configure}"
9360 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9361 EOF
9362
9363 if test "$INTEL_COMPILER" = yes
9364 then
9365 # The "-wdXXX" options suppress warnings:
9366 # remark #1419: external declaration in primary source file
9367 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9368 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9369 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9370 # remark #193: zero used for undefined preprocessing identifier
9371 # remark #593: variable "curs_sb_left_arrow" was set but never used
9372 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9373 # remark #869: parameter "tw" was never referenced
9374 # remark #981: operands are evaluated in unspecified order
9375 # warning #269: invalid format string conversion
9376
9377         { echo "$as_me:9377: checking for $CC warning options..." >&5
9378 echo "$as_me: checking for $CC warning options..." >&6;}
9379         cf_save_CFLAGS="$CFLAGS"
9380         EXTRA_CFLAGS="-Wall"
9381         for cf_opt in \
9382                 wd1419 \
9383                 wd1682 \
9384                 wd1683 \
9385                 wd1684 \
9386                 wd193 \
9387                 wd279 \
9388                 wd593 \
9389                 wd810 \
9390                 wd869 \
9391                 wd981
9392         do
9393                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9394                 if { (eval echo "$as_me:9394: \"$ac_compile\"") >&5
9395   (eval $ac_compile) 2>&5
9396   ac_status=$?
9397   echo "$as_me:9397: \$? = $ac_status" >&5
9398   (exit $ac_status); }; then
9399                         test -n "$verbose" && echo "$as_me:9399: result: ... -$cf_opt" >&5
9400 echo "${ECHO_T}... -$cf_opt" >&6
9401                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9402                 fi
9403         done
9404         CFLAGS="$cf_save_CFLAGS"
9405
9406 elif test "$GCC" = yes
9407 then
9408         { echo "$as_me:9408: checking for $CC warning options..." >&5
9409 echo "$as_me: checking for $CC warning options..." >&6;}
9410         cf_save_CFLAGS="$CFLAGS"
9411         EXTRA_CFLAGS="-W -Wall"
9412         cf_warn_CONST=""
9413         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9414         for cf_opt in \
9415                 Wbad-function-cast \
9416                 Wcast-align \
9417                 Wcast-qual \
9418                 Winline \
9419                 Wmissing-declarations \
9420                 Wmissing-prototypes \
9421                 Wnested-externs \
9422                 Wpointer-arith \
9423                 Wshadow \
9424                 Wstrict-prototypes \
9425                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9426         do
9427                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9428                 if { (eval echo "$as_me:9428: \"$ac_compile\"") >&5
9429   (eval $ac_compile) 2>&5
9430   ac_status=$?
9431   echo "$as_me:9431: \$? = $ac_status" >&5
9432   (exit $ac_status); }; then
9433                         test -n "$verbose" && echo "$as_me:9433: result: ... -$cf_opt" >&5
9434 echo "${ECHO_T}... -$cf_opt" >&6
9435                         case $cf_opt in #(vi
9436                         Wcast-qual) #(vi
9437                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9438                                 ;;
9439                         Winline) #(vi
9440                                 case $GCC_VERSION in
9441                                 3.3*)
9442                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9443
9444 echo "${as_me-configure}:9444: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9445
9446                                         continue;;
9447                                 esac
9448                                 ;;
9449                         esac
9450                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9451                 fi
9452         done
9453         CFLAGS="$cf_save_CFLAGS"
9454 fi
9455 rm -f conftest*
9456
9457         if test "$cf_with_cxx" = yes ; then
9458
9459 INTEL_CPLUSPLUS=no
9460
9461 if test "$GCC" = yes ; then
9462         case $host_os in
9463         linux*|gnu*)
9464                 echo "$as_me:9464: checking if this is really Intel C++ compiler" >&5
9465 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9466                 cf_save_CFLAGS="$CXXFLAGS"
9467                 CXXFLAGS="$CXXFLAGS -no-gcc"
9468                 cat >conftest.$ac_ext <<_ACEOF
9469 #line 9469 "configure"
9470 #include "confdefs.h"
9471
9472 int
9473 main ()
9474 {
9475
9476 #ifdef __INTEL_COMPILER
9477 #else
9478 make an error
9479 #endif
9480
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f conftest.$ac_objext
9486 if { (eval echo "$as_me:9486: \"$ac_compile\"") >&5
9487   (eval $ac_compile) 2>&5
9488   ac_status=$?
9489   echo "$as_me:9489: \$? = $ac_status" >&5
9490   (exit $ac_status); } &&
9491          { ac_try='test -s conftest.$ac_objext'
9492   { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:9495: \$? = $ac_status" >&5
9496   (exit $ac_status); }; }; then
9497   INTEL_CPLUSPLUS=yes
9498 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9499
9500 else
9501   echo "$as_me: failed program was:" >&5
9502 cat conftest.$ac_ext >&5
9503 fi
9504 rm -f conftest.$ac_objext conftest.$ac_ext
9505                 CXXFLAGS="$cf_save_CFLAGS"
9506                 echo "$as_me:9506: result: $INTEL_CPLUSPLUS" >&5
9507 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9508                 ;;
9509         esac
9510 fi
9511
9512 ac_ext=cc
9513 ac_cpp='$CXXCPP $CPPFLAGS'
9514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9517 ac_main_return=return
9518
9519 cat > conftest.$ac_ext <<EOF
9520 #line 9520 "configure"
9521 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9522 EOF
9523
9524 if test "$INTEL_CPLUSPLUS" = yes
9525 then
9526 # The "-wdXXX" options suppress warnings:
9527 # remark #1419: external declaration in primary source file
9528 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9529 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9530 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9531 # remark #193: zero used for undefined preprocessing identifier
9532 # remark #593: variable "curs_sb_left_arrow" was set but never used
9533 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9534 # remark #869: parameter "tw" was never referenced
9535 # remark #981: operands are evaluated in unspecified order
9536 # warning #269: invalid format string conversion
9537
9538         { echo "$as_me:9538: checking for $CC warning options..." >&5
9539 echo "$as_me: checking for $CC warning options..." >&6;}
9540         cf_save_CXXFLAGS="$CXXFLAGS"
9541         EXTRA_CXXFLAGS="-Wall"
9542         for cf_opt in \
9543                 wd1419 \
9544                 wd1682 \
9545                 wd1683 \
9546                 wd1684 \
9547                 wd193 \
9548                 wd279 \
9549                 wd593 \
9550                 wd810 \
9551                 wd869 \
9552                 wd981
9553         do
9554                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9555                 if { (eval echo "$as_me:9555: \"$ac_compile\"") >&5
9556   (eval $ac_compile) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); }; then
9560                         test -n "$verbose" && echo "$as_me:9560: result: ... -$cf_opt" >&5
9561 echo "${ECHO_T}... -$cf_opt" >&6
9562                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9563                 fi
9564         done
9565         CXXFLAGS="$cf_save_CXXFLAGS"
9566
9567 elif test "$GXX" = yes
9568 then
9569         { echo "$as_me:9569: checking for $CXX warning options..." >&5
9570 echo "$as_me: checking for $CXX warning options..." >&6;}
9571         cf_save_CXXFLAGS="$CXXFLAGS"
9572         EXTRA_CXXFLAGS="-W -Wall"
9573         cf_gxx_extra_warnings=""
9574         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9575         case "$GCC_VERSION" in
9576         [1-2].*)
9577                 ;;
9578         *)
9579                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9580                 ;;
9581         esac
9582         for cf_opt in \
9583                 Wabi \
9584                 fabi-version=0 \
9585                 Woverloaded-virtual \
9586                 Wsign-promo \
9587                 Wsynth \
9588                 Wold-style-cast \
9589                 Wcast-align \
9590                 Wcast-qual \
9591                 Wmissing-prototypes \
9592                 Wpointer-arith \
9593                 Wshadow \
9594                 Wstrict-prototypes \
9595                 Wundef $cf_gxx_extra_warnings Wno-unused
9596         do
9597                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9598                 if { (eval echo "$as_me:9598: \"$ac_compile\"") >&5
9599   (eval $ac_compile) 2>&5
9600   ac_status=$?
9601   echo "$as_me:9601: \$? = $ac_status" >&5
9602   (exit $ac_status); }; then
9603                         test -n "$verbose" && echo "$as_me:9603: result: ... -$cf_opt" >&5
9604 echo "${ECHO_T}... -$cf_opt" >&6
9605                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9606                 else
9607                         test -n "$verbose" && echo "$as_me:9607: result: ... no -$cf_opt" >&5
9608 echo "${ECHO_T}... no -$cf_opt" >&6
9609                 fi
9610         done
9611         CXXFLAGS="$cf_save_CXXFLAGS"
9612 fi
9613
9614 rm -f conftest*
9615 ac_ext=c
9616 ac_cpp='$CPP $CPPFLAGS'
9617 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9618 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9619 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9620 ac_main_return=return
9621
9622         fi
9623 fi
9624
9625 if test "$GCC" = yes
9626 then
9627 cat > conftest.i <<EOF
9628 #ifndef GCC_PRINTF
9629 #define GCC_PRINTF 0
9630 #endif
9631 #ifndef GCC_SCANF
9632 #define GCC_SCANF 0
9633 #endif
9634 #ifndef GCC_NORETURN
9635 #define GCC_NORETURN /* nothing */
9636 #endif
9637 #ifndef GCC_UNUSED
9638 #define GCC_UNUSED /* nothing */
9639 #endif
9640 EOF
9641 if test "$GCC" = yes
9642 then
9643         { echo "$as_me:9643: checking for $CC __attribute__ directives..." >&5
9644 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9645 cat > conftest.$ac_ext <<EOF
9646 #line 9646 "${as_me-configure}"
9647 #include "confdefs.h"
9648 #include "conftest.h"
9649 #include "conftest.i"
9650 #if     GCC_PRINTF
9651 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9652 #else
9653 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9654 #endif
9655 #if     GCC_SCANF
9656 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9657 #else
9658 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9659 #endif
9660 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9661 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9662 extern void foo(void) GCC_NORETURN;
9663 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9664 EOF
9665         for cf_attribute in scanf printf unused noreturn
9666         do
9667
9668 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9669
9670                 cf_directive="__attribute__(($cf_attribute))"
9671                 echo "checking for $CC $cf_directive" 1>&5
9672                 case $cf_attribute in
9673                 scanf|printf)
9674                 cat >conftest.h <<EOF
9675 #define GCC_$cf_ATTRIBUTE 1
9676 EOF
9677                         ;;
9678                 *)
9679                 cat >conftest.h <<EOF
9680 #define GCC_$cf_ATTRIBUTE $cf_directive
9681 EOF
9682                         ;;
9683                 esac
9684                 if { (eval echo "$as_me:9684: \"$ac_compile\"") >&5
9685   (eval $ac_compile) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit $ac_status); }; then
9689                         test -n "$verbose" && echo "$as_me:9689: result: ... $cf_attribute" >&5
9690 echo "${ECHO_T}... $cf_attribute" >&6
9691                         cat conftest.h >>confdefs.h
9692                 fi
9693         done
9694 else
9695         fgrep define conftest.i >>confdefs.h
9696 fi
9697 rm -rf conftest*
9698 fi
9699
9700 ###     use option --enable-assertions to turn on generation of assertion code
9701 echo "$as_me:9701: checking if you want to enable runtime assertions" >&5
9702 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9703
9704 # Check whether --enable-assertions or --disable-assertions was given.
9705 if test "${enable_assertions+set}" = set; then
9706   enableval="$enable_assertions"
9707   with_assertions=$enableval
9708 else
9709   with_assertions=no
9710 fi;
9711 echo "$as_me:9711: result: $with_assertions" >&5
9712 echo "${ECHO_T}$with_assertions" >&6
9713 if test -n "$GCC"
9714 then
9715         if test "$with_assertions" = no
9716         then
9717                 cat >>confdefs.h <<\EOF
9718 #define NDEBUG 1
9719 EOF
9720
9721                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9722         else
9723                 ADAFLAGS="$ADAFLAGS -gnata"
9724         fi
9725 fi
9726
9727 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9728
9729 echo "$as_me:9729: checking if you want to use dmalloc for testing" >&5
9730 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9731
9732 # Check whether --with-dmalloc or --without-dmalloc was given.
9733 if test "${with_dmalloc+set}" = set; then
9734   withval="$with_dmalloc"
9735   cat >>confdefs.h <<\EOF
9736 #define USE_DMALLOC 1
9737 EOF
9738
9739         : ${with_cflags:=-g}
9740         : ${with_no_leaks:=yes}
9741          with_dmalloc=yes
9742 else
9743   with_dmalloc=
9744 fi;
9745 echo "$as_me:9745: result: ${with_dmalloc:-no}" >&5
9746 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9747
9748 case .$with_cflags in #(vi
9749 .*-g*)
9750         case .$CFLAGS in #(vi
9751         .*-g*) #(vi
9752                 ;;
9753         *)
9754
9755 cf_fix_cppflags=no
9756 cf_new_cflags=
9757 cf_new_cppflags=
9758 cf_new_extra_cppflags=
9759
9760 for cf_add_cflags in -g
9761 do
9762 case $cf_fix_cppflags in
9763 no)
9764         case $cf_add_cflags in #(vi
9765         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9766                 case $cf_add_cflags in
9767                 -D*)
9768                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9769
9770                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9771                         && test -z "${cf_tst_cflags}" \
9772                         && cf_fix_cppflags=yes
9773
9774                         if test $cf_fix_cppflags = yes ; then
9775                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9776                                 continue
9777                         elif test "${cf_tst_cflags}" = "\"'" ; then
9778                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9779                                 continue
9780                         fi
9781                         ;;
9782                 esac
9783                 case "$CPPFLAGS" in
9784                 *$cf_add_cflags) #(vi
9785                         ;;
9786                 *) #(vi
9787                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9788                         ;;
9789                 esac
9790                 ;;
9791         *)
9792                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9793                 ;;
9794         esac
9795         ;;
9796 yes)
9797         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9798
9799         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9800
9801         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9802         && test -z "${cf_tst_cflags}" \
9803         && cf_fix_cppflags=no
9804         ;;
9805 esac
9806 done
9807
9808 if test -n "$cf_new_cflags" ; then
9809
9810         CFLAGS="$CFLAGS $cf_new_cflags"
9811 fi
9812
9813 if test -n "$cf_new_cppflags" ; then
9814
9815         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9816 fi
9817
9818 if test -n "$cf_new_extra_cppflags" ; then
9819
9820         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9821 fi
9822
9823                 ;;
9824         esac
9825         ;;
9826 esac
9827
9828 if test "$with_dmalloc" = yes ; then
9829         echo "$as_me:9829: checking for dmalloc.h" >&5
9830 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9831 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9832   echo $ECHO_N "(cached) $ECHO_C" >&6
9833 else
9834   cat >conftest.$ac_ext <<_ACEOF
9835 #line 9835 "configure"
9836 #include "confdefs.h"
9837 #include <dmalloc.h>
9838 _ACEOF
9839 if { (eval echo "$as_me:9839: \"$ac_cpp conftest.$ac_ext\"") >&5
9840   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9841   ac_status=$?
9842   egrep -v '^ *\+' conftest.er1 >conftest.err
9843   rm -f conftest.er1
9844   cat conftest.err >&5
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit $ac_status); } >/dev/null; then
9847   if test -s conftest.err; then
9848     ac_cpp_err=$ac_c_preproc_warn_flag
9849   else
9850     ac_cpp_err=
9851   fi
9852 else
9853   ac_cpp_err=yes
9854 fi
9855 if test -z "$ac_cpp_err"; then
9856   ac_cv_header_dmalloc_h=yes
9857 else
9858   echo "$as_me: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   ac_cv_header_dmalloc_h=no
9861 fi
9862 rm -f conftest.err conftest.$ac_ext
9863 fi
9864 echo "$as_me:9864: result: $ac_cv_header_dmalloc_h" >&5
9865 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9866 if test $ac_cv_header_dmalloc_h = yes; then
9867
9868 echo "$as_me:9868: checking for dmalloc_debug in -ldmalloc" >&5
9869 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9870 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9871   echo $ECHO_N "(cached) $ECHO_C" >&6
9872 else
9873   ac_check_lib_save_LIBS=$LIBS
9874 LIBS="-ldmalloc  $LIBS"
9875 cat >conftest.$ac_ext <<_ACEOF
9876 #line 9876 "configure"
9877 #include "confdefs.h"
9878
9879 /* Override any gcc2 internal prototype to avoid an error.  */
9880 #ifdef __cplusplus
9881 extern "C"
9882 #endif
9883 /* We use char because int might match the return type of a gcc2
9884    builtin and then its argument prototype would still apply.  */
9885 char dmalloc_debug ();
9886 int
9887 main ()
9888 {
9889 dmalloc_debug ();
9890   ;
9891   return 0;
9892 }
9893 _ACEOF
9894 rm -f conftest.$ac_objext conftest$ac_exeext
9895 if { (eval echo "$as_me:9895: \"$ac_link\"") >&5
9896   (eval $ac_link) 2>&5
9897   ac_status=$?
9898   echo "$as_me:9898: \$? = $ac_status" >&5
9899   (exit $ac_status); } &&
9900          { ac_try='test -s conftest$ac_exeext'
9901   { (eval echo "$as_me:9901: \"$ac_try\"") >&5
9902   (eval $ac_try) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); }; }; then
9906   ac_cv_lib_dmalloc_dmalloc_debug=yes
9907 else
9908   echo "$as_me: failed program was:" >&5
9909 cat conftest.$ac_ext >&5
9910 ac_cv_lib_dmalloc_dmalloc_debug=no
9911 fi
9912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9913 LIBS=$ac_check_lib_save_LIBS
9914 fi
9915 echo "$as_me:9915: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9916 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9917 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9918   cat >>confdefs.h <<EOF
9919 #define HAVE_LIBDMALLOC 1
9920 EOF
9921
9922   LIBS="-ldmalloc $LIBS"
9923
9924 fi
9925
9926 fi
9927
9928 fi
9929
9930 echo "$as_me:9930: checking if you want to use dbmalloc for testing" >&5
9931 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9932
9933 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9934 if test "${with_dbmalloc+set}" = set; then
9935   withval="$with_dbmalloc"
9936   cat >>confdefs.h <<\EOF
9937 #define USE_DBMALLOC 1
9938 EOF
9939
9940         : ${with_cflags:=-g}
9941         : ${with_no_leaks:=yes}
9942          with_dbmalloc=yes
9943 else
9944   with_dbmalloc=
9945 fi;
9946 echo "$as_me:9946: result: ${with_dbmalloc:-no}" >&5
9947 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9948
9949 case .$with_cflags in #(vi
9950 .*-g*)
9951         case .$CFLAGS in #(vi
9952         .*-g*) #(vi
9953                 ;;
9954         *)
9955
9956 cf_fix_cppflags=no
9957 cf_new_cflags=
9958 cf_new_cppflags=
9959 cf_new_extra_cppflags=
9960
9961 for cf_add_cflags in -g
9962 do
9963 case $cf_fix_cppflags in
9964 no)
9965         case $cf_add_cflags in #(vi
9966         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9967                 case $cf_add_cflags in
9968                 -D*)
9969                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9970
9971                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9972                         && test -z "${cf_tst_cflags}" \
9973                         && cf_fix_cppflags=yes
9974
9975                         if test $cf_fix_cppflags = yes ; then
9976                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9977                                 continue
9978                         elif test "${cf_tst_cflags}" = "\"'" ; then
9979                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9980                                 continue
9981                         fi
9982                         ;;
9983                 esac
9984                 case "$CPPFLAGS" in
9985                 *$cf_add_cflags) #(vi
9986                         ;;
9987                 *) #(vi
9988                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9989                         ;;
9990                 esac
9991                 ;;
9992         *)
9993                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9994                 ;;
9995         esac
9996         ;;
9997 yes)
9998         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9999
10000         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10001
10002         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10003         && test -z "${cf_tst_cflags}" \
10004         && cf_fix_cppflags=no
10005         ;;
10006 esac
10007 done
10008
10009 if test -n "$cf_new_cflags" ; then
10010
10011         CFLAGS="$CFLAGS $cf_new_cflags"
10012 fi
10013
10014 if test -n "$cf_new_cppflags" ; then
10015
10016         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10017 fi
10018
10019 if test -n "$cf_new_extra_cppflags" ; then
10020
10021         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10022 fi
10023
10024                 ;;
10025         esac
10026         ;;
10027 esac
10028
10029 if test "$with_dbmalloc" = yes ; then
10030         echo "$as_me:10030: checking for dbmalloc.h" >&5
10031 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10032 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10033   echo $ECHO_N "(cached) $ECHO_C" >&6
10034 else
10035   cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038 #include <dbmalloc.h>
10039 _ACEOF
10040 if { (eval echo "$as_me:10040: \"$ac_cpp conftest.$ac_ext\"") >&5
10041   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10042   ac_status=$?
10043   egrep -v '^ *\+' conftest.er1 >conftest.err
10044   rm -f conftest.er1
10045   cat conftest.err >&5
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } >/dev/null; then
10048   if test -s conftest.err; then
10049     ac_cpp_err=$ac_c_preproc_warn_flag
10050   else
10051     ac_cpp_err=
10052   fi
10053 else
10054   ac_cpp_err=yes
10055 fi
10056 if test -z "$ac_cpp_err"; then
10057   ac_cv_header_dbmalloc_h=yes
10058 else
10059   echo "$as_me: failed program was:" >&5
10060   cat conftest.$ac_ext >&5
10061   ac_cv_header_dbmalloc_h=no
10062 fi
10063 rm -f conftest.err conftest.$ac_ext
10064 fi
10065 echo "$as_me:10065: result: $ac_cv_header_dbmalloc_h" >&5
10066 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10067 if test $ac_cv_header_dbmalloc_h = yes; then
10068
10069 echo "$as_me:10069: checking for debug_malloc in -ldbmalloc" >&5
10070 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10071 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10072   echo $ECHO_N "(cached) $ECHO_C" >&6
10073 else
10074   ac_check_lib_save_LIBS=$LIBS
10075 LIBS="-ldbmalloc  $LIBS"
10076 cat >conftest.$ac_ext <<_ACEOF
10077 #line 10077 "configure"
10078 #include "confdefs.h"
10079
10080 /* Override any gcc2 internal prototype to avoid an error.  */
10081 #ifdef __cplusplus
10082 extern "C"
10083 #endif
10084 /* We use char because int might match the return type of a gcc2
10085    builtin and then its argument prototype would still apply.  */
10086 char debug_malloc ();
10087 int
10088 main ()
10089 {
10090 debug_malloc ();
10091   ;
10092   return 0;
10093 }
10094 _ACEOF
10095 rm -f conftest.$ac_objext conftest$ac_exeext
10096 if { (eval echo "$as_me:10096: \"$ac_link\"") >&5
10097   (eval $ac_link) 2>&5
10098   ac_status=$?
10099   echo "$as_me:10099: \$? = $ac_status" >&5
10100   (exit $ac_status); } &&
10101          { ac_try='test -s conftest$ac_exeext'
10102   { (eval echo "$as_me:10102: \"$ac_try\"") >&5
10103   (eval $ac_try) 2>&5
10104   ac_status=$?
10105   echo "$as_me:10105: \$? = $ac_status" >&5
10106   (exit $ac_status); }; }; then
10107   ac_cv_lib_dbmalloc_debug_malloc=yes
10108 else
10109   echo "$as_me: failed program was:" >&5
10110 cat conftest.$ac_ext >&5
10111 ac_cv_lib_dbmalloc_debug_malloc=no
10112 fi
10113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10114 LIBS=$ac_check_lib_save_LIBS
10115 fi
10116 echo "$as_me:10116: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10117 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10118 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10119   cat >>confdefs.h <<EOF
10120 #define HAVE_LIBDBMALLOC 1
10121 EOF
10122
10123   LIBS="-ldbmalloc $LIBS"
10124
10125 fi
10126
10127 fi
10128
10129 fi
10130
10131 echo "$as_me:10131: checking if you want to use valgrind for testing" >&5
10132 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10133
10134 # Check whether --with-valgrind or --without-valgrind was given.
10135 if test "${with_valgrind+set}" = set; then
10136   withval="$with_valgrind"
10137   cat >>confdefs.h <<\EOF
10138 #define USE_VALGRIND 1
10139 EOF
10140
10141         : ${with_cflags:=-g}
10142         : ${with_no_leaks:=yes}
10143          with_valgrind=yes
10144 else
10145   with_valgrind=
10146 fi;
10147 echo "$as_me:10147: result: ${with_valgrind:-no}" >&5
10148 echo "${ECHO_T}${with_valgrind:-no}" >&6
10149
10150 case .$with_cflags in #(vi
10151 .*-g*)
10152         case .$CFLAGS in #(vi
10153         .*-g*) #(vi
10154                 ;;
10155         *)
10156
10157 cf_fix_cppflags=no
10158 cf_new_cflags=
10159 cf_new_cppflags=
10160 cf_new_extra_cppflags=
10161
10162 for cf_add_cflags in -g
10163 do
10164 case $cf_fix_cppflags in
10165 no)
10166         case $cf_add_cflags in #(vi
10167         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10168                 case $cf_add_cflags in
10169                 -D*)
10170                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10171
10172                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10173                         && test -z "${cf_tst_cflags}" \
10174                         && cf_fix_cppflags=yes
10175
10176                         if test $cf_fix_cppflags = yes ; then
10177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10178                                 continue
10179                         elif test "${cf_tst_cflags}" = "\"'" ; then
10180                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10181                                 continue
10182                         fi
10183                         ;;
10184                 esac
10185                 case "$CPPFLAGS" in
10186                 *$cf_add_cflags) #(vi
10187                         ;;
10188                 *) #(vi
10189                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10190                         ;;
10191                 esac
10192                 ;;
10193         *)
10194                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10195                 ;;
10196         esac
10197         ;;
10198 yes)
10199         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10200
10201         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10202
10203         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10204         && test -z "${cf_tst_cflags}" \
10205         && cf_fix_cppflags=no
10206         ;;
10207 esac
10208 done
10209
10210 if test -n "$cf_new_cflags" ; then
10211
10212         CFLAGS="$CFLAGS $cf_new_cflags"
10213 fi
10214
10215 if test -n "$cf_new_cppflags" ; then
10216
10217         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10218 fi
10219
10220 if test -n "$cf_new_extra_cppflags" ; then
10221
10222         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10223 fi
10224
10225                 ;;
10226         esac
10227         ;;
10228 esac
10229
10230 echo "$as_me:10230: checking if you want to perform memory-leak testing" >&5
10231 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10232
10233 # Check whether --enable-leaks or --disable-leaks was given.
10234 if test "${enable_leaks+set}" = set; then
10235   enableval="$enable_leaks"
10236   with_no_leaks=yes
10237 else
10238   : ${with_no_leaks:=no}
10239 fi;
10240 echo "$as_me:10240: result: $with_no_leaks" >&5
10241 echo "${ECHO_T}$with_no_leaks" >&6
10242
10243 if test "$with_no_leaks" = yes ; then
10244         cat >>confdefs.h <<\EOF
10245 #define NO_LEAKS 1
10246 EOF
10247
10248 fi
10249
10250 cat >>confdefs.h <<\EOF
10251 #define HAVE_NC_ALLOC_H 1
10252 EOF
10253
10254 ###     use option --enable-expanded to generate certain macros as functions
10255
10256 # Check whether --enable-expanded or --disable-expanded was given.
10257 if test "${enable_expanded+set}" = set; then
10258   enableval="$enable_expanded"
10259   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10260 #define NCURSES_EXPANDED 1
10261 EOF
10262
10263 fi;
10264
10265 ###     use option --disable-macros to suppress macros in favor of functions
10266
10267 # Check whether --enable-macros or --disable-macros was given.
10268 if test "${enable_macros+set}" = set; then
10269   enableval="$enable_macros"
10270   test "$enableval" = no && cat >>confdefs.h <<\EOF
10271 #define NCURSES_NOMACROS 1
10272 EOF
10273
10274 fi;
10275
10276 # Normally we only add trace() to the debug-library.  Allow this to be
10277 # extended to all models of the ncurses library:
10278 cf_all_traces=no
10279 case "$CFLAGS $CPPFLAGS" in
10280 *-DTRACE*)
10281         cf_all_traces=yes
10282         ;;
10283 esac
10284
10285 echo "$as_me:10285: checking whether to add trace feature to all models" >&5
10286 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10287
10288 # Check whether --with-trace or --without-trace was given.
10289 if test "${with_trace+set}" = set; then
10290   withval="$with_trace"
10291   cf_with_trace=$withval
10292 else
10293   cf_with_trace=$cf_all_traces
10294 fi;
10295 echo "$as_me:10295: result: $cf_with_trace" >&5
10296 echo "${ECHO_T}$cf_with_trace" >&6
10297
10298 if test "$cf_with_trace" = yes ; then
10299         LIB_TRACING=all
10300         ADA_TRACE=TRUE
10301
10302 cf_fix_cppflags=no
10303 cf_new_cflags=
10304 cf_new_cppflags=
10305 cf_new_extra_cppflags=
10306
10307 for cf_add_cflags in -DTRACE
10308 do
10309 case $cf_fix_cppflags in
10310 no)
10311         case $cf_add_cflags in #(vi
10312         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10313                 case $cf_add_cflags in
10314                 -D*)
10315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10316
10317                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10318                         && test -z "${cf_tst_cflags}" \
10319                         && cf_fix_cppflags=yes
10320
10321                         if test $cf_fix_cppflags = yes ; then
10322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10323                                 continue
10324                         elif test "${cf_tst_cflags}" = "\"'" ; then
10325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10326                                 continue
10327                         fi
10328                         ;;
10329                 esac
10330                 case "$CPPFLAGS" in
10331                 *$cf_add_cflags) #(vi
10332                         ;;
10333                 *) #(vi
10334                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10335                         ;;
10336                 esac
10337                 ;;
10338         *)
10339                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10340                 ;;
10341         esac
10342         ;;
10343 yes)
10344         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10345
10346         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10347
10348         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10349         && test -z "${cf_tst_cflags}" \
10350         && cf_fix_cppflags=no
10351         ;;
10352 esac
10353 done
10354
10355 if test -n "$cf_new_cflags" ; then
10356
10357         CFLAGS="$CFLAGS $cf_new_cflags"
10358 fi
10359
10360 if test -n "$cf_new_cppflags" ; then
10361
10362         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10363 fi
10364
10365 if test -n "$cf_new_extra_cppflags" ; then
10366
10367         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10368 fi
10369
10370 else
10371         LIB_TRACING=DEBUG
10372         ADA_TRACE=FALSE
10373 fi
10374
10375 ###     Checks for libraries.
10376 echo "$as_me:10376: checking for gettimeofday" >&5
10377 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10378 if test "${ac_cv_func_gettimeofday+set}" = set; then
10379   echo $ECHO_N "(cached) $ECHO_C" >&6
10380 else
10381   cat >conftest.$ac_ext <<_ACEOF
10382 #line 10382 "configure"
10383 #include "confdefs.h"
10384 /* System header to define __stub macros and hopefully few prototypes,
10385     which can conflict with char gettimeofday (); below.  */
10386 #include <assert.h>
10387 /* Override any gcc2 internal prototype to avoid an error.  */
10388 #ifdef __cplusplus
10389 extern "C"
10390 #endif
10391 /* We use char because int might match the return type of a gcc2
10392    builtin and then its argument prototype would still apply.  */
10393 char gettimeofday ();
10394 char (*f) ();
10395
10396 int
10397 main ()
10398 {
10399 /* The GNU C library defines this for functions which it implements
10400     to always fail with ENOSYS.  Some functions are actually named
10401     something starting with __ and the normal name is an alias.  */
10402 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10403 choke me
10404 #else
10405 f = gettimeofday;
10406 #endif
10407
10408   ;
10409   return 0;
10410 }
10411 _ACEOF
10412 rm -f conftest.$ac_objext conftest$ac_exeext
10413 if { (eval echo "$as_me:10413: \"$ac_link\"") >&5
10414   (eval $ac_link) 2>&5
10415   ac_status=$?
10416   echo "$as_me:10416: \$? = $ac_status" >&5
10417   (exit $ac_status); } &&
10418          { ac_try='test -s conftest$ac_exeext'
10419   { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420   (eval $ac_try) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); }; }; then
10424   ac_cv_func_gettimeofday=yes
10425 else
10426   echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 ac_cv_func_gettimeofday=no
10429 fi
10430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10431 fi
10432 echo "$as_me:10432: result: $ac_cv_func_gettimeofday" >&5
10433 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10434 if test $ac_cv_func_gettimeofday = yes; then
10435   cat >>confdefs.h <<\EOF
10436 #define HAVE_GETTIMEOFDAY 1
10437 EOF
10438
10439 else
10440
10441 echo "$as_me:10441: checking for gettimeofday in -lbsd" >&5
10442 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10443 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10444   echo $ECHO_N "(cached) $ECHO_C" >&6
10445 else
10446   ac_check_lib_save_LIBS=$LIBS
10447 LIBS="-lbsd  $LIBS"
10448 cat >conftest.$ac_ext <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451
10452 /* Override any gcc2 internal prototype to avoid an error.  */
10453 #ifdef __cplusplus
10454 extern "C"
10455 #endif
10456 /* We use char because int might match the return type of a gcc2
10457    builtin and then its argument prototype would still apply.  */
10458 char gettimeofday ();
10459 int
10460 main ()
10461 {
10462 gettimeofday ();
10463   ;
10464   return 0;
10465 }
10466 _ACEOF
10467 rm -f conftest.$ac_objext conftest$ac_exeext
10468 if { (eval echo "$as_me:10468: \"$ac_link\"") >&5
10469   (eval $ac_link) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit $ac_status); } &&
10473          { ac_try='test -s conftest$ac_exeext'
10474   { (eval echo "$as_me:10474: \"$ac_try\"") >&5
10475   (eval $ac_try) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); }; }; then
10479   ac_cv_lib_bsd_gettimeofday=yes
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 cat conftest.$ac_ext >&5
10483 ac_cv_lib_bsd_gettimeofday=no
10484 fi
10485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10486 LIBS=$ac_check_lib_save_LIBS
10487 fi
10488 echo "$as_me:10488: result: $ac_cv_lib_bsd_gettimeofday" >&5
10489 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10490 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10491   cat >>confdefs.h <<\EOF
10492 #define HAVE_GETTIMEOFDAY 1
10493 EOF
10494
10495         LIBS="$LIBS -lbsd"
10496 fi
10497
10498 fi
10499
10500 echo "$as_me:10500: checking if -lm needed for math functions" >&5
10501 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10502 if test "${cf_cv_need_libm+set}" = set; then
10503   echo $ECHO_N "(cached) $ECHO_C" >&6
10504 else
10505
10506         cat >conftest.$ac_ext <<_ACEOF
10507 #line 10507 "configure"
10508 #include "confdefs.h"
10509
10510         #include <stdio.h>
10511         #include <math.h>
10512
10513 int
10514 main ()
10515 {
10516 double x = rand(); printf("result = %g\n", sin(x))
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 rm -f conftest.$ac_objext conftest$ac_exeext
10522 if { (eval echo "$as_me:10522: \"$ac_link\"") >&5
10523   (eval $ac_link) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); } &&
10527          { ac_try='test -s conftest$ac_exeext'
10528   { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529   (eval $ac_try) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); }; }; then
10533   cf_cv_need_libm=no
10534 else
10535   echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 cf_cv_need_libm=yes
10538 fi
10539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10540 fi
10541 echo "$as_me:10541: result: $cf_cv_need_libm" >&5
10542 echo "${ECHO_T}$cf_cv_need_libm" >&6
10543 if test "$cf_cv_need_libm" = yes
10544 then
10545 MATH_LIB=-lm
10546 fi
10547
10548 ###     Checks for header files.
10549 echo "$as_me:10549: checking for ANSI C header files" >&5
10550 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10551 if test "${ac_cv_header_stdc+set}" = set; then
10552   echo $ECHO_N "(cached) $ECHO_C" >&6
10553 else
10554   cat >conftest.$ac_ext <<_ACEOF
10555 #line 10555 "configure"
10556 #include "confdefs.h"
10557 #include <stdlib.h>
10558 #include <stdarg.h>
10559 #include <string.h>
10560 #include <float.h>
10561
10562 _ACEOF
10563 if { (eval echo "$as_me:10563: \"$ac_cpp conftest.$ac_ext\"") >&5
10564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10565   ac_status=$?
10566   egrep -v '^ *\+' conftest.er1 >conftest.err
10567   rm -f conftest.er1
10568   cat conftest.err >&5
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit $ac_status); } >/dev/null; then
10571   if test -s conftest.err; then
10572     ac_cpp_err=$ac_c_preproc_warn_flag
10573   else
10574     ac_cpp_err=
10575   fi
10576 else
10577   ac_cpp_err=yes
10578 fi
10579 if test -z "$ac_cpp_err"; then
10580   ac_cv_header_stdc=yes
10581 else
10582   echo "$as_me: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   ac_cv_header_stdc=no
10585 fi
10586 rm -f conftest.err conftest.$ac_ext
10587
10588 if test $ac_cv_header_stdc = yes; then
10589   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10590   cat >conftest.$ac_ext <<_ACEOF
10591 #line 10591 "configure"
10592 #include "confdefs.h"
10593 #include <string.h>
10594
10595 _ACEOF
10596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10597   egrep "memchr" >/dev/null 2>&1; then
10598   :
10599 else
10600   ac_cv_header_stdc=no
10601 fi
10602 rm -f conftest*
10603
10604 fi
10605
10606 if test $ac_cv_header_stdc = yes; then
10607   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10608   cat >conftest.$ac_ext <<_ACEOF
10609 #line 10609 "configure"
10610 #include "confdefs.h"
10611 #include <stdlib.h>
10612
10613 _ACEOF
10614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10615   egrep "free" >/dev/null 2>&1; then
10616   :
10617 else
10618   ac_cv_header_stdc=no
10619 fi
10620 rm -f conftest*
10621
10622 fi
10623
10624 if test $ac_cv_header_stdc = yes; then
10625   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10626   if test "$cross_compiling" = yes; then
10627   :
10628 else
10629   cat >conftest.$ac_ext <<_ACEOF
10630 #line 10630 "configure"
10631 #include "confdefs.h"
10632 #include <ctype.h>
10633 #if ((' ' & 0x0FF) == 0x020)
10634 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10635 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10636 #else
10637 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10638                      || ('j' <= (c) && (c) <= 'r') \
10639                      || ('s' <= (c) && (c) <= 'z'))
10640 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10641 #endif
10642
10643 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10644 int
10645 main ()
10646 {
10647   int i;
10648   for (i = 0; i < 256; i++)
10649     if (XOR (islower (i), ISLOWER (i))
10650         || toupper (i) != TOUPPER (i))
10651       $ac_main_return(2);
10652   $ac_main_return (0);
10653 }
10654 _ACEOF
10655 rm -f conftest$ac_exeext
10656 if { (eval echo "$as_me:10656: \"$ac_link\"") >&5
10657   (eval $ac_link) 2>&5
10658   ac_status=$?
10659   echo "$as_me:10659: \$? = $ac_status" >&5
10660   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10661   { (eval echo "$as_me:10661: \"$ac_try\"") >&5
10662   (eval $ac_try) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); }; }; then
10666   :
10667 else
10668   echo "$as_me: program exited with status $ac_status" >&5
10669 echo "$as_me: failed program was:" >&5
10670 cat conftest.$ac_ext >&5
10671 ac_cv_header_stdc=no
10672 fi
10673 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10674 fi
10675 fi
10676 fi
10677 echo "$as_me:10677: result: $ac_cv_header_stdc" >&5
10678 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10679 if test $ac_cv_header_stdc = yes; then
10680
10681 cat >>confdefs.h <<\EOF
10682 #define STDC_HEADERS 1
10683 EOF
10684
10685 fi
10686
10687 ac_header_dirent=no
10688 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10689   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10690 echo "$as_me:10690: checking for $ac_hdr that defines DIR" >&5
10691 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10692 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695   cat >conftest.$ac_ext <<_ACEOF
10696 #line 10696 "configure"
10697 #include "confdefs.h"
10698 #include <sys/types.h>
10699 #include <$ac_hdr>
10700
10701 int
10702 main ()
10703 {
10704 if ((DIR *) 0)
10705 return 0;
10706   ;
10707   return 0;
10708 }
10709 _ACEOF
10710 rm -f conftest.$ac_objext
10711 if { (eval echo "$as_me:10711: \"$ac_compile\"") >&5
10712   (eval $ac_compile) 2>&5
10713   ac_status=$?
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit $ac_status); } &&
10716          { ac_try='test -s conftest.$ac_objext'
10717   { (eval echo "$as_me:10717: \"$ac_try\"") >&5
10718   (eval $ac_try) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); }; }; then
10722   eval "$as_ac_Header=yes"
10723 else
10724   echo "$as_me: failed program was:" >&5
10725 cat conftest.$ac_ext >&5
10726 eval "$as_ac_Header=no"
10727 fi
10728 rm -f conftest.$ac_objext conftest.$ac_ext
10729 fi
10730 echo "$as_me:10730: result: `eval echo '${'$as_ac_Header'}'`" >&5
10731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10733   cat >>confdefs.h <<EOF
10734 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10735 EOF
10736
10737 ac_header_dirent=$ac_hdr; break
10738 fi
10739
10740 done
10741 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10742 if test $ac_header_dirent = dirent.h; then
10743   echo "$as_me:10743: checking for opendir in -ldir" >&5
10744 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10745 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10746   echo $ECHO_N "(cached) $ECHO_C" >&6
10747 else
10748   ac_check_lib_save_LIBS=$LIBS
10749 LIBS="-ldir  $LIBS"
10750 cat >conftest.$ac_ext <<_ACEOF
10751 #line 10751 "configure"
10752 #include "confdefs.h"
10753
10754 /* Override any gcc2 internal prototype to avoid an error.  */
10755 #ifdef __cplusplus
10756 extern "C"
10757 #endif
10758 /* We use char because int might match the return type of a gcc2
10759    builtin and then its argument prototype would still apply.  */
10760 char opendir ();
10761 int
10762 main ()
10763 {
10764 opendir ();
10765   ;
10766   return 0;
10767 }
10768 _ACEOF
10769 rm -f conftest.$ac_objext conftest$ac_exeext
10770 if { (eval echo "$as_me:10770: \"$ac_link\"") >&5
10771   (eval $ac_link) 2>&5
10772   ac_status=$?
10773   echo "$as_me:10773: \$? = $ac_status" >&5
10774   (exit $ac_status); } &&
10775          { ac_try='test -s conftest$ac_exeext'
10776   { (eval echo "$as_me:10776: \"$ac_try\"") >&5
10777   (eval $ac_try) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); }; }; then
10781   ac_cv_lib_dir_opendir=yes
10782 else
10783   echo "$as_me: failed program was:" >&5
10784 cat conftest.$ac_ext >&5
10785 ac_cv_lib_dir_opendir=no
10786 fi
10787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10788 LIBS=$ac_check_lib_save_LIBS
10789 fi
10790 echo "$as_me:10790: result: $ac_cv_lib_dir_opendir" >&5
10791 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10792 if test $ac_cv_lib_dir_opendir = yes; then
10793   LIBS="$LIBS -ldir"
10794 fi
10795
10796 else
10797   echo "$as_me:10797: checking for opendir in -lx" >&5
10798 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10799 if test "${ac_cv_lib_x_opendir+set}" = set; then
10800   echo $ECHO_N "(cached) $ECHO_C" >&6
10801 else
10802   ac_check_lib_save_LIBS=$LIBS
10803 LIBS="-lx  $LIBS"
10804 cat >conftest.$ac_ext <<_ACEOF
10805 #line 10805 "configure"
10806 #include "confdefs.h"
10807
10808 /* Override any gcc2 internal prototype to avoid an error.  */
10809 #ifdef __cplusplus
10810 extern "C"
10811 #endif
10812 /* We use char because int might match the return type of a gcc2
10813    builtin and then its argument prototype would still apply.  */
10814 char opendir ();
10815 int
10816 main ()
10817 {
10818 opendir ();
10819   ;
10820   return 0;
10821 }
10822 _ACEOF
10823 rm -f conftest.$ac_objext conftest$ac_exeext
10824 if { (eval echo "$as_me:10824: \"$ac_link\"") >&5
10825   (eval $ac_link) 2>&5
10826   ac_status=$?
10827   echo "$as_me:10827: \$? = $ac_status" >&5
10828   (exit $ac_status); } &&
10829          { ac_try='test -s conftest$ac_exeext'
10830   { (eval echo "$as_me:10830: \"$ac_try\"") >&5
10831   (eval $ac_try) 2>&5
10832   ac_status=$?
10833   echo "$as_me:10833: \$? = $ac_status" >&5
10834   (exit $ac_status); }; }; then
10835   ac_cv_lib_x_opendir=yes
10836 else
10837   echo "$as_me: failed program was:" >&5
10838 cat conftest.$ac_ext >&5
10839 ac_cv_lib_x_opendir=no
10840 fi
10841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10842 LIBS=$ac_check_lib_save_LIBS
10843 fi
10844 echo "$as_me:10844: result: $ac_cv_lib_x_opendir" >&5
10845 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10846 if test $ac_cv_lib_x_opendir = yes; then
10847   LIBS="$LIBS -lx"
10848 fi
10849
10850 fi
10851
10852 echo "$as_me:10852: checking whether time.h and sys/time.h may both be included" >&5
10853 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10854 if test "${ac_cv_header_time+set}" = set; then
10855   echo $ECHO_N "(cached) $ECHO_C" >&6
10856 else
10857   cat >conftest.$ac_ext <<_ACEOF
10858 #line 10858 "configure"
10859 #include "confdefs.h"
10860 #include <sys/types.h>
10861 #include <sys/time.h>
10862 #include <time.h>
10863
10864 int
10865 main ()
10866 {
10867 if ((struct tm *) 0)
10868 return 0;
10869   ;
10870   return 0;
10871 }
10872 _ACEOF
10873 rm -f conftest.$ac_objext
10874 if { (eval echo "$as_me:10874: \"$ac_compile\"") >&5
10875   (eval $ac_compile) 2>&5
10876   ac_status=$?
10877   echo "$as_me:10877: \$? = $ac_status" >&5
10878   (exit $ac_status); } &&
10879          { ac_try='test -s conftest.$ac_objext'
10880   { (eval echo "$as_me:10880: \"$ac_try\"") >&5
10881   (eval $ac_try) 2>&5
10882   ac_status=$?
10883   echo "$as_me:10883: \$? = $ac_status" >&5
10884   (exit $ac_status); }; }; then
10885   ac_cv_header_time=yes
10886 else
10887   echo "$as_me: failed program was:" >&5
10888 cat conftest.$ac_ext >&5
10889 ac_cv_header_time=no
10890 fi
10891 rm -f conftest.$ac_objext conftest.$ac_ext
10892 fi
10893 echo "$as_me:10893: result: $ac_cv_header_time" >&5
10894 echo "${ECHO_T}$ac_cv_header_time" >&6
10895 if test $ac_cv_header_time = yes; then
10896
10897 cat >>confdefs.h <<\EOF
10898 #define TIME_WITH_SYS_TIME 1
10899 EOF
10900
10901 fi
10902
10903 echo "$as_me:10903: checking for regular-expression headers" >&5
10904 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10905 if test "${cf_cv_regex+set}" = set; then
10906   echo $ECHO_N "(cached) $ECHO_C" >&6
10907 else
10908
10909 cat >conftest.$ac_ext <<_ACEOF
10910 #line 10910 "configure"
10911 #include "confdefs.h"
10912 #include <sys/types.h>
10913 #include <regex.h>
10914 int
10915 main ()
10916 {
10917
10918         regex_t *p;
10919         int x = regcomp(p, "", 0);
10920         int y = regexec(p, "", 0, 0, 0);
10921         regfree(p);
10922
10923   ;
10924   return 0;
10925 }
10926 _ACEOF
10927 rm -f conftest.$ac_objext conftest$ac_exeext
10928 if { (eval echo "$as_me:10928: \"$ac_link\"") >&5
10929   (eval $ac_link) 2>&5
10930   ac_status=$?
10931   echo "$as_me:10931: \$? = $ac_status" >&5
10932   (exit $ac_status); } &&
10933          { ac_try='test -s conftest$ac_exeext'
10934   { (eval echo "$as_me:10934: \"$ac_try\"") >&5
10935   (eval $ac_try) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); }; }; then
10939   cf_cv_regex="regex.h"
10940 else
10941   echo "$as_me: failed program was:" >&5
10942 cat conftest.$ac_ext >&5
10943
10944         cat >conftest.$ac_ext <<_ACEOF
10945 #line 10945 "configure"
10946 #include "confdefs.h"
10947 #include <regexp.h>
10948 int
10949 main ()
10950 {
10951
10952                 char *p = compile("", "", "", 0);
10953                 int x = step("", "");
10954
10955   ;
10956   return 0;
10957 }
10958 _ACEOF
10959 rm -f conftest.$ac_objext conftest$ac_exeext
10960 if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
10961   (eval $ac_link) 2>&5
10962   ac_status=$?
10963   echo "$as_me:10963: \$? = $ac_status" >&5
10964   (exit $ac_status); } &&
10965          { ac_try='test -s conftest$ac_exeext'
10966   { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967   (eval $ac_try) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit $ac_status); }; }; then
10971   cf_cv_regex="regexp.h"
10972 else
10973   echo "$as_me: failed program was:" >&5
10974 cat conftest.$ac_ext >&5
10975
10976                 cf_save_LIBS="$LIBS"
10977                 LIBS="-lgen $LIBS"
10978                 cat >conftest.$ac_ext <<_ACEOF
10979 #line 10979 "configure"
10980 #include "confdefs.h"
10981 #include <regexpr.h>
10982 int
10983 main ()
10984 {
10985
10986                         char *p = compile("", "", "");
10987                         int x = step("", "");
10988
10989   ;
10990   return 0;
10991 }
10992 _ACEOF
10993 rm -f conftest.$ac_objext conftest$ac_exeext
10994 if { (eval echo "$as_me:10994: \"$ac_link\"") >&5
10995   (eval $ac_link) 2>&5
10996   ac_status=$?
10997   echo "$as_me:10997: \$? = $ac_status" >&5
10998   (exit $ac_status); } &&
10999          { ac_try='test -s conftest$ac_exeext'
11000   { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001   (eval $ac_try) 2>&5
11002   ac_status=$?
11003   echo "$as_me:11003: \$? = $ac_status" >&5
11004   (exit $ac_status); }; }; then
11005   cf_cv_regex="regexpr.h"
11006 else
11007   echo "$as_me: failed program was:" >&5
11008 cat conftest.$ac_ext >&5
11009 LIBS="$cf_save_LIBS"
11010 fi
11011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11012 fi
11013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11014 fi
11015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11016
11017 fi
11018
11019 echo "$as_me:11019: result: $cf_cv_regex" >&5
11020 echo "${ECHO_T}$cf_cv_regex" >&6
11021 case $cf_cv_regex in
11022         regex.h)   cat >>confdefs.h <<\EOF
11023 #define HAVE_REGEX_H_FUNCS 1
11024 EOF
11025  ;;
11026         regexp.h)  cat >>confdefs.h <<\EOF
11027 #define HAVE_REGEXP_H_FUNCS 1
11028 EOF
11029  ;;
11030         regexpr.h) cat >>confdefs.h <<\EOF
11031 #define HAVE_REGEXPR_H_FUNCS 1
11032 EOF
11033  ;;
11034 esac
11035
11036 for ac_header in \
11037 fcntl.h \
11038 getopt.h \
11039 limits.h \
11040 locale.h \
11041 poll.h \
11042 sys/bsdtypes.h \
11043 sys/ioctl.h \
11044 sys/param.h \
11045 sys/poll.h \
11046 sys/select.h \
11047 sys/time.h \
11048 sys/times.h \
11049 ttyent.h \
11050 unistd.h \
11051 wctype.h \
11052
11053 do
11054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11055 echo "$as_me:11055: checking for $ac_header" >&5
11056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11058   echo $ECHO_N "(cached) $ECHO_C" >&6
11059 else
11060   cat >conftest.$ac_ext <<_ACEOF
11061 #line 11061 "configure"
11062 #include "confdefs.h"
11063 #include <$ac_header>
11064 _ACEOF
11065 if { (eval echo "$as_me:11065: \"$ac_cpp conftest.$ac_ext\"") >&5
11066   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11067   ac_status=$?
11068   egrep -v '^ *\+' conftest.er1 >conftest.err
11069   rm -f conftest.er1
11070   cat conftest.err >&5
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit $ac_status); } >/dev/null; then
11073   if test -s conftest.err; then
11074     ac_cpp_err=$ac_c_preproc_warn_flag
11075   else
11076     ac_cpp_err=
11077   fi
11078 else
11079   ac_cpp_err=yes
11080 fi
11081 if test -z "$ac_cpp_err"; then
11082   eval "$as_ac_Header=yes"
11083 else
11084   echo "$as_me: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   eval "$as_ac_Header=no"
11087 fi
11088 rm -f conftest.err conftest.$ac_ext
11089 fi
11090 echo "$as_me:11090: result: `eval echo '${'$as_ac_Header'}'`" >&5
11091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11092 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11093   cat >>confdefs.h <<EOF
11094 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11095 EOF
11096
11097 fi
11098 done
11099
11100 # check for ISC (this may also define _POSIX_SOURCE)
11101 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11102 if test "$ISC" = yes ; then
11103
11104 echo "$as_me:11104: checking for main in -lcposix" >&5
11105 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11106 if test "${ac_cv_lib_cposix_main+set}" = set; then
11107   echo $ECHO_N "(cached) $ECHO_C" >&6
11108 else
11109   ac_check_lib_save_LIBS=$LIBS
11110 LIBS="-lcposix  $LIBS"
11111 cat >conftest.$ac_ext <<_ACEOF
11112 #line 11112 "configure"
11113 #include "confdefs.h"
11114
11115 int
11116 main ()
11117 {
11118 main ();
11119   ;
11120   return 0;
11121 }
11122 _ACEOF
11123 rm -f conftest.$ac_objext conftest$ac_exeext
11124 if { (eval echo "$as_me:11124: \"$ac_link\"") >&5
11125   (eval $ac_link) 2>&5
11126   ac_status=$?
11127   echo "$as_me:11127: \$? = $ac_status" >&5
11128   (exit $ac_status); } &&
11129          { ac_try='test -s conftest$ac_exeext'
11130   { (eval echo "$as_me:11130: \"$ac_try\"") >&5
11131   (eval $ac_try) 2>&5
11132   ac_status=$?
11133   echo "$as_me:11133: \$? = $ac_status" >&5
11134   (exit $ac_status); }; }; then
11135   ac_cv_lib_cposix_main=yes
11136 else
11137   echo "$as_me: failed program was:" >&5
11138 cat conftest.$ac_ext >&5
11139 ac_cv_lib_cposix_main=no
11140 fi
11141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11142 LIBS=$ac_check_lib_save_LIBS
11143 fi
11144 echo "$as_me:11144: result: $ac_cv_lib_cposix_main" >&5
11145 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11146 if test $ac_cv_lib_cposix_main = yes; then
11147   cat >>confdefs.h <<EOF
11148 #define HAVE_LIBCPOSIX 1
11149 EOF
11150
11151   LIBS="-lcposix $LIBS"
11152
11153 fi
11154
11155         echo "$as_me:11155: checking for bzero in -linet" >&5
11156 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11157 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11158   echo $ECHO_N "(cached) $ECHO_C" >&6
11159 else
11160   ac_check_lib_save_LIBS=$LIBS
11161 LIBS="-linet  $LIBS"
11162 cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165
11166 /* Override any gcc2 internal prototype to avoid an error.  */
11167 #ifdef __cplusplus
11168 extern "C"
11169 #endif
11170 /* We use char because int might match the return type of a gcc2
11171    builtin and then its argument prototype would still apply.  */
11172 char bzero ();
11173 int
11174 main ()
11175 {
11176 bzero ();
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext conftest$ac_exeext
11182 if { (eval echo "$as_me:11182: \"$ac_link\"") >&5
11183   (eval $ac_link) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit $ac_status); } &&
11187          { ac_try='test -s conftest$ac_exeext'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); }; }; then
11193   ac_cv_lib_inet_bzero=yes
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 ac_cv_lib_inet_bzero=no
11198 fi
11199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11200 LIBS=$ac_check_lib_save_LIBS
11201 fi
11202 echo "$as_me:11202: result: $ac_cv_lib_inet_bzero" >&5
11203 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11204 if test $ac_cv_lib_inet_bzero = yes; then
11205   LIBS="$LIBS -linet"
11206 fi
11207 fi
11208
11209 echo "$as_me:11209: checking if sys/time.h works with sys/select.h" >&5
11210 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11211 if test "${cf_cv_sys_time_select+set}" = set; then
11212   echo $ECHO_N "(cached) $ECHO_C" >&6
11213 else
11214
11215 cat >conftest.$ac_ext <<_ACEOF
11216 #line 11216 "configure"
11217 #include "confdefs.h"
11218
11219 #include <sys/types.h>
11220 #ifdef HAVE_SYS_TIME_H
11221 #include <sys/time.h>
11222 #endif
11223 #ifdef HAVE_SYS_SELECT_H
11224 #include <sys/select.h>
11225 #endif
11226
11227 int
11228 main ()
11229 {
11230
11231   ;
11232   return 0;
11233 }
11234 _ACEOF
11235 rm -f conftest.$ac_objext
11236 if { (eval echo "$as_me:11236: \"$ac_compile\"") >&5
11237   (eval $ac_compile) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); } &&
11241          { ac_try='test -s conftest.$ac_objext'
11242   { (eval echo "$as_me:11242: \"$ac_try\"") >&5
11243   (eval $ac_try) 2>&5
11244   ac_status=$?
11245   echo "$as_me:11245: \$? = $ac_status" >&5
11246   (exit $ac_status); }; }; then
11247   cf_cv_sys_time_select=yes
11248 else
11249   echo "$as_me: failed program was:" >&5
11250 cat conftest.$ac_ext >&5
11251 cf_cv_sys_time_select=no
11252 fi
11253 rm -f conftest.$ac_objext conftest.$ac_ext
11254
11255 fi
11256
11257 echo "$as_me:11257: result: $cf_cv_sys_time_select" >&5
11258 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11259 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11260 #define HAVE_SYS_TIME_SELECT 1
11261 EOF
11262
11263 ###     checks for compiler characteristics
11264 ac_ext=c
11265 ac_cpp='$CPP $CPPFLAGS'
11266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11269 ac_main_return=return
11270
11271 echo "$as_me:11271: checking for $CC option to accept ANSI C" >&5
11272 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11273 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11274   echo $ECHO_N "(cached) $ECHO_C" >&6
11275 else
11276   ac_cv_prog_cc_stdc=no
11277 ac_save_CC=$CC
11278 cat >conftest.$ac_ext <<_ACEOF
11279 #line 11279 "configure"
11280 #include "confdefs.h"
11281 #include <stdarg.h>
11282 #include <stdio.h>
11283 #include <sys/types.h>
11284 #include <sys/stat.h>
11285 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11286 struct buf { int x; };
11287 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11288 static char *e (p, i)
11289      char **p;
11290      int i;
11291 {
11292   return p[i];
11293 }
11294 static char *f (char * (*g) (char **, int), char **p, ...)
11295 {
11296   char *s;
11297   va_list v;
11298   va_start (v,p);
11299   s = g (p, va_arg (v,int));
11300   va_end (v);
11301   return s;
11302 }
11303 int test (int i, double x);
11304 struct s1 {int (*f) (int a);};
11305 struct s2 {int (*f) (double a);};
11306 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11307 int argc;
11308 char **argv;
11309 int
11310 main ()
11311 {
11312 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11313   ;
11314   return 0;
11315 }
11316 _ACEOF
11317 # Don't try gcc -ansi; that turns off useful extensions and
11318 # breaks some systems' header files.
11319 # AIX                   -qlanglvl=ansi
11320 # Ultrix and OSF/1      -std1
11321 # HP-UX 10.20 and later -Ae
11322 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11323 # SVR4                  -Xc -D__EXTENSIONS__
11324 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11325 do
11326   CC="$ac_save_CC $ac_arg"
11327   rm -f conftest.$ac_objext
11328 if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
11329   (eval $ac_compile) 2>&5
11330   ac_status=$?
11331   echo "$as_me:11331: \$? = $ac_status" >&5
11332   (exit $ac_status); } &&
11333          { ac_try='test -s conftest.$ac_objext'
11334   { (eval echo "$as_me:11334: \"$ac_try\"") >&5
11335   (eval $ac_try) 2>&5
11336   ac_status=$?
11337   echo "$as_me:11337: \$? = $ac_status" >&5
11338   (exit $ac_status); }; }; then
11339   ac_cv_prog_cc_stdc=$ac_arg
11340 break
11341 else
11342   echo "$as_me: failed program was:" >&5
11343 cat conftest.$ac_ext >&5
11344 fi
11345 rm -f conftest.$ac_objext
11346 done
11347 rm -f conftest.$ac_ext conftest.$ac_objext
11348 CC=$ac_save_CC
11349
11350 fi
11351
11352 case "x$ac_cv_prog_cc_stdc" in
11353   x|xno)
11354     echo "$as_me:11354: result: none needed" >&5
11355 echo "${ECHO_T}none needed" >&6 ;;
11356   *)
11357     echo "$as_me:11357: result: $ac_cv_prog_cc_stdc" >&5
11358 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11359     CC="$CC $ac_cv_prog_cc_stdc" ;;
11360 esac
11361
11362 echo "$as_me:11362: checking for an ANSI C-conforming const" >&5
11363 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11364 if test "${ac_cv_c_const+set}" = set; then
11365   echo $ECHO_N "(cached) $ECHO_C" >&6
11366 else
11367   cat >conftest.$ac_ext <<_ACEOF
11368 #line 11368 "configure"
11369 #include "confdefs.h"
11370
11371 int
11372 main ()
11373 {
11374 /* FIXME: Include the comments suggested by Paul. */
11375 #ifndef __cplusplus
11376   /* Ultrix mips cc rejects this.  */
11377   typedef int charset[2];
11378   const charset x;
11379   /* SunOS 4.1.1 cc rejects this.  */
11380   char const *const *ccp;
11381   char **p;
11382   /* NEC SVR4.0.2 mips cc rejects this.  */
11383   struct point {int x, y;};
11384   static struct point const zero = {0,0};
11385   /* AIX XL C 1.02.0.0 rejects this.
11386      It does not let you subtract one const X* pointer from another in
11387      an arm of an if-expression whose if-part is not a constant
11388      expression */
11389   const char *g = "string";
11390   ccp = &g + (g ? g-g : 0);
11391   /* HPUX 7.0 cc rejects these. */
11392   ++ccp;
11393   p = (char**) ccp;
11394   ccp = (char const *const *) p;
11395   { /* SCO 3.2v4 cc rejects this.  */
11396     char *t;
11397     char const *s = 0 ? (char *) 0 : (char const *) 0;
11398
11399     *t++ = 0;
11400   }
11401   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11402     int x[] = {25, 17};
11403     const int *foo = &x[0];
11404     ++foo;
11405   }
11406   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11407     typedef const int *iptr;
11408     iptr p = 0;
11409     ++p;
11410   }
11411   { /* AIX XL C 1.02.0.0 rejects this saying
11412        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11413     struct s { int j; const int *ap[3]; };
11414     struct s *b; b->j = 5;
11415   }
11416   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11417     const int foo = 10;
11418   }
11419 #endif
11420
11421   ;
11422   return 0;
11423 }
11424 _ACEOF
11425 rm -f conftest.$ac_objext
11426 if { (eval echo "$as_me:11426: \"$ac_compile\"") >&5
11427   (eval $ac_compile) 2>&5
11428   ac_status=$?
11429   echo "$as_me:11429: \$? = $ac_status" >&5
11430   (exit $ac_status); } &&
11431          { ac_try='test -s conftest.$ac_objext'
11432   { (eval echo "$as_me:11432: \"$ac_try\"") >&5
11433   (eval $ac_try) 2>&5
11434   ac_status=$?
11435   echo "$as_me:11435: \$? = $ac_status" >&5
11436   (exit $ac_status); }; }; then
11437   ac_cv_c_const=yes
11438 else
11439   echo "$as_me: failed program was:" >&5
11440 cat conftest.$ac_ext >&5
11441 ac_cv_c_const=no
11442 fi
11443 rm -f conftest.$ac_objext conftest.$ac_ext
11444 fi
11445 echo "$as_me:11445: result: $ac_cv_c_const" >&5
11446 echo "${ECHO_T}$ac_cv_c_const" >&6
11447 if test $ac_cv_c_const = no; then
11448
11449 cat >>confdefs.h <<\EOF
11450 #define const
11451 EOF
11452
11453 fi
11454
11455 echo "$as_me:11455: checking for inline" >&5
11456 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11457 if test "${ac_cv_c_inline+set}" = set; then
11458   echo $ECHO_N "(cached) $ECHO_C" >&6
11459 else
11460   ac_cv_c_inline=no
11461 for ac_kw in inline __inline__ __inline; do
11462   cat >conftest.$ac_ext <<_ACEOF
11463 #line 11463 "configure"
11464 #include "confdefs.h"
11465 #ifndef __cplusplus
11466 static $ac_kw int static_foo () {return 0; }
11467 $ac_kw int foo () {return 0; }
11468 #endif
11469
11470 _ACEOF
11471 rm -f conftest.$ac_objext
11472 if { (eval echo "$as_me:11472: \"$ac_compile\"") >&5
11473   (eval $ac_compile) 2>&5
11474   ac_status=$?
11475   echo "$as_me:11475: \$? = $ac_status" >&5
11476   (exit $ac_status); } &&
11477          { ac_try='test -s conftest.$ac_objext'
11478   { (eval echo "$as_me:11478: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:11481: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   ac_cv_c_inline=$ac_kw; break
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 cat conftest.$ac_ext >&5
11487 fi
11488 rm -f conftest.$ac_objext conftest.$ac_ext
11489 done
11490
11491 fi
11492 echo "$as_me:11492: result: $ac_cv_c_inline" >&5
11493 echo "${ECHO_T}$ac_cv_c_inline" >&6
11494 case $ac_cv_c_inline in
11495   inline | yes) ;;
11496   no)
11497 cat >>confdefs.h <<\EOF
11498 #define inline
11499 EOF
11500  ;;
11501   *)  cat >>confdefs.h <<EOF
11502 #define inline $ac_cv_c_inline
11503 EOF
11504  ;;
11505 esac
11506
11507 NCURSES_INLINE=
11508 if test "$ac_cv_c_inline" != no ; then
11509   NCURSES_INLINE=inline
11510   if test "$INTEL_COMPILER" = yes
11511   then
11512     :
11513   elif test "$GCC" = yes
11514   then
11515     echo "$as_me:11515: checking if gcc supports options to tune inlining" >&5
11516 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11517 if test "${cf_cv_gcc_inline+set}" = set; then
11518   echo $ECHO_N "(cached) $ECHO_C" >&6
11519 else
11520
11521       cf_save_CFLAGS=$CFLAGS
11522       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11523       cat >conftest.$ac_ext <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526 inline int foo(void) { return 1; }
11527 int
11528 main ()
11529 {
11530 ${cf_cv_main_return:-return} foo()
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 rm -f conftest.$ac_objext
11536 if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5
11537   (eval $ac_compile) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit $ac_status); } &&
11541          { ac_try='test -s conftest.$ac_objext'
11542   { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543   (eval $ac_try) 2>&5
11544   ac_status=$?
11545   echo "$as_me:11545: \$? = $ac_status" >&5
11546   (exit $ac_status); }; }; then
11547   cf_cv_gcc_inline=yes
11548 else
11549   echo "$as_me: failed program was:" >&5
11550 cat conftest.$ac_ext >&5
11551 cf_cv_gcc_inline=no
11552 fi
11553 rm -f conftest.$ac_objext conftest.$ac_ext
11554       CFLAGS=$cf_save_CFLAGS
11555
11556 fi
11557 echo "$as_me:11557: result: $cf_cv_gcc_inline" >&5
11558 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11559     if test "$cf_cv_gcc_inline" = yes ; then
11560
11561 cf_fix_cppflags=no
11562 cf_new_cflags=
11563 cf_new_cppflags=
11564 cf_new_extra_cppflags=
11565
11566 for cf_add_cflags in --param max-inline-insns-single=1200
11567 do
11568 case $cf_fix_cppflags in
11569 no)
11570         case $cf_add_cflags in #(vi
11571         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11572                 case $cf_add_cflags in
11573                 -D*)
11574                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11575
11576                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11577                         && test -z "${cf_tst_cflags}" \
11578                         && cf_fix_cppflags=yes
11579
11580                         if test $cf_fix_cppflags = yes ; then
11581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11582                                 continue
11583                         elif test "${cf_tst_cflags}" = "\"'" ; then
11584                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11585                                 continue
11586                         fi
11587                         ;;
11588                 esac
11589                 case "$CPPFLAGS" in
11590                 *$cf_add_cflags) #(vi
11591                         ;;
11592                 *) #(vi
11593                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11594                         ;;
11595                 esac
11596                 ;;
11597         *)
11598                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11599                 ;;
11600         esac
11601         ;;
11602 yes)
11603         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11604
11605         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11606
11607         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11608         && test -z "${cf_tst_cflags}" \
11609         && cf_fix_cppflags=no
11610         ;;
11611 esac
11612 done
11613
11614 if test -n "$cf_new_cflags" ; then
11615
11616         CFLAGS="$CFLAGS $cf_new_cflags"
11617 fi
11618
11619 if test -n "$cf_new_cppflags" ; then
11620
11621         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11622 fi
11623
11624 if test -n "$cf_new_extra_cppflags" ; then
11625
11626         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11627 fi
11628
11629     fi
11630   fi
11631 fi
11632
11633 echo "$as_me:11633: checking for signal global datatype" >&5
11634 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11635 if test "${cf_cv_sig_atomic_t+set}" = set; then
11636   echo $ECHO_N "(cached) $ECHO_C" >&6
11637 else
11638
11639         for cf_type in \
11640                 "volatile sig_atomic_t" \
11641                 "sig_atomic_t" \
11642                 "int"
11643         do
11644         cat >conftest.$ac_ext <<_ACEOF
11645 #line 11645 "configure"
11646 #include "confdefs.h"
11647
11648 #include <sys/types.h>
11649 #include <signal.h>
11650 #include <stdio.h>
11651
11652 extern $cf_type x;
11653 $cf_type x;
11654 static void handler(int sig)
11655 {
11656         x = 5;
11657 }
11658 int
11659 main ()
11660 {
11661 signal(SIGINT, handler);
11662                  x = 1
11663   ;
11664   return 0;
11665 }
11666 _ACEOF
11667 rm -f conftest.$ac_objext
11668 if { (eval echo "$as_me:11668: \"$ac_compile\"") >&5
11669   (eval $ac_compile) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); } &&
11673          { ac_try='test -s conftest.$ac_objext'
11674   { (eval echo "$as_me:11674: \"$ac_try\"") >&5
11675   (eval $ac_try) 2>&5
11676   ac_status=$?
11677   echo "$as_me:11677: \$? = $ac_status" >&5
11678   (exit $ac_status); }; }; then
11679   cf_cv_sig_atomic_t=$cf_type
11680 else
11681   echo "$as_me: failed program was:" >&5
11682 cat conftest.$ac_ext >&5
11683 cf_cv_sig_atomic_t=no
11684 fi
11685 rm -f conftest.$ac_objext conftest.$ac_ext
11686                 test "$cf_cv_sig_atomic_t" != no && break
11687         done
11688
11689 fi
11690
11691 echo "$as_me:11691: result: $cf_cv_sig_atomic_t" >&5
11692 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11693 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11694 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11695 EOF
11696
11697 if test $NCURSES_CHTYPE = auto ; then
11698
11699 echo "$as_me:11699: checking for type of chtype" >&5
11700 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11701 if test "${cf_cv_typeof_chtype+set}" = set; then
11702   echo $ECHO_N "(cached) $ECHO_C" >&6
11703 else
11704
11705                 if test "$cross_compiling" = yes; then
11706   cf_cv_typeof_chtype=long
11707 else
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711
11712 #define WANT_BITS 31
11713 #include <stdio.h>
11714 int main()
11715 {
11716         FILE *fp = fopen("cf_test.out", "w");
11717         if (fp != 0) {
11718                 char *result = "long";
11719                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11720                         int n;
11721                         unsigned int x, y;
11722                         for (n = 0; n < WANT_BITS; n++) {
11723                                 x = (1 << n);
11724                                 y = (x >> n);
11725                                 if (y != 1 || x == 0) {
11726                                         x = 0;
11727                                         break;
11728                                 }
11729                         }
11730                         /*
11731                          * If x is nonzero, an int is big enough for the bits
11732                          * that we want.
11733                          */
11734                         result = (x != 0) ? "int" : "long";
11735                 }
11736                 fputs(result, fp);
11737                 fclose(fp);
11738         }
11739         ${cf_cv_main_return:-return}(0);
11740 }
11741
11742 _ACEOF
11743 rm -f conftest$ac_exeext
11744 if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
11745   (eval $ac_link) 2>&5
11746   ac_status=$?
11747   echo "$as_me:11747: \$? = $ac_status" >&5
11748   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11749   { (eval echo "$as_me:11749: \"$ac_try\"") >&5
11750   (eval $ac_try) 2>&5
11751   ac_status=$?
11752   echo "$as_me:11752: \$? = $ac_status" >&5
11753   (exit $ac_status); }; }; then
11754   cf_cv_typeof_chtype=`cat cf_test.out`
11755 else
11756   echo "$as_me: program exited with status $ac_status" >&5
11757 echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759 cf_cv_typeof_chtype=long
11760 fi
11761 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11762 fi
11763                 rm -f cf_test.out
11764
11765 fi
11766
11767 echo "$as_me:11767: result: $cf_cv_typeof_chtype" >&5
11768 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11769
11770 cat >>confdefs.h <<EOF
11771 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11772 EOF
11773
11774 else
11775         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11776 fi
11777 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11778
11779 echo "$as_me:11779: checking if unsigned literals are legal" >&5
11780 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11781 if test "${cf_cv_unsigned_literals+set}" = set; then
11782   echo $ECHO_N "(cached) $ECHO_C" >&6
11783 else
11784
11785         cat >conftest.$ac_ext <<_ACEOF
11786 #line 11786 "configure"
11787 #include "confdefs.h"
11788
11789 int
11790 main ()
11791 {
11792 long x = 1L + 1UL + 1U + 1
11793   ;
11794   return 0;
11795 }
11796 _ACEOF
11797 rm -f conftest.$ac_objext
11798 if { (eval echo "$as_me:11798: \"$ac_compile\"") >&5
11799   (eval $ac_compile) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit $ac_status); } &&
11803          { ac_try='test -s conftest.$ac_objext'
11804   { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805   (eval $ac_try) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit $ac_status); }; }; then
11809   cf_cv_unsigned_literals=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 cat conftest.$ac_ext >&5
11813 cf_cv_unsigned_literals=no
11814 fi
11815 rm -f conftest.$ac_objext conftest.$ac_ext
11816
11817 fi
11818
11819 echo "$as_me:11819: result: $cf_cv_unsigned_literals" >&5
11820 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11821
11822 cf_cv_1UL="1"
11823 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11824 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11825
11826 if test $NCURSES_MMASK_T = auto ; then
11827         cf_cv_typeof_mmask_t=long
11828 else
11829         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11830 fi
11831 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11832
11833 ###     Checks for external-data
11834
11835 echo "$as_me:11835: checking if external errno is declared" >&5
11836 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11837 if test "${cf_cv_dcl_errno+set}" = set; then
11838   echo $ECHO_N "(cached) $ECHO_C" >&6
11839 else
11840
11841     cat >conftest.$ac_ext <<_ACEOF
11842 #line 11842 "configure"
11843 #include "confdefs.h"
11844
11845 #ifdef HAVE_STDLIB_H
11846 #include <stdlib.h>
11847 #endif
11848 #include <stdio.h>
11849 #include <sys/types.h>
11850 #include <errno.h>
11851 int
11852 main ()
11853 {
11854 long x = (long) errno
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext
11860 if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5
11861   (eval $ac_compile) 2>&5
11862   ac_status=$?
11863   echo "$as_me:11863: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -s conftest.$ac_objext'
11866   { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867   (eval $ac_try) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); }; }; then
11871   cf_cv_dcl_errno=yes
11872 else
11873   echo "$as_me: failed program was:" >&5
11874 cat conftest.$ac_ext >&5
11875 cf_cv_dcl_errno=no
11876 fi
11877 rm -f conftest.$ac_objext conftest.$ac_ext
11878
11879 fi
11880 echo "$as_me:11880: result: $cf_cv_dcl_errno" >&5
11881 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11882
11883 if test "$cf_cv_dcl_errno" = no ; then
11884
11885 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11886
11887     cat >>confdefs.h <<EOF
11888 #define $cf_result 1
11889 EOF
11890
11891 fi
11892
11893 # It's possible (for near-UNIX clones) that the data doesn't exist
11894
11895 echo "$as_me:11895: checking if external errno exists" >&5
11896 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11897 if test "${cf_cv_have_errno+set}" = set; then
11898   echo $ECHO_N "(cached) $ECHO_C" >&6
11899 else
11900
11901     cat >conftest.$ac_ext <<_ACEOF
11902 #line 11902 "configure"
11903 #include "confdefs.h"
11904
11905 #undef errno
11906 extern int errno;
11907
11908 int
11909 main ()
11910 {
11911 errno = 2
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 rm -f conftest.$ac_objext conftest$ac_exeext
11917 if { (eval echo "$as_me:11917: \"$ac_link\"") >&5
11918   (eval $ac_link) 2>&5
11919   ac_status=$?
11920   echo "$as_me:11920: \$? = $ac_status" >&5
11921   (exit $ac_status); } &&
11922          { ac_try='test -s conftest$ac_exeext'
11923   { (eval echo "$as_me:11923: \"$ac_try\"") >&5
11924   (eval $ac_try) 2>&5
11925   ac_status=$?
11926   echo "$as_me:11926: \$? = $ac_status" >&5
11927   (exit $ac_status); }; }; then
11928   cf_cv_have_errno=yes
11929 else
11930   echo "$as_me: failed program was:" >&5
11931 cat conftest.$ac_ext >&5
11932 cf_cv_have_errno=no
11933 fi
11934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11935
11936 fi
11937 echo "$as_me:11937: result: $cf_cv_have_errno" >&5
11938 echo "${ECHO_T}$cf_cv_have_errno" >&6
11939
11940 if test "$cf_cv_have_errno" = yes ; then
11941
11942 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11943
11944     cat >>confdefs.h <<EOF
11945 #define $cf_result 1
11946 EOF
11947
11948 fi
11949
11950 echo "$as_me:11950: checking if data-only library module links" >&5
11951 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11952 if test "${cf_cv_link_dataonly+set}" = set; then
11953   echo $ECHO_N "(cached) $ECHO_C" >&6
11954 else
11955
11956         rm -f conftest.a
11957         cat >conftest.$ac_ext <<EOF
11958 #line 11958 "configure"
11959 int     testdata[3] = { 123, 456, 789 };
11960 EOF
11961         if { (eval echo "$as_me:11961: \"$ac_compile\"") >&5
11962   (eval $ac_compile) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); } ; then
11966                 mv conftest.o data.o && \
11967                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11968         fi
11969         rm -f conftest.$ac_ext data.o
11970         cat >conftest.$ac_ext <<EOF
11971 #line 11971 "configure"
11972 int     testfunc()
11973 {
11974 #if defined(NeXT)
11975         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11976 #else
11977         extern int testdata[3];
11978         return testdata[0] == 123
11979            &&  testdata[1] == 456
11980            &&  testdata[2] == 789;
11981 #endif
11982 }
11983 EOF
11984         if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); }; then
11989                 mv conftest.o func.o && \
11990                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11991         fi
11992         rm -f conftest.$ac_ext func.o
11993         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11994         cf_saveLIBS="$LIBS"
11995         LIBS="conftest.a $LIBS"
11996         if test "$cross_compiling" = yes; then
11997   cf_cv_link_dataonly=unknown
11998 else
11999   cat >conftest.$ac_ext <<_ACEOF
12000 #line 12000 "configure"
12001 #include "confdefs.h"
12002
12003         int main()
12004         {
12005                 extern int testfunc();
12006                 ${cf_cv_main_return:-return} (!testfunc());
12007         }
12008
12009 _ACEOF
12010 rm -f conftest$ac_exeext
12011 if { (eval echo "$as_me:12011: \"$ac_link\"") >&5
12012   (eval $ac_link) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021   cf_cv_link_dataonly=yes
12022 else
12023   echo "$as_me: program exited with status $ac_status" >&5
12024 echo "$as_me: failed program was:" >&5
12025 cat conftest.$ac_ext >&5
12026 cf_cv_link_dataonly=no
12027 fi
12028 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12029 fi
12030         LIBS="$cf_saveLIBS"
12031
12032 fi
12033
12034 echo "$as_me:12034: result: $cf_cv_link_dataonly" >&5
12035 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12036
12037 if test "$cf_cv_link_dataonly" = no ; then
12038         cat >>confdefs.h <<\EOF
12039 #define BROKEN_LINKER 1
12040 EOF
12041
12042         BROKEN_LINKER=1
12043 fi
12044
12045 ###     Checks for library functions.
12046
12047 for ac_func in \
12048 getcwd \
12049 getegid \
12050 geteuid \
12051 getttynam \
12052 issetugid \
12053 poll \
12054 remove \
12055 select \
12056 setbuf \
12057 setbuffer \
12058 setvbuf \
12059 sigaction \
12060 sigvec \
12061 strdup \
12062 strstr \
12063 tcgetpgrp \
12064 times \
12065 vsnprintf \
12066
12067 do
12068 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12069 echo "$as_me:12069: checking for $ac_func" >&5
12070 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12071 if eval "test \"\${$as_ac_var+set}\" = set"; then
12072   echo $ECHO_N "(cached) $ECHO_C" >&6
12073 else
12074   cat >conftest.$ac_ext <<_ACEOF
12075 #line 12075 "configure"
12076 #include "confdefs.h"
12077 /* System header to define __stub macros and hopefully few prototypes,
12078     which can conflict with char $ac_func (); below.  */
12079 #include <assert.h>
12080 /* Override any gcc2 internal prototype to avoid an error.  */
12081 #ifdef __cplusplus
12082 extern "C"
12083 #endif
12084 /* We use char because int might match the return type of a gcc2
12085    builtin and then its argument prototype would still apply.  */
12086 char $ac_func ();
12087 char (*f) ();
12088
12089 int
12090 main ()
12091 {
12092 /* The GNU C library defines this for functions which it implements
12093     to always fail with ENOSYS.  Some functions are actually named
12094     something starting with __ and the normal name is an alias.  */
12095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12096 choke me
12097 #else
12098 f = $ac_func;
12099 #endif
12100
12101   ;
12102   return 0;
12103 }
12104 _ACEOF
12105 rm -f conftest.$ac_objext conftest$ac_exeext
12106 if { (eval echo "$as_me:12106: \"$ac_link\"") >&5
12107   (eval $ac_link) 2>&5
12108   ac_status=$?
12109   echo "$as_me:12109: \$? = $ac_status" >&5
12110   (exit $ac_status); } &&
12111          { ac_try='test -s conftest$ac_exeext'
12112   { (eval echo "$as_me:12112: \"$ac_try\"") >&5
12113   (eval $ac_try) 2>&5
12114   ac_status=$?
12115   echo "$as_me:12115: \$? = $ac_status" >&5
12116   (exit $ac_status); }; }; then
12117   eval "$as_ac_var=yes"
12118 else
12119   echo "$as_me: failed program was:" >&5
12120 cat conftest.$ac_ext >&5
12121 eval "$as_ac_var=no"
12122 fi
12123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12124 fi
12125 echo "$as_me:12125: result: `eval echo '${'$as_ac_var'}'`" >&5
12126 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12127 if test `eval echo '${'$as_ac_var'}'` = yes; then
12128   cat >>confdefs.h <<EOF
12129 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12130 EOF
12131
12132 fi
12133 done
12134
12135 if test "$with_getcap" = "yes" ; then
12136
12137 echo "$as_me:12137: checking for terminal-capability database functions" >&5
12138 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12139 if test "${cf_cv_cgetent+set}" = set; then
12140   echo $ECHO_N "(cached) $ECHO_C" >&6
12141 else
12142
12143 cat >conftest.$ac_ext <<_ACEOF
12144 #line 12144 "configure"
12145 #include "confdefs.h"
12146
12147 #include <stdlib.h>
12148 int
12149 main ()
12150 {
12151
12152         char temp[128];
12153         char *buf = temp;
12154         char *db_array = temp;
12155         cgetent(&buf, /* int *, */ &db_array, "vt100");
12156         cgetcap(buf, "tc", '=');
12157         cgetmatch(buf, "tc");
12158
12159   ;
12160   return 0;
12161 }
12162 _ACEOF
12163 rm -f conftest.$ac_objext conftest$ac_exeext
12164 if { (eval echo "$as_me:12164: \"$ac_link\"") >&5
12165   (eval $ac_link) 2>&5
12166   ac_status=$?
12167   echo "$as_me:12167: \$? = $ac_status" >&5
12168   (exit $ac_status); } &&
12169          { ac_try='test -s conftest$ac_exeext'
12170   { (eval echo "$as_me:12170: \"$ac_try\"") >&5
12171   (eval $ac_try) 2>&5
12172   ac_status=$?
12173   echo "$as_me:12173: \$? = $ac_status" >&5
12174   (exit $ac_status); }; }; then
12175   cf_cv_cgetent=yes
12176 else
12177   echo "$as_me: failed program was:" >&5
12178 cat conftest.$ac_ext >&5
12179 cf_cv_cgetent=no
12180 fi
12181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12182
12183 fi
12184
12185 echo "$as_me:12185: result: $cf_cv_cgetent" >&5
12186 echo "${ECHO_T}$cf_cv_cgetent" >&6
12187 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12188 #define HAVE_BSD_CGETENT 1
12189 EOF
12190
12191 fi
12192
12193 echo "$as_me:12193: checking for isascii" >&5
12194 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12195 if test "${cf_cv_have_isascii+set}" = set; then
12196   echo $ECHO_N "(cached) $ECHO_C" >&6
12197 else
12198
12199         cat >conftest.$ac_ext <<_ACEOF
12200 #line 12200 "configure"
12201 #include "confdefs.h"
12202 #include <ctype.h>
12203 int
12204 main ()
12205 {
12206 int x = isascii(' ')
12207   ;
12208   return 0;
12209 }
12210 _ACEOF
12211 rm -f conftest.$ac_objext conftest$ac_exeext
12212 if { (eval echo "$as_me:12212: \"$ac_link\"") >&5
12213   (eval $ac_link) 2>&5
12214   ac_status=$?
12215   echo "$as_me:12215: \$? = $ac_status" >&5
12216   (exit $ac_status); } &&
12217          { ac_try='test -s conftest$ac_exeext'
12218   { (eval echo "$as_me:12218: \"$ac_try\"") >&5
12219   (eval $ac_try) 2>&5
12220   ac_status=$?
12221   echo "$as_me:12221: \$? = $ac_status" >&5
12222   (exit $ac_status); }; }; then
12223   cf_cv_have_isascii=yes
12224 else
12225   echo "$as_me: failed program was:" >&5
12226 cat conftest.$ac_ext >&5
12227 cf_cv_have_isascii=no
12228 fi
12229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12230
12231 fi
12232 echo "$as_me:12232: result: $cf_cv_have_isascii" >&5
12233 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12234 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12235 #define HAVE_ISASCII 1
12236 EOF
12237
12238 if test "$ac_cv_func_sigaction" = yes; then
12239 echo "$as_me:12239: checking whether sigaction needs _POSIX_SOURCE" >&5
12240 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12241 cat >conftest.$ac_ext <<_ACEOF
12242 #line 12242 "configure"
12243 #include "confdefs.h"
12244
12245 #include <sys/types.h>
12246 #include <signal.h>
12247 int
12248 main ()
12249 {
12250 struct sigaction act
12251   ;
12252   return 0;
12253 }
12254 _ACEOF
12255 rm -f conftest.$ac_objext
12256 if { (eval echo "$as_me:12256: \"$ac_compile\"") >&5
12257   (eval $ac_compile) 2>&5
12258   ac_status=$?
12259   echo "$as_me:12259: \$? = $ac_status" >&5
12260   (exit $ac_status); } &&
12261          { ac_try='test -s conftest.$ac_objext'
12262   { (eval echo "$as_me:12262: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); }; }; then
12267   sigact_bad=no
12268 else
12269   echo "$as_me: failed program was:" >&5
12270 cat conftest.$ac_ext >&5
12271
12272 cat >conftest.$ac_ext <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275
12276 #define _POSIX_SOURCE
12277 #include <sys/types.h>
12278 #include <signal.h>
12279 int
12280 main ()
12281 {
12282 struct sigaction act
12283   ;
12284   return 0;
12285 }
12286 _ACEOF
12287 rm -f conftest.$ac_objext
12288 if { (eval echo "$as_me:12288: \"$ac_compile\"") >&5
12289   (eval $ac_compile) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); } &&
12293          { ac_try='test -s conftest.$ac_objext'
12294   { (eval echo "$as_me:12294: \"$ac_try\"") >&5
12295   (eval $ac_try) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); }; }; then
12299   sigact_bad=yes
12300          cat >>confdefs.h <<\EOF
12301 #define SVR4_ACTION 1
12302 EOF
12303
12304 else
12305   echo "$as_me: failed program was:" >&5
12306 cat conftest.$ac_ext >&5
12307 sigact_bad=unknown
12308 fi
12309 rm -f conftest.$ac_objext conftest.$ac_ext
12310 fi
12311 rm -f conftest.$ac_objext conftest.$ac_ext
12312 echo "$as_me:12312: result: $sigact_bad" >&5
12313 echo "${ECHO_T}$sigact_bad" >&6
12314 fi
12315
12316 echo "$as_me:12316: checking if nanosleep really works" >&5
12317 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12318 if test "${cf_cv_func_nanosleep+set}" = set; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321
12322 if test "$cross_compiling" = yes; then
12323   cf_cv_func_nanosleep=unknown
12324 else
12325   cat >conftest.$ac_ext <<_ACEOF
12326 #line 12326 "configure"
12327 #include "confdefs.h"
12328
12329 #include <stdio.h>
12330 #include <errno.h>
12331 #include <time.h>
12332
12333 #ifdef HAVE_SYS_TIME_H
12334 #include <sys/time.h>
12335 #endif
12336
12337 int main() {
12338         struct timespec ts1, ts2;
12339         int code;
12340         ts1.tv_sec  = 0;
12341         ts1.tv_nsec = 750000000;
12342         ts2.tv_sec  = 0;
12343         ts2.tv_nsec = 0;
12344         errno = 0;
12345         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12346         ${cf_cv_main_return:-return}(code != 0);
12347 }
12348
12349 _ACEOF
12350 rm -f conftest$ac_exeext
12351 if { (eval echo "$as_me:12351: \"$ac_link\"") >&5
12352   (eval $ac_link) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   cf_cv_func_nanosleep=yes
12362 else
12363   echo "$as_me: program exited with status $ac_status" >&5
12364 echo "$as_me: failed program was:" >&5
12365 cat conftest.$ac_ext >&5
12366 cf_cv_func_nanosleep=no
12367 fi
12368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12369 fi
12370 fi
12371 echo "$as_me:12371: result: $cf_cv_func_nanosleep" >&5
12372 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12373
12374 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12375 #define HAVE_NANOSLEEP 1
12376 EOF
12377
12378 for ac_header in \
12379 termio.h \
12380 termios.h \
12381 unistd.h \
12382
12383 do
12384 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12385 echo "$as_me:12385: checking for $ac_header" >&5
12386 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12387 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12388   echo $ECHO_N "(cached) $ECHO_C" >&6
12389 else
12390   cat >conftest.$ac_ext <<_ACEOF
12391 #line 12391 "configure"
12392 #include "confdefs.h"
12393 #include <$ac_header>
12394 _ACEOF
12395 if { (eval echo "$as_me:12395: \"$ac_cpp conftest.$ac_ext\"") >&5
12396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12397   ac_status=$?
12398   egrep -v '^ *\+' conftest.er1 >conftest.err
12399   rm -f conftest.er1
12400   cat conftest.err >&5
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } >/dev/null; then
12403   if test -s conftest.err; then
12404     ac_cpp_err=$ac_c_preproc_warn_flag
12405   else
12406     ac_cpp_err=
12407   fi
12408 else
12409   ac_cpp_err=yes
12410 fi
12411 if test -z "$ac_cpp_err"; then
12412   eval "$as_ac_Header=yes"
12413 else
12414   echo "$as_me: failed program was:" >&5
12415   cat conftest.$ac_ext >&5
12416   eval "$as_ac_Header=no"
12417 fi
12418 rm -f conftest.err conftest.$ac_ext
12419 fi
12420 echo "$as_me:12420: result: `eval echo '${'$as_ac_Header'}'`" >&5
12421 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12422 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12423   cat >>confdefs.h <<EOF
12424 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12425 EOF
12426
12427 fi
12428 done
12429
12430 if test "$ISC" = yes ; then
12431
12432 for ac_header in sys/termio.h
12433 do
12434 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12435 echo "$as_me:12435: checking for $ac_header" >&5
12436 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12437 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12438   echo $ECHO_N "(cached) $ECHO_C" >&6
12439 else
12440   cat >conftest.$ac_ext <<_ACEOF
12441 #line 12441 "configure"
12442 #include "confdefs.h"
12443 #include <$ac_header>
12444 _ACEOF
12445 if { (eval echo "$as_me:12445: \"$ac_cpp conftest.$ac_ext\"") >&5
12446   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12447   ac_status=$?
12448   egrep -v '^ *\+' conftest.er1 >conftest.err
12449   rm -f conftest.er1
12450   cat conftest.err >&5
12451   echo "$as_me:12451: \$? = $ac_status" >&5
12452   (exit $ac_status); } >/dev/null; then
12453   if test -s conftest.err; then
12454     ac_cpp_err=$ac_c_preproc_warn_flag
12455   else
12456     ac_cpp_err=
12457   fi
12458 else
12459   ac_cpp_err=yes
12460 fi
12461 if test -z "$ac_cpp_err"; then
12462   eval "$as_ac_Header=yes"
12463 else
12464   echo "$as_me: failed program was:" >&5
12465   cat conftest.$ac_ext >&5
12466   eval "$as_ac_Header=no"
12467 fi
12468 rm -f conftest.err conftest.$ac_ext
12469 fi
12470 echo "$as_me:12470: result: `eval echo '${'$as_ac_Header'}'`" >&5
12471 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12472 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12473   cat >>confdefs.h <<EOF
12474 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12475 EOF
12476
12477 fi
12478 done
12479
12480 fi
12481 if test "$ac_cv_header_termios_h" = yes ; then
12482         case "$CFLAGS $CPPFLAGS" in
12483         *-D_POSIX_SOURCE*)
12484                 termios_bad=dunno ;;
12485         *)      termios_bad=maybe ;;
12486         esac
12487         if test "$termios_bad" = maybe ; then
12488         echo "$as_me:12488: checking whether termios.h needs _POSIX_SOURCE" >&5
12489 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12490         cat >conftest.$ac_ext <<_ACEOF
12491 #line 12491 "configure"
12492 #include "confdefs.h"
12493 #include <termios.h>
12494 int
12495 main ()
12496 {
12497 struct termios foo; int x = foo.c_iflag
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 rm -f conftest.$ac_objext
12503 if { (eval echo "$as_me:12503: \"$ac_compile\"") >&5
12504   (eval $ac_compile) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); } &&
12508          { ac_try='test -s conftest.$ac_objext'
12509   { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510   (eval $ac_try) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); }; }; then
12514   termios_bad=no
12515 else
12516   echo "$as_me: failed program was:" >&5
12517 cat conftest.$ac_ext >&5
12518
12519                 cat >conftest.$ac_ext <<_ACEOF
12520 #line 12520 "configure"
12521 #include "confdefs.h"
12522
12523 #define _POSIX_SOURCE
12524 #include <termios.h>
12525 int
12526 main ()
12527 {
12528 struct termios foo; int x = foo.c_iflag
12529   ;
12530   return 0;
12531 }
12532 _ACEOF
12533 rm -f conftest.$ac_objext
12534 if { (eval echo "$as_me:12534: \"$ac_compile\"") >&5
12535   (eval $ac_compile) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -s conftest.$ac_objext'
12540   { (eval echo "$as_me:12540: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:12543: \$? = $ac_status" >&5
12544   (exit $ac_status); }; }; then
12545   termios_bad=unknown
12546 else
12547   echo "$as_me: failed program was:" >&5
12548 cat conftest.$ac_ext >&5
12549 termios_bad=yes cat >>confdefs.h <<\EOF
12550 #define SVR4_TERMIO 1
12551 EOF
12552
12553 fi
12554 rm -f conftest.$ac_objext conftest.$ac_ext
12555
12556 fi
12557 rm -f conftest.$ac_objext conftest.$ac_ext
12558         echo "$as_me:12558: result: $termios_bad" >&5
12559 echo "${ECHO_T}$termios_bad" >&6
12560         fi
12561 fi
12562
12563 echo "$as_me:12563: checking for tcgetattr" >&5
12564 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12565 if test "${cf_cv_have_tcgetattr+set}" = set; then
12566   echo $ECHO_N "(cached) $ECHO_C" >&6
12567 else
12568
12569 cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12572
12573 #include <sys/types.h>
12574 #ifdef HAVE_UNISTD_H
12575 #include <unistd.h>
12576 #endif
12577 #ifdef HAVE_TERMIOS_H
12578 #include <termios.h>
12579 #define TTY struct termios
12580 #else
12581 #ifdef HAVE_TERMIO_H
12582 #include <termio.h>
12583 #define TTY struct termio
12584 #endif
12585 #endif
12586
12587 int
12588 main ()
12589 {
12590
12591 TTY foo;
12592 tcgetattr(1, &foo);
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 rm -f conftest.$ac_objext conftest$ac_exeext
12598 if { (eval echo "$as_me:12598: \"$ac_link\"") >&5
12599   (eval $ac_link) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit $ac_status); } &&
12603          { ac_try='test -s conftest$ac_exeext'
12604   { (eval echo "$as_me:12604: \"$ac_try\"") >&5
12605   (eval $ac_try) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit $ac_status); }; }; then
12609   cf_cv_have_tcgetattr=yes
12610 else
12611   echo "$as_me: failed program was:" >&5
12612 cat conftest.$ac_ext >&5
12613 cf_cv_have_tcgetattr=no
12614 fi
12615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12616 fi
12617 echo "$as_me:12617: result: $cf_cv_have_tcgetattr" >&5
12618 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12619 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12620 #define HAVE_TCGETATTR 1
12621 EOF
12622
12623 echo "$as_me:12623: checking for vsscanf function or workaround" >&5
12624 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12625 if test "${cf_cv_func_vsscanf+set}" = set; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628
12629 cat >conftest.$ac_ext <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632
12633 #include <stdarg.h>
12634 #include <stdio.h>
12635 int
12636 main ()
12637 {
12638
12639         va_list ap;
12640         vsscanf("from", "%d", ap)
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 rm -f conftest.$ac_objext conftest$ac_exeext
12646 if { (eval echo "$as_me:12646: \"$ac_link\"") >&5
12647   (eval $ac_link) 2>&5
12648   ac_status=$?
12649   echo "$as_me:12649: \$? = $ac_status" >&5
12650   (exit $ac_status); } &&
12651          { ac_try='test -s conftest$ac_exeext'
12652   { (eval echo "$as_me:12652: \"$ac_try\"") >&5
12653   (eval $ac_try) 2>&5
12654   ac_status=$?
12655   echo "$as_me:12655: \$? = $ac_status" >&5
12656   (exit $ac_status); }; }; then
12657   cf_cv_func_vsscanf=vsscanf
12658 else
12659   echo "$as_me: failed program was:" >&5
12660 cat conftest.$ac_ext >&5
12661
12662 cat >conftest.$ac_ext <<_ACEOF
12663 #line 12663 "configure"
12664 #include "confdefs.h"
12665
12666 #include <stdarg.h>
12667 #include <stdio.h>
12668 int
12669 main ()
12670 {
12671
12672     FILE strbuf;
12673     char *str = "from";
12674
12675     strbuf._flag = _IOREAD;
12676     strbuf._ptr = strbuf._base = (unsigned char *) str;
12677     strbuf._cnt = strlen(str);
12678     strbuf._file = _NFILE;
12679     return (vfscanf(&strbuf, "%d", ap))
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 rm -f conftest.$ac_objext conftest$ac_exeext
12685 if { (eval echo "$as_me:12685: \"$ac_link\"") >&5
12686   (eval $ac_link) 2>&5
12687   ac_status=$?
12688   echo "$as_me:12688: \$? = $ac_status" >&5
12689   (exit $ac_status); } &&
12690          { ac_try='test -s conftest$ac_exeext'
12691   { (eval echo "$as_me:12691: \"$ac_try\"") >&5
12692   (eval $ac_try) 2>&5
12693   ac_status=$?
12694   echo "$as_me:12694: \$? = $ac_status" >&5
12695   (exit $ac_status); }; }; then
12696   cf_cv_func_vsscanf=vfscanf
12697 else
12698   echo "$as_me: failed program was:" >&5
12699 cat conftest.$ac_ext >&5
12700
12701 cat >conftest.$ac_ext <<_ACEOF
12702 #line 12702 "configure"
12703 #include "confdefs.h"
12704
12705 #include <stdarg.h>
12706 #include <stdio.h>
12707 int
12708 main ()
12709 {
12710
12711     FILE strbuf;
12712     char *str = "from";
12713
12714     strbuf._flag = _IOREAD;
12715     strbuf._ptr = strbuf._base = (unsigned char *) str;
12716     strbuf._cnt = strlen(str);
12717     strbuf._file = _NFILE;
12718     return (_doscan(&strbuf, "%d", ap))
12719   ;
12720   return 0;
12721 }
12722 _ACEOF
12723 rm -f conftest.$ac_objext conftest$ac_exeext
12724 if { (eval echo "$as_me:12724: \"$ac_link\"") >&5
12725   (eval $ac_link) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); } &&
12729          { ac_try='test -s conftest$ac_exeext'
12730   { (eval echo "$as_me:12730: \"$ac_try\"") >&5
12731   (eval $ac_try) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit $ac_status); }; }; then
12735   cf_cv_func_vsscanf=_doscan
12736 else
12737   echo "$as_me: failed program was:" >&5
12738 cat conftest.$ac_ext >&5
12739
12740 cf_cv_func_vsscanf=no
12741 fi
12742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12743 fi
12744 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12745 fi
12746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12747 fi
12748 echo "$as_me:12748: result: $cf_cv_func_vsscanf" >&5
12749 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12750
12751 case $cf_cv_func_vsscanf in #(vi
12752 vsscanf) cat >>confdefs.h <<\EOF
12753 #define HAVE_VSSCANF 1
12754 EOF
12755 ;; #(vi
12756 vfscanf) cat >>confdefs.h <<\EOF
12757 #define HAVE_VFSCANF 1
12758 EOF
12759 ;; #(vi
12760 _doscan) cat >>confdefs.h <<\EOF
12761 #define HAVE__DOSCAN 1
12762 EOF
12763 ;;
12764 esac
12765
12766 echo "$as_me:12766: checking for working mkstemp" >&5
12767 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12768 if test "${cf_cv_func_mkstemp+set}" = set; then
12769   echo $ECHO_N "(cached) $ECHO_C" >&6
12770 else
12771
12772 rm -f conftest*
12773 if test "$cross_compiling" = yes; then
12774   echo "$as_me:12774: checking for mkstemp" >&5
12775 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12776 if test "${ac_cv_func_mkstemp+set}" = set; then
12777   echo $ECHO_N "(cached) $ECHO_C" >&6
12778 else
12779   cat >conftest.$ac_ext <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782 /* System header to define __stub macros and hopefully few prototypes,
12783     which can conflict with char mkstemp (); below.  */
12784 #include <assert.h>
12785 /* Override any gcc2 internal prototype to avoid an error.  */
12786 #ifdef __cplusplus
12787 extern "C"
12788 #endif
12789 /* We use char because int might match the return type of a gcc2
12790    builtin and then its argument prototype would still apply.  */
12791 char mkstemp ();
12792 char (*f) ();
12793
12794 int
12795 main ()
12796 {
12797 /* The GNU C library defines this for functions which it implements
12798     to always fail with ENOSYS.  Some functions are actually named
12799     something starting with __ and the normal name is an alias.  */
12800 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12801 choke me
12802 #else
12803 f = mkstemp;
12804 #endif
12805
12806   ;
12807   return 0;
12808 }
12809 _ACEOF
12810 rm -f conftest.$ac_objext conftest$ac_exeext
12811 if { (eval echo "$as_me:12811: \"$ac_link\"") >&5
12812   (eval $ac_link) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } &&
12816          { ac_try='test -s conftest$ac_exeext'
12817   { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); }; }; then
12822   ac_cv_func_mkstemp=yes
12823 else
12824   echo "$as_me: failed program was:" >&5
12825 cat conftest.$ac_ext >&5
12826 ac_cv_func_mkstemp=no
12827 fi
12828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12829 fi
12830 echo "$as_me:12830: result: $ac_cv_func_mkstemp" >&5
12831 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12832
12833 else
12834   cat >conftest.$ac_ext <<_ACEOF
12835 #line 12835 "configure"
12836 #include "confdefs.h"
12837
12838 #include <sys/types.h>
12839 #include <stdlib.h>
12840 #include <stdio.h>
12841 #include <string.h>
12842 #include <sys/stat.h>
12843 int main()
12844 {
12845         char *tmpl = "conftestXXXXXX";
12846         char name[2][80];
12847         int n;
12848         int result = 0;
12849         int fd;
12850         struct stat sb;
12851
12852         umask(077);
12853         for (n = 0; n < 2; ++n) {
12854                 strcpy(name[n], tmpl);
12855                 if ((fd = mkstemp(name[n])) >= 0) {
12856                         if (!strcmp(name[n], tmpl)
12857                          || stat(name[n], &sb) != 0
12858                          || (sb.st_mode & S_IFMT) != S_IFREG
12859                          || (sb.st_mode & 077) != 0) {
12860                                 result = 1;
12861                         }
12862                         close(fd);
12863                 }
12864         }
12865         if (result == 0
12866          && !strcmp(name[0], name[1]))
12867                 result = 1;
12868         ${cf_cv_main_return:-return}(result);
12869 }
12870
12871 _ACEOF
12872 rm -f conftest$ac_exeext
12873 if { (eval echo "$as_me:12873: \"$ac_link\"") >&5
12874   (eval $ac_link) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12878   { (eval echo "$as_me:12878: \"$ac_try\"") >&5
12879   (eval $ac_try) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit $ac_status); }; }; then
12883   cf_cv_func_mkstemp=yes
12884
12885 else
12886   echo "$as_me: program exited with status $ac_status" >&5
12887 echo "$as_me: failed program was:" >&5
12888 cat conftest.$ac_ext >&5
12889 cf_cv_func_mkstemp=no
12890
12891 fi
12892 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12893 fi
12894
12895 fi
12896 echo "$as_me:12896: result: $cf_cv_func_mkstemp" >&5
12897 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12898 if test "$cf_cv_func_mkstemp" = yes ; then
12899         cat >>confdefs.h <<\EOF
12900 #define HAVE_MKSTEMP 1
12901 EOF
12902
12903 fi
12904
12905 # setup for prototype of fallback for vsscanf()
12906
12907 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12908         HAVE_VSSCANF=1
12909 else
12910         HAVE_VSSCANF=0
12911 fi
12912
12913 if test "$cross_compiling" = yes ; then
12914         { echo "$as_me:12914: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12915 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12916 else
12917         echo "$as_me:12917: checking whether setvbuf arguments are reversed" >&5
12918 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12919 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12920   echo $ECHO_N "(cached) $ECHO_C" >&6
12921 else
12922   if test "$cross_compiling" = yes; then
12923   { { echo "$as_me:12923: error: cannot run test program while cross compiling" >&5
12924 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12925    { (exit 1); exit 1; }; }
12926 else
12927   cat >conftest.$ac_ext <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12930 #include <stdio.h>
12931 /* If setvbuf has the reversed format, exit 0. */
12932 int
12933 main ()
12934 {
12935   /* This call has the arguments reversed.
12936      A reversed system may check and see that the address of main
12937      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12938   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12939     $ac_main_return(1);
12940   putc('\r', stdout);
12941   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12942 }
12943 _ACEOF
12944 rm -f conftest$ac_exeext
12945 if { (eval echo "$as_me:12945: \"$ac_link\"") >&5
12946   (eval $ac_link) 2>&5
12947   ac_status=$?
12948   echo "$as_me:12948: \$? = $ac_status" >&5
12949   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12950   { (eval echo "$as_me:12950: \"$ac_try\"") >&5
12951   (eval $ac_try) 2>&5
12952   ac_status=$?
12953   echo "$as_me:12953: \$? = $ac_status" >&5
12954   (exit $ac_status); }; }; then
12955   ac_cv_func_setvbuf_reversed=yes
12956 else
12957   echo "$as_me: program exited with status $ac_status" >&5
12958 echo "$as_me: failed program was:" >&5
12959 cat conftest.$ac_ext >&5
12960 ac_cv_func_setvbuf_reversed=no
12961 fi
12962 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12963 fi
12964 rm -f core core.* *.core
12965 fi
12966 echo "$as_me:12966: result: $ac_cv_func_setvbuf_reversed" >&5
12967 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12968 if test $ac_cv_func_setvbuf_reversed = yes; then
12969
12970 cat >>confdefs.h <<\EOF
12971 #define SETVBUF_REVERSED 1
12972 EOF
12973
12974 fi
12975
12976 fi
12977 echo "$as_me:12977: checking return type of signal handlers" >&5
12978 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12979 if test "${ac_cv_type_signal+set}" = set; then
12980   echo $ECHO_N "(cached) $ECHO_C" >&6
12981 else
12982   cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985 #include <sys/types.h>
12986 #include <signal.h>
12987 #ifdef signal
12988 # undef signal
12989 #endif
12990 #ifdef __cplusplus
12991 extern "C" void (*signal (int, void (*)(int)))(int);
12992 #else
12993 void (*signal ()) ();
12994 #endif
12995
12996 int
12997 main ()
12998 {
12999 int i;
13000   ;
13001   return 0;
13002 }
13003 _ACEOF
13004 rm -f conftest.$ac_objext
13005 if { (eval echo "$as_me:13005: \"$ac_compile\"") >&5
13006   (eval $ac_compile) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); } &&
13010          { ac_try='test -s conftest.$ac_objext'
13011   { (eval echo "$as_me:13011: \"$ac_try\"") >&5
13012   (eval $ac_try) 2>&5
13013   ac_status=$?
13014   echo "$as_me:13014: \$? = $ac_status" >&5
13015   (exit $ac_status); }; }; then
13016   ac_cv_type_signal=void
13017 else
13018   echo "$as_me: failed program was:" >&5
13019 cat conftest.$ac_ext >&5
13020 ac_cv_type_signal=int
13021 fi
13022 rm -f conftest.$ac_objext conftest.$ac_ext
13023 fi
13024 echo "$as_me:13024: result: $ac_cv_type_signal" >&5
13025 echo "${ECHO_T}$ac_cv_type_signal" >&6
13026
13027 cat >>confdefs.h <<EOF
13028 #define RETSIGTYPE $ac_cv_type_signal
13029 EOF
13030
13031 echo "$as_me:13031: checking for type sigaction_t" >&5
13032 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13033 if test "${cf_cv_type_sigaction+set}" = set; then
13034   echo $ECHO_N "(cached) $ECHO_C" >&6
13035 else
13036
13037         cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13040
13041 #include <signal.h>
13042 int
13043 main ()
13044 {
13045 sigaction_t x
13046   ;
13047   return 0;
13048 }
13049 _ACEOF
13050 rm -f conftest.$ac_objext
13051 if { (eval echo "$as_me:13051: \"$ac_compile\"") >&5
13052   (eval $ac_compile) 2>&5
13053   ac_status=$?
13054   echo "$as_me:13054: \$? = $ac_status" >&5
13055   (exit $ac_status); } &&
13056          { ac_try='test -s conftest.$ac_objext'
13057   { (eval echo "$as_me:13057: \"$ac_try\"") >&5
13058   (eval $ac_try) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit $ac_status); }; }; then
13062   cf_cv_type_sigaction=yes
13063 else
13064   echo "$as_me: failed program was:" >&5
13065 cat conftest.$ac_ext >&5
13066 cf_cv_type_sigaction=no
13067 fi
13068 rm -f conftest.$ac_objext conftest.$ac_ext
13069 fi
13070
13071 echo "$as_me:13071: result: $cf_cv_type_sigaction" >&5
13072 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13073 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13074 #define HAVE_TYPE_SIGACTION 1
13075 EOF
13076
13077 echo "$as_me:13077: checking declaration of size-change" >&5
13078 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13079 if test "${cf_cv_sizechange+set}" = set; then
13080   echo $ECHO_N "(cached) $ECHO_C" >&6
13081 else
13082
13083     cf_cv_sizechange=unknown
13084     cf_save_CPPFLAGS="$CPPFLAGS"
13085
13086 for cf_opts in "" "NEED_PTEM_H"
13087 do
13088
13089     CPPFLAGS="$cf_save_CPPFLAGS"
13090     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13091     cat >conftest.$ac_ext <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094 #include <sys/types.h>
13095 #ifdef HAVE_TERMIOS_H
13096 #include <termios.h>
13097 #else
13098 #ifdef HAVE_TERMIO_H
13099 #include <termio.h>
13100 #endif
13101 #endif
13102 #ifdef NEED_PTEM_H
13103 /* This is a workaround for SCO:  they neglected to define struct winsize in
13104  * termios.h -- it's only in termio.h and ptem.h
13105  */
13106 #include        <sys/stream.h>
13107 #include        <sys/ptem.h>
13108 #endif
13109 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13110 #include <sys/ioctl.h>
13111 #endif
13112
13113 int
13114 main ()
13115 {
13116
13117 #ifdef TIOCGSIZE
13118         struct ttysize win;     /* FIXME: what system is this? */
13119         int y = win.ts_lines;
13120         int x = win.ts_cols;
13121 #else
13122 #ifdef TIOCGWINSZ
13123         struct winsize win;
13124         int y = win.ws_row;
13125         int x = win.ws_col;
13126 #else
13127         no TIOCGSIZE or TIOCGWINSZ
13128 #endif /* TIOCGWINSZ */
13129 #endif /* TIOCGSIZE */
13130
13131   ;
13132   return 0;
13133 }
13134 _ACEOF
13135 rm -f conftest.$ac_objext
13136 if { (eval echo "$as_me:13136: \"$ac_compile\"") >&5
13137   (eval $ac_compile) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); } &&
13141          { ac_try='test -s conftest.$ac_objext'
13142   { (eval echo "$as_me:13142: \"$ac_try\"") >&5
13143   (eval $ac_try) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); }; }; then
13147   cf_cv_sizechange=yes
13148 else
13149   echo "$as_me: failed program was:" >&5
13150 cat conftest.$ac_ext >&5
13151 cf_cv_sizechange=no
13152 fi
13153 rm -f conftest.$ac_objext conftest.$ac_ext
13154
13155         CPPFLAGS="$cf_save_CPPFLAGS"
13156         if test "$cf_cv_sizechange" = yes ; then
13157                 echo "size-change succeeded ($cf_opts)" >&5
13158                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13159                 break
13160         fi
13161 done
13162
13163 fi
13164 echo "$as_me:13164: result: $cf_cv_sizechange" >&5
13165 echo "${ECHO_T}$cf_cv_sizechange" >&6
13166 if test "$cf_cv_sizechange" != no ; then
13167         cat >>confdefs.h <<\EOF
13168 #define HAVE_SIZECHANGE 1
13169 EOF
13170
13171         case $cf_cv_sizechange in #(vi
13172         NEED*)
13173                 cat >>confdefs.h <<EOF
13174 #define $cf_cv_sizechange  1
13175 EOF
13176
13177                 ;;
13178         esac
13179 fi
13180
13181 echo "$as_me:13181: checking for memmove" >&5
13182 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13183 if test "${ac_cv_func_memmove+set}" = set; then
13184   echo $ECHO_N "(cached) $ECHO_C" >&6
13185 else
13186   cat >conftest.$ac_ext <<_ACEOF
13187 #line 13187 "configure"
13188 #include "confdefs.h"
13189 /* System header to define __stub macros and hopefully few prototypes,
13190     which can conflict with char memmove (); below.  */
13191 #include <assert.h>
13192 /* Override any gcc2 internal prototype to avoid an error.  */
13193 #ifdef __cplusplus
13194 extern "C"
13195 #endif
13196 /* We use char because int might match the return type of a gcc2
13197    builtin and then its argument prototype would still apply.  */
13198 char memmove ();
13199 char (*f) ();
13200
13201 int
13202 main ()
13203 {
13204 /* The GNU C library defines this for functions which it implements
13205     to always fail with ENOSYS.  Some functions are actually named
13206     something starting with __ and the normal name is an alias.  */
13207 #if defined (__stub_memmove) || defined (__stub___memmove)
13208 choke me
13209 #else
13210 f = memmove;
13211 #endif
13212
13213   ;
13214   return 0;
13215 }
13216 _ACEOF
13217 rm -f conftest.$ac_objext conftest$ac_exeext
13218 if { (eval echo "$as_me:13218: \"$ac_link\"") >&5
13219   (eval $ac_link) 2>&5
13220   ac_status=$?
13221   echo "$as_me:13221: \$? = $ac_status" >&5
13222   (exit $ac_status); } &&
13223          { ac_try='test -s conftest$ac_exeext'
13224   { (eval echo "$as_me:13224: \"$ac_try\"") >&5
13225   (eval $ac_try) 2>&5
13226   ac_status=$?
13227   echo "$as_me:13227: \$? = $ac_status" >&5
13228   (exit $ac_status); }; }; then
13229   ac_cv_func_memmove=yes
13230 else
13231   echo "$as_me: failed program was:" >&5
13232 cat conftest.$ac_ext >&5
13233 ac_cv_func_memmove=no
13234 fi
13235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13236 fi
13237 echo "$as_me:13237: result: $ac_cv_func_memmove" >&5
13238 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13239 if test $ac_cv_func_memmove = yes; then
13240   :
13241 else
13242
13243 echo "$as_me:13243: checking for bcopy" >&5
13244 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13245 if test "${ac_cv_func_bcopy+set}" = set; then
13246   echo $ECHO_N "(cached) $ECHO_C" >&6
13247 else
13248   cat >conftest.$ac_ext <<_ACEOF
13249 #line 13249 "configure"
13250 #include "confdefs.h"
13251 /* System header to define __stub macros and hopefully few prototypes,
13252     which can conflict with char bcopy (); below.  */
13253 #include <assert.h>
13254 /* Override any gcc2 internal prototype to avoid an error.  */
13255 #ifdef __cplusplus
13256 extern "C"
13257 #endif
13258 /* We use char because int might match the return type of a gcc2
13259    builtin and then its argument prototype would still apply.  */
13260 char bcopy ();
13261 char (*f) ();
13262
13263 int
13264 main ()
13265 {
13266 /* The GNU C library defines this for functions which it implements
13267     to always fail with ENOSYS.  Some functions are actually named
13268     something starting with __ and the normal name is an alias.  */
13269 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13270 choke me
13271 #else
13272 f = bcopy;
13273 #endif
13274
13275   ;
13276   return 0;
13277 }
13278 _ACEOF
13279 rm -f conftest.$ac_objext conftest$ac_exeext
13280 if { (eval echo "$as_me:13280: \"$ac_link\"") >&5
13281   (eval $ac_link) 2>&5
13282   ac_status=$?
13283   echo "$as_me:13283: \$? = $ac_status" >&5
13284   (exit $ac_status); } &&
13285          { ac_try='test -s conftest$ac_exeext'
13286   { (eval echo "$as_me:13286: \"$ac_try\"") >&5
13287   (eval $ac_try) 2>&5
13288   ac_status=$?
13289   echo "$as_me:13289: \$? = $ac_status" >&5
13290   (exit $ac_status); }; }; then
13291   ac_cv_func_bcopy=yes
13292 else
13293   echo "$as_me: failed program was:" >&5
13294 cat conftest.$ac_ext >&5
13295 ac_cv_func_bcopy=no
13296 fi
13297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13298 fi
13299 echo "$as_me:13299: result: $ac_cv_func_bcopy" >&5
13300 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13301 if test $ac_cv_func_bcopy = yes; then
13302
13303         echo "$as_me:13303: checking if bcopy does overlapping moves" >&5
13304 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13305 if test "${cf_cv_good_bcopy+set}" = set; then
13306   echo $ECHO_N "(cached) $ECHO_C" >&6
13307 else
13308
13309                 if test "$cross_compiling" = yes; then
13310   cf_cv_good_bcopy=unknown
13311 else
13312   cat >conftest.$ac_ext <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315
13316 int main() {
13317         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13318         char temp[40];
13319         bcopy(data, temp, sizeof(data));
13320         bcopy(temp+10, temp, 15);
13321         bcopy(temp+5, temp+15, 10);
13322         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13323 }
13324
13325 _ACEOF
13326 rm -f conftest$ac_exeext
13327 if { (eval echo "$as_me:13327: \"$ac_link\"") >&5
13328   (eval $ac_link) 2>&5
13329   ac_status=$?
13330   echo "$as_me:13330: \$? = $ac_status" >&5
13331   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13332   { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:13335: \$? = $ac_status" >&5
13336   (exit $ac_status); }; }; then
13337   cf_cv_good_bcopy=yes
13338 else
13339   echo "$as_me: program exited with status $ac_status" >&5
13340 echo "$as_me: failed program was:" >&5
13341 cat conftest.$ac_ext >&5
13342 cf_cv_good_bcopy=no
13343 fi
13344 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13345 fi
13346
13347 fi
13348 echo "$as_me:13348: result: $cf_cv_good_bcopy" >&5
13349 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13350
13351 else
13352   cf_cv_good_bcopy=no
13353 fi
13354
13355         if test "$cf_cv_good_bcopy" = yes ; then
13356                 cat >>confdefs.h <<\EOF
13357 #define USE_OK_BCOPY 1
13358 EOF
13359
13360         else
13361                 cat >>confdefs.h <<\EOF
13362 #define USE_MY_MEMMOVE 1
13363 EOF
13364
13365         fi
13366
13367 fi
13368
13369 echo "$as_me:13369: checking if poll really works" >&5
13370 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13371 if test "${cf_cv_working_poll+set}" = set; then
13372   echo $ECHO_N "(cached) $ECHO_C" >&6
13373 else
13374
13375 if test "$cross_compiling" = yes; then
13376   cf_cv_working_poll=unknown
13377 else
13378   cat >conftest.$ac_ext <<_ACEOF
13379 #line 13379 "configure"
13380 #include "confdefs.h"
13381
13382 #include <stdio.h>
13383 #ifdef HAVE_POLL_H
13384 #include <poll.h>
13385 #else
13386 #include <sys/poll.h>
13387 #endif
13388 int main() {
13389         struct pollfd myfds;
13390         int ret;
13391
13392         myfds.fd = 0;
13393         myfds.events = POLLIN;
13394
13395         ret = poll(&myfds, 1, 100);
13396         ${cf_cv_main_return:-return}(ret != 0);
13397 }
13398 _ACEOF
13399 rm -f conftest$ac_exeext
13400 if { (eval echo "$as_me:13400: \"$ac_link\"") >&5
13401   (eval $ac_link) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13405   { (eval echo "$as_me:13405: \"$ac_try\"") >&5
13406   (eval $ac_try) 2>&5
13407   ac_status=$?
13408   echo "$as_me:13408: \$? = $ac_status" >&5
13409   (exit $ac_status); }; }; then
13410   cf_cv_working_poll=yes
13411 else
13412   echo "$as_me: program exited with status $ac_status" >&5
13413 echo "$as_me: failed program was:" >&5
13414 cat conftest.$ac_ext >&5
13415 cf_cv_working_poll=no
13416 fi
13417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13418 fi
13419 fi
13420 echo "$as_me:13420: result: $cf_cv_working_poll" >&5
13421 echo "${ECHO_T}$cf_cv_working_poll" >&6
13422 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13423 #define HAVE_WORKING_POLL 1
13424 EOF
13425
13426 if test "$with_hashed_db" != no ; then
13427         cat >>confdefs.h <<\EOF
13428 #define USE_HASHED_DB 1
13429 EOF
13430
13431 case $with_hashed_db in #(vi
13432 yes|*able*) #(vi
13433     ;;
13434 *)
13435     if test -d "$with_hashed_db" ; then
13436
13437 if test -n "$with_hashed_db/include" ; then
13438   for cf_add_incdir in $with_hashed_db/include
13439   do
13440         while test $cf_add_incdir != /usr/include
13441         do
13442           if test -d $cf_add_incdir
13443           then
13444                 cf_have_incdir=no
13445                 if test -n "$CFLAGS$CPPFLAGS" ; then
13446                   # a loop is needed to ensure we can add subdirs of existing dirs
13447                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13448                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13449                           cf_have_incdir=yes; break
13450                         fi
13451                   done
13452                 fi
13453
13454                 if test "$cf_have_incdir" = no ; then
13455           if test "$cf_add_incdir" = /usr/local/include ; then
13456                         if test "$GCC" = yes
13457                         then
13458                           cf_save_CPPFLAGS=$CPPFLAGS
13459                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13460                           cat >conftest.$ac_ext <<_ACEOF
13461 #line 13461 "configure"
13462 #include "confdefs.h"
13463 #include <stdio.h>
13464 int
13465 main ()
13466 {
13467 printf("Hello")
13468   ;
13469   return 0;
13470 }
13471 _ACEOF
13472 rm -f conftest.$ac_objext
13473 if { (eval echo "$as_me:13473: \"$ac_compile\"") >&5
13474   (eval $ac_compile) 2>&5
13475   ac_status=$?
13476   echo "$as_me:13476: \$? = $ac_status" >&5
13477   (exit $ac_status); } &&
13478          { ac_try='test -s conftest.$ac_objext'
13479   { (eval echo "$as_me:13479: \"$ac_try\"") >&5
13480   (eval $ac_try) 2>&5
13481   ac_status=$?
13482   echo "$as_me:13482: \$? = $ac_status" >&5
13483   (exit $ac_status); }; }; then
13484   :
13485 else
13486   echo "$as_me: failed program was:" >&5
13487 cat conftest.$ac_ext >&5
13488 cf_have_incdir=yes
13489 fi
13490 rm -f conftest.$ac_objext conftest.$ac_ext
13491                           CPPFLAGS=$cf_save_CPPFLAGS
13492                         fi
13493                   fi
13494                 fi
13495
13496                 if test "$cf_have_incdir" = no ; then
13497                   echo "$as_me:13497: result: adding $cf_add_incdir to include-path" >&5
13498 echo "${ECHO_T}adding $cf_add_incdir to include-path" >&6
13499                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13500
13501           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13502           test "$cf_top_incdir" = "$cf_add_incdir" && break
13503           cf_add_incdir="$cf_top_incdir"
13504                 else
13505                   break
13506                 fi
13507           fi
13508         done
13509   done
13510 fi
13511
13512 if test -n "$with_hashed_db/lib" ; then
13513   for cf_add_libdir in $with_hashed_db/lib
13514   do
13515     if test $cf_add_libdir = /usr/lib ; then
13516       :
13517     elif test -d $cf_add_libdir
13518     then
13519       cf_have_libdir=no
13520       if test -n "$LDFLAGS$LIBS" ; then
13521         # a loop is needed to ensure we can add subdirs of existing dirs
13522         for cf_test_libdir in $LDFLAGS $LIBS ; do
13523           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13524             cf_have_libdir=yes; break
13525           fi
13526         done
13527       fi
13528       if test "$cf_have_libdir" = no ; then
13529         echo "$as_me:13529: result: adding $cf_add_libdir to library-path" >&5
13530 echo "${ECHO_T}adding $cf_add_libdir to library-path" >&6
13531         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13532       fi
13533     fi
13534   done
13535 fi
13536
13537     fi
13538 esac
13539
13540 echo "$as_me:13540: checking for db.h" >&5
13541 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13542 if test "${ac_cv_header_db_h+set}" = set; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545   cat >conftest.$ac_ext <<_ACEOF
13546 #line 13546 "configure"
13547 #include "confdefs.h"
13548 #include <db.h>
13549 _ACEOF
13550 if { (eval echo "$as_me:13550: \"$ac_cpp conftest.$ac_ext\"") >&5
13551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13552   ac_status=$?
13553   egrep -v '^ *\+' conftest.er1 >conftest.err
13554   rm -f conftest.er1
13555   cat conftest.err >&5
13556   echo "$as_me:13556: \$? = $ac_status" >&5
13557   (exit $ac_status); } >/dev/null; then
13558   if test -s conftest.err; then
13559     ac_cpp_err=$ac_c_preproc_warn_flag
13560   else
13561     ac_cpp_err=
13562   fi
13563 else
13564   ac_cpp_err=yes
13565 fi
13566 if test -z "$ac_cpp_err"; then
13567   ac_cv_header_db_h=yes
13568 else
13569   echo "$as_me: failed program was:" >&5
13570   cat conftest.$ac_ext >&5
13571   ac_cv_header_db_h=no
13572 fi
13573 rm -f conftest.err conftest.$ac_ext
13574 fi
13575 echo "$as_me:13575: result: $ac_cv_header_db_h" >&5
13576 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13577 if test $ac_cv_header_db_h = yes; then
13578
13579 echo "$as_me:13579: checking for version of db" >&5
13580 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13581 if test "${cf_cv_hashed_db_version+set}" = set; then
13582   echo $ECHO_N "(cached) $ECHO_C" >&6
13583 else
13584
13585 cf_cv_hashed_db_version=unknown
13586
13587 for cf_db_version in 1 2 3 4 5
13588 do
13589
13590 echo "${as_me-configure}:13590: testing checking for db version $cf_db_version ..." 1>&5
13591
13592         cat >conftest.$ac_ext <<_ACEOF
13593 #line 13593 "configure"
13594 #include "confdefs.h"
13595
13596 $ac_includes_default
13597 #include <db.h>
13598
13599 #ifdef DB_VERSION_MAJOR
13600         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13601 #if $cf_db_version == DB_VERSION_MAJOR
13602         /* ok */
13603 #else
13604         make an error
13605 #endif
13606 #else
13607 #if $cf_db_version == 1
13608         /* ok: assuming this is DB 1.8.5 */
13609 #else
13610         make an error
13611 #endif
13612 #endif
13613
13614 int
13615 main ()
13616 {
13617 DBT *foo = 0
13618   ;
13619   return 0;
13620 }
13621 _ACEOF
13622 rm -f conftest.$ac_objext
13623 if { (eval echo "$as_me:13623: \"$ac_compile\"") >&5
13624   (eval $ac_compile) 2>&5
13625   ac_status=$?
13626   echo "$as_me:13626: \$? = $ac_status" >&5
13627   (exit $ac_status); } &&
13628          { ac_try='test -s conftest.$ac_objext'
13629   { (eval echo "$as_me:13629: \"$ac_try\"") >&5
13630   (eval $ac_try) 2>&5
13631   ac_status=$?
13632   echo "$as_me:13632: \$? = $ac_status" >&5
13633   (exit $ac_status); }; }; then
13634
13635         cf_cv_hashed_db_version=$cf_db_version
13636         break
13637
13638 else
13639   echo "$as_me: failed program was:" >&5
13640 cat conftest.$ac_ext >&5
13641 fi
13642 rm -f conftest.$ac_objext conftest.$ac_ext
13643 done
13644
13645 fi
13646 echo "$as_me:13646: result: $cf_cv_hashed_db_version" >&5
13647 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13648
13649 if test "$cf_cv_hashed_db_version" = unknown ; then
13650         { { echo "$as_me:13650: error: Cannot determine version of db" >&5
13651 echo "$as_me: error: Cannot determine version of db" >&2;}
13652    { (exit 1); exit 1; }; }
13653 else
13654
13655 echo "$as_me:13655: checking for db libraries" >&5
13656 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13657 if test "${cf_cv_hashed_db_libs+set}" = set; then
13658   echo $ECHO_N "(cached) $ECHO_C" >&6
13659 else
13660
13661 cf_cv_hashed_db_libs=unknown
13662 for cf_db_libs in db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
13663 do
13664         cf_save_libs="$LIBS"
13665         if test -n "$cf_db_libs"; then
13666                 LIBS="-l$cf_db_libs $LIBS"
13667         fi
13668
13669 echo "${as_me-configure}:13669: testing checking for library "$cf_db_libs" ..." 1>&5
13670
13671         cat >conftest.$ac_ext <<_ACEOF
13672 #line 13672 "configure"
13673 #include "confdefs.h"
13674
13675 $ac_includes_default
13676 #include <db.h>
13677
13678 int
13679 main ()
13680 {
13681
13682         char *path = "/tmp/foo";
13683 #ifdef DB_VERSION_MAJOR
13684 #if DB_VERSION_MAJOR >= 4
13685         DB *result = 0;
13686         db_create(&result, NULL, 0);
13687         result->open(result,
13688                 NULL,
13689                 path,
13690                 path,
13691                 DB_HASH,
13692                 DB_CREATE,
13693                 0644);
13694 #elif DB_VERSION_MAJOR >= 3
13695         DB *result = 0;
13696         db_create(&result, NULL, 0);
13697         result->open(result,
13698                 path,
13699                 path,
13700                 DB_HASH,
13701                 DB_CREATE,
13702                 0644);
13703 #elif DB_VERSION_MAJOR >= 2
13704         DB *result = 0;
13705         db_open(path,
13706                 DB_HASH,
13707                 DB_CREATE,
13708                 0644,
13709                 (DB_ENV *) 0,
13710                 (DB_INFO *) 0,
13711                 &result);
13712 #endif /* DB_VERSION_MAJOR */
13713 #else
13714         DB *result = dbopen(path,
13715                      2,
13716                      0644,
13717                      DB_HASH,
13718                      0);
13719 #endif
13720         ${cf_cv_main_return:-return}(result != 0)
13721
13722   ;
13723   return 0;
13724 }
13725 _ACEOF
13726 rm -f conftest.$ac_objext conftest$ac_exeext
13727 if { (eval echo "$as_me:13727: \"$ac_link\"") >&5
13728   (eval $ac_link) 2>&5
13729   ac_status=$?
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit $ac_status); } &&
13732          { ac_try='test -s conftest$ac_exeext'
13733   { (eval echo "$as_me:13733: \"$ac_try\"") >&5
13734   (eval $ac_try) 2>&5
13735   ac_status=$?
13736   echo "$as_me:13736: \$? = $ac_status" >&5
13737   (exit $ac_status); }; }; then
13738
13739         if test -n "$cf_db_libs" ; then
13740                 cf_cv_hashed_db_libs=$cf_db_libs
13741         else
13742                 cf_cv_hashed_db_libs=default
13743         fi
13744         LIBS="$cf_save_libs"
13745         break
13746
13747 else
13748   echo "$as_me: failed program was:" >&5
13749 cat conftest.$ac_ext >&5
13750 fi
13751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13752         LIBS="$cf_save_libs"
13753 done
13754
13755 fi
13756 echo "$as_me:13756: result: $cf_cv_hashed_db_libs" >&5
13757 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13758
13759         if test "$cf_cv_hashed_db_libs" = unknown ; then
13760                 { { echo "$as_me:13760: error: Cannot determine library for db" >&5
13761 echo "$as_me: error: Cannot determine library for db" >&2;}
13762    { (exit 1); exit 1; }; }
13763         elif test "$cf_cv_hashed_db_libs" != default ; then
13764                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13765         fi
13766 fi
13767
13768 else
13769
13770         { { echo "$as_me:13770: error: Cannot find db.h" >&5
13771 echo "$as_me: error: Cannot find db.h" >&2;}
13772    { (exit 1); exit 1; }; }
13773
13774 fi
13775
13776 fi
13777
13778 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13779         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13780         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13781 fi
13782
13783 # Just in case, check if the C compiler has a bool type.
13784
13785 echo "$as_me:13785: checking if we should include stdbool.h" >&5
13786 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13787
13788 if test "${cf_cv_header_stdbool_h+set}" = set; then
13789   echo $ECHO_N "(cached) $ECHO_C" >&6
13790 else
13791
13792         cat >conftest.$ac_ext <<_ACEOF
13793 #line 13793 "configure"
13794 #include "confdefs.h"
13795
13796 int
13797 main ()
13798 {
13799 bool foo = false
13800   ;
13801   return 0;
13802 }
13803 _ACEOF
13804 rm -f conftest.$ac_objext
13805 if { (eval echo "$as_me:13805: \"$ac_compile\"") >&5
13806   (eval $ac_compile) 2>&5
13807   ac_status=$?
13808   echo "$as_me:13808: \$? = $ac_status" >&5
13809   (exit $ac_status); } &&
13810          { ac_try='test -s conftest.$ac_objext'
13811   { (eval echo "$as_me:13811: \"$ac_try\"") >&5
13812   (eval $ac_try) 2>&5
13813   ac_status=$?
13814   echo "$as_me:13814: \$? = $ac_status" >&5
13815   (exit $ac_status); }; }; then
13816   cf_cv_header_stdbool_h=0
13817 else
13818   echo "$as_me: failed program was:" >&5
13819 cat conftest.$ac_ext >&5
13820 cat >conftest.$ac_ext <<_ACEOF
13821 #line 13821 "configure"
13822 #include "confdefs.h"
13823
13824 #ifndef __BEOS__
13825 #include <stdbool.h>
13826 #endif
13827
13828 int
13829 main ()
13830 {
13831 bool foo = false
13832   ;
13833   return 0;
13834 }
13835 _ACEOF
13836 rm -f conftest.$ac_objext
13837 if { (eval echo "$as_me:13837: \"$ac_compile\"") >&5
13838   (eval $ac_compile) 2>&5
13839   ac_status=$?
13840   echo "$as_me:13840: \$? = $ac_status" >&5
13841   (exit $ac_status); } &&
13842          { ac_try='test -s conftest.$ac_objext'
13843   { (eval echo "$as_me:13843: \"$ac_try\"") >&5
13844   (eval $ac_try) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); }; }; then
13848   cf_cv_header_stdbool_h=1
13849 else
13850   echo "$as_me: failed program was:" >&5
13851 cat conftest.$ac_ext >&5
13852 cf_cv_header_stdbool_h=0
13853 fi
13854 rm -f conftest.$ac_objext conftest.$ac_ext
13855 fi
13856 rm -f conftest.$ac_objext conftest.$ac_ext
13857 fi
13858
13859 if test "$cf_cv_header_stdbool_h" = 1
13860 then    echo "$as_me:13860: result: yes" >&5
13861 echo "${ECHO_T}yes" >&6
13862 else    echo "$as_me:13862: result: no" >&5
13863 echo "${ECHO_T}no" >&6
13864 fi
13865
13866 echo "$as_me:13866: checking for builtin bool type" >&5
13867 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13868
13869 if test "${cf_cv_cc_bool_type+set}" = set; then
13870   echo $ECHO_N "(cached) $ECHO_C" >&6
13871 else
13872
13873         cat >conftest.$ac_ext <<_ACEOF
13874 #line 13874 "configure"
13875 #include "confdefs.h"
13876
13877 #include <stdio.h>
13878 #include <sys/types.h>
13879
13880 int
13881 main ()
13882 {
13883 bool x = false
13884   ;
13885   return 0;
13886 }
13887 _ACEOF
13888 rm -f conftest.$ac_objext
13889 if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5
13890   (eval $ac_compile) 2>&5
13891   ac_status=$?
13892   echo "$as_me:13892: \$? = $ac_status" >&5
13893   (exit $ac_status); } &&
13894          { ac_try='test -s conftest.$ac_objext'
13895   { (eval echo "$as_me:13895: \"$ac_try\"") >&5
13896   (eval $ac_try) 2>&5
13897   ac_status=$?
13898   echo "$as_me:13898: \$? = $ac_status" >&5
13899   (exit $ac_status); }; }; then
13900   cf_cv_cc_bool_type=1
13901 else
13902   echo "$as_me: failed program was:" >&5
13903 cat conftest.$ac_ext >&5
13904 cf_cv_cc_bool_type=0
13905 fi
13906 rm -f conftest.$ac_objext conftest.$ac_ext
13907
13908 fi
13909
13910 if test "$cf_cv_cc_bool_type" = 1
13911 then    echo "$as_me:13911: result: yes" >&5
13912 echo "${ECHO_T}yes" >&6
13913 else    echo "$as_me:13913: result: no" >&5
13914 echo "${ECHO_T}no" >&6
13915 fi
13916
13917 # Check for C++ compiler characteristics (and ensure that it's there!)
13918 if test -n "$CXX" ; then
13919         ac_ext=cc
13920 ac_cpp='$CXXCPP $CPPFLAGS'
13921 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13922 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13923 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13924 ac_main_return=return
13925
13926 if test -n "$GXX" ; then
13927 case $cf_cv_system_name in #(vi
13928 os2*) #(vi
13929         cf_stdcpp_libname=stdcpp
13930         ;;
13931 *)
13932         cf_stdcpp_libname=stdc++
13933         ;;
13934 esac
13935 echo "$as_me:13935: checking for library $cf_stdcpp_libname" >&5
13936 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13937 if test "${cf_cv_libstdcpp+set}" = set; then
13938   echo $ECHO_N "(cached) $ECHO_C" >&6
13939 else
13940
13941         cf_save="$LIBS"
13942         LIBS="$LIBS -l$cf_stdcpp_libname"
13943 cat >conftest.$ac_ext <<_ACEOF
13944 #line 13944 "configure"
13945 #include "confdefs.h"
13946
13947 #include <strstream.h>
13948 int
13949 main ()
13950 {
13951
13952 char buf[80];
13953 strstreambuf foo(buf, sizeof(buf))
13954
13955   ;
13956   return 0;
13957 }
13958 _ACEOF
13959 rm -f conftest.$ac_objext conftest$ac_exeext
13960 if { (eval echo "$as_me:13960: \"$ac_link\"") >&5
13961   (eval $ac_link) 2>&5
13962   ac_status=$?
13963   echo "$as_me:13963: \$? = $ac_status" >&5
13964   (exit $ac_status); } &&
13965          { ac_try='test -s conftest$ac_exeext'
13966   { (eval echo "$as_me:13966: \"$ac_try\"") >&5
13967   (eval $ac_try) 2>&5
13968   ac_status=$?
13969   echo "$as_me:13969: \$? = $ac_status" >&5
13970   (exit $ac_status); }; }; then
13971   cf_cv_libstdcpp=yes
13972 else
13973   echo "$as_me: failed program was:" >&5
13974 cat conftest.$ac_ext >&5
13975 cf_cv_libstdcpp=no
13976 fi
13977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13978         LIBS="$cf_save"
13979
13980 fi
13981 echo "$as_me:13981: result: $cf_cv_libstdcpp" >&5
13982 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13983 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13984 fi
13985
13986         echo "$as_me:13986: checking whether $CXX understands -c and -o together" >&5
13987 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13988 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13989   echo $ECHO_N "(cached) $ECHO_C" >&6
13990 else
13991
13992 cat > conftest.$ac_ext <<CF_EOF
13993 #include <stdio.h>
13994 int main()
13995 {
13996         ${cf_cv_main_return:-return}(0);
13997 }
13998 CF_EOF
13999 # We do the test twice because some compilers refuse to overwrite an
14000 # existing .o file with -o, though they will create one.
14001 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14002 if { (eval echo "$as_me:14002: \"$ac_try\"") >&5
14003   (eval $ac_try) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); } &&
14007   test -f conftest2.$ac_objext && { (eval echo "$as_me:14007: \"$ac_try\"") >&5
14008   (eval $ac_try) 2>&5
14009   ac_status=$?
14010   echo "$as_me:14010: \$? = $ac_status" >&5
14011   (exit $ac_status); };
14012 then
14013   eval cf_cv_prog_CXX_c_o=yes
14014 else
14015   eval cf_cv_prog_CXX_c_o=no
14016 fi
14017 rm -f conftest*
14018
14019 fi
14020 if test $cf_cv_prog_CXX_c_o = yes; then
14021   echo "$as_me:14021: result: yes" >&5
14022 echo "${ECHO_T}yes" >&6
14023 else
14024   echo "$as_me:14024: result: no" >&5
14025 echo "${ECHO_T}no" >&6
14026 fi
14027
14028         case $GXX_VERSION in
14029         1*|2.0-6*)
14030                 cf_cxx_library=yes
14031                 ;;
14032         *-2.7*|2.7*)
14033
14034 cf_cxx_library=unknown
14035 case $cf_cv_system_name in #(vi
14036 os2*) #(vi
14037         cf_gpp_libname=gpp
14038         ;;
14039 *)
14040         cf_gpp_libname=g++
14041         ;;
14042 esac
14043 if test "$GXX" = yes; then
14044         echo "$as_me:14044: checking for lib$cf_gpp_libname" >&5
14045 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14046         cf_save="$LIBS"
14047         LIBS="$LIBS -l$cf_gpp_libname"
14048         cat >conftest.$ac_ext <<_ACEOF
14049 #line 14049 "configure"
14050 #include "confdefs.h"
14051
14052 #include <$cf_gpp_libname/builtin.h>
14053
14054 int
14055 main ()
14056 {
14057 two_arg_error_handler_t foo2 = lib_error_handler
14058   ;
14059   return 0;
14060 }
14061 _ACEOF
14062 rm -f conftest.$ac_objext conftest$ac_exeext
14063 if { (eval echo "$as_me:14063: \"$ac_link\"") >&5
14064   (eval $ac_link) 2>&5
14065   ac_status=$?
14066   echo "$as_me:14066: \$? = $ac_status" >&5
14067   (exit $ac_status); } &&
14068          { ac_try='test -s conftest$ac_exeext'
14069   { (eval echo "$as_me:14069: \"$ac_try\"") >&5
14070   (eval $ac_try) 2>&5
14071   ac_status=$?
14072   echo "$as_me:14072: \$? = $ac_status" >&5
14073   (exit $ac_status); }; }; then
14074   cf_cxx_library=yes
14075          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14076          if test "$cf_gpp_libname" = cpp ; then
14077             cat >>confdefs.h <<\EOF
14078 #define HAVE_GPP_BUILTIN_H 1
14079 EOF
14080
14081          else
14082             cat >>confdefs.h <<\EOF
14083 #define HAVE_GXX_BUILTIN_H 1
14084 EOF
14085
14086          fi
14087 else
14088   echo "$as_me: failed program was:" >&5
14089 cat conftest.$ac_ext >&5
14090 cat >conftest.$ac_ext <<_ACEOF
14091 #line 14091 "configure"
14092 #include "confdefs.h"
14093
14094 #include <builtin.h>
14095
14096 int
14097 main ()
14098 {
14099 two_arg_error_handler_t foo2 = lib_error_handler
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 rm -f conftest.$ac_objext conftest$ac_exeext
14105 if { (eval echo "$as_me:14105: \"$ac_link\"") >&5
14106   (eval $ac_link) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit $ac_status); } &&
14110          { ac_try='test -s conftest$ac_exeext'
14111   { (eval echo "$as_me:14111: \"$ac_try\"") >&5
14112   (eval $ac_try) 2>&5
14113   ac_status=$?
14114   echo "$as_me:14114: \$? = $ac_status" >&5
14115   (exit $ac_status); }; }; then
14116   cf_cxx_library=yes
14117          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14118          cat >>confdefs.h <<\EOF
14119 #define HAVE_BUILTIN_H 1
14120 EOF
14121
14122 else
14123   echo "$as_me: failed program was:" >&5
14124 cat conftest.$ac_ext >&5
14125 cf_cxx_library=no
14126 fi
14127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14128 fi
14129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14130         LIBS="$cf_save"
14131         echo "$as_me:14131: result: $cf_cxx_library" >&5
14132 echo "${ECHO_T}$cf_cxx_library" >&6
14133 fi
14134
14135                 ;;
14136         *)
14137                 cf_cxx_library=no
14138                 ;;
14139         esac
14140
14141         ac_ext=cc
14142 ac_cpp='$CXXCPP $CPPFLAGS'
14143 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14144 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14145 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14146 ac_main_return=return
14147 echo "$as_me:14147: checking how to run the C++ preprocessor" >&5
14148 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14149 if test -z "$CXXCPP"; then
14150   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14151   echo $ECHO_N "(cached) $ECHO_C" >&6
14152 else
14153       # Double quotes because CXXCPP needs to be expanded
14154     for CXXCPP in "$CXX -E" "/lib/cpp"
14155     do
14156       ac_preproc_ok=false
14157 for ac_cxx_preproc_warn_flag in '' yes
14158 do
14159   # Use a header file that comes with gcc, so configuring glibc
14160   # with a fresh cross-compiler works.
14161   # On the NeXT, cc -E runs the code through the compiler's parser,
14162   # not just through cpp. "Syntax error" is here to catch this case.
14163   cat >conftest.$ac_ext <<_ACEOF
14164 #line 14164 "configure"
14165 #include "confdefs.h"
14166 #include <assert.h>
14167                      Syntax error
14168 _ACEOF
14169 if { (eval echo "$as_me:14169: \"$ac_cpp conftest.$ac_ext\"") >&5
14170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14171   ac_status=$?
14172   egrep -v '^ *\+' conftest.er1 >conftest.err
14173   rm -f conftest.er1
14174   cat conftest.err >&5
14175   echo "$as_me:14175: \$? = $ac_status" >&5
14176   (exit $ac_status); } >/dev/null; then
14177   if test -s conftest.err; then
14178     ac_cpp_err=$ac_cxx_preproc_warn_flag
14179   else
14180     ac_cpp_err=
14181   fi
14182 else
14183   ac_cpp_err=yes
14184 fi
14185 if test -z "$ac_cpp_err"; then
14186   :
14187 else
14188   echo "$as_me: failed program was:" >&5
14189   cat conftest.$ac_ext >&5
14190   # Broken: fails on valid input.
14191 continue
14192 fi
14193 rm -f conftest.err conftest.$ac_ext
14194
14195   # OK, works on sane cases.  Now check whether non-existent headers
14196   # can be detected and how.
14197   cat >conftest.$ac_ext <<_ACEOF
14198 #line 14198 "configure"
14199 #include "confdefs.h"
14200 #include <ac_nonexistent.h>
14201 _ACEOF
14202 if { (eval echo "$as_me:14202: \"$ac_cpp conftest.$ac_ext\"") >&5
14203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14204   ac_status=$?
14205   egrep -v '^ *\+' conftest.er1 >conftest.err
14206   rm -f conftest.er1
14207   cat conftest.err >&5
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit $ac_status); } >/dev/null; then
14210   if test -s conftest.err; then
14211     ac_cpp_err=$ac_cxx_preproc_warn_flag
14212   else
14213     ac_cpp_err=
14214   fi
14215 else
14216   ac_cpp_err=yes
14217 fi
14218 if test -z "$ac_cpp_err"; then
14219   # Broken: success on invalid input.
14220 continue
14221 else
14222   echo "$as_me: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   # Passes both tests.
14225 ac_preproc_ok=:
14226 break
14227 fi
14228 rm -f conftest.err conftest.$ac_ext
14229
14230 done
14231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14232 rm -f conftest.err conftest.$ac_ext
14233 if $ac_preproc_ok; then
14234   break
14235 fi
14236
14237     done
14238     ac_cv_prog_CXXCPP=$CXXCPP
14239
14240 fi
14241   CXXCPP=$ac_cv_prog_CXXCPP
14242 else
14243   ac_cv_prog_CXXCPP=$CXXCPP
14244 fi
14245 echo "$as_me:14245: result: $CXXCPP" >&5
14246 echo "${ECHO_T}$CXXCPP" >&6
14247 ac_preproc_ok=false
14248 for ac_cxx_preproc_warn_flag in '' yes
14249 do
14250   # Use a header file that comes with gcc, so configuring glibc
14251   # with a fresh cross-compiler works.
14252   # On the NeXT, cc -E runs the code through the compiler's parser,
14253   # not just through cpp. "Syntax error" is here to catch this case.
14254   cat >conftest.$ac_ext <<_ACEOF
14255 #line 14255 "configure"
14256 #include "confdefs.h"
14257 #include <assert.h>
14258                      Syntax error
14259 _ACEOF
14260 if { (eval echo "$as_me:14260: \"$ac_cpp conftest.$ac_ext\"") >&5
14261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14262   ac_status=$?
14263   egrep -v '^ *\+' conftest.er1 >conftest.err
14264   rm -f conftest.er1
14265   cat conftest.err >&5
14266   echo "$as_me:14266: \$? = $ac_status" >&5
14267   (exit $ac_status); } >/dev/null; then
14268   if test -s conftest.err; then
14269     ac_cpp_err=$ac_cxx_preproc_warn_flag
14270   else
14271     ac_cpp_err=
14272   fi
14273 else
14274   ac_cpp_err=yes
14275 fi
14276 if test -z "$ac_cpp_err"; then
14277   :
14278 else
14279   echo "$as_me: failed program was:" >&5
14280   cat conftest.$ac_ext >&5
14281   # Broken: fails on valid input.
14282 continue
14283 fi
14284 rm -f conftest.err conftest.$ac_ext
14285
14286   # OK, works on sane cases.  Now check whether non-existent headers
14287   # can be detected and how.
14288   cat >conftest.$ac_ext <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14291 #include <ac_nonexistent.h>
14292 _ACEOF
14293 if { (eval echo "$as_me:14293: \"$ac_cpp conftest.$ac_ext\"") >&5
14294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14295   ac_status=$?
14296   egrep -v '^ *\+' conftest.er1 >conftest.err
14297   rm -f conftest.er1
14298   cat conftest.err >&5
14299   echo "$as_me:14299: \$? = $ac_status" >&5
14300   (exit $ac_status); } >/dev/null; then
14301   if test -s conftest.err; then
14302     ac_cpp_err=$ac_cxx_preproc_warn_flag
14303   else
14304     ac_cpp_err=
14305   fi
14306 else
14307   ac_cpp_err=yes
14308 fi
14309 if test -z "$ac_cpp_err"; then
14310   # Broken: success on invalid input.
14311 continue
14312 else
14313   echo "$as_me: failed program was:" >&5
14314   cat conftest.$ac_ext >&5
14315   # Passes both tests.
14316 ac_preproc_ok=:
14317 break
14318 fi
14319 rm -f conftest.err conftest.$ac_ext
14320
14321 done
14322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14323 rm -f conftest.err conftest.$ac_ext
14324 if $ac_preproc_ok; then
14325   :
14326 else
14327   { { echo "$as_me:14327: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14328 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14329    { (exit 1); exit 1; }; }
14330 fi
14331
14332 ac_ext=cc
14333 ac_cpp='$CXXCPP $CPPFLAGS'
14334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14337 ac_main_return=return
14338
14339 for ac_header in iostream typeinfo
14340 do
14341 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14342 echo "$as_me:14342: checking for $ac_header" >&5
14343 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14344 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14345   echo $ECHO_N "(cached) $ECHO_C" >&6
14346 else
14347   cat >conftest.$ac_ext <<_ACEOF
14348 #line 14348 "configure"
14349 #include "confdefs.h"
14350 #include <$ac_header>
14351 _ACEOF
14352 if { (eval echo "$as_me:14352: \"$ac_cpp conftest.$ac_ext\"") >&5
14353   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14354   ac_status=$?
14355   egrep -v '^ *\+' conftest.er1 >conftest.err
14356   rm -f conftest.er1
14357   cat conftest.err >&5
14358   echo "$as_me:14358: \$? = $ac_status" >&5
14359   (exit $ac_status); } >/dev/null; then
14360   if test -s conftest.err; then
14361     ac_cpp_err=$ac_cxx_preproc_warn_flag
14362   else
14363     ac_cpp_err=
14364   fi
14365 else
14366   ac_cpp_err=yes
14367 fi
14368 if test -z "$ac_cpp_err"; then
14369   eval "$as_ac_Header=yes"
14370 else
14371   echo "$as_me: failed program was:" >&5
14372   cat conftest.$ac_ext >&5
14373   eval "$as_ac_Header=no"
14374 fi
14375 rm -f conftest.err conftest.$ac_ext
14376 fi
14377 echo "$as_me:14377: result: `eval echo '${'$as_ac_Header'}'`" >&5
14378 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14379 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14380   cat >>confdefs.h <<EOF
14381 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14382 EOF
14383
14384 fi
14385 done
14386
14387 echo "$as_me:14387: checking if we should include stdbool.h" >&5
14388 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14389
14390 if test "${cf_cv_header_stdbool_h+set}" = set; then
14391   echo $ECHO_N "(cached) $ECHO_C" >&6
14392 else
14393
14394         cat >conftest.$ac_ext <<_ACEOF
14395 #line 14395 "configure"
14396 #include "confdefs.h"
14397
14398 int
14399 main ()
14400 {
14401 bool foo = false
14402   ;
14403   return 0;
14404 }
14405 _ACEOF
14406 rm -f conftest.$ac_objext
14407 if { (eval echo "$as_me:14407: \"$ac_compile\"") >&5
14408   (eval $ac_compile) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit $ac_status); } &&
14412          { ac_try='test -s conftest.$ac_objext'
14413   { (eval echo "$as_me:14413: \"$ac_try\"") >&5
14414   (eval $ac_try) 2>&5
14415   ac_status=$?
14416   echo "$as_me:14416: \$? = $ac_status" >&5
14417   (exit $ac_status); }; }; then
14418   cf_cv_header_stdbool_h=0
14419 else
14420   echo "$as_me: failed program was:" >&5
14421 cat conftest.$ac_ext >&5
14422 cat >conftest.$ac_ext <<_ACEOF
14423 #line 14423 "configure"
14424 #include "confdefs.h"
14425
14426 #ifndef __BEOS__
14427 #include <stdbool.h>
14428 #endif
14429
14430 int
14431 main ()
14432 {
14433 bool foo = false
14434   ;
14435   return 0;
14436 }
14437 _ACEOF
14438 rm -f conftest.$ac_objext
14439 if { (eval echo "$as_me:14439: \"$ac_compile\"") >&5
14440   (eval $ac_compile) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); } &&
14444          { ac_try='test -s conftest.$ac_objext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   cf_cv_header_stdbool_h=1
14451 else
14452   echo "$as_me: failed program was:" >&5
14453 cat conftest.$ac_ext >&5
14454 cf_cv_header_stdbool_h=0
14455 fi
14456 rm -f conftest.$ac_objext conftest.$ac_ext
14457 fi
14458 rm -f conftest.$ac_objext conftest.$ac_ext
14459 fi
14460
14461 if test "$cf_cv_header_stdbool_h" = 1
14462 then    echo "$as_me:14462: result: yes" >&5
14463 echo "${ECHO_T}yes" >&6
14464 else    echo "$as_me:14464: result: no" >&5
14465 echo "${ECHO_T}no" >&6
14466 fi
14467
14468 echo "$as_me:14468: checking for builtin bool type" >&5
14469 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14470
14471 if test "${cf_cv_builtin_bool+set}" = set; then
14472   echo $ECHO_N "(cached) $ECHO_C" >&6
14473 else
14474
14475         cat >conftest.$ac_ext <<_ACEOF
14476 #line 14476 "configure"
14477 #include "confdefs.h"
14478
14479 #include <stdio.h>
14480 #include <sys/types.h>
14481
14482 int
14483 main ()
14484 {
14485 bool x = false
14486   ;
14487   return 0;
14488 }
14489 _ACEOF
14490 rm -f conftest.$ac_objext
14491 if { (eval echo "$as_me:14491: \"$ac_compile\"") >&5
14492   (eval $ac_compile) 2>&5
14493   ac_status=$?
14494   echo "$as_me:14494: \$? = $ac_status" >&5
14495   (exit $ac_status); } &&
14496          { ac_try='test -s conftest.$ac_objext'
14497   { (eval echo "$as_me:14497: \"$ac_try\"") >&5
14498   (eval $ac_try) 2>&5
14499   ac_status=$?
14500   echo "$as_me:14500: \$? = $ac_status" >&5
14501   (exit $ac_status); }; }; then
14502   cf_cv_builtin_bool=1
14503 else
14504   echo "$as_me: failed program was:" >&5
14505 cat conftest.$ac_ext >&5
14506 cf_cv_builtin_bool=0
14507 fi
14508 rm -f conftest.$ac_objext conftest.$ac_ext
14509
14510 fi
14511
14512 if test "$cf_cv_builtin_bool" = 1
14513 then    echo "$as_me:14513: result: yes" >&5
14514 echo "${ECHO_T}yes" >&6
14515 else    echo "$as_me:14515: result: no" >&5
14516 echo "${ECHO_T}no" >&6
14517 fi
14518
14519 echo "$as_me:14519: checking for size of bool" >&5
14520 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14521 if test "${cf_cv_type_of_bool+set}" = set; then
14522   echo $ECHO_N "(cached) $ECHO_C" >&6
14523 else
14524
14525         rm -f cf_test.out
14526         if test "$cross_compiling" = yes; then
14527   cf_cv_type_of_bool=unknown
14528 else
14529   cat >conftest.$ac_ext <<_ACEOF
14530 #line 14530 "configure"
14531 #include "confdefs.h"
14532
14533 #include <stdlib.h>
14534 #include <stdio.h>
14535
14536 #if defined(__cplusplus)
14537
14538 #ifdef HAVE_GXX_BUILTIN_H
14539 #include <g++/builtin.h>
14540 #elif HAVE_GPP_BUILTIN_H
14541 #include <gpp/builtin.h>
14542 #elif HAVE_BUILTIN_H
14543 #include <builtin.h>
14544 #endif
14545
14546 #else
14547
14548 #if $cf_cv_header_stdbool_h
14549 #include <stdbool.h>
14550 #endif
14551
14552 #endif
14553
14554 main()
14555 {
14556         FILE *fp = fopen("cf_test.out", "w");
14557         if (fp != 0) {
14558                 bool x = true;
14559                 if ((bool)(-x) >= 0)
14560                         fputs("unsigned ", fp);
14561                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14562                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14563                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14564                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14565                 fclose(fp);
14566         }
14567         ${cf_cv_main_return:-return}(0);
14568 }
14569
14570 _ACEOF
14571 rm -f conftest$ac_exeext
14572 if { (eval echo "$as_me:14572: \"$ac_link\"") >&5
14573   (eval $ac_link) 2>&5
14574   ac_status=$?
14575   echo "$as_me:14575: \$? = $ac_status" >&5
14576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14577   { (eval echo "$as_me:14577: \"$ac_try\"") >&5
14578   (eval $ac_try) 2>&5
14579   ac_status=$?
14580   echo "$as_me:14580: \$? = $ac_status" >&5
14581   (exit $ac_status); }; }; then
14582   cf_cv_type_of_bool=`cat cf_test.out`
14583                  if test -z "$cf_cv_type_of_bool"; then
14584                    cf_cv_type_of_bool=unknown
14585                  fi
14586 else
14587   echo "$as_me: program exited with status $ac_status" >&5
14588 echo "$as_me: failed program was:" >&5
14589 cat conftest.$ac_ext >&5
14590 cf_cv_type_of_bool=unknown
14591 fi
14592 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14593 fi
14594
14595 fi
14596
14597         rm -f cf_test.out
14598 echo "$as_me:14598: result: $cf_cv_type_of_bool" >&5
14599 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14600 if test "$cf_cv_type_of_bool" = unknown ; then
14601         case .$NCURSES_BOOL in #(vi
14602         .auto|.) NCURSES_BOOL=unsigned;;
14603         esac
14604         { echo "$as_me:14604: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14605 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14606         cf_cv_type_of_bool=$NCURSES_BOOL
14607 fi
14608
14609 echo "$as_me:14609: checking for special defines needed for etip.h" >&5
14610 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14611 cf_save_CXXFLAGS="$CXXFLAGS"
14612 cf_result="none"
14613 for cf_math in "" MATH_H
14614 do
14615 for cf_excp in "" MATH_EXCEPTION
14616 do
14617         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14618         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14619         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14620 cat >conftest.$ac_ext <<_ACEOF
14621 #line 14621 "configure"
14622 #include "confdefs.h"
14623
14624 #include <etip.h.in>
14625
14626 int
14627 main ()
14628 {
14629
14630   ;
14631   return 0;
14632 }
14633 _ACEOF
14634 rm -f conftest.$ac_objext
14635 if { (eval echo "$as_me:14635: \"$ac_compile\"") >&5
14636   (eval $ac_compile) 2>&5
14637   ac_status=$?
14638   echo "$as_me:14638: \$? = $ac_status" >&5
14639   (exit $ac_status); } &&
14640          { ac_try='test -s conftest.$ac_objext'
14641   { (eval echo "$as_me:14641: \"$ac_try\"") >&5
14642   (eval $ac_try) 2>&5
14643   ac_status=$?
14644   echo "$as_me:14644: \$? = $ac_status" >&5
14645   (exit $ac_status); }; }; then
14646
14647         test -n "$cf_math" && cat >>confdefs.h <<EOF
14648 #define ETIP_NEEDS_${cf_math} 1
14649 EOF
14650
14651         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14652 #define ETIP_NEEDS_${cf_excp} 1
14653 EOF
14654
14655         cf_result="$cf_math $cf_excp"
14656         break
14657
14658 else
14659   echo "$as_me: failed program was:" >&5
14660 cat conftest.$ac_ext >&5
14661 fi
14662 rm -f conftest.$ac_objext conftest.$ac_ext
14663 done
14664 done
14665 echo "$as_me:14665: result: $cf_result" >&5
14666 echo "${ECHO_T}$cf_result" >&6
14667 CXXFLAGS="$cf_save_CXXFLAGS"
14668
14669 if test -n "$CXX"; then
14670 echo "$as_me:14670: checking if $CXX accepts parameter initialization" >&5
14671 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14672 if test "${cf_cv_cpp_param_init+set}" = set; then
14673   echo $ECHO_N "(cached) $ECHO_C" >&6
14674 else
14675
14676         ac_ext=cc
14677 ac_cpp='$CXXCPP $CPPFLAGS'
14678 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14679 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14680 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14681 ac_main_return=return
14682
14683         if test "$cross_compiling" = yes; then
14684   cf_cv_cpp_param_init=unknown
14685 else
14686   cat >conftest.$ac_ext <<_ACEOF
14687 #line 14687 "configure"
14688 #include "confdefs.h"
14689
14690 class TEST {
14691 private:
14692         int value;
14693 public:
14694         TEST(int x = 1);
14695         ~TEST();
14696 };
14697
14698 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14699 {
14700         value = x;
14701 }
14702 void main() { }
14703
14704 _ACEOF
14705 rm -f conftest$ac_exeext
14706 if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
14707   (eval $ac_link) 2>&5
14708   ac_status=$?
14709   echo "$as_me:14709: \$? = $ac_status" >&5
14710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14711   { (eval echo "$as_me:14711: \"$ac_try\"") >&5
14712   (eval $ac_try) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit $ac_status); }; }; then
14716   cf_cv_cpp_param_init=yes
14717 else
14718   echo "$as_me: program exited with status $ac_status" >&5
14719 echo "$as_me: failed program was:" >&5
14720 cat conftest.$ac_ext >&5
14721 cf_cv_cpp_param_init=no
14722 fi
14723 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14724 fi
14725         ac_ext=cc
14726 ac_cpp='$CXXCPP $CPPFLAGS'
14727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14730 ac_main_return=return
14731
14732 fi
14733 echo "$as_me:14733: result: $cf_cv_cpp_param_init" >&5
14734 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14735 fi
14736 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14737 #define CPP_HAS_PARAM_INIT 1
14738 EOF
14739
14740 if test -n "$CXX"; then
14741
14742 echo "$as_me:14742: checking if $CXX accepts static_cast" >&5
14743 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14744 if test "${cf_cv_cpp_static_cast+set}" = set; then
14745   echo $ECHO_N "(cached) $ECHO_C" >&6
14746 else
14747
14748         ac_ext=cc
14749 ac_cpp='$CXXCPP $CPPFLAGS'
14750 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14751 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14752 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14753 ac_main_return=return
14754
14755         cat >conftest.$ac_ext <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758
14759 class NCursesPanel
14760 {
14761 public:
14762   NCursesPanel(int nlines,
14763                int ncols,
14764                int begin_y = 0,
14765                int begin_x = 0)
14766   {
14767   }
14768
14769   ~NCursesPanel();
14770 };
14771
14772 template<class T> class NCursesUserPanel : public NCursesPanel
14773 {
14774 public:
14775   NCursesUserPanel (int nlines,
14776                     int ncols,
14777                     int begin_y = 0,
14778                     int begin_x = 0,
14779                     const T* p_UserData = static_cast<T*>(0))
14780     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14781   {
14782   };
14783   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14784   {
14785   };
14786
14787   virtual ~NCursesUserPanel() {};
14788 };
14789
14790 int
14791 main ()
14792 {
14793
14794         const char* p_UserData = static_cast<char*>(0)
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 rm -f conftest.$ac_objext
14800 if { (eval echo "$as_me:14800: \"$ac_compile\"") >&5
14801   (eval $ac_compile) 2>&5
14802   ac_status=$?
14803   echo "$as_me:14803: \$? = $ac_status" >&5
14804   (exit $ac_status); } &&
14805          { ac_try='test -s conftest.$ac_objext'
14806   { (eval echo "$as_me:14806: \"$ac_try\"") >&5
14807   (eval $ac_try) 2>&5
14808   ac_status=$?
14809   echo "$as_me:14809: \$? = $ac_status" >&5
14810   (exit $ac_status); }; }; then
14811   cf_cv_cpp_static_cast=yes
14812 else
14813   echo "$as_me: failed program was:" >&5
14814 cat conftest.$ac_ext >&5
14815 cf_cv_cpp_static_cast=no
14816 fi
14817 rm -f conftest.$ac_objext conftest.$ac_ext
14818
14819         ac_ext=cc
14820 ac_cpp='$CXXCPP $CPPFLAGS'
14821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14822 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14824 ac_main_return=return
14825
14826 fi
14827 echo "$as_me:14827: result: $cf_cv_cpp_static_cast" >&5
14828 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14829
14830 fi
14831
14832 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14833 #define CPP_HAS_STATIC_CAST 1
14834 EOF
14835
14836         CXX_AR='$(AR)'
14837         CXX_AR_OPTS='$(AR_OPTS)'
14838         case $cf_cv_system_name in #(vi
14839         irix*) #(vi
14840             if test "$GXX" != yes ; then
14841                 CXX_AR='$(CXX)'
14842                 CXX_AR_OPTS='-ar -o'
14843             fi
14844             ;;
14845         sco3.2v5*) #(vi
14846             CXXLDFLAGS="-u main"
14847             ;;
14848         solaris2*)
14849             if test "$GXX" != yes ; then
14850                 CXX_AR='$(CXX)'
14851                 CXX_AR_OPTS='-xar -o'
14852             fi
14853             ;;
14854         esac
14855
14856 else
14857         cf_cxx_library=no
14858         cf_cv_builtin_bool=1
14859
14860         # Just because we are not configuring against C++ right now does not
14861         # mean that a user will not want to use C++.  Some distributors disable
14862         # the C++ portion of this configuration as a shortcut (or just to avoid
14863         # compiling the demo in the c++ directory).  So we need a reasonable
14864         # default for the 'bool' type.
14865         #
14866         # Caveat: since the storage of the bool type is not standardized, it
14867         # may change.
14868
14869         if test "$NCURSES_BOOL" != auto ; then
14870                 cf_cv_type_of_bool=$NCURSES_BOOL
14871                 cf_cv_header_stdbool_h=0
14872         else
14873                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14874
14875 echo "$as_me:14875: checking for size of bool" >&5
14876 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14877 if test "${cf_cv_type_of_bool+set}" = set; then
14878   echo $ECHO_N "(cached) $ECHO_C" >&6
14879 else
14880
14881         rm -f cf_test.out
14882         if test "$cross_compiling" = yes; then
14883   cf_cv_type_of_bool=unknown
14884 else
14885   cat >conftest.$ac_ext <<_ACEOF
14886 #line 14886 "configure"
14887 #include "confdefs.h"
14888
14889 #include <stdlib.h>
14890 #include <stdio.h>
14891
14892 #if defined(__cplusplus)
14893
14894 #ifdef HAVE_GXX_BUILTIN_H
14895 #include <g++/builtin.h>
14896 #elif HAVE_GPP_BUILTIN_H
14897 #include <gpp/builtin.h>
14898 #elif HAVE_BUILTIN_H
14899 #include <builtin.h>
14900 #endif
14901
14902 #else
14903
14904 #if $cf_cv_header_stdbool_h
14905 #include <stdbool.h>
14906 #endif
14907
14908 #endif
14909
14910 main()
14911 {
14912         FILE *fp = fopen("cf_test.out", "w");
14913         if (fp != 0) {
14914                 bool x = true;
14915                 if ((bool)(-x) >= 0)
14916                         fputs("unsigned ", fp);
14917                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14918                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14919                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14920                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14921                 fclose(fp);
14922         }
14923         ${cf_cv_main_return:-return}(0);
14924 }
14925
14926 _ACEOF
14927 rm -f conftest$ac_exeext
14928 if { (eval echo "$as_me:14928: \"$ac_link\"") >&5
14929   (eval $ac_link) 2>&5
14930   ac_status=$?
14931   echo "$as_me:14931: \$? = $ac_status" >&5
14932   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14933   { (eval echo "$as_me:14933: \"$ac_try\"") >&5
14934   (eval $ac_try) 2>&5
14935   ac_status=$?
14936   echo "$as_me:14936: \$? = $ac_status" >&5
14937   (exit $ac_status); }; }; then
14938   cf_cv_type_of_bool=`cat cf_test.out`
14939                  if test -z "$cf_cv_type_of_bool"; then
14940                    cf_cv_type_of_bool=unknown
14941                  fi
14942 else
14943   echo "$as_me: program exited with status $ac_status" >&5
14944 echo "$as_me: failed program was:" >&5
14945 cat conftest.$ac_ext >&5
14946 cf_cv_type_of_bool=unknown
14947 fi
14948 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14949 fi
14950
14951 fi
14952
14953         rm -f cf_test.out
14954 echo "$as_me:14954: result: $cf_cv_type_of_bool" >&5
14955 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14956 if test "$cf_cv_type_of_bool" = unknown ; then
14957         case .$NCURSES_BOOL in #(vi
14958         .auto|.) NCURSES_BOOL=unsigned;;
14959         esac
14960         { echo "$as_me:14960: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14961 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14962         cf_cv_type_of_bool=$NCURSES_BOOL
14963 fi
14964
14965                 else
14966                         echo "$as_me:14966: checking for fallback type of bool" >&5
14967 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14968                         case "$host_cpu" in #(vi
14969                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14970                         *)      cf_cv_type_of_bool=int  ;;
14971                         esac
14972                         echo "$as_me:14972: result: $cf_cv_type_of_bool" >&5
14973 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14974                 fi
14975         fi
14976 fi
14977
14978 # If the C compiler did not declare bool, and we did not determine that the C++
14979 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14980 # ncurses library use the same type as C++ bool.  Note that this allows one to
14981 # specify the type of bool in a configure-script option and postpone
14982 # integration with the C++ compiler provided that the types are compatible.
14983 USE_CXX_BOOL=1
14984 if test $cf_cv_cc_bool_type = 1
14985 then
14986         # oops: C has a bool.  Unlikely, but C++ could differ.
14987         USE_CXX_BOOL=0
14988 elif test $cf_cv_builtin_bool = 0
14989 then
14990         # C++ has no bool
14991         USE_CXX_BOOL=0
14992 else
14993         # this is the normal case
14994         USE_CXX_BOOL='defined(__cplusplus)'
14995 fi
14996
14997 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14998
14999 if test "$cf_with_ada" != "no" ; then
15000     if test "$with_libtool" != "no"; then
15001         { echo "$as_me:15001: WARNING: libtool does not support Ada - disabling feature" >&5
15002 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15003         cf_with_ada=no
15004     fi
15005 fi
15006
15007 if test "$cf_with_ada" != "no" ; then
15008 cf_ada_make=gnatmake
15009 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15010 set dummy $cf_ada_make; ac_word=$2
15011 echo "$as_me:15011: checking for $ac_word" >&5
15012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15013 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15014   echo $ECHO_N "(cached) $ECHO_C" >&6
15015 else
15016   if test -n "$gnat_exists"; then
15017   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15018 else
15019   ac_save_IFS=$IFS; IFS=$ac_path_separator
15020 ac_dummy="$PATH"
15021 for ac_dir in $ac_dummy; do
15022   IFS=$ac_save_IFS
15023   test -z "$ac_dir" && ac_dir=.
15024   $as_executable_p "$ac_dir/$ac_word" || continue
15025 ac_cv_prog_gnat_exists="yes"
15026 echo "$as_me:15026: found $ac_dir/$ac_word" >&5
15027 break
15028 done
15029
15030   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15031 fi
15032 fi
15033 gnat_exists=$ac_cv_prog_gnat_exists
15034 if test -n "$gnat_exists"; then
15035   echo "$as_me:15035: result: $gnat_exists" >&5
15036 echo "${ECHO_T}$gnat_exists" >&6
15037 else
15038   echo "$as_me:15038: result: no" >&5
15039 echo "${ECHO_T}no" >&6
15040 fi
15041
15042 if test "$ac_cv_prog_gnat_exists" = no; then
15043    cf_ada_make=
15044 else
15045
15046 echo "$as_me:15046: checking for gnat version" >&5
15047 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15048 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15049   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15050 echo "$as_me:15050: result: $cf_gnat_version" >&5
15051 echo "${ECHO_T}$cf_gnat_version" >&6
15052
15053 case $cf_gnat_version in
15054   3.1[1-9]*|3.[2-9]*|[4-9].*)
15055     cf_cv_prog_gnat_correct=yes
15056     ;;
15057   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15058      cf_cv_prog_gnat_correct=no
15059      ;;
15060 esac
15061 case $cf_gnat_version in
15062   3.[1-9]*|[4-9].*)
15063       cf_compile_generics=generics
15064       cf_generic_objects="\${GENOBJS}"
15065       ;;
15066   *)  cf_compile_generics=
15067       cf_generic_objects=
15068       ;;
15069 esac
15070
15071    # Extract the first word of "m4", so it can be a program name with args.
15072 set dummy m4; ac_word=$2
15073 echo "$as_me:15073: checking for $ac_word" >&5
15074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15075 if test "${ac_cv_prog_M4_exists+set}" = set; then
15076   echo $ECHO_N "(cached) $ECHO_C" >&6
15077 else
15078   if test -n "$M4_exists"; then
15079   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15080 else
15081   ac_save_IFS=$IFS; IFS=$ac_path_separator
15082 ac_dummy="$PATH"
15083 for ac_dir in $ac_dummy; do
15084   IFS=$ac_save_IFS
15085   test -z "$ac_dir" && ac_dir=.
15086   $as_executable_p "$ac_dir/$ac_word" || continue
15087 ac_cv_prog_M4_exists="yes"
15088 echo "$as_me:15088: found $ac_dir/$ac_word" >&5
15089 break
15090 done
15091
15092   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15093 fi
15094 fi
15095 M4_exists=$ac_cv_prog_M4_exists
15096 if test -n "$M4_exists"; then
15097   echo "$as_me:15097: result: $M4_exists" >&5
15098 echo "${ECHO_T}$M4_exists" >&6
15099 else
15100   echo "$as_me:15100: result: no" >&5
15101 echo "${ECHO_T}no" >&6
15102 fi
15103
15104    if test "$ac_cv_prog_M4_exists" = no; then
15105       cf_cv_prog_gnat_correct=no
15106       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15107    fi
15108    if test "$cf_cv_prog_gnat_correct" = yes; then
15109       echo "$as_me:15109: checking if GNAT works" >&5
15110 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15111
15112 rm -f conftest*
15113 cat >>conftest.ads <<CF_EOF
15114 procedure conftest;
15115 CF_EOF
15116 cat >>conftest.adb <<CF_EOF
15117 with Text_IO;
15118 with GNAT.OS_Lib;
15119 procedure conftest is
15120 begin
15121    Text_IO.Put ("Hello World");
15122    Text_IO.New_Line;
15123    GNAT.OS_Lib.OS_Exit (0);
15124 end conftest;
15125 CF_EOF
15126 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15127    if ( ./conftest 1>&5 2>&1 ) ; then
15128       cf_cv_prog_gnat_correct=yes
15129    else
15130       cf_cv_prog_gnat_correct=no
15131    fi
15132 else
15133    cf_cv_prog_gnat_correct=no
15134 fi
15135 rm -f conftest*
15136
15137       echo "$as_me:15137: result: $cf_cv_prog_gnat_correct" >&5
15138 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15139    fi
15140 fi
15141 if test "$cf_cv_prog_gnat_correct" = yes; then
15142    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15143
15144    echo "$as_me:15144: checking if GNAT pragma Unreferenced works" >&5
15145 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15146
15147 rm -f conftest*
15148 cat >>conftest.ads <<CF_EOF
15149 procedure conftest;
15150 CF_EOF
15151 cat >>conftest.adb <<CF_EOF
15152 with Text_IO;
15153 with GNAT.OS_Lib;
15154 procedure conftest is
15155    test : Integer;
15156    pragma Unreferenced (test);
15157 begin
15158    test := 1;
15159    Text_IO.Put ("Hello World");
15160    Text_IO.New_Line;
15161    GNAT.OS_Lib.OS_Exit (0);
15162 end conftest;
15163 CF_EOF
15164 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15165       cf_cv_pragma_unreferenced=yes
15166 else
15167    cf_cv_pragma_unreferenced=no
15168 fi
15169 rm -f conftest*
15170
15171    echo "$as_me:15171: result: $cf_cv_pragma_unreferenced" >&5
15172 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15173
15174    # if the pragma is supported, use it (needed in the Trace code).
15175    if test $cf_cv_pragma_unreferenced = yes ; then
15176       PRAGMA_UNREF=TRUE
15177    else
15178       PRAGMA_UNREF=FALSE
15179    fi
15180
15181 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15182 if test "${with_ada_compiler+set}" = set; then
15183   withval="$with_ada_compiler"
15184   cf_ada_compiler=$withval
15185 else
15186   cf_ada_compiler=gnatmake
15187 fi;
15188
15189    cf_ada_package=terminal_interface
15190
15191 # Check whether --with-ada-include or --without-ada-include was given.
15192 if test "${with_ada_include+set}" = set; then
15193   withval="$with_ada_include"
15194
15195 else
15196   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15197 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15198
15199 if test "x$prefix" != xNONE; then
15200   cf_path_syntax="$prefix"
15201 else
15202   cf_path_syntax="$ac_default_prefix"
15203 fi
15204
15205 case ".$withval" in #(vi
15206 .\$\(*\)*|.\'*\'*) #(vi
15207   ;;
15208 ..|./*|.\\*) #(vi
15209   ;;
15210 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15211   ;;
15212 .\${*prefix}*) #(vi
15213   eval withval="$withval"
15214   case ".$withval" in #(vi
15215   .NONE/*)
15216     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15217     ;;
15218   esac
15219   ;; #(vi
15220 .no|.NONE/*)
15221   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15222   ;;
15223 *)
15224   { { echo "$as_me:15224: error: expected a pathname, not \"$withval\"" >&5
15225 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15226    { (exit 1); exit 1; }; }
15227   ;;
15228 esac
15229
15230 fi
15231 ADA_INCLUDE="$withval"
15232
15233 # Check whether --with-ada-objects or --without-ada-objects was given.
15234 if test "${with_ada_objects+set}" = set; then
15235   withval="$with_ada_objects"
15236
15237 else
15238   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15239 fi; if test -n "$prefix/lib/ada/adalib" ; then
15240
15241 if test "x$prefix" != xNONE; then
15242   cf_path_syntax="$prefix"
15243 else
15244   cf_path_syntax="$ac_default_prefix"
15245 fi
15246
15247 case ".$withval" in #(vi
15248 .\$\(*\)*|.\'*\'*) #(vi
15249   ;;
15250 ..|./*|.\\*) #(vi
15251   ;;
15252 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15253   ;;
15254 .\${*prefix}*) #(vi
15255   eval withval="$withval"
15256   case ".$withval" in #(vi
15257   .NONE/*)
15258     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15259     ;;
15260   esac
15261   ;; #(vi
15262 .no|.NONE/*)
15263   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15264   ;;
15265 *)
15266   { { echo "$as_me:15266: error: expected a pathname, not \"$withval\"" >&5
15267 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15268    { (exit 1); exit 1; }; }
15269   ;;
15270 esac
15271
15272 fi
15273 ADA_OBJECTS="$withval"
15274
15275 fi
15276 fi
15277 else
15278    cf_with_ada=no
15279 fi
15280
15281 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15282 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15283 ###
15284 ### ticlib modules may be a separate library, otherwise contained in termlib.
15285 ### termlib modules may be a separate library, otherwise contained in ncurses.
15286 ###
15287 ### The of "+" or " " between the tokens controls the way the script
15288 ### chooses to split module lists into libraries.
15289 ###
15290 ### (see CF_LIB_RULES).
15291 echo "$as_me:15291: checking for library subsets" >&5
15292 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15293 LIB_SUBSETS=
15294
15295 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15296         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15297         if test "$with_ticlib" != no ; then
15298                 LIB_SUBSETS="${LIB_SUBSETS} "
15299         else
15300                 LIB_SUBSETS="${LIB_SUBSETS}+"
15301         fi
15302 fi
15303
15304 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15305 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15306 if test "$with_termlib" != no ; then
15307         LIB_SUBSETS="${LIB_SUBSETS} "
15308 else
15309         LIB_SUBSETS="${LIB_SUBSETS}+"
15310 fi
15311
15312 LIB_SUBSETS="${LIB_SUBSETS}base"
15313 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15314 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15315
15316 echo "$as_me:15316: result: $LIB_SUBSETS" >&5
15317 echo "${ECHO_T}$LIB_SUBSETS" >&6
15318
15319 ### Construct the list of include-directories to be generated
15320
15321 CPPFLAGS="-I. -I../include $CPPFLAGS"
15322 if test "$srcdir" != "."; then
15323         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15324 fi
15325 if test "$GCC" != yes; then
15326         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15327 elif test "$includedir" != "/usr/include"; then
15328         if test "$includedir" = '${prefix}/include' ; then
15329                 if test $prefix != /usr ; then
15330                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15331                 fi
15332         else
15333                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15334         fi
15335 fi
15336
15337 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15338 if test "$srcdir" != "."; then
15339         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15340 fi
15341 if test "$GCC" != yes; then
15342         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15343 elif test "$includedir" != "/usr/include"; then
15344         if test "$includedir" = '${prefix}/include' ; then
15345                 if test $prefix != /usr ; then
15346                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15347                 fi
15348         else
15349                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15350         fi
15351 fi
15352
15353 ### Build up pieces for makefile rules
15354 echo "$as_me:15354: checking default library suffix" >&5
15355 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15356
15357         case $DFT_LWR_MODEL in
15358         libtool) DFT_ARG_SUFFIX=''   ;;
15359         normal)  DFT_ARG_SUFFIX=''   ;;
15360         debug)   DFT_ARG_SUFFIX='_g' ;;
15361         profile) DFT_ARG_SUFFIX='_p' ;;
15362         shared)  DFT_ARG_SUFFIX=''   ;;
15363         esac
15364         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15365 echo "$as_me:15365: result: $DFT_ARG_SUFFIX" >&5
15366 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15367
15368 echo "$as_me:15368: checking default library-dependency suffix" >&5
15369 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15370
15371         case $DFT_LWR_MODEL in
15372         libtool) DFT_DEP_SUFFIX='.la'  ;;
15373         normal)  DFT_DEP_SUFFIX='.a'   ;;
15374         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15375         profile) DFT_DEP_SUFFIX='_p.a' ;;
15376         shared)
15377                 case $cf_cv_system_name in
15378                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15379                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15380                 hpux*)
15381                         case $target in
15382                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15383                         *)      DFT_DEP_SUFFIX='.sl' ;;
15384                         esac
15385                         ;;
15386                 *)      DFT_DEP_SUFFIX='.so'  ;;
15387                 esac
15388         esac
15389         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15390 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15391 if test $DFT_LWR_MODEL = shared ; then
15392         case $cf_cv_system_name in #(vi
15393         cygwin*)
15394                 DFT_DEP_SUFFIX=".dll.a"
15395                 DFT_LIB_SUFFIX=".dll"
15396                 ;;
15397         esac
15398 fi
15399 echo "$as_me:15399: result: $DFT_DEP_SUFFIX" >&5
15400 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15401
15402 echo "$as_me:15402: checking default object directory" >&5
15403 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15404
15405         case $DFT_LWR_MODEL in
15406         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15407         normal)  DFT_OBJ_SUBDIR='objects' ;;
15408         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15409         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15410         shared)
15411                 case $cf_cv_system_name in #(vi
15412                 cygwin) #(vi
15413                         DFT_OBJ_SUBDIR='objects' ;;
15414                 *)
15415                         DFT_OBJ_SUBDIR='obj_s' ;;
15416                 esac
15417         esac
15418 echo "$as_me:15418: result: $DFT_OBJ_SUBDIR" >&5
15419 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15420
15421 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15422 if test "$cf_with_cxx" = yes ; then
15423 echo "$as_me:15423: checking c++ library-dependency suffix" >&5
15424 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15425 if test "$with_libtool" != "no"; then
15426         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15427 else
15428
15429         case normal in
15430         libtool) CXX_LIB_SUFFIX='.la'  ;;
15431         normal)  CXX_LIB_SUFFIX='.a'   ;;
15432         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15433         profile) CXX_LIB_SUFFIX='_p.a' ;;
15434         shared)
15435                 case $cf_cv_system_name in
15436                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15437                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15438                 hpux*)
15439                         case $target in
15440                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15441                         *)      CXX_LIB_SUFFIX='.sl' ;;
15442                         esac
15443                         ;;
15444                 *)      CXX_LIB_SUFFIX='.so'  ;;
15445                 esac
15446         esac
15447         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15448 fi
15449 echo "$as_me:15449: result: $CXX_LIB_SUFFIX" >&5
15450 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15451
15452 fi
15453
15454 # do not want -ldl in build except as needed for -lncurses dependency
15455 if test "$with_dlsym" = yes ; then
15456 if test $DFT_LWR_MODEL = shared || \
15457    test $DFT_LWR_MODEL = libtool ; then
15458
15459 # remove dl library from $LIBS
15460 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15461
15462 fi
15463 fi
15464 ### Set up low-level terminfo dependencies for makefiles.
15465
15466 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15467 # do not need libdl
15468 TICS_LIST=
15469 if test "$with_dlsym" = yes ; then
15470
15471 # remove dl library from $SHLIB_LIST
15472 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15473
15474 fi
15475
15476 if test "$with_ticlib" != no ; then
15477
15478         if test "$with_ticlib" != yes ; then
15479                 TICS_NAME=$with_ticlib
15480                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15481                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15482                 TICS_LIB_SUFFIX="${with_ticlib}"
15483         else
15484                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15485                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15486                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15487         fi
15488         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15489 else
15490         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15491 fi
15492
15493 if test "$with_termlib" != no ; then
15494
15495         if test "$with_termlib" != yes ; then
15496                 TINFO_NAME=$with_termlib
15497                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15498                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15499                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15500                 TINFO_LIB_SUFFIX="${with_termlib}"
15501         else
15502                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15503                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15504                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15505                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15506         fi
15507
15508         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15509         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15510         if test "$DFT_LWR_MODEL" = "libtool"; then
15511                 TEST_ARGS="${TEST_DEPS}"
15512                 TEST_ARG2="${TEST_DEP2}"
15513                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15514         else
15515                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15516                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15517                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15518                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15519                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15520         fi
15521 else
15522         # the next lines are needed for linking libtic over libncurses
15523         TINFO_NAME=${LIB_NAME}
15524         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15525         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15526         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15527
15528         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15529 fi
15530
15531 if test "$DFT_LWR_MODEL" = shared ; then
15532         case $cf_cv_system_name in #(vi
15533         cygwin*)
15534                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15535                 TINFO_SUFFIX=.dll
15536                 ;;
15537         esac
15538 fi
15539
15540 if test "$with_dlsym" = yes ; then
15541
15542 # remove dl library from $TICS_LIST
15543 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15544
15545 fi
15546
15547 # needed for Ada95
15548 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15549
15550 case $DFT_LWR_MODEL in
15551 normal|debug|profile)
15552
15553 if test "$GCC" = yes ; then
15554         LDFLAGS_STATIC=-static
15555         LDFLAGS_SHARED=-dynamic
15556 else
15557         case $cf_cv_system_name in #(
15558         aix[45]*)       #( from ld manpage
15559                 LDFLAGS_STATIC=-bstatic
15560                 LDFLAGS_SHARED=-bdynamic
15561                 ;;
15562         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15563                 # We could also use just "archive" and "shared".
15564                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15565                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15566                 ;;
15567         irix*)          #( from ld manpage IRIX64
15568                 LDFLAGS_STATIC=-Bstatic
15569                 LDFLAGS_SHARED=-Bdynamic
15570                 ;;
15571         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15572                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15573                 LDFLAGS_STATIC=-noso
15574                 LDFLAGS_SHARED=-so_archive
15575                 ;;
15576         solaris2*)
15577                 LDFLAGS_STATIC=-Bstatic
15578                 LDFLAGS_SHARED=-Bdynamic
15579                 ;;
15580         esac
15581 fi
15582
15583         ;;
15584 esac
15585
15586 echo "$as_me:15586: checking where we will install curses.h" >&5
15587 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15588 test "$with_overwrite" = no && \
15589 test "x$includedir" = 'x${prefix}/include' && \
15590         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15591 echo "$as_me:15591: result: $includedir" >&5
15592 echo "${ECHO_T}$includedir" >&6
15593
15594 ### Resolve a conflict between normal and wide-curses by forcing applications
15595 ### that will need libutf8 to add it to their configure script.
15596 if test "$with_overwrite" != no ; then
15597 if test "$NCURSES_LIBUTF8" = 1 ; then
15598         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15599         { echo "$as_me:15599: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15600 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15601 fi
15602 fi
15603
15604 # used to separate tack out of the tree
15605 NCURSES_TREE=
15606
15607 ### predefined stuff for the test programs
15608 cat >>confdefs.h <<\EOF
15609 #define HAVE_SLK_COLOR 1
15610 EOF
15611
15612 ### Construct the list of subdirectories for which we'll customize makefiles
15613 ### with the appropriate compile-rules.
15614
15615 echo "$as_me:15615: checking for src modules" >&5
15616 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15617
15618 # dependencies and linker-arguments for test-programs
15619 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15620 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15621 if test "$DFT_LWR_MODEL" = "libtool"; then
15622         TEST_ARGS="${TEST_DEPS}"
15623         TEST_ARG2="${TEST_DEP2}"
15624 else
15625         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15626         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15627 fi
15628
15629 cf_cv_src_modules=
15630 for cf_dir in $modules_to_build
15631 do
15632         if test -f $srcdir/$cf_dir/modules; then
15633
15634                 # We may/may not have tack in the distribution, though the
15635                 # makefile is.
15636                 if test $cf_dir = tack ; then
15637                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15638                                 continue
15639                         fi
15640                 fi
15641
15642                 if test -z "$cf_cv_src_modules"; then
15643                         cf_cv_src_modules=$cf_dir
15644                 else
15645                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15646                 fi
15647
15648                 # Make the ncurses_cfg.h file record the library interface files as
15649                 # well.  These are header files that are the same name as their
15650                 # directory.  Ncurses is the only library that does not follow
15651                 # that pattern.
15652                 if test $cf_dir = tack ; then
15653                         continue
15654                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15655
15656 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15657
15658                         cat >>confdefs.h <<EOF
15659 #define HAVE_${cf_have_include}_H 1
15660 EOF
15661
15662                         cat >>confdefs.h <<EOF
15663 #define HAVE_LIB${cf_have_include} 1
15664 EOF
15665
15666                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15667                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15668                         if test "$DFT_LWR_MODEL" = "libtool"; then
15669                                 TEST_ARGS="${TEST_DEPS}"
15670                                 TEST_ARG2="${TEST_DEP2}"
15671                         else
15672                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15673                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15674                         fi
15675                 fi
15676         fi
15677 done
15678 echo "$as_me:15678: result: $cf_cv_src_modules" >&5
15679 echo "${ECHO_T}$cf_cv_src_modules" >&6
15680
15681 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15682 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15683
15684 SRC_SUBDIRS="man include"
15685 for cf_dir in $cf_cv_src_modules
15686 do
15687         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15688 done
15689 SRC_SUBDIRS="$SRC_SUBDIRS test"
15690 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15691 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15692
15693 ADA_SUBDIRS=
15694 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15695    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15696    ADA_SUBDIRS="gen src samples"
15697 fi
15698
15699 SUB_MAKEFILES=
15700 for cf_dir in $SRC_SUBDIRS
15701 do
15702         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15703 done
15704
15705 if test -n "$ADA_SUBDIRS"; then
15706    for cf_dir in $ADA_SUBDIRS
15707    do
15708       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15709    done
15710
15711 fi
15712
15713 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15714    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15715 fi
15716
15717 DIRS_TO_MAKE="lib"
15718 for cf_item in $cf_list_models
15719 do
15720
15721         case $cf_item in
15722         libtool) cf_subdir='obj_lo'  ;;
15723         normal)  cf_subdir='objects' ;;
15724         debug)   cf_subdir='obj_g' ;;
15725         profile) cf_subdir='obj_p' ;;
15726         shared)
15727                 case $cf_cv_system_name in #(vi
15728                 cygwin) #(vi
15729                         cf_subdir='objects' ;;
15730                 *)
15731                         cf_subdir='obj_s' ;;
15732                 esac
15733         esac
15734
15735         for cf_item2 in $DIRS_TO_MAKE
15736         do
15737                 test $cf_item2 = $cf_subdir && break
15738         done
15739         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15740 done
15741 for cf_dir in $DIRS_TO_MAKE
15742 do
15743         test ! -d $cf_dir && mkdir $cf_dir
15744 done
15745
15746 cat >>confdefs.h <<EOF
15747 #define NCURSES_PATHSEP '$PATHSEP'
15748 EOF
15749
15750 cat >>confdefs.h <<EOF
15751 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15752 EOF
15753
15754 ### Now that we're done running tests, add the compiler-warnings, if any
15755
15756 cf_fix_cppflags=no
15757 cf_new_cflags=
15758 cf_new_cppflags=
15759 cf_new_extra_cppflags=
15760
15761 for cf_add_cflags in $EXTRA_CFLAGS
15762 do
15763 case $cf_fix_cppflags in
15764 no)
15765         case $cf_add_cflags in #(vi
15766         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15767                 case $cf_add_cflags in
15768                 -D*)
15769                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15770
15771                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15772                         && test -z "${cf_tst_cflags}" \
15773                         && cf_fix_cppflags=yes
15774
15775                         if test $cf_fix_cppflags = yes ; then
15776                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15777                                 continue
15778                         elif test "${cf_tst_cflags}" = "\"'" ; then
15779                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15780                                 continue
15781                         fi
15782                         ;;
15783                 esac
15784                 case "$CPPFLAGS" in
15785                 *$cf_add_cflags) #(vi
15786                         ;;
15787                 *) #(vi
15788                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15789                         ;;
15790                 esac
15791                 ;;
15792         *)
15793                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15794                 ;;
15795         esac
15796         ;;
15797 yes)
15798         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15799
15800         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15801
15802         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15803         && test -z "${cf_tst_cflags}" \
15804         && cf_fix_cppflags=no
15805         ;;
15806 esac
15807 done
15808
15809 if test -n "$cf_new_cflags" ; then
15810
15811         CFLAGS="$CFLAGS $cf_new_cflags"
15812 fi
15813
15814 if test -n "$cf_new_cppflags" ; then
15815
15816         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15817 fi
15818
15819 if test -n "$cf_new_extra_cppflags" ; then
15820
15821         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15822 fi
15823
15824 ### If we're building with rpath, try to link non-standard libs that way too.
15825 if test "$DFT_LWR_MODEL" = "shared"; then
15826
15827 echo "$as_me:15827: checking for updated LDFLAGS" >&5
15828 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
15829 if test -n "$LDFLAGS" ; then
15830 echo "$as_me:15830: result: maybe" >&5
15831 echo "${ECHO_T}maybe" >&6
15832 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
15833
15834 echo "${as_me-configure}:15834: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
15835
15836 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15837
15838 echo "${as_me-configure}:15838: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15839
15840 case "$EXTRA_LDFLAGS" in #(vi
15841 -Wl,-rpath,*) #(vi
15842     cf_rpath_hack="-Wl,-rpath,"
15843     ;;
15844 -R\ *)
15845     cf_rpath_hack="-R "
15846     ;;
15847 -R*)
15848     cf_rpath_hack="-R"
15849     ;;
15850 *)
15851     cf_rpath_hack=
15852     ;;
15853 esac
15854 if test -n "$cf_rpath_hack" ; then
15855     cf_rpath_dst=
15856     for cf_rpath_src in $LDFLAGS
15857     do
15858         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
15859
15860 echo "${as_me-configure}:15860: testing Filtering $cf_rpath_src ..." 1>&5
15861
15862         case $cf_rpath_src in #(vi
15863         -L*) #(vi
15864             if test "$cf_rpath_hack" = "-R " ; then
15865                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
15866             else
15867                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
15868             fi
15869             test -n "$verbose" && echo "        ...Filter $cf_rpath_tmp" 1>&6
15870
15871 echo "${as_me-configure}:15871: testing ...Filter $cf_rpath_tmp ..." 1>&5
15872
15873             EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15874             ;;
15875         *)
15876             cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15877             ;;
15878         esac
15879     done
15880     LDFLAGS=$cf_rpath_dst
15881     test -n "$verbose" && echo "        ...checked LDFLAGS $LDFLAGS" 1>&6
15882
15883 echo "${as_me-configure}:15883: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
15884
15885     test -n "$verbose" && echo "        ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15886
15887 echo "${as_me-configure}:15887: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15888
15889 fi
15890 else
15891 echo "$as_me:15891: result: no" >&5
15892 echo "${ECHO_T}no" >&6
15893 fi
15894
15895 fi
15896
15897 ### Define substitutions for header files to avoid name-pollution
15898
15899 if test "$cf_cv_have_tcgetattr" = yes ; then
15900         HAVE_TCGETATTR=1
15901 else
15902         HAVE_TCGETATTR=0
15903 fi
15904
15905 if test "$ac_cv_header_termio_h" = yes ; then
15906         HAVE_TERMIO_H=1
15907 else
15908         HAVE_TERMIO_H=0
15909 fi
15910
15911 if test "$ac_cv_header_termios_h" = yes ; then
15912         HAVE_TERMIOS_H=1
15913 else
15914         HAVE_TERMIOS_H=0
15915 fi
15916
15917 ################################################################################
15918 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15919 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15920 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"
15921 ac_config_commands="$ac_config_commands default"
15922 cat >confcache <<\_ACEOF
15923 # This file is a shell script that caches the results of configure
15924 # tests run on this system so they can be shared between configure
15925 # scripts and configure runs, see configure's option --config-cache.
15926 # It is not useful on other systems.  If it contains results you don't
15927 # want to keep, you may remove or edit it.
15928 #
15929 # config.status only pays attention to the cache file if you give it
15930 # the --recheck option to rerun configure.
15931 #
15932 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15933 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15934 # following values.
15935
15936 _ACEOF
15937
15938 # The following way of writing the cache mishandles newlines in values,
15939 # but we know of no workaround that is simple, portable, and efficient.
15940 # So, don't put newlines in cache variables' values.
15941 # Ultrix sh set writes to stderr and can't be redirected directly,
15942 # and sets the high bit in the cache file unless we assign to the vars.
15943 {
15944   (set) 2>&1 |
15945     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15946     *ac_space=\ *)
15947       # `set' does not quote correctly, so add quotes (double-quote
15948       # substitution turns \\\\ into \\, and sed turns \\ into \).
15949       sed -n \
15950         "s/'/'\\\\''/g;
15951           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15952       ;;
15953     *)
15954       # `set' quotes correctly as required by POSIX, so do not add quotes.
15955       sed -n \
15956         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15957       ;;
15958     esac;
15959 } |
15960   sed '
15961      t clear
15962      : clear
15963      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15964      t end
15965      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15966      : end' >>confcache
15967 if cmp -s $cache_file confcache; then :; else
15968   if test -w $cache_file; then
15969     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15970     cat confcache >$cache_file
15971   else
15972     echo "not updating unwritable cache $cache_file"
15973   fi
15974 fi
15975 rm -f confcache
15976
15977 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15978 # Let make expand exec_prefix.
15979 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15980
15981 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15982 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15983 # trailing colons and then remove the whole line if VPATH becomes empty
15984 # (actually we leave an empty line to preserve line numbers).
15985 if test "x$srcdir" = x.; then
15986   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15987 s/:*\$(srcdir):*/:/;
15988 s/:*\${srcdir}:*/:/;
15989 s/:*@srcdir@:*/:/;
15990 s/^\([^=]*=[    ]*\):*/\1/;
15991 s/:*$//;
15992 s/^[^=]*=[      ]*$//;
15993 }'
15994 fi
15995
15996 DEFS=-DHAVE_CONFIG_H
15997
15998 : ${CONFIG_STATUS=./config.status}
15999 ac_clean_files_save=$ac_clean_files
16000 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16001 { echo "$as_me:16001: creating $CONFIG_STATUS" >&5
16002 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16003 cat >$CONFIG_STATUS <<_ACEOF
16004 #! $SHELL
16005 # Generated automatically by configure.
16006 # Run this file to recreate the current configuration.
16007 # Compiler output produced by configure, useful for debugging
16008 # configure, is in config.log if it exists.
16009
16010 debug=false
16011 SHELL=\${CONFIG_SHELL-$SHELL}
16012 ac_cs_invocation="\$0 \$@"
16013
16014 _ACEOF
16015
16016 cat >>$CONFIG_STATUS <<\_ACEOF
16017 # Be Bourne compatible
16018 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16019   emulate sh
16020   NULLCMD=:
16021 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16022   set -o posix
16023 fi
16024
16025 # Name of the executable.
16026 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16027
16028 if expr a : '\(a\)' >/dev/null 2>&1; then
16029   as_expr=expr
16030 else
16031   as_expr=false
16032 fi
16033
16034 rm -f conf$$ conf$$.exe conf$$.file
16035 echo >conf$$.file
16036 if ln -s conf$$.file conf$$ 2>/dev/null; then
16037   # We could just check for DJGPP; but this test a) works b) is more generic
16038   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16039   if test -f conf$$.exe; then
16040     # Don't use ln at all; we don't have any links
16041     as_ln_s='cp -p'
16042   else
16043     as_ln_s='ln -s'
16044   fi
16045 elif ln conf$$.file conf$$ 2>/dev/null; then
16046   as_ln_s=ln
16047 else
16048   as_ln_s='cp -p'
16049 fi
16050 rm -f conf$$ conf$$.exe conf$$.file
16051
16052 as_executable_p="test -f"
16053
16054 # Support unset when possible.
16055 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16056   as_unset=unset
16057 else
16058   as_unset=false
16059 fi
16060
16061 # NLS nuisances.
16062 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16063 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16064 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16065 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16066 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16067 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16068 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16069 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16070
16071 # IFS
16072 # We need space, tab and new line, in precisely that order.
16073 as_nl='
16074 '
16075 IFS="   $as_nl"
16076
16077 # CDPATH.
16078 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16079
16080 exec 6>&1
16081
16082 _ACEOF
16083
16084 # Files that config.status was made for.
16085 if test -n "$ac_config_files"; then
16086   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16087 fi
16088
16089 if test -n "$ac_config_headers"; then
16090   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16091 fi
16092
16093 if test -n "$ac_config_links"; then
16094   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16095 fi
16096
16097 if test -n "$ac_config_commands"; then
16098   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16099 fi
16100
16101 cat >>$CONFIG_STATUS <<\EOF
16102
16103 ac_cs_usage="\
16104 \`$as_me' instantiates files from templates according to the
16105 current configuration.
16106
16107 Usage: $0 [OPTIONS] [FILE]...
16108
16109   -h, --help       print this help, then exit
16110   -V, --version    print version number, then exit
16111   -d, --debug      don't remove temporary files
16112       --recheck    update $as_me by reconfiguring in the same conditions
16113   --file=FILE[:TEMPLATE]
16114                    instantiate the configuration file FILE
16115   --header=FILE[:TEMPLATE]
16116                    instantiate the configuration header FILE
16117
16118 Configuration files:
16119 $config_files
16120
16121 Configuration headers:
16122 $config_headers
16123
16124 Configuration commands:
16125 $config_commands
16126
16127 Report bugs to <bug-autoconf@gnu.org>."
16128 EOF
16129
16130 cat >>$CONFIG_STATUS <<EOF
16131 ac_cs_version="\\
16132 config.status
16133 configured by $0, generated by GNU Autoconf 2.52.20061216,
16134   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16135
16136 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16137 Free Software Foundation, Inc.
16138 This config.status script is free software; the Free Software Foundation
16139 gives unlimited permission to copy, distribute and modify it."
16140 srcdir=$srcdir
16141 INSTALL="$INSTALL"
16142 EOF
16143
16144 cat >>$CONFIG_STATUS <<\EOF
16145 # If no file are specified by the user, then we need to provide default
16146 # value.  By we need to know if files were specified by the user.
16147 ac_need_defaults=:
16148 while test $# != 0
16149 do
16150   case $1 in
16151   --*=*)
16152     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16153     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16154     shift
16155     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16156     shift
16157     ;;
16158   -*);;
16159   *) # This is not an option, so the user has probably given explicit
16160      # arguments.
16161      ac_need_defaults=false;;
16162   esac
16163
16164   case $1 in
16165   # Handling of the options.
16166 EOF
16167 cat >>$CONFIG_STATUS <<EOF
16168   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16169     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16170     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16171 EOF
16172 cat >>$CONFIG_STATUS <<\EOF
16173   --version | --vers* | -V )
16174     echo "$ac_cs_version"; exit 0 ;;
16175   --he | --h)
16176     # Conflict between --help and --header
16177     { { echo "$as_me:16177: error: ambiguous option: $1
16178 Try \`$0 --help' for more information." >&5
16179 echo "$as_me: error: ambiguous option: $1
16180 Try \`$0 --help' for more information." >&2;}
16181    { (exit 1); exit 1; }; };;
16182   --help | --hel | -h )
16183     echo "$ac_cs_usage"; exit 0 ;;
16184   --debug | --d* | -d )
16185     debug=: ;;
16186   --file | --fil | --fi | --f )
16187     shift
16188     CONFIG_FILES="$CONFIG_FILES $1"
16189     ac_need_defaults=false;;
16190   --header | --heade | --head | --hea )
16191     shift
16192     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16193     ac_need_defaults=false;;
16194
16195   # This is an error.
16196   -*) { { echo "$as_me:16196: error: unrecognized option: $1
16197 Try \`$0 --help' for more information." >&5
16198 echo "$as_me: error: unrecognized option: $1
16199 Try \`$0 --help' for more information." >&2;}
16200    { (exit 1); exit 1; }; } ;;
16201
16202   *) ac_config_targets="$ac_config_targets $1" ;;
16203
16204   esac
16205   shift
16206 done
16207
16208 exec 5>>config.log
16209 cat >&5 << _ACEOF
16210
16211 ## ----------------------- ##
16212 ## Running config.status.  ##
16213 ## ----------------------- ##
16214
16215 This file was extended by $as_me 2.52.20061216, executed with
16216   CONFIG_FILES    = $CONFIG_FILES
16217   CONFIG_HEADERS  = $CONFIG_HEADERS
16218   CONFIG_LINKS    = $CONFIG_LINKS
16219   CONFIG_COMMANDS = $CONFIG_COMMANDS
16220   > $ac_cs_invocation
16221 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16222
16223 _ACEOF
16224 EOF
16225
16226 cat >>$CONFIG_STATUS <<EOF
16227 #
16228 # INIT-COMMANDS section.
16229 #
16230
16231 ### Special initialization commands, used to pass information from the
16232 ### configuration-run into config.status
16233
16234 AWK="$AWK"
16235 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16236 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16237 ECHO_LINK="$ECHO_LINK"
16238 LDCONFIG="$LDCONFIG"
16239 LIB_NAME="$LIB_NAME"
16240 LIB_SUBSETS="$LIB_SUBSETS"
16241 LIB_SUFFIX="$LIB_SUFFIX"
16242 LIB_TRACING="$LIB_TRACING"
16243 MAKE_TERMINFO="$MAKE_TERMINFO"
16244 NCURSES_MAJOR="$NCURSES_MAJOR"
16245 NCURSES_MINOR="$NCURSES_MINOR"
16246 NCURSES_OSPEED="$NCURSES_OSPEED"
16247 NCURSES_PATCH="$NCURSES_PATCH"
16248 SRC_SUBDIRS="$SRC_SUBDIRS"
16249 TERMINFO="$TERMINFO"
16250 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16251 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16252 TINFO_NAME="$TINFO_NAME"
16253 TINFO_SUFFIX="$TINFO_SUFFIX"
16254 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16255 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16256 TICS_NAME="$TICS_NAME"
16257 WITH_CURSES_H="$with_curses_h"
16258 WITH_ECHO="$with_echo"
16259 WITH_OVERWRITE="$with_overwrite"
16260 cf_LIST_MODELS="$cf_list_models"
16261 cf_cv_abi_version="$cf_cv_abi_version"
16262 cf_cv_do_relink="$cf_cv_do_relink"
16263 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16264 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16265 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16266 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16267 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16268 cf_cv_rel_version="$cf_cv_rel_version"
16269 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16270 cf_cv_shlib_version="$cf_cv_shlib_version"
16271 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16272 cf_cv_system_name="$cf_cv_system_name"
16273 cf_with_cxx_binding="$cf_with_cxx_binding"
16274 host="$host"
16275 target="$target"
16276
16277 EOF
16278
16279 cat >>$CONFIG_STATUS <<\EOF
16280 for ac_config_target in $ac_config_targets
16281 do
16282   case "$ac_config_target" in
16283   # Handling of arguments.
16284   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16285   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16286   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16287   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16288   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16289   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16290   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16291   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16292   *) { { echo "$as_me:16292: error: invalid argument: $ac_config_target" >&5
16293 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16294    { (exit 1); exit 1; }; };;
16295   esac
16296 done
16297
16298 # If the user did not use the arguments to specify the items to instantiate,
16299 # then the envvar interface is used.  Set only those that are not.
16300 # We use the long form for the default assignment because of an extremely
16301 # bizarre bug on SunOS 4.1.3.
16302 if $ac_need_defaults; then
16303   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16304   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16305   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16306 fi
16307
16308 # Create a temporary directory, and hook for its removal unless debugging.
16309 $debug ||
16310 {
16311   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16312   trap '{ (exit 1); exit 1; }' 1 2 13 15
16313 }
16314
16315 # Create a (secure) tmp directory for tmp files.
16316 : ${TMPDIR=/tmp}
16317 {
16318   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16319   test -n "$tmp" && test -d "$tmp"
16320 }  ||
16321 {
16322   tmp=$TMPDIR/cs$$-$RANDOM
16323   (umask 077 && mkdir $tmp)
16324 } ||
16325 {
16326    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16327    { (exit 1); exit 1; }
16328 }
16329
16330 EOF
16331
16332 cat >>$CONFIG_STATUS <<EOF
16333
16334 #
16335 # CONFIG_FILES section.
16336 #
16337
16338 # No need to generate the scripts if there are no CONFIG_FILES.
16339 # This happens for instance when ./config.status config.h
16340 if test -n "\$CONFIG_FILES"; then
16341   # Protect against being on the right side of a sed subst in config.status.
16342   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16343    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16344 s,@SHELL@,$SHELL,;t t
16345 s,@exec_prefix@,$exec_prefix,;t t
16346 s,@prefix@,$prefix,;t t
16347 s,@program_transform_name@,$program_transform_name,;t t
16348 s,@bindir@,$bindir,;t t
16349 s,@sbindir@,$sbindir,;t t
16350 s,@libexecdir@,$libexecdir,;t t
16351 s,@datadir@,$datadir,;t t
16352 s,@sysconfdir@,$sysconfdir,;t t
16353 s,@sharedstatedir@,$sharedstatedir,;t t
16354 s,@localstatedir@,$localstatedir,;t t
16355 s,@libdir@,$libdir,;t t
16356 s,@includedir@,$includedir,;t t
16357 s,@oldincludedir@,$oldincludedir,;t t
16358 s,@infodir@,$infodir,;t t
16359 s,@mandir@,$mandir,;t t
16360 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16361 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16362 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16363 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16364 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16365 s,@build_alias@,$build_alias,;t t
16366 s,@host_alias@,$host_alias,;t t
16367 s,@target_alias@,$target_alias,;t t
16368 s,@ECHO_C@,$ECHO_C,;t t
16369 s,@ECHO_N@,$ECHO_N,;t t
16370 s,@ECHO_T@,$ECHO_T,;t t
16371 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16372 s,@DEFS@,$DEFS,;t t
16373 s,@LIBS@,$LIBS,;t t
16374 s,@top_builddir@,$top_builddir,;t t
16375 s,@EGREP@,$EGREP,;t t
16376 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16377 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16378 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16379 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16380 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16381 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16382 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16383 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16384 s,@build@,$build,;t t
16385 s,@build_cpu@,$build_cpu,;t t
16386 s,@build_vendor@,$build_vendor,;t t
16387 s,@build_os@,$build_os,;t t
16388 s,@host@,$host,;t t
16389 s,@host_cpu@,$host_cpu,;t t
16390 s,@host_vendor@,$host_vendor,;t t
16391 s,@host_os@,$host_os,;t t
16392 s,@target@,$target,;t t
16393 s,@target_cpu@,$target_cpu,;t t
16394 s,@target_vendor@,$target_vendor,;t t
16395 s,@target_os@,$target_os,;t t
16396 s,@CC@,$CC,;t t
16397 s,@CFLAGS@,$CFLAGS,;t t
16398 s,@LDFLAGS@,$LDFLAGS,;t t
16399 s,@CPPFLAGS@,$CPPFLAGS,;t t
16400 s,@ac_ct_CC@,$ac_ct_CC,;t t
16401 s,@EXEEXT@,$EXEEXT,;t t
16402 s,@OBJEXT@,$OBJEXT,;t t
16403 s,@CPP@,$CPP,;t t
16404 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16405 s,@PROG_EXT@,$PROG_EXT,;t t
16406 s,@LDCONFIG@,$LDCONFIG,;t t
16407 s,@CXX@,$CXX,;t t
16408 s,@CXXFLAGS@,$CXXFLAGS,;t t
16409 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16410 s,@AWK@,$AWK,;t t
16411 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16412 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16413 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16414 s,@LINT@,$LINT,;t t
16415 s,@LINT_OPTS@,$LINT_OPTS,;t t
16416 s,@LN_S@,$LN_S,;t t
16417 s,@SET_MAKE@,$SET_MAKE,;t t
16418 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16419 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16420 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16421 s,@RANLIB@,$RANLIB,;t t
16422 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16423 s,@LD@,$LD,;t t
16424 s,@ac_ct_LD@,$ac_ct_LD,;t t
16425 s,@AR@,$AR,;t t
16426 s,@ac_ct_AR@,$ac_ct_AR,;t t
16427 s,@AR_OPTS@,$AR_OPTS,;t t
16428 s,@DESTDIR@,$DESTDIR,;t t
16429 s,@BUILD_CC@,$BUILD_CC,;t t
16430 s,@BUILD_CPP@,$BUILD_CPP,;t t
16431 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16432 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16433 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16434 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16435 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16436 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16437 s,@cf_list_models@,$cf_list_models,;t t
16438 s,@LIBTOOL@,$LIBTOOL,;t t
16439 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16440 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16441 s,@LIB_CREATE@,$LIB_CREATE,;t t
16442 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16443 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16444 s,@LIB_PREP@,$LIB_PREP,;t t
16445 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16446 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16447 s,@LIB_LINK@,$LIB_LINK,;t t
16448 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16449 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16450 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16451 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16452 s,@TICS_NAME@,$TICS_NAME,;t t
16453 s,@TINFO_NAME@,$TINFO_NAME,;t t
16454 s,@LIB_NAME@,$LIB_NAME,;t t
16455 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16456 s,@CC_G_OPT@,$CC_G_OPT,;t t
16457 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16458 s,@LD_MODEL@,$LD_MODEL,;t t
16459 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16460 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16461 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16462 s,@LINK_PROGS@,$LINK_PROGS,;t t
16463 s,@LINK_TESTS@,$LINK_TESTS,;t t
16464 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16465 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16466 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16467 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16468 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16469 s,@PATHSEP@,$PATHSEP,;t t
16470 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16471 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16472 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16473 s,@TERMINFO@,$TERMINFO,;t t
16474 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16475 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16476 s,@TERMPATH@,$TERMPATH,;t t
16477 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16478 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16479 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16480 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16481 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16482 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16483 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16484 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16485 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16486 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16487 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16488 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16489 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16490 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16491 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16492 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16493 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16494 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16495 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16496 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16497 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16498 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16499 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16500 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16501 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16502 s,@ECHO_LINK@,$ECHO_LINK,;t t
16503 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16504 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16505 s,@ADA_TRACE@,$ADA_TRACE,;t t
16506 s,@MATH_LIB@,$MATH_LIB,;t t
16507 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16508 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16509 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16510 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16511 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16512 s,@CXXCPP@,$CXXCPP,;t t
16513 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16514 s,@CXX_AR@,$CXX_AR,;t t
16515 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16516 s,@CXXLIBS@,$CXXLIBS,;t t
16517 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16518 s,@gnat_exists@,$gnat_exists,;t t
16519 s,@M4_exists@,$M4_exists,;t t
16520 s,@cf_ada_make@,$cf_ada_make,;t t
16521 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16522 s,@cf_ada_package@,$cf_ada_package,;t t
16523 s,@ADAFLAGS@,$ADAFLAGS,;t t
16524 s,@cf_compile_generics@,$cf_compile_generics,;t t
16525 s,@cf_generic_objects@,$cf_generic_objects,;t t
16526 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16527 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16528 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16529 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16530 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16531 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16532 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16533 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16534 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16535 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16536 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16537 s,@TICS_ARGS@,$TICS_ARGS,;t t
16538 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16539 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16540 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16541 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16542 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16543 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16544 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16545 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16546 s,@TICS_LIST@,$TICS_LIST,;t t
16547 s,@TINFO_LIST@,$TINFO_LIST,;t t
16548 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16549 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16550 s,@TEST_ARGS@,$TEST_ARGS,;t t
16551 s,@TEST_DEPS@,$TEST_DEPS,;t t
16552 s,@TEST_ARG2@,$TEST_ARG2,;t t
16553 s,@TEST_DEP2@,$TEST_DEP2,;t t
16554 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16555 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16556 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16557 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16558 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16559 CEOF
16560
16561 EOF
16562
16563   cat >>$CONFIG_STATUS <<\EOF
16564   # Split the substitutions into bite-sized pieces for seds with
16565   # small command number limits, like on Digital OSF/1 and HP-UX.
16566   ac_max_sed_lines=48
16567   ac_sed_frag=1 # Number of current file.
16568   ac_beg=1 # First line for current file.
16569   ac_end=$ac_max_sed_lines # Line after last line for current file.
16570   ac_more_lines=:
16571   ac_sed_cmds=
16572   while $ac_more_lines; do
16573     if test $ac_beg -gt 1; then
16574       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16575     else
16576       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16577     fi
16578     if test ! -s $tmp/subs.frag; then
16579       ac_more_lines=false
16580     else
16581       # The purpose of the label and of the branching condition is to
16582       # speed up the sed processing (if there are no `@' at all, there
16583       # is no need to browse any of the substitutions).
16584       # These are the two extra sed commands mentioned above.
16585       (echo ':t
16586   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16587       if test -z "$ac_sed_cmds"; then
16588         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16589       else
16590         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16591       fi
16592       ac_sed_frag=`expr $ac_sed_frag + 1`
16593       ac_beg=$ac_end
16594       ac_end=`expr $ac_end + $ac_max_sed_lines`
16595     fi
16596   done
16597   if test -z "$ac_sed_cmds"; then
16598     ac_sed_cmds=cat
16599   fi
16600 fi # test -n "$CONFIG_FILES"
16601
16602 EOF
16603 cat >>$CONFIG_STATUS <<\EOF
16604 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16605   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16606   case $ac_file in
16607   - | *:- | *:-:* ) # input from stdin
16608         cat >$tmp/stdin
16609         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16610         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16611   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16612         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16613   * )   ac_file_in=$ac_file.in ;;
16614   esac
16615
16616   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16617   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16618          X"$ac_file" : 'X\(//\)[^/]' \| \
16619          X"$ac_file" : 'X\(//\)$' \| \
16620          X"$ac_file" : 'X\(/\)' \| \
16621          .     : '\(.\)' 2>/dev/null ||
16622 echo X"$ac_file" |
16623     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16624           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16625           /^X\(\/\/\)$/{ s//\1/; q; }
16626           /^X\(\/\).*/{ s//\1/; q; }
16627           s/.*/./; q'`
16628   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16629     { case "$ac_dir" in
16630   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16631   *)                      as_incr_dir=.;;
16632 esac
16633 as_dummy="$ac_dir"
16634 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16635   case $as_mkdir_dir in
16636     # Skip DOS drivespec
16637     ?:) as_incr_dir=$as_mkdir_dir ;;
16638     *)
16639       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16640       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16641     ;;
16642   esac
16643 done; }
16644
16645     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16646     # A "../" for each directory in $ac_dir_suffix.
16647     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16648   else
16649     ac_dir_suffix= ac_dots=
16650   fi
16651
16652   case $srcdir in
16653   .)  ac_srcdir=.
16654       if test -z "$ac_dots"; then
16655          ac_top_srcdir=.
16656       else
16657          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16658       fi ;;
16659   [\\/]* | ?:[\\/]* )
16660       ac_srcdir=$srcdir$ac_dir_suffix;
16661       ac_top_srcdir=$srcdir ;;
16662   *) # Relative path.
16663     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16664     ac_top_srcdir=$ac_dots$srcdir ;;
16665   esac
16666
16667   case $INSTALL in
16668   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16669   *) ac_INSTALL=$ac_dots$INSTALL ;;
16670   esac
16671
16672   if test x"$ac_file" != x-; then
16673     { echo "$as_me:16673: creating $ac_file" >&5
16674 echo "$as_me: creating $ac_file" >&6;}
16675     rm -f "$ac_file"
16676   fi
16677   # Let's still pretend it is `configure' which instantiates (i.e., don't
16678   # use $as_me), people would be surprised to read:
16679   #    /* config.h.  Generated automatically by config.status.  */
16680   configure_input="Generated automatically from `echo $ac_file_in |
16681                                                  sed 's,.*/,,'` by configure."
16682
16683   # First look for the input files in the build tree, otherwise in the
16684   # src tree.
16685   ac_file_inputs=`IFS=:
16686     for f in $ac_file_in; do
16687       case $f in
16688       -) echo $tmp/stdin ;;
16689       [\\/$]*)
16690          # Absolute (can't be DOS-style, as IFS=:)
16691          test -f "$f" || { { echo "$as_me:16691: error: cannot find input file: $f" >&5
16692 echo "$as_me: error: cannot find input file: $f" >&2;}
16693    { (exit 1); exit 1; }; }
16694          echo $f;;
16695       *) # Relative
16696          if test -f "$f"; then
16697            # Build tree
16698            echo $f
16699          elif test -f "$srcdir/$f"; then
16700            # Source tree
16701            echo $srcdir/$f
16702          else
16703            # /dev/null tree
16704            { { echo "$as_me:16704: error: cannot find input file: $f" >&5
16705 echo "$as_me: error: cannot find input file: $f" >&2;}
16706    { (exit 1); exit 1; }; }
16707          fi;;
16708       esac
16709     done` || { (exit 1); exit 1; }
16710 EOF
16711 cat >>$CONFIG_STATUS <<EOF
16712   sed "$ac_vpsub
16713 $extrasub
16714 EOF
16715 cat >>$CONFIG_STATUS <<\EOF
16716 :t
16717 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16718 s,@configure_input@,$configure_input,;t t
16719 s,@srcdir@,$ac_srcdir,;t t
16720 s,@top_srcdir@,$ac_top_srcdir,;t t
16721 s,@INSTALL@,$ac_INSTALL,;t t
16722 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16723   rm -f $tmp/stdin
16724   if test x"$ac_file" != x-; then
16725     mv $tmp/out $ac_file
16726   else
16727     cat $tmp/out
16728     rm -f $tmp/out
16729   fi
16730
16731 done
16732 EOF
16733 cat >>$CONFIG_STATUS <<\EOF
16734
16735 #
16736 # CONFIG_HEADER section.
16737 #
16738
16739 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16740 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16741 #
16742 # ac_d sets the value in "#define NAME VALUE" lines.
16743 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16744 ac_dB='[        ].*$,\1#\2'
16745 ac_dC=' '
16746 ac_dD=',;t'
16747 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16748 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16749 ac_iB='\([      ]\),\1#\2define\3'
16750 ac_iC=' '
16751 ac_iD='\4,;t'
16752 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16753 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16754 ac_uB='$,\1#\2define\3'
16755 ac_uC=' '
16756 ac_uD=',;t'
16757
16758 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16759   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16760   case $ac_file in
16761   - | *:- | *:-:* ) # input from stdin
16762         cat >$tmp/stdin
16763         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16764         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16765   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16766         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16767   * )   ac_file_in=$ac_file.in ;;
16768   esac
16769
16770   test x"$ac_file" != x- && { echo "$as_me:16770: creating $ac_file" >&5
16771 echo "$as_me: creating $ac_file" >&6;}
16772
16773   # First look for the input files in the build tree, otherwise in the
16774   # src tree.
16775   ac_file_inputs=`IFS=:
16776     for f in $ac_file_in; do
16777       case $f in
16778       -) echo $tmp/stdin ;;
16779       [\\/$]*)
16780          # Absolute (can't be DOS-style, as IFS=:)
16781          test -f "$f" || { { echo "$as_me:16781: error: cannot find input file: $f" >&5
16782 echo "$as_me: error: cannot find input file: $f" >&2;}
16783    { (exit 1); exit 1; }; }
16784          echo $f;;
16785       *) # Relative
16786          if test -f "$f"; then
16787            # Build tree
16788            echo $f
16789          elif test -f "$srcdir/$f"; then
16790            # Source tree
16791            echo $srcdir/$f
16792          else
16793            # /dev/null tree
16794            { { echo "$as_me:16794: error: cannot find input file: $f" >&5
16795 echo "$as_me: error: cannot find input file: $f" >&2;}
16796    { (exit 1); exit 1; }; }
16797          fi;;
16798       esac
16799     done` || { (exit 1); exit 1; }
16800   # Remove the trailing spaces.
16801   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16802
16803 EOF
16804
16805 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16806 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16807 # be either 'cat' or 'sort'.
16808 cat confdefs.h | uniq >conftest.vals
16809
16810 # Break up conftest.vals because some shells have a limit on
16811 # the size of here documents, and old seds have small limits too.
16812
16813 rm -f conftest.tail
16814 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16815 while grep . conftest.vals >/dev/null
16816 do
16817   # Write chunks of a limited-size here document to conftest.frag.
16818   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16819   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16820   echo 'CEOF' >> $CONFIG_STATUS
16821   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16822   rm -f conftest.vals
16823   mv conftest.tail conftest.vals
16824 done
16825 rm -f conftest.vals
16826
16827 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16828 # marker @DEFS@.
16829 echo '  cat >> conftest.edit <<CEOF
16830 /@DEFS@/r conftest.frag
16831 /@DEFS@/d
16832 CEOF
16833 sed -f conftest.edit $tmp/in > $tmp/out
16834 rm -f $tmp/in
16835 mv $tmp/out $tmp/in
16836 rm -f conftest.edit conftest.frag
16837 ' >> $CONFIG_STATUS
16838
16839 cat >>$CONFIG_STATUS <<\EOF
16840   # Let's still pretend it is `configure' which instantiates (i.e., don't
16841   # use $as_me), people would be surprised to read:
16842   #    /* config.h.  Generated automatically by config.status.  */
16843   if test x"$ac_file" = x-; then
16844     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16845   else
16846     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16847   fi
16848   cat $tmp/in >>$tmp/config.h
16849   rm -f $tmp/in
16850   if test x"$ac_file" != x-; then
16851     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16852       { echo "$as_me:16852: $ac_file is unchanged" >&5
16853 echo "$as_me: $ac_file is unchanged" >&6;}
16854     else
16855       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16856          X"$ac_file" : 'X\(//\)[^/]' \| \
16857          X"$ac_file" : 'X\(//\)$' \| \
16858          X"$ac_file" : 'X\(/\)' \| \
16859          .     : '\(.\)' 2>/dev/null ||
16860 echo X"$ac_file" |
16861     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16862           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16863           /^X\(\/\/\)$/{ s//\1/; q; }
16864           /^X\(\/\).*/{ s//\1/; q; }
16865           s/.*/./; q'`
16866       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16867         { case "$ac_dir" in
16868   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16869   *)                      as_incr_dir=.;;
16870 esac
16871 as_dummy="$ac_dir"
16872 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16873   case $as_mkdir_dir in
16874     # Skip DOS drivespec
16875     ?:) as_incr_dir=$as_mkdir_dir ;;
16876     *)
16877       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16878       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16879     ;;
16880   esac
16881 done; }
16882
16883       fi
16884       rm -f $ac_file
16885       mv $tmp/config.h $ac_file
16886     fi
16887   else
16888     cat $tmp/config.h
16889     rm -f $tmp/config.h
16890   fi
16891 done
16892 EOF
16893 cat >>$CONFIG_STATUS <<\EOF
16894
16895 #
16896 # CONFIG_COMMANDS section.
16897 #
16898 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16899   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16900   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16901
16902   case $ac_dest in
16903     default )
16904
16905 for cf_dir in test
16906 do
16907         if test ! -d $srcdir/$cf_dir; then
16908                 continue
16909         elif test -f $srcdir/$cf_dir/programs; then
16910                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16911         fi
16912 done
16913
16914         case $cf_cv_system_name in
16915         OS/2*)  LIB_PREFIX=''     ;;
16916         os2*)   LIB_PREFIX=''     ;;
16917         *)      LIB_PREFIX='lib'  ;;
16918         esac
16919 cf_prefix=$LIB_PREFIX
16920
16921 for cf_dir in $SRC_SUBDIRS
16922 do
16923         if test ! -d $srcdir/$cf_dir ; then
16924                 continue
16925         elif test -f $srcdir/$cf_dir/modules; then
16926
16927                 SHARED_LIB=
16928                 LIBS_TO_MAKE=
16929                 for cf_item in $cf_LIST_MODELS
16930                 do
16931
16932         case $cf_item in
16933         libtool) cf_suffix='.la'  ;;
16934         normal)  cf_suffix='.a'   ;;
16935         debug)   cf_suffix='_g.a' ;;
16936         profile) cf_suffix='_p.a' ;;
16937         shared)
16938                 case $cf_cv_system_name in
16939                 cygwin*) cf_suffix='.dll' ;;
16940                 darwin*) cf_suffix='.dylib' ;;
16941                 hpux*)
16942                         case $target in
16943                         ia64*)  cf_suffix='.so' ;;
16944                         *)      cf_suffix='.sl' ;;
16945                         esac
16946                         ;;
16947                 *)      cf_suffix='.so'  ;;
16948                 esac
16949         esac
16950         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16951
16952                         if test $cf_item = shared ; then
16953                         if test "$cf_cv_do_symlinks" = yes ; then
16954                                 case "$cf_cv_shlib_version" in #(vi
16955                                 rel) #(vi
16956                                         case "$cf_cv_system_name" in #(vi
16957                                         darwin*)
16958                                         case .${LIB_SUFFIX} in
16959                                         .w*)
16960                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16961                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16962                                                 ;;
16963                                         *)
16964                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16965                                                 ;;
16966                                         esac
16967                                         ;; #(vi
16968                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16969                                         esac
16970                                         ;;
16971                                 abi)
16972                                         case "$cf_cv_system_name" in #(vi
16973                                         darwin*)
16974                                         case .${LIB_SUFFIX} in
16975                                         .w*)
16976                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16977                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16978                                                 ;;
16979                                         *)
16980                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16981                                                 ;;
16982                                         esac
16983                                         ;; #(vi
16984                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16985                                         esac
16986                                         ;;
16987                                 esac
16988                         fi
16989                         # cygwin needs import library, and has unique naming convention
16990                         # use autodetected ${cf_prefix} for import lib and static lib, but
16991                         # use 'cyg' prefix for shared lib.
16992                         if test $cf_cv_shlib_version = cygdll ; then
16993                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16994                                 continue
16995                         fi
16996                         fi
16997                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16998                 done
16999
17000                 if test $cf_dir = ncurses ; then
17001                         cf_subsets="$LIB_SUBSETS"
17002                         cf_r_parts="$cf_subsets"
17003
17004                         while test -n "$cf_r_parts"
17005                         do
17006                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17007                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17008                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17009                                         case $cf_l_parts in #(vi
17010                                         *termlib*) #(vi
17011                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17012                                                 ;;
17013                                         *ticlib*)
17014                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17015                                                 ;;
17016                                         *)
17017                                                 break
17018                                                 ;;
17019                                         esac
17020                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17021                                 else
17022                                         break
17023                                 fi
17024                         done
17025                 else
17026                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17027                 fi
17028
17029                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17030                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17031                         $cf_dir/Makefile >$cf_dir/Makefile.out
17032                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17033
17034                 $AWK -f $srcdir/mk-0th.awk \
17035                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17036                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17037
17038                 for cf_subset in $cf_subsets
17039                 do
17040                         cf_subdirs=
17041                         for cf_item in $cf_LIST_MODELS
17042                         do
17043                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17044
17045 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17046
17047         case $cf_item in
17048         libtool) cf_suffix='.la'  ;;
17049         normal)  cf_suffix='.a'   ;;
17050         debug)   cf_suffix='_g.a' ;;
17051         profile) cf_suffix='_p.a' ;;
17052         shared)
17053                 case $cf_cv_system_name in
17054                 cygwin*) cf_suffix='.dll' ;;
17055                 darwin*) cf_suffix='.dylib' ;;
17056                 hpux*)
17057                         case $target in
17058                         ia64*)  cf_suffix='.so' ;;
17059                         *)      cf_suffix='.sl' ;;
17060                         esac
17061                         ;;
17062                 *)      cf_suffix='.so'  ;;
17063                 esac
17064         esac
17065         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17066
17067         case $cf_item in
17068         libtool) cf_subdir='obj_lo'  ;;
17069         normal)  cf_subdir='objects' ;;
17070         debug)   cf_subdir='obj_g' ;;
17071         profile) cf_subdir='obj_p' ;;
17072         shared)
17073                 case $cf_cv_system_name in #(vi
17074                 cygwin) #(vi
17075                         cf_subdir='objects' ;;
17076                 *)
17077                         cf_subdir='obj_s' ;;
17078                 esac
17079         esac
17080
17081                         # Test for case where we build libtinfo with a different name.
17082                         cf_libname=$cf_dir
17083                         if test $cf_dir = ncurses ; then
17084                                 case $cf_subset in
17085                                 *base*)
17086                                         ;;
17087                                 *termlib*)
17088                                         cf_libname=$TINFO_LIB_SUFFIX
17089                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17090                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17091                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17092                                         fi
17093                                         ;;
17094                                 ticlib*)
17095                                         cf_libname=$TICS_LIB_SUFFIX
17096                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17097                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17098                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17099                                         fi
17100                                         ;;
17101                                 esac
17102                         fi
17103
17104                         # These dependencies really are for development, not
17105                         # builds, but they are useful in porting, too.
17106                         cf_depend="../include/ncurses_cfg.h"
17107                         if test "$srcdir" = "."; then
17108                                 cf_reldir="."
17109                         else
17110                                 cf_reldir="\${srcdir}"
17111                         fi
17112
17113                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17114                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17115                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17116                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17117                         fi
17118
17119                         cf_dir_suffix=
17120                         old_cf_suffix="$cf_suffix"
17121                         if test "$cf_cv_shlib_version_infix" = yes ; then
17122                         if test -n "$LIB_SUFFIX" ; then
17123                                 case $LIB_SUFFIX in
17124                                 w*)
17125                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17126                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17127                                         cf_dir_suffix=w
17128                                         ;;
17129                                 esac
17130                         fi
17131                         fi
17132
17133                         $AWK -f $srcdir/mk-1st.awk \
17134                                 name=${cf_libname}${cf_dir_suffix} \
17135                                 traces=$LIB_TRACING \
17136                                 MODEL=$cf_ITEM \
17137                                 model=$cf_subdir \
17138                                 prefix=$cf_prefix \
17139                                 suffix=$cf_suffix \
17140                                 subset=$cf_subset \
17141                                 TermlibRoot=$TINFO_NAME \
17142                                 TermlibSuffix=$TINFO_SUFFIX \
17143                                 ShlibVer=$cf_cv_shlib_version \
17144                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17145                                 ReLink=${cf_cv_do_relink-no} \
17146                                 DoLinks=$cf_cv_do_symlinks \
17147                                 rmSoLocs=$cf_cv_rm_so_locs \
17148                                 ldconfig="$LDCONFIG" \
17149                                 overwrite=$WITH_OVERWRITE \
17150                                 depend="$cf_depend" \
17151                                 host="$host" \
17152                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17153
17154                         cf_suffix="$old_cf_suffix"
17155
17156                         for cf_subdir2 in $cf_subdirs lib
17157                         do
17158                                 test $cf_subdir = $cf_subdir2 && break
17159                         done
17160                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17161                         $AWK -f $srcdir/mk-2nd.awk \
17162                                 name=$cf_dir \
17163                                 traces=$LIB_TRACING \
17164                                 MODEL=$cf_ITEM \
17165                                 model=$cf_subdir \
17166                                 subset=$cf_subset \
17167                                 srcdir=$srcdir \
17168                                 echo=$WITH_ECHO \
17169                                 crenames=$cf_cv_prog_CC_c_o \
17170                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17171                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17172                         cf_subdirs="$cf_subdirs $cf_subdir"
17173                         done
17174                 done
17175         fi
17176
17177         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17178 done
17179
17180 for cf_dir in $SRC_SUBDIRS
17181 do
17182         if test ! -d $srcdir/$cf_dir ; then
17183                 continue
17184         fi
17185
17186         if test -f $cf_dir/Makefile ; then
17187                 case "$cf_dir" in
17188                 Ada95) #(vi
17189                         echo 'libs \' >> Makefile
17190                         echo 'install.libs \' >> Makefile
17191                         echo 'uninstall.libs ::' >> Makefile
17192                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17193                         ;;
17194                 esac
17195         fi
17196
17197         if test -f $srcdir/$cf_dir/modules; then
17198                 echo >> Makefile
17199                 if test -f $srcdir/$cf_dir/headers; then
17200 cat >> Makefile <<CF_EOF
17201 install.includes \\
17202 uninstall.includes \\
17203 CF_EOF
17204                 fi
17205 if test "$cf_dir" != "c++" ; then
17206 echo 'lint \' >> Makefile
17207 fi
17208 cat >> Makefile <<CF_EOF
17209 libs \\
17210 lintlib \\
17211 install.libs \\
17212 uninstall.libs \\
17213 install.$cf_dir \\
17214 uninstall.$cf_dir ::
17215         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17216 CF_EOF
17217         elif test -f $srcdir/$cf_dir/headers; then
17218 cat >> Makefile <<CF_EOF
17219
17220 libs \\
17221 install.libs \\
17222 uninstall.libs \\
17223 install.includes \\
17224 uninstall.includes ::
17225         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17226 CF_EOF
17227 fi
17228 done
17229
17230 cat >> Makefile <<CF_EOF
17231
17232 install.libs uninstall.libs \\
17233 install.data uninstall.data ::
17234 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17235
17236 install.man \\
17237 uninstall.man ::
17238         cd man && \${MAKE} \${CF_MFLAGS} \$@
17239
17240 distclean ::
17241         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17242         rm -f headers.sh headers.sed mk_shared_lib.sh
17243         rm -rf \${DIRS_TO_MAKE}
17244 CF_EOF
17245
17246 # Special case: tack's manpage lives in its own directory.
17247 if test -d tack ; then
17248 if test -f $srcdir/$tack.h; then
17249 cat >> Makefile <<CF_EOF
17250
17251 install.man \\
17252 uninstall.man ::
17253         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17254 CF_EOF
17255 fi
17256 fi
17257
17258 rm -f headers.sed headers.sh
17259
17260 echo creating headers.sh
17261 cat >headers.sh <<CF_EOF
17262 #! /bin/sh
17263 # This shell script is generated by the 'configure' script.  It is invoked in a
17264 # subdirectory of the build tree.  It generates a sed-script in the parent
17265 # directory that is used to adjust includes for header files that reside in a
17266 # subdirectory of /usr/include, etc.
17267 PRG=""
17268 while test \$# != 3
17269 do
17270 PRG="\$PRG \$1"; shift
17271 done
17272 DST=\$1
17273 REF=\$2
17274 SRC=\$3
17275 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17276 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17277 echo installing \$SRC in \$DST
17278 CF_EOF
17279
17280 if test $WITH_CURSES_H = yes; then
17281         cat >>headers.sh <<CF_EOF
17282 case \$DST in
17283 /*/include/*)
17284         END=\`basename \$DST\`
17285         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17286         do
17287                 NAME=\`basename \$i\`
17288                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17289         done
17290         ;;
17291 *)
17292         echo "" >> \$TMPSED
17293         ;;
17294 esac
17295 CF_EOF
17296
17297 else
17298         cat >>headers.sh <<CF_EOF
17299 case \$DST in
17300 /*/include/*)
17301         END=\`basename \$DST\`
17302         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17303         do
17304                 NAME=\`basename \$i\`
17305                 if test "\$NAME" = "curses.h"
17306                 then
17307                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17308                         NAME=ncurses.h
17309                 fi
17310                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17311         done
17312         ;;
17313 *)
17314         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17315         ;;
17316 esac
17317 CF_EOF
17318 fi
17319 cat >>headers.sh <<CF_EOF
17320 rm -f \$TMPSRC
17321 sed -f \$TMPSED \$SRC > \$TMPSRC
17322 NAME=\`basename \$SRC\`
17323 CF_EOF
17324 if test $WITH_CURSES_H != yes; then
17325         cat >>headers.sh <<CF_EOF
17326 test "\$NAME" = "curses.h" && NAME=ncurses.h
17327 CF_EOF
17328 fi
17329 cat >>headers.sh <<CF_EOF
17330 # Just in case someone gzip'd manpages, remove the conflicting copy.
17331 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17332
17333 eval \$PRG \$TMPSRC \$DST/\$NAME
17334 rm -f \$TMPSRC \$TMPSED
17335 CF_EOF
17336
17337 chmod 0755 headers.sh
17338
17339 for cf_dir in $SRC_SUBDIRS
17340 do
17341         if test ! -d $srcdir/$cf_dir ; then
17342                 continue
17343         fi
17344
17345         if test -f $srcdir/$cf_dir/headers; then
17346                 $AWK -f $srcdir/mk-hdr.awk \
17347                         subset="$LIB_SUBSETS" \
17348                         compat="$WITH_CURSES_H" \
17349                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17350         fi
17351
17352         if test -f $srcdir/$cf_dir/modules; then
17353                 if test "$cf_dir" != "c++" ; then
17354                         cat >>$cf_dir/Makefile <<"CF_EOF"
17355 depend : ${AUTO_SRC}
17356         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17357
17358 # DO NOT DELETE THIS LINE -- make depend depends on it.
17359 CF_EOF
17360                 fi
17361         fi
17362 done
17363
17364  ;;
17365   esac
17366 done
17367 EOF
17368
17369 cat >>$CONFIG_STATUS <<\EOF
17370
17371 { (exit 0); exit 0; }
17372 EOF
17373 chmod +x $CONFIG_STATUS
17374 ac_clean_files=$ac_clean_files_save
17375
17376 # configure is writing to config.log, and then calls config.status.
17377 # config.status does its own redirection, appending to config.log.
17378 # Unfortunately, on DOS this fails, as config.log is still kept open
17379 # by configure, so config.status won't be able to write to it; its
17380 # output is simply discarded.  So we exec the FD to /dev/null,
17381 # effectively closing config.log, so it can be properly (re)opened and
17382 # appended to by config.status.  When coming back to configure, we
17383 # need to make the FD available again.
17384 if test "$no_create" != yes; then
17385   ac_cs_success=:
17386   exec 5>/dev/null
17387   $SHELL $CONFIG_STATUS || ac_cs_success=false
17388   exec 5>>config.log
17389   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17390   # would make configure fail if this is the last instruction.
17391   $ac_cs_success || { (exit 1); exit 1; }
17392 fi
17393 ${MAKE-make} preinstall