]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070812
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.422 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --with-install-prefix   prefixes actual install-location ($DESTDIR)
703 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710 Options to Specify the Libraries Built/Used:
711   --with-libtool          generate libraries with libtool
712   --with-shared           generate shared-libraries
713   --with-normal           generate normal-libraries (default)
714   --with-debug            generate debug-libraries (default)
715   --with-profile          generate profile-libraries
716   --with-termlib          generate separate terminfo library
717   --with-ticlib           generate separate tic library
718   --with-gpm              use Alessandro Rubini's GPM library
719   --without-dlsym         do not use dlsym() to load GPM dynamically
720   --with-sysmouse         use sysmouse (FreeBSD console)
721   --enable-rpath          use rpath option when generating shared libraries
722   --disable-relink        relink shared libraries during install
723   --with-shlib-version=X  Specify rel or abi version for shared libs
724 Fine-Tuning Your Configuration:
725   --disable-overwrite     leave out the link to -lcurses
726   --disable-database      do not use terminfo, only fallbacks/termcap
727   --with-database=XXX     specify terminfo source to install
728   --with-hashed-db        specify hashed-database library
729   --with-fallbacks=XXX    specify list of fallback terminal descriptions
730   --without-xterm-new     specify if xterm terminfo should be old version
731   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
732   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
733   --disable-big-core      assume machine has little memory
734   --disable-big-strings   assume compiler has only standard-size strings
735   --enable-termcap        compile in termcap fallback support
736   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
737   --enable-getcap         fast termcap load, no xrefs to terminfo
738   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
739   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
740   --disable-root-environ  restrict environment when running as root
741   --enable-symlinks       make tic use symbolic links not hard links
742   --enable-broken_linker  compile with broken-linker support code
743   --enable-bsdpad         recognize BSD-style prefix padding
744   --enable-widec          compile with wide-char/UTF-8 code
745   --disable-lp64          allow chtype to be long (ignore _LP64)
746   --disable-largefile     omit support for large files
747   --disable-tparm-varargs compile tparm() without varargs interface
748   --with-bool=TYPE        override fallback type of bool variable
749   --with-caps=alt         compile with alternate Caps file
750   --with-chtype=TYPE      override type of chtype
751   --with-ospeed=TYPE      override type of ospeed variable
752   --with-mmask-t=TYPE     override type of mmask_t
753   --with-rcs-ids          compile-in RCS identifiers
754 Options to Specify How Manpages are Installed:
755   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
756                           optionally formatted/catonly, e.g., gzip,formatted
757   --with-manpage-renames  specify manpage-renaming
758   --with-manpage-aliases  specify manpage-aliases using .so
759   --with-manpage-symlinks specify manpage-aliases using symlinks
760   --with-manpage-tbl      specify manpage processing with tbl
761 Extensions:
762   --disable-ext-funcs     disable function-extensions
763   --enable-const          compile with extra/non-standard const
764   --enable-no-padding     compile with $NCURSES_NO_PADDING code
765   --enable-signed-char    compile using signed Boolean's in term.h
766   --enable-sigwinch       compile with SIGWINCH handler
767   --enable-tcap-names     compile with user-definable terminal capabilities
768 Development Code:
769   --without-develop       disable development options
770   --enable-hard-tabs      compile with hard-tabs code
771   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
772 Experimental Code:
773   --disable-assumed-color do not assume anything about default-colors
774   --disable-hashmap       compile without hashmap scrolling-optimization
775   --enable-colorfgbg      compile with $COLORFGBG code
776   --enable-ext-colors     compile for experimental 256-color support
777   --enable-ext-mouse      compile for experimental mouse-encoding
778   --enable-reentrant      compile with experimental reentrant code
779   --enable-safe-sprintf   compile with experimental safe-sprintf code
780   --disable-scroll-hints  compile without scroll-hints code
781   --enable-wgetch-events  compile with experimental wgetch-events code
782 Testing/development Options:
783   --enable-echo           build: display "compiling" commands (default)
784   --enable-warnings       build: turn on GCC compiler warnings
785   --enable-assertions     test: turn on generation of assertion code
786   --with-dmalloc          test: use Gray Watson's dmalloc library
787   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
788   --with-valgrind         test: use valgrind
789   --disable-leaks         test: free permanent memory, analyze leaks
790   --enable-expanded       test: generate functions for certain macros
791   --disable-macros        test: use functions rather than macros
792   --with-trace            test: add trace() function to all models of ncurses
793 Ada95 Binding Options:
794   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
795   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
796   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
797
798 Some influential environment variables:
799   CC          C compiler command
800   CFLAGS      C compiler flags
801   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
802               nonstandard directory <lib dir>
803   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
804               headers in a nonstandard directory <include dir>
805   CPP         C preprocessor
806   CXX         C++ compiler command
807   CXXFLAGS    C++ compiler flags
808   CXXCPP      C++ preprocessor
809
810 Use these variables to override the choices made by `configure' or to help
811 it to find libraries and programs with nonstandard names/locations.
812
813 EOF
814 fi
815
816 if test "$ac_init_help" = "recursive"; then
817   # If there are subdirs, report their specific --help.
818   ac_popdir=`pwd`
819   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
820     cd $ac_subdir
821     # A "../" for each directory in /$ac_subdir.
822     ac_dots=`echo $ac_subdir |
823              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
824
825     case $srcdir in
826     .) # No --srcdir option.  We are building in place.
827       ac_sub_srcdir=$srcdir ;;
828     [\\/]* | ?:[\\/]* ) # Absolute path.
829       ac_sub_srcdir=$srcdir/$ac_subdir ;;
830     *) # Relative path.
831       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
832     esac
833
834     # Check for guested configure; otherwise get Cygnus style configure.
835     if test -f $ac_sub_srcdir/configure.gnu; then
836       echo
837       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
838     elif test -f $ac_sub_srcdir/configure; then
839       echo
840       $SHELL $ac_sub_srcdir/configure  --help=recursive
841     elif test -f $ac_sub_srcdir/configure.ac ||
842            test -f $ac_sub_srcdir/configure.in; then
843       echo
844       $ac_configure --help
845     else
846       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
847     fi
848     cd $ac_popdir
849   done
850 fi
851
852 test -n "$ac_init_help" && exit 0
853 if $ac_init_version; then
854   cat <<\EOF
855
856 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
857 Free Software Foundation, Inc.
858 This configure script is free software; the Free Software Foundation
859 gives unlimited permission to copy, distribute and modify it.
860 EOF
861   exit 0
862 fi
863 exec 5>config.log
864 cat >&5 <<EOF
865 This file contains any messages produced by compilers while
866 running configure, to aid debugging if configure makes a mistake.
867
868 It was created by $as_me, which was
869 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
870
871   $ $0 $@
872
873 EOF
874 {
875 cat <<_ASUNAME
876 ## ---------- ##
877 ## Platform.  ##
878 ## ---------- ##
879
880 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
881 uname -m = `(uname -m) 2>/dev/null || echo unknown`
882 uname -r = `(uname -r) 2>/dev/null || echo unknown`
883 uname -s = `(uname -s) 2>/dev/null || echo unknown`
884 uname -v = `(uname -v) 2>/dev/null || echo unknown`
885
886 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
887 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
888
889 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
890 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
891 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
892 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
893 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
894 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
895 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
896
897 PATH = $PATH
898
899 _ASUNAME
900 } >&5
901
902 cat >&5 <<EOF
903 ## ------------ ##
904 ## Core tests.  ##
905 ## ------------ ##
906
907 EOF
908
909 # Keep a trace of the command line.
910 # Strip out --no-create and --no-recursion so they do not pile up.
911 # Also quote any args containing shell meta-characters.
912 ac_configure_args=
913 ac_sep=
914 for ac_arg
915 do
916   case $ac_arg in
917   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
918   | --no-cr | --no-c) ;;
919   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
920   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
921   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
922     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
923     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
924     ac_sep=" " ;;
925   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
926      ac_sep=" " ;;
927   esac
928   # Get rid of the leading space.
929 done
930
931 # When interrupted or exit'd, cleanup temporary files, and complete
932 # config.log.  We remove comments because anyway the quotes in there
933 # would cause problems or look ugly.
934 trap 'exit_status=$?
935   # Save into config.log some information that might help in debugging.
936   echo >&5
937   echo "## ----------------- ##" >&5
938   echo "## Cache variables.  ##" >&5
939   echo "## ----------------- ##" >&5
940   echo >&5
941   # The following way of writing the cache mishandles newlines in values,
942 {
943   (set) 2>&1 |
944     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
945     *ac_space=\ *)
946       sed -n \
947         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
948           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
949       ;;
950     *)
951       sed -n \
952         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
953       ;;
954     esac;
955 } >&5
956   sed "/^$/d" confdefs.h >conftest.log
957   if test -s conftest.log; then
958     echo >&5
959     echo "## ------------ ##" >&5
960     echo "## confdefs.h.  ##" >&5
961     echo "## ------------ ##" >&5
962     echo >&5
963     cat conftest.log >&5
964   fi
965   (echo; echo) >&5
966   test "$ac_signal" != 0 &&
967     echo "$as_me: caught signal $ac_signal" >&5
968   echo "$as_me: exit $exit_status" >&5
969   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
970     exit $exit_status
971      ' 0
972 for ac_signal in 1 2 13 15; do
973   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
974 done
975 ac_signal=0
976
977 # confdefs.h avoids OS command line length limits that DEFS can exceed.
978 rm -rf conftest* confdefs.h
979 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
980 echo >confdefs.h
981
982 # Let the site file select an alternate cache file if it wants to.
983 # Prefer explicitly selected file to automatically selected ones.
984 if test -z "$CONFIG_SITE"; then
985   if test "x$prefix" != xNONE; then
986     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
987   else
988     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
989   fi
990 fi
991 for ac_site_file in $CONFIG_SITE; do
992   if test -r "$ac_site_file"; then
993     { echo "$as_me:993: loading site script $ac_site_file" >&5
994 echo "$as_me: loading site script $ac_site_file" >&6;}
995     cat "$ac_site_file" >&5
996     . "$ac_site_file"
997   fi
998 done
999
1000 if test -r "$cache_file"; then
1001   # Some versions of bash will fail to source /dev/null (special
1002   # files actually), so we avoid doing that.
1003   if test -f "$cache_file"; then
1004     { echo "$as_me:1004: loading cache $cache_file" >&5
1005 echo "$as_me: loading cache $cache_file" >&6;}
1006     case $cache_file in
1007       [\\/]* | ?:[\\/]* ) . $cache_file;;
1008       *)                      . ./$cache_file;;
1009     esac
1010   fi
1011 else
1012   { echo "$as_me:1012: creating cache $cache_file" >&5
1013 echo "$as_me: creating cache $cache_file" >&6;}
1014   >$cache_file
1015 fi
1016
1017 # Check that the precious variables saved in the cache have kept the same
1018 # value.
1019 ac_cache_corrupted=false
1020 for ac_var in `(set) 2>&1 |
1021                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1022   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1023   eval ac_new_set=\$ac_env_${ac_var}_set
1024   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1025   eval ac_new_val="\$ac_env_${ac_var}_value"
1026   case $ac_old_set,$ac_new_set in
1027     set,)
1028       { echo "$as_me:1028: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1029 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1030       ac_cache_corrupted=: ;;
1031     ,set)
1032       { echo "$as_me:1032: error: \`$ac_var' was not set in the previous run" >&5
1033 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1034       ac_cache_corrupted=: ;;
1035     ,);;
1036     *)
1037       if test "x$ac_old_val" != "x$ac_new_val"; then
1038         { echo "$as_me:1038: error: \`$ac_var' has changed since the previous run:" >&5
1039 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1040         { echo "$as_me:1040:   former value:  $ac_old_val" >&5
1041 echo "$as_me:   former value:  $ac_old_val" >&2;}
1042         { echo "$as_me:1042:   current value: $ac_new_val" >&5
1043 echo "$as_me:   current value: $ac_new_val" >&2;}
1044         ac_cache_corrupted=:
1045       fi;;
1046   esac
1047   # Pass precious variables to config.status.  It doesn't matter if
1048   # we pass some twice (in addition to the command line arguments).
1049   if test "$ac_new_set" = set; then
1050     case $ac_new_val in
1051     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1052       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1053       ac_configure_args="$ac_configure_args '$ac_arg'"
1054       ;;
1055     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1056        ;;
1057     esac
1058   fi
1059 done
1060 if $ac_cache_corrupted; then
1061   { echo "$as_me:1061: error: changes in the environment can compromise the build" >&5
1062 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1063   { { echo "$as_me:1063: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1064 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1065    { (exit 1); exit 1; }; }
1066 fi
1067
1068 ac_ext=c
1069 ac_cpp='$CPP $CPPFLAGS'
1070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1073 ac_main_return=return
1074
1075 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1076   *c*,-n*) ECHO_N= ECHO_C='
1077 ' ECHO_T='      ' ;;
1078   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1079   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1080 esac
1081 echo "#! $SHELL" >conftest.sh
1082 echo  "exit 0"   >>conftest.sh
1083 chmod +x conftest.sh
1084 if { (echo "$as_me:1084: PATH=\".;.\"; conftest.sh") >&5
1085   (PATH=".;."; conftest.sh) 2>&5
1086   ac_status=$?
1087   echo "$as_me:1087: \$? = $ac_status" >&5
1088   (exit $ac_status); }; then
1089   ac_path_separator=';'
1090 else
1091   ac_path_separator=:
1092 fi
1093 PATH_SEPARATOR="$ac_path_separator"
1094 rm -f conftest.sh
1095
1096 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1097
1098 top_builddir=`pwd`
1099
1100 echo "$as_me:1100: checking for egrep" >&5
1101 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1102 if test "${ac_cv_prog_egrep+set}" = set; then
1103   echo $ECHO_N "(cached) $ECHO_C" >&6
1104 else
1105   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1106     then ac_cv_prog_egrep='grep -E'
1107     else ac_cv_prog_egrep='egrep'
1108     fi
1109 fi
1110 echo "$as_me:1110: result: $ac_cv_prog_egrep" >&5
1111 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1112  EGREP=$ac_cv_prog_egrep
1113
1114 test -z "$EGREP" && { { echo "$as_me:1114: error: No egrep program found" >&5
1115 echo "$as_me: error: No egrep program found" >&2;}
1116    { (exit 1); exit 1; }; }
1117
1118 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1119 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1121 cf_cv_abi_version=${NCURSES_MAJOR}
1122 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1123 cf_cv_timestamp=`date`
1124 echo "$as_me:1124: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1125 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1126
1127 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1128
1129 # Check whether --with-rel-version or --without-rel-version was given.
1130 if test "${with_rel_version+set}" = set; then
1131   withval="$with_rel_version"
1132   { echo "$as_me:1132: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1133 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1134  cf_cv_rel_version=$withval
1135 fi;
1136
1137  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1138  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1139
1140 if test -n "$NCURSES_MAJOR" ; then
1141   case $NCURSES_MAJOR in #(vi
1142   [0-9]*) #(vi
1143         ;;
1144   *)
1145         { { echo "$as_me:1145: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1146 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1147    { (exit 1); exit 1; }; }
1148         ;;
1149   esac
1150 else
1151   { { echo "$as_me:1151: error: Release major-version value is empty" >&5
1152 echo "$as_me: error: Release major-version value is empty" >&2;}
1153    { (exit 1); exit 1; }; }
1154 fi
1155
1156 if test -n "$NCURSES_MINOR" ; then
1157   case $NCURSES_MINOR in #(vi
1158   [0-9]*) #(vi
1159         ;;
1160   *)
1161         { { echo "$as_me:1161: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1162 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1163    { (exit 1); exit 1; }; }
1164         ;;
1165   esac
1166 else
1167   { { echo "$as_me:1167: error: Release minor-version value is empty" >&5
1168 echo "$as_me: error: Release minor-version value is empty" >&2;}
1169    { (exit 1); exit 1; }; }
1170 fi
1171
1172 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1173
1174 # Check whether --with-abi-version or --without-abi-version was given.
1175 if test "${with_abi_version+set}" = set; then
1176   withval="$with_abi_version"
1177   { echo "$as_me:1177: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1178 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1179  cf_cv_abi_version=$withval
1180 fi;
1181
1182 if test -n "$cf_cv_abi_version" ; then
1183   case $cf_cv_abi_version in #(vi
1184   [0-9]*) #(vi
1185         ;;
1186   *)
1187         { { echo "$as_me:1187: error: ABI version is not a number: $cf_cv_abi_version" >&5
1188 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1189    { (exit 1); exit 1; }; }
1190         ;;
1191   esac
1192 else
1193   { { echo "$as_me:1193: error: ABI version value is empty" >&5
1194 echo "$as_me: error: ABI version value is empty" >&2;}
1195    { (exit 1); exit 1; }; }
1196 fi
1197
1198 ac_aux_dir=
1199 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1200   if test -f $ac_dir/install-sh; then
1201     ac_aux_dir=$ac_dir
1202     ac_install_sh="$ac_aux_dir/install-sh -c"
1203     break
1204   elif test -f $ac_dir/install.sh; then
1205     ac_aux_dir=$ac_dir
1206     ac_install_sh="$ac_aux_dir/install.sh -c"
1207     break
1208   elif test -f $ac_dir/shtool; then
1209     ac_aux_dir=$ac_dir
1210     ac_install_sh="$ac_aux_dir/shtool install -c"
1211     break
1212   fi
1213 done
1214 if test -z "$ac_aux_dir"; then
1215   { { echo "$as_me:1215: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1216 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1217    { (exit 1); exit 1; }; }
1218 fi
1219 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1220 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1221 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1222
1223 # Make sure we can run config.sub.
1224 $ac_config_sub sun4 >/dev/null 2>&1 ||
1225   { { echo "$as_me:1225: error: cannot run $ac_config_sub" >&5
1226 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1227    { (exit 1); exit 1; }; }
1228
1229 echo "$as_me:1229: checking build system type" >&5
1230 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1231 if test "${ac_cv_build+set}" = set; then
1232   echo $ECHO_N "(cached) $ECHO_C" >&6
1233 else
1234   ac_cv_build_alias=$build_alias
1235 test -z "$ac_cv_build_alias" &&
1236   ac_cv_build_alias=`$ac_config_guess`
1237 test -z "$ac_cv_build_alias" &&
1238   { { echo "$as_me:1238: error: cannot guess build type; you must specify one" >&5
1239 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1240    { (exit 1); exit 1; }; }
1241 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1242   { { echo "$as_me:1242: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1243 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 fi
1247 echo "$as_me:1247: result: $ac_cv_build" >&5
1248 echo "${ECHO_T}$ac_cv_build" >&6
1249 build=$ac_cv_build
1250 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1251 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1252 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1253
1254 echo "$as_me:1254: checking host system type" >&5
1255 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1256 if test "${ac_cv_host+set}" = set; then
1257   echo $ECHO_N "(cached) $ECHO_C" >&6
1258 else
1259   ac_cv_host_alias=$host_alias
1260 test -z "$ac_cv_host_alias" &&
1261   ac_cv_host_alias=$ac_cv_build_alias
1262 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1263   { { echo "$as_me:1263: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1264 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1265    { (exit 1); exit 1; }; }
1266
1267 fi
1268 echo "$as_me:1268: result: $ac_cv_host" >&5
1269 echo "${ECHO_T}$ac_cv_host" >&6
1270 host=$ac_cv_host
1271 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1272 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1273 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1274
1275 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1276         echo "$as_me:1276: checking target system type" >&5
1277 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1278 if test "${ac_cv_target+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   ac_cv_target_alias=$target_alias
1282 test "x$ac_cv_target_alias" = "x" &&
1283   ac_cv_target_alias=$ac_cv_host_alias
1284 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1285   { { echo "$as_me:1285: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1286 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1287    { (exit 1); exit 1; }; }
1288
1289 fi
1290 echo "$as_me:1290: result: $ac_cv_target" >&5
1291 echo "${ECHO_T}$ac_cv_target" >&6
1292 target=$ac_cv_target
1293 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296
1297 # The aliases save the names the user supplied, while $host etc.
1298 # will get canonicalized.
1299 test -n "$target_alias" &&
1300   test "$program_prefix$program_suffix$program_transform_name" = \
1301     NONENONEs,x,x, &&
1302   program_prefix=${target_alias}-
1303         system_name="$host_os"
1304 else
1305         system_name="`(uname -s -r) 2>/dev/null`"
1306         if test -z "$system_name" ; then
1307                 system_name="`(hostname) 2>/dev/null`"
1308         fi
1309 fi
1310 test -n "$system_name" && cat >>confdefs.h <<EOF
1311 #define SYSTEM_NAME "$system_name"
1312 EOF
1313
1314 if test "${cf_cv_system_name+set}" = set; then
1315   echo $ECHO_N "(cached) $ECHO_C" >&6
1316 else
1317   cf_cv_system_name="$system_name"
1318 fi
1319
1320 test -z "$system_name" && system_name="$cf_cv_system_name"
1321 test -n "$cf_cv_system_name" && echo "$as_me:1321: result: Configuring for $cf_cv_system_name" >&5
1322 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1323
1324 if test ".$system_name" != ".$cf_cv_system_name" ; then
1325         echo "$as_me:1325: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1326 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1327         { { echo "$as_me:1327: error: \"Please remove config.cache and try again.\"" >&5
1328 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1329    { (exit 1); exit 1; }; }
1330 fi
1331
1332 # Check whether --with-system-type or --without-system-type was given.
1333 if test "${with_system_type+set}" = set; then
1334   withval="$with_system_type"
1335   { echo "$as_me:1335: WARNING: overriding system type to $withval" >&5
1336 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1337  cf_cv_system_name=$withval
1338 fi;
1339
1340 ###     Save the given $CFLAGS to allow user-override.
1341 cf_user_CFLAGS="$CFLAGS"
1342
1343 ###     Default install-location
1344
1345 echo "$as_me:1345: checking for prefix" >&5
1346 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1347 if test "x$prefix" = "xNONE" ; then
1348         case "$cf_cv_system_name" in
1349                 # non-vendor systems don't have a conflict
1350         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1351                 prefix=/usr
1352                 ;;
1353         *)      prefix=$ac_default_prefix
1354                 ;;
1355         esac
1356 fi
1357 echo "$as_me:1357: result: $prefix" >&5
1358 echo "${ECHO_T}$prefix" >&6
1359
1360 if test "x$prefix" = "xNONE" ; then
1361 echo "$as_me:1361: checking for default include-directory" >&5
1362 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1363 test -n "$verbose" && echo 1>&6
1364 for cf_symbol in \
1365         $includedir \
1366         $includedir/ncurses \
1367         $prefix/include \
1368         $prefix/include/ncurses \
1369         /usr/local/include \
1370         /usr/local/include/ncurses \
1371         /usr/include \
1372         /usr/include/ncurses
1373 do
1374         cf_dir=`eval echo $cf_symbol`
1375         if test -f $cf_dir/curses.h ; then
1376         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1377                 includedir="$cf_symbol"
1378                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1379                 break
1380         fi
1381         fi
1382         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1383 done
1384 echo "$as_me:1384: result: $includedir" >&5
1385 echo "${ECHO_T}$includedir" >&6
1386 fi
1387
1388 ###     Checks for programs.
1389 ac_ext=c
1390 ac_cpp='$CPP $CPPFLAGS'
1391 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1392 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1393 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1394 ac_main_return=return
1395 if test -n "$ac_tool_prefix"; then
1396   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1397 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1398 echo "$as_me:1398: checking for $ac_word" >&5
1399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1400 if test "${ac_cv_prog_CC+set}" = set; then
1401   echo $ECHO_N "(cached) $ECHO_C" >&6
1402 else
1403   if test -n "$CC"; then
1404   ac_cv_prog_CC="$CC" # Let the user override the test.
1405 else
1406   ac_save_IFS=$IFS; IFS=$ac_path_separator
1407 ac_dummy="$PATH"
1408 for ac_dir in $ac_dummy; do
1409   IFS=$ac_save_IFS
1410   test -z "$ac_dir" && ac_dir=.
1411   $as_executable_p "$ac_dir/$ac_word" || continue
1412 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1413 echo "$as_me:1413: found $ac_dir/$ac_word" >&5
1414 break
1415 done
1416
1417 fi
1418 fi
1419 CC=$ac_cv_prog_CC
1420 if test -n "$CC"; then
1421   echo "$as_me:1421: result: $CC" >&5
1422 echo "${ECHO_T}$CC" >&6
1423 else
1424   echo "$as_me:1424: result: no" >&5
1425 echo "${ECHO_T}no" >&6
1426 fi
1427
1428 fi
1429 if test -z "$ac_cv_prog_CC"; then
1430   ac_ct_CC=$CC
1431   # Extract the first word of "gcc", so it can be a program name with args.
1432 set dummy gcc; ac_word=$2
1433 echo "$as_me:1433: checking for $ac_word" >&5
1434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1435 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1436   echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438   if test -n "$ac_ct_CC"; then
1439   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1440 else
1441   ac_save_IFS=$IFS; IFS=$ac_path_separator
1442 ac_dummy="$PATH"
1443 for ac_dir in $ac_dummy; do
1444   IFS=$ac_save_IFS
1445   test -z "$ac_dir" && ac_dir=.
1446   $as_executable_p "$ac_dir/$ac_word" || continue
1447 ac_cv_prog_ac_ct_CC="gcc"
1448 echo "$as_me:1448: found $ac_dir/$ac_word" >&5
1449 break
1450 done
1451
1452 fi
1453 fi
1454 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1455 if test -n "$ac_ct_CC"; then
1456   echo "$as_me:1456: result: $ac_ct_CC" >&5
1457 echo "${ECHO_T}$ac_ct_CC" >&6
1458 else
1459   echo "$as_me:1459: result: no" >&5
1460 echo "${ECHO_T}no" >&6
1461 fi
1462
1463   CC=$ac_ct_CC
1464 else
1465   CC="$ac_cv_prog_CC"
1466 fi
1467
1468 if test -z "$CC"; then
1469   if test -n "$ac_tool_prefix"; then
1470   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1471 set dummy ${ac_tool_prefix}cc; ac_word=$2
1472 echo "$as_me:1472: checking for $ac_word" >&5
1473 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1474 if test "${ac_cv_prog_CC+set}" = set; then
1475   echo $ECHO_N "(cached) $ECHO_C" >&6
1476 else
1477   if test -n "$CC"; then
1478   ac_cv_prog_CC="$CC" # Let the user override the test.
1479 else
1480   ac_save_IFS=$IFS; IFS=$ac_path_separator
1481 ac_dummy="$PATH"
1482 for ac_dir in $ac_dummy; do
1483   IFS=$ac_save_IFS
1484   test -z "$ac_dir" && ac_dir=.
1485   $as_executable_p "$ac_dir/$ac_word" || continue
1486 ac_cv_prog_CC="${ac_tool_prefix}cc"
1487 echo "$as_me:1487: found $ac_dir/$ac_word" >&5
1488 break
1489 done
1490
1491 fi
1492 fi
1493 CC=$ac_cv_prog_CC
1494 if test -n "$CC"; then
1495   echo "$as_me:1495: result: $CC" >&5
1496 echo "${ECHO_T}$CC" >&6
1497 else
1498   echo "$as_me:1498: result: no" >&5
1499 echo "${ECHO_T}no" >&6
1500 fi
1501
1502 fi
1503 if test -z "$ac_cv_prog_CC"; then
1504   ac_ct_CC=$CC
1505   # Extract the first word of "cc", so it can be a program name with args.
1506 set dummy cc; ac_word=$2
1507 echo "$as_me:1507: checking for $ac_word" >&5
1508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1509 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1510   echo $ECHO_N "(cached) $ECHO_C" >&6
1511 else
1512   if test -n "$ac_ct_CC"; then
1513   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1514 else
1515   ac_save_IFS=$IFS; IFS=$ac_path_separator
1516 ac_dummy="$PATH"
1517 for ac_dir in $ac_dummy; do
1518   IFS=$ac_save_IFS
1519   test -z "$ac_dir" && ac_dir=.
1520   $as_executable_p "$ac_dir/$ac_word" || continue
1521 ac_cv_prog_ac_ct_CC="cc"
1522 echo "$as_me:1522: found $ac_dir/$ac_word" >&5
1523 break
1524 done
1525
1526 fi
1527 fi
1528 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1529 if test -n "$ac_ct_CC"; then
1530   echo "$as_me:1530: result: $ac_ct_CC" >&5
1531 echo "${ECHO_T}$ac_ct_CC" >&6
1532 else
1533   echo "$as_me:1533: result: no" >&5
1534 echo "${ECHO_T}no" >&6
1535 fi
1536
1537   CC=$ac_ct_CC
1538 else
1539   CC="$ac_cv_prog_CC"
1540 fi
1541
1542 fi
1543 if test -z "$CC"; then
1544   # Extract the first word of "cc", so it can be a program name with args.
1545 set dummy cc; ac_word=$2
1546 echo "$as_me:1546: checking for $ac_word" >&5
1547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1548 if test "${ac_cv_prog_CC+set}" = set; then
1549   echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551   if test -n "$CC"; then
1552   ac_cv_prog_CC="$CC" # Let the user override the test.
1553 else
1554   ac_prog_rejected=no
1555   ac_save_IFS=$IFS; IFS=$ac_path_separator
1556 ac_dummy="$PATH"
1557 for ac_dir in $ac_dummy; do
1558   IFS=$ac_save_IFS
1559   test -z "$ac_dir" && ac_dir=.
1560   $as_executable_p "$ac_dir/$ac_word" || continue
1561 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1562   ac_prog_rejected=yes
1563   continue
1564 fi
1565 ac_cv_prog_CC="cc"
1566 echo "$as_me:1566: found $ac_dir/$ac_word" >&5
1567 break
1568 done
1569
1570 if test $ac_prog_rejected = yes; then
1571   # We found a bogon in the path, so make sure we never use it.
1572   set dummy $ac_cv_prog_CC
1573   shift
1574   if test $# != 0; then
1575     # We chose a different compiler from the bogus one.
1576     # However, it has the same basename, so the bogon will be chosen
1577     # first if we set CC to just the basename; use the full file name.
1578     shift
1579     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1580     shift
1581     ac_cv_prog_CC="$@"
1582   fi
1583 fi
1584 fi
1585 fi
1586 CC=$ac_cv_prog_CC
1587 if test -n "$CC"; then
1588   echo "$as_me:1588: result: $CC" >&5
1589 echo "${ECHO_T}$CC" >&6
1590 else
1591   echo "$as_me:1591: result: no" >&5
1592 echo "${ECHO_T}no" >&6
1593 fi
1594
1595 fi
1596 if test -z "$CC"; then
1597   if test -n "$ac_tool_prefix"; then
1598   for ac_prog in cl
1599   do
1600     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1601 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1602 echo "$as_me:1602: checking for $ac_word" >&5
1603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1604 if test "${ac_cv_prog_CC+set}" = set; then
1605   echo $ECHO_N "(cached) $ECHO_C" >&6
1606 else
1607   if test -n "$CC"; then
1608   ac_cv_prog_CC="$CC" # Let the user override the test.
1609 else
1610   ac_save_IFS=$IFS; IFS=$ac_path_separator
1611 ac_dummy="$PATH"
1612 for ac_dir in $ac_dummy; do
1613   IFS=$ac_save_IFS
1614   test -z "$ac_dir" && ac_dir=.
1615   $as_executable_p "$ac_dir/$ac_word" || continue
1616 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1617 echo "$as_me:1617: found $ac_dir/$ac_word" >&5
1618 break
1619 done
1620
1621 fi
1622 fi
1623 CC=$ac_cv_prog_CC
1624 if test -n "$CC"; then
1625   echo "$as_me:1625: result: $CC" >&5
1626 echo "${ECHO_T}$CC" >&6
1627 else
1628   echo "$as_me:1628: result: no" >&5
1629 echo "${ECHO_T}no" >&6
1630 fi
1631
1632     test -n "$CC" && break
1633   done
1634 fi
1635 if test -z "$CC"; then
1636   ac_ct_CC=$CC
1637   for ac_prog in cl
1638 do
1639   # Extract the first word of "$ac_prog", so it can be a program name with args.
1640 set dummy $ac_prog; ac_word=$2
1641 echo "$as_me:1641: checking for $ac_word" >&5
1642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1643 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1644   echo $ECHO_N "(cached) $ECHO_C" >&6
1645 else
1646   if test -n "$ac_ct_CC"; then
1647   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1648 else
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   $as_executable_p "$ac_dir/$ac_word" || continue
1655 ac_cv_prog_ac_ct_CC="$ac_prog"
1656 echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657 break
1658 done
1659
1660 fi
1661 fi
1662 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1663 if test -n "$ac_ct_CC"; then
1664   echo "$as_me:1664: result: $ac_ct_CC" >&5
1665 echo "${ECHO_T}$ac_ct_CC" >&6
1666 else
1667   echo "$as_me:1667: result: no" >&5
1668 echo "${ECHO_T}no" >&6
1669 fi
1670
1671   test -n "$ac_ct_CC" && break
1672 done
1673
1674   CC=$ac_ct_CC
1675 fi
1676
1677 fi
1678
1679 test -z "$CC" && { { echo "$as_me:1679: error: no acceptable cc found in \$PATH" >&5
1680 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1681    { (exit 1); exit 1; }; }
1682
1683 # Provide some information about the compiler.
1684 echo "$as_me:1684:" \
1685      "checking for C compiler version" >&5
1686 ac_compiler=`set X $ac_compile; echo $2`
1687 { (eval echo "$as_me:1687: \"$ac_compiler --version </dev/null >&5\"") >&5
1688   (eval $ac_compiler --version </dev/null >&5) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); }
1692 { (eval echo "$as_me:1692: \"$ac_compiler -v </dev/null >&5\"") >&5
1693   (eval $ac_compiler -v </dev/null >&5) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }
1697 { (eval echo "$as_me:1697: \"$ac_compiler -V </dev/null >&5\"") >&5
1698   (eval $ac_compiler -V </dev/null >&5) 2>&5
1699   ac_status=$?
1700   echo "$as_me:1700: \$? = $ac_status" >&5
1701   (exit $ac_status); }
1702
1703 cat >conftest.$ac_ext <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1706
1707 int
1708 main ()
1709 {
1710
1711   ;
1712   return 0;
1713 }
1714 _ACEOF
1715 ac_clean_files_save=$ac_clean_files
1716 ac_clean_files="$ac_clean_files a.out a.exe"
1717 # Try to create an executable without -o first, disregard a.out.
1718 # It will help us diagnose broken compilers, and finding out an intuition
1719 # of exeext.
1720 echo "$as_me:1720: checking for C compiler default output" >&5
1721 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1722 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1723 if { (eval echo "$as_me:1723: \"$ac_link_default\"") >&5
1724   (eval $ac_link_default) 2>&5
1725   ac_status=$?
1726   echo "$as_me:1726: \$? = $ac_status" >&5
1727   (exit $ac_status); }; then
1728   # Find the output, starting from the most likely.  This scheme is
1729 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1730 # resort.
1731 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1732                 ls a.out conftest 2>/dev/null;
1733                 ls a.* conftest.* 2>/dev/null`; do
1734   case $ac_file in
1735     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1736     a.out ) # We found the default executable, but exeext='' is most
1737             # certainly right.
1738             break;;
1739     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1740           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1741           export ac_cv_exeext
1742           break;;
1743     * ) break;;
1744   esac
1745 done
1746 else
1747   echo "$as_me: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 { { echo "$as_me:1749: error: C compiler cannot create executables" >&5
1750 echo "$as_me: error: C compiler cannot create executables" >&2;}
1751    { (exit 77); exit 77; }; }
1752 fi
1753
1754 ac_exeext=$ac_cv_exeext
1755 echo "$as_me:1755: result: $ac_file" >&5
1756 echo "${ECHO_T}$ac_file" >&6
1757
1758 # Check the compiler produces executables we can run.  If not, either
1759 # the compiler is broken, or we cross compile.
1760 echo "$as_me:1760: checking whether the C compiler works" >&5
1761 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1762 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1763 # If not cross compiling, check that we can run a simple program.
1764 if test "$cross_compiling" != yes; then
1765   if { ac_try='./$ac_file'
1766   { (eval echo "$as_me:1766: \"$ac_try\"") >&5
1767   (eval $ac_try) 2>&5
1768   ac_status=$?
1769   echo "$as_me:1769: \$? = $ac_status" >&5
1770   (exit $ac_status); }; }; then
1771     cross_compiling=no
1772   else
1773     if test "$cross_compiling" = maybe; then
1774         cross_compiling=yes
1775     else
1776         { { echo "$as_me:1776: error: cannot run C compiled programs.
1777 If you meant to cross compile, use \`--host'." >&5
1778 echo "$as_me: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&2;}
1780    { (exit 1); exit 1; }; }
1781     fi
1782   fi
1783 fi
1784 echo "$as_me:1784: result: yes" >&5
1785 echo "${ECHO_T}yes" >&6
1786
1787 rm -f a.out a.exe conftest$ac_cv_exeext
1788 ac_clean_files=$ac_clean_files_save
1789 # Check the compiler produces executables we can run.  If not, either
1790 # the compiler is broken, or we cross compile.
1791 echo "$as_me:1791: checking whether we are cross compiling" >&5
1792 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1793 echo "$as_me:1793: result: $cross_compiling" >&5
1794 echo "${ECHO_T}$cross_compiling" >&6
1795
1796 echo "$as_me:1796: checking for executable suffix" >&5
1797 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1798 if { (eval echo "$as_me:1798: \"$ac_link\"") >&5
1799   (eval $ac_link) 2>&5
1800   ac_status=$?
1801   echo "$as_me:1801: \$? = $ac_status" >&5
1802   (exit $ac_status); }; then
1803   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1804 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1805 # work properly (i.e., refer to `conftest.exe'), while it won't with
1806 # `rm'.
1807 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1808   case $ac_file in
1809     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1810     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1811           export ac_cv_exeext
1812           break;;
1813     * ) break;;
1814   esac
1815 done
1816 else
1817   { { echo "$as_me:1817: error: cannot compute EXEEXT: cannot compile and link" >&5
1818 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1819    { (exit 1); exit 1; }; }
1820 fi
1821
1822 rm -f conftest$ac_cv_exeext
1823 echo "$as_me:1823: result: $ac_cv_exeext" >&5
1824 echo "${ECHO_T}$ac_cv_exeext" >&6
1825
1826 rm -f conftest.$ac_ext
1827 EXEEXT=$ac_cv_exeext
1828 ac_exeext=$EXEEXT
1829 echo "$as_me:1829: checking for object suffix" >&5
1830 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1831 if test "${ac_cv_objext+set}" = set; then
1832   echo $ECHO_N "(cached) $ECHO_C" >&6
1833 else
1834   cat >conftest.$ac_ext <<_ACEOF
1835 #line 1835 "configure"
1836 #include "confdefs.h"
1837
1838 int
1839 main ()
1840 {
1841
1842   ;
1843   return 0;
1844 }
1845 _ACEOF
1846 rm -f conftest.o conftest.obj
1847 if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5
1848   (eval $ac_compile) 2>&5
1849   ac_status=$?
1850   echo "$as_me:1850: \$? = $ac_status" >&5
1851   (exit $ac_status); }; then
1852   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1853   case $ac_file in
1854     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1855     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1856        break;;
1857   esac
1858 done
1859 else
1860   echo "$as_me: failed program was:" >&5
1861 cat conftest.$ac_ext >&5
1862 { { echo "$as_me:1862: error: cannot compute OBJEXT: cannot compile" >&5
1863 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1864    { (exit 1); exit 1; }; }
1865 fi
1866
1867 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1868 fi
1869 echo "$as_me:1869: result: $ac_cv_objext" >&5
1870 echo "${ECHO_T}$ac_cv_objext" >&6
1871 OBJEXT=$ac_cv_objext
1872 ac_objext=$OBJEXT
1873 echo "$as_me:1873: checking whether we are using the GNU C compiler" >&5
1874 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1875 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1876   echo $ECHO_N "(cached) $ECHO_C" >&6
1877 else
1878   cat >conftest.$ac_ext <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main ()
1884 {
1885 #ifndef __GNUC__
1886        choke me
1887 #endif
1888
1889   ;
1890   return 0;
1891 }
1892 _ACEOF
1893 rm -f conftest.$ac_objext
1894 if { (eval echo "$as_me:1894: \"$ac_compile\"") >&5
1895   (eval $ac_compile) 2>&5
1896   ac_status=$?
1897   echo "$as_me:1897: \$? = $ac_status" >&5
1898   (exit $ac_status); } &&
1899          { ac_try='test -s conftest.$ac_objext'
1900   { (eval echo "$as_me:1900: \"$ac_try\"") >&5
1901   (eval $ac_try) 2>&5
1902   ac_status=$?
1903   echo "$as_me:1903: \$? = $ac_status" >&5
1904   (exit $ac_status); }; }; then
1905   ac_compiler_gnu=yes
1906 else
1907   echo "$as_me: failed program was:" >&5
1908 cat conftest.$ac_ext >&5
1909 ac_compiler_gnu=no
1910 fi
1911 rm -f conftest.$ac_objext conftest.$ac_ext
1912 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1913
1914 fi
1915 echo "$as_me:1915: result: $ac_cv_c_compiler_gnu" >&5
1916 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1917 GCC=`test $ac_compiler_gnu = yes && echo yes`
1918 ac_test_CFLAGS=${CFLAGS+set}
1919 ac_save_CFLAGS=$CFLAGS
1920 CFLAGS="-g"
1921 echo "$as_me:1921: checking whether $CC accepts -g" >&5
1922 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1923 if test "${ac_cv_prog_cc_g+set}" = set; then
1924   echo $ECHO_N "(cached) $ECHO_C" >&6
1925 else
1926   cat >conftest.$ac_ext <<_ACEOF
1927 #line 1927 "configure"
1928 #include "confdefs.h"
1929
1930 int
1931 main ()
1932 {
1933
1934   ;
1935   return 0;
1936 }
1937 _ACEOF
1938 rm -f conftest.$ac_objext
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940   (eval $ac_compile) 2>&5
1941   ac_status=$?
1942   echo "$as_me:1942: \$? = $ac_status" >&5
1943   (exit $ac_status); } &&
1944          { ac_try='test -s conftest.$ac_objext'
1945   { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1946   (eval $ac_try) 2>&5
1947   ac_status=$?
1948   echo "$as_me:1948: \$? = $ac_status" >&5
1949   (exit $ac_status); }; }; then
1950   ac_cv_prog_cc_g=yes
1951 else
1952   echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 ac_cv_prog_cc_g=no
1955 fi
1956 rm -f conftest.$ac_objext conftest.$ac_ext
1957 fi
1958 echo "$as_me:1958: result: $ac_cv_prog_cc_g" >&5
1959 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1960 if test "$ac_test_CFLAGS" = set; then
1961   CFLAGS=$ac_save_CFLAGS
1962 elif test $ac_cv_prog_cc_g = yes; then
1963   if test "$GCC" = yes; then
1964     CFLAGS="-g -O2"
1965   else
1966     CFLAGS="-g"
1967   fi
1968 else
1969   if test "$GCC" = yes; then
1970     CFLAGS="-O2"
1971   else
1972     CFLAGS=
1973   fi
1974 fi
1975 # Some people use a C++ compiler to compile C.  Since we use `exit',
1976 # in C++ we need to declare it.  In case someone uses the same compiler
1977 # for both compiling C and C++ we need to have the C++ compiler decide
1978 # the declaration of exit, since it's the most demanding environment.
1979 cat >conftest.$ac_ext <<_ACEOF
1980 #ifndef __cplusplus
1981   choke me
1982 #endif
1983 _ACEOF
1984 rm -f conftest.$ac_objext
1985 if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986   (eval $ac_compile) 2>&5
1987   ac_status=$?
1988   echo "$as_me:1988: \$? = $ac_status" >&5
1989   (exit $ac_status); } &&
1990          { ac_try='test -s conftest.$ac_objext'
1991   { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992   (eval $ac_try) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit $ac_status); }; }; then
1996   for ac_declaration in \
1997    ''\
1998    '#include <stdlib.h>' \
1999    'extern "C" void std::exit (int) throw (); using std::exit;' \
2000    'extern "C" void std::exit (int); using std::exit;' \
2001    'extern "C" void exit (int) throw ();' \
2002    'extern "C" void exit (int);' \
2003    'void exit (int);'
2004 do
2005   cat >conftest.$ac_ext <<_ACEOF
2006 #line 2006 "configure"
2007 #include "confdefs.h"
2008 #include <stdlib.h>
2009 $ac_declaration
2010 int
2011 main ()
2012 {
2013 exit (42);
2014   ;
2015   return 0;
2016 }
2017 _ACEOF
2018 rm -f conftest.$ac_objext
2019 if { (eval echo "$as_me:2019: \"$ac_compile\"") >&5
2020   (eval $ac_compile) 2>&5
2021   ac_status=$?
2022   echo "$as_me:2022: \$? = $ac_status" >&5
2023   (exit $ac_status); } &&
2024          { ac_try='test -s conftest.$ac_objext'
2025   { (eval echo "$as_me:2025: \"$ac_try\"") >&5
2026   (eval $ac_try) 2>&5
2027   ac_status=$?
2028   echo "$as_me:2028: \$? = $ac_status" >&5
2029   (exit $ac_status); }; }; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 continue
2035 fi
2036 rm -f conftest.$ac_objext conftest.$ac_ext
2037   cat >conftest.$ac_ext <<_ACEOF
2038 #line 2038 "configure"
2039 #include "confdefs.h"
2040 $ac_declaration
2041 int
2042 main ()
2043 {
2044 exit (42);
2045   ;
2046   return 0;
2047 }
2048 _ACEOF
2049 rm -f conftest.$ac_objext
2050 if { (eval echo "$as_me:2050: \"$ac_compile\"") >&5
2051   (eval $ac_compile) 2>&5
2052   ac_status=$?
2053   echo "$as_me:2053: \$? = $ac_status" >&5
2054   (exit $ac_status); } &&
2055          { ac_try='test -s conftest.$ac_objext'
2056   { (eval echo "$as_me:2056: \"$ac_try\"") >&5
2057   (eval $ac_try) 2>&5
2058   ac_status=$?
2059   echo "$as_me:2059: \$? = $ac_status" >&5
2060   (exit $ac_status); }; }; then
2061   break
2062 else
2063   echo "$as_me: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 fi
2066 rm -f conftest.$ac_objext conftest.$ac_ext
2067 done
2068 rm -f conftest*
2069 if test -n "$ac_declaration"; then
2070   echo '#ifdef __cplusplus' >>confdefs.h
2071   echo $ac_declaration      >>confdefs.h
2072   echo '#endif'             >>confdefs.h
2073 fi
2074
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 ac_ext=c
2081 ac_cpp='$CPP $CPPFLAGS'
2082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2085 ac_main_return=return
2086
2087 GCC_VERSION=none
2088 if test "$GCC" = yes ; then
2089         echo "$as_me:2089: checking version of $CC" >&5
2090 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2091         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2092         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2093         echo "$as_me:2093: result: $GCC_VERSION" >&5
2094 echo "${ECHO_T}$GCC_VERSION" >&6
2095 fi
2096
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103 echo "$as_me:2103: checking how to run the C preprocessor" >&5
2104 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2105 # On Suns, sometimes $CPP names a directory.
2106 if test -n "$CPP" && test -d "$CPP"; then
2107   CPP=
2108 fi
2109 if test -z "$CPP"; then
2110   if test "${ac_cv_prog_CPP+set}" = set; then
2111   echo $ECHO_N "(cached) $ECHO_C" >&6
2112 else
2113       # Double quotes because CPP needs to be expanded
2114     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2115     do
2116       ac_preproc_ok=false
2117 for ac_c_preproc_warn_flag in '' yes
2118 do
2119   # Use a header file that comes with gcc, so configuring glibc
2120   # with a fresh cross-compiler works.
2121   # On the NeXT, cc -E runs the code through the compiler's parser,
2122   # not just through cpp. "Syntax error" is here to catch this case.
2123   cat >conftest.$ac_ext <<_ACEOF
2124 #line 2124 "configure"
2125 #include "confdefs.h"
2126 #include <assert.h>
2127                      Syntax error
2128 _ACEOF
2129 if { (eval echo "$as_me:2129: \"$ac_cpp conftest.$ac_ext\"") >&5
2130   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2131   ac_status=$?
2132   egrep -v '^ *\+' conftest.er1 >conftest.err
2133   rm -f conftest.er1
2134   cat conftest.err >&5
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit $ac_status); } >/dev/null; then
2137   if test -s conftest.err; then
2138     ac_cpp_err=$ac_c_preproc_warn_flag
2139   else
2140     ac_cpp_err=
2141   fi
2142 else
2143   ac_cpp_err=yes
2144 fi
2145 if test -z "$ac_cpp_err"; then
2146   :
2147 else
2148   echo "$as_me: failed program was:" >&5
2149   cat conftest.$ac_ext >&5
2150   # Broken: fails on valid input.
2151 continue
2152 fi
2153 rm -f conftest.err conftest.$ac_ext
2154
2155   # OK, works on sane cases.  Now check whether non-existent headers
2156   # can be detected and how.
2157   cat >conftest.$ac_ext <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160 #include <ac_nonexistent.h>
2161 _ACEOF
2162 if { (eval echo "$as_me:2162: \"$ac_cpp conftest.$ac_ext\"") >&5
2163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2164   ac_status=$?
2165   egrep -v '^ *\+' conftest.er1 >conftest.err
2166   rm -f conftest.er1
2167   cat conftest.err >&5
2168   echo "$as_me:2168: \$? = $ac_status" >&5
2169   (exit $ac_status); } >/dev/null; then
2170   if test -s conftest.err; then
2171     ac_cpp_err=$ac_c_preproc_warn_flag
2172   else
2173     ac_cpp_err=
2174   fi
2175 else
2176   ac_cpp_err=yes
2177 fi
2178 if test -z "$ac_cpp_err"; then
2179   # Broken: success on invalid input.
2180 continue
2181 else
2182   echo "$as_me: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   # Passes both tests.
2185 ac_preproc_ok=:
2186 break
2187 fi
2188 rm -f conftest.err conftest.$ac_ext
2189
2190 done
2191 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2192 rm -f conftest.err conftest.$ac_ext
2193 if $ac_preproc_ok; then
2194   break
2195 fi
2196
2197     done
2198     ac_cv_prog_CPP=$CPP
2199
2200 fi
2201   CPP=$ac_cv_prog_CPP
2202 else
2203   ac_cv_prog_CPP=$CPP
2204 fi
2205 echo "$as_me:2205: result: $CPP" >&5
2206 echo "${ECHO_T}$CPP" >&6
2207 ac_preproc_ok=false
2208 for ac_c_preproc_warn_flag in '' yes
2209 do
2210   # Use a header file that comes with gcc, so configuring glibc
2211   # with a fresh cross-compiler works.
2212   # On the NeXT, cc -E runs the code through the compiler's parser,
2213   # not just through cpp. "Syntax error" is here to catch this case.
2214   cat >conftest.$ac_ext <<_ACEOF
2215 #line 2215 "configure"
2216 #include "confdefs.h"
2217 #include <assert.h>
2218                      Syntax error
2219 _ACEOF
2220 if { (eval echo "$as_me:2220: \"$ac_cpp conftest.$ac_ext\"") >&5
2221   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2222   ac_status=$?
2223   egrep -v '^ *\+' conftest.er1 >conftest.err
2224   rm -f conftest.er1
2225   cat conftest.err >&5
2226   echo "$as_me:2226: \$? = $ac_status" >&5
2227   (exit $ac_status); } >/dev/null; then
2228   if test -s conftest.err; then
2229     ac_cpp_err=$ac_c_preproc_warn_flag
2230   else
2231     ac_cpp_err=
2232   fi
2233 else
2234   ac_cpp_err=yes
2235 fi
2236 if test -z "$ac_cpp_err"; then
2237   :
2238 else
2239   echo "$as_me: failed program was:" >&5
2240   cat conftest.$ac_ext >&5
2241   # Broken: fails on valid input.
2242 continue
2243 fi
2244 rm -f conftest.err conftest.$ac_ext
2245
2246   # OK, works on sane cases.  Now check whether non-existent headers
2247   # can be detected and how.
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251 #include <ac_nonexistent.h>
2252 _ACEOF
2253 if { (eval echo "$as_me:2253: \"$ac_cpp conftest.$ac_ext\"") >&5
2254   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2255   ac_status=$?
2256   egrep -v '^ *\+' conftest.er1 >conftest.err
2257   rm -f conftest.er1
2258   cat conftest.err >&5
2259   echo "$as_me:2259: \$? = $ac_status" >&5
2260   (exit $ac_status); } >/dev/null; then
2261   if test -s conftest.err; then
2262     ac_cpp_err=$ac_c_preproc_warn_flag
2263   else
2264     ac_cpp_err=
2265   fi
2266 else
2267   ac_cpp_err=yes
2268 fi
2269 if test -z "$ac_cpp_err"; then
2270   # Broken: success on invalid input.
2271 continue
2272 else
2273   echo "$as_me: failed program was:" >&5
2274   cat conftest.$ac_ext >&5
2275   # Passes both tests.
2276 ac_preproc_ok=:
2277 break
2278 fi
2279 rm -f conftest.err conftest.$ac_ext
2280
2281 done
2282 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2283 rm -f conftest.err conftest.$ac_ext
2284 if $ac_preproc_ok; then
2285   :
2286 else
2287   { { echo "$as_me:2287: error: C preprocessor \"$CPP\" fails sanity check" >&5
2288 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2289    { (exit 1); exit 1; }; }
2290 fi
2291
2292 ac_ext=c
2293 ac_cpp='$CPP $CPPFLAGS'
2294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2297 ac_main_return=return
2298
2299 if test $ac_cv_c_compiler_gnu = yes; then
2300     echo "$as_me:2300: checking whether $CC needs -traditional" >&5
2301 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2302 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2303   echo $ECHO_N "(cached) $ECHO_C" >&6
2304 else
2305     ac_pattern="Autoconf.*'x'"
2306   cat >conftest.$ac_ext <<_ACEOF
2307 #line 2307 "configure"
2308 #include "confdefs.h"
2309 #include <sgtty.h>
2310 int Autoconf = TIOCGETP;
2311 _ACEOF
2312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2313   egrep "$ac_pattern" >/dev/null 2>&1; then
2314   ac_cv_prog_gcc_traditional=yes
2315 else
2316   ac_cv_prog_gcc_traditional=no
2317 fi
2318 rm -f conftest*
2319
2320   if test $ac_cv_prog_gcc_traditional = no; then
2321     cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2324 #include <termio.h>
2325 int Autoconf = TCGETA;
2326 _ACEOF
2327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2328   egrep "$ac_pattern" >/dev/null 2>&1; then
2329   ac_cv_prog_gcc_traditional=yes
2330 fi
2331 rm -f conftest*
2332
2333   fi
2334 fi
2335 echo "$as_me:2335: result: $ac_cv_prog_gcc_traditional" >&5
2336 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2337   if test $ac_cv_prog_gcc_traditional = yes; then
2338     CC="$CC -traditional"
2339   fi
2340 fi
2341
2342 echo "$as_me:2342: checking whether $CC understands -c and -o together" >&5
2343 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2344 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2345   echo $ECHO_N "(cached) $ECHO_C" >&6
2346 else
2347
2348 cat > conftest.$ac_ext <<CF_EOF
2349 #include <stdio.h>
2350 int main()
2351 {
2352         ${cf_cv_main_return:-return}(0);
2353 }
2354 CF_EOF
2355 # We do the test twice because some compilers refuse to overwrite an
2356 # existing .o file with -o, though they will create one.
2357 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2358 if { (eval echo "$as_me:2358: \"$ac_try\"") >&5
2359   (eval $ac_try) 2>&5
2360   ac_status=$?
2361   echo "$as_me:2361: \$? = $ac_status" >&5
2362   (exit $ac_status); } &&
2363   test -f conftest2.$ac_objext && { (eval echo "$as_me:2363: \"$ac_try\"") >&5
2364   (eval $ac_try) 2>&5
2365   ac_status=$?
2366   echo "$as_me:2366: \$? = $ac_status" >&5
2367   (exit $ac_status); };
2368 then
2369   eval cf_cv_prog_CC_c_o=yes
2370 else
2371   eval cf_cv_prog_CC_c_o=no
2372 fi
2373 rm -f conftest*
2374
2375 fi
2376 if test $cf_cv_prog_CC_c_o = yes; then
2377   echo "$as_me:2377: result: yes" >&5
2378 echo "${ECHO_T}yes" >&6
2379 else
2380   echo "$as_me:2380: result: no" >&5
2381 echo "${ECHO_T}no" >&6
2382 fi
2383
2384 echo "$as_me:2384: checking for POSIXized ISC" >&5
2385 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2386 if test -d /etc/conf/kconfig.d &&
2387    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2388 then
2389   echo "$as_me:2389: result: yes" >&5
2390 echo "${ECHO_T}yes" >&6
2391   ISC=yes # If later tests want to check for ISC.
2392
2393 cat >>confdefs.h <<\EOF
2394 #define _POSIX_SOURCE 1
2395 EOF
2396
2397   if test "$GCC" = yes; then
2398     CC="$CC -posix"
2399   else
2400     CC="$CC -Xp"
2401   fi
2402 else
2403   echo "$as_me:2403: result: no" >&5
2404 echo "${ECHO_T}no" >&6
2405   ISC=
2406 fi
2407
2408 echo "$as_me:2408: checking for ${CC-cc} option to accept ANSI C" >&5
2409 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2410 if test "${cf_cv_ansi_cc+set}" = set; then
2411   echo $ECHO_N "(cached) $ECHO_C" >&6
2412 else
2413
2414 cf_cv_ansi_cc=no
2415 cf_save_CFLAGS="$CFLAGS"
2416 cf_save_CPPFLAGS="$CPPFLAGS"
2417 # Don't try gcc -ansi; that turns off useful extensions and
2418 # breaks some systems' header files.
2419 # AIX                   -qlanglvl=ansi
2420 # Ultrix and OSF/1      -std1
2421 # HP-UX                 -Aa -D_HPUX_SOURCE
2422 # SVR4                  -Xc
2423 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2424 for cf_arg in "-DCC_HAS_PROTOS" \
2425         "" \
2426         -qlanglvl=ansi \
2427         -std1 \
2428         -Ae \
2429         "-Aa -D_HPUX_SOURCE" \
2430         -Xc
2431 do
2432
2433 cf_fix_cppflags=no
2434 cf_new_cflags=
2435 cf_new_cppflags=
2436 cf_new_extra_cppflags=
2437
2438 for cf_add_cflags in $cf_arg
2439 do
2440 case $cf_fix_cppflags in
2441 no)
2442         case $cf_add_cflags in #(vi
2443         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2444                 case $cf_add_cflags in
2445                 -D*)
2446                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2447
2448                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2449                         && test -z "${cf_tst_cflags}" \
2450                         && cf_fix_cppflags=yes
2451
2452                         if test $cf_fix_cppflags = yes ; then
2453                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2454                                 continue
2455                         elif test "${cf_tst_cflags}" = "\"'" ; then
2456                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2457                                 continue
2458                         fi
2459                         ;;
2460                 esac
2461                 case "$CPPFLAGS" in
2462                 *$cf_add_cflags) #(vi
2463                         ;;
2464                 *) #(vi
2465                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2466                         ;;
2467                 esac
2468                 ;;
2469         *)
2470                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2471                 ;;
2472         esac
2473         ;;
2474 yes)
2475         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2476
2477         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2478
2479         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2480         && test -z "${cf_tst_cflags}" \
2481         && cf_fix_cppflags=no
2482         ;;
2483 esac
2484 done
2485
2486 if test -n "$cf_new_cflags" ; then
2487
2488         CFLAGS="$CFLAGS $cf_new_cflags"
2489 fi
2490
2491 if test -n "$cf_new_cppflags" ; then
2492
2493         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2494 fi
2495
2496 if test -n "$cf_new_extra_cppflags" ; then
2497
2498         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2499 fi
2500
2501         cat >conftest.$ac_ext <<_ACEOF
2502 #line 2502 "configure"
2503 #include "confdefs.h"
2504
2505 #ifndef CC_HAS_PROTOS
2506 #if !defined(__STDC__) || (__STDC__ != 1)
2507 choke me
2508 #endif
2509 #endif
2510
2511 int
2512 main ()
2513 {
2514
2515         int test (int i, double x);
2516         struct s1 {int (*f) (int a);};
2517         struct s2 {int (*f) (double a);};
2518   ;
2519   return 0;
2520 }
2521 _ACEOF
2522 rm -f conftest.$ac_objext
2523 if { (eval echo "$as_me:2523: \"$ac_compile\"") >&5
2524   (eval $ac_compile) 2>&5
2525   ac_status=$?
2526   echo "$as_me:2526: \$? = $ac_status" >&5
2527   (exit $ac_status); } &&
2528          { ac_try='test -s conftest.$ac_objext'
2529   { (eval echo "$as_me:2529: \"$ac_try\"") >&5
2530   (eval $ac_try) 2>&5
2531   ac_status=$?
2532   echo "$as_me:2532: \$? = $ac_status" >&5
2533   (exit $ac_status); }; }; then
2534   cf_cv_ansi_cc="$cf_arg"; break
2535 else
2536   echo "$as_me: failed program was:" >&5
2537 cat conftest.$ac_ext >&5
2538 fi
2539 rm -f conftest.$ac_objext conftest.$ac_ext
2540 done
2541 CFLAGS="$cf_save_CFLAGS"
2542 CPPFLAGS="$cf_save_CPPFLAGS"
2543
2544 fi
2545 echo "$as_me:2545: result: $cf_cv_ansi_cc" >&5
2546 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2547
2548 if test "$cf_cv_ansi_cc" != "no"; then
2549 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2550
2551 cf_fix_cppflags=no
2552 cf_new_cflags=
2553 cf_new_cppflags=
2554 cf_new_extra_cppflags=
2555
2556 for cf_add_cflags in $cf_cv_ansi_cc
2557 do
2558 case $cf_fix_cppflags in
2559 no)
2560         case $cf_add_cflags in #(vi
2561         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2562                 case $cf_add_cflags in
2563                 -D*)
2564                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2565
2566                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2567                         && test -z "${cf_tst_cflags}" \
2568                         && cf_fix_cppflags=yes
2569
2570                         if test $cf_fix_cppflags = yes ; then
2571                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2572                                 continue
2573                         elif test "${cf_tst_cflags}" = "\"'" ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         fi
2577                         ;;
2578                 esac
2579                 case "$CPPFLAGS" in
2580                 *$cf_add_cflags) #(vi
2581                         ;;
2582                 *) #(vi
2583                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2584                         ;;
2585                 esac
2586                 ;;
2587         *)
2588                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2589                 ;;
2590         esac
2591         ;;
2592 yes)
2593         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594
2595         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2596
2597         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2598         && test -z "${cf_tst_cflags}" \
2599         && cf_fix_cppflags=no
2600         ;;
2601 esac
2602 done
2603
2604 if test -n "$cf_new_cflags" ; then
2605
2606         CFLAGS="$CFLAGS $cf_new_cflags"
2607 fi
2608
2609 if test -n "$cf_new_cppflags" ; then
2610
2611         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2612 fi
2613
2614 if test -n "$cf_new_extra_cppflags" ; then
2615
2616         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2617 fi
2618
2619 else
2620         cat >>confdefs.h <<\EOF
2621 #define CC_HAS_PROTOS 1
2622 EOF
2623
2624 fi
2625 fi
2626
2627 if test "$cf_cv_ansi_cc" = "no"; then
2628         { { echo "$as_me:2628: error: Your compiler does not appear to recognize prototypes.
2629 You have the following choices:
2630         a. adjust your compiler options
2631         b. get an up-to-date compiler
2632         c. use a wrapper such as unproto" >&5
2633 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2634 You have the following choices:
2635         a. adjust your compiler options
2636         b. get an up-to-date compiler
2637         c. use a wrapper such as unproto" >&2;}
2638    { (exit 1); exit 1; }; }
2639 fi
2640
2641 case $cf_cv_system_name in
2642 os2*)
2643     CFLAGS="$CFLAGS -Zmt"
2644     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2645     CXXFLAGS="$CXXFLAGS -Zmt"
2646     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2647     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2648     ac_cv_exeext=.exe
2649     ;;
2650 esac
2651
2652 PROG_EXT="$EXEEXT"
2653
2654 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2655 #define PROG_EXT "$PROG_EXT"
2656 EOF
2657
2658 if test "$cross_compiling" = yes ; then
2659   LDCONFIG=:
2660 else
2661 case "$cf_cv_system_name" in #(vi
2662 freebsd*) #(vi
2663   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2664   ;;
2665 *) LDPATH=$PATH:/sbin:/usr/sbin
2666   # Extract the first word of "ldconfig", so it can be a program name with args.
2667 set dummy ldconfig; ac_word=$2
2668 echo "$as_me:2668: checking for $ac_word" >&5
2669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2670 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2671   echo $ECHO_N "(cached) $ECHO_C" >&6
2672 else
2673   case $LDCONFIG in
2674   [\\/]* | ?:[\\/]*)
2675   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2676   ;;
2677   *)
2678   ac_save_IFS=$IFS; IFS=$ac_path_separator
2679 ac_dummy="$LDPATH"
2680 for ac_dir in $ac_dummy; do
2681   IFS=$ac_save_IFS
2682   test -z "$ac_dir" && ac_dir=.
2683   if $as_executable_p "$ac_dir/$ac_word"; then
2684    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2685    echo "$as_me:2685: found $ac_dir/$ac_word" >&5
2686    break
2687 fi
2688 done
2689
2690   ;;
2691 esac
2692 fi
2693 LDCONFIG=$ac_cv_path_LDCONFIG
2694
2695 if test -n "$LDCONFIG"; then
2696   echo "$as_me:2696: result: $LDCONFIG" >&5
2697 echo "${ECHO_T}$LDCONFIG" >&6
2698 else
2699   echo "$as_me:2699: result: no" >&5
2700 echo "${ECHO_T}no" >&6
2701 fi
2702
2703   ;;
2704 esac
2705 fi
2706
2707 echo "$as_me:2707: checking if you want to ensure bool is consistent with C++" >&5
2708 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2709
2710 # Check whether --with-cxx or --without-cxx was given.
2711 if test "${with_cxx+set}" = set; then
2712   withval="$with_cxx"
2713   cf_with_cxx=$withval
2714 else
2715   cf_with_cxx=yes
2716 fi;
2717 echo "$as_me:2717: result: $cf_with_cxx" >&5
2718 echo "${ECHO_T}$cf_with_cxx" >&6
2719 if test "X$cf_with_cxx" = Xno ; then
2720         CXX=""
2721         GXX=""
2722 else
2723         # with autoconf 2.13, we can change the error to a warning:
2724                 ac_ext=cc
2725 ac_cpp='$CXXCPP $CPPFLAGS'
2726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2729 ac_main_return=return
2730 if test -n "$ac_tool_prefix"; then
2731   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2732   do
2733     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2734 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2735 echo "$as_me:2735: checking for $ac_word" >&5
2736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2737 if test "${ac_cv_prog_CXX+set}" = set; then
2738   echo $ECHO_N "(cached) $ECHO_C" >&6
2739 else
2740   if test -n "$CXX"; then
2741   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2742 else
2743   ac_save_IFS=$IFS; IFS=$ac_path_separator
2744 ac_dummy="$PATH"
2745 for ac_dir in $ac_dummy; do
2746   IFS=$ac_save_IFS
2747   test -z "$ac_dir" && ac_dir=.
2748   $as_executable_p "$ac_dir/$ac_word" || continue
2749 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2750 echo "$as_me:2750: found $ac_dir/$ac_word" >&5
2751 break
2752 done
2753
2754 fi
2755 fi
2756 CXX=$ac_cv_prog_CXX
2757 if test -n "$CXX"; then
2758   echo "$as_me:2758: result: $CXX" >&5
2759 echo "${ECHO_T}$CXX" >&6
2760 else
2761   echo "$as_me:2761: result: no" >&5
2762 echo "${ECHO_T}no" >&6
2763 fi
2764
2765     test -n "$CXX" && break
2766   done
2767 fi
2768 if test -z "$CXX"; then
2769   ac_ct_CXX=$CXX
2770   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2771 do
2772   # Extract the first word of "$ac_prog", so it can be a program name with args.
2773 set dummy $ac_prog; ac_word=$2
2774 echo "$as_me:2774: checking for $ac_word" >&5
2775 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2776 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2777   echo $ECHO_N "(cached) $ECHO_C" >&6
2778 else
2779   if test -n "$ac_ct_CXX"; then
2780   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2781 else
2782   ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 ac_dummy="$PATH"
2784 for ac_dir in $ac_dummy; do
2785   IFS=$ac_save_IFS
2786   test -z "$ac_dir" && ac_dir=.
2787   $as_executable_p "$ac_dir/$ac_word" || continue
2788 ac_cv_prog_ac_ct_CXX="$ac_prog"
2789 echo "$as_me:2789: found $ac_dir/$ac_word" >&5
2790 break
2791 done
2792
2793 fi
2794 fi
2795 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2796 if test -n "$ac_ct_CXX"; then
2797   echo "$as_me:2797: result: $ac_ct_CXX" >&5
2798 echo "${ECHO_T}$ac_ct_CXX" >&6
2799 else
2800   echo "$as_me:2800: result: no" >&5
2801 echo "${ECHO_T}no" >&6
2802 fi
2803
2804   test -n "$ac_ct_CXX" && break
2805 done
2806 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2807
2808   CXX=$ac_ct_CXX
2809 fi
2810
2811 # Provide some information about the compiler.
2812 echo "$as_me:2812:" \
2813      "checking for C++ compiler version" >&5
2814 ac_compiler=`set X $ac_compile; echo $2`
2815 { (eval echo "$as_me:2815: \"$ac_compiler --version </dev/null >&5\"") >&5
2816   (eval $ac_compiler --version </dev/null >&5) 2>&5
2817   ac_status=$?
2818   echo "$as_me:2818: \$? = $ac_status" >&5
2819   (exit $ac_status); }
2820 { (eval echo "$as_me:2820: \"$ac_compiler -v </dev/null >&5\"") >&5
2821   (eval $ac_compiler -v </dev/null >&5) 2>&5
2822   ac_status=$?
2823   echo "$as_me:2823: \$? = $ac_status" >&5
2824   (exit $ac_status); }
2825 { (eval echo "$as_me:2825: \"$ac_compiler -V </dev/null >&5\"") >&5
2826   (eval $ac_compiler -V </dev/null >&5) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); }
2830
2831 echo "$as_me:2831: checking whether we are using the GNU C++ compiler" >&5
2832 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2833 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2834   echo $ECHO_N "(cached) $ECHO_C" >&6
2835 else
2836   cat >conftest.$ac_ext <<_ACEOF
2837 #line 2837 "configure"
2838 #include "confdefs.h"
2839
2840 int
2841 main ()
2842 {
2843 #ifndef __GNUC__
2844        choke me
2845 #endif
2846
2847   ;
2848   return 0;
2849 }
2850 _ACEOF
2851 rm -f conftest.$ac_objext
2852 if { (eval echo "$as_me:2852: \"$ac_compile\"") >&5
2853   (eval $ac_compile) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); } &&
2857          { ac_try='test -s conftest.$ac_objext'
2858   { (eval echo "$as_me:2858: \"$ac_try\"") >&5
2859   (eval $ac_try) 2>&5
2860   ac_status=$?
2861   echo "$as_me:2861: \$? = $ac_status" >&5
2862   (exit $ac_status); }; }; then
2863   ac_compiler_gnu=yes
2864 else
2865   echo "$as_me: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2867 ac_compiler_gnu=no
2868 fi
2869 rm -f conftest.$ac_objext conftest.$ac_ext
2870 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2871
2872 fi
2873 echo "$as_me:2873: result: $ac_cv_cxx_compiler_gnu" >&5
2874 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2875 GXX=`test $ac_compiler_gnu = yes && echo yes`
2876 ac_test_CXXFLAGS=${CXXFLAGS+set}
2877 ac_save_CXXFLAGS=$CXXFLAGS
2878 CXXFLAGS="-g"
2879 echo "$as_me:2879: checking whether $CXX accepts -g" >&5
2880 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2881 if test "${ac_cv_prog_cxx_g+set}" = set; then
2882   echo $ECHO_N "(cached) $ECHO_C" >&6
2883 else
2884   cat >conftest.$ac_ext <<_ACEOF
2885 #line 2885 "configure"
2886 #include "confdefs.h"
2887
2888 int
2889 main ()
2890 {
2891
2892   ;
2893   return 0;
2894 }
2895 _ACEOF
2896 rm -f conftest.$ac_objext
2897 if { (eval echo "$as_me:2897: \"$ac_compile\"") >&5
2898   (eval $ac_compile) 2>&5
2899   ac_status=$?
2900   echo "$as_me:2900: \$? = $ac_status" >&5
2901   (exit $ac_status); } &&
2902          { ac_try='test -s conftest.$ac_objext'
2903   { (eval echo "$as_me:2903: \"$ac_try\"") >&5
2904   (eval $ac_try) 2>&5
2905   ac_status=$?
2906   echo "$as_me:2906: \$? = $ac_status" >&5
2907   (exit $ac_status); }; }; then
2908   ac_cv_prog_cxx_g=yes
2909 else
2910   echo "$as_me: failed program was:" >&5
2911 cat conftest.$ac_ext >&5
2912 ac_cv_prog_cxx_g=no
2913 fi
2914 rm -f conftest.$ac_objext conftest.$ac_ext
2915 fi
2916 echo "$as_me:2916: result: $ac_cv_prog_cxx_g" >&5
2917 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2918 if test "$ac_test_CXXFLAGS" = set; then
2919   CXXFLAGS=$ac_save_CXXFLAGS
2920 elif test $ac_cv_prog_cxx_g = yes; then
2921   if test "$GXX" = yes; then
2922     CXXFLAGS="-g -O2"
2923   else
2924     CXXFLAGS="-g"
2925   fi
2926 else
2927   if test "$GXX" = yes; then
2928     CXXFLAGS="-O2"
2929   else
2930     CXXFLAGS=
2931   fi
2932 fi
2933 for ac_declaration in \
2934    ''\
2935    '#include <stdlib.h>' \
2936    'extern "C" void std::exit (int) throw (); using std::exit;' \
2937    'extern "C" void std::exit (int); using std::exit;' \
2938    'extern "C" void exit (int) throw ();' \
2939    'extern "C" void exit (int);' \
2940    'void exit (int);'
2941 do
2942   cat >conftest.$ac_ext <<_ACEOF
2943 #line 2943 "configure"
2944 #include "confdefs.h"
2945 #include <stdlib.h>
2946 $ac_declaration
2947 int
2948 main ()
2949 {
2950 exit (42);
2951   ;
2952   return 0;
2953 }
2954 _ACEOF
2955 rm -f conftest.$ac_objext
2956 if { (eval echo "$as_me:2956: \"$ac_compile\"") >&5
2957   (eval $ac_compile) 2>&5
2958   ac_status=$?
2959   echo "$as_me:2959: \$? = $ac_status" >&5
2960   (exit $ac_status); } &&
2961          { ac_try='test -s conftest.$ac_objext'
2962   { (eval echo "$as_me:2962: \"$ac_try\"") >&5
2963   (eval $ac_try) 2>&5
2964   ac_status=$?
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit $ac_status); }; }; then
2967   :
2968 else
2969   echo "$as_me: failed program was:" >&5
2970 cat conftest.$ac_ext >&5
2971 continue
2972 fi
2973 rm -f conftest.$ac_objext conftest.$ac_ext
2974   cat >conftest.$ac_ext <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 $ac_declaration
2978 int
2979 main ()
2980 {
2981 exit (42);
2982   ;
2983   return 0;
2984 }
2985 _ACEOF
2986 rm -f conftest.$ac_objext
2987 if { (eval echo "$as_me:2987: \"$ac_compile\"") >&5
2988   (eval $ac_compile) 2>&5
2989   ac_status=$?
2990   echo "$as_me:2990: \$? = $ac_status" >&5
2991   (exit $ac_status); } &&
2992          { ac_try='test -s conftest.$ac_objext'
2993   { (eval echo "$as_me:2993: \"$ac_try\"") >&5
2994   (eval $ac_try) 2>&5
2995   ac_status=$?
2996   echo "$as_me:2996: \$? = $ac_status" >&5
2997   (exit $ac_status); }; }; then
2998   break
2999 else
3000   echo "$as_me: failed program was:" >&5
3001 cat conftest.$ac_ext >&5
3002 fi
3003 rm -f conftest.$ac_objext conftest.$ac_ext
3004 done
3005 rm -f conftest*
3006 if test -n "$ac_declaration"; then
3007   echo '#ifdef __cplusplus' >>confdefs.h
3008   echo $ac_declaration      >>confdefs.h
3009   echo '#endif'             >>confdefs.h
3010 fi
3011
3012 ac_ext=c
3013 ac_cpp='$CPP $CPPFLAGS'
3014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3017 ac_main_return=return
3018
3019                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3020         if test "$CXX" = "g++" ; then
3021                 # Extract the first word of "g++", so it can be a program name with args.
3022 set dummy g++; ac_word=$2
3023 echo "$as_me:3023: checking for $ac_word" >&5
3024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3025 if test "${ac_cv_path_CXX+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028   case $CXX in
3029   [\\/]* | ?:[\\/]*)
3030   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3031   ;;
3032   *)
3033   ac_save_IFS=$IFS; IFS=$ac_path_separator
3034 ac_dummy="$PATH"
3035 for ac_dir in $ac_dummy; do
3036   IFS=$ac_save_IFS
3037   test -z "$ac_dir" && ac_dir=.
3038   if $as_executable_p "$ac_dir/$ac_word"; then
3039    ac_cv_path_CXX="$ac_dir/$ac_word"
3040    echo "$as_me:3040: found $ac_dir/$ac_word" >&5
3041    break
3042 fi
3043 done
3044
3045   ;;
3046 esac
3047 fi
3048 CXX=$ac_cv_path_CXX
3049
3050 if test -n "$CXX"; then
3051   echo "$as_me:3051: result: $CXX" >&5
3052 echo "${ECHO_T}$CXX" >&6
3053 else
3054   echo "$as_me:3054: result: no" >&5
3055 echo "${ECHO_T}no" >&6
3056 fi
3057
3058         fi
3059         if test "$CXX" = "g++" ; then
3060                 { echo "$as_me:3060: WARNING: ignoring hardcoded g++" >&5
3061 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3062                 cf_with_cxx=no; CXX=""; GXX="";
3063         fi
3064 fi
3065
3066 GXX_VERSION=none
3067 if test "$GXX" = yes; then
3068         echo "$as_me:3068: checking version of g++" >&5
3069 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3070         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3071         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3072         echo "$as_me:3072: result: $GXX_VERSION" >&5
3073 echo "${ECHO_T}$GXX_VERSION" >&6
3074 fi
3075
3076 case $GXX_VERSION in
3077 1*|2.[0-6]*)
3078         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3079         # cf_cxx_library=no
3080         { echo "$as_me:3080: WARNING: templates do not work" >&5
3081 echo "$as_me: WARNING: templates do not work" >&2;}
3082         ;;
3083 esac
3084
3085 echo "$as_me:3085: checking if you want to build C++ binding and demo" >&5
3086 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3087
3088 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3089 if test "${with_cxx_binding+set}" = set; then
3090   withval="$with_cxx_binding"
3091   cf_with_cxx_binding=$withval
3092 else
3093   cf_with_cxx_binding=$cf_with_cxx
3094 fi;
3095 echo "$as_me:3095: result: $cf_with_cxx_binding" >&5
3096 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3097
3098 echo "$as_me:3098: checking if you want to build with Ada95" >&5
3099 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3100
3101 # Check whether --with-ada or --without-ada was given.
3102 if test "${with_ada+set}" = set; then
3103   withval="$with_ada"
3104   cf_with_ada=$withval
3105 else
3106   cf_with_ada=yes
3107 fi;
3108 echo "$as_me:3108: result: $cf_with_ada" >&5
3109 echo "${ECHO_T}$cf_with_ada" >&6
3110
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116   withval="$with_progs"
3117   cf_with_progs=$withval
3118 else
3119   cf_with_progs=yes
3120 fi;
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3123
3124 echo "$as_me:3124: checking if you wish to install curses.h" >&5
3125 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3126
3127 # Check whether --with-curses-h or --without-curses-h was given.
3128 if test "${with_curses_h+set}" = set; then
3129   withval="$with_curses_h"
3130   with_curses_h=$withval
3131 else
3132   with_curses_h=yes
3133 fi;
3134 echo "$as_me:3134: result: $with_curses_h" >&5
3135 echo "${ECHO_T}$with_curses_h" >&6
3136
3137 modules_to_build="ncurses"
3138 if test "X$cf_with_progs" != Xno ; then
3139 modules_to_build="$modules_to_build progs tack"
3140 fi
3141 modules_to_build="$modules_to_build panel menu form"
3142
3143 test "$program_prefix" != NONE &&
3144   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3145 # Use a double $ so make ignores it.
3146 test "$program_suffix" != NONE &&
3147   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3148 # Double any \ or $.  echo might interpret backslashes.
3149 # By default was `s,x,x', remove it if useless.
3150 cat <<\_ACEOF >conftest.sed
3151 s/[\\$]/&&/g;s/;s,x,x,$//
3152 _ACEOF
3153 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3154 rm conftest.sed
3155
3156 for ac_prog in mawk gawk nawk awk
3157 do
3158   # Extract the first word of "$ac_prog", so it can be a program name with args.
3159 set dummy $ac_prog; ac_word=$2
3160 echo "$as_me:3160: checking for $ac_word" >&5
3161 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3162 if test "${ac_cv_prog_AWK+set}" = set; then
3163   echo $ECHO_N "(cached) $ECHO_C" >&6
3164 else
3165   if test -n "$AWK"; then
3166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3167 else
3168   ac_save_IFS=$IFS; IFS=$ac_path_separator
3169 ac_dummy="$PATH"
3170 for ac_dir in $ac_dummy; do
3171   IFS=$ac_save_IFS
3172   test -z "$ac_dir" && ac_dir=.
3173   $as_executable_p "$ac_dir/$ac_word" || continue
3174 ac_cv_prog_AWK="$ac_prog"
3175 echo "$as_me:3175: found $ac_dir/$ac_word" >&5
3176 break
3177 done
3178
3179 fi
3180 fi
3181 AWK=$ac_cv_prog_AWK
3182 if test -n "$AWK"; then
3183   echo "$as_me:3183: result: $AWK" >&5
3184 echo "${ECHO_T}$AWK" >&6
3185 else
3186   echo "$as_me:3186: result: no" >&5
3187 echo "${ECHO_T}no" >&6
3188 fi
3189
3190   test -n "$AWK" && break
3191 done
3192
3193 test -z "$AWK" && { { echo "$as_me:3193: error: No awk program found" >&5
3194 echo "$as_me: error: No awk program found" >&2;}
3195    { (exit 1); exit 1; }; }
3196
3197 echo "$as_me:3197: checking for egrep" >&5
3198 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3199 if test "${ac_cv_prog_egrep+set}" = set; then
3200   echo $ECHO_N "(cached) $ECHO_C" >&6
3201 else
3202   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3203     then ac_cv_prog_egrep='grep -E'
3204     else ac_cv_prog_egrep='egrep'
3205     fi
3206 fi
3207 echo "$as_me:3207: result: $ac_cv_prog_egrep" >&5
3208 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3209  EGREP=$ac_cv_prog_egrep
3210
3211 test -z "$EGREP" && { { echo "$as_me:3211: error: No egrep program found" >&5
3212 echo "$as_me: error: No egrep program found" >&2;}
3213    { (exit 1); exit 1; }; }
3214
3215 # Find a good install program.  We prefer a C program (faster),
3216 # so one script is as good as another.  But avoid the broken or
3217 # incompatible versions:
3218 # SysV /etc/install, /usr/sbin/install
3219 # SunOS /usr/etc/install
3220 # IRIX /sbin/install
3221 # AIX /bin/install
3222 # AmigaOS /C/install, which installs bootblocks on floppy discs
3223 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3224 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3225 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3226 # ./install, which can be erroneously created by make from ./install.sh.
3227 echo "$as_me:3227: checking for a BSD compatible install" >&5
3228 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3229 if test -z "$INSTALL"; then
3230 if test "${ac_cv_path_install+set}" = set; then
3231   echo $ECHO_N "(cached) $ECHO_C" >&6
3232 else
3233     ac_save_IFS=$IFS; IFS=$ac_path_separator
3234   for ac_dir in $PATH; do
3235     IFS=$ac_save_IFS
3236     # Account for people who put trailing slashes in PATH elements.
3237     case $ac_dir/ in
3238     / | ./ | .// | /cC/* \
3239     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3240     | /usr/ucb/* ) ;;
3241     *)
3242       # OSF1 and SCO ODT 3.0 have their own names for install.
3243       # Don't use installbsd from OSF since it installs stuff as root
3244       # by default.
3245       for ac_prog in ginstall scoinst install; do
3246         if $as_executable_p "$ac_dir/$ac_prog"; then
3247           if test $ac_prog = install &&
3248             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3249             # AIX install.  It has an incompatible calling convention.
3250             :
3251           elif test $ac_prog = install &&
3252             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3253             # program-specific install script used by HP pwplus--don't use.
3254             :
3255           else
3256             ac_cv_path_install="$ac_dir/$ac_prog -c"
3257             break 2
3258           fi
3259         fi
3260       done
3261       ;;
3262     esac
3263   done
3264
3265 fi
3266   if test "${ac_cv_path_install+set}" = set; then
3267     INSTALL=$ac_cv_path_install
3268   else
3269     # As a last resort, use the slow shell script.  We don't cache a
3270     # path for INSTALL within a source directory, because that will
3271     # break other packages using the cache if that directory is
3272     # removed, or if the path is relative.
3273     INSTALL=$ac_install_sh
3274   fi
3275 fi
3276 echo "$as_me:3276: result: $INSTALL" >&5
3277 echo "${ECHO_T}$INSTALL" >&6
3278
3279 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3280 # It thinks the first close brace ends the variable substitution.
3281 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3282
3283 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3284
3285 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3286
3287 case $INSTALL in
3288 /*)
3289   ;;
3290 *)
3291   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3292   test -z "$cf_dir" && cf_dir=.
3293   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3294   ;;
3295 esac
3296
3297 for ac_prog in tdlint lint alint
3298 do
3299   # Extract the first word of "$ac_prog", so it can be a program name with args.
3300 set dummy $ac_prog; ac_word=$2
3301 echo "$as_me:3301: checking for $ac_word" >&5
3302 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3303 if test "${ac_cv_prog_LINT+set}" = set; then
3304   echo $ECHO_N "(cached) $ECHO_C" >&6
3305 else
3306   if test -n "$LINT"; then
3307   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3308 else
3309   ac_save_IFS=$IFS; IFS=$ac_path_separator
3310 ac_dummy="$PATH"
3311 for ac_dir in $ac_dummy; do
3312   IFS=$ac_save_IFS
3313   test -z "$ac_dir" && ac_dir=.
3314   $as_executable_p "$ac_dir/$ac_word" || continue
3315 ac_cv_prog_LINT="$ac_prog"
3316 echo "$as_me:3316: found $ac_dir/$ac_word" >&5
3317 break
3318 done
3319
3320 fi
3321 fi
3322 LINT=$ac_cv_prog_LINT
3323 if test -n "$LINT"; then
3324   echo "$as_me:3324: result: $LINT" >&5
3325 echo "${ECHO_T}$LINT" >&6
3326 else
3327   echo "$as_me:3327: result: no" >&5
3328 echo "${ECHO_T}no" >&6
3329 fi
3330
3331   test -n "$LINT" && break
3332 done
3333
3334 echo "$as_me:3334: checking whether ln -s works" >&5
3335 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3336 LN_S=$as_ln_s
3337 if test "$LN_S" = "ln -s"; then
3338   echo "$as_me:3338: result: yes" >&5
3339 echo "${ECHO_T}yes" >&6
3340 else
3341   echo "$as_me:3341: result: no, using $LN_S" >&5
3342 echo "${ECHO_T}no, using $LN_S" >&6
3343 fi
3344
3345 echo "$as_me:3345: checking whether ${MAKE-make} sets \${MAKE}" >&5
3346 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3347 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3348 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   cat >conftest.make <<\EOF
3352 all:
3353         @echo 'ac_maketemp="${MAKE}"'
3354 EOF
3355 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3356 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3357 if test -n "$ac_maketemp"; then
3358   eval ac_cv_prog_make_${ac_make}_set=yes
3359 else
3360   eval ac_cv_prog_make_${ac_make}_set=no
3361 fi
3362 rm -f conftest.make
3363 fi
3364 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3365   echo "$as_me:3365: result: yes" >&5
3366 echo "${ECHO_T}yes" >&6
3367   SET_MAKE=
3368 else
3369   echo "$as_me:3369: result: no" >&5
3370 echo "${ECHO_T}no" >&6
3371   SET_MAKE="MAKE=${MAKE-make}"
3372 fi
3373
3374 echo "$as_me:3374: checking if filesystem supports mixed-case filenames" >&5
3375 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3376 if test "${cf_cv_mixedcase+set}" = set; then
3377   echo $ECHO_N "(cached) $ECHO_C" >&6
3378 else
3379
3380 if test "$cross_compiling" = yes ; then
3381         case $target_alias in #(vi
3382         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3383                 cf_cv_mixedcase=no
3384                 ;;
3385         *)
3386                 cf_cv_mixedcase=yes
3387                 ;;
3388         esac
3389 else
3390         rm -f conftest CONFTEST
3391         echo test >conftest
3392         if test -f CONFTEST ; then
3393                 cf_cv_mixedcase=no
3394         else
3395                 cf_cv_mixedcase=yes
3396         fi
3397         rm -f conftest CONFTEST
3398 fi
3399
3400 fi
3401 echo "$as_me:3401: result: $cf_cv_mixedcase" >&5
3402 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3403 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3404 #define MIXEDCASE_FILENAMES 1
3405 EOF
3406
3407 # Extract the first word of "ctags", so it can be a program name with args.
3408 set dummy ctags; ac_word=$2
3409 echo "$as_me:3409: checking for $ac_word" >&5
3410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3411 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3412   echo $ECHO_N "(cached) $ECHO_C" >&6
3413 else
3414   if test -n "$MAKE_LOWER_TAGS"; then
3415   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3416 else
3417   ac_save_IFS=$IFS; IFS=$ac_path_separator
3418 ac_dummy="$PATH"
3419 for ac_dir in $ac_dummy; do
3420   IFS=$ac_save_IFS
3421   test -z "$ac_dir" && ac_dir=.
3422   $as_executable_p "$ac_dir/$ac_word" || continue
3423 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3424 echo "$as_me:3424: found $ac_dir/$ac_word" >&5
3425 break
3426 done
3427
3428   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3429 fi
3430 fi
3431 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3432 if test -n "$MAKE_LOWER_TAGS"; then
3433   echo "$as_me:3433: result: $MAKE_LOWER_TAGS" >&5
3434 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3435 else
3436   echo "$as_me:3436: result: no" >&5
3437 echo "${ECHO_T}no" >&6
3438 fi
3439
3440 if test "$cf_cv_mixedcase" = yes ; then
3441         # Extract the first word of "etags", so it can be a program name with args.
3442 set dummy etags; ac_word=$2
3443 echo "$as_me:3443: checking for $ac_word" >&5
3444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3445 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3446   echo $ECHO_N "(cached) $ECHO_C" >&6
3447 else
3448   if test -n "$MAKE_UPPER_TAGS"; then
3449   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3450 else
3451   ac_save_IFS=$IFS; IFS=$ac_path_separator
3452 ac_dummy="$PATH"
3453 for ac_dir in $ac_dummy; do
3454   IFS=$ac_save_IFS
3455   test -z "$ac_dir" && ac_dir=.
3456   $as_executable_p "$ac_dir/$ac_word" || continue
3457 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3458 echo "$as_me:3458: found $ac_dir/$ac_word" >&5
3459 break
3460 done
3461
3462   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3463 fi
3464 fi
3465 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3466 if test -n "$MAKE_UPPER_TAGS"; then
3467   echo "$as_me:3467: result: $MAKE_UPPER_TAGS" >&5
3468 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3469 else
3470   echo "$as_me:3470: result: no" >&5
3471 echo "${ECHO_T}no" >&6
3472 fi
3473
3474 else
3475         MAKE_UPPER_TAGS=no
3476 fi
3477
3478 if test "$MAKE_UPPER_TAGS" = yes ; then
3479         MAKE_UPPER_TAGS=
3480 else
3481         MAKE_UPPER_TAGS="#"
3482 fi
3483
3484 if test "$MAKE_LOWER_TAGS" = yes ; then
3485         MAKE_LOWER_TAGS=
3486 else
3487         MAKE_LOWER_TAGS="#"
3488 fi
3489
3490 echo "$as_me:3490: checking for makeflags variable" >&5
3491 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3492 if test "${cf_cv_makeflags+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495
3496         cf_cv_makeflags=''
3497         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3498         do
3499                 cat >cf_makeflags.tmp <<CF_EOF
3500 SHELL = /bin/sh
3501 all :
3502         @ echo '.$cf_option'
3503 CF_EOF
3504                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3505                 case "$cf_result" in
3506                 .*k)
3507                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3508                         case "$cf_result" in
3509                         .*CC=*) cf_cv_makeflags=
3510                                 ;;
3511                         *)      cf_cv_makeflags=$cf_option
3512                                 ;;
3513                         esac
3514                         break
3515                         ;;
3516                 .-)     ;;
3517                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3518                         ;;
3519                 esac
3520         done
3521         rm -f cf_makeflags.tmp
3522
3523 fi
3524 echo "$as_me:3524: result: $cf_cv_makeflags" >&5
3525 echo "${ECHO_T}$cf_cv_makeflags" >&6
3526
3527 echo "$as_me:3527: checking for long file names" >&5
3528 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3529 if test "${ac_cv_sys_long_file_names+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   ac_cv_sys_long_file_names=yes
3533 # Test for long file names in all the places we know might matter:
3534 #      .                the current directory, where building will happen
3535 #      $prefix/lib      where we will be installing things
3536 #      $exec_prefix/lib likewise
3537 # eval it to expand exec_prefix.
3538 #      $TMPDIR          if set, where it might want to write temporary files
3539 # if $TMPDIR is not set:
3540 #      /tmp             where it might want to write temporary files
3541 #      /var/tmp         likewise
3542 #      /usr/tmp         likewise
3543 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3544   ac_tmpdirs=$TMPDIR
3545 else
3546   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3547 fi
3548 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3549   test -d $ac_dir || continue
3550   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3551   ac_xdir=$ac_dir/cf$$
3552   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3553   ac_tf1=$ac_xdir/conftest9012345
3554   ac_tf2=$ac_xdir/conftest9012346
3555   (echo 1 >$ac_tf1) 2>/dev/null
3556   (echo 2 >$ac_tf2) 2>/dev/null
3557   ac_val=`cat $ac_tf1 2>/dev/null`
3558   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3559     ac_cv_sys_long_file_names=no
3560     rm -rf $ac_xdir 2>/dev/null
3561     break
3562   fi
3563   rm -rf $ac_xdir 2>/dev/null
3564 done
3565 fi
3566 echo "$as_me:3566: result: $ac_cv_sys_long_file_names" >&5
3567 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3568 if test $ac_cv_sys_long_file_names = yes; then
3569
3570 cat >>confdefs.h <<\EOF
3571 #define HAVE_LONG_FILE_NAMES 1
3572 EOF
3573
3574 fi
3575
3576 echo "$as_me:3576: checking if filesystem supports mixed-case filenames" >&5
3577 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3578 if test "${cf_cv_mixedcase+set}" = set; then
3579   echo $ECHO_N "(cached) $ECHO_C" >&6
3580 else
3581
3582 if test "$cross_compiling" = yes ; then
3583         case $target_alias in #(vi
3584         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3585                 cf_cv_mixedcase=no
3586                 ;;
3587         *)
3588                 cf_cv_mixedcase=yes
3589                 ;;
3590         esac
3591 else
3592         rm -f conftest CONFTEST
3593         echo test >conftest
3594         if test -f CONFTEST ; then
3595                 cf_cv_mixedcase=no
3596         else
3597                 cf_cv_mixedcase=yes
3598         fi
3599         rm -f conftest CONFTEST
3600 fi
3601
3602 fi
3603 echo "$as_me:3603: result: $cf_cv_mixedcase" >&5
3604 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3605 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3606 #define MIXEDCASE_FILENAMES 1
3607 EOF
3608
3609 if test -n "$ac_tool_prefix"; then
3610   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3611 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3612 echo "$as_me:3612: checking for $ac_word" >&5
3613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3614 if test "${ac_cv_prog_RANLIB+set}" = set; then
3615   echo $ECHO_N "(cached) $ECHO_C" >&6
3616 else
3617   if test -n "$RANLIB"; then
3618   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3619 else
3620   ac_save_IFS=$IFS; IFS=$ac_path_separator
3621 ac_dummy="$PATH"
3622 for ac_dir in $ac_dummy; do
3623   IFS=$ac_save_IFS
3624   test -z "$ac_dir" && ac_dir=.
3625   $as_executable_p "$ac_dir/$ac_word" || continue
3626 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3627 echo "$as_me:3627: found $ac_dir/$ac_word" >&5
3628 break
3629 done
3630
3631 fi
3632 fi
3633 RANLIB=$ac_cv_prog_RANLIB
3634 if test -n "$RANLIB"; then
3635   echo "$as_me:3635: result: $RANLIB" >&5
3636 echo "${ECHO_T}$RANLIB" >&6
3637 else
3638   echo "$as_me:3638: result: no" >&5
3639 echo "${ECHO_T}no" >&6
3640 fi
3641
3642 fi
3643 if test -z "$ac_cv_prog_RANLIB"; then
3644   ac_ct_RANLIB=$RANLIB
3645   # Extract the first word of "ranlib", so it can be a program name with args.
3646 set dummy ranlib; ac_word=$2
3647 echo "$as_me:3647: checking for $ac_word" >&5
3648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3649 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3650   echo $ECHO_N "(cached) $ECHO_C" >&6
3651 else
3652   if test -n "$ac_ct_RANLIB"; then
3653   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3654 else
3655   ac_save_IFS=$IFS; IFS=$ac_path_separator
3656 ac_dummy="$PATH"
3657 for ac_dir in $ac_dummy; do
3658   IFS=$ac_save_IFS
3659   test -z "$ac_dir" && ac_dir=.
3660   $as_executable_p "$ac_dir/$ac_word" || continue
3661 ac_cv_prog_ac_ct_RANLIB="ranlib"
3662 echo "$as_me:3662: found $ac_dir/$ac_word" >&5
3663 break
3664 done
3665
3666   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3667 fi
3668 fi
3669 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3670 if test -n "$ac_ct_RANLIB"; then
3671   echo "$as_me:3671: result: $ac_ct_RANLIB" >&5
3672 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3673 else
3674   echo "$as_me:3674: result: no" >&5
3675 echo "${ECHO_T}no" >&6
3676 fi
3677
3678   RANLIB=$ac_ct_RANLIB
3679 else
3680   RANLIB="$ac_cv_prog_RANLIB"
3681 fi
3682
3683 if test -n "$ac_tool_prefix"; then
3684   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3685 set dummy ${ac_tool_prefix}ld; ac_word=$2
3686 echo "$as_me:3686: checking for $ac_word" >&5
3687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3688 if test "${ac_cv_prog_LD+set}" = set; then
3689   echo $ECHO_N "(cached) $ECHO_C" >&6
3690 else
3691   if test -n "$LD"; then
3692   ac_cv_prog_LD="$LD" # Let the user override the test.
3693 else
3694   ac_save_IFS=$IFS; IFS=$ac_path_separator
3695 ac_dummy="$PATH"
3696 for ac_dir in $ac_dummy; do
3697   IFS=$ac_save_IFS
3698   test -z "$ac_dir" && ac_dir=.
3699   $as_executable_p "$ac_dir/$ac_word" || continue
3700 ac_cv_prog_LD="${ac_tool_prefix}ld"
3701 echo "$as_me:3701: found $ac_dir/$ac_word" >&5
3702 break
3703 done
3704
3705 fi
3706 fi
3707 LD=$ac_cv_prog_LD
3708 if test -n "$LD"; then
3709   echo "$as_me:3709: result: $LD" >&5
3710 echo "${ECHO_T}$LD" >&6
3711 else
3712   echo "$as_me:3712: result: no" >&5
3713 echo "${ECHO_T}no" >&6
3714 fi
3715
3716 fi
3717 if test -z "$ac_cv_prog_LD"; then
3718   ac_ct_LD=$LD
3719   # Extract the first word of "ld", so it can be a program name with args.
3720 set dummy ld; ac_word=$2
3721 echo "$as_me:3721: checking for $ac_word" >&5
3722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3723 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726   if test -n "$ac_ct_LD"; then
3727   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3728 else
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   $as_executable_p "$ac_dir/$ac_word" || continue
3735 ac_cv_prog_ac_ct_LD="ld"
3736 echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737 break
3738 done
3739
3740   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3741 fi
3742 fi
3743 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3744 if test -n "$ac_ct_LD"; then
3745   echo "$as_me:3745: result: $ac_ct_LD" >&5
3746 echo "${ECHO_T}$ac_ct_LD" >&6
3747 else
3748   echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3750 fi
3751
3752   LD=$ac_ct_LD
3753 else
3754   LD="$ac_cv_prog_LD"
3755 fi
3756
3757 if test -n "$ac_tool_prefix"; then
3758   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3759 set dummy ${ac_tool_prefix}ar; ac_word=$2
3760 echo "$as_me:3760: checking for $ac_word" >&5
3761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3762 if test "${ac_cv_prog_AR+set}" = set; then
3763   echo $ECHO_N "(cached) $ECHO_C" >&6
3764 else
3765   if test -n "$AR"; then
3766   ac_cv_prog_AR="$AR" # Let the user override the test.
3767 else
3768   ac_save_IFS=$IFS; IFS=$ac_path_separator
3769 ac_dummy="$PATH"
3770 for ac_dir in $ac_dummy; do
3771   IFS=$ac_save_IFS
3772   test -z "$ac_dir" && ac_dir=.
3773   $as_executable_p "$ac_dir/$ac_word" || continue
3774 ac_cv_prog_AR="${ac_tool_prefix}ar"
3775 echo "$as_me:3775: found $ac_dir/$ac_word" >&5
3776 break
3777 done
3778
3779 fi
3780 fi
3781 AR=$ac_cv_prog_AR
3782 if test -n "$AR"; then
3783   echo "$as_me:3783: result: $AR" >&5
3784 echo "${ECHO_T}$AR" >&6
3785 else
3786   echo "$as_me:3786: result: no" >&5
3787 echo "${ECHO_T}no" >&6
3788 fi
3789
3790 fi
3791 if test -z "$ac_cv_prog_AR"; then
3792   ac_ct_AR=$AR
3793   # Extract the first word of "ar", so it can be a program name with args.
3794 set dummy ar; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$ac_ct_AR"; then
3801   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_ac_ct_AR="ar"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3815 fi
3816 fi
3817 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3818 if test -n "$ac_ct_AR"; then
3819   echo "$as_me:3819: result: $ac_ct_AR" >&5
3820 echo "${ECHO_T}$ac_ct_AR" >&6
3821 else
3822   echo "$as_me:3822: result: no" >&5
3823 echo "${ECHO_T}no" >&6
3824 fi
3825
3826   AR=$ac_ct_AR
3827 else
3828   AR="$ac_cv_prog_AR"
3829 fi
3830
3831 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3832   echo $ECHO_N "(cached) $ECHO_C" >&6
3833 else
3834
3835 echo "$as_me:3835: checking for archiver options (symbol AR_OPTS)" >&5
3836 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3837
3838 if test -z "$AR_OPTS" ; then
3839         AR_OPTS=rv
3840
3841 fi
3842
3843 cf_cv_subst_AR_OPTS=$AR_OPTS
3844 echo "$as_me:3844: result: $AR_OPTS" >&5
3845 echo "${ECHO_T}$AR_OPTS" >&6
3846
3847 fi
3848
3849 echo "$as_me:3849: checking if you have specified an install-prefix" >&5
3850 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3851
3852 # Check whether --with-install-prefix or --without-install-prefix was given.
3853 if test "${with_install_prefix+set}" = set; then
3854   withval="$with_install_prefix"
3855   case "$withval" in #(vi
3856         yes|no) #(vi
3857                 ;;
3858         *)      DESTDIR="$withval"
3859                 ;;
3860         esac
3861 fi;
3862 echo "$as_me:3862: result: $DESTDIR" >&5
3863 echo "${ECHO_T}$DESTDIR" >&6
3864
3865 ###############################################################################
3866
3867 # If we're cross-compiling, allow the user to override the tools and their
3868 # options.  The configure script is oriented toward identifying the host
3869 # compiler, etc., but we need a build compiler to generate parts of the source.
3870
3871 if test "$cross_compiling" = yes ; then
3872
3873         # defaults that we might want to override
3874         : ${BUILD_CFLAGS:=''}
3875         : ${BUILD_CPPFLAGS:=''}
3876         : ${BUILD_LDFLAGS:=''}
3877         : ${BUILD_LIBS:=''}
3878         : ${BUILD_EXEEXT:='$x'}
3879         : ${BUILD_OBJEXT:='o'}
3880
3881 # Check whether --with-build-cc or --without-build-cc was given.
3882 if test "${with_build_cc+set}" = set; then
3883   withval="$with_build_cc"
3884   BUILD_CC="$withval"
3885 else
3886   for ac_prog in gcc cc cl
3887 do
3888   # Extract the first word of "$ac_prog", so it can be a program name with args.
3889 set dummy $ac_prog; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if test -n "$BUILD_CC"; then
3896   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3897 else
3898   ac_save_IFS=$IFS; IFS=$ac_path_separator
3899 ac_dummy="$PATH"
3900 for ac_dir in $ac_dummy; do
3901   IFS=$ac_save_IFS
3902   test -z "$ac_dir" && ac_dir=.
3903   $as_executable_p "$ac_dir/$ac_word" || continue
3904 ac_cv_prog_BUILD_CC="$ac_prog"
3905 echo "$as_me:3905: found $ac_dir/$ac_word" >&5
3906 break
3907 done
3908
3909 fi
3910 fi
3911 BUILD_CC=$ac_cv_prog_BUILD_CC
3912 if test -n "$BUILD_CC"; then
3913   echo "$as_me:3913: result: $BUILD_CC" >&5
3914 echo "${ECHO_T}$BUILD_CC" >&6
3915 else
3916   echo "$as_me:3916: result: no" >&5
3917 echo "${ECHO_T}no" >&6
3918 fi
3919
3920   test -n "$BUILD_CC" && break
3921 done
3922
3923 fi;
3924         echo "$as_me:3924: checking for native build C compiler" >&5
3925 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3926         echo "$as_me:3926: result: $BUILD_CC" >&5
3927 echo "${ECHO_T}$BUILD_CC" >&6
3928
3929         echo "$as_me:3929: checking for native build C preprocessor" >&5
3930 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3931
3932 # Check whether --with-build-cpp or --without-build-cpp was given.
3933 if test "${with_build_cpp+set}" = set; then
3934   withval="$with_build_cpp"
3935   BUILD_CPP="$withval"
3936 else
3937   BUILD_CPP='${BUILD_CC} -E'
3938 fi;
3939         echo "$as_me:3939: result: $BUILD_CPP" >&5
3940 echo "${ECHO_T}$BUILD_CPP" >&6
3941
3942         echo "$as_me:3942: checking for native build C flags" >&5
3943 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3944
3945 # Check whether --with-build-cflags or --without-build-cflags was given.
3946 if test "${with_build_cflags+set}" = set; then
3947   withval="$with_build_cflags"
3948   BUILD_CFLAGS="$withval"
3949 fi;
3950         echo "$as_me:3950: result: $BUILD_CFLAGS" >&5
3951 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3952
3953         echo "$as_me:3953: checking for native build C preprocessor-flags" >&5
3954 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3955
3956 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3957 if test "${with_build_cppflags+set}" = set; then
3958   withval="$with_build_cppflags"
3959   BUILD_CPPFLAGS="$withval"
3960 fi;
3961         echo "$as_me:3961: result: $BUILD_CPPFLAGS" >&5
3962 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3963
3964         echo "$as_me:3964: checking for native build linker-flags" >&5
3965 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3966
3967 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3968 if test "${with_build_ldflags+set}" = set; then
3969   withval="$with_build_ldflags"
3970   BUILD_LDFLAGS="$withval"
3971 fi;
3972         echo "$as_me:3972: result: $BUILD_LDFLAGS" >&5
3973 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3974
3975         echo "$as_me:3975: checking for native build linker-libraries" >&5
3976 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3977
3978 # Check whether --with-build-libs or --without-build-libs was given.
3979 if test "${with_build_libs+set}" = set; then
3980   withval="$with_build_libs"
3981   BUILD_LIBS="$withval"
3982 fi;
3983         echo "$as_me:3983: result: $BUILD_LIBS" >&5
3984 echo "${ECHO_T}$BUILD_LIBS" >&6
3985
3986         # this assumes we're on Unix.
3987         BUILD_EXEEXT=
3988         BUILD_OBJEXT=o
3989
3990         : ${BUILD_CC:='${CC}'}
3991
3992         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3993                 { { echo "$as_me:3993: error: Cross-build requires two compilers.
3994 Use --with-build-cc to specify the native compiler." >&5
3995 echo "$as_me: error: Cross-build requires two compilers.
3996 Use --with-build-cc to specify the native compiler." >&2;}
3997    { (exit 1); exit 1; }; }
3998         fi
3999
4000 else
4001         : ${BUILD_CC:='${CC}'}
4002         : ${BUILD_CPP:='${CPP}'}
4003         : ${BUILD_CFLAGS:='${CFLAGS}'}
4004         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4005         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4006         : ${BUILD_LIBS:='${LIBS}'}
4007         : ${BUILD_EXEEXT:='$x'}
4008         : ${BUILD_OBJEXT:='o'}
4009 fi
4010
4011 ###############################################################################
4012
4013 ### Options to allow the user to specify the set of libraries which are used.
4014 ### Use "--without-normal --with-shared" to allow the default model to be
4015 ### shared, for example.
4016 cf_list_models=""
4017
4018 LIBTOOL=
4019
4020 # common library maintenance symbols that are convenient for libtool scripts:
4021 LIB_CREATE='${AR} -cr'
4022 LIB_OBJECT='${OBJECTS}'
4023 LIB_SUFFIX=.a
4024 LIB_PREP="$RANLIB"
4025
4026 # symbols used to prop libtool up to enable it to determine what it should be
4027 # doing:
4028 LIB_CLEAN=
4029 LIB_COMPILE=
4030 LIB_LINK='${CC}'
4031 LIB_INSTALL=
4032 LIB_UNINSTALL=
4033
4034 echo "$as_me:4034: checking if you want to build libraries with libtool" >&5
4035 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4036
4037 # Check whether --with-libtool or --without-libtool was given.
4038 if test "${with_libtool+set}" = set; then
4039   withval="$with_libtool"
4040   with_libtool=$withval
4041 else
4042   with_libtool=no
4043 fi;
4044 echo "$as_me:4044: result: $with_libtool" >&5
4045 echo "${ECHO_T}$with_libtool" >&6
4046 if test "$with_libtool" != "no"; then
4047
4048         if test "$with_libtool" != "yes" ; then
4049
4050 if test "x$prefix" != xNONE; then
4051   cf_path_syntax="$prefix"
4052 else
4053   cf_path_syntax="$ac_default_prefix"
4054 fi
4055
4056 case ".$with_libtool" in #(vi
4057 .\$\(*\)*|.\'*\'*) #(vi
4058   ;;
4059 ..|./*|.\\*) #(vi
4060   ;;
4061 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4062   ;;
4063 .\${*prefix}*) #(vi
4064   eval with_libtool="$with_libtool"
4065   case ".$with_libtool" in #(vi
4066   .NONE/*)
4067     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4068     ;;
4069   esac
4070   ;; #(vi
4071 .no|.NONE/*)
4072   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4073   ;;
4074 *)
4075   { { echo "$as_me:4075: error: expected a pathname, not \"$with_libtool\"" >&5
4076 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4077    { (exit 1); exit 1; }; }
4078   ;;
4079 esac
4080
4081                 LIBTOOL=$with_libtool
4082         else
4083                 # Extract the first word of "libtool", so it can be a program name with args.
4084 set dummy libtool; ac_word=$2
4085 echo "$as_me:4085: checking for $ac_word" >&5
4086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4087 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4088   echo $ECHO_N "(cached) $ECHO_C" >&6
4089 else
4090   case $LIBTOOL in
4091   [\\/]* | ?:[\\/]*)
4092   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4093   ;;
4094   *)
4095   ac_save_IFS=$IFS; IFS=$ac_path_separator
4096 ac_dummy="$PATH"
4097 for ac_dir in $ac_dummy; do
4098   IFS=$ac_save_IFS
4099   test -z "$ac_dir" && ac_dir=.
4100   if $as_executable_p "$ac_dir/$ac_word"; then
4101    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4102    echo "$as_me:4102: found $ac_dir/$ac_word" >&5
4103    break
4104 fi
4105 done
4106
4107   ;;
4108 esac
4109 fi
4110 LIBTOOL=$ac_cv_path_LIBTOOL
4111
4112 if test -n "$LIBTOOL"; then
4113   echo "$as_me:4113: result: $LIBTOOL" >&5
4114 echo "${ECHO_T}$LIBTOOL" >&6
4115 else
4116   echo "$as_me:4116: result: no" >&5
4117 echo "${ECHO_T}no" >&6
4118 fi
4119
4120         fi
4121         if test -z "$LIBTOOL" ; then
4122                 { { echo "$as_me:4122: error: Cannot find libtool" >&5
4123 echo "$as_me: error: Cannot find libtool" >&2;}
4124    { (exit 1); exit 1; }; }
4125         fi
4126         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4127         LIB_OBJECT='${OBJECTS:.o=.lo}'
4128         LIB_SUFFIX=.la
4129         LIB_CLEAN='${LIBTOOL} --mode=clean'
4130         LIB_COMPILE='${LIBTOOL} --mode=compile'
4131         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4132         LIB_INSTALL='${LIBTOOL} --mode=install'
4133         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4134         LIB_PREP=:
4135
4136         # Show the version of libtool
4137         echo "$as_me:4137: checking version of libtool" >&5
4138 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4139
4140         # Save the version in a cache variable - this is not entirely a good
4141         # thing, but the version string from libtool is very ugly, and for
4142         # bug reports it might be useful to have the original string.
4143         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4144         echo "$as_me:4144: result: $cf_cv_libtool_version" >&5
4145 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4146         if test -z "$cf_cv_libtool_version" ; then
4147                 { { echo "$as_me:4147: error: This is not GNU libtool" >&5
4148 echo "$as_me: error: This is not GNU libtool" >&2;}
4149    { (exit 1); exit 1; }; }
4150         fi
4151
4152         # special hack to add --tag option for C++ compiler
4153         case $cf_cv_libtool_version in
4154         1.[5-9]*|[2-9]*)
4155                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4156                 ;;
4157         *)
4158                 LIBTOOL_CXX="$LIBTOOL"
4159                 ;;
4160         esac
4161 else
4162         LIBTOOL=""
4163         LIBTOOL_CXX=""
4164 fi
4165
4166 test -z "$LIBTOOL" && ECHO_LT=
4167
4168 if test "$with_libtool" != "no" ; then
4169
4170 cf_list_models="$cf_list_models libtool"
4171
4172 else
4173
4174 echo "$as_me:4174: checking if you want to build shared libraries" >&5
4175 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4176
4177 # Check whether --with-shared or --without-shared was given.
4178 if test "${with_shared+set}" = set; then
4179   withval="$with_shared"
4180   with_shared=$withval
4181 else
4182   with_shared=no
4183 fi;
4184 echo "$as_me:4184: result: $with_shared" >&5
4185 echo "${ECHO_T}$with_shared" >&6
4186 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4187
4188 echo "$as_me:4188: checking if you want to build static libraries" >&5
4189 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4190
4191 # Check whether --with-normal or --without-normal was given.
4192 if test "${with_normal+set}" = set; then
4193   withval="$with_normal"
4194   with_normal=$withval
4195 else
4196   with_normal=yes
4197 fi;
4198 echo "$as_me:4198: result: $with_normal" >&5
4199 echo "${ECHO_T}$with_normal" >&6
4200 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4201
4202 echo "$as_me:4202: checking if you want to build debug libraries" >&5
4203 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4204
4205 # Check whether --with-debug or --without-debug was given.
4206 if test "${with_debug+set}" = set; then
4207   withval="$with_debug"
4208   with_debug=$withval
4209 else
4210   with_debug=yes
4211 fi;
4212 echo "$as_me:4212: result: $with_debug" >&5
4213 echo "${ECHO_T}$with_debug" >&6
4214 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4215
4216 echo "$as_me:4216: checking if you want to build profiling libraries" >&5
4217 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4218
4219 # Check whether --with-profile or --without-profile was given.
4220 if test "${with_profile+set}" = set; then
4221   withval="$with_profile"
4222   with_profile=$withval
4223 else
4224   with_profile=no
4225 fi;
4226 echo "$as_me:4226: result: $with_profile" >&5
4227 echo "${ECHO_T}$with_profile" >&6
4228 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4229
4230 fi
4231
4232 ###############################################################################
4233
4234 echo "$as_me:4234: checking for specified models" >&5
4235 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4236 test -z "$cf_list_models" && cf_list_models=normal
4237 test "$with_libtool" != "no" && cf_list_models=libtool
4238 echo "$as_me:4238: result: $cf_list_models" >&5
4239 echo "${ECHO_T}$cf_list_models" >&6
4240
4241 ### Use the first model as the default, and save its suffix for use in building
4242 ### up test-applications.
4243 echo "$as_me:4243: checking for default model" >&5
4244 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4245 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4246 echo "$as_me:4246: result: $DFT_LWR_MODEL" >&5
4247 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4248
4249 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4250
4251 TICS_NAME=tic
4252
4253 TINFO_NAME=tinfo
4254
4255 LIB_NAME=ncurses
4256
4257 LIB_DIR=../lib
4258 LIB_2ND=../../lib
4259
4260         case $cf_cv_system_name in
4261         OS/2*)  LIB_PREFIX=''     ;;
4262         os2*)   LIB_PREFIX=''     ;;
4263         *)      LIB_PREFIX='lib'  ;;
4264         esac
4265 cf_prefix=$LIB_PREFIX
4266
4267 LIB_PREFIX=$cf_prefix
4268
4269 LIB_SUFFIX=
4270
4271 ###############################################################################
4272
4273 echo "$as_me:4273: checking if you want to build a separate terminfo library" >&5
4274 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4275
4276 # Check whether --with-termlib or --without-termlib was given.
4277 if test "${with_termlib+set}" = set; then
4278   withval="$with_termlib"
4279   with_termlib=$withval
4280 else
4281   with_termlib=no
4282 fi;
4283 echo "$as_me:4283: result: $with_termlib" >&5
4284 echo "${ECHO_T}$with_termlib" >&6
4285
4286 echo "$as_me:4286: checking if you want to build a separate tic library" >&5
4287 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4288
4289 # Check whether --with-ticlib or --without-ticlib was given.
4290 if test "${with_ticlib+set}" = set; then
4291   withval="$with_ticlib"
4292   with_ticlib=$withval
4293 else
4294   with_ticlib=no
4295 fi;
4296 echo "$as_me:4296: result: $with_ticlib" >&5
4297 echo "${ECHO_T}$with_ticlib" >&6
4298
4299 ### Checks for special libraries, must be done up-front.
4300 SHLIB_LIST=""
4301
4302 echo "$as_me:4302: checking if you want to link with the GPM mouse library" >&5
4303 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4304
4305 # Check whether --with-gpm or --without-gpm was given.
4306 if test "${with_gpm+set}" = set; then
4307   withval="$with_gpm"
4308   with_gpm=$withval
4309 else
4310   with_gpm=maybe
4311 fi;
4312 echo "$as_me:4312: result: $with_gpm" >&5
4313 echo "${ECHO_T}$with_gpm" >&6
4314
4315 if test "$with_gpm" != no ; then
4316         echo "$as_me:4316: checking for gpm.h" >&5
4317 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4318 if test "${ac_cv_header_gpm_h+set}" = set; then
4319   echo $ECHO_N "(cached) $ECHO_C" >&6
4320 else
4321   cat >conftest.$ac_ext <<_ACEOF
4322 #line 4322 "configure"
4323 #include "confdefs.h"
4324 #include <gpm.h>
4325 _ACEOF
4326 if { (eval echo "$as_me:4326: \"$ac_cpp conftest.$ac_ext\"") >&5
4327   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4328   ac_status=$?
4329   egrep -v '^ *\+' conftest.er1 >conftest.err
4330   rm -f conftest.er1
4331   cat conftest.err >&5
4332   echo "$as_me:4332: \$? = $ac_status" >&5
4333   (exit $ac_status); } >/dev/null; then
4334   if test -s conftest.err; then
4335     ac_cpp_err=$ac_c_preproc_warn_flag
4336   else
4337     ac_cpp_err=
4338   fi
4339 else
4340   ac_cpp_err=yes
4341 fi
4342 if test -z "$ac_cpp_err"; then
4343   ac_cv_header_gpm_h=yes
4344 else
4345   echo "$as_me: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   ac_cv_header_gpm_h=no
4348 fi
4349 rm -f conftest.err conftest.$ac_ext
4350 fi
4351 echo "$as_me:4351: result: $ac_cv_header_gpm_h" >&5
4352 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4353 if test $ac_cv_header_gpm_h = yes; then
4354
4355                 cat >>confdefs.h <<\EOF
4356 #define HAVE_GPM_H 1
4357 EOF
4358
4359                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4360                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4361
4362 echo "${as_me-configure}:4362: testing assuming we really have GPM library ..." 1>&5
4363
4364                         cat >>confdefs.h <<\EOF
4365 #define HAVE_LIBGPM 1
4366 EOF
4367
4368                 else
4369                         echo "$as_me:4369: checking for Gpm_Open in -lgpm" >&5
4370 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4371 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4372   echo $ECHO_N "(cached) $ECHO_C" >&6
4373 else
4374   ac_check_lib_save_LIBS=$LIBS
4375 LIBS="-lgpm  $LIBS"
4376 cat >conftest.$ac_ext <<_ACEOF
4377 #line 4377 "configure"
4378 #include "confdefs.h"
4379
4380 /* Override any gcc2 internal prototype to avoid an error.  */
4381 #ifdef __cplusplus
4382 extern "C"
4383 #endif
4384 /* We use char because int might match the return type of a gcc2
4385    builtin and then its argument prototype would still apply.  */
4386 char Gpm_Open ();
4387 int
4388 main ()
4389 {
4390 Gpm_Open ();
4391   ;
4392   return 0;
4393 }
4394 _ACEOF
4395 rm -f conftest.$ac_objext conftest$ac_exeext
4396 if { (eval echo "$as_me:4396: \"$ac_link\"") >&5
4397   (eval $ac_link) 2>&5
4398   ac_status=$?
4399   echo "$as_me:4399: \$? = $ac_status" >&5
4400   (exit $ac_status); } &&
4401          { ac_try='test -s conftest$ac_exeext'
4402   { (eval echo "$as_me:4402: \"$ac_try\"") >&5
4403   (eval $ac_try) 2>&5
4404   ac_status=$?
4405   echo "$as_me:4405: \$? = $ac_status" >&5
4406   (exit $ac_status); }; }; then
4407   ac_cv_lib_gpm_Gpm_Open=yes
4408 else
4409   echo "$as_me: failed program was:" >&5
4410 cat conftest.$ac_ext >&5
4411 ac_cv_lib_gpm_Gpm_Open=no
4412 fi
4413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4414 LIBS=$ac_check_lib_save_LIBS
4415 fi
4416 echo "$as_me:4416: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4417 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4418 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4419   :
4420 else
4421
4422                                 { { echo "$as_me:4422: error: Cannot link with GPM library" >&5
4423 echo "$as_me: error: Cannot link with GPM library" >&2;}
4424    { (exit 1); exit 1; }; }
4425                 fi
4426                 with_gpm=yes
4427
4428 fi
4429
4430 else
4431
4432                 test "$with_gpm" != maybe && { echo "$as_me:4432: WARNING: Cannot find GPM header" >&5
4433 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4434                 with_gpm=no
4435
4436 fi
4437
4438 fi
4439
4440 if test "$with_gpm" != no ; then
4441         echo "$as_me:4441: checking if you want to load GPM dynamically" >&5
4442 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4443
4444 # Check whether --with-dlsym or --without-dlsym was given.
4445 if test "${with_dlsym+set}" = set; then
4446   withval="$with_dlsym"
4447   with_dlsym=$withval
4448 else
4449   with_dlsym=yes
4450 fi;
4451         echo "$as_me:4451: result: $with_dlsym" >&5
4452 echo "${ECHO_T}$with_dlsym" >&6
4453         if test "$with_dlsym" = yes ; then
4454
4455 cf_have_dlsym=no
4456 echo "$as_me:4456: checking for dlsym" >&5
4457 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4458 if test "${ac_cv_func_dlsym+set}" = set; then
4459   echo $ECHO_N "(cached) $ECHO_C" >&6
4460 else
4461   cat >conftest.$ac_ext <<_ACEOF
4462 #line 4462 "configure"
4463 #include "confdefs.h"
4464 /* System header to define __stub macros and hopefully few prototypes,
4465     which can conflict with char dlsym (); below.  */
4466 #include <assert.h>
4467 /* Override any gcc2 internal prototype to avoid an error.  */
4468 #ifdef __cplusplus
4469 extern "C"
4470 #endif
4471 /* We use char because int might match the return type of a gcc2
4472    builtin and then its argument prototype would still apply.  */
4473 char dlsym ();
4474 char (*f) ();
4475
4476 int
4477 main ()
4478 {
4479 /* The GNU C library defines this for functions which it implements
4480     to always fail with ENOSYS.  Some functions are actually named
4481     something starting with __ and the normal name is an alias.  */
4482 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4483 choke me
4484 #else
4485 f = dlsym;
4486 #endif
4487
4488   ;
4489   return 0;
4490 }
4491 _ACEOF
4492 rm -f conftest.$ac_objext conftest$ac_exeext
4493 if { (eval echo "$as_me:4493: \"$ac_link\"") >&5
4494   (eval $ac_link) 2>&5
4495   ac_status=$?
4496   echo "$as_me:4496: \$? = $ac_status" >&5
4497   (exit $ac_status); } &&
4498          { ac_try='test -s conftest$ac_exeext'
4499   { (eval echo "$as_me:4499: \"$ac_try\"") >&5
4500   (eval $ac_try) 2>&5
4501   ac_status=$?
4502   echo "$as_me:4502: \$? = $ac_status" >&5
4503   (exit $ac_status); }; }; then
4504   ac_cv_func_dlsym=yes
4505 else
4506   echo "$as_me: failed program was:" >&5
4507 cat conftest.$ac_ext >&5
4508 ac_cv_func_dlsym=no
4509 fi
4510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4511 fi
4512 echo "$as_me:4512: result: $ac_cv_func_dlsym" >&5
4513 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4514 if test $ac_cv_func_dlsym = yes; then
4515   cf_have_dlsym=yes
4516 else
4517
4518 cf_have_libdl=no
4519 echo "$as_me:4519: checking for dlsym in -ldl" >&5
4520 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4521 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4522   echo $ECHO_N "(cached) $ECHO_C" >&6
4523 else
4524   ac_check_lib_save_LIBS=$LIBS
4525 LIBS="-ldl  $LIBS"
4526 cat >conftest.$ac_ext <<_ACEOF
4527 #line 4527 "configure"
4528 #include "confdefs.h"
4529
4530 /* Override any gcc2 internal prototype to avoid an error.  */
4531 #ifdef __cplusplus
4532 extern "C"
4533 #endif
4534 /* We use char because int might match the return type of a gcc2
4535    builtin and then its argument prototype would still apply.  */
4536 char dlsym ();
4537 int
4538 main ()
4539 {
4540 dlsym ();
4541   ;
4542   return 0;
4543 }
4544 _ACEOF
4545 rm -f conftest.$ac_objext conftest$ac_exeext
4546 if { (eval echo "$as_me:4546: \"$ac_link\"") >&5
4547   (eval $ac_link) 2>&5
4548   ac_status=$?
4549   echo "$as_me:4549: \$? = $ac_status" >&5
4550   (exit $ac_status); } &&
4551          { ac_try='test -s conftest$ac_exeext'
4552   { (eval echo "$as_me:4552: \"$ac_try\"") >&5
4553   (eval $ac_try) 2>&5
4554   ac_status=$?
4555   echo "$as_me:4555: \$? = $ac_status" >&5
4556   (exit $ac_status); }; }; then
4557   ac_cv_lib_dl_dlsym=yes
4558 else
4559   echo "$as_me: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 ac_cv_lib_dl_dlsym=no
4562 fi
4563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4564 LIBS=$ac_check_lib_save_LIBS
4565 fi
4566 echo "$as_me:4566: result: $ac_cv_lib_dl_dlsym" >&5
4567 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4568 if test $ac_cv_lib_dl_dlsym = yes; then
4569
4570         cf_have_dlsym=yes
4571         cf_have_libdl=yes
4572 fi
4573
4574 fi
4575
4576 if test "$cf_have_dlsym" = yes ; then
4577         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4578
4579         echo "$as_me:4579: checking whether able to link to dl*() functions" >&5
4580 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4581         cat >conftest.$ac_ext <<_ACEOF
4582 #line 4582 "configure"
4583 #include "confdefs.h"
4584 #include <dlfcn.h>
4585 int
4586 main ()
4587 {
4588
4589                 void *obj;
4590                 if ((obj = dlopen("filename", 0)) != 0) {
4591                         if (dlsym(obj, "symbolname") == 0) {
4592                         dlclose(obj);
4593                         }
4594                 }
4595   ;
4596   return 0;
4597 }
4598 _ACEOF
4599 rm -f conftest.$ac_objext conftest$ac_exeext
4600 if { (eval echo "$as_me:4600: \"$ac_link\"") >&5
4601   (eval $ac_link) 2>&5
4602   ac_status=$?
4603   echo "$as_me:4603: \$? = $ac_status" >&5
4604   (exit $ac_status); } &&
4605          { ac_try='test -s conftest$ac_exeext'
4606   { (eval echo "$as_me:4606: \"$ac_try\"") >&5
4607   (eval $ac_try) 2>&5
4608   ac_status=$?
4609   echo "$as_me:4609: \$? = $ac_status" >&5
4610   (exit $ac_status); }; }; then
4611
4612                 cat >>confdefs.h <<\EOF
4613 #define HAVE_LIBDL 1
4614 EOF
4615
4616 else
4617   echo "$as_me: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4619
4620                 { { echo "$as_me:4620: error: Cannot link test program for libdl" >&5
4621 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4622    { (exit 1); exit 1; }; }
4623 fi
4624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4625         echo "$as_me:4625: result: ok" >&5
4626 echo "${ECHO_T}ok" >&6
4627 else
4628         { { echo "$as_me:4628: error: Cannot find dlsym function" >&5
4629 echo "$as_me: error: Cannot find dlsym function" >&2;}
4630    { (exit 1); exit 1; }; }
4631 fi
4632
4633                 if test "$with_gpm" != yes ; then
4634                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4635
4636 echo "${as_me-configure}:4636: testing assuming soname for gpm is $with_gpm ..." 1>&5
4637
4638                         cf_cv_gpm_soname="$with_gpm"
4639                 else
4640
4641 echo "$as_me:4641: checking for soname of gpm library" >&5
4642 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4643 if test "${cf_cv_gpm_soname+set}" = set; then
4644   echo $ECHO_N "(cached) $ECHO_C" >&6
4645 else
4646
4647 cf_cv_gpm_soname=unknown
4648 if test "$cross_compiling" != yes ; then
4649 cat >conftest.$ac_ext <<CF_EOF
4650 #include <gpm.h>
4651 int main()
4652 {
4653 if (Gpm_Open(0,0)) Gpm_Close();
4654         ${cf_cv_main_return:-return}(0);
4655 }
4656 CF_EOF
4657 cf_save_LIBS="$LIBS"
4658         LIBS="-lgpm $LIBS"
4659         if { (eval echo "$as_me:4659: \"$ac_compile\"") >&5
4660   (eval $ac_compile) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); } ; then
4664                 if { (eval echo "$as_me:4664: \"$ac_link\"") >&5
4665   (eval $ac_link) 2>&5
4666   ac_status=$?
4667   echo "$as_me:4667: \$? = $ac_status" >&5
4668   (exit $ac_status); } ; then
4669                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4670                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4671                 fi
4672         fi
4673 rm -f conftest*
4674 LIBS="$cf_save_LIBS"
4675 fi
4676
4677 fi
4678 echo "$as_me:4678: result: $cf_cv_gpm_soname" >&5
4679 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4680
4681                 fi
4682                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4683 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4684 EOF
4685
4686                 SHLIB_LIST="-ldl $SHLIB_LIST"
4687         else
4688                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4689         fi
4690         cat >>confdefs.h <<\EOF
4691 #define HAVE_LIBGPM 1
4692 EOF
4693
4694 echo "$as_me:4694: checking for Gpm_Wgetch in -lgpm" >&5
4695 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4696 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4697   echo $ECHO_N "(cached) $ECHO_C" >&6
4698 else
4699   ac_check_lib_save_LIBS=$LIBS
4700 LIBS="-lgpm  $LIBS"
4701 cat >conftest.$ac_ext <<_ACEOF
4702 #line 4702 "configure"
4703 #include "confdefs.h"
4704
4705 /* Override any gcc2 internal prototype to avoid an error.  */
4706 #ifdef __cplusplus
4707 extern "C"
4708 #endif
4709 /* We use char because int might match the return type of a gcc2
4710    builtin and then its argument prototype would still apply.  */
4711 char Gpm_Wgetch ();
4712 int
4713 main ()
4714 {
4715 Gpm_Wgetch ();
4716   ;
4717   return 0;
4718 }
4719 _ACEOF
4720 rm -f conftest.$ac_objext conftest$ac_exeext
4721 if { (eval echo "$as_me:4721: \"$ac_link\"") >&5
4722   (eval $ac_link) 2>&5
4723   ac_status=$?
4724   echo "$as_me:4724: \$? = $ac_status" >&5
4725   (exit $ac_status); } &&
4726          { ac_try='test -s conftest$ac_exeext'
4727   { (eval echo "$as_me:4727: \"$ac_try\"") >&5
4728   (eval $ac_try) 2>&5
4729   ac_status=$?
4730   echo "$as_me:4730: \$? = $ac_status" >&5
4731   (exit $ac_status); }; }; then
4732   ac_cv_lib_gpm_Gpm_Wgetch=yes
4733 else
4734   echo "$as_me: failed program was:" >&5
4735 cat conftest.$ac_ext >&5
4736 ac_cv_lib_gpm_Gpm_Wgetch=no
4737 fi
4738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4739 LIBS=$ac_check_lib_save_LIBS
4740 fi
4741 echo "$as_me:4741: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4742 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4743 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4744
4745 echo "$as_me:4745: checking if GPM is weakly bound to curses library" >&5
4746 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4747 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4748   echo $ECHO_N "(cached) $ECHO_C" >&6
4749 else
4750
4751 cf_cv_check_gpm_wgetch=unknown
4752 if test "$cross_compiling" != yes ; then
4753
4754 cat >conftest.$ac_ext <<CF_EOF
4755 #include <gpm.h>
4756 int main()
4757 {
4758         Gpm_Wgetch();
4759         ${cf_cv_main_return:-return}(0);
4760 }
4761 CF_EOF
4762
4763         cf_save_LIBS="$LIBS"
4764         # This only works if we can look at the symbol table.  If a shared
4765         # library is stripped for install, we cannot use that.  So we're forced
4766         # to rely on the static library, noting that some packagers may not
4767         # include it.
4768         LIBS="-static -lgpm -dynamic $LIBS"
4769         if { (eval echo "$as_me:4769: \"$ac_compile\"") >&5
4770   (eval $ac_compile) 2>&5
4771   ac_status=$?
4772   echo "$as_me:4772: \$? = $ac_status" >&5
4773   (exit $ac_status); } ; then
4774                 if { (eval echo "$as_me:4774: \"$ac_link\"") >&5
4775   (eval $ac_link) 2>&5
4776   ac_status=$?
4777   echo "$as_me:4777: \$? = $ac_status" >&5
4778   (exit $ac_status); } ; then
4779                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4780                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4781                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4782                 fi
4783         fi
4784         rm -f conftest*
4785         LIBS="$cf_save_LIBS"
4786 fi
4787
4788 fi
4789 echo "$as_me:4789: result: $cf_cv_check_gpm_wgetch" >&5
4790 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4791
4792 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4793         { echo "$as_me:4793: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4794 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4795 fi
4796
4797 fi
4798
4799 fi
4800
4801 # not everyone has "test -c"
4802 if test -c /dev/sysmouse 2>/dev/null ; then
4803 echo "$as_me:4803: checking if you want to use sysmouse" >&5
4804 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4805
4806 # Check whether --with-sysmouse or --without-sysmouse was given.
4807 if test "${with_sysmouse+set}" = set; then
4808   withval="$with_sysmouse"
4809   cf_with_sysmouse=$withval
4810 else
4811   cf_with_sysmouse=maybe
4812 fi;
4813         if test "$cf_with_sysmouse" != no ; then
4814         cat >conftest.$ac_ext <<_ACEOF
4815 #line 4815 "configure"
4816 #include "confdefs.h"
4817
4818 #include <osreldate.h>
4819 #if (__FreeBSD_version >= 400017)
4820 #include <sys/consio.h>
4821 #include <sys/fbio.h>
4822 #else
4823 #include <machine/console.h>
4824 #endif
4825
4826 int
4827 main ()
4828 {
4829
4830         struct mouse_info the_mouse;
4831         ioctl(0, CONS_MOUSECTL, &the_mouse);
4832
4833   ;
4834   return 0;
4835 }
4836 _ACEOF
4837 rm -f conftest.$ac_objext
4838 if { (eval echo "$as_me:4838: \"$ac_compile\"") >&5
4839   (eval $ac_compile) 2>&5
4840   ac_status=$?
4841   echo "$as_me:4841: \$? = $ac_status" >&5
4842   (exit $ac_status); } &&
4843          { ac_try='test -s conftest.$ac_objext'
4844   { (eval echo "$as_me:4844: \"$ac_try\"") >&5
4845   (eval $ac_try) 2>&5
4846   ac_status=$?
4847   echo "$as_me:4847: \$? = $ac_status" >&5
4848   (exit $ac_status); }; }; then
4849   cf_with_sysmouse=yes
4850 else
4851   echo "$as_me: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
4853 cf_with_sysmouse=no
4854 fi
4855 rm -f conftest.$ac_objext conftest.$ac_ext
4856         fi
4857 echo "$as_me:4857: result: $cf_with_sysmouse" >&5
4858 echo "${ECHO_T}$cf_with_sysmouse" >&6
4859 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4860 #define USE_SYSMOUSE 1
4861 EOF
4862
4863 fi
4864
4865 if test X"$CC_G_OPT" = X"" ; then
4866         CC_G_OPT='-g'
4867         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4868 fi
4869
4870 if test X"$CXX_G_OPT" = X"" ; then
4871         CXX_G_OPT='-g'
4872         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4873 fi
4874
4875 echo "$as_me:4875: checking for default loader flags" >&5
4876 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4877 case $DFT_LWR_MODEL in
4878 libtool) LD_MODEL=''   ;;
4879 normal)  LD_MODEL=''   ;;
4880 debug)   LD_MODEL=$CC_G_OPT ;;
4881 profile) LD_MODEL='-pg';;
4882 shared)  LD_MODEL=''   ;;
4883 esac
4884 echo "$as_me:4884: result: $LD_MODEL" >&5
4885 echo "${ECHO_T}$LD_MODEL" >&6
4886
4887 case $DFT_LWR_MODEL in
4888 shared)
4889 echo "$as_me:4889: checking if rpath option should be used" >&5
4890 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4891
4892 # Check whether --enable-rpath or --disable-rpath was given.
4893 if test "${enable_rpath+set}" = set; then
4894   enableval="$enable_rpath"
4895   cf_cv_ld_rpath=$enableval
4896 else
4897   cf_cv_ld_rpath=no
4898 fi;
4899 echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
4900 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4901 echo "$as_me:4901: checking if shared libraries should be relinked during install" >&5
4902 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4903
4904 # Check whether --enable-rpath or --disable-rpath was given.
4905 if test "${enable_rpath+set}" = set; then
4906   enableval="$enable_rpath"
4907   cf_cv_do_relink=$enableval
4908 else
4909   cf_cv_do_relink=yes
4910 fi;
4911 echo "$as_me:4911: result: $cf_cv_do_relink" >&5
4912 echo "${ECHO_T}$cf_cv_do_relink" >&6
4913         ;;
4914 esac
4915
4916         LOCAL_LDFLAGS=
4917         LOCAL_LDFLAGS2=
4918         LD_SHARED_OPTS=
4919         INSTALL_LIB="-m 644"
4920
4921         cf_cv_do_symlinks=no
4922
4923         echo "$as_me:4923: checking if release/abi version should be used for shared libs" >&5
4924 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4925
4926 # Check whether --with-shlib-version or --without-shlib-version was given.
4927 if test "${with_shlib_version+set}" = set; then
4928   withval="$with_shlib_version"
4929   test -z "$withval" && withval=auto
4930         case $withval in #(vi
4931         yes) #(vi
4932                 cf_cv_shlib_version=auto
4933                 ;;
4934         rel|abi|auto|no) #(vi
4935                 cf_cv_shlib_version=$withval
4936                 ;;
4937         *)
4938                 { { echo "$as_me:4938: error: option value must be one of: rel, abi, auto or no" >&5
4939 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4940    { (exit 1); exit 1; }; }
4941                 ;;
4942         esac
4943
4944 else
4945   cf_cv_shlib_version=auto
4946 fi;
4947         echo "$as_me:4947: result: $cf_cv_shlib_version" >&5
4948 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4949
4950         cf_cv_rm_so_locs=no
4951
4952         # Some less-capable ports of gcc support only -fpic
4953         CC_SHARED_OPTS=
4954         if test "$GCC" = yes
4955         then
4956                 echo "$as_me:4956: checking which $CC option to use" >&5
4957 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4958                 cf_save_CFLAGS="$CFLAGS"
4959                 for CC_SHARED_OPTS in -fPIC -fpic ''
4960                 do
4961                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4962                         cat >conftest.$ac_ext <<_ACEOF
4963 #line 4963 "configure"
4964 #include "confdefs.h"
4965 #include <stdio.h>
4966 int
4967 main ()
4968 {
4969 int x = 1
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 rm -f conftest.$ac_objext
4975 if { (eval echo "$as_me:4975: \"$ac_compile\"") >&5
4976   (eval $ac_compile) 2>&5
4977   ac_status=$?
4978   echo "$as_me:4978: \$? = $ac_status" >&5
4979   (exit $ac_status); } &&
4980          { ac_try='test -s conftest.$ac_objext'
4981   { (eval echo "$as_me:4981: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:4984: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   break
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 fi
4991 rm -f conftest.$ac_objext conftest.$ac_ext
4992                 done
4993                 echo "$as_me:4993: result: $CC_SHARED_OPTS" >&5
4994 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4995                 CFLAGS="$cf_save_CFLAGS"
4996         fi
4997
4998         cf_cv_shlib_version_infix=no
4999
5000         case $cf_cv_system_name in
5001         beos*)
5002                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5003                 ;;
5004         cygwin*)
5005                 CC_SHARED_OPTS=
5006                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5007                 cf_cv_shlib_version=cygdll
5008                 cf_cv_shlib_version_infix=cygdll
5009                 cat >mk_shared_lib.sh <<-CF_EOF
5010                 #!/bin/sh
5011                 SHARED_LIB=\$1
5012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5013                 shift
5014                 cat <<-EOF
5015                 Linking shared library
5016                 ** SHARED_LIB \$SHARED_LIB
5017                 ** IMPORT_LIB \$IMPORT_LIB
5018 EOF
5019                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5020 CF_EOF
5021                 chmod +x mk_shared_lib.sh
5022                 ;;
5023         darwin*)
5024                 EXTRA_CFLAGS="-no-cpp-precomp"
5025                 CC_SHARED_OPTS="-dynamic"
5026                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5027                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5028                 cf_cv_shlib_version_infix=yes
5029                 echo "$as_me:5029: checking if ld -search_paths_first works" >&5
5030 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5031 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5032   echo $ECHO_N "(cached) $ECHO_C" >&6
5033 else
5034
5035                         cf_save_LDFLAGS=$LDFLAGS
5036                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5037                         cat >conftest.$ac_ext <<_ACEOF
5038 #line 5038 "configure"
5039 #include "confdefs.h"
5040
5041 int
5042 main ()
5043 {
5044 int i;
5045   ;
5046   return 0;
5047 }
5048 _ACEOF
5049 rm -f conftest.$ac_objext conftest$ac_exeext
5050 if { (eval echo "$as_me:5050: \"$ac_link\"") >&5
5051   (eval $ac_link) 2>&5
5052   ac_status=$?
5053   echo "$as_me:5053: \$? = $ac_status" >&5
5054   (exit $ac_status); } &&
5055          { ac_try='test -s conftest$ac_exeext'
5056   { (eval echo "$as_me:5056: \"$ac_try\"") >&5
5057   (eval $ac_try) 2>&5
5058   ac_status=$?
5059   echo "$as_me:5059: \$? = $ac_status" >&5
5060   (exit $ac_status); }; }; then
5061   cf_cv_ldflags_search_paths_first=yes
5062 else
5063   echo "$as_me: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5065 cf_cv_ldflags_search_paths_first=no
5066 fi
5067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5068                                 LDFLAGS=$cf_save_LDFLAGS
5069 fi
5070 echo "$as_me:5070: result: $cf_cv_ldflags_search_paths_first" >&5
5071 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5072                 if test $cf_cv_ldflags_search_paths_first = yes; then
5073                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5074                 fi
5075                 ;;
5076         hpux*)
5077                 # (tested with gcc 2.7.2 -- I don't have c89)
5078                 if test "$GCC" = yes; then
5079                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5080                 else
5081                         CC_SHARED_OPTS='+Z'
5082                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5083                 fi
5084                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5085                 # HP-UX shared libraries must be executable, and should be
5086                 # readonly to exploit a quirk in the memory manager.
5087                 INSTALL_LIB="-m 555"
5088                 ;;
5089         irix*)
5090                 if test "$cf_cv_ld_rpath" = yes ; then
5091                         if test "$GCC" = yes; then
5092                                 cf_ld_rpath_opt="-Wl,-rpath,"
5093                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5094                         else
5095                                 cf_ld_rpath_opt="-rpath "
5096                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5097                         fi
5098                 fi
5099                 # tested with IRIX 5.2 and 'cc'.
5100                 if test "$GCC" != yes; then
5101                         CC_SHARED_OPTS='-KPIC'
5102                 fi
5103                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5104                 cf_cv_rm_so_locs=yes
5105                 ;;
5106         linux*|gnu*|k*bsd*-gnu)
5107                 if test "$DFT_LWR_MODEL" = "shared" ; then
5108                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5109                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5110                 fi
5111                 if test "$cf_cv_ld_rpath" = yes ; then
5112                         cf_ld_rpath_opt="-Wl,-rpath,"
5113                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5114                 fi
5115
5116         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5117         if test "$cf_cv_shlib_version" = rel; then
5118                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5119         else
5120                 cf_shared_soname='`basename $@`'
5121         fi
5122
5123                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5124                 ;;
5125         openbsd[2-9].*)
5126                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5127                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5128                 ;;
5129         openbsd*|freebsd[12].*)
5130                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5131                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5132                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5133                 ;;
5134         freebsd*)
5135                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5136                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5137                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5138                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5139                         cf_ld_rpath_opt="-rpath "
5140                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5141                 fi
5142
5143         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5144         if test "$cf_cv_shlib_version" = rel; then
5145                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5146         else
5147                 cf_shared_soname='`basename $@`'
5148         fi
5149
5150                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5151                 ;;
5152         netbsd*)
5153                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5154                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5155                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5156                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5157                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5158                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5159                         if test "$cf_cv_shlib_version" = auto; then
5160                         if test -f /usr/libexec/ld.elf_so; then
5161                                 cf_cv_shlib_version=abi
5162                         else
5163                                 cf_cv_shlib_version=rel
5164                         fi
5165                         fi
5166
5167         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5168         if test "$cf_cv_shlib_version" = rel; then
5169                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5170         else
5171                 cf_shared_soname='`basename $@`'
5172         fi
5173
5174                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5175                 else
5176                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5177                 fi
5178                 ;;
5179         osf*|mls+*)
5180                 # tested with OSF/1 V3.2 and 'cc'
5181                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5182                 # link with shared libs).
5183                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5184                 case $host_os in
5185                 osf4*)
5186                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5187                         ;;
5188                 esac
5189                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5190                 if test "$DFT_LWR_MODEL" = "shared" ; then
5191                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5192                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5193                 fi
5194                 if test "$cf_cv_ld_rpath" = yes ; then
5195                         cf_ld_rpath_opt="-rpath"
5196                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5197                 fi
5198                 cf_cv_rm_so_locs=yes
5199                 ;;
5200         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5201                 # tested with osr5.0.5
5202                 if test "$GCC" != yes; then
5203                         CC_SHARED_OPTS='-belf -KPIC'
5204                 fi
5205                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5206                 if test "$cf_cv_ld_rpath" = yes ; then
5207                         # only way is to set LD_RUN_PATH but no switch for it
5208                         RUN_PATH=$libdir
5209                 fi
5210                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5211                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5212                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5213                 ;;
5214         sunos4*)
5215                 # tested with SunOS 4.1.1 and gcc 2.7.0
5216                 if test "$GCC" != yes; then
5217                         CC_SHARED_OPTS='-KPIC'
5218                 fi
5219                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5220                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5221                 ;;
5222         solaris2*)
5223                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5224                 if test "$GCC" != yes; then
5225                         CC_SHARED_OPTS='-KPIC'
5226                 fi
5227                 if test "$DFT_LWR_MODEL" = "shared" ; then
5228                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5229                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5230                 fi
5231                 if test "$cf_cv_ld_rpath" = yes ; then
5232                         cf_ld_rpath_opt="-R"
5233                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5234                 fi
5235
5236         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5237         if test "$cf_cv_shlib_version" = rel; then
5238                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5239         else
5240                 cf_shared_soname='`basename $@`'
5241         fi
5242
5243                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5244                 ;;
5245         sysv5uw7*|unix_sv*)
5246                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5247                 if test "$GCC" != yes; then
5248                         CC_SHARED_OPTS='-KPIC'
5249                 fi
5250                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5251                 ;;
5252         *)
5253                 CC_SHARED_OPTS='unknown'
5254                 MK_SHARED_LIB='echo unknown'
5255                 ;;
5256         esac
5257
5258         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5259         case "$cf_cv_shlib_version" in #(vi
5260         rel|abi)
5261                 case "$MK_SHARED_LIB" in #(vi
5262                 *'-o $@')
5263                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5264                         ;;
5265                 *)
5266                         { echo "$as_me:5266: WARNING: ignored --with-shlib-version" >&5
5267 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5268                         ;;
5269                 esac
5270                 ;;
5271         esac
5272
5273         if test -n "$cf_ld_rpath_opt" ; then
5274                 echo "$as_me:5274: checking if we need a space after rpath option" >&5
5275 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5276                 cf_save_LIBS="$LIBS"
5277                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5278                 cat >conftest.$ac_ext <<_ACEOF
5279 #line 5279 "configure"
5280 #include "confdefs.h"
5281
5282 int
5283 main ()
5284 {
5285
5286   ;
5287   return 0;
5288 }
5289 _ACEOF
5290 rm -f conftest.$ac_objext conftest$ac_exeext
5291 if { (eval echo "$as_me:5291: \"$ac_link\"") >&5
5292   (eval $ac_link) 2>&5
5293   ac_status=$?
5294   echo "$as_me:5294: \$? = $ac_status" >&5
5295   (exit $ac_status); } &&
5296          { ac_try='test -s conftest$ac_exeext'
5297   { (eval echo "$as_me:5297: \"$ac_try\"") >&5
5298   (eval $ac_try) 2>&5
5299   ac_status=$?
5300   echo "$as_me:5300: \$? = $ac_status" >&5
5301   (exit $ac_status); }; }; then
5302   cf_rpath_space=no
5303 else
5304   echo "$as_me: failed program was:" >&5
5305 cat conftest.$ac_ext >&5
5306 cf_rpath_space=yes
5307 fi
5308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5309                 LIBS="$cf_save_LIBS"
5310                 echo "$as_me:5310: result: $cf_rpath_space" >&5
5311 echo "${ECHO_T}$cf_rpath_space" >&6
5312                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5313                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5314         fi
5315
5316 if test "$CC_SHARED_OPTS" = "unknown"; then
5317         for model in $cf_list_models; do
5318                 if test "$model" = "shared"; then
5319                         { { echo "$as_me:5319: error: Shared libraries are not supported in this version" >&5
5320 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5321    { (exit 1); exit 1; }; }
5322                 fi
5323         done
5324 fi
5325
5326 ###############################################################################
5327
5328 ###     use option --disable-overwrite to leave out the link to -lcurses
5329 echo "$as_me:5329: checking if you wish to install ncurses overwriting curses" >&5
5330 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5331
5332 # Check whether --enable-overwrite or --disable-overwrite was given.
5333 if test "${enable_overwrite+set}" = set; then
5334   enableval="$enable_overwrite"
5335   with_overwrite=$enableval
5336 else
5337   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5338 fi;
5339 echo "$as_me:5339: result: $with_overwrite" >&5
5340 echo "${ECHO_T}$with_overwrite" >&6
5341
5342 echo "$as_me:5342: checking if external terminfo-database is used" >&5
5343 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5344
5345 # Check whether --enable-database or --disable-database was given.
5346 if test "${enable_database+set}" = set; then
5347   enableval="$enable_database"
5348   use_database=$enableval
5349 else
5350   use_database=yes
5351 fi;
5352 echo "$as_me:5352: result: $use_database" >&5
5353 echo "${ECHO_T}$use_database" >&6
5354
5355 case $host_os in #(vi
5356 os2*) #(vi
5357         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5358         ;;
5359 *) #(vi
5360         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5361         ;;
5362 esac
5363
5364         case $cf_cv_system_name in
5365         os2*)   PATHSEP=';'  ;;
5366         *)      PATHSEP=':'  ;;
5367         esac
5368
5369 if test "$use_database" != no ; then
5370         cat >>confdefs.h <<\EOF
5371 #define USE_DATABASE 1
5372 EOF
5373
5374         echo "$as_me:5374: checking which terminfo source-file will be installed" >&5
5375 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5376
5377 # Check whether --enable-database or --disable-database was given.
5378 if test "${enable_database+set}" = set; then
5379   enableval="$enable_database"
5380   TERMINFO_SRC=$withval
5381 fi;
5382         echo "$as_me:5382: result: $TERMINFO_SRC" >&5
5383 echo "${ECHO_T}$TERMINFO_SRC" >&6
5384
5385         echo "$as_me:5385: checking whether to use hashed database instead of directory/tree" >&5
5386 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5387
5388 # Check whether --with-hashed-db or --without-hashed-db was given.
5389 if test "${with_hashed_db+set}" = set; then
5390   withval="$with_hashed_db"
5391
5392 else
5393   with_hashed_db=no
5394 fi;
5395         echo "$as_me:5395: result: $with_hashed_db" >&5
5396 echo "${ECHO_T}$with_hashed_db" >&6
5397 fi
5398
5399 echo "$as_me:5399: checking for list of fallback descriptions" >&5
5400 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5401
5402 # Check whether --with-fallbacks or --without-fallbacks was given.
5403 if test "${with_fallbacks+set}" = set; then
5404   withval="$with_fallbacks"
5405   with_fallback=$withval
5406 else
5407   with_fallback=
5408 fi;
5409 echo "$as_me:5409: result: $with_fallback" >&5
5410 echo "${ECHO_T}$with_fallback" >&6
5411 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5412
5413 echo "$as_me:5413: checking if you want modern xterm or antique" >&5
5414 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5415
5416 # Check whether --with-xterm-new or --without-xterm-new was given.
5417 if test "${with_xterm_new+set}" = set; then
5418   withval="$with_xterm_new"
5419   with_xterm_new=$withval
5420 else
5421   with_xterm_new=yes
5422 fi;
5423 case $with_xterm_new in
5424 no)     with_xterm_new=xterm-old;;
5425 *)      with_xterm_new=xterm-new;;
5426 esac
5427 echo "$as_me:5427: result: $with_xterm_new" >&5
5428 echo "${ECHO_T}$with_xterm_new" >&6
5429 WHICH_XTERM=$with_xterm_new
5430
5431 MAKE_TERMINFO=
5432 if test "$use_database" = no ; then
5433         TERMINFO="${datadir}/terminfo"
5434         MAKE_TERMINFO="#"
5435 else
5436
5437 echo "$as_me:5437: checking for list of terminfo directories" >&5
5438 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5439
5440 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5441 if test "${with_terminfo_dirs+set}" = set; then
5442   withval="$with_terminfo_dirs"
5443
5444 else
5445   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5446 fi;
5447 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5448 cf_dst_path=
5449 for cf_src_path in $withval
5450 do
5451
5452 if test "x$prefix" != xNONE; then
5453   cf_path_syntax="$prefix"
5454 else
5455   cf_path_syntax="$ac_default_prefix"
5456 fi
5457
5458 case ".$cf_src_path" in #(vi
5459 .\$\(*\)*|.\'*\'*) #(vi
5460   ;;
5461 ..|./*|.\\*) #(vi
5462   ;;
5463 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5464   ;;
5465 .\${*prefix}*) #(vi
5466   eval cf_src_path="$cf_src_path"
5467   case ".$cf_src_path" in #(vi
5468   .NONE/*)
5469     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5470     ;;
5471   esac
5472   ;; #(vi
5473 .no|.NONE/*)
5474   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5475   ;;
5476 *)
5477   { { echo "$as_me:5477: error: expected a pathname, not \"$cf_src_path\"" >&5
5478 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5479    { (exit 1); exit 1; }; }
5480   ;;
5481 esac
5482
5483   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5484   cf_dst_path="${cf_dst_path}${cf_src_path}"
5485 done
5486 IFS="$ac_save_ifs"
5487
5488 eval 'TERMINFO_DIRS="$cf_dst_path"'
5489
5490 echo "$as_me:5490: result: $TERMINFO_DIRS" >&5
5491 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5492 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5493 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5494 EOF
5495
5496 echo "$as_me:5496: checking for default terminfo directory" >&5
5497 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5498
5499 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5500 if test "${with_default_terminfo_dir+set}" = set; then
5501   withval="$with_default_terminfo_dir"
5502
5503 else
5504   withval="${TERMINFO-${datadir}/terminfo}"
5505 fi; if test -n "${datadir}/terminfo" ; then
5506
5507 if test "x$prefix" != xNONE; then
5508   cf_path_syntax="$prefix"
5509 else
5510   cf_path_syntax="$ac_default_prefix"
5511 fi
5512
5513 case ".$withval" in #(vi
5514 .\$\(*\)*|.\'*\'*) #(vi
5515   ;;
5516 ..|./*|.\\*) #(vi
5517   ;;
5518 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5519   ;;
5520 .\${*prefix}*) #(vi
5521   eval withval="$withval"
5522   case ".$withval" in #(vi
5523   .NONE/*)
5524     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5525     ;;
5526   esac
5527   ;; #(vi
5528 .no|.NONE/*)
5529   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5530   ;;
5531 *)
5532   { { echo "$as_me:5532: error: expected a pathname, not \"$withval\"" >&5
5533 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5534    { (exit 1); exit 1; }; }
5535   ;;
5536 esac
5537
5538 fi
5539 TERMINFO="$withval"
5540
5541 echo "$as_me:5541: result: $TERMINFO" >&5
5542 echo "${ECHO_T}$TERMINFO" >&6
5543 cat >>confdefs.h <<EOF
5544 #define TERMINFO "$TERMINFO"
5545 EOF
5546
5547 fi
5548
5549 ###     use option --disable-big-core to make tic run on small machines
5550 ###     We need 4Mb, check if we can allocate 50% more than that.
5551 echo "$as_me:5551: checking if big-core option selected" >&5
5552 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5553
5554 # Check whether --enable-big-core or --disable-big-core was given.
5555 if test "${enable_big_core+set}" = set; then
5556   enableval="$enable_big_core"
5557   with_big_core=$enableval
5558 else
5559   if test "$cross_compiling" = yes; then
5560   with_big_core=no
5561 else
5562   cat >conftest.$ac_ext <<_ACEOF
5563 #line 5563 "configure"
5564 #include "confdefs.h"
5565
5566 #include <stdlib.h>
5567 #include <string.h>
5568 int main() {
5569         unsigned long n = 6000000L;
5570         char *s = malloc(n);
5571         if (s != 0)
5572                 s[0] = s[n-1] = 0;
5573         ${cf_cv_main_return:-return}(s == 0);
5574 }
5575 _ACEOF
5576 rm -f conftest$ac_exeext
5577 if { (eval echo "$as_me:5577: \"$ac_link\"") >&5
5578   (eval $ac_link) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5582   { (eval echo "$as_me:5582: \"$ac_try\"") >&5
5583   (eval $ac_try) 2>&5
5584   ac_status=$?
5585   echo "$as_me:5585: \$? = $ac_status" >&5
5586   (exit $ac_status); }; }; then
5587   with_big_core=yes
5588 else
5589   echo "$as_me: program exited with status $ac_status" >&5
5590 echo "$as_me: failed program was:" >&5
5591 cat conftest.$ac_ext >&5
5592 with_big_core=no
5593 fi
5594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5595 fi
5596 fi;
5597 echo "$as_me:5597: result: $with_big_core" >&5
5598 echo "${ECHO_T}$with_big_core" >&6
5599 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5600 #define HAVE_BIG_CORE 1
5601 EOF
5602
5603 ### ISO C only guarantees 512-char strings, we have tables which load faster
5604 ### when constructed using "big" strings.
5605 echo "$as_me:5605: checking if big-strings option selected" >&5
5606 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5607
5608 # Check whether --enable-big-strings or --disable-big-strings was given.
5609 if test "${enable_big_strings+set}" = set; then
5610   enableval="$enable_big_strings"
5611   with_big_strings=no
5612 else
5613   with_big_strings=yes
5614 fi;
5615 echo "$as_me:5615: result: $with_big_strings" >&5
5616 echo "${ECHO_T}$with_big_strings" >&6
5617
5618 USE_BIG_STRINGS=0
5619 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5620
5621 ###     use option --enable-termcap to compile in the termcap fallback support
5622 echo "$as_me:5622: checking if you want termcap-fallback support" >&5
5623 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5624
5625 # Check whether --enable-termcap or --disable-termcap was given.
5626 if test "${enable_termcap+set}" = set; then
5627   enableval="$enable_termcap"
5628   with_termcap=$enableval
5629 else
5630   with_termcap=no
5631 fi;
5632 echo "$as_me:5632: result: $with_termcap" >&5
5633 echo "${ECHO_T}$with_termcap" >&6
5634
5635 if test "$with_termcap" != "yes" ; then
5636         if test "$use_database" = no ; then
5637                 if test -z "$with_fallback" ; then
5638                         { { echo "$as_me:5638: error: You have disabled the database w/o specifying fallbacks" >&5
5639 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5640    { (exit 1); exit 1; }; }
5641                 fi
5642         fi
5643         cat >>confdefs.h <<\EOF
5644 #define PURE_TERMINFO 1
5645 EOF
5646
5647 else
5648
5649 if test "$with_ticlib" != no ; then
5650         { { echo "$as_me:5650: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5651 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5652    { (exit 1); exit 1; }; }
5653 fi
5654
5655 cat >>confdefs.h <<\EOF
5656 #define USE_TERMCAP 1
5657 EOF
5658
5659 echo "$as_me:5659: checking for list of termcap files" >&5
5660 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5661
5662 # Check whether --with-termpath or --without-termpath was given.
5663 if test "${with_termpath+set}" = set; then
5664   withval="$with_termpath"
5665
5666 else
5667   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5668 fi;
5669 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5670 cf_dst_path=
5671 for cf_src_path in $withval
5672 do
5673
5674 if test "x$prefix" != xNONE; then
5675   cf_path_syntax="$prefix"
5676 else
5677   cf_path_syntax="$ac_default_prefix"
5678 fi
5679
5680 case ".$cf_src_path" in #(vi
5681 .\$\(*\)*|.\'*\'*) #(vi
5682   ;;
5683 ..|./*|.\\*) #(vi
5684   ;;
5685 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5686   ;;
5687 .\${*prefix}*) #(vi
5688   eval cf_src_path="$cf_src_path"
5689   case ".$cf_src_path" in #(vi
5690   .NONE/*)
5691     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5692     ;;
5693   esac
5694   ;; #(vi
5695 .no|.NONE/*)
5696   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5697   ;;
5698 *)
5699   { { echo "$as_me:5699: error: expected a pathname, not \"$cf_src_path\"" >&5
5700 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5701    { (exit 1); exit 1; }; }
5702   ;;
5703 esac
5704
5705   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5706   cf_dst_path="${cf_dst_path}${cf_src_path}"
5707 done
5708 IFS="$ac_save_ifs"
5709
5710 eval 'TERMPATH="$cf_dst_path"'
5711
5712 echo "$as_me:5712: result: $TERMPATH" >&5
5713 echo "${ECHO_T}$TERMPATH" >&6
5714 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5715 #define TERMPATH "$TERMPATH"
5716 EOF
5717
5718 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5719 echo "$as_me:5719: checking if fast termcap-loader is needed" >&5
5720 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5721
5722 # Check whether --enable-getcap or --disable-getcap was given.
5723 if test "${enable_getcap+set}" = set; then
5724   enableval="$enable_getcap"
5725   with_getcap=$enableval
5726 else
5727   with_getcap=no
5728 fi;
5729 echo "$as_me:5729: result: $with_getcap" >&5
5730 echo "${ECHO_T}$with_getcap" >&6
5731 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5732 #define USE_GETCAP 1
5733 EOF
5734
5735 echo "$as_me:5735: checking if translated termcaps will be cached in ~/.terminfo" >&5
5736 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5737
5738 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5739 if test "${enable_getcap_cache+set}" = set; then
5740   enableval="$enable_getcap_cache"
5741   with_getcap_cache=$enableval
5742 else
5743   with_getcap_cache=no
5744 fi;
5745 echo "$as_me:5745: result: $with_getcap_cache" >&5
5746 echo "${ECHO_T}$with_getcap_cache" >&6
5747 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5748 #define USE_GETCAP_CACHE 1
5749 EOF
5750
5751 fi
5752
5753 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5754 echo "$as_me:5754: checking if ~/.terminfo is wanted" >&5
5755 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5756
5757 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5758 if test "${enable_home_terminfo+set}" = set; then
5759   enableval="$enable_home_terminfo"
5760   with_home_terminfo=$enableval
5761 else
5762   with_home_terminfo=yes
5763 fi;
5764 echo "$as_me:5764: result: $with_home_terminfo" >&5
5765 echo "${ECHO_T}$with_home_terminfo" >&6
5766 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5767 #define USE_HOME_TERMINFO 1
5768 EOF
5769
5770 echo "$as_me:5770: checking if you want to use restricted environment when running as root" >&5
5771 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5772
5773 # Check whether --enable-root-environ or --disable-root-environ was given.
5774 if test "${enable_root_environ+set}" = set; then
5775   enableval="$enable_root_environ"
5776   with_root_environ=$enableval
5777 else
5778   with_root_environ=yes
5779 fi;
5780 echo "$as_me:5780: result: $with_root_environ" >&5
5781 echo "${ECHO_T}$with_root_environ" >&6
5782 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5783 #define USE_ROOT_ENVIRON 1
5784 EOF
5785
5786 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5787 ###   to reduce storage requirements for the terminfo database.
5788
5789 for ac_func in \
5790         remove \
5791         unlink
5792 do
5793 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5794 echo "$as_me:5794: checking for $ac_func" >&5
5795 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5796 if eval "test \"\${$as_ac_var+set}\" = set"; then
5797   echo $ECHO_N "(cached) $ECHO_C" >&6
5798 else
5799   cat >conftest.$ac_ext <<_ACEOF
5800 #line 5800 "configure"
5801 #include "confdefs.h"
5802 /* System header to define __stub macros and hopefully few prototypes,
5803     which can conflict with char $ac_func (); below.  */
5804 #include <assert.h>
5805 /* Override any gcc2 internal prototype to avoid an error.  */
5806 #ifdef __cplusplus
5807 extern "C"
5808 #endif
5809 /* We use char because int might match the return type of a gcc2
5810    builtin and then its argument prototype would still apply.  */
5811 char $ac_func ();
5812 char (*f) ();
5813
5814 int
5815 main ()
5816 {
5817 /* The GNU C library defines this for functions which it implements
5818     to always fail with ENOSYS.  Some functions are actually named
5819     something starting with __ and the normal name is an alias.  */
5820 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5821 choke me
5822 #else
5823 f = $ac_func;
5824 #endif
5825
5826   ;
5827   return 0;
5828 }
5829 _ACEOF
5830 rm -f conftest.$ac_objext conftest$ac_exeext
5831 if { (eval echo "$as_me:5831: \"$ac_link\"") >&5
5832   (eval $ac_link) 2>&5
5833   ac_status=$?
5834   echo "$as_me:5834: \$? = $ac_status" >&5
5835   (exit $ac_status); } &&
5836          { ac_try='test -s conftest$ac_exeext'
5837   { (eval echo "$as_me:5837: \"$ac_try\"") >&5
5838   (eval $ac_try) 2>&5
5839   ac_status=$?
5840   echo "$as_me:5840: \$? = $ac_status" >&5
5841   (exit $ac_status); }; }; then
5842   eval "$as_ac_var=yes"
5843 else
5844   echo "$as_me: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 eval "$as_ac_var=no"
5847 fi
5848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5849 fi
5850 echo "$as_me:5850: result: `eval echo '${'$as_ac_var'}'`" >&5
5851 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5852 if test `eval echo '${'$as_ac_var'}'` = yes; then
5853   cat >>confdefs.h <<EOF
5854 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5855 EOF
5856
5857 fi
5858 done
5859
5860 if test "$cross_compiling" = yes ; then
5861
5862 for ac_func in \
5863                 link \
5864                 symlink
5865 do
5866 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5867 echo "$as_me:5867: checking for $ac_func" >&5
5868 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5869 if eval "test \"\${$as_ac_var+set}\" = set"; then
5870   echo $ECHO_N "(cached) $ECHO_C" >&6
5871 else
5872   cat >conftest.$ac_ext <<_ACEOF
5873 #line 5873 "configure"
5874 #include "confdefs.h"
5875 /* System header to define __stub macros and hopefully few prototypes,
5876     which can conflict with char $ac_func (); below.  */
5877 #include <assert.h>
5878 /* Override any gcc2 internal prototype to avoid an error.  */
5879 #ifdef __cplusplus
5880 extern "C"
5881 #endif
5882 /* We use char because int might match the return type of a gcc2
5883    builtin and then its argument prototype would still apply.  */
5884 char $ac_func ();
5885 char (*f) ();
5886
5887 int
5888 main ()
5889 {
5890 /* The GNU C library defines this for functions which it implements
5891     to always fail with ENOSYS.  Some functions are actually named
5892     something starting with __ and the normal name is an alias.  */
5893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5894 choke me
5895 #else
5896 f = $ac_func;
5897 #endif
5898
5899   ;
5900   return 0;
5901 }
5902 _ACEOF
5903 rm -f conftest.$ac_objext conftest$ac_exeext
5904 if { (eval echo "$as_me:5904: \"$ac_link\"") >&5
5905   (eval $ac_link) 2>&5
5906   ac_status=$?
5907   echo "$as_me:5907: \$? = $ac_status" >&5
5908   (exit $ac_status); } &&
5909          { ac_try='test -s conftest$ac_exeext'
5910   { (eval echo "$as_me:5910: \"$ac_try\"") >&5
5911   (eval $ac_try) 2>&5
5912   ac_status=$?
5913   echo "$as_me:5913: \$? = $ac_status" >&5
5914   (exit $ac_status); }; }; then
5915   eval "$as_ac_var=yes"
5916 else
5917   echo "$as_me: failed program was:" >&5
5918 cat conftest.$ac_ext >&5
5919 eval "$as_ac_var=no"
5920 fi
5921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5922 fi
5923 echo "$as_me:5923: result: `eval echo '${'$as_ac_var'}'`" >&5
5924 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5925 if test `eval echo '${'$as_ac_var'}'` = yes; then
5926   cat >>confdefs.h <<EOF
5927 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5928 EOF
5929
5930 fi
5931 done
5932
5933 else
5934         echo "$as_me:5934: checking if link/symlink functions work" >&5
5935 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5936 if test "${cf_cv_link_funcs+set}" = set; then
5937   echo $ECHO_N "(cached) $ECHO_C" >&6
5938 else
5939
5940                 cf_cv_link_funcs=
5941                 for cf_func in link symlink ; do
5942                         if test "$cross_compiling" = yes; then
5943
5944                         eval 'ac_cv_func_'$cf_func'=error'
5945 else
5946   cat >conftest.$ac_ext <<_ACEOF
5947 #line 5947 "configure"
5948 #include "confdefs.h"
5949
5950 #include <sys/types.h>
5951 #include <sys/stat.h>
5952 #ifdef HAVE_UNISTD_H
5953 #include <unistd.h>
5954 #endif
5955 int main()
5956 {
5957         int fail = 0;
5958         char *src = "config.log";
5959         char *dst = "conftest.chk";
5960         struct stat src_sb;
5961         struct stat dst_sb;
5962
5963         stat(src, &src_sb);
5964         fail = ($cf_func("config.log", "conftest.chk") < 0)
5965             || (stat(dst, &dst_sb) < 0)
5966             || (dst_sb.st_mtime != src_sb.st_mtime);
5967 #ifdef HAVE_UNLINK
5968         unlink(dst);
5969 #else
5970         remove(dst);
5971 #endif
5972         ${cf_cv_main_return:-return} (fail);
5973 }
5974
5975 _ACEOF
5976 rm -f conftest$ac_exeext
5977 if { (eval echo "$as_me:5977: \"$ac_link\"") >&5
5978   (eval $ac_link) 2>&5
5979   ac_status=$?
5980   echo "$as_me:5980: \$? = $ac_status" >&5
5981   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5982   { (eval echo "$as_me:5982: \"$ac_try\"") >&5
5983   (eval $ac_try) 2>&5
5984   ac_status=$?
5985   echo "$as_me:5985: \$? = $ac_status" >&5
5986   (exit $ac_status); }; }; then
5987
5988                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5989                         eval 'ac_cv_func_'$cf_func'=yes'
5990 else
5991   echo "$as_me: program exited with status $ac_status" >&5
5992 echo "$as_me: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5994
5995                         eval 'ac_cv_func_'$cf_func'=no'
5996 fi
5997 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5998 fi
5999                 done
6000                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6001
6002 fi
6003 echo "$as_me:6003: result: $cf_cv_link_funcs" >&5
6004 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6005         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6006 #define HAVE_LINK 1
6007 EOF
6008
6009         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6010 #define HAVE_SYMLINK 1
6011 EOF
6012
6013 fi
6014
6015 with_links=no
6016 with_symlinks=no
6017
6018 # soft links (symbolic links) are useful for some systems where hard links do
6019 # not work, or to make it simpler to copy terminfo trees around.
6020 if test "$ac_cv_func_symlink" = yes ; then
6021     echo "$as_me:6021: checking if tic should use symbolic links" >&5
6022 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6023
6024 # Check whether --enable-symlinks or --disable-symlinks was given.
6025 if test "${enable_symlinks+set}" = set; then
6026   enableval="$enable_symlinks"
6027   with_symlinks=$enableval
6028 else
6029   with_symlinks=no
6030 fi;
6031     echo "$as_me:6031: result: $with_symlinks" >&5
6032 echo "${ECHO_T}$with_symlinks" >&6
6033 fi
6034
6035 # If we have hard links and did not choose to use soft links instead, there is
6036 # no reason to make this choice optional - use the hard links.
6037 if test "$with_symlinks" = no ; then
6038     echo "$as_me:6038: checking if tic should use hard links" >&5
6039 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6040     if test "$ac_cv_func_link" = yes ; then
6041         with_links=yes
6042     else
6043         with_links=no
6044     fi
6045     echo "$as_me:6045: result: $with_links" >&5
6046 echo "${ECHO_T}$with_links" >&6
6047 fi
6048
6049 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6050 #define USE_LINKS 1
6051 EOF
6052
6053 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6054 #define USE_SYMLINKS 1
6055 EOF
6056
6057 ###   use option --enable-broken-linker to force on use of broken-linker support
6058 echo "$as_me:6058: checking if you want broken-linker support code" >&5
6059 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6060
6061 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6062 if test "${enable_broken_linker+set}" = set; then
6063   enableval="$enable_broken_linker"
6064   with_broken_linker=$enableval
6065 else
6066   with_broken_linker=${BROKEN_LINKER-no}
6067 fi;
6068 echo "$as_me:6068: result: $with_broken_linker" >&5
6069 echo "${ECHO_T}$with_broken_linker" >&6
6070
6071 BROKEN_LINKER=0
6072 if test "$with_broken_linker" = yes ; then
6073         cat >>confdefs.h <<\EOF
6074 #define BROKEN_LINKER 1
6075 EOF
6076
6077         BROKEN_LINKER=1
6078 elif test "$DFT_LWR_MODEL" = shared ; then
6079         case $cf_cv_system_name in #(vi
6080         cygwin*)
6081                 cat >>confdefs.h <<\EOF
6082 #define BROKEN_LINKER 1
6083 EOF
6084
6085                 BROKEN_LINKER=1
6086                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6087
6088 echo "${as_me-configure}:6088: testing cygwin linker is broken anyway ..." 1>&5
6089
6090                 ;;
6091         esac
6092 fi
6093
6094 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6095 echo "$as_me:6095: checking if tputs should process BSD-style prefix padding" >&5
6096 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6097
6098 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6099 if test "${enable_bsdpad+set}" = set; then
6100   enableval="$enable_bsdpad"
6101   with_bsdpad=$enableval
6102 else
6103   with_bsdpad=no
6104 fi;
6105 echo "$as_me:6105: result: $with_bsdpad" >&5
6106 echo "${ECHO_T}$with_bsdpad" >&6
6107 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6108 #define BSD_TPUTS 1
6109 EOF
6110
6111 ###   use option --enable-widec to turn on use of wide-character support
6112 NCURSES_CH_T=chtype
6113 NCURSES_LIBUTF8=0
6114
6115 NEED_WCHAR_H=0
6116 NCURSES_MBSTATE_T=0
6117 NCURSES_WCHAR_T=0
6118 NCURSES_WINT_T=0
6119
6120 # Check to define _XOPEN_SOURCE "automatically"
6121
6122 echo "$as_me:6122: checking if $CC -U and -D options work together" >&5
6123 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6124 if test "${cf_cv_cc_u_d_options+set}" = set; then
6125   echo $ECHO_N "(cached) $ECHO_C" >&6
6126 else
6127
6128         cf_save_CPPFLAGS="$CPPFLAGS"
6129         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6130         cat >conftest.$ac_ext <<_ACEOF
6131 #line 6131 "configure"
6132 #include "confdefs.h"
6133
6134 int
6135 main ()
6136 {
6137
6138 #ifndef U_D_OPTIONS
6139 make an undefined-error
6140 #endif
6141 #ifdef  D_U_OPTIONS
6142 make a defined-error
6143 #endif
6144
6145   ;
6146   return 0;
6147 }
6148 _ACEOF
6149 rm -f conftest.$ac_objext
6150 if { (eval echo "$as_me:6150: \"$ac_compile\"") >&5
6151   (eval $ac_compile) 2>&5
6152   ac_status=$?
6153   echo "$as_me:6153: \$? = $ac_status" >&5
6154   (exit $ac_status); } &&
6155          { ac_try='test -s conftest.$ac_objext'
6156   { (eval echo "$as_me:6156: \"$ac_try\"") >&5
6157   (eval $ac_try) 2>&5
6158   ac_status=$?
6159   echo "$as_me:6159: \$? = $ac_status" >&5
6160   (exit $ac_status); }; }; then
6161
6162         cf_cv_cc_u_d_options=yes
6163 else
6164   echo "$as_me: failed program was:" >&5
6165 cat conftest.$ac_ext >&5
6166
6167         cf_cv_cc_u_d_options=no
6168 fi
6169 rm -f conftest.$ac_objext conftest.$ac_ext
6170         CPPFLAGS="$cf_save_CPPFLAGS"
6171
6172 fi
6173 echo "$as_me:6173: result: $cf_cv_cc_u_d_options" >&5
6174 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6175
6176 cf_XOPEN_SOURCE=500
6177 cf_POSIX_C_SOURCE=199506L
6178
6179 case $host_os in #(vi
6180 aix[45]*) #(vi
6181         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6182         ;;
6183 freebsd*) #(vi
6184         # 5.x headers associate
6185         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6186         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6187         cf_POSIX_C_SOURCE=200112L
6188         cf_XOPEN_SOURCE=600
6189         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6190         ;;
6191 hpux*) #(vi
6192         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6193         ;;
6194 irix[56].*) #(vi
6195         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6196         ;;
6197 linux*|gnu*|k*bsd*-gnu) #(vi
6198
6199 echo "$as_me:6199: checking if we must define _GNU_SOURCE" >&5
6200 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6201 if test "${cf_cv_gnu_source+set}" = set; then
6202   echo $ECHO_N "(cached) $ECHO_C" >&6
6203 else
6204
6205 cat >conftest.$ac_ext <<_ACEOF
6206 #line 6206 "configure"
6207 #include "confdefs.h"
6208 #include <sys/types.h>
6209 int
6210 main ()
6211 {
6212
6213 #ifndef _XOPEN_SOURCE
6214 make an error
6215 #endif
6216   ;
6217   return 0;
6218 }
6219 _ACEOF
6220 rm -f conftest.$ac_objext
6221 if { (eval echo "$as_me:6221: \"$ac_compile\"") >&5
6222   (eval $ac_compile) 2>&5
6223   ac_status=$?
6224   echo "$as_me:6224: \$? = $ac_status" >&5
6225   (exit $ac_status); } &&
6226          { ac_try='test -s conftest.$ac_objext'
6227   { (eval echo "$as_me:6227: \"$ac_try\"") >&5
6228   (eval $ac_try) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit $ac_status); }; }; then
6232   cf_cv_gnu_source=no
6233 else
6234   echo "$as_me: failed program was:" >&5
6235 cat conftest.$ac_ext >&5
6236 cf_save="$CPPFLAGS"
6237          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6238          cat >conftest.$ac_ext <<_ACEOF
6239 #line 6239 "configure"
6240 #include "confdefs.h"
6241 #include <sys/types.h>
6242 int
6243 main ()
6244 {
6245
6246 #ifdef _XOPEN_SOURCE
6247 make an error
6248 #endif
6249   ;
6250   return 0;
6251 }
6252 _ACEOF
6253 rm -f conftest.$ac_objext
6254 if { (eval echo "$as_me:6254: \"$ac_compile\"") >&5
6255   (eval $ac_compile) 2>&5
6256   ac_status=$?
6257   echo "$as_me:6257: \$? = $ac_status" >&5
6258   (exit $ac_status); } &&
6259          { ac_try='test -s conftest.$ac_objext'
6260   { (eval echo "$as_me:6260: \"$ac_try\"") >&5
6261   (eval $ac_try) 2>&5
6262   ac_status=$?
6263   echo "$as_me:6263: \$? = $ac_status" >&5
6264   (exit $ac_status); }; }; then
6265   cf_cv_gnu_source=no
6266 else
6267   echo "$as_me: failed program was:" >&5
6268 cat conftest.$ac_ext >&5
6269 cf_cv_gnu_source=yes
6270 fi
6271 rm -f conftest.$ac_objext conftest.$ac_ext
6272         CPPFLAGS="$cf_save"
6273
6274 fi
6275 rm -f conftest.$ac_objext conftest.$ac_ext
6276
6277 fi
6278 echo "$as_me:6278: result: $cf_cv_gnu_source" >&5
6279 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6280 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6281
6282         ;;
6283 mirbsd*) #(vi
6284         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6285         ;;
6286 netbsd*) #(vi
6287         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6288         ;;
6289 openbsd*) #(vi
6290         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6291         ;;
6292 osf[45]*) #(vi
6293         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6294         ;;
6295 nto-qnx*) #(vi
6296         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6297         ;;
6298 sco*) #(vi
6299         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6300         ;;
6301 solaris*) #(vi
6302         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6303         ;;
6304 *)
6305         echo "$as_me:6305: checking if we should define _XOPEN_SOURCE" >&5
6306 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6307 if test "${cf_cv_xopen_source+set}" = set; then
6308   echo $ECHO_N "(cached) $ECHO_C" >&6
6309 else
6310
6311         cat >conftest.$ac_ext <<_ACEOF
6312 #line 6312 "configure"
6313 #include "confdefs.h"
6314 #include <sys/types.h>
6315 int
6316 main ()
6317 {
6318
6319 #ifndef _XOPEN_SOURCE
6320 make an error
6321 #endif
6322   ;
6323   return 0;
6324 }
6325 _ACEOF
6326 rm -f conftest.$ac_objext
6327 if { (eval echo "$as_me:6327: \"$ac_compile\"") >&5
6328   (eval $ac_compile) 2>&5
6329   ac_status=$?
6330   echo "$as_me:6330: \$? = $ac_status" >&5
6331   (exit $ac_status); } &&
6332          { ac_try='test -s conftest.$ac_objext'
6333   { (eval echo "$as_me:6333: \"$ac_try\"") >&5
6334   (eval $ac_try) 2>&5
6335   ac_status=$?
6336   echo "$as_me:6336: \$? = $ac_status" >&5
6337   (exit $ac_status); }; }; then
6338   cf_cv_xopen_source=no
6339 else
6340   echo "$as_me: failed program was:" >&5
6341 cat conftest.$ac_ext >&5
6342 cf_save="$CPPFLAGS"
6343          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6344          cat >conftest.$ac_ext <<_ACEOF
6345 #line 6345 "configure"
6346 #include "confdefs.h"
6347 #include <sys/types.h>
6348 int
6349 main ()
6350 {
6351
6352 #ifdef _XOPEN_SOURCE
6353 make an error
6354 #endif
6355   ;
6356   return 0;
6357 }
6358 _ACEOF
6359 rm -f conftest.$ac_objext
6360 if { (eval echo "$as_me:6360: \"$ac_compile\"") >&5
6361   (eval $ac_compile) 2>&5
6362   ac_status=$?
6363   echo "$as_me:6363: \$? = $ac_status" >&5
6364   (exit $ac_status); } &&
6365          { ac_try='test -s conftest.$ac_objext'
6366   { (eval echo "$as_me:6366: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:6369: \$? = $ac_status" >&5
6370   (exit $ac_status); }; }; then
6371   cf_cv_xopen_source=no
6372 else
6373   echo "$as_me: failed program was:" >&5
6374 cat conftest.$ac_ext >&5
6375 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6376 fi
6377 rm -f conftest.$ac_objext conftest.$ac_ext
6378         CPPFLAGS="$cf_save"
6379
6380 fi
6381 rm -f conftest.$ac_objext conftest.$ac_ext
6382
6383 fi
6384 echo "$as_me:6384: result: $cf_cv_xopen_source" >&5
6385 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6386         if test "$cf_cv_xopen_source" != no ; then
6387
6388 # remove _XOPEN_SOURCE symbol from $CFLAGS
6389 CFLAGS=`echo "$CFLAGS" | \
6390         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6391                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6392
6393 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6394 CPPFLAGS=`echo "$CPPFLAGS" | \
6395         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6396                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6397
6398                 test "$cf_cv_cc_u_d_options" = yes && \
6399                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6400                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6401         fi
6402
6403 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6404
6405 cf_save_CFLAGS="$CFLAGS"
6406 cf_save_CPPFLAGS="$CPPFLAGS"
6407
6408 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6409 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6410         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6411                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6412
6413 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6414 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6415         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6416                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6417
6418 echo "$as_me:6418: checking if we should define _POSIX_C_SOURCE" >&5
6419 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6420 if test "${cf_cv_posix_c_source+set}" = set; then
6421   echo $ECHO_N "(cached) $ECHO_C" >&6
6422 else
6423
6424 echo "${as_me-configure}:6424: testing if the symbol is already defined go no further ..." 1>&5
6425
6426         cat >conftest.$ac_ext <<_ACEOF
6427 #line 6427 "configure"
6428 #include "confdefs.h"
6429 #include <sys/types.h>
6430 int
6431 main ()
6432 {
6433
6434 #ifndef _POSIX_C_SOURCE
6435 make an error
6436 #endif
6437   ;
6438   return 0;
6439 }
6440 _ACEOF
6441 rm -f conftest.$ac_objext
6442 if { (eval echo "$as_me:6442: \"$ac_compile\"") >&5
6443   (eval $ac_compile) 2>&5
6444   ac_status=$?
6445   echo "$as_me:6445: \$? = $ac_status" >&5
6446   (exit $ac_status); } &&
6447          { ac_try='test -s conftest.$ac_objext'
6448   { (eval echo "$as_me:6448: \"$ac_try\"") >&5
6449   (eval $ac_try) 2>&5
6450   ac_status=$?
6451   echo "$as_me:6451: \$? = $ac_status" >&5
6452   (exit $ac_status); }; }; then
6453   cf_cv_posix_c_source=no
6454 else
6455   echo "$as_me: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6457 cf_want_posix_source=no
6458          case .$cf_POSIX_C_SOURCE in #(vi
6459          .[12]??*) #(vi
6460                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6461                 ;;
6462          .2) #(vi
6463                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6464                 cf_want_posix_source=yes
6465                 ;;
6466          .*)
6467                 cf_want_posix_source=yes
6468                 ;;
6469          esac
6470          if test "$cf_want_posix_source" = yes ; then
6471                 cat >conftest.$ac_ext <<_ACEOF
6472 #line 6472 "configure"
6473 #include "confdefs.h"
6474 #include <sys/types.h>
6475 int
6476 main ()
6477 {
6478
6479 #ifdef _POSIX_SOURCE
6480 make an error
6481 #endif
6482   ;
6483   return 0;
6484 }
6485 _ACEOF
6486 rm -f conftest.$ac_objext
6487 if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5
6488   (eval $ac_compile) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); } &&
6492          { ac_try='test -s conftest.$ac_objext'
6493   { (eval echo "$as_me:6493: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:6496: \$? = $ac_status" >&5
6497   (exit $ac_status); }; }; then
6498   :
6499 else
6500   echo "$as_me: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6502 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6503 fi
6504 rm -f conftest.$ac_objext conftest.$ac_ext
6505          fi
6506
6507 echo "${as_me-configure}:6507: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6508
6509          CFLAGS="$cf_trim_CFLAGS"
6510          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6511
6512 echo "${as_me-configure}:6512: testing if the second compile does not leave our definition intact error ..." 1>&5
6513
6514          cat >conftest.$ac_ext <<_ACEOF
6515 #line 6515 "configure"
6516 #include "confdefs.h"
6517 #include <sys/types.h>
6518 int
6519 main ()
6520 {
6521
6522 #ifndef _POSIX_C_SOURCE
6523 make an error
6524 #endif
6525   ;
6526   return 0;
6527 }
6528 _ACEOF
6529 rm -f conftest.$ac_objext
6530 if { (eval echo "$as_me:6530: \"$ac_compile\"") >&5
6531   (eval $ac_compile) 2>&5
6532   ac_status=$?
6533   echo "$as_me:6533: \$? = $ac_status" >&5
6534   (exit $ac_status); } &&
6535          { ac_try='test -s conftest.$ac_objext'
6536   { (eval echo "$as_me:6536: \"$ac_try\"") >&5
6537   (eval $ac_try) 2>&5
6538   ac_status=$?
6539   echo "$as_me:6539: \$? = $ac_status" >&5
6540   (exit $ac_status); }; }; then
6541   :
6542 else
6543   echo "$as_me: failed program was:" >&5
6544 cat conftest.$ac_ext >&5
6545 cf_cv_posix_c_source=no
6546 fi
6547 rm -f conftest.$ac_objext conftest.$ac_ext
6548          CFLAGS="$cf_save_CFLAGS"
6549          CPPFLAGS="$cf_save_CPPFLAGS"
6550
6551 fi
6552 rm -f conftest.$ac_objext conftest.$ac_ext
6553
6554 fi
6555 echo "$as_me:6555: result: $cf_cv_posix_c_source" >&5
6556 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6557
6558 if test "$cf_cv_posix_c_source" != no ; then
6559         CFLAGS="$cf_trim_CFLAGS"
6560         CPPFLAGS="$cf_trim_CPPFLAGS"
6561         if test "$cf_cv_cc_u_d_options" = yes ; then
6562                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6563                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6564                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6565         fi
6566         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6567 fi
6568
6569         ;;
6570 esac
6571
6572 # Work around breakage on OS X
6573
6574 echo "$as_me:6574: checking if SIGWINCH is defined" >&5
6575 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6576 if test "${cf_cv_define_sigwinch+set}" = set; then
6577   echo $ECHO_N "(cached) $ECHO_C" >&6
6578 else
6579
6580         cat >conftest.$ac_ext <<_ACEOF
6581 #line 6581 "configure"
6582 #include "confdefs.h"
6583
6584 #include <sys/types.h>
6585 #include <sys/signal.h>
6586
6587 int
6588 main ()
6589 {
6590 int x = SIGWINCH
6591   ;
6592   return 0;
6593 }
6594 _ACEOF
6595 rm -f conftest.$ac_objext
6596 if { (eval echo "$as_me:6596: \"$ac_compile\"") >&5
6597   (eval $ac_compile) 2>&5
6598   ac_status=$?
6599   echo "$as_me:6599: \$? = $ac_status" >&5
6600   (exit $ac_status); } &&
6601          { ac_try='test -s conftest.$ac_objext'
6602   { (eval echo "$as_me:6602: \"$ac_try\"") >&5
6603   (eval $ac_try) 2>&5
6604   ac_status=$?
6605   echo "$as_me:6605: \$? = $ac_status" >&5
6606   (exit $ac_status); }; }; then
6607   cf_cv_define_sigwinch=yes
6608 else
6609   echo "$as_me: failed program was:" >&5
6610 cat conftest.$ac_ext >&5
6611 cat >conftest.$ac_ext <<_ACEOF
6612 #line 6612 "configure"
6613 #include "confdefs.h"
6614
6615 #undef _XOPEN_SOURCE
6616 #undef _POSIX_SOURCE
6617 #undef _POSIX_C_SOURCE
6618 #include <sys/types.h>
6619 #include <sys/signal.h>
6620
6621 int
6622 main ()
6623 {
6624 int x = SIGWINCH
6625   ;
6626   return 0;
6627 }
6628 _ACEOF
6629 rm -f conftest.$ac_objext
6630 if { (eval echo "$as_me:6630: \"$ac_compile\"") >&5
6631   (eval $ac_compile) 2>&5
6632   ac_status=$?
6633   echo "$as_me:6633: \$? = $ac_status" >&5
6634   (exit $ac_status); } &&
6635          { ac_try='test -s conftest.$ac_objext'
6636   { (eval echo "$as_me:6636: \"$ac_try\"") >&5
6637   (eval $ac_try) 2>&5
6638   ac_status=$?
6639   echo "$as_me:6639: \$? = $ac_status" >&5
6640   (exit $ac_status); }; }; then
6641   cf_cv_define_sigwinch=maybe
6642 else
6643   echo "$as_me: failed program was:" >&5
6644 cat conftest.$ac_ext >&5
6645 cf_cv_define_sigwinch=no
6646 fi
6647 rm -f conftest.$ac_objext conftest.$ac_ext
6648
6649 fi
6650 rm -f conftest.$ac_objext conftest.$ac_ext
6651
6652 fi
6653 echo "$as_me:6653: result: $cf_cv_define_sigwinch" >&5
6654 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6655
6656 if test "$cf_cv_define_sigwinch" = maybe ; then
6657 echo "$as_me:6657: checking for actual SIGWINCH definition" >&5
6658 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6659 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6660   echo $ECHO_N "(cached) $ECHO_C" >&6
6661 else
6662
6663 cf_cv_fixup_sigwinch=unknown
6664 cf_sigwinch=32
6665 while test $cf_sigwinch != 1
6666 do
6667         cat >conftest.$ac_ext <<_ACEOF
6668 #line 6668 "configure"
6669 #include "confdefs.h"
6670
6671 #undef _XOPEN_SOURCE
6672 #undef _POSIX_SOURCE
6673 #undef _POSIX_C_SOURCE
6674 #include <sys/types.h>
6675 #include <sys/signal.h>
6676
6677 int
6678 main ()
6679 {
6680
6681 #if SIGWINCH != $cf_sigwinch
6682 make an error
6683 #endif
6684 int x = SIGWINCH
6685   ;
6686   return 0;
6687 }
6688 _ACEOF
6689 rm -f conftest.$ac_objext
6690 if { (eval echo "$as_me:6690: \"$ac_compile\"") >&5
6691   (eval $ac_compile) 2>&5
6692   ac_status=$?
6693   echo "$as_me:6693: \$? = $ac_status" >&5
6694   (exit $ac_status); } &&
6695          { ac_try='test -s conftest.$ac_objext'
6696   { (eval echo "$as_me:6696: \"$ac_try\"") >&5
6697   (eval $ac_try) 2>&5
6698   ac_status=$?
6699   echo "$as_me:6699: \$? = $ac_status" >&5
6700   (exit $ac_status); }; }; then
6701   cf_cv_fixup_sigwinch=$cf_sigwinch
6702          break
6703 else
6704   echo "$as_me: failed program was:" >&5
6705 cat conftest.$ac_ext >&5
6706 fi
6707 rm -f conftest.$ac_objext conftest.$ac_ext
6708
6709 cf_sigwinch=`expr $cf_sigwinch - 1`
6710 done
6711
6712 fi
6713 echo "$as_me:6713: result: $cf_cv_fixup_sigwinch" >&5
6714 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6715
6716         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6717                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6718         fi
6719 fi
6720
6721 # Checks for CODESET support.
6722
6723   echo "$as_me:6723: checking for nl_langinfo and CODESET" >&5
6724 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6725 if test "${am_cv_langinfo_codeset+set}" = set; then
6726   echo $ECHO_N "(cached) $ECHO_C" >&6
6727 else
6728   cat >conftest.$ac_ext <<_ACEOF
6729 #line 6729 "configure"
6730 #include "confdefs.h"
6731 #include <langinfo.h>
6732 int
6733 main ()
6734 {
6735 char* cs = nl_langinfo(CODESET);
6736   ;
6737   return 0;
6738 }
6739 _ACEOF
6740 rm -f conftest.$ac_objext conftest$ac_exeext
6741 if { (eval echo "$as_me:6741: \"$ac_link\"") >&5
6742   (eval $ac_link) 2>&5
6743   ac_status=$?
6744   echo "$as_me:6744: \$? = $ac_status" >&5
6745   (exit $ac_status); } &&
6746          { ac_try='test -s conftest$ac_exeext'
6747   { (eval echo "$as_me:6747: \"$ac_try\"") >&5
6748   (eval $ac_try) 2>&5
6749   ac_status=$?
6750   echo "$as_me:6750: \$? = $ac_status" >&5
6751   (exit $ac_status); }; }; then
6752   am_cv_langinfo_codeset=yes
6753 else
6754   echo "$as_me: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756 am_cv_langinfo_codeset=no
6757 fi
6758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6759
6760 fi
6761 echo "$as_me:6761: result: $am_cv_langinfo_codeset" >&5
6762 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6763   if test $am_cv_langinfo_codeset = yes; then
6764
6765 cat >>confdefs.h <<\EOF
6766 #define HAVE_LANGINFO_CODESET 1
6767 EOF
6768
6769   fi
6770
6771 # use these variables to work around a defect in gcc's fixincludes.
6772 NCURSES_OK_WCHAR_T=
6773 NCURSES_OK_WINT_T=
6774
6775 echo "$as_me:6775: checking if you want wide-character code" >&5
6776 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6777
6778 # Check whether --enable-widec or --disable-widec was given.
6779 if test "${enable_widec+set}" = set; then
6780   enableval="$enable_widec"
6781   with_widec=$enableval
6782 else
6783   with_widec=no
6784 fi;
6785 echo "$as_me:6785: result: $with_widec" >&5
6786 echo "${ECHO_T}$with_widec" >&6
6787 if test "$with_widec" = yes ; then
6788         LIB_SUFFIX="w${LIB_SUFFIX}"
6789         cat >>confdefs.h <<\EOF
6790 #define USE_WIDEC_SUPPORT 1
6791 EOF
6792
6793 echo "$as_me:6793: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6794 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6795 cat >conftest.$ac_ext <<_ACEOF
6796 #line 6796 "configure"
6797 #include "confdefs.h"
6798 #include <sys/types.h>
6799
6800 int
6801 main ()
6802 {
6803
6804 #ifndef _XOPEN_SOURCE_EXTENDED
6805 make an error
6806 #endif
6807   ;
6808   return 0;
6809 }
6810 _ACEOF
6811 rm -f conftest.$ac_objext
6812 if { (eval echo "$as_me:6812: \"$ac_compile\"") >&5
6813   (eval $ac_compile) 2>&5
6814   ac_status=$?
6815   echo "$as_me:6815: \$? = $ac_status" >&5
6816   (exit $ac_status); } &&
6817          { ac_try='test -s conftest.$ac_objext'
6818   { (eval echo "$as_me:6818: \"$ac_try\"") >&5
6819   (eval $ac_try) 2>&5
6820   ac_status=$?
6821   echo "$as_me:6821: \$? = $ac_status" >&5
6822   (exit $ac_status); }; }; then
6823   cf_result=no
6824 else
6825   echo "$as_me: failed program was:" >&5
6826 cat conftest.$ac_ext >&5
6827 cf_result=yes
6828 fi
6829 rm -f conftest.$ac_objext conftest.$ac_ext
6830 echo "$as_me:6830: result: $cf_result" >&5
6831 echo "${ECHO_T}$cf_result" >&6
6832
6833 if test "$cf_result" = yes ; then
6834         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6835 elif test "x" != "x" ; then
6836         echo "$as_me:6836: checking checking for compatible value versus " >&5
6837 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6838         cat >conftest.$ac_ext <<_ACEOF
6839 #line 6839 "configure"
6840 #include "confdefs.h"
6841 #include <sys/types.h>
6842
6843 int
6844 main ()
6845 {
6846
6847 #if _XOPEN_SOURCE_EXTENDED- < 0
6848 make an error
6849 #endif
6850   ;
6851   return 0;
6852 }
6853 _ACEOF
6854 rm -f conftest.$ac_objext
6855 if { (eval echo "$as_me:6855: \"$ac_compile\"") >&5
6856   (eval $ac_compile) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); } &&
6860          { ac_try='test -s conftest.$ac_objext'
6861   { (eval echo "$as_me:6861: \"$ac_try\"") >&5
6862   (eval $ac_try) 2>&5
6863   ac_status=$?
6864   echo "$as_me:6864: \$? = $ac_status" >&5
6865   (exit $ac_status); }; }; then
6866   cf_result=yes
6867 else
6868   echo "$as_me: failed program was:" >&5
6869 cat conftest.$ac_ext >&5
6870 cf_result=no
6871 fi
6872 rm -f conftest.$ac_objext conftest.$ac_ext
6873         echo "$as_me:6873: result: $cf_result" >&5
6874 echo "${ECHO_T}$cf_result" >&6
6875         if test "$cf_result" = no ; then
6876                 # perhaps we can override it - try...
6877                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6878         fi
6879 fi
6880
6881         # with_overwrite=no
6882         NCURSES_CH_T=cchar_t
6883
6884 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6885 do
6886 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6887 echo "$as_me:6887: checking for $ac_func" >&5
6888 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6889 if eval "test \"\${$as_ac_var+set}\" = set"; then
6890   echo $ECHO_N "(cached) $ECHO_C" >&6
6891 else
6892   cat >conftest.$ac_ext <<_ACEOF
6893 #line 6893 "configure"
6894 #include "confdefs.h"
6895 /* System header to define __stub macros and hopefully few prototypes,
6896     which can conflict with char $ac_func (); below.  */
6897 #include <assert.h>
6898 /* Override any gcc2 internal prototype to avoid an error.  */
6899 #ifdef __cplusplus
6900 extern "C"
6901 #endif
6902 /* We use char because int might match the return type of a gcc2
6903    builtin and then its argument prototype would still apply.  */
6904 char $ac_func ();
6905 char (*f) ();
6906
6907 int
6908 main ()
6909 {
6910 /* The GNU C library defines this for functions which it implements
6911     to always fail with ENOSYS.  Some functions are actually named
6912     something starting with __ and the normal name is an alias.  */
6913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6914 choke me
6915 #else
6916 f = $ac_func;
6917 #endif
6918
6919   ;
6920   return 0;
6921 }
6922 _ACEOF
6923 rm -f conftest.$ac_objext conftest$ac_exeext
6924 if { (eval echo "$as_me:6924: \"$ac_link\"") >&5
6925   (eval $ac_link) 2>&5
6926   ac_status=$?
6927   echo "$as_me:6927: \$? = $ac_status" >&5
6928   (exit $ac_status); } &&
6929          { ac_try='test -s conftest$ac_exeext'
6930   { (eval echo "$as_me:6930: \"$ac_try\"") >&5
6931   (eval $ac_try) 2>&5
6932   ac_status=$?
6933   echo "$as_me:6933: \$? = $ac_status" >&5
6934   (exit $ac_status); }; }; then
6935   eval "$as_ac_var=yes"
6936 else
6937   echo "$as_me: failed program was:" >&5
6938 cat conftest.$ac_ext >&5
6939 eval "$as_ac_var=no"
6940 fi
6941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6942 fi
6943 echo "$as_me:6943: result: `eval echo '${'$as_ac_var'}'`" >&5
6944 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6945 if test `eval echo '${'$as_ac_var'}'` = yes; then
6946   cat >>confdefs.h <<EOF
6947 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6948 EOF
6949
6950 fi
6951 done
6952
6953         if test "$ac_cv_func_putwc" != yes ; then
6954
6955 echo "$as_me:6955: checking for putwc in libutf8" >&5
6956 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6957 if test "${cf_cv_libutf8+set}" = set; then
6958   echo $ECHO_N "(cached) $ECHO_C" >&6
6959 else
6960
6961         cf_save_LIBS="$LIBS"
6962         LIBS="-lutf8 $LIBS"
6963 cat >conftest.$ac_ext <<_ACEOF
6964 #line 6964 "configure"
6965 #include "confdefs.h"
6966
6967 #include <libutf8.h>
6968 int
6969 main ()
6970 {
6971 putwc(0,0);
6972   ;
6973   return 0;
6974 }
6975 _ACEOF
6976 rm -f conftest.$ac_objext conftest$ac_exeext
6977 if { (eval echo "$as_me:6977: \"$ac_link\"") >&5
6978   (eval $ac_link) 2>&5
6979   ac_status=$?
6980   echo "$as_me:6980: \$? = $ac_status" >&5
6981   (exit $ac_status); } &&
6982          { ac_try='test -s conftest$ac_exeext'
6983   { (eval echo "$as_me:6983: \"$ac_try\"") >&5
6984   (eval $ac_try) 2>&5
6985   ac_status=$?
6986   echo "$as_me:6986: \$? = $ac_status" >&5
6987   (exit $ac_status); }; }; then
6988   cf_cv_libutf8=yes
6989 else
6990   echo "$as_me: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992 cf_cv_libutf8=no
6993 fi
6994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6995         LIBS="$cf_save_LIBS"
6996
6997 fi
6998 echo "$as_me:6998: result: $cf_cv_libutf8" >&5
6999 echo "${ECHO_T}$cf_cv_libutf8" >&6
7000
7001 if test "$cf_cv_libutf8" = yes ; then
7002         cat >>confdefs.h <<\EOF
7003 #define HAVE_LIBUTF8_H 1
7004 EOF
7005
7006         LIBS="-lutf8 $LIBS"
7007 fi
7008
7009                 if test "$cf_cv_libutf8" = yes ; then
7010                         NCURSES_LIBUTF8=1
7011                 fi
7012         fi
7013
7014 # This is needed on Tru64 5.0 to declare mbstate_t
7015 echo "$as_me:7015: checking if we must include wchar.h to declare mbstate_t" >&5
7016 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7017 if test "${cf_cv_mbstate_t+set}" = set; then
7018   echo $ECHO_N "(cached) $ECHO_C" >&6
7019 else
7020
7021 cat >conftest.$ac_ext <<_ACEOF
7022 #line 7022 "configure"
7023 #include "confdefs.h"
7024
7025 #include <stdlib.h>
7026 #include <stdarg.h>
7027 #include <stdio.h>
7028 #ifdef HAVE_LIBUTF8_H
7029 #include <libutf8.h>
7030 #endif
7031 int
7032 main ()
7033 {
7034 mbstate_t state
7035   ;
7036   return 0;
7037 }
7038 _ACEOF
7039 rm -f conftest.$ac_objext
7040 if { (eval echo "$as_me:7040: \"$ac_compile\"") >&5
7041   (eval $ac_compile) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); } &&
7045          { ac_try='test -s conftest.$ac_objext'
7046   { (eval echo "$as_me:7046: \"$ac_try\"") >&5
7047   (eval $ac_try) 2>&5
7048   ac_status=$?
7049   echo "$as_me:7049: \$? = $ac_status" >&5
7050   (exit $ac_status); }; }; then
7051   cf_cv_mbstate_t=no
7052 else
7053   echo "$as_me: failed program was:" >&5
7054 cat conftest.$ac_ext >&5
7055 cat >conftest.$ac_ext <<_ACEOF
7056 #line 7056 "configure"
7057 #include "confdefs.h"
7058
7059 #include <stdlib.h>
7060 #include <stdarg.h>
7061 #include <stdio.h>
7062 #include <wchar.h>
7063 #ifdef HAVE_LIBUTF8_H
7064 #include <libutf8.h>
7065 #endif
7066 int
7067 main ()
7068 {
7069 mbstate_t value
7070   ;
7071   return 0;
7072 }
7073 _ACEOF
7074 rm -f conftest.$ac_objext
7075 if { (eval echo "$as_me:7075: \"$ac_compile\"") >&5
7076   (eval $ac_compile) 2>&5
7077   ac_status=$?
7078   echo "$as_me:7078: \$? = $ac_status" >&5
7079   (exit $ac_status); } &&
7080          { ac_try='test -s conftest.$ac_objext'
7081   { (eval echo "$as_me:7081: \"$ac_try\"") >&5
7082   (eval $ac_try) 2>&5
7083   ac_status=$?
7084   echo "$as_me:7084: \$? = $ac_status" >&5
7085   (exit $ac_status); }; }; then
7086   cf_cv_mbstate_t=yes
7087 else
7088   echo "$as_me: failed program was:" >&5
7089 cat conftest.$ac_ext >&5
7090 cf_cv_mbstate_t=unknown
7091 fi
7092 rm -f conftest.$ac_objext conftest.$ac_ext
7093 fi
7094 rm -f conftest.$ac_objext conftest.$ac_ext
7095 fi
7096 echo "$as_me:7096: result: $cf_cv_mbstate_t" >&5
7097 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7098
7099 if test "$cf_cv_mbstate_t" = yes ; then
7100         cat >>confdefs.h <<\EOF
7101 #define NEED_WCHAR_H 1
7102 EOF
7103
7104         NEED_WCHAR_H=1
7105 fi
7106
7107 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7108 if test "$cf_cv_mbstate_t" = unknown ; then
7109         NCURSES_MBSTATE_T=1
7110 fi
7111
7112 # This is needed on Tru64 5.0 to declare wchar_t
7113 echo "$as_me:7113: checking if we must include wchar.h to declare wchar_t" >&5
7114 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7115 if test "${cf_cv_wchar_t+set}" = set; then
7116   echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118
7119 cat >conftest.$ac_ext <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122
7123 #include <stdlib.h>
7124 #include <stdarg.h>
7125 #include <stdio.h>
7126 #ifdef HAVE_LIBUTF8_H
7127 #include <libutf8.h>
7128 #endif
7129 int
7130 main ()
7131 {
7132 wchar_t state
7133   ;
7134   return 0;
7135 }
7136 _ACEOF
7137 rm -f conftest.$ac_objext
7138 if { (eval echo "$as_me:7138: \"$ac_compile\"") >&5
7139   (eval $ac_compile) 2>&5
7140   ac_status=$?
7141   echo "$as_me:7141: \$? = $ac_status" >&5
7142   (exit $ac_status); } &&
7143          { ac_try='test -s conftest.$ac_objext'
7144   { (eval echo "$as_me:7144: \"$ac_try\"") >&5
7145   (eval $ac_try) 2>&5
7146   ac_status=$?
7147   echo "$as_me:7147: \$? = $ac_status" >&5
7148   (exit $ac_status); }; }; then
7149   cf_cv_wchar_t=no
7150 else
7151   echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7153 cat >conftest.$ac_ext <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156
7157 #include <stdlib.h>
7158 #include <stdarg.h>
7159 #include <stdio.h>
7160 #include <wchar.h>
7161 #ifdef HAVE_LIBUTF8_H
7162 #include <libutf8.h>
7163 #endif
7164 int
7165 main ()
7166 {
7167 wchar_t value
7168   ;
7169   return 0;
7170 }
7171 _ACEOF
7172 rm -f conftest.$ac_objext
7173 if { (eval echo "$as_me:7173: \"$ac_compile\"") >&5
7174   (eval $ac_compile) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } &&
7178          { ac_try='test -s conftest.$ac_objext'
7179   { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180   (eval $ac_try) 2>&5
7181   ac_status=$?
7182   echo "$as_me:7182: \$? = $ac_status" >&5
7183   (exit $ac_status); }; }; then
7184   cf_cv_wchar_t=yes
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 cf_cv_wchar_t=unknown
7189 fi
7190 rm -f conftest.$ac_objext conftest.$ac_ext
7191 fi
7192 rm -f conftest.$ac_objext conftest.$ac_ext
7193 fi
7194 echo "$as_me:7194: result: $cf_cv_wchar_t" >&5
7195 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7196
7197 if test "$cf_cv_wchar_t" = yes ; then
7198         cat >>confdefs.h <<\EOF
7199 #define NEED_WCHAR_H 1
7200 EOF
7201
7202         NEED_WCHAR_H=1
7203 fi
7204
7205 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7206 if test "$cf_cv_wchar_t" = unknown ; then
7207         NCURSES_WCHAR_T=1
7208 fi
7209
7210 # if we find wchar_t in either place, use substitution to provide a fallback.
7211 if test "$cf_cv_wchar_t" != unknown ; then
7212         NCURSES_OK_WCHAR_T=1
7213 fi
7214
7215 # This is needed on Tru64 5.0 to declare wint_t
7216 echo "$as_me:7216: checking if we must include wchar.h to declare wint_t" >&5
7217 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7218 if test "${cf_cv_wint_t+set}" = set; then
7219   echo $ECHO_N "(cached) $ECHO_C" >&6
7220 else
7221
7222 cat >conftest.$ac_ext <<_ACEOF
7223 #line 7223 "configure"
7224 #include "confdefs.h"
7225
7226 #include <stdlib.h>
7227 #include <stdarg.h>
7228 #include <stdio.h>
7229 #ifdef HAVE_LIBUTF8_H
7230 #include <libutf8.h>
7231 #endif
7232 int
7233 main ()
7234 {
7235 wint_t state
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240 rm -f conftest.$ac_objext
7241 if { (eval echo "$as_me:7241: \"$ac_compile\"") >&5
7242   (eval $ac_compile) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit $ac_status); } &&
7246          { ac_try='test -s conftest.$ac_objext'
7247   { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248   (eval $ac_try) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit $ac_status); }; }; then
7252   cf_cv_wint_t=no
7253 else
7254   echo "$as_me: failed program was:" >&5
7255 cat conftest.$ac_ext >&5
7256 cat >conftest.$ac_ext <<_ACEOF
7257 #line 7257 "configure"
7258 #include "confdefs.h"
7259
7260 #include <stdlib.h>
7261 #include <stdarg.h>
7262 #include <stdio.h>
7263 #include <wchar.h>
7264 #ifdef HAVE_LIBUTF8_H
7265 #include <libutf8.h>
7266 #endif
7267 int
7268 main ()
7269 {
7270 wint_t value
7271   ;
7272   return 0;
7273 }
7274 _ACEOF
7275 rm -f conftest.$ac_objext
7276 if { (eval echo "$as_me:7276: \"$ac_compile\"") >&5
7277   (eval $ac_compile) 2>&5
7278   ac_status=$?
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit $ac_status); } &&
7281          { ac_try='test -s conftest.$ac_objext'
7282   { (eval echo "$as_me:7282: \"$ac_try\"") >&5
7283   (eval $ac_try) 2>&5
7284   ac_status=$?
7285   echo "$as_me:7285: \$? = $ac_status" >&5
7286   (exit $ac_status); }; }; then
7287   cf_cv_wint_t=yes
7288 else
7289   echo "$as_me: failed program was:" >&5
7290 cat conftest.$ac_ext >&5
7291 cf_cv_wint_t=unknown
7292 fi
7293 rm -f conftest.$ac_objext conftest.$ac_ext
7294 fi
7295 rm -f conftest.$ac_objext conftest.$ac_ext
7296 fi
7297 echo "$as_me:7297: result: $cf_cv_wint_t" >&5
7298 echo "${ECHO_T}$cf_cv_wint_t" >&6
7299
7300 if test "$cf_cv_wint_t" = yes ; then
7301         cat >>confdefs.h <<\EOF
7302 #define NEED_WCHAR_H 1
7303 EOF
7304
7305         NEED_WCHAR_H=1
7306 fi
7307
7308 # if we do not find wint_t in either place, use substitution to provide a fallback.
7309 if test "$cf_cv_wint_t" = unknown ; then
7310         NCURSES_WINT_T=1
7311 fi
7312
7313 # if we find wint_t in either place, use substitution to provide a fallback.
7314 if test "$cf_cv_wint_t" != unknown ; then
7315         NCURSES_OK_WINT_T=1
7316 fi
7317
7318         if test "$NCURSES_MBSTATE_T" != 0; then
7319                 cat >>confdefs.h <<\EOF
7320 #define NEED_MBSTATE_T_DEF 1
7321 EOF
7322
7323         fi
7324 fi
7325
7326 ###   use option --disable-lp64 to allow long chtype
7327 case $cf_cv_abi_version in
7328 [345]*)
7329         default_with_lp64=no
7330         ;;
7331 *)
7332         default_with_lp64=yes
7333         ;;
7334 esac
7335
7336 echo "$as_me:7336: checking whether to enable _LP64 definition in curses.h" >&5
7337 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7338
7339 # Check whether --enable-lp64 or --disable-lp64 was given.
7340 if test "${enable_lp64+set}" = set; then
7341   enableval="$enable_lp64"
7342   with_lp64=$enableval
7343 else
7344   with_lp64=$default_with_lp64
7345 fi;
7346 echo "$as_me:7346: result: $with_lp64" >&5
7347 echo "${ECHO_T}$with_lp64" >&6
7348
7349 if test "$with_lp64" = yes ; then
7350         cf_cv_enable_lp64=1
7351 else
7352         cf_cv_enable_lp64=0
7353 fi
7354
7355 # Check whether --enable-largefile or --disable-largefile was given.
7356 if test "${enable_largefile+set}" = set; then
7357   enableval="$enable_largefile"
7358
7359 fi;
7360 if test "$enable_largefile" != no; then
7361
7362   echo "$as_me:7362: checking for special C compiler options needed for large files" >&5
7363 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7364 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7365   echo $ECHO_N "(cached) $ECHO_C" >&6
7366 else
7367   ac_cv_sys_largefile_CC=no
7368      if test "$GCC" != yes; then
7369        ac_save_CC=$CC
7370        while :; do
7371          # IRIX 6.2 and later do not support large files by default,
7372          # so use the C compiler's -n32 option if that helps.
7373          cat >conftest.$ac_ext <<_ACEOF
7374 #line 7374 "configure"
7375 #include "confdefs.h"
7376 #include <sys/types.h>
7377  /* Check that off_t can represent 2**63 - 1 correctly.
7378     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7379     since some C++ compilers masquerading as C compilers
7380     incorrectly reject 9223372036854775807.  */
7381 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7382   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7383                        && LARGE_OFF_T % 2147483647 == 1)
7384                       ? 1 : -1];
7385 int
7386 main ()
7387 {
7388
7389   ;
7390   return 0;
7391 }
7392 _ACEOF
7393          rm -f conftest.$ac_objext
7394 if { (eval echo "$as_me:7394: \"$ac_compile\"") >&5
7395   (eval $ac_compile) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); } &&
7399          { ac_try='test -s conftest.$ac_objext'
7400   { (eval echo "$as_me:7400: \"$ac_try\"") >&5
7401   (eval $ac_try) 2>&5
7402   ac_status=$?
7403   echo "$as_me:7403: \$? = $ac_status" >&5
7404   (exit $ac_status); }; }; then
7405   break
7406 else
7407   echo "$as_me: failed program was:" >&5
7408 cat conftest.$ac_ext >&5
7409 fi
7410 rm -f conftest.$ac_objext
7411          CC="$CC -n32"
7412          rm -f conftest.$ac_objext
7413 if { (eval echo "$as_me:7413: \"$ac_compile\"") >&5
7414   (eval $ac_compile) 2>&5
7415   ac_status=$?
7416   echo "$as_me:7416: \$? = $ac_status" >&5
7417   (exit $ac_status); } &&
7418          { ac_try='test -s conftest.$ac_objext'
7419   { (eval echo "$as_me:7419: \"$ac_try\"") >&5
7420   (eval $ac_try) 2>&5
7421   ac_status=$?
7422   echo "$as_me:7422: \$? = $ac_status" >&5
7423   (exit $ac_status); }; }; then
7424   ac_cv_sys_largefile_CC=' -n32'; break
7425 else
7426   echo "$as_me: failed program was:" >&5
7427 cat conftest.$ac_ext >&5
7428 fi
7429 rm -f conftest.$ac_objext
7430          break
7431        done
7432        CC=$ac_save_CC
7433        rm -f conftest.$ac_ext
7434     fi
7435 fi
7436 echo "$as_me:7436: result: $ac_cv_sys_largefile_CC" >&5
7437 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7438   if test "$ac_cv_sys_largefile_CC" != no; then
7439     CC=$CC$ac_cv_sys_largefile_CC
7440   fi
7441
7442   echo "$as_me:7442: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7443 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7444 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7445   echo $ECHO_N "(cached) $ECHO_C" >&6
7446 else
7447   while :; do
7448   ac_cv_sys_file_offset_bits=no
7449   cat >conftest.$ac_ext <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7452 #include <sys/types.h>
7453  /* Check that off_t can represent 2**63 - 1 correctly.
7454     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7455     since some C++ compilers masquerading as C compilers
7456     incorrectly reject 9223372036854775807.  */
7457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7458   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7459                        && LARGE_OFF_T % 2147483647 == 1)
7460                       ? 1 : -1];
7461 int
7462 main ()
7463 {
7464
7465   ;
7466   return 0;
7467 }
7468 _ACEOF
7469 rm -f conftest.$ac_objext
7470 if { (eval echo "$as_me:7470: \"$ac_compile\"") >&5
7471   (eval $ac_compile) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); } &&
7475          { ac_try='test -s conftest.$ac_objext'
7476   { (eval echo "$as_me:7476: \"$ac_try\"") >&5
7477   (eval $ac_try) 2>&5
7478   ac_status=$?
7479   echo "$as_me:7479: \$? = $ac_status" >&5
7480   (exit $ac_status); }; }; then
7481   break
7482 else
7483   echo "$as_me: failed program was:" >&5
7484 cat conftest.$ac_ext >&5
7485 fi
7486 rm -f conftest.$ac_objext conftest.$ac_ext
7487   cat >conftest.$ac_ext <<_ACEOF
7488 #line 7488 "configure"
7489 #include "confdefs.h"
7490 #define _FILE_OFFSET_BITS 64
7491 #include <sys/types.h>
7492  /* Check that off_t can represent 2**63 - 1 correctly.
7493     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7494     since some C++ compilers masquerading as C compilers
7495     incorrectly reject 9223372036854775807.  */
7496 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7497   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7498                        && LARGE_OFF_T % 2147483647 == 1)
7499                       ? 1 : -1];
7500 int
7501 main ()
7502 {
7503
7504   ;
7505   return 0;
7506 }
7507 _ACEOF
7508 rm -f conftest.$ac_objext
7509 if { (eval echo "$as_me:7509: \"$ac_compile\"") >&5
7510   (eval $ac_compile) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit $ac_status); } &&
7514          { ac_try='test -s conftest.$ac_objext'
7515   { (eval echo "$as_me:7515: \"$ac_try\"") >&5
7516   (eval $ac_try) 2>&5
7517   ac_status=$?
7518   echo "$as_me:7518: \$? = $ac_status" >&5
7519   (exit $ac_status); }; }; then
7520   ac_cv_sys_file_offset_bits=64; break
7521 else
7522   echo "$as_me: failed program was:" >&5
7523 cat conftest.$ac_ext >&5
7524 fi
7525 rm -f conftest.$ac_objext conftest.$ac_ext
7526   break
7527 done
7528 fi
7529 echo "$as_me:7529: result: $ac_cv_sys_file_offset_bits" >&5
7530 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7531 if test "$ac_cv_sys_file_offset_bits" != no; then
7532
7533 cat >>confdefs.h <<EOF
7534 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7535 EOF
7536
7537 fi
7538 rm -f conftest*
7539   echo "$as_me:7539: checking for _LARGE_FILES value needed for large files" >&5
7540 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7541 if test "${ac_cv_sys_large_files+set}" = set; then
7542   echo $ECHO_N "(cached) $ECHO_C" >&6
7543 else
7544   while :; do
7545   ac_cv_sys_large_files=no
7546   cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549 #include <sys/types.h>
7550  /* Check that off_t can represent 2**63 - 1 correctly.
7551     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7552     since some C++ compilers masquerading as C compilers
7553     incorrectly reject 9223372036854775807.  */
7554 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7555   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7556                        && LARGE_OFF_T % 2147483647 == 1)
7557                       ? 1 : -1];
7558 int
7559 main ()
7560 {
7561
7562   ;
7563   return 0;
7564 }
7565 _ACEOF
7566 rm -f conftest.$ac_objext
7567 if { (eval echo "$as_me:7567: \"$ac_compile\"") >&5
7568   (eval $ac_compile) 2>&5
7569   ac_status=$?
7570   echo "$as_me:7570: \$? = $ac_status" >&5
7571   (exit $ac_status); } &&
7572          { ac_try='test -s conftest.$ac_objext'
7573   { (eval echo "$as_me:7573: \"$ac_try\"") >&5
7574   (eval $ac_try) 2>&5
7575   ac_status=$?
7576   echo "$as_me:7576: \$? = $ac_status" >&5
7577   (exit $ac_status); }; }; then
7578   break
7579 else
7580   echo "$as_me: failed program was:" >&5
7581 cat conftest.$ac_ext >&5
7582 fi
7583 rm -f conftest.$ac_objext conftest.$ac_ext
7584   cat >conftest.$ac_ext <<_ACEOF
7585 #line 7585 "configure"
7586 #include "confdefs.h"
7587 #define _LARGE_FILES 1
7588 #include <sys/types.h>
7589  /* Check that off_t can represent 2**63 - 1 correctly.
7590     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7591     since some C++ compilers masquerading as C compilers
7592     incorrectly reject 9223372036854775807.  */
7593 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7594   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7595                        && LARGE_OFF_T % 2147483647 == 1)
7596                       ? 1 : -1];
7597 int
7598 main ()
7599 {
7600
7601   ;
7602   return 0;
7603 }
7604 _ACEOF
7605 rm -f conftest.$ac_objext
7606 if { (eval echo "$as_me:7606: \"$ac_compile\"") >&5
7607   (eval $ac_compile) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); } &&
7611          { ac_try='test -s conftest.$ac_objext'
7612   { (eval echo "$as_me:7612: \"$ac_try\"") >&5
7613   (eval $ac_try) 2>&5
7614   ac_status=$?
7615   echo "$as_me:7615: \$? = $ac_status" >&5
7616   (exit $ac_status); }; }; then
7617   ac_cv_sys_large_files=1; break
7618 else
7619   echo "$as_me: failed program was:" >&5
7620 cat conftest.$ac_ext >&5
7621 fi
7622 rm -f conftest.$ac_objext conftest.$ac_ext
7623   break
7624 done
7625 fi
7626 echo "$as_me:7626: result: $ac_cv_sys_large_files" >&5
7627 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7628 if test "$ac_cv_sys_large_files" != no; then
7629
7630 cat >>confdefs.h <<EOF
7631 #define _LARGE_FILES $ac_cv_sys_large_files
7632 EOF
7633
7634 fi
7635 rm -f conftest*
7636 fi
7637
7638     if test "$enable_largefile" != no ; then
7639         echo "$as_me:7639: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7640 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7641 if test "${ac_cv_sys_largefile_source+set}" = set; then
7642   echo $ECHO_N "(cached) $ECHO_C" >&6
7643 else
7644   while :; do
7645   ac_cv_sys_largefile_source=no
7646   cat >conftest.$ac_ext <<_ACEOF
7647 #line 7647 "configure"
7648 #include "confdefs.h"
7649 #include <stdio.h>
7650 int
7651 main ()
7652 {
7653 return !fseeko;
7654   ;
7655   return 0;
7656 }
7657 _ACEOF
7658 rm -f conftest.$ac_objext
7659 if { (eval echo "$as_me:7659: \"$ac_compile\"") >&5
7660   (eval $ac_compile) 2>&5
7661   ac_status=$?
7662   echo "$as_me:7662: \$? = $ac_status" >&5
7663   (exit $ac_status); } &&
7664          { ac_try='test -s conftest.$ac_objext'
7665   { (eval echo "$as_me:7665: \"$ac_try\"") >&5
7666   (eval $ac_try) 2>&5
7667   ac_status=$?
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); }; }; then
7670   break
7671 else
7672   echo "$as_me: failed program was:" >&5
7673 cat conftest.$ac_ext >&5
7674 fi
7675 rm -f conftest.$ac_objext conftest.$ac_ext
7676   cat >conftest.$ac_ext <<_ACEOF
7677 #line 7677 "configure"
7678 #include "confdefs.h"
7679 #define _LARGEFILE_SOURCE 1
7680 #include <stdio.h>
7681 int
7682 main ()
7683 {
7684 return !fseeko;
7685   ;
7686   return 0;
7687 }
7688 _ACEOF
7689 rm -f conftest.$ac_objext
7690 if { (eval echo "$as_me:7690: \"$ac_compile\"") >&5
7691   (eval $ac_compile) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); } &&
7695          { ac_try='test -s conftest.$ac_objext'
7696   { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7697   (eval $ac_try) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); }; }; then
7701   ac_cv_sys_largefile_source=1; break
7702 else
7703   echo "$as_me: failed program was:" >&5
7704 cat conftest.$ac_ext >&5
7705 fi
7706 rm -f conftest.$ac_objext conftest.$ac_ext
7707   break
7708 done
7709 fi
7710 echo "$as_me:7710: result: $ac_cv_sys_largefile_source" >&5
7711 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7712 if test "$ac_cv_sys_largefile_source" != no; then
7713
7714 cat >>confdefs.h <<EOF
7715 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7716 EOF
7717
7718 fi
7719 rm -f conftest*
7720
7721 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7722 # in glibc 2.1.3, but that breaks too many other things.
7723 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7724 echo "$as_me:7724: checking for fseeko" >&5
7725 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7726 if test "${ac_cv_func_fseeko+set}" = set; then
7727   echo $ECHO_N "(cached) $ECHO_C" >&6
7728 else
7729   cat >conftest.$ac_ext <<_ACEOF
7730 #line 7730 "configure"
7731 #include "confdefs.h"
7732 #include <stdio.h>
7733 int
7734 main ()
7735 {
7736 return fseeko && fseeko (stdin, 0, 0);
7737   ;
7738   return 0;
7739 }
7740 _ACEOF
7741 rm -f conftest.$ac_objext conftest$ac_exeext
7742 if { (eval echo "$as_me:7742: \"$ac_link\"") >&5
7743   (eval $ac_link) 2>&5
7744   ac_status=$?
7745   echo "$as_me:7745: \$? = $ac_status" >&5
7746   (exit $ac_status); } &&
7747          { ac_try='test -s conftest$ac_exeext'
7748   { (eval echo "$as_me:7748: \"$ac_try\"") >&5
7749   (eval $ac_try) 2>&5
7750   ac_status=$?
7751   echo "$as_me:7751: \$? = $ac_status" >&5
7752   (exit $ac_status); }; }; then
7753   ac_cv_func_fseeko=yes
7754 else
7755   echo "$as_me: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 ac_cv_func_fseeko=no
7758 fi
7759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7760 fi
7761 echo "$as_me:7761: result: $ac_cv_func_fseeko" >&5
7762 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7763 if test $ac_cv_func_fseeko = yes; then
7764
7765 cat >>confdefs.h <<\EOF
7766 #define HAVE_FSEEKO 1
7767 EOF
7768
7769 fi
7770
7771         # Normally we would collect these definitions in the config.h,
7772         # but (like _XOPEN_SOURCE), some environments rely on having these
7773         # defined before any of the system headers are included.  Another
7774         # case comes up with C++, e.g., on AIX the compiler compiles the
7775         # header files by themselves before looking at the body files it is
7776         # told to compile.  For ncurses, those header files do not include
7777         # the config.h
7778         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7779         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7780         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7781
7782         echo "$as_me:7782: checking whether to use struct dirent64" >&5
7783 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7784 if test "${cf_cv_struct_dirent64+set}" = set; then
7785   echo $ECHO_N "(cached) $ECHO_C" >&6
7786 else
7787
7788                 cat >conftest.$ac_ext <<_ACEOF
7789 #line 7789 "configure"
7790 #include "confdefs.h"
7791
7792 #include <sys/types.h>
7793 #include <dirent.h>
7794
7795 int
7796 main ()
7797 {
7798
7799                 /* if transitional largefile support is setup, this is true */
7800                 extern struct dirent64 * readdir(DIR *);
7801                 struct dirent64 *x = readdir((DIR *)0);
7802                 struct dirent *y = readdir((DIR *)0);
7803                 int z = x - y;
7804
7805   ;
7806   return 0;
7807 }
7808 _ACEOF
7809 rm -f conftest.$ac_objext
7810 if { (eval echo "$as_me:7810: \"$ac_compile\"") >&5
7811   (eval $ac_compile) 2>&5
7812   ac_status=$?
7813   echo "$as_me:7813: \$? = $ac_status" >&5
7814   (exit $ac_status); } &&
7815          { ac_try='test -s conftest.$ac_objext'
7816   { (eval echo "$as_me:7816: \"$ac_try\"") >&5
7817   (eval $ac_try) 2>&5
7818   ac_status=$?
7819   echo "$as_me:7819: \$? = $ac_status" >&5
7820   (exit $ac_status); }; }; then
7821   cf_cv_struct_dirent64=yes
7822 else
7823   echo "$as_me: failed program was:" >&5
7824 cat conftest.$ac_ext >&5
7825 cf_cv_struct_dirent64=no
7826 fi
7827 rm -f conftest.$ac_objext conftest.$ac_ext
7828
7829 fi
7830 echo "$as_me:7830: result: $cf_cv_struct_dirent64" >&5
7831 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7832         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7833 #define HAVE_STRUCT_DIRENT64 1
7834 EOF
7835
7836     fi
7837
7838 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7839 echo "$as_me:7839: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7840 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7841
7842 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7843 if test "${enable_tparm_varargs+set}" = set; then
7844   enableval="$enable_tparm_varargs"
7845   with_tparm_varargs=$enableval
7846 else
7847   with_tparm_varargs=yes
7848 fi;
7849 echo "$as_me:7849: result: $with_tparm_varargs" >&5
7850 echo "${ECHO_T}$with_tparm_varargs" >&6
7851 NCURSES_TPARM_VARARGS=0
7852 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7853
7854 ###   use option --with-bool to override bool's type
7855 echo "$as_me:7855: checking for type of bool" >&5
7856 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7857
7858 # Check whether --with-bool or --without-bool was given.
7859 if test "${with_bool+set}" = set; then
7860   withval="$with_bool"
7861   NCURSES_BOOL="$withval"
7862 else
7863   NCURSES_BOOL=auto
7864 fi;
7865 echo "$as_me:7865: result: $NCURSES_BOOL" >&5
7866 echo "${ECHO_T}$NCURSES_BOOL" >&6
7867
7868 echo "$as_me:7868: checking for alternate terminal capabilities file" >&5
7869 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7870
7871 # Check whether --with-caps or --without-caps was given.
7872 if test "${with_caps+set}" = set; then
7873   withval="$with_caps"
7874   TERMINFO_CAPS=Caps.$withval
7875 else
7876   TERMINFO_CAPS=Caps
7877 fi;
7878 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7879 echo "$as_me:7879: result: $TERMINFO_CAPS" >&5
7880 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7881
7882 ###   use option --with-chtype to override chtype's type
7883 echo "$as_me:7883: checking for type of chtype" >&5
7884 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7885
7886 # Check whether --with-chtype or --without-chtype was given.
7887 if test "${with_chtype+set}" = set; then
7888   withval="$with_chtype"
7889   NCURSES_CHTYPE="$withval"
7890 else
7891   NCURSES_CHTYPE=auto
7892 fi;
7893 echo "$as_me:7893: result: $NCURSES_CHTYPE" >&5
7894 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7895
7896 ###   use option --with-ospeed to override ospeed's type
7897 echo "$as_me:7897: checking for type of ospeed" >&5
7898 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7899
7900 # Check whether --with-ospeed or --without-ospeed was given.
7901 if test "${with_ospeed+set}" = set; then
7902   withval="$with_ospeed"
7903   NCURSES_OSPEED="$withval"
7904 else
7905   NCURSES_OSPEED=short
7906 fi;
7907 echo "$as_me:7907: result: $NCURSES_OSPEED" >&5
7908 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7909
7910 ###   use option --with-mmask-t to override mmask_t's type
7911 echo "$as_me:7911: checking for type of mmask_t" >&5
7912 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7913
7914 # Check whether --with-mmask-t or --without-mmask-t was given.
7915 if test "${with_mmask_t+set}" = set; then
7916   withval="$with_mmask_t"
7917   NCURSES_MMASK_T="$withval"
7918 else
7919   NCURSES_MMASK_T=auto
7920 fi;
7921 echo "$as_me:7921: result: $NCURSES_MMASK_T" >&5
7922 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7923
7924 ### Enable compiling-in rcs id's
7925 echo "$as_me:7925: checking if RCS identifiers should be compiled-in" >&5
7926 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7927
7928 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7929 if test "${with_rcs_ids+set}" = set; then
7930   withval="$with_rcs_ids"
7931   with_rcs_ids=$withval
7932 else
7933   with_rcs_ids=no
7934 fi;
7935 echo "$as_me:7935: result: $with_rcs_ids" >&5
7936 echo "${ECHO_T}$with_rcs_ids" >&6
7937 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7938 #define USE_RCS_IDS 1
7939 EOF
7940
7941 ###############################################################################
7942
7943 echo "$as_me:7943: checking format of man-pages" >&5
7944 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7945
7946 # Check whether --with-manpage-format or --without-manpage-format was given.
7947 if test "${with_manpage_format+set}" = set; then
7948   withval="$with_manpage_format"
7949   MANPAGE_FORMAT=$withval
7950 else
7951   MANPAGE_FORMAT=unknown
7952 fi;
7953
7954 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7955 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7956
7957 cf_unknown=
7958
7959 case $MANPAGE_FORMAT in
7960 unknown)
7961   if test -z "$MANPATH" ; then
7962     MANPATH="/usr/man:/usr/share/man"
7963   fi
7964
7965   # look for the 'date' man-page (it's most likely to be installed!)
7966   MANPAGE_FORMAT=
7967   cf_preform=no
7968   cf_catonly=yes
7969   cf_example=date
7970
7971   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7972   for cf_dir in $MANPATH; do
7973     test -z "$cf_dir" && cf_dir=/usr/man
7974     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
7975     do
7976       cf_test=`echo $cf_name | sed -e 's/*//'`
7977       if test "x$cf_test" = "x$cf_name" ; then
7978
7979         case "$cf_name" in
7980         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7981         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7982         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7983         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7984         esac
7985
7986         case "$cf_name" in
7987         $cf_dir/man*)
7988           cf_catonly=no
7989           ;;
7990         $cf_dir/cat*)
7991           cf_preform=yes
7992           ;;
7993         esac
7994         break
7995       fi
7996
7997       # if we found a match in either man* or cat*, stop looking
7998       if test -n "$MANPAGE_FORMAT" ; then
7999         cf_found=no
8000         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8001         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8002         case "$cf_name" in
8003         $cf_dir/cat*)
8004           cf_found=yes
8005           ;;
8006         esac
8007         test $cf_found=yes && break
8008       fi
8009     done
8010     # only check the first directory in $MANPATH where we find manpages
8011     if test -n "$MANPAGE_FORMAT" ; then
8012        break
8013     fi
8014   done
8015   # if we did not find the example, just assume it is normal
8016   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8017   IFS="$ac_save_ifs"
8018   ;;
8019 *)
8020   for cf_option in $MANPAGE_FORMAT; do
8021      case $cf_option in #(vi
8022      gzip|compress|BSDI|normal|formatted|catonly)
8023        ;;
8024      *)
8025        cf_unknown="$cf_unknown $cf_option"
8026        ;;
8027      esac
8028   done
8029   ;;
8030 esac
8031
8032 echo "$as_me:8032: result: $MANPAGE_FORMAT" >&5
8033 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8034 if test -n "$cf_unknown" ; then
8035   { echo "$as_me:8035: WARNING: Unexpected manpage-format $cf_unknown" >&5
8036 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8037 fi
8038
8039 echo "$as_me:8039: checking for manpage renaming" >&5
8040 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8041
8042 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8043 if test "${with_manpage_renames+set}" = set; then
8044   withval="$with_manpage_renames"
8045   MANPAGE_RENAMES=$withval
8046 else
8047   MANPAGE_RENAMES=yes
8048 fi;
8049
8050 case ".$MANPAGE_RENAMES" in #(vi
8051 .no) #(vi
8052   ;;
8053 .|.yes)
8054   # Debian 'man' program?
8055   if test -f /etc/debian_version ; then
8056     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8057   else
8058     MANPAGE_RENAMES=no
8059   fi
8060   ;;
8061 esac
8062
8063 if test "$MANPAGE_RENAMES" != no ; then
8064   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8065     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8066   elif test ! -f $MANPAGE_RENAMES ; then
8067     { { echo "$as_me:8067: error: not a filename: $MANPAGE_RENAMES" >&5
8068 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8069    { (exit 1); exit 1; }; }
8070   fi
8071
8072   test ! -d man && mkdir man
8073
8074   # Construct a sed-script to perform renaming within man-pages
8075   if test -n "$MANPAGE_RENAMES" ; then
8076     test ! -d man && mkdir man
8077     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8078   fi
8079 fi
8080
8081 echo "$as_me:8081: result: $MANPAGE_RENAMES" >&5
8082 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8083
8084 echo "$as_me:8084: checking if manpage aliases will be installed" >&5
8085 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8086
8087 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8088 if test "${with_manpage_aliases+set}" = set; then
8089   withval="$with_manpage_aliases"
8090   MANPAGE_ALIASES=$withval
8091 else
8092   MANPAGE_ALIASES=yes
8093 fi;
8094
8095 echo "$as_me:8095: result: $MANPAGE_ALIASES" >&5
8096 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8097
8098 if test "$LN_S" = "ln -s"; then
8099         cf_use_symlinks=yes
8100 else
8101         cf_use_symlinks=no
8102 fi
8103
8104 MANPAGE_SYMLINKS=no
8105 if test "$MANPAGE_ALIASES" = yes ; then
8106 echo "$as_me:8106: checking if manpage symlinks should be used" >&5
8107 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8108
8109 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8110 if test "${with_manpage_symlinks+set}" = set; then
8111   withval="$with_manpage_symlinks"
8112   MANPAGE_SYMLINKS=$withval
8113 else
8114   MANPAGE_SYMLINKS=$cf_use_symlinks
8115 fi;
8116
8117 if test "$$cf_use_symlinks" = no; then
8118 if test "$MANPAGE_SYMLINKS" = yes ; then
8119         { echo "$as_me:8119: WARNING: cannot make symlinks" >&5
8120 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8121         MANPAGE_SYMLINKS=no
8122 fi
8123 fi
8124
8125 echo "$as_me:8125: result: $MANPAGE_SYMLINKS" >&5
8126 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8127 fi
8128
8129 echo "$as_me:8129: checking for manpage tbl" >&5
8130 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8131
8132 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8133 if test "${with_manpage_tbl+set}" = set; then
8134   withval="$with_manpage_tbl"
8135   MANPAGE_TBL=$withval
8136 else
8137   MANPAGE_TBL=no
8138 fi;
8139
8140 echo "$as_me:8140: result: $MANPAGE_TBL" >&5
8141 echo "${ECHO_T}$MANPAGE_TBL" >&6
8142
8143   if test "$prefix" = "NONE" ; then
8144      cf_prefix="$ac_default_prefix"
8145   else
8146      cf_prefix="$prefix"
8147   fi
8148
8149   case "$MANPAGE_FORMAT" in # (vi
8150   *catonly*) # (vi
8151     cf_format=yes
8152     cf_inboth=no
8153     ;;
8154   *formatted*) # (vi
8155     cf_format=yes
8156     cf_inboth=yes
8157     ;;
8158   *)
8159     cf_format=no
8160     cf_inboth=no
8161     ;;
8162   esac
8163
8164 test ! -d man && mkdir man
8165
8166 cf_so_strip=
8167 cf_compress=
8168 case "$MANPAGE_FORMAT" in #(vi
8169 *compress*) #(vi
8170         cf_so_strip="Z"
8171         cf_compress=compress
8172   ;;
8173 *gzip*) #(vi
8174         cf_so_strip="gz"
8175         cf_compress=gzip
8176   ;;
8177 esac
8178
8179 cf_edit_man=./edit_man.sh
8180 cf_man_alias=`pwd`/man_alias.sed
8181
8182 cat >$cf_edit_man <<CF_EOF
8183 #! /bin/sh
8184 # this script is generated by the configure-script CF_MAN_PAGES macro.
8185
8186 prefix="$cf_prefix"
8187 datadir="$datadir"
8188
8189 NCURSES_MAJOR="$NCURSES_MAJOR"
8190 NCURSES_MINOR="$NCURSES_MINOR"
8191 NCURSES_PATCH="$NCURSES_PATCH"
8192
8193 NCURSES_OSPEED="$NCURSES_OSPEED"
8194 TERMINFO="$TERMINFO"
8195
8196 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8197
8198 INSTALL="$INSTALL"
8199 INSTALL_DATA="$INSTALL_DATA"
8200
8201 transform="$program_transform_name"
8202
8203 TMP=\${TMPDIR-/tmp}/man\$\$
8204 trap "rm -f \$TMP" 0 1 2 5 15
8205
8206 form=\$1
8207 shift || exit 1
8208
8209 verb=\$1
8210 shift || exit 1
8211
8212 mandir=\$1
8213 shift || exit 1
8214
8215 srcdir=\$1
8216 top_srcdir=\$srcdir/..
8217 shift || exit 1
8218
8219 if test "\$form" = normal ; then
8220         if test "$cf_format" = yes ; then
8221         if test "$cf_inboth" = no ; then
8222                 sh \$0 format \$verb \$mandir \$srcdir \$*
8223                 exit $?
8224         fi
8225         fi
8226         cf_subdir=\$mandir/man
8227         cf_tables=$MANPAGE_TBL
8228 else
8229         cf_subdir=\$mandir/cat
8230         cf_tables=yes
8231 fi
8232
8233 # process the list of source-files
8234 for i in \$* ; do
8235 case \$i in #(vi
8236 *.orig|*.rej) ;; #(vi
8237 *.[0-9]*)
8238         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8239         if test \$verb = installing ; then
8240         if test ! -d \$cf_subdir\${section} ; then
8241                 \$MKDIRS \$cf_subdir\$section
8242         fi
8243         fi
8244
8245         # replace variables in man page
8246         if test ! -f $cf_man_alias ; then
8247 cat >>$cf_man_alias <<-CF_EOF2
8248                 s,@DATADIR@,\$datadir,g
8249                 s,@TERMINFO@,\$TERMINFO,g
8250                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8251                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8252                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8253                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8254 CF_EOF
8255
8256         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8257         do
8258                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8259                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8260 cat >>$cf_edit_man <<-CF_EOF
8261                 s,@$cf_NAME@,$cf_name,
8262 CF_EOF
8263         done
8264
8265 cat >>$cf_edit_man <<CF_EOF
8266 CF_EOF2
8267                 echo "...made $cf_man_alias"
8268         fi
8269
8270         aliases=
8271         cf_source=\`basename \$i\`
8272         inalias=\$cf_source
8273         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8274         if test ! -f \$inalias ; then
8275                 echo .. skipped \$cf_source
8276                 continue
8277         fi
8278 CF_EOF
8279
8280 if test "$MANPAGE_ALIASES" != no ; then
8281 cat >>$cf_edit_man <<CF_EOF
8282         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8283 CF_EOF
8284 fi
8285
8286 if test "$MANPAGE_RENAMES" = no ; then
8287 cat >>$cf_edit_man <<CF_EOF
8288         # perform program transformations for section 1 man pages
8289         if test \$section = 1 ; then
8290                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8291         else
8292                 cf_target=\$cf_subdir\${section}/\$cf_source
8293         fi
8294 CF_EOF
8295 else
8296 cat >>$cf_edit_man <<CF_EOF
8297         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8298         if test -z "\$cf_target" ; then
8299                 echo '? missing rename for '\$cf_source
8300                 cf_target="\$cf_source"
8301         fi
8302         cf_target="\$cf_subdir\${section}/\${cf_target}"
8303
8304 CF_EOF
8305 fi
8306
8307 cat >>$cf_edit_man <<CF_EOF
8308         sed     -f $cf_man_alias \\
8309 CF_EOF
8310
8311 if test -f $MANPAGE_RENAMES ; then
8312 cat >>$cf_edit_man <<CF_EOF
8313                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8314 CF_EOF
8315 else
8316 cat >>$cf_edit_man <<CF_EOF
8317                 < \$i >\$TMP
8318 CF_EOF
8319 fi
8320
8321 cat >>$cf_edit_man <<CF_EOF
8322 if test \$cf_tables = yes ; then
8323         tbl \$TMP >\$TMP.out
8324         mv \$TMP.out \$TMP
8325 fi
8326 CF_EOF
8327
8328 if test $with_curses_h != yes ; then
8329 cat >>$cf_edit_man <<CF_EOF
8330         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8331         mv \$TMP.out \$TMP
8332 CF_EOF
8333 fi
8334
8335 cat >>$cf_edit_man <<CF_EOF
8336         if test \$form = format ; then
8337                 nroff -man \$TMP >\$TMP.out
8338                 mv \$TMP.out \$TMP
8339         fi
8340 CF_EOF
8341
8342 if test -n "$cf_compress" ; then
8343 cat >>$cf_edit_man <<CF_EOF
8344         if test \$verb = installing ; then
8345         if ( $cf_compress -f \$TMP )
8346         then
8347                 mv \$TMP.$cf_so_strip \$TMP
8348         fi
8349         fi
8350         cf_target="\$cf_target.$cf_so_strip"
8351 CF_EOF
8352 fi
8353
8354 case "$MANPAGE_FORMAT" in #(vi
8355 *BSDI*)
8356 cat >>$cf_edit_man <<CF_EOF
8357         if test \$form = format ; then
8358                 # BSDI installs only .0 suffixes in the cat directories
8359                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8360         fi
8361 CF_EOF
8362   ;;
8363 esac
8364
8365 cat >>$cf_edit_man <<CF_EOF
8366         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8367         if test \$verb = installing ; then
8368                 echo \$verb \$cf_target
8369                 \$INSTALL_DATA \$TMP \$cf_target
8370                 test -d \$cf_subdir\${section} &&
8371                 test -n "\$aliases" && (
8372                         cd \$cf_subdir\${section} && (
8373                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8374                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8375                                 cf_target=\`basename \$cf_target\`
8376                                 for cf_alias in \$aliases
8377                                 do
8378                                         if test \$section = 1 ; then
8379                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8380                                         fi
8381
8382                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8383                                                 if test -f \$cf_alias\${suffix} ; then
8384                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8385                                                         then
8386                                                                 continue
8387                                                         fi
8388                                                 fi
8389                                                 echo .. \$verb alias \$cf_alias\${suffix}
8390                                                 rm -f \$cf_alias\${suffix}
8391                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8392                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8393                                                 echo ".so \$cf_source" >\$TMP
8394 CF_EOF
8395 if test -n "$cf_compress" ; then
8396 cat >>$cf_edit_man <<CF_EOF
8397                                                 if test -n "$cf_so_strip" ; then
8398                                                         $cf_compress -f \$TMP
8399                                                         mv \$TMP.$cf_so_strip \$TMP
8400                                                 fi
8401 CF_EOF
8402 fi
8403 cat >>$cf_edit_man <<CF_EOF
8404                                                 echo .. \$verb alias \$cf_alias\${suffix}
8405                                                 rm -f \$cf_alias\${suffix}
8406                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8407                                         fi
8408                                 done
8409                         )
8410                 )
8411         elif test \$verb = removing ; then
8412                 test -f \$cf_target && (
8413                         echo \$verb \$cf_target
8414                         rm -f \$cf_target
8415                 )
8416                 test -d \$cf_subdir\${section} &&
8417                 test -n "\$aliases" && (
8418                         cd \$cf_subdir\${section} && (
8419                                 for cf_alias in \$aliases
8420                                 do
8421                                         if test \$section = 1 ; then
8422                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8423                                         fi
8424
8425                                         echo .. \$verb alias \$cf_alias\${suffix}
8426                                         rm -f \$cf_alias\${suffix}
8427                                 done
8428                         )
8429                 )
8430         else
8431 #               echo ".hy 0"
8432                 cat \$TMP
8433         fi
8434         ;;
8435 esac
8436 done
8437
8438 if test $cf_inboth = yes ; then
8439 if test \$form != format ; then
8440         sh \$0 format \$verb \$mandir \$srcdir \$*
8441 fi
8442 fi
8443
8444 exit 0
8445 CF_EOF
8446 chmod 755 $cf_edit_man
8447
8448 ###############################################################################
8449
8450 ### Note that some functions (such as const) are normally disabled anyway.
8451 echo "$as_me:8451: checking if you want to build with function extensions" >&5
8452 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8453
8454 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8455 if test "${enable_ext_funcs+set}" = set; then
8456   enableval="$enable_ext_funcs"
8457   with_ext_funcs=$enableval
8458 else
8459   with_ext_funcs=yes
8460 fi;
8461 echo "$as_me:8461: result: $with_ext_funcs" >&5
8462 echo "${ECHO_T}$with_ext_funcs" >&6
8463 if test "$with_ext_funcs" = yes ; then
8464         NCURSES_EXT_FUNCS=1
8465         cat >>confdefs.h <<\EOF
8466 #define HAVE_CURSES_VERSION 1
8467 EOF
8468
8469         cat >>confdefs.h <<\EOF
8470 #define HAVE_HAS_KEY 1
8471 EOF
8472
8473         cat >>confdefs.h <<\EOF
8474 #define HAVE_RESIZETERM 1
8475 EOF
8476
8477         cat >>confdefs.h <<\EOF
8478 #define HAVE_RESIZE_TERM 1
8479 EOF
8480
8481         cat >>confdefs.h <<\EOF
8482 #define HAVE_USE_DEFAULT_COLORS 1
8483 EOF
8484
8485         cat >>confdefs.h <<\EOF
8486 #define HAVE_WRESIZE 1
8487 EOF
8488
8489         cat >>confdefs.h <<\EOF
8490 #define NCURSES_EXT_FUNCS 1
8491 EOF
8492
8493 else
8494         NCURSES_EXT_FUNCS=0
8495 fi
8496
8497 ###   use option --enable-const to turn on use of const beyond that in XSI.
8498 echo "$as_me:8498: checking for extended use of const keyword" >&5
8499 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8500
8501 # Check whether --enable-const or --disable-const was given.
8502 if test "${enable_const+set}" = set; then
8503   enableval="$enable_const"
8504   with_ext_const=$enableval
8505 else
8506   with_ext_const=no
8507 fi;
8508 echo "$as_me:8508: result: $with_ext_const" >&5
8509 echo "${ECHO_T}$with_ext_const" >&6
8510 NCURSES_CONST='/*nothing*/'
8511 if test "$with_ext_const" = yes ; then
8512         NCURSES_CONST=const
8513 fi
8514
8515 echo "$as_me:8515: checking if you want \$NCURSES_NO_PADDING code" >&5
8516 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8517
8518 # Check whether --enable-no-padding or --disable-no-padding was given.
8519 if test "${enable_no_padding+set}" = set; then
8520   enableval="$enable_no_padding"
8521   with_no_padding=$enableval
8522 else
8523   with_no_padding=$with_ext_funcs
8524 fi;
8525 echo "$as_me:8525: result: $with_no_padding" >&5
8526 echo "${ECHO_T}$with_no_padding" >&6
8527 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8528 #define NCURSES_NO_PADDING 1
8529 EOF
8530
8531 echo "$as_me:8531: checking for ANSI C header files" >&5
8532 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8533 if test "${ac_cv_header_stdc+set}" = set; then
8534   echo $ECHO_N "(cached) $ECHO_C" >&6
8535 else
8536   cat >conftest.$ac_ext <<_ACEOF
8537 #line 8537 "configure"
8538 #include "confdefs.h"
8539 #include <stdlib.h>
8540 #include <stdarg.h>
8541 #include <string.h>
8542 #include <float.h>
8543
8544 _ACEOF
8545 if { (eval echo "$as_me:8545: \"$ac_cpp conftest.$ac_ext\"") >&5
8546   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8547   ac_status=$?
8548   egrep -v '^ *\+' conftest.er1 >conftest.err
8549   rm -f conftest.er1
8550   cat conftest.err >&5
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } >/dev/null; then
8553   if test -s conftest.err; then
8554     ac_cpp_err=$ac_c_preproc_warn_flag
8555   else
8556     ac_cpp_err=
8557   fi
8558 else
8559   ac_cpp_err=yes
8560 fi
8561 if test -z "$ac_cpp_err"; then
8562   ac_cv_header_stdc=yes
8563 else
8564   echo "$as_me: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   ac_cv_header_stdc=no
8567 fi
8568 rm -f conftest.err conftest.$ac_ext
8569
8570 if test $ac_cv_header_stdc = yes; then
8571   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8572   cat >conftest.$ac_ext <<_ACEOF
8573 #line 8573 "configure"
8574 #include "confdefs.h"
8575 #include <string.h>
8576
8577 _ACEOF
8578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8579   egrep "memchr" >/dev/null 2>&1; then
8580   :
8581 else
8582   ac_cv_header_stdc=no
8583 fi
8584 rm -f conftest*
8585
8586 fi
8587
8588 if test $ac_cv_header_stdc = yes; then
8589   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8590   cat >conftest.$ac_ext <<_ACEOF
8591 #line 8591 "configure"
8592 #include "confdefs.h"
8593 #include <stdlib.h>
8594
8595 _ACEOF
8596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8597   egrep "free" >/dev/null 2>&1; then
8598   :
8599 else
8600   ac_cv_header_stdc=no
8601 fi
8602 rm -f conftest*
8603
8604 fi
8605
8606 if test $ac_cv_header_stdc = yes; then
8607   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8608   if test "$cross_compiling" = yes; then
8609   :
8610 else
8611   cat >conftest.$ac_ext <<_ACEOF
8612 #line 8612 "configure"
8613 #include "confdefs.h"
8614 #include <ctype.h>
8615 #if ((' ' & 0x0FF) == 0x020)
8616 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8617 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8618 #else
8619 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8620                      || ('j' <= (c) && (c) <= 'r') \
8621                      || ('s' <= (c) && (c) <= 'z'))
8622 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8623 #endif
8624
8625 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8626 int
8627 main ()
8628 {
8629   int i;
8630   for (i = 0; i < 256; i++)
8631     if (XOR (islower (i), ISLOWER (i))
8632         || toupper (i) != TOUPPER (i))
8633       $ac_main_return(2);
8634   $ac_main_return (0);
8635 }
8636 _ACEOF
8637 rm -f conftest$ac_exeext
8638 if { (eval echo "$as_me:8638: \"$ac_link\"") >&5
8639   (eval $ac_link) 2>&5
8640   ac_status=$?
8641   echo "$as_me:8641: \$? = $ac_status" >&5
8642   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8643   { (eval echo "$as_me:8643: \"$ac_try\"") >&5
8644   (eval $ac_try) 2>&5
8645   ac_status=$?
8646   echo "$as_me:8646: \$? = $ac_status" >&5
8647   (exit $ac_status); }; }; then
8648   :
8649 else
8650   echo "$as_me: program exited with status $ac_status" >&5
8651 echo "$as_me: failed program was:" >&5
8652 cat conftest.$ac_ext >&5
8653 ac_cv_header_stdc=no
8654 fi
8655 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8656 fi
8657 fi
8658 fi
8659 echo "$as_me:8659: result: $ac_cv_header_stdc" >&5
8660 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8661 if test $ac_cv_header_stdc = yes; then
8662
8663 cat >>confdefs.h <<\EOF
8664 #define STDC_HEADERS 1
8665 EOF
8666
8667 fi
8668
8669 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8670
8671 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8672                   inttypes.h stdint.h unistd.h
8673 do
8674 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8675 echo "$as_me:8675: checking for $ac_header" >&5
8676 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8677 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8678   echo $ECHO_N "(cached) $ECHO_C" >&6
8679 else
8680   cat >conftest.$ac_ext <<_ACEOF
8681 #line 8681 "configure"
8682 #include "confdefs.h"
8683 $ac_includes_default
8684 #include <$ac_header>
8685 _ACEOF
8686 rm -f conftest.$ac_objext
8687 if { (eval echo "$as_me:8687: \"$ac_compile\"") >&5
8688   (eval $ac_compile) 2>&5
8689   ac_status=$?
8690   echo "$as_me:8690: \$? = $ac_status" >&5
8691   (exit $ac_status); } &&
8692          { ac_try='test -s conftest.$ac_objext'
8693   { (eval echo "$as_me:8693: \"$ac_try\"") >&5
8694   (eval $ac_try) 2>&5
8695   ac_status=$?
8696   echo "$as_me:8696: \$? = $ac_status" >&5
8697   (exit $ac_status); }; }; then
8698   eval "$as_ac_Header=yes"
8699 else
8700   echo "$as_me: failed program was:" >&5
8701 cat conftest.$ac_ext >&5
8702 eval "$as_ac_Header=no"
8703 fi
8704 rm -f conftest.$ac_objext conftest.$ac_ext
8705 fi
8706 echo "$as_me:8706: result: `eval echo '${'$as_ac_Header'}'`" >&5
8707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8708 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8709   cat >>confdefs.h <<EOF
8710 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8711 EOF
8712
8713 fi
8714 done
8715
8716 echo "$as_me:8716: checking for signed char" >&5
8717 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8718 if test "${ac_cv_type_signed_char+set}" = set; then
8719   echo $ECHO_N "(cached) $ECHO_C" >&6
8720 else
8721   cat >conftest.$ac_ext <<_ACEOF
8722 #line 8722 "configure"
8723 #include "confdefs.h"
8724 $ac_includes_default
8725 int
8726 main ()
8727 {
8728 if ((signed char *) 0)
8729   return 0;
8730 if (sizeof (signed char))
8731   return 0;
8732   ;
8733   return 0;
8734 }
8735 _ACEOF
8736 rm -f conftest.$ac_objext
8737 if { (eval echo "$as_me:8737: \"$ac_compile\"") >&5
8738   (eval $ac_compile) 2>&5
8739   ac_status=$?
8740   echo "$as_me:8740: \$? = $ac_status" >&5
8741   (exit $ac_status); } &&
8742          { ac_try='test -s conftest.$ac_objext'
8743   { (eval echo "$as_me:8743: \"$ac_try\"") >&5
8744   (eval $ac_try) 2>&5
8745   ac_status=$?
8746   echo "$as_me:8746: \$? = $ac_status" >&5
8747   (exit $ac_status); }; }; then
8748   ac_cv_type_signed_char=yes
8749 else
8750   echo "$as_me: failed program was:" >&5
8751 cat conftest.$ac_ext >&5
8752 ac_cv_type_signed_char=no
8753 fi
8754 rm -f conftest.$ac_objext conftest.$ac_ext
8755 fi
8756 echo "$as_me:8756: result: $ac_cv_type_signed_char" >&5
8757 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8758
8759 echo "$as_me:8759: checking size of signed char" >&5
8760 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8761 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8762   echo $ECHO_N "(cached) $ECHO_C" >&6
8763 else
8764   if test "$ac_cv_type_signed_char" = yes; then
8765   if test "$cross_compiling" = yes; then
8766   # Depending upon the size, compute the lo and hi bounds.
8767 cat >conftest.$ac_ext <<_ACEOF
8768 #line 8768 "configure"
8769 #include "confdefs.h"
8770 $ac_includes_default
8771 int
8772 main ()
8773 {
8774 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8775   ;
8776   return 0;
8777 }
8778 _ACEOF
8779 rm -f conftest.$ac_objext
8780 if { (eval echo "$as_me:8780: \"$ac_compile\"") >&5
8781   (eval $ac_compile) 2>&5
8782   ac_status=$?
8783   echo "$as_me:8783: \$? = $ac_status" >&5
8784   (exit $ac_status); } &&
8785          { ac_try='test -s conftest.$ac_objext'
8786   { (eval echo "$as_me:8786: \"$ac_try\"") >&5
8787   (eval $ac_try) 2>&5
8788   ac_status=$?
8789   echo "$as_me:8789: \$? = $ac_status" >&5
8790   (exit $ac_status); }; }; then
8791   ac_lo=0 ac_mid=0
8792   while :; do
8793     cat >conftest.$ac_ext <<_ACEOF
8794 #line 8794 "configure"
8795 #include "confdefs.h"
8796 $ac_includes_default
8797 int
8798 main ()
8799 {
8800 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8801   ;
8802   return 0;
8803 }
8804 _ACEOF
8805 rm -f conftest.$ac_objext
8806 if { (eval echo "$as_me:8806: \"$ac_compile\"") >&5
8807   (eval $ac_compile) 2>&5
8808   ac_status=$?
8809   echo "$as_me:8809: \$? = $ac_status" >&5
8810   (exit $ac_status); } &&
8811          { ac_try='test -s conftest.$ac_objext'
8812   { (eval echo "$as_me:8812: \"$ac_try\"") >&5
8813   (eval $ac_try) 2>&5
8814   ac_status=$?
8815   echo "$as_me:8815: \$? = $ac_status" >&5
8816   (exit $ac_status); }; }; then
8817   ac_hi=$ac_mid; break
8818 else
8819   echo "$as_me: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8822 fi
8823 rm -f conftest.$ac_objext conftest.$ac_ext
8824   done
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828 ac_hi=-1 ac_mid=-1
8829   while :; do
8830     cat >conftest.$ac_ext <<_ACEOF
8831 #line 8831 "configure"
8832 #include "confdefs.h"
8833 $ac_includes_default
8834 int
8835 main ()
8836 {
8837 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 rm -f conftest.$ac_objext
8843 if { (eval echo "$as_me:8843: \"$ac_compile\"") >&5
8844   (eval $ac_compile) 2>&5
8845   ac_status=$?
8846   echo "$as_me:8846: \$? = $ac_status" >&5
8847   (exit $ac_status); } &&
8848          { ac_try='test -s conftest.$ac_objext'
8849   { (eval echo "$as_me:8849: \"$ac_try\"") >&5
8850   (eval $ac_try) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); }; }; then
8854   ac_lo=$ac_mid; break
8855 else
8856   echo "$as_me: failed program was:" >&5
8857 cat conftest.$ac_ext >&5
8858 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8859 fi
8860 rm -f conftest.$ac_objext conftest.$ac_ext
8861   done
8862 fi
8863 rm -f conftest.$ac_objext conftest.$ac_ext
8864 # Binary search between lo and hi bounds.
8865 while test "x$ac_lo" != "x$ac_hi"; do
8866   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8867   cat >conftest.$ac_ext <<_ACEOF
8868 #line 8868 "configure"
8869 #include "confdefs.h"
8870 $ac_includes_default
8871 int
8872 main ()
8873 {
8874 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881   (eval $ac_compile) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest.$ac_objext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891   ac_hi=$ac_mid
8892 else
8893   echo "$as_me: failed program was:" >&5
8894 cat conftest.$ac_ext >&5
8895 ac_lo=`expr $ac_mid + 1`
8896 fi
8897 rm -f conftest.$ac_objext conftest.$ac_ext
8898 done
8899 ac_cv_sizeof_signed_char=$ac_lo
8900 else
8901   if test "$cross_compiling" = yes; then
8902   { { echo "$as_me:8902: error: cannot run test program while cross compiling" >&5
8903 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8904    { (exit 1); exit 1; }; }
8905 else
8906   cat >conftest.$ac_ext <<_ACEOF
8907 #line 8907 "configure"
8908 #include "confdefs.h"
8909 $ac_includes_default
8910 int
8911 main ()
8912 {
8913 FILE *f = fopen ("conftest.val", "w");
8914 if (!f)
8915   $ac_main_return (1);
8916 fprintf (f, "%d", (sizeof (signed char)));
8917 fclose (f);
8918   ;
8919   return 0;
8920 }
8921 _ACEOF
8922 rm -f conftest$ac_exeext
8923 if { (eval echo "$as_me:8923: \"$ac_link\"") >&5
8924   (eval $ac_link) 2>&5
8925   ac_status=$?
8926   echo "$as_me:8926: \$? = $ac_status" >&5
8927   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8928   { (eval echo "$as_me:8928: \"$ac_try\"") >&5
8929   (eval $ac_try) 2>&5
8930   ac_status=$?
8931   echo "$as_me:8931: \$? = $ac_status" >&5
8932   (exit $ac_status); }; }; then
8933   ac_cv_sizeof_signed_char=`cat conftest.val`
8934 else
8935   echo "$as_me: program exited with status $ac_status" >&5
8936 echo "$as_me: failed program was:" >&5
8937 cat conftest.$ac_ext >&5
8938 fi
8939 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8940 fi
8941 fi
8942 rm -f conftest.val
8943 else
8944   ac_cv_sizeof_signed_char=0
8945 fi
8946 fi
8947 echo "$as_me:8947: result: $ac_cv_sizeof_signed_char" >&5
8948 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8949 cat >>confdefs.h <<EOF
8950 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8951 EOF
8952
8953 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8954         NCURSES_SBOOL="signed char"
8955 else
8956         NCURSES_SBOOL="char"
8957 fi
8958 echo "$as_me:8958: checking if you want to use signed Boolean array in term.h" >&5
8959 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8960
8961 # Check whether --enable-signed-char or --disable-signed-char was given.
8962 if test "${enable_signed_char+set}" = set; then
8963   enableval="$enable_signed_char"
8964   with_signed_char=$enableval
8965 else
8966   with_signed_char=no
8967 fi;
8968 echo "$as_me:8968: result: $with_signed_char" >&5
8969 echo "${ECHO_T}$with_signed_char" >&6
8970 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8971
8972 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8973 echo "$as_me:8973: checking if you want SIGWINCH handler" >&5
8974 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8975
8976 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8977 if test "${enable_sigwinch+set}" = set; then
8978   enableval="$enable_sigwinch"
8979   with_sigwinch=$enableval
8980 else
8981   with_sigwinch=$with_ext_funcs
8982 fi;
8983 echo "$as_me:8983: result: $with_sigwinch" >&5
8984 echo "${ECHO_T}$with_sigwinch" >&6
8985 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8986 #define USE_SIGWINCH 1
8987 EOF
8988
8989 ###   use option --enable-tcap-names to allow user to define new capabilities
8990 echo "$as_me:8990: checking if you want user-definable terminal capabilities like termcap" >&5
8991 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8992
8993 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8994 if test "${enable_tcap_names+set}" = set; then
8995   enableval="$enable_tcap_names"
8996   with_tcap_names=$enableval
8997 else
8998   with_tcap_names=$with_ext_funcs
8999 fi;
9000 echo "$as_me:9000: result: $with_tcap_names" >&5
9001 echo "${ECHO_T}$with_tcap_names" >&6
9002 NCURSES_XNAMES=0
9003 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9004
9005 ###############################################################################
9006 # These options are relatively safe to experiment with.
9007
9008 echo "$as_me:9008: checking if you want all development code" >&5
9009 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9010
9011 # Check whether --with-develop or --without-develop was given.
9012 if test "${with_develop+set}" = set; then
9013   withval="$with_develop"
9014   with_develop=$withval
9015 else
9016   with_develop=no
9017 fi;
9018 echo "$as_me:9018: result: $with_develop" >&5
9019 echo "${ECHO_T}$with_develop" >&6
9020
9021 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9022 echo "$as_me:9022: checking if you want hard-tabs code" >&5
9023 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9024
9025 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9026 if test "${enable_hard_tabs+set}" = set; then
9027   enableval="$enable_hard_tabs"
9028
9029 else
9030   enable_hard_tabs=$with_develop
9031 fi;
9032 echo "$as_me:9032: result: $enable_hard_tabs" >&5
9033 echo "${ECHO_T}$enable_hard_tabs" >&6
9034 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9035 #define USE_HARD_TABS 1
9036 EOF
9037
9038 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9039 echo "$as_me:9039: checking if you want limited support for xmc" >&5
9040 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9041
9042 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9043 if test "${enable_xmc_glitch+set}" = set; then
9044   enableval="$enable_xmc_glitch"
9045
9046 else
9047   enable_xmc_glitch=$with_develop
9048 fi;
9049 echo "$as_me:9049: result: $enable_xmc_glitch" >&5
9050 echo "${ECHO_T}$enable_xmc_glitch" >&6
9051 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9052 #define USE_XMC_SUPPORT 1
9053 EOF
9054
9055 ###############################################################################
9056 # These are just experimental, probably should not be in a package:
9057
9058 echo "$as_me:9058: checking if you do not want to assume colors are white-on-black" >&5
9059 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9060
9061 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9062 if test "${enable_assumed_color+set}" = set; then
9063   enableval="$enable_assumed_color"
9064   with_assumed_color=$enableval
9065 else
9066   with_assumed_color=yes
9067 fi;
9068 echo "$as_me:9068: result: $with_assumed_color" >&5
9069 echo "${ECHO_T}$with_assumed_color" >&6
9070 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9071 #define USE_ASSUMED_COLOR 1
9072 EOF
9073
9074 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9075 echo "$as_me:9075: checking if you want hashmap scrolling-optimization code" >&5
9076 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9077
9078 # Check whether --enable-hashmap or --disable-hashmap was given.
9079 if test "${enable_hashmap+set}" = set; then
9080   enableval="$enable_hashmap"
9081   with_hashmap=$enableval
9082 else
9083   with_hashmap=yes
9084 fi;
9085 echo "$as_me:9085: result: $with_hashmap" >&5
9086 echo "${ECHO_T}$with_hashmap" >&6
9087 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9088 #define USE_HASHMAP 1
9089 EOF
9090
9091 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9092 echo "$as_me:9092: checking if you want colorfgbg code" >&5
9093 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9094
9095 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9096 if test "${enable_colorfgbg+set}" = set; then
9097   enableval="$enable_colorfgbg"
9098   with_colorfgbg=$enableval
9099 else
9100   with_colorfgbg=no
9101 fi;
9102 echo "$as_me:9102: result: $with_colorfgbg" >&5
9103 echo "${ECHO_T}$with_colorfgbg" >&6
9104 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9105 #define USE_COLORFGBG 1
9106 EOF
9107
9108 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9109 echo "$as_me:9109: checking if you want to use experimental extended colors" >&5
9110 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9111
9112 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9113 if test "${enable_ext_colors+set}" = set; then
9114   enableval="$enable_ext_colors"
9115   with_ext_colors=$enableval
9116 else
9117   with_ext_colors=no
9118 fi;
9119 echo "$as_me:9119: result: $with_ext_colors" >&5
9120 echo "${ECHO_T}$with_ext_colors" >&6
9121 NCURSES_EXT_COLORS=0
9122 if test "$with_ext_colors" = yes ; then
9123         if test "$with_widec" != yes ; then
9124                 { { echo "$as_me:9124: error: This option applies only to wide-character library" >&5
9125 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9126    { (exit 1); exit 1; }; }
9127         else
9128                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9129
9130 if test "${with_abi_version+set}" != set; then
9131         case $cf_cv_rel_version in
9132         5.*)
9133                 cf_cv_rel_version=6.0
9134                 cf_cv_abi_version=6
9135                 { echo "$as_me:9135: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9136 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9137                 ;;
9138         esac
9139 fi
9140
9141         fi
9142         NCURSES_EXT_COLORS=1
9143         cat >>confdefs.h <<\EOF
9144 #define NCURSES_EXT_COLORS 1
9145 EOF
9146
9147 fi
9148
9149 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9150 echo "$as_me:9150: checking if you want to use experimental extended mouse encoding" >&5
9151 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9152
9153 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9154 if test "${enable_ext_mouse+set}" = set; then
9155   enableval="$enable_ext_mouse"
9156   with_ext_mouse=$enableval
9157 else
9158   with_ext_mouse=no
9159 fi;
9160 echo "$as_me:9160: result: $with_ext_mouse" >&5
9161 echo "${ECHO_T}$with_ext_mouse" >&6
9162 NCURSES_MOUSE_VERSION=1
9163 if test "$with_ext_mouse" = yes ; then
9164         NCURSES_MOUSE_VERSION=2
9165
9166 if test "${with_abi_version+set}" != set; then
9167         case $cf_cv_rel_version in
9168         5.*)
9169                 cf_cv_rel_version=6.0
9170                 cf_cv_abi_version=6
9171                 { echo "$as_me:9171: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9172 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9173                 ;;
9174         esac
9175 fi
9176
9177 fi
9178
9179 # Reentrant code has to be opaque; there's little advantage to making ncurses
9180 # opaque outside of that, so there is no --enable-opaque option.
9181 echo "$as_me:9181: checking if you want experimental reentrant code" >&5
9182 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9183
9184 # Check whether --enable-reentrant or --disable-reentrant was given.
9185 if test "${enable_reentrant+set}" = set; then
9186   enableval="$enable_reentrant"
9187   with_reentrant=$enableval
9188 else
9189   with_reentrant=no
9190 fi;
9191 echo "$as_me:9191: result: $with_reentrant" >&5
9192 echo "${ECHO_T}$with_reentrant" >&6
9193 if test "$with_reentrant" = yes ; then
9194         cf_cv_enable_reentrant=1
9195         cf_cv_enable_opaque="NCURSES_INTERNALS"
9196         NCURSES_OPAQUE=1
9197         NCURSES_SIZE_T=int
9198         LIB_SUFFIX="t${LIB_SUFFIX}"
9199         cat >>confdefs.h <<\EOF
9200 #define USE_REENTRANT 1
9201 EOF
9202
9203 if test "${with_abi_version+set}" != set; then
9204         case $cf_cv_rel_version in
9205         5.*)
9206                 cf_cv_rel_version=6.0
9207                 cf_cv_abi_version=6
9208                 { echo "$as_me:9208: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9209 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9210                 ;;
9211         esac
9212 fi
9213
9214 else
9215         cf_cv_enable_reentrant=0
9216         cf_cv_enable_opaque="NCURSES_OPAQUE"
9217         NCURSES_OPAQUE=0
9218         NCURSES_SIZE_T=short
9219 fi
9220
9221 echo "$as_me:9221: checking if you want experimental safe-sprintf code" >&5
9222 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9223
9224 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9225 if test "${enable_safe_sprintf+set}" = set; then
9226   enableval="$enable_safe_sprintf"
9227   with_safe_sprintf=$enableval
9228 else
9229   with_safe_sprintf=no
9230 fi;
9231 echo "$as_me:9231: result: $with_safe_sprintf" >&5
9232 echo "${ECHO_T}$with_safe_sprintf" >&6
9233 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9234 #define USE_SAFE_SPRINTF 1
9235 EOF
9236
9237 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9238 # when hashmap is used scroll hints are useless
9239 if test "$with_hashmap" = no ; then
9240 echo "$as_me:9240: checking if you want to experiment without scrolling-hints code" >&5
9241 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9242
9243 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9244 if test "${enable_scroll_hints+set}" = set; then
9245   enableval="$enable_scroll_hints"
9246   with_scroll_hints=$enableval
9247 else
9248   with_scroll_hints=yes
9249 fi;
9250 echo "$as_me:9250: result: $with_scroll_hints" >&5
9251 echo "${ECHO_T}$with_scroll_hints" >&6
9252 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9253 #define USE_SCROLL_HINTS 1
9254 EOF
9255
9256 fi
9257
9258 echo "$as_me:9258: checking if you want experimental wgetch-events code" >&5
9259 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9260
9261 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9262 if test "${enable_wgetch_events+set}" = set; then
9263   enableval="$enable_wgetch_events"
9264   with_wgetch_events=$enableval
9265 else
9266   with_wgetch_events=no
9267 fi;
9268 echo "$as_me:9268: result: $with_wgetch_events" >&5
9269 echo "${ECHO_T}$with_wgetch_events" >&6
9270 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9271 #define NCURSES_WGETCH_EVENTS 1
9272 EOF
9273
9274 ###############################################################################
9275
9276 ###     use option --disable-echo to suppress full display compiling commands
9277 echo "$as_me:9277: checking if you want to display full commands during build" >&5
9278 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9279
9280 # Check whether --enable-echo or --disable-echo was given.
9281 if test "${enable_echo+set}" = set; then
9282   enableval="$enable_echo"
9283   with_echo=$enableval
9284 else
9285   with_echo=yes
9286 fi;
9287 if test "$with_echo" = yes; then
9288         ECHO_LINK=
9289 else
9290         ECHO_LINK='@ echo linking $@ ... ;'
9291         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9292         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9293 fi
9294 echo "$as_me:9294: result: $with_echo" >&5
9295 echo "${ECHO_T}$with_echo" >&6
9296
9297 ###     use option --enable-warnings to turn on all gcc warnings
9298 echo "$as_me:9298: checking if you want to see compiler warnings" >&5
9299 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9300
9301 # Check whether --enable-warnings or --disable-warnings was given.
9302 if test "${enable_warnings+set}" = set; then
9303   enableval="$enable_warnings"
9304   with_warnings=$enableval
9305 fi;
9306 echo "$as_me:9306: result: $with_warnings" >&5
9307 echo "${ECHO_T}$with_warnings" >&6
9308
9309 if test -n "$with_warnings"; then
9310         ADAFLAGS="$ADAFLAGS -gnatg"
9311
9312 INTEL_COMPILER=no
9313
9314 if test "$GCC" = yes ; then
9315         case $host_os in
9316         linux*|gnu*)
9317                 echo "$as_me:9317: checking if this is really Intel C compiler" >&5
9318 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9319                 cf_save_CFLAGS="$CFLAGS"
9320                 CFLAGS="$CFLAGS -no-gcc"
9321                 cat >conftest.$ac_ext <<_ACEOF
9322 #line 9322 "configure"
9323 #include "confdefs.h"
9324
9325 int
9326 main ()
9327 {
9328
9329 #ifdef __INTEL_COMPILER
9330 #else
9331 make an error
9332 #endif
9333
9334   ;
9335   return 0;
9336 }
9337 _ACEOF
9338 rm -f conftest.$ac_objext
9339 if { (eval echo "$as_me:9339: \"$ac_compile\"") >&5
9340   (eval $ac_compile) 2>&5
9341   ac_status=$?
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit $ac_status); } &&
9344          { ac_try='test -s conftest.$ac_objext'
9345   { (eval echo "$as_me:9345: \"$ac_try\"") >&5
9346   (eval $ac_try) 2>&5
9347   ac_status=$?
9348   echo "$as_me:9348: \$? = $ac_status" >&5
9349   (exit $ac_status); }; }; then
9350   INTEL_COMPILER=yes
9351 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9352
9353 else
9354   echo "$as_me: failed program was:" >&5
9355 cat conftest.$ac_ext >&5
9356 fi
9357 rm -f conftest.$ac_objext conftest.$ac_ext
9358                 CFLAGS="$cf_save_CFLAGS"
9359                 echo "$as_me:9359: result: $INTEL_COMPILER" >&5
9360 echo "${ECHO_T}$INTEL_COMPILER" >&6
9361                 ;;
9362         esac
9363 fi
9364
9365 cat > conftest.$ac_ext <<EOF
9366 #line 9366 "${as_me-configure}"
9367 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9368 EOF
9369
9370 if test "$INTEL_COMPILER" = yes
9371 then
9372 # The "-wdXXX" options suppress warnings:
9373 # remark #1419: external declaration in primary source file
9374 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9375 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9376 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9377 # remark #193: zero used for undefined preprocessing identifier
9378 # remark #593: variable "curs_sb_left_arrow" was set but never used
9379 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9380 # remark #869: parameter "tw" was never referenced
9381 # remark #981: operands are evaluated in unspecified order
9382 # warning #269: invalid format string conversion
9383
9384         { echo "$as_me:9384: checking for $CC warning options..." >&5
9385 echo "$as_me: checking for $CC warning options..." >&6;}
9386         cf_save_CFLAGS="$CFLAGS"
9387         EXTRA_CFLAGS="-Wall"
9388         for cf_opt in \
9389                 wd1419 \
9390                 wd1682 \
9391                 wd1683 \
9392                 wd1684 \
9393                 wd193 \
9394                 wd279 \
9395                 wd593 \
9396                 wd810 \
9397                 wd869 \
9398                 wd981
9399         do
9400                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9401                 if { (eval echo "$as_me:9401: \"$ac_compile\"") >&5
9402   (eval $ac_compile) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit $ac_status); }; then
9406                         test -n "$verbose" && echo "$as_me:9406: result: ... -$cf_opt" >&5
9407 echo "${ECHO_T}... -$cf_opt" >&6
9408                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9409                 fi
9410         done
9411         CFLAGS="$cf_save_CFLAGS"
9412
9413 elif test "$GCC" = yes
9414 then
9415         { echo "$as_me:9415: checking for $CC warning options..." >&5
9416 echo "$as_me: checking for $CC warning options..." >&6;}
9417         cf_save_CFLAGS="$CFLAGS"
9418         EXTRA_CFLAGS="-W -Wall"
9419         cf_warn_CONST=""
9420         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9421         for cf_opt in \
9422                 Wbad-function-cast \
9423                 Wcast-align \
9424                 Wcast-qual \
9425                 Winline \
9426                 Wmissing-declarations \
9427                 Wmissing-prototypes \
9428                 Wnested-externs \
9429                 Wpointer-arith \
9430                 Wshadow \
9431                 Wstrict-prototypes \
9432                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9433         do
9434                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9435                 if { (eval echo "$as_me:9435: \"$ac_compile\"") >&5
9436   (eval $ac_compile) 2>&5
9437   ac_status=$?
9438   echo "$as_me:9438: \$? = $ac_status" >&5
9439   (exit $ac_status); }; then
9440                         test -n "$verbose" && echo "$as_me:9440: result: ... -$cf_opt" >&5
9441 echo "${ECHO_T}... -$cf_opt" >&6
9442                         case $cf_opt in #(vi
9443                         Wcast-qual) #(vi
9444                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9445                                 ;;
9446                         Winline) #(vi
9447                                 case $GCC_VERSION in
9448                                 3.3*)
9449                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9450
9451 echo "${as_me-configure}:9451: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9452
9453                                         continue;;
9454                                 esac
9455                                 ;;
9456                         esac
9457                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9458                 fi
9459         done
9460         CFLAGS="$cf_save_CFLAGS"
9461 fi
9462 rm -f conftest*
9463
9464         if test "$cf_with_cxx" = yes ; then
9465
9466 INTEL_CPLUSPLUS=no
9467
9468 if test "$GCC" = yes ; then
9469         case $host_os in
9470         linux*|gnu*)
9471                 echo "$as_me:9471: checking if this is really Intel C++ compiler" >&5
9472 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9473                 cf_save_CFLAGS="$CXXFLAGS"
9474                 CXXFLAGS="$CXXFLAGS -no-gcc"
9475                 cat >conftest.$ac_ext <<_ACEOF
9476 #line 9476 "configure"
9477 #include "confdefs.h"
9478
9479 int
9480 main ()
9481 {
9482
9483 #ifdef __INTEL_COMPILER
9484 #else
9485 make an error
9486 #endif
9487
9488   ;
9489   return 0;
9490 }
9491 _ACEOF
9492 rm -f conftest.$ac_objext
9493 if { (eval echo "$as_me:9493: \"$ac_compile\"") >&5
9494   (eval $ac_compile) 2>&5
9495   ac_status=$?
9496   echo "$as_me:9496: \$? = $ac_status" >&5
9497   (exit $ac_status); } &&
9498          { ac_try='test -s conftest.$ac_objext'
9499   { (eval echo "$as_me:9499: \"$ac_try\"") >&5
9500   (eval $ac_try) 2>&5
9501   ac_status=$?
9502   echo "$as_me:9502: \$? = $ac_status" >&5
9503   (exit $ac_status); }; }; then
9504   INTEL_CPLUSPLUS=yes
9505 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9506
9507 else
9508   echo "$as_me: failed program was:" >&5
9509 cat conftest.$ac_ext >&5
9510 fi
9511 rm -f conftest.$ac_objext conftest.$ac_ext
9512                 CXXFLAGS="$cf_save_CFLAGS"
9513                 echo "$as_me:9513: result: $INTEL_CPLUSPLUS" >&5
9514 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9515                 ;;
9516         esac
9517 fi
9518
9519 ac_ext=cc
9520 ac_cpp='$CXXCPP $CPPFLAGS'
9521 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9522 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9523 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9524 ac_main_return=return
9525
9526 cat > conftest.$ac_ext <<EOF
9527 #line 9527 "configure"
9528 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9529 EOF
9530
9531 if test "$INTEL_CPLUSPLUS" = yes
9532 then
9533 # The "-wdXXX" options suppress warnings:
9534 # remark #1419: external declaration in primary source file
9535 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9536 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9537 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9538 # remark #193: zero used for undefined preprocessing identifier
9539 # remark #593: variable "curs_sb_left_arrow" was set but never used
9540 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9541 # remark #869: parameter "tw" was never referenced
9542 # remark #981: operands are evaluated in unspecified order
9543 # warning #269: invalid format string conversion
9544
9545         { echo "$as_me:9545: checking for $CC warning options..." >&5
9546 echo "$as_me: checking for $CC warning options..." >&6;}
9547         cf_save_CXXFLAGS="$CXXFLAGS"
9548         EXTRA_CXXFLAGS="-Wall"
9549         for cf_opt in \
9550                 wd1419 \
9551                 wd1682 \
9552                 wd1683 \
9553                 wd1684 \
9554                 wd193 \
9555                 wd279 \
9556                 wd593 \
9557                 wd810 \
9558                 wd869 \
9559                 wd981
9560         do
9561                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9562                 if { (eval echo "$as_me:9562: \"$ac_compile\"") >&5
9563   (eval $ac_compile) 2>&5
9564   ac_status=$?
9565   echo "$as_me:9565: \$? = $ac_status" >&5
9566   (exit $ac_status); }; then
9567                         test -n "$verbose" && echo "$as_me:9567: result: ... -$cf_opt" >&5
9568 echo "${ECHO_T}... -$cf_opt" >&6
9569                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9570                 fi
9571         done
9572         CXXFLAGS="$cf_save_CXXFLAGS"
9573
9574 elif test "$GXX" = yes
9575 then
9576         { echo "$as_me:9576: checking for $CXX warning options..." >&5
9577 echo "$as_me: checking for $CXX warning options..." >&6;}
9578         cf_save_CXXFLAGS="$CXXFLAGS"
9579         EXTRA_CXXFLAGS="-W -Wall"
9580         cf_gxx_extra_warnings=""
9581         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9582         case "$GCC_VERSION" in
9583         [1-2].*)
9584                 ;;
9585         *)
9586                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9587                 ;;
9588         esac
9589         for cf_opt in \
9590                 Wabi \
9591                 fabi-version=0 \
9592                 Woverloaded-virtual \
9593                 Wsign-promo \
9594                 Wsynth \
9595                 Wold-style-cast \
9596                 Wcast-align \
9597                 Wcast-qual \
9598                 Wmissing-prototypes \
9599                 Wpointer-arith \
9600                 Wshadow \
9601                 Wstrict-prototypes \
9602                 Wundef $cf_gxx_extra_warnings Wno-unused
9603         do
9604                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9605                 if { (eval echo "$as_me:9605: \"$ac_compile\"") >&5
9606   (eval $ac_compile) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); }; then
9610                         test -n "$verbose" && echo "$as_me:9610: result: ... -$cf_opt" >&5
9611 echo "${ECHO_T}... -$cf_opt" >&6
9612                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9613                 else
9614                         test -n "$verbose" && echo "$as_me:9614: result: ... no -$cf_opt" >&5
9615 echo "${ECHO_T}... no -$cf_opt" >&6
9616                 fi
9617         done
9618         CXXFLAGS="$cf_save_CXXFLAGS"
9619 fi
9620
9621 rm -f conftest*
9622 ac_ext=c
9623 ac_cpp='$CPP $CPPFLAGS'
9624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9627 ac_main_return=return
9628
9629         fi
9630 fi
9631
9632 if test "$GCC" = yes
9633 then
9634 cat > conftest.i <<EOF
9635 #ifndef GCC_PRINTF
9636 #define GCC_PRINTF 0
9637 #endif
9638 #ifndef GCC_SCANF
9639 #define GCC_SCANF 0
9640 #endif
9641 #ifndef GCC_NORETURN
9642 #define GCC_NORETURN /* nothing */
9643 #endif
9644 #ifndef GCC_UNUSED
9645 #define GCC_UNUSED /* nothing */
9646 #endif
9647 EOF
9648 if test "$GCC" = yes
9649 then
9650         { echo "$as_me:9650: checking for $CC __attribute__ directives..." >&5
9651 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9653 "${as_me-configure}"
9654 #include "confdefs.h"
9655 #include "conftest.h"
9656 #include "conftest.i"
9657 #if     GCC_PRINTF
9658 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9659 #else
9660 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9661 #endif
9662 #if     GCC_SCANF
9663 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9664 #else
9665 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9666 #endif
9667 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9668 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9669 extern void foo(void) GCC_NORETURN;
9670 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9671 EOF
9672         for cf_attribute in scanf printf unused noreturn
9673         do
9674
9675 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9676
9677                 cf_directive="__attribute__(($cf_attribute))"
9678                 echo "checking for $CC $cf_directive" 1>&5
9679                 case $cf_attribute in
9680                 scanf|printf)
9681                 cat >conftest.h <<EOF
9682 #define GCC_$cf_ATTRIBUTE 1
9683 EOF
9684                         ;;
9685                 *)
9686                 cat >conftest.h <<EOF
9687 #define GCC_$cf_ATTRIBUTE $cf_directive
9688 EOF
9689                         ;;
9690                 esac
9691                 if { (eval echo "$as_me:9691: \"$ac_compile\"") >&5
9692   (eval $ac_compile) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit $ac_status); }; then
9696                         test -n "$verbose" && echo "$as_me:9696: result: ... $cf_attribute" >&5
9697 echo "${ECHO_T}... $cf_attribute" >&6
9698                         cat conftest.h >>confdefs.h
9699                 fi
9700         done
9701 else
9702         fgrep define conftest.i >>confdefs.h
9703 fi
9704 rm -rf conftest*
9705 fi
9706
9707 ###     use option --enable-assertions to turn on generation of assertion code
9708 echo "$as_me:9708: checking if you want to enable runtime assertions" >&5
9709 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9710
9711 # Check whether --enable-assertions or --disable-assertions was given.
9712 if test "${enable_assertions+set}" = set; then
9713   enableval="$enable_assertions"
9714   with_assertions=$enableval
9715 else
9716   with_assertions=no
9717 fi;
9718 echo "$as_me:9718: result: $with_assertions" >&5
9719 echo "${ECHO_T}$with_assertions" >&6
9720 if test -n "$GCC"
9721 then
9722         if test "$with_assertions" = no
9723         then
9724                 cat >>confdefs.h <<\EOF
9725 #define NDEBUG 1
9726 EOF
9727
9728                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9729         else
9730                 ADAFLAGS="$ADAFLAGS -gnata"
9731         fi
9732 fi
9733
9734 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9735
9736 echo "$as_me:9736: checking if you want to use dmalloc for testing" >&5
9737 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9738
9739 # Check whether --with-dmalloc or --without-dmalloc was given.
9740 if test "${with_dmalloc+set}" = set; then
9741   withval="$with_dmalloc"
9742   cat >>confdefs.h <<\EOF
9743 #define USE_DMALLOC 1
9744 EOF
9745
9746         : ${with_cflags:=-g}
9747         : ${with_no_leaks:=yes}
9748          with_dmalloc=yes
9749 else
9750   with_dmalloc=
9751 fi;
9752 echo "$as_me:9752: result: ${with_dmalloc:-no}" >&5
9753 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9754
9755 case .$with_cflags in #(vi
9756 .*-g*)
9757         case .$CFLAGS in #(vi
9758         .*-g*) #(vi
9759                 ;;
9760         *)
9761
9762 cf_fix_cppflags=no
9763 cf_new_cflags=
9764 cf_new_cppflags=
9765 cf_new_extra_cppflags=
9766
9767 for cf_add_cflags in -g
9768 do
9769 case $cf_fix_cppflags in
9770 no)
9771         case $cf_add_cflags in #(vi
9772         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9773                 case $cf_add_cflags in
9774                 -D*)
9775                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9776
9777                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9778                         && test -z "${cf_tst_cflags}" \
9779                         && cf_fix_cppflags=yes
9780
9781                         if test $cf_fix_cppflags = yes ; then
9782                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9783                                 continue
9784                         elif test "${cf_tst_cflags}" = "\"'" ; then
9785                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9786                                 continue
9787                         fi
9788                         ;;
9789                 esac
9790                 case "$CPPFLAGS" in
9791                 *$cf_add_cflags) #(vi
9792                         ;;
9793                 *) #(vi
9794                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9795                         ;;
9796                 esac
9797                 ;;
9798         *)
9799                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9800                 ;;
9801         esac
9802         ;;
9803 yes)
9804         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9805
9806         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9807
9808         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9809         && test -z "${cf_tst_cflags}" \
9810         && cf_fix_cppflags=no
9811         ;;
9812 esac
9813 done
9814
9815 if test -n "$cf_new_cflags" ; then
9816
9817         CFLAGS="$CFLAGS $cf_new_cflags"
9818 fi
9819
9820 if test -n "$cf_new_cppflags" ; then
9821
9822         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9823 fi
9824
9825 if test -n "$cf_new_extra_cppflags" ; then
9826
9827         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9828 fi
9829
9830                 ;;
9831         esac
9832         ;;
9833 esac
9834
9835 if test "$with_dmalloc" = yes ; then
9836         echo "$as_me:9836: checking for dmalloc.h" >&5
9837 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9838 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9839   echo $ECHO_N "(cached) $ECHO_C" >&6
9840 else
9841   cat >conftest.$ac_ext <<_ACEOF
9842 #line 9842 "configure"
9843 #include "confdefs.h"
9844 #include <dmalloc.h>
9845 _ACEOF
9846 if { (eval echo "$as_me:9846: \"$ac_cpp conftest.$ac_ext\"") >&5
9847   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9848   ac_status=$?
9849   egrep -v '^ *\+' conftest.er1 >conftest.err
9850   rm -f conftest.er1
9851   cat conftest.err >&5
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); } >/dev/null; then
9854   if test -s conftest.err; then
9855     ac_cpp_err=$ac_c_preproc_warn_flag
9856   else
9857     ac_cpp_err=
9858   fi
9859 else
9860   ac_cpp_err=yes
9861 fi
9862 if test -z "$ac_cpp_err"; then
9863   ac_cv_header_dmalloc_h=yes
9864 else
9865   echo "$as_me: failed program was:" >&5
9866   cat conftest.$ac_ext >&5
9867   ac_cv_header_dmalloc_h=no
9868 fi
9869 rm -f conftest.err conftest.$ac_ext
9870 fi
9871 echo "$as_me:9871: result: $ac_cv_header_dmalloc_h" >&5
9872 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9873 if test $ac_cv_header_dmalloc_h = yes; then
9874
9875 echo "$as_me:9875: checking for dmalloc_debug in -ldmalloc" >&5
9876 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9877 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9878   echo $ECHO_N "(cached) $ECHO_C" >&6
9879 else
9880   ac_check_lib_save_LIBS=$LIBS
9881 LIBS="-ldmalloc  $LIBS"
9882 cat >conftest.$ac_ext <<_ACEOF
9883 #line 9883 "configure"
9884 #include "confdefs.h"
9885
9886 /* Override any gcc2 internal prototype to avoid an error.  */
9887 #ifdef __cplusplus
9888 extern "C"
9889 #endif
9890 /* We use char because int might match the return type of a gcc2
9891    builtin and then its argument prototype would still apply.  */
9892 char dmalloc_debug ();
9893 int
9894 main ()
9895 {
9896 dmalloc_debug ();
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901 rm -f conftest.$ac_objext conftest$ac_exeext
9902 if { (eval echo "$as_me:9902: \"$ac_link\"") >&5
9903   (eval $ac_link) 2>&5
9904   ac_status=$?
9905   echo "$as_me:9905: \$? = $ac_status" >&5
9906   (exit $ac_status); } &&
9907          { ac_try='test -s conftest$ac_exeext'
9908   { (eval echo "$as_me:9908: \"$ac_try\"") >&5
9909   (eval $ac_try) 2>&5
9910   ac_status=$?
9911   echo "$as_me:9911: \$? = $ac_status" >&5
9912   (exit $ac_status); }; }; then
9913   ac_cv_lib_dmalloc_dmalloc_debug=yes
9914 else
9915   echo "$as_me: failed program was:" >&5
9916 cat conftest.$ac_ext >&5
9917 ac_cv_lib_dmalloc_dmalloc_debug=no
9918 fi
9919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9920 LIBS=$ac_check_lib_save_LIBS
9921 fi
9922 echo "$as_me:9922: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9923 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9924 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9925   cat >>confdefs.h <<EOF
9926 #define HAVE_LIBDMALLOC 1
9927 EOF
9928
9929   LIBS="-ldmalloc $LIBS"
9930
9931 fi
9932
9933 fi
9934
9935 fi
9936
9937 echo "$as_me:9937: checking if you want to use dbmalloc for testing" >&5
9938 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9939
9940 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9941 if test "${with_dbmalloc+set}" = set; then
9942   withval="$with_dbmalloc"
9943   cat >>confdefs.h <<\EOF
9944 #define USE_DBMALLOC 1
9945 EOF
9946
9947         : ${with_cflags:=-g}
9948         : ${with_no_leaks:=yes}
9949          with_dbmalloc=yes
9950 else
9951   with_dbmalloc=
9952 fi;
9953 echo "$as_me:9953: result: ${with_dbmalloc:-no}" >&5
9954 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9955
9956 case .$with_cflags in #(vi
9957 .*-g*)
9958         case .$CFLAGS in #(vi
9959         .*-g*) #(vi
9960                 ;;
9961         *)
9962
9963 cf_fix_cppflags=no
9964 cf_new_cflags=
9965 cf_new_cppflags=
9966 cf_new_extra_cppflags=
9967
9968 for cf_add_cflags in -g
9969 do
9970 case $cf_fix_cppflags in
9971 no)
9972         case $cf_add_cflags in #(vi
9973         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9974                 case $cf_add_cflags in
9975                 -D*)
9976                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9977
9978                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9979                         && test -z "${cf_tst_cflags}" \
9980                         && cf_fix_cppflags=yes
9981
9982                         if test $cf_fix_cppflags = yes ; then
9983                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9984                                 continue
9985                         elif test "${cf_tst_cflags}" = "\"'" ; then
9986                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9987                                 continue
9988                         fi
9989                         ;;
9990                 esac
9991                 case "$CPPFLAGS" in
9992                 *$cf_add_cflags) #(vi
9993                         ;;
9994                 *) #(vi
9995                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9996                         ;;
9997                 esac
9998                 ;;
9999         *)
10000                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10001                 ;;
10002         esac
10003         ;;
10004 yes)
10005         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10006
10007         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10008
10009         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10010         && test -z "${cf_tst_cflags}" \
10011         && cf_fix_cppflags=no
10012         ;;
10013 esac
10014 done
10015
10016 if test -n "$cf_new_cflags" ; then
10017
10018         CFLAGS="$CFLAGS $cf_new_cflags"
10019 fi
10020
10021 if test -n "$cf_new_cppflags" ; then
10022
10023         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10024 fi
10025
10026 if test -n "$cf_new_extra_cppflags" ; then
10027
10028         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10029 fi
10030
10031                 ;;
10032         esac
10033         ;;
10034 esac
10035
10036 if test "$with_dbmalloc" = yes ; then
10037         echo "$as_me:10037: checking for dbmalloc.h" >&5
10038 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10039 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10040   echo $ECHO_N "(cached) $ECHO_C" >&6
10041 else
10042   cat >conftest.$ac_ext <<_ACEOF
10043 #line 10043 "configure"
10044 #include "confdefs.h"
10045 #include <dbmalloc.h>
10046 _ACEOF
10047 if { (eval echo "$as_me:10047: \"$ac_cpp conftest.$ac_ext\"") >&5
10048   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10049   ac_status=$?
10050   egrep -v '^ *\+' conftest.er1 >conftest.err
10051   rm -f conftest.er1
10052   cat conftest.err >&5
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); } >/dev/null; then
10055   if test -s conftest.err; then
10056     ac_cpp_err=$ac_c_preproc_warn_flag
10057   else
10058     ac_cpp_err=
10059   fi
10060 else
10061   ac_cpp_err=yes
10062 fi
10063 if test -z "$ac_cpp_err"; then
10064   ac_cv_header_dbmalloc_h=yes
10065 else
10066   echo "$as_me: failed program was:" >&5
10067   cat conftest.$ac_ext >&5
10068   ac_cv_header_dbmalloc_h=no
10069 fi
10070 rm -f conftest.err conftest.$ac_ext
10071 fi
10072 echo "$as_me:10072: result: $ac_cv_header_dbmalloc_h" >&5
10073 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10074 if test $ac_cv_header_dbmalloc_h = yes; then
10075
10076 echo "$as_me:10076: checking for debug_malloc in -ldbmalloc" >&5
10077 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10078 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10079   echo $ECHO_N "(cached) $ECHO_C" >&6
10080 else
10081   ac_check_lib_save_LIBS=$LIBS
10082 LIBS="-ldbmalloc  $LIBS"
10083 cat >conftest.$ac_ext <<_ACEOF
10084 #line 10084 "configure"
10085 #include "confdefs.h"
10086
10087 /* Override any gcc2 internal prototype to avoid an error.  */
10088 #ifdef __cplusplus
10089 extern "C"
10090 #endif
10091 /* We use char because int might match the return type of a gcc2
10092    builtin and then its argument prototype would still apply.  */
10093 char debug_malloc ();
10094 int
10095 main ()
10096 {
10097 debug_malloc ();
10098   ;
10099   return 0;
10100 }
10101 _ACEOF
10102 rm -f conftest.$ac_objext conftest$ac_exeext
10103 if { (eval echo "$as_me:10103: \"$ac_link\"") >&5
10104   (eval $ac_link) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit $ac_status); } &&
10108          { ac_try='test -s conftest$ac_exeext'
10109   { (eval echo "$as_me:10109: \"$ac_try\"") >&5
10110   (eval $ac_try) 2>&5
10111   ac_status=$?
10112   echo "$as_me:10112: \$? = $ac_status" >&5
10113   (exit $ac_status); }; }; then
10114   ac_cv_lib_dbmalloc_debug_malloc=yes
10115 else
10116   echo "$as_me: failed program was:" >&5
10117 cat conftest.$ac_ext >&5
10118 ac_cv_lib_dbmalloc_debug_malloc=no
10119 fi
10120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10121 LIBS=$ac_check_lib_save_LIBS
10122 fi
10123 echo "$as_me:10123: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10124 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10125 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10126   cat >>confdefs.h <<EOF
10127 #define HAVE_LIBDBMALLOC 1
10128 EOF
10129
10130   LIBS="-ldbmalloc $LIBS"
10131
10132 fi
10133
10134 fi
10135
10136 fi
10137
10138 echo "$as_me:10138: checking if you want to use valgrind for testing" >&5
10139 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10140
10141 # Check whether --with-valgrind or --without-valgrind was given.
10142 if test "${with_valgrind+set}" = set; then
10143   withval="$with_valgrind"
10144   cat >>confdefs.h <<\EOF
10145 #define USE_VALGRIND 1
10146 EOF
10147
10148         : ${with_cflags:=-g}
10149         : ${with_no_leaks:=yes}
10150          with_valgrind=yes
10151 else
10152   with_valgrind=
10153 fi;
10154 echo "$as_me:10154: result: ${with_valgrind:-no}" >&5
10155 echo "${ECHO_T}${with_valgrind:-no}" >&6
10156
10157 case .$with_cflags in #(vi
10158 .*-g*)
10159         case .$CFLAGS in #(vi
10160         .*-g*) #(vi
10161                 ;;
10162         *)
10163
10164 cf_fix_cppflags=no
10165 cf_new_cflags=
10166 cf_new_cppflags=
10167 cf_new_extra_cppflags=
10168
10169 for cf_add_cflags in -g
10170 do
10171 case $cf_fix_cppflags in
10172 no)
10173         case $cf_add_cflags in #(vi
10174         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10175                 case $cf_add_cflags in
10176                 -D*)
10177                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10178
10179                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10180                         && test -z "${cf_tst_cflags}" \
10181                         && cf_fix_cppflags=yes
10182
10183                         if test $cf_fix_cppflags = yes ; then
10184                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10185                                 continue
10186                         elif test "${cf_tst_cflags}" = "\"'" ; then
10187                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10188                                 continue
10189                         fi
10190                         ;;
10191                 esac
10192                 case "$CPPFLAGS" in
10193                 *$cf_add_cflags) #(vi
10194                         ;;
10195                 *) #(vi
10196                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10197                         ;;
10198                 esac
10199                 ;;
10200         *)
10201                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10202                 ;;
10203         esac
10204         ;;
10205 yes)
10206         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10207
10208         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10209
10210         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10211         && test -z "${cf_tst_cflags}" \
10212         && cf_fix_cppflags=no
10213         ;;
10214 esac
10215 done
10216
10217 if test -n "$cf_new_cflags" ; then
10218
10219         CFLAGS="$CFLAGS $cf_new_cflags"
10220 fi
10221
10222 if test -n "$cf_new_cppflags" ; then
10223
10224         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10225 fi
10226
10227 if test -n "$cf_new_extra_cppflags" ; then
10228
10229         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10230 fi
10231
10232                 ;;
10233         esac
10234         ;;
10235 esac
10236
10237 echo "$as_me:10237: checking if you want to perform memory-leak testing" >&5
10238 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10239
10240 # Check whether --enable-leaks or --disable-leaks was given.
10241 if test "${enable_leaks+set}" = set; then
10242   enableval="$enable_leaks"
10243   with_no_leaks=yes
10244 else
10245   : ${with_no_leaks:=no}
10246 fi;
10247 echo "$as_me:10247: result: $with_no_leaks" >&5
10248 echo "${ECHO_T}$with_no_leaks" >&6
10249
10250 if test "$with_no_leaks" = yes ; then
10251         cat >>confdefs.h <<\EOF
10252 #define NO_LEAKS 1
10253 EOF
10254
10255 fi
10256
10257 cat >>confdefs.h <<\EOF
10258 #define HAVE_NC_ALLOC_H 1
10259 EOF
10260
10261 ###     use option --enable-expanded to generate certain macros as functions
10262
10263 # Check whether --enable-expanded or --disable-expanded was given.
10264 if test "${enable_expanded+set}" = set; then
10265   enableval="$enable_expanded"
10266   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10267 #define NCURSES_EXPANDED 1
10268 EOF
10269
10270 fi;
10271
10272 ###     use option --disable-macros to suppress macros in favor of functions
10273
10274 # Check whether --enable-macros or --disable-macros was given.
10275 if test "${enable_macros+set}" = set; then
10276   enableval="$enable_macros"
10277   test "$enableval" = no && cat >>confdefs.h <<\EOF
10278 #define NCURSES_NOMACROS 1
10279 EOF
10280
10281 fi;
10282
10283 # Normally we only add trace() to the debug-library.  Allow this to be
10284 # extended to all models of the ncurses library:
10285 cf_all_traces=no
10286 case "$CFLAGS $CPPFLAGS" in
10287 *-DTRACE*)
10288         cf_all_traces=yes
10289         ;;
10290 esac
10291
10292 echo "$as_me:10292: checking whether to add trace feature to all models" >&5
10293 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10294
10295 # Check whether --with-trace or --without-trace was given.
10296 if test "${with_trace+set}" = set; then
10297   withval="$with_trace"
10298   cf_with_trace=$withval
10299 else
10300   cf_with_trace=$cf_all_traces
10301 fi;
10302 echo "$as_me:10302: result: $cf_with_trace" >&5
10303 echo "${ECHO_T}$cf_with_trace" >&6
10304
10305 if test "$cf_with_trace" = yes ; then
10306         LIB_TRACING=all
10307         ADA_TRACE=TRUE
10308
10309 cf_fix_cppflags=no
10310 cf_new_cflags=
10311 cf_new_cppflags=
10312 cf_new_extra_cppflags=
10313
10314 for cf_add_cflags in -DTRACE
10315 do
10316 case $cf_fix_cppflags in
10317 no)
10318         case $cf_add_cflags in #(vi
10319         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10320                 case $cf_add_cflags in
10321                 -D*)
10322                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10323
10324                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10325                         && test -z "${cf_tst_cflags}" \
10326                         && cf_fix_cppflags=yes
10327
10328                         if test $cf_fix_cppflags = yes ; then
10329                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10330                                 continue
10331                         elif test "${cf_tst_cflags}" = "\"'" ; then
10332                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10333                                 continue
10334                         fi
10335                         ;;
10336                 esac
10337                 case "$CPPFLAGS" in
10338                 *$cf_add_cflags) #(vi
10339                         ;;
10340                 *) #(vi
10341                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10342                         ;;
10343                 esac
10344                 ;;
10345         *)
10346                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10347                 ;;
10348         esac
10349         ;;
10350 yes)
10351         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10352
10353         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10354
10355         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10356         && test -z "${cf_tst_cflags}" \
10357         && cf_fix_cppflags=no
10358         ;;
10359 esac
10360 done
10361
10362 if test -n "$cf_new_cflags" ; then
10363
10364         CFLAGS="$CFLAGS $cf_new_cflags"
10365 fi
10366
10367 if test -n "$cf_new_cppflags" ; then
10368
10369         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10370 fi
10371
10372 if test -n "$cf_new_extra_cppflags" ; then
10373
10374         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10375 fi
10376
10377 else
10378         LIB_TRACING=DEBUG
10379         ADA_TRACE=FALSE
10380 fi
10381
10382 ###     Checks for libraries.
10383 echo "$as_me:10383: checking for gettimeofday" >&5
10384 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10385 if test "${ac_cv_func_gettimeofday+set}" = set; then
10386   echo $ECHO_N "(cached) $ECHO_C" >&6
10387 else
10388   cat >conftest.$ac_ext <<_ACEOF
10389 #line 10389 "configure"
10390 #include "confdefs.h"
10391 /* System header to define __stub macros and hopefully few prototypes,
10392     which can conflict with char gettimeofday (); below.  */
10393 #include <assert.h>
10394 /* Override any gcc2 internal prototype to avoid an error.  */
10395 #ifdef __cplusplus
10396 extern "C"
10397 #endif
10398 /* We use char because int might match the return type of a gcc2
10399    builtin and then its argument prototype would still apply.  */
10400 char gettimeofday ();
10401 char (*f) ();
10402
10403 int
10404 main ()
10405 {
10406 /* The GNU C library defines this for functions which it implements
10407     to always fail with ENOSYS.  Some functions are actually named
10408     something starting with __ and the normal name is an alias.  */
10409 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10410 choke me
10411 #else
10412 f = gettimeofday;
10413 #endif
10414
10415   ;
10416   return 0;
10417 }
10418 _ACEOF
10419 rm -f conftest.$ac_objext conftest$ac_exeext
10420 if { (eval echo "$as_me:10420: \"$ac_link\"") >&5
10421   (eval $ac_link) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit $ac_status); } &&
10425          { ac_try='test -s conftest$ac_exeext'
10426   { (eval echo "$as_me:10426: \"$ac_try\"") >&5
10427   (eval $ac_try) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); }; }; then
10431   ac_cv_func_gettimeofday=yes
10432 else
10433   echo "$as_me: failed program was:" >&5
10434 cat conftest.$ac_ext >&5
10435 ac_cv_func_gettimeofday=no
10436 fi
10437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10438 fi
10439 echo "$as_me:10439: result: $ac_cv_func_gettimeofday" >&5
10440 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10441 if test $ac_cv_func_gettimeofday = yes; then
10442   cat >>confdefs.h <<\EOF
10443 #define HAVE_GETTIMEOFDAY 1
10444 EOF
10445
10446 else
10447
10448 echo "$as_me:10448: checking for gettimeofday in -lbsd" >&5
10449 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10450 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10451   echo $ECHO_N "(cached) $ECHO_C" >&6
10452 else
10453   ac_check_lib_save_LIBS=$LIBS
10454 LIBS="-lbsd  $LIBS"
10455 cat >conftest.$ac_ext <<_ACEOF
10456 #line 10456 "configure"
10457 #include "confdefs.h"
10458
10459 /* Override any gcc2 internal prototype to avoid an error.  */
10460 #ifdef __cplusplus
10461 extern "C"
10462 #endif
10463 /* We use char because int might match the return type of a gcc2
10464    builtin and then its argument prototype would still apply.  */
10465 char gettimeofday ();
10466 int
10467 main ()
10468 {
10469 gettimeofday ();
10470   ;
10471   return 0;
10472 }
10473 _ACEOF
10474 rm -f conftest.$ac_objext conftest$ac_exeext
10475 if { (eval echo "$as_me:10475: \"$ac_link\"") >&5
10476   (eval $ac_link) 2>&5
10477   ac_status=$?
10478   echo "$as_me:10478: \$? = $ac_status" >&5
10479   (exit $ac_status); } &&
10480          { ac_try='test -s conftest$ac_exeext'
10481   { (eval echo "$as_me:10481: \"$ac_try\"") >&5
10482   (eval $ac_try) 2>&5
10483   ac_status=$?
10484   echo "$as_me:10484: \$? = $ac_status" >&5
10485   (exit $ac_status); }; }; then
10486   ac_cv_lib_bsd_gettimeofday=yes
10487 else
10488   echo "$as_me: failed program was:" >&5
10489 cat conftest.$ac_ext >&5
10490 ac_cv_lib_bsd_gettimeofday=no
10491 fi
10492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10493 LIBS=$ac_check_lib_save_LIBS
10494 fi
10495 echo "$as_me:10495: result: $ac_cv_lib_bsd_gettimeofday" >&5
10496 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10497 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10498   cat >>confdefs.h <<\EOF
10499 #define HAVE_GETTIMEOFDAY 1
10500 EOF
10501
10502         LIBS="$LIBS -lbsd"
10503 fi
10504
10505 fi
10506
10507 echo "$as_me:10507: checking if -lm needed for math functions" >&5
10508 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10509 if test "${cf_cv_need_libm+set}" = set; then
10510   echo $ECHO_N "(cached) $ECHO_C" >&6
10511 else
10512
10513         cat >conftest.$ac_ext <<_ACEOF
10514 #line 10514 "configure"
10515 #include "confdefs.h"
10516
10517         #include <stdio.h>
10518         #include <math.h>
10519
10520 int
10521 main ()
10522 {
10523 double x = rand(); printf("result = %g\n", sin(x))
10524   ;
10525   return 0;
10526 }
10527 _ACEOF
10528 rm -f conftest.$ac_objext conftest$ac_exeext
10529 if { (eval echo "$as_me:10529: \"$ac_link\"") >&5
10530   (eval $ac_link) 2>&5
10531   ac_status=$?
10532   echo "$as_me:10532: \$? = $ac_status" >&5
10533   (exit $ac_status); } &&
10534          { ac_try='test -s conftest$ac_exeext'
10535   { (eval echo "$as_me:10535: \"$ac_try\"") >&5
10536   (eval $ac_try) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); }; }; then
10540   cf_cv_need_libm=no
10541 else
10542   echo "$as_me: failed program was:" >&5
10543 cat conftest.$ac_ext >&5
10544 cf_cv_need_libm=yes
10545 fi
10546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10547 fi
10548 echo "$as_me:10548: result: $cf_cv_need_libm" >&5
10549 echo "${ECHO_T}$cf_cv_need_libm" >&6
10550 if test "$cf_cv_need_libm" = yes
10551 then
10552 MATH_LIB=-lm
10553 fi
10554
10555 ###     Checks for header files.
10556 echo "$as_me:10556: checking for ANSI C header files" >&5
10557 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10558 if test "${ac_cv_header_stdc+set}" = set; then
10559   echo $ECHO_N "(cached) $ECHO_C" >&6
10560 else
10561   cat >conftest.$ac_ext <<_ACEOF
10562 #line 10562 "configure"
10563 #include "confdefs.h"
10564 #include <stdlib.h>
10565 #include <stdarg.h>
10566 #include <string.h>
10567 #include <float.h>
10568
10569 _ACEOF
10570 if { (eval echo "$as_me:10570: \"$ac_cpp conftest.$ac_ext\"") >&5
10571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10572   ac_status=$?
10573   egrep -v '^ *\+' conftest.er1 >conftest.err
10574   rm -f conftest.er1
10575   cat conftest.err >&5
10576   echo "$as_me:10576: \$? = $ac_status" >&5
10577   (exit $ac_status); } >/dev/null; then
10578   if test -s conftest.err; then
10579     ac_cpp_err=$ac_c_preproc_warn_flag
10580   else
10581     ac_cpp_err=
10582   fi
10583 else
10584   ac_cpp_err=yes
10585 fi
10586 if test -z "$ac_cpp_err"; then
10587   ac_cv_header_stdc=yes
10588 else
10589   echo "$as_me: failed program was:" >&5
10590   cat conftest.$ac_ext >&5
10591   ac_cv_header_stdc=no
10592 fi
10593 rm -f conftest.err conftest.$ac_ext
10594
10595 if test $ac_cv_header_stdc = yes; then
10596   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10597   cat >conftest.$ac_ext <<_ACEOF
10598 #line 10598 "configure"
10599 #include "confdefs.h"
10600 #include <string.h>
10601
10602 _ACEOF
10603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10604   egrep "memchr" >/dev/null 2>&1; then
10605   :
10606 else
10607   ac_cv_header_stdc=no
10608 fi
10609 rm -f conftest*
10610
10611 fi
10612
10613 if test $ac_cv_header_stdc = yes; then
10614   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10615   cat >conftest.$ac_ext <<_ACEOF
10616 #line 10616 "configure"
10617 #include "confdefs.h"
10618 #include <stdlib.h>
10619
10620 _ACEOF
10621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10622   egrep "free" >/dev/null 2>&1; then
10623   :
10624 else
10625   ac_cv_header_stdc=no
10626 fi
10627 rm -f conftest*
10628
10629 fi
10630
10631 if test $ac_cv_header_stdc = yes; then
10632   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10633   if test "$cross_compiling" = yes; then
10634   :
10635 else
10636   cat >conftest.$ac_ext <<_ACEOF
10637 #line 10637 "configure"
10638 #include "confdefs.h"
10639 #include <ctype.h>
10640 #if ((' ' & 0x0FF) == 0x020)
10641 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10642 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10643 #else
10644 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10645                      || ('j' <= (c) && (c) <= 'r') \
10646                      || ('s' <= (c) && (c) <= 'z'))
10647 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10648 #endif
10649
10650 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10651 int
10652 main ()
10653 {
10654   int i;
10655   for (i = 0; i < 256; i++)
10656     if (XOR (islower (i), ISLOWER (i))
10657         || toupper (i) != TOUPPER (i))
10658       $ac_main_return(2);
10659   $ac_main_return (0);
10660 }
10661 _ACEOF
10662 rm -f conftest$ac_exeext
10663 if { (eval echo "$as_me:10663: \"$ac_link\"") >&5
10664   (eval $ac_link) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10668   { (eval echo "$as_me:10668: \"$ac_try\"") >&5
10669   (eval $ac_try) 2>&5
10670   ac_status=$?
10671   echo "$as_me:10671: \$? = $ac_status" >&5
10672   (exit $ac_status); }; }; then
10673   :
10674 else
10675   echo "$as_me: program exited with status $ac_status" >&5
10676 echo "$as_me: failed program was:" >&5
10677 cat conftest.$ac_ext >&5
10678 ac_cv_header_stdc=no
10679 fi
10680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10681 fi
10682 fi
10683 fi
10684 echo "$as_me:10684: result: $ac_cv_header_stdc" >&5
10685 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10686 if test $ac_cv_header_stdc = yes; then
10687
10688 cat >>confdefs.h <<\EOF
10689 #define STDC_HEADERS 1
10690 EOF
10691
10692 fi
10693
10694 ac_header_dirent=no
10695 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10696   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10697 echo "$as_me:10697: checking for $ac_hdr that defines DIR" >&5
10698 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10699 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10700   echo $ECHO_N "(cached) $ECHO_C" >&6
10701 else
10702   cat >conftest.$ac_ext <<_ACEOF
10703 #line 10703 "configure"
10704 #include "confdefs.h"
10705 #include <sys/types.h>
10706 #include <$ac_hdr>
10707
10708 int
10709 main ()
10710 {
10711 if ((DIR *) 0)
10712 return 0;
10713   ;
10714   return 0;
10715 }
10716 _ACEOF
10717 rm -f conftest.$ac_objext
10718 if { (eval echo "$as_me:10718: \"$ac_compile\"") >&5
10719   (eval $ac_compile) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit $ac_status); } &&
10723          { ac_try='test -s conftest.$ac_objext'
10724   { (eval echo "$as_me:10724: \"$ac_try\"") >&5
10725   (eval $ac_try) 2>&5
10726   ac_status=$?
10727   echo "$as_me:10727: \$? = $ac_status" >&5
10728   (exit $ac_status); }; }; then
10729   eval "$as_ac_Header=yes"
10730 else
10731   echo "$as_me: failed program was:" >&5
10732 cat conftest.$ac_ext >&5
10733 eval "$as_ac_Header=no"
10734 fi
10735 rm -f conftest.$ac_objext conftest.$ac_ext
10736 fi
10737 echo "$as_me:10737: result: `eval echo '${'$as_ac_Header'}'`" >&5
10738 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10739 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10740   cat >>confdefs.h <<EOF
10741 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10742 EOF
10743
10744 ac_header_dirent=$ac_hdr; break
10745 fi
10746
10747 done
10748 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10749 if test $ac_header_dirent = dirent.h; then
10750   echo "$as_me:10750: checking for opendir in -ldir" >&5
10751 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10752 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10753   echo $ECHO_N "(cached) $ECHO_C" >&6
10754 else
10755   ac_check_lib_save_LIBS=$LIBS
10756 LIBS="-ldir  $LIBS"
10757 cat >conftest.$ac_ext <<_ACEOF
10758 #line 10758 "configure"
10759 #include "confdefs.h"
10760
10761 /* Override any gcc2 internal prototype to avoid an error.  */
10762 #ifdef __cplusplus
10763 extern "C"
10764 #endif
10765 /* We use char because int might match the return type of a gcc2
10766    builtin and then its argument prototype would still apply.  */
10767 char opendir ();
10768 int
10769 main ()
10770 {
10771 opendir ();
10772   ;
10773   return 0;
10774 }
10775 _ACEOF
10776 rm -f conftest.$ac_objext conftest$ac_exeext
10777 if { (eval echo "$as_me:10777: \"$ac_link\"") >&5
10778   (eval $ac_link) 2>&5
10779   ac_status=$?
10780   echo "$as_me:10780: \$? = $ac_status" >&5
10781   (exit $ac_status); } &&
10782          { ac_try='test -s conftest$ac_exeext'
10783   { (eval echo "$as_me:10783: \"$ac_try\"") >&5
10784   (eval $ac_try) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit $ac_status); }; }; then
10788   ac_cv_lib_dir_opendir=yes
10789 else
10790   echo "$as_me: failed program was:" >&5
10791 cat conftest.$ac_ext >&5
10792 ac_cv_lib_dir_opendir=no
10793 fi
10794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10795 LIBS=$ac_check_lib_save_LIBS
10796 fi
10797 echo "$as_me:10797: result: $ac_cv_lib_dir_opendir" >&5
10798 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10799 if test $ac_cv_lib_dir_opendir = yes; then
10800   LIBS="$LIBS -ldir"
10801 fi
10802
10803 else
10804   echo "$as_me:10804: checking for opendir in -lx" >&5
10805 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10806 if test "${ac_cv_lib_x_opendir+set}" = set; then
10807   echo $ECHO_N "(cached) $ECHO_C" >&6
10808 else
10809   ac_check_lib_save_LIBS=$LIBS
10810 LIBS="-lx  $LIBS"
10811 cat >conftest.$ac_ext <<_ACEOF
10812 #line 10812 "configure"
10813 #include "confdefs.h"
10814
10815 /* Override any gcc2 internal prototype to avoid an error.  */
10816 #ifdef __cplusplus
10817 extern "C"
10818 #endif
10819 /* We use char because int might match the return type of a gcc2
10820    builtin and then its argument prototype would still apply.  */
10821 char opendir ();
10822 int
10823 main ()
10824 {
10825 opendir ();
10826   ;
10827   return 0;
10828 }
10829 _ACEOF
10830 rm -f conftest.$ac_objext conftest$ac_exeext
10831 if { (eval echo "$as_me:10831: \"$ac_link\"") >&5
10832   (eval $ac_link) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit $ac_status); } &&
10836          { ac_try='test -s conftest$ac_exeext'
10837   { (eval echo "$as_me:10837: \"$ac_try\"") >&5
10838   (eval $ac_try) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); }; }; then
10842   ac_cv_lib_x_opendir=yes
10843 else
10844   echo "$as_me: failed program was:" >&5
10845 cat conftest.$ac_ext >&5
10846 ac_cv_lib_x_opendir=no
10847 fi
10848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10849 LIBS=$ac_check_lib_save_LIBS
10850 fi
10851 echo "$as_me:10851: result: $ac_cv_lib_x_opendir" >&5
10852 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10853 if test $ac_cv_lib_x_opendir = yes; then
10854   LIBS="$LIBS -lx"
10855 fi
10856
10857 fi
10858
10859 echo "$as_me:10859: checking whether time.h and sys/time.h may both be included" >&5
10860 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10861 if test "${ac_cv_header_time+set}" = set; then
10862   echo $ECHO_N "(cached) $ECHO_C" >&6
10863 else
10864   cat >conftest.$ac_ext <<_ACEOF
10865 #line 10865 "configure"
10866 #include "confdefs.h"
10867 #include <sys/types.h>
10868 #include <sys/time.h>
10869 #include <time.h>
10870
10871 int
10872 main ()
10873 {
10874 if ((struct tm *) 0)
10875 return 0;
10876   ;
10877   return 0;
10878 }
10879 _ACEOF
10880 rm -f conftest.$ac_objext
10881 if { (eval echo "$as_me:10881: \"$ac_compile\"") >&5
10882   (eval $ac_compile) 2>&5
10883   ac_status=$?
10884   echo "$as_me:10884: \$? = $ac_status" >&5
10885   (exit $ac_status); } &&
10886          { ac_try='test -s conftest.$ac_objext'
10887   { (eval echo "$as_me:10887: \"$ac_try\"") >&5
10888   (eval $ac_try) 2>&5
10889   ac_status=$?
10890   echo "$as_me:10890: \$? = $ac_status" >&5
10891   (exit $ac_status); }; }; then
10892   ac_cv_header_time=yes
10893 else
10894   echo "$as_me: failed program was:" >&5
10895 cat conftest.$ac_ext >&5
10896 ac_cv_header_time=no
10897 fi
10898 rm -f conftest.$ac_objext conftest.$ac_ext
10899 fi
10900 echo "$as_me:10900: result: $ac_cv_header_time" >&5
10901 echo "${ECHO_T}$ac_cv_header_time" >&6
10902 if test $ac_cv_header_time = yes; then
10903
10904 cat >>confdefs.h <<\EOF
10905 #define TIME_WITH_SYS_TIME 1
10906 EOF
10907
10908 fi
10909
10910 echo "$as_me:10910: checking for regular-expression headers" >&5
10911 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10912 if test "${cf_cv_regex+set}" = set; then
10913   echo $ECHO_N "(cached) $ECHO_C" >&6
10914 else
10915
10916 cat >conftest.$ac_ext <<_ACEOF
10917 #line 10917 "configure"
10918 #include "confdefs.h"
10919 #include <sys/types.h>
10920 #include <regex.h>
10921 int
10922 main ()
10923 {
10924
10925         regex_t *p;
10926         int x = regcomp(p, "", 0);
10927         int y = regexec(p, "", 0, 0, 0);
10928         regfree(p);
10929
10930   ;
10931   return 0;
10932 }
10933 _ACEOF
10934 rm -f conftest.$ac_objext conftest$ac_exeext
10935 if { (eval echo "$as_me:10935: \"$ac_link\"") >&5
10936   (eval $ac_link) 2>&5
10937   ac_status=$?
10938   echo "$as_me:10938: \$? = $ac_status" >&5
10939   (exit $ac_status); } &&
10940          { ac_try='test -s conftest$ac_exeext'
10941   { (eval echo "$as_me:10941: \"$ac_try\"") >&5
10942   (eval $ac_try) 2>&5
10943   ac_status=$?
10944   echo "$as_me:10944: \$? = $ac_status" >&5
10945   (exit $ac_status); }; }; then
10946   cf_cv_regex="regex.h"
10947 else
10948   echo "$as_me: failed program was:" >&5
10949 cat conftest.$ac_ext >&5
10950
10951         cat >conftest.$ac_ext <<_ACEOF
10952 #line 10952 "configure"
10953 #include "confdefs.h"
10954 #include <regexp.h>
10955 int
10956 main ()
10957 {
10958
10959                 char *p = compile("", "", "", 0);
10960                 int x = step("", "");
10961
10962   ;
10963   return 0;
10964 }
10965 _ACEOF
10966 rm -f conftest.$ac_objext conftest$ac_exeext
10967 if { (eval echo "$as_me:10967: \"$ac_link\"") >&5
10968   (eval $ac_link) 2>&5
10969   ac_status=$?
10970   echo "$as_me:10970: \$? = $ac_status" >&5
10971   (exit $ac_status); } &&
10972          { ac_try='test -s conftest$ac_exeext'
10973   { (eval echo "$as_me:10973: \"$ac_try\"") >&5
10974   (eval $ac_try) 2>&5
10975   ac_status=$?
10976   echo "$as_me:10976: \$? = $ac_status" >&5
10977   (exit $ac_status); }; }; then
10978   cf_cv_regex="regexp.h"
10979 else
10980   echo "$as_me: failed program was:" >&5
10981 cat conftest.$ac_ext >&5
10982
10983                 cf_save_LIBS="$LIBS"
10984                 LIBS="-lgen $LIBS"
10985                 cat >conftest.$ac_ext <<_ACEOF
10986 #line 10986 "configure"
10987 #include "confdefs.h"
10988 #include <regexpr.h>
10989 int
10990 main ()
10991 {
10992
10993                         char *p = compile("", "", "");
10994                         int x = step("", "");
10995
10996   ;
10997   return 0;
10998 }
10999 _ACEOF
11000 rm -f conftest.$ac_objext conftest$ac_exeext
11001 if { (eval echo "$as_me:11001: \"$ac_link\"") >&5
11002   (eval $ac_link) 2>&5
11003   ac_status=$?
11004   echo "$as_me:11004: \$? = $ac_status" >&5
11005   (exit $ac_status); } &&
11006          { ac_try='test -s conftest$ac_exeext'
11007   { (eval echo "$as_me:11007: \"$ac_try\"") >&5
11008   (eval $ac_try) 2>&5
11009   ac_status=$?
11010   echo "$as_me:11010: \$? = $ac_status" >&5
11011   (exit $ac_status); }; }; then
11012   cf_cv_regex="regexpr.h"
11013 else
11014   echo "$as_me: failed program was:" >&5
11015 cat conftest.$ac_ext >&5
11016 LIBS="$cf_save_LIBS"
11017 fi
11018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11019 fi
11020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11021 fi
11022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11023
11024 fi
11025
11026 echo "$as_me:11026: result: $cf_cv_regex" >&5
11027 echo "${ECHO_T}$cf_cv_regex" >&6
11028 case $cf_cv_regex in
11029         regex.h)   cat >>confdefs.h <<\EOF
11030 #define HAVE_REGEX_H_FUNCS 1
11031 EOF
11032  ;;
11033         regexp.h)  cat >>confdefs.h <<\EOF
11034 #define HAVE_REGEXP_H_FUNCS 1
11035 EOF
11036  ;;
11037         regexpr.h) cat >>confdefs.h <<\EOF
11038 #define HAVE_REGEXPR_H_FUNCS 1
11039 EOF
11040  ;;
11041 esac
11042
11043 for ac_header in \
11044 fcntl.h \
11045 getopt.h \
11046 limits.h \
11047 locale.h \
11048 poll.h \
11049 sys/bsdtypes.h \
11050 sys/ioctl.h \
11051 sys/param.h \
11052 sys/poll.h \
11053 sys/select.h \
11054 sys/time.h \
11055 sys/times.h \
11056 ttyent.h \
11057 unistd.h \
11058 wctype.h \
11059
11060 do
11061 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11062 echo "$as_me:11062: checking for $ac_header" >&5
11063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11065   echo $ECHO_N "(cached) $ECHO_C" >&6
11066 else
11067   cat >conftest.$ac_ext <<_ACEOF
11068 #line 11068 "configure"
11069 #include "confdefs.h"
11070 #include <$ac_header>
11071 _ACEOF
11072 if { (eval echo "$as_me:11072: \"$ac_cpp conftest.$ac_ext\"") >&5
11073   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11074   ac_status=$?
11075   egrep -v '^ *\+' conftest.er1 >conftest.err
11076   rm -f conftest.er1
11077   cat conftest.err >&5
11078   echo "$as_me:11078: \$? = $ac_status" >&5
11079   (exit $ac_status); } >/dev/null; then
11080   if test -s conftest.err; then
11081     ac_cpp_err=$ac_c_preproc_warn_flag
11082   else
11083     ac_cpp_err=
11084   fi
11085 else
11086   ac_cpp_err=yes
11087 fi
11088 if test -z "$ac_cpp_err"; then
11089   eval "$as_ac_Header=yes"
11090 else
11091   echo "$as_me: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   eval "$as_ac_Header=no"
11094 fi
11095 rm -f conftest.err conftest.$ac_ext
11096 fi
11097 echo "$as_me:11097: result: `eval echo '${'$as_ac_Header'}'`" >&5
11098 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11099 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11100   cat >>confdefs.h <<EOF
11101 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11102 EOF
11103
11104 fi
11105 done
11106
11107 # check for ISC (this may also define _POSIX_SOURCE)
11108 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11109 if test "$ISC" = yes ; then
11110
11111 echo "$as_me:11111: checking for main in -lcposix" >&5
11112 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11113 if test "${ac_cv_lib_cposix_main+set}" = set; then
11114   echo $ECHO_N "(cached) $ECHO_C" >&6
11115 else
11116   ac_check_lib_save_LIBS=$LIBS
11117 LIBS="-lcposix  $LIBS"
11118 cat >conftest.$ac_ext <<_ACEOF
11119 #line 11119 "configure"
11120 #include "confdefs.h"
11121
11122 int
11123 main ()
11124 {
11125 main ();
11126   ;
11127   return 0;
11128 }
11129 _ACEOF
11130 rm -f conftest.$ac_objext conftest$ac_exeext
11131 if { (eval echo "$as_me:11131: \"$ac_link\"") >&5
11132   (eval $ac_link) 2>&5
11133   ac_status=$?
11134   echo "$as_me:11134: \$? = $ac_status" >&5
11135   (exit $ac_status); } &&
11136          { ac_try='test -s conftest$ac_exeext'
11137   { (eval echo "$as_me:11137: \"$ac_try\"") >&5
11138   (eval $ac_try) 2>&5
11139   ac_status=$?
11140   echo "$as_me:11140: \$? = $ac_status" >&5
11141   (exit $ac_status); }; }; then
11142   ac_cv_lib_cposix_main=yes
11143 else
11144   echo "$as_me: failed program was:" >&5
11145 cat conftest.$ac_ext >&5
11146 ac_cv_lib_cposix_main=no
11147 fi
11148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11149 LIBS=$ac_check_lib_save_LIBS
11150 fi
11151 echo "$as_me:11151: result: $ac_cv_lib_cposix_main" >&5
11152 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11153 if test $ac_cv_lib_cposix_main = yes; then
11154   cat >>confdefs.h <<EOF
11155 #define HAVE_LIBCPOSIX 1
11156 EOF
11157
11158   LIBS="-lcposix $LIBS"
11159
11160 fi
11161
11162         echo "$as_me:11162: checking for bzero in -linet" >&5
11163 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11164 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11165   echo $ECHO_N "(cached) $ECHO_C" >&6
11166 else
11167   ac_check_lib_save_LIBS=$LIBS
11168 LIBS="-linet  $LIBS"
11169 cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11172
11173 /* Override any gcc2 internal prototype to avoid an error.  */
11174 #ifdef __cplusplus
11175 extern "C"
11176 #endif
11177 /* We use char because int might match the return type of a gcc2
11178    builtin and then its argument prototype would still apply.  */
11179 char bzero ();
11180 int
11181 main ()
11182 {
11183 bzero ();
11184   ;
11185   return 0;
11186 }
11187 _ACEOF
11188 rm -f conftest.$ac_objext conftest$ac_exeext
11189 if { (eval echo "$as_me:11189: \"$ac_link\"") >&5
11190   (eval $ac_link) 2>&5
11191   ac_status=$?
11192   echo "$as_me:11192: \$? = $ac_status" >&5
11193   (exit $ac_status); } &&
11194          { ac_try='test -s conftest$ac_exeext'
11195   { (eval echo "$as_me:11195: \"$ac_try\"") >&5
11196   (eval $ac_try) 2>&5
11197   ac_status=$?
11198   echo "$as_me:11198: \$? = $ac_status" >&5
11199   (exit $ac_status); }; }; then
11200   ac_cv_lib_inet_bzero=yes
11201 else
11202   echo "$as_me: failed program was:" >&5
11203 cat conftest.$ac_ext >&5
11204 ac_cv_lib_inet_bzero=no
11205 fi
11206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11207 LIBS=$ac_check_lib_save_LIBS
11208 fi
11209 echo "$as_me:11209: result: $ac_cv_lib_inet_bzero" >&5
11210 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11211 if test $ac_cv_lib_inet_bzero = yes; then
11212   LIBS="$LIBS -linet"
11213 fi
11214 fi
11215
11216 echo "$as_me:11216: checking if sys/time.h works with sys/select.h" >&5
11217 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11218 if test "${cf_cv_sys_time_select+set}" = set; then
11219   echo $ECHO_N "(cached) $ECHO_C" >&6
11220 else
11221
11222 cat >conftest.$ac_ext <<_ACEOF
11223 #line 11223 "configure"
11224 #include "confdefs.h"
11225
11226 #include <sys/types.h>
11227 #ifdef HAVE_SYS_TIME_H
11228 #include <sys/time.h>
11229 #endif
11230 #ifdef HAVE_SYS_SELECT_H
11231 #include <sys/select.h>
11232 #endif
11233
11234 int
11235 main ()
11236 {
11237
11238   ;
11239   return 0;
11240 }
11241 _ACEOF
11242 rm -f conftest.$ac_objext
11243 if { (eval echo "$as_me:11243: \"$ac_compile\"") >&5
11244   (eval $ac_compile) 2>&5
11245   ac_status=$?
11246   echo "$as_me:11246: \$? = $ac_status" >&5
11247   (exit $ac_status); } &&
11248          { ac_try='test -s conftest.$ac_objext'
11249   { (eval echo "$as_me:11249: \"$ac_try\"") >&5
11250   (eval $ac_try) 2>&5
11251   ac_status=$?
11252   echo "$as_me:11252: \$? = $ac_status" >&5
11253   (exit $ac_status); }; }; then
11254   cf_cv_sys_time_select=yes
11255 else
11256   echo "$as_me: failed program was:" >&5
11257 cat conftest.$ac_ext >&5
11258 cf_cv_sys_time_select=no
11259 fi
11260 rm -f conftest.$ac_objext conftest.$ac_ext
11261
11262 fi
11263
11264 echo "$as_me:11264: result: $cf_cv_sys_time_select" >&5
11265 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11266 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11267 #define HAVE_SYS_TIME_SELECT 1
11268 EOF
11269
11270 ###     checks for compiler characteristics
11271 ac_ext=c
11272 ac_cpp='$CPP $CPPFLAGS'
11273 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11274 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11275 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11276 ac_main_return=return
11277
11278 echo "$as_me:11278: checking for $CC option to accept ANSI C" >&5
11279 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11280 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11281   echo $ECHO_N "(cached) $ECHO_C" >&6
11282 else
11283   ac_cv_prog_cc_stdc=no
11284 ac_save_CC=$CC
11285 cat >conftest.$ac_ext <<_ACEOF
11286 #line 11286 "configure"
11287 #include "confdefs.h"
11288 #include <stdarg.h>
11289 #include <stdio.h>
11290 #include <sys/types.h>
11291 #include <sys/stat.h>
11292 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11293 struct buf { int x; };
11294 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11295 static char *e (p, i)
11296      char **p;
11297      int i;
11298 {
11299   return p[i];
11300 }
11301 static char *f (char * (*g) (char **, int), char **p, ...)
11302 {
11303   char *s;
11304   va_list v;
11305   va_start (v,p);
11306   s = g (p, va_arg (v,int));
11307   va_end (v);
11308   return s;
11309 }
11310 int test (int i, double x);
11311 struct s1 {int (*f) (int a);};
11312 struct s2 {int (*f) (double a);};
11313 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11314 int argc;
11315 char **argv;
11316 int
11317 main ()
11318 {
11319 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 # Don't try gcc -ansi; that turns off useful extensions and
11325 # breaks some systems' header files.
11326 # AIX                   -qlanglvl=ansi
11327 # Ultrix and OSF/1      -std1
11328 # HP-UX 10.20 and later -Ae
11329 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11330 # SVR4                  -Xc -D__EXTENSIONS__
11331 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11332 do
11333   CC="$ac_save_CC $ac_arg"
11334   rm -f conftest.$ac_objext
11335 if { (eval echo "$as_me:11335: \"$ac_compile\"") >&5
11336   (eval $ac_compile) 2>&5
11337   ac_status=$?
11338   echo "$as_me:11338: \$? = $ac_status" >&5
11339   (exit $ac_status); } &&
11340          { ac_try='test -s conftest.$ac_objext'
11341   { (eval echo "$as_me:11341: \"$ac_try\"") >&5
11342   (eval $ac_try) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit $ac_status); }; }; then
11346   ac_cv_prog_cc_stdc=$ac_arg
11347 break
11348 else
11349   echo "$as_me: failed program was:" >&5
11350 cat conftest.$ac_ext >&5
11351 fi
11352 rm -f conftest.$ac_objext
11353 done
11354 rm -f conftest.$ac_ext conftest.$ac_objext
11355 CC=$ac_save_CC
11356
11357 fi
11358
11359 case "x$ac_cv_prog_cc_stdc" in
11360   x|xno)
11361     echo "$as_me:11361: result: none needed" >&5
11362 echo "${ECHO_T}none needed" >&6 ;;
11363   *)
11364     echo "$as_me:11364: result: $ac_cv_prog_cc_stdc" >&5
11365 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11366     CC="$CC $ac_cv_prog_cc_stdc" ;;
11367 esac
11368
11369 echo "$as_me:11369: checking for an ANSI C-conforming const" >&5
11370 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11371 if test "${ac_cv_c_const+set}" = set; then
11372   echo $ECHO_N "(cached) $ECHO_C" >&6
11373 else
11374   cat >conftest.$ac_ext <<_ACEOF
11375 #line 11375 "configure"
11376 #include "confdefs.h"
11377
11378 int
11379 main ()
11380 {
11381 /* FIXME: Include the comments suggested by Paul. */
11382 #ifndef __cplusplus
11383   /* Ultrix mips cc rejects this.  */
11384   typedef int charset[2];
11385   const charset x;
11386   /* SunOS 4.1.1 cc rejects this.  */
11387   char const *const *ccp;
11388   char **p;
11389   /* NEC SVR4.0.2 mips cc rejects this.  */
11390   struct point {int x, y;};
11391   static struct point const zero = {0,0};
11392   /* AIX XL C 1.02.0.0 rejects this.
11393      It does not let you subtract one const X* pointer from another in
11394      an arm of an if-expression whose if-part is not a constant
11395      expression */
11396   const char *g = "string";
11397   ccp = &g + (g ? g-g : 0);
11398   /* HPUX 7.0 cc rejects these. */
11399   ++ccp;
11400   p = (char**) ccp;
11401   ccp = (char const *const *) p;
11402   { /* SCO 3.2v4 cc rejects this.  */
11403     char *t;
11404     char const *s = 0 ? (char *) 0 : (char const *) 0;
11405
11406     *t++ = 0;
11407   }
11408   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11409     int x[] = {25, 17};
11410     const int *foo = &x[0];
11411     ++foo;
11412   }
11413   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11414     typedef const int *iptr;
11415     iptr p = 0;
11416     ++p;
11417   }
11418   { /* AIX XL C 1.02.0.0 rejects this saying
11419        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11420     struct s { int j; const int *ap[3]; };
11421     struct s *b; b->j = 5;
11422   }
11423   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11424     const int foo = 10;
11425   }
11426 #endif
11427
11428   ;
11429   return 0;
11430 }
11431 _ACEOF
11432 rm -f conftest.$ac_objext
11433 if { (eval echo "$as_me:11433: \"$ac_compile\"") >&5
11434   (eval $ac_compile) 2>&5
11435   ac_status=$?
11436   echo "$as_me:11436: \$? = $ac_status" >&5
11437   (exit $ac_status); } &&
11438          { ac_try='test -s conftest.$ac_objext'
11439   { (eval echo "$as_me:11439: \"$ac_try\"") >&5
11440   (eval $ac_try) 2>&5
11441   ac_status=$?
11442   echo "$as_me:11442: \$? = $ac_status" >&5
11443   (exit $ac_status); }; }; then
11444   ac_cv_c_const=yes
11445 else
11446   echo "$as_me: failed program was:" >&5
11447 cat conftest.$ac_ext >&5
11448 ac_cv_c_const=no
11449 fi
11450 rm -f conftest.$ac_objext conftest.$ac_ext
11451 fi
11452 echo "$as_me:11452: result: $ac_cv_c_const" >&5
11453 echo "${ECHO_T}$ac_cv_c_const" >&6
11454 if test $ac_cv_c_const = no; then
11455
11456 cat >>confdefs.h <<\EOF
11457 #define const
11458 EOF
11459
11460 fi
11461
11462 echo "$as_me:11462: checking for inline" >&5
11463 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11464 if test "${ac_cv_c_inline+set}" = set; then
11465   echo $ECHO_N "(cached) $ECHO_C" >&6
11466 else
11467   ac_cv_c_inline=no
11468 for ac_kw in inline __inline__ __inline; do
11469   cat >conftest.$ac_ext <<_ACEOF
11470 #line 11470 "configure"
11471 #include "confdefs.h"
11472 #ifndef __cplusplus
11473 static $ac_kw int static_foo () {return 0; }
11474 $ac_kw int foo () {return 0; }
11475 #endif
11476
11477 _ACEOF
11478 rm -f conftest.$ac_objext
11479 if { (eval echo "$as_me:11479: \"$ac_compile\"") >&5
11480   (eval $ac_compile) 2>&5
11481   ac_status=$?
11482   echo "$as_me:11482: \$? = $ac_status" >&5
11483   (exit $ac_status); } &&
11484          { ac_try='test -s conftest.$ac_objext'
11485   { (eval echo "$as_me:11485: \"$ac_try\"") >&5
11486   (eval $ac_try) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); }; }; then
11490   ac_cv_c_inline=$ac_kw; break
11491 else
11492   echo "$as_me: failed program was:" >&5
11493 cat conftest.$ac_ext >&5
11494 fi
11495 rm -f conftest.$ac_objext conftest.$ac_ext
11496 done
11497
11498 fi
11499 echo "$as_me:11499: result: $ac_cv_c_inline" >&5
11500 echo "${ECHO_T}$ac_cv_c_inline" >&6
11501 case $ac_cv_c_inline in
11502   inline | yes) ;;
11503   no)
11504 cat >>confdefs.h <<\EOF
11505 #define inline
11506 EOF
11507  ;;
11508   *)  cat >>confdefs.h <<EOF
11509 #define inline $ac_cv_c_inline
11510 EOF
11511  ;;
11512 esac
11513
11514 NCURSES_INLINE=
11515 if test "$ac_cv_c_inline" != no ; then
11516   NCURSES_INLINE=inline
11517   if test "$INTEL_COMPILER" = yes
11518   then
11519     :
11520   elif test "$GCC" = yes
11521   then
11522     echo "$as_me:11522: checking if gcc supports options to tune inlining" >&5
11523 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11524 if test "${cf_cv_gcc_inline+set}" = set; then
11525   echo $ECHO_N "(cached) $ECHO_C" >&6
11526 else
11527
11528       cf_save_CFLAGS=$CFLAGS
11529       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11530       cat >conftest.$ac_ext <<_ACEOF
11531 #line 11531 "configure"
11532 #include "confdefs.h"
11533 inline int foo(void) { return 1; }
11534 int
11535 main ()
11536 {
11537 ${cf_cv_main_return:-return} foo()
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 rm -f conftest.$ac_objext
11543 if { (eval echo "$as_me:11543: \"$ac_compile\"") >&5
11544   (eval $ac_compile) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit $ac_status); } &&
11548          { ac_try='test -s conftest.$ac_objext'
11549   { (eval echo "$as_me:11549: \"$ac_try\"") >&5
11550   (eval $ac_try) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit $ac_status); }; }; then
11554   cf_cv_gcc_inline=yes
11555 else
11556   echo "$as_me: failed program was:" >&5
11557 cat conftest.$ac_ext >&5
11558 cf_cv_gcc_inline=no
11559 fi
11560 rm -f conftest.$ac_objext conftest.$ac_ext
11561       CFLAGS=$cf_save_CFLAGS
11562
11563 fi
11564 echo "$as_me:11564: result: $cf_cv_gcc_inline" >&5
11565 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11566     if test "$cf_cv_gcc_inline" = yes ; then
11567
11568 cf_fix_cppflags=no
11569 cf_new_cflags=
11570 cf_new_cppflags=
11571 cf_new_extra_cppflags=
11572
11573 for cf_add_cflags in --param max-inline-insns-single=1200
11574 do
11575 case $cf_fix_cppflags in
11576 no)
11577         case $cf_add_cflags in #(vi
11578         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11579                 case $cf_add_cflags in
11580                 -D*)
11581                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11582
11583                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11584                         && test -z "${cf_tst_cflags}" \
11585                         && cf_fix_cppflags=yes
11586
11587                         if test $cf_fix_cppflags = yes ; then
11588                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11589                                 continue
11590                         elif test "${cf_tst_cflags}" = "\"'" ; then
11591                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11592                                 continue
11593                         fi
11594                         ;;
11595                 esac
11596                 case "$CPPFLAGS" in
11597                 *$cf_add_cflags) #(vi
11598                         ;;
11599                 *) #(vi
11600                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11601                         ;;
11602                 esac
11603                 ;;
11604         *)
11605                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11606                 ;;
11607         esac
11608         ;;
11609 yes)
11610         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11611
11612         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11613
11614         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11615         && test -z "${cf_tst_cflags}" \
11616         && cf_fix_cppflags=no
11617         ;;
11618 esac
11619 done
11620
11621 if test -n "$cf_new_cflags" ; then
11622
11623         CFLAGS="$CFLAGS $cf_new_cflags"
11624 fi
11625
11626 if test -n "$cf_new_cppflags" ; then
11627
11628         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11629 fi
11630
11631 if test -n "$cf_new_extra_cppflags" ; then
11632
11633         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11634 fi
11635
11636     fi
11637   fi
11638 fi
11639
11640 echo "$as_me:11640: checking for signal global datatype" >&5
11641 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11642 if test "${cf_cv_sig_atomic_t+set}" = set; then
11643   echo $ECHO_N "(cached) $ECHO_C" >&6
11644 else
11645
11646         for cf_type in \
11647                 "volatile sig_atomic_t" \
11648                 "sig_atomic_t" \
11649                 "int"
11650         do
11651         cat >conftest.$ac_ext <<_ACEOF
11652 #line 11652 "configure"
11653 #include "confdefs.h"
11654
11655 #include <sys/types.h>
11656 #include <signal.h>
11657 #include <stdio.h>
11658
11659 extern $cf_type x;
11660 $cf_type x;
11661 static void handler(int sig)
11662 {
11663         x = 5;
11664 }
11665 int
11666 main ()
11667 {
11668 signal(SIGINT, handler);
11669                  x = 1
11670   ;
11671   return 0;
11672 }
11673 _ACEOF
11674 rm -f conftest.$ac_objext
11675 if { (eval echo "$as_me:11675: \"$ac_compile\"") >&5
11676   (eval $ac_compile) 2>&5
11677   ac_status=$?
11678   echo "$as_me:11678: \$? = $ac_status" >&5
11679   (exit $ac_status); } &&
11680          { ac_try='test -s conftest.$ac_objext'
11681   { (eval echo "$as_me:11681: \"$ac_try\"") >&5
11682   (eval $ac_try) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); }; }; then
11686   cf_cv_sig_atomic_t=$cf_type
11687 else
11688   echo "$as_me: failed program was:" >&5
11689 cat conftest.$ac_ext >&5
11690 cf_cv_sig_atomic_t=no
11691 fi
11692 rm -f conftest.$ac_objext conftest.$ac_ext
11693                 test "$cf_cv_sig_atomic_t" != no && break
11694         done
11695
11696 fi
11697
11698 echo "$as_me:11698: result: $cf_cv_sig_atomic_t" >&5
11699 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11700 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11701 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11702 EOF
11703
11704 if test $NCURSES_CHTYPE = auto ; then
11705
11706 echo "$as_me:11706: checking for type of chtype" >&5
11707 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11708 if test "${cf_cv_typeof_chtype+set}" = set; then
11709   echo $ECHO_N "(cached) $ECHO_C" >&6
11710 else
11711
11712                 if test "$cross_compiling" = yes; then
11713   cf_cv_typeof_chtype=long
11714 else
11715   cat >conftest.$ac_ext <<_ACEOF
11716 #line 11716 "configure"
11717 #include "confdefs.h"
11718
11719 #define WANT_BITS 31
11720 #include <stdio.h>
11721 int main()
11722 {
11723         FILE *fp = fopen("cf_test.out", "w");
11724         if (fp != 0) {
11725                 char *result = "long";
11726                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11727                         int n;
11728                         unsigned int x, y;
11729                         for (n = 0; n < WANT_BITS; n++) {
11730                                 x = (1 << n);
11731                                 y = (x >> n);
11732                                 if (y != 1 || x == 0) {
11733                                         x = 0;
11734                                         break;
11735                                 }
11736                         }
11737                         /*
11738                          * If x is nonzero, an int is big enough for the bits
11739                          * that we want.
11740                          */
11741                         result = (x != 0) ? "int" : "long";
11742                 }
11743                 fputs(result, fp);
11744                 fclose(fp);
11745         }
11746         ${cf_cv_main_return:-return}(0);
11747 }
11748
11749 _ACEOF
11750 rm -f conftest$ac_exeext
11751 if { (eval echo "$as_me:11751: \"$ac_link\"") >&5
11752   (eval $ac_link) 2>&5
11753   ac_status=$?
11754   echo "$as_me:11754: \$? = $ac_status" >&5
11755   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11756   { (eval echo "$as_me:11756: \"$ac_try\"") >&5
11757   (eval $ac_try) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); }; }; then
11761   cf_cv_typeof_chtype=`cat cf_test.out`
11762 else
11763   echo "$as_me: program exited with status $ac_status" >&5
11764 echo "$as_me: failed program was:" >&5
11765 cat conftest.$ac_ext >&5
11766 cf_cv_typeof_chtype=long
11767 fi
11768 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11769 fi
11770                 rm -f cf_test.out
11771
11772 fi
11773
11774 echo "$as_me:11774: result: $cf_cv_typeof_chtype" >&5
11775 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11776
11777 cat >>confdefs.h <<EOF
11778 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11779 EOF
11780
11781 else
11782         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11783 fi
11784 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11785
11786 echo "$as_me:11786: checking if unsigned literals are legal" >&5
11787 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11788 if test "${cf_cv_unsigned_literals+set}" = set; then
11789   echo $ECHO_N "(cached) $ECHO_C" >&6
11790 else
11791
11792         cat >conftest.$ac_ext <<_ACEOF
11793 #line 11793 "configure"
11794 #include "confdefs.h"
11795
11796 int
11797 main ()
11798 {
11799 long x = 1L + 1UL + 1U + 1
11800   ;
11801   return 0;
11802 }
11803 _ACEOF
11804 rm -f conftest.$ac_objext
11805 if { (eval echo "$as_me:11805: \"$ac_compile\"") >&5
11806   (eval $ac_compile) 2>&5
11807   ac_status=$?
11808   echo "$as_me:11808: \$? = $ac_status" >&5
11809   (exit $ac_status); } &&
11810          { ac_try='test -s conftest.$ac_objext'
11811   { (eval echo "$as_me:11811: \"$ac_try\"") >&5
11812   (eval $ac_try) 2>&5
11813   ac_status=$?
11814   echo "$as_me:11814: \$? = $ac_status" >&5
11815   (exit $ac_status); }; }; then
11816   cf_cv_unsigned_literals=yes
11817 else
11818   echo "$as_me: failed program was:" >&5
11819 cat conftest.$ac_ext >&5
11820 cf_cv_unsigned_literals=no
11821 fi
11822 rm -f conftest.$ac_objext conftest.$ac_ext
11823
11824 fi
11825
11826 echo "$as_me:11826: result: $cf_cv_unsigned_literals" >&5
11827 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11828
11829 cf_cv_1UL="1"
11830 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11831 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11832
11833 if test $NCURSES_MMASK_T = auto ; then
11834         cf_cv_typeof_mmask_t=long
11835 else
11836         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11837 fi
11838 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11839
11840 ###     Checks for external-data
11841
11842 echo "$as_me:11842: checking if external errno is declared" >&5
11843 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11844 if test "${cf_cv_dcl_errno+set}" = set; then
11845   echo $ECHO_N "(cached) $ECHO_C" >&6
11846 else
11847
11848     cat >conftest.$ac_ext <<_ACEOF
11849 #line 11849 "configure"
11850 #include "confdefs.h"
11851
11852 #ifdef HAVE_STDLIB_H
11853 #include <stdlib.h>
11854 #endif
11855 #include <stdio.h>
11856 #include <sys/types.h>
11857 #include <errno.h>
11858 int
11859 main ()
11860 {
11861 long x = (long) errno
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 rm -f conftest.$ac_objext
11867 if { (eval echo "$as_me:11867: \"$ac_compile\"") >&5
11868   (eval $ac_compile) 2>&5
11869   ac_status=$?
11870   echo "$as_me:11870: \$? = $ac_status" >&5
11871   (exit $ac_status); } &&
11872          { ac_try='test -s conftest.$ac_objext'
11873   { (eval echo "$as_me:11873: \"$ac_try\"") >&5
11874   (eval $ac_try) 2>&5
11875   ac_status=$?
11876   echo "$as_me:11876: \$? = $ac_status" >&5
11877   (exit $ac_status); }; }; then
11878   cf_cv_dcl_errno=yes
11879 else
11880   echo "$as_me: failed program was:" >&5
11881 cat conftest.$ac_ext >&5
11882 cf_cv_dcl_errno=no
11883 fi
11884 rm -f conftest.$ac_objext conftest.$ac_ext
11885
11886 fi
11887 echo "$as_me:11887: result: $cf_cv_dcl_errno" >&5
11888 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11889
11890 if test "$cf_cv_dcl_errno" = no ; then
11891
11892 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11893
11894     cat >>confdefs.h <<EOF
11895 #define $cf_result 1
11896 EOF
11897
11898 fi
11899
11900 # It's possible (for near-UNIX clones) that the data doesn't exist
11901
11902 echo "$as_me:11902: checking if external errno exists" >&5
11903 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11904 if test "${cf_cv_have_errno+set}" = set; then
11905   echo $ECHO_N "(cached) $ECHO_C" >&6
11906 else
11907
11908     cat >conftest.$ac_ext <<_ACEOF
11909 #line 11909 "configure"
11910 #include "confdefs.h"
11911
11912 #undef errno
11913 extern int errno;
11914
11915 int
11916 main ()
11917 {
11918 errno = 2
11919   ;
11920   return 0;
11921 }
11922 _ACEOF
11923 rm -f conftest.$ac_objext conftest$ac_exeext
11924 if { (eval echo "$as_me:11924: \"$ac_link\"") >&5
11925   (eval $ac_link) 2>&5
11926   ac_status=$?
11927   echo "$as_me:11927: \$? = $ac_status" >&5
11928   (exit $ac_status); } &&
11929          { ac_try='test -s conftest$ac_exeext'
11930   { (eval echo "$as_me:11930: \"$ac_try\"") >&5
11931   (eval $ac_try) 2>&5
11932   ac_status=$?
11933   echo "$as_me:11933: \$? = $ac_status" >&5
11934   (exit $ac_status); }; }; then
11935   cf_cv_have_errno=yes
11936 else
11937   echo "$as_me: failed program was:" >&5
11938 cat conftest.$ac_ext >&5
11939 cf_cv_have_errno=no
11940 fi
11941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11942
11943 fi
11944 echo "$as_me:11944: result: $cf_cv_have_errno" >&5
11945 echo "${ECHO_T}$cf_cv_have_errno" >&6
11946
11947 if test "$cf_cv_have_errno" = yes ; then
11948
11949 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11950
11951     cat >>confdefs.h <<EOF
11952 #define $cf_result 1
11953 EOF
11954
11955 fi
11956
11957 echo "$as_me:11957: checking if data-only library module links" >&5
11958 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11959 if test "${cf_cv_link_dataonly+set}" = set; then
11960   echo $ECHO_N "(cached) $ECHO_C" >&6
11961 else
11962
11963         rm -f conftest.a
11964         cat >conftest.$ac_ext <<EOF
11965 #line 11965 "configure"
11966 int     testdata[3] = { 123, 456, 789 };
11967 EOF
11968         if { (eval echo "$as_me:11968: \"$ac_compile\"") >&5
11969   (eval $ac_compile) 2>&5
11970   ac_status=$?
11971   echo "$as_me:11971: \$? = $ac_status" >&5
11972   (exit $ac_status); } ; then
11973                 mv conftest.o data.o && \
11974                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11975         fi
11976         rm -f conftest.$ac_ext data.o
11977         cat >conftest.$ac_ext <<EOF
11978 #line 11978 "configure"
11979 int     testfunc()
11980 {
11981 #if defined(NeXT)
11982         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11983 #else
11984         extern int testdata[3];
11985         return testdata[0] == 123
11986            &&  testdata[1] == 456
11987            &&  testdata[2] == 789;
11988 #endif
11989 }
11990 EOF
11991         if { (eval echo "$as_me:11991: \"$ac_compile\"") >&5
11992   (eval $ac_compile) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit $ac_status); }; then
11996                 mv conftest.o func.o && \
11997                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11998         fi
11999         rm -f conftest.$ac_ext func.o
12000         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12001         cf_saveLIBS="$LIBS"
12002         LIBS="conftest.a $LIBS"
12003         if test "$cross_compiling" = yes; then
12004   cf_cv_link_dataonly=unknown
12005 else
12006   cat >conftest.$ac_ext <<_ACEOF
12007 #line 12007 "configure"
12008 #include "confdefs.h"
12009
12010         int main()
12011         {
12012                 extern int testfunc();
12013                 ${cf_cv_main_return:-return} (!testfunc());
12014         }
12015
12016 _ACEOF
12017 rm -f conftest$ac_exeext
12018 if { (eval echo "$as_me:12018: \"$ac_link\"") >&5
12019   (eval $ac_link) 2>&5
12020   ac_status=$?
12021   echo "$as_me:12021: \$? = $ac_status" >&5
12022   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12023   { (eval echo "$as_me:12023: \"$ac_try\"") >&5
12024   (eval $ac_try) 2>&5
12025   ac_status=$?
12026   echo "$as_me:12026: \$? = $ac_status" >&5
12027   (exit $ac_status); }; }; then
12028   cf_cv_link_dataonly=yes
12029 else
12030   echo "$as_me: program exited with status $ac_status" >&5
12031 echo "$as_me: failed program was:" >&5
12032 cat conftest.$ac_ext >&5
12033 cf_cv_link_dataonly=no
12034 fi
12035 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12036 fi
12037         LIBS="$cf_saveLIBS"
12038
12039 fi
12040
12041 echo "$as_me:12041: result: $cf_cv_link_dataonly" >&5
12042 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12043
12044 if test "$cf_cv_link_dataonly" = no ; then
12045         cat >>confdefs.h <<\EOF
12046 #define BROKEN_LINKER 1
12047 EOF
12048
12049         BROKEN_LINKER=1
12050 fi
12051
12052 ###     Checks for library functions.
12053
12054 for ac_func in \
12055 getcwd \
12056 getegid \
12057 geteuid \
12058 getttynam \
12059 issetugid \
12060 poll \
12061 remove \
12062 select \
12063 setbuf \
12064 setbuffer \
12065 setvbuf \
12066 sigaction \
12067 sigvec \
12068 strdup \
12069 strstr \
12070 tcgetpgrp \
12071 times \
12072 vsnprintf \
12073
12074 do
12075 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12076 echo "$as_me:12076: checking for $ac_func" >&5
12077 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12078 if eval "test \"\${$as_ac_var+set}\" = set"; then
12079   echo $ECHO_N "(cached) $ECHO_C" >&6
12080 else
12081   cat >conftest.$ac_ext <<_ACEOF
12082 #line 12082 "configure"
12083 #include "confdefs.h"
12084 /* System header to define __stub macros and hopefully few prototypes,
12085     which can conflict with char $ac_func (); below.  */
12086 #include <assert.h>
12087 /* Override any gcc2 internal prototype to avoid an error.  */
12088 #ifdef __cplusplus
12089 extern "C"
12090 #endif
12091 /* We use char because int might match the return type of a gcc2
12092    builtin and then its argument prototype would still apply.  */
12093 char $ac_func ();
12094 char (*f) ();
12095
12096 int
12097 main ()
12098 {
12099 /* The GNU C library defines this for functions which it implements
12100     to always fail with ENOSYS.  Some functions are actually named
12101     something starting with __ and the normal name is an alias.  */
12102 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12103 choke me
12104 #else
12105 f = $ac_func;
12106 #endif
12107
12108   ;
12109   return 0;
12110 }
12111 _ACEOF
12112 rm -f conftest.$ac_objext conftest$ac_exeext
12113 if { (eval echo "$as_me:12113: \"$ac_link\"") >&5
12114   (eval $ac_link) 2>&5
12115   ac_status=$?
12116   echo "$as_me:12116: \$? = $ac_status" >&5
12117   (exit $ac_status); } &&
12118          { ac_try='test -s conftest$ac_exeext'
12119   { (eval echo "$as_me:12119: \"$ac_try\"") >&5
12120   (eval $ac_try) 2>&5
12121   ac_status=$?
12122   echo "$as_me:12122: \$? = $ac_status" >&5
12123   (exit $ac_status); }; }; then
12124   eval "$as_ac_var=yes"
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 cat conftest.$ac_ext >&5
12128 eval "$as_ac_var=no"
12129 fi
12130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12131 fi
12132 echo "$as_me:12132: result: `eval echo '${'$as_ac_var'}'`" >&5
12133 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12134 if test `eval echo '${'$as_ac_var'}'` = yes; then
12135   cat >>confdefs.h <<EOF
12136 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12137 EOF
12138
12139 fi
12140 done
12141
12142 if test "$with_getcap" = "yes" ; then
12143
12144 echo "$as_me:12144: checking for terminal-capability database functions" >&5
12145 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12146 if test "${cf_cv_cgetent+set}" = set; then
12147   echo $ECHO_N "(cached) $ECHO_C" >&6
12148 else
12149
12150 cat >conftest.$ac_ext <<_ACEOF
12151 #line 12151 "configure"
12152 #include "confdefs.h"
12153
12154 #include <stdlib.h>
12155 int
12156 main ()
12157 {
12158
12159         char temp[128];
12160         char *buf = temp;
12161         char *db_array = temp;
12162         cgetent(&buf, /* int *, */ &db_array, "vt100");
12163         cgetcap(buf, "tc", '=');
12164         cgetmatch(buf, "tc");
12165
12166   ;
12167   return 0;
12168 }
12169 _ACEOF
12170 rm -f conftest.$ac_objext conftest$ac_exeext
12171 if { (eval echo "$as_me:12171: \"$ac_link\"") >&5
12172   (eval $ac_link) 2>&5
12173   ac_status=$?
12174   echo "$as_me:12174: \$? = $ac_status" >&5
12175   (exit $ac_status); } &&
12176          { ac_try='test -s conftest$ac_exeext'
12177   { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178   (eval $ac_try) 2>&5
12179   ac_status=$?
12180   echo "$as_me:12180: \$? = $ac_status" >&5
12181   (exit $ac_status); }; }; then
12182   cf_cv_cgetent=yes
12183 else
12184   echo "$as_me: failed program was:" >&5
12185 cat conftest.$ac_ext >&5
12186 cf_cv_cgetent=no
12187 fi
12188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12189
12190 fi
12191
12192 echo "$as_me:12192: result: $cf_cv_cgetent" >&5
12193 echo "${ECHO_T}$cf_cv_cgetent" >&6
12194 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12195 #define HAVE_BSD_CGETENT 1
12196 EOF
12197
12198 fi
12199
12200 echo "$as_me:12200: checking for isascii" >&5
12201 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12202 if test "${cf_cv_have_isascii+set}" = set; then
12203   echo $ECHO_N "(cached) $ECHO_C" >&6
12204 else
12205
12206         cat >conftest.$ac_ext <<_ACEOF
12207 #line 12207 "configure"
12208 #include "confdefs.h"
12209 #include <ctype.h>
12210 int
12211 main ()
12212 {
12213 int x = isascii(' ')
12214   ;
12215   return 0;
12216 }
12217 _ACEOF
12218 rm -f conftest.$ac_objext conftest$ac_exeext
12219 if { (eval echo "$as_me:12219: \"$ac_link\"") >&5
12220   (eval $ac_link) 2>&5
12221   ac_status=$?
12222   echo "$as_me:12222: \$? = $ac_status" >&5
12223   (exit $ac_status); } &&
12224          { ac_try='test -s conftest$ac_exeext'
12225   { (eval echo "$as_me:12225: \"$ac_try\"") >&5
12226   (eval $ac_try) 2>&5
12227   ac_status=$?
12228   echo "$as_me:12228: \$? = $ac_status" >&5
12229   (exit $ac_status); }; }; then
12230   cf_cv_have_isascii=yes
12231 else
12232   echo "$as_me: failed program was:" >&5
12233 cat conftest.$ac_ext >&5
12234 cf_cv_have_isascii=no
12235 fi
12236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12237
12238 fi
12239 echo "$as_me:12239: result: $cf_cv_have_isascii" >&5
12240 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12241 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12242 #define HAVE_ISASCII 1
12243 EOF
12244
12245 if test "$ac_cv_func_sigaction" = yes; then
12246 echo "$as_me:12246: checking whether sigaction needs _POSIX_SOURCE" >&5
12247 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12248 cat >conftest.$ac_ext <<_ACEOF
12249 #line 12249 "configure"
12250 #include "confdefs.h"
12251
12252 #include <sys/types.h>
12253 #include <signal.h>
12254 int
12255 main ()
12256 {
12257 struct sigaction act
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 rm -f conftest.$ac_objext
12263 if { (eval echo "$as_me:12263: \"$ac_compile\"") >&5
12264   (eval $ac_compile) 2>&5
12265   ac_status=$?
12266   echo "$as_me:12266: \$? = $ac_status" >&5
12267   (exit $ac_status); } &&
12268          { ac_try='test -s conftest.$ac_objext'
12269   { (eval echo "$as_me:12269: \"$ac_try\"") >&5
12270   (eval $ac_try) 2>&5
12271   ac_status=$?
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit $ac_status); }; }; then
12274   sigact_bad=no
12275 else
12276   echo "$as_me: failed program was:" >&5
12277 cat conftest.$ac_ext >&5
12278
12279 cat >conftest.$ac_ext <<_ACEOF
12280 #line 12280 "configure"
12281 #include "confdefs.h"
12282
12283 #define _POSIX_SOURCE
12284 #include <sys/types.h>
12285 #include <signal.h>
12286 int
12287 main ()
12288 {
12289 struct sigaction act
12290   ;
12291   return 0;
12292 }
12293 _ACEOF
12294 rm -f conftest.$ac_objext
12295 if { (eval echo "$as_me:12295: \"$ac_compile\"") >&5
12296   (eval $ac_compile) 2>&5
12297   ac_status=$?
12298   echo "$as_me:12298: \$? = $ac_status" >&5
12299   (exit $ac_status); } &&
12300          { ac_try='test -s conftest.$ac_objext'
12301   { (eval echo "$as_me:12301: \"$ac_try\"") >&5
12302   (eval $ac_try) 2>&5
12303   ac_status=$?
12304   echo "$as_me:12304: \$? = $ac_status" >&5
12305   (exit $ac_status); }; }; then
12306   sigact_bad=yes
12307          cat >>confdefs.h <<\EOF
12308 #define SVR4_ACTION 1
12309 EOF
12310
12311 else
12312   echo "$as_me: failed program was:" >&5
12313 cat conftest.$ac_ext >&5
12314 sigact_bad=unknown
12315 fi
12316 rm -f conftest.$ac_objext conftest.$ac_ext
12317 fi
12318 rm -f conftest.$ac_objext conftest.$ac_ext
12319 echo "$as_me:12319: result: $sigact_bad" >&5
12320 echo "${ECHO_T}$sigact_bad" >&6
12321 fi
12322
12323 echo "$as_me:12323: checking if nanosleep really works" >&5
12324 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12325 if test "${cf_cv_func_nanosleep+set}" = set; then
12326   echo $ECHO_N "(cached) $ECHO_C" >&6
12327 else
12328
12329 if test "$cross_compiling" = yes; then
12330   cf_cv_func_nanosleep=unknown
12331 else
12332   cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335
12336 #include <stdio.h>
12337 #include <errno.h>
12338 #include <time.h>
12339
12340 #ifdef HAVE_SYS_TIME_H
12341 #include <sys/time.h>
12342 #endif
12343
12344 int main() {
12345         struct timespec ts1, ts2;
12346         int code;
12347         ts1.tv_sec  = 0;
12348         ts1.tv_nsec = 750000000;
12349         ts2.tv_sec  = 0;
12350         ts2.tv_nsec = 0;
12351         errno = 0;
12352         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12353         ${cf_cv_main_return:-return}(code != 0);
12354 }
12355
12356 _ACEOF
12357 rm -f conftest$ac_exeext
12358 if { (eval echo "$as_me:12358: \"$ac_link\"") >&5
12359   (eval $ac_link) 2>&5
12360   ac_status=$?
12361   echo "$as_me:12361: \$? = $ac_status" >&5
12362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12363   { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); }; }; then
12368   cf_cv_func_nanosleep=yes
12369 else
12370   echo "$as_me: program exited with status $ac_status" >&5
12371 echo "$as_me: failed program was:" >&5
12372 cat conftest.$ac_ext >&5
12373 cf_cv_func_nanosleep=no
12374 fi
12375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12376 fi
12377 fi
12378 echo "$as_me:12378: result: $cf_cv_func_nanosleep" >&5
12379 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12380
12381 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12382 #define HAVE_NANOSLEEP 1
12383 EOF
12384
12385 for ac_header in \
12386 termio.h \
12387 termios.h \
12388 unistd.h \
12389
12390 do
12391 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12392 echo "$as_me:12392: checking for $ac_header" >&5
12393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12395   echo $ECHO_N "(cached) $ECHO_C" >&6
12396 else
12397   cat >conftest.$ac_ext <<_ACEOF
12398 #line 12398 "configure"
12399 #include "confdefs.h"
12400 #include <$ac_header>
12401 _ACEOF
12402 if { (eval echo "$as_me:12402: \"$ac_cpp conftest.$ac_ext\"") >&5
12403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12404   ac_status=$?
12405   egrep -v '^ *\+' conftest.er1 >conftest.err
12406   rm -f conftest.er1
12407   cat conftest.err >&5
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); } >/dev/null; then
12410   if test -s conftest.err; then
12411     ac_cpp_err=$ac_c_preproc_warn_flag
12412   else
12413     ac_cpp_err=
12414   fi
12415 else
12416   ac_cpp_err=yes
12417 fi
12418 if test -z "$ac_cpp_err"; then
12419   eval "$as_ac_Header=yes"
12420 else
12421   echo "$as_me: failed program was:" >&5
12422   cat conftest.$ac_ext >&5
12423   eval "$as_ac_Header=no"
12424 fi
12425 rm -f conftest.err conftest.$ac_ext
12426 fi
12427 echo "$as_me:12427: result: `eval echo '${'$as_ac_Header'}'`" >&5
12428 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12430   cat >>confdefs.h <<EOF
12431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12432 EOF
12433
12434 fi
12435 done
12436
12437 if test "$ISC" = yes ; then
12438
12439 for ac_header in sys/termio.h
12440 do
12441 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12442 echo "$as_me:12442: checking for $ac_header" >&5
12443 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12444 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12445   echo $ECHO_N "(cached) $ECHO_C" >&6
12446 else
12447   cat >conftest.$ac_ext <<_ACEOF
12448 #line 12448 "configure"
12449 #include "confdefs.h"
12450 #include <$ac_header>
12451 _ACEOF
12452 if { (eval echo "$as_me:12452: \"$ac_cpp conftest.$ac_ext\"") >&5
12453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12454   ac_status=$?
12455   egrep -v '^ *\+' conftest.er1 >conftest.err
12456   rm -f conftest.er1
12457   cat conftest.err >&5
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } >/dev/null; then
12460   if test -s conftest.err; then
12461     ac_cpp_err=$ac_c_preproc_warn_flag
12462   else
12463     ac_cpp_err=
12464   fi
12465 else
12466   ac_cpp_err=yes
12467 fi
12468 if test -z "$ac_cpp_err"; then
12469   eval "$as_ac_Header=yes"
12470 else
12471   echo "$as_me: failed program was:" >&5
12472   cat conftest.$ac_ext >&5
12473   eval "$as_ac_Header=no"
12474 fi
12475 rm -f conftest.err conftest.$ac_ext
12476 fi
12477 echo "$as_me:12477: result: `eval echo '${'$as_ac_Header'}'`" >&5
12478 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12479 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12480   cat >>confdefs.h <<EOF
12481 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12482 EOF
12483
12484 fi
12485 done
12486
12487 fi
12488 if test "$ac_cv_header_termios_h" = yes ; then
12489         case "$CFLAGS $CPPFLAGS" in
12490         *-D_POSIX_SOURCE*)
12491                 termios_bad=dunno ;;
12492         *)      termios_bad=maybe ;;
12493         esac
12494         if test "$termios_bad" = maybe ; then
12495         echo "$as_me:12495: checking whether termios.h needs _POSIX_SOURCE" >&5
12496 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12497         cat >conftest.$ac_ext <<_ACEOF
12498 #line 12498 "configure"
12499 #include "confdefs.h"
12500 #include <termios.h>
12501 int
12502 main ()
12503 {
12504 struct termios foo; int x = foo.c_iflag
12505   ;
12506   return 0;
12507 }
12508 _ACEOF
12509 rm -f conftest.$ac_objext
12510 if { (eval echo "$as_me:12510: \"$ac_compile\"") >&5
12511   (eval $ac_compile) 2>&5
12512   ac_status=$?
12513   echo "$as_me:12513: \$? = $ac_status" >&5
12514   (exit $ac_status); } &&
12515          { ac_try='test -s conftest.$ac_objext'
12516   { (eval echo "$as_me:12516: \"$ac_try\"") >&5
12517   (eval $ac_try) 2>&5
12518   ac_status=$?
12519   echo "$as_me:12519: \$? = $ac_status" >&5
12520   (exit $ac_status); }; }; then
12521   termios_bad=no
12522 else
12523   echo "$as_me: failed program was:" >&5
12524 cat conftest.$ac_ext >&5
12525
12526                 cat >conftest.$ac_ext <<_ACEOF
12527 #line 12527 "configure"
12528 #include "confdefs.h"
12529
12530 #define _POSIX_SOURCE
12531 #include <termios.h>
12532 int
12533 main ()
12534 {
12535 struct termios foo; int x = foo.c_iflag
12536   ;
12537   return 0;
12538 }
12539 _ACEOF
12540 rm -f conftest.$ac_objext
12541 if { (eval echo "$as_me:12541: \"$ac_compile\"") >&5
12542   (eval $ac_compile) 2>&5
12543   ac_status=$?
12544   echo "$as_me:12544: \$? = $ac_status" >&5
12545   (exit $ac_status); } &&
12546          { ac_try='test -s conftest.$ac_objext'
12547   { (eval echo "$as_me:12547: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:12550: \$? = $ac_status" >&5
12551   (exit $ac_status); }; }; then
12552   termios_bad=unknown
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 cat conftest.$ac_ext >&5
12556 termios_bad=yes cat >>confdefs.h <<\EOF
12557 #define SVR4_TERMIO 1
12558 EOF
12559
12560 fi
12561 rm -f conftest.$ac_objext conftest.$ac_ext
12562
12563 fi
12564 rm -f conftest.$ac_objext conftest.$ac_ext
12565         echo "$as_me:12565: result: $termios_bad" >&5
12566 echo "${ECHO_T}$termios_bad" >&6
12567         fi
12568 fi
12569
12570 echo "$as_me:12570: checking for tcgetattr" >&5
12571 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12572 if test "${cf_cv_have_tcgetattr+set}" = set; then
12573   echo $ECHO_N "(cached) $ECHO_C" >&6
12574 else
12575
12576 cat >conftest.$ac_ext <<_ACEOF
12577 #line 12577 "configure"
12578 #include "confdefs.h"
12579
12580 #include <sys/types.h>
12581 #ifdef HAVE_UNISTD_H
12582 #include <unistd.h>
12583 #endif
12584 #ifdef HAVE_TERMIOS_H
12585 #include <termios.h>
12586 #define TTY struct termios
12587 #else
12588 #ifdef HAVE_TERMIO_H
12589 #include <termio.h>
12590 #define TTY struct termio
12591 #endif
12592 #endif
12593
12594 int
12595 main ()
12596 {
12597
12598 TTY foo;
12599 tcgetattr(1, &foo);
12600   ;
12601   return 0;
12602 }
12603 _ACEOF
12604 rm -f conftest.$ac_objext conftest$ac_exeext
12605 if { (eval echo "$as_me:12605: \"$ac_link\"") >&5
12606   (eval $ac_link) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit $ac_status); } &&
12610          { ac_try='test -s conftest$ac_exeext'
12611   { (eval echo "$as_me:12611: \"$ac_try\"") >&5
12612   (eval $ac_try) 2>&5
12613   ac_status=$?
12614   echo "$as_me:12614: \$? = $ac_status" >&5
12615   (exit $ac_status); }; }; then
12616   cf_cv_have_tcgetattr=yes
12617 else
12618   echo "$as_me: failed program was:" >&5
12619 cat conftest.$ac_ext >&5
12620 cf_cv_have_tcgetattr=no
12621 fi
12622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12623 fi
12624 echo "$as_me:12624: result: $cf_cv_have_tcgetattr" >&5
12625 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12626 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12627 #define HAVE_TCGETATTR 1
12628 EOF
12629
12630 echo "$as_me:12630: checking for vsscanf function or workaround" >&5
12631 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12632 if test "${cf_cv_func_vsscanf+set}" = set; then
12633   echo $ECHO_N "(cached) $ECHO_C" >&6
12634 else
12635
12636 cat >conftest.$ac_ext <<_ACEOF
12637 #line 12637 "configure"
12638 #include "confdefs.h"
12639
12640 #include <stdarg.h>
12641 #include <stdio.h>
12642 int
12643 main ()
12644 {
12645
12646         va_list ap;
12647         vsscanf("from", "%d", ap)
12648   ;
12649   return 0;
12650 }
12651 _ACEOF
12652 rm -f conftest.$ac_objext conftest$ac_exeext
12653 if { (eval echo "$as_me:12653: \"$ac_link\"") >&5
12654   (eval $ac_link) 2>&5
12655   ac_status=$?
12656   echo "$as_me:12656: \$? = $ac_status" >&5
12657   (exit $ac_status); } &&
12658          { ac_try='test -s conftest$ac_exeext'
12659   { (eval echo "$as_me:12659: \"$ac_try\"") >&5
12660   (eval $ac_try) 2>&5
12661   ac_status=$?
12662   echo "$as_me:12662: \$? = $ac_status" >&5
12663   (exit $ac_status); }; }; then
12664   cf_cv_func_vsscanf=vsscanf
12665 else
12666   echo "$as_me: failed program was:" >&5
12667 cat conftest.$ac_ext >&5
12668
12669 cat >conftest.$ac_ext <<_ACEOF
12670 #line 12670 "configure"
12671 #include "confdefs.h"
12672
12673 #include <stdarg.h>
12674 #include <stdio.h>
12675 int
12676 main ()
12677 {
12678
12679     FILE strbuf;
12680     char *str = "from";
12681
12682     strbuf._flag = _IOREAD;
12683     strbuf._ptr = strbuf._base = (unsigned char *) str;
12684     strbuf._cnt = strlen(str);
12685     strbuf._file = _NFILE;
12686     return (vfscanf(&strbuf, "%d", ap))
12687   ;
12688   return 0;
12689 }
12690 _ACEOF
12691 rm -f conftest.$ac_objext conftest$ac_exeext
12692 if { (eval echo "$as_me:12692: \"$ac_link\"") >&5
12693   (eval $ac_link) 2>&5
12694   ac_status=$?
12695   echo "$as_me:12695: \$? = $ac_status" >&5
12696   (exit $ac_status); } &&
12697          { ac_try='test -s conftest$ac_exeext'
12698   { (eval echo "$as_me:12698: \"$ac_try\"") >&5
12699   (eval $ac_try) 2>&5
12700   ac_status=$?
12701   echo "$as_me:12701: \$? = $ac_status" >&5
12702   (exit $ac_status); }; }; then
12703   cf_cv_func_vsscanf=vfscanf
12704 else
12705   echo "$as_me: failed program was:" >&5
12706 cat conftest.$ac_ext >&5
12707
12708 cat >conftest.$ac_ext <<_ACEOF
12709 #line 12709 "configure"
12710 #include "confdefs.h"
12711
12712 #include <stdarg.h>
12713 #include <stdio.h>
12714 int
12715 main ()
12716 {
12717
12718     FILE strbuf;
12719     char *str = "from";
12720
12721     strbuf._flag = _IOREAD;
12722     strbuf._ptr = strbuf._base = (unsigned char *) str;
12723     strbuf._cnt = strlen(str);
12724     strbuf._file = _NFILE;
12725     return (_doscan(&strbuf, "%d", ap))
12726   ;
12727   return 0;
12728 }
12729 _ACEOF
12730 rm -f conftest.$ac_objext conftest$ac_exeext
12731 if { (eval echo "$as_me:12731: \"$ac_link\"") >&5
12732   (eval $ac_link) 2>&5
12733   ac_status=$?
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit $ac_status); } &&
12736          { ac_try='test -s conftest$ac_exeext'
12737   { (eval echo "$as_me:12737: \"$ac_try\"") >&5
12738   (eval $ac_try) 2>&5
12739   ac_status=$?
12740   echo "$as_me:12740: \$? = $ac_status" >&5
12741   (exit $ac_status); }; }; then
12742   cf_cv_func_vsscanf=_doscan
12743 else
12744   echo "$as_me: failed program was:" >&5
12745 cat conftest.$ac_ext >&5
12746
12747 cf_cv_func_vsscanf=no
12748 fi
12749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12750 fi
12751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12752 fi
12753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12754 fi
12755 echo "$as_me:12755: result: $cf_cv_func_vsscanf" >&5
12756 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12757
12758 case $cf_cv_func_vsscanf in #(vi
12759 vsscanf) cat >>confdefs.h <<\EOF
12760 #define HAVE_VSSCANF 1
12761 EOF
12762 ;; #(vi
12763 vfscanf) cat >>confdefs.h <<\EOF
12764 #define HAVE_VFSCANF 1
12765 EOF
12766 ;; #(vi
12767 _doscan) cat >>confdefs.h <<\EOF
12768 #define HAVE__DOSCAN 1
12769 EOF
12770 ;;
12771 esac
12772
12773 echo "$as_me:12773: checking for working mkstemp" >&5
12774 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12775 if test "${cf_cv_func_mkstemp+set}" = set; then
12776   echo $ECHO_N "(cached) $ECHO_C" >&6
12777 else
12778
12779 rm -f conftest*
12780 if test "$cross_compiling" = yes; then
12781   echo "$as_me:12781: checking for mkstemp" >&5
12782 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12783 if test "${ac_cv_func_mkstemp+set}" = set; then
12784   echo $ECHO_N "(cached) $ECHO_C" >&6
12785 else
12786   cat >conftest.$ac_ext <<_ACEOF
12787 #line 12787 "configure"
12788 #include "confdefs.h"
12789 /* System header to define __stub macros and hopefully few prototypes,
12790     which can conflict with char mkstemp (); below.  */
12791 #include <assert.h>
12792 /* Override any gcc2 internal prototype to avoid an error.  */
12793 #ifdef __cplusplus
12794 extern "C"
12795 #endif
12796 /* We use char because int might match the return type of a gcc2
12797    builtin and then its argument prototype would still apply.  */
12798 char mkstemp ();
12799 char (*f) ();
12800
12801 int
12802 main ()
12803 {
12804 /* The GNU C library defines this for functions which it implements
12805     to always fail with ENOSYS.  Some functions are actually named
12806     something starting with __ and the normal name is an alias.  */
12807 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12808 choke me
12809 #else
12810 f = mkstemp;
12811 #endif
12812
12813   ;
12814   return 0;
12815 }
12816 _ACEOF
12817 rm -f conftest.$ac_objext conftest$ac_exeext
12818 if { (eval echo "$as_me:12818: \"$ac_link\"") >&5
12819   (eval $ac_link) 2>&5
12820   ac_status=$?
12821   echo "$as_me:12821: \$? = $ac_status" >&5
12822   (exit $ac_status); } &&
12823          { ac_try='test -s conftest$ac_exeext'
12824   { (eval echo "$as_me:12824: \"$ac_try\"") >&5
12825   (eval $ac_try) 2>&5
12826   ac_status=$?
12827   echo "$as_me:12827: \$? = $ac_status" >&5
12828   (exit $ac_status); }; }; then
12829   ac_cv_func_mkstemp=yes
12830 else
12831   echo "$as_me: failed program was:" >&5
12832 cat conftest.$ac_ext >&5
12833 ac_cv_func_mkstemp=no
12834 fi
12835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12836 fi
12837 echo "$as_me:12837: result: $ac_cv_func_mkstemp" >&5
12838 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12839
12840 else
12841   cat >conftest.$ac_ext <<_ACEOF
12842 #line 12842 "configure"
12843 #include "confdefs.h"
12844
12845 #include <sys/types.h>
12846 #include <stdlib.h>
12847 #include <stdio.h>
12848 #include <string.h>
12849 #include <sys/stat.h>
12850 int main()
12851 {
12852         char *tmpl = "conftestXXXXXX";
12853         char name[2][80];
12854         int n;
12855         int result = 0;
12856         int fd;
12857         struct stat sb;
12858
12859         umask(077);
12860         for (n = 0; n < 2; ++n) {
12861                 strcpy(name[n], tmpl);
12862                 if ((fd = mkstemp(name[n])) >= 0) {
12863                         if (!strcmp(name[n], tmpl)
12864                          || stat(name[n], &sb) != 0
12865                          || (sb.st_mode & S_IFMT) != S_IFREG
12866                          || (sb.st_mode & 077) != 0) {
12867                                 result = 1;
12868                         }
12869                         close(fd);
12870                 }
12871         }
12872         if (result == 0
12873          && !strcmp(name[0], name[1]))
12874                 result = 1;
12875         ${cf_cv_main_return:-return}(result);
12876 }
12877
12878 _ACEOF
12879 rm -f conftest$ac_exeext
12880 if { (eval echo "$as_me:12880: \"$ac_link\"") >&5
12881   (eval $ac_link) 2>&5
12882   ac_status=$?
12883   echo "$as_me:12883: \$? = $ac_status" >&5
12884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12885   { (eval echo "$as_me:12885: \"$ac_try\"") >&5
12886   (eval $ac_try) 2>&5
12887   ac_status=$?
12888   echo "$as_me:12888: \$? = $ac_status" >&5
12889   (exit $ac_status); }; }; then
12890   cf_cv_func_mkstemp=yes
12891
12892 else
12893   echo "$as_me: program exited with status $ac_status" >&5
12894 echo "$as_me: failed program was:" >&5
12895 cat conftest.$ac_ext >&5
12896 cf_cv_func_mkstemp=no
12897
12898 fi
12899 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12900 fi
12901
12902 fi
12903 echo "$as_me:12903: result: $cf_cv_func_mkstemp" >&5
12904 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12905 if test "$cf_cv_func_mkstemp" = yes ; then
12906         cat >>confdefs.h <<\EOF
12907 #define HAVE_MKSTEMP 1
12908 EOF
12909
12910 fi
12911
12912 # setup for prototype of fallback for vsscanf()
12913
12914 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12915         HAVE_VSSCANF=1
12916 else
12917         HAVE_VSSCANF=0
12918 fi
12919
12920 if test "$cross_compiling" = yes ; then
12921         { echo "$as_me:12921: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12922 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12923 else
12924         echo "$as_me:12924: checking whether setvbuf arguments are reversed" >&5
12925 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12926 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12927   echo $ECHO_N "(cached) $ECHO_C" >&6
12928 else
12929   if test "$cross_compiling" = yes; then
12930   { { echo "$as_me:12930: error: cannot run test program while cross compiling" >&5
12931 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12932    { (exit 1); exit 1; }; }
12933 else
12934   cat >conftest.$ac_ext <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12937 #include <stdio.h>
12938 /* If setvbuf has the reversed format, exit 0. */
12939 int
12940 main ()
12941 {
12942   /* This call has the arguments reversed.
12943      A reversed system may check and see that the address of main
12944      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12945   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12946     $ac_main_return(1);
12947   putc('\r', stdout);
12948   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12949 }
12950 _ACEOF
12951 rm -f conftest$ac_exeext
12952 if { (eval echo "$as_me:12952: \"$ac_link\"") >&5
12953   (eval $ac_link) 2>&5
12954   ac_status=$?
12955   echo "$as_me:12955: \$? = $ac_status" >&5
12956   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12957   { (eval echo "$as_me:12957: \"$ac_try\"") >&5
12958   (eval $ac_try) 2>&5
12959   ac_status=$?
12960   echo "$as_me:12960: \$? = $ac_status" >&5
12961   (exit $ac_status); }; }; then
12962   ac_cv_func_setvbuf_reversed=yes
12963 else
12964   echo "$as_me: program exited with status $ac_status" >&5
12965 echo "$as_me: failed program was:" >&5
12966 cat conftest.$ac_ext >&5
12967 ac_cv_func_setvbuf_reversed=no
12968 fi
12969 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12970 fi
12971 rm -f core core.* *.core
12972 fi
12973 echo "$as_me:12973: result: $ac_cv_func_setvbuf_reversed" >&5
12974 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12975 if test $ac_cv_func_setvbuf_reversed = yes; then
12976
12977 cat >>confdefs.h <<\EOF
12978 #define SETVBUF_REVERSED 1
12979 EOF
12980
12981 fi
12982
12983 fi
12984 echo "$as_me:12984: checking return type of signal handlers" >&5
12985 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12986 if test "${ac_cv_type_signal+set}" = set; then
12987   echo $ECHO_N "(cached) $ECHO_C" >&6
12988 else
12989   cat >conftest.$ac_ext <<_ACEOF
12990 #line 12990 "configure"
12991 #include "confdefs.h"
12992 #include <sys/types.h>
12993 #include <signal.h>
12994 #ifdef signal
12995 # undef signal
12996 #endif
12997 #ifdef __cplusplus
12998 extern "C" void (*signal (int, void (*)(int)))(int);
12999 #else
13000 void (*signal ()) ();
13001 #endif
13002
13003 int
13004 main ()
13005 {
13006 int i;
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f conftest.$ac_objext
13012 if { (eval echo "$as_me:13012: \"$ac_compile\"") >&5
13013   (eval $ac_compile) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); } &&
13017          { ac_try='test -s conftest.$ac_objext'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); }; }; then
13023   ac_cv_type_signal=void
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat conftest.$ac_ext >&5
13027 ac_cv_type_signal=int
13028 fi
13029 rm -f conftest.$ac_objext conftest.$ac_ext
13030 fi
13031 echo "$as_me:13031: result: $ac_cv_type_signal" >&5
13032 echo "${ECHO_T}$ac_cv_type_signal" >&6
13033
13034 cat >>confdefs.h <<EOF
13035 #define RETSIGTYPE $ac_cv_type_signal
13036 EOF
13037
13038 echo "$as_me:13038: checking for type sigaction_t" >&5
13039 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13040 if test "${cf_cv_type_sigaction+set}" = set; then
13041   echo $ECHO_N "(cached) $ECHO_C" >&6
13042 else
13043
13044         cat >conftest.$ac_ext <<_ACEOF
13045 #line 13045 "configure"
13046 #include "confdefs.h"
13047
13048 #include <signal.h>
13049 int
13050 main ()
13051 {
13052 sigaction_t x
13053   ;
13054   return 0;
13055 }
13056 _ACEOF
13057 rm -f conftest.$ac_objext
13058 if { (eval echo "$as_me:13058: \"$ac_compile\"") >&5
13059   (eval $ac_compile) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); } &&
13063          { ac_try='test -s conftest.$ac_objext'
13064   { (eval echo "$as_me:13064: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   cf_cv_type_sigaction=yes
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 cf_cv_type_sigaction=no
13074 fi
13075 rm -f conftest.$ac_objext conftest.$ac_ext
13076 fi
13077
13078 echo "$as_me:13078: result: $cf_cv_type_sigaction" >&5
13079 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13080 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13081 #define HAVE_TYPE_SIGACTION 1
13082 EOF
13083
13084 echo "$as_me:13084: checking declaration of size-change" >&5
13085 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13086 if test "${cf_cv_sizechange+set}" = set; then
13087   echo $ECHO_N "(cached) $ECHO_C" >&6
13088 else
13089
13090     cf_cv_sizechange=unknown
13091     cf_save_CPPFLAGS="$CPPFLAGS"
13092
13093 for cf_opts in "" "NEED_PTEM_H"
13094 do
13095
13096     CPPFLAGS="$cf_save_CPPFLAGS"
13097     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13098     cat >conftest.$ac_ext <<_ACEOF
13099 #line 13099 "configure"
13100 #include "confdefs.h"
13101 #include <sys/types.h>
13102 #ifdef HAVE_TERMIOS_H
13103 #include <termios.h>
13104 #else
13105 #ifdef HAVE_TERMIO_H
13106 #include <termio.h>
13107 #endif
13108 #endif
13109 #ifdef NEED_PTEM_H
13110 /* This is a workaround for SCO:  they neglected to define struct winsize in
13111  * termios.h -- it's only in termio.h and ptem.h
13112  */
13113 #include        <sys/stream.h>
13114 #include        <sys/ptem.h>
13115 #endif
13116 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13117 #include <sys/ioctl.h>
13118 #endif
13119
13120 int
13121 main ()
13122 {
13123
13124 #ifdef TIOCGSIZE
13125         struct ttysize win;     /* FIXME: what system is this? */
13126         int y = win.ts_lines;
13127         int x = win.ts_cols;
13128 #else
13129 #ifdef TIOCGWINSZ
13130         struct winsize win;
13131         int y = win.ws_row;
13132         int x = win.ws_col;
13133 #else
13134         no TIOCGSIZE or TIOCGWINSZ
13135 #endif /* TIOCGWINSZ */
13136 #endif /* TIOCGSIZE */
13137
13138   ;
13139   return 0;
13140 }
13141 _ACEOF
13142 rm -f conftest.$ac_objext
13143 if { (eval echo "$as_me:13143: \"$ac_compile\"") >&5
13144   (eval $ac_compile) 2>&5
13145   ac_status=$?
13146   echo "$as_me:13146: \$? = $ac_status" >&5
13147   (exit $ac_status); } &&
13148          { ac_try='test -s conftest.$ac_objext'
13149   { (eval echo "$as_me:13149: \"$ac_try\"") >&5
13150   (eval $ac_try) 2>&5
13151   ac_status=$?
13152   echo "$as_me:13152: \$? = $ac_status" >&5
13153   (exit $ac_status); }; }; then
13154   cf_cv_sizechange=yes
13155 else
13156   echo "$as_me: failed program was:" >&5
13157 cat conftest.$ac_ext >&5
13158 cf_cv_sizechange=no
13159 fi
13160 rm -f conftest.$ac_objext conftest.$ac_ext
13161
13162         CPPFLAGS="$cf_save_CPPFLAGS"
13163         if test "$cf_cv_sizechange" = yes ; then
13164                 echo "size-change succeeded ($cf_opts)" >&5
13165                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13166                 break
13167         fi
13168 done
13169
13170 fi
13171 echo "$as_me:13171: result: $cf_cv_sizechange" >&5
13172 echo "${ECHO_T}$cf_cv_sizechange" >&6
13173 if test "$cf_cv_sizechange" != no ; then
13174         cat >>confdefs.h <<\EOF
13175 #define HAVE_SIZECHANGE 1
13176 EOF
13177
13178         case $cf_cv_sizechange in #(vi
13179         NEED*)
13180                 cat >>confdefs.h <<EOF
13181 #define $cf_cv_sizechange  1
13182 EOF
13183
13184                 ;;
13185         esac
13186 fi
13187
13188 echo "$as_me:13188: checking for memmove" >&5
13189 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13190 if test "${ac_cv_func_memmove+set}" = set; then
13191   echo $ECHO_N "(cached) $ECHO_C" >&6
13192 else
13193   cat >conftest.$ac_ext <<_ACEOF
13194 #line 13194 "configure"
13195 #include "confdefs.h"
13196 /* System header to define __stub macros and hopefully few prototypes,
13197     which can conflict with char memmove (); below.  */
13198 #include <assert.h>
13199 /* Override any gcc2 internal prototype to avoid an error.  */
13200 #ifdef __cplusplus
13201 extern "C"
13202 #endif
13203 /* We use char because int might match the return type of a gcc2
13204    builtin and then its argument prototype would still apply.  */
13205 char memmove ();
13206 char (*f) ();
13207
13208 int
13209 main ()
13210 {
13211 /* The GNU C library defines this for functions which it implements
13212     to always fail with ENOSYS.  Some functions are actually named
13213     something starting with __ and the normal name is an alias.  */
13214 #if defined (__stub_memmove) || defined (__stub___memmove)
13215 choke me
13216 #else
13217 f = memmove;
13218 #endif
13219
13220   ;
13221   return 0;
13222 }
13223 _ACEOF
13224 rm -f conftest.$ac_objext conftest$ac_exeext
13225 if { (eval echo "$as_me:13225: \"$ac_link\"") >&5
13226   (eval $ac_link) 2>&5
13227   ac_status=$?
13228   echo "$as_me:13228: \$? = $ac_status" >&5
13229   (exit $ac_status); } &&
13230          { ac_try='test -s conftest$ac_exeext'
13231   { (eval echo "$as_me:13231: \"$ac_try\"") >&5
13232   (eval $ac_try) 2>&5
13233   ac_status=$?
13234   echo "$as_me:13234: \$? = $ac_status" >&5
13235   (exit $ac_status); }; }; then
13236   ac_cv_func_memmove=yes
13237 else
13238   echo "$as_me: failed program was:" >&5
13239 cat conftest.$ac_ext >&5
13240 ac_cv_func_memmove=no
13241 fi
13242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13243 fi
13244 echo "$as_me:13244: result: $ac_cv_func_memmove" >&5
13245 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13246 if test $ac_cv_func_memmove = yes; then
13247   :
13248 else
13249
13250 echo "$as_me:13250: checking for bcopy" >&5
13251 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13252 if test "${ac_cv_func_bcopy+set}" = set; then
13253   echo $ECHO_N "(cached) $ECHO_C" >&6
13254 else
13255   cat >conftest.$ac_ext <<_ACEOF
13256 #line 13256 "configure"
13257 #include "confdefs.h"
13258 /* System header to define __stub macros and hopefully few prototypes,
13259     which can conflict with char bcopy (); below.  */
13260 #include <assert.h>
13261 /* Override any gcc2 internal prototype to avoid an error.  */
13262 #ifdef __cplusplus
13263 extern "C"
13264 #endif
13265 /* We use char because int might match the return type of a gcc2
13266    builtin and then its argument prototype would still apply.  */
13267 char bcopy ();
13268 char (*f) ();
13269
13270 int
13271 main ()
13272 {
13273 /* The GNU C library defines this for functions which it implements
13274     to always fail with ENOSYS.  Some functions are actually named
13275     something starting with __ and the normal name is an alias.  */
13276 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13277 choke me
13278 #else
13279 f = bcopy;
13280 #endif
13281
13282   ;
13283   return 0;
13284 }
13285 _ACEOF
13286 rm -f conftest.$ac_objext conftest$ac_exeext
13287 if { (eval echo "$as_me:13287: \"$ac_link\"") >&5
13288   (eval $ac_link) 2>&5
13289   ac_status=$?
13290   echo "$as_me:13290: \$? = $ac_status" >&5
13291   (exit $ac_status); } &&
13292          { ac_try='test -s conftest$ac_exeext'
13293   { (eval echo "$as_me:13293: \"$ac_try\"") >&5
13294   (eval $ac_try) 2>&5
13295   ac_status=$?
13296   echo "$as_me:13296: \$? = $ac_status" >&5
13297   (exit $ac_status); }; }; then
13298   ac_cv_func_bcopy=yes
13299 else
13300   echo "$as_me: failed program was:" >&5
13301 cat conftest.$ac_ext >&5
13302 ac_cv_func_bcopy=no
13303 fi
13304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13305 fi
13306 echo "$as_me:13306: result: $ac_cv_func_bcopy" >&5
13307 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13308 if test $ac_cv_func_bcopy = yes; then
13309
13310         echo "$as_me:13310: checking if bcopy does overlapping moves" >&5
13311 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13312 if test "${cf_cv_good_bcopy+set}" = set; then
13313   echo $ECHO_N "(cached) $ECHO_C" >&6
13314 else
13315
13316                 if test "$cross_compiling" = yes; then
13317   cf_cv_good_bcopy=unknown
13318 else
13319   cat >conftest.$ac_ext <<_ACEOF
13320 #line 13320 "configure"
13321 #include "confdefs.h"
13322
13323 int main() {
13324         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13325         char temp[40];
13326         bcopy(data, temp, sizeof(data));
13327         bcopy(temp+10, temp, 15);
13328         bcopy(temp+5, temp+15, 10);
13329         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13330 }
13331
13332 _ACEOF
13333 rm -f conftest$ac_exeext
13334 if { (eval echo "$as_me:13334: \"$ac_link\"") >&5
13335   (eval $ac_link) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13339   { (eval echo "$as_me:13339: \"$ac_try\"") >&5
13340   (eval $ac_try) 2>&5
13341   ac_status=$?
13342   echo "$as_me:13342: \$? = $ac_status" >&5
13343   (exit $ac_status); }; }; then
13344   cf_cv_good_bcopy=yes
13345 else
13346   echo "$as_me: program exited with status $ac_status" >&5
13347 echo "$as_me: failed program was:" >&5
13348 cat conftest.$ac_ext >&5
13349 cf_cv_good_bcopy=no
13350 fi
13351 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13352 fi
13353
13354 fi
13355 echo "$as_me:13355: result: $cf_cv_good_bcopy" >&5
13356 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13357
13358 else
13359   cf_cv_good_bcopy=no
13360 fi
13361
13362         if test "$cf_cv_good_bcopy" = yes ; then
13363                 cat >>confdefs.h <<\EOF
13364 #define USE_OK_BCOPY 1
13365 EOF
13366
13367         else
13368                 cat >>confdefs.h <<\EOF
13369 #define USE_MY_MEMMOVE 1
13370 EOF
13371
13372         fi
13373
13374 fi
13375
13376 echo "$as_me:13376: checking if poll really works" >&5
13377 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13378 if test "${cf_cv_working_poll+set}" = set; then
13379   echo $ECHO_N "(cached) $ECHO_C" >&6
13380 else
13381
13382 if test "$cross_compiling" = yes; then
13383   cf_cv_working_poll=unknown
13384 else
13385   cat >conftest.$ac_ext <<_ACEOF
13386 #line 13386 "configure"
13387 #include "confdefs.h"
13388
13389 #include <stdio.h>
13390 #ifdef HAVE_POLL_H
13391 #include <poll.h>
13392 #else
13393 #include <sys/poll.h>
13394 #endif
13395 int main() {
13396         struct pollfd myfds;
13397         int ret;
13398
13399         myfds.fd = 0;
13400         myfds.events = POLLIN;
13401
13402         ret = poll(&myfds, 1, 100);
13403         ${cf_cv_main_return:-return}(ret != 0);
13404 }
13405 _ACEOF
13406 rm -f conftest$ac_exeext
13407 if { (eval echo "$as_me:13407: \"$ac_link\"") >&5
13408   (eval $ac_link) 2>&5
13409   ac_status=$?
13410   echo "$as_me:13410: \$? = $ac_status" >&5
13411   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13412   { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413   (eval $ac_try) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); }; }; then
13417   cf_cv_working_poll=yes
13418 else
13419   echo "$as_me: program exited with status $ac_status" >&5
13420 echo "$as_me: failed program was:" >&5
13421 cat conftest.$ac_ext >&5
13422 cf_cv_working_poll=no
13423 fi
13424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13425 fi
13426 fi
13427 echo "$as_me:13427: result: $cf_cv_working_poll" >&5
13428 echo "${ECHO_T}$cf_cv_working_poll" >&6
13429 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13430 #define HAVE_WORKING_POLL 1
13431 EOF
13432
13433 if test "$with_hashed_db" != no ; then
13434         cat >>confdefs.h <<\EOF
13435 #define USE_HASHED_DB 1
13436 EOF
13437
13438 echo "$as_me:13438: checking for db.h" >&5
13439 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13440 if test "${ac_cv_header_db_h+set}" = set; then
13441   echo $ECHO_N "(cached) $ECHO_C" >&6
13442 else
13443   cat >conftest.$ac_ext <<_ACEOF
13444 #line 13444 "configure"
13445 #include "confdefs.h"
13446 #include <db.h>
13447 _ACEOF
13448 if { (eval echo "$as_me:13448: \"$ac_cpp conftest.$ac_ext\"") >&5
13449   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13450   ac_status=$?
13451   egrep -v '^ *\+' conftest.er1 >conftest.err
13452   rm -f conftest.er1
13453   cat conftest.err >&5
13454   echo "$as_me:13454: \$? = $ac_status" >&5
13455   (exit $ac_status); } >/dev/null; then
13456   if test -s conftest.err; then
13457     ac_cpp_err=$ac_c_preproc_warn_flag
13458   else
13459     ac_cpp_err=
13460   fi
13461 else
13462   ac_cpp_err=yes
13463 fi
13464 if test -z "$ac_cpp_err"; then
13465   ac_cv_header_db_h=yes
13466 else
13467   echo "$as_me: failed program was:" >&5
13468   cat conftest.$ac_ext >&5
13469   ac_cv_header_db_h=no
13470 fi
13471 rm -f conftest.err conftest.$ac_ext
13472 fi
13473 echo "$as_me:13473: result: $ac_cv_header_db_h" >&5
13474 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13475 if test $ac_cv_header_db_h = yes; then
13476
13477 echo "$as_me:13477: checking for version of db" >&5
13478 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13479 if test "${cf_cv_hashed_db_version+set}" = set; then
13480   echo $ECHO_N "(cached) $ECHO_C" >&6
13481 else
13482
13483 cf_cv_hashed_db_version=unknown
13484
13485 for cf_db_version in 1 2 3 4
13486 do
13487
13488 echo "${as_me-configure}:13488: testing checking for db version $cf_db_version ..." 1>&5
13489
13490         cat >conftest.$ac_ext <<_ACEOF
13491 #line 13491 "configure"
13492 #include "confdefs.h"
13493
13494 $ac_includes_default
13495 #include <db.h>
13496
13497 #ifdef DB_VERSION_MAJOR
13498         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13499 #if $cf_db_version == DB_VERSION_MAJOR
13500         /* ok */
13501 #else
13502         make an error
13503 #endif
13504 #else
13505 #if $cf_db_version == 1
13506         /* ok: assuming this is DB 1.8.5 */
13507 #else
13508         make an error
13509 #endif
13510 #endif
13511
13512 int
13513 main ()
13514 {
13515 DBT *foo = 0
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext
13521 if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5
13522   (eval $ac_compile) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest.$ac_objext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532
13533         cf_cv_hashed_db_version=$cf_db_version
13534         break
13535
13536 else
13537   echo "$as_me: failed program was:" >&5
13538 cat conftest.$ac_ext >&5
13539 fi
13540 rm -f conftest.$ac_objext conftest.$ac_ext
13541 done
13542
13543 fi
13544 echo "$as_me:13544: result: $cf_cv_hashed_db_version" >&5
13545 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13546
13547 if test "$cf_cv_hashed_db_version" = unknown ; then
13548         { { echo "$as_me:13548: error: Cannot determine version of db" >&5
13549 echo "$as_me: error: Cannot determine version of db" >&2;}
13550    { (exit 1); exit 1; }; }
13551 else
13552
13553 echo "$as_me:13553: checking for db libraries" >&5
13554 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13555 if test "${cf_cv_hashed_db_libs+set}" = set; then
13556   echo $ECHO_N "(cached) $ECHO_C" >&6
13557 else
13558
13559 cf_cv_hashed_db_libs=unknown
13560 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13561 do
13562         cf_save_libs="$LIBS"
13563         if test -n "$cf_db_libs"; then
13564                 LIBS="-l$cf_db_libs $LIBS"
13565         fi
13566
13567 echo "${as_me-configure}:13567: testing checking for library "$cf_db_libs" ..." 1>&5
13568
13569         cat >conftest.$ac_ext <<_ACEOF
13570 #line 13570 "configure"
13571 #include "confdefs.h"
13572
13573 $ac_includes_default
13574 #include <db.h>
13575
13576 int
13577 main ()
13578 {
13579
13580         char *path = "/tmp/foo";
13581 #ifdef DB_VERSION_MAJOR
13582 #if DB_VERSION_MAJOR >= 4
13583         DB *result = 0;
13584         db_create(&result, NULL, 0);
13585         result->open(result,
13586                 NULL,
13587                 path,
13588                 path,
13589                 DB_HASH,
13590                 DB_CREATE,
13591                 0644);
13592 #elif DB_VERSION_MAJOR >= 3
13593         DB *result = 0;
13594         db_create(&result, NULL, 0);
13595         result->open(result,
13596                 path,
13597                 path,
13598                 DB_HASH,
13599                 DB_CREATE,
13600                 0644);
13601 #elif DB_VERSION_MAJOR >= 2
13602         DB *result = 0;
13603         db_open(path,
13604                 DB_HASH,
13605                 DB_CREATE,
13606                 0644,
13607                 (DB_ENV *) 0,
13608                 (DB_INFO *) 0,
13609                 &result);
13610 #endif /* DB_VERSION_MAJOR */
13611 #else
13612         DB *result = dbopen(path,
13613                      2,
13614                      0644,
13615                      DB_HASH,
13616                      0);
13617 #endif
13618         ${cf_cv_main_return:-return}(result != 0)
13619
13620   ;
13621   return 0;
13622 }
13623 _ACEOF
13624 rm -f conftest.$ac_objext conftest$ac_exeext
13625 if { (eval echo "$as_me:13625: \"$ac_link\"") >&5
13626   (eval $ac_link) 2>&5
13627   ac_status=$?
13628   echo "$as_me:13628: \$? = $ac_status" >&5
13629   (exit $ac_status); } &&
13630          { ac_try='test -s conftest$ac_exeext'
13631   { (eval echo "$as_me:13631: \"$ac_try\"") >&5
13632   (eval $ac_try) 2>&5
13633   ac_status=$?
13634   echo "$as_me:13634: \$? = $ac_status" >&5
13635   (exit $ac_status); }; }; then
13636
13637         if test -n "$cf_db_libs" ; then
13638                 cf_cv_hashed_db_libs=$cf_db_libs
13639         else
13640                 cf_cv_hashed_db_libs=default
13641         fi
13642         LIBS="$cf_save_libs"
13643         break
13644
13645 else
13646   echo "$as_me: failed program was:" >&5
13647 cat conftest.$ac_ext >&5
13648 fi
13649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13650         LIBS="$cf_save_libs"
13651 done
13652
13653 fi
13654 echo "$as_me:13654: result: $cf_cv_hashed_db_libs" >&5
13655 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13656
13657         if test "$cf_cv_hashed_db_libs" = unknown ; then
13658                 { { echo "$as_me:13658: error: Cannot determine library for db" >&5
13659 echo "$as_me: error: Cannot determine library for db" >&2;}
13660    { (exit 1); exit 1; }; }
13661         elif test "$cf_cv_hashed_db_libs" != default ; then
13662                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13663         fi
13664 fi
13665
13666 else
13667
13668         { { echo "$as_me:13668: error: Cannot find db.h" >&5
13669 echo "$as_me: error: Cannot find db.h" >&2;}
13670    { (exit 1); exit 1; }; }
13671
13672 fi
13673
13674 fi
13675
13676 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13677         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13678         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13679 fi
13680
13681 # Just in case, check if the C compiler has a bool type.
13682
13683 echo "$as_me:13683: checking if we should include stdbool.h" >&5
13684 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13685
13686 if test "${cf_cv_header_stdbool_h+set}" = set; then
13687   echo $ECHO_N "(cached) $ECHO_C" >&6
13688 else
13689
13690         cat >conftest.$ac_ext <<_ACEOF
13691 #line 13691 "configure"
13692 #include "confdefs.h"
13693
13694 int
13695 main ()
13696 {
13697 bool foo = false
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 rm -f conftest.$ac_objext
13703 if { (eval echo "$as_me:13703: \"$ac_compile\"") >&5
13704   (eval $ac_compile) 2>&5
13705   ac_status=$?
13706   echo "$as_me:13706: \$? = $ac_status" >&5
13707   (exit $ac_status); } &&
13708          { ac_try='test -s conftest.$ac_objext'
13709   { (eval echo "$as_me:13709: \"$ac_try\"") >&5
13710   (eval $ac_try) 2>&5
13711   ac_status=$?
13712   echo "$as_me:13712: \$? = $ac_status" >&5
13713   (exit $ac_status); }; }; then
13714   cf_cv_header_stdbool_h=0
13715 else
13716   echo "$as_me: failed program was:" >&5
13717 cat conftest.$ac_ext >&5
13718 cat >conftest.$ac_ext <<_ACEOF
13719 #line 13719 "configure"
13720 #include "confdefs.h"
13721
13722 #ifndef __BEOS__
13723 #include <stdbool.h>
13724 #endif
13725
13726 int
13727 main ()
13728 {
13729 bool foo = false
13730   ;
13731   return 0;
13732 }
13733 _ACEOF
13734 rm -f conftest.$ac_objext
13735 if { (eval echo "$as_me:13735: \"$ac_compile\"") >&5
13736   (eval $ac_compile) 2>&5
13737   ac_status=$?
13738   echo "$as_me:13738: \$? = $ac_status" >&5
13739   (exit $ac_status); } &&
13740          { ac_try='test -s conftest.$ac_objext'
13741   { (eval echo "$as_me:13741: \"$ac_try\"") >&5
13742   (eval $ac_try) 2>&5
13743   ac_status=$?
13744   echo "$as_me:13744: \$? = $ac_status" >&5
13745   (exit $ac_status); }; }; then
13746   cf_cv_header_stdbool_h=1
13747 else
13748   echo "$as_me: failed program was:" >&5
13749 cat conftest.$ac_ext >&5
13750 cf_cv_header_stdbool_h=0
13751 fi
13752 rm -f conftest.$ac_objext conftest.$ac_ext
13753 fi
13754 rm -f conftest.$ac_objext conftest.$ac_ext
13755 fi
13756
13757 if test "$cf_cv_header_stdbool_h" = 1
13758 then    echo "$as_me:13758: result: yes" >&5
13759 echo "${ECHO_T}yes" >&6
13760 else    echo "$as_me:13760: result: no" >&5
13761 echo "${ECHO_T}no" >&6
13762 fi
13763
13764 echo "$as_me:13764: checking for builtin bool type" >&5
13765 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13766
13767 if test "${cf_cv_cc_bool_type+set}" = set; then
13768   echo $ECHO_N "(cached) $ECHO_C" >&6
13769 else
13770
13771         cat >conftest.$ac_ext <<_ACEOF
13772 #line 13772 "configure"
13773 #include "confdefs.h"
13774
13775 #include <stdio.h>
13776 #include <sys/types.h>
13777
13778 int
13779 main ()
13780 {
13781 bool x = false
13782   ;
13783   return 0;
13784 }
13785 _ACEOF
13786 rm -f conftest.$ac_objext
13787 if { (eval echo "$as_me:13787: \"$ac_compile\"") >&5
13788   (eval $ac_compile) 2>&5
13789   ac_status=$?
13790   echo "$as_me:13790: \$? = $ac_status" >&5
13791   (exit $ac_status); } &&
13792          { ac_try='test -s conftest.$ac_objext'
13793   { (eval echo "$as_me:13793: \"$ac_try\"") >&5
13794   (eval $ac_try) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit $ac_status); }; }; then
13798   cf_cv_cc_bool_type=1
13799 else
13800   echo "$as_me: failed program was:" >&5
13801 cat conftest.$ac_ext >&5
13802 cf_cv_cc_bool_type=0
13803 fi
13804 rm -f conftest.$ac_objext conftest.$ac_ext
13805
13806 fi
13807
13808 if test "$cf_cv_cc_bool_type" = 1
13809 then    echo "$as_me:13809: result: yes" >&5
13810 echo "${ECHO_T}yes" >&6
13811 else    echo "$as_me:13811: result: no" >&5
13812 echo "${ECHO_T}no" >&6
13813 fi
13814
13815 # Check for C++ compiler characteristics (and ensure that it's there!)
13816 if test -n "$CXX" ; then
13817         ac_ext=cc
13818 ac_cpp='$CXXCPP $CPPFLAGS'
13819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13820 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13822 ac_main_return=return
13823
13824 if test -n "$GXX" ; then
13825 case $cf_cv_system_name in #(vi
13826 os2*) #(vi
13827         cf_stdcpp_libname=stdcpp
13828         ;;
13829 *)
13830         cf_stdcpp_libname=stdc++
13831         ;;
13832 esac
13833 echo "$as_me:13833: checking for library $cf_stdcpp_libname" >&5
13834 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13835 if test "${cf_cv_libstdcpp+set}" = set; then
13836   echo $ECHO_N "(cached) $ECHO_C" >&6
13837 else
13838
13839         cf_save="$LIBS"
13840         LIBS="$LIBS -l$cf_stdcpp_libname"
13841 cat >conftest.$ac_ext <<_ACEOF
13842 #line 13842 "configure"
13843 #include "confdefs.h"
13844
13845 #include <strstream.h>
13846 int
13847 main ()
13848 {
13849
13850 char buf[80];
13851 strstreambuf foo(buf, sizeof(buf))
13852
13853   ;
13854   return 0;
13855 }
13856 _ACEOF
13857 rm -f conftest.$ac_objext conftest$ac_exeext
13858 if { (eval echo "$as_me:13858: \"$ac_link\"") >&5
13859   (eval $ac_link) 2>&5
13860   ac_status=$?
13861   echo "$as_me:13861: \$? = $ac_status" >&5
13862   (exit $ac_status); } &&
13863          { ac_try='test -s conftest$ac_exeext'
13864   { (eval echo "$as_me:13864: \"$ac_try\"") >&5
13865   (eval $ac_try) 2>&5
13866   ac_status=$?
13867   echo "$as_me:13867: \$? = $ac_status" >&5
13868   (exit $ac_status); }; }; then
13869   cf_cv_libstdcpp=yes
13870 else
13871   echo "$as_me: failed program was:" >&5
13872 cat conftest.$ac_ext >&5
13873 cf_cv_libstdcpp=no
13874 fi
13875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13876         LIBS="$cf_save"
13877
13878 fi
13879 echo "$as_me:13879: result: $cf_cv_libstdcpp" >&5
13880 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13881 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13882 fi
13883
13884         echo "$as_me:13884: checking whether $CXX understands -c and -o together" >&5
13885 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13886 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13887   echo $ECHO_N "(cached) $ECHO_C" >&6
13888 else
13889
13890 cat > conftest.$ac_ext <<CF_EOF
13891 #include <stdio.h>
13892 int main()
13893 {
13894         ${cf_cv_main_return:-return}(0);
13895 }
13896 CF_EOF
13897 # We do the test twice because some compilers refuse to overwrite an
13898 # existing .o file with -o, though they will create one.
13899 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13900 if { (eval echo "$as_me:13900: \"$ac_try\"") >&5
13901   (eval $ac_try) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit $ac_status); } &&
13905   test -f conftest2.$ac_objext && { (eval echo "$as_me:13905: \"$ac_try\"") >&5
13906   (eval $ac_try) 2>&5
13907   ac_status=$?
13908   echo "$as_me:13908: \$? = $ac_status" >&5
13909   (exit $ac_status); };
13910 then
13911   eval cf_cv_prog_CXX_c_o=yes
13912 else
13913   eval cf_cv_prog_CXX_c_o=no
13914 fi
13915 rm -f conftest*
13916
13917 fi
13918 if test $cf_cv_prog_CXX_c_o = yes; then
13919   echo "$as_me:13919: result: yes" >&5
13920 echo "${ECHO_T}yes" >&6
13921 else
13922   echo "$as_me:13922: result: no" >&5
13923 echo "${ECHO_T}no" >&6
13924 fi
13925
13926         case $GXX_VERSION in
13927         1*|2.0-6*)
13928                 cf_cxx_library=yes
13929                 ;;
13930         *-2.7*|2.7*)
13931
13932 cf_cxx_library=unknown
13933 case $cf_cv_system_name in #(vi
13934 os2*) #(vi
13935         cf_gpp_libname=gpp
13936         ;;
13937 *)
13938         cf_gpp_libname=g++
13939         ;;
13940 esac
13941 if test "$GXX" = yes; then
13942         echo "$as_me:13942: checking for lib$cf_gpp_libname" >&5
13943 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13944         cf_save="$LIBS"
13945         LIBS="$LIBS -l$cf_gpp_libname"
13946         cat >conftest.$ac_ext <<_ACEOF
13947 #line 13947 "configure"
13948 #include "confdefs.h"
13949
13950 #include <$cf_gpp_libname/builtin.h>
13951
13952 int
13953 main ()
13954 {
13955 two_arg_error_handler_t foo2 = lib_error_handler
13956   ;
13957   return 0;
13958 }
13959 _ACEOF
13960 rm -f conftest.$ac_objext conftest$ac_exeext
13961 if { (eval echo "$as_me:13961: \"$ac_link\"") >&5
13962   (eval $ac_link) 2>&5
13963   ac_status=$?
13964   echo "$as_me:13964: \$? = $ac_status" >&5
13965   (exit $ac_status); } &&
13966          { ac_try='test -s conftest$ac_exeext'
13967   { (eval echo "$as_me:13967: \"$ac_try\"") >&5
13968   (eval $ac_try) 2>&5
13969   ac_status=$?
13970   echo "$as_me:13970: \$? = $ac_status" >&5
13971   (exit $ac_status); }; }; then
13972   cf_cxx_library=yes
13973          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13974          if test "$cf_gpp_libname" = cpp ; then
13975             cat >>confdefs.h <<\EOF
13976 #define HAVE_GPP_BUILTIN_H 1
13977 EOF
13978
13979          else
13980             cat >>confdefs.h <<\EOF
13981 #define HAVE_GXX_BUILTIN_H 1
13982 EOF
13983
13984          fi
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat conftest.$ac_ext >&5
13988 cat >conftest.$ac_ext <<_ACEOF
13989 #line 13989 "configure"
13990 #include "confdefs.h"
13991
13992 #include <builtin.h>
13993
13994 int
13995 main ()
13996 {
13997 two_arg_error_handler_t foo2 = lib_error_handler
13998   ;
13999   return 0;
14000 }
14001 _ACEOF
14002 rm -f conftest.$ac_objext conftest$ac_exeext
14003 if { (eval echo "$as_me:14003: \"$ac_link\"") >&5
14004   (eval $ac_link) 2>&5
14005   ac_status=$?
14006   echo "$as_me:14006: \$? = $ac_status" >&5
14007   (exit $ac_status); } &&
14008          { ac_try='test -s conftest$ac_exeext'
14009   { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   cf_cxx_library=yes
14015          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14016          cat >>confdefs.h <<\EOF
14017 #define HAVE_BUILTIN_H 1
14018 EOF
14019
14020 else
14021   echo "$as_me: failed program was:" >&5
14022 cat conftest.$ac_ext >&5
14023 cf_cxx_library=no
14024 fi
14025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14026 fi
14027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14028         LIBS="$cf_save"
14029         echo "$as_me:14029: result: $cf_cxx_library" >&5
14030 echo "${ECHO_T}$cf_cxx_library" >&6
14031 fi
14032
14033                 ;;
14034         *)
14035                 cf_cxx_library=no
14036                 ;;
14037         esac
14038
14039         ac_ext=cc
14040 ac_cpp='$CXXCPP $CPPFLAGS'
14041 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14042 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14043 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14044 ac_main_return=return
14045 echo "$as_me:14045: checking how to run the C++ preprocessor" >&5
14046 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14047 if test -z "$CXXCPP"; then
14048   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 else
14051       # Double quotes because CXXCPP needs to be expanded
14052     for CXXCPP in "$CXX -E" "/lib/cpp"
14053     do
14054       ac_preproc_ok=false
14055 for ac_cxx_preproc_warn_flag in '' yes
14056 do
14057   # Use a header file that comes with gcc, so configuring glibc
14058   # with a fresh cross-compiler works.
14059   # On the NeXT, cc -E runs the code through the compiler's parser,
14060   # not just through cpp. "Syntax error" is here to catch this case.
14061   cat >conftest.$ac_ext <<_ACEOF
14062 #line 14062 "configure"
14063 #include "confdefs.h"
14064 #include <assert.h>
14065                      Syntax error
14066 _ACEOF
14067 if { (eval echo "$as_me:14067: \"$ac_cpp conftest.$ac_ext\"") >&5
14068   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14069   ac_status=$?
14070   egrep -v '^ *\+' conftest.er1 >conftest.err
14071   rm -f conftest.er1
14072   cat conftest.err >&5
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit $ac_status); } >/dev/null; then
14075   if test -s conftest.err; then
14076     ac_cpp_err=$ac_cxx_preproc_warn_flag
14077   else
14078     ac_cpp_err=
14079   fi
14080 else
14081   ac_cpp_err=yes
14082 fi
14083 if test -z "$ac_cpp_err"; then
14084   :
14085 else
14086   echo "$as_me: failed program was:" >&5
14087   cat conftest.$ac_ext >&5
14088   # Broken: fails on valid input.
14089 continue
14090 fi
14091 rm -f conftest.err conftest.$ac_ext
14092
14093   # OK, works on sane cases.  Now check whether non-existent headers
14094   # can be detected and how.
14095   cat >conftest.$ac_ext <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098 #include <ac_nonexistent.h>
14099 _ACEOF
14100 if { (eval echo "$as_me:14100: \"$ac_cpp conftest.$ac_ext\"") >&5
14101   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14102   ac_status=$?
14103   egrep -v '^ *\+' conftest.er1 >conftest.err
14104   rm -f conftest.er1
14105   cat conftest.err >&5
14106   echo "$as_me:14106: \$? = $ac_status" >&5
14107   (exit $ac_status); } >/dev/null; then
14108   if test -s conftest.err; then
14109     ac_cpp_err=$ac_cxx_preproc_warn_flag
14110   else
14111     ac_cpp_err=
14112   fi
14113 else
14114   ac_cpp_err=yes
14115 fi
14116 if test -z "$ac_cpp_err"; then
14117   # Broken: success on invalid input.
14118 continue
14119 else
14120   echo "$as_me: failed program was:" >&5
14121   cat conftest.$ac_ext >&5
14122   # Passes both tests.
14123 ac_preproc_ok=:
14124 break
14125 fi
14126 rm -f conftest.err conftest.$ac_ext
14127
14128 done
14129 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14130 rm -f conftest.err conftest.$ac_ext
14131 if $ac_preproc_ok; then
14132   break
14133 fi
14134
14135     done
14136     ac_cv_prog_CXXCPP=$CXXCPP
14137
14138 fi
14139   CXXCPP=$ac_cv_prog_CXXCPP
14140 else
14141   ac_cv_prog_CXXCPP=$CXXCPP
14142 fi
14143 echo "$as_me:14143: result: $CXXCPP" >&5
14144 echo "${ECHO_T}$CXXCPP" >&6
14145 ac_preproc_ok=false
14146 for ac_cxx_preproc_warn_flag in '' yes
14147 do
14148   # Use a header file that comes with gcc, so configuring glibc
14149   # with a fresh cross-compiler works.
14150   # On the NeXT, cc -E runs the code through the compiler's parser,
14151   # not just through cpp. "Syntax error" is here to catch this case.
14152   cat >conftest.$ac_ext <<_ACEOF
14153 #line 14153 "configure"
14154 #include "confdefs.h"
14155 #include <assert.h>
14156                      Syntax error
14157 _ACEOF
14158 if { (eval echo "$as_me:14158: \"$ac_cpp conftest.$ac_ext\"") >&5
14159   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14160   ac_status=$?
14161   egrep -v '^ *\+' conftest.er1 >conftest.err
14162   rm -f conftest.er1
14163   cat conftest.err >&5
14164   echo "$as_me:14164: \$? = $ac_status" >&5
14165   (exit $ac_status); } >/dev/null; then
14166   if test -s conftest.err; then
14167     ac_cpp_err=$ac_cxx_preproc_warn_flag
14168   else
14169     ac_cpp_err=
14170   fi
14171 else
14172   ac_cpp_err=yes
14173 fi
14174 if test -z "$ac_cpp_err"; then
14175   :
14176 else
14177   echo "$as_me: failed program was:" >&5
14178   cat conftest.$ac_ext >&5
14179   # Broken: fails on valid input.
14180 continue
14181 fi
14182 rm -f conftest.err conftest.$ac_ext
14183
14184   # OK, works on sane cases.  Now check whether non-existent headers
14185   # can be detected and how.
14186   cat >conftest.$ac_ext <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189 #include <ac_nonexistent.h>
14190 _ACEOF
14191 if { (eval echo "$as_me:14191: \"$ac_cpp conftest.$ac_ext\"") >&5
14192   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14193   ac_status=$?
14194   egrep -v '^ *\+' conftest.er1 >conftest.err
14195   rm -f conftest.er1
14196   cat conftest.err >&5
14197   echo "$as_me:14197: \$? = $ac_status" >&5
14198   (exit $ac_status); } >/dev/null; then
14199   if test -s conftest.err; then
14200     ac_cpp_err=$ac_cxx_preproc_warn_flag
14201   else
14202     ac_cpp_err=
14203   fi
14204 else
14205   ac_cpp_err=yes
14206 fi
14207 if test -z "$ac_cpp_err"; then
14208   # Broken: success on invalid input.
14209 continue
14210 else
14211   echo "$as_me: failed program was:" >&5
14212   cat conftest.$ac_ext >&5
14213   # Passes both tests.
14214 ac_preproc_ok=:
14215 break
14216 fi
14217 rm -f conftest.err conftest.$ac_ext
14218
14219 done
14220 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14221 rm -f conftest.err conftest.$ac_ext
14222 if $ac_preproc_ok; then
14223   :
14224 else
14225   { { echo "$as_me:14225: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14226 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14227    { (exit 1); exit 1; }; }
14228 fi
14229
14230 ac_ext=cc
14231 ac_cpp='$CXXCPP $CPPFLAGS'
14232 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14233 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14234 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14235 ac_main_return=return
14236
14237 for ac_header in iostream typeinfo
14238 do
14239 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14240 echo "$as_me:14240: checking for $ac_header" >&5
14241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >conftest.$ac_ext <<_ACEOF
14246 #line 14246 "configure"
14247 #include "confdefs.h"
14248 #include <$ac_header>
14249 _ACEOF
14250 if { (eval echo "$as_me:14250: \"$ac_cpp conftest.$ac_ext\"") >&5
14251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14252   ac_status=$?
14253   egrep -v '^ *\+' conftest.er1 >conftest.err
14254   rm -f conftest.er1
14255   cat conftest.err >&5
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit $ac_status); } >/dev/null; then
14258   if test -s conftest.err; then
14259     ac_cpp_err=$ac_cxx_preproc_warn_flag
14260   else
14261     ac_cpp_err=
14262   fi
14263 else
14264   ac_cpp_err=yes
14265 fi
14266 if test -z "$ac_cpp_err"; then
14267   eval "$as_ac_Header=yes"
14268 else
14269   echo "$as_me: failed program was:" >&5
14270   cat conftest.$ac_ext >&5
14271   eval "$as_ac_Header=no"
14272 fi
14273 rm -f conftest.err conftest.$ac_ext
14274 fi
14275 echo "$as_me:14275: result: `eval echo '${'$as_ac_Header'}'`" >&5
14276 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14277 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14278   cat >>confdefs.h <<EOF
14279 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14280 EOF
14281
14282 fi
14283 done
14284
14285 echo "$as_me:14285: checking if we should include stdbool.h" >&5
14286 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14287
14288 if test "${cf_cv_header_stdbool_h+set}" = set; then
14289   echo $ECHO_N "(cached) $ECHO_C" >&6
14290 else
14291
14292         cat >conftest.$ac_ext <<_ACEOF
14293 #line 14293 "configure"
14294 #include "confdefs.h"
14295
14296 int
14297 main ()
14298 {
14299 bool foo = false
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f conftest.$ac_objext
14305 if { (eval echo "$as_me:14305: \"$ac_compile\"") >&5
14306   (eval $ac_compile) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit $ac_status); } &&
14310          { ac_try='test -s conftest.$ac_objext'
14311   { (eval echo "$as_me:14311: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); }; }; then
14316   cf_cv_header_stdbool_h=0
14317 else
14318   echo "$as_me: failed program was:" >&5
14319 cat conftest.$ac_ext >&5
14320 cat >conftest.$ac_ext <<_ACEOF
14321 #line 14321 "configure"
14322 #include "confdefs.h"
14323
14324 #ifndef __BEOS__
14325 #include <stdbool.h>
14326 #endif
14327
14328 int
14329 main ()
14330 {
14331 bool foo = false
14332   ;
14333   return 0;
14334 }
14335 _ACEOF
14336 rm -f conftest.$ac_objext
14337 if { (eval echo "$as_me:14337: \"$ac_compile\"") >&5
14338   (eval $ac_compile) 2>&5
14339   ac_status=$?
14340   echo "$as_me:14340: \$? = $ac_status" >&5
14341   (exit $ac_status); } &&
14342          { ac_try='test -s conftest.$ac_objext'
14343   { (eval echo "$as_me:14343: \"$ac_try\"") >&5
14344   (eval $ac_try) 2>&5
14345   ac_status=$?
14346   echo "$as_me:14346: \$? = $ac_status" >&5
14347   (exit $ac_status); }; }; then
14348   cf_cv_header_stdbool_h=1
14349 else
14350   echo "$as_me: failed program was:" >&5
14351 cat conftest.$ac_ext >&5
14352 cf_cv_header_stdbool_h=0
14353 fi
14354 rm -f conftest.$ac_objext conftest.$ac_ext
14355 fi
14356 rm -f conftest.$ac_objext conftest.$ac_ext
14357 fi
14358
14359 if test "$cf_cv_header_stdbool_h" = 1
14360 then    echo "$as_me:14360: result: yes" >&5
14361 echo "${ECHO_T}yes" >&6
14362 else    echo "$as_me:14362: result: no" >&5
14363 echo "${ECHO_T}no" >&6
14364 fi
14365
14366 echo "$as_me:14366: checking for builtin bool type" >&5
14367 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14368
14369 if test "${cf_cv_builtin_bool+set}" = set; then
14370   echo $ECHO_N "(cached) $ECHO_C" >&6
14371 else
14372
14373         cat >conftest.$ac_ext <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14376
14377 #include <stdio.h>
14378 #include <sys/types.h>
14379
14380 int
14381 main ()
14382 {
14383 bool x = false
14384   ;
14385   return 0;
14386 }
14387 _ACEOF
14388 rm -f conftest.$ac_objext
14389 if { (eval echo "$as_me:14389: \"$ac_compile\"") >&5
14390   (eval $ac_compile) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit $ac_status); } &&
14394          { ac_try='test -s conftest.$ac_objext'
14395   { (eval echo "$as_me:14395: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit $ac_status); }; }; then
14400   cf_cv_builtin_bool=1
14401 else
14402   echo "$as_me: failed program was:" >&5
14403 cat conftest.$ac_ext >&5
14404 cf_cv_builtin_bool=0
14405 fi
14406 rm -f conftest.$ac_objext conftest.$ac_ext
14407
14408 fi
14409
14410 if test "$cf_cv_builtin_bool" = 1
14411 then    echo "$as_me:14411: result: yes" >&5
14412 echo "${ECHO_T}yes" >&6
14413 else    echo "$as_me:14413: result: no" >&5
14414 echo "${ECHO_T}no" >&6
14415 fi
14416
14417 echo "$as_me:14417: checking for size of bool" >&5
14418 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14419 if test "${cf_cv_type_of_bool+set}" = set; then
14420   echo $ECHO_N "(cached) $ECHO_C" >&6
14421 else
14422
14423         rm -f cf_test.out
14424         if test "$cross_compiling" = yes; then
14425   cf_cv_type_of_bool=unknown
14426 else
14427   cat >conftest.$ac_ext <<_ACEOF
14428 #line 14428 "configure"
14429 #include "confdefs.h"
14430
14431 #include <stdlib.h>
14432 #include <stdio.h>
14433
14434 #if defined(__cplusplus)
14435
14436 #ifdef HAVE_GXX_BUILTIN_H
14437 #include <g++/builtin.h>
14438 #elif HAVE_GPP_BUILTIN_H
14439 #include <gpp/builtin.h>
14440 #elif HAVE_BUILTIN_H
14441 #include <builtin.h>
14442 #endif
14443
14444 #else
14445
14446 #if $cf_cv_header_stdbool_h
14447 #include <stdbool.h>
14448 #endif
14449
14450 #endif
14451
14452 main()
14453 {
14454         FILE *fp = fopen("cf_test.out", "w");
14455         if (fp != 0) {
14456                 bool x = true;
14457                 if ((bool)(-x) >= 0)
14458                         fputs("unsigned ", fp);
14459                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14460                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14461                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14462                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14463                 fclose(fp);
14464         }
14465         ${cf_cv_main_return:-return}(0);
14466 }
14467
14468 _ACEOF
14469 rm -f conftest$ac_exeext
14470 if { (eval echo "$as_me:14470: \"$ac_link\"") >&5
14471   (eval $ac_link) 2>&5
14472   ac_status=$?
14473   echo "$as_me:14473: \$? = $ac_status" >&5
14474   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14475   { (eval echo "$as_me:14475: \"$ac_try\"") >&5
14476   (eval $ac_try) 2>&5
14477   ac_status=$?
14478   echo "$as_me:14478: \$? = $ac_status" >&5
14479   (exit $ac_status); }; }; then
14480   cf_cv_type_of_bool=`cat cf_test.out`
14481                  if test -z "$cf_cv_type_of_bool"; then
14482                    cf_cv_type_of_bool=unknown
14483                  fi
14484 else
14485   echo "$as_me: program exited with status $ac_status" >&5
14486 echo "$as_me: failed program was:" >&5
14487 cat conftest.$ac_ext >&5
14488 cf_cv_type_of_bool=unknown
14489 fi
14490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14491 fi
14492
14493 fi
14494
14495         rm -f cf_test.out
14496 echo "$as_me:14496: result: $cf_cv_type_of_bool" >&5
14497 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14498 if test "$cf_cv_type_of_bool" = unknown ; then
14499         case .$NCURSES_BOOL in #(vi
14500         .auto|.) NCURSES_BOOL=unsigned;;
14501         esac
14502         { echo "$as_me:14502: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14503 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14504         cf_cv_type_of_bool=$NCURSES_BOOL
14505 fi
14506
14507 echo "$as_me:14507: checking for special defines needed for etip.h" >&5
14508 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14509 cf_save_CXXFLAGS="$CXXFLAGS"
14510 cf_result="none"
14511 for cf_math in "" MATH_H
14512 do
14513 for cf_excp in "" MATH_EXCEPTION
14514 do
14515         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14516         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14517         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14518 cat >conftest.$ac_ext <<_ACEOF
14519 #line 14519 "configure"
14520 #include "confdefs.h"
14521
14522 #include <etip.h.in>
14523
14524 int
14525 main ()
14526 {
14527
14528   ;
14529   return 0;
14530 }
14531 _ACEOF
14532 rm -f conftest.$ac_objext
14533 if { (eval echo "$as_me:14533: \"$ac_compile\"") >&5
14534   (eval $ac_compile) 2>&5
14535   ac_status=$?
14536   echo "$as_me:14536: \$? = $ac_status" >&5
14537   (exit $ac_status); } &&
14538          { ac_try='test -s conftest.$ac_objext'
14539   { (eval echo "$as_me:14539: \"$ac_try\"") >&5
14540   (eval $ac_try) 2>&5
14541   ac_status=$?
14542   echo "$as_me:14542: \$? = $ac_status" >&5
14543   (exit $ac_status); }; }; then
14544
14545         test -n "$cf_math" && cat >>confdefs.h <<EOF
14546 #define ETIP_NEEDS_${cf_math} 1
14547 EOF
14548
14549         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14550 #define ETIP_NEEDS_${cf_excp} 1
14551 EOF
14552
14553         cf_result="$cf_math $cf_excp"
14554         break
14555
14556 else
14557   echo "$as_me: failed program was:" >&5
14558 cat conftest.$ac_ext >&5
14559 fi
14560 rm -f conftest.$ac_objext conftest.$ac_ext
14561 done
14562 done
14563 echo "$as_me:14563: result: $cf_result" >&5
14564 echo "${ECHO_T}$cf_result" >&6
14565 CXXFLAGS="$cf_save_CXXFLAGS"
14566
14567 if test -n "$CXX"; then
14568 echo "$as_me:14568: checking if $CXX accepts parameter initialization" >&5
14569 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14570 if test "${cf_cv_cpp_param_init+set}" = set; then
14571   echo $ECHO_N "(cached) $ECHO_C" >&6
14572 else
14573
14574         ac_ext=cc
14575 ac_cpp='$CXXCPP $CPPFLAGS'
14576 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14577 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14578 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14579 ac_main_return=return
14580
14581         if test "$cross_compiling" = yes; then
14582   cf_cv_cpp_param_init=unknown
14583 else
14584   cat >conftest.$ac_ext <<_ACEOF
14585 #line 14585 "configure"
14586 #include "confdefs.h"
14587
14588 class TEST {
14589 private:
14590         int value;
14591 public:
14592         TEST(int x = 1);
14593         ~TEST();
14594 };
14595
14596 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14597 {
14598         value = x;
14599 }
14600 void main() { }
14601
14602 _ACEOF
14603 rm -f conftest$ac_exeext
14604 if { (eval echo "$as_me:14604: \"$ac_link\"") >&5
14605   (eval $ac_link) 2>&5
14606   ac_status=$?
14607   echo "$as_me:14607: \$? = $ac_status" >&5
14608   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14609   { (eval echo "$as_me:14609: \"$ac_try\"") >&5
14610   (eval $ac_try) 2>&5
14611   ac_status=$?
14612   echo "$as_me:14612: \$? = $ac_status" >&5
14613   (exit $ac_status); }; }; then
14614   cf_cv_cpp_param_init=yes
14615 else
14616   echo "$as_me: program exited with status $ac_status" >&5
14617 echo "$as_me: failed program was:" >&5
14618 cat conftest.$ac_ext >&5
14619 cf_cv_cpp_param_init=no
14620 fi
14621 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14622 fi
14623         ac_ext=cc
14624 ac_cpp='$CXXCPP $CPPFLAGS'
14625 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14626 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14627 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14628 ac_main_return=return
14629
14630 fi
14631 echo "$as_me:14631: result: $cf_cv_cpp_param_init" >&5
14632 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14633 fi
14634 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14635 #define CPP_HAS_PARAM_INIT 1
14636 EOF
14637
14638 if test -n "$CXX"; then
14639
14640 echo "$as_me:14640: checking if $CXX accepts static_cast" >&5
14641 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14642 if test "${cf_cv_cpp_static_cast+set}" = set; then
14643   echo $ECHO_N "(cached) $ECHO_C" >&6
14644 else
14645
14646         ac_ext=cc
14647 ac_cpp='$CXXCPP $CPPFLAGS'
14648 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14649 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14650 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14651 ac_main_return=return
14652
14653         cat >conftest.$ac_ext <<_ACEOF
14654 #line 14654 "configure"
14655 #include "confdefs.h"
14656
14657 class NCursesPanel
14658 {
14659 public:
14660   NCursesPanel(int nlines,
14661                int ncols,
14662                int begin_y = 0,
14663                int begin_x = 0)
14664   {
14665   }
14666
14667   ~NCursesPanel();
14668 };
14669
14670 template<class T> class NCursesUserPanel : public NCursesPanel
14671 {
14672 public:
14673   NCursesUserPanel (int nlines,
14674                     int ncols,
14675                     int begin_y = 0,
14676                     int begin_x = 0,
14677                     const T* p_UserData = static_cast<T*>(0))
14678     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14679   {
14680   };
14681   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14682   {
14683   };
14684
14685   virtual ~NCursesUserPanel() {};
14686 };
14687
14688 int
14689 main ()
14690 {
14691
14692         const char* p_UserData = static_cast<char*>(0)
14693   ;
14694   return 0;
14695 }
14696 _ACEOF
14697 rm -f conftest.$ac_objext
14698 if { (eval echo "$as_me:14698: \"$ac_compile\"") >&5
14699   (eval $ac_compile) 2>&5
14700   ac_status=$?
14701   echo "$as_me:14701: \$? = $ac_status" >&5
14702   (exit $ac_status); } &&
14703          { ac_try='test -s conftest.$ac_objext'
14704   { (eval echo "$as_me:14704: \"$ac_try\"") >&5
14705   (eval $ac_try) 2>&5
14706   ac_status=$?
14707   echo "$as_me:14707: \$? = $ac_status" >&5
14708   (exit $ac_status); }; }; then
14709   cf_cv_cpp_static_cast=yes
14710 else
14711   echo "$as_me: failed program was:" >&5
14712 cat conftest.$ac_ext >&5
14713 cf_cv_cpp_static_cast=no
14714 fi
14715 rm -f conftest.$ac_objext conftest.$ac_ext
14716
14717         ac_ext=cc
14718 ac_cpp='$CXXCPP $CPPFLAGS'
14719 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14720 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14721 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14722 ac_main_return=return
14723
14724 fi
14725 echo "$as_me:14725: result: $cf_cv_cpp_static_cast" >&5
14726 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14727
14728 fi
14729
14730 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14731 #define CPP_HAS_STATIC_CAST 1
14732 EOF
14733
14734         CXX_AR='$(AR)'
14735         CXX_AR_OPTS='$(AR_OPTS)'
14736         case $cf_cv_system_name in #(vi
14737         irix*) #(vi
14738             if test "$GXX" != yes ; then
14739                 CXX_AR='$(CXX)'
14740                 CXX_AR_OPTS='-ar -o'
14741             fi
14742             ;;
14743         sco3.2v5*) #(vi
14744             CXXLDFLAGS="-u main"
14745             ;;
14746         solaris2*)
14747             if test "$GXX" != yes ; then
14748                 CXX_AR='$(CXX)'
14749                 CXX_AR_OPTS='-xar -o'
14750             fi
14751             ;;
14752         esac
14753
14754 else
14755         cf_cxx_library=no
14756         cf_cv_builtin_bool=1
14757
14758         # Just because we are not configuring against C++ right now does not
14759         # mean that a user will not want to use C++.  Some distributors disable
14760         # the C++ portion of this configuration as a shortcut (or just to avoid
14761         # compiling the demo in the c++ directory).  So we need a reasonable
14762         # default for the 'bool' type.
14763         #
14764         # Caveat: since the storage of the bool type is not standardized, it
14765         # may change.
14766
14767         if test "$NCURSES_BOOL" != auto ; then
14768                 cf_cv_type_of_bool=$NCURSES_BOOL
14769                 cf_cv_header_stdbool_h=0
14770         else
14771                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14772
14773 echo "$as_me:14773: checking for size of bool" >&5
14774 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14775 if test "${cf_cv_type_of_bool+set}" = set; then
14776   echo $ECHO_N "(cached) $ECHO_C" >&6
14777 else
14778
14779         rm -f cf_test.out
14780         if test "$cross_compiling" = yes; then
14781   cf_cv_type_of_bool=unknown
14782 else
14783   cat >conftest.$ac_ext <<_ACEOF
14784 #line 14784 "configure"
14785 #include "confdefs.h"
14786
14787 #include <stdlib.h>
14788 #include <stdio.h>
14789
14790 #if defined(__cplusplus)
14791
14792 #ifdef HAVE_GXX_BUILTIN_H
14793 #include <g++/builtin.h>
14794 #elif HAVE_GPP_BUILTIN_H
14795 #include <gpp/builtin.h>
14796 #elif HAVE_BUILTIN_H
14797 #include <builtin.h>
14798 #endif
14799
14800 #else
14801
14802 #if $cf_cv_header_stdbool_h
14803 #include <stdbool.h>
14804 #endif
14805
14806 #endif
14807
14808 main()
14809 {
14810         FILE *fp = fopen("cf_test.out", "w");
14811         if (fp != 0) {
14812                 bool x = true;
14813                 if ((bool)(-x) >= 0)
14814                         fputs("unsigned ", fp);
14815                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14816                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14817                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14818                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14819                 fclose(fp);
14820         }
14821         ${cf_cv_main_return:-return}(0);
14822 }
14823
14824 _ACEOF
14825 rm -f conftest$ac_exeext
14826 if { (eval echo "$as_me:14826: \"$ac_link\"") >&5
14827   (eval $ac_link) 2>&5
14828   ac_status=$?
14829   echo "$as_me:14829: \$? = $ac_status" >&5
14830   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14831   { (eval echo "$as_me:14831: \"$ac_try\"") >&5
14832   (eval $ac_try) 2>&5
14833   ac_status=$?
14834   echo "$as_me:14834: \$? = $ac_status" >&5
14835   (exit $ac_status); }; }; then
14836   cf_cv_type_of_bool=`cat cf_test.out`
14837                  if test -z "$cf_cv_type_of_bool"; then
14838                    cf_cv_type_of_bool=unknown
14839                  fi
14840 else
14841   echo "$as_me: program exited with status $ac_status" >&5
14842 echo "$as_me: failed program was:" >&5
14843 cat conftest.$ac_ext >&5
14844 cf_cv_type_of_bool=unknown
14845 fi
14846 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14847 fi
14848
14849 fi
14850
14851         rm -f cf_test.out
14852 echo "$as_me:14852: result: $cf_cv_type_of_bool" >&5
14853 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14854 if test "$cf_cv_type_of_bool" = unknown ; then
14855         case .$NCURSES_BOOL in #(vi
14856         .auto|.) NCURSES_BOOL=unsigned;;
14857         esac
14858         { echo "$as_me:14858: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14859 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14860         cf_cv_type_of_bool=$NCURSES_BOOL
14861 fi
14862
14863                 else
14864                         echo "$as_me:14864: checking for fallback type of bool" >&5
14865 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14866                         case "$host_cpu" in #(vi
14867                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14868                         *)      cf_cv_type_of_bool=int  ;;
14869                         esac
14870                         echo "$as_me:14870: result: $cf_cv_type_of_bool" >&5
14871 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14872                 fi
14873         fi
14874 fi
14875
14876 # If the C compiler did not declare bool, and we did not determine that the C++
14877 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14878 # ncurses library use the same type as C++ bool.  Note that this allows one to
14879 # specify the type of bool in a configure-script option and postpone
14880 # integration with the C++ compiler provided that the types are compatible.
14881 USE_CXX_BOOL=1
14882 if test $cf_cv_cc_bool_type = 1
14883 then
14884         # oops: C has a bool.  Unlikely, but C++ could differ.
14885         USE_CXX_BOOL=0
14886 elif test $cf_cv_builtin_bool = 0
14887 then
14888         # C++ has no bool
14889         USE_CXX_BOOL=0
14890 else
14891         # this is the normal case
14892         USE_CXX_BOOL='defined(__cplusplus)'
14893 fi
14894
14895 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14896
14897 if test "$cf_with_ada" != "no" ; then
14898     if test "$with_libtool" != "no"; then
14899         { echo "$as_me:14899: WARNING: libtool does not support Ada - disabling feature" >&5
14900 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
14901         cf_with_ada=no
14902     fi
14903 fi
14904
14905 if test "$cf_with_ada" != "no" ; then
14906 cf_ada_make=gnatmake
14907 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14908 set dummy $cf_ada_make; ac_word=$2
14909 echo "$as_me:14909: checking for $ac_word" >&5
14910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14911 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14912   echo $ECHO_N "(cached) $ECHO_C" >&6
14913 else
14914   if test -n "$gnat_exists"; then
14915   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14916 else
14917   ac_save_IFS=$IFS; IFS=$ac_path_separator
14918 ac_dummy="$PATH"
14919 for ac_dir in $ac_dummy; do
14920   IFS=$ac_save_IFS
14921   test -z "$ac_dir" && ac_dir=.
14922   $as_executable_p "$ac_dir/$ac_word" || continue
14923 ac_cv_prog_gnat_exists="yes"
14924 echo "$as_me:14924: found $ac_dir/$ac_word" >&5
14925 break
14926 done
14927
14928   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14929 fi
14930 fi
14931 gnat_exists=$ac_cv_prog_gnat_exists
14932 if test -n "$gnat_exists"; then
14933   echo "$as_me:14933: result: $gnat_exists" >&5
14934 echo "${ECHO_T}$gnat_exists" >&6
14935 else
14936   echo "$as_me:14936: result: no" >&5
14937 echo "${ECHO_T}no" >&6
14938 fi
14939
14940 if test "$ac_cv_prog_gnat_exists" = no; then
14941    cf_ada_make=
14942 else
14943
14944 echo "$as_me:14944: checking for gnat version" >&5
14945 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14946 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14947   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14948 echo "$as_me:14948: result: $cf_gnat_version" >&5
14949 echo "${ECHO_T}$cf_gnat_version" >&6
14950
14951 case $cf_gnat_version in
14952   3.1[1-9]*|3.[2-9]*|[4-9].*)
14953     cf_cv_prog_gnat_correct=yes
14954     ;;
14955   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14956      cf_cv_prog_gnat_correct=no
14957      ;;
14958 esac
14959 case $cf_gnat_version in
14960   3.[1-9]*|[4-9].*)
14961       cf_compile_generics=generics
14962       cf_generic_objects="\${GENOBJS}"
14963       ;;
14964   *)  cf_compile_generics=
14965       cf_generic_objects=
14966       ;;
14967 esac
14968
14969    # Extract the first word of "m4", so it can be a program name with args.
14970 set dummy m4; ac_word=$2
14971 echo "$as_me:14971: checking for $ac_word" >&5
14972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14973 if test "${ac_cv_prog_M4_exists+set}" = set; then
14974   echo $ECHO_N "(cached) $ECHO_C" >&6
14975 else
14976   if test -n "$M4_exists"; then
14977   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14978 else
14979   ac_save_IFS=$IFS; IFS=$ac_path_separator
14980 ac_dummy="$PATH"
14981 for ac_dir in $ac_dummy; do
14982   IFS=$ac_save_IFS
14983   test -z "$ac_dir" && ac_dir=.
14984   $as_executable_p "$ac_dir/$ac_word" || continue
14985 ac_cv_prog_M4_exists="yes"
14986 echo "$as_me:14986: found $ac_dir/$ac_word" >&5
14987 break
14988 done
14989
14990   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14991 fi
14992 fi
14993 M4_exists=$ac_cv_prog_M4_exists
14994 if test -n "$M4_exists"; then
14995   echo "$as_me:14995: result: $M4_exists" >&5
14996 echo "${ECHO_T}$M4_exists" >&6
14997 else
14998   echo "$as_me:14998: result: no" >&5
14999 echo "${ECHO_T}no" >&6
15000 fi
15001
15002    if test "$ac_cv_prog_M4_exists" = no; then
15003       cf_cv_prog_gnat_correct=no
15004       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15005    fi
15006    if test "$cf_cv_prog_gnat_correct" = yes; then
15007       echo "$as_me:15007: checking if GNAT works" >&5
15008 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15009
15010 rm -f conftest*
15011 cat >>conftest.ads <<CF_EOF
15012 procedure conftest;
15013 CF_EOF
15014 cat >>conftest.adb <<CF_EOF
15015 with Text_IO;
15016 with GNAT.OS_Lib;
15017 procedure conftest is
15018 begin
15019    Text_IO.Put ("Hello World");
15020    Text_IO.New_Line;
15021    GNAT.OS_Lib.OS_Exit (0);
15022 end conftest;
15023 CF_EOF
15024 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15025    if ( ./conftest 1>&5 2>&1 ) ; then
15026       cf_cv_prog_gnat_correct=yes
15027    else
15028       cf_cv_prog_gnat_correct=no
15029    fi
15030 else
15031    cf_cv_prog_gnat_correct=no
15032 fi
15033 rm -f conftest*
15034
15035       echo "$as_me:15035: result: $cf_cv_prog_gnat_correct" >&5
15036 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15037    fi
15038 fi
15039 if test "$cf_cv_prog_gnat_correct" = yes; then
15040    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15041
15042    echo "$as_me:15042: checking if GNAT pragma Unreferenced works" >&5
15043 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15044
15045 rm -f conftest*
15046 cat >>conftest.ads <<CF_EOF
15047 procedure conftest;
15048 CF_EOF
15049 cat >>conftest.adb <<CF_EOF
15050 with Text_IO;
15051 with GNAT.OS_Lib;
15052 procedure conftest is
15053    test : Integer;
15054    pragma Unreferenced (test);
15055 begin
15056    test := 1;
15057    Text_IO.Put ("Hello World");
15058    Text_IO.New_Line;
15059    GNAT.OS_Lib.OS_Exit (0);
15060 end conftest;
15061 CF_EOF
15062 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15063       cf_cv_pragma_unreferenced=yes
15064 else
15065    cf_cv_pragma_unreferenced=no
15066 fi
15067 rm -f conftest*
15068
15069    echo "$as_me:15069: result: $cf_cv_pragma_unreferenced" >&5
15070 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15071
15072    # if the pragma is supported, use it (needed in the Trace code).
15073    if test $cf_cv_pragma_unreferenced = yes ; then
15074       PRAGMA_UNREF=TRUE
15075    else
15076       PRAGMA_UNREF=FALSE
15077    fi
15078
15079 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15080 if test "${with_ada_compiler+set}" = set; then
15081   withval="$with_ada_compiler"
15082   cf_ada_compiler=$withval
15083 else
15084   cf_ada_compiler=gnatmake
15085 fi;
15086
15087    cf_ada_package=terminal_interface
15088
15089 # Check whether --with-ada-include or --without-ada-include was given.
15090 if test "${with_ada_include+set}" = set; then
15091   withval="$with_ada_include"
15092
15093 else
15094   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15095 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15096
15097 if test "x$prefix" != xNONE; then
15098   cf_path_syntax="$prefix"
15099 else
15100   cf_path_syntax="$ac_default_prefix"
15101 fi
15102
15103 case ".$withval" in #(vi
15104 .\$\(*\)*|.\'*\'*) #(vi
15105   ;;
15106 ..|./*|.\\*) #(vi
15107   ;;
15108 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15109   ;;
15110 .\${*prefix}*) #(vi
15111   eval withval="$withval"
15112   case ".$withval" in #(vi
15113   .NONE/*)
15114     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15115     ;;
15116   esac
15117   ;; #(vi
15118 .no|.NONE/*)
15119   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15120   ;;
15121 *)
15122   { { echo "$as_me:15122: error: expected a pathname, not \"$withval\"" >&5
15123 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15124    { (exit 1); exit 1; }; }
15125   ;;
15126 esac
15127
15128 fi
15129 ADA_INCLUDE="$withval"
15130
15131 # Check whether --with-ada-objects or --without-ada-objects was given.
15132 if test "${with_ada_objects+set}" = set; then
15133   withval="$with_ada_objects"
15134
15135 else
15136   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15137 fi; if test -n "$prefix/lib/ada/adalib" ; then
15138
15139 if test "x$prefix" != xNONE; then
15140   cf_path_syntax="$prefix"
15141 else
15142   cf_path_syntax="$ac_default_prefix"
15143 fi
15144
15145 case ".$withval" in #(vi
15146 .\$\(*\)*|.\'*\'*) #(vi
15147   ;;
15148 ..|./*|.\\*) #(vi
15149   ;;
15150 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15151   ;;
15152 .\${*prefix}*) #(vi
15153   eval withval="$withval"
15154   case ".$withval" in #(vi
15155   .NONE/*)
15156     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15157     ;;
15158   esac
15159   ;; #(vi
15160 .no|.NONE/*)
15161   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15162   ;;
15163 *)
15164   { { echo "$as_me:15164: error: expected a pathname, not \"$withval\"" >&5
15165 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15166    { (exit 1); exit 1; }; }
15167   ;;
15168 esac
15169
15170 fi
15171 ADA_OBJECTS="$withval"
15172
15173 fi
15174 fi
15175 else
15176    cf_with_ada=no
15177 fi
15178
15179 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15180 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15181 ###
15182 ### ticlib modules may be a separate library, otherwise contained in termlib.
15183 ### termlib modules may be a separate library, otherwise contained in ncurses.
15184 ###
15185 ### The of "+" or " " between the tokens controls the way the script
15186 ### chooses to split module lists into libraries.
15187 ###
15188 ### (see CF_LIB_RULES).
15189 echo "$as_me:15189: checking for library subsets" >&5
15190 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15191 LIB_SUBSETS=
15192
15193 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
15194         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15195         if test "$with_ticlib" != no ; then
15196                 LIB_SUBSETS="${LIB_SUBSETS} "
15197         else
15198                 LIB_SUBSETS="${LIB_SUBSETS}+"
15199         fi
15200 fi
15201
15202 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15203 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15204 if test "$with_termlib" != no ; then
15205         LIB_SUBSETS="${LIB_SUBSETS} "
15206 else
15207         LIB_SUBSETS="${LIB_SUBSETS}+"
15208 fi
15209
15210 LIB_SUBSETS="${LIB_SUBSETS}base"
15211 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15212 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15213
15214 echo "$as_me:15214: result: $LIB_SUBSETS" >&5
15215 echo "${ECHO_T}$LIB_SUBSETS" >&6
15216
15217 ### Construct the list of include-directories to be generated
15218
15219 CPPFLAGS="-I. -I../include $CPPFLAGS"
15220 if test "$srcdir" != "."; then
15221         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15222 fi
15223 if test "$GCC" != yes; then
15224         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15225 elif test "$includedir" != "/usr/include"; then
15226         if test "$includedir" = '${prefix}/include' ; then
15227                 if test $prefix != /usr ; then
15228                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15229                 fi
15230         else
15231                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15232         fi
15233 fi
15234
15235 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15236 if test "$srcdir" != "."; then
15237         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15238 fi
15239 if test "$GCC" != yes; then
15240         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15241 elif test "$includedir" != "/usr/include"; then
15242         if test "$includedir" = '${prefix}/include' ; then
15243                 if test $prefix != /usr ; then
15244                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15245                 fi
15246         else
15247                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15248         fi
15249 fi
15250
15251 ### Build up pieces for makefile rules
15252 echo "$as_me:15252: checking default library suffix" >&5
15253 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15254
15255         case $DFT_LWR_MODEL in
15256         libtool) DFT_ARG_SUFFIX=''   ;;
15257         normal)  DFT_ARG_SUFFIX=''   ;;
15258         debug)   DFT_ARG_SUFFIX='_g' ;;
15259         profile) DFT_ARG_SUFFIX='_p' ;;
15260         shared)  DFT_ARG_SUFFIX=''   ;;
15261         esac
15262         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15263 echo "$as_me:15263: result: $DFT_ARG_SUFFIX" >&5
15264 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15265
15266 echo "$as_me:15266: checking default library-dependency suffix" >&5
15267 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15268
15269         case $DFT_LWR_MODEL in
15270         libtool) DFT_DEP_SUFFIX='.la'  ;;
15271         normal)  DFT_DEP_SUFFIX='.a'   ;;
15272         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15273         profile) DFT_DEP_SUFFIX='_p.a' ;;
15274         shared)
15275                 case $cf_cv_system_name in
15276                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15277                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15278                 hpux*)
15279                         case $target in
15280                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15281                         *)      DFT_DEP_SUFFIX='.sl' ;;
15282                         esac
15283                         ;;
15284                 *)      DFT_DEP_SUFFIX='.so'  ;;
15285                 esac
15286         esac
15287         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15288 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15289 if test $DFT_LWR_MODEL = shared ; then
15290         case $cf_cv_system_name in #(vi
15291         cygwin*)
15292                 DFT_DEP_SUFFIX=".dll.a"
15293                 DFT_LIB_SUFFIX=".dll"
15294                 ;;
15295         esac
15296 fi
15297 echo "$as_me:15297: result: $DFT_DEP_SUFFIX" >&5
15298 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15299
15300 echo "$as_me:15300: checking default object directory" >&5
15301 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15302
15303         case $DFT_LWR_MODEL in
15304         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15305         normal)  DFT_OBJ_SUBDIR='objects' ;;
15306         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15307         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15308         shared)
15309                 case $cf_cv_system_name in #(vi
15310                 cygwin) #(vi
15311                         DFT_OBJ_SUBDIR='objects' ;;
15312                 *)
15313                         DFT_OBJ_SUBDIR='obj_s' ;;
15314                 esac
15315         esac
15316 echo "$as_me:15316: result: $DFT_OBJ_SUBDIR" >&5
15317 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15318
15319 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15320 if test "$cf_with_cxx" = yes ; then
15321 echo "$as_me:15321: checking c++ library-dependency suffix" >&5
15322 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15323 if test "$with_libtool" != "no"; then
15324         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15325 else
15326
15327         case normal in
15328         libtool) CXX_LIB_SUFFIX='.la'  ;;
15329         normal)  CXX_LIB_SUFFIX='.a'   ;;
15330         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15331         profile) CXX_LIB_SUFFIX='_p.a' ;;
15332         shared)
15333                 case $cf_cv_system_name in
15334                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15335                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15336                 hpux*)
15337                         case $target in
15338                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15339                         *)      CXX_LIB_SUFFIX='.sl' ;;
15340                         esac
15341                         ;;
15342                 *)      CXX_LIB_SUFFIX='.so'  ;;
15343                 esac
15344         esac
15345         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15346 fi
15347 echo "$as_me:15347: result: $CXX_LIB_SUFFIX" >&5
15348 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15349
15350 fi
15351
15352 # do not want -ldl in build except as needed for -lncurses dependency
15353 if test "$with_dlsym" = yes ; then
15354 if test $DFT_LWR_MODEL = shared || \
15355    test $DFT_LWR_MODEL = libtool ; then
15356
15357 # remove dl library from $LIBS
15358 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15359
15360 fi
15361 fi
15362 ### Set up low-level terminfo dependencies for makefiles.
15363
15364 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15365 # do not need libdl
15366 TICS_LIST=
15367 if test "$with_dlsym" = yes ; then
15368
15369 # remove dl library from $SHLIB_LIST
15370 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15371
15372 fi
15373
15374 if test "$with_ticlib" != no ; then
15375
15376         if test "$with_ticlib" != yes ; then
15377                 TICS_NAME=$with_ticlib
15378                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15379                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15380                 TICS_LIB_SUFFIX="${with_ticlib}"
15381         else
15382                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15383                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15384                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15385         fi
15386         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15387 else
15388         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15389 fi
15390
15391 if test "$with_termlib" != no ; then
15392
15393         if test "$with_termlib" != yes ; then
15394                 TINFO_NAME=$with_termlib
15395                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15396                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15397                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15398                 TINFO_LIB_SUFFIX="${with_termlib}"
15399         else
15400                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15401                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15402                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15403                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15404         fi
15405
15406         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15407         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15408         if test "$DFT_LWR_MODEL" = "libtool"; then
15409                 TEST_ARGS="${TEST_DEPS}"
15410                 TEST_ARG2="${TEST_DEP2}"
15411                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15412         else
15413                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15414                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15415                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15416                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15417                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15418         fi
15419 else
15420         # the next lines are needed for linking libtic over libncurses
15421         TINFO_NAME=${LIB_NAME}
15422         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15423         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15424         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15425
15426         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15427 fi
15428
15429 if test "$DFT_LWR_MODEL" = shared ; then
15430         case $cf_cv_system_name in #(vi
15431         cygwin*)
15432                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15433                 TINFO_SUFFIX=.dll
15434                 ;;
15435         esac
15436 fi
15437
15438 if test "$with_dlsym" = yes ; then
15439
15440 # remove dl library from $TICS_LIST
15441 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15442
15443 fi
15444
15445 # needed for Ada95
15446 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15447
15448 case $DFT_LWR_MODEL in
15449 normal|debug|profile)
15450
15451 if test "$GCC" = yes ; then
15452         LDFLAGS_STATIC=-static
15453         LDFLAGS_SHARED=-dynamic
15454 else
15455         case $cf_cv_system_name in #(
15456         aix[45]*)       #( from ld manpage
15457                 LDFLAGS_STATIC=-bstatic
15458                 LDFLAGS_SHARED=-bdynamic
15459                 ;;
15460         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15461                 # We could also use just "archive" and "shared".
15462                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15463                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15464                 ;;
15465         irix*)          #( from ld manpage IRIX64
15466                 LDFLAGS_STATIC=-Bstatic
15467                 LDFLAGS_SHARED=-Bdynamic
15468                 ;;
15469         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15470                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15471                 LDFLAGS_STATIC=-noso
15472                 LDFLAGS_SHARED=-so_archive
15473                 ;;
15474         solaris2*)
15475                 LDFLAGS_STATIC=-Bstatic
15476                 LDFLAGS_SHARED=-Bdynamic
15477                 ;;
15478         esac
15479 fi
15480
15481         ;;
15482 esac
15483
15484 echo "$as_me:15484: checking where we will install curses.h" >&5
15485 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15486 test "$with_overwrite" = no && \
15487 test "x$includedir" = 'x${prefix}/include' && \
15488         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15489 echo "$as_me:15489: result: $includedir" >&5
15490 echo "${ECHO_T}$includedir" >&6
15491
15492 ### Resolve a conflict between normal and wide-curses by forcing applications
15493 ### that will need libutf8 to add it to their configure script.
15494 if test "$with_overwrite" != no ; then
15495 if test "$NCURSES_LIBUTF8" = 1 ; then
15496         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15497         { echo "$as_me:15497: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15498 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15499 fi
15500 fi
15501
15502 # used to separate tack out of the tree
15503 NCURSES_TREE=
15504
15505 ### predefined stuff for the test programs
15506 cat >>confdefs.h <<\EOF
15507 #define HAVE_SLK_COLOR 1
15508 EOF
15509
15510 ### Construct the list of subdirectories for which we'll customize makefiles
15511 ### with the appropriate compile-rules.
15512
15513 echo "$as_me:15513: checking for src modules" >&5
15514 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15515
15516 # dependencies and linker-arguments for test-programs
15517 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15518 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15519 if test "$DFT_LWR_MODEL" = "libtool"; then
15520         TEST_ARGS="${TEST_DEPS}"
15521         TEST_ARG2="${TEST_DEP2}"
15522 else
15523         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15524         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15525 fi
15526
15527 cf_cv_src_modules=
15528 for cf_dir in $modules_to_build
15529 do
15530         if test -f $srcdir/$cf_dir/modules; then
15531
15532                 # We may/may not have tack in the distribution, though the
15533                 # makefile is.
15534                 if test $cf_dir = tack ; then
15535                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15536                                 continue
15537                         fi
15538                 fi
15539
15540                 if test -z "$cf_cv_src_modules"; then
15541                         cf_cv_src_modules=$cf_dir
15542                 else
15543                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15544                 fi
15545
15546                 # Make the ncurses_cfg.h file record the library interface files as
15547                 # well.  These are header files that are the same name as their
15548                 # directory.  Ncurses is the only library that does not follow
15549                 # that pattern.
15550                 if test $cf_dir = tack ; then
15551                         continue
15552                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15553
15554 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15555
15556                         cat >>confdefs.h <<EOF
15557 #define HAVE_${cf_have_include}_H 1
15558 EOF
15559
15560                         cat >>confdefs.h <<EOF
15561 #define HAVE_LIB${cf_have_include} 1
15562 EOF
15563
15564                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15565                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15566                         if test "$DFT_LWR_MODEL" = "libtool"; then
15567                                 TEST_ARGS="${TEST_DEPS}"
15568                                 TEST_ARG2="${TEST_DEP2}"
15569                         else
15570                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15571                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15572                         fi
15573                 fi
15574         fi
15575 done
15576 echo "$as_me:15576: result: $cf_cv_src_modules" >&5
15577 echo "${ECHO_T}$cf_cv_src_modules" >&6
15578
15579 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15580 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15581
15582 SRC_SUBDIRS="man include"
15583 for cf_dir in $cf_cv_src_modules
15584 do
15585         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15586 done
15587 SRC_SUBDIRS="$SRC_SUBDIRS test"
15588 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15589 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15590
15591 ADA_SUBDIRS=
15592 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15593    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15594    ADA_SUBDIRS="gen src samples"
15595 fi
15596
15597 SUB_MAKEFILES=
15598 for cf_dir in $SRC_SUBDIRS
15599 do
15600         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15601 done
15602
15603 if test -n "$ADA_SUBDIRS"; then
15604    for cf_dir in $ADA_SUBDIRS
15605    do
15606       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15607    done
15608
15609 fi
15610
15611 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15612    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15613 fi
15614
15615 DIRS_TO_MAKE="lib"
15616 for cf_item in $cf_list_models
15617 do
15618
15619         case $cf_item in
15620         libtool) cf_subdir='obj_lo'  ;;
15621         normal)  cf_subdir='objects' ;;
15622         debug)   cf_subdir='obj_g' ;;
15623         profile) cf_subdir='obj_p' ;;
15624         shared)
15625                 case $cf_cv_system_name in #(vi
15626                 cygwin) #(vi
15627                         cf_subdir='objects' ;;
15628                 *)
15629                         cf_subdir='obj_s' ;;
15630                 esac
15631         esac
15632
15633         for cf_item2 in $DIRS_TO_MAKE
15634         do
15635                 test $cf_item2 = $cf_subdir && break
15636         done
15637         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15638 done
15639 for cf_dir in $DIRS_TO_MAKE
15640 do
15641         test ! -d $cf_dir && mkdir $cf_dir
15642 done
15643
15644 cat >>confdefs.h <<EOF
15645 #define NCURSES_PATHSEP '$PATHSEP'
15646 EOF
15647
15648 cat >>confdefs.h <<EOF
15649 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15650 EOF
15651
15652 ### Now that we're done running tests, add the compiler-warnings, if any
15653
15654 cf_fix_cppflags=no
15655 cf_new_cflags=
15656 cf_new_cppflags=
15657 cf_new_extra_cppflags=
15658
15659 for cf_add_cflags in $EXTRA_CFLAGS
15660 do
15661 case $cf_fix_cppflags in
15662 no)
15663         case $cf_add_cflags in #(vi
15664         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15665                 case $cf_add_cflags in
15666                 -D*)
15667                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15668
15669                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15670                         && test -z "${cf_tst_cflags}" \
15671                         && cf_fix_cppflags=yes
15672
15673                         if test $cf_fix_cppflags = yes ; then
15674                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15675                                 continue
15676                         elif test "${cf_tst_cflags}" = "\"'" ; then
15677                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15678                                 continue
15679                         fi
15680                         ;;
15681                 esac
15682                 case "$CPPFLAGS" in
15683                 *$cf_add_cflags) #(vi
15684                         ;;
15685                 *) #(vi
15686                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15687                         ;;
15688                 esac
15689                 ;;
15690         *)
15691                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15692                 ;;
15693         esac
15694         ;;
15695 yes)
15696         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15697
15698         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15699
15700         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15701         && test -z "${cf_tst_cflags}" \
15702         && cf_fix_cppflags=no
15703         ;;
15704 esac
15705 done
15706
15707 if test -n "$cf_new_cflags" ; then
15708
15709         CFLAGS="$CFLAGS $cf_new_cflags"
15710 fi
15711
15712 if test -n "$cf_new_cppflags" ; then
15713
15714         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15715 fi
15716
15717 if test -n "$cf_new_extra_cppflags" ; then
15718
15719         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15720 fi
15721
15722 ### Define substitutions for header files to avoid name-pollution
15723
15724 if test "$cf_cv_have_tcgetattr" = yes ; then
15725         HAVE_TCGETATTR=1
15726 else
15727         HAVE_TCGETATTR=0
15728 fi
15729
15730 if test "$ac_cv_header_termio_h" = yes ; then
15731         HAVE_TERMIO_H=1
15732 else
15733         HAVE_TERMIO_H=0
15734 fi
15735
15736 if test "$ac_cv_header_termios_h" = yes ; then
15737         HAVE_TERMIOS_H=1
15738 else
15739         HAVE_TERMIOS_H=0
15740 fi
15741
15742 ################################################################################
15743 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15744 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15745 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"
15746 ac_config_commands="$ac_config_commands default"
15747 cat >confcache <<\_ACEOF
15748 # This file is a shell script that caches the results of configure
15749 # tests run on this system so they can be shared between configure
15750 # scripts and configure runs, see configure's option --config-cache.
15751 # It is not useful on other systems.  If it contains results you don't
15752 # want to keep, you may remove or edit it.
15753 #
15754 # config.status only pays attention to the cache file if you give it
15755 # the --recheck option to rerun configure.
15756 #
15757 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15758 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15759 # following values.
15760
15761 _ACEOF
15762
15763 # The following way of writing the cache mishandles newlines in values,
15764 # but we know of no workaround that is simple, portable, and efficient.
15765 # So, don't put newlines in cache variables' values.
15766 # Ultrix sh set writes to stderr and can't be redirected directly,
15767 # and sets the high bit in the cache file unless we assign to the vars.
15768 {
15769   (set) 2>&1 |
15770     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15771     *ac_space=\ *)
15772       # `set' does not quote correctly, so add quotes (double-quote
15773       # substitution turns \\\\ into \\, and sed turns \\ into \).
15774       sed -n \
15775         "s/'/'\\\\''/g;
15776           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15777       ;;
15778     *)
15779       # `set' quotes correctly as required by POSIX, so do not add quotes.
15780       sed -n \
15781         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15782       ;;
15783     esac;
15784 } |
15785   sed '
15786      t clear
15787      : clear
15788      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15789      t end
15790      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15791      : end' >>confcache
15792 if cmp -s $cache_file confcache; then :; else
15793   if test -w $cache_file; then
15794     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15795     cat confcache >$cache_file
15796   else
15797     echo "not updating unwritable cache $cache_file"
15798   fi
15799 fi
15800 rm -f confcache
15801
15802 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15803 # Let make expand exec_prefix.
15804 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15805
15806 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15807 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15808 # trailing colons and then remove the whole line if VPATH becomes empty
15809 # (actually we leave an empty line to preserve line numbers).
15810 if test "x$srcdir" = x.; then
15811   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15812 s/:*\$(srcdir):*/:/;
15813 s/:*\${srcdir}:*/:/;
15814 s/:*@srcdir@:*/:/;
15815 s/^\([^=]*=[    ]*\):*/\1/;
15816 s/:*$//;
15817 s/^[^=]*=[      ]*$//;
15818 }'
15819 fi
15820
15821 DEFS=-DHAVE_CONFIG_H
15822
15823 : ${CONFIG_STATUS=./config.status}
15824 ac_clean_files_save=$ac_clean_files
15825 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15826 { echo "$as_me:15826: creating $CONFIG_STATUS" >&5
15827 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15828 cat >$CONFIG_STATUS <<_ACEOF
15829 #! $SHELL
15830 # Generated automatically by configure.
15831 # Run this file to recreate the current configuration.
15832 # Compiler output produced by configure, useful for debugging
15833 # configure, is in config.log if it exists.
15834
15835 debug=false
15836 SHELL=\${CONFIG_SHELL-$SHELL}
15837 ac_cs_invocation="\$0 \$@"
15838
15839 _ACEOF
15840
15841 cat >>$CONFIG_STATUS <<\_ACEOF
15842 # Be Bourne compatible
15843 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15844   emulate sh
15845   NULLCMD=:
15846 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15847   set -o posix
15848 fi
15849
15850 # Name of the executable.
15851 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15852
15853 if expr a : '\(a\)' >/dev/null 2>&1; then
15854   as_expr=expr
15855 else
15856   as_expr=false
15857 fi
15858
15859 rm -f conf$$ conf$$.exe conf$$.file
15860 echo >conf$$.file
15861 if ln -s conf$$.file conf$$ 2>/dev/null; then
15862   # We could just check for DJGPP; but this test a) works b) is more generic
15863   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15864   if test -f conf$$.exe; then
15865     # Don't use ln at all; we don't have any links
15866     as_ln_s='cp -p'
15867   else
15868     as_ln_s='ln -s'
15869   fi
15870 elif ln conf$$.file conf$$ 2>/dev/null; then
15871   as_ln_s=ln
15872 else
15873   as_ln_s='cp -p'
15874 fi
15875 rm -f conf$$ conf$$.exe conf$$.file
15876
15877 as_executable_p="test -f"
15878
15879 # Support unset when possible.
15880 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15881   as_unset=unset
15882 else
15883   as_unset=false
15884 fi
15885
15886 # NLS nuisances.
15887 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15888 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15889 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15890 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15891 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15892 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15893 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15894 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15895
15896 # IFS
15897 # We need space, tab and new line, in precisely that order.
15898 as_nl='
15899 '
15900 IFS="   $as_nl"
15901
15902 # CDPATH.
15903 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15904
15905 exec 6>&1
15906
15907 _ACEOF
15908
15909 # Files that config.status was made for.
15910 if test -n "$ac_config_files"; then
15911   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15912 fi
15913
15914 if test -n "$ac_config_headers"; then
15915   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15916 fi
15917
15918 if test -n "$ac_config_links"; then
15919   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15920 fi
15921
15922 if test -n "$ac_config_commands"; then
15923   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15924 fi
15925
15926 cat >>$CONFIG_STATUS <<\EOF
15927
15928 ac_cs_usage="\
15929 \`$as_me' instantiates files from templates according to the
15930 current configuration.
15931
15932 Usage: $0 [OPTIONS] [FILE]...
15933
15934   -h, --help       print this help, then exit
15935   -V, --version    print version number, then exit
15936   -d, --debug      don't remove temporary files
15937       --recheck    update $as_me by reconfiguring in the same conditions
15938   --file=FILE[:TEMPLATE]
15939                    instantiate the configuration file FILE
15940   --header=FILE[:TEMPLATE]
15941                    instantiate the configuration header FILE
15942
15943 Configuration files:
15944 $config_files
15945
15946 Configuration headers:
15947 $config_headers
15948
15949 Configuration commands:
15950 $config_commands
15951
15952 Report bugs to <bug-autoconf@gnu.org>."
15953 EOF
15954
15955 cat >>$CONFIG_STATUS <<EOF
15956 ac_cs_version="\\
15957 config.status
15958 configured by $0, generated by GNU Autoconf 2.52.20061216,
15959   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15960
15961 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15962 Free Software Foundation, Inc.
15963 This config.status script is free software; the Free Software Foundation
15964 gives unlimited permission to copy, distribute and modify it."
15965 srcdir=$srcdir
15966 INSTALL="$INSTALL"
15967 EOF
15968
15969 cat >>$CONFIG_STATUS <<\EOF
15970 # If no file are specified by the user, then we need to provide default
15971 # value.  By we need to know if files were specified by the user.
15972 ac_need_defaults=:
15973 while test $# != 0
15974 do
15975   case $1 in
15976   --*=*)
15977     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15978     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15979     shift
15980     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15981     shift
15982     ;;
15983   -*);;
15984   *) # This is not an option, so the user has probably given explicit
15985      # arguments.
15986      ac_need_defaults=false;;
15987   esac
15988
15989   case $1 in
15990   # Handling of the options.
15991 EOF
15992 cat >>$CONFIG_STATUS <<EOF
15993   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15994     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15995     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15996 EOF
15997 cat >>$CONFIG_STATUS <<\EOF
15998   --version | --vers* | -V )
15999     echo "$ac_cs_version"; exit 0 ;;
16000   --he | --h)
16001     # Conflict between --help and --header
16002     { { echo "$as_me:16002: error: ambiguous option: $1
16003 Try \`$0 --help' for more information." >&5
16004 echo "$as_me: error: ambiguous option: $1
16005 Try \`$0 --help' for more information." >&2;}
16006    { (exit 1); exit 1; }; };;
16007   --help | --hel | -h )
16008     echo "$ac_cs_usage"; exit 0 ;;
16009   --debug | --d* | -d )
16010     debug=: ;;
16011   --file | --fil | --fi | --f )
16012     shift
16013     CONFIG_FILES="$CONFIG_FILES $1"
16014     ac_need_defaults=false;;
16015   --header | --heade | --head | --hea )
16016     shift
16017     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16018     ac_need_defaults=false;;
16019
16020   # This is an error.
16021   -*) { { echo "$as_me:16021: error: unrecognized option: $1
16022 Try \`$0 --help' for more information." >&5
16023 echo "$as_me: error: unrecognized option: $1
16024 Try \`$0 --help' for more information." >&2;}
16025    { (exit 1); exit 1; }; } ;;
16026
16027   *) ac_config_targets="$ac_config_targets $1" ;;
16028
16029   esac
16030   shift
16031 done
16032
16033 exec 5>>config.log
16034 cat >&5 << _ACEOF
16035
16036 ## ----------------------- ##
16037 ## Running config.status.  ##
16038 ## ----------------------- ##
16039
16040 This file was extended by $as_me 2.52.20061216, executed with
16041   CONFIG_FILES    = $CONFIG_FILES
16042   CONFIG_HEADERS  = $CONFIG_HEADERS
16043   CONFIG_LINKS    = $CONFIG_LINKS
16044   CONFIG_COMMANDS = $CONFIG_COMMANDS
16045   > $ac_cs_invocation
16046 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16047
16048 _ACEOF
16049 EOF
16050
16051 cat >>$CONFIG_STATUS <<EOF
16052 #
16053 # INIT-COMMANDS section.
16054 #
16055
16056 ### Special initialization commands, used to pass information from the
16057 ### configuration-run into config.status
16058
16059 AWK="$AWK"
16060 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16061 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16062 ECHO_LINK="$ECHO_LINK"
16063 LDCONFIG="$LDCONFIG"
16064 LIB_NAME="$LIB_NAME"
16065 LIB_SUBSETS="$LIB_SUBSETS"
16066 LIB_SUFFIX="$LIB_SUFFIX"
16067 LIB_TRACING="$LIB_TRACING"
16068 MAKE_TERMINFO="$MAKE_TERMINFO"
16069 NCURSES_MAJOR="$NCURSES_MAJOR"
16070 NCURSES_MINOR="$NCURSES_MINOR"
16071 NCURSES_OSPEED="$NCURSES_OSPEED"
16072 NCURSES_PATCH="$NCURSES_PATCH"
16073 SRC_SUBDIRS="$SRC_SUBDIRS"
16074 TERMINFO="$TERMINFO"
16075 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16076 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16077 TINFO_NAME="$TINFO_NAME"
16078 TINFO_SUFFIX="$TINFO_SUFFIX"
16079 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16080 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16081 TICS_NAME="$TICS_NAME"
16082 WITH_CURSES_H="$with_curses_h"
16083 WITH_ECHO="$with_echo"
16084 WITH_OVERWRITE="$with_overwrite"
16085 cf_LIST_MODELS="$cf_list_models"
16086 cf_cv_abi_version="$cf_cv_abi_version"
16087 cf_cv_do_relink="$cf_cv_do_relink"
16088 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16089 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16090 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16091 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16092 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16093 cf_cv_rel_version="$cf_cv_rel_version"
16094 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16095 cf_cv_shlib_version="$cf_cv_shlib_version"
16096 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16097 cf_cv_system_name="$cf_cv_system_name"
16098 cf_with_cxx_binding="$cf_with_cxx_binding"
16099 host="$host"
16100 target="$target"
16101
16102 EOF
16103
16104 cat >>$CONFIG_STATUS <<\EOF
16105 for ac_config_target in $ac_config_targets
16106 do
16107   case "$ac_config_target" in
16108   # Handling of arguments.
16109   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16110   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16111   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16112   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16113   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16114   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16115   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16116   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16117   *) { { echo "$as_me:16117: error: invalid argument: $ac_config_target" >&5
16118 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16119    { (exit 1); exit 1; }; };;
16120   esac
16121 done
16122
16123 # If the user did not use the arguments to specify the items to instantiate,
16124 # then the envvar interface is used.  Set only those that are not.
16125 # We use the long form for the default assignment because of an extremely
16126 # bizarre bug on SunOS 4.1.3.
16127 if $ac_need_defaults; then
16128   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16129   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16130   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16131 fi
16132
16133 # Create a temporary directory, and hook for its removal unless debugging.
16134 $debug ||
16135 {
16136   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16137   trap '{ (exit 1); exit 1; }' 1 2 13 15
16138 }
16139
16140 # Create a (secure) tmp directory for tmp files.
16141 : ${TMPDIR=/tmp}
16142 {
16143   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16144   test -n "$tmp" && test -d "$tmp"
16145 }  ||
16146 {
16147   tmp=$TMPDIR/cs$$-$RANDOM
16148   (umask 077 && mkdir $tmp)
16149 } ||
16150 {
16151    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16152    { (exit 1); exit 1; }
16153 }
16154
16155 EOF
16156
16157 cat >>$CONFIG_STATUS <<EOF
16158
16159 #
16160 # CONFIG_FILES section.
16161 #
16162
16163 # No need to generate the scripts if there are no CONFIG_FILES.
16164 # This happens for instance when ./config.status config.h
16165 if test -n "\$CONFIG_FILES"; then
16166   # Protect against being on the right side of a sed subst in config.status.
16167   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16168    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16169 s,@SHELL@,$SHELL,;t t
16170 s,@exec_prefix@,$exec_prefix,;t t
16171 s,@prefix@,$prefix,;t t
16172 s,@program_transform_name@,$program_transform_name,;t t
16173 s,@bindir@,$bindir,;t t
16174 s,@sbindir@,$sbindir,;t t
16175 s,@libexecdir@,$libexecdir,;t t
16176 s,@datadir@,$datadir,;t t
16177 s,@sysconfdir@,$sysconfdir,;t t
16178 s,@sharedstatedir@,$sharedstatedir,;t t
16179 s,@localstatedir@,$localstatedir,;t t
16180 s,@libdir@,$libdir,;t t
16181 s,@includedir@,$includedir,;t t
16182 s,@oldincludedir@,$oldincludedir,;t t
16183 s,@infodir@,$infodir,;t t
16184 s,@mandir@,$mandir,;t t
16185 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16186 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16187 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16188 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16189 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16190 s,@build_alias@,$build_alias,;t t
16191 s,@host_alias@,$host_alias,;t t
16192 s,@target_alias@,$target_alias,;t t
16193 s,@ECHO_C@,$ECHO_C,;t t
16194 s,@ECHO_N@,$ECHO_N,;t t
16195 s,@ECHO_T@,$ECHO_T,;t t
16196 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16197 s,@DEFS@,$DEFS,;t t
16198 s,@LIBS@,$LIBS,;t t
16199 s,@top_builddir@,$top_builddir,;t t
16200 s,@EGREP@,$EGREP,;t t
16201 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16202 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16203 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16204 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16205 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16206 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16207 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16208 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16209 s,@build@,$build,;t t
16210 s,@build_cpu@,$build_cpu,;t t
16211 s,@build_vendor@,$build_vendor,;t t
16212 s,@build_os@,$build_os,;t t
16213 s,@host@,$host,;t t
16214 s,@host_cpu@,$host_cpu,;t t
16215 s,@host_vendor@,$host_vendor,;t t
16216 s,@host_os@,$host_os,;t t
16217 s,@target@,$target,;t t
16218 s,@target_cpu@,$target_cpu,;t t
16219 s,@target_vendor@,$target_vendor,;t t
16220 s,@target_os@,$target_os,;t t
16221 s,@CC@,$CC,;t t
16222 s,@CFLAGS@,$CFLAGS,;t t
16223 s,@LDFLAGS@,$LDFLAGS,;t t
16224 s,@CPPFLAGS@,$CPPFLAGS,;t t
16225 s,@ac_ct_CC@,$ac_ct_CC,;t t
16226 s,@EXEEXT@,$EXEEXT,;t t
16227 s,@OBJEXT@,$OBJEXT,;t t
16228 s,@CPP@,$CPP,;t t
16229 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16230 s,@PROG_EXT@,$PROG_EXT,;t t
16231 s,@LDCONFIG@,$LDCONFIG,;t t
16232 s,@CXX@,$CXX,;t t
16233 s,@CXXFLAGS@,$CXXFLAGS,;t t
16234 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16235 s,@AWK@,$AWK,;t t
16236 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16237 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16238 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16239 s,@LINT@,$LINT,;t t
16240 s,@LINT_OPTS@,$LINT_OPTS,;t t
16241 s,@LN_S@,$LN_S,;t t
16242 s,@SET_MAKE@,$SET_MAKE,;t t
16243 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16244 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16245 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16246 s,@RANLIB@,$RANLIB,;t t
16247 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16248 s,@LD@,$LD,;t t
16249 s,@ac_ct_LD@,$ac_ct_LD,;t t
16250 s,@AR@,$AR,;t t
16251 s,@ac_ct_AR@,$ac_ct_AR,;t t
16252 s,@AR_OPTS@,$AR_OPTS,;t t
16253 s,@DESTDIR@,$DESTDIR,;t t
16254 s,@BUILD_CC@,$BUILD_CC,;t t
16255 s,@BUILD_CPP@,$BUILD_CPP,;t t
16256 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16257 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16258 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16259 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16260 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16261 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16262 s,@cf_list_models@,$cf_list_models,;t t
16263 s,@LIBTOOL@,$LIBTOOL,;t t
16264 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16265 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16266 s,@LIB_CREATE@,$LIB_CREATE,;t t
16267 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16268 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16269 s,@LIB_PREP@,$LIB_PREP,;t t
16270 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16271 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16272 s,@LIB_LINK@,$LIB_LINK,;t t
16273 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16274 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16275 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16276 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16277 s,@TICS_NAME@,$TICS_NAME,;t t
16278 s,@TINFO_NAME@,$TINFO_NAME,;t t
16279 s,@LIB_NAME@,$LIB_NAME,;t t
16280 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16281 s,@CC_G_OPT@,$CC_G_OPT,;t t
16282 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16283 s,@LD_MODEL@,$LD_MODEL,;t t
16284 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16285 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16286 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16287 s,@LINK_PROGS@,$LINK_PROGS,;t t
16288 s,@LINK_TESTS@,$LINK_TESTS,;t t
16289 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16290 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16291 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16292 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16293 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16294 s,@PATHSEP@,$PATHSEP,;t t
16295 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16296 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16297 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16298 s,@TERMINFO@,$TERMINFO,;t t
16299 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16300 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16301 s,@TERMPATH@,$TERMPATH,;t t
16302 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16303 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16304 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16305 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16306 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16307 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16308 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16309 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16310 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16311 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16312 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16313 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16314 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16315 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16316 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16317 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16318 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16319 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16320 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16321 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16322 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16323 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16324 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16325 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16326 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16327 s,@ECHO_LINK@,$ECHO_LINK,;t t
16328 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16329 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16330 s,@ADA_TRACE@,$ADA_TRACE,;t t
16331 s,@MATH_LIB@,$MATH_LIB,;t t
16332 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16333 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16334 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16335 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16336 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16337 s,@CXXCPP@,$CXXCPP,;t t
16338 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16339 s,@CXX_AR@,$CXX_AR,;t t
16340 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16341 s,@CXXLIBS@,$CXXLIBS,;t t
16342 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16343 s,@gnat_exists@,$gnat_exists,;t t
16344 s,@M4_exists@,$M4_exists,;t t
16345 s,@cf_ada_make@,$cf_ada_make,;t t
16346 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16347 s,@cf_ada_package@,$cf_ada_package,;t t
16348 s,@ADAFLAGS@,$ADAFLAGS,;t t
16349 s,@cf_compile_generics@,$cf_compile_generics,;t t
16350 s,@cf_generic_objects@,$cf_generic_objects,;t t
16351 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16352 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16353 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16354 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16355 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16356 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16357 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16358 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16359 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16360 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16361 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16362 s,@TICS_ARGS@,$TICS_ARGS,;t t
16363 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16364 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16365 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16366 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16367 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16368 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16369 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16370 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16371 s,@TICS_LIST@,$TICS_LIST,;t t
16372 s,@TINFO_LIST@,$TINFO_LIST,;t t
16373 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16374 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16375 s,@TEST_ARGS@,$TEST_ARGS,;t t
16376 s,@TEST_DEPS@,$TEST_DEPS,;t t
16377 s,@TEST_ARG2@,$TEST_ARG2,;t t
16378 s,@TEST_DEP2@,$TEST_DEP2,;t t
16379 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16380 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16381 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16382 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16383 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16384 CEOF
16385
16386 EOF
16387
16388   cat >>$CONFIG_STATUS <<\EOF
16389   # Split the substitutions into bite-sized pieces for seds with
16390   # small command number limits, like on Digital OSF/1 and HP-UX.
16391   ac_max_sed_lines=48
16392   ac_sed_frag=1 # Number of current file.
16393   ac_beg=1 # First line for current file.
16394   ac_end=$ac_max_sed_lines # Line after last line for current file.
16395   ac_more_lines=:
16396   ac_sed_cmds=
16397   while $ac_more_lines; do
16398     if test $ac_beg -gt 1; then
16399       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16400     else
16401       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16402     fi
16403     if test ! -s $tmp/subs.frag; then
16404       ac_more_lines=false
16405     else
16406       # The purpose of the label and of the branching condition is to
16407       # speed up the sed processing (if there are no `@' at all, there
16408       # is no need to browse any of the substitutions).
16409       # These are the two extra sed commands mentioned above.
16410       (echo ':t
16411   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16412       if test -z "$ac_sed_cmds"; then
16413         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16414       else
16415         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16416       fi
16417       ac_sed_frag=`expr $ac_sed_frag + 1`
16418       ac_beg=$ac_end
16419       ac_end=`expr $ac_end + $ac_max_sed_lines`
16420     fi
16421   done
16422   if test -z "$ac_sed_cmds"; then
16423     ac_sed_cmds=cat
16424   fi
16425 fi # test -n "$CONFIG_FILES"
16426
16427 EOF
16428 cat >>$CONFIG_STATUS <<\EOF
16429 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16430   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16431   case $ac_file in
16432   - | *:- | *:-:* ) # input from stdin
16433         cat >$tmp/stdin
16434         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16435         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16436   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16437         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16438   * )   ac_file_in=$ac_file.in ;;
16439   esac
16440
16441   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16442   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16443          X"$ac_file" : 'X\(//\)[^/]' \| \
16444          X"$ac_file" : 'X\(//\)$' \| \
16445          X"$ac_file" : 'X\(/\)' \| \
16446          .     : '\(.\)' 2>/dev/null ||
16447 echo X"$ac_file" |
16448     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16449           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16450           /^X\(\/\/\)$/{ s//\1/; q; }
16451           /^X\(\/\).*/{ s//\1/; q; }
16452           s/.*/./; q'`
16453   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16454     { case "$ac_dir" in
16455   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16456   *)                      as_incr_dir=.;;
16457 esac
16458 as_dummy="$ac_dir"
16459 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16460   case $as_mkdir_dir in
16461     # Skip DOS drivespec
16462     ?:) as_incr_dir=$as_mkdir_dir ;;
16463     *)
16464       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16465       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16466     ;;
16467   esac
16468 done; }
16469
16470     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16471     # A "../" for each directory in $ac_dir_suffix.
16472     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16473   else
16474     ac_dir_suffix= ac_dots=
16475   fi
16476
16477   case $srcdir in
16478   .)  ac_srcdir=.
16479       if test -z "$ac_dots"; then
16480          ac_top_srcdir=.
16481       else
16482          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16483       fi ;;
16484   [\\/]* | ?:[\\/]* )
16485       ac_srcdir=$srcdir$ac_dir_suffix;
16486       ac_top_srcdir=$srcdir ;;
16487   *) # Relative path.
16488     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16489     ac_top_srcdir=$ac_dots$srcdir ;;
16490   esac
16491
16492   case $INSTALL in
16493   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16494   *) ac_INSTALL=$ac_dots$INSTALL ;;
16495   esac
16496
16497   if test x"$ac_file" != x-; then
16498     { echo "$as_me:16498: creating $ac_file" >&5
16499 echo "$as_me: creating $ac_file" >&6;}
16500     rm -f "$ac_file"
16501   fi
16502   # Let's still pretend it is `configure' which instantiates (i.e., don't
16503   # use $as_me), people would be surprised to read:
16504   #    /* config.h.  Generated automatically by config.status.  */
16505   configure_input="Generated automatically from `echo $ac_file_in |
16506                                                  sed 's,.*/,,'` by configure."
16507
16508   # First look for the input files in the build tree, otherwise in the
16509   # src tree.
16510   ac_file_inputs=`IFS=:
16511     for f in $ac_file_in; do
16512       case $f in
16513       -) echo $tmp/stdin ;;
16514       [\\/$]*)
16515          # Absolute (can't be DOS-style, as IFS=:)
16516          test -f "$f" || { { echo "$as_me:16516: error: cannot find input file: $f" >&5
16517 echo "$as_me: error: cannot find input file: $f" >&2;}
16518    { (exit 1); exit 1; }; }
16519          echo $f;;
16520       *) # Relative
16521          if test -f "$f"; then
16522            # Build tree
16523            echo $f
16524          elif test -f "$srcdir/$f"; then
16525            # Source tree
16526            echo $srcdir/$f
16527          else
16528            # /dev/null tree
16529            { { echo "$as_me:16529: error: cannot find input file: $f" >&5
16530 echo "$as_me: error: cannot find input file: $f" >&2;}
16531    { (exit 1); exit 1; }; }
16532          fi;;
16533       esac
16534     done` || { (exit 1); exit 1; }
16535 EOF
16536 cat >>$CONFIG_STATUS <<EOF
16537   sed "$ac_vpsub
16538 $extrasub
16539 EOF
16540 cat >>$CONFIG_STATUS <<\EOF
16541 :t
16542 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16543 s,@configure_input@,$configure_input,;t t
16544 s,@srcdir@,$ac_srcdir,;t t
16545 s,@top_srcdir@,$ac_top_srcdir,;t t
16546 s,@INSTALL@,$ac_INSTALL,;t t
16547 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16548   rm -f $tmp/stdin
16549   if test x"$ac_file" != x-; then
16550     mv $tmp/out $ac_file
16551   else
16552     cat $tmp/out
16553     rm -f $tmp/out
16554   fi
16555
16556 done
16557 EOF
16558 cat >>$CONFIG_STATUS <<\EOF
16559
16560 #
16561 # CONFIG_HEADER section.
16562 #
16563
16564 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16565 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16566 #
16567 # ac_d sets the value in "#define NAME VALUE" lines.
16568 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16569 ac_dB='[        ].*$,\1#\2'
16570 ac_dC=' '
16571 ac_dD=',;t'
16572 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16573 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16574 ac_iB='\([      ]\),\1#\2define\3'
16575 ac_iC=' '
16576 ac_iD='\4,;t'
16577 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16578 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16579 ac_uB='$,\1#\2define\3'
16580 ac_uC=' '
16581 ac_uD=',;t'
16582
16583 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16584   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16585   case $ac_file in
16586   - | *:- | *:-:* ) # input from stdin
16587         cat >$tmp/stdin
16588         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16589         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16590   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16591         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16592   * )   ac_file_in=$ac_file.in ;;
16593   esac
16594
16595   test x"$ac_file" != x- && { echo "$as_me:16595: creating $ac_file" >&5
16596 echo "$as_me: creating $ac_file" >&6;}
16597
16598   # First look for the input files in the build tree, otherwise in the
16599   # src tree.
16600   ac_file_inputs=`IFS=:
16601     for f in $ac_file_in; do
16602       case $f in
16603       -) echo $tmp/stdin ;;
16604       [\\/$]*)
16605          # Absolute (can't be DOS-style, as IFS=:)
16606          test -f "$f" || { { echo "$as_me:16606: error: cannot find input file: $f" >&5
16607 echo "$as_me: error: cannot find input file: $f" >&2;}
16608    { (exit 1); exit 1; }; }
16609          echo $f;;
16610       *) # Relative
16611          if test -f "$f"; then
16612            # Build tree
16613            echo $f
16614          elif test -f "$srcdir/$f"; then
16615            # Source tree
16616            echo $srcdir/$f
16617          else
16618            # /dev/null tree
16619            { { echo "$as_me:16619: error: cannot find input file: $f" >&5
16620 echo "$as_me: error: cannot find input file: $f" >&2;}
16621    { (exit 1); exit 1; }; }
16622          fi;;
16623       esac
16624     done` || { (exit 1); exit 1; }
16625   # Remove the trailing spaces.
16626   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16627
16628 EOF
16629
16630 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16631 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16632 # be either 'cat' or 'sort'.
16633 cat confdefs.h | uniq >conftest.vals
16634
16635 # Break up conftest.vals because some shells have a limit on
16636 # the size of here documents, and old seds have small limits too.
16637
16638 rm -f conftest.tail
16639 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16640 while grep . conftest.vals >/dev/null
16641 do
16642   # Write chunks of a limited-size here document to conftest.frag.
16643   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16644   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16645   echo 'CEOF' >> $CONFIG_STATUS
16646   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16647   rm -f conftest.vals
16648   mv conftest.tail conftest.vals
16649 done
16650 rm -f conftest.vals
16651
16652 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16653 # marker @DEFS@.
16654 echo '  cat >> conftest.edit <<CEOF
16655 /@DEFS@/r conftest.frag
16656 /@DEFS@/d
16657 CEOF
16658 sed -f conftest.edit $tmp/in > $tmp/out
16659 rm -f $tmp/in
16660 mv $tmp/out $tmp/in
16661 rm -f conftest.edit conftest.frag
16662 ' >> $CONFIG_STATUS
16663
16664 cat >>$CONFIG_STATUS <<\EOF
16665   # Let's still pretend it is `configure' which instantiates (i.e., don't
16666   # use $as_me), people would be surprised to read:
16667   #    /* config.h.  Generated automatically by config.status.  */
16668   if test x"$ac_file" = x-; then
16669     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16670   else
16671     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16672   fi
16673   cat $tmp/in >>$tmp/config.h
16674   rm -f $tmp/in
16675   if test x"$ac_file" != x-; then
16676     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16677       { echo "$as_me:16677: $ac_file is unchanged" >&5
16678 echo "$as_me: $ac_file is unchanged" >&6;}
16679     else
16680       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16681          X"$ac_file" : 'X\(//\)[^/]' \| \
16682          X"$ac_file" : 'X\(//\)$' \| \
16683          X"$ac_file" : 'X\(/\)' \| \
16684          .     : '\(.\)' 2>/dev/null ||
16685 echo X"$ac_file" |
16686     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16687           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16688           /^X\(\/\/\)$/{ s//\1/; q; }
16689           /^X\(\/\).*/{ s//\1/; q; }
16690           s/.*/./; q'`
16691       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16692         { case "$ac_dir" in
16693   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16694   *)                      as_incr_dir=.;;
16695 esac
16696 as_dummy="$ac_dir"
16697 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16698   case $as_mkdir_dir in
16699     # Skip DOS drivespec
16700     ?:) as_incr_dir=$as_mkdir_dir ;;
16701     *)
16702       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16703       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16704     ;;
16705   esac
16706 done; }
16707
16708       fi
16709       rm -f $ac_file
16710       mv $tmp/config.h $ac_file
16711     fi
16712   else
16713     cat $tmp/config.h
16714     rm -f $tmp/config.h
16715   fi
16716 done
16717 EOF
16718 cat >>$CONFIG_STATUS <<\EOF
16719
16720 #
16721 # CONFIG_COMMANDS section.
16722 #
16723 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16724   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16725   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16726
16727   case $ac_dest in
16728     default )
16729
16730 for cf_dir in test
16731 do
16732         if test ! -d $srcdir/$cf_dir; then
16733                 continue
16734         elif test -f $srcdir/$cf_dir/programs; then
16735                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16736         fi
16737 done
16738
16739         case $cf_cv_system_name in
16740         OS/2*)  LIB_PREFIX=''     ;;
16741         os2*)   LIB_PREFIX=''     ;;
16742         *)      LIB_PREFIX='lib'  ;;
16743         esac
16744 cf_prefix=$LIB_PREFIX
16745
16746 for cf_dir in $SRC_SUBDIRS
16747 do
16748         if test ! -d $srcdir/$cf_dir ; then
16749                 continue
16750         elif test -f $srcdir/$cf_dir/modules; then
16751
16752                 SHARED_LIB=
16753                 LIBS_TO_MAKE=
16754                 for cf_item in $cf_LIST_MODELS
16755                 do
16756
16757         case $cf_item in
16758         libtool) cf_suffix='.la'  ;;
16759         normal)  cf_suffix='.a'   ;;
16760         debug)   cf_suffix='_g.a' ;;
16761         profile) cf_suffix='_p.a' ;;
16762         shared)
16763                 case $cf_cv_system_name in
16764                 cygwin*) cf_suffix='.dll' ;;
16765                 darwin*) cf_suffix='.dylib' ;;
16766                 hpux*)
16767                         case $target in
16768                         ia64*)  cf_suffix='.so' ;;
16769                         *)      cf_suffix='.sl' ;;
16770                         esac
16771                         ;;
16772                 *)      cf_suffix='.so'  ;;
16773                 esac
16774         esac
16775         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16776
16777                         if test $cf_item = shared ; then
16778                         if test "$cf_cv_do_symlinks" = yes ; then
16779                                 case "$cf_cv_shlib_version" in #(vi
16780                                 rel) #(vi
16781                                         case "$cf_cv_system_name" in #(vi
16782                                         darwin*)
16783                                         case .${LIB_SUFFIX} in
16784                                         .w*)
16785                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16786                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16787                                                 ;;
16788                                         *)
16789                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16790                                                 ;;
16791                                         esac
16792                                         ;; #(vi
16793                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16794                                         esac
16795                                         ;;
16796                                 abi)
16797                                         case "$cf_cv_system_name" in #(vi
16798                                         darwin*)
16799                                         case .${LIB_SUFFIX} in
16800                                         .w*)
16801                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16802                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16803                                                 ;;
16804                                         *)
16805                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16806                                                 ;;
16807                                         esac
16808                                         ;; #(vi
16809                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16810                                         esac
16811                                         ;;
16812                                 esac
16813                         fi
16814                         # cygwin needs import library, and has unique naming convention
16815                         # use autodetected ${cf_prefix} for import lib and static lib, but
16816                         # use 'cyg' prefix for shared lib.
16817                         if test $cf_cv_shlib_version = cygdll ; then
16818                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16819                                 continue
16820                         fi
16821                         fi
16822                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16823                 done
16824
16825                 if test $cf_dir = ncurses ; then
16826                         cf_subsets="$LIB_SUBSETS"
16827                         cf_r_parts="$cf_subsets"
16828
16829                         while test -n "$cf_r_parts"
16830                         do
16831                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16832                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16833                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16834                                         case $cf_l_parts in #(vi
16835                                         *termlib*) #(vi
16836                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16837                                                 ;;
16838                                         *ticlib*)
16839                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16840                                                 ;;
16841                                         *)
16842                                                 break
16843                                                 ;;
16844                                         esac
16845                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16846                                 else
16847                                         break
16848                                 fi
16849                         done
16850                 else
16851                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16852                 fi
16853
16854                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16855                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16856                         $cf_dir/Makefile >$cf_dir/Makefile.out
16857                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16858
16859                 $AWK -f $srcdir/mk-0th.awk \
16860                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16861                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16862
16863                 for cf_subset in $cf_subsets
16864                 do
16865                         cf_subdirs=
16866                         for cf_item in $cf_LIST_MODELS
16867                         do
16868                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16869
16870 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16871
16872         case $cf_item in
16873         libtool) cf_suffix='.la'  ;;
16874         normal)  cf_suffix='.a'   ;;
16875         debug)   cf_suffix='_g.a' ;;
16876         profile) cf_suffix='_p.a' ;;
16877         shared)
16878                 case $cf_cv_system_name in
16879                 cygwin*) cf_suffix='.dll' ;;
16880                 darwin*) cf_suffix='.dylib' ;;
16881                 hpux*)
16882                         case $target in
16883                         ia64*)  cf_suffix='.so' ;;
16884                         *)      cf_suffix='.sl' ;;
16885                         esac
16886                         ;;
16887                 *)      cf_suffix='.so'  ;;
16888                 esac
16889         esac
16890         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16891
16892         case $cf_item in
16893         libtool) cf_subdir='obj_lo'  ;;
16894         normal)  cf_subdir='objects' ;;
16895         debug)   cf_subdir='obj_g' ;;
16896         profile) cf_subdir='obj_p' ;;
16897         shared)
16898                 case $cf_cv_system_name in #(vi
16899                 cygwin) #(vi
16900                         cf_subdir='objects' ;;
16901                 *)
16902                         cf_subdir='obj_s' ;;
16903                 esac
16904         esac
16905
16906                         # Test for case where we build libtinfo with a different name.
16907                         cf_libname=$cf_dir
16908                         if test $cf_dir = ncurses ; then
16909                                 case $cf_subset in
16910                                 *base*)
16911                                         ;;
16912                                 *termlib*)
16913                                         cf_libname=$TINFO_LIB_SUFFIX
16914                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16915                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16916                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16917                                         fi
16918                                         ;;
16919                                 ticlib*)
16920                                         cf_libname=$TICS_LIB_SUFFIX
16921                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16922                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16923                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16924                                         fi
16925                                         ;;
16926                                 esac
16927                         fi
16928
16929                         # These dependencies really are for development, not
16930                         # builds, but they are useful in porting, too.
16931                         cf_depend="../include/ncurses_cfg.h"
16932                         if test "$srcdir" = "."; then
16933                                 cf_reldir="."
16934                         else
16935                                 cf_reldir="\${srcdir}"
16936                         fi
16937
16938                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16939                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16940                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16941                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16942                         fi
16943
16944                         cf_dir_suffix=
16945                         old_cf_suffix="$cf_suffix"
16946                         if test "$cf_cv_shlib_version_infix" = yes ; then
16947                         if test -n "$LIB_SUFFIX" ; then
16948                                 case $LIB_SUFFIX in
16949                                 w*)
16950                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16951                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16952                                         cf_dir_suffix=w
16953                                         ;;
16954                                 esac
16955                         fi
16956                         fi
16957
16958                         $AWK -f $srcdir/mk-1st.awk \
16959                                 name=${cf_libname}${cf_dir_suffix} \
16960                                 traces=$LIB_TRACING \
16961                                 MODEL=$cf_ITEM \
16962                                 model=$cf_subdir \
16963                                 prefix=$cf_prefix \
16964                                 suffix=$cf_suffix \
16965                                 subset=$cf_subset \
16966                                 TermlibRoot=$TINFO_NAME \
16967                                 TermlibSuffix=$TINFO_SUFFIX \
16968                                 ShlibVer=$cf_cv_shlib_version \
16969                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16970                                 ReLink=${cf_cv_do_relink-no} \
16971                                 DoLinks=$cf_cv_do_symlinks \
16972                                 rmSoLocs=$cf_cv_rm_so_locs \
16973                                 ldconfig="$LDCONFIG" \
16974                                 overwrite=$WITH_OVERWRITE \
16975                                 depend="$cf_depend" \
16976                                 host="$host" \
16977                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16978
16979                         cf_suffix="$old_cf_suffix"
16980
16981                         for cf_subdir2 in $cf_subdirs lib
16982                         do
16983                                 test $cf_subdir = $cf_subdir2 && break
16984                         done
16985                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16986                         $AWK -f $srcdir/mk-2nd.awk \
16987                                 name=$cf_dir \
16988                                 traces=$LIB_TRACING \
16989                                 MODEL=$cf_ITEM \
16990                                 model=$cf_subdir \
16991                                 subset=$cf_subset \
16992                                 srcdir=$srcdir \
16993                                 echo=$WITH_ECHO \
16994                                 crenames=$cf_cv_prog_CC_c_o \
16995                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16996                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16997                         cf_subdirs="$cf_subdirs $cf_subdir"
16998                         done
16999                 done
17000         fi
17001
17002         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17003 done
17004
17005 for cf_dir in $SRC_SUBDIRS
17006 do
17007         if test ! -d $srcdir/$cf_dir ; then
17008                 continue
17009         fi
17010
17011         if test -f $cf_dir/Makefile ; then
17012                 case "$cf_dir" in
17013                 Ada95) #(vi
17014                         echo 'libs \' >> Makefile
17015                         echo 'install.libs \' >> Makefile
17016                         echo 'uninstall.libs ::' >> Makefile
17017                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17018                         ;;
17019                 esac
17020         fi
17021
17022         if test -f $srcdir/$cf_dir/modules; then
17023                 echo >> Makefile
17024                 if test -f $srcdir/$cf_dir/headers; then
17025 cat >> Makefile <<CF_EOF
17026 install.includes \\
17027 uninstall.includes \\
17028 CF_EOF
17029                 fi
17030 if test "$cf_dir" != "c++" ; then
17031 echo 'lint \' >> Makefile
17032 fi
17033 cat >> Makefile <<CF_EOF
17034 libs \\
17035 lintlib \\
17036 install.libs \\
17037 uninstall.libs \\
17038 install.$cf_dir \\
17039 uninstall.$cf_dir ::
17040         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17041 CF_EOF
17042         elif test -f $srcdir/$cf_dir/headers; then
17043 cat >> Makefile <<CF_EOF
17044
17045 libs \\
17046 install.libs \\
17047 uninstall.libs \\
17048 install.includes \\
17049 uninstall.includes ::
17050         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17051 CF_EOF
17052 fi
17053 done
17054
17055 cat >> Makefile <<CF_EOF
17056
17057 install.libs uninstall.libs \\
17058 install.data uninstall.data ::
17059 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17060
17061 install.man \\
17062 uninstall.man ::
17063         cd man && \${MAKE} \${CF_MFLAGS} \$@
17064
17065 distclean ::
17066         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17067         rm -f headers.sh headers.sed mk_shared_lib.sh
17068         rm -rf \${DIRS_TO_MAKE}
17069 CF_EOF
17070
17071 # Special case: tack's manpage lives in its own directory.
17072 if test -d tack ; then
17073 if test -f $srcdir/$tack.h; then
17074 cat >> Makefile <<CF_EOF
17075
17076 install.man \\
17077 uninstall.man ::
17078         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17079 CF_EOF
17080 fi
17081 fi
17082
17083 rm -f headers.sed headers.sh
17084
17085 echo creating headers.sh
17086 cat >headers.sh <<CF_EOF
17087 #! /bin/sh
17088 # This shell script is generated by the 'configure' script.  It is invoked in a
17089 # subdirectory of the build tree.  It generates a sed-script in the parent
17090 # directory that is used to adjust includes for header files that reside in a
17091 # subdirectory of /usr/include, etc.
17092 PRG=""
17093 while test \$# != 3
17094 do
17095 PRG="\$PRG \$1"; shift
17096 done
17097 DST=\$1
17098 REF=\$2
17099 SRC=\$3
17100 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17101 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17102 echo installing \$SRC in \$DST
17103 CF_EOF
17104
17105 if test $WITH_CURSES_H = yes; then
17106         cat >>headers.sh <<CF_EOF
17107 case \$DST in
17108 /*/include/*)
17109         END=\`basename \$DST\`
17110         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17111         do
17112                 NAME=\`basename \$i\`
17113                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17114         done
17115         ;;
17116 *)
17117         echo "" >> \$TMPSED
17118         ;;
17119 esac
17120 CF_EOF
17121
17122 else
17123         cat >>headers.sh <<CF_EOF
17124 case \$DST in
17125 /*/include/*)
17126         END=\`basename \$DST\`
17127         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17128         do
17129                 NAME=\`basename \$i\`
17130                 if test "\$NAME" = "curses.h"
17131                 then
17132                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17133                         NAME=ncurses.h
17134                 fi
17135                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17136         done
17137         ;;
17138 *)
17139         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17140         ;;
17141 esac
17142 CF_EOF
17143 fi
17144 cat >>headers.sh <<CF_EOF
17145 rm -f \$TMPSRC
17146 sed -f \$TMPSED \$SRC > \$TMPSRC
17147 NAME=\`basename \$SRC\`
17148 CF_EOF
17149 if test $WITH_CURSES_H != yes; then
17150         cat >>headers.sh <<CF_EOF
17151 test "\$NAME" = "curses.h" && NAME=ncurses.h
17152 CF_EOF
17153 fi
17154 cat >>headers.sh <<CF_EOF
17155 # Just in case someone gzip'd manpages, remove the conflicting copy.
17156 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17157
17158 eval \$PRG \$TMPSRC \$DST/\$NAME
17159 rm -f \$TMPSRC \$TMPSED
17160 CF_EOF
17161
17162 chmod 0755 headers.sh
17163
17164 for cf_dir in $SRC_SUBDIRS
17165 do
17166         if test ! -d $srcdir/$cf_dir ; then
17167                 continue
17168         fi
17169
17170         if test -f $srcdir/$cf_dir/headers; then
17171                 $AWK -f $srcdir/mk-hdr.awk \
17172                         subset="$LIB_SUBSETS" \
17173                         compat="$WITH_CURSES_H" \
17174                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17175         fi
17176
17177         if test -f $srcdir/$cf_dir/modules; then
17178                 if test "$cf_dir" != "c++" ; then
17179                         cat >>$cf_dir/Makefile <<"CF_EOF"
17180 depend : ${AUTO_SRC}
17181         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17182
17183 # DO NOT DELETE THIS LINE -- make depend depends on it.
17184 CF_EOF
17185                 fi
17186         fi
17187 done
17188
17189  ;;
17190   esac
17191 done
17192 EOF
17193
17194 cat >>$CONFIG_STATUS <<\EOF
17195
17196 { (exit 0); exit 0; }
17197 EOF
17198 chmod +x $CONFIG_STATUS
17199 ac_clean_files=$ac_clean_files_save
17200
17201 # configure is writing to config.log, and then calls config.status.
17202 # config.status does its own redirection, appending to config.log.
17203 # Unfortunately, on DOS this fails, as config.log is still kept open
17204 # by configure, so config.status won't be able to write to it; its
17205 # output is simply discarded.  So we exec the FD to /dev/null,
17206 # effectively closing config.log, so it can be properly (re)opened and
17207 # appended to by config.status.  When coming back to configure, we
17208 # need to make the FD available again.
17209 if test "$no_create" != yes; then
17210   ac_cs_success=:
17211   exec 5>/dev/null
17212   $SHELL $CONFIG_STATUS || ac_cs_success=false
17213   exec 5>>config.log
17214   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17215   # would make configure fail if this is the last instruction.
17216   $ac_cs_success || { (exit 1); exit 1; }
17217 fi
17218 ${MAKE-make} preinstall