]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
3c5d3506a980c7d840d663c17414bee8a8cf243f
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.427 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --with-bool=TYPE        override fallback type of bool variable
750   --with-caps=alt         compile with alternate Caps file
751   --with-chtype=TYPE      override type of chtype
752   --with-ospeed=TYPE      override type of ospeed variable
753   --with-mmask-t=TYPE     override type of mmask_t
754   --with-rcs-ids          compile-in RCS identifiers
755 Options to Specify How Manpages are Installed:
756   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
757                           optionally formatted/catonly, e.g., gzip,formatted
758   --with-manpage-renames  specify manpage-renaming
759   --with-manpage-aliases  specify manpage-aliases using .so
760   --with-manpage-symlinks specify manpage-aliases using symlinks
761   --with-manpage-tbl      specify manpage processing with tbl
762 Extensions:
763   --disable-ext-funcs     disable function-extensions
764   --enable-const          compile with extra/non-standard const
765   --enable-no-padding     compile with $NCURSES_NO_PADDING code
766   --enable-signed-char    compile using signed Boolean's in term.h
767   --enable-sigwinch       compile with SIGWINCH handler
768   --enable-tcap-names     compile with user-definable terminal capabilities
769 Development Code:
770   --without-develop       disable development options
771   --enable-hard-tabs      compile with hard-tabs code
772   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
773 Experimental Code:
774   --disable-assumed-color do not assume anything about default-colors
775   --disable-hashmap       compile without hashmap scrolling-optimization
776   --enable-colorfgbg      compile with $COLORFGBG code
777   --enable-ext-colors     compile for experimental 256-color support
778   --enable-ext-mouse      compile for experimental mouse-encoding
779   --enable-reentrant      compile with experimental reentrant code
780   --enable-safe-sprintf   compile with experimental safe-sprintf code
781   --disable-scroll-hints  compile without scroll-hints code
782   --enable-wgetch-events  compile with experimental wgetch-events code
783 Testing/development Options:
784   --enable-echo           build: display "compiling" commands (default)
785   --enable-warnings       build: turn on GCC compiler warnings
786   --enable-assertions     test: turn on generation of assertion code
787   --with-dmalloc          test: use Gray Watson's dmalloc library
788   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
789   --with-valgrind         test: use valgrind
790   --disable-leaks         test: free permanent memory, analyze leaks
791   --enable-expanded       test: generate functions for certain macros
792   --disable-macros        test: use functions rather than macros
793   --with-trace            test: add trace() function to all models of ncurses
794 Ada95 Binding Options:
795   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
796   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
797   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
798
799 Some influential environment variables:
800   CC          C compiler command
801   CFLAGS      C compiler flags
802   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
803               nonstandard directory <lib dir>
804   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
805               headers in a nonstandard directory <include dir>
806   CPP         C preprocessor
807   CXX         C++ compiler command
808   CXXFLAGS    C++ compiler flags
809   CXXCPP      C++ preprocessor
810
811 Use these variables to override the choices made by `configure' or to help
812 it to find libraries and programs with nonstandard names/locations.
813
814 EOF
815 fi
816
817 if test "$ac_init_help" = "recursive"; then
818   # If there are subdirs, report their specific --help.
819   ac_popdir=`pwd`
820   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
821     cd $ac_subdir
822     # A "../" for each directory in /$ac_subdir.
823     ac_dots=`echo $ac_subdir |
824              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
825
826     case $srcdir in
827     .) # No --srcdir option.  We are building in place.
828       ac_sub_srcdir=$srcdir ;;
829     [\\/]* | ?:[\\/]* ) # Absolute path.
830       ac_sub_srcdir=$srcdir/$ac_subdir ;;
831     *) # Relative path.
832       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
833     esac
834
835     # Check for guested configure; otherwise get Cygnus style configure.
836     if test -f $ac_sub_srcdir/configure.gnu; then
837       echo
838       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
839     elif test -f $ac_sub_srcdir/configure; then
840       echo
841       $SHELL $ac_sub_srcdir/configure  --help=recursive
842     elif test -f $ac_sub_srcdir/configure.ac ||
843            test -f $ac_sub_srcdir/configure.in; then
844       echo
845       $ac_configure --help
846     else
847       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
848     fi
849     cd $ac_popdir
850   done
851 fi
852
853 test -n "$ac_init_help" && exit 0
854 if $ac_init_version; then
855   cat <<\EOF
856
857 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
858 Free Software Foundation, Inc.
859 This configure script is free software; the Free Software Foundation
860 gives unlimited permission to copy, distribute and modify it.
861 EOF
862   exit 0
863 fi
864 exec 5>config.log
865 cat >&5 <<EOF
866 This file contains any messages produced by compilers while
867 running configure, to aid debugging if configure makes a mistake.
868
869 It was created by $as_me, which was
870 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
871
872   $ $0 $@
873
874 EOF
875 {
876 cat <<_ASUNAME
877 ## ---------- ##
878 ## Platform.  ##
879 ## ---------- ##
880
881 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
882 uname -m = `(uname -m) 2>/dev/null || echo unknown`
883 uname -r = `(uname -r) 2>/dev/null || echo unknown`
884 uname -s = `(uname -s) 2>/dev/null || echo unknown`
885 uname -v = `(uname -v) 2>/dev/null || echo unknown`
886
887 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
888 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
889
890 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
891 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
892 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
893 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
894 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
895 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
896 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
897
898 PATH = $PATH
899
900 _ASUNAME
901 } >&5
902
903 cat >&5 <<EOF
904 ## ------------ ##
905 ## Core tests.  ##
906 ## ------------ ##
907
908 EOF
909
910 # Keep a trace of the command line.
911 # Strip out --no-create and --no-recursion so they do not pile up.
912 # Also quote any args containing shell meta-characters.
913 ac_configure_args=
914 ac_sep=
915 for ac_arg
916 do
917   case $ac_arg in
918   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
919   | --no-cr | --no-c) ;;
920   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
921   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
922   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
923     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
924     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
925     ac_sep=" " ;;
926   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
927      ac_sep=" " ;;
928   esac
929   # Get rid of the leading space.
930 done
931
932 # When interrupted or exit'd, cleanup temporary files, and complete
933 # config.log.  We remove comments because anyway the quotes in there
934 # would cause problems or look ugly.
935 trap 'exit_status=$?
936   # Save into config.log some information that might help in debugging.
937   echo >&5
938   echo "## ----------------- ##" >&5
939   echo "## Cache variables.  ##" >&5
940   echo "## ----------------- ##" >&5
941   echo >&5
942   # The following way of writing the cache mishandles newlines in values,
943 {
944   (set) 2>&1 |
945     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
946     *ac_space=\ *)
947       sed -n \
948         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
949           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
950       ;;
951     *)
952       sed -n \
953         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
954       ;;
955     esac;
956 } >&5
957   sed "/^$/d" confdefs.h >conftest.log
958   if test -s conftest.log; then
959     echo >&5
960     echo "## ------------ ##" >&5
961     echo "## confdefs.h.  ##" >&5
962     echo "## ------------ ##" >&5
963     echo >&5
964     cat conftest.log >&5
965   fi
966   (echo; echo) >&5
967   test "$ac_signal" != 0 &&
968     echo "$as_me: caught signal $ac_signal" >&5
969   echo "$as_me: exit $exit_status" >&5
970   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
971     exit $exit_status
972      ' 0
973 for ac_signal in 1 2 13 15; do
974   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
975 done
976 ac_signal=0
977
978 # confdefs.h avoids OS command line length limits that DEFS can exceed.
979 rm -rf conftest* confdefs.h
980 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
981 echo >confdefs.h
982
983 # Let the site file select an alternate cache file if it wants to.
984 # Prefer explicitly selected file to automatically selected ones.
985 if test -z "$CONFIG_SITE"; then
986   if test "x$prefix" != xNONE; then
987     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
988   else
989     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
990   fi
991 fi
992 for ac_site_file in $CONFIG_SITE; do
993   if test -r "$ac_site_file"; then
994     { echo "$as_me:994: loading site script $ac_site_file" >&5
995 echo "$as_me: loading site script $ac_site_file" >&6;}
996     cat "$ac_site_file" >&5
997     . "$ac_site_file"
998   fi
999 done
1000
1001 if test -r "$cache_file"; then
1002   # Some versions of bash will fail to source /dev/null (special
1003   # files actually), so we avoid doing that.
1004   if test -f "$cache_file"; then
1005     { echo "$as_me:1005: loading cache $cache_file" >&5
1006 echo "$as_me: loading cache $cache_file" >&6;}
1007     case $cache_file in
1008       [\\/]* | ?:[\\/]* ) . $cache_file;;
1009       *)                      . ./$cache_file;;
1010     esac
1011   fi
1012 else
1013   { echo "$as_me:1013: creating cache $cache_file" >&5
1014 echo "$as_me: creating cache $cache_file" >&6;}
1015   >$cache_file
1016 fi
1017
1018 # Check that the precious variables saved in the cache have kept the same
1019 # value.
1020 ac_cache_corrupted=false
1021 for ac_var in `(set) 2>&1 |
1022                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1023   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1024   eval ac_new_set=\$ac_env_${ac_var}_set
1025   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1026   eval ac_new_val="\$ac_env_${ac_var}_value"
1027   case $ac_old_set,$ac_new_set in
1028     set,)
1029       { echo "$as_me:1029: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1030 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1031       ac_cache_corrupted=: ;;
1032     ,set)
1033       { echo "$as_me:1033: error: \`$ac_var' was not set in the previous run" >&5
1034 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1035       ac_cache_corrupted=: ;;
1036     ,);;
1037     *)
1038       if test "x$ac_old_val" != "x$ac_new_val"; then
1039         { echo "$as_me:1039: error: \`$ac_var' has changed since the previous run:" >&5
1040 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1041         { echo "$as_me:1041:   former value:  $ac_old_val" >&5
1042 echo "$as_me:   former value:  $ac_old_val" >&2;}
1043         { echo "$as_me:1043:   current value: $ac_new_val" >&5
1044 echo "$as_me:   current value: $ac_new_val" >&2;}
1045         ac_cache_corrupted=:
1046       fi;;
1047   esac
1048   # Pass precious variables to config.status.  It doesn't matter if
1049   # we pass some twice (in addition to the command line arguments).
1050   if test "$ac_new_set" = set; then
1051     case $ac_new_val in
1052     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1053       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1054       ac_configure_args="$ac_configure_args '$ac_arg'"
1055       ;;
1056     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1057        ;;
1058     esac
1059   fi
1060 done
1061 if $ac_cache_corrupted; then
1062   { echo "$as_me:1062: error: changes in the environment can compromise the build" >&5
1063 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1064   { { echo "$as_me:1064: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1065 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1066    { (exit 1); exit 1; }; }
1067 fi
1068
1069 ac_ext=c
1070 ac_cpp='$CPP $CPPFLAGS'
1071 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1072 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1073 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1074 ac_main_return=return
1075
1076 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1077   *c*,-n*) ECHO_N= ECHO_C='
1078 ' ECHO_T='      ' ;;
1079   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1080   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1081 esac
1082 echo "#! $SHELL" >conftest.sh
1083 echo  "exit 0"   >>conftest.sh
1084 chmod +x conftest.sh
1085 if { (echo "$as_me:1085: PATH=\".;.\"; conftest.sh") >&5
1086   (PATH=".;."; conftest.sh) 2>&5
1087   ac_status=$?
1088   echo "$as_me:1088: \$? = $ac_status" >&5
1089   (exit $ac_status); }; then
1090   ac_path_separator=';'
1091 else
1092   ac_path_separator=:
1093 fi
1094 PATH_SEPARATOR="$ac_path_separator"
1095 rm -f conftest.sh
1096
1097 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1098
1099 top_builddir=`pwd`
1100
1101 echo "$as_me:1101: checking for egrep" >&5
1102 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1103 if test "${ac_cv_prog_egrep+set}" = set; then
1104   echo $ECHO_N "(cached) $ECHO_C" >&6
1105 else
1106   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1107     then ac_cv_prog_egrep='grep -E'
1108     else ac_cv_prog_egrep='egrep'
1109     fi
1110 fi
1111 echo "$as_me:1111: result: $ac_cv_prog_egrep" >&5
1112 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1113  EGREP=$ac_cv_prog_egrep
1114
1115 test -z "$EGREP" && { { echo "$as_me:1115: error: No egrep program found" >&5
1116 echo "$as_me: error: No egrep program found" >&2;}
1117    { (exit 1); exit 1; }; }
1118
1119 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1121 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 cf_cv_abi_version=${NCURSES_MAJOR}
1123 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1124 cf_cv_timestamp=`date`
1125 echo "$as_me:1125: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1126 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1127
1128 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1129
1130 # Check whether --with-rel-version or --without-rel-version was given.
1131 if test "${with_rel_version+set}" = set; then
1132   withval="$with_rel_version"
1133   { echo "$as_me:1133: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1134 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1135  cf_cv_rel_version=$withval
1136 fi;
1137
1138  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1139  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1140
1141 if test -n "$NCURSES_MAJOR" ; then
1142   case $NCURSES_MAJOR in #(vi
1143   [0-9]*) #(vi
1144         ;;
1145   *)
1146         { { echo "$as_me:1146: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1147 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1148    { (exit 1); exit 1; }; }
1149         ;;
1150   esac
1151 else
1152   { { echo "$as_me:1152: error: Release major-version value is empty" >&5
1153 echo "$as_me: error: Release major-version value is empty" >&2;}
1154    { (exit 1); exit 1; }; }
1155 fi
1156
1157 if test -n "$NCURSES_MINOR" ; then
1158   case $NCURSES_MINOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1163 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release minor-version value is empty" >&5
1169 echo "$as_me: error: Release minor-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1174
1175 # Check whether --with-abi-version or --without-abi-version was given.
1176 if test "${with_abi_version+set}" = set; then
1177   withval="$with_abi_version"
1178   { echo "$as_me:1178: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1179 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1180  cf_cv_abi_version=$withval
1181 fi;
1182
1183 if test -n "$cf_cv_abi_version" ; then
1184   case $cf_cv_abi_version in #(vi
1185   [0-9]*) #(vi
1186         ;;
1187   *)
1188         { { echo "$as_me:1188: error: ABI version is not a number: $cf_cv_abi_version" >&5
1189 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1190    { (exit 1); exit 1; }; }
1191         ;;
1192   esac
1193 else
1194   { { echo "$as_me:1194: error: ABI version value is empty" >&5
1195 echo "$as_me: error: ABI version value is empty" >&2;}
1196    { (exit 1); exit 1; }; }
1197 fi
1198
1199 ac_aux_dir=
1200 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1201   if test -f $ac_dir/install-sh; then
1202     ac_aux_dir=$ac_dir
1203     ac_install_sh="$ac_aux_dir/install-sh -c"
1204     break
1205   elif test -f $ac_dir/install.sh; then
1206     ac_aux_dir=$ac_dir
1207     ac_install_sh="$ac_aux_dir/install.sh -c"
1208     break
1209   elif test -f $ac_dir/shtool; then
1210     ac_aux_dir=$ac_dir
1211     ac_install_sh="$ac_aux_dir/shtool install -c"
1212     break
1213   fi
1214 done
1215 if test -z "$ac_aux_dir"; then
1216   { { echo "$as_me:1216: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1217 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1218    { (exit 1); exit 1; }; }
1219 fi
1220 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1221 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1222 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1223
1224 # Make sure we can run config.sub.
1225 $ac_config_sub sun4 >/dev/null 2>&1 ||
1226   { { echo "$as_me:1226: error: cannot run $ac_config_sub" >&5
1227 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1228    { (exit 1); exit 1; }; }
1229
1230 echo "$as_me:1230: checking build system type" >&5
1231 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1232 if test "${ac_cv_build+set}" = set; then
1233   echo $ECHO_N "(cached) $ECHO_C" >&6
1234 else
1235   ac_cv_build_alias=$build_alias
1236 test -z "$ac_cv_build_alias" &&
1237   ac_cv_build_alias=`$ac_config_guess`
1238 test -z "$ac_cv_build_alias" &&
1239   { { echo "$as_me:1239: error: cannot guess build type; you must specify one" >&5
1240 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1241    { (exit 1); exit 1; }; }
1242 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1243   { { echo "$as_me:1243: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1244 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1245    { (exit 1); exit 1; }; }
1246
1247 fi
1248 echo "$as_me:1248: result: $ac_cv_build" >&5
1249 echo "${ECHO_T}$ac_cv_build" >&6
1250 build=$ac_cv_build
1251 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1252 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1253 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1254
1255 echo "$as_me:1255: checking host system type" >&5
1256 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1257 if test "${ac_cv_host+set}" = set; then
1258   echo $ECHO_N "(cached) $ECHO_C" >&6
1259 else
1260   ac_cv_host_alias=$host_alias
1261 test -z "$ac_cv_host_alias" &&
1262   ac_cv_host_alias=$ac_cv_build_alias
1263 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1264   { { echo "$as_me:1264: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1265 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1266    { (exit 1); exit 1; }; }
1267
1268 fi
1269 echo "$as_me:1269: result: $ac_cv_host" >&5
1270 echo "${ECHO_T}$ac_cv_host" >&6
1271 host=$ac_cv_host
1272 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1273 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1274 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1275
1276 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1277         echo "$as_me:1277: checking target system type" >&5
1278 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1279 if test "${ac_cv_target+set}" = set; then
1280   echo $ECHO_N "(cached) $ECHO_C" >&6
1281 else
1282   ac_cv_target_alias=$target_alias
1283 test "x$ac_cv_target_alias" = "x" &&
1284   ac_cv_target_alias=$ac_cv_host_alias
1285 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1286   { { echo "$as_me:1286: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1287 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1288    { (exit 1); exit 1; }; }
1289
1290 fi
1291 echo "$as_me:1291: result: $ac_cv_target" >&5
1292 echo "${ECHO_T}$ac_cv_target" >&6
1293 target=$ac_cv_target
1294 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1295 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1296 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1297
1298 # The aliases save the names the user supplied, while $host etc.
1299 # will get canonicalized.
1300 test -n "$target_alias" &&
1301   test "$program_prefix$program_suffix$program_transform_name" = \
1302     NONENONEs,x,x, &&
1303   program_prefix=${target_alias}-
1304         system_name="$host_os"
1305 else
1306         system_name="`(uname -s -r) 2>/dev/null`"
1307         if test -z "$system_name" ; then
1308                 system_name="`(hostname) 2>/dev/null`"
1309         fi
1310 fi
1311 test -n "$system_name" && cat >>confdefs.h <<EOF
1312 #define SYSTEM_NAME "$system_name"
1313 EOF
1314
1315 if test "${cf_cv_system_name+set}" = set; then
1316   echo $ECHO_N "(cached) $ECHO_C" >&6
1317 else
1318   cf_cv_system_name="$system_name"
1319 fi
1320
1321 test -z "$system_name" && system_name="$cf_cv_system_name"
1322 test -n "$cf_cv_system_name" && echo "$as_me:1322: result: Configuring for $cf_cv_system_name" >&5
1323 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1324
1325 if test ".$system_name" != ".$cf_cv_system_name" ; then
1326         echo "$as_me:1326: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1327 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1328         { { echo "$as_me:1328: error: \"Please remove config.cache and try again.\"" >&5
1329 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1330    { (exit 1); exit 1; }; }
1331 fi
1332
1333 # Check whether --with-system-type or --without-system-type was given.
1334 if test "${with_system_type+set}" = set; then
1335   withval="$with_system_type"
1336   { echo "$as_me:1336: WARNING: overriding system type to $withval" >&5
1337 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1338  cf_cv_system_name=$withval
1339 fi;
1340
1341 ###     Save the given $CFLAGS to allow user-override.
1342 cf_user_CFLAGS="$CFLAGS"
1343
1344 ###     Default install-location
1345
1346 echo "$as_me:1346: checking for prefix" >&5
1347 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1348 if test "x$prefix" = "xNONE" ; then
1349         case "$cf_cv_system_name" in
1350                 # non-vendor systems don't have a conflict
1351         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1352                 prefix=/usr
1353                 ;;
1354         *)      prefix=$ac_default_prefix
1355                 ;;
1356         esac
1357 fi
1358 echo "$as_me:1358: result: $prefix" >&5
1359 echo "${ECHO_T}$prefix" >&6
1360
1361 if test "x$prefix" = "xNONE" ; then
1362 echo "$as_me:1362: checking for default include-directory" >&5
1363 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1364 test -n "$verbose" && echo 1>&6
1365 for cf_symbol in \
1366         $includedir \
1367         $includedir/ncurses \
1368         $prefix/include \
1369         $prefix/include/ncurses \
1370         /usr/local/include \
1371         /usr/local/include/ncurses \
1372         /usr/include \
1373         /usr/include/ncurses
1374 do
1375         cf_dir=`eval echo $cf_symbol`
1376         if test -f $cf_dir/curses.h ; then
1377         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1378                 includedir="$cf_symbol"
1379                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1380                 break
1381         fi
1382         fi
1383         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1384 done
1385 echo "$as_me:1385: result: $includedir" >&5
1386 echo "${ECHO_T}$includedir" >&6
1387 fi
1388
1389 ###     Checks for programs.
1390 ac_ext=c
1391 ac_cpp='$CPP $CPPFLAGS'
1392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1395 ac_main_return=return
1396 if test -n "$ac_tool_prefix"; then
1397   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1398 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1399 echo "$as_me:1399: checking for $ac_word" >&5
1400 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1401 if test "${ac_cv_prog_CC+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   if test -n "$CC"; then
1405   ac_cv_prog_CC="$CC" # Let the user override the test.
1406 else
1407   ac_save_IFS=$IFS; IFS=$ac_path_separator
1408 ac_dummy="$PATH"
1409 for ac_dir in $ac_dummy; do
1410   IFS=$ac_save_IFS
1411   test -z "$ac_dir" && ac_dir=.
1412   $as_executable_p "$ac_dir/$ac_word" || continue
1413 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1414 echo "$as_me:1414: found $ac_dir/$ac_word" >&5
1415 break
1416 done
1417
1418 fi
1419 fi
1420 CC=$ac_cv_prog_CC
1421 if test -n "$CC"; then
1422   echo "$as_me:1422: result: $CC" >&5
1423 echo "${ECHO_T}$CC" >&6
1424 else
1425   echo "$as_me:1425: result: no" >&5
1426 echo "${ECHO_T}no" >&6
1427 fi
1428
1429 fi
1430 if test -z "$ac_cv_prog_CC"; then
1431   ac_ct_CC=$CC
1432   # Extract the first word of "gcc", so it can be a program name with args.
1433 set dummy gcc; ac_word=$2
1434 echo "$as_me:1434: checking for $ac_word" >&5
1435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1436 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   if test -n "$ac_ct_CC"; then
1440   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1441 else
1442   ac_save_IFS=$IFS; IFS=$ac_path_separator
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445   IFS=$ac_save_IFS
1446   test -z "$ac_dir" && ac_dir=.
1447   $as_executable_p "$ac_dir/$ac_word" || continue
1448 ac_cv_prog_ac_ct_CC="gcc"
1449 echo "$as_me:1449: found $ac_dir/$ac_word" >&5
1450 break
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:1457: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:1460: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   CC=$ac_ct_CC
1465 else
1466   CC="$ac_cv_prog_CC"
1467 fi
1468
1469 if test -z "$CC"; then
1470   if test -n "$ac_tool_prefix"; then
1471   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1472 set dummy ${ac_tool_prefix}cc; ac_word=$2
1473 echo "$as_me:1473: checking for $ac_word" >&5
1474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1475 if test "${ac_cv_prog_CC+set}" = set; then
1476   echo $ECHO_N "(cached) $ECHO_C" >&6
1477 else
1478   if test -n "$CC"; then
1479   ac_cv_prog_CC="$CC" # Let the user override the test.
1480 else
1481   ac_save_IFS=$IFS; IFS=$ac_path_separator
1482 ac_dummy="$PATH"
1483 for ac_dir in $ac_dummy; do
1484   IFS=$ac_save_IFS
1485   test -z "$ac_dir" && ac_dir=.
1486   $as_executable_p "$ac_dir/$ac_word" || continue
1487 ac_cv_prog_CC="${ac_tool_prefix}cc"
1488 echo "$as_me:1488: found $ac_dir/$ac_word" >&5
1489 break
1490 done
1491
1492 fi
1493 fi
1494 CC=$ac_cv_prog_CC
1495 if test -n "$CC"; then
1496   echo "$as_me:1496: result: $CC" >&5
1497 echo "${ECHO_T}$CC" >&6
1498 else
1499   echo "$as_me:1499: result: no" >&5
1500 echo "${ECHO_T}no" >&6
1501 fi
1502
1503 fi
1504 if test -z "$ac_cv_prog_CC"; then
1505   ac_ct_CC=$CC
1506   # Extract the first word of "cc", so it can be a program name with args.
1507 set dummy cc; ac_word=$2
1508 echo "$as_me:1508: checking for $ac_word" >&5
1509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1510 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1511   echo $ECHO_N "(cached) $ECHO_C" >&6
1512 else
1513   if test -n "$ac_ct_CC"; then
1514   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1515 else
1516   ac_save_IFS=$IFS; IFS=$ac_path_separator
1517 ac_dummy="$PATH"
1518 for ac_dir in $ac_dummy; do
1519   IFS=$ac_save_IFS
1520   test -z "$ac_dir" && ac_dir=.
1521   $as_executable_p "$ac_dir/$ac_word" || continue
1522 ac_cv_prog_ac_ct_CC="cc"
1523 echo "$as_me:1523: found $ac_dir/$ac_word" >&5
1524 break
1525 done
1526
1527 fi
1528 fi
1529 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1530 if test -n "$ac_ct_CC"; then
1531   echo "$as_me:1531: result: $ac_ct_CC" >&5
1532 echo "${ECHO_T}$ac_ct_CC" >&6
1533 else
1534   echo "$as_me:1534: result: no" >&5
1535 echo "${ECHO_T}no" >&6
1536 fi
1537
1538   CC=$ac_ct_CC
1539 else
1540   CC="$ac_cv_prog_CC"
1541 fi
1542
1543 fi
1544 if test -z "$CC"; then
1545   # Extract the first word of "cc", so it can be a program name with args.
1546 set dummy cc; ac_word=$2
1547 echo "$as_me:1547: checking for $ac_word" >&5
1548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1549 if test "${ac_cv_prog_CC+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   if test -n "$CC"; then
1553   ac_cv_prog_CC="$CC" # Let the user override the test.
1554 else
1555   ac_prog_rejected=no
1556   ac_save_IFS=$IFS; IFS=$ac_path_separator
1557 ac_dummy="$PATH"
1558 for ac_dir in $ac_dummy; do
1559   IFS=$ac_save_IFS
1560   test -z "$ac_dir" && ac_dir=.
1561   $as_executable_p "$ac_dir/$ac_word" || continue
1562 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1563   ac_prog_rejected=yes
1564   continue
1565 fi
1566 ac_cv_prog_CC="cc"
1567 echo "$as_me:1567: found $ac_dir/$ac_word" >&5
1568 break
1569 done
1570
1571 if test $ac_prog_rejected = yes; then
1572   # We found a bogon in the path, so make sure we never use it.
1573   set dummy $ac_cv_prog_CC
1574   shift
1575   if test $# != 0; then
1576     # We chose a different compiler from the bogus one.
1577     # However, it has the same basename, so the bogon will be chosen
1578     # first if we set CC to just the basename; use the full file name.
1579     shift
1580     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1581     shift
1582     ac_cv_prog_CC="$@"
1583   fi
1584 fi
1585 fi
1586 fi
1587 CC=$ac_cv_prog_CC
1588 if test -n "$CC"; then
1589   echo "$as_me:1589: result: $CC" >&5
1590 echo "${ECHO_T}$CC" >&6
1591 else
1592   echo "$as_me:1592: result: no" >&5
1593 echo "${ECHO_T}no" >&6
1594 fi
1595
1596 fi
1597 if test -z "$CC"; then
1598   if test -n "$ac_tool_prefix"; then
1599   for ac_prog in cl
1600   do
1601     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1602 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1603 echo "$as_me:1603: checking for $ac_word" >&5
1604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1605 if test "${ac_cv_prog_CC+set}" = set; then
1606   echo $ECHO_N "(cached) $ECHO_C" >&6
1607 else
1608   if test -n "$CC"; then
1609   ac_cv_prog_CC="$CC" # Let the user override the test.
1610 else
1611   ac_save_IFS=$IFS; IFS=$ac_path_separator
1612 ac_dummy="$PATH"
1613 for ac_dir in $ac_dummy; do
1614   IFS=$ac_save_IFS
1615   test -z "$ac_dir" && ac_dir=.
1616   $as_executable_p "$ac_dir/$ac_word" || continue
1617 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1618 echo "$as_me:1618: found $ac_dir/$ac_word" >&5
1619 break
1620 done
1621
1622 fi
1623 fi
1624 CC=$ac_cv_prog_CC
1625 if test -n "$CC"; then
1626   echo "$as_me:1626: result: $CC" >&5
1627 echo "${ECHO_T}$CC" >&6
1628 else
1629   echo "$as_me:1629: result: no" >&5
1630 echo "${ECHO_T}no" >&6
1631 fi
1632
1633     test -n "$CC" && break
1634   done
1635 fi
1636 if test -z "$CC"; then
1637   ac_ct_CC=$CC
1638   for ac_prog in cl
1639 do
1640   # Extract the first word of "$ac_prog", so it can be a program name with args.
1641 set dummy $ac_prog; ac_word=$2
1642 echo "$as_me:1642: checking for $ac_word" >&5
1643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1644 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   if test -n "$ac_ct_CC"; then
1648   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1649 else
1650   ac_save_IFS=$IFS; IFS=$ac_path_separator
1651 ac_dummy="$PATH"
1652 for ac_dir in $ac_dummy; do
1653   IFS=$ac_save_IFS
1654   test -z "$ac_dir" && ac_dir=.
1655   $as_executable_p "$ac_dir/$ac_word" || continue
1656 ac_cv_prog_ac_ct_CC="$ac_prog"
1657 echo "$as_me:1657: found $ac_dir/$ac_word" >&5
1658 break
1659 done
1660
1661 fi
1662 fi
1663 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1664 if test -n "$ac_ct_CC"; then
1665   echo "$as_me:1665: result: $ac_ct_CC" >&5
1666 echo "${ECHO_T}$ac_ct_CC" >&6
1667 else
1668   echo "$as_me:1668: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672   test -n "$ac_ct_CC" && break
1673 done
1674
1675   CC=$ac_ct_CC
1676 fi
1677
1678 fi
1679
1680 test -z "$CC" && { { echo "$as_me:1680: error: no acceptable cc found in \$PATH" >&5
1681 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1682    { (exit 1); exit 1; }; }
1683
1684 # Provide some information about the compiler.
1685 echo "$as_me:1685:" \
1686      "checking for C compiler version" >&5
1687 ac_compiler=`set X $ac_compile; echo $2`
1688 { (eval echo "$as_me:1688: \"$ac_compiler --version </dev/null >&5\"") >&5
1689   (eval $ac_compiler --version </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -v </dev/null >&5\"") >&5
1694   (eval $ac_compiler -v </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698 { (eval echo "$as_me:1698: \"$ac_compiler -V </dev/null >&5\"") >&5
1699   (eval $ac_compiler -V </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703
1704 cat >conftest.$ac_ext <<_ACEOF
1705 #line 1705 "configure"
1706 #include "confdefs.h"
1707
1708 int
1709 main ()
1710 {
1711
1712   ;
1713   return 0;
1714 }
1715 _ACEOF
1716 ac_clean_files_save=$ac_clean_files
1717 ac_clean_files="$ac_clean_files a.out a.exe"
1718 # Try to create an executable without -o first, disregard a.out.
1719 # It will help us diagnose broken compilers, and finding out an intuition
1720 # of exeext.
1721 echo "$as_me:1721: checking for C compiler default output" >&5
1722 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1723 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724 if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
1725   (eval $ac_link_default) 2>&5
1726   ac_status=$?
1727   echo "$as_me:1727: \$? = $ac_status" >&5
1728   (exit $ac_status); }; then
1729   # Find the output, starting from the most likely.  This scheme is
1730 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731 # resort.
1732 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1733                 ls a.out conftest 2>/dev/null;
1734                 ls a.* conftest.* 2>/dev/null`; do
1735   case $ac_file in
1736     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1737     a.out ) # We found the default executable, but exeext='' is most
1738             # certainly right.
1739             break;;
1740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1742           export ac_cv_exeext
1743           break;;
1744     * ) break;;
1745   esac
1746 done
1747 else
1748   echo "$as_me: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 { { echo "$as_me:1750: error: C compiler cannot create executables" >&5
1751 echo "$as_me: error: C compiler cannot create executables" >&2;}
1752    { (exit 77); exit 77; }; }
1753 fi
1754
1755 ac_exeext=$ac_cv_exeext
1756 echo "$as_me:1756: result: $ac_file" >&5
1757 echo "${ECHO_T}$ac_file" >&6
1758
1759 # Check the compiler produces executables we can run.  If not, either
1760 # the compiler is broken, or we cross compile.
1761 echo "$as_me:1761: checking whether the C compiler works" >&5
1762 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1763 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764 # If not cross compiling, check that we can run a simple program.
1765 if test "$cross_compiling" != yes; then
1766   if { ac_try='./$ac_file'
1767   { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1768   (eval $ac_try) 2>&5
1769   ac_status=$?
1770   echo "$as_me:1770: \$? = $ac_status" >&5
1771   (exit $ac_status); }; }; then
1772     cross_compiling=no
1773   else
1774     if test "$cross_compiling" = maybe; then
1775         cross_compiling=yes
1776     else
1777         { { echo "$as_me:1777: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&5
1779 echo "$as_me: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&2;}
1781    { (exit 1); exit 1; }; }
1782     fi
1783   fi
1784 fi
1785 echo "$as_me:1785: result: yes" >&5
1786 echo "${ECHO_T}yes" >&6
1787
1788 rm -f a.out a.exe conftest$ac_cv_exeext
1789 ac_clean_files=$ac_clean_files_save
1790 # Check the compiler produces executables we can run.  If not, either
1791 # the compiler is broken, or we cross compile.
1792 echo "$as_me:1792: checking whether we are cross compiling" >&5
1793 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794 echo "$as_me:1794: result: $cross_compiling" >&5
1795 echo "${ECHO_T}$cross_compiling" >&6
1796
1797 echo "$as_me:1797: checking for executable suffix" >&5
1798 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1799 if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
1800   (eval $ac_link) 2>&5
1801   ac_status=$?
1802   echo "$as_me:1802: \$? = $ac_status" >&5
1803   (exit $ac_status); }; then
1804   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1806 # work properly (i.e., refer to `conftest.exe'), while it won't with
1807 # `rm'.
1808 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1809   case $ac_file in
1810     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812           export ac_cv_exeext
1813           break;;
1814     * ) break;;
1815   esac
1816 done
1817 else
1818   { { echo "$as_me:1818: error: cannot compute EXEEXT: cannot compile and link" >&5
1819 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1820    { (exit 1); exit 1; }; }
1821 fi
1822
1823 rm -f conftest$ac_cv_exeext
1824 echo "$as_me:1824: result: $ac_cv_exeext" >&5
1825 echo "${ECHO_T}$ac_cv_exeext" >&6
1826
1827 rm -f conftest.$ac_ext
1828 EXEEXT=$ac_cv_exeext
1829 ac_exeext=$EXEEXT
1830 echo "$as_me:1830: checking for object suffix" >&5
1831 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1832 if test "${ac_cv_objext+set}" = set; then
1833   echo $ECHO_N "(cached) $ECHO_C" >&6
1834 else
1835   cat >conftest.$ac_ext <<_ACEOF
1836 #line 1836 "configure"
1837 #include "confdefs.h"
1838
1839 int
1840 main ()
1841 {
1842
1843   ;
1844   return 0;
1845 }
1846 _ACEOF
1847 rm -f conftest.o conftest.obj
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849   (eval $ac_compile) 2>&5
1850   ac_status=$?
1851   echo "$as_me:1851: \$? = $ac_status" >&5
1852   (exit $ac_status); }; then
1853   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1854   case $ac_file in
1855     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1856     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1857        break;;
1858   esac
1859 done
1860 else
1861   echo "$as_me: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 { { echo "$as_me:1863: error: cannot compute OBJEXT: cannot compile" >&5
1864 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1869 fi
1870 echo "$as_me:1870: result: $ac_cv_objext" >&5
1871 echo "${ECHO_T}$ac_cv_objext" >&6
1872 OBJEXT=$ac_cv_objext
1873 ac_objext=$OBJEXT
1874 echo "$as_me:1874: checking whether we are using the GNU C compiler" >&5
1875 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1876 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main ()
1885 {
1886 #ifndef __GNUC__
1887        choke me
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   ac_compiler_gnu=yes
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 ac_compiler_gnu=no
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1914
1915 fi
1916 echo "$as_me:1916: result: $ac_cv_c_compiler_gnu" >&5
1917 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1918 GCC=`test $ac_compiler_gnu = yes && echo yes`
1919 ac_test_CFLAGS=${CFLAGS+set}
1920 ac_save_CFLAGS=$CFLAGS
1921 CFLAGS="-g"
1922 echo "$as_me:1922: checking whether $CC accepts -g" >&5
1923 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1924 if test "${ac_cv_prog_cc_g+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   cat >conftest.$ac_ext <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main ()
1933 {
1934
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941   (eval $ac_compile) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit $ac_status); } &&
1945          { ac_try='test -s conftest.$ac_objext'
1946   { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1947   (eval $ac_try) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); }; }; then
1951   ac_cv_prog_cc_g=yes
1952 else
1953   echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 ac_cv_prog_cc_g=no
1956 fi
1957 rm -f conftest.$ac_objext conftest.$ac_ext
1958 fi
1959 echo "$as_me:1959: result: $ac_cv_prog_cc_g" >&5
1960 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1961 if test "$ac_test_CFLAGS" = set; then
1962   CFLAGS=$ac_save_CFLAGS
1963 elif test $ac_cv_prog_cc_g = yes; then
1964   if test "$GCC" = yes; then
1965     CFLAGS="-g -O2"
1966   else
1967     CFLAGS="-g"
1968   fi
1969 else
1970   if test "$GCC" = yes; then
1971     CFLAGS="-O2"
1972   else
1973     CFLAGS=
1974   fi
1975 fi
1976 # Some people use a C++ compiler to compile C.  Since we use `exit',
1977 # in C++ we need to declare it.  In case someone uses the same compiler
1978 # for both compiling C and C++ we need to have the C++ compiler decide
1979 # the declaration of exit, since it's the most demanding environment.
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #ifndef __cplusplus
1982   choke me
1983 #endif
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   for ac_declaration in \
1998    ''\
1999    '#include <stdlib.h>' \
2000    'extern "C" void std::exit (int) throw (); using std::exit;' \
2001    'extern "C" void std::exit (int); using std::exit;' \
2002    'extern "C" void exit (int) throw ();' \
2003    'extern "C" void exit (int);' \
2004    'void exit (int);'
2005 do
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line 2007 "configure"
2008 #include "confdefs.h"
2009 #include <stdlib.h>
2010 $ac_declaration
2011 int
2012 main ()
2013 {
2014 exit (42);
2015   ;
2016   return 0;
2017 }
2018 _ACEOF
2019 rm -f conftest.$ac_objext
2020 if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021   (eval $ac_compile) 2>&5
2022   ac_status=$?
2023   echo "$as_me:2023: \$? = $ac_status" >&5
2024   (exit $ac_status); } &&
2025          { ac_try='test -s conftest.$ac_objext'
2026   { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027   (eval $ac_try) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); }; }; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 continue
2036 fi
2037 rm -f conftest.$ac_objext conftest.$ac_ext
2038   cat >conftest.$ac_ext <<_ACEOF
2039 #line 2039 "configure"
2040 #include "confdefs.h"
2041 $ac_declaration
2042 int
2043 main ()
2044 {
2045 exit (42);
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 rm -f conftest.$ac_objext
2051 if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
2052   (eval $ac_compile) 2>&5
2053   ac_status=$?
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } &&
2056          { ac_try='test -s conftest.$ac_objext'
2057   { (eval echo "$as_me:2057: \"$ac_try\"") >&5
2058   (eval $ac_try) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); }; }; then
2062   break
2063 else
2064   echo "$as_me: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068 done
2069 rm -f conftest*
2070 if test -n "$ac_declaration"; then
2071   echo '#ifdef __cplusplus' >>confdefs.h
2072   echo $ac_declaration      >>confdefs.h
2073   echo '#endif'             >>confdefs.h
2074 fi
2075
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 GCC_VERSION=none
2089 if test "$GCC" = yes ; then
2090         echo "$as_me:2090: checking version of $CC" >&5
2091 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2092         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2093         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2094         echo "$as_me:2094: result: $GCC_VERSION" >&5
2095 echo "${ECHO_T}$GCC_VERSION" >&6
2096 fi
2097
2098 ac_ext=c
2099 ac_cpp='$CPP $CPPFLAGS'
2100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2102 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2103 ac_main_return=return
2104 echo "$as_me:2104: checking how to run the C preprocessor" >&5
2105 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2106 # On Suns, sometimes $CPP names a directory.
2107 if test -n "$CPP" && test -d "$CPP"; then
2108   CPP=
2109 fi
2110 if test -z "$CPP"; then
2111   if test "${ac_cv_prog_CPP+set}" = set; then
2112   echo $ECHO_N "(cached) $ECHO_C" >&6
2113 else
2114       # Double quotes because CPP needs to be expanded
2115     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2116     do
2117       ac_preproc_ok=false
2118 for ac_c_preproc_warn_flag in '' yes
2119 do
2120   # Use a header file that comes with gcc, so configuring glibc
2121   # with a fresh cross-compiler works.
2122   # On the NeXT, cc -E runs the code through the compiler's parser,
2123   # not just through cpp. "Syntax error" is here to catch this case.
2124   cat >conftest.$ac_ext <<_ACEOF
2125 #line 2125 "configure"
2126 #include "confdefs.h"
2127 #include <assert.h>
2128                      Syntax error
2129 _ACEOF
2130 if { (eval echo "$as_me:2130: \"$ac_cpp conftest.$ac_ext\"") >&5
2131   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2132   ac_status=$?
2133   egrep -v '^ *\+' conftest.er1 >conftest.err
2134   rm -f conftest.er1
2135   cat conftest.err >&5
2136   echo "$as_me:2136: \$? = $ac_status" >&5
2137   (exit $ac_status); } >/dev/null; then
2138   if test -s conftest.err; then
2139     ac_cpp_err=$ac_c_preproc_warn_flag
2140   else
2141     ac_cpp_err=
2142   fi
2143 else
2144   ac_cpp_err=yes
2145 fi
2146 if test -z "$ac_cpp_err"; then
2147   :
2148 else
2149   echo "$as_me: failed program was:" >&5
2150   cat conftest.$ac_ext >&5
2151   # Broken: fails on valid input.
2152 continue
2153 fi
2154 rm -f conftest.err conftest.$ac_ext
2155
2156   # OK, works on sane cases.  Now check whether non-existent headers
2157   # can be detected and how.
2158   cat >conftest.$ac_ext <<_ACEOF
2159 #line 2159 "configure"
2160 #include "confdefs.h"
2161 #include <ac_nonexistent.h>
2162 _ACEOF
2163 if { (eval echo "$as_me:2163: \"$ac_cpp conftest.$ac_ext\"") >&5
2164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2165   ac_status=$?
2166   egrep -v '^ *\+' conftest.er1 >conftest.err
2167   rm -f conftest.er1
2168   cat conftest.err >&5
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit $ac_status); } >/dev/null; then
2171   if test -s conftest.err; then
2172     ac_cpp_err=$ac_c_preproc_warn_flag
2173   else
2174     ac_cpp_err=
2175   fi
2176 else
2177   ac_cpp_err=yes
2178 fi
2179 if test -z "$ac_cpp_err"; then
2180   # Broken: success on invalid input.
2181 continue
2182 else
2183   echo "$as_me: failed program was:" >&5
2184   cat conftest.$ac_ext >&5
2185   # Passes both tests.
2186 ac_preproc_ok=:
2187 break
2188 fi
2189 rm -f conftest.err conftest.$ac_ext
2190
2191 done
2192 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2193 rm -f conftest.err conftest.$ac_ext
2194 if $ac_preproc_ok; then
2195   break
2196 fi
2197
2198     done
2199     ac_cv_prog_CPP=$CPP
2200
2201 fi
2202   CPP=$ac_cv_prog_CPP
2203 else
2204   ac_cv_prog_CPP=$CPP
2205 fi
2206 echo "$as_me:2206: result: $CPP" >&5
2207 echo "${ECHO_T}$CPP" >&6
2208 ac_preproc_ok=false
2209 for ac_c_preproc_warn_flag in '' yes
2210 do
2211   # Use a header file that comes with gcc, so configuring glibc
2212   # with a fresh cross-compiler works.
2213   # On the NeXT, cc -E runs the code through the compiler's parser,
2214   # not just through cpp. "Syntax error" is here to catch this case.
2215   cat >conftest.$ac_ext <<_ACEOF
2216 #line 2216 "configure"
2217 #include "confdefs.h"
2218 #include <assert.h>
2219                      Syntax error
2220 _ACEOF
2221 if { (eval echo "$as_me:2221: \"$ac_cpp conftest.$ac_ext\"") >&5
2222   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2223   ac_status=$?
2224   egrep -v '^ *\+' conftest.er1 >conftest.err
2225   rm -f conftest.er1
2226   cat conftest.err >&5
2227   echo "$as_me:2227: \$? = $ac_status" >&5
2228   (exit $ac_status); } >/dev/null; then
2229   if test -s conftest.err; then
2230     ac_cpp_err=$ac_c_preproc_warn_flag
2231   else
2232     ac_cpp_err=
2233   fi
2234 else
2235   ac_cpp_err=yes
2236 fi
2237 if test -z "$ac_cpp_err"; then
2238   :
2239 else
2240   echo "$as_me: failed program was:" >&5
2241   cat conftest.$ac_ext >&5
2242   # Broken: fails on valid input.
2243 continue
2244 fi
2245 rm -f conftest.err conftest.$ac_ext
2246
2247   # OK, works on sane cases.  Now check whether non-existent headers
2248   # can be detected and how.
2249   cat >conftest.$ac_ext <<_ACEOF
2250 #line 2250 "configure"
2251 #include "confdefs.h"
2252 #include <ac_nonexistent.h>
2253 _ACEOF
2254 if { (eval echo "$as_me:2254: \"$ac_cpp conftest.$ac_ext\"") >&5
2255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2256   ac_status=$?
2257   egrep -v '^ *\+' conftest.er1 >conftest.err
2258   rm -f conftest.er1
2259   cat conftest.err >&5
2260   echo "$as_me:2260: \$? = $ac_status" >&5
2261   (exit $ac_status); } >/dev/null; then
2262   if test -s conftest.err; then
2263     ac_cpp_err=$ac_c_preproc_warn_flag
2264   else
2265     ac_cpp_err=
2266   fi
2267 else
2268   ac_cpp_err=yes
2269 fi
2270 if test -z "$ac_cpp_err"; then
2271   # Broken: success on invalid input.
2272 continue
2273 else
2274   echo "$as_me: failed program was:" >&5
2275   cat conftest.$ac_ext >&5
2276   # Passes both tests.
2277 ac_preproc_ok=:
2278 break
2279 fi
2280 rm -f conftest.err conftest.$ac_ext
2281
2282 done
2283 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2284 rm -f conftest.err conftest.$ac_ext
2285 if $ac_preproc_ok; then
2286   :
2287 else
2288   { { echo "$as_me:2288: error: C preprocessor \"$CPP\" fails sanity check" >&5
2289 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2290    { (exit 1); exit 1; }; }
2291 fi
2292
2293 ac_ext=c
2294 ac_cpp='$CPP $CPPFLAGS'
2295 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2296 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2297 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2298 ac_main_return=return
2299
2300 if test $ac_cv_c_compiler_gnu = yes; then
2301     echo "$as_me:2301: checking whether $CC needs -traditional" >&5
2302 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2303 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2304   echo $ECHO_N "(cached) $ECHO_C" >&6
2305 else
2306     ac_pattern="Autoconf.*'x'"
2307   cat >conftest.$ac_ext <<_ACEOF
2308 #line 2308 "configure"
2309 #include "confdefs.h"
2310 #include <sgtty.h>
2311 int Autoconf = TIOCGETP;
2312 _ACEOF
2313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2314   egrep "$ac_pattern" >/dev/null 2>&1; then
2315   ac_cv_prog_gcc_traditional=yes
2316 else
2317   ac_cv_prog_gcc_traditional=no
2318 fi
2319 rm -f conftest*
2320
2321   if test $ac_cv_prog_gcc_traditional = no; then
2322     cat >conftest.$ac_ext <<_ACEOF
2323 #line 2323 "configure"
2324 #include "confdefs.h"
2325 #include <termio.h>
2326 int Autoconf = TCGETA;
2327 _ACEOF
2328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2329   egrep "$ac_pattern" >/dev/null 2>&1; then
2330   ac_cv_prog_gcc_traditional=yes
2331 fi
2332 rm -f conftest*
2333
2334   fi
2335 fi
2336 echo "$as_me:2336: result: $ac_cv_prog_gcc_traditional" >&5
2337 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2338   if test $ac_cv_prog_gcc_traditional = yes; then
2339     CC="$CC -traditional"
2340   fi
2341 fi
2342
2343 echo "$as_me:2343: checking whether $CC understands -c and -o together" >&5
2344 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2345 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2346   echo $ECHO_N "(cached) $ECHO_C" >&6
2347 else
2348
2349 cat > conftest.$ac_ext <<CF_EOF
2350 #include <stdio.h>
2351 int main()
2352 {
2353         ${cf_cv_main_return:-return}(0);
2354 }
2355 CF_EOF
2356 # We do the test twice because some compilers refuse to overwrite an
2357 # existing .o file with -o, though they will create one.
2358 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2359 if { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit $ac_status); } &&
2364   test -f conftest2.$ac_objext && { (eval echo "$as_me:2364: \"$ac_try\"") >&5
2365   (eval $ac_try) 2>&5
2366   ac_status=$?
2367   echo "$as_me:2367: \$? = $ac_status" >&5
2368   (exit $ac_status); };
2369 then
2370   eval cf_cv_prog_CC_c_o=yes
2371 else
2372   eval cf_cv_prog_CC_c_o=no
2373 fi
2374 rm -f conftest*
2375
2376 fi
2377 if test $cf_cv_prog_CC_c_o = yes; then
2378   echo "$as_me:2378: result: yes" >&5
2379 echo "${ECHO_T}yes" >&6
2380 else
2381   echo "$as_me:2381: result: no" >&5
2382 echo "${ECHO_T}no" >&6
2383 fi
2384
2385 echo "$as_me:2385: checking for POSIXized ISC" >&5
2386 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2387 if test -d /etc/conf/kconfig.d &&
2388    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2389 then
2390   echo "$as_me:2390: result: yes" >&5
2391 echo "${ECHO_T}yes" >&6
2392   ISC=yes # If later tests want to check for ISC.
2393
2394 cat >>confdefs.h <<\EOF
2395 #define _POSIX_SOURCE 1
2396 EOF
2397
2398   if test "$GCC" = yes; then
2399     CC="$CC -posix"
2400   else
2401     CC="$CC -Xp"
2402   fi
2403 else
2404   echo "$as_me:2404: result: no" >&5
2405 echo "${ECHO_T}no" >&6
2406   ISC=
2407 fi
2408
2409 echo "$as_me:2409: checking for ${CC-cc} option to accept ANSI C" >&5
2410 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2411 if test "${cf_cv_ansi_cc+set}" = set; then
2412   echo $ECHO_N "(cached) $ECHO_C" >&6
2413 else
2414
2415 cf_cv_ansi_cc=no
2416 cf_save_CFLAGS="$CFLAGS"
2417 cf_save_CPPFLAGS="$CPPFLAGS"
2418 # Don't try gcc -ansi; that turns off useful extensions and
2419 # breaks some systems' header files.
2420 # AIX                   -qlanglvl=ansi
2421 # Ultrix and OSF/1      -std1
2422 # HP-UX                 -Aa -D_HPUX_SOURCE
2423 # SVR4                  -Xc
2424 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2425 for cf_arg in "-DCC_HAS_PROTOS" \
2426         "" \
2427         -qlanglvl=ansi \
2428         -std1 \
2429         -Ae \
2430         "-Aa -D_HPUX_SOURCE" \
2431         -Xc
2432 do
2433
2434 cf_fix_cppflags=no
2435 cf_new_cflags=
2436 cf_new_cppflags=
2437 cf_new_extra_cppflags=
2438
2439 for cf_add_cflags in $cf_arg
2440 do
2441 case $cf_fix_cppflags in
2442 no)
2443         case $cf_add_cflags in #(vi
2444         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2445                 case $cf_add_cflags in
2446                 -D*)
2447                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2448
2449                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2450                         && test -z "${cf_tst_cflags}" \
2451                         && cf_fix_cppflags=yes
2452
2453                         if test $cf_fix_cppflags = yes ; then
2454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2455                                 continue
2456                         elif test "${cf_tst_cflags}" = "\"'" ; then
2457                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2458                                 continue
2459                         fi
2460                         ;;
2461                 esac
2462                 case "$CPPFLAGS" in
2463                 *$cf_add_cflags) #(vi
2464                         ;;
2465                 *) #(vi
2466                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2467                         ;;
2468                 esac
2469                 ;;
2470         *)
2471                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2472                 ;;
2473         esac
2474         ;;
2475 yes)
2476         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2477
2478         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2479
2480         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2481         && test -z "${cf_tst_cflags}" \
2482         && cf_fix_cppflags=no
2483         ;;
2484 esac
2485 done
2486
2487 if test -n "$cf_new_cflags" ; then
2488
2489         CFLAGS="$CFLAGS $cf_new_cflags"
2490 fi
2491
2492 if test -n "$cf_new_cppflags" ; then
2493
2494         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2495 fi
2496
2497 if test -n "$cf_new_extra_cppflags" ; then
2498
2499         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2500 fi
2501
2502         cat >conftest.$ac_ext <<_ACEOF
2503 #line 2503 "configure"
2504 #include "confdefs.h"
2505
2506 #ifndef CC_HAS_PROTOS
2507 #if !defined(__STDC__) || (__STDC__ != 1)
2508 choke me
2509 #endif
2510 #endif
2511
2512 int
2513 main ()
2514 {
2515
2516         int test (int i, double x);
2517         struct s1 {int (*f) (int a);};
2518         struct s2 {int (*f) (double a);};
2519   ;
2520   return 0;
2521 }
2522 _ACEOF
2523 rm -f conftest.$ac_objext
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525   (eval $ac_compile) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit $ac_status); } &&
2529          { ac_try='test -s conftest.$ac_objext'
2530   { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531   (eval $ac_try) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit $ac_status); }; }; then
2535   cf_cv_ansi_cc="$cf_arg"; break
2536 else
2537   echo "$as_me: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 fi
2540 rm -f conftest.$ac_objext conftest.$ac_ext
2541 done
2542 CFLAGS="$cf_save_CFLAGS"
2543 CPPFLAGS="$cf_save_CPPFLAGS"
2544
2545 fi
2546 echo "$as_me:2546: result: $cf_cv_ansi_cc" >&5
2547 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2548
2549 if test "$cf_cv_ansi_cc" != "no"; then
2550 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2551
2552 cf_fix_cppflags=no
2553 cf_new_cflags=
2554 cf_new_cppflags=
2555 cf_new_extra_cppflags=
2556
2557 for cf_add_cflags in $cf_cv_ansi_cc
2558 do
2559 case $cf_fix_cppflags in
2560 no)
2561         case $cf_add_cflags in #(vi
2562         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2563                 case $cf_add_cflags in
2564                 -D*)
2565                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2566
2567                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2568                         && test -z "${cf_tst_cflags}" \
2569                         && cf_fix_cppflags=yes
2570
2571                         if test $cf_fix_cppflags = yes ; then
2572                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2573                                 continue
2574                         elif test "${cf_tst_cflags}" = "\"'" ; then
2575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2576                                 continue
2577                         fi
2578                         ;;
2579                 esac
2580                 case "$CPPFLAGS" in
2581                 *$cf_add_cflags) #(vi
2582                         ;;
2583                 *) #(vi
2584                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2585                         ;;
2586                 esac
2587                 ;;
2588         *)
2589                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2590                 ;;
2591         esac
2592         ;;
2593 yes)
2594         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2595
2596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2597
2598         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2599         && test -z "${cf_tst_cflags}" \
2600         && cf_fix_cppflags=no
2601         ;;
2602 esac
2603 done
2604
2605 if test -n "$cf_new_cflags" ; then
2606
2607         CFLAGS="$CFLAGS $cf_new_cflags"
2608 fi
2609
2610 if test -n "$cf_new_cppflags" ; then
2611
2612         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2613 fi
2614
2615 if test -n "$cf_new_extra_cppflags" ; then
2616
2617         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2618 fi
2619
2620 else
2621         cat >>confdefs.h <<\EOF
2622 #define CC_HAS_PROTOS 1
2623 EOF
2624
2625 fi
2626 fi
2627
2628 if test "$cf_cv_ansi_cc" = "no"; then
2629         { { echo "$as_me:2629: error: Your compiler does not appear to recognize prototypes.
2630 You have the following choices:
2631         a. adjust your compiler options
2632         b. get an up-to-date compiler
2633         c. use a wrapper such as unproto" >&5
2634 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2635 You have the following choices:
2636         a. adjust your compiler options
2637         b. get an up-to-date compiler
2638         c. use a wrapper such as unproto" >&2;}
2639    { (exit 1); exit 1; }; }
2640 fi
2641
2642 case $cf_cv_system_name in
2643 os2*)
2644     CFLAGS="$CFLAGS -Zmt"
2645     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2646     CXXFLAGS="$CXXFLAGS -Zmt"
2647     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2648     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2649     ac_cv_exeext=.exe
2650     ;;
2651 esac
2652
2653 PROG_EXT="$EXEEXT"
2654
2655 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2656 #define PROG_EXT "$PROG_EXT"
2657 EOF
2658
2659 if test "$cross_compiling" = yes ; then
2660   LDCONFIG=:
2661 else
2662 case "$cf_cv_system_name" in #(vi
2663 freebsd*) #(vi
2664   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2665   ;;
2666 *) LDPATH=$PATH:/sbin:/usr/sbin
2667   # Extract the first word of "ldconfig", so it can be a program name with args.
2668 set dummy ldconfig; ac_word=$2
2669 echo "$as_me:2669: checking for $ac_word" >&5
2670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2671 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2672   echo $ECHO_N "(cached) $ECHO_C" >&6
2673 else
2674   case $LDCONFIG in
2675   [\\/]* | ?:[\\/]*)
2676   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2677   ;;
2678   *)
2679   ac_save_IFS=$IFS; IFS=$ac_path_separator
2680 ac_dummy="$LDPATH"
2681 for ac_dir in $ac_dummy; do
2682   IFS=$ac_save_IFS
2683   test -z "$ac_dir" && ac_dir=.
2684   if $as_executable_p "$ac_dir/$ac_word"; then
2685    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2686    echo "$as_me:2686: found $ac_dir/$ac_word" >&5
2687    break
2688 fi
2689 done
2690
2691   ;;
2692 esac
2693 fi
2694 LDCONFIG=$ac_cv_path_LDCONFIG
2695
2696 if test -n "$LDCONFIG"; then
2697   echo "$as_me:2697: result: $LDCONFIG" >&5
2698 echo "${ECHO_T}$LDCONFIG" >&6
2699 else
2700   echo "$as_me:2700: result: no" >&5
2701 echo "${ECHO_T}no" >&6
2702 fi
2703
2704   ;;
2705 esac
2706 fi
2707
2708 echo "$as_me:2708: checking if you want to ensure bool is consistent with C++" >&5
2709 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2710
2711 # Check whether --with-cxx or --without-cxx was given.
2712 if test "${with_cxx+set}" = set; then
2713   withval="$with_cxx"
2714   cf_with_cxx=$withval
2715 else
2716   cf_with_cxx=yes
2717 fi;
2718 echo "$as_me:2718: result: $cf_with_cxx" >&5
2719 echo "${ECHO_T}$cf_with_cxx" >&6
2720 if test "X$cf_with_cxx" = Xno ; then
2721         CXX=""
2722         GXX=""
2723 else
2724         # with autoconf 2.13, we can change the error to a warning:
2725                 ac_ext=cc
2726 ac_cpp='$CXXCPP $CPPFLAGS'
2727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2730 ac_main_return=return
2731 if test -n "$ac_tool_prefix"; then
2732   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2733   do
2734     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2735 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2736 echo "$as_me:2736: checking for $ac_word" >&5
2737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738 if test "${ac_cv_prog_CXX+set}" = set; then
2739   echo $ECHO_N "(cached) $ECHO_C" >&6
2740 else
2741   if test -n "$CXX"; then
2742   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2743 else
2744   ac_save_IFS=$IFS; IFS=$ac_path_separator
2745 ac_dummy="$PATH"
2746 for ac_dir in $ac_dummy; do
2747   IFS=$ac_save_IFS
2748   test -z "$ac_dir" && ac_dir=.
2749   $as_executable_p "$ac_dir/$ac_word" || continue
2750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2751 echo "$as_me:2751: found $ac_dir/$ac_word" >&5
2752 break
2753 done
2754
2755 fi
2756 fi
2757 CXX=$ac_cv_prog_CXX
2758 if test -n "$CXX"; then
2759   echo "$as_me:2759: result: $CXX" >&5
2760 echo "${ECHO_T}$CXX" >&6
2761 else
2762   echo "$as_me:2762: result: no" >&5
2763 echo "${ECHO_T}no" >&6
2764 fi
2765
2766     test -n "$CXX" && break
2767   done
2768 fi
2769 if test -z "$CXX"; then
2770   ac_ct_CXX=$CXX
2771   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2772 do
2773   # Extract the first word of "$ac_prog", so it can be a program name with args.
2774 set dummy $ac_prog; ac_word=$2
2775 echo "$as_me:2775: checking for $ac_word" >&5
2776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2777 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2778   echo $ECHO_N "(cached) $ECHO_C" >&6
2779 else
2780   if test -n "$ac_ct_CXX"; then
2781   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2782 else
2783   ac_save_IFS=$IFS; IFS=$ac_path_separator
2784 ac_dummy="$PATH"
2785 for ac_dir in $ac_dummy; do
2786   IFS=$ac_save_IFS
2787   test -z "$ac_dir" && ac_dir=.
2788   $as_executable_p "$ac_dir/$ac_word" || continue
2789 ac_cv_prog_ac_ct_CXX="$ac_prog"
2790 echo "$as_me:2790: found $ac_dir/$ac_word" >&5
2791 break
2792 done
2793
2794 fi
2795 fi
2796 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2797 if test -n "$ac_ct_CXX"; then
2798   echo "$as_me:2798: result: $ac_ct_CXX" >&5
2799 echo "${ECHO_T}$ac_ct_CXX" >&6
2800 else
2801   echo "$as_me:2801: result: no" >&5
2802 echo "${ECHO_T}no" >&6
2803 fi
2804
2805   test -n "$ac_ct_CXX" && break
2806 done
2807 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2808
2809   CXX=$ac_ct_CXX
2810 fi
2811
2812 # Provide some information about the compiler.
2813 echo "$as_me:2813:" \
2814      "checking for C++ compiler version" >&5
2815 ac_compiler=`set X $ac_compile; echo $2`
2816 { (eval echo "$as_me:2816: \"$ac_compiler --version </dev/null >&5\"") >&5
2817   (eval $ac_compiler --version </dev/null >&5) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }
2821 { (eval echo "$as_me:2821: \"$ac_compiler -v </dev/null >&5\"") >&5
2822   (eval $ac_compiler -v </dev/null >&5) 2>&5
2823   ac_status=$?
2824   echo "$as_me:2824: \$? = $ac_status" >&5
2825   (exit $ac_status); }
2826 { (eval echo "$as_me:2826: \"$ac_compiler -V </dev/null >&5\"") >&5
2827   (eval $ac_compiler -V </dev/null >&5) 2>&5
2828   ac_status=$?
2829   echo "$as_me:2829: \$? = $ac_status" >&5
2830   (exit $ac_status); }
2831
2832 echo "$as_me:2832: checking whether we are using the GNU C++ compiler" >&5
2833 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2834 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2835   echo $ECHO_N "(cached) $ECHO_C" >&6
2836 else
2837   cat >conftest.$ac_ext <<_ACEOF
2838 #line 2838 "configure"
2839 #include "confdefs.h"
2840
2841 int
2842 main ()
2843 {
2844 #ifndef __GNUC__
2845        choke me
2846 #endif
2847
2848   ;
2849   return 0;
2850 }
2851 _ACEOF
2852 rm -f conftest.$ac_objext
2853 if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5
2854   (eval $ac_compile) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -s conftest.$ac_objext'
2859   { (eval echo "$as_me:2859: \"$ac_try\"") >&5
2860   (eval $ac_try) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit $ac_status); }; }; then
2864   ac_compiler_gnu=yes
2865 else
2866   echo "$as_me: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 ac_compiler_gnu=no
2869 fi
2870 rm -f conftest.$ac_objext conftest.$ac_ext
2871 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2872
2873 fi
2874 echo "$as_me:2874: result: $ac_cv_cxx_compiler_gnu" >&5
2875 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2876 GXX=`test $ac_compiler_gnu = yes && echo yes`
2877 ac_test_CXXFLAGS=${CXXFLAGS+set}
2878 ac_save_CXXFLAGS=$CXXFLAGS
2879 CXXFLAGS="-g"
2880 echo "$as_me:2880: checking whether $CXX accepts -g" >&5
2881 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2882 if test "${ac_cv_prog_cxx_g+set}" = set; then
2883   echo $ECHO_N "(cached) $ECHO_C" >&6
2884 else
2885   cat >conftest.$ac_ext <<_ACEOF
2886 #line 2886 "configure"
2887 #include "confdefs.h"
2888
2889 int
2890 main ()
2891 {
2892
2893   ;
2894   return 0;
2895 }
2896 _ACEOF
2897 rm -f conftest.$ac_objext
2898 if { (eval echo "$as_me:2898: \"$ac_compile\"") >&5
2899   (eval $ac_compile) 2>&5
2900   ac_status=$?
2901   echo "$as_me:2901: \$? = $ac_status" >&5
2902   (exit $ac_status); } &&
2903          { ac_try='test -s conftest.$ac_objext'
2904   { (eval echo "$as_me:2904: \"$ac_try\"") >&5
2905   (eval $ac_try) 2>&5
2906   ac_status=$?
2907   echo "$as_me:2907: \$? = $ac_status" >&5
2908   (exit $ac_status); }; }; then
2909   ac_cv_prog_cxx_g=yes
2910 else
2911   echo "$as_me: failed program was:" >&5
2912 cat conftest.$ac_ext >&5
2913 ac_cv_prog_cxx_g=no
2914 fi
2915 rm -f conftest.$ac_objext conftest.$ac_ext
2916 fi
2917 echo "$as_me:2917: result: $ac_cv_prog_cxx_g" >&5
2918 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2919 if test "$ac_test_CXXFLAGS" = set; then
2920   CXXFLAGS=$ac_save_CXXFLAGS
2921 elif test $ac_cv_prog_cxx_g = yes; then
2922   if test "$GXX" = yes; then
2923     CXXFLAGS="-g -O2"
2924   else
2925     CXXFLAGS="-g"
2926   fi
2927 else
2928   if test "$GXX" = yes; then
2929     CXXFLAGS="-O2"
2930   else
2931     CXXFLAGS=
2932   fi
2933 fi
2934 for ac_declaration in \
2935    ''\
2936    '#include <stdlib.h>' \
2937    'extern "C" void std::exit (int) throw (); using std::exit;' \
2938    'extern "C" void std::exit (int); using std::exit;' \
2939    'extern "C" void exit (int) throw ();' \
2940    'extern "C" void exit (int);' \
2941    'void exit (int);'
2942 do
2943   cat >conftest.$ac_ext <<_ACEOF
2944 #line 2944 "configure"
2945 #include "confdefs.h"
2946 #include <stdlib.h>
2947 $ac_declaration
2948 int
2949 main ()
2950 {
2951 exit (42);
2952   ;
2953   return 0;
2954 }
2955 _ACEOF
2956 rm -f conftest.$ac_objext
2957 if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5
2958   (eval $ac_compile) 2>&5
2959   ac_status=$?
2960   echo "$as_me:2960: \$? = $ac_status" >&5
2961   (exit $ac_status); } &&
2962          { ac_try='test -s conftest.$ac_objext'
2963   { (eval echo "$as_me:2963: \"$ac_try\"") >&5
2964   (eval $ac_try) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); }; }; then
2968   :
2969 else
2970   echo "$as_me: failed program was:" >&5
2971 cat conftest.$ac_ext >&5
2972 continue
2973 fi
2974 rm -f conftest.$ac_objext conftest.$ac_ext
2975   cat >conftest.$ac_ext <<_ACEOF
2976 #line 2976 "configure"
2977 #include "confdefs.h"
2978 $ac_declaration
2979 int
2980 main ()
2981 {
2982 exit (42);
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   break
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 fi
3004 rm -f conftest.$ac_objext conftest.$ac_ext
3005 done
3006 rm -f conftest*
3007 if test -n "$ac_declaration"; then
3008   echo '#ifdef __cplusplus' >>confdefs.h
3009   echo $ac_declaration      >>confdefs.h
3010   echo '#endif'             >>confdefs.h
3011 fi
3012
3013 ac_ext=c
3014 ac_cpp='$CPP $CPPFLAGS'
3015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3018 ac_main_return=return
3019
3020                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3021         if test "$CXX" = "g++" ; then
3022                 # Extract the first word of "g++", so it can be a program name with args.
3023 set dummy g++; ac_word=$2
3024 echo "$as_me:3024: checking for $ac_word" >&5
3025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3026 if test "${ac_cv_path_CXX+set}" = set; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029   case $CXX in
3030   [\\/]* | ?:[\\/]*)
3031   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3032   ;;
3033   *)
3034   ac_save_IFS=$IFS; IFS=$ac_path_separator
3035 ac_dummy="$PATH"
3036 for ac_dir in $ac_dummy; do
3037   IFS=$ac_save_IFS
3038   test -z "$ac_dir" && ac_dir=.
3039   if $as_executable_p "$ac_dir/$ac_word"; then
3040    ac_cv_path_CXX="$ac_dir/$ac_word"
3041    echo "$as_me:3041: found $ac_dir/$ac_word" >&5
3042    break
3043 fi
3044 done
3045
3046   ;;
3047 esac
3048 fi
3049 CXX=$ac_cv_path_CXX
3050
3051 if test -n "$CXX"; then
3052   echo "$as_me:3052: result: $CXX" >&5
3053 echo "${ECHO_T}$CXX" >&6
3054 else
3055   echo "$as_me:3055: result: no" >&5
3056 echo "${ECHO_T}no" >&6
3057 fi
3058
3059         fi
3060         if test "$CXX" = "g++" ; then
3061                 { echo "$as_me:3061: WARNING: ignoring hardcoded g++" >&5
3062 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3063                 cf_with_cxx=no; CXX=""; GXX="";
3064         fi
3065 fi
3066
3067 GXX_VERSION=none
3068 if test "$GXX" = yes; then
3069         echo "$as_me:3069: checking version of g++" >&5
3070 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3071         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3072         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3073         echo "$as_me:3073: result: $GXX_VERSION" >&5
3074 echo "${ECHO_T}$GXX_VERSION" >&6
3075 fi
3076
3077 case $GXX_VERSION in
3078 1*|2.[0-6]*)
3079         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3080         # cf_cxx_library=no
3081         { echo "$as_me:3081: WARNING: templates do not work" >&5
3082 echo "$as_me: WARNING: templates do not work" >&2;}
3083         ;;
3084 esac
3085
3086 echo "$as_me:3086: checking if you want to build C++ binding and demo" >&5
3087 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3088
3089 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3090 if test "${with_cxx_binding+set}" = set; then
3091   withval="$with_cxx_binding"
3092   cf_with_cxx_binding=$withval
3093 else
3094   cf_with_cxx_binding=$cf_with_cxx
3095 fi;
3096 echo "$as_me:3096: result: $cf_with_cxx_binding" >&5
3097 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3098
3099 echo "$as_me:3099: checking if you want to build with Ada95" >&5
3100 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3101
3102 # Check whether --with-ada or --without-ada was given.
3103 if test "${with_ada+set}" = set; then
3104   withval="$with_ada"
3105   cf_with_ada=$withval
3106 else
3107   cf_with_ada=yes
3108 fi;
3109 echo "$as_me:3109: result: $cf_with_ada" >&5
3110 echo "${ECHO_T}$cf_with_ada" >&6
3111
3112 echo "$as_me:3112: checking if you want to build programs such as tic" >&5
3113 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3114
3115 # Check whether --with-progs or --without-progs was given.
3116 if test "${with_progs+set}" = set; then
3117   withval="$with_progs"
3118   cf_with_progs=$withval
3119 else
3120   cf_with_progs=yes
3121 fi;
3122 echo "$as_me:3122: result: $cf_with_progs" >&5
3123 echo "${ECHO_T}$cf_with_progs" >&6
3124
3125 echo "$as_me:3125: checking if you wish to install curses.h" >&5
3126 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3127
3128 # Check whether --with-curses-h or --without-curses-h was given.
3129 if test "${with_curses_h+set}" = set; then
3130   withval="$with_curses_h"
3131   with_curses_h=$withval
3132 else
3133   with_curses_h=yes
3134 fi;
3135 echo "$as_me:3135: result: $with_curses_h" >&5
3136 echo "${ECHO_T}$with_curses_h" >&6
3137
3138 modules_to_build="ncurses"
3139 if test "X$cf_with_progs" != Xno ; then
3140 modules_to_build="$modules_to_build progs tack"
3141 fi
3142 modules_to_build="$modules_to_build panel menu form"
3143
3144 test "$program_prefix" != NONE &&
3145   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3146 # Use a double $ so make ignores it.
3147 test "$program_suffix" != NONE &&
3148   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3149 # Double any \ or $.  echo might interpret backslashes.
3150 # By default was `s,x,x', remove it if useless.
3151 cat <<\_ACEOF >conftest.sed
3152 s/[\\$]/&&/g;s/;s,x,x,$//
3153 _ACEOF
3154 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3155 rm conftest.sed
3156
3157 for ac_prog in mawk gawk nawk awk
3158 do
3159   # Extract the first word of "$ac_prog", so it can be a program name with args.
3160 set dummy $ac_prog; ac_word=$2
3161 echo "$as_me:3161: checking for $ac_word" >&5
3162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3163 if test "${ac_cv_prog_AWK+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166   if test -n "$AWK"; then
3167   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3168 else
3169   ac_save_IFS=$IFS; IFS=$ac_path_separator
3170 ac_dummy="$PATH"
3171 for ac_dir in $ac_dummy; do
3172   IFS=$ac_save_IFS
3173   test -z "$ac_dir" && ac_dir=.
3174   $as_executable_p "$ac_dir/$ac_word" || continue
3175 ac_cv_prog_AWK="$ac_prog"
3176 echo "$as_me:3176: found $ac_dir/$ac_word" >&5
3177 break
3178 done
3179
3180 fi
3181 fi
3182 AWK=$ac_cv_prog_AWK
3183 if test -n "$AWK"; then
3184   echo "$as_me:3184: result: $AWK" >&5
3185 echo "${ECHO_T}$AWK" >&6
3186 else
3187   echo "$as_me:3187: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3189 fi
3190
3191   test -n "$AWK" && break
3192 done
3193
3194 test -z "$AWK" && { { echo "$as_me:3194: error: No awk program found" >&5
3195 echo "$as_me: error: No awk program found" >&2;}
3196    { (exit 1); exit 1; }; }
3197
3198 echo "$as_me:3198: checking for egrep" >&5
3199 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3200 if test "${ac_cv_prog_egrep+set}" = set; then
3201   echo $ECHO_N "(cached) $ECHO_C" >&6
3202 else
3203   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3204     then ac_cv_prog_egrep='grep -E'
3205     else ac_cv_prog_egrep='egrep'
3206     fi
3207 fi
3208 echo "$as_me:3208: result: $ac_cv_prog_egrep" >&5
3209 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3210  EGREP=$ac_cv_prog_egrep
3211
3212 test -z "$EGREP" && { { echo "$as_me:3212: error: No egrep program found" >&5
3213 echo "$as_me: error: No egrep program found" >&2;}
3214    { (exit 1); exit 1; }; }
3215
3216 # Find a good install program.  We prefer a C program (faster),
3217 # so one script is as good as another.  But avoid the broken or
3218 # incompatible versions:
3219 # SysV /etc/install, /usr/sbin/install
3220 # SunOS /usr/etc/install
3221 # IRIX /sbin/install
3222 # AIX /bin/install
3223 # AmigaOS /C/install, which installs bootblocks on floppy discs
3224 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3225 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3226 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3227 # ./install, which can be erroneously created by make from ./install.sh.
3228 echo "$as_me:3228: checking for a BSD compatible install" >&5
3229 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3230 if test -z "$INSTALL"; then
3231 if test "${ac_cv_path_install+set}" = set; then
3232   echo $ECHO_N "(cached) $ECHO_C" >&6
3233 else
3234     ac_save_IFS=$IFS; IFS=$ac_path_separator
3235   for ac_dir in $PATH; do
3236     IFS=$ac_save_IFS
3237     # Account for people who put trailing slashes in PATH elements.
3238     case $ac_dir/ in
3239     / | ./ | .// | /cC/* \
3240     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3241     | /usr/ucb/* ) ;;
3242     *)
3243       # OSF1 and SCO ODT 3.0 have their own names for install.
3244       # Don't use installbsd from OSF since it installs stuff as root
3245       # by default.
3246       for ac_prog in ginstall scoinst install; do
3247         if $as_executable_p "$ac_dir/$ac_prog"; then
3248           if test $ac_prog = install &&
3249             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3250             # AIX install.  It has an incompatible calling convention.
3251             :
3252           elif test $ac_prog = install &&
3253             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3254             # program-specific install script used by HP pwplus--don't use.
3255             :
3256           else
3257             ac_cv_path_install="$ac_dir/$ac_prog -c"
3258             break 2
3259           fi
3260         fi
3261       done
3262       ;;
3263     esac
3264   done
3265
3266 fi
3267   if test "${ac_cv_path_install+set}" = set; then
3268     INSTALL=$ac_cv_path_install
3269   else
3270     # As a last resort, use the slow shell script.  We don't cache a
3271     # path for INSTALL within a source directory, because that will
3272     # break other packages using the cache if that directory is
3273     # removed, or if the path is relative.
3274     INSTALL=$ac_install_sh
3275   fi
3276 fi
3277 echo "$as_me:3277: result: $INSTALL" >&5
3278 echo "${ECHO_T}$INSTALL" >&6
3279
3280 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3281 # It thinks the first close brace ends the variable substitution.
3282 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3283
3284 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3285
3286 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3287
3288 case $INSTALL in
3289 /*)
3290   ;;
3291 *)
3292   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3293   test -z "$cf_dir" && cf_dir=.
3294   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3295   ;;
3296 esac
3297
3298 for ac_prog in tdlint lint alint
3299 do
3300   # Extract the first word of "$ac_prog", so it can be a program name with args.
3301 set dummy $ac_prog; ac_word=$2
3302 echo "$as_me:3302: checking for $ac_word" >&5
3303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3304 if test "${ac_cv_prog_LINT+set}" = set; then
3305   echo $ECHO_N "(cached) $ECHO_C" >&6
3306 else
3307   if test -n "$LINT"; then
3308   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3309 else
3310   ac_save_IFS=$IFS; IFS=$ac_path_separator
3311 ac_dummy="$PATH"
3312 for ac_dir in $ac_dummy; do
3313   IFS=$ac_save_IFS
3314   test -z "$ac_dir" && ac_dir=.
3315   $as_executable_p "$ac_dir/$ac_word" || continue
3316 ac_cv_prog_LINT="$ac_prog"
3317 echo "$as_me:3317: found $ac_dir/$ac_word" >&5
3318 break
3319 done
3320
3321 fi
3322 fi
3323 LINT=$ac_cv_prog_LINT
3324 if test -n "$LINT"; then
3325   echo "$as_me:3325: result: $LINT" >&5
3326 echo "${ECHO_T}$LINT" >&6
3327 else
3328   echo "$as_me:3328: result: no" >&5
3329 echo "${ECHO_T}no" >&6
3330 fi
3331
3332   test -n "$LINT" && break
3333 done
3334
3335 echo "$as_me:3335: checking whether ln -s works" >&5
3336 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3337 LN_S=$as_ln_s
3338 if test "$LN_S" = "ln -s"; then
3339   echo "$as_me:3339: result: yes" >&5
3340 echo "${ECHO_T}yes" >&6
3341 else
3342   echo "$as_me:3342: result: no, using $LN_S" >&5
3343 echo "${ECHO_T}no, using $LN_S" >&6
3344 fi
3345
3346 echo "$as_me:3346: checking for long file names" >&5
3347 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3348 if test "${ac_cv_sys_long_file_names+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   ac_cv_sys_long_file_names=yes
3352 # Test for long file names in all the places we know might matter:
3353 #      .                the current directory, where building will happen
3354 #      $prefix/lib      where we will be installing things
3355 #      $exec_prefix/lib likewise
3356 # eval it to expand exec_prefix.
3357 #      $TMPDIR          if set, where it might want to write temporary files
3358 # if $TMPDIR is not set:
3359 #      /tmp             where it might want to write temporary files
3360 #      /var/tmp         likewise
3361 #      /usr/tmp         likewise
3362 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3363   ac_tmpdirs=$TMPDIR
3364 else
3365   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3366 fi
3367 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3368   test -d $ac_dir || continue
3369   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3370   ac_xdir=$ac_dir/cf$$
3371   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3372   ac_tf1=$ac_xdir/conftest9012345
3373   ac_tf2=$ac_xdir/conftest9012346
3374   (echo 1 >$ac_tf1) 2>/dev/null
3375   (echo 2 >$ac_tf2) 2>/dev/null
3376   ac_val=`cat $ac_tf1 2>/dev/null`
3377   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3378     ac_cv_sys_long_file_names=no
3379     rm -rf $ac_xdir 2>/dev/null
3380     break
3381   fi
3382   rm -rf $ac_xdir 2>/dev/null
3383 done
3384 fi
3385 echo "$as_me:3385: result: $ac_cv_sys_long_file_names" >&5
3386 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3387 if test $ac_cv_sys_long_file_names = yes; then
3388
3389 cat >>confdefs.h <<\EOF
3390 #define HAVE_LONG_FILE_NAMES 1
3391 EOF
3392
3393 fi
3394
3395 echo "$as_me:3395: checking if we should assume mixed-case filenames" >&5
3396 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3397
3398 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3399 if test "${enable_mixed_case+set}" = set; then
3400   enableval="$enable_mixed_case"
3401   enable_mixedcase=$enableval
3402 else
3403   enable_mixedcase=auto
3404 fi;
3405 echo "$as_me:3405: result: $enable_mixedcase" >&5
3406 echo "${ECHO_T}$enable_mixedcase" >&6
3407 if test "$enable_mixedcase" = "auto" ; then
3408
3409 echo "$as_me:3409: checking if filesystem supports mixed-case filenames" >&5
3410 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3411 if test "${cf_cv_mixedcase+set}" = set; then
3412   echo $ECHO_N "(cached) $ECHO_C" >&6
3413 else
3414
3415 if test "$cross_compiling" = yes ; then
3416         case $target_alias in #(vi
3417         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3418                 cf_cv_mixedcase=no
3419                 ;;
3420         *)
3421                 cf_cv_mixedcase=yes
3422                 ;;
3423         esac
3424 else
3425         rm -f conftest CONFTEST
3426         echo test >conftest
3427         if test -f CONFTEST ; then
3428                 cf_cv_mixedcase=no
3429         else
3430                 cf_cv_mixedcase=yes
3431         fi
3432         rm -f conftest CONFTEST
3433 fi
3434
3435 fi
3436 echo "$as_me:3436: result: $cf_cv_mixedcase" >&5
3437 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3438 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3439 #define MIXEDCASE_FILENAMES 1
3440 EOF
3441
3442 else
3443     cf_cv_mixedcase=$enable_mixedcase
3444     if test "$enable_mixedcase" = "yes" ; then
3445         cat >>confdefs.h <<\EOF
3446 #define MIXEDCASE_FILENAMES 1
3447 EOF
3448
3449     fi
3450 fi
3451
3452 # do this after mixed-case option (tags/TAGS is not as important as tic).
3453 echo "$as_me:3453: checking whether ${MAKE-make} sets \${MAKE}" >&5
3454 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3455 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3456 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   cat >conftest.make <<\EOF
3460 all:
3461         @echo 'ac_maketemp="${MAKE}"'
3462 EOF
3463 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3464 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3465 if test -n "$ac_maketemp"; then
3466   eval ac_cv_prog_make_${ac_make}_set=yes
3467 else
3468   eval ac_cv_prog_make_${ac_make}_set=no
3469 fi
3470 rm -f conftest.make
3471 fi
3472 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3473   echo "$as_me:3473: result: yes" >&5
3474 echo "${ECHO_T}yes" >&6
3475   SET_MAKE=
3476 else
3477   echo "$as_me:3477: result: no" >&5
3478 echo "${ECHO_T}no" >&6
3479   SET_MAKE="MAKE=${MAKE-make}"
3480 fi
3481
3482 # Extract the first word of "ctags", so it can be a program name with args.
3483 set dummy ctags; ac_word=$2
3484 echo "$as_me:3484: checking for $ac_word" >&5
3485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3486 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3487   echo $ECHO_N "(cached) $ECHO_C" >&6
3488 else
3489   if test -n "$MAKE_LOWER_TAGS"; then
3490   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3491 else
3492   ac_save_IFS=$IFS; IFS=$ac_path_separator
3493 ac_dummy="$PATH"
3494 for ac_dir in $ac_dummy; do
3495   IFS=$ac_save_IFS
3496   test -z "$ac_dir" && ac_dir=.
3497   $as_executable_p "$ac_dir/$ac_word" || continue
3498 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3499 echo "$as_me:3499: found $ac_dir/$ac_word" >&5
3500 break
3501 done
3502
3503   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3504 fi
3505 fi
3506 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3507 if test -n "$MAKE_LOWER_TAGS"; then
3508   echo "$as_me:3508: result: $MAKE_LOWER_TAGS" >&5
3509 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3510 else
3511   echo "$as_me:3511: result: no" >&5
3512 echo "${ECHO_T}no" >&6
3513 fi
3514
3515 if test "$cf_cv_mixedcase" = yes ; then
3516         # Extract the first word of "etags", so it can be a program name with args.
3517 set dummy etags; ac_word=$2
3518 echo "$as_me:3518: checking for $ac_word" >&5
3519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3520 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3521   echo $ECHO_N "(cached) $ECHO_C" >&6
3522 else
3523   if test -n "$MAKE_UPPER_TAGS"; then
3524   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3525 else
3526   ac_save_IFS=$IFS; IFS=$ac_path_separator
3527 ac_dummy="$PATH"
3528 for ac_dir in $ac_dummy; do
3529   IFS=$ac_save_IFS
3530   test -z "$ac_dir" && ac_dir=.
3531   $as_executable_p "$ac_dir/$ac_word" || continue
3532 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3533 echo "$as_me:3533: found $ac_dir/$ac_word" >&5
3534 break
3535 done
3536
3537   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3538 fi
3539 fi
3540 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3541 if test -n "$MAKE_UPPER_TAGS"; then
3542   echo "$as_me:3542: result: $MAKE_UPPER_TAGS" >&5
3543 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3544 else
3545   echo "$as_me:3545: result: no" >&5
3546 echo "${ECHO_T}no" >&6
3547 fi
3548
3549 else
3550         MAKE_UPPER_TAGS=no
3551 fi
3552
3553 if test "$MAKE_UPPER_TAGS" = yes ; then
3554         MAKE_UPPER_TAGS=
3555 else
3556         MAKE_UPPER_TAGS="#"
3557 fi
3558
3559 if test "$MAKE_LOWER_TAGS" = yes ; then
3560         MAKE_LOWER_TAGS=
3561 else
3562         MAKE_LOWER_TAGS="#"
3563 fi
3564
3565 echo "$as_me:3565: checking for makeflags variable" >&5
3566 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3567 if test "${cf_cv_makeflags+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570
3571         cf_cv_makeflags=''
3572         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3573         do
3574                 cat >cf_makeflags.tmp <<CF_EOF
3575 SHELL = /bin/sh
3576 all :
3577         @ echo '.$cf_option'
3578 CF_EOF
3579                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3580                 case "$cf_result" in
3581                 .*k)
3582                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3583                         case "$cf_result" in
3584                         .*CC=*) cf_cv_makeflags=
3585                                 ;;
3586                         *)      cf_cv_makeflags=$cf_option
3587                                 ;;
3588                         esac
3589                         break
3590                         ;;
3591                 .-)     ;;
3592                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3593                         ;;
3594                 esac
3595         done
3596         rm -f cf_makeflags.tmp
3597
3598 fi
3599 echo "$as_me:3599: result: $cf_cv_makeflags" >&5
3600 echo "${ECHO_T}$cf_cv_makeflags" >&6
3601
3602 if test -n "$ac_tool_prefix"; then
3603   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3604 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3605 echo "$as_me:3605: checking for $ac_word" >&5
3606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3607 if test "${ac_cv_prog_RANLIB+set}" = set; then
3608   echo $ECHO_N "(cached) $ECHO_C" >&6
3609 else
3610   if test -n "$RANLIB"; then
3611   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3612 else
3613   ac_save_IFS=$IFS; IFS=$ac_path_separator
3614 ac_dummy="$PATH"
3615 for ac_dir in $ac_dummy; do
3616   IFS=$ac_save_IFS
3617   test -z "$ac_dir" && ac_dir=.
3618   $as_executable_p "$ac_dir/$ac_word" || continue
3619 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3620 echo "$as_me:3620: found $ac_dir/$ac_word" >&5
3621 break
3622 done
3623
3624 fi
3625 fi
3626 RANLIB=$ac_cv_prog_RANLIB
3627 if test -n "$RANLIB"; then
3628   echo "$as_me:3628: result: $RANLIB" >&5
3629 echo "${ECHO_T}$RANLIB" >&6
3630 else
3631   echo "$as_me:3631: result: no" >&5
3632 echo "${ECHO_T}no" >&6
3633 fi
3634
3635 fi
3636 if test -z "$ac_cv_prog_RANLIB"; then
3637   ac_ct_RANLIB=$RANLIB
3638   # Extract the first word of "ranlib", so it can be a program name with args.
3639 set dummy ranlib; ac_word=$2
3640 echo "$as_me:3640: checking for $ac_word" >&5
3641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3642 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3643   echo $ECHO_N "(cached) $ECHO_C" >&6
3644 else
3645   if test -n "$ac_ct_RANLIB"; then
3646   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3647 else
3648   ac_save_IFS=$IFS; IFS=$ac_path_separator
3649 ac_dummy="$PATH"
3650 for ac_dir in $ac_dummy; do
3651   IFS=$ac_save_IFS
3652   test -z "$ac_dir" && ac_dir=.
3653   $as_executable_p "$ac_dir/$ac_word" || continue
3654 ac_cv_prog_ac_ct_RANLIB="ranlib"
3655 echo "$as_me:3655: found $ac_dir/$ac_word" >&5
3656 break
3657 done
3658
3659   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3660 fi
3661 fi
3662 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3663 if test -n "$ac_ct_RANLIB"; then
3664   echo "$as_me:3664: result: $ac_ct_RANLIB" >&5
3665 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3666 else
3667   echo "$as_me:3667: result: no" >&5
3668 echo "${ECHO_T}no" >&6
3669 fi
3670
3671   RANLIB=$ac_ct_RANLIB
3672 else
3673   RANLIB="$ac_cv_prog_RANLIB"
3674 fi
3675
3676 if test -n "$ac_tool_prefix"; then
3677   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3678 set dummy ${ac_tool_prefix}ld; ac_word=$2
3679 echo "$as_me:3679: checking for $ac_word" >&5
3680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3681 if test "${ac_cv_prog_LD+set}" = set; then
3682   echo $ECHO_N "(cached) $ECHO_C" >&6
3683 else
3684   if test -n "$LD"; then
3685   ac_cv_prog_LD="$LD" # Let the user override the test.
3686 else
3687   ac_save_IFS=$IFS; IFS=$ac_path_separator
3688 ac_dummy="$PATH"
3689 for ac_dir in $ac_dummy; do
3690   IFS=$ac_save_IFS
3691   test -z "$ac_dir" && ac_dir=.
3692   $as_executable_p "$ac_dir/$ac_word" || continue
3693 ac_cv_prog_LD="${ac_tool_prefix}ld"
3694 echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3695 break
3696 done
3697
3698 fi
3699 fi
3700 LD=$ac_cv_prog_LD
3701 if test -n "$LD"; then
3702   echo "$as_me:3702: result: $LD" >&5
3703 echo "${ECHO_T}$LD" >&6
3704 else
3705   echo "$as_me:3705: result: no" >&5
3706 echo "${ECHO_T}no" >&6
3707 fi
3708
3709 fi
3710 if test -z "$ac_cv_prog_LD"; then
3711   ac_ct_LD=$LD
3712   # Extract the first word of "ld", so it can be a program name with args.
3713 set dummy ld; ac_word=$2
3714 echo "$as_me:3714: checking for $ac_word" >&5
3715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3716 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3717   echo $ECHO_N "(cached) $ECHO_C" >&6
3718 else
3719   if test -n "$ac_ct_LD"; then
3720   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3721 else
3722   ac_save_IFS=$IFS; IFS=$ac_path_separator
3723 ac_dummy="$PATH"
3724 for ac_dir in $ac_dummy; do
3725   IFS=$ac_save_IFS
3726   test -z "$ac_dir" && ac_dir=.
3727   $as_executable_p "$ac_dir/$ac_word" || continue
3728 ac_cv_prog_ac_ct_LD="ld"
3729 echo "$as_me:3729: found $ac_dir/$ac_word" >&5
3730 break
3731 done
3732
3733   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3734 fi
3735 fi
3736 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3737 if test -n "$ac_ct_LD"; then
3738   echo "$as_me:3738: result: $ac_ct_LD" >&5
3739 echo "${ECHO_T}$ac_ct_LD" >&6
3740 else
3741   echo "$as_me:3741: result: no" >&5
3742 echo "${ECHO_T}no" >&6
3743 fi
3744
3745   LD=$ac_ct_LD
3746 else
3747   LD="$ac_cv_prog_LD"
3748 fi
3749
3750 if test -n "$ac_tool_prefix"; then
3751   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3752 set dummy ${ac_tool_prefix}ar; ac_word=$2
3753 echo "$as_me:3753: checking for $ac_word" >&5
3754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3755 if test "${ac_cv_prog_AR+set}" = set; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   if test -n "$AR"; then
3759   ac_cv_prog_AR="$AR" # Let the user override the test.
3760 else
3761   ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 ac_dummy="$PATH"
3763 for ac_dir in $ac_dummy; do
3764   IFS=$ac_save_IFS
3765   test -z "$ac_dir" && ac_dir=.
3766   $as_executable_p "$ac_dir/$ac_word" || continue
3767 ac_cv_prog_AR="${ac_tool_prefix}ar"
3768 echo "$as_me:3768: found $ac_dir/$ac_word" >&5
3769 break
3770 done
3771
3772 fi
3773 fi
3774 AR=$ac_cv_prog_AR
3775 if test -n "$AR"; then
3776   echo "$as_me:3776: result: $AR" >&5
3777 echo "${ECHO_T}$AR" >&6
3778 else
3779   echo "$as_me:3779: result: no" >&5
3780 echo "${ECHO_T}no" >&6
3781 fi
3782
3783 fi
3784 if test -z "$ac_cv_prog_AR"; then
3785   ac_ct_AR=$AR
3786   # Extract the first word of "ar", so it can be a program name with args.
3787 set dummy ar; ac_word=$2
3788 echo "$as_me:3788: checking for $ac_word" >&5
3789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   if test -n "$ac_ct_AR"; then
3794   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3795 else
3796   ac_save_IFS=$IFS; IFS=$ac_path_separator
3797 ac_dummy="$PATH"
3798 for ac_dir in $ac_dummy; do
3799   IFS=$ac_save_IFS
3800   test -z "$ac_dir" && ac_dir=.
3801   $as_executable_p "$ac_dir/$ac_word" || continue
3802 ac_cv_prog_ac_ct_AR="ar"
3803 echo "$as_me:3803: found $ac_dir/$ac_word" >&5
3804 break
3805 done
3806
3807   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3808 fi
3809 fi
3810 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3811 if test -n "$ac_ct_AR"; then
3812   echo "$as_me:3812: result: $ac_ct_AR" >&5
3813 echo "${ECHO_T}$ac_ct_AR" >&6
3814 else
3815   echo "$as_me:3815: result: no" >&5
3816 echo "${ECHO_T}no" >&6
3817 fi
3818
3819   AR=$ac_ct_AR
3820 else
3821   AR="$ac_cv_prog_AR"
3822 fi
3823
3824 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3825   echo $ECHO_N "(cached) $ECHO_C" >&6
3826 else
3827
3828 echo "$as_me:3828: checking for archiver options (symbol AR_OPTS)" >&5
3829 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3830
3831 if test -z "$AR_OPTS" ; then
3832         AR_OPTS=rv
3833
3834 fi
3835
3836 cf_cv_subst_AR_OPTS=$AR_OPTS
3837 echo "$as_me:3837: result: $AR_OPTS" >&5
3838 echo "${ECHO_T}$AR_OPTS" >&6
3839
3840 fi
3841
3842 echo "$as_me:3842: checking if you have specified an install-prefix" >&5
3843 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3844
3845 # Check whether --with-install-prefix or --without-install-prefix was given.
3846 if test "${with_install_prefix+set}" = set; then
3847   withval="$with_install_prefix"
3848   case "$withval" in #(vi
3849         yes|no) #(vi
3850                 ;;
3851         *)      DESTDIR="$withval"
3852                 ;;
3853         esac
3854 fi;
3855 echo "$as_me:3855: result: $DESTDIR" >&5
3856 echo "${ECHO_T}$DESTDIR" >&6
3857
3858 ###############################################################################
3859
3860 # If we're cross-compiling, allow the user to override the tools and their
3861 # options.  The configure script is oriented toward identifying the host
3862 # compiler, etc., but we need a build compiler to generate parts of the source.
3863
3864 if test "$cross_compiling" = yes ; then
3865
3866         # defaults that we might want to override
3867         : ${BUILD_CFLAGS:=''}
3868         : ${BUILD_CPPFLAGS:=''}
3869         : ${BUILD_LDFLAGS:=''}
3870         : ${BUILD_LIBS:=''}
3871         : ${BUILD_EXEEXT:='$x'}
3872         : ${BUILD_OBJEXT:='o'}
3873
3874 # Check whether --with-build-cc or --without-build-cc was given.
3875 if test "${with_build_cc+set}" = set; then
3876   withval="$with_build_cc"
3877   BUILD_CC="$withval"
3878 else
3879   for ac_prog in gcc cc cl
3880 do
3881   # Extract the first word of "$ac_prog", so it can be a program name with args.
3882 set dummy $ac_prog; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$BUILD_CC"; then
3889   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_BUILD_CC="$ac_prog"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 BUILD_CC=$ac_cv_prog_BUILD_CC
3905 if test -n "$BUILD_CC"; then
3906   echo "$as_me:3906: result: $BUILD_CC" >&5
3907 echo "${ECHO_T}$BUILD_CC" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913   test -n "$BUILD_CC" && break
3914 done
3915
3916 fi;
3917         echo "$as_me:3917: checking for native build C compiler" >&5
3918 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3919         echo "$as_me:3919: result: $BUILD_CC" >&5
3920 echo "${ECHO_T}$BUILD_CC" >&6
3921
3922         echo "$as_me:3922: checking for native build C preprocessor" >&5
3923 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3924
3925 # Check whether --with-build-cpp or --without-build-cpp was given.
3926 if test "${with_build_cpp+set}" = set; then
3927   withval="$with_build_cpp"
3928   BUILD_CPP="$withval"
3929 else
3930   BUILD_CPP='${BUILD_CC} -E'
3931 fi;
3932         echo "$as_me:3932: result: $BUILD_CPP" >&5
3933 echo "${ECHO_T}$BUILD_CPP" >&6
3934
3935         echo "$as_me:3935: checking for native build C flags" >&5
3936 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3937
3938 # Check whether --with-build-cflags or --without-build-cflags was given.
3939 if test "${with_build_cflags+set}" = set; then
3940   withval="$with_build_cflags"
3941   BUILD_CFLAGS="$withval"
3942 fi;
3943         echo "$as_me:3943: result: $BUILD_CFLAGS" >&5
3944 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3945
3946         echo "$as_me:3946: checking for native build C preprocessor-flags" >&5
3947 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3948
3949 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3950 if test "${with_build_cppflags+set}" = set; then
3951   withval="$with_build_cppflags"
3952   BUILD_CPPFLAGS="$withval"
3953 fi;
3954         echo "$as_me:3954: result: $BUILD_CPPFLAGS" >&5
3955 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3956
3957         echo "$as_me:3957: checking for native build linker-flags" >&5
3958 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3959
3960 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3961 if test "${with_build_ldflags+set}" = set; then
3962   withval="$with_build_ldflags"
3963   BUILD_LDFLAGS="$withval"
3964 fi;
3965         echo "$as_me:3965: result: $BUILD_LDFLAGS" >&5
3966 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3967
3968         echo "$as_me:3968: checking for native build linker-libraries" >&5
3969 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3970
3971 # Check whether --with-build-libs or --without-build-libs was given.
3972 if test "${with_build_libs+set}" = set; then
3973   withval="$with_build_libs"
3974   BUILD_LIBS="$withval"
3975 fi;
3976         echo "$as_me:3976: result: $BUILD_LIBS" >&5
3977 echo "${ECHO_T}$BUILD_LIBS" >&6
3978
3979         # this assumes we're on Unix.
3980         BUILD_EXEEXT=
3981         BUILD_OBJEXT=o
3982
3983         : ${BUILD_CC:='${CC}'}
3984
3985         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3986                 { { echo "$as_me:3986: error: Cross-build requires two compilers.
3987 Use --with-build-cc to specify the native compiler." >&5
3988 echo "$as_me: error: Cross-build requires two compilers.
3989 Use --with-build-cc to specify the native compiler." >&2;}
3990    { (exit 1); exit 1; }; }
3991         fi
3992
3993 else
3994         : ${BUILD_CC:='${CC}'}
3995         : ${BUILD_CPP:='${CPP}'}
3996         : ${BUILD_CFLAGS:='${CFLAGS}'}
3997         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3998         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3999         : ${BUILD_LIBS:='${LIBS}'}
4000         : ${BUILD_EXEEXT:='$x'}
4001         : ${BUILD_OBJEXT:='o'}
4002 fi
4003
4004 ###############################################################################
4005
4006 ### Options to allow the user to specify the set of libraries which are used.
4007 ### Use "--without-normal --with-shared" to allow the default model to be
4008 ### shared, for example.
4009 cf_list_models=""
4010
4011 LIBTOOL=
4012
4013 # common library maintenance symbols that are convenient for libtool scripts:
4014 LIB_CREATE='${AR} -cr'
4015 LIB_OBJECT='${OBJECTS}'
4016 LIB_SUFFIX=.a
4017 LIB_PREP="$RANLIB"
4018
4019 # symbols used to prop libtool up to enable it to determine what it should be
4020 # doing:
4021 LIB_CLEAN=
4022 LIB_COMPILE=
4023 LIB_LINK='${CC}'
4024 LIB_INSTALL=
4025 LIB_UNINSTALL=
4026
4027 echo "$as_me:4027: checking if you want to build libraries with libtool" >&5
4028 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4029
4030 # Check whether --with-libtool or --without-libtool was given.
4031 if test "${with_libtool+set}" = set; then
4032   withval="$with_libtool"
4033   with_libtool=$withval
4034 else
4035   with_libtool=no
4036 fi;
4037 echo "$as_me:4037: result: $with_libtool" >&5
4038 echo "${ECHO_T}$with_libtool" >&6
4039 if test "$with_libtool" != "no"; then
4040
4041         if test "$with_libtool" != "yes" ; then
4042
4043 if test "x$prefix" != xNONE; then
4044   cf_path_syntax="$prefix"
4045 else
4046   cf_path_syntax="$ac_default_prefix"
4047 fi
4048
4049 case ".$with_libtool" in #(vi
4050 .\$\(*\)*|.\'*\'*) #(vi
4051   ;;
4052 ..|./*|.\\*) #(vi
4053   ;;
4054 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4055   ;;
4056 .\${*prefix}*) #(vi
4057   eval with_libtool="$with_libtool"
4058   case ".$with_libtool" in #(vi
4059   .NONE/*)
4060     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4061     ;;
4062   esac
4063   ;; #(vi
4064 .no|.NONE/*)
4065   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4066   ;;
4067 *)
4068   { { echo "$as_me:4068: error: expected a pathname, not \"$with_libtool\"" >&5
4069 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4070    { (exit 1); exit 1; }; }
4071   ;;
4072 esac
4073
4074                 LIBTOOL=$with_libtool
4075         else
4076                 # Extract the first word of "libtool", so it can be a program name with args.
4077 set dummy libtool; ac_word=$2
4078 echo "$as_me:4078: checking for $ac_word" >&5
4079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4080 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4081   echo $ECHO_N "(cached) $ECHO_C" >&6
4082 else
4083   case $LIBTOOL in
4084   [\\/]* | ?:[\\/]*)
4085   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4086   ;;
4087   *)
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   if $as_executable_p "$ac_dir/$ac_word"; then
4094    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4095    echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096    break
4097 fi
4098 done
4099
4100   ;;
4101 esac
4102 fi
4103 LIBTOOL=$ac_cv_path_LIBTOOL
4104
4105 if test -n "$LIBTOOL"; then
4106   echo "$as_me:4106: result: $LIBTOOL" >&5
4107 echo "${ECHO_T}$LIBTOOL" >&6
4108 else
4109   echo "$as_me:4109: result: no" >&5
4110 echo "${ECHO_T}no" >&6
4111 fi
4112
4113         fi
4114         if test -z "$LIBTOOL" ; then
4115                 { { echo "$as_me:4115: error: Cannot find libtool" >&5
4116 echo "$as_me: error: Cannot find libtool" >&2;}
4117    { (exit 1); exit 1; }; }
4118         fi
4119         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4120         LIB_OBJECT='${OBJECTS:.o=.lo}'
4121         LIB_SUFFIX=.la
4122         LIB_CLEAN='${LIBTOOL} --mode=clean'
4123         LIB_COMPILE='${LIBTOOL} --mode=compile'
4124         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4125         LIB_INSTALL='${LIBTOOL} --mode=install'
4126         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4127         LIB_PREP=:
4128
4129         # Show the version of libtool
4130         echo "$as_me:4130: checking version of libtool" >&5
4131 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4132
4133         # Save the version in a cache variable - this is not entirely a good
4134         # thing, but the version string from libtool is very ugly, and for
4135         # bug reports it might be useful to have the original string.
4136         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4137         echo "$as_me:4137: result: $cf_cv_libtool_version" >&5
4138 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4139         if test -z "$cf_cv_libtool_version" ; then
4140                 { { echo "$as_me:4140: error: This is not GNU libtool" >&5
4141 echo "$as_me: error: This is not GNU libtool" >&2;}
4142    { (exit 1); exit 1; }; }
4143         fi
4144
4145         # special hack to add --tag option for C++ compiler
4146         case $cf_cv_libtool_version in
4147         1.[5-9]*|[2-9]*)
4148                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4149                 ;;
4150         *)
4151                 LIBTOOL_CXX="$LIBTOOL"
4152                 ;;
4153         esac
4154 else
4155         LIBTOOL=""
4156         LIBTOOL_CXX=""
4157 fi
4158
4159 test -z "$LIBTOOL" && ECHO_LT=
4160
4161 if test "$with_libtool" != "no" ; then
4162
4163 cf_list_models="$cf_list_models libtool"
4164
4165 else
4166
4167 echo "$as_me:4167: checking if you want to build shared libraries" >&5
4168 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4169
4170 # Check whether --with-shared or --without-shared was given.
4171 if test "${with_shared+set}" = set; then
4172   withval="$with_shared"
4173   with_shared=$withval
4174 else
4175   with_shared=no
4176 fi;
4177 echo "$as_me:4177: result: $with_shared" >&5
4178 echo "${ECHO_T}$with_shared" >&6
4179 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4180
4181 echo "$as_me:4181: checking if you want to build static libraries" >&5
4182 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4183
4184 # Check whether --with-normal or --without-normal was given.
4185 if test "${with_normal+set}" = set; then
4186   withval="$with_normal"
4187   with_normal=$withval
4188 else
4189   with_normal=yes
4190 fi;
4191 echo "$as_me:4191: result: $with_normal" >&5
4192 echo "${ECHO_T}$with_normal" >&6
4193 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4194
4195 echo "$as_me:4195: checking if you want to build debug libraries" >&5
4196 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4197
4198 # Check whether --with-debug or --without-debug was given.
4199 if test "${with_debug+set}" = set; then
4200   withval="$with_debug"
4201   with_debug=$withval
4202 else
4203   with_debug=yes
4204 fi;
4205 echo "$as_me:4205: result: $with_debug" >&5
4206 echo "${ECHO_T}$with_debug" >&6
4207 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4208
4209 echo "$as_me:4209: checking if you want to build profiling libraries" >&5
4210 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4211
4212 # Check whether --with-profile or --without-profile was given.
4213 if test "${with_profile+set}" = set; then
4214   withval="$with_profile"
4215   with_profile=$withval
4216 else
4217   with_profile=no
4218 fi;
4219 echo "$as_me:4219: result: $with_profile" >&5
4220 echo "${ECHO_T}$with_profile" >&6
4221 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4222
4223 fi
4224
4225 ###############################################################################
4226
4227 echo "$as_me:4227: checking for specified models" >&5
4228 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4229 test -z "$cf_list_models" && cf_list_models=normal
4230 test "$with_libtool" != "no" && cf_list_models=libtool
4231 echo "$as_me:4231: result: $cf_list_models" >&5
4232 echo "${ECHO_T}$cf_list_models" >&6
4233
4234 ### Use the first model as the default, and save its suffix for use in building
4235 ### up test-applications.
4236 echo "$as_me:4236: checking for default model" >&5
4237 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4238 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4239 echo "$as_me:4239: result: $DFT_LWR_MODEL" >&5
4240 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4241
4242 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4243
4244 TICS_NAME=tic
4245
4246 TINFO_NAME=tinfo
4247
4248 LIB_NAME=ncurses
4249
4250 LIB_DIR=../lib
4251 LIB_2ND=../../lib
4252
4253         case $cf_cv_system_name in
4254         OS/2*)  LIB_PREFIX=''     ;;
4255         os2*)   LIB_PREFIX=''     ;;
4256         *)      LIB_PREFIX='lib'  ;;
4257         esac
4258 cf_prefix=$LIB_PREFIX
4259
4260 LIB_PREFIX=$cf_prefix
4261
4262 LIB_SUFFIX=
4263
4264 ###############################################################################
4265
4266 echo "$as_me:4266: checking if you want to build a separate terminfo library" >&5
4267 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4268
4269 # Check whether --with-termlib or --without-termlib was given.
4270 if test "${with_termlib+set}" = set; then
4271   withval="$with_termlib"
4272   with_termlib=$withval
4273 else
4274   with_termlib=no
4275 fi;
4276 echo "$as_me:4276: result: $with_termlib" >&5
4277 echo "${ECHO_T}$with_termlib" >&6
4278
4279 echo "$as_me:4279: checking if you want to build a separate tic library" >&5
4280 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4281
4282 # Check whether --with-ticlib or --without-ticlib was given.
4283 if test "${with_ticlib+set}" = set; then
4284   withval="$with_ticlib"
4285   with_ticlib=$withval
4286 else
4287   with_ticlib=no
4288 fi;
4289 echo "$as_me:4289: result: $with_ticlib" >&5
4290 echo "${ECHO_T}$with_ticlib" >&6
4291
4292 ### Checks for special libraries, must be done up-front.
4293 SHLIB_LIST=""
4294
4295 echo "$as_me:4295: checking if you want to link with the GPM mouse library" >&5
4296 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4297
4298 # Check whether --with-gpm or --without-gpm was given.
4299 if test "${with_gpm+set}" = set; then
4300   withval="$with_gpm"
4301   with_gpm=$withval
4302 else
4303   with_gpm=maybe
4304 fi;
4305 echo "$as_me:4305: result: $with_gpm" >&5
4306 echo "${ECHO_T}$with_gpm" >&6
4307
4308 if test "$with_gpm" != no ; then
4309         echo "$as_me:4309: checking for gpm.h" >&5
4310 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4311 if test "${ac_cv_header_gpm_h+set}" = set; then
4312   echo $ECHO_N "(cached) $ECHO_C" >&6
4313 else
4314   cat >conftest.$ac_ext <<_ACEOF
4315 #line 4315 "configure"
4316 #include "confdefs.h"
4317 #include <gpm.h>
4318 _ACEOF
4319 if { (eval echo "$as_me:4319: \"$ac_cpp conftest.$ac_ext\"") >&5
4320   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4321   ac_status=$?
4322   egrep -v '^ *\+' conftest.er1 >conftest.err
4323   rm -f conftest.er1
4324   cat conftest.err >&5
4325   echo "$as_me:4325: \$? = $ac_status" >&5
4326   (exit $ac_status); } >/dev/null; then
4327   if test -s conftest.err; then
4328     ac_cpp_err=$ac_c_preproc_warn_flag
4329   else
4330     ac_cpp_err=
4331   fi
4332 else
4333   ac_cpp_err=yes
4334 fi
4335 if test -z "$ac_cpp_err"; then
4336   ac_cv_header_gpm_h=yes
4337 else
4338   echo "$as_me: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   ac_cv_header_gpm_h=no
4341 fi
4342 rm -f conftest.err conftest.$ac_ext
4343 fi
4344 echo "$as_me:4344: result: $ac_cv_header_gpm_h" >&5
4345 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4346 if test $ac_cv_header_gpm_h = yes; then
4347
4348                 cat >>confdefs.h <<\EOF
4349 #define HAVE_GPM_H 1
4350 EOF
4351
4352                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4353                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4354
4355 echo "${as_me-configure}:4355: testing assuming we really have GPM library ..." 1>&5
4356
4357                         cat >>confdefs.h <<\EOF
4358 #define HAVE_LIBGPM 1
4359 EOF
4360
4361                 else
4362                         echo "$as_me:4362: checking for Gpm_Open in -lgpm" >&5
4363 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4364 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4365   echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367   ac_check_lib_save_LIBS=$LIBS
4368 LIBS="-lgpm  $LIBS"
4369 cat >conftest.$ac_ext <<_ACEOF
4370 #line 4370 "configure"
4371 #include "confdefs.h"
4372
4373 /* Override any gcc2 internal prototype to avoid an error.  */
4374 #ifdef __cplusplus
4375 extern "C"
4376 #endif
4377 /* We use char because int might match the return type of a gcc2
4378    builtin and then its argument prototype would still apply.  */
4379 char Gpm_Open ();
4380 int
4381 main ()
4382 {
4383 Gpm_Open ();
4384   ;
4385   return 0;
4386 }
4387 _ACEOF
4388 rm -f conftest.$ac_objext conftest$ac_exeext
4389 if { (eval echo "$as_me:4389: \"$ac_link\"") >&5
4390   (eval $ac_link) 2>&5
4391   ac_status=$?
4392   echo "$as_me:4392: \$? = $ac_status" >&5
4393   (exit $ac_status); } &&
4394          { ac_try='test -s conftest$ac_exeext'
4395   { (eval echo "$as_me:4395: \"$ac_try\"") >&5
4396   (eval $ac_try) 2>&5
4397   ac_status=$?
4398   echo "$as_me:4398: \$? = $ac_status" >&5
4399   (exit $ac_status); }; }; then
4400   ac_cv_lib_gpm_Gpm_Open=yes
4401 else
4402   echo "$as_me: failed program was:" >&5
4403 cat conftest.$ac_ext >&5
4404 ac_cv_lib_gpm_Gpm_Open=no
4405 fi
4406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4407 LIBS=$ac_check_lib_save_LIBS
4408 fi
4409 echo "$as_me:4409: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4410 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4411 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4412   :
4413 else
4414
4415                                 { { echo "$as_me:4415: error: Cannot link with GPM library" >&5
4416 echo "$as_me: error: Cannot link with GPM library" >&2;}
4417    { (exit 1); exit 1; }; }
4418                 fi
4419                 with_gpm=yes
4420
4421 fi
4422
4423 else
4424
4425                 test "$with_gpm" != maybe && { echo "$as_me:4425: WARNING: Cannot find GPM header" >&5
4426 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4427                 with_gpm=no
4428
4429 fi
4430
4431 fi
4432
4433 if test "$with_gpm" != no ; then
4434         echo "$as_me:4434: checking if you want to load GPM dynamically" >&5
4435 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4436
4437 # Check whether --with-dlsym or --without-dlsym was given.
4438 if test "${with_dlsym+set}" = set; then
4439   withval="$with_dlsym"
4440   with_dlsym=$withval
4441 else
4442   with_dlsym=yes
4443 fi;
4444         echo "$as_me:4444: result: $with_dlsym" >&5
4445 echo "${ECHO_T}$with_dlsym" >&6
4446         if test "$with_dlsym" = yes ; then
4447
4448 cf_have_dlsym=no
4449 echo "$as_me:4449: checking for dlsym" >&5
4450 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4451 if test "${ac_cv_func_dlsym+set}" = set; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   cat >conftest.$ac_ext <<_ACEOF
4455 #line 4455 "configure"
4456 #include "confdefs.h"
4457 /* System header to define __stub macros and hopefully few prototypes,
4458     which can conflict with char dlsym (); below.  */
4459 #include <assert.h>
4460 /* Override any gcc2 internal prototype to avoid an error.  */
4461 #ifdef __cplusplus
4462 extern "C"
4463 #endif
4464 /* We use char because int might match the return type of a gcc2
4465    builtin and then its argument prototype would still apply.  */
4466 char dlsym ();
4467 char (*f) ();
4468
4469 int
4470 main ()
4471 {
4472 /* The GNU C library defines this for functions which it implements
4473     to always fail with ENOSYS.  Some functions are actually named
4474     something starting with __ and the normal name is an alias.  */
4475 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4476 choke me
4477 #else
4478 f = dlsym;
4479 #endif
4480
4481   ;
4482   return 0;
4483 }
4484 _ACEOF
4485 rm -f conftest.$ac_objext conftest$ac_exeext
4486 if { (eval echo "$as_me:4486: \"$ac_link\"") >&5
4487   (eval $ac_link) 2>&5
4488   ac_status=$?
4489   echo "$as_me:4489: \$? = $ac_status" >&5
4490   (exit $ac_status); } &&
4491          { ac_try='test -s conftest$ac_exeext'
4492   { (eval echo "$as_me:4492: \"$ac_try\"") >&5
4493   (eval $ac_try) 2>&5
4494   ac_status=$?
4495   echo "$as_me:4495: \$? = $ac_status" >&5
4496   (exit $ac_status); }; }; then
4497   ac_cv_func_dlsym=yes
4498 else
4499   echo "$as_me: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4501 ac_cv_func_dlsym=no
4502 fi
4503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4504 fi
4505 echo "$as_me:4505: result: $ac_cv_func_dlsym" >&5
4506 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4507 if test $ac_cv_func_dlsym = yes; then
4508   cf_have_dlsym=yes
4509 else
4510
4511 cf_have_libdl=no
4512 echo "$as_me:4512: checking for dlsym in -ldl" >&5
4513 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4514 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4515   echo $ECHO_N "(cached) $ECHO_C" >&6
4516 else
4517   ac_check_lib_save_LIBS=$LIBS
4518 LIBS="-ldl  $LIBS"
4519 cat >conftest.$ac_ext <<_ACEOF
4520 #line 4520 "configure"
4521 #include "confdefs.h"
4522
4523 /* Override any gcc2 internal prototype to avoid an error.  */
4524 #ifdef __cplusplus
4525 extern "C"
4526 #endif
4527 /* We use char because int might match the return type of a gcc2
4528    builtin and then its argument prototype would still apply.  */
4529 char dlsym ();
4530 int
4531 main ()
4532 {
4533 dlsym ();
4534   ;
4535   return 0;
4536 }
4537 _ACEOF
4538 rm -f conftest.$ac_objext conftest$ac_exeext
4539 if { (eval echo "$as_me:4539: \"$ac_link\"") >&5
4540   (eval $ac_link) 2>&5
4541   ac_status=$?
4542   echo "$as_me:4542: \$? = $ac_status" >&5
4543   (exit $ac_status); } &&
4544          { ac_try='test -s conftest$ac_exeext'
4545   { (eval echo "$as_me:4545: \"$ac_try\"") >&5
4546   (eval $ac_try) 2>&5
4547   ac_status=$?
4548   echo "$as_me:4548: \$? = $ac_status" >&5
4549   (exit $ac_status); }; }; then
4550   ac_cv_lib_dl_dlsym=yes
4551 else
4552   echo "$as_me: failed program was:" >&5
4553 cat conftest.$ac_ext >&5
4554 ac_cv_lib_dl_dlsym=no
4555 fi
4556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4557 LIBS=$ac_check_lib_save_LIBS
4558 fi
4559 echo "$as_me:4559: result: $ac_cv_lib_dl_dlsym" >&5
4560 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4561 if test $ac_cv_lib_dl_dlsym = yes; then
4562
4563         cf_have_dlsym=yes
4564         cf_have_libdl=yes
4565 fi
4566
4567 fi
4568
4569 if test "$cf_have_dlsym" = yes ; then
4570         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4571
4572         echo "$as_me:4572: checking whether able to link to dl*() functions" >&5
4573 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4574         cat >conftest.$ac_ext <<_ACEOF
4575 #line 4575 "configure"
4576 #include "confdefs.h"
4577 #include <dlfcn.h>
4578 int
4579 main ()
4580 {
4581
4582                 void *obj;
4583                 if ((obj = dlopen("filename", 0)) != 0) {
4584                         if (dlsym(obj, "symbolname") == 0) {
4585                         dlclose(obj);
4586                         }
4587                 }
4588   ;
4589   return 0;
4590 }
4591 _ACEOF
4592 rm -f conftest.$ac_objext conftest$ac_exeext
4593 if { (eval echo "$as_me:4593: \"$ac_link\"") >&5
4594   (eval $ac_link) 2>&5
4595   ac_status=$?
4596   echo "$as_me:4596: \$? = $ac_status" >&5
4597   (exit $ac_status); } &&
4598          { ac_try='test -s conftest$ac_exeext'
4599   { (eval echo "$as_me:4599: \"$ac_try\"") >&5
4600   (eval $ac_try) 2>&5
4601   ac_status=$?
4602   echo "$as_me:4602: \$? = $ac_status" >&5
4603   (exit $ac_status); }; }; then
4604
4605                 cat >>confdefs.h <<\EOF
4606 #define HAVE_LIBDL 1
4607 EOF
4608
4609 else
4610   echo "$as_me: failed program was:" >&5
4611 cat conftest.$ac_ext >&5
4612
4613                 { { echo "$as_me:4613: error: Cannot link test program for libdl" >&5
4614 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4615    { (exit 1); exit 1; }; }
4616 fi
4617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4618         echo "$as_me:4618: result: ok" >&5
4619 echo "${ECHO_T}ok" >&6
4620 else
4621         { { echo "$as_me:4621: error: Cannot find dlsym function" >&5
4622 echo "$as_me: error: Cannot find dlsym function" >&2;}
4623    { (exit 1); exit 1; }; }
4624 fi
4625
4626                 if test "$with_gpm" != yes ; then
4627                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4628
4629 echo "${as_me-configure}:4629: testing assuming soname for gpm is $with_gpm ..." 1>&5
4630
4631                         cf_cv_gpm_soname="$with_gpm"
4632                 else
4633
4634 echo "$as_me:4634: checking for soname of gpm library" >&5
4635 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4636 if test "${cf_cv_gpm_soname+set}" = set; then
4637   echo $ECHO_N "(cached) $ECHO_C" >&6
4638 else
4639
4640 cf_cv_gpm_soname=unknown
4641 if test "$cross_compiling" != yes ; then
4642 cat >conftest.$ac_ext <<CF_EOF
4643 #include <gpm.h>
4644 int main()
4645 {
4646 if (Gpm_Open(0,0)) Gpm_Close();
4647         ${cf_cv_main_return:-return}(0);
4648 }
4649 CF_EOF
4650 cf_save_LIBS="$LIBS"
4651         LIBS="-lgpm $LIBS"
4652         if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5
4653   (eval $ac_compile) 2>&5
4654   ac_status=$?
4655   echo "$as_me:4655: \$? = $ac_status" >&5
4656   (exit $ac_status); } ; then
4657                 if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
4658   (eval $ac_link) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); } ; then
4662                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4663                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4664                 fi
4665         fi
4666 rm -f conftest*
4667 LIBS="$cf_save_LIBS"
4668 fi
4669
4670 fi
4671 echo "$as_me:4671: result: $cf_cv_gpm_soname" >&5
4672 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4673
4674                 fi
4675                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4676 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4677 EOF
4678
4679                 SHLIB_LIST="-ldl $SHLIB_LIST"
4680         else
4681                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4682         fi
4683         cat >>confdefs.h <<\EOF
4684 #define HAVE_LIBGPM 1
4685 EOF
4686
4687 echo "$as_me:4687: checking for Gpm_Wgetch in -lgpm" >&5
4688 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4689 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4690   echo $ECHO_N "(cached) $ECHO_C" >&6
4691 else
4692   ac_check_lib_save_LIBS=$LIBS
4693 LIBS="-lgpm  $LIBS"
4694 cat >conftest.$ac_ext <<_ACEOF
4695 #line 4695 "configure"
4696 #include "confdefs.h"
4697
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 #ifdef __cplusplus
4700 extern "C"
4701 #endif
4702 /* We use char because int might match the return type of a gcc2
4703    builtin and then its argument prototype would still apply.  */
4704 char Gpm_Wgetch ();
4705 int
4706 main ()
4707 {
4708 Gpm_Wgetch ();
4709   ;
4710   return 0;
4711 }
4712 _ACEOF
4713 rm -f conftest.$ac_objext conftest$ac_exeext
4714 if { (eval echo "$as_me:4714: \"$ac_link\"") >&5
4715   (eval $ac_link) 2>&5
4716   ac_status=$?
4717   echo "$as_me:4717: \$? = $ac_status" >&5
4718   (exit $ac_status); } &&
4719          { ac_try='test -s conftest$ac_exeext'
4720   { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4721   (eval $ac_try) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); }; }; then
4725   ac_cv_lib_gpm_Gpm_Wgetch=yes
4726 else
4727   echo "$as_me: failed program was:" >&5
4728 cat conftest.$ac_ext >&5
4729 ac_cv_lib_gpm_Gpm_Wgetch=no
4730 fi
4731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4732 LIBS=$ac_check_lib_save_LIBS
4733 fi
4734 echo "$as_me:4734: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4735 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4736 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4737
4738 echo "$as_me:4738: checking if GPM is weakly bound to curses library" >&5
4739 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4740 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4741   echo $ECHO_N "(cached) $ECHO_C" >&6
4742 else
4743
4744 cf_cv_check_gpm_wgetch=unknown
4745 if test "$cross_compiling" != yes ; then
4746
4747 cat >conftest.$ac_ext <<CF_EOF
4748 #include <gpm.h>
4749 int main()
4750 {
4751         Gpm_Wgetch();
4752         ${cf_cv_main_return:-return}(0);
4753 }
4754 CF_EOF
4755
4756         cf_save_LIBS="$LIBS"
4757         # This only works if we can look at the symbol table.  If a shared
4758         # library is stripped for install, we cannot use that.  So we're forced
4759         # to rely on the static library, noting that some packagers may not
4760         # include it.
4761         LIBS="-static -lgpm -dynamic $LIBS"
4762         if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
4763   (eval $ac_compile) 2>&5
4764   ac_status=$?
4765   echo "$as_me:4765: \$? = $ac_status" >&5
4766   (exit $ac_status); } ; then
4767                 if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
4768   (eval $ac_link) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } ; then
4772                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4773                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4774                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4775                 fi
4776         fi
4777         rm -f conftest*
4778         LIBS="$cf_save_LIBS"
4779 fi
4780
4781 fi
4782 echo "$as_me:4782: result: $cf_cv_check_gpm_wgetch" >&5
4783 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4784
4785 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4786         { echo "$as_me:4786: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4787 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4788 fi
4789
4790 fi
4791
4792 fi
4793
4794 # not everyone has "test -c"
4795 if test -c /dev/sysmouse 2>/dev/null ; then
4796 echo "$as_me:4796: checking if you want to use sysmouse" >&5
4797 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4798
4799 # Check whether --with-sysmouse or --without-sysmouse was given.
4800 if test "${with_sysmouse+set}" = set; then
4801   withval="$with_sysmouse"
4802   cf_with_sysmouse=$withval
4803 else
4804   cf_with_sysmouse=maybe
4805 fi;
4806         if test "$cf_with_sysmouse" != no ; then
4807         cat >conftest.$ac_ext <<_ACEOF
4808 #line 4808 "configure"
4809 #include "confdefs.h"
4810
4811 #include <osreldate.h>
4812 #if (__FreeBSD_version >= 400017)
4813 #include <sys/consio.h>
4814 #include <sys/fbio.h>
4815 #else
4816 #include <machine/console.h>
4817 #endif
4818
4819 int
4820 main ()
4821 {
4822
4823         struct mouse_info the_mouse;
4824         ioctl(0, CONS_MOUSECTL, &the_mouse);
4825
4826   ;
4827   return 0;
4828 }
4829 _ACEOF
4830 rm -f conftest.$ac_objext
4831 if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832   (eval $ac_compile) 2>&5
4833   ac_status=$?
4834   echo "$as_me:4834: \$? = $ac_status" >&5
4835   (exit $ac_status); } &&
4836          { ac_try='test -s conftest.$ac_objext'
4837   { (eval echo "$as_me:4837: \"$ac_try\"") >&5
4838   (eval $ac_try) 2>&5
4839   ac_status=$?
4840   echo "$as_me:4840: \$? = $ac_status" >&5
4841   (exit $ac_status); }; }; then
4842   cf_with_sysmouse=yes
4843 else
4844   echo "$as_me: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 cf_with_sysmouse=no
4847 fi
4848 rm -f conftest.$ac_objext conftest.$ac_ext
4849         fi
4850 echo "$as_me:4850: result: $cf_with_sysmouse" >&5
4851 echo "${ECHO_T}$cf_with_sysmouse" >&6
4852 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4853 #define USE_SYSMOUSE 1
4854 EOF
4855
4856 fi
4857
4858 if test X"$CC_G_OPT" = X"" ; then
4859         CC_G_OPT='-g'
4860         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4861 fi
4862
4863 if test X"$CXX_G_OPT" = X"" ; then
4864         CXX_G_OPT='-g'
4865         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4866 fi
4867
4868 echo "$as_me:4868: checking for default loader flags" >&5
4869 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4870 case $DFT_LWR_MODEL in
4871 libtool) LD_MODEL=''   ;;
4872 normal)  LD_MODEL=''   ;;
4873 debug)   LD_MODEL=$CC_G_OPT ;;
4874 profile) LD_MODEL='-pg';;
4875 shared)  LD_MODEL=''   ;;
4876 esac
4877 echo "$as_me:4877: result: $LD_MODEL" >&5
4878 echo "${ECHO_T}$LD_MODEL" >&6
4879
4880 case $DFT_LWR_MODEL in
4881 shared)
4882 echo "$as_me:4882: checking if rpath option should be used" >&5
4883 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4884
4885 # Check whether --enable-rpath or --disable-rpath was given.
4886 if test "${enable_rpath+set}" = set; then
4887   enableval="$enable_rpath"
4888   cf_cv_ld_rpath=$enableval
4889 else
4890   cf_cv_ld_rpath=no
4891 fi;
4892 echo "$as_me:4892: result: $cf_cv_ld_rpath" >&5
4893 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4894 echo "$as_me:4894: checking if shared libraries should be relinked during install" >&5
4895 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4896
4897 # Check whether --enable-relink or --disable-relink was given.
4898 if test "${enable_relink+set}" = set; then
4899   enableval="$enable_relink"
4900   cf_cv_do_relink=$enableval
4901 else
4902   cf_cv_do_relink=yes
4903 fi;
4904 echo "$as_me:4904: result: $cf_cv_do_relink" >&5
4905 echo "${ECHO_T}$cf_cv_do_relink" >&6
4906         ;;
4907 esac
4908
4909         LOCAL_LDFLAGS=
4910         LOCAL_LDFLAGS2=
4911         LD_SHARED_OPTS=
4912         INSTALL_LIB="-m 644"
4913
4914         cf_cv_do_symlinks=no
4915
4916         echo "$as_me:4916: checking if release/abi version should be used for shared libs" >&5
4917 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4918
4919 # Check whether --with-shlib-version or --without-shlib-version was given.
4920 if test "${with_shlib_version+set}" = set; then
4921   withval="$with_shlib_version"
4922   test -z "$withval" && withval=auto
4923         case $withval in #(vi
4924         yes) #(vi
4925                 cf_cv_shlib_version=auto
4926                 ;;
4927         rel|abi|auto|no) #(vi
4928                 cf_cv_shlib_version=$withval
4929                 ;;
4930         *)
4931                 { { echo "$as_me:4931: error: option value must be one of: rel, abi, auto or no" >&5
4932 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4933    { (exit 1); exit 1; }; }
4934                 ;;
4935         esac
4936
4937 else
4938   cf_cv_shlib_version=auto
4939 fi;
4940         echo "$as_me:4940: result: $cf_cv_shlib_version" >&5
4941 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4942
4943         cf_cv_rm_so_locs=no
4944
4945         # Some less-capable ports of gcc support only -fpic
4946         CC_SHARED_OPTS=
4947         if test "$GCC" = yes
4948         then
4949                 echo "$as_me:4949: checking which $CC option to use" >&5
4950 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4951                 cf_save_CFLAGS="$CFLAGS"
4952                 for CC_SHARED_OPTS in -fPIC -fpic ''
4953                 do
4954                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4955                         cat >conftest.$ac_ext <<_ACEOF
4956 #line 4956 "configure"
4957 #include "confdefs.h"
4958 #include <stdio.h>
4959 int
4960 main ()
4961 {
4962 int x = 1
4963   ;
4964   return 0;
4965 }
4966 _ACEOF
4967 rm -f conftest.$ac_objext
4968 if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5
4969   (eval $ac_compile) 2>&5
4970   ac_status=$?
4971   echo "$as_me:4971: \$? = $ac_status" >&5
4972   (exit $ac_status); } &&
4973          { ac_try='test -s conftest.$ac_objext'
4974   { (eval echo "$as_me:4974: \"$ac_try\"") >&5
4975   (eval $ac_try) 2>&5
4976   ac_status=$?
4977   echo "$as_me:4977: \$? = $ac_status" >&5
4978   (exit $ac_status); }; }; then
4979   break
4980 else
4981   echo "$as_me: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 fi
4984 rm -f conftest.$ac_objext conftest.$ac_ext
4985                 done
4986                 echo "$as_me:4986: result: $CC_SHARED_OPTS" >&5
4987 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4988                 CFLAGS="$cf_save_CFLAGS"
4989         fi
4990
4991         cf_cv_shlib_version_infix=no
4992
4993         case $cf_cv_system_name in
4994         beos*)
4995                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4996                 ;;
4997         cygwin*)
4998                 CC_SHARED_OPTS=
4999                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5000                 cf_cv_shlib_version=cygdll
5001                 cf_cv_shlib_version_infix=cygdll
5002                 cat >mk_shared_lib.sh <<-CF_EOF
5003                 #!/bin/sh
5004                 SHARED_LIB=\$1
5005                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5006                 shift
5007                 cat <<-EOF
5008                 Linking shared library
5009                 ** SHARED_LIB \$SHARED_LIB
5010                 ** IMPORT_LIB \$IMPORT_LIB
5011 EOF
5012                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5013 CF_EOF
5014                 chmod +x mk_shared_lib.sh
5015                 ;;
5016         darwin*)
5017                 EXTRA_CFLAGS="-no-cpp-precomp"
5018                 CC_SHARED_OPTS="-dynamic"
5019                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5020                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5021                 cf_cv_shlib_version_infix=yes
5022                 echo "$as_me:5022: checking if ld -search_paths_first works" >&5
5023 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5024 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5025   echo $ECHO_N "(cached) $ECHO_C" >&6
5026 else
5027
5028                         cf_save_LDFLAGS=$LDFLAGS
5029                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5030                         cat >conftest.$ac_ext <<_ACEOF
5031 #line 5031 "configure"
5032 #include "confdefs.h"
5033
5034 int
5035 main ()
5036 {
5037 int i;
5038   ;
5039   return 0;
5040 }
5041 _ACEOF
5042 rm -f conftest.$ac_objext conftest$ac_exeext
5043 if { (eval echo "$as_me:5043: \"$ac_link\"") >&5
5044   (eval $ac_link) 2>&5
5045   ac_status=$?
5046   echo "$as_me:5046: \$? = $ac_status" >&5
5047   (exit $ac_status); } &&
5048          { ac_try='test -s conftest$ac_exeext'
5049   { (eval echo "$as_me:5049: \"$ac_try\"") >&5
5050   (eval $ac_try) 2>&5
5051   ac_status=$?
5052   echo "$as_me:5052: \$? = $ac_status" >&5
5053   (exit $ac_status); }; }; then
5054   cf_cv_ldflags_search_paths_first=yes
5055 else
5056   echo "$as_me: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 cf_cv_ldflags_search_paths_first=no
5059 fi
5060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5061                                 LDFLAGS=$cf_save_LDFLAGS
5062 fi
5063 echo "$as_me:5063: result: $cf_cv_ldflags_search_paths_first" >&5
5064 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5065                 if test $cf_cv_ldflags_search_paths_first = yes; then
5066                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5067                 fi
5068                 ;;
5069         hpux*)
5070                 # (tested with gcc 2.7.2 -- I don't have c89)
5071                 if test "$GCC" = yes; then
5072                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5073                 else
5074                         CC_SHARED_OPTS='+Z'
5075                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5076                 fi
5077                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5078                 # HP-UX shared libraries must be executable, and should be
5079                 # readonly to exploit a quirk in the memory manager.
5080                 INSTALL_LIB="-m 555"
5081                 ;;
5082         irix*)
5083                 if test "$cf_cv_ld_rpath" = yes ; then
5084                         if test "$GCC" = yes; then
5085                                 cf_ld_rpath_opt="-Wl,-rpath,"
5086                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5087                         else
5088                                 cf_ld_rpath_opt="-rpath "
5089                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5090                         fi
5091                 fi
5092                 # tested with IRIX 5.2 and 'cc'.
5093                 if test "$GCC" != yes; then
5094                         CC_SHARED_OPTS='-KPIC'
5095                 fi
5096                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5097                 cf_cv_rm_so_locs=yes
5098                 ;;
5099         linux*|gnu*|k*bsd*-gnu)
5100                 if test "$DFT_LWR_MODEL" = "shared" ; then
5101                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5102                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5103                 fi
5104                 if test "$cf_cv_ld_rpath" = yes ; then
5105                         cf_ld_rpath_opt="-Wl,-rpath,"
5106                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5107                 fi
5108
5109         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5110         if test "$cf_cv_shlib_version" = rel; then
5111                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5112         else
5113                 cf_shared_soname='`basename $@`'
5114         fi
5115
5116                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5117                 ;;
5118         openbsd[2-9].*)
5119                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5120                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5121                 ;;
5122         openbsd*|freebsd[12].*)
5123                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5124                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5125                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5126                 ;;
5127         freebsd*)
5128                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5129                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5130                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5131                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5132                         cf_ld_rpath_opt="-rpath "
5133                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5134                 fi
5135
5136         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5137         if test "$cf_cv_shlib_version" = rel; then
5138                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5139         else
5140                 cf_shared_soname='`basename $@`'
5141         fi
5142
5143                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5144                 ;;
5145         netbsd*)
5146                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5147                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5148                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5149                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5150                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5151                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5152                         if test "$cf_cv_shlib_version" = auto; then
5153                         if test -f /usr/libexec/ld.elf_so; then
5154                                 cf_cv_shlib_version=abi
5155                         else
5156                                 cf_cv_shlib_version=rel
5157                         fi
5158                         fi
5159
5160         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5161         if test "$cf_cv_shlib_version" = rel; then
5162                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5163         else
5164                 cf_shared_soname='`basename $@`'
5165         fi
5166
5167                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5168                 else
5169                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5170                 fi
5171                 ;;
5172         osf*|mls+*)
5173                 # tested with OSF/1 V3.2 and 'cc'
5174                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5175                 # link with shared libs).
5176                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5177                 case $host_os in
5178                 osf4*)
5179                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5180                         ;;
5181                 esac
5182                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5183                 if test "$DFT_LWR_MODEL" = "shared" ; then
5184                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5185                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5186                 fi
5187                 if test "$cf_cv_ld_rpath" = yes ; then
5188                         cf_ld_rpath_opt="-rpath"
5189                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5190                 fi
5191                 cf_cv_rm_so_locs=yes
5192                 ;;
5193         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5194                 # tested with osr5.0.5
5195                 if test "$GCC" != yes; then
5196                         CC_SHARED_OPTS='-belf -KPIC'
5197                 fi
5198                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5199                 if test "$cf_cv_ld_rpath" = yes ; then
5200                         # only way is to set LD_RUN_PATH but no switch for it
5201                         RUN_PATH=$libdir
5202                 fi
5203                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5204                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5205                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5206                 ;;
5207         sunos4*)
5208                 # tested with SunOS 4.1.1 and gcc 2.7.0
5209                 if test "$GCC" != yes; then
5210                         CC_SHARED_OPTS='-KPIC'
5211                 fi
5212                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5213                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5214                 ;;
5215         solaris2*)
5216                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5217                 if test "$GCC" != yes; then
5218                         CC_SHARED_OPTS='-KPIC'
5219                 fi
5220                 if test "$DFT_LWR_MODEL" = "shared" ; then
5221                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5222                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5223                 fi
5224                 if test "$cf_cv_ld_rpath" = yes ; then
5225                         cf_ld_rpath_opt="-R"
5226                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5227                 fi
5228
5229         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5230         if test "$cf_cv_shlib_version" = rel; then
5231                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5232         else
5233                 cf_shared_soname='`basename $@`'
5234         fi
5235
5236                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5237                 ;;
5238         sysv5uw7*|unix_sv*)
5239                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5240                 if test "$GCC" != yes; then
5241                         CC_SHARED_OPTS='-KPIC'
5242                 fi
5243                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5244                 ;;
5245         *)
5246                 CC_SHARED_OPTS='unknown'
5247                 MK_SHARED_LIB='echo unknown'
5248                 ;;
5249         esac
5250
5251         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5252         case "$cf_cv_shlib_version" in #(vi
5253         rel|abi)
5254                 case "$MK_SHARED_LIB" in #(vi
5255                 *'-o $@')
5256                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5257                         ;;
5258                 *)
5259                         { echo "$as_me:5259: WARNING: ignored --with-shlib-version" >&5
5260 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5261                         ;;
5262                 esac
5263                 ;;
5264         esac
5265
5266         if test -n "$cf_ld_rpath_opt" ; then
5267                 echo "$as_me:5267: checking if we need a space after rpath option" >&5
5268 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5269                 cf_save_LIBS="$LIBS"
5270                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5271                 cat >conftest.$ac_ext <<_ACEOF
5272 #line 5272 "configure"
5273 #include "confdefs.h"
5274
5275 int
5276 main ()
5277 {
5278
5279   ;
5280   return 0;
5281 }
5282 _ACEOF
5283 rm -f conftest.$ac_objext conftest$ac_exeext
5284 if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
5285   (eval $ac_link) 2>&5
5286   ac_status=$?
5287   echo "$as_me:5287: \$? = $ac_status" >&5
5288   (exit $ac_status); } &&
5289          { ac_try='test -s conftest$ac_exeext'
5290   { (eval echo "$as_me:5290: \"$ac_try\"") >&5
5291   (eval $ac_try) 2>&5
5292   ac_status=$?
5293   echo "$as_me:5293: \$? = $ac_status" >&5
5294   (exit $ac_status); }; }; then
5295   cf_rpath_space=no
5296 else
5297   echo "$as_me: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 cf_rpath_space=yes
5300 fi
5301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5302                 LIBS="$cf_save_LIBS"
5303                 echo "$as_me:5303: result: $cf_rpath_space" >&5
5304 echo "${ECHO_T}$cf_rpath_space" >&6
5305                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5306                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5307         fi
5308
5309 if test "$CC_SHARED_OPTS" = "unknown"; then
5310         for model in $cf_list_models; do
5311                 if test "$model" = "shared"; then
5312                         { { echo "$as_me:5312: error: Shared libraries are not supported in this version" >&5
5313 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5314    { (exit 1); exit 1; }; }
5315                 fi
5316         done
5317 fi
5318
5319 ###############################################################################
5320
5321 ###     use option --disable-overwrite to leave out the link to -lcurses
5322 echo "$as_me:5322: checking if you wish to install ncurses overwriting curses" >&5
5323 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5324
5325 # Check whether --enable-overwrite or --disable-overwrite was given.
5326 if test "${enable_overwrite+set}" = set; then
5327   enableval="$enable_overwrite"
5328   with_overwrite=$enableval
5329 else
5330   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5331 fi;
5332 echo "$as_me:5332: result: $with_overwrite" >&5
5333 echo "${ECHO_T}$with_overwrite" >&6
5334
5335 echo "$as_me:5335: checking if external terminfo-database is used" >&5
5336 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5337
5338 # Check whether --enable-database or --disable-database was given.
5339 if test "${enable_database+set}" = set; then
5340   enableval="$enable_database"
5341   use_database=$enableval
5342 else
5343   use_database=yes
5344 fi;
5345 echo "$as_me:5345: result: $use_database" >&5
5346 echo "${ECHO_T}$use_database" >&6
5347
5348 case $host_os in #(vi
5349 os2*) #(vi
5350         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5351         ;;
5352 *) #(vi
5353         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5354         ;;
5355 esac
5356
5357         case $cf_cv_system_name in
5358         os2*)   PATHSEP=';'  ;;
5359         *)      PATHSEP=':'  ;;
5360         esac
5361
5362 if test "$use_database" != no ; then
5363         cat >>confdefs.h <<\EOF
5364 #define USE_DATABASE 1
5365 EOF
5366
5367         echo "$as_me:5367: checking which terminfo source-file will be installed" >&5
5368 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5369
5370 # Check whether --enable-database or --disable-database was given.
5371 if test "${enable_database+set}" = set; then
5372   enableval="$enable_database"
5373   TERMINFO_SRC=$withval
5374 fi;
5375         echo "$as_me:5375: result: $TERMINFO_SRC" >&5
5376 echo "${ECHO_T}$TERMINFO_SRC" >&6
5377
5378         echo "$as_me:5378: checking whether to use hashed database instead of directory/tree" >&5
5379 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5380
5381 # Check whether --with-hashed-db or --without-hashed-db was given.
5382 if test "${with_hashed_db+set}" = set; then
5383   withval="$with_hashed_db"
5384
5385 else
5386   with_hashed_db=no
5387 fi;
5388         echo "$as_me:5388: result: $with_hashed_db" >&5
5389 echo "${ECHO_T}$with_hashed_db" >&6
5390 fi
5391
5392 echo "$as_me:5392: checking for list of fallback descriptions" >&5
5393 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5394
5395 # Check whether --with-fallbacks or --without-fallbacks was given.
5396 if test "${with_fallbacks+set}" = set; then
5397   withval="$with_fallbacks"
5398   with_fallback=$withval
5399 else
5400   with_fallback=
5401 fi;
5402 echo "$as_me:5402: result: $with_fallback" >&5
5403 echo "${ECHO_T}$with_fallback" >&6
5404 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5405
5406 echo "$as_me:5406: checking if you want modern xterm or antique" >&5
5407 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5408
5409 # Check whether --with-xterm-new or --without-xterm-new was given.
5410 if test "${with_xterm_new+set}" = set; then
5411   withval="$with_xterm_new"
5412   with_xterm_new=$withval
5413 else
5414   with_xterm_new=yes
5415 fi;
5416 case $with_xterm_new in
5417 no)     with_xterm_new=xterm-old;;
5418 *)      with_xterm_new=xterm-new;;
5419 esac
5420 echo "$as_me:5420: result: $with_xterm_new" >&5
5421 echo "${ECHO_T}$with_xterm_new" >&6
5422 WHICH_XTERM=$with_xterm_new
5423
5424 MAKE_TERMINFO=
5425 if test "$use_database" = no ; then
5426         TERMINFO="${datadir}/terminfo"
5427         MAKE_TERMINFO="#"
5428 else
5429
5430 echo "$as_me:5430: checking for list of terminfo directories" >&5
5431 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5432
5433 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5434 if test "${with_terminfo_dirs+set}" = set; then
5435   withval="$with_terminfo_dirs"
5436
5437 else
5438   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5439 fi;
5440 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5441 cf_dst_path=
5442 for cf_src_path in $withval
5443 do
5444
5445 if test "x$prefix" != xNONE; then
5446   cf_path_syntax="$prefix"
5447 else
5448   cf_path_syntax="$ac_default_prefix"
5449 fi
5450
5451 case ".$cf_src_path" in #(vi
5452 .\$\(*\)*|.\'*\'*) #(vi
5453   ;;
5454 ..|./*|.\\*) #(vi
5455   ;;
5456 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5457   ;;
5458 .\${*prefix}*) #(vi
5459   eval cf_src_path="$cf_src_path"
5460   case ".$cf_src_path" in #(vi
5461   .NONE/*)
5462     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5463     ;;
5464   esac
5465   ;; #(vi
5466 .no|.NONE/*)
5467   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5468   ;;
5469 *)
5470   { { echo "$as_me:5470: error: expected a pathname, not \"$cf_src_path\"" >&5
5471 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5472    { (exit 1); exit 1; }; }
5473   ;;
5474 esac
5475
5476   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5477   cf_dst_path="${cf_dst_path}${cf_src_path}"
5478 done
5479 IFS="$ac_save_ifs"
5480
5481 eval 'TERMINFO_DIRS="$cf_dst_path"'
5482
5483 echo "$as_me:5483: result: $TERMINFO_DIRS" >&5
5484 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5485 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5486 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5487 EOF
5488
5489 echo "$as_me:5489: checking for default terminfo directory" >&5
5490 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5491
5492 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5493 if test "${with_default_terminfo_dir+set}" = set; then
5494   withval="$with_default_terminfo_dir"
5495
5496 else
5497   withval="${TERMINFO-${datadir}/terminfo}"
5498 fi; if test -n "${datadir}/terminfo" ; then
5499
5500 if test "x$prefix" != xNONE; then
5501   cf_path_syntax="$prefix"
5502 else
5503   cf_path_syntax="$ac_default_prefix"
5504 fi
5505
5506 case ".$withval" in #(vi
5507 .\$\(*\)*|.\'*\'*) #(vi
5508   ;;
5509 ..|./*|.\\*) #(vi
5510   ;;
5511 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5512   ;;
5513 .\${*prefix}*) #(vi
5514   eval withval="$withval"
5515   case ".$withval" in #(vi
5516   .NONE/*)
5517     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5518     ;;
5519   esac
5520   ;; #(vi
5521 .no|.NONE/*)
5522   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5523   ;;
5524 *)
5525   { { echo "$as_me:5525: error: expected a pathname, not \"$withval\"" >&5
5526 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5527    { (exit 1); exit 1; }; }
5528   ;;
5529 esac
5530
5531 fi
5532 TERMINFO="$withval"
5533
5534 echo "$as_me:5534: result: $TERMINFO" >&5
5535 echo "${ECHO_T}$TERMINFO" >&6
5536 cat >>confdefs.h <<EOF
5537 #define TERMINFO "$TERMINFO"
5538 EOF
5539
5540 fi
5541
5542 ###     use option --disable-big-core to make tic run on small machines
5543 ###     We need 4Mb, check if we can allocate 50% more than that.
5544 echo "$as_me:5544: checking if big-core option selected" >&5
5545 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5546
5547 # Check whether --enable-big-core or --disable-big-core was given.
5548 if test "${enable_big_core+set}" = set; then
5549   enableval="$enable_big_core"
5550   with_big_core=$enableval
5551 else
5552   if test "$cross_compiling" = yes; then
5553   with_big_core=no
5554 else
5555   cat >conftest.$ac_ext <<_ACEOF
5556 #line 5556 "configure"
5557 #include "confdefs.h"
5558
5559 #include <stdlib.h>
5560 #include <string.h>
5561 int main() {
5562         unsigned long n = 6000000L;
5563         char *s = malloc(n);
5564         if (s != 0)
5565                 s[0] = s[n-1] = 0;
5566         ${cf_cv_main_return:-return}(s == 0);
5567 }
5568 _ACEOF
5569 rm -f conftest$ac_exeext
5570 if { (eval echo "$as_me:5570: \"$ac_link\"") >&5
5571   (eval $ac_link) 2>&5
5572   ac_status=$?
5573   echo "$as_me:5573: \$? = $ac_status" >&5
5574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5575   { (eval echo "$as_me:5575: \"$ac_try\"") >&5
5576   (eval $ac_try) 2>&5
5577   ac_status=$?
5578   echo "$as_me:5578: \$? = $ac_status" >&5
5579   (exit $ac_status); }; }; then
5580   with_big_core=yes
5581 else
5582   echo "$as_me: program exited with status $ac_status" >&5
5583 echo "$as_me: failed program was:" >&5
5584 cat conftest.$ac_ext >&5
5585 with_big_core=no
5586 fi
5587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5588 fi
5589 fi;
5590 echo "$as_me:5590: result: $with_big_core" >&5
5591 echo "${ECHO_T}$with_big_core" >&6
5592 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5593 #define HAVE_BIG_CORE 1
5594 EOF
5595
5596 ### ISO C only guarantees 512-char strings, we have tables which load faster
5597 ### when constructed using "big" strings.
5598 echo "$as_me:5598: checking if big-strings option selected" >&5
5599 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5600
5601 # Check whether --enable-big-strings or --disable-big-strings was given.
5602 if test "${enable_big_strings+set}" = set; then
5603   enableval="$enable_big_strings"
5604   with_big_strings=no
5605 else
5606   with_big_strings=yes
5607 fi;
5608 echo "$as_me:5608: result: $with_big_strings" >&5
5609 echo "${ECHO_T}$with_big_strings" >&6
5610
5611 USE_BIG_STRINGS=0
5612 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5613
5614 ###     use option --enable-termcap to compile in the termcap fallback support
5615 echo "$as_me:5615: checking if you want termcap-fallback support" >&5
5616 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5617
5618 # Check whether --enable-termcap or --disable-termcap was given.
5619 if test "${enable_termcap+set}" = set; then
5620   enableval="$enable_termcap"
5621   with_termcap=$enableval
5622 else
5623   with_termcap=no
5624 fi;
5625 echo "$as_me:5625: result: $with_termcap" >&5
5626 echo "${ECHO_T}$with_termcap" >&6
5627
5628 if test "$with_termcap" != "yes" ; then
5629         if test "$use_database" = no ; then
5630                 if test -z "$with_fallback" ; then
5631                         { { echo "$as_me:5631: error: You have disabled the database w/o specifying fallbacks" >&5
5632 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5633    { (exit 1); exit 1; }; }
5634                 fi
5635         fi
5636         cat >>confdefs.h <<\EOF
5637 #define PURE_TERMINFO 1
5638 EOF
5639
5640 else
5641
5642 if test "$with_ticlib" != no ; then
5643         { { echo "$as_me:5643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5644 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5645    { (exit 1); exit 1; }; }
5646 fi
5647
5648 cat >>confdefs.h <<\EOF
5649 #define USE_TERMCAP 1
5650 EOF
5651
5652 echo "$as_me:5652: checking for list of termcap files" >&5
5653 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5654
5655 # Check whether --with-termpath or --without-termpath was given.
5656 if test "${with_termpath+set}" = set; then
5657   withval="$with_termpath"
5658
5659 else
5660   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5661 fi;
5662 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5663 cf_dst_path=
5664 for cf_src_path in $withval
5665 do
5666
5667 if test "x$prefix" != xNONE; then
5668   cf_path_syntax="$prefix"
5669 else
5670   cf_path_syntax="$ac_default_prefix"
5671 fi
5672
5673 case ".$cf_src_path" in #(vi
5674 .\$\(*\)*|.\'*\'*) #(vi
5675   ;;
5676 ..|./*|.\\*) #(vi
5677   ;;
5678 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5679   ;;
5680 .\${*prefix}*) #(vi
5681   eval cf_src_path="$cf_src_path"
5682   case ".$cf_src_path" in #(vi
5683   .NONE/*)
5684     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5685     ;;
5686   esac
5687   ;; #(vi
5688 .no|.NONE/*)
5689   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5690   ;;
5691 *)
5692   { { echo "$as_me:5692: error: expected a pathname, not \"$cf_src_path\"" >&5
5693 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5694    { (exit 1); exit 1; }; }
5695   ;;
5696 esac
5697
5698   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5699   cf_dst_path="${cf_dst_path}${cf_src_path}"
5700 done
5701 IFS="$ac_save_ifs"
5702
5703 eval 'TERMPATH="$cf_dst_path"'
5704
5705 echo "$as_me:5705: result: $TERMPATH" >&5
5706 echo "${ECHO_T}$TERMPATH" >&6
5707 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5708 #define TERMPATH "$TERMPATH"
5709 EOF
5710
5711 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5712 echo "$as_me:5712: checking if fast termcap-loader is needed" >&5
5713 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5714
5715 # Check whether --enable-getcap or --disable-getcap was given.
5716 if test "${enable_getcap+set}" = set; then
5717   enableval="$enable_getcap"
5718   with_getcap=$enableval
5719 else
5720   with_getcap=no
5721 fi;
5722 echo "$as_me:5722: result: $with_getcap" >&5
5723 echo "${ECHO_T}$with_getcap" >&6
5724 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5725 #define USE_GETCAP 1
5726 EOF
5727
5728 echo "$as_me:5728: checking if translated termcaps will be cached in ~/.terminfo" >&5
5729 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5730
5731 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5732 if test "${enable_getcap_cache+set}" = set; then
5733   enableval="$enable_getcap_cache"
5734   with_getcap_cache=$enableval
5735 else
5736   with_getcap_cache=no
5737 fi;
5738 echo "$as_me:5738: result: $with_getcap_cache" >&5
5739 echo "${ECHO_T}$with_getcap_cache" >&6
5740 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5741 #define USE_GETCAP_CACHE 1
5742 EOF
5743
5744 fi
5745
5746 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5747 echo "$as_me:5747: checking if ~/.terminfo is wanted" >&5
5748 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5749
5750 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5751 if test "${enable_home_terminfo+set}" = set; then
5752   enableval="$enable_home_terminfo"
5753   with_home_terminfo=$enableval
5754 else
5755   with_home_terminfo=yes
5756 fi;
5757 echo "$as_me:5757: result: $with_home_terminfo" >&5
5758 echo "${ECHO_T}$with_home_terminfo" >&6
5759 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5760 #define USE_HOME_TERMINFO 1
5761 EOF
5762
5763 echo "$as_me:5763: checking if you want to use restricted environment when running as root" >&5
5764 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5765
5766 # Check whether --enable-root-environ or --disable-root-environ was given.
5767 if test "${enable_root_environ+set}" = set; then
5768   enableval="$enable_root_environ"
5769   with_root_environ=$enableval
5770 else
5771   with_root_environ=yes
5772 fi;
5773 echo "$as_me:5773: result: $with_root_environ" >&5
5774 echo "${ECHO_T}$with_root_environ" >&6
5775 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5776 #define USE_ROOT_ENVIRON 1
5777 EOF
5778
5779 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5780 ###   to reduce storage requirements for the terminfo database.
5781
5782 for ac_func in \
5783         remove \
5784         unlink
5785 do
5786 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5787 echo "$as_me:5787: checking for $ac_func" >&5
5788 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5789 if eval "test \"\${$as_ac_var+set}\" = set"; then
5790   echo $ECHO_N "(cached) $ECHO_C" >&6
5791 else
5792   cat >conftest.$ac_ext <<_ACEOF
5793 #line 5793 "configure"
5794 #include "confdefs.h"
5795 /* System header to define __stub macros and hopefully few prototypes,
5796     which can conflict with char $ac_func (); below.  */
5797 #include <assert.h>
5798 /* Override any gcc2 internal prototype to avoid an error.  */
5799 #ifdef __cplusplus
5800 extern "C"
5801 #endif
5802 /* We use char because int might match the return type of a gcc2
5803    builtin and then its argument prototype would still apply.  */
5804 char $ac_func ();
5805 char (*f) ();
5806
5807 int
5808 main ()
5809 {
5810 /* The GNU C library defines this for functions which it implements
5811     to always fail with ENOSYS.  Some functions are actually named
5812     something starting with __ and the normal name is an alias.  */
5813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5814 choke me
5815 #else
5816 f = $ac_func;
5817 #endif
5818
5819   ;
5820   return 0;
5821 }
5822 _ACEOF
5823 rm -f conftest.$ac_objext conftest$ac_exeext
5824 if { (eval echo "$as_me:5824: \"$ac_link\"") >&5
5825   (eval $ac_link) 2>&5
5826   ac_status=$?
5827   echo "$as_me:5827: \$? = $ac_status" >&5
5828   (exit $ac_status); } &&
5829          { ac_try='test -s conftest$ac_exeext'
5830   { (eval echo "$as_me:5830: \"$ac_try\"") >&5
5831   (eval $ac_try) 2>&5
5832   ac_status=$?
5833   echo "$as_me:5833: \$? = $ac_status" >&5
5834   (exit $ac_status); }; }; then
5835   eval "$as_ac_var=yes"
5836 else
5837   echo "$as_me: failed program was:" >&5
5838 cat conftest.$ac_ext >&5
5839 eval "$as_ac_var=no"
5840 fi
5841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5842 fi
5843 echo "$as_me:5843: result: `eval echo '${'$as_ac_var'}'`" >&5
5844 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5845 if test `eval echo '${'$as_ac_var'}'` = yes; then
5846   cat >>confdefs.h <<EOF
5847 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5848 EOF
5849
5850 fi
5851 done
5852
5853 if test "$cross_compiling" = yes ; then
5854
5855 for ac_func in \
5856                 link \
5857                 symlink
5858 do
5859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5860 echo "$as_me:5860: checking for $ac_func" >&5
5861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5862 if eval "test \"\${$as_ac_var+set}\" = set"; then
5863   echo $ECHO_N "(cached) $ECHO_C" >&6
5864 else
5865   cat >conftest.$ac_ext <<_ACEOF
5866 #line 5866 "configure"
5867 #include "confdefs.h"
5868 /* System header to define __stub macros and hopefully few prototypes,
5869     which can conflict with char $ac_func (); below.  */
5870 #include <assert.h>
5871 /* Override any gcc2 internal prototype to avoid an error.  */
5872 #ifdef __cplusplus
5873 extern "C"
5874 #endif
5875 /* We use char because int might match the return type of a gcc2
5876    builtin and then its argument prototype would still apply.  */
5877 char $ac_func ();
5878 char (*f) ();
5879
5880 int
5881 main ()
5882 {
5883 /* The GNU C library defines this for functions which it implements
5884     to always fail with ENOSYS.  Some functions are actually named
5885     something starting with __ and the normal name is an alias.  */
5886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5887 choke me
5888 #else
5889 f = $ac_func;
5890 #endif
5891
5892   ;
5893   return 0;
5894 }
5895 _ACEOF
5896 rm -f conftest.$ac_objext conftest$ac_exeext
5897 if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
5898   (eval $ac_link) 2>&5
5899   ac_status=$?
5900   echo "$as_me:5900: \$? = $ac_status" >&5
5901   (exit $ac_status); } &&
5902          { ac_try='test -s conftest$ac_exeext'
5903   { (eval echo "$as_me:5903: \"$ac_try\"") >&5
5904   (eval $ac_try) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit $ac_status); }; }; then
5908   eval "$as_ac_var=yes"
5909 else
5910   echo "$as_me: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 eval "$as_ac_var=no"
5913 fi
5914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5915 fi
5916 echo "$as_me:5916: result: `eval echo '${'$as_ac_var'}'`" >&5
5917 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5918 if test `eval echo '${'$as_ac_var'}'` = yes; then
5919   cat >>confdefs.h <<EOF
5920 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5921 EOF
5922
5923 fi
5924 done
5925
5926 else
5927         echo "$as_me:5927: checking if link/symlink functions work" >&5
5928 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5929 if test "${cf_cv_link_funcs+set}" = set; then
5930   echo $ECHO_N "(cached) $ECHO_C" >&6
5931 else
5932
5933                 cf_cv_link_funcs=
5934                 for cf_func in link symlink ; do
5935                         if test "$cross_compiling" = yes; then
5936
5937                         eval 'ac_cv_func_'$cf_func'=error'
5938 else
5939   cat >conftest.$ac_ext <<_ACEOF
5940 #line 5940 "configure"
5941 #include "confdefs.h"
5942
5943 #include <sys/types.h>
5944 #include <sys/stat.h>
5945 #ifdef HAVE_UNISTD_H
5946 #include <unistd.h>
5947 #endif
5948 int main()
5949 {
5950         int fail = 0;
5951         char *src = "config.log";
5952         char *dst = "conftest.chk";
5953         struct stat src_sb;
5954         struct stat dst_sb;
5955
5956         stat(src, &src_sb);
5957         fail = ($cf_func("config.log", "conftest.chk") < 0)
5958             || (stat(dst, &dst_sb) < 0)
5959             || (dst_sb.st_mtime != src_sb.st_mtime);
5960 #ifdef HAVE_UNLINK
5961         unlink(dst);
5962 #else
5963         remove(dst);
5964 #endif
5965         ${cf_cv_main_return:-return} (fail);
5966 }
5967
5968 _ACEOF
5969 rm -f conftest$ac_exeext
5970 if { (eval echo "$as_me:5970: \"$ac_link\"") >&5
5971   (eval $ac_link) 2>&5
5972   ac_status=$?
5973   echo "$as_me:5973: \$? = $ac_status" >&5
5974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5975   { (eval echo "$as_me:5975: \"$ac_try\"") >&5
5976   (eval $ac_try) 2>&5
5977   ac_status=$?
5978   echo "$as_me:5978: \$? = $ac_status" >&5
5979   (exit $ac_status); }; }; then
5980
5981                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5982                         eval 'ac_cv_func_'$cf_func'=yes'
5983 else
5984   echo "$as_me: program exited with status $ac_status" >&5
5985 echo "$as_me: failed program was:" >&5
5986 cat conftest.$ac_ext >&5
5987
5988                         eval 'ac_cv_func_'$cf_func'=no'
5989 fi
5990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5991 fi
5992                 done
5993                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5994
5995 fi
5996 echo "$as_me:5996: result: $cf_cv_link_funcs" >&5
5997 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5998         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5999 #define HAVE_LINK 1
6000 EOF
6001
6002         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6003 #define HAVE_SYMLINK 1
6004 EOF
6005
6006 fi
6007
6008 with_links=no
6009 with_symlinks=no
6010
6011 # soft links (symbolic links) are useful for some systems where hard links do
6012 # not work, or to make it simpler to copy terminfo trees around.
6013 if test "$ac_cv_func_symlink" = yes ; then
6014     echo "$as_me:6014: checking if tic should use symbolic links" >&5
6015 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6016
6017 # Check whether --enable-symlinks or --disable-symlinks was given.
6018 if test "${enable_symlinks+set}" = set; then
6019   enableval="$enable_symlinks"
6020   with_symlinks=$enableval
6021 else
6022   with_symlinks=no
6023 fi;
6024     echo "$as_me:6024: result: $with_symlinks" >&5
6025 echo "${ECHO_T}$with_symlinks" >&6
6026 fi
6027
6028 # If we have hard links and did not choose to use soft links instead, there is
6029 # no reason to make this choice optional - use the hard links.
6030 if test "$with_symlinks" = no ; then
6031     echo "$as_me:6031: checking if tic should use hard links" >&5
6032 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6033     if test "$ac_cv_func_link" = yes ; then
6034         with_links=yes
6035     else
6036         with_links=no
6037     fi
6038     echo "$as_me:6038: result: $with_links" >&5
6039 echo "${ECHO_T}$with_links" >&6
6040 fi
6041
6042 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6043 #define USE_LINKS 1
6044 EOF
6045
6046 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6047 #define USE_SYMLINKS 1
6048 EOF
6049
6050 ###   use option --enable-broken-linker to force on use of broken-linker support
6051 echo "$as_me:6051: checking if you want broken-linker support code" >&5
6052 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6053
6054 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6055 if test "${enable_broken_linker+set}" = set; then
6056   enableval="$enable_broken_linker"
6057   with_broken_linker=$enableval
6058 else
6059   with_broken_linker=${BROKEN_LINKER-no}
6060 fi;
6061 echo "$as_me:6061: result: $with_broken_linker" >&5
6062 echo "${ECHO_T}$with_broken_linker" >&6
6063
6064 BROKEN_LINKER=0
6065 if test "$with_broken_linker" = yes ; then
6066         cat >>confdefs.h <<\EOF
6067 #define BROKEN_LINKER 1
6068 EOF
6069
6070         BROKEN_LINKER=1
6071 elif test "$DFT_LWR_MODEL" = shared ; then
6072         case $cf_cv_system_name in #(vi
6073         cygwin*)
6074                 cat >>confdefs.h <<\EOF
6075 #define BROKEN_LINKER 1
6076 EOF
6077
6078                 BROKEN_LINKER=1
6079                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6080
6081 echo "${as_me-configure}:6081: testing cygwin linker is broken anyway ..." 1>&5
6082
6083                 ;;
6084         esac
6085 fi
6086
6087 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6088 echo "$as_me:6088: checking if tputs should process BSD-style prefix padding" >&5
6089 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6090
6091 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6092 if test "${enable_bsdpad+set}" = set; then
6093   enableval="$enable_bsdpad"
6094   with_bsdpad=$enableval
6095 else
6096   with_bsdpad=no
6097 fi;
6098 echo "$as_me:6098: result: $with_bsdpad" >&5
6099 echo "${ECHO_T}$with_bsdpad" >&6
6100 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6101 #define BSD_TPUTS 1
6102 EOF
6103
6104 ###   use option --enable-widec to turn on use of wide-character support
6105 NCURSES_CH_T=chtype
6106 NCURSES_LIBUTF8=0
6107
6108 NEED_WCHAR_H=0
6109 NCURSES_MBSTATE_T=0
6110 NCURSES_WCHAR_T=0
6111 NCURSES_WINT_T=0
6112
6113 # Check to define _XOPEN_SOURCE "automatically"
6114
6115 echo "$as_me:6115: checking if $CC -U and -D options work together" >&5
6116 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6117 if test "${cf_cv_cc_u_d_options+set}" = set; then
6118   echo $ECHO_N "(cached) $ECHO_C" >&6
6119 else
6120
6121         cf_save_CPPFLAGS="$CPPFLAGS"
6122         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6123         cat >conftest.$ac_ext <<_ACEOF
6124 #line 6124 "configure"
6125 #include "confdefs.h"
6126
6127 int
6128 main ()
6129 {
6130
6131 #ifndef U_D_OPTIONS
6132 make an undefined-error
6133 #endif
6134 #ifdef  D_U_OPTIONS
6135 make a defined-error
6136 #endif
6137
6138   ;
6139   return 0;
6140 }
6141 _ACEOF
6142 rm -f conftest.$ac_objext
6143 if { (eval echo "$as_me:6143: \"$ac_compile\"") >&5
6144   (eval $ac_compile) 2>&5
6145   ac_status=$?
6146   echo "$as_me:6146: \$? = $ac_status" >&5
6147   (exit $ac_status); } &&
6148          { ac_try='test -s conftest.$ac_objext'
6149   { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6150   (eval $ac_try) 2>&5
6151   ac_status=$?
6152   echo "$as_me:6152: \$? = $ac_status" >&5
6153   (exit $ac_status); }; }; then
6154
6155         cf_cv_cc_u_d_options=yes
6156 else
6157   echo "$as_me: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6159
6160         cf_cv_cc_u_d_options=no
6161 fi
6162 rm -f conftest.$ac_objext conftest.$ac_ext
6163         CPPFLAGS="$cf_save_CPPFLAGS"
6164
6165 fi
6166 echo "$as_me:6166: result: $cf_cv_cc_u_d_options" >&5
6167 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6168
6169 cf_XOPEN_SOURCE=500
6170 cf_POSIX_C_SOURCE=199506L
6171
6172 case $host_os in #(vi
6173 aix[45]*) #(vi
6174         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6175         ;;
6176 freebsd*) #(vi
6177         # 5.x headers associate
6178         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6179         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6180         cf_POSIX_C_SOURCE=200112L
6181         cf_XOPEN_SOURCE=600
6182         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6183         ;;
6184 hpux*) #(vi
6185         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6186         ;;
6187 irix[56].*) #(vi
6188         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6189         ;;
6190 linux*|gnu*|k*bsd*-gnu) #(vi
6191
6192 echo "$as_me:6192: checking if we must define _GNU_SOURCE" >&5
6193 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6194 if test "${cf_cv_gnu_source+set}" = set; then
6195   echo $ECHO_N "(cached) $ECHO_C" >&6
6196 else
6197
6198 cat >conftest.$ac_ext <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201 #include <sys/types.h>
6202 int
6203 main ()
6204 {
6205
6206 #ifndef _XOPEN_SOURCE
6207 make an error
6208 #endif
6209   ;
6210   return 0;
6211 }
6212 _ACEOF
6213 rm -f conftest.$ac_objext
6214 if { (eval echo "$as_me:6214: \"$ac_compile\"") >&5
6215   (eval $ac_compile) 2>&5
6216   ac_status=$?
6217   echo "$as_me:6217: \$? = $ac_status" >&5
6218   (exit $ac_status); } &&
6219          { ac_try='test -s conftest.$ac_objext'
6220   { (eval echo "$as_me:6220: \"$ac_try\"") >&5
6221   (eval $ac_try) 2>&5
6222   ac_status=$?
6223   echo "$as_me:6223: \$? = $ac_status" >&5
6224   (exit $ac_status); }; }; then
6225   cf_cv_gnu_source=no
6226 else
6227   echo "$as_me: failed program was:" >&5
6228 cat conftest.$ac_ext >&5
6229 cf_save="$CPPFLAGS"
6230          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6231          cat >conftest.$ac_ext <<_ACEOF
6232 #line 6232 "configure"
6233 #include "confdefs.h"
6234 #include <sys/types.h>
6235 int
6236 main ()
6237 {
6238
6239 #ifdef _XOPEN_SOURCE
6240 make an error
6241 #endif
6242   ;
6243   return 0;
6244 }
6245 _ACEOF
6246 rm -f conftest.$ac_objext
6247 if { (eval echo "$as_me:6247: \"$ac_compile\"") >&5
6248   (eval $ac_compile) 2>&5
6249   ac_status=$?
6250   echo "$as_me:6250: \$? = $ac_status" >&5
6251   (exit $ac_status); } &&
6252          { ac_try='test -s conftest.$ac_objext'
6253   { (eval echo "$as_me:6253: \"$ac_try\"") >&5
6254   (eval $ac_try) 2>&5
6255   ac_status=$?
6256   echo "$as_me:6256: \$? = $ac_status" >&5
6257   (exit $ac_status); }; }; then
6258   cf_cv_gnu_source=no
6259 else
6260   echo "$as_me: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6262 cf_cv_gnu_source=yes
6263 fi
6264 rm -f conftest.$ac_objext conftest.$ac_ext
6265         CPPFLAGS="$cf_save"
6266
6267 fi
6268 rm -f conftest.$ac_objext conftest.$ac_ext
6269
6270 fi
6271 echo "$as_me:6271: result: $cf_cv_gnu_source" >&5
6272 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6273 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6274
6275         ;;
6276 mirbsd*) #(vi
6277         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6278         ;;
6279 netbsd*) #(vi
6280         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6281         ;;
6282 openbsd*) #(vi
6283         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6284         ;;
6285 osf[45]*) #(vi
6286         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6287         ;;
6288 nto-qnx*) #(vi
6289         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6290         ;;
6291 sco*) #(vi
6292         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6293         ;;
6294 solaris*) #(vi
6295         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6296         ;;
6297 *)
6298         echo "$as_me:6298: checking if we should define _XOPEN_SOURCE" >&5
6299 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6300 if test "${cf_cv_xopen_source+set}" = set; then
6301   echo $ECHO_N "(cached) $ECHO_C" >&6
6302 else
6303
6304         cat >conftest.$ac_ext <<_ACEOF
6305 #line 6305 "configure"
6306 #include "confdefs.h"
6307 #include <sys/types.h>
6308 int
6309 main ()
6310 {
6311
6312 #ifndef _XOPEN_SOURCE
6313 make an error
6314 #endif
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 rm -f conftest.$ac_objext
6320 if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5
6321   (eval $ac_compile) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit $ac_status); } &&
6325          { ac_try='test -s conftest.$ac_objext'
6326   { (eval echo "$as_me:6326: \"$ac_try\"") >&5
6327   (eval $ac_try) 2>&5
6328   ac_status=$?
6329   echo "$as_me:6329: \$? = $ac_status" >&5
6330   (exit $ac_status); }; }; then
6331   cf_cv_xopen_source=no
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6335 cf_save="$CPPFLAGS"
6336          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6337          cat >conftest.$ac_ext <<_ACEOF
6338 #line 6338 "configure"
6339 #include "confdefs.h"
6340 #include <sys/types.h>
6341 int
6342 main ()
6343 {
6344
6345 #ifdef _XOPEN_SOURCE
6346 make an error
6347 #endif
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext
6353 if { (eval echo "$as_me:6353: \"$ac_compile\"") >&5
6354   (eval $ac_compile) 2>&5
6355   ac_status=$?
6356   echo "$as_me:6356: \$? = $ac_status" >&5
6357   (exit $ac_status); } &&
6358          { ac_try='test -s conftest.$ac_objext'
6359   { (eval echo "$as_me:6359: \"$ac_try\"") >&5
6360   (eval $ac_try) 2>&5
6361   ac_status=$?
6362   echo "$as_me:6362: \$? = $ac_status" >&5
6363   (exit $ac_status); }; }; then
6364   cf_cv_xopen_source=no
6365 else
6366   echo "$as_me: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6369 fi
6370 rm -f conftest.$ac_objext conftest.$ac_ext
6371         CPPFLAGS="$cf_save"
6372
6373 fi
6374 rm -f conftest.$ac_objext conftest.$ac_ext
6375
6376 fi
6377 echo "$as_me:6377: result: $cf_cv_xopen_source" >&5
6378 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6379         if test "$cf_cv_xopen_source" != no ; then
6380
6381 # remove _XOPEN_SOURCE symbol from $CFLAGS
6382 CFLAGS=`echo "$CFLAGS" | \
6383         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6384                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6385
6386 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6387 CPPFLAGS=`echo "$CPPFLAGS" | \
6388         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6389                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6390
6391                 test "$cf_cv_cc_u_d_options" = yes && \
6392                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6393                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6394         fi
6395
6396 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6397
6398 cf_save_CFLAGS="$CFLAGS"
6399 cf_save_CPPFLAGS="$CPPFLAGS"
6400
6401 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6402 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6403         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6404                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6405
6406 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6407 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6408         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6409                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6410
6411 echo "$as_me:6411: checking if we should define _POSIX_C_SOURCE" >&5
6412 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6413 if test "${cf_cv_posix_c_source+set}" = set; then
6414   echo $ECHO_N "(cached) $ECHO_C" >&6
6415 else
6416
6417 echo "${as_me-configure}:6417: testing if the symbol is already defined go no further ..." 1>&5
6418
6419         cat >conftest.$ac_ext <<_ACEOF
6420 #line 6420 "configure"
6421 #include "confdefs.h"
6422 #include <sys/types.h>
6423 int
6424 main ()
6425 {
6426
6427 #ifndef _POSIX_C_SOURCE
6428 make an error
6429 #endif
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
6436   (eval $ac_compile) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest.$ac_objext'
6441   { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446   cf_cv_posix_c_source=no
6447 else
6448   echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6450 cf_want_posix_source=no
6451          case .$cf_POSIX_C_SOURCE in #(vi
6452          .[12]??*) #(vi
6453                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6454                 ;;
6455          .2) #(vi
6456                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6457                 cf_want_posix_source=yes
6458                 ;;
6459          .*)
6460                 cf_want_posix_source=yes
6461                 ;;
6462          esac
6463          if test "$cf_want_posix_source" = yes ; then
6464                 cat >conftest.$ac_ext <<_ACEOF
6465 #line 6465 "configure"
6466 #include "confdefs.h"
6467 #include <sys/types.h>
6468 int
6469 main ()
6470 {
6471
6472 #ifdef _POSIX_SOURCE
6473 make an error
6474 #endif
6475   ;
6476   return 0;
6477 }
6478 _ACEOF
6479 rm -f conftest.$ac_objext
6480 if { (eval echo "$as_me:6480: \"$ac_compile\"") >&5
6481   (eval $ac_compile) 2>&5
6482   ac_status=$?
6483   echo "$as_me:6483: \$? = $ac_status" >&5
6484   (exit $ac_status); } &&
6485          { ac_try='test -s conftest.$ac_objext'
6486   { (eval echo "$as_me:6486: \"$ac_try\"") >&5
6487   (eval $ac_try) 2>&5
6488   ac_status=$?
6489   echo "$as_me:6489: \$? = $ac_status" >&5
6490   (exit $ac_status); }; }; then
6491   :
6492 else
6493   echo "$as_me: failed program was:" >&5
6494 cat conftest.$ac_ext >&5
6495 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6496 fi
6497 rm -f conftest.$ac_objext conftest.$ac_ext
6498          fi
6499
6500 echo "${as_me-configure}:6500: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6501
6502          CFLAGS="$cf_trim_CFLAGS"
6503          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6504
6505 echo "${as_me-configure}:6505: testing if the second compile does not leave our definition intact error ..." 1>&5
6506
6507          cat >conftest.$ac_ext <<_ACEOF
6508 #line 6508 "configure"
6509 #include "confdefs.h"
6510 #include <sys/types.h>
6511 int
6512 main ()
6513 {
6514
6515 #ifndef _POSIX_C_SOURCE
6516 make an error
6517 #endif
6518   ;
6519   return 0;
6520 }
6521 _ACEOF
6522 rm -f conftest.$ac_objext
6523 if { (eval echo "$as_me:6523: \"$ac_compile\"") >&5
6524   (eval $ac_compile) 2>&5
6525   ac_status=$?
6526   echo "$as_me:6526: \$? = $ac_status" >&5
6527   (exit $ac_status); } &&
6528          { ac_try='test -s conftest.$ac_objext'
6529   { (eval echo "$as_me:6529: \"$ac_try\"") >&5
6530   (eval $ac_try) 2>&5
6531   ac_status=$?
6532   echo "$as_me:6532: \$? = $ac_status" >&5
6533   (exit $ac_status); }; }; then
6534   :
6535 else
6536   echo "$as_me: failed program was:" >&5
6537 cat conftest.$ac_ext >&5
6538 cf_cv_posix_c_source=no
6539 fi
6540 rm -f conftest.$ac_objext conftest.$ac_ext
6541          CFLAGS="$cf_save_CFLAGS"
6542          CPPFLAGS="$cf_save_CPPFLAGS"
6543
6544 fi
6545 rm -f conftest.$ac_objext conftest.$ac_ext
6546
6547 fi
6548 echo "$as_me:6548: result: $cf_cv_posix_c_source" >&5
6549 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6550
6551 if test "$cf_cv_posix_c_source" != no ; then
6552         CFLAGS="$cf_trim_CFLAGS"
6553         CPPFLAGS="$cf_trim_CPPFLAGS"
6554         if test "$cf_cv_cc_u_d_options" = yes ; then
6555                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6556                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6557                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6558         fi
6559         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6560 fi
6561
6562         ;;
6563 esac
6564
6565 # Work around breakage on OS X
6566
6567 echo "$as_me:6567: checking if SIGWINCH is defined" >&5
6568 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6569 if test "${cf_cv_define_sigwinch+set}" = set; then
6570   echo $ECHO_N "(cached) $ECHO_C" >&6
6571 else
6572
6573         cat >conftest.$ac_ext <<_ACEOF
6574 #line 6574 "configure"
6575 #include "confdefs.h"
6576
6577 #include <sys/types.h>
6578 #include <sys/signal.h>
6579
6580 int
6581 main ()
6582 {
6583 int x = SIGWINCH
6584   ;
6585   return 0;
6586 }
6587 _ACEOF
6588 rm -f conftest.$ac_objext
6589 if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5
6590   (eval $ac_compile) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); } &&
6594          { ac_try='test -s conftest.$ac_objext'
6595   { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6596   (eval $ac_try) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); }; }; then
6600   cf_cv_define_sigwinch=yes
6601 else
6602   echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 cat >conftest.$ac_ext <<_ACEOF
6605 #line 6605 "configure"
6606 #include "confdefs.h"
6607
6608 #undef _XOPEN_SOURCE
6609 #undef _POSIX_SOURCE
6610 #undef _POSIX_C_SOURCE
6611 #include <sys/types.h>
6612 #include <sys/signal.h>
6613
6614 int
6615 main ()
6616 {
6617 int x = SIGWINCH
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 rm -f conftest.$ac_objext
6623 if { (eval echo "$as_me:6623: \"$ac_compile\"") >&5
6624   (eval $ac_compile) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); } &&
6628          { ac_try='test -s conftest.$ac_objext'
6629   { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:6632: \$? = $ac_status" >&5
6633   (exit $ac_status); }; }; then
6634   cf_cv_define_sigwinch=maybe
6635 else
6636   echo "$as_me: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 cf_cv_define_sigwinch=no
6639 fi
6640 rm -f conftest.$ac_objext conftest.$ac_ext
6641
6642 fi
6643 rm -f conftest.$ac_objext conftest.$ac_ext
6644
6645 fi
6646 echo "$as_me:6646: result: $cf_cv_define_sigwinch" >&5
6647 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6648
6649 if test "$cf_cv_define_sigwinch" = maybe ; then
6650 echo "$as_me:6650: checking for actual SIGWINCH definition" >&5
6651 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6652 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6653   echo $ECHO_N "(cached) $ECHO_C" >&6
6654 else
6655
6656 cf_cv_fixup_sigwinch=unknown
6657 cf_sigwinch=32
6658 while test $cf_sigwinch != 1
6659 do
6660         cat >conftest.$ac_ext <<_ACEOF
6661 #line 6661 "configure"
6662 #include "confdefs.h"
6663
6664 #undef _XOPEN_SOURCE
6665 #undef _POSIX_SOURCE
6666 #undef _POSIX_C_SOURCE
6667 #include <sys/types.h>
6668 #include <sys/signal.h>
6669
6670 int
6671 main ()
6672 {
6673
6674 #if SIGWINCH != $cf_sigwinch
6675 make an error
6676 #endif
6677 int x = SIGWINCH
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext
6683 if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
6684   (eval $ac_compile) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } &&
6688          { ac_try='test -s conftest.$ac_objext'
6689   { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690   (eval $ac_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }; }; then
6694   cf_cv_fixup_sigwinch=$cf_sigwinch
6695          break
6696 else
6697   echo "$as_me: failed program was:" >&5
6698 cat conftest.$ac_ext >&5
6699 fi
6700 rm -f conftest.$ac_objext conftest.$ac_ext
6701
6702 cf_sigwinch=`expr $cf_sigwinch - 1`
6703 done
6704
6705 fi
6706 echo "$as_me:6706: result: $cf_cv_fixup_sigwinch" >&5
6707 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6708
6709         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6710                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6711         fi
6712 fi
6713
6714 # Checks for CODESET support.
6715
6716   echo "$as_me:6716: checking for nl_langinfo and CODESET" >&5
6717 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6718 if test "${am_cv_langinfo_codeset+set}" = set; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721   cat >conftest.$ac_ext <<_ACEOF
6722 #line 6722 "configure"
6723 #include "confdefs.h"
6724 #include <langinfo.h>
6725 int
6726 main ()
6727 {
6728 char* cs = nl_langinfo(CODESET);
6729   ;
6730   return 0;
6731 }
6732 _ACEOF
6733 rm -f conftest.$ac_objext conftest$ac_exeext
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735   (eval $ac_link) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit $ac_status); } &&
6739          { ac_try='test -s conftest$ac_exeext'
6740   { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); }; }; then
6745   am_cv_langinfo_codeset=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6749 am_cv_langinfo_codeset=no
6750 fi
6751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6752
6753 fi
6754 echo "$as_me:6754: result: $am_cv_langinfo_codeset" >&5
6755 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6756   if test $am_cv_langinfo_codeset = yes; then
6757
6758 cat >>confdefs.h <<\EOF
6759 #define HAVE_LANGINFO_CODESET 1
6760 EOF
6761
6762   fi
6763
6764 # use these variables to work around a defect in gcc's fixincludes.
6765 NCURSES_OK_WCHAR_T=
6766 NCURSES_OK_WINT_T=
6767
6768 echo "$as_me:6768: checking if you want wide-character code" >&5
6769 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6770
6771 # Check whether --enable-widec or --disable-widec was given.
6772 if test "${enable_widec+set}" = set; then
6773   enableval="$enable_widec"
6774   with_widec=$enableval
6775 else
6776   with_widec=no
6777 fi;
6778 echo "$as_me:6778: result: $with_widec" >&5
6779 echo "${ECHO_T}$with_widec" >&6
6780 if test "$with_widec" = yes ; then
6781         LIB_SUFFIX="w${LIB_SUFFIX}"
6782         cat >>confdefs.h <<\EOF
6783 #define USE_WIDEC_SUPPORT 1
6784 EOF
6785
6786 echo "$as_me:6786: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6787 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6788 cat >conftest.$ac_ext <<_ACEOF
6789 #line 6789 "configure"
6790 #include "confdefs.h"
6791 #include <sys/types.h>
6792
6793 int
6794 main ()
6795 {
6796
6797 #ifndef _XOPEN_SOURCE_EXTENDED
6798 make an error
6799 #endif
6800   ;
6801   return 0;
6802 }
6803 _ACEOF
6804 rm -f conftest.$ac_objext
6805 if { (eval echo "$as_me:6805: \"$ac_compile\"") >&5
6806   (eval $ac_compile) 2>&5
6807   ac_status=$?
6808   echo "$as_me:6808: \$? = $ac_status" >&5
6809   (exit $ac_status); } &&
6810          { ac_try='test -s conftest.$ac_objext'
6811   { (eval echo "$as_me:6811: \"$ac_try\"") >&5
6812   (eval $ac_try) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit $ac_status); }; }; then
6816   cf_result=no
6817 else
6818   echo "$as_me: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6820 cf_result=yes
6821 fi
6822 rm -f conftest.$ac_objext conftest.$ac_ext
6823 echo "$as_me:6823: result: $cf_result" >&5
6824 echo "${ECHO_T}$cf_result" >&6
6825
6826 if test "$cf_result" = yes ; then
6827         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6828 elif test "x" != "x" ; then
6829         echo "$as_me:6829: checking checking for compatible value versus " >&5
6830 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6831         cat >conftest.$ac_ext <<_ACEOF
6832 #line 6832 "configure"
6833 #include "confdefs.h"
6834 #include <sys/types.h>
6835
6836 int
6837 main ()
6838 {
6839
6840 #if _XOPEN_SOURCE_EXTENDED- < 0
6841 make an error
6842 #endif
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext
6848 if { (eval echo "$as_me:6848: \"$ac_compile\"") >&5
6849   (eval $ac_compile) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest.$ac_objext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   cf_result=yes
6860 else
6861   echo "$as_me: failed program was:" >&5
6862 cat conftest.$ac_ext >&5
6863 cf_result=no
6864 fi
6865 rm -f conftest.$ac_objext conftest.$ac_ext
6866         echo "$as_me:6866: result: $cf_result" >&5
6867 echo "${ECHO_T}$cf_result" >&6
6868         if test "$cf_result" = no ; then
6869                 # perhaps we can override it - try...
6870                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6871         fi
6872 fi
6873
6874         # with_overwrite=no
6875         NCURSES_CH_T=cchar_t
6876
6877 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6878 do
6879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6880 echo "$as_me:6880: checking for $ac_func" >&5
6881 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6882 if eval "test \"\${$as_ac_var+set}\" = set"; then
6883   echo $ECHO_N "(cached) $ECHO_C" >&6
6884 else
6885   cat >conftest.$ac_ext <<_ACEOF
6886 #line 6886 "configure"
6887 #include "confdefs.h"
6888 /* System header to define __stub macros and hopefully few prototypes,
6889     which can conflict with char $ac_func (); below.  */
6890 #include <assert.h>
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 #ifdef __cplusplus
6893 extern "C"
6894 #endif
6895 /* We use char because int might match the return type of a gcc2
6896    builtin and then its argument prototype would still apply.  */
6897 char $ac_func ();
6898 char (*f) ();
6899
6900 int
6901 main ()
6902 {
6903 /* The GNU C library defines this for functions which it implements
6904     to always fail with ENOSYS.  Some functions are actually named
6905     something starting with __ and the normal name is an alias.  */
6906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6907 choke me
6908 #else
6909 f = $ac_func;
6910 #endif
6911
6912   ;
6913   return 0;
6914 }
6915 _ACEOF
6916 rm -f conftest.$ac_objext conftest$ac_exeext
6917 if { (eval echo "$as_me:6917: \"$ac_link\"") >&5
6918   (eval $ac_link) 2>&5
6919   ac_status=$?
6920   echo "$as_me:6920: \$? = $ac_status" >&5
6921   (exit $ac_status); } &&
6922          { ac_try='test -s conftest$ac_exeext'
6923   { (eval echo "$as_me:6923: \"$ac_try\"") >&5
6924   (eval $ac_try) 2>&5
6925   ac_status=$?
6926   echo "$as_me:6926: \$? = $ac_status" >&5
6927   (exit $ac_status); }; }; then
6928   eval "$as_ac_var=yes"
6929 else
6930   echo "$as_me: failed program was:" >&5
6931 cat conftest.$ac_ext >&5
6932 eval "$as_ac_var=no"
6933 fi
6934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6935 fi
6936 echo "$as_me:6936: result: `eval echo '${'$as_ac_var'}'`" >&5
6937 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6938 if test `eval echo '${'$as_ac_var'}'` = yes; then
6939   cat >>confdefs.h <<EOF
6940 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6941 EOF
6942
6943 fi
6944 done
6945
6946         if test "$ac_cv_func_putwc" != yes ; then
6947
6948 echo "$as_me:6948: checking for putwc in libutf8" >&5
6949 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6950 if test "${cf_cv_libutf8+set}" = set; then
6951   echo $ECHO_N "(cached) $ECHO_C" >&6
6952 else
6953
6954         cf_save_LIBS="$LIBS"
6955         LIBS="-lutf8 $LIBS"
6956 cat >conftest.$ac_ext <<_ACEOF
6957 #line 6957 "configure"
6958 #include "confdefs.h"
6959
6960 #include <libutf8.h>
6961 int
6962 main ()
6963 {
6964 putwc(0,0);
6965   ;
6966   return 0;
6967 }
6968 _ACEOF
6969 rm -f conftest.$ac_objext conftest$ac_exeext
6970 if { (eval echo "$as_me:6970: \"$ac_link\"") >&5
6971   (eval $ac_link) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); } &&
6975          { ac_try='test -s conftest$ac_exeext'
6976   { (eval echo "$as_me:6976: \"$ac_try\"") >&5
6977   (eval $ac_try) 2>&5
6978   ac_status=$?
6979   echo "$as_me:6979: \$? = $ac_status" >&5
6980   (exit $ac_status); }; }; then
6981   cf_cv_libutf8=yes
6982 else
6983   echo "$as_me: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 cf_cv_libutf8=no
6986 fi
6987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6988         LIBS="$cf_save_LIBS"
6989
6990 fi
6991 echo "$as_me:6991: result: $cf_cv_libutf8" >&5
6992 echo "${ECHO_T}$cf_cv_libutf8" >&6
6993
6994 if test "$cf_cv_libutf8" = yes ; then
6995         cat >>confdefs.h <<\EOF
6996 #define HAVE_LIBUTF8_H 1
6997 EOF
6998
6999         LIBS="-lutf8 $LIBS"
7000 fi
7001
7002                 if test "$cf_cv_libutf8" = yes ; then
7003                         NCURSES_LIBUTF8=1
7004                 fi
7005         fi
7006
7007 # This is needed on Tru64 5.0 to declare mbstate_t
7008 echo "$as_me:7008: checking if we must include wchar.h to declare mbstate_t" >&5
7009 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7010 if test "${cf_cv_mbstate_t+set}" = set; then
7011   echo $ECHO_N "(cached) $ECHO_C" >&6
7012 else
7013
7014 cat >conftest.$ac_ext <<_ACEOF
7015 #line 7015 "configure"
7016 #include "confdefs.h"
7017
7018 #include <stdlib.h>
7019 #include <stdarg.h>
7020 #include <stdio.h>
7021 #ifdef HAVE_LIBUTF8_H
7022 #include <libutf8.h>
7023 #endif
7024 int
7025 main ()
7026 {
7027 mbstate_t state
7028   ;
7029   return 0;
7030 }
7031 _ACEOF
7032 rm -f conftest.$ac_objext
7033 if { (eval echo "$as_me:7033: \"$ac_compile\"") >&5
7034   (eval $ac_compile) 2>&5
7035   ac_status=$?
7036   echo "$as_me:7036: \$? = $ac_status" >&5
7037   (exit $ac_status); } &&
7038          { ac_try='test -s conftest.$ac_objext'
7039   { (eval echo "$as_me:7039: \"$ac_try\"") >&5
7040   (eval $ac_try) 2>&5
7041   ac_status=$?
7042   echo "$as_me:7042: \$? = $ac_status" >&5
7043   (exit $ac_status); }; }; then
7044   cf_cv_mbstate_t=no
7045 else
7046   echo "$as_me: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7048 cat >conftest.$ac_ext <<_ACEOF
7049 #line 7049 "configure"
7050 #include "confdefs.h"
7051
7052 #include <stdlib.h>
7053 #include <stdarg.h>
7054 #include <stdio.h>
7055 #include <wchar.h>
7056 #ifdef HAVE_LIBUTF8_H
7057 #include <libutf8.h>
7058 #endif
7059 int
7060 main ()
7061 {
7062 mbstate_t value
7063   ;
7064   return 0;
7065 }
7066 _ACEOF
7067 rm -f conftest.$ac_objext
7068 if { (eval echo "$as_me:7068: \"$ac_compile\"") >&5
7069   (eval $ac_compile) 2>&5
7070   ac_status=$?
7071   echo "$as_me:7071: \$? = $ac_status" >&5
7072   (exit $ac_status); } &&
7073          { ac_try='test -s conftest.$ac_objext'
7074   { (eval echo "$as_me:7074: \"$ac_try\"") >&5
7075   (eval $ac_try) 2>&5
7076   ac_status=$?
7077   echo "$as_me:7077: \$? = $ac_status" >&5
7078   (exit $ac_status); }; }; then
7079   cf_cv_mbstate_t=yes
7080 else
7081   echo "$as_me: failed program was:" >&5
7082 cat conftest.$ac_ext >&5
7083 cf_cv_mbstate_t=unknown
7084 fi
7085 rm -f conftest.$ac_objext conftest.$ac_ext
7086 fi
7087 rm -f conftest.$ac_objext conftest.$ac_ext
7088 fi
7089 echo "$as_me:7089: result: $cf_cv_mbstate_t" >&5
7090 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7091
7092 if test "$cf_cv_mbstate_t" = yes ; then
7093         cat >>confdefs.h <<\EOF
7094 #define NEED_WCHAR_H 1
7095 EOF
7096
7097         NEED_WCHAR_H=1
7098 fi
7099
7100 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7101 if test "$cf_cv_mbstate_t" = unknown ; then
7102         NCURSES_MBSTATE_T=1
7103 fi
7104
7105 # This is needed on Tru64 5.0 to declare wchar_t
7106 echo "$as_me:7106: checking if we must include wchar.h to declare wchar_t" >&5
7107 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7108 if test "${cf_cv_wchar_t+set}" = set; then
7109   echo $ECHO_N "(cached) $ECHO_C" >&6
7110 else
7111
7112 cat >conftest.$ac_ext <<_ACEOF
7113 #line 7113 "configure"
7114 #include "confdefs.h"
7115
7116 #include <stdlib.h>
7117 #include <stdarg.h>
7118 #include <stdio.h>
7119 #ifdef HAVE_LIBUTF8_H
7120 #include <libutf8.h>
7121 #endif
7122 int
7123 main ()
7124 {
7125 wchar_t state
7126   ;
7127   return 0;
7128 }
7129 _ACEOF
7130 rm -f conftest.$ac_objext
7131 if { (eval echo "$as_me:7131: \"$ac_compile\"") >&5
7132   (eval $ac_compile) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit $ac_status); } &&
7136          { ac_try='test -s conftest.$ac_objext'
7137   { (eval echo "$as_me:7137: \"$ac_try\"") >&5
7138   (eval $ac_try) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); }; }; then
7142   cf_cv_wchar_t=no
7143 else
7144   echo "$as_me: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 cat >conftest.$ac_ext <<_ACEOF
7147 #line 7147 "configure"
7148 #include "confdefs.h"
7149
7150 #include <stdlib.h>
7151 #include <stdarg.h>
7152 #include <stdio.h>
7153 #include <wchar.h>
7154 #ifdef HAVE_LIBUTF8_H
7155 #include <libutf8.h>
7156 #endif
7157 int
7158 main ()
7159 {
7160 wchar_t value
7161   ;
7162   return 0;
7163 }
7164 _ACEOF
7165 rm -f conftest.$ac_objext
7166 if { (eval echo "$as_me:7166: \"$ac_compile\"") >&5
7167   (eval $ac_compile) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); } &&
7171          { ac_try='test -s conftest.$ac_objext'
7172   { (eval echo "$as_me:7172: \"$ac_try\"") >&5
7173   (eval $ac_try) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit $ac_status); }; }; then
7177   cf_cv_wchar_t=yes
7178 else
7179   echo "$as_me: failed program was:" >&5
7180 cat conftest.$ac_ext >&5
7181 cf_cv_wchar_t=unknown
7182 fi
7183 rm -f conftest.$ac_objext conftest.$ac_ext
7184 fi
7185 rm -f conftest.$ac_objext conftest.$ac_ext
7186 fi
7187 echo "$as_me:7187: result: $cf_cv_wchar_t" >&5
7188 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7189
7190 if test "$cf_cv_wchar_t" = yes ; then
7191         cat >>confdefs.h <<\EOF
7192 #define NEED_WCHAR_H 1
7193 EOF
7194
7195         NEED_WCHAR_H=1
7196 fi
7197
7198 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7199 if test "$cf_cv_wchar_t" = unknown ; then
7200         NCURSES_WCHAR_T=1
7201 fi
7202
7203 # if we find wchar_t in either place, use substitution to provide a fallback.
7204 if test "$cf_cv_wchar_t" != unknown ; then
7205         NCURSES_OK_WCHAR_T=1
7206 fi
7207
7208 # This is needed on Tru64 5.0 to declare wint_t
7209 echo "$as_me:7209: checking if we must include wchar.h to declare wint_t" >&5
7210 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7211 if test "${cf_cv_wint_t+set}" = set; then
7212   echo $ECHO_N "(cached) $ECHO_C" >&6
7213 else
7214
7215 cat >conftest.$ac_ext <<_ACEOF
7216 #line 7216 "configure"
7217 #include "confdefs.h"
7218
7219 #include <stdlib.h>
7220 #include <stdarg.h>
7221 #include <stdio.h>
7222 #ifdef HAVE_LIBUTF8_H
7223 #include <libutf8.h>
7224 #endif
7225 int
7226 main ()
7227 {
7228 wint_t state
7229   ;
7230   return 0;
7231 }
7232 _ACEOF
7233 rm -f conftest.$ac_objext
7234 if { (eval echo "$as_me:7234: \"$ac_compile\"") >&5
7235   (eval $ac_compile) 2>&5
7236   ac_status=$?
7237   echo "$as_me:7237: \$? = $ac_status" >&5
7238   (exit $ac_status); } &&
7239          { ac_try='test -s conftest.$ac_objext'
7240   { (eval echo "$as_me:7240: \"$ac_try\"") >&5
7241   (eval $ac_try) 2>&5
7242   ac_status=$?
7243   echo "$as_me:7243: \$? = $ac_status" >&5
7244   (exit $ac_status); }; }; then
7245   cf_cv_wint_t=no
7246 else
7247   echo "$as_me: failed program was:" >&5
7248 cat conftest.$ac_ext >&5
7249 cat >conftest.$ac_ext <<_ACEOF
7250 #line 7250 "configure"
7251 #include "confdefs.h"
7252
7253 #include <stdlib.h>
7254 #include <stdarg.h>
7255 #include <stdio.h>
7256 #include <wchar.h>
7257 #ifdef HAVE_LIBUTF8_H
7258 #include <libutf8.h>
7259 #endif
7260 int
7261 main ()
7262 {
7263 wint_t value
7264   ;
7265   return 0;
7266 }
7267 _ACEOF
7268 rm -f conftest.$ac_objext
7269 if { (eval echo "$as_me:7269: \"$ac_compile\"") >&5
7270   (eval $ac_compile) 2>&5
7271   ac_status=$?
7272   echo "$as_me:7272: \$? = $ac_status" >&5
7273   (exit $ac_status); } &&
7274          { ac_try='test -s conftest.$ac_objext'
7275   { (eval echo "$as_me:7275: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:7278: \$? = $ac_status" >&5
7279   (exit $ac_status); }; }; then
7280   cf_cv_wint_t=yes
7281 else
7282   echo "$as_me: failed program was:" >&5
7283 cat conftest.$ac_ext >&5
7284 cf_cv_wint_t=unknown
7285 fi
7286 rm -f conftest.$ac_objext conftest.$ac_ext
7287 fi
7288 rm -f conftest.$ac_objext conftest.$ac_ext
7289 fi
7290 echo "$as_me:7290: result: $cf_cv_wint_t" >&5
7291 echo "${ECHO_T}$cf_cv_wint_t" >&6
7292
7293 if test "$cf_cv_wint_t" = yes ; then
7294         cat >>confdefs.h <<\EOF
7295 #define NEED_WCHAR_H 1
7296 EOF
7297
7298         NEED_WCHAR_H=1
7299 fi
7300
7301 # if we do not find wint_t in either place, use substitution to provide a fallback.
7302 if test "$cf_cv_wint_t" = unknown ; then
7303         NCURSES_WINT_T=1
7304 fi
7305
7306 # if we find wint_t in either place, use substitution to provide a fallback.
7307 if test "$cf_cv_wint_t" != unknown ; then
7308         NCURSES_OK_WINT_T=1
7309 fi
7310
7311         if test "$NCURSES_MBSTATE_T" != 0; then
7312                 cat >>confdefs.h <<\EOF
7313 #define NEED_MBSTATE_T_DEF 1
7314 EOF
7315
7316         fi
7317 fi
7318
7319 ###   use option --disable-lp64 to allow long chtype
7320 case $cf_cv_abi_version in
7321 [345]*)
7322         default_with_lp64=no
7323         ;;
7324 *)
7325         default_with_lp64=yes
7326         ;;
7327 esac
7328
7329 echo "$as_me:7329: checking whether to enable _LP64 definition in curses.h" >&5
7330 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7331
7332 # Check whether --enable-lp64 or --disable-lp64 was given.
7333 if test "${enable_lp64+set}" = set; then
7334   enableval="$enable_lp64"
7335   with_lp64=$enableval
7336 else
7337   with_lp64=$default_with_lp64
7338 fi;
7339 echo "$as_me:7339: result: $with_lp64" >&5
7340 echo "${ECHO_T}$with_lp64" >&6
7341
7342 if test "$with_lp64" = yes ; then
7343         cf_cv_enable_lp64=1
7344 else
7345         cf_cv_enable_lp64=0
7346 fi
7347
7348 # Check whether --enable-largefile or --disable-largefile was given.
7349 if test "${enable_largefile+set}" = set; then
7350   enableval="$enable_largefile"
7351
7352 fi;
7353 if test "$enable_largefile" != no; then
7354
7355   echo "$as_me:7355: checking for special C compiler options needed for large files" >&5
7356 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7357 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7358   echo $ECHO_N "(cached) $ECHO_C" >&6
7359 else
7360   ac_cv_sys_largefile_CC=no
7361      if test "$GCC" != yes; then
7362        ac_save_CC=$CC
7363        while :; do
7364          # IRIX 6.2 and later do not support large files by default,
7365          # so use the C compiler's -n32 option if that helps.
7366          cat >conftest.$ac_ext <<_ACEOF
7367 #line 7367 "configure"
7368 #include "confdefs.h"
7369 #include <sys/types.h>
7370  /* Check that off_t can represent 2**63 - 1 correctly.
7371     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7372     since some C++ compilers masquerading as C compilers
7373     incorrectly reject 9223372036854775807.  */
7374 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7375   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7376                        && LARGE_OFF_T % 2147483647 == 1)
7377                       ? 1 : -1];
7378 int
7379 main ()
7380 {
7381
7382   ;
7383   return 0;
7384 }
7385 _ACEOF
7386          rm -f conftest.$ac_objext
7387 if { (eval echo "$as_me:7387: \"$ac_compile\"") >&5
7388   (eval $ac_compile) 2>&5
7389   ac_status=$?
7390   echo "$as_me:7390: \$? = $ac_status" >&5
7391   (exit $ac_status); } &&
7392          { ac_try='test -s conftest.$ac_objext'
7393   { (eval echo "$as_me:7393: \"$ac_try\"") >&5
7394   (eval $ac_try) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); }; }; then
7398   break
7399 else
7400   echo "$as_me: failed program was:" >&5
7401 cat conftest.$ac_ext >&5
7402 fi
7403 rm -f conftest.$ac_objext
7404          CC="$CC -n32"
7405          rm -f conftest.$ac_objext
7406 if { (eval echo "$as_me:7406: \"$ac_compile\"") >&5
7407   (eval $ac_compile) 2>&5
7408   ac_status=$?
7409   echo "$as_me:7409: \$? = $ac_status" >&5
7410   (exit $ac_status); } &&
7411          { ac_try='test -s conftest.$ac_objext'
7412   { (eval echo "$as_me:7412: \"$ac_try\"") >&5
7413   (eval $ac_try) 2>&5
7414   ac_status=$?
7415   echo "$as_me:7415: \$? = $ac_status" >&5
7416   (exit $ac_status); }; }; then
7417   ac_cv_sys_largefile_CC=' -n32'; break
7418 else
7419   echo "$as_me: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7421 fi
7422 rm -f conftest.$ac_objext
7423          break
7424        done
7425        CC=$ac_save_CC
7426        rm -f conftest.$ac_ext
7427     fi
7428 fi
7429 echo "$as_me:7429: result: $ac_cv_sys_largefile_CC" >&5
7430 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7431   if test "$ac_cv_sys_largefile_CC" != no; then
7432     CC=$CC$ac_cv_sys_largefile_CC
7433   fi
7434
7435   echo "$as_me:7435: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7436 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7437 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7438   echo $ECHO_N "(cached) $ECHO_C" >&6
7439 else
7440   while :; do
7441   ac_cv_sys_file_offset_bits=no
7442   cat >conftest.$ac_ext <<_ACEOF
7443 #line 7443 "configure"
7444 #include "confdefs.h"
7445 #include <sys/types.h>
7446  /* Check that off_t can represent 2**63 - 1 correctly.
7447     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7448     since some C++ compilers masquerading as C compilers
7449     incorrectly reject 9223372036854775807.  */
7450 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7451   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7452                        && LARGE_OFF_T % 2147483647 == 1)
7453                       ? 1 : -1];
7454 int
7455 main ()
7456 {
7457
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 rm -f conftest.$ac_objext
7463 if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
7464   (eval $ac_compile) 2>&5
7465   ac_status=$?
7466   echo "$as_me:7466: \$? = $ac_status" >&5
7467   (exit $ac_status); } &&
7468          { ac_try='test -s conftest.$ac_objext'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); }; }; then
7474   break
7475 else
7476   echo "$as_me: failed program was:" >&5
7477 cat conftest.$ac_ext >&5
7478 fi
7479 rm -f conftest.$ac_objext conftest.$ac_ext
7480   cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 #define _FILE_OFFSET_BITS 64
7484 #include <sys/types.h>
7485  /* Check that off_t can represent 2**63 - 1 correctly.
7486     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7487     since some C++ compilers masquerading as C compilers
7488     incorrectly reject 9223372036854775807.  */
7489 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7490   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7491                        && LARGE_OFF_T % 2147483647 == 1)
7492                       ? 1 : -1];
7493 int
7494 main ()
7495 {
7496
7497   ;
7498   return 0;
7499 }
7500 _ACEOF
7501 rm -f conftest.$ac_objext
7502 if { (eval echo "$as_me:7502: \"$ac_compile\"") >&5
7503   (eval $ac_compile) 2>&5
7504   ac_status=$?
7505   echo "$as_me:7505: \$? = $ac_status" >&5
7506   (exit $ac_status); } &&
7507          { ac_try='test -s conftest.$ac_objext'
7508   { (eval echo "$as_me:7508: \"$ac_try\"") >&5
7509   (eval $ac_try) 2>&5
7510   ac_status=$?
7511   echo "$as_me:7511: \$? = $ac_status" >&5
7512   (exit $ac_status); }; }; then
7513   ac_cv_sys_file_offset_bits=64; break
7514 else
7515   echo "$as_me: failed program was:" >&5
7516 cat conftest.$ac_ext >&5
7517 fi
7518 rm -f conftest.$ac_objext conftest.$ac_ext
7519   break
7520 done
7521 fi
7522 echo "$as_me:7522: result: $ac_cv_sys_file_offset_bits" >&5
7523 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7524 if test "$ac_cv_sys_file_offset_bits" != no; then
7525
7526 cat >>confdefs.h <<EOF
7527 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7528 EOF
7529
7530 fi
7531 rm -f conftest*
7532   echo "$as_me:7532: checking for _LARGE_FILES value needed for large files" >&5
7533 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7534 if test "${ac_cv_sys_large_files+set}" = set; then
7535   echo $ECHO_N "(cached) $ECHO_C" >&6
7536 else
7537   while :; do
7538   ac_cv_sys_large_files=no
7539   cat >conftest.$ac_ext <<_ACEOF
7540 #line 7540 "configure"
7541 #include "confdefs.h"
7542 #include <sys/types.h>
7543  /* Check that off_t can represent 2**63 - 1 correctly.
7544     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7545     since some C++ compilers masquerading as C compilers
7546     incorrectly reject 9223372036854775807.  */
7547 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7548   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7549                        && LARGE_OFF_T % 2147483647 == 1)
7550                       ? 1 : -1];
7551 int
7552 main ()
7553 {
7554
7555   ;
7556   return 0;
7557 }
7558 _ACEOF
7559 rm -f conftest.$ac_objext
7560 if { (eval echo "$as_me:7560: \"$ac_compile\"") >&5
7561   (eval $ac_compile) 2>&5
7562   ac_status=$?
7563   echo "$as_me:7563: \$? = $ac_status" >&5
7564   (exit $ac_status); } &&
7565          { ac_try='test -s conftest.$ac_objext'
7566   { (eval echo "$as_me:7566: \"$ac_try\"") >&5
7567   (eval $ac_try) 2>&5
7568   ac_status=$?
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); }; }; then
7571   break
7572 else
7573   echo "$as_me: failed program was:" >&5
7574 cat conftest.$ac_ext >&5
7575 fi
7576 rm -f conftest.$ac_objext conftest.$ac_ext
7577   cat >conftest.$ac_ext <<_ACEOF
7578 #line 7578 "configure"
7579 #include "confdefs.h"
7580 #define _LARGE_FILES 1
7581 #include <sys/types.h>
7582  /* Check that off_t can represent 2**63 - 1 correctly.
7583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7584     since some C++ compilers masquerading as C compilers
7585     incorrectly reject 9223372036854775807.  */
7586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7588                        && LARGE_OFF_T % 2147483647 == 1)
7589                       ? 1 : -1];
7590 int
7591 main ()
7592 {
7593
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 rm -f conftest.$ac_objext
7599 if { (eval echo "$as_me:7599: \"$ac_compile\"") >&5
7600   (eval $ac_compile) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); } &&
7604          { ac_try='test -s conftest.$ac_objext'
7605   { (eval echo "$as_me:7605: \"$ac_try\"") >&5
7606   (eval $ac_try) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); }; }; then
7610   ac_cv_sys_large_files=1; break
7611 else
7612   echo "$as_me: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 fi
7615 rm -f conftest.$ac_objext conftest.$ac_ext
7616   break
7617 done
7618 fi
7619 echo "$as_me:7619: result: $ac_cv_sys_large_files" >&5
7620 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7621 if test "$ac_cv_sys_large_files" != no; then
7622
7623 cat >>confdefs.h <<EOF
7624 #define _LARGE_FILES $ac_cv_sys_large_files
7625 EOF
7626
7627 fi
7628 rm -f conftest*
7629 fi
7630
7631     if test "$enable_largefile" != no ; then
7632         echo "$as_me:7632: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7633 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7634 if test "${ac_cv_sys_largefile_source+set}" = set; then
7635   echo $ECHO_N "(cached) $ECHO_C" >&6
7636 else
7637   while :; do
7638   ac_cv_sys_largefile_source=no
7639   cat >conftest.$ac_ext <<_ACEOF
7640 #line 7640 "configure"
7641 #include "confdefs.h"
7642 #include <stdio.h>
7643 int
7644 main ()
7645 {
7646 return !fseeko;
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 rm -f conftest.$ac_objext
7652 if { (eval echo "$as_me:7652: \"$ac_compile\"") >&5
7653   (eval $ac_compile) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); } &&
7657          { ac_try='test -s conftest.$ac_objext'
7658   { (eval echo "$as_me:7658: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); }; }; then
7663   break
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 fi
7668 rm -f conftest.$ac_objext conftest.$ac_ext
7669   cat >conftest.$ac_ext <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672 #define _LARGEFILE_SOURCE 1
7673 #include <stdio.h>
7674 int
7675 main ()
7676 {
7677 return !fseeko;
7678   ;
7679   return 0;
7680 }
7681 _ACEOF
7682 rm -f conftest.$ac_objext
7683 if { (eval echo "$as_me:7683: \"$ac_compile\"") >&5
7684   (eval $ac_compile) 2>&5
7685   ac_status=$?
7686   echo "$as_me:7686: \$? = $ac_status" >&5
7687   (exit $ac_status); } &&
7688          { ac_try='test -s conftest.$ac_objext'
7689   { (eval echo "$as_me:7689: \"$ac_try\"") >&5
7690   (eval $ac_try) 2>&5
7691   ac_status=$?
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit $ac_status); }; }; then
7694   ac_cv_sys_largefile_source=1; break
7695 else
7696   echo "$as_me: failed program was:" >&5
7697 cat conftest.$ac_ext >&5
7698 fi
7699 rm -f conftest.$ac_objext conftest.$ac_ext
7700   break
7701 done
7702 fi
7703 echo "$as_me:7703: result: $ac_cv_sys_largefile_source" >&5
7704 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7705 if test "$ac_cv_sys_largefile_source" != no; then
7706
7707 cat >>confdefs.h <<EOF
7708 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7709 EOF
7710
7711 fi
7712 rm -f conftest*
7713
7714 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7715 # in glibc 2.1.3, but that breaks too many other things.
7716 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7717 echo "$as_me:7717: checking for fseeko" >&5
7718 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7719 if test "${ac_cv_func_fseeko+set}" = set; then
7720   echo $ECHO_N "(cached) $ECHO_C" >&6
7721 else
7722   cat >conftest.$ac_ext <<_ACEOF
7723 #line 7723 "configure"
7724 #include "confdefs.h"
7725 #include <stdio.h>
7726 int
7727 main ()
7728 {
7729 return fseeko && fseeko (stdin, 0, 0);
7730   ;
7731   return 0;
7732 }
7733 _ACEOF
7734 rm -f conftest.$ac_objext conftest$ac_exeext
7735 if { (eval echo "$as_me:7735: \"$ac_link\"") >&5
7736   (eval $ac_link) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit $ac_status); } &&
7740          { ac_try='test -s conftest$ac_exeext'
7741   { (eval echo "$as_me:7741: \"$ac_try\"") >&5
7742   (eval $ac_try) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); }; }; then
7746   ac_cv_func_fseeko=yes
7747 else
7748   echo "$as_me: failed program was:" >&5
7749 cat conftest.$ac_ext >&5
7750 ac_cv_func_fseeko=no
7751 fi
7752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7753 fi
7754 echo "$as_me:7754: result: $ac_cv_func_fseeko" >&5
7755 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7756 if test $ac_cv_func_fseeko = yes; then
7757
7758 cat >>confdefs.h <<\EOF
7759 #define HAVE_FSEEKO 1
7760 EOF
7761
7762 fi
7763
7764         # Normally we would collect these definitions in the config.h,
7765         # but (like _XOPEN_SOURCE), some environments rely on having these
7766         # defined before any of the system headers are included.  Another
7767         # case comes up with C++, e.g., on AIX the compiler compiles the
7768         # header files by themselves before looking at the body files it is
7769         # told to compile.  For ncurses, those header files do not include
7770         # the config.h
7771         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7772         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7773         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7774
7775         echo "$as_me:7775: checking whether to use struct dirent64" >&5
7776 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7777 if test "${cf_cv_struct_dirent64+set}" = set; then
7778   echo $ECHO_N "(cached) $ECHO_C" >&6
7779 else
7780
7781                 cat >conftest.$ac_ext <<_ACEOF
7782 #line 7782 "configure"
7783 #include "confdefs.h"
7784
7785 #include <sys/types.h>
7786 #include <dirent.h>
7787
7788 int
7789 main ()
7790 {
7791
7792                 /* if transitional largefile support is setup, this is true */
7793                 extern struct dirent64 * readdir(DIR *);
7794                 struct dirent64 *x = readdir((DIR *)0);
7795                 struct dirent *y = readdir((DIR *)0);
7796                 int z = x - y;
7797
7798   ;
7799   return 0;
7800 }
7801 _ACEOF
7802 rm -f conftest.$ac_objext
7803 if { (eval echo "$as_me:7803: \"$ac_compile\"") >&5
7804   (eval $ac_compile) 2>&5
7805   ac_status=$?
7806   echo "$as_me:7806: \$? = $ac_status" >&5
7807   (exit $ac_status); } &&
7808          { ac_try='test -s conftest.$ac_objext'
7809   { (eval echo "$as_me:7809: \"$ac_try\"") >&5
7810   (eval $ac_try) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); }; }; then
7814   cf_cv_struct_dirent64=yes
7815 else
7816   echo "$as_me: failed program was:" >&5
7817 cat conftest.$ac_ext >&5
7818 cf_cv_struct_dirent64=no
7819 fi
7820 rm -f conftest.$ac_objext conftest.$ac_ext
7821
7822 fi
7823 echo "$as_me:7823: result: $cf_cv_struct_dirent64" >&5
7824 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7825         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7826 #define HAVE_STRUCT_DIRENT64 1
7827 EOF
7828
7829     fi
7830
7831 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7832 echo "$as_me:7832: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7833 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7834
7835 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7836 if test "${enable_tparm_varargs+set}" = set; then
7837   enableval="$enable_tparm_varargs"
7838   with_tparm_varargs=$enableval
7839 else
7840   with_tparm_varargs=yes
7841 fi;
7842 echo "$as_me:7842: result: $with_tparm_varargs" >&5
7843 echo "${ECHO_T}$with_tparm_varargs" >&6
7844 NCURSES_TPARM_VARARGS=0
7845 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7846
7847 ###   use option --with-bool to override bool's type
7848 echo "$as_me:7848: checking for type of bool" >&5
7849 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7850
7851 # Check whether --with-bool or --without-bool was given.
7852 if test "${with_bool+set}" = set; then
7853   withval="$with_bool"
7854   NCURSES_BOOL="$withval"
7855 else
7856   NCURSES_BOOL=auto
7857 fi;
7858 echo "$as_me:7858: result: $NCURSES_BOOL" >&5
7859 echo "${ECHO_T}$NCURSES_BOOL" >&6
7860
7861 echo "$as_me:7861: checking for alternate terminal capabilities file" >&5
7862 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7863
7864 # Check whether --with-caps or --without-caps was given.
7865 if test "${with_caps+set}" = set; then
7866   withval="$with_caps"
7867   TERMINFO_CAPS=Caps.$withval
7868 else
7869   TERMINFO_CAPS=Caps
7870 fi;
7871 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7872 echo "$as_me:7872: result: $TERMINFO_CAPS" >&5
7873 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7874
7875 ###   use option --with-chtype to override chtype's type
7876 echo "$as_me:7876: checking for type of chtype" >&5
7877 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7878
7879 # Check whether --with-chtype or --without-chtype was given.
7880 if test "${with_chtype+set}" = set; then
7881   withval="$with_chtype"
7882   NCURSES_CHTYPE="$withval"
7883 else
7884   NCURSES_CHTYPE=auto
7885 fi;
7886 echo "$as_me:7886: result: $NCURSES_CHTYPE" >&5
7887 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7888
7889 ###   use option --with-ospeed to override ospeed's type
7890 echo "$as_me:7890: checking for type of ospeed" >&5
7891 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7892
7893 # Check whether --with-ospeed or --without-ospeed was given.
7894 if test "${with_ospeed+set}" = set; then
7895   withval="$with_ospeed"
7896   NCURSES_OSPEED="$withval"
7897 else
7898   NCURSES_OSPEED=short
7899 fi;
7900 echo "$as_me:7900: result: $NCURSES_OSPEED" >&5
7901 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7902
7903 ###   use option --with-mmask-t to override mmask_t's type
7904 echo "$as_me:7904: checking for type of mmask_t" >&5
7905 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7906
7907 # Check whether --with-mmask-t or --without-mmask-t was given.
7908 if test "${with_mmask_t+set}" = set; then
7909   withval="$with_mmask_t"
7910   NCURSES_MMASK_T="$withval"
7911 else
7912   NCURSES_MMASK_T=auto
7913 fi;
7914 echo "$as_me:7914: result: $NCURSES_MMASK_T" >&5
7915 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7916
7917 ### Enable compiling-in rcs id's
7918 echo "$as_me:7918: checking if RCS identifiers should be compiled-in" >&5
7919 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7920
7921 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7922 if test "${with_rcs_ids+set}" = set; then
7923   withval="$with_rcs_ids"
7924   with_rcs_ids=$withval
7925 else
7926   with_rcs_ids=no
7927 fi;
7928 echo "$as_me:7928: result: $with_rcs_ids" >&5
7929 echo "${ECHO_T}$with_rcs_ids" >&6
7930 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7931 #define USE_RCS_IDS 1
7932 EOF
7933
7934 ###############################################################################
7935
7936 echo "$as_me:7936: checking format of man-pages" >&5
7937 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7938
7939 # Check whether --with-manpage-format or --without-manpage-format was given.
7940 if test "${with_manpage_format+set}" = set; then
7941   withval="$with_manpage_format"
7942   MANPAGE_FORMAT=$withval
7943 else
7944   MANPAGE_FORMAT=unknown
7945 fi;
7946
7947 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7948 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7949
7950 cf_unknown=
7951
7952 case $MANPAGE_FORMAT in
7953 unknown)
7954   if test -z "$MANPATH" ; then
7955     MANPATH="/usr/man:/usr/share/man"
7956   fi
7957
7958   # look for the 'date' man-page (it's most likely to be installed!)
7959   MANPAGE_FORMAT=
7960   cf_preform=no
7961   cf_catonly=yes
7962   cf_example=date
7963
7964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7965   for cf_dir in $MANPATH; do
7966     test -z "$cf_dir" && cf_dir=/usr/man
7967     for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
7968     do
7969       cf_test=`echo $cf_name | sed -e 's/*//'`
7970       if test "x$cf_test" = "x$cf_name" ; then
7971
7972         case "$cf_name" in
7973         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7974         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7975         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7976         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7977         esac
7978
7979         case "$cf_name" in
7980         $cf_dir/man*)
7981           cf_catonly=no
7982           ;;
7983         $cf_dir/cat*)
7984           cf_preform=yes
7985           ;;
7986         esac
7987         break
7988       fi
7989
7990       # if we found a match in either man* or cat*, stop looking
7991       if test -n "$MANPAGE_FORMAT" ; then
7992         cf_found=no
7993         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7994         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7995         case "$cf_name" in
7996         $cf_dir/cat*)
7997           cf_found=yes
7998           ;;
7999         esac
8000         test $cf_found=yes && break
8001       fi
8002     done
8003     # only check the first directory in $MANPATH where we find manpages
8004     if test -n "$MANPAGE_FORMAT" ; then
8005        break
8006     fi
8007   done
8008   # if we did not find the example, just assume it is normal
8009   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8010   IFS="$ac_save_ifs"
8011   ;;
8012 *)
8013   for cf_option in $MANPAGE_FORMAT; do
8014      case $cf_option in #(vi
8015      gzip|compress|BSDI|normal|formatted|catonly)
8016        ;;
8017      *)
8018        cf_unknown="$cf_unknown $cf_option"
8019        ;;
8020      esac
8021   done
8022   ;;
8023 esac
8024
8025 echo "$as_me:8025: result: $MANPAGE_FORMAT" >&5
8026 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8027 if test -n "$cf_unknown" ; then
8028   { echo "$as_me:8028: WARNING: Unexpected manpage-format $cf_unknown" >&5
8029 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8030 fi
8031
8032 echo "$as_me:8032: checking for manpage renaming" >&5
8033 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8034
8035 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8036 if test "${with_manpage_renames+set}" = set; then
8037   withval="$with_manpage_renames"
8038   MANPAGE_RENAMES=$withval
8039 else
8040   MANPAGE_RENAMES=yes
8041 fi;
8042
8043 case ".$MANPAGE_RENAMES" in #(vi
8044 .no) #(vi
8045   ;;
8046 .|.yes)
8047   # Debian 'man' program?
8048   if test -f /etc/debian_version ; then
8049     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8050   else
8051     MANPAGE_RENAMES=no
8052   fi
8053   ;;
8054 esac
8055
8056 if test "$MANPAGE_RENAMES" != no ; then
8057   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8058     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8059   elif test ! -f $MANPAGE_RENAMES ; then
8060     { { echo "$as_me:8060: error: not a filename: $MANPAGE_RENAMES" >&5
8061 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8062    { (exit 1); exit 1; }; }
8063   fi
8064
8065   test ! -d man && mkdir man
8066
8067   # Construct a sed-script to perform renaming within man-pages
8068   if test -n "$MANPAGE_RENAMES" ; then
8069     test ! -d man && mkdir man
8070     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8071   fi
8072 fi
8073
8074 echo "$as_me:8074: result: $MANPAGE_RENAMES" >&5
8075 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8076
8077 echo "$as_me:8077: checking if manpage aliases will be installed" >&5
8078 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8079
8080 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8081 if test "${with_manpage_aliases+set}" = set; then
8082   withval="$with_manpage_aliases"
8083   MANPAGE_ALIASES=$withval
8084 else
8085   MANPAGE_ALIASES=yes
8086 fi;
8087
8088 echo "$as_me:8088: result: $MANPAGE_ALIASES" >&5
8089 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8090
8091 if test "$LN_S" = "ln -s"; then
8092         cf_use_symlinks=yes
8093 else
8094         cf_use_symlinks=no
8095 fi
8096
8097 MANPAGE_SYMLINKS=no
8098 if test "$MANPAGE_ALIASES" = yes ; then
8099 echo "$as_me:8099: checking if manpage symlinks should be used" >&5
8100 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8101
8102 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8103 if test "${with_manpage_symlinks+set}" = set; then
8104   withval="$with_manpage_symlinks"
8105   MANPAGE_SYMLINKS=$withval
8106 else
8107   MANPAGE_SYMLINKS=$cf_use_symlinks
8108 fi;
8109
8110 if test "$$cf_use_symlinks" = no; then
8111 if test "$MANPAGE_SYMLINKS" = yes ; then
8112         { echo "$as_me:8112: WARNING: cannot make symlinks" >&5
8113 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8114         MANPAGE_SYMLINKS=no
8115 fi
8116 fi
8117
8118 echo "$as_me:8118: result: $MANPAGE_SYMLINKS" >&5
8119 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8120 fi
8121
8122 echo "$as_me:8122: checking for manpage tbl" >&5
8123 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8124
8125 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8126 if test "${with_manpage_tbl+set}" = set; then
8127   withval="$with_manpage_tbl"
8128   MANPAGE_TBL=$withval
8129 else
8130   MANPAGE_TBL=no
8131 fi;
8132
8133 echo "$as_me:8133: result: $MANPAGE_TBL" >&5
8134 echo "${ECHO_T}$MANPAGE_TBL" >&6
8135
8136   if test "$prefix" = "NONE" ; then
8137      cf_prefix="$ac_default_prefix"
8138   else
8139      cf_prefix="$prefix"
8140   fi
8141
8142   case "$MANPAGE_FORMAT" in # (vi
8143   *catonly*) # (vi
8144     cf_format=yes
8145     cf_inboth=no
8146     ;;
8147   *formatted*) # (vi
8148     cf_format=yes
8149     cf_inboth=yes
8150     ;;
8151   *)
8152     cf_format=no
8153     cf_inboth=no
8154     ;;
8155   esac
8156
8157 test ! -d man && mkdir man
8158
8159 cf_so_strip=
8160 cf_compress=
8161 case "$MANPAGE_FORMAT" in #(vi
8162 *compress*) #(vi
8163         cf_so_strip="Z"
8164         cf_compress=compress
8165   ;;
8166 *gzip*) #(vi
8167         cf_so_strip="gz"
8168         cf_compress=gzip
8169   ;;
8170 esac
8171
8172 cf_edit_man=./edit_man.sh
8173 cf_man_alias=`pwd`/man_alias.sed
8174
8175 cat >$cf_edit_man <<CF_EOF
8176 #! /bin/sh
8177 # this script is generated by the configure-script CF_MAN_PAGES macro.
8178
8179 prefix="$cf_prefix"
8180 datadir="$datadir"
8181
8182 NCURSES_MAJOR="$NCURSES_MAJOR"
8183 NCURSES_MINOR="$NCURSES_MINOR"
8184 NCURSES_PATCH="$NCURSES_PATCH"
8185
8186 NCURSES_OSPEED="$NCURSES_OSPEED"
8187 TERMINFO="$TERMINFO"
8188
8189 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8190
8191 INSTALL="$INSTALL"
8192 INSTALL_DATA="$INSTALL_DATA"
8193
8194 transform="$program_transform_name"
8195
8196 TMP=\${TMPDIR-/tmp}/man\$\$
8197 trap "rm -f \$TMP" 0 1 2 5 15
8198
8199 form=\$1
8200 shift || exit 1
8201
8202 verb=\$1
8203 shift || exit 1
8204
8205 mandir=\$1
8206 shift || exit 1
8207
8208 srcdir=\$1
8209 top_srcdir=\$srcdir/..
8210 shift || exit 1
8211
8212 if test "\$form" = normal ; then
8213         if test "$cf_format" = yes ; then
8214         if test "$cf_inboth" = no ; then
8215                 sh \$0 format \$verb \$mandir \$srcdir \$*
8216                 exit $?
8217         fi
8218         fi
8219         cf_subdir=\$mandir/man
8220         cf_tables=$MANPAGE_TBL
8221 else
8222         cf_subdir=\$mandir/cat
8223         cf_tables=yes
8224 fi
8225
8226 # process the list of source-files
8227 for i in \$* ; do
8228 case \$i in #(vi
8229 *.orig|*.rej) ;; #(vi
8230 *.[0-9]*)
8231         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8232         if test \$verb = installing ; then
8233         if test ! -d \$cf_subdir\${section} ; then
8234                 \$MKDIRS \$cf_subdir\$section
8235         fi
8236         fi
8237
8238         # replace variables in man page
8239         if test ! -f $cf_man_alias ; then
8240 cat >>$cf_man_alias <<-CF_EOF2
8241                 s,@DATADIR@,\$datadir,g
8242                 s,@TERMINFO@,\$TERMINFO,g
8243                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8244                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8245                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8246                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8247 CF_EOF
8248
8249         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8250         do
8251                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8252                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8253 cat >>$cf_edit_man <<-CF_EOF
8254                 s,@$cf_NAME@,$cf_name,
8255 CF_EOF
8256         done
8257
8258 cat >>$cf_edit_man <<CF_EOF
8259 CF_EOF2
8260                 echo "...made $cf_man_alias"
8261         fi
8262
8263         aliases=
8264         cf_source=\`basename \$i\`
8265         inalias=\$cf_source
8266         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8267         if test ! -f \$inalias ; then
8268                 echo .. skipped \$cf_source
8269                 continue
8270         fi
8271 CF_EOF
8272
8273 if test "$MANPAGE_ALIASES" != no ; then
8274 cat >>$cf_edit_man <<CF_EOF
8275         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8276 CF_EOF
8277 fi
8278
8279 if test "$MANPAGE_RENAMES" = no ; then
8280 cat >>$cf_edit_man <<CF_EOF
8281         # perform program transformations for section 1 man pages
8282         if test \$section = 1 ; then
8283                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8284         else
8285                 cf_target=\$cf_subdir\${section}/\$cf_source
8286         fi
8287 CF_EOF
8288 else
8289 cat >>$cf_edit_man <<CF_EOF
8290         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8291         if test -z "\$cf_target" ; then
8292                 echo '? missing rename for '\$cf_source
8293                 cf_target="\$cf_source"
8294         fi
8295         cf_target="\$cf_subdir\${section}/\${cf_target}"
8296
8297 CF_EOF
8298 fi
8299
8300 cat >>$cf_edit_man <<CF_EOF
8301         sed     -f $cf_man_alias \\
8302 CF_EOF
8303
8304 if test -f $MANPAGE_RENAMES ; then
8305 cat >>$cf_edit_man <<CF_EOF
8306                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8307 CF_EOF
8308 else
8309 cat >>$cf_edit_man <<CF_EOF
8310                 < \$i >\$TMP
8311 CF_EOF
8312 fi
8313
8314 cat >>$cf_edit_man <<CF_EOF
8315 if test \$cf_tables = yes ; then
8316         tbl \$TMP >\$TMP.out
8317         mv \$TMP.out \$TMP
8318 fi
8319 CF_EOF
8320
8321 if test $with_curses_h != yes ; then
8322 cat >>$cf_edit_man <<CF_EOF
8323         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8324         mv \$TMP.out \$TMP
8325 CF_EOF
8326 fi
8327
8328 cat >>$cf_edit_man <<CF_EOF
8329         if test \$form = format ; then
8330                 nroff -man \$TMP >\$TMP.out
8331                 mv \$TMP.out \$TMP
8332         fi
8333 CF_EOF
8334
8335 if test -n "$cf_compress" ; then
8336 cat >>$cf_edit_man <<CF_EOF
8337         if test \$verb = installing ; then
8338         if ( $cf_compress -f \$TMP )
8339         then
8340                 mv \$TMP.$cf_so_strip \$TMP
8341         fi
8342         fi
8343         cf_target="\$cf_target.$cf_so_strip"
8344 CF_EOF
8345 fi
8346
8347 case "$MANPAGE_FORMAT" in #(vi
8348 *BSDI*)
8349 cat >>$cf_edit_man <<CF_EOF
8350         if test \$form = format ; then
8351                 # BSDI installs only .0 suffixes in the cat directories
8352                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8353         fi
8354 CF_EOF
8355   ;;
8356 esac
8357
8358 cat >>$cf_edit_man <<CF_EOF
8359         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8360         if test \$verb = installing ; then
8361                 echo \$verb \$cf_target
8362                 \$INSTALL_DATA \$TMP \$cf_target
8363                 test -d \$cf_subdir\${section} &&
8364                 test -n "\$aliases" && (
8365                         cd \$cf_subdir\${section} && (
8366                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8367                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8368                                 cf_target=\`basename \$cf_target\`
8369                                 for cf_alias in \$aliases
8370                                 do
8371                                         if test \$section = 1 ; then
8372                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8373                                         fi
8374
8375                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8376                                                 if test -f \$cf_alias\${suffix} ; then
8377                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8378                                                         then
8379                                                                 continue
8380                                                         fi
8381                                                 fi
8382                                                 echo .. \$verb alias \$cf_alias\${suffix}
8383                                                 rm -f \$cf_alias\${suffix}
8384                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8385                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8386                                                 echo ".so \$cf_source" >\$TMP
8387 CF_EOF
8388 if test -n "$cf_compress" ; then
8389 cat >>$cf_edit_man <<CF_EOF
8390                                                 if test -n "$cf_so_strip" ; then
8391                                                         $cf_compress -f \$TMP
8392                                                         mv \$TMP.$cf_so_strip \$TMP
8393                                                 fi
8394 CF_EOF
8395 fi
8396 cat >>$cf_edit_man <<CF_EOF
8397                                                 echo .. \$verb alias \$cf_alias\${suffix}
8398                                                 rm -f \$cf_alias\${suffix}
8399                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8400                                         fi
8401                                 done
8402                         )
8403                 )
8404         elif test \$verb = removing ; then
8405                 test -f \$cf_target && (
8406                         echo \$verb \$cf_target
8407                         rm -f \$cf_target
8408                 )
8409                 test -d \$cf_subdir\${section} &&
8410                 test -n "\$aliases" && (
8411                         cd \$cf_subdir\${section} && (
8412                                 for cf_alias in \$aliases
8413                                 do
8414                                         if test \$section = 1 ; then
8415                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8416                                         fi
8417
8418                                         echo .. \$verb alias \$cf_alias\${suffix}
8419                                         rm -f \$cf_alias\${suffix}
8420                                 done
8421                         )
8422                 )
8423         else
8424 #               echo ".hy 0"
8425                 cat \$TMP
8426         fi
8427         ;;
8428 esac
8429 done
8430
8431 if test $cf_inboth = yes ; then
8432 if test \$form != format ; then
8433         sh \$0 format \$verb \$mandir \$srcdir \$*
8434 fi
8435 fi
8436
8437 exit 0
8438 CF_EOF
8439 chmod 755 $cf_edit_man
8440
8441 ###############################################################################
8442
8443 ### Note that some functions (such as const) are normally disabled anyway.
8444 echo "$as_me:8444: checking if you want to build with function extensions" >&5
8445 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8446
8447 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8448 if test "${enable_ext_funcs+set}" = set; then
8449   enableval="$enable_ext_funcs"
8450   with_ext_funcs=$enableval
8451 else
8452   with_ext_funcs=yes
8453 fi;
8454 echo "$as_me:8454: result: $with_ext_funcs" >&5
8455 echo "${ECHO_T}$with_ext_funcs" >&6
8456 if test "$with_ext_funcs" = yes ; then
8457         NCURSES_EXT_FUNCS=1
8458         cat >>confdefs.h <<\EOF
8459 #define HAVE_CURSES_VERSION 1
8460 EOF
8461
8462         cat >>confdefs.h <<\EOF
8463 #define HAVE_HAS_KEY 1
8464 EOF
8465
8466         cat >>confdefs.h <<\EOF
8467 #define HAVE_RESIZETERM 1
8468 EOF
8469
8470         cat >>confdefs.h <<\EOF
8471 #define HAVE_RESIZE_TERM 1
8472 EOF
8473
8474         cat >>confdefs.h <<\EOF
8475 #define HAVE_USE_DEFAULT_COLORS 1
8476 EOF
8477
8478         cat >>confdefs.h <<\EOF
8479 #define HAVE_WRESIZE 1
8480 EOF
8481
8482         cat >>confdefs.h <<\EOF
8483 #define NCURSES_EXT_FUNCS 1
8484 EOF
8485
8486 else
8487         NCURSES_EXT_FUNCS=0
8488 fi
8489
8490 ###   use option --enable-const to turn on use of const beyond that in XSI.
8491 echo "$as_me:8491: checking for extended use of const keyword" >&5
8492 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8493
8494 # Check whether --enable-const or --disable-const was given.
8495 if test "${enable_const+set}" = set; then
8496   enableval="$enable_const"
8497   with_ext_const=$enableval
8498 else
8499   with_ext_const=no
8500 fi;
8501 echo "$as_me:8501: result: $with_ext_const" >&5
8502 echo "${ECHO_T}$with_ext_const" >&6
8503 NCURSES_CONST='/*nothing*/'
8504 if test "$with_ext_const" = yes ; then
8505         NCURSES_CONST=const
8506 fi
8507
8508 echo "$as_me:8508: checking if you want \$NCURSES_NO_PADDING code" >&5
8509 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8510
8511 # Check whether --enable-no-padding or --disable-no-padding was given.
8512 if test "${enable_no_padding+set}" = set; then
8513   enableval="$enable_no_padding"
8514   with_no_padding=$enableval
8515 else
8516   with_no_padding=$with_ext_funcs
8517 fi;
8518 echo "$as_me:8518: result: $with_no_padding" >&5
8519 echo "${ECHO_T}$with_no_padding" >&6
8520 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8521 #define NCURSES_NO_PADDING 1
8522 EOF
8523
8524 echo "$as_me:8524: checking for ANSI C header files" >&5
8525 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8526 if test "${ac_cv_header_stdc+set}" = set; then
8527   echo $ECHO_N "(cached) $ECHO_C" >&6
8528 else
8529   cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532 #include <stdlib.h>
8533 #include <stdarg.h>
8534 #include <string.h>
8535 #include <float.h>
8536
8537 _ACEOF
8538 if { (eval echo "$as_me:8538: \"$ac_cpp conftest.$ac_ext\"") >&5
8539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8540   ac_status=$?
8541   egrep -v '^ *\+' conftest.er1 >conftest.err
8542   rm -f conftest.er1
8543   cat conftest.err >&5
8544   echo "$as_me:8544: \$? = $ac_status" >&5
8545   (exit $ac_status); } >/dev/null; then
8546   if test -s conftest.err; then
8547     ac_cpp_err=$ac_c_preproc_warn_flag
8548   else
8549     ac_cpp_err=
8550   fi
8551 else
8552   ac_cpp_err=yes
8553 fi
8554 if test -z "$ac_cpp_err"; then
8555   ac_cv_header_stdc=yes
8556 else
8557   echo "$as_me: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   ac_cv_header_stdc=no
8560 fi
8561 rm -f conftest.err conftest.$ac_ext
8562
8563 if test $ac_cv_header_stdc = yes; then
8564   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8565   cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568 #include <string.h>
8569
8570 _ACEOF
8571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8572   egrep "memchr" >/dev/null 2>&1; then
8573   :
8574 else
8575   ac_cv_header_stdc=no
8576 fi
8577 rm -f conftest*
8578
8579 fi
8580
8581 if test $ac_cv_header_stdc = yes; then
8582   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8583   cat >conftest.$ac_ext <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586 #include <stdlib.h>
8587
8588 _ACEOF
8589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8590   egrep "free" >/dev/null 2>&1; then
8591   :
8592 else
8593   ac_cv_header_stdc=no
8594 fi
8595 rm -f conftest*
8596
8597 fi
8598
8599 if test $ac_cv_header_stdc = yes; then
8600   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8601   if test "$cross_compiling" = yes; then
8602   :
8603 else
8604   cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607 #include <ctype.h>
8608 #if ((' ' & 0x0FF) == 0x020)
8609 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8610 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8611 #else
8612 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8613                      || ('j' <= (c) && (c) <= 'r') \
8614                      || ('s' <= (c) && (c) <= 'z'))
8615 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8616 #endif
8617
8618 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8619 int
8620 main ()
8621 {
8622   int i;
8623   for (i = 0; i < 256; i++)
8624     if (XOR (islower (i), ISLOWER (i))
8625         || toupper (i) != TOUPPER (i))
8626       $ac_main_return(2);
8627   $ac_main_return (0);
8628 }
8629 _ACEOF
8630 rm -f conftest$ac_exeext
8631 if { (eval echo "$as_me:8631: \"$ac_link\"") >&5
8632   (eval $ac_link) 2>&5
8633   ac_status=$?
8634   echo "$as_me:8634: \$? = $ac_status" >&5
8635   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8636   { (eval echo "$as_me:8636: \"$ac_try\"") >&5
8637   (eval $ac_try) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); }; }; then
8641   :
8642 else
8643   echo "$as_me: program exited with status $ac_status" >&5
8644 echo "$as_me: failed program was:" >&5
8645 cat conftest.$ac_ext >&5
8646 ac_cv_header_stdc=no
8647 fi
8648 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8649 fi
8650 fi
8651 fi
8652 echo "$as_me:8652: result: $ac_cv_header_stdc" >&5
8653 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8654 if test $ac_cv_header_stdc = yes; then
8655
8656 cat >>confdefs.h <<\EOF
8657 #define STDC_HEADERS 1
8658 EOF
8659
8660 fi
8661
8662 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8663
8664 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8665                   inttypes.h stdint.h unistd.h
8666 do
8667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8668 echo "$as_me:8668: checking for $ac_header" >&5
8669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8671   echo $ECHO_N "(cached) $ECHO_C" >&6
8672 else
8673   cat >conftest.$ac_ext <<_ACEOF
8674 #line 8674 "configure"
8675 #include "confdefs.h"
8676 $ac_includes_default
8677 #include <$ac_header>
8678 _ACEOF
8679 rm -f conftest.$ac_objext
8680 if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5
8681   (eval $ac_compile) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); } &&
8685          { ac_try='test -s conftest.$ac_objext'
8686   { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687   (eval $ac_try) 2>&5
8688   ac_status=$?
8689   echo "$as_me:8689: \$? = $ac_status" >&5
8690   (exit $ac_status); }; }; then
8691   eval "$as_ac_Header=yes"
8692 else
8693   echo "$as_me: failed program was:" >&5
8694 cat conftest.$ac_ext >&5
8695 eval "$as_ac_Header=no"
8696 fi
8697 rm -f conftest.$ac_objext conftest.$ac_ext
8698 fi
8699 echo "$as_me:8699: result: `eval echo '${'$as_ac_Header'}'`" >&5
8700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8701 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8702   cat >>confdefs.h <<EOF
8703 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8704 EOF
8705
8706 fi
8707 done
8708
8709 echo "$as_me:8709: checking for signed char" >&5
8710 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8711 if test "${ac_cv_type_signed_char+set}" = set; then
8712   echo $ECHO_N "(cached) $ECHO_C" >&6
8713 else
8714   cat >conftest.$ac_ext <<_ACEOF
8715 #line 8715 "configure"
8716 #include "confdefs.h"
8717 $ac_includes_default
8718 int
8719 main ()
8720 {
8721 if ((signed char *) 0)
8722   return 0;
8723 if (sizeof (signed char))
8724   return 0;
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext
8730 if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
8731   (eval $ac_compile) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); } &&
8735          { ac_try='test -s conftest.$ac_objext'
8736   { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737   (eval $ac_try) 2>&5
8738   ac_status=$?
8739   echo "$as_me:8739: \$? = $ac_status" >&5
8740   (exit $ac_status); }; }; then
8741   ac_cv_type_signed_char=yes
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 ac_cv_type_signed_char=no
8746 fi
8747 rm -f conftest.$ac_objext conftest.$ac_ext
8748 fi
8749 echo "$as_me:8749: result: $ac_cv_type_signed_char" >&5
8750 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8751
8752 echo "$as_me:8752: checking size of signed char" >&5
8753 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8754 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8755   echo $ECHO_N "(cached) $ECHO_C" >&6
8756 else
8757   if test "$ac_cv_type_signed_char" = yes; then
8758   if test "$cross_compiling" = yes; then
8759   # Depending upon the size, compute the lo and hi bounds.
8760 cat >conftest.$ac_ext <<_ACEOF
8761 #line 8761 "configure"
8762 #include "confdefs.h"
8763 $ac_includes_default
8764 int
8765 main ()
8766 {
8767 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8768   ;
8769   return 0;
8770 }
8771 _ACEOF
8772 rm -f conftest.$ac_objext
8773 if { (eval echo "$as_me:8773: \"$ac_compile\"") >&5
8774   (eval $ac_compile) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); } &&
8778          { ac_try='test -s conftest.$ac_objext'
8779   { (eval echo "$as_me:8779: \"$ac_try\"") >&5
8780   (eval $ac_try) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); }; }; then
8784   ac_lo=0 ac_mid=0
8785   while :; do
8786     cat >conftest.$ac_ext <<_ACEOF
8787 #line 8787 "configure"
8788 #include "confdefs.h"
8789 $ac_includes_default
8790 int
8791 main ()
8792 {
8793 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8794   ;
8795   return 0;
8796 }
8797 _ACEOF
8798 rm -f conftest.$ac_objext
8799 if { (eval echo "$as_me:8799: \"$ac_compile\"") >&5
8800   (eval $ac_compile) 2>&5
8801   ac_status=$?
8802   echo "$as_me:8802: \$? = $ac_status" >&5
8803   (exit $ac_status); } &&
8804          { ac_try='test -s conftest.$ac_objext'
8805   { (eval echo "$as_me:8805: \"$ac_try\"") >&5
8806   (eval $ac_try) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); }; }; then
8810   ac_hi=$ac_mid; break
8811 else
8812   echo "$as_me: failed program was:" >&5
8813 cat conftest.$ac_ext >&5
8814 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8815 fi
8816 rm -f conftest.$ac_objext conftest.$ac_ext
8817   done
8818 else
8819   echo "$as_me: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 ac_hi=-1 ac_mid=-1
8822   while :; do
8823     cat >conftest.$ac_ext <<_ACEOF
8824 #line 8824 "configure"
8825 #include "confdefs.h"
8826 $ac_includes_default
8827 int
8828 main ()
8829 {
8830 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8831   ;
8832   return 0;
8833 }
8834 _ACEOF
8835 rm -f conftest.$ac_objext
8836 if { (eval echo "$as_me:8836: \"$ac_compile\"") >&5
8837   (eval $ac_compile) 2>&5
8838   ac_status=$?
8839   echo "$as_me:8839: \$? = $ac_status" >&5
8840   (exit $ac_status); } &&
8841          { ac_try='test -s conftest.$ac_objext'
8842   { (eval echo "$as_me:8842: \"$ac_try\"") >&5
8843   (eval $ac_try) 2>&5
8844   ac_status=$?
8845   echo "$as_me:8845: \$? = $ac_status" >&5
8846   (exit $ac_status); }; }; then
8847   ac_lo=$ac_mid; break
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8851 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8852 fi
8853 rm -f conftest.$ac_objext conftest.$ac_ext
8854   done
8855 fi
8856 rm -f conftest.$ac_objext conftest.$ac_ext
8857 # Binary search between lo and hi bounds.
8858 while test "x$ac_lo" != "x$ac_hi"; do
8859   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8860   cat >conftest.$ac_ext <<_ACEOF
8861 #line 8861 "configure"
8862 #include "confdefs.h"
8863 $ac_includes_default
8864 int
8865 main ()
8866 {
8867 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8868   ;
8869   return 0;
8870 }
8871 _ACEOF
8872 rm -f conftest.$ac_objext
8873 if { (eval echo "$as_me:8873: \"$ac_compile\"") >&5
8874   (eval $ac_compile) 2>&5
8875   ac_status=$?
8876   echo "$as_me:8876: \$? = $ac_status" >&5
8877   (exit $ac_status); } &&
8878          { ac_try='test -s conftest.$ac_objext'
8879   { (eval echo "$as_me:8879: \"$ac_try\"") >&5
8880   (eval $ac_try) 2>&5
8881   ac_status=$?
8882   echo "$as_me:8882: \$? = $ac_status" >&5
8883   (exit $ac_status); }; }; then
8884   ac_hi=$ac_mid
8885 else
8886   echo "$as_me: failed program was:" >&5
8887 cat conftest.$ac_ext >&5
8888 ac_lo=`expr $ac_mid + 1`
8889 fi
8890 rm -f conftest.$ac_objext conftest.$ac_ext
8891 done
8892 ac_cv_sizeof_signed_char=$ac_lo
8893 else
8894   if test "$cross_compiling" = yes; then
8895   { { echo "$as_me:8895: error: cannot run test program while cross compiling" >&5
8896 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8897    { (exit 1); exit 1; }; }
8898 else
8899   cat >conftest.$ac_ext <<_ACEOF
8900 #line 8900 "configure"
8901 #include "confdefs.h"
8902 $ac_includes_default
8903 int
8904 main ()
8905 {
8906 FILE *f = fopen ("conftest.val", "w");
8907 if (!f)
8908   $ac_main_return (1);
8909 fprintf (f, "%d", (sizeof (signed char)));
8910 fclose (f);
8911   ;
8912   return 0;
8913 }
8914 _ACEOF
8915 rm -f conftest$ac_exeext
8916 if { (eval echo "$as_me:8916: \"$ac_link\"") >&5
8917   (eval $ac_link) 2>&5
8918   ac_status=$?
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8921   { (eval echo "$as_me:8921: \"$ac_try\"") >&5
8922   (eval $ac_try) 2>&5
8923   ac_status=$?
8924   echo "$as_me:8924: \$? = $ac_status" >&5
8925   (exit $ac_status); }; }; then
8926   ac_cv_sizeof_signed_char=`cat conftest.val`
8927 else
8928   echo "$as_me: program exited with status $ac_status" >&5
8929 echo "$as_me: failed program was:" >&5
8930 cat conftest.$ac_ext >&5
8931 fi
8932 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8933 fi
8934 fi
8935 rm -f conftest.val
8936 else
8937   ac_cv_sizeof_signed_char=0
8938 fi
8939 fi
8940 echo "$as_me:8940: result: $ac_cv_sizeof_signed_char" >&5
8941 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8942 cat >>confdefs.h <<EOF
8943 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8944 EOF
8945
8946 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8947         NCURSES_SBOOL="signed char"
8948 else
8949         NCURSES_SBOOL="char"
8950 fi
8951 echo "$as_me:8951: checking if you want to use signed Boolean array in term.h" >&5
8952 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8953
8954 # Check whether --enable-signed-char or --disable-signed-char was given.
8955 if test "${enable_signed_char+set}" = set; then
8956   enableval="$enable_signed_char"
8957   with_signed_char=$enableval
8958 else
8959   with_signed_char=no
8960 fi;
8961 echo "$as_me:8961: result: $with_signed_char" >&5
8962 echo "${ECHO_T}$with_signed_char" >&6
8963 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8964
8965 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8966 echo "$as_me:8966: checking if you want SIGWINCH handler" >&5
8967 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8968
8969 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8970 if test "${enable_sigwinch+set}" = set; then
8971   enableval="$enable_sigwinch"
8972   with_sigwinch=$enableval
8973 else
8974   with_sigwinch=$with_ext_funcs
8975 fi;
8976 echo "$as_me:8976: result: $with_sigwinch" >&5
8977 echo "${ECHO_T}$with_sigwinch" >&6
8978 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8979 #define USE_SIGWINCH 1
8980 EOF
8981
8982 ###   use option --enable-tcap-names to allow user to define new capabilities
8983 echo "$as_me:8983: checking if you want user-definable terminal capabilities like termcap" >&5
8984 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8985
8986 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8987 if test "${enable_tcap_names+set}" = set; then
8988   enableval="$enable_tcap_names"
8989   with_tcap_names=$enableval
8990 else
8991   with_tcap_names=$with_ext_funcs
8992 fi;
8993 echo "$as_me:8993: result: $with_tcap_names" >&5
8994 echo "${ECHO_T}$with_tcap_names" >&6
8995 NCURSES_XNAMES=0
8996 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8997
8998 ###############################################################################
8999 # These options are relatively safe to experiment with.
9000
9001 echo "$as_me:9001: checking if you want all development code" >&5
9002 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9003
9004 # Check whether --with-develop or --without-develop was given.
9005 if test "${with_develop+set}" = set; then
9006   withval="$with_develop"
9007   with_develop=$withval
9008 else
9009   with_develop=no
9010 fi;
9011 echo "$as_me:9011: result: $with_develop" >&5
9012 echo "${ECHO_T}$with_develop" >&6
9013
9014 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9015 echo "$as_me:9015: checking if you want hard-tabs code" >&5
9016 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9017
9018 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9019 if test "${enable_hard_tabs+set}" = set; then
9020   enableval="$enable_hard_tabs"
9021
9022 else
9023   enable_hard_tabs=$with_develop
9024 fi;
9025 echo "$as_me:9025: result: $enable_hard_tabs" >&5
9026 echo "${ECHO_T}$enable_hard_tabs" >&6
9027 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9028 #define USE_HARD_TABS 1
9029 EOF
9030
9031 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9032 echo "$as_me:9032: checking if you want limited support for xmc" >&5
9033 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9034
9035 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9036 if test "${enable_xmc_glitch+set}" = set; then
9037   enableval="$enable_xmc_glitch"
9038
9039 else
9040   enable_xmc_glitch=$with_develop
9041 fi;
9042 echo "$as_me:9042: result: $enable_xmc_glitch" >&5
9043 echo "${ECHO_T}$enable_xmc_glitch" >&6
9044 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9045 #define USE_XMC_SUPPORT 1
9046 EOF
9047
9048 ###############################################################################
9049 # These are just experimental, probably should not be in a package:
9050
9051 echo "$as_me:9051: checking if you do not want to assume colors are white-on-black" >&5
9052 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9053
9054 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9055 if test "${enable_assumed_color+set}" = set; then
9056   enableval="$enable_assumed_color"
9057   with_assumed_color=$enableval
9058 else
9059   with_assumed_color=yes
9060 fi;
9061 echo "$as_me:9061: result: $with_assumed_color" >&5
9062 echo "${ECHO_T}$with_assumed_color" >&6
9063 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9064 #define USE_ASSUMED_COLOR 1
9065 EOF
9066
9067 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9068 echo "$as_me:9068: checking if you want hashmap scrolling-optimization code" >&5
9069 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9070
9071 # Check whether --enable-hashmap or --disable-hashmap was given.
9072 if test "${enable_hashmap+set}" = set; then
9073   enableval="$enable_hashmap"
9074   with_hashmap=$enableval
9075 else
9076   with_hashmap=yes
9077 fi;
9078 echo "$as_me:9078: result: $with_hashmap" >&5
9079 echo "${ECHO_T}$with_hashmap" >&6
9080 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9081 #define USE_HASHMAP 1
9082 EOF
9083
9084 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9085 echo "$as_me:9085: checking if you want colorfgbg code" >&5
9086 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9087
9088 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9089 if test "${enable_colorfgbg+set}" = set; then
9090   enableval="$enable_colorfgbg"
9091   with_colorfgbg=$enableval
9092 else
9093   with_colorfgbg=no
9094 fi;
9095 echo "$as_me:9095: result: $with_colorfgbg" >&5
9096 echo "${ECHO_T}$with_colorfgbg" >&6
9097 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9098 #define USE_COLORFGBG 1
9099 EOF
9100
9101 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9102 echo "$as_me:9102: checking if you want to use experimental extended colors" >&5
9103 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9104
9105 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9106 if test "${enable_ext_colors+set}" = set; then
9107   enableval="$enable_ext_colors"
9108   with_ext_colors=$enableval
9109 else
9110   with_ext_colors=no
9111 fi;
9112 echo "$as_me:9112: result: $with_ext_colors" >&5
9113 echo "${ECHO_T}$with_ext_colors" >&6
9114 NCURSES_EXT_COLORS=0
9115 if test "$with_ext_colors" = yes ; then
9116         if test "$with_widec" != yes ; then
9117                 { { echo "$as_me:9117: error: This option applies only to wide-character library" >&5
9118 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9119    { (exit 1); exit 1; }; }
9120         else
9121                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9122
9123 if test "${with_abi_version+set}" != set; then
9124         case $cf_cv_rel_version in
9125         5.*)
9126                 cf_cv_rel_version=6.0
9127                 cf_cv_abi_version=6
9128                 { echo "$as_me:9128: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9129 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9130                 ;;
9131         esac
9132 fi
9133
9134         fi
9135         NCURSES_EXT_COLORS=1
9136         cat >>confdefs.h <<\EOF
9137 #define NCURSES_EXT_COLORS 1
9138 EOF
9139
9140 fi
9141
9142 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9143 echo "$as_me:9143: checking if you want to use experimental extended mouse encoding" >&5
9144 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9145
9146 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9147 if test "${enable_ext_mouse+set}" = set; then
9148   enableval="$enable_ext_mouse"
9149   with_ext_mouse=$enableval
9150 else
9151   with_ext_mouse=no
9152 fi;
9153 echo "$as_me:9153: result: $with_ext_mouse" >&5
9154 echo "${ECHO_T}$with_ext_mouse" >&6
9155 NCURSES_MOUSE_VERSION=1
9156 if test "$with_ext_mouse" = yes ; then
9157         NCURSES_MOUSE_VERSION=2
9158
9159 if test "${with_abi_version+set}" != set; then
9160         case $cf_cv_rel_version in
9161         5.*)
9162                 cf_cv_rel_version=6.0
9163                 cf_cv_abi_version=6
9164                 { echo "$as_me:9164: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9165 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9166                 ;;
9167         esac
9168 fi
9169
9170 fi
9171
9172 # Reentrant code has to be opaque; there's little advantage to making ncurses
9173 # opaque outside of that, so there is no --enable-opaque option.
9174 echo "$as_me:9174: checking if you want experimental reentrant code" >&5
9175 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9176
9177 # Check whether --enable-reentrant or --disable-reentrant was given.
9178 if test "${enable_reentrant+set}" = set; then
9179   enableval="$enable_reentrant"
9180   with_reentrant=$enableval
9181 else
9182   with_reentrant=no
9183 fi;
9184 echo "$as_me:9184: result: $with_reentrant" >&5
9185 echo "${ECHO_T}$with_reentrant" >&6
9186 if test "$with_reentrant" = yes ; then
9187         cf_cv_enable_reentrant=1
9188         cf_cv_enable_opaque="NCURSES_INTERNALS"
9189         NCURSES_OPAQUE=1
9190         NCURSES_SIZE_T=int
9191         LIB_SUFFIX="t${LIB_SUFFIX}"
9192         cat >>confdefs.h <<\EOF
9193 #define USE_REENTRANT 1
9194 EOF
9195
9196 if test "${with_abi_version+set}" != set; then
9197         case $cf_cv_rel_version in
9198         5.*)
9199                 cf_cv_rel_version=6.0
9200                 cf_cv_abi_version=6
9201                 { echo "$as_me:9201: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9202 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9203                 ;;
9204         esac
9205 fi
9206
9207 else
9208         cf_cv_enable_reentrant=0
9209         cf_cv_enable_opaque="NCURSES_OPAQUE"
9210         NCURSES_OPAQUE=0
9211         NCURSES_SIZE_T=short
9212 fi
9213
9214 echo "$as_me:9214: checking if you want experimental safe-sprintf code" >&5
9215 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9216
9217 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9218 if test "${enable_safe_sprintf+set}" = set; then
9219   enableval="$enable_safe_sprintf"
9220   with_safe_sprintf=$enableval
9221 else
9222   with_safe_sprintf=no
9223 fi;
9224 echo "$as_me:9224: result: $with_safe_sprintf" >&5
9225 echo "${ECHO_T}$with_safe_sprintf" >&6
9226 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9227 #define USE_SAFE_SPRINTF 1
9228 EOF
9229
9230 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9231 # when hashmap is used scroll hints are useless
9232 if test "$with_hashmap" = no ; then
9233 echo "$as_me:9233: checking if you want to experiment without scrolling-hints code" >&5
9234 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9235
9236 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9237 if test "${enable_scroll_hints+set}" = set; then
9238   enableval="$enable_scroll_hints"
9239   with_scroll_hints=$enableval
9240 else
9241   with_scroll_hints=yes
9242 fi;
9243 echo "$as_me:9243: result: $with_scroll_hints" >&5
9244 echo "${ECHO_T}$with_scroll_hints" >&6
9245 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9246 #define USE_SCROLL_HINTS 1
9247 EOF
9248
9249 fi
9250
9251 echo "$as_me:9251: checking if you want experimental wgetch-events code" >&5
9252 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9253
9254 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9255 if test "${enable_wgetch_events+set}" = set; then
9256   enableval="$enable_wgetch_events"
9257   with_wgetch_events=$enableval
9258 else
9259   with_wgetch_events=no
9260 fi;
9261 echo "$as_me:9261: result: $with_wgetch_events" >&5
9262 echo "${ECHO_T}$with_wgetch_events" >&6
9263 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9264 #define NCURSES_WGETCH_EVENTS 1
9265 EOF
9266
9267 ###############################################################################
9268
9269 ###     use option --disable-echo to suppress full display compiling commands
9270 echo "$as_me:9270: checking if you want to display full commands during build" >&5
9271 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9272
9273 # Check whether --enable-echo or --disable-echo was given.
9274 if test "${enable_echo+set}" = set; then
9275   enableval="$enable_echo"
9276   with_echo=$enableval
9277 else
9278   with_echo=yes
9279 fi;
9280 if test "$with_echo" = yes; then
9281         ECHO_LINK=
9282 else
9283         ECHO_LINK='@ echo linking $@ ... ;'
9284         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9285         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9286 fi
9287 echo "$as_me:9287: result: $with_echo" >&5
9288 echo "${ECHO_T}$with_echo" >&6
9289
9290 ###     use option --enable-warnings to turn on all gcc warnings
9291 echo "$as_me:9291: checking if you want to see compiler warnings" >&5
9292 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9293
9294 # Check whether --enable-warnings or --disable-warnings was given.
9295 if test "${enable_warnings+set}" = set; then
9296   enableval="$enable_warnings"
9297   with_warnings=$enableval
9298 fi;
9299 echo "$as_me:9299: result: $with_warnings" >&5
9300 echo "${ECHO_T}$with_warnings" >&6
9301
9302 if test "x$with_warnings" = "xyes"; then
9303         ADAFLAGS="$ADAFLAGS -gnatg"
9304
9305 INTEL_COMPILER=no
9306
9307 if test "$GCC" = yes ; then
9308         case $host_os in
9309         linux*|gnu*)
9310                 echo "$as_me:9310: checking if this is really Intel C compiler" >&5
9311 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9312                 cf_save_CFLAGS="$CFLAGS"
9313                 CFLAGS="$CFLAGS -no-gcc"
9314                 cat >conftest.$ac_ext <<_ACEOF
9315 #line 9315 "configure"
9316 #include "confdefs.h"
9317
9318 int
9319 main ()
9320 {
9321
9322 #ifdef __INTEL_COMPILER
9323 #else
9324 make an error
9325 #endif
9326
9327   ;
9328   return 0;
9329 }
9330 _ACEOF
9331 rm -f conftest.$ac_objext
9332 if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5
9333   (eval $ac_compile) 2>&5
9334   ac_status=$?
9335   echo "$as_me:9335: \$? = $ac_status" >&5
9336   (exit $ac_status); } &&
9337          { ac_try='test -s conftest.$ac_objext'
9338   { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9339   (eval $ac_try) 2>&5
9340   ac_status=$?
9341   echo "$as_me:9341: \$? = $ac_status" >&5
9342   (exit $ac_status); }; }; then
9343   INTEL_COMPILER=yes
9344 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9345
9346 else
9347   echo "$as_me: failed program was:" >&5
9348 cat conftest.$ac_ext >&5
9349 fi
9350 rm -f conftest.$ac_objext conftest.$ac_ext
9351                 CFLAGS="$cf_save_CFLAGS"
9352                 echo "$as_me:9352: result: $INTEL_COMPILER" >&5
9353 echo "${ECHO_T}$INTEL_COMPILER" >&6
9354                 ;;
9355         esac
9356 fi
9357
9358 cat > conftest.$ac_ext <<EOF
9359 #line 9359 "${as_me-configure}"
9360 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9361 EOF
9362
9363 if test "$INTEL_COMPILER" = yes
9364 then
9365 # The "-wdXXX" options suppress warnings:
9366 # remark #1419: external declaration in primary source file
9367 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9368 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9369 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9370 # remark #193: zero used for undefined preprocessing identifier
9371 # remark #593: variable "curs_sb_left_arrow" was set but never used
9372 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9373 # remark #869: parameter "tw" was never referenced
9374 # remark #981: operands are evaluated in unspecified order
9375 # warning #269: invalid format string conversion
9376
9377         { echo "$as_me:9377: checking for $CC warning options..." >&5
9378 echo "$as_me: checking for $CC warning options..." >&6;}
9379         cf_save_CFLAGS="$CFLAGS"
9380         EXTRA_CFLAGS="-Wall"
9381         for cf_opt in \
9382                 wd1419 \
9383                 wd1682 \
9384                 wd1683 \
9385                 wd1684 \
9386                 wd193 \
9387                 wd279 \
9388                 wd593 \
9389                 wd810 \
9390                 wd869 \
9391                 wd981
9392         do
9393                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9394                 if { (eval echo "$as_me:9394: \"$ac_compile\"") >&5
9395   (eval $ac_compile) 2>&5
9396   ac_status=$?
9397   echo "$as_me:9397: \$? = $ac_status" >&5
9398   (exit $ac_status); }; then
9399                         test -n "$verbose" && echo "$as_me:9399: result: ... -$cf_opt" >&5
9400 echo "${ECHO_T}... -$cf_opt" >&6
9401                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9402                 fi
9403         done
9404         CFLAGS="$cf_save_CFLAGS"
9405
9406 elif test "$GCC" = yes
9407 then
9408         { echo "$as_me:9408: checking for $CC warning options..." >&5
9409 echo "$as_me: checking for $CC warning options..." >&6;}
9410         cf_save_CFLAGS="$CFLAGS"
9411         EXTRA_CFLAGS="-W -Wall"
9412         cf_warn_CONST=""
9413         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9414         for cf_opt in \
9415                 Wbad-function-cast \
9416                 Wcast-align \
9417                 Wcast-qual \
9418                 Winline \
9419                 Wmissing-declarations \
9420                 Wmissing-prototypes \
9421                 Wnested-externs \
9422                 Wpointer-arith \
9423                 Wshadow \
9424                 Wstrict-prototypes \
9425                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9426         do
9427                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9428                 if { (eval echo "$as_me:9428: \"$ac_compile\"") >&5
9429   (eval $ac_compile) 2>&5
9430   ac_status=$?
9431   echo "$as_me:9431: \$? = $ac_status" >&5
9432   (exit $ac_status); }; then
9433                         test -n "$verbose" && echo "$as_me:9433: result: ... -$cf_opt" >&5
9434 echo "${ECHO_T}... -$cf_opt" >&6
9435                         case $cf_opt in #(vi
9436                         Wcast-qual) #(vi
9437                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9438                                 ;;
9439                         Winline) #(vi
9440                                 case $GCC_VERSION in
9441                                 3.3*)
9442                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9443
9444 echo "${as_me-configure}:9444: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9445
9446                                         continue;;
9447                                 esac
9448                                 ;;
9449                         esac
9450                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9451                 fi
9452         done
9453         CFLAGS="$cf_save_CFLAGS"
9454 fi
9455 rm -f conftest*
9456
9457         if test "$cf_with_cxx" = yes ; then
9458
9459 INTEL_CPLUSPLUS=no
9460
9461 if test "$GCC" = yes ; then
9462         case $host_os in
9463         linux*|gnu*)
9464                 echo "$as_me:9464: checking if this is really Intel C++ compiler" >&5
9465 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9466                 cf_save_CFLAGS="$CXXFLAGS"
9467                 CXXFLAGS="$CXXFLAGS -no-gcc"
9468                 cat >conftest.$ac_ext <<_ACEOF
9469 #line 9469 "configure"
9470 #include "confdefs.h"
9471
9472 int
9473 main ()
9474 {
9475
9476 #ifdef __INTEL_COMPILER
9477 #else
9478 make an error
9479 #endif
9480
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f conftest.$ac_objext
9486 if { (eval echo "$as_me:9486: \"$ac_compile\"") >&5
9487   (eval $ac_compile) 2>&5
9488   ac_status=$?
9489   echo "$as_me:9489: \$? = $ac_status" >&5
9490   (exit $ac_status); } &&
9491          { ac_try='test -s conftest.$ac_objext'
9492   { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:9495: \$? = $ac_status" >&5
9496   (exit $ac_status); }; }; then
9497   INTEL_CPLUSPLUS=yes
9498 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9499
9500 else
9501   echo "$as_me: failed program was:" >&5
9502 cat conftest.$ac_ext >&5
9503 fi
9504 rm -f conftest.$ac_objext conftest.$ac_ext
9505                 CXXFLAGS="$cf_save_CFLAGS"
9506                 echo "$as_me:9506: result: $INTEL_CPLUSPLUS" >&5
9507 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9508                 ;;
9509         esac
9510 fi
9511
9512 ac_ext=cc
9513 ac_cpp='$CXXCPP $CPPFLAGS'
9514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9517 ac_main_return=return
9518
9519 cat > conftest.$ac_ext <<EOF
9520 #line 9520 "configure"
9521 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9522 EOF
9523
9524 if test "$INTEL_CPLUSPLUS" = yes
9525 then
9526 # The "-wdXXX" options suppress warnings:
9527 # remark #1419: external declaration in primary source file
9528 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9529 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9530 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9531 # remark #193: zero used for undefined preprocessing identifier
9532 # remark #593: variable "curs_sb_left_arrow" was set but never used
9533 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9534 # remark #869: parameter "tw" was never referenced
9535 # remark #981: operands are evaluated in unspecified order
9536 # warning #269: invalid format string conversion
9537
9538         { echo "$as_me:9538: checking for $CC warning options..." >&5
9539 echo "$as_me: checking for $CC warning options..." >&6;}
9540         cf_save_CXXFLAGS="$CXXFLAGS"
9541         EXTRA_CXXFLAGS="-Wall"
9542         for cf_opt in \
9543                 wd1419 \
9544                 wd1682 \
9545                 wd1683 \
9546                 wd1684 \
9547                 wd193 \
9548                 wd279 \
9549                 wd593 \
9550                 wd810 \
9551                 wd869 \
9552                 wd981
9553         do
9554                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9555                 if { (eval echo "$as_me:9555: \"$ac_compile\"") >&5
9556   (eval $ac_compile) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); }; then
9560                         test -n "$verbose" && echo "$as_me:9560: result: ... -$cf_opt" >&5
9561 echo "${ECHO_T}... -$cf_opt" >&6
9562                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9563                 fi
9564         done
9565         CXXFLAGS="$cf_save_CXXFLAGS"
9566
9567 elif test "$GXX" = yes
9568 then
9569         { echo "$as_me:9569: checking for $CXX warning options..." >&5
9570 echo "$as_me: checking for $CXX warning options..." >&6;}
9571         cf_save_CXXFLAGS="$CXXFLAGS"
9572         EXTRA_CXXFLAGS="-W -Wall"
9573         cf_gxx_extra_warnings=""
9574         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9575         case "$GCC_VERSION" in
9576         [1-2].*)
9577                 ;;
9578         *)
9579                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9580                 ;;
9581         esac
9582         for cf_opt in \
9583                 Wabi \
9584                 fabi-version=0 \
9585                 Woverloaded-virtual \
9586                 Wsign-promo \
9587                 Wsynth \
9588                 Wold-style-cast \
9589                 Wcast-align \
9590                 Wcast-qual \
9591                 Wmissing-prototypes \
9592                 Wpointer-arith \
9593                 Wshadow \
9594                 Wstrict-prototypes \
9595                 Wundef $cf_gxx_extra_warnings Wno-unused
9596         do
9597                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9598                 if { (eval echo "$as_me:9598: \"$ac_compile\"") >&5
9599   (eval $ac_compile) 2>&5
9600   ac_status=$?
9601   echo "$as_me:9601: \$? = $ac_status" >&5
9602   (exit $ac_status); }; then
9603                         test -n "$verbose" && echo "$as_me:9603: result: ... -$cf_opt" >&5
9604 echo "${ECHO_T}... -$cf_opt" >&6
9605                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9606                 else
9607                         test -n "$verbose" && echo "$as_me:9607: result: ... no -$cf_opt" >&5
9608 echo "${ECHO_T}... no -$cf_opt" >&6
9609                 fi
9610         done
9611         CXXFLAGS="$cf_save_CXXFLAGS"
9612 fi
9613
9614 rm -f conftest*
9615 ac_ext=c
9616 ac_cpp='$CPP $CPPFLAGS'
9617 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9618 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9619 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9620 ac_main_return=return
9621
9622         fi
9623 fi
9624
9625 if test "$GCC" = yes
9626 then
9627 cat > conftest.i <<EOF
9628 #ifndef GCC_PRINTF
9629 #define GCC_PRINTF 0
9630 #endif
9631 #ifndef GCC_SCANF
9632 #define GCC_SCANF 0
9633 #endif
9634 #ifndef GCC_NORETURN
9635 #define GCC_NORETURN /* nothing */
9636 #endif
9637 #ifndef GCC_UNUSED
9638 #define GCC_UNUSED /* nothing */
9639 #endif
9640 EOF
9641 if test "$GCC" = yes
9642 then
9643         { echo "$as_me:9643: checking for $CC __attribute__ directives..." >&5
9644 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9645 cat > conftest.$ac_ext <<EOF
9646 #line 9646 "${as_me-configure}"
9647 #include "confdefs.h"
9648 #include "conftest.h"
9649 #include "conftest.i"
9650 #if     GCC_PRINTF
9651 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9652 #else
9653 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9654 #endif
9655 #if     GCC_SCANF
9656 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9657 #else
9658 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9659 #endif
9660 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9661 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9662 extern void foo(void) GCC_NORETURN;
9663 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9664 EOF
9665         for cf_attribute in scanf printf unused noreturn
9666         do
9667
9668 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9669
9670                 cf_directive="__attribute__(($cf_attribute))"
9671                 echo "checking for $CC $cf_directive" 1>&5
9672                 case $cf_attribute in
9673                 scanf|printf)
9674                 cat >conftest.h <<EOF
9675 #define GCC_$cf_ATTRIBUTE 1
9676 EOF
9677                         ;;
9678                 *)
9679                 cat >conftest.h <<EOF
9680 #define GCC_$cf_ATTRIBUTE $cf_directive
9681 EOF
9682                         ;;
9683                 esac
9684                 if { (eval echo "$as_me:9684: \"$ac_compile\"") >&5
9685   (eval $ac_compile) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit $ac_status); }; then
9689                         test -n "$verbose" && echo "$as_me:9689: result: ... $cf_attribute" >&5
9690 echo "${ECHO_T}... $cf_attribute" >&6
9691                         cat conftest.h >>confdefs.h
9692                 fi
9693         done
9694 else
9695         fgrep define conftest.i >>confdefs.h
9696 fi
9697 rm -rf conftest*
9698 fi
9699
9700 ###     use option --enable-assertions to turn on generation of assertion code
9701 echo "$as_me:9701: checking if you want to enable runtime assertions" >&5
9702 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9703
9704 # Check whether --enable-assertions or --disable-assertions was given.
9705 if test "${enable_assertions+set}" = set; then
9706   enableval="$enable_assertions"
9707   with_assertions=$enableval
9708 else
9709   with_assertions=no
9710 fi;
9711 echo "$as_me:9711: result: $with_assertions" >&5
9712 echo "${ECHO_T}$with_assertions" >&6
9713 if test -n "$GCC"
9714 then
9715         if test "$with_assertions" = no
9716         then
9717                 cat >>confdefs.h <<\EOF
9718 #define NDEBUG 1
9719 EOF
9720
9721                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9722         else
9723                 ADAFLAGS="$ADAFLAGS -gnata"
9724         fi
9725 fi
9726
9727 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9728
9729 echo "$as_me:9729: checking if you want to use dmalloc for testing" >&5
9730 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9731
9732 # Check whether --with-dmalloc or --without-dmalloc was given.
9733 if test "${with_dmalloc+set}" = set; then
9734   withval="$with_dmalloc"
9735   cat >>confdefs.h <<\EOF
9736 #define USE_DMALLOC 1
9737 EOF
9738
9739         : ${with_cflags:=-g}
9740         : ${with_no_leaks:=yes}
9741          with_dmalloc=yes
9742 else
9743   with_dmalloc=
9744 fi;
9745 echo "$as_me:9745: result: ${with_dmalloc:-no}" >&5
9746 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9747
9748 case .$with_cflags in #(vi
9749 .*-g*)
9750         case .$CFLAGS in #(vi
9751         .*-g*) #(vi
9752                 ;;
9753         *)
9754
9755 cf_fix_cppflags=no
9756 cf_new_cflags=
9757 cf_new_cppflags=
9758 cf_new_extra_cppflags=
9759
9760 for cf_add_cflags in -g
9761 do
9762 case $cf_fix_cppflags in
9763 no)
9764         case $cf_add_cflags in #(vi
9765         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9766                 case $cf_add_cflags in
9767                 -D*)
9768                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9769
9770                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9771                         && test -z "${cf_tst_cflags}" \
9772                         && cf_fix_cppflags=yes
9773
9774                         if test $cf_fix_cppflags = yes ; then
9775                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9776                                 continue
9777                         elif test "${cf_tst_cflags}" = "\"'" ; then
9778                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9779                                 continue
9780                         fi
9781                         ;;
9782                 esac
9783                 case "$CPPFLAGS" in
9784                 *$cf_add_cflags) #(vi
9785                         ;;
9786                 *) #(vi
9787                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9788                         ;;
9789                 esac
9790                 ;;
9791         *)
9792                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9793                 ;;
9794         esac
9795         ;;
9796 yes)
9797         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9798
9799         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9800
9801         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9802         && test -z "${cf_tst_cflags}" \
9803         && cf_fix_cppflags=no
9804         ;;
9805 esac
9806 done
9807
9808 if test -n "$cf_new_cflags" ; then
9809
9810         CFLAGS="$CFLAGS $cf_new_cflags"
9811 fi
9812
9813 if test -n "$cf_new_cppflags" ; then
9814
9815         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9816 fi
9817
9818 if test -n "$cf_new_extra_cppflags" ; then
9819
9820         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9821 fi
9822
9823                 ;;
9824         esac
9825         ;;
9826 esac
9827
9828 if test "$with_dmalloc" = yes ; then
9829         echo "$as_me:9829: checking for dmalloc.h" >&5
9830 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9831 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9832   echo $ECHO_N "(cached) $ECHO_C" >&6
9833 else
9834   cat >conftest.$ac_ext <<_ACEOF
9835 #line 9835 "configure"
9836 #include "confdefs.h"
9837 #include <dmalloc.h>
9838 _ACEOF
9839 if { (eval echo "$as_me:9839: \"$ac_cpp conftest.$ac_ext\"") >&5
9840   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9841   ac_status=$?
9842   egrep -v '^ *\+' conftest.er1 >conftest.err
9843   rm -f conftest.er1
9844   cat conftest.err >&5
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit $ac_status); } >/dev/null; then
9847   if test -s conftest.err; then
9848     ac_cpp_err=$ac_c_preproc_warn_flag
9849   else
9850     ac_cpp_err=
9851   fi
9852 else
9853   ac_cpp_err=yes
9854 fi
9855 if test -z "$ac_cpp_err"; then
9856   ac_cv_header_dmalloc_h=yes
9857 else
9858   echo "$as_me: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   ac_cv_header_dmalloc_h=no
9861 fi
9862 rm -f conftest.err conftest.$ac_ext
9863 fi
9864 echo "$as_me:9864: result: $ac_cv_header_dmalloc_h" >&5
9865 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9866 if test $ac_cv_header_dmalloc_h = yes; then
9867
9868 echo "$as_me:9868: checking for dmalloc_debug in -ldmalloc" >&5
9869 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9870 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9871   echo $ECHO_N "(cached) $ECHO_C" >&6
9872 else
9873   ac_check_lib_save_LIBS=$LIBS
9874 LIBS="-ldmalloc  $LIBS"
9875 cat >conftest.$ac_ext <<_ACEOF
9876 #line 9876 "configure"
9877 #include "confdefs.h"
9878
9879 /* Override any gcc2 internal prototype to avoid an error.  */
9880 #ifdef __cplusplus
9881 extern "C"
9882 #endif
9883 /* We use char because int might match the return type of a gcc2
9884    builtin and then its argument prototype would still apply.  */
9885 char dmalloc_debug ();
9886 int
9887 main ()
9888 {
9889 dmalloc_debug ();
9890   ;
9891   return 0;
9892 }
9893 _ACEOF
9894 rm -f conftest.$ac_objext conftest$ac_exeext
9895 if { (eval echo "$as_me:9895: \"$ac_link\"") >&5
9896   (eval $ac_link) 2>&5
9897   ac_status=$?
9898   echo "$as_me:9898: \$? = $ac_status" >&5
9899   (exit $ac_status); } &&
9900          { ac_try='test -s conftest$ac_exeext'
9901   { (eval echo "$as_me:9901: \"$ac_try\"") >&5
9902   (eval $ac_try) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); }; }; then
9906   ac_cv_lib_dmalloc_dmalloc_debug=yes
9907 else
9908   echo "$as_me: failed program was:" >&5
9909 cat conftest.$ac_ext >&5
9910 ac_cv_lib_dmalloc_dmalloc_debug=no
9911 fi
9912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9913 LIBS=$ac_check_lib_save_LIBS
9914 fi
9915 echo "$as_me:9915: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9916 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9917 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9918   cat >>confdefs.h <<EOF
9919 #define HAVE_LIBDMALLOC 1
9920 EOF
9921
9922   LIBS="-ldmalloc $LIBS"
9923
9924 fi
9925
9926 fi
9927
9928 fi
9929
9930 echo "$as_me:9930: checking if you want to use dbmalloc for testing" >&5
9931 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9932
9933 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9934 if test "${with_dbmalloc+set}" = set; then
9935   withval="$with_dbmalloc"
9936   cat >>confdefs.h <<\EOF
9937 #define USE_DBMALLOC 1
9938 EOF
9939
9940         : ${with_cflags:=-g}
9941         : ${with_no_leaks:=yes}
9942          with_dbmalloc=yes
9943 else
9944   with_dbmalloc=
9945 fi;
9946 echo "$as_me:9946: result: ${with_dbmalloc:-no}" >&5
9947 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9948
9949 case .$with_cflags in #(vi
9950 .*-g*)
9951         case .$CFLAGS in #(vi
9952         .*-g*) #(vi
9953                 ;;
9954         *)
9955
9956 cf_fix_cppflags=no
9957 cf_new_cflags=
9958 cf_new_cppflags=
9959 cf_new_extra_cppflags=
9960
9961 for cf_add_cflags in -g
9962 do
9963 case $cf_fix_cppflags in
9964 no)
9965         case $cf_add_cflags in #(vi
9966         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9967                 case $cf_add_cflags in
9968                 -D*)
9969                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9970
9971                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9972                         && test -z "${cf_tst_cflags}" \
9973                         && cf_fix_cppflags=yes
9974
9975                         if test $cf_fix_cppflags = yes ; then
9976                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9977                                 continue
9978                         elif test "${cf_tst_cflags}" = "\"'" ; then
9979                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9980                                 continue
9981                         fi
9982                         ;;
9983                 esac
9984                 case "$CPPFLAGS" in
9985                 *$cf_add_cflags) #(vi
9986                         ;;
9987                 *) #(vi
9988                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9989                         ;;
9990                 esac
9991                 ;;
9992         *)
9993                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9994                 ;;
9995         esac
9996         ;;
9997 yes)
9998         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9999
10000         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10001
10002         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10003         && test -z "${cf_tst_cflags}" \
10004         && cf_fix_cppflags=no
10005         ;;
10006 esac
10007 done
10008
10009 if test -n "$cf_new_cflags" ; then
10010
10011         CFLAGS="$CFLAGS $cf_new_cflags"
10012 fi
10013
10014 if test -n "$cf_new_cppflags" ; then
10015
10016         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10017 fi
10018
10019 if test -n "$cf_new_extra_cppflags" ; then
10020
10021         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10022 fi
10023
10024                 ;;
10025         esac
10026         ;;
10027 esac
10028
10029 if test "$with_dbmalloc" = yes ; then
10030         echo "$as_me:10030: checking for dbmalloc.h" >&5
10031 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10032 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10033   echo $ECHO_N "(cached) $ECHO_C" >&6
10034 else
10035   cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038 #include <dbmalloc.h>
10039 _ACEOF
10040 if { (eval echo "$as_me:10040: \"$ac_cpp conftest.$ac_ext\"") >&5
10041   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10042   ac_status=$?
10043   egrep -v '^ *\+' conftest.er1 >conftest.err
10044   rm -f conftest.er1
10045   cat conftest.err >&5
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } >/dev/null; then
10048   if test -s conftest.err; then
10049     ac_cpp_err=$ac_c_preproc_warn_flag
10050   else
10051     ac_cpp_err=
10052   fi
10053 else
10054   ac_cpp_err=yes
10055 fi
10056 if test -z "$ac_cpp_err"; then
10057   ac_cv_header_dbmalloc_h=yes
10058 else
10059   echo "$as_me: failed program was:" >&5
10060   cat conftest.$ac_ext >&5
10061   ac_cv_header_dbmalloc_h=no
10062 fi
10063 rm -f conftest.err conftest.$ac_ext
10064 fi
10065 echo "$as_me:10065: result: $ac_cv_header_dbmalloc_h" >&5
10066 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10067 if test $ac_cv_header_dbmalloc_h = yes; then
10068
10069 echo "$as_me:10069: checking for debug_malloc in -ldbmalloc" >&5
10070 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10071 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10072   echo $ECHO_N "(cached) $ECHO_C" >&6
10073 else
10074   ac_check_lib_save_LIBS=$LIBS
10075 LIBS="-ldbmalloc  $LIBS"
10076 cat >conftest.$ac_ext <<_ACEOF
10077 #line 10077 "configure"
10078 #include "confdefs.h"
10079
10080 /* Override any gcc2 internal prototype to avoid an error.  */
10081 #ifdef __cplusplus
10082 extern "C"
10083 #endif
10084 /* We use char because int might match the return type of a gcc2
10085    builtin and then its argument prototype would still apply.  */
10086 char debug_malloc ();
10087 int
10088 main ()
10089 {
10090 debug_malloc ();
10091   ;
10092   return 0;
10093 }
10094 _ACEOF
10095 rm -f conftest.$ac_objext conftest$ac_exeext
10096 if { (eval echo "$as_me:10096: \"$ac_link\"") >&5
10097   (eval $ac_link) 2>&5
10098   ac_status=$?
10099   echo "$as_me:10099: \$? = $ac_status" >&5
10100   (exit $ac_status); } &&
10101          { ac_try='test -s conftest$ac_exeext'
10102   { (eval echo "$as_me:10102: \"$ac_try\"") >&5
10103   (eval $ac_try) 2>&5
10104   ac_status=$?
10105   echo "$as_me:10105: \$? = $ac_status" >&5
10106   (exit $ac_status); }; }; then
10107   ac_cv_lib_dbmalloc_debug_malloc=yes
10108 else
10109   echo "$as_me: failed program was:" >&5
10110 cat conftest.$ac_ext >&5
10111 ac_cv_lib_dbmalloc_debug_malloc=no
10112 fi
10113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10114 LIBS=$ac_check_lib_save_LIBS
10115 fi
10116 echo "$as_me:10116: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10117 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10118 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10119   cat >>confdefs.h <<EOF
10120 #define HAVE_LIBDBMALLOC 1
10121 EOF
10122
10123   LIBS="-ldbmalloc $LIBS"
10124
10125 fi
10126
10127 fi
10128
10129 fi
10130
10131 echo "$as_me:10131: checking if you want to use valgrind for testing" >&5
10132 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10133
10134 # Check whether --with-valgrind or --without-valgrind was given.
10135 if test "${with_valgrind+set}" = set; then
10136   withval="$with_valgrind"
10137   cat >>confdefs.h <<\EOF
10138 #define USE_VALGRIND 1
10139 EOF
10140
10141         : ${with_cflags:=-g}
10142         : ${with_no_leaks:=yes}
10143          with_valgrind=yes
10144 else
10145   with_valgrind=
10146 fi;
10147 echo "$as_me:10147: result: ${with_valgrind:-no}" >&5
10148 echo "${ECHO_T}${with_valgrind:-no}" >&6
10149
10150 case .$with_cflags in #(vi
10151 .*-g*)
10152         case .$CFLAGS in #(vi
10153         .*-g*) #(vi
10154                 ;;
10155         *)
10156
10157 cf_fix_cppflags=no
10158 cf_new_cflags=
10159 cf_new_cppflags=
10160 cf_new_extra_cppflags=
10161
10162 for cf_add_cflags in -g
10163 do
10164 case $cf_fix_cppflags in
10165 no)
10166         case $cf_add_cflags in #(vi
10167         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10168                 case $cf_add_cflags in
10169                 -D*)
10170                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10171
10172                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10173                         && test -z "${cf_tst_cflags}" \
10174                         && cf_fix_cppflags=yes
10175
10176                         if test $cf_fix_cppflags = yes ; then
10177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10178                                 continue
10179                         elif test "${cf_tst_cflags}" = "\"'" ; then
10180                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10181                                 continue
10182                         fi
10183                         ;;
10184                 esac
10185                 case "$CPPFLAGS" in
10186                 *$cf_add_cflags) #(vi
10187                         ;;
10188                 *) #(vi
10189                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10190                         ;;
10191                 esac
10192                 ;;
10193         *)
10194                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10195                 ;;
10196         esac
10197         ;;
10198 yes)
10199         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10200
10201         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10202
10203         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10204         && test -z "${cf_tst_cflags}" \
10205         && cf_fix_cppflags=no
10206         ;;
10207 esac
10208 done
10209
10210 if test -n "$cf_new_cflags" ; then
10211
10212         CFLAGS="$CFLAGS $cf_new_cflags"
10213 fi
10214
10215 if test -n "$cf_new_cppflags" ; then
10216
10217         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10218 fi
10219
10220 if test -n "$cf_new_extra_cppflags" ; then
10221
10222         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10223 fi
10224
10225                 ;;
10226         esac
10227         ;;
10228 esac
10229
10230 echo "$as_me:10230: checking if you want to perform memory-leak testing" >&5
10231 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10232
10233 # Check whether --enable-leaks or --disable-leaks was given.
10234 if test "${enable_leaks+set}" = set; then
10235   enableval="$enable_leaks"
10236   with_no_leaks=yes
10237 else
10238   : ${with_no_leaks:=no}
10239 fi;
10240 echo "$as_me:10240: result: $with_no_leaks" >&5
10241 echo "${ECHO_T}$with_no_leaks" >&6
10242
10243 if test "$with_no_leaks" = yes ; then
10244         cat >>confdefs.h <<\EOF
10245 #define NO_LEAKS 1
10246 EOF
10247
10248 fi
10249
10250 cat >>confdefs.h <<\EOF
10251 #define HAVE_NC_ALLOC_H 1
10252 EOF
10253
10254 ###     use option --enable-expanded to generate certain macros as functions
10255
10256 # Check whether --enable-expanded or --disable-expanded was given.
10257 if test "${enable_expanded+set}" = set; then
10258   enableval="$enable_expanded"
10259   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10260 #define NCURSES_EXPANDED 1
10261 EOF
10262
10263 fi;
10264
10265 ###     use option --disable-macros to suppress macros in favor of functions
10266
10267 # Check whether --enable-macros or --disable-macros was given.
10268 if test "${enable_macros+set}" = set; then
10269   enableval="$enable_macros"
10270   test "$enableval" = no && cat >>confdefs.h <<\EOF
10271 #define NCURSES_NOMACROS 1
10272 EOF
10273
10274 fi;
10275
10276 # Normally we only add trace() to the debug-library.  Allow this to be
10277 # extended to all models of the ncurses library:
10278 cf_all_traces=no
10279 case "$CFLAGS $CPPFLAGS" in
10280 *-DTRACE*)
10281         cf_all_traces=yes
10282         ;;
10283 esac
10284
10285 echo "$as_me:10285: checking whether to add trace feature to all models" >&5
10286 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10287
10288 # Check whether --with-trace or --without-trace was given.
10289 if test "${with_trace+set}" = set; then
10290   withval="$with_trace"
10291   cf_with_trace=$withval
10292 else
10293   cf_with_trace=$cf_all_traces
10294 fi;
10295 echo "$as_me:10295: result: $cf_with_trace" >&5
10296 echo "${ECHO_T}$cf_with_trace" >&6
10297
10298 if test "$cf_with_trace" = yes ; then
10299         LIB_TRACING=all
10300         ADA_TRACE=TRUE
10301
10302 cf_fix_cppflags=no
10303 cf_new_cflags=
10304 cf_new_cppflags=
10305 cf_new_extra_cppflags=
10306
10307 for cf_add_cflags in -DTRACE
10308 do
10309 case $cf_fix_cppflags in
10310 no)
10311         case $cf_add_cflags in #(vi
10312         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10313                 case $cf_add_cflags in
10314                 -D*)
10315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10316
10317                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10318                         && test -z "${cf_tst_cflags}" \
10319                         && cf_fix_cppflags=yes
10320
10321                         if test $cf_fix_cppflags = yes ; then
10322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10323                                 continue
10324                         elif test "${cf_tst_cflags}" = "\"'" ; then
10325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10326                                 continue
10327                         fi
10328                         ;;
10329                 esac
10330                 case "$CPPFLAGS" in
10331                 *$cf_add_cflags) #(vi
10332                         ;;
10333                 *) #(vi
10334                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10335                         ;;
10336                 esac
10337                 ;;
10338         *)
10339                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10340                 ;;
10341         esac
10342         ;;
10343 yes)
10344         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10345
10346         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10347
10348         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10349         && test -z "${cf_tst_cflags}" \
10350         && cf_fix_cppflags=no
10351         ;;
10352 esac
10353 done
10354
10355 if test -n "$cf_new_cflags" ; then
10356
10357         CFLAGS="$CFLAGS $cf_new_cflags"
10358 fi
10359
10360 if test -n "$cf_new_cppflags" ; then
10361
10362         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10363 fi
10364
10365 if test -n "$cf_new_extra_cppflags" ; then
10366
10367         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10368 fi
10369
10370 else
10371         LIB_TRACING=DEBUG
10372         ADA_TRACE=FALSE
10373 fi
10374
10375 ###     Checks for libraries.
10376 echo "$as_me:10376: checking for gettimeofday" >&5
10377 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10378 if test "${ac_cv_func_gettimeofday+set}" = set; then
10379   echo $ECHO_N "(cached) $ECHO_C" >&6
10380 else
10381   cat >conftest.$ac_ext <<_ACEOF
10382 #line 10382 "configure"
10383 #include "confdefs.h"
10384 /* System header to define __stub macros and hopefully few prototypes,
10385     which can conflict with char gettimeofday (); below.  */
10386 #include <assert.h>
10387 /* Override any gcc2 internal prototype to avoid an error.  */
10388 #ifdef __cplusplus
10389 extern "C"
10390 #endif
10391 /* We use char because int might match the return type of a gcc2
10392    builtin and then its argument prototype would still apply.  */
10393 char gettimeofday ();
10394 char (*f) ();
10395
10396 int
10397 main ()
10398 {
10399 /* The GNU C library defines this for functions which it implements
10400     to always fail with ENOSYS.  Some functions are actually named
10401     something starting with __ and the normal name is an alias.  */
10402 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10403 choke me
10404 #else
10405 f = gettimeofday;
10406 #endif
10407
10408   ;
10409   return 0;
10410 }
10411 _ACEOF
10412 rm -f conftest.$ac_objext conftest$ac_exeext
10413 if { (eval echo "$as_me:10413: \"$ac_link\"") >&5
10414   (eval $ac_link) 2>&5
10415   ac_status=$?
10416   echo "$as_me:10416: \$? = $ac_status" >&5
10417   (exit $ac_status); } &&
10418          { ac_try='test -s conftest$ac_exeext'
10419   { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420   (eval $ac_try) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); }; }; then
10424   ac_cv_func_gettimeofday=yes
10425 else
10426   echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 ac_cv_func_gettimeofday=no
10429 fi
10430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10431 fi
10432 echo "$as_me:10432: result: $ac_cv_func_gettimeofday" >&5
10433 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10434 if test $ac_cv_func_gettimeofday = yes; then
10435   cat >>confdefs.h <<\EOF
10436 #define HAVE_GETTIMEOFDAY 1
10437 EOF
10438
10439 else
10440
10441 echo "$as_me:10441: checking for gettimeofday in -lbsd" >&5
10442 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10443 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10444   echo $ECHO_N "(cached) $ECHO_C" >&6
10445 else
10446   ac_check_lib_save_LIBS=$LIBS
10447 LIBS="-lbsd  $LIBS"
10448 cat >conftest.$ac_ext <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451
10452 /* Override any gcc2 internal prototype to avoid an error.  */
10453 #ifdef __cplusplus
10454 extern "C"
10455 #endif
10456 /* We use char because int might match the return type of a gcc2
10457    builtin and then its argument prototype would still apply.  */
10458 char gettimeofday ();
10459 int
10460 main ()
10461 {
10462 gettimeofday ();
10463   ;
10464   return 0;
10465 }
10466 _ACEOF
10467 rm -f conftest.$ac_objext conftest$ac_exeext
10468 if { (eval echo "$as_me:10468: \"$ac_link\"") >&5
10469   (eval $ac_link) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit $ac_status); } &&
10473          { ac_try='test -s conftest$ac_exeext'
10474   { (eval echo "$as_me:10474: \"$ac_try\"") >&5
10475   (eval $ac_try) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); }; }; then
10479   ac_cv_lib_bsd_gettimeofday=yes
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 cat conftest.$ac_ext >&5
10483 ac_cv_lib_bsd_gettimeofday=no
10484 fi
10485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10486 LIBS=$ac_check_lib_save_LIBS
10487 fi
10488 echo "$as_me:10488: result: $ac_cv_lib_bsd_gettimeofday" >&5
10489 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10490 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10491   cat >>confdefs.h <<\EOF
10492 #define HAVE_GETTIMEOFDAY 1
10493 EOF
10494
10495         LIBS="$LIBS -lbsd"
10496 fi
10497
10498 fi
10499
10500 echo "$as_me:10500: checking if -lm needed for math functions" >&5
10501 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10502 if test "${cf_cv_need_libm+set}" = set; then
10503   echo $ECHO_N "(cached) $ECHO_C" >&6
10504 else
10505
10506         cat >conftest.$ac_ext <<_ACEOF
10507 #line 10507 "configure"
10508 #include "confdefs.h"
10509
10510         #include <stdio.h>
10511         #include <math.h>
10512
10513 int
10514 main ()
10515 {
10516 double x = rand(); printf("result = %g\n", sin(x))
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 rm -f conftest.$ac_objext conftest$ac_exeext
10522 if { (eval echo "$as_me:10522: \"$ac_link\"") >&5
10523   (eval $ac_link) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); } &&
10527          { ac_try='test -s conftest$ac_exeext'
10528   { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529   (eval $ac_try) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); }; }; then
10533   cf_cv_need_libm=no
10534 else
10535   echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 cf_cv_need_libm=yes
10538 fi
10539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10540 fi
10541 echo "$as_me:10541: result: $cf_cv_need_libm" >&5
10542 echo "${ECHO_T}$cf_cv_need_libm" >&6
10543 if test "$cf_cv_need_libm" = yes
10544 then
10545 MATH_LIB=-lm
10546 fi
10547
10548 ###     Checks for header files.
10549 echo "$as_me:10549: checking for ANSI C header files" >&5
10550 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10551 if test "${ac_cv_header_stdc+set}" = set; then
10552   echo $ECHO_N "(cached) $ECHO_C" >&6
10553 else
10554   cat >conftest.$ac_ext <<_ACEOF
10555 #line 10555 "configure"
10556 #include "confdefs.h"
10557 #include <stdlib.h>
10558 #include <stdarg.h>
10559 #include <string.h>
10560 #include <float.h>
10561
10562 _ACEOF
10563 if { (eval echo "$as_me:10563: \"$ac_cpp conftest.$ac_ext\"") >&5
10564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10565   ac_status=$?
10566   egrep -v '^ *\+' conftest.er1 >conftest.err
10567   rm -f conftest.er1
10568   cat conftest.err >&5
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit $ac_status); } >/dev/null; then
10571   if test -s conftest.err; then
10572     ac_cpp_err=$ac_c_preproc_warn_flag
10573   else
10574     ac_cpp_err=
10575   fi
10576 else
10577   ac_cpp_err=yes
10578 fi
10579 if test -z "$ac_cpp_err"; then
10580   ac_cv_header_stdc=yes
10581 else
10582   echo "$as_me: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   ac_cv_header_stdc=no
10585 fi
10586 rm -f conftest.err conftest.$ac_ext
10587
10588 if test $ac_cv_header_stdc = yes; then
10589   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10590   cat >conftest.$ac_ext <<_ACEOF
10591 #line 10591 "configure"
10592 #include "confdefs.h"
10593 #include <string.h>
10594
10595 _ACEOF
10596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10597   egrep "memchr" >/dev/null 2>&1; then
10598   :
10599 else
10600   ac_cv_header_stdc=no
10601 fi
10602 rm -f conftest*
10603
10604 fi
10605
10606 if test $ac_cv_header_stdc = yes; then
10607   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10608   cat >conftest.$ac_ext <<_ACEOF
10609 #line 10609 "configure"
10610 #include "confdefs.h"
10611 #include <stdlib.h>
10612
10613 _ACEOF
10614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10615   egrep "free" >/dev/null 2>&1; then
10616   :
10617 else
10618   ac_cv_header_stdc=no
10619 fi
10620 rm -f conftest*
10621
10622 fi
10623
10624 if test $ac_cv_header_stdc = yes; then
10625   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10626   if test "$cross_compiling" = yes; then
10627   :
10628 else
10629   cat >conftest.$ac_ext <<_ACEOF
10630 #line 10630 "configure"
10631 #include "confdefs.h"
10632 #include <ctype.h>
10633 #if ((' ' & 0x0FF) == 0x020)
10634 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10635 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10636 #else
10637 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10638                      || ('j' <= (c) && (c) <= 'r') \
10639                      || ('s' <= (c) && (c) <= 'z'))
10640 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10641 #endif
10642
10643 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10644 int
10645 main ()
10646 {
10647   int i;
10648   for (i = 0; i < 256; i++)
10649     if (XOR (islower (i), ISLOWER (i))
10650         || toupper (i) != TOUPPER (i))
10651       $ac_main_return(2);
10652   $ac_main_return (0);
10653 }
10654 _ACEOF
10655 rm -f conftest$ac_exeext
10656 if { (eval echo "$as_me:10656: \"$ac_link\"") >&5
10657   (eval $ac_link) 2>&5
10658   ac_status=$?
10659   echo "$as_me:10659: \$? = $ac_status" >&5
10660   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10661   { (eval echo "$as_me:10661: \"$ac_try\"") >&5
10662   (eval $ac_try) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); }; }; then
10666   :
10667 else
10668   echo "$as_me: program exited with status $ac_status" >&5
10669 echo "$as_me: failed program was:" >&5
10670 cat conftest.$ac_ext >&5
10671 ac_cv_header_stdc=no
10672 fi
10673 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10674 fi
10675 fi
10676 fi
10677 echo "$as_me:10677: result: $ac_cv_header_stdc" >&5
10678 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10679 if test $ac_cv_header_stdc = yes; then
10680
10681 cat >>confdefs.h <<\EOF
10682 #define STDC_HEADERS 1
10683 EOF
10684
10685 fi
10686
10687 ac_header_dirent=no
10688 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10689   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10690 echo "$as_me:10690: checking for $ac_hdr that defines DIR" >&5
10691 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10692 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695   cat >conftest.$ac_ext <<_ACEOF
10696 #line 10696 "configure"
10697 #include "confdefs.h"
10698 #include <sys/types.h>
10699 #include <$ac_hdr>
10700
10701 int
10702 main ()
10703 {
10704 if ((DIR *) 0)
10705 return 0;
10706   ;
10707   return 0;
10708 }
10709 _ACEOF
10710 rm -f conftest.$ac_objext
10711 if { (eval echo "$as_me:10711: \"$ac_compile\"") >&5
10712   (eval $ac_compile) 2>&5
10713   ac_status=$?
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit $ac_status); } &&
10716          { ac_try='test -s conftest.$ac_objext'
10717   { (eval echo "$as_me:10717: \"$ac_try\"") >&5
10718   (eval $ac_try) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); }; }; then
10722   eval "$as_ac_Header=yes"
10723 else
10724   echo "$as_me: failed program was:" >&5
10725 cat conftest.$ac_ext >&5
10726 eval "$as_ac_Header=no"
10727 fi
10728 rm -f conftest.$ac_objext conftest.$ac_ext
10729 fi
10730 echo "$as_me:10730: result: `eval echo '${'$as_ac_Header'}'`" >&5
10731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10733   cat >>confdefs.h <<EOF
10734 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10735 EOF
10736
10737 ac_header_dirent=$ac_hdr; break
10738 fi
10739
10740 done
10741 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10742 if test $ac_header_dirent = dirent.h; then
10743   echo "$as_me:10743: checking for opendir in -ldir" >&5
10744 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10745 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10746   echo $ECHO_N "(cached) $ECHO_C" >&6
10747 else
10748   ac_check_lib_save_LIBS=$LIBS
10749 LIBS="-ldir  $LIBS"
10750 cat >conftest.$ac_ext <<_ACEOF
10751 #line 10751 "configure"
10752 #include "confdefs.h"
10753
10754 /* Override any gcc2 internal prototype to avoid an error.  */
10755 #ifdef __cplusplus
10756 extern "C"
10757 #endif
10758 /* We use char because int might match the return type of a gcc2
10759    builtin and then its argument prototype would still apply.  */
10760 char opendir ();
10761 int
10762 main ()
10763 {
10764 opendir ();
10765   ;
10766   return 0;
10767 }
10768 _ACEOF
10769 rm -f conftest.$ac_objext conftest$ac_exeext
10770 if { (eval echo "$as_me:10770: \"$ac_link\"") >&5
10771   (eval $ac_link) 2>&5
10772   ac_status=$?
10773   echo "$as_me:10773: \$? = $ac_status" >&5
10774   (exit $ac_status); } &&
10775          { ac_try='test -s conftest$ac_exeext'
10776   { (eval echo "$as_me:10776: \"$ac_try\"") >&5
10777   (eval $ac_try) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); }; }; then
10781   ac_cv_lib_dir_opendir=yes
10782 else
10783   echo "$as_me: failed program was:" >&5
10784 cat conftest.$ac_ext >&5
10785 ac_cv_lib_dir_opendir=no
10786 fi
10787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10788 LIBS=$ac_check_lib_save_LIBS
10789 fi
10790 echo "$as_me:10790: result: $ac_cv_lib_dir_opendir" >&5
10791 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10792 if test $ac_cv_lib_dir_opendir = yes; then
10793   LIBS="$LIBS -ldir"
10794 fi
10795
10796 else
10797   echo "$as_me:10797: checking for opendir in -lx" >&5
10798 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10799 if test "${ac_cv_lib_x_opendir+set}" = set; then
10800   echo $ECHO_N "(cached) $ECHO_C" >&6
10801 else
10802   ac_check_lib_save_LIBS=$LIBS
10803 LIBS="-lx  $LIBS"
10804 cat >conftest.$ac_ext <<_ACEOF
10805 #line 10805 "configure"
10806 #include "confdefs.h"
10807
10808 /* Override any gcc2 internal prototype to avoid an error.  */
10809 #ifdef __cplusplus
10810 extern "C"
10811 #endif
10812 /* We use char because int might match the return type of a gcc2
10813    builtin and then its argument prototype would still apply.  */
10814 char opendir ();
10815 int
10816 main ()
10817 {
10818 opendir ();
10819   ;
10820   return 0;
10821 }
10822 _ACEOF
10823 rm -f conftest.$ac_objext conftest$ac_exeext
10824 if { (eval echo "$as_me:10824: \"$ac_link\"") >&5
10825   (eval $ac_link) 2>&5
10826   ac_status=$?
10827   echo "$as_me:10827: \$? = $ac_status" >&5
10828   (exit $ac_status); } &&
10829          { ac_try='test -s conftest$ac_exeext'
10830   { (eval echo "$as_me:10830: \"$ac_try\"") >&5
10831   (eval $ac_try) 2>&5
10832   ac_status=$?
10833   echo "$as_me:10833: \$? = $ac_status" >&5
10834   (exit $ac_status); }; }; then
10835   ac_cv_lib_x_opendir=yes
10836 else
10837   echo "$as_me: failed program was:" >&5
10838 cat conftest.$ac_ext >&5
10839 ac_cv_lib_x_opendir=no
10840 fi
10841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10842 LIBS=$ac_check_lib_save_LIBS
10843 fi
10844 echo "$as_me:10844: result: $ac_cv_lib_x_opendir" >&5
10845 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10846 if test $ac_cv_lib_x_opendir = yes; then
10847   LIBS="$LIBS -lx"
10848 fi
10849
10850 fi
10851
10852 echo "$as_me:10852: checking whether time.h and sys/time.h may both be included" >&5
10853 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10854 if test "${ac_cv_header_time+set}" = set; then
10855   echo $ECHO_N "(cached) $ECHO_C" >&6
10856 else
10857   cat >conftest.$ac_ext <<_ACEOF
10858 #line 10858 "configure"
10859 #include "confdefs.h"
10860 #include <sys/types.h>
10861 #include <sys/time.h>
10862 #include <time.h>
10863
10864 int
10865 main ()
10866 {
10867 if ((struct tm *) 0)
10868 return 0;
10869   ;
10870   return 0;
10871 }
10872 _ACEOF
10873 rm -f conftest.$ac_objext
10874 if { (eval echo "$as_me:10874: \"$ac_compile\"") >&5
10875   (eval $ac_compile) 2>&5
10876   ac_status=$?
10877   echo "$as_me:10877: \$? = $ac_status" >&5
10878   (exit $ac_status); } &&
10879          { ac_try='test -s conftest.$ac_objext'
10880   { (eval echo "$as_me:10880: \"$ac_try\"") >&5
10881   (eval $ac_try) 2>&5
10882   ac_status=$?
10883   echo "$as_me:10883: \$? = $ac_status" >&5
10884   (exit $ac_status); }; }; then
10885   ac_cv_header_time=yes
10886 else
10887   echo "$as_me: failed program was:" >&5
10888 cat conftest.$ac_ext >&5
10889 ac_cv_header_time=no
10890 fi
10891 rm -f conftest.$ac_objext conftest.$ac_ext
10892 fi
10893 echo "$as_me:10893: result: $ac_cv_header_time" >&5
10894 echo "${ECHO_T}$ac_cv_header_time" >&6
10895 if test $ac_cv_header_time = yes; then
10896
10897 cat >>confdefs.h <<\EOF
10898 #define TIME_WITH_SYS_TIME 1
10899 EOF
10900
10901 fi
10902
10903 echo "$as_me:10903: checking for regular-expression headers" >&5
10904 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10905 if test "${cf_cv_regex+set}" = set; then
10906   echo $ECHO_N "(cached) $ECHO_C" >&6
10907 else
10908
10909 cat >conftest.$ac_ext <<_ACEOF
10910 #line 10910 "configure"
10911 #include "confdefs.h"
10912 #include <sys/types.h>
10913 #include <regex.h>
10914 int
10915 main ()
10916 {
10917
10918         regex_t *p;
10919         int x = regcomp(p, "", 0);
10920         int y = regexec(p, "", 0, 0, 0);
10921         regfree(p);
10922
10923   ;
10924   return 0;
10925 }
10926 _ACEOF
10927 rm -f conftest.$ac_objext conftest$ac_exeext
10928 if { (eval echo "$as_me:10928: \"$ac_link\"") >&5
10929   (eval $ac_link) 2>&5
10930   ac_status=$?
10931   echo "$as_me:10931: \$? = $ac_status" >&5
10932   (exit $ac_status); } &&
10933          { ac_try='test -s conftest$ac_exeext'
10934   { (eval echo "$as_me:10934: \"$ac_try\"") >&5
10935   (eval $ac_try) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); }; }; then
10939   cf_cv_regex="regex.h"
10940 else
10941   echo "$as_me: failed program was:" >&5
10942 cat conftest.$ac_ext >&5
10943
10944         cat >conftest.$ac_ext <<_ACEOF
10945 #line 10945 "configure"
10946 #include "confdefs.h"
10947 #include <regexp.h>
10948 int
10949 main ()
10950 {
10951
10952                 char *p = compile("", "", "", 0);
10953                 int x = step("", "");
10954
10955   ;
10956   return 0;
10957 }
10958 _ACEOF
10959 rm -f conftest.$ac_objext conftest$ac_exeext
10960 if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
10961   (eval $ac_link) 2>&5
10962   ac_status=$?
10963   echo "$as_me:10963: \$? = $ac_status" >&5
10964   (exit $ac_status); } &&
10965          { ac_try='test -s conftest$ac_exeext'
10966   { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967   (eval $ac_try) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit $ac_status); }; }; then
10971   cf_cv_regex="regexp.h"
10972 else
10973   echo "$as_me: failed program was:" >&5
10974 cat conftest.$ac_ext >&5
10975
10976                 cf_save_LIBS="$LIBS"
10977                 LIBS="-lgen $LIBS"
10978                 cat >conftest.$ac_ext <<_ACEOF
10979 #line 10979 "configure"
10980 #include "confdefs.h"
10981 #include <regexpr.h>
10982 int
10983 main ()
10984 {
10985
10986                         char *p = compile("", "", "");
10987                         int x = step("", "");
10988
10989   ;
10990   return 0;
10991 }
10992 _ACEOF
10993 rm -f conftest.$ac_objext conftest$ac_exeext
10994 if { (eval echo "$as_me:10994: \"$ac_link\"") >&5
10995   (eval $ac_link) 2>&5
10996   ac_status=$?
10997   echo "$as_me:10997: \$? = $ac_status" >&5
10998   (exit $ac_status); } &&
10999          { ac_try='test -s conftest$ac_exeext'
11000   { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001   (eval $ac_try) 2>&5
11002   ac_status=$?
11003   echo "$as_me:11003: \$? = $ac_status" >&5
11004   (exit $ac_status); }; }; then
11005   cf_cv_regex="regexpr.h"
11006 else
11007   echo "$as_me: failed program was:" >&5
11008 cat conftest.$ac_ext >&5
11009 LIBS="$cf_save_LIBS"
11010 fi
11011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11012 fi
11013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11014 fi
11015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11016
11017 fi
11018
11019 echo "$as_me:11019: result: $cf_cv_regex" >&5
11020 echo "${ECHO_T}$cf_cv_regex" >&6
11021 case $cf_cv_regex in
11022         regex.h)   cat >>confdefs.h <<\EOF
11023 #define HAVE_REGEX_H_FUNCS 1
11024 EOF
11025  ;;
11026         regexp.h)  cat >>confdefs.h <<\EOF
11027 #define HAVE_REGEXP_H_FUNCS 1
11028 EOF
11029  ;;
11030         regexpr.h) cat >>confdefs.h <<\EOF
11031 #define HAVE_REGEXPR_H_FUNCS 1
11032 EOF
11033  ;;
11034 esac
11035
11036 for ac_header in \
11037 fcntl.h \
11038 getopt.h \
11039 limits.h \
11040 locale.h \
11041 poll.h \
11042 sys/bsdtypes.h \
11043 sys/ioctl.h \
11044 sys/param.h \
11045 sys/poll.h \
11046 sys/select.h \
11047 sys/time.h \
11048 sys/times.h \
11049 ttyent.h \
11050 unistd.h \
11051 wctype.h \
11052
11053 do
11054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11055 echo "$as_me:11055: checking for $ac_header" >&5
11056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11058   echo $ECHO_N "(cached) $ECHO_C" >&6
11059 else
11060   cat >conftest.$ac_ext <<_ACEOF
11061 #line 11061 "configure"
11062 #include "confdefs.h"
11063 #include <$ac_header>
11064 _ACEOF
11065 if { (eval echo "$as_me:11065: \"$ac_cpp conftest.$ac_ext\"") >&5
11066   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11067   ac_status=$?
11068   egrep -v '^ *\+' conftest.er1 >conftest.err
11069   rm -f conftest.er1
11070   cat conftest.err >&5
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit $ac_status); } >/dev/null; then
11073   if test -s conftest.err; then
11074     ac_cpp_err=$ac_c_preproc_warn_flag
11075   else
11076     ac_cpp_err=
11077   fi
11078 else
11079   ac_cpp_err=yes
11080 fi
11081 if test -z "$ac_cpp_err"; then
11082   eval "$as_ac_Header=yes"
11083 else
11084   echo "$as_me: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   eval "$as_ac_Header=no"
11087 fi
11088 rm -f conftest.err conftest.$ac_ext
11089 fi
11090 echo "$as_me:11090: result: `eval echo '${'$as_ac_Header'}'`" >&5
11091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11092 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11093   cat >>confdefs.h <<EOF
11094 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11095 EOF
11096
11097 fi
11098 done
11099
11100 # check for ISC (this may also define _POSIX_SOURCE)
11101 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11102 if test "$ISC" = yes ; then
11103
11104 echo "$as_me:11104: checking for main in -lcposix" >&5
11105 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11106 if test "${ac_cv_lib_cposix_main+set}" = set; then
11107   echo $ECHO_N "(cached) $ECHO_C" >&6
11108 else
11109   ac_check_lib_save_LIBS=$LIBS
11110 LIBS="-lcposix  $LIBS"
11111 cat >conftest.$ac_ext <<_ACEOF
11112 #line 11112 "configure"
11113 #include "confdefs.h"
11114
11115 int
11116 main ()
11117 {
11118 main ();
11119   ;
11120   return 0;
11121 }
11122 _ACEOF
11123 rm -f conftest.$ac_objext conftest$ac_exeext
11124 if { (eval echo "$as_me:11124: \"$ac_link\"") >&5
11125   (eval $ac_link) 2>&5
11126   ac_status=$?
11127   echo "$as_me:11127: \$? = $ac_status" >&5
11128   (exit $ac_status); } &&
11129          { ac_try='test -s conftest$ac_exeext'
11130   { (eval echo "$as_me:11130: \"$ac_try\"") >&5
11131   (eval $ac_try) 2>&5
11132   ac_status=$?
11133   echo "$as_me:11133: \$? = $ac_status" >&5
11134   (exit $ac_status); }; }; then
11135   ac_cv_lib_cposix_main=yes
11136 else
11137   echo "$as_me: failed program was:" >&5
11138 cat conftest.$ac_ext >&5
11139 ac_cv_lib_cposix_main=no
11140 fi
11141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11142 LIBS=$ac_check_lib_save_LIBS
11143 fi
11144 echo "$as_me:11144: result: $ac_cv_lib_cposix_main" >&5
11145 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11146 if test $ac_cv_lib_cposix_main = yes; then
11147   cat >>confdefs.h <<EOF
11148 #define HAVE_LIBCPOSIX 1
11149 EOF
11150
11151   LIBS="-lcposix $LIBS"
11152
11153 fi
11154
11155         echo "$as_me:11155: checking for bzero in -linet" >&5
11156 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11157 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11158   echo $ECHO_N "(cached) $ECHO_C" >&6
11159 else
11160   ac_check_lib_save_LIBS=$LIBS
11161 LIBS="-linet  $LIBS"
11162 cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165
11166 /* Override any gcc2 internal prototype to avoid an error.  */
11167 #ifdef __cplusplus
11168 extern "C"
11169 #endif
11170 /* We use char because int might match the return type of a gcc2
11171    builtin and then its argument prototype would still apply.  */
11172 char bzero ();
11173 int
11174 main ()
11175 {
11176 bzero ();
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext conftest$ac_exeext
11182 if { (eval echo "$as_me:11182: \"$ac_link\"") >&5
11183   (eval $ac_link) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit $ac_status); } &&
11187          { ac_try='test -s conftest$ac_exeext'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); }; }; then
11193   ac_cv_lib_inet_bzero=yes
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 ac_cv_lib_inet_bzero=no
11198 fi
11199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11200 LIBS=$ac_check_lib_save_LIBS
11201 fi
11202 echo "$as_me:11202: result: $ac_cv_lib_inet_bzero" >&5
11203 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11204 if test $ac_cv_lib_inet_bzero = yes; then
11205   LIBS="$LIBS -linet"
11206 fi
11207 fi
11208
11209 echo "$as_me:11209: checking if sys/time.h works with sys/select.h" >&5
11210 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11211 if test "${cf_cv_sys_time_select+set}" = set; then
11212   echo $ECHO_N "(cached) $ECHO_C" >&6
11213 else
11214
11215 cat >conftest.$ac_ext <<_ACEOF
11216 #line 11216 "configure"
11217 #include "confdefs.h"
11218
11219 #include <sys/types.h>
11220 #ifdef HAVE_SYS_TIME_H
11221 #include <sys/time.h>
11222 #endif
11223 #ifdef HAVE_SYS_SELECT_H
11224 #include <sys/select.h>
11225 #endif
11226
11227 int
11228 main ()
11229 {
11230
11231   ;
11232   return 0;
11233 }
11234 _ACEOF
11235 rm -f conftest.$ac_objext
11236 if { (eval echo "$as_me:11236: \"$ac_compile\"") >&5
11237   (eval $ac_compile) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); } &&
11241          { ac_try='test -s conftest.$ac_objext'
11242   { (eval echo "$as_me:11242: \"$ac_try\"") >&5
11243   (eval $ac_try) 2>&5
11244   ac_status=$?
11245   echo "$as_me:11245: \$? = $ac_status" >&5
11246   (exit $ac_status); }; }; then
11247   cf_cv_sys_time_select=yes
11248 else
11249   echo "$as_me: failed program was:" >&5
11250 cat conftest.$ac_ext >&5
11251 cf_cv_sys_time_select=no
11252 fi
11253 rm -f conftest.$ac_objext conftest.$ac_ext
11254
11255 fi
11256
11257 echo "$as_me:11257: result: $cf_cv_sys_time_select" >&5
11258 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11259 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11260 #define HAVE_SYS_TIME_SELECT 1
11261 EOF
11262
11263 ###     checks for compiler characteristics
11264 ac_ext=c
11265 ac_cpp='$CPP $CPPFLAGS'
11266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11269 ac_main_return=return
11270
11271 echo "$as_me:11271: checking for $CC option to accept ANSI C" >&5
11272 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11273 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11274   echo $ECHO_N "(cached) $ECHO_C" >&6
11275 else
11276   ac_cv_prog_cc_stdc=no
11277 ac_save_CC=$CC
11278 cat >conftest.$ac_ext <<_ACEOF
11279 #line 11279 "configure"
11280 #include "confdefs.h"
11281 #include <stdarg.h>
11282 #include <stdio.h>
11283 #include <sys/types.h>
11284 #include <sys/stat.h>
11285 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11286 struct buf { int x; };
11287 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11288 static char *e (p, i)
11289      char **p;
11290      int i;
11291 {
11292   return p[i];
11293 }
11294 static char *f (char * (*g) (char **, int), char **p, ...)
11295 {
11296   char *s;
11297   va_list v;
11298   va_start (v,p);
11299   s = g (p, va_arg (v,int));
11300   va_end (v);
11301   return s;
11302 }
11303 int test (int i, double x);
11304 struct s1 {int (*f) (int a);};
11305 struct s2 {int (*f) (double a);};
11306 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11307 int argc;
11308 char **argv;
11309 int
11310 main ()
11311 {
11312 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11313   ;
11314   return 0;
11315 }
11316 _ACEOF
11317 # Don't try gcc -ansi; that turns off useful extensions and
11318 # breaks some systems' header files.
11319 # AIX                   -qlanglvl=ansi
11320 # Ultrix and OSF/1      -std1
11321 # HP-UX 10.20 and later -Ae
11322 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11323 # SVR4                  -Xc -D__EXTENSIONS__
11324 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11325 do
11326   CC="$ac_save_CC $ac_arg"
11327   rm -f conftest.$ac_objext
11328 if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
11329   (eval $ac_compile) 2>&5
11330   ac_status=$?
11331   echo "$as_me:11331: \$? = $ac_status" >&5
11332   (exit $ac_status); } &&
11333          { ac_try='test -s conftest.$ac_objext'
11334   { (eval echo "$as_me:11334: \"$ac_try\"") >&5
11335   (eval $ac_try) 2>&5
11336   ac_status=$?
11337   echo "$as_me:11337: \$? = $ac_status" >&5
11338   (exit $ac_status); }; }; then
11339   ac_cv_prog_cc_stdc=$ac_arg
11340 break
11341 else
11342   echo "$as_me: failed program was:" >&5
11343 cat conftest.$ac_ext >&5
11344 fi
11345 rm -f conftest.$ac_objext
11346 done
11347 rm -f conftest.$ac_ext conftest.$ac_objext
11348 CC=$ac_save_CC
11349
11350 fi
11351
11352 case "x$ac_cv_prog_cc_stdc" in
11353   x|xno)
11354     echo "$as_me:11354: result: none needed" >&5
11355 echo "${ECHO_T}none needed" >&6 ;;
11356   *)
11357     echo "$as_me:11357: result: $ac_cv_prog_cc_stdc" >&5
11358 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11359     CC="$CC $ac_cv_prog_cc_stdc" ;;
11360 esac
11361
11362 echo "$as_me:11362: checking for an ANSI C-conforming const" >&5
11363 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11364 if test "${ac_cv_c_const+set}" = set; then
11365   echo $ECHO_N "(cached) $ECHO_C" >&6
11366 else
11367   cat >conftest.$ac_ext <<_ACEOF
11368 #line 11368 "configure"
11369 #include "confdefs.h"
11370
11371 int
11372 main ()
11373 {
11374 /* FIXME: Include the comments suggested by Paul. */
11375 #ifndef __cplusplus
11376   /* Ultrix mips cc rejects this.  */
11377   typedef int charset[2];
11378   const charset x;
11379   /* SunOS 4.1.1 cc rejects this.  */
11380   char const *const *ccp;
11381   char **p;
11382   /* NEC SVR4.0.2 mips cc rejects this.  */
11383   struct point {int x, y;};
11384   static struct point const zero = {0,0};
11385   /* AIX XL C 1.02.0.0 rejects this.
11386      It does not let you subtract one const X* pointer from another in
11387      an arm of an if-expression whose if-part is not a constant
11388      expression */
11389   const char *g = "string";
11390   ccp = &g + (g ? g-g : 0);
11391   /* HPUX 7.0 cc rejects these. */
11392   ++ccp;
11393   p = (char**) ccp;
11394   ccp = (char const *const *) p;
11395   { /* SCO 3.2v4 cc rejects this.  */
11396     char *t;
11397     char const *s = 0 ? (char *) 0 : (char const *) 0;
11398
11399     *t++ = 0;
11400   }
11401   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11402     int x[] = {25, 17};
11403     const int *foo = &x[0];
11404     ++foo;
11405   }
11406   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11407     typedef const int *iptr;
11408     iptr p = 0;
11409     ++p;
11410   }
11411   { /* AIX XL C 1.02.0.0 rejects this saying
11412        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11413     struct s { int j; const int *ap[3]; };
11414     struct s *b; b->j = 5;
11415   }
11416   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11417     const int foo = 10;
11418   }
11419 #endif
11420
11421   ;
11422   return 0;
11423 }
11424 _ACEOF
11425 rm -f conftest.$ac_objext
11426 if { (eval echo "$as_me:11426: \"$ac_compile\"") >&5
11427   (eval $ac_compile) 2>&5
11428   ac_status=$?
11429   echo "$as_me:11429: \$? = $ac_status" >&5
11430   (exit $ac_status); } &&
11431          { ac_try='test -s conftest.$ac_objext'
11432   { (eval echo "$as_me:11432: \"$ac_try\"") >&5
11433   (eval $ac_try) 2>&5
11434   ac_status=$?
11435   echo "$as_me:11435: \$? = $ac_status" >&5
11436   (exit $ac_status); }; }; then
11437   ac_cv_c_const=yes
11438 else
11439   echo "$as_me: failed program was:" >&5
11440 cat conftest.$ac_ext >&5
11441 ac_cv_c_const=no
11442 fi
11443 rm -f conftest.$ac_objext conftest.$ac_ext
11444 fi
11445 echo "$as_me:11445: result: $ac_cv_c_const" >&5
11446 echo "${ECHO_T}$ac_cv_c_const" >&6
11447 if test $ac_cv_c_const = no; then
11448
11449 cat >>confdefs.h <<\EOF
11450 #define const
11451 EOF
11452
11453 fi
11454
11455 echo "$as_me:11455: checking for inline" >&5
11456 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11457 if test "${ac_cv_c_inline+set}" = set; then
11458   echo $ECHO_N "(cached) $ECHO_C" >&6
11459 else
11460   ac_cv_c_inline=no
11461 for ac_kw in inline __inline__ __inline; do
11462   cat >conftest.$ac_ext <<_ACEOF
11463 #line 11463 "configure"
11464 #include "confdefs.h"
11465 #ifndef __cplusplus
11466 static $ac_kw int static_foo () {return 0; }
11467 $ac_kw int foo () {return 0; }
11468 #endif
11469
11470 _ACEOF
11471 rm -f conftest.$ac_objext
11472 if { (eval echo "$as_me:11472: \"$ac_compile\"") >&5
11473   (eval $ac_compile) 2>&5
11474   ac_status=$?
11475   echo "$as_me:11475: \$? = $ac_status" >&5
11476   (exit $ac_status); } &&
11477          { ac_try='test -s conftest.$ac_objext'
11478   { (eval echo "$as_me:11478: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:11481: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   ac_cv_c_inline=$ac_kw; break
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 cat conftest.$ac_ext >&5
11487 fi
11488 rm -f conftest.$ac_objext conftest.$ac_ext
11489 done
11490
11491 fi
11492 echo "$as_me:11492: result: $ac_cv_c_inline" >&5
11493 echo "${ECHO_T}$ac_cv_c_inline" >&6
11494 case $ac_cv_c_inline in
11495   inline | yes) ;;
11496   no)
11497 cat >>confdefs.h <<\EOF
11498 #define inline
11499 EOF
11500  ;;
11501   *)  cat >>confdefs.h <<EOF
11502 #define inline $ac_cv_c_inline
11503 EOF
11504  ;;
11505 esac
11506
11507 NCURSES_INLINE=
11508 if test "$ac_cv_c_inline" != no ; then
11509   NCURSES_INLINE=inline
11510   if test "$INTEL_COMPILER" = yes
11511   then
11512     :
11513   elif test "$GCC" = yes
11514   then
11515     echo "$as_me:11515: checking if gcc supports options to tune inlining" >&5
11516 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11517 if test "${cf_cv_gcc_inline+set}" = set; then
11518   echo $ECHO_N "(cached) $ECHO_C" >&6
11519 else
11520
11521       cf_save_CFLAGS=$CFLAGS
11522       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11523       cat >conftest.$ac_ext <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526 inline int foo(void) { return 1; }
11527 int
11528 main ()
11529 {
11530 ${cf_cv_main_return:-return} foo()
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 rm -f conftest.$ac_objext
11536 if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5
11537   (eval $ac_compile) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit $ac_status); } &&
11541          { ac_try='test -s conftest.$ac_objext'
11542   { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543   (eval $ac_try) 2>&5
11544   ac_status=$?
11545   echo "$as_me:11545: \$? = $ac_status" >&5
11546   (exit $ac_status); }; }; then
11547   cf_cv_gcc_inline=yes
11548 else
11549   echo "$as_me: failed program was:" >&5
11550 cat conftest.$ac_ext >&5
11551 cf_cv_gcc_inline=no
11552 fi
11553 rm -f conftest.$ac_objext conftest.$ac_ext
11554       CFLAGS=$cf_save_CFLAGS
11555
11556 fi
11557 echo "$as_me:11557: result: $cf_cv_gcc_inline" >&5
11558 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11559     if test "$cf_cv_gcc_inline" = yes ; then
11560
11561 cf_fix_cppflags=no
11562 cf_new_cflags=
11563 cf_new_cppflags=
11564 cf_new_extra_cppflags=
11565
11566 for cf_add_cflags in --param max-inline-insns-single=1200
11567 do
11568 case $cf_fix_cppflags in
11569 no)
11570         case $cf_add_cflags in #(vi
11571         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11572                 case $cf_add_cflags in
11573                 -D*)
11574                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11575
11576                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11577                         && test -z "${cf_tst_cflags}" \
11578                         && cf_fix_cppflags=yes
11579
11580                         if test $cf_fix_cppflags = yes ; then
11581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11582                                 continue
11583                         elif test "${cf_tst_cflags}" = "\"'" ; then
11584                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11585                                 continue
11586                         fi
11587                         ;;
11588                 esac
11589                 case "$CPPFLAGS" in
11590                 *$cf_add_cflags) #(vi
11591                         ;;
11592                 *) #(vi
11593                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11594                         ;;
11595                 esac
11596                 ;;
11597         *)
11598                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11599                 ;;
11600         esac
11601         ;;
11602 yes)
11603         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11604
11605         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11606
11607         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11608         && test -z "${cf_tst_cflags}" \
11609         && cf_fix_cppflags=no
11610         ;;
11611 esac
11612 done
11613
11614 if test -n "$cf_new_cflags" ; then
11615
11616         CFLAGS="$CFLAGS $cf_new_cflags"
11617 fi
11618
11619 if test -n "$cf_new_cppflags" ; then
11620
11621         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11622 fi
11623
11624 if test -n "$cf_new_extra_cppflags" ; then
11625
11626         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11627 fi
11628
11629     fi
11630   fi
11631 fi
11632
11633 echo "$as_me:11633: checking for signal global datatype" >&5
11634 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11635 if test "${cf_cv_sig_atomic_t+set}" = set; then
11636   echo $ECHO_N "(cached) $ECHO_C" >&6
11637 else
11638
11639         for cf_type in \
11640                 "volatile sig_atomic_t" \
11641                 "sig_atomic_t" \
11642                 "int"
11643         do
11644         cat >conftest.$ac_ext <<_ACEOF
11645 #line 11645 "configure"
11646 #include "confdefs.h"
11647
11648 #include <sys/types.h>
11649 #include <signal.h>
11650 #include <stdio.h>
11651
11652 extern $cf_type x;
11653 $cf_type x;
11654 static void handler(int sig)
11655 {
11656         x = 5;
11657 }
11658 int
11659 main ()
11660 {
11661 signal(SIGINT, handler);
11662                  x = 1
11663   ;
11664   return 0;
11665 }
11666 _ACEOF
11667 rm -f conftest.$ac_objext
11668 if { (eval echo "$as_me:11668: \"$ac_compile\"") >&5
11669   (eval $ac_compile) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); } &&
11673          { ac_try='test -s conftest.$ac_objext'
11674   { (eval echo "$as_me:11674: \"$ac_try\"") >&5
11675   (eval $ac_try) 2>&5
11676   ac_status=$?
11677   echo "$as_me:11677: \$? = $ac_status" >&5
11678   (exit $ac_status); }; }; then
11679   cf_cv_sig_atomic_t=$cf_type
11680 else
11681   echo "$as_me: failed program was:" >&5
11682 cat conftest.$ac_ext >&5
11683 cf_cv_sig_atomic_t=no
11684 fi
11685 rm -f conftest.$ac_objext conftest.$ac_ext
11686                 test "$cf_cv_sig_atomic_t" != no && break
11687         done
11688
11689 fi
11690
11691 echo "$as_me:11691: result: $cf_cv_sig_atomic_t" >&5
11692 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11693 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11694 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11695 EOF
11696
11697 if test $NCURSES_CHTYPE = auto ; then
11698
11699 echo "$as_me:11699: checking for type of chtype" >&5
11700 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11701 if test "${cf_cv_typeof_chtype+set}" = set; then
11702   echo $ECHO_N "(cached) $ECHO_C" >&6
11703 else
11704
11705                 if test "$cross_compiling" = yes; then
11706   cf_cv_typeof_chtype=long
11707 else
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711
11712 #define WANT_BITS 31
11713 #include <stdio.h>
11714 int main()
11715 {
11716         FILE *fp = fopen("cf_test.out", "w");
11717         if (fp != 0) {
11718                 char *result = "long";
11719                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11720                         int n;
11721                         unsigned int x, y;
11722                         for (n = 0; n < WANT_BITS; n++) {
11723                                 x = (1 << n);
11724                                 y = (x >> n);
11725                                 if (y != 1 || x == 0) {
11726                                         x = 0;
11727                                         break;
11728                                 }
11729                         }
11730                         /*
11731                          * If x is nonzero, an int is big enough for the bits
11732                          * that we want.
11733                          */
11734                         result = (x != 0) ? "int" : "long";
11735                 }
11736                 fputs(result, fp);
11737                 fclose(fp);
11738         }
11739         ${cf_cv_main_return:-return}(0);
11740 }
11741
11742 _ACEOF
11743 rm -f conftest$ac_exeext
11744 if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
11745   (eval $ac_link) 2>&5
11746   ac_status=$?
11747   echo "$as_me:11747: \$? = $ac_status" >&5
11748   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11749   { (eval echo "$as_me:11749: \"$ac_try\"") >&5
11750   (eval $ac_try) 2>&5
11751   ac_status=$?
11752   echo "$as_me:11752: \$? = $ac_status" >&5
11753   (exit $ac_status); }; }; then
11754   cf_cv_typeof_chtype=`cat cf_test.out`
11755 else
11756   echo "$as_me: program exited with status $ac_status" >&5
11757 echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759 cf_cv_typeof_chtype=long
11760 fi
11761 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11762 fi
11763                 rm -f cf_test.out
11764
11765 fi
11766
11767 echo "$as_me:11767: result: $cf_cv_typeof_chtype" >&5
11768 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11769
11770 cat >>confdefs.h <<EOF
11771 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11772 EOF
11773
11774 else
11775         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11776 fi
11777 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11778
11779 echo "$as_me:11779: checking if unsigned literals are legal" >&5
11780 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11781 if test "${cf_cv_unsigned_literals+set}" = set; then
11782   echo $ECHO_N "(cached) $ECHO_C" >&6
11783 else
11784
11785         cat >conftest.$ac_ext <<_ACEOF
11786 #line 11786 "configure"
11787 #include "confdefs.h"
11788
11789 int
11790 main ()
11791 {
11792 long x = 1L + 1UL + 1U + 1
11793   ;
11794   return 0;
11795 }
11796 _ACEOF
11797 rm -f conftest.$ac_objext
11798 if { (eval echo "$as_me:11798: \"$ac_compile\"") >&5
11799   (eval $ac_compile) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit $ac_status); } &&
11803          { ac_try='test -s conftest.$ac_objext'
11804   { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805   (eval $ac_try) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit $ac_status); }; }; then
11809   cf_cv_unsigned_literals=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 cat conftest.$ac_ext >&5
11813 cf_cv_unsigned_literals=no
11814 fi
11815 rm -f conftest.$ac_objext conftest.$ac_ext
11816
11817 fi
11818
11819 echo "$as_me:11819: result: $cf_cv_unsigned_literals" >&5
11820 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11821
11822 cf_cv_1UL="1"
11823 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11824 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11825
11826 if test $NCURSES_MMASK_T = auto ; then
11827         cf_cv_typeof_mmask_t=long
11828 else
11829         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11830 fi
11831 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11832
11833 ###     Checks for external-data
11834
11835 echo "$as_me:11835: checking if external errno is declared" >&5
11836 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11837 if test "${cf_cv_dcl_errno+set}" = set; then
11838   echo $ECHO_N "(cached) $ECHO_C" >&6
11839 else
11840
11841     cat >conftest.$ac_ext <<_ACEOF
11842 #line 11842 "configure"
11843 #include "confdefs.h"
11844
11845 #ifdef HAVE_STDLIB_H
11846 #include <stdlib.h>
11847 #endif
11848 #include <stdio.h>
11849 #include <sys/types.h>
11850 #include <errno.h>
11851 int
11852 main ()
11853 {
11854 long x = (long) errno
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext
11860 if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5
11861   (eval $ac_compile) 2>&5
11862   ac_status=$?
11863   echo "$as_me:11863: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -s conftest.$ac_objext'
11866   { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867   (eval $ac_try) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); }; }; then
11871   cf_cv_dcl_errno=yes
11872 else
11873   echo "$as_me: failed program was:" >&5
11874 cat conftest.$ac_ext >&5
11875 cf_cv_dcl_errno=no
11876 fi
11877 rm -f conftest.$ac_objext conftest.$ac_ext
11878
11879 fi
11880 echo "$as_me:11880: result: $cf_cv_dcl_errno" >&5
11881 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11882
11883 if test "$cf_cv_dcl_errno" = no ; then
11884
11885 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11886
11887     cat >>confdefs.h <<EOF
11888 #define $cf_result 1
11889 EOF
11890
11891 fi
11892
11893 # It's possible (for near-UNIX clones) that the data doesn't exist
11894
11895 echo "$as_me:11895: checking if external errno exists" >&5
11896 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11897 if test "${cf_cv_have_errno+set}" = set; then
11898   echo $ECHO_N "(cached) $ECHO_C" >&6
11899 else
11900
11901     cat >conftest.$ac_ext <<_ACEOF
11902 #line 11902 "configure"
11903 #include "confdefs.h"
11904
11905 #undef errno
11906 extern int errno;
11907
11908 int
11909 main ()
11910 {
11911 errno = 2
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 rm -f conftest.$ac_objext conftest$ac_exeext
11917 if { (eval echo "$as_me:11917: \"$ac_link\"") >&5
11918   (eval $ac_link) 2>&5
11919   ac_status=$?
11920   echo "$as_me:11920: \$? = $ac_status" >&5
11921   (exit $ac_status); } &&
11922          { ac_try='test -s conftest$ac_exeext'
11923   { (eval echo "$as_me:11923: \"$ac_try\"") >&5
11924   (eval $ac_try) 2>&5
11925   ac_status=$?
11926   echo "$as_me:11926: \$? = $ac_status" >&5
11927   (exit $ac_status); }; }; then
11928   cf_cv_have_errno=yes
11929 else
11930   echo "$as_me: failed program was:" >&5
11931 cat conftest.$ac_ext >&5
11932 cf_cv_have_errno=no
11933 fi
11934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11935
11936 fi
11937 echo "$as_me:11937: result: $cf_cv_have_errno" >&5
11938 echo "${ECHO_T}$cf_cv_have_errno" >&6
11939
11940 if test "$cf_cv_have_errno" = yes ; then
11941
11942 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11943
11944     cat >>confdefs.h <<EOF
11945 #define $cf_result 1
11946 EOF
11947
11948 fi
11949
11950 echo "$as_me:11950: checking if data-only library module links" >&5
11951 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11952 if test "${cf_cv_link_dataonly+set}" = set; then
11953   echo $ECHO_N "(cached) $ECHO_C" >&6
11954 else
11955
11956         rm -f conftest.a
11957         cat >conftest.$ac_ext <<EOF
11958 #line 11958 "configure"
11959 int     testdata[3] = { 123, 456, 789 };
11960 EOF
11961         if { (eval echo "$as_me:11961: \"$ac_compile\"") >&5
11962   (eval $ac_compile) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); } ; then
11966                 mv conftest.o data.o && \
11967                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11968         fi
11969         rm -f conftest.$ac_ext data.o
11970         cat >conftest.$ac_ext <<EOF
11971 #line 11971 "configure"
11972 int     testfunc()
11973 {
11974 #if defined(NeXT)
11975         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11976 #else
11977         extern int testdata[3];
11978         return testdata[0] == 123
11979            &&  testdata[1] == 456
11980            &&  testdata[2] == 789;
11981 #endif
11982 }
11983 EOF
11984         if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); }; then
11989                 mv conftest.o func.o && \
11990                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11991         fi
11992         rm -f conftest.$ac_ext func.o
11993         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11994         cf_saveLIBS="$LIBS"
11995         LIBS="conftest.a $LIBS"
11996         if test "$cross_compiling" = yes; then
11997   cf_cv_link_dataonly=unknown
11998 else
11999   cat >conftest.$ac_ext <<_ACEOF
12000 #line 12000 "configure"
12001 #include "confdefs.h"
12002
12003         int main()
12004         {
12005                 extern int testfunc();
12006                 ${cf_cv_main_return:-return} (!testfunc());
12007         }
12008
12009 _ACEOF
12010 rm -f conftest$ac_exeext
12011 if { (eval echo "$as_me:12011: \"$ac_link\"") >&5
12012   (eval $ac_link) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021   cf_cv_link_dataonly=yes
12022 else
12023   echo "$as_me: program exited with status $ac_status" >&5
12024 echo "$as_me: failed program was:" >&5
12025 cat conftest.$ac_ext >&5
12026 cf_cv_link_dataonly=no
12027 fi
12028 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12029 fi
12030         LIBS="$cf_saveLIBS"
12031
12032 fi
12033
12034 echo "$as_me:12034: result: $cf_cv_link_dataonly" >&5
12035 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12036
12037 if test "$cf_cv_link_dataonly" = no ; then
12038         cat >>confdefs.h <<\EOF
12039 #define BROKEN_LINKER 1
12040 EOF
12041
12042         BROKEN_LINKER=1
12043 fi
12044
12045 ###     Checks for library functions.
12046
12047 for ac_func in \
12048 getcwd \
12049 getegid \
12050 geteuid \
12051 getttynam \
12052 issetugid \
12053 poll \
12054 remove \
12055 select \
12056 setbuf \
12057 setbuffer \
12058 setvbuf \
12059 sigaction \
12060 sigvec \
12061 strdup \
12062 strstr \
12063 tcgetpgrp \
12064 times \
12065 vsnprintf \
12066
12067 do
12068 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12069 echo "$as_me:12069: checking for $ac_func" >&5
12070 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12071 if eval "test \"\${$as_ac_var+set}\" = set"; then
12072   echo $ECHO_N "(cached) $ECHO_C" >&6
12073 else
12074   cat >conftest.$ac_ext <<_ACEOF
12075 #line 12075 "configure"
12076 #include "confdefs.h"
12077 /* System header to define __stub macros and hopefully few prototypes,
12078     which can conflict with char $ac_func (); below.  */
12079 #include <assert.h>
12080 /* Override any gcc2 internal prototype to avoid an error.  */
12081 #ifdef __cplusplus
12082 extern "C"
12083 #endif
12084 /* We use char because int might match the return type of a gcc2
12085    builtin and then its argument prototype would still apply.  */
12086 char $ac_func ();
12087 char (*f) ();
12088
12089 int
12090 main ()
12091 {
12092 /* The GNU C library defines this for functions which it implements
12093     to always fail with ENOSYS.  Some functions are actually named
12094     something starting with __ and the normal name is an alias.  */
12095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12096 choke me
12097 #else
12098 f = $ac_func;
12099 #endif
12100
12101   ;
12102   return 0;
12103 }
12104 _ACEOF
12105 rm -f conftest.$ac_objext conftest$ac_exeext
12106 if { (eval echo "$as_me:12106: \"$ac_link\"") >&5
12107   (eval $ac_link) 2>&5
12108   ac_status=$?
12109   echo "$as_me:12109: \$? = $ac_status" >&5
12110   (exit $ac_status); } &&
12111          { ac_try='test -s conftest$ac_exeext'
12112   { (eval echo "$as_me:12112: \"$ac_try\"") >&5
12113   (eval $ac_try) 2>&5
12114   ac_status=$?
12115   echo "$as_me:12115: \$? = $ac_status" >&5
12116   (exit $ac_status); }; }; then
12117   eval "$as_ac_var=yes"
12118 else
12119   echo "$as_me: failed program was:" >&5
12120 cat conftest.$ac_ext >&5
12121 eval "$as_ac_var=no"
12122 fi
12123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12124 fi
12125 echo "$as_me:12125: result: `eval echo '${'$as_ac_var'}'`" >&5
12126 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12127 if test `eval echo '${'$as_ac_var'}'` = yes; then
12128   cat >>confdefs.h <<EOF
12129 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12130 EOF
12131
12132 fi
12133 done
12134
12135 if test "$with_getcap" = "yes" ; then
12136
12137 echo "$as_me:12137: checking for terminal-capability database functions" >&5
12138 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12139 if test "${cf_cv_cgetent+set}" = set; then
12140   echo $ECHO_N "(cached) $ECHO_C" >&6
12141 else
12142
12143 cat >conftest.$ac_ext <<_ACEOF
12144 #line 12144 "configure"
12145 #include "confdefs.h"
12146
12147 #include <stdlib.h>
12148 int
12149 main ()
12150 {
12151
12152         char temp[128];
12153         char *buf = temp;
12154         char *db_array = temp;
12155         cgetent(&buf, /* int *, */ &db_array, "vt100");
12156         cgetcap(buf, "tc", '=');
12157         cgetmatch(buf, "tc");
12158
12159   ;
12160   return 0;
12161 }
12162 _ACEOF
12163 rm -f conftest.$ac_objext conftest$ac_exeext
12164 if { (eval echo "$as_me:12164: \"$ac_link\"") >&5
12165   (eval $ac_link) 2>&5
12166   ac_status=$?
12167   echo "$as_me:12167: \$? = $ac_status" >&5
12168   (exit $ac_status); } &&
12169          { ac_try='test -s conftest$ac_exeext'
12170   { (eval echo "$as_me:12170: \"$ac_try\"") >&5
12171   (eval $ac_try) 2>&5
12172   ac_status=$?
12173   echo "$as_me:12173: \$? = $ac_status" >&5
12174   (exit $ac_status); }; }; then
12175   cf_cv_cgetent=yes
12176 else
12177   echo "$as_me: failed program was:" >&5
12178 cat conftest.$ac_ext >&5
12179 cf_cv_cgetent=no
12180 fi
12181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12182
12183 fi
12184
12185 echo "$as_me:12185: result: $cf_cv_cgetent" >&5
12186 echo "${ECHO_T}$cf_cv_cgetent" >&6
12187 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12188 #define HAVE_BSD_CGETENT 1
12189 EOF
12190
12191 fi
12192
12193 echo "$as_me:12193: checking for isascii" >&5
12194 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12195 if test "${cf_cv_have_isascii+set}" = set; then
12196   echo $ECHO_N "(cached) $ECHO_C" >&6
12197 else
12198
12199         cat >conftest.$ac_ext <<_ACEOF
12200 #line 12200 "configure"
12201 #include "confdefs.h"
12202 #include <ctype.h>
12203 int
12204 main ()
12205 {
12206 int x = isascii(' ')
12207   ;
12208   return 0;
12209 }
12210 _ACEOF
12211 rm -f conftest.$ac_objext conftest$ac_exeext
12212 if { (eval echo "$as_me:12212: \"$ac_link\"") >&5
12213   (eval $ac_link) 2>&5
12214   ac_status=$?
12215   echo "$as_me:12215: \$? = $ac_status" >&5
12216   (exit $ac_status); } &&
12217          { ac_try='test -s conftest$ac_exeext'
12218   { (eval echo "$as_me:12218: \"$ac_try\"") >&5
12219   (eval $ac_try) 2>&5
12220   ac_status=$?
12221   echo "$as_me:12221: \$? = $ac_status" >&5
12222   (exit $ac_status); }; }; then
12223   cf_cv_have_isascii=yes
12224 else
12225   echo "$as_me: failed program was:" >&5
12226 cat conftest.$ac_ext >&5
12227 cf_cv_have_isascii=no
12228 fi
12229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12230
12231 fi
12232 echo "$as_me:12232: result: $cf_cv_have_isascii" >&5
12233 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12234 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12235 #define HAVE_ISASCII 1
12236 EOF
12237
12238 if test "$ac_cv_func_sigaction" = yes; then
12239 echo "$as_me:12239: checking whether sigaction needs _POSIX_SOURCE" >&5
12240 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12241 cat >conftest.$ac_ext <<_ACEOF
12242 #line 12242 "configure"
12243 #include "confdefs.h"
12244
12245 #include <sys/types.h>
12246 #include <signal.h>
12247 int
12248 main ()
12249 {
12250 struct sigaction act
12251   ;
12252   return 0;
12253 }
12254 _ACEOF
12255 rm -f conftest.$ac_objext
12256 if { (eval echo "$as_me:12256: \"$ac_compile\"") >&5
12257   (eval $ac_compile) 2>&5
12258   ac_status=$?
12259   echo "$as_me:12259: \$? = $ac_status" >&5
12260   (exit $ac_status); } &&
12261          { ac_try='test -s conftest.$ac_objext'
12262   { (eval echo "$as_me:12262: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); }; }; then
12267   sigact_bad=no
12268 else
12269   echo "$as_me: failed program was:" >&5
12270 cat conftest.$ac_ext >&5
12271
12272 cat >conftest.$ac_ext <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275
12276 #define _POSIX_SOURCE
12277 #include <sys/types.h>
12278 #include <signal.h>
12279 int
12280 main ()
12281 {
12282 struct sigaction act
12283   ;
12284   return 0;
12285 }
12286 _ACEOF
12287 rm -f conftest.$ac_objext
12288 if { (eval echo "$as_me:12288: \"$ac_compile\"") >&5
12289   (eval $ac_compile) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); } &&
12293          { ac_try='test -s conftest.$ac_objext'
12294   { (eval echo "$as_me:12294: \"$ac_try\"") >&5
12295   (eval $ac_try) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); }; }; then
12299   sigact_bad=yes
12300          cat >>confdefs.h <<\EOF
12301 #define SVR4_ACTION 1
12302 EOF
12303
12304 else
12305   echo "$as_me: failed program was:" >&5
12306 cat conftest.$ac_ext >&5
12307 sigact_bad=unknown
12308 fi
12309 rm -f conftest.$ac_objext conftest.$ac_ext
12310 fi
12311 rm -f conftest.$ac_objext conftest.$ac_ext
12312 echo "$as_me:12312: result: $sigact_bad" >&5
12313 echo "${ECHO_T}$sigact_bad" >&6
12314 fi
12315
12316 echo "$as_me:12316: checking if nanosleep really works" >&5
12317 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12318 if test "${cf_cv_func_nanosleep+set}" = set; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321
12322 if test "$cross_compiling" = yes; then
12323   cf_cv_func_nanosleep=unknown
12324 else
12325   cat >conftest.$ac_ext <<_ACEOF
12326 #line 12326 "configure"
12327 #include "confdefs.h"
12328
12329 #include <stdio.h>
12330 #include <errno.h>
12331 #include <time.h>
12332
12333 #ifdef HAVE_SYS_TIME_H
12334 #include <sys/time.h>
12335 #endif
12336
12337 int main() {
12338         struct timespec ts1, ts2;
12339         int code;
12340         ts1.tv_sec  = 0;
12341         ts1.tv_nsec = 750000000;
12342         ts2.tv_sec  = 0;
12343         ts2.tv_nsec = 0;
12344         errno = 0;
12345         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12346         ${cf_cv_main_return:-return}(code != 0);
12347 }
12348
12349 _ACEOF
12350 rm -f conftest$ac_exeext
12351 if { (eval echo "$as_me:12351: \"$ac_link\"") >&5
12352   (eval $ac_link) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   cf_cv_func_nanosleep=yes
12362 else
12363   echo "$as_me: program exited with status $ac_status" >&5
12364 echo "$as_me: failed program was:" >&5
12365 cat conftest.$ac_ext >&5
12366 cf_cv_func_nanosleep=no
12367 fi
12368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12369 fi
12370 fi
12371 echo "$as_me:12371: result: $cf_cv_func_nanosleep" >&5
12372 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12373
12374 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12375 #define HAVE_NANOSLEEP 1
12376 EOF
12377
12378 for ac_header in \
12379 termio.h \
12380 termios.h \
12381 unistd.h \
12382
12383 do
12384 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12385 echo "$as_me:12385: checking for $ac_header" >&5
12386 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12387 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12388   echo $ECHO_N "(cached) $ECHO_C" >&6
12389 else
12390   cat >conftest.$ac_ext <<_ACEOF
12391 #line 12391 "configure"
12392 #include "confdefs.h"
12393 #include <$ac_header>
12394 _ACEOF
12395 if { (eval echo "$as_me:12395: \"$ac_cpp conftest.$ac_ext\"") >&5
12396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12397   ac_status=$?
12398   egrep -v '^ *\+' conftest.er1 >conftest.err
12399   rm -f conftest.er1
12400   cat conftest.err >&5
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } >/dev/null; then
12403   if test -s conftest.err; then
12404     ac_cpp_err=$ac_c_preproc_warn_flag
12405   else
12406     ac_cpp_err=
12407   fi
12408 else
12409   ac_cpp_err=yes
12410 fi
12411 if test -z "$ac_cpp_err"; then
12412   eval "$as_ac_Header=yes"
12413 else
12414   echo "$as_me: failed program was:" >&5
12415   cat conftest.$ac_ext >&5
12416   eval "$as_ac_Header=no"
12417 fi
12418 rm -f conftest.err conftest.$ac_ext
12419 fi
12420 echo "$as_me:12420: result: `eval echo '${'$as_ac_Header'}'`" >&5
12421 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12422 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12423   cat >>confdefs.h <<EOF
12424 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12425 EOF
12426
12427 fi
12428 done
12429
12430 if test "$ISC" = yes ; then
12431
12432 for ac_header in sys/termio.h
12433 do
12434 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12435 echo "$as_me:12435: checking for $ac_header" >&5
12436 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12437 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12438   echo $ECHO_N "(cached) $ECHO_C" >&6
12439 else
12440   cat >conftest.$ac_ext <<_ACEOF
12441 #line 12441 "configure"
12442 #include "confdefs.h"
12443 #include <$ac_header>
12444 _ACEOF
12445 if { (eval echo "$as_me:12445: \"$ac_cpp conftest.$ac_ext\"") >&5
12446   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12447   ac_status=$?
12448   egrep -v '^ *\+' conftest.er1 >conftest.err
12449   rm -f conftest.er1
12450   cat conftest.err >&5
12451   echo "$as_me:12451: \$? = $ac_status" >&5
12452   (exit $ac_status); } >/dev/null; then
12453   if test -s conftest.err; then
12454     ac_cpp_err=$ac_c_preproc_warn_flag
12455   else
12456     ac_cpp_err=
12457   fi
12458 else
12459   ac_cpp_err=yes
12460 fi
12461 if test -z "$ac_cpp_err"; then
12462   eval "$as_ac_Header=yes"
12463 else
12464   echo "$as_me: failed program was:" >&5
12465   cat conftest.$ac_ext >&5
12466   eval "$as_ac_Header=no"
12467 fi
12468 rm -f conftest.err conftest.$ac_ext
12469 fi
12470 echo "$as_me:12470: result: `eval echo '${'$as_ac_Header'}'`" >&5
12471 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12472 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12473   cat >>confdefs.h <<EOF
12474 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12475 EOF
12476
12477 fi
12478 done
12479
12480 fi
12481 if test "$ac_cv_header_termios_h" = yes ; then
12482         case "$CFLAGS $CPPFLAGS" in
12483         *-D_POSIX_SOURCE*)
12484                 termios_bad=dunno ;;
12485         *)      termios_bad=maybe ;;
12486         esac
12487         if test "$termios_bad" = maybe ; then
12488         echo "$as_me:12488: checking whether termios.h needs _POSIX_SOURCE" >&5
12489 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12490         cat >conftest.$ac_ext <<_ACEOF
12491 #line 12491 "configure"
12492 #include "confdefs.h"
12493 #include <termios.h>
12494 int
12495 main ()
12496 {
12497 struct termios foo; int x = foo.c_iflag
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 rm -f conftest.$ac_objext
12503 if { (eval echo "$as_me:12503: \"$ac_compile\"") >&5
12504   (eval $ac_compile) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); } &&
12508          { ac_try='test -s conftest.$ac_objext'
12509   { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510   (eval $ac_try) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); }; }; then
12514   termios_bad=no
12515 else
12516   echo "$as_me: failed program was:" >&5
12517 cat conftest.$ac_ext >&5
12518
12519                 cat >conftest.$ac_ext <<_ACEOF
12520 #line 12520 "configure"
12521 #include "confdefs.h"
12522
12523 #define _POSIX_SOURCE
12524 #include <termios.h>
12525 int
12526 main ()
12527 {
12528 struct termios foo; int x = foo.c_iflag
12529   ;
12530   return 0;
12531 }
12532 _ACEOF
12533 rm -f conftest.$ac_objext
12534 if { (eval echo "$as_me:12534: \"$ac_compile\"") >&5
12535   (eval $ac_compile) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -s conftest.$ac_objext'
12540   { (eval echo "$as_me:12540: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:12543: \$? = $ac_status" >&5
12544   (exit $ac_status); }; }; then
12545   termios_bad=unknown
12546 else
12547   echo "$as_me: failed program was:" >&5
12548 cat conftest.$ac_ext >&5
12549 termios_bad=yes cat >>confdefs.h <<\EOF
12550 #define SVR4_TERMIO 1
12551 EOF
12552
12553 fi
12554 rm -f conftest.$ac_objext conftest.$ac_ext
12555
12556 fi
12557 rm -f conftest.$ac_objext conftest.$ac_ext
12558         echo "$as_me:12558: result: $termios_bad" >&5
12559 echo "${ECHO_T}$termios_bad" >&6
12560         fi
12561 fi
12562
12563 echo "$as_me:12563: checking for tcgetattr" >&5
12564 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12565 if test "${cf_cv_have_tcgetattr+set}" = set; then
12566   echo $ECHO_N "(cached) $ECHO_C" >&6
12567 else
12568
12569 cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12572
12573 #include <sys/types.h>
12574 #ifdef HAVE_UNISTD_H
12575 #include <unistd.h>
12576 #endif
12577 #ifdef HAVE_TERMIOS_H
12578 #include <termios.h>
12579 #define TTY struct termios
12580 #else
12581 #ifdef HAVE_TERMIO_H
12582 #include <termio.h>
12583 #define TTY struct termio
12584 #endif
12585 #endif
12586
12587 int
12588 main ()
12589 {
12590
12591 TTY foo;
12592 tcgetattr(1, &foo);
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 rm -f conftest.$ac_objext conftest$ac_exeext
12598 if { (eval echo "$as_me:12598: \"$ac_link\"") >&5
12599   (eval $ac_link) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit $ac_status); } &&
12603          { ac_try='test -s conftest$ac_exeext'
12604   { (eval echo "$as_me:12604: \"$ac_try\"") >&5
12605   (eval $ac_try) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit $ac_status); }; }; then
12609   cf_cv_have_tcgetattr=yes
12610 else
12611   echo "$as_me: failed program was:" >&5
12612 cat conftest.$ac_ext >&5
12613 cf_cv_have_tcgetattr=no
12614 fi
12615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12616 fi
12617 echo "$as_me:12617: result: $cf_cv_have_tcgetattr" >&5
12618 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12619 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12620 #define HAVE_TCGETATTR 1
12621 EOF
12622
12623 echo "$as_me:12623: checking for vsscanf function or workaround" >&5
12624 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12625 if test "${cf_cv_func_vsscanf+set}" = set; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628
12629 cat >conftest.$ac_ext <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632
12633 #include <stdarg.h>
12634 #include <stdio.h>
12635 int
12636 main ()
12637 {
12638
12639         va_list ap;
12640         vsscanf("from", "%d", ap)
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 rm -f conftest.$ac_objext conftest$ac_exeext
12646 if { (eval echo "$as_me:12646: \"$ac_link\"") >&5
12647   (eval $ac_link) 2>&5
12648   ac_status=$?
12649   echo "$as_me:12649: \$? = $ac_status" >&5
12650   (exit $ac_status); } &&
12651          { ac_try='test -s conftest$ac_exeext'
12652   { (eval echo "$as_me:12652: \"$ac_try\"") >&5
12653   (eval $ac_try) 2>&5
12654   ac_status=$?
12655   echo "$as_me:12655: \$? = $ac_status" >&5
12656   (exit $ac_status); }; }; then
12657   cf_cv_func_vsscanf=vsscanf
12658 else
12659   echo "$as_me: failed program was:" >&5
12660 cat conftest.$ac_ext >&5
12661
12662 cat >conftest.$ac_ext <<_ACEOF
12663 #line 12663 "configure"
12664 #include "confdefs.h"
12665
12666 #include <stdarg.h>
12667 #include <stdio.h>
12668 int
12669 main ()
12670 {
12671
12672     FILE strbuf;
12673     char *str = "from";
12674
12675     strbuf._flag = _IOREAD;
12676     strbuf._ptr = strbuf._base = (unsigned char *) str;
12677     strbuf._cnt = strlen(str);
12678     strbuf._file = _NFILE;
12679     return (vfscanf(&strbuf, "%d", ap))
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 rm -f conftest.$ac_objext conftest$ac_exeext
12685 if { (eval echo "$as_me:12685: \"$ac_link\"") >&5
12686   (eval $ac_link) 2>&5
12687   ac_status=$?
12688   echo "$as_me:12688: \$? = $ac_status" >&5
12689   (exit $ac_status); } &&
12690          { ac_try='test -s conftest$ac_exeext'
12691   { (eval echo "$as_me:12691: \"$ac_try\"") >&5
12692   (eval $ac_try) 2>&5
12693   ac_status=$?
12694   echo "$as_me:12694: \$? = $ac_status" >&5
12695   (exit $ac_status); }; }; then
12696   cf_cv_func_vsscanf=vfscanf
12697 else
12698   echo "$as_me: failed program was:" >&5
12699 cat conftest.$ac_ext >&5
12700
12701 cat >conftest.$ac_ext <<_ACEOF
12702 #line 12702 "configure"
12703 #include "confdefs.h"
12704
12705 #include <stdarg.h>
12706 #include <stdio.h>
12707 int
12708 main ()
12709 {
12710
12711     FILE strbuf;
12712     char *str = "from";
12713
12714     strbuf._flag = _IOREAD;
12715     strbuf._ptr = strbuf._base = (unsigned char *) str;
12716     strbuf._cnt = strlen(str);
12717     strbuf._file = _NFILE;
12718     return (_doscan(&strbuf, "%d", ap))
12719   ;
12720   return 0;
12721 }
12722 _ACEOF
12723 rm -f conftest.$ac_objext conftest$ac_exeext
12724 if { (eval echo "$as_me:12724: \"$ac_link\"") >&5
12725   (eval $ac_link) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); } &&
12729          { ac_try='test -s conftest$ac_exeext'
12730   { (eval echo "$as_me:12730: \"$ac_try\"") >&5
12731   (eval $ac_try) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit $ac_status); }; }; then
12735   cf_cv_func_vsscanf=_doscan
12736 else
12737   echo "$as_me: failed program was:" >&5
12738 cat conftest.$ac_ext >&5
12739
12740 cf_cv_func_vsscanf=no
12741 fi
12742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12743 fi
12744 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12745 fi
12746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12747 fi
12748 echo "$as_me:12748: result: $cf_cv_func_vsscanf" >&5
12749 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12750
12751 case $cf_cv_func_vsscanf in #(vi
12752 vsscanf) cat >>confdefs.h <<\EOF
12753 #define HAVE_VSSCANF 1
12754 EOF
12755 ;; #(vi
12756 vfscanf) cat >>confdefs.h <<\EOF
12757 #define HAVE_VFSCANF 1
12758 EOF
12759 ;; #(vi
12760 _doscan) cat >>confdefs.h <<\EOF
12761 #define HAVE__DOSCAN 1
12762 EOF
12763 ;;
12764 esac
12765
12766 echo "$as_me:12766: checking for working mkstemp" >&5
12767 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12768 if test "${cf_cv_func_mkstemp+set}" = set; then
12769   echo $ECHO_N "(cached) $ECHO_C" >&6
12770 else
12771
12772 rm -f conftest*
12773 if test "$cross_compiling" = yes; then
12774   echo "$as_me:12774: checking for mkstemp" >&5
12775 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12776 if test "${ac_cv_func_mkstemp+set}" = set; then
12777   echo $ECHO_N "(cached) $ECHO_C" >&6
12778 else
12779   cat >conftest.$ac_ext <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782 /* System header to define __stub macros and hopefully few prototypes,
12783     which can conflict with char mkstemp (); below.  */
12784 #include <assert.h>
12785 /* Override any gcc2 internal prototype to avoid an error.  */
12786 #ifdef __cplusplus
12787 extern "C"
12788 #endif
12789 /* We use char because int might match the return type of a gcc2
12790    builtin and then its argument prototype would still apply.  */
12791 char mkstemp ();
12792 char (*f) ();
12793
12794 int
12795 main ()
12796 {
12797 /* The GNU C library defines this for functions which it implements
12798     to always fail with ENOSYS.  Some functions are actually named
12799     something starting with __ and the normal name is an alias.  */
12800 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12801 choke me
12802 #else
12803 f = mkstemp;
12804 #endif
12805
12806   ;
12807   return 0;
12808 }
12809 _ACEOF
12810 rm -f conftest.$ac_objext conftest$ac_exeext
12811 if { (eval echo "$as_me:12811: \"$ac_link\"") >&5
12812   (eval $ac_link) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } &&
12816          { ac_try='test -s conftest$ac_exeext'
12817   { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); }; }; then
12822   ac_cv_func_mkstemp=yes
12823 else
12824   echo "$as_me: failed program was:" >&5
12825 cat conftest.$ac_ext >&5
12826 ac_cv_func_mkstemp=no
12827 fi
12828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12829 fi
12830 echo "$as_me:12830: result: $ac_cv_func_mkstemp" >&5
12831 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12832
12833 else
12834   cat >conftest.$ac_ext <<_ACEOF
12835 #line 12835 "configure"
12836 #include "confdefs.h"
12837
12838 #include <sys/types.h>
12839 #include <stdlib.h>
12840 #include <stdio.h>
12841 #include <string.h>
12842 #include <sys/stat.h>
12843 int main()
12844 {
12845         char *tmpl = "conftestXXXXXX";
12846         char name[2][80];
12847         int n;
12848         int result = 0;
12849         int fd;
12850         struct stat sb;
12851
12852         umask(077);
12853         for (n = 0; n < 2; ++n) {
12854                 strcpy(name[n], tmpl);
12855                 if ((fd = mkstemp(name[n])) >= 0) {
12856                         if (!strcmp(name[n], tmpl)
12857                          || stat(name[n], &sb) != 0
12858                          || (sb.st_mode & S_IFMT) != S_IFREG
12859                          || (sb.st_mode & 077) != 0) {
12860                                 result = 1;
12861                         }
12862                         close(fd);
12863                 }
12864         }
12865         if (result == 0
12866          && !strcmp(name[0], name[1]))
12867                 result = 1;
12868         ${cf_cv_main_return:-return}(result);
12869 }
12870
12871 _ACEOF
12872 rm -f conftest$ac_exeext
12873 if { (eval echo "$as_me:12873: \"$ac_link\"") >&5
12874   (eval $ac_link) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12878   { (eval echo "$as_me:12878: \"$ac_try\"") >&5
12879   (eval $ac_try) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit $ac_status); }; }; then
12883   cf_cv_func_mkstemp=yes
12884
12885 else
12886   echo "$as_me: program exited with status $ac_status" >&5
12887 echo "$as_me: failed program was:" >&5
12888 cat conftest.$ac_ext >&5
12889 cf_cv_func_mkstemp=no
12890
12891 fi
12892 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12893 fi
12894
12895 fi
12896 echo "$as_me:12896: result: $cf_cv_func_mkstemp" >&5
12897 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12898 if test "$cf_cv_func_mkstemp" = yes ; then
12899         cat >>confdefs.h <<\EOF
12900 #define HAVE_MKSTEMP 1
12901 EOF
12902
12903 fi
12904
12905 # setup for prototype of fallback for vsscanf()
12906
12907 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12908         HAVE_VSSCANF=1
12909 else
12910         HAVE_VSSCANF=0
12911 fi
12912
12913 if test "$cross_compiling" = yes ; then
12914         { echo "$as_me:12914: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12915 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12916 else
12917         echo "$as_me:12917: checking whether setvbuf arguments are reversed" >&5
12918 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12919 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12920   echo $ECHO_N "(cached) $ECHO_C" >&6
12921 else
12922   if test "$cross_compiling" = yes; then
12923   { { echo "$as_me:12923: error: cannot run test program while cross compiling" >&5
12924 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12925    { (exit 1); exit 1; }; }
12926 else
12927   cat >conftest.$ac_ext <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12930 #include <stdio.h>
12931 /* If setvbuf has the reversed format, exit 0. */
12932 int
12933 main ()
12934 {
12935   /* This call has the arguments reversed.
12936      A reversed system may check and see that the address of main
12937      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12938   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12939     $ac_main_return(1);
12940   putc('\r', stdout);
12941   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12942 }
12943 _ACEOF
12944 rm -f conftest$ac_exeext
12945 if { (eval echo "$as_me:12945: \"$ac_link\"") >&5
12946   (eval $ac_link) 2>&5
12947   ac_status=$?
12948   echo "$as_me:12948: \$? = $ac_status" >&5
12949   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12950   { (eval echo "$as_me:12950: \"$ac_try\"") >&5
12951   (eval $ac_try) 2>&5
12952   ac_status=$?
12953   echo "$as_me:12953: \$? = $ac_status" >&5
12954   (exit $ac_status); }; }; then
12955   ac_cv_func_setvbuf_reversed=yes
12956 else
12957   echo "$as_me: program exited with status $ac_status" >&5
12958 echo "$as_me: failed program was:" >&5
12959 cat conftest.$ac_ext >&5
12960 ac_cv_func_setvbuf_reversed=no
12961 fi
12962 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12963 fi
12964 rm -f core core.* *.core
12965 fi
12966 echo "$as_me:12966: result: $ac_cv_func_setvbuf_reversed" >&5
12967 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12968 if test $ac_cv_func_setvbuf_reversed = yes; then
12969
12970 cat >>confdefs.h <<\EOF
12971 #define SETVBUF_REVERSED 1
12972 EOF
12973
12974 fi
12975
12976 fi
12977 echo "$as_me:12977: checking return type of signal handlers" >&5
12978 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12979 if test "${ac_cv_type_signal+set}" = set; then
12980   echo $ECHO_N "(cached) $ECHO_C" >&6
12981 else
12982   cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985 #include <sys/types.h>
12986 #include <signal.h>
12987 #ifdef signal
12988 # undef signal
12989 #endif
12990 #ifdef __cplusplus
12991 extern "C" void (*signal (int, void (*)(int)))(int);
12992 #else
12993 void (*signal ()) ();
12994 #endif
12995
12996 int
12997 main ()
12998 {
12999 int i;
13000   ;
13001   return 0;
13002 }
13003 _ACEOF
13004 rm -f conftest.$ac_objext
13005 if { (eval echo "$as_me:13005: \"$ac_compile\"") >&5
13006   (eval $ac_compile) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); } &&
13010          { ac_try='test -s conftest.$ac_objext'
13011   { (eval echo "$as_me:13011: \"$ac_try\"") >&5
13012   (eval $ac_try) 2>&5
13013   ac_status=$?
13014   echo "$as_me:13014: \$? = $ac_status" >&5
13015   (exit $ac_status); }; }; then
13016   ac_cv_type_signal=void
13017 else
13018   echo "$as_me: failed program was:" >&5
13019 cat conftest.$ac_ext >&5
13020 ac_cv_type_signal=int
13021 fi
13022 rm -f conftest.$ac_objext conftest.$ac_ext
13023 fi
13024 echo "$as_me:13024: result: $ac_cv_type_signal" >&5
13025 echo "${ECHO_T}$ac_cv_type_signal" >&6
13026
13027 cat >>confdefs.h <<EOF
13028 #define RETSIGTYPE $ac_cv_type_signal
13029 EOF
13030
13031 echo "$as_me:13031: checking for type sigaction_t" >&5
13032 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13033 if test "${cf_cv_type_sigaction+set}" = set; then
13034   echo $ECHO_N "(cached) $ECHO_C" >&6
13035 else
13036
13037         cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13040
13041 #include <signal.h>
13042 int
13043 main ()
13044 {
13045 sigaction_t x
13046   ;
13047   return 0;
13048 }
13049 _ACEOF
13050 rm -f conftest.$ac_objext
13051 if { (eval echo "$as_me:13051: \"$ac_compile\"") >&5
13052   (eval $ac_compile) 2>&5
13053   ac_status=$?
13054   echo "$as_me:13054: \$? = $ac_status" >&5
13055   (exit $ac_status); } &&
13056          { ac_try='test -s conftest.$ac_objext'
13057   { (eval echo "$as_me:13057: \"$ac_try\"") >&5
13058   (eval $ac_try) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit $ac_status); }; }; then
13062   cf_cv_type_sigaction=yes
13063 else
13064   echo "$as_me: failed program was:" >&5
13065 cat conftest.$ac_ext >&5
13066 cf_cv_type_sigaction=no
13067 fi
13068 rm -f conftest.$ac_objext conftest.$ac_ext
13069 fi
13070
13071 echo "$as_me:13071: result: $cf_cv_type_sigaction" >&5
13072 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13073 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13074 #define HAVE_TYPE_SIGACTION 1
13075 EOF
13076
13077 echo "$as_me:13077: checking declaration of size-change" >&5
13078 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13079 if test "${cf_cv_sizechange+set}" = set; then
13080   echo $ECHO_N "(cached) $ECHO_C" >&6
13081 else
13082
13083     cf_cv_sizechange=unknown
13084     cf_save_CPPFLAGS="$CPPFLAGS"
13085
13086 for cf_opts in "" "NEED_PTEM_H"
13087 do
13088
13089     CPPFLAGS="$cf_save_CPPFLAGS"
13090     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13091     cat >conftest.$ac_ext <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094 #include <sys/types.h>
13095 #ifdef HAVE_TERMIOS_H
13096 #include <termios.h>
13097 #else
13098 #ifdef HAVE_TERMIO_H
13099 #include <termio.h>
13100 #endif
13101 #endif
13102 #ifdef NEED_PTEM_H
13103 /* This is a workaround for SCO:  they neglected to define struct winsize in
13104  * termios.h -- it's only in termio.h and ptem.h
13105  */
13106 #include        <sys/stream.h>
13107 #include        <sys/ptem.h>
13108 #endif
13109 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13110 #include <sys/ioctl.h>
13111 #endif
13112
13113 int
13114 main ()
13115 {
13116
13117 #ifdef TIOCGSIZE
13118         struct ttysize win;     /* FIXME: what system is this? */
13119         int y = win.ts_lines;
13120         int x = win.ts_cols;
13121 #else
13122 #ifdef TIOCGWINSZ
13123         struct winsize win;
13124         int y = win.ws_row;
13125         int x = win.ws_col;
13126 #else
13127         no TIOCGSIZE or TIOCGWINSZ
13128 #endif /* TIOCGWINSZ */
13129 #endif /* TIOCGSIZE */
13130
13131   ;
13132   return 0;
13133 }
13134 _ACEOF
13135 rm -f conftest.$ac_objext
13136 if { (eval echo "$as_me:13136: \"$ac_compile\"") >&5
13137   (eval $ac_compile) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); } &&
13141          { ac_try='test -s conftest.$ac_objext'
13142   { (eval echo "$as_me:13142: \"$ac_try\"") >&5
13143   (eval $ac_try) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); }; }; then
13147   cf_cv_sizechange=yes
13148 else
13149   echo "$as_me: failed program was:" >&5
13150 cat conftest.$ac_ext >&5
13151 cf_cv_sizechange=no
13152 fi
13153 rm -f conftest.$ac_objext conftest.$ac_ext
13154
13155         CPPFLAGS="$cf_save_CPPFLAGS"
13156         if test "$cf_cv_sizechange" = yes ; then
13157                 echo "size-change succeeded ($cf_opts)" >&5
13158                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13159                 break
13160         fi
13161 done
13162
13163 fi
13164 echo "$as_me:13164: result: $cf_cv_sizechange" >&5
13165 echo "${ECHO_T}$cf_cv_sizechange" >&6
13166 if test "$cf_cv_sizechange" != no ; then
13167         cat >>confdefs.h <<\EOF
13168 #define HAVE_SIZECHANGE 1
13169 EOF
13170
13171         case $cf_cv_sizechange in #(vi
13172         NEED*)
13173                 cat >>confdefs.h <<EOF
13174 #define $cf_cv_sizechange  1
13175 EOF
13176
13177                 ;;
13178         esac
13179 fi
13180
13181 echo "$as_me:13181: checking for memmove" >&5
13182 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13183 if test "${ac_cv_func_memmove+set}" = set; then
13184   echo $ECHO_N "(cached) $ECHO_C" >&6
13185 else
13186   cat >conftest.$ac_ext <<_ACEOF
13187 #line 13187 "configure"
13188 #include "confdefs.h"
13189 /* System header to define __stub macros and hopefully few prototypes,
13190     which can conflict with char memmove (); below.  */
13191 #include <assert.h>
13192 /* Override any gcc2 internal prototype to avoid an error.  */
13193 #ifdef __cplusplus
13194 extern "C"
13195 #endif
13196 /* We use char because int might match the return type of a gcc2
13197    builtin and then its argument prototype would still apply.  */
13198 char memmove ();
13199 char (*f) ();
13200
13201 int
13202 main ()
13203 {
13204 /* The GNU C library defines this for functions which it implements
13205     to always fail with ENOSYS.  Some functions are actually named
13206     something starting with __ and the normal name is an alias.  */
13207 #if defined (__stub_memmove) || defined (__stub___memmove)
13208 choke me
13209 #else
13210 f = memmove;
13211 #endif
13212
13213   ;
13214   return 0;
13215 }
13216 _ACEOF
13217 rm -f conftest.$ac_objext conftest$ac_exeext
13218 if { (eval echo "$as_me:13218: \"$ac_link\"") >&5
13219   (eval $ac_link) 2>&5
13220   ac_status=$?
13221   echo "$as_me:13221: \$? = $ac_status" >&5
13222   (exit $ac_status); } &&
13223          { ac_try='test -s conftest$ac_exeext'
13224   { (eval echo "$as_me:13224: \"$ac_try\"") >&5
13225   (eval $ac_try) 2>&5
13226   ac_status=$?
13227   echo "$as_me:13227: \$? = $ac_status" >&5
13228   (exit $ac_status); }; }; then
13229   ac_cv_func_memmove=yes
13230 else
13231   echo "$as_me: failed program was:" >&5
13232 cat conftest.$ac_ext >&5
13233 ac_cv_func_memmove=no
13234 fi
13235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13236 fi
13237 echo "$as_me:13237: result: $ac_cv_func_memmove" >&5
13238 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13239 if test $ac_cv_func_memmove = yes; then
13240   :
13241 else
13242
13243 echo "$as_me:13243: checking for bcopy" >&5
13244 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13245 if test "${ac_cv_func_bcopy+set}" = set; then
13246   echo $ECHO_N "(cached) $ECHO_C" >&6
13247 else
13248   cat >conftest.$ac_ext <<_ACEOF
13249 #line 13249 "configure"
13250 #include "confdefs.h"
13251 /* System header to define __stub macros and hopefully few prototypes,
13252     which can conflict with char bcopy (); below.  */
13253 #include <assert.h>
13254 /* Override any gcc2 internal prototype to avoid an error.  */
13255 #ifdef __cplusplus
13256 extern "C"
13257 #endif
13258 /* We use char because int might match the return type of a gcc2
13259    builtin and then its argument prototype would still apply.  */
13260 char bcopy ();
13261 char (*f) ();
13262
13263 int
13264 main ()
13265 {
13266 /* The GNU C library defines this for functions which it implements
13267     to always fail with ENOSYS.  Some functions are actually named
13268     something starting with __ and the normal name is an alias.  */
13269 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13270 choke me
13271 #else
13272 f = bcopy;
13273 #endif
13274
13275   ;
13276   return 0;
13277 }
13278 _ACEOF
13279 rm -f conftest.$ac_objext conftest$ac_exeext
13280 if { (eval echo "$as_me:13280: \"$ac_link\"") >&5
13281   (eval $ac_link) 2>&5
13282   ac_status=$?
13283   echo "$as_me:13283: \$? = $ac_status" >&5
13284   (exit $ac_status); } &&
13285          { ac_try='test -s conftest$ac_exeext'
13286   { (eval echo "$as_me:13286: \"$ac_try\"") >&5
13287   (eval $ac_try) 2>&5
13288   ac_status=$?
13289   echo "$as_me:13289: \$? = $ac_status" >&5
13290   (exit $ac_status); }; }; then
13291   ac_cv_func_bcopy=yes
13292 else
13293   echo "$as_me: failed program was:" >&5
13294 cat conftest.$ac_ext >&5
13295 ac_cv_func_bcopy=no
13296 fi
13297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13298 fi
13299 echo "$as_me:13299: result: $ac_cv_func_bcopy" >&5
13300 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13301 if test $ac_cv_func_bcopy = yes; then
13302
13303         echo "$as_me:13303: checking if bcopy does overlapping moves" >&5
13304 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13305 if test "${cf_cv_good_bcopy+set}" = set; then
13306   echo $ECHO_N "(cached) $ECHO_C" >&6
13307 else
13308
13309                 if test "$cross_compiling" = yes; then
13310   cf_cv_good_bcopy=unknown
13311 else
13312   cat >conftest.$ac_ext <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315
13316 int main() {
13317         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13318         char temp[40];
13319         bcopy(data, temp, sizeof(data));
13320         bcopy(temp+10, temp, 15);
13321         bcopy(temp+5, temp+15, 10);
13322         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13323 }
13324
13325 _ACEOF
13326 rm -f conftest$ac_exeext
13327 if { (eval echo "$as_me:13327: \"$ac_link\"") >&5
13328   (eval $ac_link) 2>&5
13329   ac_status=$?
13330   echo "$as_me:13330: \$? = $ac_status" >&5
13331   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13332   { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:13335: \$? = $ac_status" >&5
13336   (exit $ac_status); }; }; then
13337   cf_cv_good_bcopy=yes
13338 else
13339   echo "$as_me: program exited with status $ac_status" >&5
13340 echo "$as_me: failed program was:" >&5
13341 cat conftest.$ac_ext >&5
13342 cf_cv_good_bcopy=no
13343 fi
13344 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13345 fi
13346
13347 fi
13348 echo "$as_me:13348: result: $cf_cv_good_bcopy" >&5
13349 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13350
13351 else
13352   cf_cv_good_bcopy=no
13353 fi
13354
13355         if test "$cf_cv_good_bcopy" = yes ; then
13356                 cat >>confdefs.h <<\EOF
13357 #define USE_OK_BCOPY 1
13358 EOF
13359
13360         else
13361                 cat >>confdefs.h <<\EOF
13362 #define USE_MY_MEMMOVE 1
13363 EOF
13364
13365         fi
13366
13367 fi
13368
13369 echo "$as_me:13369: checking if poll really works" >&5
13370 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13371 if test "${cf_cv_working_poll+set}" = set; then
13372   echo $ECHO_N "(cached) $ECHO_C" >&6
13373 else
13374
13375 if test "$cross_compiling" = yes; then
13376   cf_cv_working_poll=unknown
13377 else
13378   cat >conftest.$ac_ext <<_ACEOF
13379 #line 13379 "configure"
13380 #include "confdefs.h"
13381
13382 #include <stdio.h>
13383 #ifdef HAVE_POLL_H
13384 #include <poll.h>
13385 #else
13386 #include <sys/poll.h>
13387 #endif
13388 int main() {
13389         struct pollfd myfds;
13390         int ret;
13391
13392         myfds.fd = 0;
13393         myfds.events = POLLIN;
13394
13395         ret = poll(&myfds, 1, 100);
13396         ${cf_cv_main_return:-return}(ret != 0);
13397 }
13398 _ACEOF
13399 rm -f conftest$ac_exeext
13400 if { (eval echo "$as_me:13400: \"$ac_link\"") >&5
13401   (eval $ac_link) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13405   { (eval echo "$as_me:13405: \"$ac_try\"") >&5
13406   (eval $ac_try) 2>&5
13407   ac_status=$?
13408   echo "$as_me:13408: \$? = $ac_status" >&5
13409   (exit $ac_status); }; }; then
13410   cf_cv_working_poll=yes
13411 else
13412   echo "$as_me: program exited with status $ac_status" >&5
13413 echo "$as_me: failed program was:" >&5
13414 cat conftest.$ac_ext >&5
13415 cf_cv_working_poll=no
13416 fi
13417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13418 fi
13419 fi
13420 echo "$as_me:13420: result: $cf_cv_working_poll" >&5
13421 echo "${ECHO_T}$cf_cv_working_poll" >&6
13422 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13423 #define HAVE_WORKING_POLL 1
13424 EOF
13425
13426 if test "$with_hashed_db" != no ; then
13427         cat >>confdefs.h <<\EOF
13428 #define USE_HASHED_DB 1
13429 EOF
13430
13431 echo "$as_me:13431: checking for db.h" >&5
13432 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13433 if test "${ac_cv_header_db_h+set}" = set; then
13434   echo $ECHO_N "(cached) $ECHO_C" >&6
13435 else
13436   cat >conftest.$ac_ext <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439 #include <db.h>
13440 _ACEOF
13441 if { (eval echo "$as_me:13441: \"$ac_cpp conftest.$ac_ext\"") >&5
13442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13443   ac_status=$?
13444   egrep -v '^ *\+' conftest.er1 >conftest.err
13445   rm -f conftest.er1
13446   cat conftest.err >&5
13447   echo "$as_me:13447: \$? = $ac_status" >&5
13448   (exit $ac_status); } >/dev/null; then
13449   if test -s conftest.err; then
13450     ac_cpp_err=$ac_c_preproc_warn_flag
13451   else
13452     ac_cpp_err=
13453   fi
13454 else
13455   ac_cpp_err=yes
13456 fi
13457 if test -z "$ac_cpp_err"; then
13458   ac_cv_header_db_h=yes
13459 else
13460   echo "$as_me: failed program was:" >&5
13461   cat conftest.$ac_ext >&5
13462   ac_cv_header_db_h=no
13463 fi
13464 rm -f conftest.err conftest.$ac_ext
13465 fi
13466 echo "$as_me:13466: result: $ac_cv_header_db_h" >&5
13467 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13468 if test $ac_cv_header_db_h = yes; then
13469
13470 echo "$as_me:13470: checking for version of db" >&5
13471 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13472 if test "${cf_cv_hashed_db_version+set}" = set; then
13473   echo $ECHO_N "(cached) $ECHO_C" >&6
13474 else
13475
13476 cf_cv_hashed_db_version=unknown
13477
13478 for cf_db_version in 1 2 3 4
13479 do
13480
13481 echo "${as_me-configure}:13481: testing checking for db version $cf_db_version ..." 1>&5
13482
13483         cat >conftest.$ac_ext <<_ACEOF
13484 #line 13484 "configure"
13485 #include "confdefs.h"
13486
13487 $ac_includes_default
13488 #include <db.h>
13489
13490 #ifdef DB_VERSION_MAJOR
13491         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13492 #if $cf_db_version == DB_VERSION_MAJOR
13493         /* ok */
13494 #else
13495         make an error
13496 #endif
13497 #else
13498 #if $cf_db_version == 1
13499         /* ok: assuming this is DB 1.8.5 */
13500 #else
13501         make an error
13502 #endif
13503 #endif
13504
13505 int
13506 main ()
13507 {
13508 DBT *foo = 0
13509   ;
13510   return 0;
13511 }
13512 _ACEOF
13513 rm -f conftest.$ac_objext
13514 if { (eval echo "$as_me:13514: \"$ac_compile\"") >&5
13515   (eval $ac_compile) 2>&5
13516   ac_status=$?
13517   echo "$as_me:13517: \$? = $ac_status" >&5
13518   (exit $ac_status); } &&
13519          { ac_try='test -s conftest.$ac_objext'
13520   { (eval echo "$as_me:13520: \"$ac_try\"") >&5
13521   (eval $ac_try) 2>&5
13522   ac_status=$?
13523   echo "$as_me:13523: \$? = $ac_status" >&5
13524   (exit $ac_status); }; }; then
13525
13526         cf_cv_hashed_db_version=$cf_db_version
13527         break
13528
13529 else
13530   echo "$as_me: failed program was:" >&5
13531 cat conftest.$ac_ext >&5
13532 fi
13533 rm -f conftest.$ac_objext conftest.$ac_ext
13534 done
13535
13536 fi
13537 echo "$as_me:13537: result: $cf_cv_hashed_db_version" >&5
13538 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13539
13540 if test "$cf_cv_hashed_db_version" = unknown ; then
13541         { { echo "$as_me:13541: error: Cannot determine version of db" >&5
13542 echo "$as_me: error: Cannot determine version of db" >&2;}
13543    { (exit 1); exit 1; }; }
13544 else
13545
13546 echo "$as_me:13546: checking for db libraries" >&5
13547 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13548 if test "${cf_cv_hashed_db_libs+set}" = set; then
13549   echo $ECHO_N "(cached) $ECHO_C" >&6
13550 else
13551
13552 cf_cv_hashed_db_libs=unknown
13553 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13554 do
13555         cf_save_libs="$LIBS"
13556         if test -n "$cf_db_libs"; then
13557                 LIBS="-l$cf_db_libs $LIBS"
13558         fi
13559
13560 echo "${as_me-configure}:13560: testing checking for library "$cf_db_libs" ..." 1>&5
13561
13562         cat >conftest.$ac_ext <<_ACEOF
13563 #line 13563 "configure"
13564 #include "confdefs.h"
13565
13566 $ac_includes_default
13567 #include <db.h>
13568
13569 int
13570 main ()
13571 {
13572
13573         char *path = "/tmp/foo";
13574 #ifdef DB_VERSION_MAJOR
13575 #if DB_VERSION_MAJOR >= 4
13576         DB *result = 0;
13577         db_create(&result, NULL, 0);
13578         result->open(result,
13579                 NULL,
13580                 path,
13581                 path,
13582                 DB_HASH,
13583                 DB_CREATE,
13584                 0644);
13585 #elif DB_VERSION_MAJOR >= 3
13586         DB *result = 0;
13587         db_create(&result, NULL, 0);
13588         result->open(result,
13589                 path,
13590                 path,
13591                 DB_HASH,
13592                 DB_CREATE,
13593                 0644);
13594 #elif DB_VERSION_MAJOR >= 2
13595         DB *result = 0;
13596         db_open(path,
13597                 DB_HASH,
13598                 DB_CREATE,
13599                 0644,
13600                 (DB_ENV *) 0,
13601                 (DB_INFO *) 0,
13602                 &result);
13603 #endif /* DB_VERSION_MAJOR */
13604 #else
13605         DB *result = dbopen(path,
13606                      2,
13607                      0644,
13608                      DB_HASH,
13609                      0);
13610 #endif
13611         ${cf_cv_main_return:-return}(result != 0)
13612
13613   ;
13614   return 0;
13615 }
13616 _ACEOF
13617 rm -f conftest.$ac_objext conftest$ac_exeext
13618 if { (eval echo "$as_me:13618: \"$ac_link\"") >&5
13619   (eval $ac_link) 2>&5
13620   ac_status=$?
13621   echo "$as_me:13621: \$? = $ac_status" >&5
13622   (exit $ac_status); } &&
13623          { ac_try='test -s conftest$ac_exeext'
13624   { (eval echo "$as_me:13624: \"$ac_try\"") >&5
13625   (eval $ac_try) 2>&5
13626   ac_status=$?
13627   echo "$as_me:13627: \$? = $ac_status" >&5
13628   (exit $ac_status); }; }; then
13629
13630         if test -n "$cf_db_libs" ; then
13631                 cf_cv_hashed_db_libs=$cf_db_libs
13632         else
13633                 cf_cv_hashed_db_libs=default
13634         fi
13635         LIBS="$cf_save_libs"
13636         break
13637
13638 else
13639   echo "$as_me: failed program was:" >&5
13640 cat conftest.$ac_ext >&5
13641 fi
13642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13643         LIBS="$cf_save_libs"
13644 done
13645
13646 fi
13647 echo "$as_me:13647: result: $cf_cv_hashed_db_libs" >&5
13648 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13649
13650         if test "$cf_cv_hashed_db_libs" = unknown ; then
13651                 { { echo "$as_me:13651: error: Cannot determine library for db" >&5
13652 echo "$as_me: error: Cannot determine library for db" >&2;}
13653    { (exit 1); exit 1; }; }
13654         elif test "$cf_cv_hashed_db_libs" != default ; then
13655                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13656         fi
13657 fi
13658
13659 else
13660
13661         { { echo "$as_me:13661: error: Cannot find db.h" >&5
13662 echo "$as_me: error: Cannot find db.h" >&2;}
13663    { (exit 1); exit 1; }; }
13664
13665 fi
13666
13667 fi
13668
13669 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13670         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13671         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13672 fi
13673
13674 # Just in case, check if the C compiler has a bool type.
13675
13676 echo "$as_me:13676: checking if we should include stdbool.h" >&5
13677 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13678
13679 if test "${cf_cv_header_stdbool_h+set}" = set; then
13680   echo $ECHO_N "(cached) $ECHO_C" >&6
13681 else
13682
13683         cat >conftest.$ac_ext <<_ACEOF
13684 #line 13684 "configure"
13685 #include "confdefs.h"
13686
13687 int
13688 main ()
13689 {
13690 bool foo = false
13691   ;
13692   return 0;
13693 }
13694 _ACEOF
13695 rm -f conftest.$ac_objext
13696 if { (eval echo "$as_me:13696: \"$ac_compile\"") >&5
13697   (eval $ac_compile) 2>&5
13698   ac_status=$?
13699   echo "$as_me:13699: \$? = $ac_status" >&5
13700   (exit $ac_status); } &&
13701          { ac_try='test -s conftest.$ac_objext'
13702   { (eval echo "$as_me:13702: \"$ac_try\"") >&5
13703   (eval $ac_try) 2>&5
13704   ac_status=$?
13705   echo "$as_me:13705: \$? = $ac_status" >&5
13706   (exit $ac_status); }; }; then
13707   cf_cv_header_stdbool_h=0
13708 else
13709   echo "$as_me: failed program was:" >&5
13710 cat conftest.$ac_ext >&5
13711 cat >conftest.$ac_ext <<_ACEOF
13712 #line 13712 "configure"
13713 #include "confdefs.h"
13714
13715 #ifndef __BEOS__
13716 #include <stdbool.h>
13717 #endif
13718
13719 int
13720 main ()
13721 {
13722 bool foo = false
13723   ;
13724   return 0;
13725 }
13726 _ACEOF
13727 rm -f conftest.$ac_objext
13728 if { (eval echo "$as_me:13728: \"$ac_compile\"") >&5
13729   (eval $ac_compile) 2>&5
13730   ac_status=$?
13731   echo "$as_me:13731: \$? = $ac_status" >&5
13732   (exit $ac_status); } &&
13733          { ac_try='test -s conftest.$ac_objext'
13734   { (eval echo "$as_me:13734: \"$ac_try\"") >&5
13735   (eval $ac_try) 2>&5
13736   ac_status=$?
13737   echo "$as_me:13737: \$? = $ac_status" >&5
13738   (exit $ac_status); }; }; then
13739   cf_cv_header_stdbool_h=1
13740 else
13741   echo "$as_me: failed program was:" >&5
13742 cat conftest.$ac_ext >&5
13743 cf_cv_header_stdbool_h=0
13744 fi
13745 rm -f conftest.$ac_objext conftest.$ac_ext
13746 fi
13747 rm -f conftest.$ac_objext conftest.$ac_ext
13748 fi
13749
13750 if test "$cf_cv_header_stdbool_h" = 1
13751 then    echo "$as_me:13751: result: yes" >&5
13752 echo "${ECHO_T}yes" >&6
13753 else    echo "$as_me:13753: result: no" >&5
13754 echo "${ECHO_T}no" >&6
13755 fi
13756
13757 echo "$as_me:13757: checking for builtin bool type" >&5
13758 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13759
13760 if test "${cf_cv_cc_bool_type+set}" = set; then
13761   echo $ECHO_N "(cached) $ECHO_C" >&6
13762 else
13763
13764         cat >conftest.$ac_ext <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767
13768 #include <stdio.h>
13769 #include <sys/types.h>
13770
13771 int
13772 main ()
13773 {
13774 bool x = false
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest.$ac_objext
13780 if { (eval echo "$as_me:13780: \"$ac_compile\"") >&5
13781   (eval $ac_compile) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -s conftest.$ac_objext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   cf_cv_cc_bool_type=1
13792 else
13793   echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 cf_cv_cc_bool_type=0
13796 fi
13797 rm -f conftest.$ac_objext conftest.$ac_ext
13798
13799 fi
13800
13801 if test "$cf_cv_cc_bool_type" = 1
13802 then    echo "$as_me:13802: result: yes" >&5
13803 echo "${ECHO_T}yes" >&6
13804 else    echo "$as_me:13804: result: no" >&5
13805 echo "${ECHO_T}no" >&6
13806 fi
13807
13808 # Check for C++ compiler characteristics (and ensure that it's there!)
13809 if test -n "$CXX" ; then
13810         ac_ext=cc
13811 ac_cpp='$CXXCPP $CPPFLAGS'
13812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13815 ac_main_return=return
13816
13817 if test -n "$GXX" ; then
13818 case $cf_cv_system_name in #(vi
13819 os2*) #(vi
13820         cf_stdcpp_libname=stdcpp
13821         ;;
13822 *)
13823         cf_stdcpp_libname=stdc++
13824         ;;
13825 esac
13826 echo "$as_me:13826: checking for library $cf_stdcpp_libname" >&5
13827 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13828 if test "${cf_cv_libstdcpp+set}" = set; then
13829   echo $ECHO_N "(cached) $ECHO_C" >&6
13830 else
13831
13832         cf_save="$LIBS"
13833         LIBS="$LIBS -l$cf_stdcpp_libname"
13834 cat >conftest.$ac_ext <<_ACEOF
13835 #line 13835 "configure"
13836 #include "confdefs.h"
13837
13838 #include <strstream.h>
13839 int
13840 main ()
13841 {
13842
13843 char buf[80];
13844 strstreambuf foo(buf, sizeof(buf))
13845
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 rm -f conftest.$ac_objext conftest$ac_exeext
13851 if { (eval echo "$as_me:13851: \"$ac_link\"") >&5
13852   (eval $ac_link) 2>&5
13853   ac_status=$?
13854   echo "$as_me:13854: \$? = $ac_status" >&5
13855   (exit $ac_status); } &&
13856          { ac_try='test -s conftest$ac_exeext'
13857   { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }; then
13862   cf_cv_libstdcpp=yes
13863 else
13864   echo "$as_me: failed program was:" >&5
13865 cat conftest.$ac_ext >&5
13866 cf_cv_libstdcpp=no
13867 fi
13868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13869         LIBS="$cf_save"
13870
13871 fi
13872 echo "$as_me:13872: result: $cf_cv_libstdcpp" >&5
13873 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13874 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13875 fi
13876
13877         echo "$as_me:13877: checking whether $CXX understands -c and -o together" >&5
13878 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13879 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13880   echo $ECHO_N "(cached) $ECHO_C" >&6
13881 else
13882
13883 cat > conftest.$ac_ext <<CF_EOF
13884 #include <stdio.h>
13885 int main()
13886 {
13887         ${cf_cv_main_return:-return}(0);
13888 }
13889 CF_EOF
13890 # We do the test twice because some compilers refuse to overwrite an
13891 # existing .o file with -o, though they will create one.
13892 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13893 if { (eval echo "$as_me:13893: \"$ac_try\"") >&5
13894   (eval $ac_try) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit $ac_status); } &&
13898   test -f conftest2.$ac_objext && { (eval echo "$as_me:13898: \"$ac_try\"") >&5
13899   (eval $ac_try) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); };
13903 then
13904   eval cf_cv_prog_CXX_c_o=yes
13905 else
13906   eval cf_cv_prog_CXX_c_o=no
13907 fi
13908 rm -f conftest*
13909
13910 fi
13911 if test $cf_cv_prog_CXX_c_o = yes; then
13912   echo "$as_me:13912: result: yes" >&5
13913 echo "${ECHO_T}yes" >&6
13914 else
13915   echo "$as_me:13915: result: no" >&5
13916 echo "${ECHO_T}no" >&6
13917 fi
13918
13919         case $GXX_VERSION in
13920         1*|2.0-6*)
13921                 cf_cxx_library=yes
13922                 ;;
13923         *-2.7*|2.7*)
13924
13925 cf_cxx_library=unknown
13926 case $cf_cv_system_name in #(vi
13927 os2*) #(vi
13928         cf_gpp_libname=gpp
13929         ;;
13930 *)
13931         cf_gpp_libname=g++
13932         ;;
13933 esac
13934 if test "$GXX" = yes; then
13935         echo "$as_me:13935: checking for lib$cf_gpp_libname" >&5
13936 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13937         cf_save="$LIBS"
13938         LIBS="$LIBS -l$cf_gpp_libname"
13939         cat >conftest.$ac_ext <<_ACEOF
13940 #line 13940 "configure"
13941 #include "confdefs.h"
13942
13943 #include <$cf_gpp_libname/builtin.h>
13944
13945 int
13946 main ()
13947 {
13948 two_arg_error_handler_t foo2 = lib_error_handler
13949   ;
13950   return 0;
13951 }
13952 _ACEOF
13953 rm -f conftest.$ac_objext conftest$ac_exeext
13954 if { (eval echo "$as_me:13954: \"$ac_link\"") >&5
13955   (eval $ac_link) 2>&5
13956   ac_status=$?
13957   echo "$as_me:13957: \$? = $ac_status" >&5
13958   (exit $ac_status); } &&
13959          { ac_try='test -s conftest$ac_exeext'
13960   { (eval echo "$as_me:13960: \"$ac_try\"") >&5
13961   (eval $ac_try) 2>&5
13962   ac_status=$?
13963   echo "$as_me:13963: \$? = $ac_status" >&5
13964   (exit $ac_status); }; }; then
13965   cf_cxx_library=yes
13966          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13967          if test "$cf_gpp_libname" = cpp ; then
13968             cat >>confdefs.h <<\EOF
13969 #define HAVE_GPP_BUILTIN_H 1
13970 EOF
13971
13972          else
13973             cat >>confdefs.h <<\EOF
13974 #define HAVE_GXX_BUILTIN_H 1
13975 EOF
13976
13977          fi
13978 else
13979   echo "$as_me: failed program was:" >&5
13980 cat conftest.$ac_ext >&5
13981 cat >conftest.$ac_ext <<_ACEOF
13982 #line 13982 "configure"
13983 #include "confdefs.h"
13984
13985 #include <builtin.h>
13986
13987 int
13988 main ()
13989 {
13990 two_arg_error_handler_t foo2 = lib_error_handler
13991   ;
13992   return 0;
13993 }
13994 _ACEOF
13995 rm -f conftest.$ac_objext conftest$ac_exeext
13996 if { (eval echo "$as_me:13996: \"$ac_link\"") >&5
13997   (eval $ac_link) 2>&5
13998   ac_status=$?
13999   echo "$as_me:13999: \$? = $ac_status" >&5
14000   (exit $ac_status); } &&
14001          { ac_try='test -s conftest$ac_exeext'
14002   { (eval echo "$as_me:14002: \"$ac_try\"") >&5
14003   (eval $ac_try) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); }; }; then
14007   cf_cxx_library=yes
14008          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14009          cat >>confdefs.h <<\EOF
14010 #define HAVE_BUILTIN_H 1
14011 EOF
14012
14013 else
14014   echo "$as_me: failed program was:" >&5
14015 cat conftest.$ac_ext >&5
14016 cf_cxx_library=no
14017 fi
14018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14019 fi
14020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14021         LIBS="$cf_save"
14022         echo "$as_me:14022: result: $cf_cxx_library" >&5
14023 echo "${ECHO_T}$cf_cxx_library" >&6
14024 fi
14025
14026                 ;;
14027         *)
14028                 cf_cxx_library=no
14029                 ;;
14030         esac
14031
14032         ac_ext=cc
14033 ac_cpp='$CXXCPP $CPPFLAGS'
14034 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14035 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14036 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14037 ac_main_return=return
14038 echo "$as_me:14038: checking how to run the C++ preprocessor" >&5
14039 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14040 if test -z "$CXXCPP"; then
14041   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14042   echo $ECHO_N "(cached) $ECHO_C" >&6
14043 else
14044       # Double quotes because CXXCPP needs to be expanded
14045     for CXXCPP in "$CXX -E" "/lib/cpp"
14046     do
14047       ac_preproc_ok=false
14048 for ac_cxx_preproc_warn_flag in '' yes
14049 do
14050   # Use a header file that comes with gcc, so configuring glibc
14051   # with a fresh cross-compiler works.
14052   # On the NeXT, cc -E runs the code through the compiler's parser,
14053   # not just through cpp. "Syntax error" is here to catch this case.
14054   cat >conftest.$ac_ext <<_ACEOF
14055 #line 14055 "configure"
14056 #include "confdefs.h"
14057 #include <assert.h>
14058                      Syntax error
14059 _ACEOF
14060 if { (eval echo "$as_me:14060: \"$ac_cpp conftest.$ac_ext\"") >&5
14061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14062   ac_status=$?
14063   egrep -v '^ *\+' conftest.er1 >conftest.err
14064   rm -f conftest.er1
14065   cat conftest.err >&5
14066   echo "$as_me:14066: \$? = $ac_status" >&5
14067   (exit $ac_status); } >/dev/null; then
14068   if test -s conftest.err; then
14069     ac_cpp_err=$ac_cxx_preproc_warn_flag
14070   else
14071     ac_cpp_err=
14072   fi
14073 else
14074   ac_cpp_err=yes
14075 fi
14076 if test -z "$ac_cpp_err"; then
14077   :
14078 else
14079   echo "$as_me: failed program was:" >&5
14080   cat conftest.$ac_ext >&5
14081   # Broken: fails on valid input.
14082 continue
14083 fi
14084 rm -f conftest.err conftest.$ac_ext
14085
14086   # OK, works on sane cases.  Now check whether non-existent headers
14087   # can be detected and how.
14088   cat >conftest.$ac_ext <<_ACEOF
14089 #line 14089 "configure"
14090 #include "confdefs.h"
14091 #include <ac_nonexistent.h>
14092 _ACEOF
14093 if { (eval echo "$as_me:14093: \"$ac_cpp conftest.$ac_ext\"") >&5
14094   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14095   ac_status=$?
14096   egrep -v '^ *\+' conftest.er1 >conftest.err
14097   rm -f conftest.er1
14098   cat conftest.err >&5
14099   echo "$as_me:14099: \$? = $ac_status" >&5
14100   (exit $ac_status); } >/dev/null; then
14101   if test -s conftest.err; then
14102     ac_cpp_err=$ac_cxx_preproc_warn_flag
14103   else
14104     ac_cpp_err=
14105   fi
14106 else
14107   ac_cpp_err=yes
14108 fi
14109 if test -z "$ac_cpp_err"; then
14110   # Broken: success on invalid input.
14111 continue
14112 else
14113   echo "$as_me: failed program was:" >&5
14114   cat conftest.$ac_ext >&5
14115   # Passes both tests.
14116 ac_preproc_ok=:
14117 break
14118 fi
14119 rm -f conftest.err conftest.$ac_ext
14120
14121 done
14122 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14123 rm -f conftest.err conftest.$ac_ext
14124 if $ac_preproc_ok; then
14125   break
14126 fi
14127
14128     done
14129     ac_cv_prog_CXXCPP=$CXXCPP
14130
14131 fi
14132   CXXCPP=$ac_cv_prog_CXXCPP
14133 else
14134   ac_cv_prog_CXXCPP=$CXXCPP
14135 fi
14136 echo "$as_me:14136: result: $CXXCPP" >&5
14137 echo "${ECHO_T}$CXXCPP" >&6
14138 ac_preproc_ok=false
14139 for ac_cxx_preproc_warn_flag in '' yes
14140 do
14141   # Use a header file that comes with gcc, so configuring glibc
14142   # with a fresh cross-compiler works.
14143   # On the NeXT, cc -E runs the code through the compiler's parser,
14144   # not just through cpp. "Syntax error" is here to catch this case.
14145   cat >conftest.$ac_ext <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14148 #include <assert.h>
14149                      Syntax error
14150 _ACEOF
14151 if { (eval echo "$as_me:14151: \"$ac_cpp conftest.$ac_ext\"") >&5
14152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14153   ac_status=$?
14154   egrep -v '^ *\+' conftest.er1 >conftest.err
14155   rm -f conftest.er1
14156   cat conftest.err >&5
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit $ac_status); } >/dev/null; then
14159   if test -s conftest.err; then
14160     ac_cpp_err=$ac_cxx_preproc_warn_flag
14161   else
14162     ac_cpp_err=
14163   fi
14164 else
14165   ac_cpp_err=yes
14166 fi
14167 if test -z "$ac_cpp_err"; then
14168   :
14169 else
14170   echo "$as_me: failed program was:" >&5
14171   cat conftest.$ac_ext >&5
14172   # Broken: fails on valid input.
14173 continue
14174 fi
14175 rm -f conftest.err conftest.$ac_ext
14176
14177   # OK, works on sane cases.  Now check whether non-existent headers
14178   # can be detected and how.
14179   cat >conftest.$ac_ext <<_ACEOF
14180 #line 14180 "configure"
14181 #include "confdefs.h"
14182 #include <ac_nonexistent.h>
14183 _ACEOF
14184 if { (eval echo "$as_me:14184: \"$ac_cpp conftest.$ac_ext\"") >&5
14185   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14186   ac_status=$?
14187   egrep -v '^ *\+' conftest.er1 >conftest.err
14188   rm -f conftest.er1
14189   cat conftest.err >&5
14190   echo "$as_me:14190: \$? = $ac_status" >&5
14191   (exit $ac_status); } >/dev/null; then
14192   if test -s conftest.err; then
14193     ac_cpp_err=$ac_cxx_preproc_warn_flag
14194   else
14195     ac_cpp_err=
14196   fi
14197 else
14198   ac_cpp_err=yes
14199 fi
14200 if test -z "$ac_cpp_err"; then
14201   # Broken: success on invalid input.
14202 continue
14203 else
14204   echo "$as_me: failed program was:" >&5
14205   cat conftest.$ac_ext >&5
14206   # Passes both tests.
14207 ac_preproc_ok=:
14208 break
14209 fi
14210 rm -f conftest.err conftest.$ac_ext
14211
14212 done
14213 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14214 rm -f conftest.err conftest.$ac_ext
14215 if $ac_preproc_ok; then
14216   :
14217 else
14218   { { echo "$as_me:14218: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14219 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14220    { (exit 1); exit 1; }; }
14221 fi
14222
14223 ac_ext=cc
14224 ac_cpp='$CXXCPP $CPPFLAGS'
14225 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14226 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14227 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14228 ac_main_return=return
14229
14230 for ac_header in iostream typeinfo
14231 do
14232 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14233 echo "$as_me:14233: checking for $ac_header" >&5
14234 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14235 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14236   echo $ECHO_N "(cached) $ECHO_C" >&6
14237 else
14238   cat >conftest.$ac_ext <<_ACEOF
14239 #line 14239 "configure"
14240 #include "confdefs.h"
14241 #include <$ac_header>
14242 _ACEOF
14243 if { (eval echo "$as_me:14243: \"$ac_cpp conftest.$ac_ext\"") >&5
14244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14245   ac_status=$?
14246   egrep -v '^ *\+' conftest.er1 >conftest.err
14247   rm -f conftest.er1
14248   cat conftest.err >&5
14249   echo "$as_me:14249: \$? = $ac_status" >&5
14250   (exit $ac_status); } >/dev/null; then
14251   if test -s conftest.err; then
14252     ac_cpp_err=$ac_cxx_preproc_warn_flag
14253   else
14254     ac_cpp_err=
14255   fi
14256 else
14257   ac_cpp_err=yes
14258 fi
14259 if test -z "$ac_cpp_err"; then
14260   eval "$as_ac_Header=yes"
14261 else
14262   echo "$as_me: failed program was:" >&5
14263   cat conftest.$ac_ext >&5
14264   eval "$as_ac_Header=no"
14265 fi
14266 rm -f conftest.err conftest.$ac_ext
14267 fi
14268 echo "$as_me:14268: result: `eval echo '${'$as_ac_Header'}'`" >&5
14269 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14270 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14271   cat >>confdefs.h <<EOF
14272 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14273 EOF
14274
14275 fi
14276 done
14277
14278 echo "$as_me:14278: checking if we should include stdbool.h" >&5
14279 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14280
14281 if test "${cf_cv_header_stdbool_h+set}" = set; then
14282   echo $ECHO_N "(cached) $ECHO_C" >&6
14283 else
14284
14285         cat >conftest.$ac_ext <<_ACEOF
14286 #line 14286 "configure"
14287 #include "confdefs.h"
14288
14289 int
14290 main ()
14291 {
14292 bool foo = false
14293   ;
14294   return 0;
14295 }
14296 _ACEOF
14297 rm -f conftest.$ac_objext
14298 if { (eval echo "$as_me:14298: \"$ac_compile\"") >&5
14299   (eval $ac_compile) 2>&5
14300   ac_status=$?
14301   echo "$as_me:14301: \$? = $ac_status" >&5
14302   (exit $ac_status); } &&
14303          { ac_try='test -s conftest.$ac_objext'
14304   { (eval echo "$as_me:14304: \"$ac_try\"") >&5
14305   (eval $ac_try) 2>&5
14306   ac_status=$?
14307   echo "$as_me:14307: \$? = $ac_status" >&5
14308   (exit $ac_status); }; }; then
14309   cf_cv_header_stdbool_h=0
14310 else
14311   echo "$as_me: failed program was:" >&5
14312 cat conftest.$ac_ext >&5
14313 cat >conftest.$ac_ext <<_ACEOF
14314 #line 14314 "configure"
14315 #include "confdefs.h"
14316
14317 #ifndef __BEOS__
14318 #include <stdbool.h>
14319 #endif
14320
14321 int
14322 main ()
14323 {
14324 bool foo = false
14325   ;
14326   return 0;
14327 }
14328 _ACEOF
14329 rm -f conftest.$ac_objext
14330 if { (eval echo "$as_me:14330: \"$ac_compile\"") >&5
14331   (eval $ac_compile) 2>&5
14332   ac_status=$?
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit $ac_status); } &&
14335          { ac_try='test -s conftest.$ac_objext'
14336   { (eval echo "$as_me:14336: \"$ac_try\"") >&5
14337   (eval $ac_try) 2>&5
14338   ac_status=$?
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit $ac_status); }; }; then
14341   cf_cv_header_stdbool_h=1
14342 else
14343   echo "$as_me: failed program was:" >&5
14344 cat conftest.$ac_ext >&5
14345 cf_cv_header_stdbool_h=0
14346 fi
14347 rm -f conftest.$ac_objext conftest.$ac_ext
14348 fi
14349 rm -f conftest.$ac_objext conftest.$ac_ext
14350 fi
14351
14352 if test "$cf_cv_header_stdbool_h" = 1
14353 then    echo "$as_me:14353: result: yes" >&5
14354 echo "${ECHO_T}yes" >&6
14355 else    echo "$as_me:14355: result: no" >&5
14356 echo "${ECHO_T}no" >&6
14357 fi
14358
14359 echo "$as_me:14359: checking for builtin bool type" >&5
14360 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14361
14362 if test "${cf_cv_builtin_bool+set}" = set; then
14363   echo $ECHO_N "(cached) $ECHO_C" >&6
14364 else
14365
14366         cat >conftest.$ac_ext <<_ACEOF
14367 #line 14367 "configure"
14368 #include "confdefs.h"
14369
14370 #include <stdio.h>
14371 #include <sys/types.h>
14372
14373 int
14374 main ()
14375 {
14376 bool x = false
14377   ;
14378   return 0;
14379 }
14380 _ACEOF
14381 rm -f conftest.$ac_objext
14382 if { (eval echo "$as_me:14382: \"$ac_compile\"") >&5
14383   (eval $ac_compile) 2>&5
14384   ac_status=$?
14385   echo "$as_me:14385: \$? = $ac_status" >&5
14386   (exit $ac_status); } &&
14387          { ac_try='test -s conftest.$ac_objext'
14388   { (eval echo "$as_me:14388: \"$ac_try\"") >&5
14389   (eval $ac_try) 2>&5
14390   ac_status=$?
14391   echo "$as_me:14391: \$? = $ac_status" >&5
14392   (exit $ac_status); }; }; then
14393   cf_cv_builtin_bool=1
14394 else
14395   echo "$as_me: failed program was:" >&5
14396 cat conftest.$ac_ext >&5
14397 cf_cv_builtin_bool=0
14398 fi
14399 rm -f conftest.$ac_objext conftest.$ac_ext
14400
14401 fi
14402
14403 if test "$cf_cv_builtin_bool" = 1
14404 then    echo "$as_me:14404: result: yes" >&5
14405 echo "${ECHO_T}yes" >&6
14406 else    echo "$as_me:14406: result: no" >&5
14407 echo "${ECHO_T}no" >&6
14408 fi
14409
14410 echo "$as_me:14410: checking for size of bool" >&5
14411 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14412 if test "${cf_cv_type_of_bool+set}" = set; then
14413   echo $ECHO_N "(cached) $ECHO_C" >&6
14414 else
14415
14416         rm -f cf_test.out
14417         if test "$cross_compiling" = yes; then
14418   cf_cv_type_of_bool=unknown
14419 else
14420   cat >conftest.$ac_ext <<_ACEOF
14421 #line 14421 "configure"
14422 #include "confdefs.h"
14423
14424 #include <stdlib.h>
14425 #include <stdio.h>
14426
14427 #if defined(__cplusplus)
14428
14429 #ifdef HAVE_GXX_BUILTIN_H
14430 #include <g++/builtin.h>
14431 #elif HAVE_GPP_BUILTIN_H
14432 #include <gpp/builtin.h>
14433 #elif HAVE_BUILTIN_H
14434 #include <builtin.h>
14435 #endif
14436
14437 #else
14438
14439 #if $cf_cv_header_stdbool_h
14440 #include <stdbool.h>
14441 #endif
14442
14443 #endif
14444
14445 main()
14446 {
14447         FILE *fp = fopen("cf_test.out", "w");
14448         if (fp != 0) {
14449                 bool x = true;
14450                 if ((bool)(-x) >= 0)
14451                         fputs("unsigned ", fp);
14452                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14453                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14454                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14455                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14456                 fclose(fp);
14457         }
14458         ${cf_cv_main_return:-return}(0);
14459 }
14460
14461 _ACEOF
14462 rm -f conftest$ac_exeext
14463 if { (eval echo "$as_me:14463: \"$ac_link\"") >&5
14464   (eval $ac_link) 2>&5
14465   ac_status=$?
14466   echo "$as_me:14466: \$? = $ac_status" >&5
14467   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14468   { (eval echo "$as_me:14468: \"$ac_try\"") >&5
14469   (eval $ac_try) 2>&5
14470   ac_status=$?
14471   echo "$as_me:14471: \$? = $ac_status" >&5
14472   (exit $ac_status); }; }; then
14473   cf_cv_type_of_bool=`cat cf_test.out`
14474                  if test -z "$cf_cv_type_of_bool"; then
14475                    cf_cv_type_of_bool=unknown
14476                  fi
14477 else
14478   echo "$as_me: program exited with status $ac_status" >&5
14479 echo "$as_me: failed program was:" >&5
14480 cat conftest.$ac_ext >&5
14481 cf_cv_type_of_bool=unknown
14482 fi
14483 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14484 fi
14485
14486 fi
14487
14488         rm -f cf_test.out
14489 echo "$as_me:14489: result: $cf_cv_type_of_bool" >&5
14490 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14491 if test "$cf_cv_type_of_bool" = unknown ; then
14492         case .$NCURSES_BOOL in #(vi
14493         .auto|.) NCURSES_BOOL=unsigned;;
14494         esac
14495         { echo "$as_me:14495: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14496 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14497         cf_cv_type_of_bool=$NCURSES_BOOL
14498 fi
14499
14500 echo "$as_me:14500: checking for special defines needed for etip.h" >&5
14501 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14502 cf_save_CXXFLAGS="$CXXFLAGS"
14503 cf_result="none"
14504 for cf_math in "" MATH_H
14505 do
14506 for cf_excp in "" MATH_EXCEPTION
14507 do
14508         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14509         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14510         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14511 cat >conftest.$ac_ext <<_ACEOF
14512 #line 14512 "configure"
14513 #include "confdefs.h"
14514
14515 #include <etip.h.in>
14516
14517 int
14518 main ()
14519 {
14520
14521   ;
14522   return 0;
14523 }
14524 _ACEOF
14525 rm -f conftest.$ac_objext
14526 if { (eval echo "$as_me:14526: \"$ac_compile\"") >&5
14527   (eval $ac_compile) 2>&5
14528   ac_status=$?
14529   echo "$as_me:14529: \$? = $ac_status" >&5
14530   (exit $ac_status); } &&
14531          { ac_try='test -s conftest.$ac_objext'
14532   { (eval echo "$as_me:14532: \"$ac_try\"") >&5
14533   (eval $ac_try) 2>&5
14534   ac_status=$?
14535   echo "$as_me:14535: \$? = $ac_status" >&5
14536   (exit $ac_status); }; }; then
14537
14538         test -n "$cf_math" && cat >>confdefs.h <<EOF
14539 #define ETIP_NEEDS_${cf_math} 1
14540 EOF
14541
14542         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14543 #define ETIP_NEEDS_${cf_excp} 1
14544 EOF
14545
14546         cf_result="$cf_math $cf_excp"
14547         break
14548
14549 else
14550   echo "$as_me: failed program was:" >&5
14551 cat conftest.$ac_ext >&5
14552 fi
14553 rm -f conftest.$ac_objext conftest.$ac_ext
14554 done
14555 done
14556 echo "$as_me:14556: result: $cf_result" >&5
14557 echo "${ECHO_T}$cf_result" >&6
14558 CXXFLAGS="$cf_save_CXXFLAGS"
14559
14560 if test -n "$CXX"; then
14561 echo "$as_me:14561: checking if $CXX accepts parameter initialization" >&5
14562 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14563 if test "${cf_cv_cpp_param_init+set}" = set; then
14564   echo $ECHO_N "(cached) $ECHO_C" >&6
14565 else
14566
14567         ac_ext=cc
14568 ac_cpp='$CXXCPP $CPPFLAGS'
14569 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14570 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14571 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14572 ac_main_return=return
14573
14574         if test "$cross_compiling" = yes; then
14575   cf_cv_cpp_param_init=unknown
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580
14581 class TEST {
14582 private:
14583         int value;
14584 public:
14585         TEST(int x = 1);
14586         ~TEST();
14587 };
14588
14589 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14590 {
14591         value = x;
14592 }
14593 void main() { }
14594
14595 _ACEOF
14596 rm -f conftest$ac_exeext
14597 if { (eval echo "$as_me:14597: \"$ac_link\"") >&5
14598   (eval $ac_link) 2>&5
14599   ac_status=$?
14600   echo "$as_me:14600: \$? = $ac_status" >&5
14601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14602   { (eval echo "$as_me:14602: \"$ac_try\"") >&5
14603   (eval $ac_try) 2>&5
14604   ac_status=$?
14605   echo "$as_me:14605: \$? = $ac_status" >&5
14606   (exit $ac_status); }; }; then
14607   cf_cv_cpp_param_init=yes
14608 else
14609   echo "$as_me: program exited with status $ac_status" >&5
14610 echo "$as_me: failed program was:" >&5
14611 cat conftest.$ac_ext >&5
14612 cf_cv_cpp_param_init=no
14613 fi
14614 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14615 fi
14616         ac_ext=cc
14617 ac_cpp='$CXXCPP $CPPFLAGS'
14618 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14619 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14620 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14621 ac_main_return=return
14622
14623 fi
14624 echo "$as_me:14624: result: $cf_cv_cpp_param_init" >&5
14625 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14626 fi
14627 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14628 #define CPP_HAS_PARAM_INIT 1
14629 EOF
14630
14631 if test -n "$CXX"; then
14632
14633 echo "$as_me:14633: checking if $CXX accepts static_cast" >&5
14634 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14635 if test "${cf_cv_cpp_static_cast+set}" = set; then
14636   echo $ECHO_N "(cached) $ECHO_C" >&6
14637 else
14638
14639         ac_ext=cc
14640 ac_cpp='$CXXCPP $CPPFLAGS'
14641 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14642 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14643 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14644 ac_main_return=return
14645
14646         cat >conftest.$ac_ext <<_ACEOF
14647 #line 14647 "configure"
14648 #include "confdefs.h"
14649
14650 class NCursesPanel
14651 {
14652 public:
14653   NCursesPanel(int nlines,
14654                int ncols,
14655                int begin_y = 0,
14656                int begin_x = 0)
14657   {
14658   }
14659
14660   ~NCursesPanel();
14661 };
14662
14663 template<class T> class NCursesUserPanel : public NCursesPanel
14664 {
14665 public:
14666   NCursesUserPanel (int nlines,
14667                     int ncols,
14668                     int begin_y = 0,
14669                     int begin_x = 0,
14670                     const T* p_UserData = static_cast<T*>(0))
14671     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14672   {
14673   };
14674   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14675   {
14676   };
14677
14678   virtual ~NCursesUserPanel() {};
14679 };
14680
14681 int
14682 main ()
14683 {
14684
14685         const char* p_UserData = static_cast<char*>(0)
14686   ;
14687   return 0;
14688 }
14689 _ACEOF
14690 rm -f conftest.$ac_objext
14691 if { (eval echo "$as_me:14691: \"$ac_compile\"") >&5
14692   (eval $ac_compile) 2>&5
14693   ac_status=$?
14694   echo "$as_me:14694: \$? = $ac_status" >&5
14695   (exit $ac_status); } &&
14696          { ac_try='test -s conftest.$ac_objext'
14697   { (eval echo "$as_me:14697: \"$ac_try\"") >&5
14698   (eval $ac_try) 2>&5
14699   ac_status=$?
14700   echo "$as_me:14700: \$? = $ac_status" >&5
14701   (exit $ac_status); }; }; then
14702   cf_cv_cpp_static_cast=yes
14703 else
14704   echo "$as_me: failed program was:" >&5
14705 cat conftest.$ac_ext >&5
14706 cf_cv_cpp_static_cast=no
14707 fi
14708 rm -f conftest.$ac_objext conftest.$ac_ext
14709
14710         ac_ext=cc
14711 ac_cpp='$CXXCPP $CPPFLAGS'
14712 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14713 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14714 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14715 ac_main_return=return
14716
14717 fi
14718 echo "$as_me:14718: result: $cf_cv_cpp_static_cast" >&5
14719 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14720
14721 fi
14722
14723 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14724 #define CPP_HAS_STATIC_CAST 1
14725 EOF
14726
14727         CXX_AR='$(AR)'
14728         CXX_AR_OPTS='$(AR_OPTS)'
14729         case $cf_cv_system_name in #(vi
14730         irix*) #(vi
14731             if test "$GXX" != yes ; then
14732                 CXX_AR='$(CXX)'
14733                 CXX_AR_OPTS='-ar -o'
14734             fi
14735             ;;
14736         sco3.2v5*) #(vi
14737             CXXLDFLAGS="-u main"
14738             ;;
14739         solaris2*)
14740             if test "$GXX" != yes ; then
14741                 CXX_AR='$(CXX)'
14742                 CXX_AR_OPTS='-xar -o'
14743             fi
14744             ;;
14745         esac
14746
14747 else
14748         cf_cxx_library=no
14749         cf_cv_builtin_bool=1
14750
14751         # Just because we are not configuring against C++ right now does not
14752         # mean that a user will not want to use C++.  Some distributors disable
14753         # the C++ portion of this configuration as a shortcut (or just to avoid
14754         # compiling the demo in the c++ directory).  So we need a reasonable
14755         # default for the 'bool' type.
14756         #
14757         # Caveat: since the storage of the bool type is not standardized, it
14758         # may change.
14759
14760         if test "$NCURSES_BOOL" != auto ; then
14761                 cf_cv_type_of_bool=$NCURSES_BOOL
14762                 cf_cv_header_stdbool_h=0
14763         else
14764                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14765
14766 echo "$as_me:14766: checking for size of bool" >&5
14767 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14768 if test "${cf_cv_type_of_bool+set}" = set; then
14769   echo $ECHO_N "(cached) $ECHO_C" >&6
14770 else
14771
14772         rm -f cf_test.out
14773         if test "$cross_compiling" = yes; then
14774   cf_cv_type_of_bool=unknown
14775 else
14776   cat >conftest.$ac_ext <<_ACEOF
14777 #line 14777 "configure"
14778 #include "confdefs.h"
14779
14780 #include <stdlib.h>
14781 #include <stdio.h>
14782
14783 #if defined(__cplusplus)
14784
14785 #ifdef HAVE_GXX_BUILTIN_H
14786 #include <g++/builtin.h>
14787 #elif HAVE_GPP_BUILTIN_H
14788 #include <gpp/builtin.h>
14789 #elif HAVE_BUILTIN_H
14790 #include <builtin.h>
14791 #endif
14792
14793 #else
14794
14795 #if $cf_cv_header_stdbool_h
14796 #include <stdbool.h>
14797 #endif
14798
14799 #endif
14800
14801 main()
14802 {
14803         FILE *fp = fopen("cf_test.out", "w");
14804         if (fp != 0) {
14805                 bool x = true;
14806                 if ((bool)(-x) >= 0)
14807                         fputs("unsigned ", fp);
14808                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14809                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14810                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14811                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14812                 fclose(fp);
14813         }
14814         ${cf_cv_main_return:-return}(0);
14815 }
14816
14817 _ACEOF
14818 rm -f conftest$ac_exeext
14819 if { (eval echo "$as_me:14819: \"$ac_link\"") >&5
14820   (eval $ac_link) 2>&5
14821   ac_status=$?
14822   echo "$as_me:14822: \$? = $ac_status" >&5
14823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14824   { (eval echo "$as_me:14824: \"$ac_try\"") >&5
14825   (eval $ac_try) 2>&5
14826   ac_status=$?
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); }; }; then
14829   cf_cv_type_of_bool=`cat cf_test.out`
14830                  if test -z "$cf_cv_type_of_bool"; then
14831                    cf_cv_type_of_bool=unknown
14832                  fi
14833 else
14834   echo "$as_me: program exited with status $ac_status" >&5
14835 echo "$as_me: failed program was:" >&5
14836 cat conftest.$ac_ext >&5
14837 cf_cv_type_of_bool=unknown
14838 fi
14839 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14840 fi
14841
14842 fi
14843
14844         rm -f cf_test.out
14845 echo "$as_me:14845: result: $cf_cv_type_of_bool" >&5
14846 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14847 if test "$cf_cv_type_of_bool" = unknown ; then
14848         case .$NCURSES_BOOL in #(vi
14849         .auto|.) NCURSES_BOOL=unsigned;;
14850         esac
14851         { echo "$as_me:14851: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14852 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14853         cf_cv_type_of_bool=$NCURSES_BOOL
14854 fi
14855
14856                 else
14857                         echo "$as_me:14857: checking for fallback type of bool" >&5
14858 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14859                         case "$host_cpu" in #(vi
14860                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14861                         *)      cf_cv_type_of_bool=int  ;;
14862                         esac
14863                         echo "$as_me:14863: result: $cf_cv_type_of_bool" >&5
14864 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14865                 fi
14866         fi
14867 fi
14868
14869 # If the C compiler did not declare bool, and we did not determine that the C++
14870 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14871 # ncurses library use the same type as C++ bool.  Note that this allows one to
14872 # specify the type of bool in a configure-script option and postpone
14873 # integration with the C++ compiler provided that the types are compatible.
14874 USE_CXX_BOOL=1
14875 if test $cf_cv_cc_bool_type = 1
14876 then
14877         # oops: C has a bool.  Unlikely, but C++ could differ.
14878         USE_CXX_BOOL=0
14879 elif test $cf_cv_builtin_bool = 0
14880 then
14881         # C++ has no bool
14882         USE_CXX_BOOL=0
14883 else
14884         # this is the normal case
14885         USE_CXX_BOOL='defined(__cplusplus)'
14886 fi
14887
14888 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14889
14890 if test "$cf_with_ada" != "no" ; then
14891     if test "$with_libtool" != "no"; then
14892         { echo "$as_me:14892: WARNING: libtool does not support Ada - disabling feature" >&5
14893 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
14894         cf_with_ada=no
14895     fi
14896 fi
14897
14898 if test "$cf_with_ada" != "no" ; then
14899 cf_ada_make=gnatmake
14900 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14901 set dummy $cf_ada_make; ac_word=$2
14902 echo "$as_me:14902: checking for $ac_word" >&5
14903 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14904 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14905   echo $ECHO_N "(cached) $ECHO_C" >&6
14906 else
14907   if test -n "$gnat_exists"; then
14908   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14909 else
14910   ac_save_IFS=$IFS; IFS=$ac_path_separator
14911 ac_dummy="$PATH"
14912 for ac_dir in $ac_dummy; do
14913   IFS=$ac_save_IFS
14914   test -z "$ac_dir" && ac_dir=.
14915   $as_executable_p "$ac_dir/$ac_word" || continue
14916 ac_cv_prog_gnat_exists="yes"
14917 echo "$as_me:14917: found $ac_dir/$ac_word" >&5
14918 break
14919 done
14920
14921   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14922 fi
14923 fi
14924 gnat_exists=$ac_cv_prog_gnat_exists
14925 if test -n "$gnat_exists"; then
14926   echo "$as_me:14926: result: $gnat_exists" >&5
14927 echo "${ECHO_T}$gnat_exists" >&6
14928 else
14929   echo "$as_me:14929: result: no" >&5
14930 echo "${ECHO_T}no" >&6
14931 fi
14932
14933 if test "$ac_cv_prog_gnat_exists" = no; then
14934    cf_ada_make=
14935 else
14936
14937 echo "$as_me:14937: checking for gnat version" >&5
14938 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14939 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14940   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14941 echo "$as_me:14941: result: $cf_gnat_version" >&5
14942 echo "${ECHO_T}$cf_gnat_version" >&6
14943
14944 case $cf_gnat_version in
14945   3.1[1-9]*|3.[2-9]*|[4-9].*)
14946     cf_cv_prog_gnat_correct=yes
14947     ;;
14948   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14949      cf_cv_prog_gnat_correct=no
14950      ;;
14951 esac
14952 case $cf_gnat_version in
14953   3.[1-9]*|[4-9].*)
14954       cf_compile_generics=generics
14955       cf_generic_objects="\${GENOBJS}"
14956       ;;
14957   *)  cf_compile_generics=
14958       cf_generic_objects=
14959       ;;
14960 esac
14961
14962    # Extract the first word of "m4", so it can be a program name with args.
14963 set dummy m4; ac_word=$2
14964 echo "$as_me:14964: checking for $ac_word" >&5
14965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14966 if test "${ac_cv_prog_M4_exists+set}" = set; then
14967   echo $ECHO_N "(cached) $ECHO_C" >&6
14968 else
14969   if test -n "$M4_exists"; then
14970   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14971 else
14972   ac_save_IFS=$IFS; IFS=$ac_path_separator
14973 ac_dummy="$PATH"
14974 for ac_dir in $ac_dummy; do
14975   IFS=$ac_save_IFS
14976   test -z "$ac_dir" && ac_dir=.
14977   $as_executable_p "$ac_dir/$ac_word" || continue
14978 ac_cv_prog_M4_exists="yes"
14979 echo "$as_me:14979: found $ac_dir/$ac_word" >&5
14980 break
14981 done
14982
14983   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14984 fi
14985 fi
14986 M4_exists=$ac_cv_prog_M4_exists
14987 if test -n "$M4_exists"; then
14988   echo "$as_me:14988: result: $M4_exists" >&5
14989 echo "${ECHO_T}$M4_exists" >&6
14990 else
14991   echo "$as_me:14991: result: no" >&5
14992 echo "${ECHO_T}no" >&6
14993 fi
14994
14995    if test "$ac_cv_prog_M4_exists" = no; then
14996       cf_cv_prog_gnat_correct=no
14997       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14998    fi
14999    if test "$cf_cv_prog_gnat_correct" = yes; then
15000       echo "$as_me:15000: checking if GNAT works" >&5
15001 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15002
15003 rm -f conftest*
15004 cat >>conftest.ads <<CF_EOF
15005 procedure conftest;
15006 CF_EOF
15007 cat >>conftest.adb <<CF_EOF
15008 with Text_IO;
15009 with GNAT.OS_Lib;
15010 procedure conftest is
15011 begin
15012    Text_IO.Put ("Hello World");
15013    Text_IO.New_Line;
15014    GNAT.OS_Lib.OS_Exit (0);
15015 end conftest;
15016 CF_EOF
15017 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15018    if ( ./conftest 1>&5 2>&1 ) ; then
15019       cf_cv_prog_gnat_correct=yes
15020    else
15021       cf_cv_prog_gnat_correct=no
15022    fi
15023 else
15024    cf_cv_prog_gnat_correct=no
15025 fi
15026 rm -f conftest*
15027
15028       echo "$as_me:15028: result: $cf_cv_prog_gnat_correct" >&5
15029 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15030    fi
15031 fi
15032 if test "$cf_cv_prog_gnat_correct" = yes; then
15033    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15034
15035    echo "$as_me:15035: checking if GNAT pragma Unreferenced works" >&5
15036 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15037
15038 rm -f conftest*
15039 cat >>conftest.ads <<CF_EOF
15040 procedure conftest;
15041 CF_EOF
15042 cat >>conftest.adb <<CF_EOF
15043 with Text_IO;
15044 with GNAT.OS_Lib;
15045 procedure conftest is
15046    test : Integer;
15047    pragma Unreferenced (test);
15048 begin
15049    test := 1;
15050    Text_IO.Put ("Hello World");
15051    Text_IO.New_Line;
15052    GNAT.OS_Lib.OS_Exit (0);
15053 end conftest;
15054 CF_EOF
15055 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15056       cf_cv_pragma_unreferenced=yes
15057 else
15058    cf_cv_pragma_unreferenced=no
15059 fi
15060 rm -f conftest*
15061
15062    echo "$as_me:15062: result: $cf_cv_pragma_unreferenced" >&5
15063 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15064
15065    # if the pragma is supported, use it (needed in the Trace code).
15066    if test $cf_cv_pragma_unreferenced = yes ; then
15067       PRAGMA_UNREF=TRUE
15068    else
15069       PRAGMA_UNREF=FALSE
15070    fi
15071
15072 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15073 if test "${with_ada_compiler+set}" = set; then
15074   withval="$with_ada_compiler"
15075   cf_ada_compiler=$withval
15076 else
15077   cf_ada_compiler=gnatmake
15078 fi;
15079
15080    cf_ada_package=terminal_interface
15081
15082 # Check whether --with-ada-include or --without-ada-include was given.
15083 if test "${with_ada_include+set}" = set; then
15084   withval="$with_ada_include"
15085
15086 else
15087   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15088 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15089
15090 if test "x$prefix" != xNONE; then
15091   cf_path_syntax="$prefix"
15092 else
15093   cf_path_syntax="$ac_default_prefix"
15094 fi
15095
15096 case ".$withval" in #(vi
15097 .\$\(*\)*|.\'*\'*) #(vi
15098   ;;
15099 ..|./*|.\\*) #(vi
15100   ;;
15101 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15102   ;;
15103 .\${*prefix}*) #(vi
15104   eval withval="$withval"
15105   case ".$withval" in #(vi
15106   .NONE/*)
15107     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15108     ;;
15109   esac
15110   ;; #(vi
15111 .no|.NONE/*)
15112   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15113   ;;
15114 *)
15115   { { echo "$as_me:15115: error: expected a pathname, not \"$withval\"" >&5
15116 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15117    { (exit 1); exit 1; }; }
15118   ;;
15119 esac
15120
15121 fi
15122 ADA_INCLUDE="$withval"
15123
15124 # Check whether --with-ada-objects or --without-ada-objects was given.
15125 if test "${with_ada_objects+set}" = set; then
15126   withval="$with_ada_objects"
15127
15128 else
15129   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15130 fi; if test -n "$prefix/lib/ada/adalib" ; then
15131
15132 if test "x$prefix" != xNONE; then
15133   cf_path_syntax="$prefix"
15134 else
15135   cf_path_syntax="$ac_default_prefix"
15136 fi
15137
15138 case ".$withval" in #(vi
15139 .\$\(*\)*|.\'*\'*) #(vi
15140   ;;
15141 ..|./*|.\\*) #(vi
15142   ;;
15143 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15144   ;;
15145 .\${*prefix}*) #(vi
15146   eval withval="$withval"
15147   case ".$withval" in #(vi
15148   .NONE/*)
15149     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15150     ;;
15151   esac
15152   ;; #(vi
15153 .no|.NONE/*)
15154   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15155   ;;
15156 *)
15157   { { echo "$as_me:15157: error: expected a pathname, not \"$withval\"" >&5
15158 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15159    { (exit 1); exit 1; }; }
15160   ;;
15161 esac
15162
15163 fi
15164 ADA_OBJECTS="$withval"
15165
15166 fi
15167 fi
15168 else
15169    cf_with_ada=no
15170 fi
15171
15172 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15173 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15174 ###
15175 ### ticlib modules may be a separate library, otherwise contained in termlib.
15176 ### termlib modules may be a separate library, otherwise contained in ncurses.
15177 ###
15178 ### The of "+" or " " between the tokens controls the way the script
15179 ### chooses to split module lists into libraries.
15180 ###
15181 ### (see CF_LIB_RULES).
15182 echo "$as_me:15182: checking for library subsets" >&5
15183 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15184 LIB_SUBSETS=
15185
15186 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15187         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15188         if test "$with_ticlib" != no ; then
15189                 LIB_SUBSETS="${LIB_SUBSETS} "
15190         else
15191                 LIB_SUBSETS="${LIB_SUBSETS}+"
15192         fi
15193 fi
15194
15195 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15196 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15197 if test "$with_termlib" != no ; then
15198         LIB_SUBSETS="${LIB_SUBSETS} "
15199 else
15200         LIB_SUBSETS="${LIB_SUBSETS}+"
15201 fi
15202
15203 LIB_SUBSETS="${LIB_SUBSETS}base"
15204 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15205 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15206
15207 echo "$as_me:15207: result: $LIB_SUBSETS" >&5
15208 echo "${ECHO_T}$LIB_SUBSETS" >&6
15209
15210 ### Construct the list of include-directories to be generated
15211
15212 CPPFLAGS="-I. -I../include $CPPFLAGS"
15213 if test "$srcdir" != "."; then
15214         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15215 fi
15216 if test "$GCC" != yes; then
15217         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15218 elif test "$includedir" != "/usr/include"; then
15219         if test "$includedir" = '${prefix}/include' ; then
15220                 if test $prefix != /usr ; then
15221                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15222                 fi
15223         else
15224                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15225         fi
15226 fi
15227
15228 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15229 if test "$srcdir" != "."; then
15230         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15231 fi
15232 if test "$GCC" != yes; then
15233         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15234 elif test "$includedir" != "/usr/include"; then
15235         if test "$includedir" = '${prefix}/include' ; then
15236                 if test $prefix != /usr ; then
15237                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15238                 fi
15239         else
15240                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15241         fi
15242 fi
15243
15244 ### Build up pieces for makefile rules
15245 echo "$as_me:15245: checking default library suffix" >&5
15246 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15247
15248         case $DFT_LWR_MODEL in
15249         libtool) DFT_ARG_SUFFIX=''   ;;
15250         normal)  DFT_ARG_SUFFIX=''   ;;
15251         debug)   DFT_ARG_SUFFIX='_g' ;;
15252         profile) DFT_ARG_SUFFIX='_p' ;;
15253         shared)  DFT_ARG_SUFFIX=''   ;;
15254         esac
15255         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15256 echo "$as_me:15256: result: $DFT_ARG_SUFFIX" >&5
15257 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15258
15259 echo "$as_me:15259: checking default library-dependency suffix" >&5
15260 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15261
15262         case $DFT_LWR_MODEL in
15263         libtool) DFT_DEP_SUFFIX='.la'  ;;
15264         normal)  DFT_DEP_SUFFIX='.a'   ;;
15265         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15266         profile) DFT_DEP_SUFFIX='_p.a' ;;
15267         shared)
15268                 case $cf_cv_system_name in
15269                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15270                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15271                 hpux*)
15272                         case $target in
15273                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15274                         *)      DFT_DEP_SUFFIX='.sl' ;;
15275                         esac
15276                         ;;
15277                 *)      DFT_DEP_SUFFIX='.so'  ;;
15278                 esac
15279         esac
15280         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15281 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15282 if test $DFT_LWR_MODEL = shared ; then
15283         case $cf_cv_system_name in #(vi
15284         cygwin*)
15285                 DFT_DEP_SUFFIX=".dll.a"
15286                 DFT_LIB_SUFFIX=".dll"
15287                 ;;
15288         esac
15289 fi
15290 echo "$as_me:15290: result: $DFT_DEP_SUFFIX" >&5
15291 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15292
15293 echo "$as_me:15293: checking default object directory" >&5
15294 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15295
15296         case $DFT_LWR_MODEL in
15297         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15298         normal)  DFT_OBJ_SUBDIR='objects' ;;
15299         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15300         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15301         shared)
15302                 case $cf_cv_system_name in #(vi
15303                 cygwin) #(vi
15304                         DFT_OBJ_SUBDIR='objects' ;;
15305                 *)
15306                         DFT_OBJ_SUBDIR='obj_s' ;;
15307                 esac
15308         esac
15309 echo "$as_me:15309: result: $DFT_OBJ_SUBDIR" >&5
15310 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15311
15312 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15313 if test "$cf_with_cxx" = yes ; then
15314 echo "$as_me:15314: checking c++ library-dependency suffix" >&5
15315 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15316 if test "$with_libtool" != "no"; then
15317         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15318 else
15319
15320         case normal in
15321         libtool) CXX_LIB_SUFFIX='.la'  ;;
15322         normal)  CXX_LIB_SUFFIX='.a'   ;;
15323         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15324         profile) CXX_LIB_SUFFIX='_p.a' ;;
15325         shared)
15326                 case $cf_cv_system_name in
15327                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15328                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15329                 hpux*)
15330                         case $target in
15331                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15332                         *)      CXX_LIB_SUFFIX='.sl' ;;
15333                         esac
15334                         ;;
15335                 *)      CXX_LIB_SUFFIX='.so'  ;;
15336                 esac
15337         esac
15338         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15339 fi
15340 echo "$as_me:15340: result: $CXX_LIB_SUFFIX" >&5
15341 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15342
15343 fi
15344
15345 # do not want -ldl in build except as needed for -lncurses dependency
15346 if test "$with_dlsym" = yes ; then
15347 if test $DFT_LWR_MODEL = shared || \
15348    test $DFT_LWR_MODEL = libtool ; then
15349
15350 # remove dl library from $LIBS
15351 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15352
15353 fi
15354 fi
15355 ### Set up low-level terminfo dependencies for makefiles.
15356
15357 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15358 # do not need libdl
15359 TICS_LIST=
15360 if test "$with_dlsym" = yes ; then
15361
15362 # remove dl library from $SHLIB_LIST
15363 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15364
15365 fi
15366
15367 if test "$with_ticlib" != no ; then
15368
15369         if test "$with_ticlib" != yes ; then
15370                 TICS_NAME=$with_ticlib
15371                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15372                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15373                 TICS_LIB_SUFFIX="${with_ticlib}"
15374         else
15375                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15376                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15377                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15378         fi
15379         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15380 else
15381         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15382 fi
15383
15384 if test "$with_termlib" != no ; then
15385
15386         if test "$with_termlib" != yes ; then
15387                 TINFO_NAME=$with_termlib
15388                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15389                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15390                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15391                 TINFO_LIB_SUFFIX="${with_termlib}"
15392         else
15393                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15394                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15395                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15396                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15397         fi
15398
15399         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15400         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15401         if test "$DFT_LWR_MODEL" = "libtool"; then
15402                 TEST_ARGS="${TEST_DEPS}"
15403                 TEST_ARG2="${TEST_DEP2}"
15404                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15405         else
15406                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15407                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15408                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15409                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15410                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15411         fi
15412 else
15413         # the next lines are needed for linking libtic over libncurses
15414         TINFO_NAME=${LIB_NAME}
15415         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15416         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15417         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15418
15419         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15420 fi
15421
15422 if test "$DFT_LWR_MODEL" = shared ; then
15423         case $cf_cv_system_name in #(vi
15424         cygwin*)
15425                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15426                 TINFO_SUFFIX=.dll
15427                 ;;
15428         esac
15429 fi
15430
15431 if test "$with_dlsym" = yes ; then
15432
15433 # remove dl library from $TICS_LIST
15434 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15435
15436 fi
15437
15438 # needed for Ada95
15439 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15440
15441 case $DFT_LWR_MODEL in
15442 normal|debug|profile)
15443
15444 if test "$GCC" = yes ; then
15445         LDFLAGS_STATIC=-static
15446         LDFLAGS_SHARED=-dynamic
15447 else
15448         case $cf_cv_system_name in #(
15449         aix[45]*)       #( from ld manpage
15450                 LDFLAGS_STATIC=-bstatic
15451                 LDFLAGS_SHARED=-bdynamic
15452                 ;;
15453         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15454                 # We could also use just "archive" and "shared".
15455                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15456                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15457                 ;;
15458         irix*)          #( from ld manpage IRIX64
15459                 LDFLAGS_STATIC=-Bstatic
15460                 LDFLAGS_SHARED=-Bdynamic
15461                 ;;
15462         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15463                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15464                 LDFLAGS_STATIC=-noso
15465                 LDFLAGS_SHARED=-so_archive
15466                 ;;
15467         solaris2*)
15468                 LDFLAGS_STATIC=-Bstatic
15469                 LDFLAGS_SHARED=-Bdynamic
15470                 ;;
15471         esac
15472 fi
15473
15474         ;;
15475 esac
15476
15477 echo "$as_me:15477: checking where we will install curses.h" >&5
15478 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15479 test "$with_overwrite" = no && \
15480 test "x$includedir" = 'x${prefix}/include' && \
15481         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15482 echo "$as_me:15482: result: $includedir" >&5
15483 echo "${ECHO_T}$includedir" >&6
15484
15485 ### Resolve a conflict between normal and wide-curses by forcing applications
15486 ### that will need libutf8 to add it to their configure script.
15487 if test "$with_overwrite" != no ; then
15488 if test "$NCURSES_LIBUTF8" = 1 ; then
15489         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15490         { echo "$as_me:15490: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15491 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15492 fi
15493 fi
15494
15495 # used to separate tack out of the tree
15496 NCURSES_TREE=
15497
15498 ### predefined stuff for the test programs
15499 cat >>confdefs.h <<\EOF
15500 #define HAVE_SLK_COLOR 1
15501 EOF
15502
15503 ### Construct the list of subdirectories for which we'll customize makefiles
15504 ### with the appropriate compile-rules.
15505
15506 echo "$as_me:15506: checking for src modules" >&5
15507 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15508
15509 # dependencies and linker-arguments for test-programs
15510 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15511 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15512 if test "$DFT_LWR_MODEL" = "libtool"; then
15513         TEST_ARGS="${TEST_DEPS}"
15514         TEST_ARG2="${TEST_DEP2}"
15515 else
15516         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15517         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15518 fi
15519
15520 cf_cv_src_modules=
15521 for cf_dir in $modules_to_build
15522 do
15523         if test -f $srcdir/$cf_dir/modules; then
15524
15525                 # We may/may not have tack in the distribution, though the
15526                 # makefile is.
15527                 if test $cf_dir = tack ; then
15528                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15529                                 continue
15530                         fi
15531                 fi
15532
15533                 if test -z "$cf_cv_src_modules"; then
15534                         cf_cv_src_modules=$cf_dir
15535                 else
15536                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15537                 fi
15538
15539                 # Make the ncurses_cfg.h file record the library interface files as
15540                 # well.  These are header files that are the same name as their
15541                 # directory.  Ncurses is the only library that does not follow
15542                 # that pattern.
15543                 if test $cf_dir = tack ; then
15544                         continue
15545                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15546
15547 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15548
15549                         cat >>confdefs.h <<EOF
15550 #define HAVE_${cf_have_include}_H 1
15551 EOF
15552
15553                         cat >>confdefs.h <<EOF
15554 #define HAVE_LIB${cf_have_include} 1
15555 EOF
15556
15557                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15558                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15559                         if test "$DFT_LWR_MODEL" = "libtool"; then
15560                                 TEST_ARGS="${TEST_DEPS}"
15561                                 TEST_ARG2="${TEST_DEP2}"
15562                         else
15563                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15564                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15565                         fi
15566                 fi
15567         fi
15568 done
15569 echo "$as_me:15569: result: $cf_cv_src_modules" >&5
15570 echo "${ECHO_T}$cf_cv_src_modules" >&6
15571
15572 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15573 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15574
15575 SRC_SUBDIRS="man include"
15576 for cf_dir in $cf_cv_src_modules
15577 do
15578         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15579 done
15580 SRC_SUBDIRS="$SRC_SUBDIRS test"
15581 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15582 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15583
15584 ADA_SUBDIRS=
15585 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15586    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15587    ADA_SUBDIRS="gen src samples"
15588 fi
15589
15590 SUB_MAKEFILES=
15591 for cf_dir in $SRC_SUBDIRS
15592 do
15593         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15594 done
15595
15596 if test -n "$ADA_SUBDIRS"; then
15597    for cf_dir in $ADA_SUBDIRS
15598    do
15599       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15600    done
15601
15602 fi
15603
15604 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15605    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15606 fi
15607
15608 DIRS_TO_MAKE="lib"
15609 for cf_item in $cf_list_models
15610 do
15611
15612         case $cf_item in
15613         libtool) cf_subdir='obj_lo'  ;;
15614         normal)  cf_subdir='objects' ;;
15615         debug)   cf_subdir='obj_g' ;;
15616         profile) cf_subdir='obj_p' ;;
15617         shared)
15618                 case $cf_cv_system_name in #(vi
15619                 cygwin) #(vi
15620                         cf_subdir='objects' ;;
15621                 *)
15622                         cf_subdir='obj_s' ;;
15623                 esac
15624         esac
15625
15626         for cf_item2 in $DIRS_TO_MAKE
15627         do
15628                 test $cf_item2 = $cf_subdir && break
15629         done
15630         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15631 done
15632 for cf_dir in $DIRS_TO_MAKE
15633 do
15634         test ! -d $cf_dir && mkdir $cf_dir
15635 done
15636
15637 cat >>confdefs.h <<EOF
15638 #define NCURSES_PATHSEP '$PATHSEP'
15639 EOF
15640
15641 cat >>confdefs.h <<EOF
15642 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15643 EOF
15644
15645 ### Now that we're done running tests, add the compiler-warnings, if any
15646
15647 cf_fix_cppflags=no
15648 cf_new_cflags=
15649 cf_new_cppflags=
15650 cf_new_extra_cppflags=
15651
15652 for cf_add_cflags in $EXTRA_CFLAGS
15653 do
15654 case $cf_fix_cppflags in
15655 no)
15656         case $cf_add_cflags in #(vi
15657         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15658                 case $cf_add_cflags in
15659                 -D*)
15660                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15661
15662                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15663                         && test -z "${cf_tst_cflags}" \
15664                         && cf_fix_cppflags=yes
15665
15666                         if test $cf_fix_cppflags = yes ; then
15667                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15668                                 continue
15669                         elif test "${cf_tst_cflags}" = "\"'" ; then
15670                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15671                                 continue
15672                         fi
15673                         ;;
15674                 esac
15675                 case "$CPPFLAGS" in
15676                 *$cf_add_cflags) #(vi
15677                         ;;
15678                 *) #(vi
15679                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15680                         ;;
15681                 esac
15682                 ;;
15683         *)
15684                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15685                 ;;
15686         esac
15687         ;;
15688 yes)
15689         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15690
15691         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15692
15693         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15694         && test -z "${cf_tst_cflags}" \
15695         && cf_fix_cppflags=no
15696         ;;
15697 esac
15698 done
15699
15700 if test -n "$cf_new_cflags" ; then
15701
15702         CFLAGS="$CFLAGS $cf_new_cflags"
15703 fi
15704
15705 if test -n "$cf_new_cppflags" ; then
15706
15707         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15708 fi
15709
15710 if test -n "$cf_new_extra_cppflags" ; then
15711
15712         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15713 fi
15714
15715 ### Define substitutions for header files to avoid name-pollution
15716
15717 if test "$cf_cv_have_tcgetattr" = yes ; then
15718         HAVE_TCGETATTR=1
15719 else
15720         HAVE_TCGETATTR=0
15721 fi
15722
15723 if test "$ac_cv_header_termio_h" = yes ; then
15724         HAVE_TERMIO_H=1
15725 else
15726         HAVE_TERMIO_H=0
15727 fi
15728
15729 if test "$ac_cv_header_termios_h" = yes ; then
15730         HAVE_TERMIOS_H=1
15731 else
15732         HAVE_TERMIOS_H=0
15733 fi
15734
15735 ################################################################################
15736 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15737 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15738 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"
15739 ac_config_commands="$ac_config_commands default"
15740 cat >confcache <<\_ACEOF
15741 # This file is a shell script that caches the results of configure
15742 # tests run on this system so they can be shared between configure
15743 # scripts and configure runs, see configure's option --config-cache.
15744 # It is not useful on other systems.  If it contains results you don't
15745 # want to keep, you may remove or edit it.
15746 #
15747 # config.status only pays attention to the cache file if you give it
15748 # the --recheck option to rerun configure.
15749 #
15750 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15751 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15752 # following values.
15753
15754 _ACEOF
15755
15756 # The following way of writing the cache mishandles newlines in values,
15757 # but we know of no workaround that is simple, portable, and efficient.
15758 # So, don't put newlines in cache variables' values.
15759 # Ultrix sh set writes to stderr and can't be redirected directly,
15760 # and sets the high bit in the cache file unless we assign to the vars.
15761 {
15762   (set) 2>&1 |
15763     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15764     *ac_space=\ *)
15765       # `set' does not quote correctly, so add quotes (double-quote
15766       # substitution turns \\\\ into \\, and sed turns \\ into \).
15767       sed -n \
15768         "s/'/'\\\\''/g;
15769           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15770       ;;
15771     *)
15772       # `set' quotes correctly as required by POSIX, so do not add quotes.
15773       sed -n \
15774         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15775       ;;
15776     esac;
15777 } |
15778   sed '
15779      t clear
15780      : clear
15781      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15782      t end
15783      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15784      : end' >>confcache
15785 if cmp -s $cache_file confcache; then :; else
15786   if test -w $cache_file; then
15787     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15788     cat confcache >$cache_file
15789   else
15790     echo "not updating unwritable cache $cache_file"
15791   fi
15792 fi
15793 rm -f confcache
15794
15795 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15796 # Let make expand exec_prefix.
15797 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15798
15799 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15800 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15801 # trailing colons and then remove the whole line if VPATH becomes empty
15802 # (actually we leave an empty line to preserve line numbers).
15803 if test "x$srcdir" = x.; then
15804   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15805 s/:*\$(srcdir):*/:/;
15806 s/:*\${srcdir}:*/:/;
15807 s/:*@srcdir@:*/:/;
15808 s/^\([^=]*=[    ]*\):*/\1/;
15809 s/:*$//;
15810 s/^[^=]*=[      ]*$//;
15811 }'
15812 fi
15813
15814 DEFS=-DHAVE_CONFIG_H
15815
15816 : ${CONFIG_STATUS=./config.status}
15817 ac_clean_files_save=$ac_clean_files
15818 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15819 { echo "$as_me:15819: creating $CONFIG_STATUS" >&5
15820 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15821 cat >$CONFIG_STATUS <<_ACEOF
15822 #! $SHELL
15823 # Generated automatically by configure.
15824 # Run this file to recreate the current configuration.
15825 # Compiler output produced by configure, useful for debugging
15826 # configure, is in config.log if it exists.
15827
15828 debug=false
15829 SHELL=\${CONFIG_SHELL-$SHELL}
15830 ac_cs_invocation="\$0 \$@"
15831
15832 _ACEOF
15833
15834 cat >>$CONFIG_STATUS <<\_ACEOF
15835 # Be Bourne compatible
15836 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15837   emulate sh
15838   NULLCMD=:
15839 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15840   set -o posix
15841 fi
15842
15843 # Name of the executable.
15844 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15845
15846 if expr a : '\(a\)' >/dev/null 2>&1; then
15847   as_expr=expr
15848 else
15849   as_expr=false
15850 fi
15851
15852 rm -f conf$$ conf$$.exe conf$$.file
15853 echo >conf$$.file
15854 if ln -s conf$$.file conf$$ 2>/dev/null; then
15855   # We could just check for DJGPP; but this test a) works b) is more generic
15856   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15857   if test -f conf$$.exe; then
15858     # Don't use ln at all; we don't have any links
15859     as_ln_s='cp -p'
15860   else
15861     as_ln_s='ln -s'
15862   fi
15863 elif ln conf$$.file conf$$ 2>/dev/null; then
15864   as_ln_s=ln
15865 else
15866   as_ln_s='cp -p'
15867 fi
15868 rm -f conf$$ conf$$.exe conf$$.file
15869
15870 as_executable_p="test -f"
15871
15872 # Support unset when possible.
15873 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15874   as_unset=unset
15875 else
15876   as_unset=false
15877 fi
15878
15879 # NLS nuisances.
15880 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15881 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15882 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15883 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15884 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15885 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15886 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15887 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15888
15889 # IFS
15890 # We need space, tab and new line, in precisely that order.
15891 as_nl='
15892 '
15893 IFS="   $as_nl"
15894
15895 # CDPATH.
15896 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15897
15898 exec 6>&1
15899
15900 _ACEOF
15901
15902 # Files that config.status was made for.
15903 if test -n "$ac_config_files"; then
15904   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15905 fi
15906
15907 if test -n "$ac_config_headers"; then
15908   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15909 fi
15910
15911 if test -n "$ac_config_links"; then
15912   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15913 fi
15914
15915 if test -n "$ac_config_commands"; then
15916   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15917 fi
15918
15919 cat >>$CONFIG_STATUS <<\EOF
15920
15921 ac_cs_usage="\
15922 \`$as_me' instantiates files from templates according to the
15923 current configuration.
15924
15925 Usage: $0 [OPTIONS] [FILE]...
15926
15927   -h, --help       print this help, then exit
15928   -V, --version    print version number, then exit
15929   -d, --debug      don't remove temporary files
15930       --recheck    update $as_me by reconfiguring in the same conditions
15931   --file=FILE[:TEMPLATE]
15932                    instantiate the configuration file FILE
15933   --header=FILE[:TEMPLATE]
15934                    instantiate the configuration header FILE
15935
15936 Configuration files:
15937 $config_files
15938
15939 Configuration headers:
15940 $config_headers
15941
15942 Configuration commands:
15943 $config_commands
15944
15945 Report bugs to <bug-autoconf@gnu.org>."
15946 EOF
15947
15948 cat >>$CONFIG_STATUS <<EOF
15949 ac_cs_version="\\
15950 config.status
15951 configured by $0, generated by GNU Autoconf 2.52.20061216,
15952   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15953
15954 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15955 Free Software Foundation, Inc.
15956 This config.status script is free software; the Free Software Foundation
15957 gives unlimited permission to copy, distribute and modify it."
15958 srcdir=$srcdir
15959 INSTALL="$INSTALL"
15960 EOF
15961
15962 cat >>$CONFIG_STATUS <<\EOF
15963 # If no file are specified by the user, then we need to provide default
15964 # value.  By we need to know if files were specified by the user.
15965 ac_need_defaults=:
15966 while test $# != 0
15967 do
15968   case $1 in
15969   --*=*)
15970     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15971     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15972     shift
15973     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15974     shift
15975     ;;
15976   -*);;
15977   *) # This is not an option, so the user has probably given explicit
15978      # arguments.
15979      ac_need_defaults=false;;
15980   esac
15981
15982   case $1 in
15983   # Handling of the options.
15984 EOF
15985 cat >>$CONFIG_STATUS <<EOF
15986   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15987     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15988     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15989 EOF
15990 cat >>$CONFIG_STATUS <<\EOF
15991   --version | --vers* | -V )
15992     echo "$ac_cs_version"; exit 0 ;;
15993   --he | --h)
15994     # Conflict between --help and --header
15995     { { echo "$as_me:15995: error: ambiguous option: $1
15996 Try \`$0 --help' for more information." >&5
15997 echo "$as_me: error: ambiguous option: $1
15998 Try \`$0 --help' for more information." >&2;}
15999    { (exit 1); exit 1; }; };;
16000   --help | --hel | -h )
16001     echo "$ac_cs_usage"; exit 0 ;;
16002   --debug | --d* | -d )
16003     debug=: ;;
16004   --file | --fil | --fi | --f )
16005     shift
16006     CONFIG_FILES="$CONFIG_FILES $1"
16007     ac_need_defaults=false;;
16008   --header | --heade | --head | --hea )
16009     shift
16010     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16011     ac_need_defaults=false;;
16012
16013   # This is an error.
16014   -*) { { echo "$as_me:16014: error: unrecognized option: $1
16015 Try \`$0 --help' for more information." >&5
16016 echo "$as_me: error: unrecognized option: $1
16017 Try \`$0 --help' for more information." >&2;}
16018    { (exit 1); exit 1; }; } ;;
16019
16020   *) ac_config_targets="$ac_config_targets $1" ;;
16021
16022   esac
16023   shift
16024 done
16025
16026 exec 5>>config.log
16027 cat >&5 << _ACEOF
16028
16029 ## ----------------------- ##
16030 ## Running config.status.  ##
16031 ## ----------------------- ##
16032
16033 This file was extended by $as_me 2.52.20061216, executed with
16034   CONFIG_FILES    = $CONFIG_FILES
16035   CONFIG_HEADERS  = $CONFIG_HEADERS
16036   CONFIG_LINKS    = $CONFIG_LINKS
16037   CONFIG_COMMANDS = $CONFIG_COMMANDS
16038   > $ac_cs_invocation
16039 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16040
16041 _ACEOF
16042 EOF
16043
16044 cat >>$CONFIG_STATUS <<EOF
16045 #
16046 # INIT-COMMANDS section.
16047 #
16048
16049 ### Special initialization commands, used to pass information from the
16050 ### configuration-run into config.status
16051
16052 AWK="$AWK"
16053 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16054 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16055 ECHO_LINK="$ECHO_LINK"
16056 LDCONFIG="$LDCONFIG"
16057 LIB_NAME="$LIB_NAME"
16058 LIB_SUBSETS="$LIB_SUBSETS"
16059 LIB_SUFFIX="$LIB_SUFFIX"
16060 LIB_TRACING="$LIB_TRACING"
16061 MAKE_TERMINFO="$MAKE_TERMINFO"
16062 NCURSES_MAJOR="$NCURSES_MAJOR"
16063 NCURSES_MINOR="$NCURSES_MINOR"
16064 NCURSES_OSPEED="$NCURSES_OSPEED"
16065 NCURSES_PATCH="$NCURSES_PATCH"
16066 SRC_SUBDIRS="$SRC_SUBDIRS"
16067 TERMINFO="$TERMINFO"
16068 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16069 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16070 TINFO_NAME="$TINFO_NAME"
16071 TINFO_SUFFIX="$TINFO_SUFFIX"
16072 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16073 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16074 TICS_NAME="$TICS_NAME"
16075 WITH_CURSES_H="$with_curses_h"
16076 WITH_ECHO="$with_echo"
16077 WITH_OVERWRITE="$with_overwrite"
16078 cf_LIST_MODELS="$cf_list_models"
16079 cf_cv_abi_version="$cf_cv_abi_version"
16080 cf_cv_do_relink="$cf_cv_do_relink"
16081 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16082 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16083 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16084 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16085 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16086 cf_cv_rel_version="$cf_cv_rel_version"
16087 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16088 cf_cv_shlib_version="$cf_cv_shlib_version"
16089 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16090 cf_cv_system_name="$cf_cv_system_name"
16091 cf_with_cxx_binding="$cf_with_cxx_binding"
16092 host="$host"
16093 target="$target"
16094
16095 EOF
16096
16097 cat >>$CONFIG_STATUS <<\EOF
16098 for ac_config_target in $ac_config_targets
16099 do
16100   case "$ac_config_target" in
16101   # Handling of arguments.
16102   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16103   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16104   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16105   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16106   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16107   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16108   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16109   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16110   *) { { echo "$as_me:16110: error: invalid argument: $ac_config_target" >&5
16111 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16112    { (exit 1); exit 1; }; };;
16113   esac
16114 done
16115
16116 # If the user did not use the arguments to specify the items to instantiate,
16117 # then the envvar interface is used.  Set only those that are not.
16118 # We use the long form for the default assignment because of an extremely
16119 # bizarre bug on SunOS 4.1.3.
16120 if $ac_need_defaults; then
16121   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16122   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16123   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16124 fi
16125
16126 # Create a temporary directory, and hook for its removal unless debugging.
16127 $debug ||
16128 {
16129   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16130   trap '{ (exit 1); exit 1; }' 1 2 13 15
16131 }
16132
16133 # Create a (secure) tmp directory for tmp files.
16134 : ${TMPDIR=/tmp}
16135 {
16136   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16137   test -n "$tmp" && test -d "$tmp"
16138 }  ||
16139 {
16140   tmp=$TMPDIR/cs$$-$RANDOM
16141   (umask 077 && mkdir $tmp)
16142 } ||
16143 {
16144    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16145    { (exit 1); exit 1; }
16146 }
16147
16148 EOF
16149
16150 cat >>$CONFIG_STATUS <<EOF
16151
16152 #
16153 # CONFIG_FILES section.
16154 #
16155
16156 # No need to generate the scripts if there are no CONFIG_FILES.
16157 # This happens for instance when ./config.status config.h
16158 if test -n "\$CONFIG_FILES"; then
16159   # Protect against being on the right side of a sed subst in config.status.
16160   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16161    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16162 s,@SHELL@,$SHELL,;t t
16163 s,@exec_prefix@,$exec_prefix,;t t
16164 s,@prefix@,$prefix,;t t
16165 s,@program_transform_name@,$program_transform_name,;t t
16166 s,@bindir@,$bindir,;t t
16167 s,@sbindir@,$sbindir,;t t
16168 s,@libexecdir@,$libexecdir,;t t
16169 s,@datadir@,$datadir,;t t
16170 s,@sysconfdir@,$sysconfdir,;t t
16171 s,@sharedstatedir@,$sharedstatedir,;t t
16172 s,@localstatedir@,$localstatedir,;t t
16173 s,@libdir@,$libdir,;t t
16174 s,@includedir@,$includedir,;t t
16175 s,@oldincludedir@,$oldincludedir,;t t
16176 s,@infodir@,$infodir,;t t
16177 s,@mandir@,$mandir,;t t
16178 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16179 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16180 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16181 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16182 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16183 s,@build_alias@,$build_alias,;t t
16184 s,@host_alias@,$host_alias,;t t
16185 s,@target_alias@,$target_alias,;t t
16186 s,@ECHO_C@,$ECHO_C,;t t
16187 s,@ECHO_N@,$ECHO_N,;t t
16188 s,@ECHO_T@,$ECHO_T,;t t
16189 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16190 s,@DEFS@,$DEFS,;t t
16191 s,@LIBS@,$LIBS,;t t
16192 s,@top_builddir@,$top_builddir,;t t
16193 s,@EGREP@,$EGREP,;t t
16194 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16195 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16196 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16197 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16198 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16199 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16200 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16201 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16202 s,@build@,$build,;t t
16203 s,@build_cpu@,$build_cpu,;t t
16204 s,@build_vendor@,$build_vendor,;t t
16205 s,@build_os@,$build_os,;t t
16206 s,@host@,$host,;t t
16207 s,@host_cpu@,$host_cpu,;t t
16208 s,@host_vendor@,$host_vendor,;t t
16209 s,@host_os@,$host_os,;t t
16210 s,@target@,$target,;t t
16211 s,@target_cpu@,$target_cpu,;t t
16212 s,@target_vendor@,$target_vendor,;t t
16213 s,@target_os@,$target_os,;t t
16214 s,@CC@,$CC,;t t
16215 s,@CFLAGS@,$CFLAGS,;t t
16216 s,@LDFLAGS@,$LDFLAGS,;t t
16217 s,@CPPFLAGS@,$CPPFLAGS,;t t
16218 s,@ac_ct_CC@,$ac_ct_CC,;t t
16219 s,@EXEEXT@,$EXEEXT,;t t
16220 s,@OBJEXT@,$OBJEXT,;t t
16221 s,@CPP@,$CPP,;t t
16222 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16223 s,@PROG_EXT@,$PROG_EXT,;t t
16224 s,@LDCONFIG@,$LDCONFIG,;t t
16225 s,@CXX@,$CXX,;t t
16226 s,@CXXFLAGS@,$CXXFLAGS,;t t
16227 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16228 s,@AWK@,$AWK,;t t
16229 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16230 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16231 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16232 s,@LINT@,$LINT,;t t
16233 s,@LINT_OPTS@,$LINT_OPTS,;t t
16234 s,@LN_S@,$LN_S,;t t
16235 s,@SET_MAKE@,$SET_MAKE,;t t
16236 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16237 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16238 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16239 s,@RANLIB@,$RANLIB,;t t
16240 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16241 s,@LD@,$LD,;t t
16242 s,@ac_ct_LD@,$ac_ct_LD,;t t
16243 s,@AR@,$AR,;t t
16244 s,@ac_ct_AR@,$ac_ct_AR,;t t
16245 s,@AR_OPTS@,$AR_OPTS,;t t
16246 s,@DESTDIR@,$DESTDIR,;t t
16247 s,@BUILD_CC@,$BUILD_CC,;t t
16248 s,@BUILD_CPP@,$BUILD_CPP,;t t
16249 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16250 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16251 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16252 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16253 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16254 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16255 s,@cf_list_models@,$cf_list_models,;t t
16256 s,@LIBTOOL@,$LIBTOOL,;t t
16257 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16258 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16259 s,@LIB_CREATE@,$LIB_CREATE,;t t
16260 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16261 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16262 s,@LIB_PREP@,$LIB_PREP,;t t
16263 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16264 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16265 s,@LIB_LINK@,$LIB_LINK,;t t
16266 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16267 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16268 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16269 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16270 s,@TICS_NAME@,$TICS_NAME,;t t
16271 s,@TINFO_NAME@,$TINFO_NAME,;t t
16272 s,@LIB_NAME@,$LIB_NAME,;t t
16273 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16274 s,@CC_G_OPT@,$CC_G_OPT,;t t
16275 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16276 s,@LD_MODEL@,$LD_MODEL,;t t
16277 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16278 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16279 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16280 s,@LINK_PROGS@,$LINK_PROGS,;t t
16281 s,@LINK_TESTS@,$LINK_TESTS,;t t
16282 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16283 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16284 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16285 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16286 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16287 s,@PATHSEP@,$PATHSEP,;t t
16288 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16289 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16290 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16291 s,@TERMINFO@,$TERMINFO,;t t
16292 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16293 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16294 s,@TERMPATH@,$TERMPATH,;t t
16295 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16296 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16297 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16298 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16299 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16300 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16301 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16302 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16303 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16304 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16305 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16306 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16307 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16308 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16309 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16310 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16311 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16312 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16313 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16314 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16315 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16316 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16317 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16318 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16319 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16320 s,@ECHO_LINK@,$ECHO_LINK,;t t
16321 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16322 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16323 s,@ADA_TRACE@,$ADA_TRACE,;t t
16324 s,@MATH_LIB@,$MATH_LIB,;t t
16325 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16326 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16327 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16328 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16329 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16330 s,@CXXCPP@,$CXXCPP,;t t
16331 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16332 s,@CXX_AR@,$CXX_AR,;t t
16333 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16334 s,@CXXLIBS@,$CXXLIBS,;t t
16335 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16336 s,@gnat_exists@,$gnat_exists,;t t
16337 s,@M4_exists@,$M4_exists,;t t
16338 s,@cf_ada_make@,$cf_ada_make,;t t
16339 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16340 s,@cf_ada_package@,$cf_ada_package,;t t
16341 s,@ADAFLAGS@,$ADAFLAGS,;t t
16342 s,@cf_compile_generics@,$cf_compile_generics,;t t
16343 s,@cf_generic_objects@,$cf_generic_objects,;t t
16344 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16345 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16346 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16347 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16348 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16349 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16350 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16351 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16352 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16353 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16354 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16355 s,@TICS_ARGS@,$TICS_ARGS,;t t
16356 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16357 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16358 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16359 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16360 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16361 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16362 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16363 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16364 s,@TICS_LIST@,$TICS_LIST,;t t
16365 s,@TINFO_LIST@,$TINFO_LIST,;t t
16366 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16367 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16368 s,@TEST_ARGS@,$TEST_ARGS,;t t
16369 s,@TEST_DEPS@,$TEST_DEPS,;t t
16370 s,@TEST_ARG2@,$TEST_ARG2,;t t
16371 s,@TEST_DEP2@,$TEST_DEP2,;t t
16372 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16373 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16374 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16375 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16376 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16377 CEOF
16378
16379 EOF
16380
16381   cat >>$CONFIG_STATUS <<\EOF
16382   # Split the substitutions into bite-sized pieces for seds with
16383   # small command number limits, like on Digital OSF/1 and HP-UX.
16384   ac_max_sed_lines=48
16385   ac_sed_frag=1 # Number of current file.
16386   ac_beg=1 # First line for current file.
16387   ac_end=$ac_max_sed_lines # Line after last line for current file.
16388   ac_more_lines=:
16389   ac_sed_cmds=
16390   while $ac_more_lines; do
16391     if test $ac_beg -gt 1; then
16392       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16393     else
16394       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16395     fi
16396     if test ! -s $tmp/subs.frag; then
16397       ac_more_lines=false
16398     else
16399       # The purpose of the label and of the branching condition is to
16400       # speed up the sed processing (if there are no `@' at all, there
16401       # is no need to browse any of the substitutions).
16402       # These are the two extra sed commands mentioned above.
16403       (echo ':t
16404   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16405       if test -z "$ac_sed_cmds"; then
16406         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16407       else
16408         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16409       fi
16410       ac_sed_frag=`expr $ac_sed_frag + 1`
16411       ac_beg=$ac_end
16412       ac_end=`expr $ac_end + $ac_max_sed_lines`
16413     fi
16414   done
16415   if test -z "$ac_sed_cmds"; then
16416     ac_sed_cmds=cat
16417   fi
16418 fi # test -n "$CONFIG_FILES"
16419
16420 EOF
16421 cat >>$CONFIG_STATUS <<\EOF
16422 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16423   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16424   case $ac_file in
16425   - | *:- | *:-:* ) # input from stdin
16426         cat >$tmp/stdin
16427         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16428         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16429   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16430         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16431   * )   ac_file_in=$ac_file.in ;;
16432   esac
16433
16434   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16435   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16436          X"$ac_file" : 'X\(//\)[^/]' \| \
16437          X"$ac_file" : 'X\(//\)$' \| \
16438          X"$ac_file" : 'X\(/\)' \| \
16439          .     : '\(.\)' 2>/dev/null ||
16440 echo X"$ac_file" |
16441     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16442           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16443           /^X\(\/\/\)$/{ s//\1/; q; }
16444           /^X\(\/\).*/{ s//\1/; q; }
16445           s/.*/./; q'`
16446   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16447     { case "$ac_dir" in
16448   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16449   *)                      as_incr_dir=.;;
16450 esac
16451 as_dummy="$ac_dir"
16452 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16453   case $as_mkdir_dir in
16454     # Skip DOS drivespec
16455     ?:) as_incr_dir=$as_mkdir_dir ;;
16456     *)
16457       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16458       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16459     ;;
16460   esac
16461 done; }
16462
16463     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16464     # A "../" for each directory in $ac_dir_suffix.
16465     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16466   else
16467     ac_dir_suffix= ac_dots=
16468   fi
16469
16470   case $srcdir in
16471   .)  ac_srcdir=.
16472       if test -z "$ac_dots"; then
16473          ac_top_srcdir=.
16474       else
16475          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16476       fi ;;
16477   [\\/]* | ?:[\\/]* )
16478       ac_srcdir=$srcdir$ac_dir_suffix;
16479       ac_top_srcdir=$srcdir ;;
16480   *) # Relative path.
16481     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16482     ac_top_srcdir=$ac_dots$srcdir ;;
16483   esac
16484
16485   case $INSTALL in
16486   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16487   *) ac_INSTALL=$ac_dots$INSTALL ;;
16488   esac
16489
16490   if test x"$ac_file" != x-; then
16491     { echo "$as_me:16491: creating $ac_file" >&5
16492 echo "$as_me: creating $ac_file" >&6;}
16493     rm -f "$ac_file"
16494   fi
16495   # Let's still pretend it is `configure' which instantiates (i.e., don't
16496   # use $as_me), people would be surprised to read:
16497   #    /* config.h.  Generated automatically by config.status.  */
16498   configure_input="Generated automatically from `echo $ac_file_in |
16499                                                  sed 's,.*/,,'` by configure."
16500
16501   # First look for the input files in the build tree, otherwise in the
16502   # src tree.
16503   ac_file_inputs=`IFS=:
16504     for f in $ac_file_in; do
16505       case $f in
16506       -) echo $tmp/stdin ;;
16507       [\\/$]*)
16508          # Absolute (can't be DOS-style, as IFS=:)
16509          test -f "$f" || { { echo "$as_me:16509: error: cannot find input file: $f" >&5
16510 echo "$as_me: error: cannot find input file: $f" >&2;}
16511    { (exit 1); exit 1; }; }
16512          echo $f;;
16513       *) # Relative
16514          if test -f "$f"; then
16515            # Build tree
16516            echo $f
16517          elif test -f "$srcdir/$f"; then
16518            # Source tree
16519            echo $srcdir/$f
16520          else
16521            # /dev/null tree
16522            { { echo "$as_me:16522: error: cannot find input file: $f" >&5
16523 echo "$as_me: error: cannot find input file: $f" >&2;}
16524    { (exit 1); exit 1; }; }
16525          fi;;
16526       esac
16527     done` || { (exit 1); exit 1; }
16528 EOF
16529 cat >>$CONFIG_STATUS <<EOF
16530   sed "$ac_vpsub
16531 $extrasub
16532 EOF
16533 cat >>$CONFIG_STATUS <<\EOF
16534 :t
16535 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16536 s,@configure_input@,$configure_input,;t t
16537 s,@srcdir@,$ac_srcdir,;t t
16538 s,@top_srcdir@,$ac_top_srcdir,;t t
16539 s,@INSTALL@,$ac_INSTALL,;t t
16540 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16541   rm -f $tmp/stdin
16542   if test x"$ac_file" != x-; then
16543     mv $tmp/out $ac_file
16544   else
16545     cat $tmp/out
16546     rm -f $tmp/out
16547   fi
16548
16549 done
16550 EOF
16551 cat >>$CONFIG_STATUS <<\EOF
16552
16553 #
16554 # CONFIG_HEADER section.
16555 #
16556
16557 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16558 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16559 #
16560 # ac_d sets the value in "#define NAME VALUE" lines.
16561 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16562 ac_dB='[        ].*$,\1#\2'
16563 ac_dC=' '
16564 ac_dD=',;t'
16565 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16566 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16567 ac_iB='\([      ]\),\1#\2define\3'
16568 ac_iC=' '
16569 ac_iD='\4,;t'
16570 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16571 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16572 ac_uB='$,\1#\2define\3'
16573 ac_uC=' '
16574 ac_uD=',;t'
16575
16576 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16577   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16578   case $ac_file in
16579   - | *:- | *:-:* ) # input from stdin
16580         cat >$tmp/stdin
16581         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16582         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16583   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16584         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16585   * )   ac_file_in=$ac_file.in ;;
16586   esac
16587
16588   test x"$ac_file" != x- && { echo "$as_me:16588: creating $ac_file" >&5
16589 echo "$as_me: creating $ac_file" >&6;}
16590
16591   # First look for the input files in the build tree, otherwise in the
16592   # src tree.
16593   ac_file_inputs=`IFS=:
16594     for f in $ac_file_in; do
16595       case $f in
16596       -) echo $tmp/stdin ;;
16597       [\\/$]*)
16598          # Absolute (can't be DOS-style, as IFS=:)
16599          test -f "$f" || { { echo "$as_me:16599: error: cannot find input file: $f" >&5
16600 echo "$as_me: error: cannot find input file: $f" >&2;}
16601    { (exit 1); exit 1; }; }
16602          echo $f;;
16603       *) # Relative
16604          if test -f "$f"; then
16605            # Build tree
16606            echo $f
16607          elif test -f "$srcdir/$f"; then
16608            # Source tree
16609            echo $srcdir/$f
16610          else
16611            # /dev/null tree
16612            { { echo "$as_me:16612: error: cannot find input file: $f" >&5
16613 echo "$as_me: error: cannot find input file: $f" >&2;}
16614    { (exit 1); exit 1; }; }
16615          fi;;
16616       esac
16617     done` || { (exit 1); exit 1; }
16618   # Remove the trailing spaces.
16619   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16620
16621 EOF
16622
16623 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16624 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16625 # be either 'cat' or 'sort'.
16626 cat confdefs.h | uniq >conftest.vals
16627
16628 # Break up conftest.vals because some shells have a limit on
16629 # the size of here documents, and old seds have small limits too.
16630
16631 rm -f conftest.tail
16632 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16633 while grep . conftest.vals >/dev/null
16634 do
16635   # Write chunks of a limited-size here document to conftest.frag.
16636   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16637   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16638   echo 'CEOF' >> $CONFIG_STATUS
16639   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16640   rm -f conftest.vals
16641   mv conftest.tail conftest.vals
16642 done
16643 rm -f conftest.vals
16644
16645 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16646 # marker @DEFS@.
16647 echo '  cat >> conftest.edit <<CEOF
16648 /@DEFS@/r conftest.frag
16649 /@DEFS@/d
16650 CEOF
16651 sed -f conftest.edit $tmp/in > $tmp/out
16652 rm -f $tmp/in
16653 mv $tmp/out $tmp/in
16654 rm -f conftest.edit conftest.frag
16655 ' >> $CONFIG_STATUS
16656
16657 cat >>$CONFIG_STATUS <<\EOF
16658   # Let's still pretend it is `configure' which instantiates (i.e., don't
16659   # use $as_me), people would be surprised to read:
16660   #    /* config.h.  Generated automatically by config.status.  */
16661   if test x"$ac_file" = x-; then
16662     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16663   else
16664     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16665   fi
16666   cat $tmp/in >>$tmp/config.h
16667   rm -f $tmp/in
16668   if test x"$ac_file" != x-; then
16669     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16670       { echo "$as_me:16670: $ac_file is unchanged" >&5
16671 echo "$as_me: $ac_file is unchanged" >&6;}
16672     else
16673       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16674          X"$ac_file" : 'X\(//\)[^/]' \| \
16675          X"$ac_file" : 'X\(//\)$' \| \
16676          X"$ac_file" : 'X\(/\)' \| \
16677          .     : '\(.\)' 2>/dev/null ||
16678 echo X"$ac_file" |
16679     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16680           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16681           /^X\(\/\/\)$/{ s//\1/; q; }
16682           /^X\(\/\).*/{ s//\1/; q; }
16683           s/.*/./; q'`
16684       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16685         { case "$ac_dir" in
16686   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16687   *)                      as_incr_dir=.;;
16688 esac
16689 as_dummy="$ac_dir"
16690 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16691   case $as_mkdir_dir in
16692     # Skip DOS drivespec
16693     ?:) as_incr_dir=$as_mkdir_dir ;;
16694     *)
16695       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16696       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16697     ;;
16698   esac
16699 done; }
16700
16701       fi
16702       rm -f $ac_file
16703       mv $tmp/config.h $ac_file
16704     fi
16705   else
16706     cat $tmp/config.h
16707     rm -f $tmp/config.h
16708   fi
16709 done
16710 EOF
16711 cat >>$CONFIG_STATUS <<\EOF
16712
16713 #
16714 # CONFIG_COMMANDS section.
16715 #
16716 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16717   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16718   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16719
16720   case $ac_dest in
16721     default )
16722
16723 for cf_dir in test
16724 do
16725         if test ! -d $srcdir/$cf_dir; then
16726                 continue
16727         elif test -f $srcdir/$cf_dir/programs; then
16728                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16729         fi
16730 done
16731
16732         case $cf_cv_system_name in
16733         OS/2*)  LIB_PREFIX=''     ;;
16734         os2*)   LIB_PREFIX=''     ;;
16735         *)      LIB_PREFIX='lib'  ;;
16736         esac
16737 cf_prefix=$LIB_PREFIX
16738
16739 for cf_dir in $SRC_SUBDIRS
16740 do
16741         if test ! -d $srcdir/$cf_dir ; then
16742                 continue
16743         elif test -f $srcdir/$cf_dir/modules; then
16744
16745                 SHARED_LIB=
16746                 LIBS_TO_MAKE=
16747                 for cf_item in $cf_LIST_MODELS
16748                 do
16749
16750         case $cf_item in
16751         libtool) cf_suffix='.la'  ;;
16752         normal)  cf_suffix='.a'   ;;
16753         debug)   cf_suffix='_g.a' ;;
16754         profile) cf_suffix='_p.a' ;;
16755         shared)
16756                 case $cf_cv_system_name in
16757                 cygwin*) cf_suffix='.dll' ;;
16758                 darwin*) cf_suffix='.dylib' ;;
16759                 hpux*)
16760                         case $target in
16761                         ia64*)  cf_suffix='.so' ;;
16762                         *)      cf_suffix='.sl' ;;
16763                         esac
16764                         ;;
16765                 *)      cf_suffix='.so'  ;;
16766                 esac
16767         esac
16768         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16769
16770                         if test $cf_item = shared ; then
16771                         if test "$cf_cv_do_symlinks" = yes ; then
16772                                 case "$cf_cv_shlib_version" in #(vi
16773                                 rel) #(vi
16774                                         case "$cf_cv_system_name" in #(vi
16775                                         darwin*)
16776                                         case .${LIB_SUFFIX} in
16777                                         .w*)
16778                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16779                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16780                                                 ;;
16781                                         *)
16782                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16783                                                 ;;
16784                                         esac
16785                                         ;; #(vi
16786                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16787                                         esac
16788                                         ;;
16789                                 abi)
16790                                         case "$cf_cv_system_name" in #(vi
16791                                         darwin*)
16792                                         case .${LIB_SUFFIX} in
16793                                         .w*)
16794                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16795                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16796                                                 ;;
16797                                         *)
16798                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16799                                                 ;;
16800                                         esac
16801                                         ;; #(vi
16802                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16803                                         esac
16804                                         ;;
16805                                 esac
16806                         fi
16807                         # cygwin needs import library, and has unique naming convention
16808                         # use autodetected ${cf_prefix} for import lib and static lib, but
16809                         # use 'cyg' prefix for shared lib.
16810                         if test $cf_cv_shlib_version = cygdll ; then
16811                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16812                                 continue
16813                         fi
16814                         fi
16815                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16816                 done
16817
16818                 if test $cf_dir = ncurses ; then
16819                         cf_subsets="$LIB_SUBSETS"
16820                         cf_r_parts="$cf_subsets"
16821
16822                         while test -n "$cf_r_parts"
16823                         do
16824                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16825                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16826                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16827                                         case $cf_l_parts in #(vi
16828                                         *termlib*) #(vi
16829                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16830                                                 ;;
16831                                         *ticlib*)
16832                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16833                                                 ;;
16834                                         *)
16835                                                 break
16836                                                 ;;
16837                                         esac
16838                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16839                                 else
16840                                         break
16841                                 fi
16842                         done
16843                 else
16844                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16845                 fi
16846
16847                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16848                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16849                         $cf_dir/Makefile >$cf_dir/Makefile.out
16850                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16851
16852                 $AWK -f $srcdir/mk-0th.awk \
16853                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16854                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16855
16856                 for cf_subset in $cf_subsets
16857                 do
16858                         cf_subdirs=
16859                         for cf_item in $cf_LIST_MODELS
16860                         do
16861                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16862
16863 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16864
16865         case $cf_item in
16866         libtool) cf_suffix='.la'  ;;
16867         normal)  cf_suffix='.a'   ;;
16868         debug)   cf_suffix='_g.a' ;;
16869         profile) cf_suffix='_p.a' ;;
16870         shared)
16871                 case $cf_cv_system_name in
16872                 cygwin*) cf_suffix='.dll' ;;
16873                 darwin*) cf_suffix='.dylib' ;;
16874                 hpux*)
16875                         case $target in
16876                         ia64*)  cf_suffix='.so' ;;
16877                         *)      cf_suffix='.sl' ;;
16878                         esac
16879                         ;;
16880                 *)      cf_suffix='.so'  ;;
16881                 esac
16882         esac
16883         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16884
16885         case $cf_item in
16886         libtool) cf_subdir='obj_lo'  ;;
16887         normal)  cf_subdir='objects' ;;
16888         debug)   cf_subdir='obj_g' ;;
16889         profile) cf_subdir='obj_p' ;;
16890         shared)
16891                 case $cf_cv_system_name in #(vi
16892                 cygwin) #(vi
16893                         cf_subdir='objects' ;;
16894                 *)
16895                         cf_subdir='obj_s' ;;
16896                 esac
16897         esac
16898
16899                         # Test for case where we build libtinfo with a different name.
16900                         cf_libname=$cf_dir
16901                         if test $cf_dir = ncurses ; then
16902                                 case $cf_subset in
16903                                 *base*)
16904                                         ;;
16905                                 *termlib*)
16906                                         cf_libname=$TINFO_LIB_SUFFIX
16907                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16908                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16909                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16910                                         fi
16911                                         ;;
16912                                 ticlib*)
16913                                         cf_libname=$TICS_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                                 esac
16920                         fi
16921
16922                         # These dependencies really are for development, not
16923                         # builds, but they are useful in porting, too.
16924                         cf_depend="../include/ncurses_cfg.h"
16925                         if test "$srcdir" = "."; then
16926                                 cf_reldir="."
16927                         else
16928                                 cf_reldir="\${srcdir}"
16929                         fi
16930
16931                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16932                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16933                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16934                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16935                         fi
16936
16937                         cf_dir_suffix=
16938                         old_cf_suffix="$cf_suffix"
16939                         if test "$cf_cv_shlib_version_infix" = yes ; then
16940                         if test -n "$LIB_SUFFIX" ; then
16941                                 case $LIB_SUFFIX in
16942                                 w*)
16943                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16944                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16945                                         cf_dir_suffix=w
16946                                         ;;
16947                                 esac
16948                         fi
16949                         fi
16950
16951                         $AWK -f $srcdir/mk-1st.awk \
16952                                 name=${cf_libname}${cf_dir_suffix} \
16953                                 traces=$LIB_TRACING \
16954                                 MODEL=$cf_ITEM \
16955                                 model=$cf_subdir \
16956                                 prefix=$cf_prefix \
16957                                 suffix=$cf_suffix \
16958                                 subset=$cf_subset \
16959                                 TermlibRoot=$TINFO_NAME \
16960                                 TermlibSuffix=$TINFO_SUFFIX \
16961                                 ShlibVer=$cf_cv_shlib_version \
16962                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16963                                 ReLink=${cf_cv_do_relink-no} \
16964                                 DoLinks=$cf_cv_do_symlinks \
16965                                 rmSoLocs=$cf_cv_rm_so_locs \
16966                                 ldconfig="$LDCONFIG" \
16967                                 overwrite=$WITH_OVERWRITE \
16968                                 depend="$cf_depend" \
16969                                 host="$host" \
16970                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16971
16972                         cf_suffix="$old_cf_suffix"
16973
16974                         for cf_subdir2 in $cf_subdirs lib
16975                         do
16976                                 test $cf_subdir = $cf_subdir2 && break
16977                         done
16978                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16979                         $AWK -f $srcdir/mk-2nd.awk \
16980                                 name=$cf_dir \
16981                                 traces=$LIB_TRACING \
16982                                 MODEL=$cf_ITEM \
16983                                 model=$cf_subdir \
16984                                 subset=$cf_subset \
16985                                 srcdir=$srcdir \
16986                                 echo=$WITH_ECHO \
16987                                 crenames=$cf_cv_prog_CC_c_o \
16988                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16989                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16990                         cf_subdirs="$cf_subdirs $cf_subdir"
16991                         done
16992                 done
16993         fi
16994
16995         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16996 done
16997
16998 for cf_dir in $SRC_SUBDIRS
16999 do
17000         if test ! -d $srcdir/$cf_dir ; then
17001                 continue
17002         fi
17003
17004         if test -f $cf_dir/Makefile ; then
17005                 case "$cf_dir" in
17006                 Ada95) #(vi
17007                         echo 'libs \' >> Makefile
17008                         echo 'install.libs \' >> Makefile
17009                         echo 'uninstall.libs ::' >> Makefile
17010                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17011                         ;;
17012                 esac
17013         fi
17014
17015         if test -f $srcdir/$cf_dir/modules; then
17016                 echo >> Makefile
17017                 if test -f $srcdir/$cf_dir/headers; then
17018 cat >> Makefile <<CF_EOF
17019 install.includes \\
17020 uninstall.includes \\
17021 CF_EOF
17022                 fi
17023 if test "$cf_dir" != "c++" ; then
17024 echo 'lint \' >> Makefile
17025 fi
17026 cat >> Makefile <<CF_EOF
17027 libs \\
17028 lintlib \\
17029 install.libs \\
17030 uninstall.libs \\
17031 install.$cf_dir \\
17032 uninstall.$cf_dir ::
17033         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17034 CF_EOF
17035         elif test -f $srcdir/$cf_dir/headers; then
17036 cat >> Makefile <<CF_EOF
17037
17038 libs \\
17039 install.libs \\
17040 uninstall.libs \\
17041 install.includes \\
17042 uninstall.includes ::
17043         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17044 CF_EOF
17045 fi
17046 done
17047
17048 cat >> Makefile <<CF_EOF
17049
17050 install.libs uninstall.libs \\
17051 install.data uninstall.data ::
17052 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17053
17054 install.man \\
17055 uninstall.man ::
17056         cd man && \${MAKE} \${CF_MFLAGS} \$@
17057
17058 distclean ::
17059         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17060         rm -f headers.sh headers.sed mk_shared_lib.sh
17061         rm -rf \${DIRS_TO_MAKE}
17062 CF_EOF
17063
17064 # Special case: tack's manpage lives in its own directory.
17065 if test -d tack ; then
17066 if test -f $srcdir/$tack.h; then
17067 cat >> Makefile <<CF_EOF
17068
17069 install.man \\
17070 uninstall.man ::
17071         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17072 CF_EOF
17073 fi
17074 fi
17075
17076 rm -f headers.sed headers.sh
17077
17078 echo creating headers.sh
17079 cat >headers.sh <<CF_EOF
17080 #! /bin/sh
17081 # This shell script is generated by the 'configure' script.  It is invoked in a
17082 # subdirectory of the build tree.  It generates a sed-script in the parent
17083 # directory that is used to adjust includes for header files that reside in a
17084 # subdirectory of /usr/include, etc.
17085 PRG=""
17086 while test \$# != 3
17087 do
17088 PRG="\$PRG \$1"; shift
17089 done
17090 DST=\$1
17091 REF=\$2
17092 SRC=\$3
17093 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17094 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17095 echo installing \$SRC in \$DST
17096 CF_EOF
17097
17098 if test $WITH_CURSES_H = yes; then
17099         cat >>headers.sh <<CF_EOF
17100 case \$DST in
17101 /*/include/*)
17102         END=\`basename \$DST\`
17103         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17104         do
17105                 NAME=\`basename \$i\`
17106                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17107         done
17108         ;;
17109 *)
17110         echo "" >> \$TMPSED
17111         ;;
17112 esac
17113 CF_EOF
17114
17115 else
17116         cat >>headers.sh <<CF_EOF
17117 case \$DST in
17118 /*/include/*)
17119         END=\`basename \$DST\`
17120         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17121         do
17122                 NAME=\`basename \$i\`
17123                 if test "\$NAME" = "curses.h"
17124                 then
17125                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17126                         NAME=ncurses.h
17127                 fi
17128                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17129         done
17130         ;;
17131 *)
17132         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17133         ;;
17134 esac
17135 CF_EOF
17136 fi
17137 cat >>headers.sh <<CF_EOF
17138 rm -f \$TMPSRC
17139 sed -f \$TMPSED \$SRC > \$TMPSRC
17140 NAME=\`basename \$SRC\`
17141 CF_EOF
17142 if test $WITH_CURSES_H != yes; then
17143         cat >>headers.sh <<CF_EOF
17144 test "\$NAME" = "curses.h" && NAME=ncurses.h
17145 CF_EOF
17146 fi
17147 cat >>headers.sh <<CF_EOF
17148 # Just in case someone gzip'd manpages, remove the conflicting copy.
17149 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17150
17151 eval \$PRG \$TMPSRC \$DST/\$NAME
17152 rm -f \$TMPSRC \$TMPSED
17153 CF_EOF
17154
17155 chmod 0755 headers.sh
17156
17157 for cf_dir in $SRC_SUBDIRS
17158 do
17159         if test ! -d $srcdir/$cf_dir ; then
17160                 continue
17161         fi
17162
17163         if test -f $srcdir/$cf_dir/headers; then
17164                 $AWK -f $srcdir/mk-hdr.awk \
17165                         subset="$LIB_SUBSETS" \
17166                         compat="$WITH_CURSES_H" \
17167                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17168         fi
17169
17170         if test -f $srcdir/$cf_dir/modules; then
17171                 if test "$cf_dir" != "c++" ; then
17172                         cat >>$cf_dir/Makefile <<"CF_EOF"
17173 depend : ${AUTO_SRC}
17174         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17175
17176 # DO NOT DELETE THIS LINE -- make depend depends on it.
17177 CF_EOF
17178                 fi
17179         fi
17180 done
17181
17182  ;;
17183   esac
17184 done
17185 EOF
17186
17187 cat >>$CONFIG_STATUS <<\EOF
17188
17189 { (exit 0); exit 0; }
17190 EOF
17191 chmod +x $CONFIG_STATUS
17192 ac_clean_files=$ac_clean_files_save
17193
17194 # configure is writing to config.log, and then calls config.status.
17195 # config.status does its own redirection, appending to config.log.
17196 # Unfortunately, on DOS this fails, as config.log is still kept open
17197 # by configure, so config.status won't be able to write to it; its
17198 # output is simply discarded.  So we exec the FD to /dev/null,
17199 # effectively closing config.log, so it can be properly (re)opened and
17200 # appended to by config.status.  When coming back to configure, we
17201 # need to make the FD available again.
17202 if test "$no_create" != yes; then
17203   ac_cs_success=:
17204   exec 5>/dev/null
17205   $SHELL $CONFIG_STATUS || ac_cs_success=false
17206   exec 5>>config.log
17207   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17208   # would make configure fail if this is the last instruction.
17209   $ac_cs_success || { (exit 1); exit 1; }
17210 fi
17211 ${MAKE-make} preinstall