]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20080531
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.434 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --with-bool=TYPE        override fallback type of bool variable
750   --with-caps=alt         compile with alternate Caps file
751   --with-chtype=TYPE      override type of chtype
752   --with-ospeed=TYPE      override type of ospeed variable
753   --with-mmask-t=TYPE     override type of mmask_t
754   --with-rcs-ids          compile-in RCS identifiers
755 Options to Specify How Manpages are Installed:
756   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
757                           optionally formatted/catonly, e.g., gzip,formatted
758   --with-manpage-renames  specify manpage-renaming
759   --with-manpage-aliases  specify manpage-aliases using .so
760   --with-manpage-symlinks specify manpage-aliases using symlinks
761   --with-manpage-tbl      specify manpage processing with tbl
762 Extensions:
763   --disable-ext-funcs     disable function-extensions
764   --enable-const          compile with extra/non-standard const
765   --enable-ext-colors     compile for 256-color support
766   --enable-ext-mouse      compile for extended mouse-encoding
767   --enable-no-padding     compile with $NCURSES_NO_PADDING code
768   --enable-signed-char    compile using signed Boolean's in term.h
769   --enable-sigwinch       compile with SIGWINCH handler
770   --enable-tcap-names     compile with user-definable terminal capabilities
771 Development Code:
772   --without-develop       disable development options
773   --enable-hard-tabs      compile with hard-tabs code
774   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
775 Experimental Code:
776   --disable-assumed-color do not assume anything about default-colors
777   --disable-hashmap       compile without hashmap scrolling-optimization
778   --enable-colorfgbg      compile with $COLORFGBG code
779   --with-pthread          use POSIX thread library
780   --enable-reentrant      compile with experimental reentrant code
781   --enable-safe-sprintf   compile with experimental safe-sprintf code
782   --disable-scroll-hints  compile without scroll-hints code
783   --enable-wgetch-events  compile with experimental wgetch-events code
784 Testing/development Options:
785   --enable-echo           build: display "compiling" commands (default)
786   --enable-warnings       build: turn on GCC compiler warnings
787   --enable-assertions     test: turn on generation of assertion code
788   --with-dmalloc          test: use Gray Watson's dmalloc library
789   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
790   --with-valgrind         test: use valgrind
791   --disable-leaks         test: free permanent memory, analyze leaks
792   --enable-expanded       test: generate functions for certain macros
793   --disable-macros        test: use functions rather than macros
794   --with-trace            test: add trace() function to all models of ncurses
795 Ada95 Binding Options:
796   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
797   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
798   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
799
800 Some influential environment variables:
801   CC          C compiler command
802   CFLAGS      C compiler flags
803   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
804               nonstandard directory <lib dir>
805   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
806               headers in a nonstandard directory <include dir>
807   CPP         C preprocessor
808   CXX         C++ compiler command
809   CXXFLAGS    C++ compiler flags
810   CXXCPP      C++ preprocessor
811
812 Use these variables to override the choices made by `configure' or to help
813 it to find libraries and programs with nonstandard names/locations.
814
815 EOF
816 fi
817
818 if test "$ac_init_help" = "recursive"; then
819   # If there are subdirs, report their specific --help.
820   ac_popdir=`pwd`
821   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
822     cd $ac_subdir
823     # A "../" for each directory in /$ac_subdir.
824     ac_dots=`echo $ac_subdir |
825              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
826
827     case $srcdir in
828     .) # No --srcdir option.  We are building in place.
829       ac_sub_srcdir=$srcdir ;;
830     [\\/]* | ?:[\\/]* ) # Absolute path.
831       ac_sub_srcdir=$srcdir/$ac_subdir ;;
832     *) # Relative path.
833       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
834     esac
835
836     # Check for guested configure; otherwise get Cygnus style configure.
837     if test -f $ac_sub_srcdir/configure.gnu; then
838       echo
839       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
840     elif test -f $ac_sub_srcdir/configure; then
841       echo
842       $SHELL $ac_sub_srcdir/configure  --help=recursive
843     elif test -f $ac_sub_srcdir/configure.ac ||
844            test -f $ac_sub_srcdir/configure.in; then
845       echo
846       $ac_configure --help
847     else
848       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
849     fi
850     cd $ac_popdir
851   done
852 fi
853
854 test -n "$ac_init_help" && exit 0
855 if $ac_init_version; then
856   cat <<\EOF
857
858 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
859 Free Software Foundation, Inc.
860 This configure script is free software; the Free Software Foundation
861 gives unlimited permission to copy, distribute and modify it.
862 EOF
863   exit 0
864 fi
865 exec 5>config.log
866 cat >&5 <<EOF
867 This file contains any messages produced by compilers while
868 running configure, to aid debugging if configure makes a mistake.
869
870 It was created by $as_me, which was
871 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
872
873   $ $0 $@
874
875 EOF
876 {
877 cat <<_ASUNAME
878 ## ---------- ##
879 ## Platform.  ##
880 ## ---------- ##
881
882 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
883 uname -m = `(uname -m) 2>/dev/null || echo unknown`
884 uname -r = `(uname -r) 2>/dev/null || echo unknown`
885 uname -s = `(uname -s) 2>/dev/null || echo unknown`
886 uname -v = `(uname -v) 2>/dev/null || echo unknown`
887
888 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
889 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
890
891 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
892 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
893 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
894 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
895 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
896 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
897 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
898
899 PATH = $PATH
900
901 _ASUNAME
902 } >&5
903
904 cat >&5 <<EOF
905 ## ------------ ##
906 ## Core tests.  ##
907 ## ------------ ##
908
909 EOF
910
911 # Keep a trace of the command line.
912 # Strip out --no-create and --no-recursion so they do not pile up.
913 # Also quote any args containing shell meta-characters.
914 ac_configure_args=
915 ac_sep=
916 for ac_arg
917 do
918   case $ac_arg in
919   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
920   | --no-cr | --no-c) ;;
921   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
922   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
923   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
924     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
925     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
926     ac_sep=" " ;;
927   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
928      ac_sep=" " ;;
929   esac
930   # Get rid of the leading space.
931 done
932
933 # When interrupted or exit'd, cleanup temporary files, and complete
934 # config.log.  We remove comments because anyway the quotes in there
935 # would cause problems or look ugly.
936 trap 'exit_status=$?
937   # Save into config.log some information that might help in debugging.
938   echo >&5
939   echo "## ----------------- ##" >&5
940   echo "## Cache variables.  ##" >&5
941   echo "## ----------------- ##" >&5
942   echo >&5
943   # The following way of writing the cache mishandles newlines in values,
944 {
945   (set) 2>&1 |
946     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
947     *ac_space=\ *)
948       sed -n \
949         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
950           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
951       ;;
952     *)
953       sed -n \
954         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
955       ;;
956     esac;
957 } >&5
958   sed "/^$/d" confdefs.h >conftest.log
959   if test -s conftest.log; then
960     echo >&5
961     echo "## ------------ ##" >&5
962     echo "## confdefs.h.  ##" >&5
963     echo "## ------------ ##" >&5
964     echo >&5
965     cat conftest.log >&5
966   fi
967   (echo; echo) >&5
968   test "$ac_signal" != 0 &&
969     echo "$as_me: caught signal $ac_signal" >&5
970   echo "$as_me: exit $exit_status" >&5
971   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
972     exit $exit_status
973      ' 0
974 for ac_signal in 1 2 13 15; do
975   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
976 done
977 ac_signal=0
978
979 # confdefs.h avoids OS command line length limits that DEFS can exceed.
980 rm -rf conftest* confdefs.h
981 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
982 echo >confdefs.h
983
984 # Let the site file select an alternate cache file if it wants to.
985 # Prefer explicitly selected file to automatically selected ones.
986 if test -z "$CONFIG_SITE"; then
987   if test "x$prefix" != xNONE; then
988     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
989   else
990     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
991   fi
992 fi
993 for ac_site_file in $CONFIG_SITE; do
994   if test -r "$ac_site_file"; then
995     { echo "$as_me:995: loading site script $ac_site_file" >&5
996 echo "$as_me: loading site script $ac_site_file" >&6;}
997     cat "$ac_site_file" >&5
998     . "$ac_site_file"
999   fi
1000 done
1001
1002 if test -r "$cache_file"; then
1003   # Some versions of bash will fail to source /dev/null (special
1004   # files actually), so we avoid doing that.
1005   if test -f "$cache_file"; then
1006     { echo "$as_me:1006: loading cache $cache_file" >&5
1007 echo "$as_me: loading cache $cache_file" >&6;}
1008     case $cache_file in
1009       [\\/]* | ?:[\\/]* ) . $cache_file;;
1010       *)                      . ./$cache_file;;
1011     esac
1012   fi
1013 else
1014   { echo "$as_me:1014: creating cache $cache_file" >&5
1015 echo "$as_me: creating cache $cache_file" >&6;}
1016   >$cache_file
1017 fi
1018
1019 # Check that the precious variables saved in the cache have kept the same
1020 # value.
1021 ac_cache_corrupted=false
1022 for ac_var in `(set) 2>&1 |
1023                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1024   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1025   eval ac_new_set=\$ac_env_${ac_var}_set
1026   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1027   eval ac_new_val="\$ac_env_${ac_var}_value"
1028   case $ac_old_set,$ac_new_set in
1029     set,)
1030       { echo "$as_me:1030: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1031 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1032       ac_cache_corrupted=: ;;
1033     ,set)
1034       { echo "$as_me:1034: error: \`$ac_var' was not set in the previous run" >&5
1035 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1036       ac_cache_corrupted=: ;;
1037     ,);;
1038     *)
1039       if test "x$ac_old_val" != "x$ac_new_val"; then
1040         { echo "$as_me:1040: error: \`$ac_var' has changed since the previous run:" >&5
1041 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1042         { echo "$as_me:1042:   former value:  $ac_old_val" >&5
1043 echo "$as_me:   former value:  $ac_old_val" >&2;}
1044         { echo "$as_me:1044:   current value: $ac_new_val" >&5
1045 echo "$as_me:   current value: $ac_new_val" >&2;}
1046         ac_cache_corrupted=:
1047       fi;;
1048   esac
1049   # Pass precious variables to config.status.  It doesn't matter if
1050   # we pass some twice (in addition to the command line arguments).
1051   if test "$ac_new_set" = set; then
1052     case $ac_new_val in
1053     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1054       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1055       ac_configure_args="$ac_configure_args '$ac_arg'"
1056       ;;
1057     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1058        ;;
1059     esac
1060   fi
1061 done
1062 if $ac_cache_corrupted; then
1063   { echo "$as_me:1063: error: changes in the environment can compromise the build" >&5
1064 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1065   { { echo "$as_me:1065: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1066 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1067    { (exit 1); exit 1; }; }
1068 fi
1069
1070 ac_ext=c
1071 ac_cpp='$CPP $CPPFLAGS'
1072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1075 ac_main_return=return
1076
1077 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1078   *c*,-n*) ECHO_N= ECHO_C='
1079 ' ECHO_T='      ' ;;
1080   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1081   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1082 esac
1083 echo "#! $SHELL" >conftest.sh
1084 echo  "exit 0"   >>conftest.sh
1085 chmod +x conftest.sh
1086 if { (echo "$as_me:1086: PATH=\".;.\"; conftest.sh") >&5
1087   (PATH=".;."; conftest.sh) 2>&5
1088   ac_status=$?
1089   echo "$as_me:1089: \$? = $ac_status" >&5
1090   (exit $ac_status); }; then
1091   ac_path_separator=';'
1092 else
1093   ac_path_separator=:
1094 fi
1095 PATH_SEPARATOR="$ac_path_separator"
1096 rm -f conftest.sh
1097
1098 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1099
1100 top_builddir=`pwd`
1101
1102 echo "$as_me:1102: checking for egrep" >&5
1103 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1104 if test "${ac_cv_prog_egrep+set}" = set; then
1105   echo $ECHO_N "(cached) $ECHO_C" >&6
1106 else
1107   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1108     then ac_cv_prog_egrep='grep -E'
1109     else ac_cv_prog_egrep='egrep'
1110     fi
1111 fi
1112 echo "$as_me:1112: result: $ac_cv_prog_egrep" >&5
1113 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1114  EGREP=$ac_cv_prog_egrep
1115
1116 test -z "$EGREP" && { { echo "$as_me:1116: error: No egrep program found" >&5
1117 echo "$as_me: error: No egrep program found" >&2;}
1118    { (exit 1); exit 1; }; }
1119
1120 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1121 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 cf_cv_abi_version=${NCURSES_MAJOR}
1124 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1125 cf_cv_timestamp=`date`
1126 echo "$as_me:1126: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1127 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1128
1129 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1130
1131 # Check whether --with-rel-version or --without-rel-version was given.
1132 if test "${with_rel_version+set}" = set; then
1133   withval="$with_rel_version"
1134   { echo "$as_me:1134: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1135 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1136  cf_cv_rel_version=$withval
1137 fi;
1138
1139  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1140  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1141
1142 if test -n "$NCURSES_MAJOR" ; then
1143   case $NCURSES_MAJOR in #(vi
1144   [0-9]*) #(vi
1145         ;;
1146   *)
1147         { { echo "$as_me:1147: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1148 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1149    { (exit 1); exit 1; }; }
1150         ;;
1151   esac
1152 else
1153   { { echo "$as_me:1153: error: Release major-version value is empty" >&5
1154 echo "$as_me: error: Release major-version value is empty" >&2;}
1155    { (exit 1); exit 1; }; }
1156 fi
1157
1158 if test -n "$NCURSES_MINOR" ; then
1159   case $NCURSES_MINOR in #(vi
1160   [0-9]*) #(vi
1161         ;;
1162   *)
1163         { { echo "$as_me:1163: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1164 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1165    { (exit 1); exit 1; }; }
1166         ;;
1167   esac
1168 else
1169   { { echo "$as_me:1169: error: Release minor-version value is empty" >&5
1170 echo "$as_me: error: Release minor-version value is empty" >&2;}
1171    { (exit 1); exit 1; }; }
1172 fi
1173
1174 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1175
1176 # Check whether --with-abi-version or --without-abi-version was given.
1177 if test "${with_abi_version+set}" = set; then
1178   withval="$with_abi_version"
1179   { echo "$as_me:1179: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1180 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1181  cf_cv_abi_version=$withval
1182 fi;
1183
1184 if test -n "$cf_cv_abi_version" ; then
1185   case $cf_cv_abi_version in #(vi
1186   [0-9]*) #(vi
1187         ;;
1188   *)
1189         { { echo "$as_me:1189: error: ABI version is not a number: $cf_cv_abi_version" >&5
1190 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1191    { (exit 1); exit 1; }; }
1192         ;;
1193   esac
1194 else
1195   { { echo "$as_me:1195: error: ABI version value is empty" >&5
1196 echo "$as_me: error: ABI version value is empty" >&2;}
1197    { (exit 1); exit 1; }; }
1198 fi
1199
1200 ac_aux_dir=
1201 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1202   if test -f $ac_dir/install-sh; then
1203     ac_aux_dir=$ac_dir
1204     ac_install_sh="$ac_aux_dir/install-sh -c"
1205     break
1206   elif test -f $ac_dir/install.sh; then
1207     ac_aux_dir=$ac_dir
1208     ac_install_sh="$ac_aux_dir/install.sh -c"
1209     break
1210   elif test -f $ac_dir/shtool; then
1211     ac_aux_dir=$ac_dir
1212     ac_install_sh="$ac_aux_dir/shtool install -c"
1213     break
1214   fi
1215 done
1216 if test -z "$ac_aux_dir"; then
1217   { { echo "$as_me:1217: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1218 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1219    { (exit 1); exit 1; }; }
1220 fi
1221 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1222 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1223 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1224
1225 # Make sure we can run config.sub.
1226 $ac_config_sub sun4 >/dev/null 2>&1 ||
1227   { { echo "$as_me:1227: error: cannot run $ac_config_sub" >&5
1228 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1229    { (exit 1); exit 1; }; }
1230
1231 echo "$as_me:1231: checking build system type" >&5
1232 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1233 if test "${ac_cv_build+set}" = set; then
1234   echo $ECHO_N "(cached) $ECHO_C" >&6
1235 else
1236   ac_cv_build_alias=$build_alias
1237 test -z "$ac_cv_build_alias" &&
1238   ac_cv_build_alias=`$ac_config_guess`
1239 test -z "$ac_cv_build_alias" &&
1240   { { echo "$as_me:1240: error: cannot guess build type; you must specify one" >&5
1241 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1242    { (exit 1); exit 1; }; }
1243 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1244   { { echo "$as_me:1244: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1245 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1246    { (exit 1); exit 1; }; }
1247
1248 fi
1249 echo "$as_me:1249: result: $ac_cv_build" >&5
1250 echo "${ECHO_T}$ac_cv_build" >&6
1251 build=$ac_cv_build
1252 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1253 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1254 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1255
1256 echo "$as_me:1256: checking host system type" >&5
1257 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1258 if test "${ac_cv_host+set}" = set; then
1259   echo $ECHO_N "(cached) $ECHO_C" >&6
1260 else
1261   ac_cv_host_alias=$host_alias
1262 test -z "$ac_cv_host_alias" &&
1263   ac_cv_host_alias=$ac_cv_build_alias
1264 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1265   { { echo "$as_me:1265: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1266 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1267    { (exit 1); exit 1; }; }
1268
1269 fi
1270 echo "$as_me:1270: result: $ac_cv_host" >&5
1271 echo "${ECHO_T}$ac_cv_host" >&6
1272 host=$ac_cv_host
1273 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1274 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1275 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1276
1277 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1278         echo "$as_me:1278: checking target system type" >&5
1279 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1280 if test "${ac_cv_target+set}" = set; then
1281   echo $ECHO_N "(cached) $ECHO_C" >&6
1282 else
1283   ac_cv_target_alias=$target_alias
1284 test "x$ac_cv_target_alias" = "x" &&
1285   ac_cv_target_alias=$ac_cv_host_alias
1286 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1287   { { echo "$as_me:1287: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1288 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1289    { (exit 1); exit 1; }; }
1290
1291 fi
1292 echo "$as_me:1292: result: $ac_cv_target" >&5
1293 echo "${ECHO_T}$ac_cv_target" >&6
1294 target=$ac_cv_target
1295 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1296 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1297 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1298
1299 # The aliases save the names the user supplied, while $host etc.
1300 # will get canonicalized.
1301 test -n "$target_alias" &&
1302   test "$program_prefix$program_suffix$program_transform_name" = \
1303     NONENONEs,x,x, &&
1304   program_prefix=${target_alias}-
1305         system_name="$host_os"
1306 else
1307         system_name="`(uname -s -r) 2>/dev/null`"
1308         if test -z "$system_name" ; then
1309                 system_name="`(hostname) 2>/dev/null`"
1310         fi
1311 fi
1312 test -n "$system_name" && cat >>confdefs.h <<EOF
1313 #define SYSTEM_NAME "$system_name"
1314 EOF
1315
1316 if test "${cf_cv_system_name+set}" = set; then
1317   echo $ECHO_N "(cached) $ECHO_C" >&6
1318 else
1319   cf_cv_system_name="$system_name"
1320 fi
1321
1322 test -z "$system_name" && system_name="$cf_cv_system_name"
1323 test -n "$cf_cv_system_name" && echo "$as_me:1323: result: Configuring for $cf_cv_system_name" >&5
1324 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1325
1326 if test ".$system_name" != ".$cf_cv_system_name" ; then
1327         echo "$as_me:1327: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1328 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1329         { { echo "$as_me:1329: error: \"Please remove config.cache and try again.\"" >&5
1330 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1331    { (exit 1); exit 1; }; }
1332 fi
1333
1334 # Check whether --with-system-type or --without-system-type was given.
1335 if test "${with_system_type+set}" = set; then
1336   withval="$with_system_type"
1337   { echo "$as_me:1337: WARNING: overriding system type to $withval" >&5
1338 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1339  cf_cv_system_name=$withval
1340 fi;
1341
1342 ###     Save the given $CFLAGS to allow user-override.
1343 cf_user_CFLAGS="$CFLAGS"
1344
1345 ###     Default install-location
1346
1347 echo "$as_me:1347: checking for prefix" >&5
1348 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1349 if test "x$prefix" = "xNONE" ; then
1350         case "$cf_cv_system_name" in
1351                 # non-vendor systems don't have a conflict
1352         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1353                 prefix=/usr
1354                 ;;
1355         *)      prefix=$ac_default_prefix
1356                 ;;
1357         esac
1358 fi
1359 echo "$as_me:1359: result: $prefix" >&5
1360 echo "${ECHO_T}$prefix" >&6
1361
1362 if test "x$prefix" = "xNONE" ; then
1363 echo "$as_me:1363: checking for default include-directory" >&5
1364 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1365 test -n "$verbose" && echo 1>&6
1366 for cf_symbol in \
1367         $includedir \
1368         $includedir/ncurses \
1369         $prefix/include \
1370         $prefix/include/ncurses \
1371         /usr/local/include \
1372         /usr/local/include/ncurses \
1373         /usr/include \
1374         /usr/include/ncurses
1375 do
1376         cf_dir=`eval echo $cf_symbol`
1377         if test -f $cf_dir/curses.h ; then
1378         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1379                 includedir="$cf_symbol"
1380                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1381                 break
1382         fi
1383         fi
1384         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1385 done
1386 echo "$as_me:1386: result: $includedir" >&5
1387 echo "${ECHO_T}$includedir" >&6
1388 fi
1389
1390 ###     Checks for programs.
1391 ac_ext=c
1392 ac_cpp='$CPP $CPPFLAGS'
1393 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1394 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1396 ac_main_return=return
1397 if test -n "$ac_tool_prefix"; then
1398   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1399 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1400 echo "$as_me:1400: checking for $ac_word" >&5
1401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1402 if test "${ac_cv_prog_CC+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   if test -n "$CC"; then
1406   ac_cv_prog_CC="$CC" # Let the user override the test.
1407 else
1408   ac_save_IFS=$IFS; IFS=$ac_path_separator
1409 ac_dummy="$PATH"
1410 for ac_dir in $ac_dummy; do
1411   IFS=$ac_save_IFS
1412   test -z "$ac_dir" && ac_dir=.
1413   $as_executable_p "$ac_dir/$ac_word" || continue
1414 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1415 echo "$as_me:1415: found $ac_dir/$ac_word" >&5
1416 break
1417 done
1418
1419 fi
1420 fi
1421 CC=$ac_cv_prog_CC
1422 if test -n "$CC"; then
1423   echo "$as_me:1423: result: $CC" >&5
1424 echo "${ECHO_T}$CC" >&6
1425 else
1426   echo "$as_me:1426: result: no" >&5
1427 echo "${ECHO_T}no" >&6
1428 fi
1429
1430 fi
1431 if test -z "$ac_cv_prog_CC"; then
1432   ac_ct_CC=$CC
1433   # Extract the first word of "gcc", so it can be a program name with args.
1434 set dummy gcc; ac_word=$2
1435 echo "$as_me:1435: checking for $ac_word" >&5
1436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1437 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1438   echo $ECHO_N "(cached) $ECHO_C" >&6
1439 else
1440   if test -n "$ac_ct_CC"; then
1441   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1442 else
1443   ac_save_IFS=$IFS; IFS=$ac_path_separator
1444 ac_dummy="$PATH"
1445 for ac_dir in $ac_dummy; do
1446   IFS=$ac_save_IFS
1447   test -z "$ac_dir" && ac_dir=.
1448   $as_executable_p "$ac_dir/$ac_word" || continue
1449 ac_cv_prog_ac_ct_CC="gcc"
1450 echo "$as_me:1450: found $ac_dir/$ac_word" >&5
1451 break
1452 done
1453
1454 fi
1455 fi
1456 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1457 if test -n "$ac_ct_CC"; then
1458   echo "$as_me:1458: result: $ac_ct_CC" >&5
1459 echo "${ECHO_T}$ac_ct_CC" >&6
1460 else
1461   echo "$as_me:1461: result: no" >&5
1462 echo "${ECHO_T}no" >&6
1463 fi
1464
1465   CC=$ac_ct_CC
1466 else
1467   CC="$ac_cv_prog_CC"
1468 fi
1469
1470 if test -z "$CC"; then
1471   if test -n "$ac_tool_prefix"; then
1472   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1473 set dummy ${ac_tool_prefix}cc; ac_word=$2
1474 echo "$as_me:1474: checking for $ac_word" >&5
1475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1476 if test "${ac_cv_prog_CC+set}" = set; then
1477   echo $ECHO_N "(cached) $ECHO_C" >&6
1478 else
1479   if test -n "$CC"; then
1480   ac_cv_prog_CC="$CC" # Let the user override the test.
1481 else
1482   ac_save_IFS=$IFS; IFS=$ac_path_separator
1483 ac_dummy="$PATH"
1484 for ac_dir in $ac_dummy; do
1485   IFS=$ac_save_IFS
1486   test -z "$ac_dir" && ac_dir=.
1487   $as_executable_p "$ac_dir/$ac_word" || continue
1488 ac_cv_prog_CC="${ac_tool_prefix}cc"
1489 echo "$as_me:1489: found $ac_dir/$ac_word" >&5
1490 break
1491 done
1492
1493 fi
1494 fi
1495 CC=$ac_cv_prog_CC
1496 if test -n "$CC"; then
1497   echo "$as_me:1497: result: $CC" >&5
1498 echo "${ECHO_T}$CC" >&6
1499 else
1500   echo "$as_me:1500: result: no" >&5
1501 echo "${ECHO_T}no" >&6
1502 fi
1503
1504 fi
1505 if test -z "$ac_cv_prog_CC"; then
1506   ac_ct_CC=$CC
1507   # Extract the first word of "cc", so it can be a program name with args.
1508 set dummy cc; ac_word=$2
1509 echo "$as_me:1509: checking for $ac_word" >&5
1510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1511 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1512   echo $ECHO_N "(cached) $ECHO_C" >&6
1513 else
1514   if test -n "$ac_ct_CC"; then
1515   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1516 else
1517   ac_save_IFS=$IFS; IFS=$ac_path_separator
1518 ac_dummy="$PATH"
1519 for ac_dir in $ac_dummy; do
1520   IFS=$ac_save_IFS
1521   test -z "$ac_dir" && ac_dir=.
1522   $as_executable_p "$ac_dir/$ac_word" || continue
1523 ac_cv_prog_ac_ct_CC="cc"
1524 echo "$as_me:1524: found $ac_dir/$ac_word" >&5
1525 break
1526 done
1527
1528 fi
1529 fi
1530 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1531 if test -n "$ac_ct_CC"; then
1532   echo "$as_me:1532: result: $ac_ct_CC" >&5
1533 echo "${ECHO_T}$ac_ct_CC" >&6
1534 else
1535   echo "$as_me:1535: result: no" >&5
1536 echo "${ECHO_T}no" >&6
1537 fi
1538
1539   CC=$ac_ct_CC
1540 else
1541   CC="$ac_cv_prog_CC"
1542 fi
1543
1544 fi
1545 if test -z "$CC"; then
1546   # Extract the first word of "cc", so it can be a program name with args.
1547 set dummy cc; ac_word=$2
1548 echo "$as_me:1548: checking for $ac_word" >&5
1549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1550 if test "${ac_cv_prog_CC+set}" = set; then
1551   echo $ECHO_N "(cached) $ECHO_C" >&6
1552 else
1553   if test -n "$CC"; then
1554   ac_cv_prog_CC="$CC" # Let the user override the test.
1555 else
1556   ac_prog_rejected=no
1557   ac_save_IFS=$IFS; IFS=$ac_path_separator
1558 ac_dummy="$PATH"
1559 for ac_dir in $ac_dummy; do
1560   IFS=$ac_save_IFS
1561   test -z "$ac_dir" && ac_dir=.
1562   $as_executable_p "$ac_dir/$ac_word" || continue
1563 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1564   ac_prog_rejected=yes
1565   continue
1566 fi
1567 ac_cv_prog_CC="cc"
1568 echo "$as_me:1568: found $ac_dir/$ac_word" >&5
1569 break
1570 done
1571
1572 if test $ac_prog_rejected = yes; then
1573   # We found a bogon in the path, so make sure we never use it.
1574   set dummy $ac_cv_prog_CC
1575   shift
1576   if test $# != 0; then
1577     # We chose a different compiler from the bogus one.
1578     # However, it has the same basename, so the bogon will be chosen
1579     # first if we set CC to just the basename; use the full file name.
1580     shift
1581     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1582     shift
1583     ac_cv_prog_CC="$@"
1584   fi
1585 fi
1586 fi
1587 fi
1588 CC=$ac_cv_prog_CC
1589 if test -n "$CC"; then
1590   echo "$as_me:1590: result: $CC" >&5
1591 echo "${ECHO_T}$CC" >&6
1592 else
1593   echo "$as_me:1593: result: no" >&5
1594 echo "${ECHO_T}no" >&6
1595 fi
1596
1597 fi
1598 if test -z "$CC"; then
1599   if test -n "$ac_tool_prefix"; then
1600   for ac_prog in cl
1601   do
1602     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1603 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1604 echo "$as_me:1604: checking for $ac_word" >&5
1605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1606 if test "${ac_cv_prog_CC+set}" = set; then
1607   echo $ECHO_N "(cached) $ECHO_C" >&6
1608 else
1609   if test -n "$CC"; then
1610   ac_cv_prog_CC="$CC" # Let the user override the test.
1611 else
1612   ac_save_IFS=$IFS; IFS=$ac_path_separator
1613 ac_dummy="$PATH"
1614 for ac_dir in $ac_dummy; do
1615   IFS=$ac_save_IFS
1616   test -z "$ac_dir" && ac_dir=.
1617   $as_executable_p "$ac_dir/$ac_word" || continue
1618 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1619 echo "$as_me:1619: found $ac_dir/$ac_word" >&5
1620 break
1621 done
1622
1623 fi
1624 fi
1625 CC=$ac_cv_prog_CC
1626 if test -n "$CC"; then
1627   echo "$as_me:1627: result: $CC" >&5
1628 echo "${ECHO_T}$CC" >&6
1629 else
1630   echo "$as_me:1630: result: no" >&5
1631 echo "${ECHO_T}no" >&6
1632 fi
1633
1634     test -n "$CC" && break
1635   done
1636 fi
1637 if test -z "$CC"; then
1638   ac_ct_CC=$CC
1639   for ac_prog in cl
1640 do
1641   # Extract the first word of "$ac_prog", so it can be a program name with args.
1642 set dummy $ac_prog; ac_word=$2
1643 echo "$as_me:1643: checking for $ac_word" >&5
1644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1645 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1646   echo $ECHO_N "(cached) $ECHO_C" >&6
1647 else
1648   if test -n "$ac_ct_CC"; then
1649   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1650 else
1651   ac_save_IFS=$IFS; IFS=$ac_path_separator
1652 ac_dummy="$PATH"
1653 for ac_dir in $ac_dummy; do
1654   IFS=$ac_save_IFS
1655   test -z "$ac_dir" && ac_dir=.
1656   $as_executable_p "$ac_dir/$ac_word" || continue
1657 ac_cv_prog_ac_ct_CC="$ac_prog"
1658 echo "$as_me:1658: found $ac_dir/$ac_word" >&5
1659 break
1660 done
1661
1662 fi
1663 fi
1664 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1665 if test -n "$ac_ct_CC"; then
1666   echo "$as_me:1666: result: $ac_ct_CC" >&5
1667 echo "${ECHO_T}$ac_ct_CC" >&6
1668 else
1669   echo "$as_me:1669: result: no" >&5
1670 echo "${ECHO_T}no" >&6
1671 fi
1672
1673   test -n "$ac_ct_CC" && break
1674 done
1675
1676   CC=$ac_ct_CC
1677 fi
1678
1679 fi
1680
1681 test -z "$CC" && { { echo "$as_me:1681: error: no acceptable cc found in \$PATH" >&5
1682 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1683    { (exit 1); exit 1; }; }
1684
1685 # Provide some information about the compiler.
1686 echo "$as_me:1686:" \
1687      "checking for C compiler version" >&5
1688 ac_compiler=`set X $ac_compile; echo $2`
1689 { (eval echo "$as_me:1689: \"$ac_compiler --version </dev/null >&5\"") >&5
1690   (eval $ac_compiler --version </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -v </dev/null >&5\"") >&5
1695   (eval $ac_compiler -v </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699 { (eval echo "$as_me:1699: \"$ac_compiler -V </dev/null >&5\"") >&5
1700   (eval $ac_compiler -V </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704
1705 cat >conftest.$ac_ext <<_ACEOF
1706 #line 1706 "configure"
1707 #include "confdefs.h"
1708
1709 int
1710 main ()
1711 {
1712
1713   ;
1714   return 0;
1715 }
1716 _ACEOF
1717 ac_clean_files_save=$ac_clean_files
1718 ac_clean_files="$ac_clean_files a.out a.exe"
1719 # Try to create an executable without -o first, disregard a.out.
1720 # It will help us diagnose broken compilers, and finding out an intuition
1721 # of exeext.
1722 echo "$as_me:1722: checking for C compiler default output" >&5
1723 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1724 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1725 if { (eval echo "$as_me:1725: \"$ac_link_default\"") >&5
1726   (eval $ac_link_default) 2>&5
1727   ac_status=$?
1728   echo "$as_me:1728: \$? = $ac_status" >&5
1729   (exit $ac_status); }; then
1730   # Find the output, starting from the most likely.  This scheme is
1731 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1732 # resort.
1733 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1734                 ls a.out conftest 2>/dev/null;
1735                 ls a.* conftest.* 2>/dev/null`; do
1736   case $ac_file in
1737     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1738     a.out ) # We found the default executable, but exeext='' is most
1739             # certainly right.
1740             break;;
1741     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1742           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1743           export ac_cv_exeext
1744           break;;
1745     * ) break;;
1746   esac
1747 done
1748 else
1749   echo "$as_me: failed program was:" >&5
1750 cat conftest.$ac_ext >&5
1751 { { echo "$as_me:1751: error: C compiler cannot create executables" >&5
1752 echo "$as_me: error: C compiler cannot create executables" >&2;}
1753    { (exit 77); exit 77; }; }
1754 fi
1755
1756 ac_exeext=$ac_cv_exeext
1757 echo "$as_me:1757: result: $ac_file" >&5
1758 echo "${ECHO_T}$ac_file" >&6
1759
1760 # Check the compiler produces executables we can run.  If not, either
1761 # the compiler is broken, or we cross compile.
1762 echo "$as_me:1762: checking whether the C compiler works" >&5
1763 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1764 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1765 # If not cross compiling, check that we can run a simple program.
1766 if test "$cross_compiling" != yes; then
1767   if { ac_try='./$ac_file'
1768   { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1769   (eval $ac_try) 2>&5
1770   ac_status=$?
1771   echo "$as_me:1771: \$? = $ac_status" >&5
1772   (exit $ac_status); }; }; then
1773     cross_compiling=no
1774   else
1775     if test "$cross_compiling" = maybe; then
1776         cross_compiling=yes
1777     else
1778         { { echo "$as_me:1778: error: cannot run C compiled programs.
1779 If you meant to cross compile, use \`--host'." >&5
1780 echo "$as_me: error: cannot run C compiled programs.
1781 If you meant to cross compile, use \`--host'." >&2;}
1782    { (exit 1); exit 1; }; }
1783     fi
1784   fi
1785 fi
1786 echo "$as_me:1786: result: yes" >&5
1787 echo "${ECHO_T}yes" >&6
1788
1789 rm -f a.out a.exe conftest$ac_cv_exeext
1790 ac_clean_files=$ac_clean_files_save
1791 # Check the compiler produces executables we can run.  If not, either
1792 # the compiler is broken, or we cross compile.
1793 echo "$as_me:1793: checking whether we are cross compiling" >&5
1794 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1795 echo "$as_me:1795: result: $cross_compiling" >&5
1796 echo "${ECHO_T}$cross_compiling" >&6
1797
1798 echo "$as_me:1798: checking for executable suffix" >&5
1799 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1800 if { (eval echo "$as_me:1800: \"$ac_link\"") >&5
1801   (eval $ac_link) 2>&5
1802   ac_status=$?
1803   echo "$as_me:1803: \$? = $ac_status" >&5
1804   (exit $ac_status); }; then
1805   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1806 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1807 # work properly (i.e., refer to `conftest.exe'), while it won't with
1808 # `rm'.
1809 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1810   case $ac_file in
1811     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1812     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1813           export ac_cv_exeext
1814           break;;
1815     * ) break;;
1816   esac
1817 done
1818 else
1819   { { echo "$as_me:1819: error: cannot compute EXEEXT: cannot compile and link" >&5
1820 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1821    { (exit 1); exit 1; }; }
1822 fi
1823
1824 rm -f conftest$ac_cv_exeext
1825 echo "$as_me:1825: result: $ac_cv_exeext" >&5
1826 echo "${ECHO_T}$ac_cv_exeext" >&6
1827
1828 rm -f conftest.$ac_ext
1829 EXEEXT=$ac_cv_exeext
1830 ac_exeext=$EXEEXT
1831 echo "$as_me:1831: checking for object suffix" >&5
1832 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1833 if test "${ac_cv_objext+set}" = set; then
1834   echo $ECHO_N "(cached) $ECHO_C" >&6
1835 else
1836   cat >conftest.$ac_ext <<_ACEOF
1837 #line 1837 "configure"
1838 #include "confdefs.h"
1839
1840 int
1841 main ()
1842 {
1843
1844   ;
1845   return 0;
1846 }
1847 _ACEOF
1848 rm -f conftest.o conftest.obj
1849 if { (eval echo "$as_me:1849: \"$ac_compile\"") >&5
1850   (eval $ac_compile) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; then
1854   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1855   case $ac_file in
1856     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1857     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1858        break;;
1859   esac
1860 done
1861 else
1862   echo "$as_me: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1864 { { echo "$as_me:1864: error: cannot compute OBJEXT: cannot compile" >&5
1865 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1866    { (exit 1); exit 1; }; }
1867 fi
1868
1869 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1870 fi
1871 echo "$as_me:1871: result: $ac_cv_objext" >&5
1872 echo "${ECHO_T}$ac_cv_objext" >&6
1873 OBJEXT=$ac_cv_objext
1874 ac_objext=$OBJEXT
1875 echo "$as_me:1875: checking whether we are using the GNU C compiler" >&5
1876 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1877 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1878   echo $ECHO_N "(cached) $ECHO_C" >&6
1879 else
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883
1884 int
1885 main ()
1886 {
1887 #ifndef __GNUC__
1888        choke me
1889 #endif
1890
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   ac_compiler_gnu=yes
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 ac_compiler_gnu=no
1912 fi
1913 rm -f conftest.$ac_objext conftest.$ac_ext
1914 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1915
1916 fi
1917 echo "$as_me:1917: result: $ac_cv_c_compiler_gnu" >&5
1918 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1919 GCC=`test $ac_compiler_gnu = yes && echo yes`
1920 ac_test_CFLAGS=${CFLAGS+set}
1921 ac_save_CFLAGS=$CFLAGS
1922 CFLAGS="-g"
1923 echo "$as_me:1923: checking whether $CC accepts -g" >&5
1924 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1925 if test "${ac_cv_prog_cc_g+set}" = set; then
1926   echo $ECHO_N "(cached) $ECHO_C" >&6
1927 else
1928   cat >conftest.$ac_ext <<_ACEOF
1929 #line 1929 "configure"
1930 #include "confdefs.h"
1931
1932 int
1933 main ()
1934 {
1935
1936   ;
1937   return 0;
1938 }
1939 _ACEOF
1940 rm -f conftest.$ac_objext
1941 if { (eval echo "$as_me:1941: \"$ac_compile\"") >&5
1942   (eval $ac_compile) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); } &&
1946          { ac_try='test -s conftest.$ac_objext'
1947   { (eval echo "$as_me:1947: \"$ac_try\"") >&5
1948   (eval $ac_try) 2>&5
1949   ac_status=$?
1950   echo "$as_me:1950: \$? = $ac_status" >&5
1951   (exit $ac_status); }; }; then
1952   ac_cv_prog_cc_g=yes
1953 else
1954   echo "$as_me: failed program was:" >&5
1955 cat conftest.$ac_ext >&5
1956 ac_cv_prog_cc_g=no
1957 fi
1958 rm -f conftest.$ac_objext conftest.$ac_ext
1959 fi
1960 echo "$as_me:1960: result: $ac_cv_prog_cc_g" >&5
1961 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1962 if test "$ac_test_CFLAGS" = set; then
1963   CFLAGS=$ac_save_CFLAGS
1964 elif test $ac_cv_prog_cc_g = yes; then
1965   if test "$GCC" = yes; then
1966     CFLAGS="-g -O2"
1967   else
1968     CFLAGS="-g"
1969   fi
1970 else
1971   if test "$GCC" = yes; then
1972     CFLAGS="-O2"
1973   else
1974     CFLAGS=
1975   fi
1976 fi
1977 # Some people use a C++ compiler to compile C.  Since we use `exit',
1978 # in C++ we need to declare it.  In case someone uses the same compiler
1979 # for both compiling C and C++ we need to have the C++ compiler decide
1980 # the declaration of exit, since it's the most demanding environment.
1981 cat >conftest.$ac_ext <<_ACEOF
1982 #ifndef __cplusplus
1983   choke me
1984 #endif
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   for ac_declaration in \
1999    ''\
2000    '#include <stdlib.h>' \
2001    'extern "C" void std::exit (int) throw (); using std::exit;' \
2002    'extern "C" void std::exit (int); using std::exit;' \
2003    'extern "C" void exit (int) throw ();' \
2004    'extern "C" void exit (int);' \
2005    'void exit (int);'
2006 do
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <stdlib.h>
2011 $ac_declaration
2012 int
2013 main ()
2014 {
2015 exit (42);
2016   ;
2017   return 0;
2018 }
2019 _ACEOF
2020 rm -f conftest.$ac_objext
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022   (eval $ac_compile) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); } &&
2026          { ac_try='test -s conftest.$ac_objext'
2027   { (eval echo "$as_me:2027: \"$ac_try\"") >&5
2028   (eval $ac_try) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit $ac_status); }; }; then
2032   :
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 continue
2037 fi
2038 rm -f conftest.$ac_objext conftest.$ac_ext
2039   cat >conftest.$ac_ext <<_ACEOF
2040 #line 2040 "configure"
2041 #include "confdefs.h"
2042 $ac_declaration
2043 int
2044 main ()
2045 {
2046 exit (42);
2047   ;
2048   return 0;
2049 }
2050 _ACEOF
2051 rm -f conftest.$ac_objext
2052 if { (eval echo "$as_me:2052: \"$ac_compile\"") >&5
2053   (eval $ac_compile) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); } &&
2057          { ac_try='test -s conftest.$ac_objext'
2058   { (eval echo "$as_me:2058: \"$ac_try\"") >&5
2059   (eval $ac_try) 2>&5
2060   ac_status=$?
2061   echo "$as_me:2061: \$? = $ac_status" >&5
2062   (exit $ac_status); }; }; then
2063   break
2064 else
2065   echo "$as_me: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2067 fi
2068 rm -f conftest.$ac_objext conftest.$ac_ext
2069 done
2070 rm -f conftest*
2071 if test -n "$ac_declaration"; then
2072   echo '#ifdef __cplusplus' >>confdefs.h
2073   echo $ac_declaration      >>confdefs.h
2074   echo '#endif'             >>confdefs.h
2075 fi
2076
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 ac_ext=c
2083 ac_cpp='$CPP $CPPFLAGS'
2084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2087 ac_main_return=return
2088
2089 GCC_VERSION=none
2090 if test "$GCC" = yes ; then
2091         echo "$as_me:2091: checking version of $CC" >&5
2092 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2093         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2094         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2095         echo "$as_me:2095: result: $GCC_VERSION" >&5
2096 echo "${ECHO_T}$GCC_VERSION" >&6
2097 fi
2098
2099 ac_ext=c
2100 ac_cpp='$CPP $CPPFLAGS'
2101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2104 ac_main_return=return
2105 echo "$as_me:2105: checking how to run the C preprocessor" >&5
2106 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2107 # On Suns, sometimes $CPP names a directory.
2108 if test -n "$CPP" && test -d "$CPP"; then
2109   CPP=
2110 fi
2111 if test -z "$CPP"; then
2112   if test "${ac_cv_prog_CPP+set}" = set; then
2113   echo $ECHO_N "(cached) $ECHO_C" >&6
2114 else
2115       # Double quotes because CPP needs to be expanded
2116     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2117     do
2118       ac_preproc_ok=false
2119 for ac_c_preproc_warn_flag in '' yes
2120 do
2121   # Use a header file that comes with gcc, so configuring glibc
2122   # with a fresh cross-compiler works.
2123   # On the NeXT, cc -E runs the code through the compiler's parser,
2124   # not just through cpp. "Syntax error" is here to catch this case.
2125   cat >conftest.$ac_ext <<_ACEOF
2126 #line 2126 "configure"
2127 #include "confdefs.h"
2128 #include <assert.h>
2129                      Syntax error
2130 _ACEOF
2131 if { (eval echo "$as_me:2131: \"$ac_cpp conftest.$ac_ext\"") >&5
2132   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2133   ac_status=$?
2134   egrep -v '^ *\+' conftest.er1 >conftest.err
2135   rm -f conftest.er1
2136   cat conftest.err >&5
2137   echo "$as_me:2137: \$? = $ac_status" >&5
2138   (exit $ac_status); } >/dev/null; then
2139   if test -s conftest.err; then
2140     ac_cpp_err=$ac_c_preproc_warn_flag
2141   else
2142     ac_cpp_err=
2143   fi
2144 else
2145   ac_cpp_err=yes
2146 fi
2147 if test -z "$ac_cpp_err"; then
2148   :
2149 else
2150   echo "$as_me: failed program was:" >&5
2151   cat conftest.$ac_ext >&5
2152   # Broken: fails on valid input.
2153 continue
2154 fi
2155 rm -f conftest.err conftest.$ac_ext
2156
2157   # OK, works on sane cases.  Now check whether non-existent headers
2158   # can be detected and how.
2159   cat >conftest.$ac_ext <<_ACEOF
2160 #line 2160 "configure"
2161 #include "confdefs.h"
2162 #include <ac_nonexistent.h>
2163 _ACEOF
2164 if { (eval echo "$as_me:2164: \"$ac_cpp conftest.$ac_ext\"") >&5
2165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2166   ac_status=$?
2167   egrep -v '^ *\+' conftest.er1 >conftest.err
2168   rm -f conftest.er1
2169   cat conftest.err >&5
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit $ac_status); } >/dev/null; then
2172   if test -s conftest.err; then
2173     ac_cpp_err=$ac_c_preproc_warn_flag
2174   else
2175     ac_cpp_err=
2176   fi
2177 else
2178   ac_cpp_err=yes
2179 fi
2180 if test -z "$ac_cpp_err"; then
2181   # Broken: success on invalid input.
2182 continue
2183 else
2184   echo "$as_me: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   # Passes both tests.
2187 ac_preproc_ok=:
2188 break
2189 fi
2190 rm -f conftest.err conftest.$ac_ext
2191
2192 done
2193 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2194 rm -f conftest.err conftest.$ac_ext
2195 if $ac_preproc_ok; then
2196   break
2197 fi
2198
2199     done
2200     ac_cv_prog_CPP=$CPP
2201
2202 fi
2203   CPP=$ac_cv_prog_CPP
2204 else
2205   ac_cv_prog_CPP=$CPP
2206 fi
2207 echo "$as_me:2207: result: $CPP" >&5
2208 echo "${ECHO_T}$CPP" >&6
2209 ac_preproc_ok=false
2210 for ac_c_preproc_warn_flag in '' yes
2211 do
2212   # Use a header file that comes with gcc, so configuring glibc
2213   # with a fresh cross-compiler works.
2214   # On the NeXT, cc -E runs the code through the compiler's parser,
2215   # not just through cpp. "Syntax error" is here to catch this case.
2216   cat >conftest.$ac_ext <<_ACEOF
2217 #line 2217 "configure"
2218 #include "confdefs.h"
2219 #include <assert.h>
2220                      Syntax error
2221 _ACEOF
2222 if { (eval echo "$as_me:2222: \"$ac_cpp conftest.$ac_ext\"") >&5
2223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2224   ac_status=$?
2225   egrep -v '^ *\+' conftest.er1 >conftest.err
2226   rm -f conftest.er1
2227   cat conftest.err >&5
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit $ac_status); } >/dev/null; then
2230   if test -s conftest.err; then
2231     ac_cpp_err=$ac_c_preproc_warn_flag
2232   else
2233     ac_cpp_err=
2234   fi
2235 else
2236   ac_cpp_err=yes
2237 fi
2238 if test -z "$ac_cpp_err"; then
2239   :
2240 else
2241   echo "$as_me: failed program was:" >&5
2242   cat conftest.$ac_ext >&5
2243   # Broken: fails on valid input.
2244 continue
2245 fi
2246 rm -f conftest.err conftest.$ac_ext
2247
2248   # OK, works on sane cases.  Now check whether non-existent headers
2249   # can be detected and how.
2250   cat >conftest.$ac_ext <<_ACEOF
2251 #line 2251 "configure"
2252 #include "confdefs.h"
2253 #include <ac_nonexistent.h>
2254 _ACEOF
2255 if { (eval echo "$as_me:2255: \"$ac_cpp conftest.$ac_ext\"") >&5
2256   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2257   ac_status=$?
2258   egrep -v '^ *\+' conftest.er1 >conftest.err
2259   rm -f conftest.er1
2260   cat conftest.err >&5
2261   echo "$as_me:2261: \$? = $ac_status" >&5
2262   (exit $ac_status); } >/dev/null; then
2263   if test -s conftest.err; then
2264     ac_cpp_err=$ac_c_preproc_warn_flag
2265   else
2266     ac_cpp_err=
2267   fi
2268 else
2269   ac_cpp_err=yes
2270 fi
2271 if test -z "$ac_cpp_err"; then
2272   # Broken: success on invalid input.
2273 continue
2274 else
2275   echo "$as_me: failed program was:" >&5
2276   cat conftest.$ac_ext >&5
2277   # Passes both tests.
2278 ac_preproc_ok=:
2279 break
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283 done
2284 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2285 rm -f conftest.err conftest.$ac_ext
2286 if $ac_preproc_ok; then
2287   :
2288 else
2289   { { echo "$as_me:2289: error: C preprocessor \"$CPP\" fails sanity check" >&5
2290 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2291    { (exit 1); exit 1; }; }
2292 fi
2293
2294 ac_ext=c
2295 ac_cpp='$CPP $CPPFLAGS'
2296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2299 ac_main_return=return
2300
2301 if test $ac_cv_c_compiler_gnu = yes; then
2302     echo "$as_me:2302: checking whether $CC needs -traditional" >&5
2303 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2304 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2305   echo $ECHO_N "(cached) $ECHO_C" >&6
2306 else
2307     ac_pattern="Autoconf.*'x'"
2308   cat >conftest.$ac_ext <<_ACEOF
2309 #line 2309 "configure"
2310 #include "confdefs.h"
2311 #include <sgtty.h>
2312 int Autoconf = TIOCGETP;
2313 _ACEOF
2314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2315   egrep "$ac_pattern" >/dev/null 2>&1; then
2316   ac_cv_prog_gcc_traditional=yes
2317 else
2318   ac_cv_prog_gcc_traditional=no
2319 fi
2320 rm -f conftest*
2321
2322   if test $ac_cv_prog_gcc_traditional = no; then
2323     cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <termio.h>
2327 int Autoconf = TCGETA;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 fi
2333 rm -f conftest*
2334
2335   fi
2336 fi
2337 echo "$as_me:2337: result: $ac_cv_prog_gcc_traditional" >&5
2338 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2339   if test $ac_cv_prog_gcc_traditional = yes; then
2340     CC="$CC -traditional"
2341   fi
2342 fi
2343
2344 echo "$as_me:2344: checking whether $CC understands -c and -o together" >&5
2345 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2346 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2347   echo $ECHO_N "(cached) $ECHO_C" >&6
2348 else
2349
2350 cat > conftest.$ac_ext <<CF_EOF
2351 #include <stdio.h>
2352 int main()
2353 {
2354         ${cf_cv_main_return:-return}(0);
2355 }
2356 CF_EOF
2357 # We do the test twice because some compilers refuse to overwrite an
2358 # existing .o file with -o, though they will create one.
2359 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2360 if { (eval echo "$as_me:2360: \"$ac_try\"") >&5
2361   (eval $ac_try) 2>&5
2362   ac_status=$?
2363   echo "$as_me:2363: \$? = $ac_status" >&5
2364   (exit $ac_status); } &&
2365   test -f conftest2.$ac_objext && { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366   (eval $ac_try) 2>&5
2367   ac_status=$?
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit $ac_status); };
2370 then
2371   eval cf_cv_prog_CC_c_o=yes
2372 else
2373   eval cf_cv_prog_CC_c_o=no
2374 fi
2375 rm -f conftest*
2376
2377 fi
2378 if test $cf_cv_prog_CC_c_o = yes; then
2379   echo "$as_me:2379: result: yes" >&5
2380 echo "${ECHO_T}yes" >&6
2381 else
2382   echo "$as_me:2382: result: no" >&5
2383 echo "${ECHO_T}no" >&6
2384 fi
2385
2386 echo "$as_me:2386: checking for POSIXized ISC" >&5
2387 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2388 if test -d /etc/conf/kconfig.d &&
2389    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2390 then
2391   echo "$as_me:2391: result: yes" >&5
2392 echo "${ECHO_T}yes" >&6
2393   ISC=yes # If later tests want to check for ISC.
2394
2395 cat >>confdefs.h <<\EOF
2396 #define _POSIX_SOURCE 1
2397 EOF
2398
2399   if test "$GCC" = yes; then
2400     CC="$CC -posix"
2401   else
2402     CC="$CC -Xp"
2403   fi
2404 else
2405   echo "$as_me:2405: result: no" >&5
2406 echo "${ECHO_T}no" >&6
2407   ISC=
2408 fi
2409
2410 echo "$as_me:2410: checking for ${CC-cc} option to accept ANSI C" >&5
2411 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2412 if test "${cf_cv_ansi_cc+set}" = set; then
2413   echo $ECHO_N "(cached) $ECHO_C" >&6
2414 else
2415
2416 cf_cv_ansi_cc=no
2417 cf_save_CFLAGS="$CFLAGS"
2418 cf_save_CPPFLAGS="$CPPFLAGS"
2419 # Don't try gcc -ansi; that turns off useful extensions and
2420 # breaks some systems' header files.
2421 # AIX                   -qlanglvl=ansi
2422 # Ultrix and OSF/1      -std1
2423 # HP-UX                 -Aa -D_HPUX_SOURCE
2424 # SVR4                  -Xc
2425 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2426 for cf_arg in "-DCC_HAS_PROTOS" \
2427         "" \
2428         -qlanglvl=ansi \
2429         -std1 \
2430         -Ae \
2431         "-Aa -D_HPUX_SOURCE" \
2432         -Xc
2433 do
2434
2435 cf_fix_cppflags=no
2436 cf_new_cflags=
2437 cf_new_cppflags=
2438 cf_new_extra_cppflags=
2439
2440 for cf_add_cflags in $cf_arg
2441 do
2442 case $cf_fix_cppflags in
2443 no)
2444         case $cf_add_cflags in #(vi
2445         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2446                 case $cf_add_cflags in
2447                 -D*)
2448                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2449
2450                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2451                         && test -z "${cf_tst_cflags}" \
2452                         && cf_fix_cppflags=yes
2453
2454                         if test $cf_fix_cppflags = yes ; then
2455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2456                                 continue
2457                         elif test "${cf_tst_cflags}" = "\"'" ; then
2458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2459                                 continue
2460                         fi
2461                         ;;
2462                 esac
2463                 case "$CPPFLAGS" in
2464                 *$cf_add_cflags) #(vi
2465                         ;;
2466                 *) #(vi
2467                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2468                         ;;
2469                 esac
2470                 ;;
2471         *)
2472                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2473                 ;;
2474         esac
2475         ;;
2476 yes)
2477         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2478
2479         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2480
2481         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2482         && test -z "${cf_tst_cflags}" \
2483         && cf_fix_cppflags=no
2484         ;;
2485 esac
2486 done
2487
2488 if test -n "$cf_new_cflags" ; then
2489
2490         CFLAGS="$CFLAGS $cf_new_cflags"
2491 fi
2492
2493 if test -n "$cf_new_cppflags" ; then
2494
2495         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2496 fi
2497
2498 if test -n "$cf_new_extra_cppflags" ; then
2499
2500         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2501 fi
2502
2503         cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506
2507 #ifndef CC_HAS_PROTOS
2508 #if !defined(__STDC__) || (__STDC__ != 1)
2509 choke me
2510 #endif
2511 #endif
2512
2513 int
2514 main ()
2515 {
2516
2517         int test (int i, double x);
2518         struct s1 {int (*f) (int a);};
2519         struct s2 {int (*f) (double a);};
2520   ;
2521   return 0;
2522 }
2523 _ACEOF
2524 rm -f conftest.$ac_objext
2525 if { (eval echo "$as_me:2525: \"$ac_compile\"") >&5
2526   (eval $ac_compile) 2>&5
2527   ac_status=$?
2528   echo "$as_me:2528: \$? = $ac_status" >&5
2529   (exit $ac_status); } &&
2530          { ac_try='test -s conftest.$ac_objext'
2531   { (eval echo "$as_me:2531: \"$ac_try\"") >&5
2532   (eval $ac_try) 2>&5
2533   ac_status=$?
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit $ac_status); }; }; then
2536   cf_cv_ansi_cc="$cf_arg"; break
2537 else
2538   echo "$as_me: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 fi
2541 rm -f conftest.$ac_objext conftest.$ac_ext
2542 done
2543 CFLAGS="$cf_save_CFLAGS"
2544 CPPFLAGS="$cf_save_CPPFLAGS"
2545
2546 fi
2547 echo "$as_me:2547: result: $cf_cv_ansi_cc" >&5
2548 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2549
2550 if test "$cf_cv_ansi_cc" != "no"; then
2551 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2552
2553 cf_fix_cppflags=no
2554 cf_new_cflags=
2555 cf_new_cppflags=
2556 cf_new_extra_cppflags=
2557
2558 for cf_add_cflags in $cf_cv_ansi_cc
2559 do
2560 case $cf_fix_cppflags in
2561 no)
2562         case $cf_add_cflags in #(vi
2563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2564                 case $cf_add_cflags in
2565                 -D*)
2566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2567
2568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2569                         && test -z "${cf_tst_cflags}" \
2570                         && cf_fix_cppflags=yes
2571
2572                         if test $cf_fix_cppflags = yes ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         elif test "${cf_tst_cflags}" = "\"'" ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         fi
2579                         ;;
2580                 esac
2581                 case "$CPPFLAGS" in
2582                 *$cf_add_cflags) #(vi
2583                         ;;
2584                 *) #(vi
2585                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2586                         ;;
2587                 esac
2588                 ;;
2589         *)
2590                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2591                 ;;
2592         esac
2593         ;;
2594 yes)
2595         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2596
2597         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2598
2599         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2600         && test -z "${cf_tst_cflags}" \
2601         && cf_fix_cppflags=no
2602         ;;
2603 esac
2604 done
2605
2606 if test -n "$cf_new_cflags" ; then
2607
2608         CFLAGS="$CFLAGS $cf_new_cflags"
2609 fi
2610
2611 if test -n "$cf_new_cppflags" ; then
2612
2613         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2614 fi
2615
2616 if test -n "$cf_new_extra_cppflags" ; then
2617
2618         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2619 fi
2620
2621 else
2622         cat >>confdefs.h <<\EOF
2623 #define CC_HAS_PROTOS 1
2624 EOF
2625
2626 fi
2627 fi
2628
2629 if test "$cf_cv_ansi_cc" = "no"; then
2630         { { echo "$as_me:2630: error: Your compiler does not appear to recognize prototypes.
2631 You have the following choices:
2632         a. adjust your compiler options
2633         b. get an up-to-date compiler
2634         c. use a wrapper such as unproto" >&5
2635 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2636 You have the following choices:
2637         a. adjust your compiler options
2638         b. get an up-to-date compiler
2639         c. use a wrapper such as unproto" >&2;}
2640    { (exit 1); exit 1; }; }
2641 fi
2642
2643 case $cf_cv_system_name in
2644 os2*)
2645     CFLAGS="$CFLAGS -Zmt"
2646     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2647     CXXFLAGS="$CXXFLAGS -Zmt"
2648     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2649     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2650     ac_cv_exeext=.exe
2651     ;;
2652 esac
2653
2654 PROG_EXT="$EXEEXT"
2655
2656 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2657 #define PROG_EXT "$PROG_EXT"
2658 EOF
2659
2660 if test "$cross_compiling" = yes ; then
2661   LDCONFIG=:
2662 else
2663 case "$cf_cv_system_name" in #(vi
2664 freebsd*) #(vi
2665   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2666   ;;
2667 *) LDPATH=$PATH:/sbin:/usr/sbin
2668   # Extract the first word of "ldconfig", so it can be a program name with args.
2669 set dummy ldconfig; ac_word=$2
2670 echo "$as_me:2670: checking for $ac_word" >&5
2671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2672 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2673   echo $ECHO_N "(cached) $ECHO_C" >&6
2674 else
2675   case $LDCONFIG in
2676   [\\/]* | ?:[\\/]*)
2677   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2678   ;;
2679   *)
2680   ac_save_IFS=$IFS; IFS=$ac_path_separator
2681 ac_dummy="$LDPATH"
2682 for ac_dir in $ac_dummy; do
2683   IFS=$ac_save_IFS
2684   test -z "$ac_dir" && ac_dir=.
2685   if $as_executable_p "$ac_dir/$ac_word"; then
2686    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2687    echo "$as_me:2687: found $ac_dir/$ac_word" >&5
2688    break
2689 fi
2690 done
2691
2692   ;;
2693 esac
2694 fi
2695 LDCONFIG=$ac_cv_path_LDCONFIG
2696
2697 if test -n "$LDCONFIG"; then
2698   echo "$as_me:2698: result: $LDCONFIG" >&5
2699 echo "${ECHO_T}$LDCONFIG" >&6
2700 else
2701   echo "$as_me:2701: result: no" >&5
2702 echo "${ECHO_T}no" >&6
2703 fi
2704
2705   ;;
2706 esac
2707 fi
2708
2709 echo "$as_me:2709: checking if you want to ensure bool is consistent with C++" >&5
2710 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2711
2712 # Check whether --with-cxx or --without-cxx was given.
2713 if test "${with_cxx+set}" = set; then
2714   withval="$with_cxx"
2715   cf_with_cxx=$withval
2716 else
2717   cf_with_cxx=yes
2718 fi;
2719 echo "$as_me:2719: result: $cf_with_cxx" >&5
2720 echo "${ECHO_T}$cf_with_cxx" >&6
2721 if test "X$cf_with_cxx" = Xno ; then
2722         CXX=""
2723         GXX=""
2724 else
2725         # with autoconf 2.13, we can change the error to a warning:
2726                 ac_ext=cc
2727 ac_cpp='$CXXCPP $CPPFLAGS'
2728 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2731 ac_main_return=return
2732 if test -n "$ac_tool_prefix"; then
2733   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2734   do
2735     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2736 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2737 echo "$as_me:2737: checking for $ac_word" >&5
2738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2739 if test "${ac_cv_prog_CXX+set}" = set; then
2740   echo $ECHO_N "(cached) $ECHO_C" >&6
2741 else
2742   if test -n "$CXX"; then
2743   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2744 else
2745   ac_save_IFS=$IFS; IFS=$ac_path_separator
2746 ac_dummy="$PATH"
2747 for ac_dir in $ac_dummy; do
2748   IFS=$ac_save_IFS
2749   test -z "$ac_dir" && ac_dir=.
2750   $as_executable_p "$ac_dir/$ac_word" || continue
2751 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2752 echo "$as_me:2752: found $ac_dir/$ac_word" >&5
2753 break
2754 done
2755
2756 fi
2757 fi
2758 CXX=$ac_cv_prog_CXX
2759 if test -n "$CXX"; then
2760   echo "$as_me:2760: result: $CXX" >&5
2761 echo "${ECHO_T}$CXX" >&6
2762 else
2763   echo "$as_me:2763: result: no" >&5
2764 echo "${ECHO_T}no" >&6
2765 fi
2766
2767     test -n "$CXX" && break
2768   done
2769 fi
2770 if test -z "$CXX"; then
2771   ac_ct_CXX=$CXX
2772   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2773 do
2774   # Extract the first word of "$ac_prog", so it can be a program name with args.
2775 set dummy $ac_prog; ac_word=$2
2776 echo "$as_me:2776: checking for $ac_word" >&5
2777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2778 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2779   echo $ECHO_N "(cached) $ECHO_C" >&6
2780 else
2781   if test -n "$ac_ct_CXX"; then
2782   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2783 else
2784   ac_save_IFS=$IFS; IFS=$ac_path_separator
2785 ac_dummy="$PATH"
2786 for ac_dir in $ac_dummy; do
2787   IFS=$ac_save_IFS
2788   test -z "$ac_dir" && ac_dir=.
2789   $as_executable_p "$ac_dir/$ac_word" || continue
2790 ac_cv_prog_ac_ct_CXX="$ac_prog"
2791 echo "$as_me:2791: found $ac_dir/$ac_word" >&5
2792 break
2793 done
2794
2795 fi
2796 fi
2797 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2798 if test -n "$ac_ct_CXX"; then
2799   echo "$as_me:2799: result: $ac_ct_CXX" >&5
2800 echo "${ECHO_T}$ac_ct_CXX" >&6
2801 else
2802   echo "$as_me:2802: result: no" >&5
2803 echo "${ECHO_T}no" >&6
2804 fi
2805
2806   test -n "$ac_ct_CXX" && break
2807 done
2808 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2809
2810   CXX=$ac_ct_CXX
2811 fi
2812
2813 # Provide some information about the compiler.
2814 echo "$as_me:2814:" \
2815      "checking for C++ compiler version" >&5
2816 ac_compiler=`set X $ac_compile; echo $2`
2817 { (eval echo "$as_me:2817: \"$ac_compiler --version </dev/null >&5\"") >&5
2818   (eval $ac_compiler --version </dev/null >&5) 2>&5
2819   ac_status=$?
2820   echo "$as_me:2820: \$? = $ac_status" >&5
2821   (exit $ac_status); }
2822 { (eval echo "$as_me:2822: \"$ac_compiler -v </dev/null >&5\"") >&5
2823   (eval $ac_compiler -v </dev/null >&5) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }
2827 { (eval echo "$as_me:2827: \"$ac_compiler -V </dev/null >&5\"") >&5
2828   (eval $ac_compiler -V </dev/null >&5) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); }
2832
2833 echo "$as_me:2833: checking whether we are using the GNU C++ compiler" >&5
2834 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2835 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2836   echo $ECHO_N "(cached) $ECHO_C" >&6
2837 else
2838   cat >conftest.$ac_ext <<_ACEOF
2839 #line 2839 "configure"
2840 #include "confdefs.h"
2841
2842 int
2843 main ()
2844 {
2845 #ifndef __GNUC__
2846        choke me
2847 #endif
2848
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 rm -f conftest.$ac_objext
2854 if { (eval echo "$as_me:2854: \"$ac_compile\"") >&5
2855   (eval $ac_compile) 2>&5
2856   ac_status=$?
2857   echo "$as_me:2857: \$? = $ac_status" >&5
2858   (exit $ac_status); } &&
2859          { ac_try='test -s conftest.$ac_objext'
2860   { (eval echo "$as_me:2860: \"$ac_try\"") >&5
2861   (eval $ac_try) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); }; }; then
2865   ac_compiler_gnu=yes
2866 else
2867   echo "$as_me: failed program was:" >&5
2868 cat conftest.$ac_ext >&5
2869 ac_compiler_gnu=no
2870 fi
2871 rm -f conftest.$ac_objext conftest.$ac_ext
2872 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2873
2874 fi
2875 echo "$as_me:2875: result: $ac_cv_cxx_compiler_gnu" >&5
2876 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2877 GXX=`test $ac_compiler_gnu = yes && echo yes`
2878 ac_test_CXXFLAGS=${CXXFLAGS+set}
2879 ac_save_CXXFLAGS=$CXXFLAGS
2880 CXXFLAGS="-g"
2881 echo "$as_me:2881: checking whether $CXX accepts -g" >&5
2882 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2883 if test "${ac_cv_prog_cxx_g+set}" = set; then
2884   echo $ECHO_N "(cached) $ECHO_C" >&6
2885 else
2886   cat >conftest.$ac_ext <<_ACEOF
2887 #line 2887 "configure"
2888 #include "confdefs.h"
2889
2890 int
2891 main ()
2892 {
2893
2894   ;
2895   return 0;
2896 }
2897 _ACEOF
2898 rm -f conftest.$ac_objext
2899 if { (eval echo "$as_me:2899: \"$ac_compile\"") >&5
2900   (eval $ac_compile) 2>&5
2901   ac_status=$?
2902   echo "$as_me:2902: \$? = $ac_status" >&5
2903   (exit $ac_status); } &&
2904          { ac_try='test -s conftest.$ac_objext'
2905   { (eval echo "$as_me:2905: \"$ac_try\"") >&5
2906   (eval $ac_try) 2>&5
2907   ac_status=$?
2908   echo "$as_me:2908: \$? = $ac_status" >&5
2909   (exit $ac_status); }; }; then
2910   ac_cv_prog_cxx_g=yes
2911 else
2912   echo "$as_me: failed program was:" >&5
2913 cat conftest.$ac_ext >&5
2914 ac_cv_prog_cxx_g=no
2915 fi
2916 rm -f conftest.$ac_objext conftest.$ac_ext
2917 fi
2918 echo "$as_me:2918: result: $ac_cv_prog_cxx_g" >&5
2919 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2920 if test "$ac_test_CXXFLAGS" = set; then
2921   CXXFLAGS=$ac_save_CXXFLAGS
2922 elif test $ac_cv_prog_cxx_g = yes; then
2923   if test "$GXX" = yes; then
2924     CXXFLAGS="-g -O2"
2925   else
2926     CXXFLAGS="-g"
2927   fi
2928 else
2929   if test "$GXX" = yes; then
2930     CXXFLAGS="-O2"
2931   else
2932     CXXFLAGS=
2933   fi
2934 fi
2935 for ac_declaration in \
2936    ''\
2937    '#include <stdlib.h>' \
2938    'extern "C" void std::exit (int) throw (); using std::exit;' \
2939    'extern "C" void std::exit (int); using std::exit;' \
2940    'extern "C" void exit (int) throw ();' \
2941    'extern "C" void exit (int);' \
2942    'void exit (int);'
2943 do
2944   cat >conftest.$ac_ext <<_ACEOF
2945 #line 2945 "configure"
2946 #include "confdefs.h"
2947 #include <stdlib.h>
2948 $ac_declaration
2949 int
2950 main ()
2951 {
2952 exit (42);
2953   ;
2954   return 0;
2955 }
2956 _ACEOF
2957 rm -f conftest.$ac_objext
2958 if { (eval echo "$as_me:2958: \"$ac_compile\"") >&5
2959   (eval $ac_compile) 2>&5
2960   ac_status=$?
2961   echo "$as_me:2961: \$? = $ac_status" >&5
2962   (exit $ac_status); } &&
2963          { ac_try='test -s conftest.$ac_objext'
2964   { (eval echo "$as_me:2964: \"$ac_try\"") >&5
2965   (eval $ac_try) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); }; }; then
2969   :
2970 else
2971   echo "$as_me: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
2973 continue
2974 fi
2975 rm -f conftest.$ac_objext conftest.$ac_ext
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979 $ac_declaration
2980 int
2981 main ()
2982 {
2983 exit (42);
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   break
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006 done
3007 rm -f conftest*
3008 if test -n "$ac_declaration"; then
3009   echo '#ifdef __cplusplus' >>confdefs.h
3010   echo $ac_declaration      >>confdefs.h
3011   echo '#endif'             >>confdefs.h
3012 fi
3013
3014 ac_ext=c
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019 ac_main_return=return
3020
3021                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3022         if test "$CXX" = "g++" ; then
3023                 # Extract the first word of "g++", so it can be a program name with args.
3024 set dummy g++; ac_word=$2
3025 echo "$as_me:3025: checking for $ac_word" >&5
3026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3027 if test "${ac_cv_path_CXX+set}" = set; then
3028   echo $ECHO_N "(cached) $ECHO_C" >&6
3029 else
3030   case $CXX in
3031   [\\/]* | ?:[\\/]*)
3032   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3033   ;;
3034   *)
3035   ac_save_IFS=$IFS; IFS=$ac_path_separator
3036 ac_dummy="$PATH"
3037 for ac_dir in $ac_dummy; do
3038   IFS=$ac_save_IFS
3039   test -z "$ac_dir" && ac_dir=.
3040   if $as_executable_p "$ac_dir/$ac_word"; then
3041    ac_cv_path_CXX="$ac_dir/$ac_word"
3042    echo "$as_me:3042: found $ac_dir/$ac_word" >&5
3043    break
3044 fi
3045 done
3046
3047   ;;
3048 esac
3049 fi
3050 CXX=$ac_cv_path_CXX
3051
3052 if test -n "$CXX"; then
3053   echo "$as_me:3053: result: $CXX" >&5
3054 echo "${ECHO_T}$CXX" >&6
3055 else
3056   echo "$as_me:3056: result: no" >&5
3057 echo "${ECHO_T}no" >&6
3058 fi
3059
3060         fi
3061         if test "$CXX" = "g++" ; then
3062                 { echo "$as_me:3062: WARNING: ignoring hardcoded g++" >&5
3063 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3064                 cf_with_cxx=no; CXX=""; GXX="";
3065         fi
3066 fi
3067
3068 GXX_VERSION=none
3069 if test "$GXX" = yes; then
3070         echo "$as_me:3070: checking version of g++" >&5
3071 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3072         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3073         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3074         echo "$as_me:3074: result: $GXX_VERSION" >&5
3075 echo "${ECHO_T}$GXX_VERSION" >&6
3076 fi
3077
3078 case $GXX_VERSION in
3079 1*|2.[0-6]*)
3080         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3081         # cf_cxx_library=no
3082         { echo "$as_me:3082: WARNING: templates do not work" >&5
3083 echo "$as_me: WARNING: templates do not work" >&2;}
3084         ;;
3085 esac
3086
3087 echo "$as_me:3087: checking if you want to build C++ binding and demo" >&5
3088 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3089
3090 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3091 if test "${with_cxx_binding+set}" = set; then
3092   withval="$with_cxx_binding"
3093   cf_with_cxx_binding=$withval
3094 else
3095   cf_with_cxx_binding=$cf_with_cxx
3096 fi;
3097 echo "$as_me:3097: result: $cf_with_cxx_binding" >&5
3098 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3099
3100 echo "$as_me:3100: checking if you want to build with Ada95" >&5
3101 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3102
3103 # Check whether --with-ada or --without-ada was given.
3104 if test "${with_ada+set}" = set; then
3105   withval="$with_ada"
3106   cf_with_ada=$withval
3107 else
3108   cf_with_ada=yes
3109 fi;
3110 echo "$as_me:3110: result: $cf_with_ada" >&5
3111 echo "${ECHO_T}$cf_with_ada" >&6
3112
3113 echo "$as_me:3113: checking if you want to build programs such as tic" >&5
3114 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3115
3116 # Check whether --with-progs or --without-progs was given.
3117 if test "${with_progs+set}" = set; then
3118   withval="$with_progs"
3119   cf_with_progs=$withval
3120 else
3121   cf_with_progs=yes
3122 fi;
3123 echo "$as_me:3123: result: $cf_with_progs" >&5
3124 echo "${ECHO_T}$cf_with_progs" >&6
3125
3126 echo "$as_me:3126: checking if you wish to install curses.h" >&5
3127 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3128
3129 # Check whether --with-curses-h or --without-curses-h was given.
3130 if test "${with_curses_h+set}" = set; then
3131   withval="$with_curses_h"
3132   with_curses_h=$withval
3133 else
3134   with_curses_h=yes
3135 fi;
3136 echo "$as_me:3136: result: $with_curses_h" >&5
3137 echo "${ECHO_T}$with_curses_h" >&6
3138
3139 modules_to_build="ncurses"
3140 if test "X$cf_with_progs" != Xno ; then
3141 modules_to_build="$modules_to_build progs tack"
3142 fi
3143 modules_to_build="$modules_to_build panel menu form"
3144
3145 test "$program_prefix" != NONE &&
3146   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3147 # Use a double $ so make ignores it.
3148 test "$program_suffix" != NONE &&
3149   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3150 # Double any \ or $.  echo might interpret backslashes.
3151 # By default was `s,x,x', remove it if useless.
3152 cat <<\_ACEOF >conftest.sed
3153 s/[\\$]/&&/g;s/;s,x,x,$//
3154 _ACEOF
3155 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3156 rm conftest.sed
3157
3158 for ac_prog in mawk gawk nawk awk
3159 do
3160   # Extract the first word of "$ac_prog", so it can be a program name with args.
3161 set dummy $ac_prog; ac_word=$2
3162 echo "$as_me:3162: checking for $ac_word" >&5
3163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3164 if test "${ac_cv_prog_AWK+set}" = set; then
3165   echo $ECHO_N "(cached) $ECHO_C" >&6
3166 else
3167   if test -n "$AWK"; then
3168   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3169 else
3170   ac_save_IFS=$IFS; IFS=$ac_path_separator
3171 ac_dummy="$PATH"
3172 for ac_dir in $ac_dummy; do
3173   IFS=$ac_save_IFS
3174   test -z "$ac_dir" && ac_dir=.
3175   $as_executable_p "$ac_dir/$ac_word" || continue
3176 ac_cv_prog_AWK="$ac_prog"
3177 echo "$as_me:3177: found $ac_dir/$ac_word" >&5
3178 break
3179 done
3180
3181 fi
3182 fi
3183 AWK=$ac_cv_prog_AWK
3184 if test -n "$AWK"; then
3185   echo "$as_me:3185: result: $AWK" >&5
3186 echo "${ECHO_T}$AWK" >&6
3187 else
3188   echo "$as_me:3188: result: no" >&5
3189 echo "${ECHO_T}no" >&6
3190 fi
3191
3192   test -n "$AWK" && break
3193 done
3194
3195 test -z "$AWK" && { { echo "$as_me:3195: error: No awk program found" >&5
3196 echo "$as_me: error: No awk program found" >&2;}
3197    { (exit 1); exit 1; }; }
3198
3199 echo "$as_me:3199: checking for egrep" >&5
3200 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3201 if test "${ac_cv_prog_egrep+set}" = set; then
3202   echo $ECHO_N "(cached) $ECHO_C" >&6
3203 else
3204   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3205     then ac_cv_prog_egrep='grep -E'
3206     else ac_cv_prog_egrep='egrep'
3207     fi
3208 fi
3209 echo "$as_me:3209: result: $ac_cv_prog_egrep" >&5
3210 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3211  EGREP=$ac_cv_prog_egrep
3212
3213 test -z "$EGREP" && { { echo "$as_me:3213: error: No egrep program found" >&5
3214 echo "$as_me: error: No egrep program found" >&2;}
3215    { (exit 1); exit 1; }; }
3216
3217 # Find a good install program.  We prefer a C program (faster),
3218 # so one script is as good as another.  But avoid the broken or
3219 # incompatible versions:
3220 # SysV /etc/install, /usr/sbin/install
3221 # SunOS /usr/etc/install
3222 # IRIX /sbin/install
3223 # AIX /bin/install
3224 # AmigaOS /C/install, which installs bootblocks on floppy discs
3225 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3226 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3227 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3228 # ./install, which can be erroneously created by make from ./install.sh.
3229 echo "$as_me:3229: checking for a BSD compatible install" >&5
3230 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3231 if test -z "$INSTALL"; then
3232 if test "${ac_cv_path_install+set}" = set; then
3233   echo $ECHO_N "(cached) $ECHO_C" >&6
3234 else
3235     ac_save_IFS=$IFS; IFS=$ac_path_separator
3236   for ac_dir in $PATH; do
3237     IFS=$ac_save_IFS
3238     # Account for people who put trailing slashes in PATH elements.
3239     case $ac_dir/ in
3240     / | ./ | .// | /cC/* \
3241     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3242     | /usr/ucb/* ) ;;
3243     *)
3244       # OSF1 and SCO ODT 3.0 have their own names for install.
3245       # Don't use installbsd from OSF since it installs stuff as root
3246       # by default.
3247       for ac_prog in ginstall scoinst install; do
3248         if $as_executable_p "$ac_dir/$ac_prog"; then
3249           if test $ac_prog = install &&
3250             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3251             # AIX install.  It has an incompatible calling convention.
3252             :
3253           elif test $ac_prog = install &&
3254             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3255             # program-specific install script used by HP pwplus--don't use.
3256             :
3257           else
3258             ac_cv_path_install="$ac_dir/$ac_prog -c"
3259             break 2
3260           fi
3261         fi
3262       done
3263       ;;
3264     esac
3265   done
3266
3267 fi
3268   if test "${ac_cv_path_install+set}" = set; then
3269     INSTALL=$ac_cv_path_install
3270   else
3271     # As a last resort, use the slow shell script.  We don't cache a
3272     # path for INSTALL within a source directory, because that will
3273     # break other packages using the cache if that directory is
3274     # removed, or if the path is relative.
3275     INSTALL=$ac_install_sh
3276   fi
3277 fi
3278 echo "$as_me:3278: result: $INSTALL" >&5
3279 echo "${ECHO_T}$INSTALL" >&6
3280
3281 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3282 # It thinks the first close brace ends the variable substitution.
3283 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3284
3285 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3286
3287 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3288
3289 case $INSTALL in
3290 /*)
3291   ;;
3292 *)
3293   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3294   test -z "$cf_dir" && cf_dir=.
3295   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3296   ;;
3297 esac
3298
3299 for ac_prog in tdlint lint alint
3300 do
3301   # Extract the first word of "$ac_prog", so it can be a program name with args.
3302 set dummy $ac_prog; ac_word=$2
3303 echo "$as_me:3303: checking for $ac_word" >&5
3304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3305 if test "${ac_cv_prog_LINT+set}" = set; then
3306   echo $ECHO_N "(cached) $ECHO_C" >&6
3307 else
3308   if test -n "$LINT"; then
3309   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3310 else
3311   ac_save_IFS=$IFS; IFS=$ac_path_separator
3312 ac_dummy="$PATH"
3313 for ac_dir in $ac_dummy; do
3314   IFS=$ac_save_IFS
3315   test -z "$ac_dir" && ac_dir=.
3316   $as_executable_p "$ac_dir/$ac_word" || continue
3317 ac_cv_prog_LINT="$ac_prog"
3318 echo "$as_me:3318: found $ac_dir/$ac_word" >&5
3319 break
3320 done
3321
3322 fi
3323 fi
3324 LINT=$ac_cv_prog_LINT
3325 if test -n "$LINT"; then
3326   echo "$as_me:3326: result: $LINT" >&5
3327 echo "${ECHO_T}$LINT" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333   test -n "$LINT" && break
3334 done
3335
3336 echo "$as_me:3336: checking whether ln -s works" >&5
3337 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3338 LN_S=$as_ln_s
3339 if test "$LN_S" = "ln -s"; then
3340   echo "$as_me:3340: result: yes" >&5
3341 echo "${ECHO_T}yes" >&6
3342 else
3343   echo "$as_me:3343: result: no, using $LN_S" >&5
3344 echo "${ECHO_T}no, using $LN_S" >&6
3345 fi
3346
3347 echo "$as_me:3347: checking for long file names" >&5
3348 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3349 if test "${ac_cv_sys_long_file_names+set}" = set; then
3350   echo $ECHO_N "(cached) $ECHO_C" >&6
3351 else
3352   ac_cv_sys_long_file_names=yes
3353 # Test for long file names in all the places we know might matter:
3354 #      .                the current directory, where building will happen
3355 #      $prefix/lib      where we will be installing things
3356 #      $exec_prefix/lib likewise
3357 # eval it to expand exec_prefix.
3358 #      $TMPDIR          if set, where it might want to write temporary files
3359 # if $TMPDIR is not set:
3360 #      /tmp             where it might want to write temporary files
3361 #      /var/tmp         likewise
3362 #      /usr/tmp         likewise
3363 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3364   ac_tmpdirs=$TMPDIR
3365 else
3366   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3367 fi
3368 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3369   test -d $ac_dir || continue
3370   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3371   ac_xdir=$ac_dir/cf$$
3372   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3373   ac_tf1=$ac_xdir/conftest9012345
3374   ac_tf2=$ac_xdir/conftest9012346
3375   (echo 1 >$ac_tf1) 2>/dev/null
3376   (echo 2 >$ac_tf2) 2>/dev/null
3377   ac_val=`cat $ac_tf1 2>/dev/null`
3378   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3379     ac_cv_sys_long_file_names=no
3380     rm -rf $ac_xdir 2>/dev/null
3381     break
3382   fi
3383   rm -rf $ac_xdir 2>/dev/null
3384 done
3385 fi
3386 echo "$as_me:3386: result: $ac_cv_sys_long_file_names" >&5
3387 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3388 if test $ac_cv_sys_long_file_names = yes; then
3389
3390 cat >>confdefs.h <<\EOF
3391 #define HAVE_LONG_FILE_NAMES 1
3392 EOF
3393
3394 fi
3395
3396 echo "$as_me:3396: checking if we should assume mixed-case filenames" >&5
3397 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3398
3399 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3400 if test "${enable_mixed_case+set}" = set; then
3401   enableval="$enable_mixed_case"
3402   enable_mixedcase=$enableval
3403 else
3404   enable_mixedcase=auto
3405 fi;
3406 echo "$as_me:3406: result: $enable_mixedcase" >&5
3407 echo "${ECHO_T}$enable_mixedcase" >&6
3408 if test "$enable_mixedcase" = "auto" ; then
3409
3410 echo "$as_me:3410: checking if filesystem supports mixed-case filenames" >&5
3411 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3412 if test "${cf_cv_mixedcase+set}" = set; then
3413   echo $ECHO_N "(cached) $ECHO_C" >&6
3414 else
3415
3416 if test "$cross_compiling" = yes ; then
3417         case $target_alias in #(vi
3418         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3419                 cf_cv_mixedcase=no
3420                 ;;
3421         *)
3422                 cf_cv_mixedcase=yes
3423                 ;;
3424         esac
3425 else
3426         rm -f conftest CONFTEST
3427         echo test >conftest
3428         if test -f CONFTEST ; then
3429                 cf_cv_mixedcase=no
3430         else
3431                 cf_cv_mixedcase=yes
3432         fi
3433         rm -f conftest CONFTEST
3434 fi
3435
3436 fi
3437 echo "$as_me:3437: result: $cf_cv_mixedcase" >&5
3438 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3439 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3440 #define MIXEDCASE_FILENAMES 1
3441 EOF
3442
3443 else
3444     cf_cv_mixedcase=$enable_mixedcase
3445     if test "$enable_mixedcase" = "yes" ; then
3446         cat >>confdefs.h <<\EOF
3447 #define MIXEDCASE_FILENAMES 1
3448 EOF
3449
3450     fi
3451 fi
3452
3453 # do this after mixed-case option (tags/TAGS is not as important as tic).
3454 echo "$as_me:3454: checking whether ${MAKE-make} sets \${MAKE}" >&5
3455 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3456 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3457 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460   cat >conftest.make <<\EOF
3461 all:
3462         @echo 'ac_maketemp="${MAKE}"'
3463 EOF
3464 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3465 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3466 if test -n "$ac_maketemp"; then
3467   eval ac_cv_prog_make_${ac_make}_set=yes
3468 else
3469   eval ac_cv_prog_make_${ac_make}_set=no
3470 fi
3471 rm -f conftest.make
3472 fi
3473 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3474   echo "$as_me:3474: result: yes" >&5
3475 echo "${ECHO_T}yes" >&6
3476   SET_MAKE=
3477 else
3478   echo "$as_me:3478: result: no" >&5
3479 echo "${ECHO_T}no" >&6
3480   SET_MAKE="MAKE=${MAKE-make}"
3481 fi
3482
3483 # Extract the first word of "ctags", so it can be a program name with args.
3484 set dummy ctags; ac_word=$2
3485 echo "$as_me:3485: checking for $ac_word" >&5
3486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3487 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3488   echo $ECHO_N "(cached) $ECHO_C" >&6
3489 else
3490   if test -n "$MAKE_LOWER_TAGS"; then
3491   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3492 else
3493   ac_save_IFS=$IFS; IFS=$ac_path_separator
3494 ac_dummy="$PATH"
3495 for ac_dir in $ac_dummy; do
3496   IFS=$ac_save_IFS
3497   test -z "$ac_dir" && ac_dir=.
3498   $as_executable_p "$ac_dir/$ac_word" || continue
3499 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3500 echo "$as_me:3500: found $ac_dir/$ac_word" >&5
3501 break
3502 done
3503
3504   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3505 fi
3506 fi
3507 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3508 if test -n "$MAKE_LOWER_TAGS"; then
3509   echo "$as_me:3509: result: $MAKE_LOWER_TAGS" >&5
3510 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3511 else
3512   echo "$as_me:3512: result: no" >&5
3513 echo "${ECHO_T}no" >&6
3514 fi
3515
3516 if test "$cf_cv_mixedcase" = yes ; then
3517         # Extract the first word of "etags", so it can be a program name with args.
3518 set dummy etags; ac_word=$2
3519 echo "$as_me:3519: checking for $ac_word" >&5
3520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3521 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3522   echo $ECHO_N "(cached) $ECHO_C" >&6
3523 else
3524   if test -n "$MAKE_UPPER_TAGS"; then
3525   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3526 else
3527   ac_save_IFS=$IFS; IFS=$ac_path_separator
3528 ac_dummy="$PATH"
3529 for ac_dir in $ac_dummy; do
3530   IFS=$ac_save_IFS
3531   test -z "$ac_dir" && ac_dir=.
3532   $as_executable_p "$ac_dir/$ac_word" || continue
3533 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3534 echo "$as_me:3534: found $ac_dir/$ac_word" >&5
3535 break
3536 done
3537
3538   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3539 fi
3540 fi
3541 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3542 if test -n "$MAKE_UPPER_TAGS"; then
3543   echo "$as_me:3543: result: $MAKE_UPPER_TAGS" >&5
3544 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3545 else
3546   echo "$as_me:3546: result: no" >&5
3547 echo "${ECHO_T}no" >&6
3548 fi
3549
3550 else
3551         MAKE_UPPER_TAGS=no
3552 fi
3553
3554 if test "$MAKE_UPPER_TAGS" = yes ; then
3555         MAKE_UPPER_TAGS=
3556 else
3557         MAKE_UPPER_TAGS="#"
3558 fi
3559
3560 if test "$MAKE_LOWER_TAGS" = yes ; then
3561         MAKE_LOWER_TAGS=
3562 else
3563         MAKE_LOWER_TAGS="#"
3564 fi
3565
3566 echo "$as_me:3566: checking for makeflags variable" >&5
3567 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3568 if test "${cf_cv_makeflags+set}" = set; then
3569   echo $ECHO_N "(cached) $ECHO_C" >&6
3570 else
3571
3572         cf_cv_makeflags=''
3573         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3574         do
3575                 cat >cf_makeflags.tmp <<CF_EOF
3576 SHELL = /bin/sh
3577 all :
3578         @ echo '.$cf_option'
3579 CF_EOF
3580                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3581                 case "$cf_result" in
3582                 .*k)
3583                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3584                         case "$cf_result" in
3585                         .*CC=*) cf_cv_makeflags=
3586                                 ;;
3587                         *)      cf_cv_makeflags=$cf_option
3588                                 ;;
3589                         esac
3590                         break
3591                         ;;
3592                 .-)     ;;
3593                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3594                         ;;
3595                 esac
3596         done
3597         rm -f cf_makeflags.tmp
3598
3599 fi
3600 echo "$as_me:3600: result: $cf_cv_makeflags" >&5
3601 echo "${ECHO_T}$cf_cv_makeflags" >&6
3602
3603 if test -n "$ac_tool_prefix"; then
3604   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3605 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3606 echo "$as_me:3606: checking for $ac_word" >&5
3607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3608 if test "${ac_cv_prog_RANLIB+set}" = set; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   if test -n "$RANLIB"; then
3612   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3613 else
3614   ac_save_IFS=$IFS; IFS=$ac_path_separator
3615 ac_dummy="$PATH"
3616 for ac_dir in $ac_dummy; do
3617   IFS=$ac_save_IFS
3618   test -z "$ac_dir" && ac_dir=.
3619   $as_executable_p "$ac_dir/$ac_word" || continue
3620 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3621 echo "$as_me:3621: found $ac_dir/$ac_word" >&5
3622 break
3623 done
3624
3625 fi
3626 fi
3627 RANLIB=$ac_cv_prog_RANLIB
3628 if test -n "$RANLIB"; then
3629   echo "$as_me:3629: result: $RANLIB" >&5
3630 echo "${ECHO_T}$RANLIB" >&6
3631 else
3632   echo "$as_me:3632: result: no" >&5
3633 echo "${ECHO_T}no" >&6
3634 fi
3635
3636 fi
3637 if test -z "$ac_cv_prog_RANLIB"; then
3638   ac_ct_RANLIB=$RANLIB
3639   # Extract the first word of "ranlib", so it can be a program name with args.
3640 set dummy ranlib; ac_word=$2
3641 echo "$as_me:3641: checking for $ac_word" >&5
3642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3643 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3644   echo $ECHO_N "(cached) $ECHO_C" >&6
3645 else
3646   if test -n "$ac_ct_RANLIB"; then
3647   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3648 else
3649   ac_save_IFS=$IFS; IFS=$ac_path_separator
3650 ac_dummy="$PATH"
3651 for ac_dir in $ac_dummy; do
3652   IFS=$ac_save_IFS
3653   test -z "$ac_dir" && ac_dir=.
3654   $as_executable_p "$ac_dir/$ac_word" || continue
3655 ac_cv_prog_ac_ct_RANLIB="ranlib"
3656 echo "$as_me:3656: found $ac_dir/$ac_word" >&5
3657 break
3658 done
3659
3660   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3661 fi
3662 fi
3663 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3664 if test -n "$ac_ct_RANLIB"; then
3665   echo "$as_me:3665: result: $ac_ct_RANLIB" >&5
3666 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3667 else
3668   echo "$as_me:3668: result: no" >&5
3669 echo "${ECHO_T}no" >&6
3670 fi
3671
3672   RANLIB=$ac_ct_RANLIB
3673 else
3674   RANLIB="$ac_cv_prog_RANLIB"
3675 fi
3676
3677 if test -n "$ac_tool_prefix"; then
3678   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3679 set dummy ${ac_tool_prefix}ld; ac_word=$2
3680 echo "$as_me:3680: checking for $ac_word" >&5
3681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3682 if test "${ac_cv_prog_LD+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685   if test -n "$LD"; then
3686   ac_cv_prog_LD="$LD" # Let the user override the test.
3687 else
3688   ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 ac_dummy="$PATH"
3690 for ac_dir in $ac_dummy; do
3691   IFS=$ac_save_IFS
3692   test -z "$ac_dir" && ac_dir=.
3693   $as_executable_p "$ac_dir/$ac_word" || continue
3694 ac_cv_prog_LD="${ac_tool_prefix}ld"
3695 echo "$as_me:3695: found $ac_dir/$ac_word" >&5
3696 break
3697 done
3698
3699 fi
3700 fi
3701 LD=$ac_cv_prog_LD
3702 if test -n "$LD"; then
3703   echo "$as_me:3703: result: $LD" >&5
3704 echo "${ECHO_T}$LD" >&6
3705 else
3706   echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3708 fi
3709
3710 fi
3711 if test -z "$ac_cv_prog_LD"; then
3712   ac_ct_LD=$LD
3713   # Extract the first word of "ld", so it can be a program name with args.
3714 set dummy ld; ac_word=$2
3715 echo "$as_me:3715: checking for $ac_word" >&5
3716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3717 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3718   echo $ECHO_N "(cached) $ECHO_C" >&6
3719 else
3720   if test -n "$ac_ct_LD"; then
3721   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3722 else
3723   ac_save_IFS=$IFS; IFS=$ac_path_separator
3724 ac_dummy="$PATH"
3725 for ac_dir in $ac_dummy; do
3726   IFS=$ac_save_IFS
3727   test -z "$ac_dir" && ac_dir=.
3728   $as_executable_p "$ac_dir/$ac_word" || continue
3729 ac_cv_prog_ac_ct_LD="ld"
3730 echo "$as_me:3730: found $ac_dir/$ac_word" >&5
3731 break
3732 done
3733
3734   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3735 fi
3736 fi
3737 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3738 if test -n "$ac_ct_LD"; then
3739   echo "$as_me:3739: result: $ac_ct_LD" >&5
3740 echo "${ECHO_T}$ac_ct_LD" >&6
3741 else
3742   echo "$as_me:3742: result: no" >&5
3743 echo "${ECHO_T}no" >&6
3744 fi
3745
3746   LD=$ac_ct_LD
3747 else
3748   LD="$ac_cv_prog_LD"
3749 fi
3750
3751 if test -n "$ac_tool_prefix"; then
3752   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3753 set dummy ${ac_tool_prefix}ar; ac_word=$2
3754 echo "$as_me:3754: checking for $ac_word" >&5
3755 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3756 if test "${ac_cv_prog_AR+set}" = set; then
3757   echo $ECHO_N "(cached) $ECHO_C" >&6
3758 else
3759   if test -n "$AR"; then
3760   ac_cv_prog_AR="$AR" # Let the user override the test.
3761 else
3762   ac_save_IFS=$IFS; IFS=$ac_path_separator
3763 ac_dummy="$PATH"
3764 for ac_dir in $ac_dummy; do
3765   IFS=$ac_save_IFS
3766   test -z "$ac_dir" && ac_dir=.
3767   $as_executable_p "$ac_dir/$ac_word" || continue
3768 ac_cv_prog_AR="${ac_tool_prefix}ar"
3769 echo "$as_me:3769: found $ac_dir/$ac_word" >&5
3770 break
3771 done
3772
3773 fi
3774 fi
3775 AR=$ac_cv_prog_AR
3776 if test -n "$AR"; then
3777   echo "$as_me:3777: result: $AR" >&5
3778 echo "${ECHO_T}$AR" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784 fi
3785 if test -z "$ac_cv_prog_AR"; then
3786   ac_ct_AR=$AR
3787   # Extract the first word of "ar", so it can be a program name with args.
3788 set dummy ar; ac_word=$2
3789 echo "$as_me:3789: checking for $ac_word" >&5
3790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3791 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3792   echo $ECHO_N "(cached) $ECHO_C" >&6
3793 else
3794   if test -n "$ac_ct_AR"; then
3795   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3796 else
3797   ac_save_IFS=$IFS; IFS=$ac_path_separator
3798 ac_dummy="$PATH"
3799 for ac_dir in $ac_dummy; do
3800   IFS=$ac_save_IFS
3801   test -z "$ac_dir" && ac_dir=.
3802   $as_executable_p "$ac_dir/$ac_word" || continue
3803 ac_cv_prog_ac_ct_AR="ar"
3804 echo "$as_me:3804: found $ac_dir/$ac_word" >&5
3805 break
3806 done
3807
3808   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3809 fi
3810 fi
3811 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3812 if test -n "$ac_ct_AR"; then
3813   echo "$as_me:3813: result: $ac_ct_AR" >&5
3814 echo "${ECHO_T}$ac_ct_AR" >&6
3815 else
3816   echo "$as_me:3816: result: no" >&5
3817 echo "${ECHO_T}no" >&6
3818 fi
3819
3820   AR=$ac_ct_AR
3821 else
3822   AR="$ac_cv_prog_AR"
3823 fi
3824
3825 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3826   echo $ECHO_N "(cached) $ECHO_C" >&6
3827 else
3828
3829 echo "$as_me:3829: checking for archiver options (symbol AR_OPTS)" >&5
3830 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3831
3832 if test -z "$AR_OPTS" ; then
3833         AR_OPTS=rv
3834
3835 fi
3836
3837 cf_cv_subst_AR_OPTS=$AR_OPTS
3838 echo "$as_me:3838: result: $AR_OPTS" >&5
3839 echo "${ECHO_T}$AR_OPTS" >&6
3840
3841 fi
3842
3843 echo "$as_me:3843: checking if you have specified an install-prefix" >&5
3844 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3845
3846 # Check whether --with-install-prefix or --without-install-prefix was given.
3847 if test "${with_install_prefix+set}" = set; then
3848   withval="$with_install_prefix"
3849   case "$withval" in #(vi
3850         yes|no) #(vi
3851                 ;;
3852         *)      DESTDIR="$withval"
3853                 ;;
3854         esac
3855 fi;
3856 echo "$as_me:3856: result: $DESTDIR" >&5
3857 echo "${ECHO_T}$DESTDIR" >&6
3858
3859 ###############################################################################
3860
3861 # If we're cross-compiling, allow the user to override the tools and their
3862 # options.  The configure script is oriented toward identifying the host
3863 # compiler, etc., but we need a build compiler to generate parts of the source.
3864
3865 if test "$cross_compiling" = yes ; then
3866
3867         # defaults that we might want to override
3868         : ${BUILD_CFLAGS:=''}
3869         : ${BUILD_CPPFLAGS:=''}
3870         : ${BUILD_LDFLAGS:=''}
3871         : ${BUILD_LIBS:=''}
3872         : ${BUILD_EXEEXT:='$x'}
3873         : ${BUILD_OBJEXT:='o'}
3874
3875 # Check whether --with-build-cc or --without-build-cc was given.
3876 if test "${with_build_cc+set}" = set; then
3877   withval="$with_build_cc"
3878   BUILD_CC="$withval"
3879 else
3880   for ac_prog in gcc cc cl
3881 do
3882   # Extract the first word of "$ac_prog", so it can be a program name with args.
3883 set dummy $ac_prog; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$BUILD_CC"; then
3890   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_BUILD_CC="$ac_prog"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903 fi
3904 fi
3905 BUILD_CC=$ac_cv_prog_BUILD_CC
3906 if test -n "$BUILD_CC"; then
3907   echo "$as_me:3907: result: $BUILD_CC" >&5
3908 echo "${ECHO_T}$BUILD_CC" >&6
3909 else
3910   echo "$as_me:3910: result: no" >&5
3911 echo "${ECHO_T}no" >&6
3912 fi
3913
3914   test -n "$BUILD_CC" && break
3915 done
3916
3917 fi;
3918         echo "$as_me:3918: checking for native build C compiler" >&5
3919 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3920         echo "$as_me:3920: result: $BUILD_CC" >&5
3921 echo "${ECHO_T}$BUILD_CC" >&6
3922
3923         echo "$as_me:3923: checking for native build C preprocessor" >&5
3924 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3925
3926 # Check whether --with-build-cpp or --without-build-cpp was given.
3927 if test "${with_build_cpp+set}" = set; then
3928   withval="$with_build_cpp"
3929   BUILD_CPP="$withval"
3930 else
3931   BUILD_CPP='${BUILD_CC} -E'
3932 fi;
3933         echo "$as_me:3933: result: $BUILD_CPP" >&5
3934 echo "${ECHO_T}$BUILD_CPP" >&6
3935
3936         echo "$as_me:3936: checking for native build C flags" >&5
3937 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3938
3939 # Check whether --with-build-cflags or --without-build-cflags was given.
3940 if test "${with_build_cflags+set}" = set; then
3941   withval="$with_build_cflags"
3942   BUILD_CFLAGS="$withval"
3943 fi;
3944         echo "$as_me:3944: result: $BUILD_CFLAGS" >&5
3945 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3946
3947         echo "$as_me:3947: checking for native build C preprocessor-flags" >&5
3948 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3949
3950 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3951 if test "${with_build_cppflags+set}" = set; then
3952   withval="$with_build_cppflags"
3953   BUILD_CPPFLAGS="$withval"
3954 fi;
3955         echo "$as_me:3955: result: $BUILD_CPPFLAGS" >&5
3956 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3957
3958         echo "$as_me:3958: checking for native build linker-flags" >&5
3959 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3960
3961 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3962 if test "${with_build_ldflags+set}" = set; then
3963   withval="$with_build_ldflags"
3964   BUILD_LDFLAGS="$withval"
3965 fi;
3966         echo "$as_me:3966: result: $BUILD_LDFLAGS" >&5
3967 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3968
3969         echo "$as_me:3969: checking for native build linker-libraries" >&5
3970 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3971
3972 # Check whether --with-build-libs or --without-build-libs was given.
3973 if test "${with_build_libs+set}" = set; then
3974   withval="$with_build_libs"
3975   BUILD_LIBS="$withval"
3976 fi;
3977         echo "$as_me:3977: result: $BUILD_LIBS" >&5
3978 echo "${ECHO_T}$BUILD_LIBS" >&6
3979
3980         # this assumes we're on Unix.
3981         BUILD_EXEEXT=
3982         BUILD_OBJEXT=o
3983
3984         : ${BUILD_CC:='${CC}'}
3985
3986         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3987                 { { echo "$as_me:3987: error: Cross-build requires two compilers.
3988 Use --with-build-cc to specify the native compiler." >&5
3989 echo "$as_me: error: Cross-build requires two compilers.
3990 Use --with-build-cc to specify the native compiler." >&2;}
3991    { (exit 1); exit 1; }; }
3992         fi
3993
3994 else
3995         : ${BUILD_CC:='${CC}'}
3996         : ${BUILD_CPP:='${CPP}'}
3997         : ${BUILD_CFLAGS:='${CFLAGS}'}
3998         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3999         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4000         : ${BUILD_LIBS:='${LIBS}'}
4001         : ${BUILD_EXEEXT:='$x'}
4002         : ${BUILD_OBJEXT:='o'}
4003 fi
4004
4005 ###############################################################################
4006
4007 ### Options to allow the user to specify the set of libraries which are used.
4008 ### Use "--without-normal --with-shared" to allow the default model to be
4009 ### shared, for example.
4010 cf_list_models=""
4011
4012 LIBTOOL=
4013
4014 # common library maintenance symbols that are convenient for libtool scripts:
4015 LIB_CREATE='${AR} -cr'
4016 LIB_OBJECT='${OBJECTS}'
4017 LIB_SUFFIX=.a
4018 LIB_PREP="$RANLIB"
4019
4020 # symbols used to prop libtool up to enable it to determine what it should be
4021 # doing:
4022 LIB_CLEAN=
4023 LIB_COMPILE=
4024 LIB_LINK='${CC}'
4025 LIB_INSTALL=
4026 LIB_UNINSTALL=
4027
4028 echo "$as_me:4028: checking if you want to build libraries with libtool" >&5
4029 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4030
4031 # Check whether --with-libtool or --without-libtool was given.
4032 if test "${with_libtool+set}" = set; then
4033   withval="$with_libtool"
4034   with_libtool=$withval
4035 else
4036   with_libtool=no
4037 fi;
4038 echo "$as_me:4038: result: $with_libtool" >&5
4039 echo "${ECHO_T}$with_libtool" >&6
4040 if test "$with_libtool" != "no"; then
4041
4042         if test "$with_libtool" != "yes" ; then
4043
4044 if test "x$prefix" != xNONE; then
4045   cf_path_syntax="$prefix"
4046 else
4047   cf_path_syntax="$ac_default_prefix"
4048 fi
4049
4050 case ".$with_libtool" in #(vi
4051 .\$\(*\)*|.\'*\'*) #(vi
4052   ;;
4053 ..|./*|.\\*) #(vi
4054   ;;
4055 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4056   ;;
4057 .\${*prefix}*) #(vi
4058   eval with_libtool="$with_libtool"
4059   case ".$with_libtool" in #(vi
4060   .NONE/*)
4061     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4062     ;;
4063   esac
4064   ;; #(vi
4065 .no|.NONE/*)
4066   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4067   ;;
4068 *)
4069   { { echo "$as_me:4069: error: expected a pathname, not \"$with_libtool\"" >&5
4070 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4071    { (exit 1); exit 1; }; }
4072   ;;
4073 esac
4074
4075                 LIBTOOL=$with_libtool
4076         else
4077                 # Extract the first word of "libtool", so it can be a program name with args.
4078 set dummy libtool; ac_word=$2
4079 echo "$as_me:4079: checking for $ac_word" >&5
4080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4081 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4082   echo $ECHO_N "(cached) $ECHO_C" >&6
4083 else
4084   case $LIBTOOL in
4085   [\\/]* | ?:[\\/]*)
4086   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4087   ;;
4088   *)
4089   ac_save_IFS=$IFS; IFS=$ac_path_separator
4090 ac_dummy="$PATH"
4091 for ac_dir in $ac_dummy; do
4092   IFS=$ac_save_IFS
4093   test -z "$ac_dir" && ac_dir=.
4094   if $as_executable_p "$ac_dir/$ac_word"; then
4095    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4096    echo "$as_me:4096: found $ac_dir/$ac_word" >&5
4097    break
4098 fi
4099 done
4100
4101   ;;
4102 esac
4103 fi
4104 LIBTOOL=$ac_cv_path_LIBTOOL
4105
4106 if test -n "$LIBTOOL"; then
4107   echo "$as_me:4107: result: $LIBTOOL" >&5
4108 echo "${ECHO_T}$LIBTOOL" >&6
4109 else
4110   echo "$as_me:4110: result: no" >&5
4111 echo "${ECHO_T}no" >&6
4112 fi
4113
4114         fi
4115         if test -z "$LIBTOOL" ; then
4116                 { { echo "$as_me:4116: error: Cannot find libtool" >&5
4117 echo "$as_me: error: Cannot find libtool" >&2;}
4118    { (exit 1); exit 1; }; }
4119         fi
4120         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4121         LIB_OBJECT='${OBJECTS:.o=.lo}'
4122         LIB_SUFFIX=.la
4123         LIB_CLEAN='${LIBTOOL} --mode=clean'
4124         LIB_COMPILE='${LIBTOOL} --mode=compile'
4125         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4126         LIB_INSTALL='${LIBTOOL} --mode=install'
4127         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4128         LIB_PREP=:
4129
4130         # Show the version of libtool
4131         echo "$as_me:4131: checking version of libtool" >&5
4132 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4133
4134         # Save the version in a cache variable - this is not entirely a good
4135         # thing, but the version string from libtool is very ugly, and for
4136         # bug reports it might be useful to have the original string.
4137         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.].*//'`
4138         echo "$as_me:4138: result: $cf_cv_libtool_version" >&5
4139 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4140         if test -z "$cf_cv_libtool_version" ; then
4141                 { { echo "$as_me:4141: error: This is not GNU libtool" >&5
4142 echo "$as_me: error: This is not GNU libtool" >&2;}
4143    { (exit 1); exit 1; }; }
4144         fi
4145
4146         # special hack to add --tag option for C++ compiler
4147         case $cf_cv_libtool_version in
4148         1.[5-9]*|[2-9]*)
4149                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4150                 LIBTOOL="$LIBTOOL --tag=CC"
4151                 ;;
4152         *)
4153                 LIBTOOL_CXX="$LIBTOOL"
4154                 ;;
4155         esac
4156 else
4157         LIBTOOL=""
4158         LIBTOOL_CXX=""
4159 fi
4160
4161 test -z "$LIBTOOL" && ECHO_LT=
4162
4163 if test "$with_libtool" != "no" ; then
4164
4165 cf_list_models="$cf_list_models libtool"
4166
4167 else
4168
4169 echo "$as_me:4169: checking if you want to build shared libraries" >&5
4170 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4171
4172 # Check whether --with-shared or --without-shared was given.
4173 if test "${with_shared+set}" = set; then
4174   withval="$with_shared"
4175   with_shared=$withval
4176 else
4177   with_shared=no
4178 fi;
4179 echo "$as_me:4179: result: $with_shared" >&5
4180 echo "${ECHO_T}$with_shared" >&6
4181 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4182
4183 echo "$as_me:4183: checking if you want to build static libraries" >&5
4184 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4185
4186 # Check whether --with-normal or --without-normal was given.
4187 if test "${with_normal+set}" = set; then
4188   withval="$with_normal"
4189   with_normal=$withval
4190 else
4191   with_normal=yes
4192 fi;
4193 echo "$as_me:4193: result: $with_normal" >&5
4194 echo "${ECHO_T}$with_normal" >&6
4195 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4196
4197 echo "$as_me:4197: checking if you want to build debug libraries" >&5
4198 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4199
4200 # Check whether --with-debug or --without-debug was given.
4201 if test "${with_debug+set}" = set; then
4202   withval="$with_debug"
4203   with_debug=$withval
4204 else
4205   with_debug=yes
4206 fi;
4207 echo "$as_me:4207: result: $with_debug" >&5
4208 echo "${ECHO_T}$with_debug" >&6
4209 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4210
4211 echo "$as_me:4211: checking if you want to build profiling libraries" >&5
4212 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4213
4214 # Check whether --with-profile or --without-profile was given.
4215 if test "${with_profile+set}" = set; then
4216   withval="$with_profile"
4217   with_profile=$withval
4218 else
4219   with_profile=no
4220 fi;
4221 echo "$as_me:4221: result: $with_profile" >&5
4222 echo "${ECHO_T}$with_profile" >&6
4223 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4224
4225 fi
4226
4227 ###############################################################################
4228
4229 echo "$as_me:4229: checking for specified models" >&5
4230 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4231 test -z "$cf_list_models" && cf_list_models=normal
4232 test "$with_libtool" != "no" && cf_list_models=libtool
4233 echo "$as_me:4233: result: $cf_list_models" >&5
4234 echo "${ECHO_T}$cf_list_models" >&6
4235
4236 ### Use the first model as the default, and save its suffix for use in building
4237 ### up test-applications.
4238 echo "$as_me:4238: checking for default model" >&5
4239 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4240 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4241 echo "$as_me:4241: result: $DFT_LWR_MODEL" >&5
4242 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4243
4244 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4245
4246 TICS_NAME=tic
4247
4248 TINFO_NAME=tinfo
4249
4250 LIB_NAME=ncurses
4251
4252 LIB_DIR=../lib
4253 LIB_2ND=../../lib
4254
4255         case $cf_cv_system_name in
4256         OS/2*)  LIB_PREFIX=''     ;;
4257         os2*)   LIB_PREFIX=''     ;;
4258         *)      LIB_PREFIX='lib'  ;;
4259         esac
4260 cf_prefix=$LIB_PREFIX
4261
4262 LIB_PREFIX=$cf_prefix
4263
4264 LIB_SUFFIX=
4265
4266 ###############################################################################
4267
4268 echo "$as_me:4268: checking if you want to build a separate terminfo library" >&5
4269 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4270
4271 # Check whether --with-termlib or --without-termlib was given.
4272 if test "${with_termlib+set}" = set; then
4273   withval="$with_termlib"
4274   with_termlib=$withval
4275 else
4276   with_termlib=no
4277 fi;
4278 echo "$as_me:4278: result: $with_termlib" >&5
4279 echo "${ECHO_T}$with_termlib" >&6
4280
4281 echo "$as_me:4281: checking if you want to build a separate tic library" >&5
4282 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4283
4284 # Check whether --with-ticlib or --without-ticlib was given.
4285 if test "${with_ticlib+set}" = set; then
4286   withval="$with_ticlib"
4287   with_ticlib=$withval
4288 else
4289   with_ticlib=no
4290 fi;
4291 echo "$as_me:4291: result: $with_ticlib" >&5
4292 echo "${ECHO_T}$with_ticlib" >&6
4293
4294 ### Checks for special libraries, must be done up-front.
4295 SHLIB_LIST=""
4296
4297 echo "$as_me:4297: checking if you want to link with the GPM mouse library" >&5
4298 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4299
4300 # Check whether --with-gpm or --without-gpm was given.
4301 if test "${with_gpm+set}" = set; then
4302   withval="$with_gpm"
4303   with_gpm=$withval
4304 else
4305   with_gpm=maybe
4306 fi;
4307 echo "$as_me:4307: result: $with_gpm" >&5
4308 echo "${ECHO_T}$with_gpm" >&6
4309
4310 if test "$with_gpm" != no ; then
4311         echo "$as_me:4311: checking for gpm.h" >&5
4312 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4313 if test "${ac_cv_header_gpm_h+set}" = set; then
4314   echo $ECHO_N "(cached) $ECHO_C" >&6
4315 else
4316   cat >conftest.$ac_ext <<_ACEOF
4317 #line 4317 "configure"
4318 #include "confdefs.h"
4319 #include <gpm.h>
4320 _ACEOF
4321 if { (eval echo "$as_me:4321: \"$ac_cpp conftest.$ac_ext\"") >&5
4322   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4323   ac_status=$?
4324   egrep -v '^ *\+' conftest.er1 >conftest.err
4325   rm -f conftest.er1
4326   cat conftest.err >&5
4327   echo "$as_me:4327: \$? = $ac_status" >&5
4328   (exit $ac_status); } >/dev/null; then
4329   if test -s conftest.err; then
4330     ac_cpp_err=$ac_c_preproc_warn_flag
4331   else
4332     ac_cpp_err=
4333   fi
4334 else
4335   ac_cpp_err=yes
4336 fi
4337 if test -z "$ac_cpp_err"; then
4338   ac_cv_header_gpm_h=yes
4339 else
4340   echo "$as_me: failed program was:" >&5
4341   cat conftest.$ac_ext >&5
4342   ac_cv_header_gpm_h=no
4343 fi
4344 rm -f conftest.err conftest.$ac_ext
4345 fi
4346 echo "$as_me:4346: result: $ac_cv_header_gpm_h" >&5
4347 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4348 if test $ac_cv_header_gpm_h = yes; then
4349
4350                 cat >>confdefs.h <<\EOF
4351 #define HAVE_GPM_H 1
4352 EOF
4353
4354                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4355                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4356
4357 echo "${as_me-configure}:4357: testing assuming we really have GPM library ..." 1>&5
4358
4359                         cat >>confdefs.h <<\EOF
4360 #define HAVE_LIBGPM 1
4361 EOF
4362
4363                 else
4364                         echo "$as_me:4364: checking for Gpm_Open in -lgpm" >&5
4365 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4366 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4367   echo $ECHO_N "(cached) $ECHO_C" >&6
4368 else
4369   ac_check_lib_save_LIBS=$LIBS
4370 LIBS="-lgpm  $LIBS"
4371 cat >conftest.$ac_ext <<_ACEOF
4372 #line 4372 "configure"
4373 #include "confdefs.h"
4374
4375 /* Override any gcc2 internal prototype to avoid an error.  */
4376 #ifdef __cplusplus
4377 extern "C"
4378 #endif
4379 /* We use char because int might match the return type of a gcc2
4380    builtin and then its argument prototype would still apply.  */
4381 char Gpm_Open ();
4382 int
4383 main ()
4384 {
4385 Gpm_Open ();
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 rm -f conftest.$ac_objext conftest$ac_exeext
4391 if { (eval echo "$as_me:4391: \"$ac_link\"") >&5
4392   (eval $ac_link) 2>&5
4393   ac_status=$?
4394   echo "$as_me:4394: \$? = $ac_status" >&5
4395   (exit $ac_status); } &&
4396          { ac_try='test -s conftest$ac_exeext'
4397   { (eval echo "$as_me:4397: \"$ac_try\"") >&5
4398   (eval $ac_try) 2>&5
4399   ac_status=$?
4400   echo "$as_me:4400: \$? = $ac_status" >&5
4401   (exit $ac_status); }; }; then
4402   ac_cv_lib_gpm_Gpm_Open=yes
4403 else
4404   echo "$as_me: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 ac_cv_lib_gpm_Gpm_Open=no
4407 fi
4408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4409 LIBS=$ac_check_lib_save_LIBS
4410 fi
4411 echo "$as_me:4411: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4412 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4413 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4414   :
4415 else
4416
4417                                 { { echo "$as_me:4417: error: Cannot link with GPM library" >&5
4418 echo "$as_me: error: Cannot link with GPM library" >&2;}
4419    { (exit 1); exit 1; }; }
4420                 fi
4421                 with_gpm=yes
4422
4423 fi
4424
4425 else
4426
4427                 test "$with_gpm" != maybe && { echo "$as_me:4427: WARNING: Cannot find GPM header" >&5
4428 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4429                 with_gpm=no
4430
4431 fi
4432
4433 fi
4434
4435 if test "$with_gpm" != no ; then
4436         echo "$as_me:4436: checking if you want to load GPM dynamically" >&5
4437 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4438
4439 # Check whether --with-dlsym or --without-dlsym was given.
4440 if test "${with_dlsym+set}" = set; then
4441   withval="$with_dlsym"
4442   with_dlsym=$withval
4443 else
4444   with_dlsym=yes
4445 fi;
4446         echo "$as_me:4446: result: $with_dlsym" >&5
4447 echo "${ECHO_T}$with_dlsym" >&6
4448         if test "$with_dlsym" = yes ; then
4449
4450 cf_have_dlsym=no
4451 echo "$as_me:4451: checking for dlsym" >&5
4452 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4453 if test "${ac_cv_func_dlsym+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   cat >conftest.$ac_ext <<_ACEOF
4457 #line 4457 "configure"
4458 #include "confdefs.h"
4459 /* System header to define __stub macros and hopefully few prototypes,
4460     which can conflict with char dlsym (); below.  */
4461 #include <assert.h>
4462 /* Override any gcc2 internal prototype to avoid an error.  */
4463 #ifdef __cplusplus
4464 extern "C"
4465 #endif
4466 /* We use char because int might match the return type of a gcc2
4467    builtin and then its argument prototype would still apply.  */
4468 char dlsym ();
4469 char (*f) ();
4470
4471 int
4472 main ()
4473 {
4474 /* The GNU C library defines this for functions which it implements
4475     to always fail with ENOSYS.  Some functions are actually named
4476     something starting with __ and the normal name is an alias.  */
4477 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4478 choke me
4479 #else
4480 f = dlsym;
4481 #endif
4482
4483   ;
4484   return 0;
4485 }
4486 _ACEOF
4487 rm -f conftest.$ac_objext conftest$ac_exeext
4488 if { (eval echo "$as_me:4488: \"$ac_link\"") >&5
4489   (eval $ac_link) 2>&5
4490   ac_status=$?
4491   echo "$as_me:4491: \$? = $ac_status" >&5
4492   (exit $ac_status); } &&
4493          { ac_try='test -s conftest$ac_exeext'
4494   { (eval echo "$as_me:4494: \"$ac_try\"") >&5
4495   (eval $ac_try) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); }; }; then
4499   ac_cv_func_dlsym=yes
4500 else
4501   echo "$as_me: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 ac_cv_func_dlsym=no
4504 fi
4505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4506 fi
4507 echo "$as_me:4507: result: $ac_cv_func_dlsym" >&5
4508 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4509 if test $ac_cv_func_dlsym = yes; then
4510   cf_have_dlsym=yes
4511 else
4512
4513 cf_have_libdl=no
4514 echo "$as_me:4514: checking for dlsym in -ldl" >&5
4515 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4516 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519   ac_check_lib_save_LIBS=$LIBS
4520 LIBS="-ldl  $LIBS"
4521 cat >conftest.$ac_ext <<_ACEOF
4522 #line 4522 "configure"
4523 #include "confdefs.h"
4524
4525 /* Override any gcc2 internal prototype to avoid an error.  */
4526 #ifdef __cplusplus
4527 extern "C"
4528 #endif
4529 /* We use char because int might match the return type of a gcc2
4530    builtin and then its argument prototype would still apply.  */
4531 char dlsym ();
4532 int
4533 main ()
4534 {
4535 dlsym ();
4536   ;
4537   return 0;
4538 }
4539 _ACEOF
4540 rm -f conftest.$ac_objext conftest$ac_exeext
4541 if { (eval echo "$as_me:4541: \"$ac_link\"") >&5
4542   (eval $ac_link) 2>&5
4543   ac_status=$?
4544   echo "$as_me:4544: \$? = $ac_status" >&5
4545   (exit $ac_status); } &&
4546          { ac_try='test -s conftest$ac_exeext'
4547   { (eval echo "$as_me:4547: \"$ac_try\"") >&5
4548   (eval $ac_try) 2>&5
4549   ac_status=$?
4550   echo "$as_me:4550: \$? = $ac_status" >&5
4551   (exit $ac_status); }; }; then
4552   ac_cv_lib_dl_dlsym=yes
4553 else
4554   echo "$as_me: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 ac_cv_lib_dl_dlsym=no
4557 fi
4558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4559 LIBS=$ac_check_lib_save_LIBS
4560 fi
4561 echo "$as_me:4561: result: $ac_cv_lib_dl_dlsym" >&5
4562 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4563 if test $ac_cv_lib_dl_dlsym = yes; then
4564
4565         cf_have_dlsym=yes
4566         cf_have_libdl=yes
4567 fi
4568
4569 fi
4570
4571 if test "$cf_have_dlsym" = yes ; then
4572         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4573
4574         echo "$as_me:4574: checking whether able to link to dl*() functions" >&5
4575 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4576         cat >conftest.$ac_ext <<_ACEOF
4577 #line 4577 "configure"
4578 #include "confdefs.h"
4579 #include <dlfcn.h>
4580 int
4581 main ()
4582 {
4583
4584                 void *obj;
4585                 if ((obj = dlopen("filename", 0)) != 0) {
4586                         if (dlsym(obj, "symbolname") == 0) {
4587                         dlclose(obj);
4588                         }
4589                 }
4590   ;
4591   return 0;
4592 }
4593 _ACEOF
4594 rm -f conftest.$ac_objext conftest$ac_exeext
4595 if { (eval echo "$as_me:4595: \"$ac_link\"") >&5
4596   (eval $ac_link) 2>&5
4597   ac_status=$?
4598   echo "$as_me:4598: \$? = $ac_status" >&5
4599   (exit $ac_status); } &&
4600          { ac_try='test -s conftest$ac_exeext'
4601   { (eval echo "$as_me:4601: \"$ac_try\"") >&5
4602   (eval $ac_try) 2>&5
4603   ac_status=$?
4604   echo "$as_me:4604: \$? = $ac_status" >&5
4605   (exit $ac_status); }; }; then
4606
4607                 cat >>confdefs.h <<\EOF
4608 #define HAVE_LIBDL 1
4609 EOF
4610
4611 else
4612   echo "$as_me: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4614
4615                 { { echo "$as_me:4615: error: Cannot link test program for libdl" >&5
4616 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4617    { (exit 1); exit 1; }; }
4618 fi
4619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4620         echo "$as_me:4620: result: ok" >&5
4621 echo "${ECHO_T}ok" >&6
4622 else
4623         { { echo "$as_me:4623: error: Cannot find dlsym function" >&5
4624 echo "$as_me: error: Cannot find dlsym function" >&2;}
4625    { (exit 1); exit 1; }; }
4626 fi
4627
4628                 if test "$with_gpm" != yes ; then
4629                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4630
4631 echo "${as_me-configure}:4631: testing assuming soname for gpm is $with_gpm ..." 1>&5
4632
4633                         cf_cv_gpm_soname="$with_gpm"
4634                 else
4635
4636 echo "$as_me:4636: checking for soname of gpm library" >&5
4637 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4638 if test "${cf_cv_gpm_soname+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642 cf_cv_gpm_soname=unknown
4643 if test "$cross_compiling" != yes ; then
4644 cat >conftest.$ac_ext <<CF_EOF
4645 #include <gpm.h>
4646 int main()
4647 {
4648 if (Gpm_Open(0,0)) Gpm_Close();
4649         ${cf_cv_main_return:-return}(0);
4650 }
4651 CF_EOF
4652 cf_save_LIBS="$LIBS"
4653         LIBS="-lgpm $LIBS"
4654         if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655   (eval $ac_compile) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); } ; then
4659                 if { (eval echo "$as_me:4659: \"$ac_link\"") >&5
4660   (eval $ac_link) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); } ; then
4664                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4665                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4666                 fi
4667         fi
4668 rm -f conftest*
4669 LIBS="$cf_save_LIBS"
4670 fi
4671
4672 fi
4673 echo "$as_me:4673: result: $cf_cv_gpm_soname" >&5
4674 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4675
4676                 fi
4677                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4678 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4679 EOF
4680
4681                 SHLIB_LIST="-ldl $SHLIB_LIST"
4682         else
4683                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4684         fi
4685         cat >>confdefs.h <<\EOF
4686 #define HAVE_LIBGPM 1
4687 EOF
4688
4689 echo "$as_me:4689: checking for Gpm_Wgetch in -lgpm" >&5
4690 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4691 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   ac_check_lib_save_LIBS=$LIBS
4695 LIBS="-lgpm  $LIBS"
4696 cat >conftest.$ac_ext <<_ACEOF
4697 #line 4697 "configure"
4698 #include "confdefs.h"
4699
4700 /* Override any gcc2 internal prototype to avoid an error.  */
4701 #ifdef __cplusplus
4702 extern "C"
4703 #endif
4704 /* We use char because int might match the return type of a gcc2
4705    builtin and then its argument prototype would still apply.  */
4706 char Gpm_Wgetch ();
4707 int
4708 main ()
4709 {
4710 Gpm_Wgetch ();
4711   ;
4712   return 0;
4713 }
4714 _ACEOF
4715 rm -f conftest.$ac_objext conftest$ac_exeext
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717   (eval $ac_link) 2>&5
4718   ac_status=$?
4719   echo "$as_me:4719: \$? = $ac_status" >&5
4720   (exit $ac_status); } &&
4721          { ac_try='test -s conftest$ac_exeext'
4722   { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4723   (eval $ac_try) 2>&5
4724   ac_status=$?
4725   echo "$as_me:4725: \$? = $ac_status" >&5
4726   (exit $ac_status); }; }; then
4727   ac_cv_lib_gpm_Gpm_Wgetch=yes
4728 else
4729   echo "$as_me: failed program was:" >&5
4730 cat conftest.$ac_ext >&5
4731 ac_cv_lib_gpm_Gpm_Wgetch=no
4732 fi
4733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4734 LIBS=$ac_check_lib_save_LIBS
4735 fi
4736 echo "$as_me:4736: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4737 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4738 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4739
4740 echo "$as_me:4740: checking if GPM is weakly bound to curses library" >&5
4741 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4742 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745
4746 cf_cv_check_gpm_wgetch=unknown
4747 if test "$cross_compiling" != yes ; then
4748
4749 cat >conftest.$ac_ext <<CF_EOF
4750 #include <gpm.h>
4751 int main()
4752 {
4753         Gpm_Wgetch();
4754         ${cf_cv_main_return:-return}(0);
4755 }
4756 CF_EOF
4757
4758         cf_save_LIBS="$LIBS"
4759         # This only works if we can look at the symbol table.  If a shared
4760         # library is stripped for install, we cannot use that.  So we're forced
4761         # to rely on the static library, noting that some packagers may not
4762         # include it.
4763         LIBS="-static -lgpm -dynamic $LIBS"
4764         if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5
4765   (eval $ac_compile) 2>&5
4766   ac_status=$?
4767   echo "$as_me:4767: \$? = $ac_status" >&5
4768   (exit $ac_status); } ; then
4769                 if { (eval echo "$as_me:4769: \"$ac_link\"") >&5
4770   (eval $ac_link) 2>&5
4771   ac_status=$?
4772   echo "$as_me:4772: \$? = $ac_status" >&5
4773   (exit $ac_status); } ; then
4774                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4775                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4776                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4777                 fi
4778         fi
4779         rm -f conftest*
4780         LIBS="$cf_save_LIBS"
4781 fi
4782
4783 fi
4784 echo "$as_me:4784: result: $cf_cv_check_gpm_wgetch" >&5
4785 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4786
4787 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4788         { echo "$as_me:4788: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4789 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4790 fi
4791
4792 fi
4793
4794 fi
4795
4796 # not everyone has "test -c"
4797 if test -c /dev/sysmouse 2>/dev/null ; then
4798 echo "$as_me:4798: checking if you want to use sysmouse" >&5
4799 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4800
4801 # Check whether --with-sysmouse or --without-sysmouse was given.
4802 if test "${with_sysmouse+set}" = set; then
4803   withval="$with_sysmouse"
4804   cf_with_sysmouse=$withval
4805 else
4806   cf_with_sysmouse=maybe
4807 fi;
4808         if test "$cf_with_sysmouse" != no ; then
4809         cat >conftest.$ac_ext <<_ACEOF
4810 #line 4810 "configure"
4811 #include "confdefs.h"
4812
4813 #include <osreldate.h>
4814 #if (__FreeBSD_version >= 400017)
4815 #include <sys/consio.h>
4816 #include <sys/fbio.h>
4817 #else
4818 #include <machine/console.h>
4819 #endif
4820
4821 int
4822 main ()
4823 {
4824
4825         struct mouse_info the_mouse;
4826         ioctl(0, CONS_MOUSECTL, &the_mouse);
4827
4828   ;
4829   return 0;
4830 }
4831 _ACEOF
4832 rm -f conftest.$ac_objext
4833 if { (eval echo "$as_me:4833: \"$ac_compile\"") >&5
4834   (eval $ac_compile) 2>&5
4835   ac_status=$?
4836   echo "$as_me:4836: \$? = $ac_status" >&5
4837   (exit $ac_status); } &&
4838          { ac_try='test -s conftest.$ac_objext'
4839   { (eval echo "$as_me:4839: \"$ac_try\"") >&5
4840   (eval $ac_try) 2>&5
4841   ac_status=$?
4842   echo "$as_me:4842: \$? = $ac_status" >&5
4843   (exit $ac_status); }; }; then
4844   cf_with_sysmouse=yes
4845 else
4846   echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 cf_with_sysmouse=no
4849 fi
4850 rm -f conftest.$ac_objext conftest.$ac_ext
4851         fi
4852 echo "$as_me:4852: result: $cf_with_sysmouse" >&5
4853 echo "${ECHO_T}$cf_with_sysmouse" >&6
4854 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4855 #define USE_SYSMOUSE 1
4856 EOF
4857
4858 fi
4859
4860 if test X"$CC_G_OPT" = X"" ; then
4861         CC_G_OPT='-g'
4862         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4863 fi
4864
4865 if test X"$CXX_G_OPT" = X"" ; then
4866         CXX_G_OPT='-g'
4867         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4868 fi
4869
4870 echo "$as_me:4870: checking for default loader flags" >&5
4871 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4872 case $DFT_LWR_MODEL in
4873 libtool) LD_MODEL=''   ;;
4874 normal)  LD_MODEL=''   ;;
4875 debug)   LD_MODEL=$CC_G_OPT ;;
4876 profile) LD_MODEL='-pg';;
4877 shared)  LD_MODEL=''   ;;
4878 esac
4879 echo "$as_me:4879: result: $LD_MODEL" >&5
4880 echo "${ECHO_T}$LD_MODEL" >&6
4881
4882 case $DFT_LWR_MODEL in
4883 shared)
4884 echo "$as_me:4884: checking if rpath option should be used" >&5
4885 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4886
4887 # Check whether --enable-rpath or --disable-rpath was given.
4888 if test "${enable_rpath+set}" = set; then
4889   enableval="$enable_rpath"
4890   cf_cv_ld_rpath=$enableval
4891 else
4892   cf_cv_ld_rpath=no
4893 fi;
4894 echo "$as_me:4894: result: $cf_cv_ld_rpath" >&5
4895 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4896 echo "$as_me:4896: checking if shared libraries should be relinked during install" >&5
4897 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4898
4899 # Check whether --enable-relink or --disable-relink was given.
4900 if test "${enable_relink+set}" = set; then
4901   enableval="$enable_relink"
4902   cf_cv_do_relink=$enableval
4903 else
4904   cf_cv_do_relink=yes
4905 fi;
4906 echo "$as_me:4906: result: $cf_cv_do_relink" >&5
4907 echo "${ECHO_T}$cf_cv_do_relink" >&6
4908         ;;
4909 esac
4910
4911         LOCAL_LDFLAGS=
4912         LOCAL_LDFLAGS2=
4913         LD_SHARED_OPTS=
4914         INSTALL_LIB="-m 644"
4915
4916         cf_cv_do_symlinks=no
4917
4918         echo "$as_me:4918: checking if release/abi version should be used for shared libs" >&5
4919 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4920
4921 # Check whether --with-shlib-version or --without-shlib-version was given.
4922 if test "${with_shlib_version+set}" = set; then
4923   withval="$with_shlib_version"
4924   test -z "$withval" && withval=auto
4925         case $withval in #(vi
4926         yes) #(vi
4927                 cf_cv_shlib_version=auto
4928                 ;;
4929         rel|abi|auto|no) #(vi
4930                 cf_cv_shlib_version=$withval
4931                 ;;
4932         *)
4933                 { { echo "$as_me:4933: error: option value must be one of: rel, abi, auto or no" >&5
4934 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4935    { (exit 1); exit 1; }; }
4936                 ;;
4937         esac
4938
4939 else
4940   cf_cv_shlib_version=auto
4941 fi;
4942         echo "$as_me:4942: result: $cf_cv_shlib_version" >&5
4943 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4944
4945         cf_cv_rm_so_locs=no
4946
4947         # Some less-capable ports of gcc support only -fpic
4948         CC_SHARED_OPTS=
4949         if test "$GCC" = yes
4950         then
4951                 echo "$as_me:4951: checking which $CC option to use" >&5
4952 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4953                 cf_save_CFLAGS="$CFLAGS"
4954                 for CC_SHARED_OPTS in -fPIC -fpic ''
4955                 do
4956                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4957                         cat >conftest.$ac_ext <<_ACEOF
4958 #line 4958 "configure"
4959 #include "confdefs.h"
4960 #include <stdio.h>
4961 int
4962 main ()
4963 {
4964 int x = 1
4965   ;
4966   return 0;
4967 }
4968 _ACEOF
4969 rm -f conftest.$ac_objext
4970 if { (eval echo "$as_me:4970: \"$ac_compile\"") >&5
4971   (eval $ac_compile) 2>&5
4972   ac_status=$?
4973   echo "$as_me:4973: \$? = $ac_status" >&5
4974   (exit $ac_status); } &&
4975          { ac_try='test -s conftest.$ac_objext'
4976   { (eval echo "$as_me:4976: \"$ac_try\"") >&5
4977   (eval $ac_try) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); }; }; then
4981   break
4982 else
4983   echo "$as_me: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 fi
4986 rm -f conftest.$ac_objext conftest.$ac_ext
4987                 done
4988                 echo "$as_me:4988: result: $CC_SHARED_OPTS" >&5
4989 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4990                 CFLAGS="$cf_save_CFLAGS"
4991         fi
4992
4993         cf_cv_shlib_version_infix=no
4994
4995         case $cf_cv_system_name in
4996         beos*)
4997                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4998                 ;;
4999         cygwin*)
5000                 CC_SHARED_OPTS=
5001                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5002                 cf_cv_shlib_version=cygdll
5003                 cf_cv_shlib_version_infix=cygdll
5004                 cat >mk_shared_lib.sh <<-CF_EOF
5005                 #!/bin/sh
5006                 SHARED_LIB=\$1
5007                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5008                 shift
5009                 cat <<-EOF
5010                 Linking shared library
5011                 ** SHARED_LIB \$SHARED_LIB
5012                 ** IMPORT_LIB \$IMPORT_LIB
5013 EOF
5014                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5015 CF_EOF
5016                 chmod +x mk_shared_lib.sh
5017                 ;;
5018         darwin*)
5019                 EXTRA_CFLAGS="-no-cpp-precomp"
5020                 CC_SHARED_OPTS="-dynamic"
5021                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5023                 cf_cv_shlib_version_infix=yes
5024                 echo "$as_me:5024: checking if ld -search_paths_first works" >&5
5025 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5026 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029
5030                         cf_save_LDFLAGS=$LDFLAGS
5031                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5032                         cat >conftest.$ac_ext <<_ACEOF
5033 #line 5033 "configure"
5034 #include "confdefs.h"
5035
5036 int
5037 main ()
5038 {
5039 int i;
5040   ;
5041   return 0;
5042 }
5043 _ACEOF
5044 rm -f conftest.$ac_objext conftest$ac_exeext
5045 if { (eval echo "$as_me:5045: \"$ac_link\"") >&5
5046   (eval $ac_link) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); } &&
5050          { ac_try='test -s conftest$ac_exeext'
5051   { (eval echo "$as_me:5051: \"$ac_try\"") >&5
5052   (eval $ac_try) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); }; }; then
5056   cf_cv_ldflags_search_paths_first=yes
5057 else
5058   echo "$as_me: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5060 cf_cv_ldflags_search_paths_first=no
5061 fi
5062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5063                                 LDFLAGS=$cf_save_LDFLAGS
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_ldflags_search_paths_first" >&5
5066 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5067                 if test $cf_cv_ldflags_search_paths_first = yes; then
5068                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5069                 fi
5070                 ;;
5071         hpux*)
5072                 # (tested with gcc 2.7.2 -- I don't have c89)
5073                 if test "$GCC" = yes; then
5074                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5075                 else
5076                         CC_SHARED_OPTS='+Z'
5077                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5078                 fi
5079                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5080                 # HP-UX shared libraries must be executable, and should be
5081                 # readonly to exploit a quirk in the memory manager.
5082                 INSTALL_LIB="-m 555"
5083                 ;;
5084         irix*)
5085                 if test "$cf_cv_ld_rpath" = yes ; then
5086                         if test "$GCC" = yes; then
5087                                 cf_ld_rpath_opt="-Wl,-rpath,"
5088                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5089                         else
5090                                 cf_ld_rpath_opt="-rpath "
5091                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5092                         fi
5093                 fi
5094                 # tested with IRIX 5.2 and 'cc'.
5095                 if test "$GCC" != yes; then
5096                         CC_SHARED_OPTS='-KPIC'
5097                 fi
5098                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5099                 cf_cv_rm_so_locs=yes
5100                 ;;
5101         linux*|gnu*|k*bsd*-gnu)
5102                 if test "$DFT_LWR_MODEL" = "shared" ; then
5103                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5104                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5105                 fi
5106                 if test "$cf_cv_ld_rpath" = yes ; then
5107                         cf_ld_rpath_opt="-Wl,-rpath,"
5108                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5109                 fi
5110
5111         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5112         if test "$cf_cv_shlib_version" = rel; then
5113                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5114         else
5115                 cf_shared_soname='`basename $@`'
5116         fi
5117
5118                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5119                 ;;
5120         openbsd[2-9].*)
5121                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5122                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5123                 ;;
5124         openbsd*|freebsd[12].*)
5125                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5126                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5127                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5128                 ;;
5129         freebsd*)
5130                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5131                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5132                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5133                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5134                         cf_ld_rpath_opt="-rpath "
5135                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5136                 fi
5137
5138         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5139         if test "$cf_cv_shlib_version" = rel; then
5140                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5141         else
5142                 cf_shared_soname='`basename $@`'
5143         fi
5144
5145                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5146                 ;;
5147         netbsd*)
5148                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5149                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5150                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5151                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5152                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5153                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5154                         if test "$cf_cv_shlib_version" = auto; then
5155                         if test -f /usr/libexec/ld.elf_so; then
5156                                 cf_cv_shlib_version=abi
5157                         else
5158                                 cf_cv_shlib_version=rel
5159                         fi
5160                         fi
5161
5162         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5163         if test "$cf_cv_shlib_version" = rel; then
5164                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165         else
5166                 cf_shared_soname='`basename $@`'
5167         fi
5168
5169                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5170                 else
5171                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5172                 fi
5173                 ;;
5174         osf*|mls+*)
5175                 # tested with OSF/1 V3.2 and 'cc'
5176                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5177                 # link with shared libs).
5178                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5179                 case $host_os in
5180                 osf4*)
5181                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5182                         ;;
5183                 esac
5184                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5185                 if test "$DFT_LWR_MODEL" = "shared" ; then
5186                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5187                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5188                 fi
5189                 if test "$cf_cv_ld_rpath" = yes ; then
5190                         cf_ld_rpath_opt="-rpath"
5191                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5192                 fi
5193                 cf_cv_rm_so_locs=yes
5194                 ;;
5195         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5196                 # tested with osr5.0.5
5197                 if test "$GCC" != yes; then
5198                         CC_SHARED_OPTS='-belf -KPIC'
5199                 fi
5200                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5201                 if test "$cf_cv_ld_rpath" = yes ; then
5202                         # only way is to set LD_RUN_PATH but no switch for it
5203                         RUN_PATH=$libdir
5204                 fi
5205                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5206                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5207                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5208                 ;;
5209         sunos4*)
5210                 # tested with SunOS 4.1.1 and gcc 2.7.0
5211                 if test "$GCC" != yes; then
5212                         CC_SHARED_OPTS='-KPIC'
5213                 fi
5214                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5215                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5216                 ;;
5217         solaris2*)
5218                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5219                 if test "$GCC" != yes; then
5220                         CC_SHARED_OPTS='-KPIC'
5221                 fi
5222                 if test "$DFT_LWR_MODEL" = "shared" ; then
5223                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5225                 fi
5226                 if test "$cf_cv_ld_rpath" = yes ; then
5227                         cf_ld_rpath_opt="-R"
5228                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5229                 fi
5230
5231         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5232         if test "$cf_cv_shlib_version" = rel; then
5233                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5234         else
5235                 cf_shared_soname='`basename $@`'
5236         fi
5237
5238                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5239                 ;;
5240         sysv5uw7*|unix_sv*)
5241                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5242                 if test "$GCC" != yes; then
5243                         CC_SHARED_OPTS='-KPIC'
5244                 fi
5245                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5246                 ;;
5247         *)
5248                 CC_SHARED_OPTS='unknown'
5249                 MK_SHARED_LIB='echo unknown'
5250                 ;;
5251         esac
5252
5253         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5254         case "$cf_cv_shlib_version" in #(vi
5255         rel|abi)
5256                 case "$MK_SHARED_LIB" in #(vi
5257                 *'-o $@')
5258                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5259                         ;;
5260                 *)
5261                         { echo "$as_me:5261: WARNING: ignored --with-shlib-version" >&5
5262 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5263                         ;;
5264                 esac
5265                 ;;
5266         esac
5267
5268         if test -n "$cf_ld_rpath_opt" ; then
5269                 echo "$as_me:5269: checking if we need a space after rpath option" >&5
5270 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5271                 cf_save_LIBS="$LIBS"
5272                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5273                 cat >conftest.$ac_ext <<_ACEOF
5274 #line 5274 "configure"
5275 #include "confdefs.h"
5276
5277 int
5278 main ()
5279 {
5280
5281   ;
5282   return 0;
5283 }
5284 _ACEOF
5285 rm -f conftest.$ac_objext conftest$ac_exeext
5286 if { (eval echo "$as_me:5286: \"$ac_link\"") >&5
5287   (eval $ac_link) 2>&5
5288   ac_status=$?
5289   echo "$as_me:5289: \$? = $ac_status" >&5
5290   (exit $ac_status); } &&
5291          { ac_try='test -s conftest$ac_exeext'
5292   { (eval echo "$as_me:5292: \"$ac_try\"") >&5
5293   (eval $ac_try) 2>&5
5294   ac_status=$?
5295   echo "$as_me:5295: \$? = $ac_status" >&5
5296   (exit $ac_status); }; }; then
5297   cf_rpath_space=no
5298 else
5299   echo "$as_me: failed program was:" >&5
5300 cat conftest.$ac_ext >&5
5301 cf_rpath_space=yes
5302 fi
5303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5304                 LIBS="$cf_save_LIBS"
5305                 echo "$as_me:5305: result: $cf_rpath_space" >&5
5306 echo "${ECHO_T}$cf_rpath_space" >&6
5307                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5308                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5309         fi
5310
5311 if test "$CC_SHARED_OPTS" = "unknown"; then
5312         for model in $cf_list_models; do
5313                 if test "$model" = "shared"; then
5314                         { { echo "$as_me:5314: error: Shared libraries are not supported in this version" >&5
5315 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5316    { (exit 1); exit 1; }; }
5317                 fi
5318         done
5319 fi
5320
5321 ###############################################################################
5322
5323 ###     use option --disable-overwrite to leave out the link to -lcurses
5324 echo "$as_me:5324: checking if you wish to install ncurses overwriting curses" >&5
5325 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5326
5327 # Check whether --enable-overwrite or --disable-overwrite was given.
5328 if test "${enable_overwrite+set}" = set; then
5329   enableval="$enable_overwrite"
5330   with_overwrite=$enableval
5331 else
5332   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5333 fi;
5334 echo "$as_me:5334: result: $with_overwrite" >&5
5335 echo "${ECHO_T}$with_overwrite" >&6
5336
5337 echo "$as_me:5337: checking if external terminfo-database is used" >&5
5338 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5339
5340 # Check whether --enable-database or --disable-database was given.
5341 if test "${enable_database+set}" = set; then
5342   enableval="$enable_database"
5343   use_database=$enableval
5344 else
5345   use_database=yes
5346 fi;
5347 echo "$as_me:5347: result: $use_database" >&5
5348 echo "${ECHO_T}$use_database" >&6
5349
5350 case $host_os in #(vi
5351 os2*) #(vi
5352         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5353         ;;
5354 *) #(vi
5355         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5356         ;;
5357 esac
5358
5359         case $cf_cv_system_name in
5360         os2*)   PATHSEP=';'  ;;
5361         *)      PATHSEP=':'  ;;
5362         esac
5363
5364 if test "$use_database" != no ; then
5365         cat >>confdefs.h <<\EOF
5366 #define USE_DATABASE 1
5367 EOF
5368
5369         echo "$as_me:5369: checking which terminfo source-file will be installed" >&5
5370 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5371
5372 # Check whether --enable-database or --disable-database was given.
5373 if test "${enable_database+set}" = set; then
5374   enableval="$enable_database"
5375   TERMINFO_SRC=$withval
5376 fi;
5377         echo "$as_me:5377: result: $TERMINFO_SRC" >&5
5378 echo "${ECHO_T}$TERMINFO_SRC" >&6
5379
5380         echo "$as_me:5380: checking whether to use hashed database instead of directory/tree" >&5
5381 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5382
5383 # Check whether --with-hashed-db or --without-hashed-db was given.
5384 if test "${with_hashed_db+set}" = set; then
5385   withval="$with_hashed_db"
5386
5387 else
5388   with_hashed_db=no
5389 fi;
5390         echo "$as_me:5390: result: $with_hashed_db" >&5
5391 echo "${ECHO_T}$with_hashed_db" >&6
5392 fi
5393
5394 echo "$as_me:5394: checking for list of fallback descriptions" >&5
5395 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5396
5397 # Check whether --with-fallbacks or --without-fallbacks was given.
5398 if test "${with_fallbacks+set}" = set; then
5399   withval="$with_fallbacks"
5400   with_fallback=$withval
5401 else
5402   with_fallback=
5403 fi;
5404 echo "$as_me:5404: result: $with_fallback" >&5
5405 echo "${ECHO_T}$with_fallback" >&6
5406 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5407
5408 echo "$as_me:5408: checking if you want modern xterm or antique" >&5
5409 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5410
5411 # Check whether --with-xterm-new or --without-xterm-new was given.
5412 if test "${with_xterm_new+set}" = set; then
5413   withval="$with_xterm_new"
5414   with_xterm_new=$withval
5415 else
5416   with_xterm_new=yes
5417 fi;
5418 case $with_xterm_new in
5419 no)     with_xterm_new=xterm-old;;
5420 *)      with_xterm_new=xterm-new;;
5421 esac
5422 echo "$as_me:5422: result: $with_xterm_new" >&5
5423 echo "${ECHO_T}$with_xterm_new" >&6
5424 WHICH_XTERM=$with_xterm_new
5425
5426 MAKE_TERMINFO=
5427 if test "$use_database" = no ; then
5428         TERMINFO="${datadir}/terminfo"
5429         MAKE_TERMINFO="#"
5430 else
5431
5432 echo "$as_me:5432: checking for list of terminfo directories" >&5
5433 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5434
5435 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5436 if test "${with_terminfo_dirs+set}" = set; then
5437   withval="$with_terminfo_dirs"
5438
5439 else
5440   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5441 fi;
5442 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5443 cf_dst_path=
5444 for cf_src_path in $withval
5445 do
5446
5447 if test "x$prefix" != xNONE; then
5448   cf_path_syntax="$prefix"
5449 else
5450   cf_path_syntax="$ac_default_prefix"
5451 fi
5452
5453 case ".$cf_src_path" in #(vi
5454 .\$\(*\)*|.\'*\'*) #(vi
5455   ;;
5456 ..|./*|.\\*) #(vi
5457   ;;
5458 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5459   ;;
5460 .\${*prefix}*) #(vi
5461   eval cf_src_path="$cf_src_path"
5462   case ".$cf_src_path" in #(vi
5463   .NONE/*)
5464     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5465     ;;
5466   esac
5467   ;; #(vi
5468 .no|.NONE/*)
5469   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5470   ;;
5471 *)
5472   { { echo "$as_me:5472: error: expected a pathname, not \"$cf_src_path\"" >&5
5473 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5474    { (exit 1); exit 1; }; }
5475   ;;
5476 esac
5477
5478   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5479   cf_dst_path="${cf_dst_path}${cf_src_path}"
5480 done
5481 IFS="$ac_save_ifs"
5482
5483 eval 'TERMINFO_DIRS="$cf_dst_path"'
5484
5485 echo "$as_me:5485: result: $TERMINFO_DIRS" >&5
5486 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5487 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5488 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5489 EOF
5490
5491 echo "$as_me:5491: checking for default terminfo directory" >&5
5492 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5493
5494 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5495 if test "${with_default_terminfo_dir+set}" = set; then
5496   withval="$with_default_terminfo_dir"
5497
5498 else
5499   withval="${TERMINFO-${datadir}/terminfo}"
5500 fi; if test -n "${datadir}/terminfo" ; then
5501
5502 if test "x$prefix" != xNONE; then
5503   cf_path_syntax="$prefix"
5504 else
5505   cf_path_syntax="$ac_default_prefix"
5506 fi
5507
5508 case ".$withval" in #(vi
5509 .\$\(*\)*|.\'*\'*) #(vi
5510   ;;
5511 ..|./*|.\\*) #(vi
5512   ;;
5513 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5514   ;;
5515 .\${*prefix}*) #(vi
5516   eval withval="$withval"
5517   case ".$withval" in #(vi
5518   .NONE/*)
5519     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5520     ;;
5521   esac
5522   ;; #(vi
5523 .no|.NONE/*)
5524   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5525   ;;
5526 *)
5527   { { echo "$as_me:5527: error: expected a pathname, not \"$withval\"" >&5
5528 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5529    { (exit 1); exit 1; }; }
5530   ;;
5531 esac
5532
5533 fi
5534 TERMINFO="$withval"
5535
5536 echo "$as_me:5536: result: $TERMINFO" >&5
5537 echo "${ECHO_T}$TERMINFO" >&6
5538 cat >>confdefs.h <<EOF
5539 #define TERMINFO "$TERMINFO"
5540 EOF
5541
5542 fi
5543
5544 ###     use option --disable-big-core to make tic run on small machines
5545 ###     We need 4Mb, check if we can allocate 50% more than that.
5546 echo "$as_me:5546: checking if big-core option selected" >&5
5547 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5548
5549 # Check whether --enable-big-core or --disable-big-core was given.
5550 if test "${enable_big_core+set}" = set; then
5551   enableval="$enable_big_core"
5552   with_big_core=$enableval
5553 else
5554   if test "$cross_compiling" = yes; then
5555   with_big_core=no
5556 else
5557   cat >conftest.$ac_ext <<_ACEOF
5558 #line 5558 "configure"
5559 #include "confdefs.h"
5560
5561 #include <stdlib.h>
5562 #include <string.h>
5563 int main() {
5564         unsigned long n = 6000000L;
5565         char *s = malloc(n);
5566         if (s != 0)
5567                 s[0] = s[n-1] = 0;
5568         ${cf_cv_main_return:-return}(s == 0);
5569 }
5570 _ACEOF
5571 rm -f conftest$ac_exeext
5572 if { (eval echo "$as_me:5572: \"$ac_link\"") >&5
5573   (eval $ac_link) 2>&5
5574   ac_status=$?
5575   echo "$as_me:5575: \$? = $ac_status" >&5
5576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5577   { (eval echo "$as_me:5577: \"$ac_try\"") >&5
5578   (eval $ac_try) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); }; }; then
5582   with_big_core=yes
5583 else
5584   echo "$as_me: program exited with status $ac_status" >&5
5585 echo "$as_me: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5587 with_big_core=no
5588 fi
5589 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5590 fi
5591 fi;
5592 echo "$as_me:5592: result: $with_big_core" >&5
5593 echo "${ECHO_T}$with_big_core" >&6
5594 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5595 #define HAVE_BIG_CORE 1
5596 EOF
5597
5598 ### ISO C only guarantees 512-char strings, we have tables which load faster
5599 ### when constructed using "big" strings.
5600 echo "$as_me:5600: checking if big-strings option selected" >&5
5601 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5602
5603 # Check whether --enable-big-strings or --disable-big-strings was given.
5604 if test "${enable_big_strings+set}" = set; then
5605   enableval="$enable_big_strings"
5606   with_big_strings=no
5607 else
5608   with_big_strings=yes
5609 fi;
5610 echo "$as_me:5610: result: $with_big_strings" >&5
5611 echo "${ECHO_T}$with_big_strings" >&6
5612
5613 USE_BIG_STRINGS=0
5614 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5615
5616 ###     use option --enable-termcap to compile in the termcap fallback support
5617 echo "$as_me:5617: checking if you want termcap-fallback support" >&5
5618 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5619
5620 # Check whether --enable-termcap or --disable-termcap was given.
5621 if test "${enable_termcap+set}" = set; then
5622   enableval="$enable_termcap"
5623   with_termcap=$enableval
5624 else
5625   with_termcap=no
5626 fi;
5627 echo "$as_me:5627: result: $with_termcap" >&5
5628 echo "${ECHO_T}$with_termcap" >&6
5629
5630 if test "$with_termcap" != "yes" ; then
5631         if test "$use_database" = no ; then
5632                 if test -z "$with_fallback" ; then
5633                         { { echo "$as_me:5633: error: You have disabled the database w/o specifying fallbacks" >&5
5634 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5635    { (exit 1); exit 1; }; }
5636                 fi
5637         fi
5638         cat >>confdefs.h <<\EOF
5639 #define PURE_TERMINFO 1
5640 EOF
5641
5642 else
5643
5644 if test "$with_ticlib" != no ; then
5645         { { echo "$as_me:5645: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5646 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5647    { (exit 1); exit 1; }; }
5648 fi
5649
5650 cat >>confdefs.h <<\EOF
5651 #define USE_TERMCAP 1
5652 EOF
5653
5654 echo "$as_me:5654: checking for list of termcap files" >&5
5655 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5656
5657 # Check whether --with-termpath or --without-termpath was given.
5658 if test "${with_termpath+set}" = set; then
5659   withval="$with_termpath"
5660
5661 else
5662   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5663 fi;
5664 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5665 cf_dst_path=
5666 for cf_src_path in $withval
5667 do
5668
5669 if test "x$prefix" != xNONE; then
5670   cf_path_syntax="$prefix"
5671 else
5672   cf_path_syntax="$ac_default_prefix"
5673 fi
5674
5675 case ".$cf_src_path" in #(vi
5676 .\$\(*\)*|.\'*\'*) #(vi
5677   ;;
5678 ..|./*|.\\*) #(vi
5679   ;;
5680 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5681   ;;
5682 .\${*prefix}*) #(vi
5683   eval cf_src_path="$cf_src_path"
5684   case ".$cf_src_path" in #(vi
5685   .NONE/*)
5686     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5687     ;;
5688   esac
5689   ;; #(vi
5690 .no|.NONE/*)
5691   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5692   ;;
5693 *)
5694   { { echo "$as_me:5694: error: expected a pathname, not \"$cf_src_path\"" >&5
5695 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5696    { (exit 1); exit 1; }; }
5697   ;;
5698 esac
5699
5700   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5701   cf_dst_path="${cf_dst_path}${cf_src_path}"
5702 done
5703 IFS="$ac_save_ifs"
5704
5705 eval 'TERMPATH="$cf_dst_path"'
5706
5707 echo "$as_me:5707: result: $TERMPATH" >&5
5708 echo "${ECHO_T}$TERMPATH" >&6
5709 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5710 #define TERMPATH "$TERMPATH"
5711 EOF
5712
5713 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5714 echo "$as_me:5714: checking if fast termcap-loader is needed" >&5
5715 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5716
5717 # Check whether --enable-getcap or --disable-getcap was given.
5718 if test "${enable_getcap+set}" = set; then
5719   enableval="$enable_getcap"
5720   with_getcap=$enableval
5721 else
5722   with_getcap=no
5723 fi;
5724 echo "$as_me:5724: result: $with_getcap" >&5
5725 echo "${ECHO_T}$with_getcap" >&6
5726 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5727 #define USE_GETCAP 1
5728 EOF
5729
5730 echo "$as_me:5730: checking if translated termcaps will be cached in ~/.terminfo" >&5
5731 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5732
5733 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5734 if test "${enable_getcap_cache+set}" = set; then
5735   enableval="$enable_getcap_cache"
5736   with_getcap_cache=$enableval
5737 else
5738   with_getcap_cache=no
5739 fi;
5740 echo "$as_me:5740: result: $with_getcap_cache" >&5
5741 echo "${ECHO_T}$with_getcap_cache" >&6
5742 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5743 #define USE_GETCAP_CACHE 1
5744 EOF
5745
5746 fi
5747
5748 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5749 echo "$as_me:5749: checking if ~/.terminfo is wanted" >&5
5750 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5751
5752 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5753 if test "${enable_home_terminfo+set}" = set; then
5754   enableval="$enable_home_terminfo"
5755   with_home_terminfo=$enableval
5756 else
5757   with_home_terminfo=yes
5758 fi;
5759 echo "$as_me:5759: result: $with_home_terminfo" >&5
5760 echo "${ECHO_T}$with_home_terminfo" >&6
5761 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5762 #define USE_HOME_TERMINFO 1
5763 EOF
5764
5765 echo "$as_me:5765: checking if you want to use restricted environment when running as root" >&5
5766 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5767
5768 # Check whether --enable-root-environ or --disable-root-environ was given.
5769 if test "${enable_root_environ+set}" = set; then
5770   enableval="$enable_root_environ"
5771   with_root_environ=$enableval
5772 else
5773   with_root_environ=yes
5774 fi;
5775 echo "$as_me:5775: result: $with_root_environ" >&5
5776 echo "${ECHO_T}$with_root_environ" >&6
5777 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5778 #define USE_ROOT_ENVIRON 1
5779 EOF
5780
5781 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5782 ###   to reduce storage requirements for the terminfo database.
5783
5784 for ac_func in \
5785         remove \
5786         unlink
5787 do
5788 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5789 echo "$as_me:5789: checking for $ac_func" >&5
5790 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5791 if eval "test \"\${$as_ac_var+set}\" = set"; then
5792   echo $ECHO_N "(cached) $ECHO_C" >&6
5793 else
5794   cat >conftest.$ac_ext <<_ACEOF
5795 #line 5795 "configure"
5796 #include "confdefs.h"
5797 /* System header to define __stub macros and hopefully few prototypes,
5798     which can conflict with char $ac_func (); below.  */
5799 #include <assert.h>
5800 /* Override any gcc2 internal prototype to avoid an error.  */
5801 #ifdef __cplusplus
5802 extern "C"
5803 #endif
5804 /* We use char because int might match the return type of a gcc2
5805    builtin and then its argument prototype would still apply.  */
5806 char $ac_func ();
5807 char (*f) ();
5808
5809 int
5810 main ()
5811 {
5812 /* The GNU C library defines this for functions which it implements
5813     to always fail with ENOSYS.  Some functions are actually named
5814     something starting with __ and the normal name is an alias.  */
5815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5816 choke me
5817 #else
5818 f = $ac_func;
5819 #endif
5820
5821   ;
5822   return 0;
5823 }
5824 _ACEOF
5825 rm -f conftest.$ac_objext conftest$ac_exeext
5826 if { (eval echo "$as_me:5826: \"$ac_link\"") >&5
5827   (eval $ac_link) 2>&5
5828   ac_status=$?
5829   echo "$as_me:5829: \$? = $ac_status" >&5
5830   (exit $ac_status); } &&
5831          { ac_try='test -s conftest$ac_exeext'
5832   { (eval echo "$as_me:5832: \"$ac_try\"") >&5
5833   (eval $ac_try) 2>&5
5834   ac_status=$?
5835   echo "$as_me:5835: \$? = $ac_status" >&5
5836   (exit $ac_status); }; }; then
5837   eval "$as_ac_var=yes"
5838 else
5839   echo "$as_me: failed program was:" >&5
5840 cat conftest.$ac_ext >&5
5841 eval "$as_ac_var=no"
5842 fi
5843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5844 fi
5845 echo "$as_me:5845: result: `eval echo '${'$as_ac_var'}'`" >&5
5846 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5847 if test `eval echo '${'$as_ac_var'}'` = yes; then
5848   cat >>confdefs.h <<EOF
5849 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5850 EOF
5851
5852 fi
5853 done
5854
5855 if test "$cross_compiling" = yes ; then
5856
5857 for ac_func in \
5858                 link \
5859                 symlink
5860 do
5861 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5862 echo "$as_me:5862: checking for $ac_func" >&5
5863 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5864 if eval "test \"\${$as_ac_var+set}\" = set"; then
5865   echo $ECHO_N "(cached) $ECHO_C" >&6
5866 else
5867   cat >conftest.$ac_ext <<_ACEOF
5868 #line 5868 "configure"
5869 #include "confdefs.h"
5870 /* System header to define __stub macros and hopefully few prototypes,
5871     which can conflict with char $ac_func (); below.  */
5872 #include <assert.h>
5873 /* Override any gcc2 internal prototype to avoid an error.  */
5874 #ifdef __cplusplus
5875 extern "C"
5876 #endif
5877 /* We use char because int might match the return type of a gcc2
5878    builtin and then its argument prototype would still apply.  */
5879 char $ac_func ();
5880 char (*f) ();
5881
5882 int
5883 main ()
5884 {
5885 /* The GNU C library defines this for functions which it implements
5886     to always fail with ENOSYS.  Some functions are actually named
5887     something starting with __ and the normal name is an alias.  */
5888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5889 choke me
5890 #else
5891 f = $ac_func;
5892 #endif
5893
5894   ;
5895   return 0;
5896 }
5897 _ACEOF
5898 rm -f conftest.$ac_objext conftest$ac_exeext
5899 if { (eval echo "$as_me:5899: \"$ac_link\"") >&5
5900   (eval $ac_link) 2>&5
5901   ac_status=$?
5902   echo "$as_me:5902: \$? = $ac_status" >&5
5903   (exit $ac_status); } &&
5904          { ac_try='test -s conftest$ac_exeext'
5905   { (eval echo "$as_me:5905: \"$ac_try\"") >&5
5906   (eval $ac_try) 2>&5
5907   ac_status=$?
5908   echo "$as_me:5908: \$? = $ac_status" >&5
5909   (exit $ac_status); }; }; then
5910   eval "$as_ac_var=yes"
5911 else
5912   echo "$as_me: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 eval "$as_ac_var=no"
5915 fi
5916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5917 fi
5918 echo "$as_me:5918: result: `eval echo '${'$as_ac_var'}'`" >&5
5919 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5920 if test `eval echo '${'$as_ac_var'}'` = yes; then
5921   cat >>confdefs.h <<EOF
5922 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5923 EOF
5924
5925 fi
5926 done
5927
5928 else
5929         echo "$as_me:5929: checking if link/symlink functions work" >&5
5930 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5931 if test "${cf_cv_link_funcs+set}" = set; then
5932   echo $ECHO_N "(cached) $ECHO_C" >&6
5933 else
5934
5935                 cf_cv_link_funcs=
5936                 for cf_func in link symlink ; do
5937                         if test "$cross_compiling" = yes; then
5938
5939                         eval 'ac_cv_func_'$cf_func'=error'
5940 else
5941   cat >conftest.$ac_ext <<_ACEOF
5942 #line 5942 "configure"
5943 #include "confdefs.h"
5944
5945 #include <sys/types.h>
5946 #include <sys/stat.h>
5947 #ifdef HAVE_UNISTD_H
5948 #include <unistd.h>
5949 #endif
5950 int main()
5951 {
5952         int fail = 0;
5953         char *src = "config.log";
5954         char *dst = "conftest.chk";
5955         struct stat src_sb;
5956         struct stat dst_sb;
5957
5958         stat(src, &src_sb);
5959         fail = ($cf_func("config.log", "conftest.chk") < 0)
5960             || (stat(dst, &dst_sb) < 0)
5961             || (dst_sb.st_mtime != src_sb.st_mtime);
5962 #ifdef HAVE_UNLINK
5963         unlink(dst);
5964 #else
5965         remove(dst);
5966 #endif
5967         ${cf_cv_main_return:-return} (fail);
5968 }
5969
5970 _ACEOF
5971 rm -f conftest$ac_exeext
5972 if { (eval echo "$as_me:5972: \"$ac_link\"") >&5
5973   (eval $ac_link) 2>&5
5974   ac_status=$?
5975   echo "$as_me:5975: \$? = $ac_status" >&5
5976   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5977   { (eval echo "$as_me:5977: \"$ac_try\"") >&5
5978   (eval $ac_try) 2>&5
5979   ac_status=$?
5980   echo "$as_me:5980: \$? = $ac_status" >&5
5981   (exit $ac_status); }; }; then
5982
5983                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5984                         eval 'ac_cv_func_'$cf_func'=yes'
5985 else
5986   echo "$as_me: program exited with status $ac_status" >&5
5987 echo "$as_me: failed program was:" >&5
5988 cat conftest.$ac_ext >&5
5989
5990                         eval 'ac_cv_func_'$cf_func'=no'
5991 fi
5992 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5993 fi
5994                 done
5995                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5996
5997 fi
5998 echo "$as_me:5998: result: $cf_cv_link_funcs" >&5
5999 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6000         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6001 #define HAVE_LINK 1
6002 EOF
6003
6004         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6005 #define HAVE_SYMLINK 1
6006 EOF
6007
6008 fi
6009
6010 with_links=no
6011 with_symlinks=no
6012
6013 # soft links (symbolic links) are useful for some systems where hard links do
6014 # not work, or to make it simpler to copy terminfo trees around.
6015 if test "$ac_cv_func_symlink" = yes ; then
6016     echo "$as_me:6016: checking if tic should use symbolic links" >&5
6017 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6018
6019 # Check whether --enable-symlinks or --disable-symlinks was given.
6020 if test "${enable_symlinks+set}" = set; then
6021   enableval="$enable_symlinks"
6022   with_symlinks=$enableval
6023 else
6024   with_symlinks=no
6025 fi;
6026     echo "$as_me:6026: result: $with_symlinks" >&5
6027 echo "${ECHO_T}$with_symlinks" >&6
6028 fi
6029
6030 # If we have hard links and did not choose to use soft links instead, there is
6031 # no reason to make this choice optional - use the hard links.
6032 if test "$with_symlinks" = no ; then
6033     echo "$as_me:6033: checking if tic should use hard links" >&5
6034 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6035     if test "$ac_cv_func_link" = yes ; then
6036         with_links=yes
6037     else
6038         with_links=no
6039     fi
6040     echo "$as_me:6040: result: $with_links" >&5
6041 echo "${ECHO_T}$with_links" >&6
6042 fi
6043
6044 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6045 #define USE_LINKS 1
6046 EOF
6047
6048 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6049 #define USE_SYMLINKS 1
6050 EOF
6051
6052 ###   use option --enable-broken-linker to force on use of broken-linker support
6053 echo "$as_me:6053: checking if you want broken-linker support code" >&5
6054 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6055
6056 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6057 if test "${enable_broken_linker+set}" = set; then
6058   enableval="$enable_broken_linker"
6059   with_broken_linker=$enableval
6060 else
6061   with_broken_linker=${BROKEN_LINKER-no}
6062 fi;
6063 echo "$as_me:6063: result: $with_broken_linker" >&5
6064 echo "${ECHO_T}$with_broken_linker" >&6
6065
6066 BROKEN_LINKER=0
6067 if test "$with_broken_linker" = yes ; then
6068         cat >>confdefs.h <<\EOF
6069 #define BROKEN_LINKER 1
6070 EOF
6071
6072         BROKEN_LINKER=1
6073 elif test "$DFT_LWR_MODEL" = shared ; then
6074         case $cf_cv_system_name in #(vi
6075         cygwin*)
6076                 cat >>confdefs.h <<\EOF
6077 #define BROKEN_LINKER 1
6078 EOF
6079
6080                 BROKEN_LINKER=1
6081                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6082
6083 echo "${as_me-configure}:6083: testing cygwin linker is broken anyway ..." 1>&5
6084
6085                 ;;
6086         esac
6087 fi
6088
6089 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6090 echo "$as_me:6090: checking if tputs should process BSD-style prefix padding" >&5
6091 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6092
6093 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6094 if test "${enable_bsdpad+set}" = set; then
6095   enableval="$enable_bsdpad"
6096   with_bsdpad=$enableval
6097 else
6098   with_bsdpad=no
6099 fi;
6100 echo "$as_me:6100: result: $with_bsdpad" >&5
6101 echo "${ECHO_T}$with_bsdpad" >&6
6102 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6103 #define BSD_TPUTS 1
6104 EOF
6105
6106 ###   use option --enable-widec to turn on use of wide-character support
6107 NCURSES_CH_T=chtype
6108 NCURSES_LIBUTF8=0
6109
6110 NEED_WCHAR_H=0
6111 NCURSES_MBSTATE_T=0
6112 NCURSES_WCHAR_T=0
6113 NCURSES_WINT_T=0
6114
6115 # Check to define _XOPEN_SOURCE "automatically"
6116
6117 echo "$as_me:6117: checking if $CC -U and -D options work together" >&5
6118 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6119 if test "${cf_cv_cc_u_d_options+set}" = set; then
6120   echo $ECHO_N "(cached) $ECHO_C" >&6
6121 else
6122
6123         cf_save_CPPFLAGS="$CPPFLAGS"
6124         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6125         cat >conftest.$ac_ext <<_ACEOF
6126 #line 6126 "configure"
6127 #include "confdefs.h"
6128
6129 int
6130 main ()
6131 {
6132
6133 #ifndef U_D_OPTIONS
6134 make an undefined-error
6135 #endif
6136 #ifdef  D_U_OPTIONS
6137 make a defined-error
6138 #endif
6139
6140   ;
6141   return 0;
6142 }
6143 _ACEOF
6144 rm -f conftest.$ac_objext
6145 if { (eval echo "$as_me:6145: \"$ac_compile\"") >&5
6146   (eval $ac_compile) 2>&5
6147   ac_status=$?
6148   echo "$as_me:6148: \$? = $ac_status" >&5
6149   (exit $ac_status); } &&
6150          { ac_try='test -s conftest.$ac_objext'
6151   { (eval echo "$as_me:6151: \"$ac_try\"") >&5
6152   (eval $ac_try) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit $ac_status); }; }; then
6156
6157         cf_cv_cc_u_d_options=yes
6158 else
6159   echo "$as_me: failed program was:" >&5
6160 cat conftest.$ac_ext >&5
6161
6162         cf_cv_cc_u_d_options=no
6163 fi
6164 rm -f conftest.$ac_objext conftest.$ac_ext
6165         CPPFLAGS="$cf_save_CPPFLAGS"
6166
6167 fi
6168 echo "$as_me:6168: result: $cf_cv_cc_u_d_options" >&5
6169 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6170
6171 cf_XOPEN_SOURCE=500
6172 cf_POSIX_C_SOURCE=199506L
6173
6174 case $host_os in #(vi
6175 aix[45]*) #(vi
6176         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6177         ;;
6178 freebsd*) #(vi
6179         # 5.x headers associate
6180         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6181         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6182         cf_POSIX_C_SOURCE=200112L
6183         cf_XOPEN_SOURCE=600
6184         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6185         ;;
6186 hpux*) #(vi
6187         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6188         ;;
6189 irix[56].*) #(vi
6190         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6191         ;;
6192 linux*|gnu*|k*bsd*-gnu) #(vi
6193
6194 echo "$as_me:6194: checking if we must define _GNU_SOURCE" >&5
6195 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6196 if test "${cf_cv_gnu_source+set}" = set; then
6197   echo $ECHO_N "(cached) $ECHO_C" >&6
6198 else
6199
6200 cat >conftest.$ac_ext <<_ACEOF
6201 #line 6201 "configure"
6202 #include "confdefs.h"
6203 #include <sys/types.h>
6204 int
6205 main ()
6206 {
6207
6208 #ifndef _XOPEN_SOURCE
6209 make an error
6210 #endif
6211   ;
6212   return 0;
6213 }
6214 _ACEOF
6215 rm -f conftest.$ac_objext
6216 if { (eval echo "$as_me:6216: \"$ac_compile\"") >&5
6217   (eval $ac_compile) 2>&5
6218   ac_status=$?
6219   echo "$as_me:6219: \$? = $ac_status" >&5
6220   (exit $ac_status); } &&
6221          { ac_try='test -s conftest.$ac_objext'
6222   { (eval echo "$as_me:6222: \"$ac_try\"") >&5
6223   (eval $ac_try) 2>&5
6224   ac_status=$?
6225   echo "$as_me:6225: \$? = $ac_status" >&5
6226   (exit $ac_status); }; }; then
6227   cf_cv_gnu_source=no
6228 else
6229   echo "$as_me: failed program was:" >&5
6230 cat conftest.$ac_ext >&5
6231 cf_save="$CPPFLAGS"
6232          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6233          cat >conftest.$ac_ext <<_ACEOF
6234 #line 6234 "configure"
6235 #include "confdefs.h"
6236 #include <sys/types.h>
6237 int
6238 main ()
6239 {
6240
6241 #ifdef _XOPEN_SOURCE
6242 make an error
6243 #endif
6244   ;
6245   return 0;
6246 }
6247 _ACEOF
6248 rm -f conftest.$ac_objext
6249 if { (eval echo "$as_me:6249: \"$ac_compile\"") >&5
6250   (eval $ac_compile) 2>&5
6251   ac_status=$?
6252   echo "$as_me:6252: \$? = $ac_status" >&5
6253   (exit $ac_status); } &&
6254          { ac_try='test -s conftest.$ac_objext'
6255   { (eval echo "$as_me:6255: \"$ac_try\"") >&5
6256   (eval $ac_try) 2>&5
6257   ac_status=$?
6258   echo "$as_me:6258: \$? = $ac_status" >&5
6259   (exit $ac_status); }; }; then
6260   cf_cv_gnu_source=no
6261 else
6262   echo "$as_me: failed program was:" >&5
6263 cat conftest.$ac_ext >&5
6264 cf_cv_gnu_source=yes
6265 fi
6266 rm -f conftest.$ac_objext conftest.$ac_ext
6267         CPPFLAGS="$cf_save"
6268
6269 fi
6270 rm -f conftest.$ac_objext conftest.$ac_ext
6271
6272 fi
6273 echo "$as_me:6273: result: $cf_cv_gnu_source" >&5
6274 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6275 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6276
6277         ;;
6278 mirbsd*) #(vi
6279         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6280         ;;
6281 netbsd*) #(vi
6282         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6283         ;;
6284 openbsd*) #(vi
6285         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6286         ;;
6287 osf[45]*) #(vi
6288         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6289         ;;
6290 nto-qnx*) #(vi
6291         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6292         ;;
6293 sco*) #(vi
6294         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6295         ;;
6296 solaris*) #(vi
6297         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6298         ;;
6299 *)
6300         echo "$as_me:6300: checking if we should define _XOPEN_SOURCE" >&5
6301 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6302 if test "${cf_cv_xopen_source+set}" = set; then
6303   echo $ECHO_N "(cached) $ECHO_C" >&6
6304 else
6305
6306         cat >conftest.$ac_ext <<_ACEOF
6307 #line 6307 "configure"
6308 #include "confdefs.h"
6309 #include <sys/types.h>
6310 int
6311 main ()
6312 {
6313
6314 #ifndef _XOPEN_SOURCE
6315 make an error
6316 #endif
6317   ;
6318   return 0;
6319 }
6320 _ACEOF
6321 rm -f conftest.$ac_objext
6322 if { (eval echo "$as_me:6322: \"$ac_compile\"") >&5
6323   (eval $ac_compile) 2>&5
6324   ac_status=$?
6325   echo "$as_me:6325: \$? = $ac_status" >&5
6326   (exit $ac_status); } &&
6327          { ac_try='test -s conftest.$ac_objext'
6328   { (eval echo "$as_me:6328: \"$ac_try\"") >&5
6329   (eval $ac_try) 2>&5
6330   ac_status=$?
6331   echo "$as_me:6331: \$? = $ac_status" >&5
6332   (exit $ac_status); }; }; then
6333   cf_cv_xopen_source=no
6334 else
6335   echo "$as_me: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6337 cf_save="$CPPFLAGS"
6338          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6339          cat >conftest.$ac_ext <<_ACEOF
6340 #line 6340 "configure"
6341 #include "confdefs.h"
6342 #include <sys/types.h>
6343 int
6344 main ()
6345 {
6346
6347 #ifdef _XOPEN_SOURCE
6348 make an error
6349 #endif
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 rm -f conftest.$ac_objext
6355 if { (eval echo "$as_me:6355: \"$ac_compile\"") >&5
6356   (eval $ac_compile) 2>&5
6357   ac_status=$?
6358   echo "$as_me:6358: \$? = $ac_status" >&5
6359   (exit $ac_status); } &&
6360          { ac_try='test -s conftest.$ac_objext'
6361   { (eval echo "$as_me:6361: \"$ac_try\"") >&5
6362   (eval $ac_try) 2>&5
6363   ac_status=$?
6364   echo "$as_me:6364: \$? = $ac_status" >&5
6365   (exit $ac_status); }; }; then
6366   cf_cv_xopen_source=no
6367 else
6368   echo "$as_me: failed program was:" >&5
6369 cat conftest.$ac_ext >&5
6370 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6371 fi
6372 rm -f conftest.$ac_objext conftest.$ac_ext
6373         CPPFLAGS="$cf_save"
6374
6375 fi
6376 rm -f conftest.$ac_objext conftest.$ac_ext
6377
6378 fi
6379 echo "$as_me:6379: result: $cf_cv_xopen_source" >&5
6380 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6381         if test "$cf_cv_xopen_source" != no ; then
6382
6383 # remove _XOPEN_SOURCE symbol from $CFLAGS
6384 CFLAGS=`echo "$CFLAGS" | \
6385         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6386                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6387
6388 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6389 CPPFLAGS=`echo "$CPPFLAGS" | \
6390         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6391                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6392
6393                 test "$cf_cv_cc_u_d_options" = yes && \
6394                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6395                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6396         fi
6397
6398 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6399
6400 cf_save_CFLAGS="$CFLAGS"
6401 cf_save_CPPFLAGS="$CPPFLAGS"
6402
6403 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6404 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6405         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6406                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6407
6408 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6409 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6410         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6411                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6412
6413 echo "$as_me:6413: checking if we should define _POSIX_C_SOURCE" >&5
6414 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6415 if test "${cf_cv_posix_c_source+set}" = set; then
6416   echo $ECHO_N "(cached) $ECHO_C" >&6
6417 else
6418
6419 echo "${as_me-configure}:6419: testing if the symbol is already defined go no further ..." 1>&5
6420
6421         cat >conftest.$ac_ext <<_ACEOF
6422 #line 6422 "configure"
6423 #include "confdefs.h"
6424 #include <sys/types.h>
6425 int
6426 main ()
6427 {
6428
6429 #ifndef _POSIX_C_SOURCE
6430 make an error
6431 #endif
6432   ;
6433   return 0;
6434 }
6435 _ACEOF
6436 rm -f conftest.$ac_objext
6437 if { (eval echo "$as_me:6437: \"$ac_compile\"") >&5
6438   (eval $ac_compile) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); } &&
6442          { ac_try='test -s conftest.$ac_objext'
6443   { (eval echo "$as_me:6443: \"$ac_try\"") >&5
6444   (eval $ac_try) 2>&5
6445   ac_status=$?
6446   echo "$as_me:6446: \$? = $ac_status" >&5
6447   (exit $ac_status); }; }; then
6448   cf_cv_posix_c_source=no
6449 else
6450   echo "$as_me: failed program was:" >&5
6451 cat conftest.$ac_ext >&5
6452 cf_want_posix_source=no
6453          case .$cf_POSIX_C_SOURCE in #(vi
6454          .[12]??*) #(vi
6455                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6456                 ;;
6457          .2) #(vi
6458                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6459                 cf_want_posix_source=yes
6460                 ;;
6461          .*)
6462                 cf_want_posix_source=yes
6463                 ;;
6464          esac
6465          if test "$cf_want_posix_source" = yes ; then
6466                 cat >conftest.$ac_ext <<_ACEOF
6467 #line 6467 "configure"
6468 #include "confdefs.h"
6469 #include <sys/types.h>
6470 int
6471 main ()
6472 {
6473
6474 #ifdef _POSIX_SOURCE
6475 make an error
6476 #endif
6477   ;
6478   return 0;
6479 }
6480 _ACEOF
6481 rm -f conftest.$ac_objext
6482 if { (eval echo "$as_me:6482: \"$ac_compile\"") >&5
6483   (eval $ac_compile) 2>&5
6484   ac_status=$?
6485   echo "$as_me:6485: \$? = $ac_status" >&5
6486   (exit $ac_status); } &&
6487          { ac_try='test -s conftest.$ac_objext'
6488   { (eval echo "$as_me:6488: \"$ac_try\"") >&5
6489   (eval $ac_try) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit $ac_status); }; }; then
6493   :
6494 else
6495   echo "$as_me: failed program was:" >&5
6496 cat conftest.$ac_ext >&5
6497 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6498 fi
6499 rm -f conftest.$ac_objext conftest.$ac_ext
6500          fi
6501
6502 echo "${as_me-configure}:6502: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6503
6504          CFLAGS="$cf_trim_CFLAGS"
6505          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6506
6507 echo "${as_me-configure}:6507: testing if the second compile does not leave our definition intact error ..." 1>&5
6508
6509          cat >conftest.$ac_ext <<_ACEOF
6510 #line 6510 "configure"
6511 #include "confdefs.h"
6512 #include <sys/types.h>
6513 int
6514 main ()
6515 {
6516
6517 #ifndef _POSIX_C_SOURCE
6518 make an error
6519 #endif
6520   ;
6521   return 0;
6522 }
6523 _ACEOF
6524 rm -f conftest.$ac_objext
6525 if { (eval echo "$as_me:6525: \"$ac_compile\"") >&5
6526   (eval $ac_compile) 2>&5
6527   ac_status=$?
6528   echo "$as_me:6528: \$? = $ac_status" >&5
6529   (exit $ac_status); } &&
6530          { ac_try='test -s conftest.$ac_objext'
6531   { (eval echo "$as_me:6531: \"$ac_try\"") >&5
6532   (eval $ac_try) 2>&5
6533   ac_status=$?
6534   echo "$as_me:6534: \$? = $ac_status" >&5
6535   (exit $ac_status); }; }; then
6536   :
6537 else
6538   echo "$as_me: failed program was:" >&5
6539 cat conftest.$ac_ext >&5
6540 cf_cv_posix_c_source=no
6541 fi
6542 rm -f conftest.$ac_objext conftest.$ac_ext
6543          CFLAGS="$cf_save_CFLAGS"
6544          CPPFLAGS="$cf_save_CPPFLAGS"
6545
6546 fi
6547 rm -f conftest.$ac_objext conftest.$ac_ext
6548
6549 fi
6550 echo "$as_me:6550: result: $cf_cv_posix_c_source" >&5
6551 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6552
6553 if test "$cf_cv_posix_c_source" != no ; then
6554         CFLAGS="$cf_trim_CFLAGS"
6555         CPPFLAGS="$cf_trim_CPPFLAGS"
6556         if test "$cf_cv_cc_u_d_options" = yes ; then
6557                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6558                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6559                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6560         fi
6561         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6562 fi
6563
6564         ;;
6565 esac
6566
6567 # Work around breakage on OS X
6568
6569 echo "$as_me:6569: checking if SIGWINCH is defined" >&5
6570 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6571 if test "${cf_cv_define_sigwinch+set}" = set; then
6572   echo $ECHO_N "(cached) $ECHO_C" >&6
6573 else
6574
6575         cat >conftest.$ac_ext <<_ACEOF
6576 #line 6576 "configure"
6577 #include "confdefs.h"
6578
6579 #include <sys/types.h>
6580 #include <sys/signal.h>
6581
6582 int
6583 main ()
6584 {
6585 int x = SIGWINCH
6586   ;
6587   return 0;
6588 }
6589 _ACEOF
6590 rm -f conftest.$ac_objext
6591 if { (eval echo "$as_me:6591: \"$ac_compile\"") >&5
6592   (eval $ac_compile) 2>&5
6593   ac_status=$?
6594   echo "$as_me:6594: \$? = $ac_status" >&5
6595   (exit $ac_status); } &&
6596          { ac_try='test -s conftest.$ac_objext'
6597   { (eval echo "$as_me:6597: \"$ac_try\"") >&5
6598   (eval $ac_try) 2>&5
6599   ac_status=$?
6600   echo "$as_me:6600: \$? = $ac_status" >&5
6601   (exit $ac_status); }; }; then
6602   cf_cv_define_sigwinch=yes
6603 else
6604   echo "$as_me: failed program was:" >&5
6605 cat conftest.$ac_ext >&5
6606 cat >conftest.$ac_ext <<_ACEOF
6607 #line 6607 "configure"
6608 #include "confdefs.h"
6609
6610 #undef _XOPEN_SOURCE
6611 #undef _POSIX_SOURCE
6612 #undef _POSIX_C_SOURCE
6613 #include <sys/types.h>
6614 #include <sys/signal.h>
6615
6616 int
6617 main ()
6618 {
6619 int x = SIGWINCH
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -f conftest.$ac_objext
6625 if { (eval echo "$as_me:6625: \"$ac_compile\"") >&5
6626   (eval $ac_compile) 2>&5
6627   ac_status=$?
6628   echo "$as_me:6628: \$? = $ac_status" >&5
6629   (exit $ac_status); } &&
6630          { ac_try='test -s conftest.$ac_objext'
6631   { (eval echo "$as_me:6631: \"$ac_try\"") >&5
6632   (eval $ac_try) 2>&5
6633   ac_status=$?
6634   echo "$as_me:6634: \$? = $ac_status" >&5
6635   (exit $ac_status); }; }; then
6636   cf_cv_define_sigwinch=maybe
6637 else
6638   echo "$as_me: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 cf_cv_define_sigwinch=no
6641 fi
6642 rm -f conftest.$ac_objext conftest.$ac_ext
6643
6644 fi
6645 rm -f conftest.$ac_objext conftest.$ac_ext
6646
6647 fi
6648 echo "$as_me:6648: result: $cf_cv_define_sigwinch" >&5
6649 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6650
6651 if test "$cf_cv_define_sigwinch" = maybe ; then
6652 echo "$as_me:6652: checking for actual SIGWINCH definition" >&5
6653 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6654 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6655   echo $ECHO_N "(cached) $ECHO_C" >&6
6656 else
6657
6658 cf_cv_fixup_sigwinch=unknown
6659 cf_sigwinch=32
6660 while test $cf_sigwinch != 1
6661 do
6662         cat >conftest.$ac_ext <<_ACEOF
6663 #line 6663 "configure"
6664 #include "confdefs.h"
6665
6666 #undef _XOPEN_SOURCE
6667 #undef _POSIX_SOURCE
6668 #undef _POSIX_C_SOURCE
6669 #include <sys/types.h>
6670 #include <sys/signal.h>
6671
6672 int
6673 main ()
6674 {
6675
6676 #if SIGWINCH != $cf_sigwinch
6677 make an error
6678 #endif
6679 int x = SIGWINCH
6680   ;
6681   return 0;
6682 }
6683 _ACEOF
6684 rm -f conftest.$ac_objext
6685 if { (eval echo "$as_me:6685: \"$ac_compile\"") >&5
6686   (eval $ac_compile) 2>&5
6687   ac_status=$?
6688   echo "$as_me:6688: \$? = $ac_status" >&5
6689   (exit $ac_status); } &&
6690          { ac_try='test -s conftest.$ac_objext'
6691   { (eval echo "$as_me:6691: \"$ac_try\"") >&5
6692   (eval $ac_try) 2>&5
6693   ac_status=$?
6694   echo "$as_me:6694: \$? = $ac_status" >&5
6695   (exit $ac_status); }; }; then
6696   cf_cv_fixup_sigwinch=$cf_sigwinch
6697          break
6698 else
6699   echo "$as_me: failed program was:" >&5
6700 cat conftest.$ac_ext >&5
6701 fi
6702 rm -f conftest.$ac_objext conftest.$ac_ext
6703
6704 cf_sigwinch=`expr $cf_sigwinch - 1`
6705 done
6706
6707 fi
6708 echo "$as_me:6708: result: $cf_cv_fixup_sigwinch" >&5
6709 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6710
6711         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6712                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6713         fi
6714 fi
6715
6716 # Checks for CODESET support.
6717
6718   echo "$as_me:6718: checking for nl_langinfo and CODESET" >&5
6719 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6720 if test "${am_cv_langinfo_codeset+set}" = set; then
6721   echo $ECHO_N "(cached) $ECHO_C" >&6
6722 else
6723   cat >conftest.$ac_ext <<_ACEOF
6724 #line 6724 "configure"
6725 #include "confdefs.h"
6726 #include <langinfo.h>
6727 int
6728 main ()
6729 {
6730 char* cs = nl_langinfo(CODESET);
6731   ;
6732   return 0;
6733 }
6734 _ACEOF
6735 rm -f conftest.$ac_objext conftest$ac_exeext
6736 if { (eval echo "$as_me:6736: \"$ac_link\"") >&5
6737   (eval $ac_link) 2>&5
6738   ac_status=$?
6739   echo "$as_me:6739: \$? = $ac_status" >&5
6740   (exit $ac_status); } &&
6741          { ac_try='test -s conftest$ac_exeext'
6742   { (eval echo "$as_me:6742: \"$ac_try\"") >&5
6743   (eval $ac_try) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); }; }; then
6747   am_cv_langinfo_codeset=yes
6748 else
6749   echo "$as_me: failed program was:" >&5
6750 cat conftest.$ac_ext >&5
6751 am_cv_langinfo_codeset=no
6752 fi
6753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6754
6755 fi
6756 echo "$as_me:6756: result: $am_cv_langinfo_codeset" >&5
6757 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6758   if test $am_cv_langinfo_codeset = yes; then
6759
6760 cat >>confdefs.h <<\EOF
6761 #define HAVE_LANGINFO_CODESET 1
6762 EOF
6763
6764   fi
6765
6766 # use these variables to work around a defect in gcc's fixincludes.
6767 NCURSES_OK_WCHAR_T=
6768 NCURSES_OK_WINT_T=
6769
6770 echo "$as_me:6770: checking if you want wide-character code" >&5
6771 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6772
6773 # Check whether --enable-widec or --disable-widec was given.
6774 if test "${enable_widec+set}" = set; then
6775   enableval="$enable_widec"
6776   with_widec=$enableval
6777 else
6778   with_widec=no
6779 fi;
6780 echo "$as_me:6780: result: $with_widec" >&5
6781 echo "${ECHO_T}$with_widec" >&6
6782 if test "$with_widec" = yes ; then
6783         LIB_SUFFIX="w${LIB_SUFFIX}"
6784         cat >>confdefs.h <<\EOF
6785 #define USE_WIDEC_SUPPORT 1
6786 EOF
6787
6788 echo "$as_me:6788: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6789 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6790 cat >conftest.$ac_ext <<_ACEOF
6791 #line 6791 "configure"
6792 #include "confdefs.h"
6793 #include <sys/types.h>
6794
6795 int
6796 main ()
6797 {
6798
6799 #ifndef _XOPEN_SOURCE_EXTENDED
6800 make an error
6801 #endif
6802   ;
6803   return 0;
6804 }
6805 _ACEOF
6806 rm -f conftest.$ac_objext
6807 if { (eval echo "$as_me:6807: \"$ac_compile\"") >&5
6808   (eval $ac_compile) 2>&5
6809   ac_status=$?
6810   echo "$as_me:6810: \$? = $ac_status" >&5
6811   (exit $ac_status); } &&
6812          { ac_try='test -s conftest.$ac_objext'
6813   { (eval echo "$as_me:6813: \"$ac_try\"") >&5
6814   (eval $ac_try) 2>&5
6815   ac_status=$?
6816   echo "$as_me:6816: \$? = $ac_status" >&5
6817   (exit $ac_status); }; }; then
6818   cf_result=no
6819 else
6820   echo "$as_me: failed program was:" >&5
6821 cat conftest.$ac_ext >&5
6822 cf_result=yes
6823 fi
6824 rm -f conftest.$ac_objext conftest.$ac_ext
6825 echo "$as_me:6825: result: $cf_result" >&5
6826 echo "${ECHO_T}$cf_result" >&6
6827
6828 if test "$cf_result" = yes ; then
6829         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6830 elif test "x" != "x" ; then
6831         echo "$as_me:6831: checking checking for compatible value versus " >&5
6832 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6833         cat >conftest.$ac_ext <<_ACEOF
6834 #line 6834 "configure"
6835 #include "confdefs.h"
6836 #include <sys/types.h>
6837
6838 int
6839 main ()
6840 {
6841
6842 #if _XOPEN_SOURCE_EXTENDED- < 0
6843 make an error
6844 #endif
6845   ;
6846   return 0;
6847 }
6848 _ACEOF
6849 rm -f conftest.$ac_objext
6850 if { (eval echo "$as_me:6850: \"$ac_compile\"") >&5
6851   (eval $ac_compile) 2>&5
6852   ac_status=$?
6853   echo "$as_me:6853: \$? = $ac_status" >&5
6854   (exit $ac_status); } &&
6855          { ac_try='test -s conftest.$ac_objext'
6856   { (eval echo "$as_me:6856: \"$ac_try\"") >&5
6857   (eval $ac_try) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); }; }; then
6861   cf_result=yes
6862 else
6863   echo "$as_me: failed program was:" >&5
6864 cat conftest.$ac_ext >&5
6865 cf_result=no
6866 fi
6867 rm -f conftest.$ac_objext conftest.$ac_ext
6868         echo "$as_me:6868: result: $cf_result" >&5
6869 echo "${ECHO_T}$cf_result" >&6
6870         if test "$cf_result" = no ; then
6871                 # perhaps we can override it - try...
6872                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6873         fi
6874 fi
6875
6876         # with_overwrite=no
6877         NCURSES_CH_T=cchar_t
6878
6879 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6880 do
6881 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6882 echo "$as_me:6882: checking for $ac_func" >&5
6883 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6884 if eval "test \"\${$as_ac_var+set}\" = set"; then
6885   echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887   cat >conftest.$ac_ext <<_ACEOF
6888 #line 6888 "configure"
6889 #include "confdefs.h"
6890 /* System header to define __stub macros and hopefully few prototypes,
6891     which can conflict with char $ac_func (); below.  */
6892 #include <assert.h>
6893 /* Override any gcc2 internal prototype to avoid an error.  */
6894 #ifdef __cplusplus
6895 extern "C"
6896 #endif
6897 /* We use char because int might match the return type of a gcc2
6898    builtin and then its argument prototype would still apply.  */
6899 char $ac_func ();
6900 char (*f) ();
6901
6902 int
6903 main ()
6904 {
6905 /* The GNU C library defines this for functions which it implements
6906     to always fail with ENOSYS.  Some functions are actually named
6907     something starting with __ and the normal name is an alias.  */
6908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6909 choke me
6910 #else
6911 f = $ac_func;
6912 #endif
6913
6914   ;
6915   return 0;
6916 }
6917 _ACEOF
6918 rm -f conftest.$ac_objext conftest$ac_exeext
6919 if { (eval echo "$as_me:6919: \"$ac_link\"") >&5
6920   (eval $ac_link) 2>&5
6921   ac_status=$?
6922   echo "$as_me:6922: \$? = $ac_status" >&5
6923   (exit $ac_status); } &&
6924          { ac_try='test -s conftest$ac_exeext'
6925   { (eval echo "$as_me:6925: \"$ac_try\"") >&5
6926   (eval $ac_try) 2>&5
6927   ac_status=$?
6928   echo "$as_me:6928: \$? = $ac_status" >&5
6929   (exit $ac_status); }; }; then
6930   eval "$as_ac_var=yes"
6931 else
6932   echo "$as_me: failed program was:" >&5
6933 cat conftest.$ac_ext >&5
6934 eval "$as_ac_var=no"
6935 fi
6936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6937 fi
6938 echo "$as_me:6938: result: `eval echo '${'$as_ac_var'}'`" >&5
6939 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6940 if test `eval echo '${'$as_ac_var'}'` = yes; then
6941   cat >>confdefs.h <<EOF
6942 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6943 EOF
6944
6945 fi
6946 done
6947
6948         if test "$ac_cv_func_putwc" != yes ; then
6949
6950 echo "$as_me:6950: checking for putwc in libutf8" >&5
6951 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6952 if test "${cf_cv_libutf8+set}" = set; then
6953   echo $ECHO_N "(cached) $ECHO_C" >&6
6954 else
6955
6956         cf_save_LIBS="$LIBS"
6957         LIBS="-lutf8 $LIBS"
6958 cat >conftest.$ac_ext <<_ACEOF
6959 #line 6959 "configure"
6960 #include "confdefs.h"
6961
6962 #include <libutf8.h>
6963 int
6964 main ()
6965 {
6966 putwc(0,0);
6967   ;
6968   return 0;
6969 }
6970 _ACEOF
6971 rm -f conftest.$ac_objext conftest$ac_exeext
6972 if { (eval echo "$as_me:6972: \"$ac_link\"") >&5
6973   (eval $ac_link) 2>&5
6974   ac_status=$?
6975   echo "$as_me:6975: \$? = $ac_status" >&5
6976   (exit $ac_status); } &&
6977          { ac_try='test -s conftest$ac_exeext'
6978   { (eval echo "$as_me:6978: \"$ac_try\"") >&5
6979   (eval $ac_try) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); }; }; then
6983   cf_cv_libutf8=yes
6984 else
6985   echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987 cf_cv_libutf8=no
6988 fi
6989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6990         LIBS="$cf_save_LIBS"
6991
6992 fi
6993 echo "$as_me:6993: result: $cf_cv_libutf8" >&5
6994 echo "${ECHO_T}$cf_cv_libutf8" >&6
6995
6996 if test "$cf_cv_libutf8" = yes ; then
6997         cat >>confdefs.h <<\EOF
6998 #define HAVE_LIBUTF8_H 1
6999 EOF
7000
7001         LIBS="-lutf8 $LIBS"
7002 fi
7003
7004                 if test "$cf_cv_libutf8" = yes ; then
7005                         NCURSES_LIBUTF8=1
7006                 fi
7007         fi
7008
7009 # This is needed on Tru64 5.0 to declare mbstate_t
7010 echo "$as_me:7010: checking if we must include wchar.h to declare mbstate_t" >&5
7011 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7012 if test "${cf_cv_mbstate_t+set}" = set; then
7013   echo $ECHO_N "(cached) $ECHO_C" >&6
7014 else
7015
7016 cat >conftest.$ac_ext <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019
7020 #include <stdlib.h>
7021 #include <stdarg.h>
7022 #include <stdio.h>
7023 #ifdef HAVE_LIBUTF8_H
7024 #include <libutf8.h>
7025 #endif
7026 int
7027 main ()
7028 {
7029 mbstate_t state
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f conftest.$ac_objext
7035 if { (eval echo "$as_me:7035: \"$ac_compile\"") >&5
7036   (eval $ac_compile) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); } &&
7040          { ac_try='test -s conftest.$ac_objext'
7041   { (eval echo "$as_me:7041: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); }; }; then
7046   cf_cv_mbstate_t=no
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7050 cat >conftest.$ac_ext <<_ACEOF
7051 #line 7051 "configure"
7052 #include "confdefs.h"
7053
7054 #include <stdlib.h>
7055 #include <stdarg.h>
7056 #include <stdio.h>
7057 #include <wchar.h>
7058 #ifdef HAVE_LIBUTF8_H
7059 #include <libutf8.h>
7060 #endif
7061 int
7062 main ()
7063 {
7064 mbstate_t value
7065   ;
7066   return 0;
7067 }
7068 _ACEOF
7069 rm -f conftest.$ac_objext
7070 if { (eval echo "$as_me:7070: \"$ac_compile\"") >&5
7071   (eval $ac_compile) 2>&5
7072   ac_status=$?
7073   echo "$as_me:7073: \$? = $ac_status" >&5
7074   (exit $ac_status); } &&
7075          { ac_try='test -s conftest.$ac_objext'
7076   { (eval echo "$as_me:7076: \"$ac_try\"") >&5
7077   (eval $ac_try) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); }; }; then
7081   cf_cv_mbstate_t=yes
7082 else
7083   echo "$as_me: failed program was:" >&5
7084 cat conftest.$ac_ext >&5
7085 cf_cv_mbstate_t=unknown
7086 fi
7087 rm -f conftest.$ac_objext conftest.$ac_ext
7088 fi
7089 rm -f conftest.$ac_objext conftest.$ac_ext
7090 fi
7091 echo "$as_me:7091: result: $cf_cv_mbstate_t" >&5
7092 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7093
7094 if test "$cf_cv_mbstate_t" = yes ; then
7095         cat >>confdefs.h <<\EOF
7096 #define NEED_WCHAR_H 1
7097 EOF
7098
7099         NEED_WCHAR_H=1
7100 fi
7101
7102 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7103 if test "$cf_cv_mbstate_t" = unknown ; then
7104         NCURSES_MBSTATE_T=1
7105 fi
7106
7107 # This is needed on Tru64 5.0 to declare wchar_t
7108 echo "$as_me:7108: checking if we must include wchar.h to declare wchar_t" >&5
7109 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7110 if test "${cf_cv_wchar_t+set}" = set; then
7111   echo $ECHO_N "(cached) $ECHO_C" >&6
7112 else
7113
7114 cat >conftest.$ac_ext <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7117
7118 #include <stdlib.h>
7119 #include <stdarg.h>
7120 #include <stdio.h>
7121 #ifdef HAVE_LIBUTF8_H
7122 #include <libutf8.h>
7123 #endif
7124 int
7125 main ()
7126 {
7127 wchar_t state
7128   ;
7129   return 0;
7130 }
7131 _ACEOF
7132 rm -f conftest.$ac_objext
7133 if { (eval echo "$as_me:7133: \"$ac_compile\"") >&5
7134   (eval $ac_compile) 2>&5
7135   ac_status=$?
7136   echo "$as_me:7136: \$? = $ac_status" >&5
7137   (exit $ac_status); } &&
7138          { ac_try='test -s conftest.$ac_objext'
7139   { (eval echo "$as_me:7139: \"$ac_try\"") >&5
7140   (eval $ac_try) 2>&5
7141   ac_status=$?
7142   echo "$as_me:7142: \$? = $ac_status" >&5
7143   (exit $ac_status); }; }; then
7144   cf_cv_wchar_t=no
7145 else
7146   echo "$as_me: failed program was:" >&5
7147 cat conftest.$ac_ext >&5
7148 cat >conftest.$ac_ext <<_ACEOF
7149 #line 7149 "configure"
7150 #include "confdefs.h"
7151
7152 #include <stdlib.h>
7153 #include <stdarg.h>
7154 #include <stdio.h>
7155 #include <wchar.h>
7156 #ifdef HAVE_LIBUTF8_H
7157 #include <libutf8.h>
7158 #endif
7159 int
7160 main ()
7161 {
7162 wchar_t value
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext
7168 if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -s conftest.$ac_objext'
7174   { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); }; }; then
7179   cf_cv_wchar_t=yes
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7183 cf_cv_wchar_t=unknown
7184 fi
7185 rm -f conftest.$ac_objext conftest.$ac_ext
7186 fi
7187 rm -f conftest.$ac_objext conftest.$ac_ext
7188 fi
7189 echo "$as_me:7189: result: $cf_cv_wchar_t" >&5
7190 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7191
7192 if test "$cf_cv_wchar_t" = yes ; then
7193         cat >>confdefs.h <<\EOF
7194 #define NEED_WCHAR_H 1
7195 EOF
7196
7197         NEED_WCHAR_H=1
7198 fi
7199
7200 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7201 if test "$cf_cv_wchar_t" = unknown ; then
7202         NCURSES_WCHAR_T=1
7203 fi
7204
7205 # if we find wchar_t in either place, use substitution to provide a fallback.
7206 if test "$cf_cv_wchar_t" != unknown ; then
7207         NCURSES_OK_WCHAR_T=1
7208 fi
7209
7210 # This is needed on Tru64 5.0 to declare wint_t
7211 echo "$as_me:7211: checking if we must include wchar.h to declare wint_t" >&5
7212 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7213 if test "${cf_cv_wint_t+set}" = set; then
7214   echo $ECHO_N "(cached) $ECHO_C" >&6
7215 else
7216
7217 cat >conftest.$ac_ext <<_ACEOF
7218 #line 7218 "configure"
7219 #include "confdefs.h"
7220
7221 #include <stdlib.h>
7222 #include <stdarg.h>
7223 #include <stdio.h>
7224 #ifdef HAVE_LIBUTF8_H
7225 #include <libutf8.h>
7226 #endif
7227 int
7228 main ()
7229 {
7230 wint_t state
7231   ;
7232   return 0;
7233 }
7234 _ACEOF
7235 rm -f conftest.$ac_objext
7236 if { (eval echo "$as_me:7236: \"$ac_compile\"") >&5
7237   (eval $ac_compile) 2>&5
7238   ac_status=$?
7239   echo "$as_me:7239: \$? = $ac_status" >&5
7240   (exit $ac_status); } &&
7241          { ac_try='test -s conftest.$ac_objext'
7242   { (eval echo "$as_me:7242: \"$ac_try\"") >&5
7243   (eval $ac_try) 2>&5
7244   ac_status=$?
7245   echo "$as_me:7245: \$? = $ac_status" >&5
7246   (exit $ac_status); }; }; then
7247   cf_cv_wint_t=no
7248 else
7249   echo "$as_me: failed program was:" >&5
7250 cat conftest.$ac_ext >&5
7251 cat >conftest.$ac_ext <<_ACEOF
7252 #line 7252 "configure"
7253 #include "confdefs.h"
7254
7255 #include <stdlib.h>
7256 #include <stdarg.h>
7257 #include <stdio.h>
7258 #include <wchar.h>
7259 #ifdef HAVE_LIBUTF8_H
7260 #include <libutf8.h>
7261 #endif
7262 int
7263 main ()
7264 {
7265 wint_t value
7266   ;
7267   return 0;
7268 }
7269 _ACEOF
7270 rm -f conftest.$ac_objext
7271 if { (eval echo "$as_me:7271: \"$ac_compile\"") >&5
7272   (eval $ac_compile) 2>&5
7273   ac_status=$?
7274   echo "$as_me:7274: \$? = $ac_status" >&5
7275   (exit $ac_status); } &&
7276          { ac_try='test -s conftest.$ac_objext'
7277   { (eval echo "$as_me:7277: \"$ac_try\"") >&5
7278   (eval $ac_try) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); }; }; then
7282   cf_cv_wint_t=yes
7283 else
7284   echo "$as_me: failed program was:" >&5
7285 cat conftest.$ac_ext >&5
7286 cf_cv_wint_t=unknown
7287 fi
7288 rm -f conftest.$ac_objext conftest.$ac_ext
7289 fi
7290 rm -f conftest.$ac_objext conftest.$ac_ext
7291 fi
7292 echo "$as_me:7292: result: $cf_cv_wint_t" >&5
7293 echo "${ECHO_T}$cf_cv_wint_t" >&6
7294
7295 if test "$cf_cv_wint_t" = yes ; then
7296         cat >>confdefs.h <<\EOF
7297 #define NEED_WCHAR_H 1
7298 EOF
7299
7300         NEED_WCHAR_H=1
7301 fi
7302
7303 # if we do not find wint_t in either place, use substitution to provide a fallback.
7304 if test "$cf_cv_wint_t" = unknown ; then
7305         NCURSES_WINT_T=1
7306 fi
7307
7308 # if we find wint_t in either place, use substitution to provide a fallback.
7309 if test "$cf_cv_wint_t" != unknown ; then
7310         NCURSES_OK_WINT_T=1
7311 fi
7312
7313         if test "$NCURSES_MBSTATE_T" != 0; then
7314                 cat >>confdefs.h <<\EOF
7315 #define NEED_MBSTATE_T_DEF 1
7316 EOF
7317
7318         fi
7319 fi
7320
7321 ###   use option --disable-lp64 to allow long chtype
7322 case $cf_cv_abi_version in
7323 [345]*)
7324         default_with_lp64=no
7325         ;;
7326 *)
7327         default_with_lp64=yes
7328         ;;
7329 esac
7330
7331 echo "$as_me:7331: checking whether to enable _LP64 definition in curses.h" >&5
7332 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7333
7334 # Check whether --enable-lp64 or --disable-lp64 was given.
7335 if test "${enable_lp64+set}" = set; then
7336   enableval="$enable_lp64"
7337   with_lp64=$enableval
7338 else
7339   with_lp64=$default_with_lp64
7340 fi;
7341 echo "$as_me:7341: result: $with_lp64" >&5
7342 echo "${ECHO_T}$with_lp64" >&6
7343
7344 if test "$with_lp64" = yes ; then
7345         cf_cv_enable_lp64=1
7346 else
7347         cf_cv_enable_lp64=0
7348 fi
7349
7350 # Check whether --enable-largefile or --disable-largefile was given.
7351 if test "${enable_largefile+set}" = set; then
7352   enableval="$enable_largefile"
7353
7354 fi;
7355 if test "$enable_largefile" != no; then
7356
7357   echo "$as_me:7357: checking for special C compiler options needed for large files" >&5
7358 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7359 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7360   echo $ECHO_N "(cached) $ECHO_C" >&6
7361 else
7362   ac_cv_sys_largefile_CC=no
7363      if test "$GCC" != yes; then
7364        ac_save_CC=$CC
7365        while :; do
7366          # IRIX 6.2 and later do not support large files by default,
7367          # so use the C compiler's -n32 option if that helps.
7368          cat >conftest.$ac_ext <<_ACEOF
7369 #line 7369 "configure"
7370 #include "confdefs.h"
7371 #include <sys/types.h>
7372  /* Check that off_t can represent 2**63 - 1 correctly.
7373     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7374     since some C++ compilers masquerading as C compilers
7375     incorrectly reject 9223372036854775807.  */
7376 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7377   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7378                        && LARGE_OFF_T % 2147483647 == 1)
7379                       ? 1 : -1];
7380 int
7381 main ()
7382 {
7383
7384   ;
7385   return 0;
7386 }
7387 _ACEOF
7388          rm -f conftest.$ac_objext
7389 if { (eval echo "$as_me:7389: \"$ac_compile\"") >&5
7390   (eval $ac_compile) 2>&5
7391   ac_status=$?
7392   echo "$as_me:7392: \$? = $ac_status" >&5
7393   (exit $ac_status); } &&
7394          { ac_try='test -s conftest.$ac_objext'
7395   { (eval echo "$as_me:7395: \"$ac_try\"") >&5
7396   (eval $ac_try) 2>&5
7397   ac_status=$?
7398   echo "$as_me:7398: \$? = $ac_status" >&5
7399   (exit $ac_status); }; }; then
7400   break
7401 else
7402   echo "$as_me: failed program was:" >&5
7403 cat conftest.$ac_ext >&5
7404 fi
7405 rm -f conftest.$ac_objext
7406          CC="$CC -n32"
7407          rm -f conftest.$ac_objext
7408 if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5
7409   (eval $ac_compile) 2>&5
7410   ac_status=$?
7411   echo "$as_me:7411: \$? = $ac_status" >&5
7412   (exit $ac_status); } &&
7413          { ac_try='test -s conftest.$ac_objext'
7414   { (eval echo "$as_me:7414: \"$ac_try\"") >&5
7415   (eval $ac_try) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); }; }; then
7419   ac_cv_sys_largefile_CC=' -n32'; break
7420 else
7421   echo "$as_me: failed program was:" >&5
7422 cat conftest.$ac_ext >&5
7423 fi
7424 rm -f conftest.$ac_objext
7425          break
7426        done
7427        CC=$ac_save_CC
7428        rm -f conftest.$ac_ext
7429     fi
7430 fi
7431 echo "$as_me:7431: result: $ac_cv_sys_largefile_CC" >&5
7432 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7433   if test "$ac_cv_sys_largefile_CC" != no; then
7434     CC=$CC$ac_cv_sys_largefile_CC
7435   fi
7436
7437   echo "$as_me:7437: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7438 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7439 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7440   echo $ECHO_N "(cached) $ECHO_C" >&6
7441 else
7442   while :; do
7443   ac_cv_sys_file_offset_bits=no
7444   cat >conftest.$ac_ext <<_ACEOF
7445 #line 7445 "configure"
7446 #include "confdefs.h"
7447 #include <sys/types.h>
7448  /* Check that off_t can represent 2**63 - 1 correctly.
7449     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7450     since some C++ compilers masquerading as C compilers
7451     incorrectly reject 9223372036854775807.  */
7452 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7453   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7454                        && LARGE_OFF_T % 2147483647 == 1)
7455                       ? 1 : -1];
7456 int
7457 main ()
7458 {
7459
7460   ;
7461   return 0;
7462 }
7463 _ACEOF
7464 rm -f conftest.$ac_objext
7465 if { (eval echo "$as_me:7465: \"$ac_compile\"") >&5
7466   (eval $ac_compile) 2>&5
7467   ac_status=$?
7468   echo "$as_me:7468: \$? = $ac_status" >&5
7469   (exit $ac_status); } &&
7470          { ac_try='test -s conftest.$ac_objext'
7471   { (eval echo "$as_me:7471: \"$ac_try\"") >&5
7472   (eval $ac_try) 2>&5
7473   ac_status=$?
7474   echo "$as_me:7474: \$? = $ac_status" >&5
7475   (exit $ac_status); }; }; then
7476   break
7477 else
7478   echo "$as_me: failed program was:" >&5
7479 cat conftest.$ac_ext >&5
7480 fi
7481 rm -f conftest.$ac_objext conftest.$ac_ext
7482   cat >conftest.$ac_ext <<_ACEOF
7483 #line 7483 "configure"
7484 #include "confdefs.h"
7485 #define _FILE_OFFSET_BITS 64
7486 #include <sys/types.h>
7487  /* Check that off_t can represent 2**63 - 1 correctly.
7488     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7489     since some C++ compilers masquerading as C compilers
7490     incorrectly reject 9223372036854775807.  */
7491 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7492   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7493                        && LARGE_OFF_T % 2147483647 == 1)
7494                       ? 1 : -1];
7495 int
7496 main ()
7497 {
7498
7499   ;
7500   return 0;
7501 }
7502 _ACEOF
7503 rm -f conftest.$ac_objext
7504 if { (eval echo "$as_me:7504: \"$ac_compile\"") >&5
7505   (eval $ac_compile) 2>&5
7506   ac_status=$?
7507   echo "$as_me:7507: \$? = $ac_status" >&5
7508   (exit $ac_status); } &&
7509          { ac_try='test -s conftest.$ac_objext'
7510   { (eval echo "$as_me:7510: \"$ac_try\"") >&5
7511   (eval $ac_try) 2>&5
7512   ac_status=$?
7513   echo "$as_me:7513: \$? = $ac_status" >&5
7514   (exit $ac_status); }; }; then
7515   ac_cv_sys_file_offset_bits=64; break
7516 else
7517   echo "$as_me: failed program was:" >&5
7518 cat conftest.$ac_ext >&5
7519 fi
7520 rm -f conftest.$ac_objext conftest.$ac_ext
7521   break
7522 done
7523 fi
7524 echo "$as_me:7524: result: $ac_cv_sys_file_offset_bits" >&5
7525 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7526 if test "$ac_cv_sys_file_offset_bits" != no; then
7527
7528 cat >>confdefs.h <<EOF
7529 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7530 EOF
7531
7532 fi
7533 rm -f conftest*
7534   echo "$as_me:7534: checking for _LARGE_FILES value needed for large files" >&5
7535 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7536 if test "${ac_cv_sys_large_files+set}" = set; then
7537   echo $ECHO_N "(cached) $ECHO_C" >&6
7538 else
7539   while :; do
7540   ac_cv_sys_large_files=no
7541   cat >conftest.$ac_ext <<_ACEOF
7542 #line 7542 "configure"
7543 #include "confdefs.h"
7544 #include <sys/types.h>
7545  /* Check that off_t can represent 2**63 - 1 correctly.
7546     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7547     since some C++ compilers masquerading as C compilers
7548     incorrectly reject 9223372036854775807.  */
7549 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7550   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7551                        && LARGE_OFF_T % 2147483647 == 1)
7552                       ? 1 : -1];
7553 int
7554 main ()
7555 {
7556
7557   ;
7558   return 0;
7559 }
7560 _ACEOF
7561 rm -f conftest.$ac_objext
7562 if { (eval echo "$as_me:7562: \"$ac_compile\"") >&5
7563   (eval $ac_compile) 2>&5
7564   ac_status=$?
7565   echo "$as_me:7565: \$? = $ac_status" >&5
7566   (exit $ac_status); } &&
7567          { ac_try='test -s conftest.$ac_objext'
7568   { (eval echo "$as_me:7568: \"$ac_try\"") >&5
7569   (eval $ac_try) 2>&5
7570   ac_status=$?
7571   echo "$as_me:7571: \$? = $ac_status" >&5
7572   (exit $ac_status); }; }; then
7573   break
7574 else
7575   echo "$as_me: failed program was:" >&5
7576 cat conftest.$ac_ext >&5
7577 fi
7578 rm -f conftest.$ac_objext conftest.$ac_ext
7579   cat >conftest.$ac_ext <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582 #define _LARGE_FILES 1
7583 #include <sys/types.h>
7584  /* Check that off_t can represent 2**63 - 1 correctly.
7585     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7586     since some C++ compilers masquerading as C compilers
7587     incorrectly reject 9223372036854775807.  */
7588 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7589   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7590                        && LARGE_OFF_T % 2147483647 == 1)
7591                       ? 1 : -1];
7592 int
7593 main ()
7594 {
7595
7596   ;
7597   return 0;
7598 }
7599 _ACEOF
7600 rm -f conftest.$ac_objext
7601 if { (eval echo "$as_me:7601: \"$ac_compile\"") >&5
7602   (eval $ac_compile) 2>&5
7603   ac_status=$?
7604   echo "$as_me:7604: \$? = $ac_status" >&5
7605   (exit $ac_status); } &&
7606          { ac_try='test -s conftest.$ac_objext'
7607   { (eval echo "$as_me:7607: \"$ac_try\"") >&5
7608   (eval $ac_try) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); }; }; then
7612   ac_cv_sys_large_files=1; break
7613 else
7614   echo "$as_me: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 fi
7617 rm -f conftest.$ac_objext conftest.$ac_ext
7618   break
7619 done
7620 fi
7621 echo "$as_me:7621: result: $ac_cv_sys_large_files" >&5
7622 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7623 if test "$ac_cv_sys_large_files" != no; then
7624
7625 cat >>confdefs.h <<EOF
7626 #define _LARGE_FILES $ac_cv_sys_large_files
7627 EOF
7628
7629 fi
7630 rm -f conftest*
7631 fi
7632
7633     if test "$enable_largefile" != no ; then
7634         echo "$as_me:7634: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7635 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7636 if test "${ac_cv_sys_largefile_source+set}" = set; then
7637   echo $ECHO_N "(cached) $ECHO_C" >&6
7638 else
7639   while :; do
7640   ac_cv_sys_largefile_source=no
7641   cat >conftest.$ac_ext <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644 #include <stdio.h>
7645 int
7646 main ()
7647 {
7648 return !fseeko;
7649   ;
7650   return 0;
7651 }
7652 _ACEOF
7653 rm -f conftest.$ac_objext
7654 if { (eval echo "$as_me:7654: \"$ac_compile\"") >&5
7655   (eval $ac_compile) 2>&5
7656   ac_status=$?
7657   echo "$as_me:7657: \$? = $ac_status" >&5
7658   (exit $ac_status); } &&
7659          { ac_try='test -s conftest.$ac_objext'
7660   { (eval echo "$as_me:7660: \"$ac_try\"") >&5
7661   (eval $ac_try) 2>&5
7662   ac_status=$?
7663   echo "$as_me:7663: \$? = $ac_status" >&5
7664   (exit $ac_status); }; }; then
7665   break
7666 else
7667   echo "$as_me: failed program was:" >&5
7668 cat conftest.$ac_ext >&5
7669 fi
7670 rm -f conftest.$ac_objext conftest.$ac_ext
7671   cat >conftest.$ac_ext <<_ACEOF
7672 #line 7672 "configure"
7673 #include "confdefs.h"
7674 #define _LARGEFILE_SOURCE 1
7675 #include <stdio.h>
7676 int
7677 main ()
7678 {
7679 return !fseeko;
7680   ;
7681   return 0;
7682 }
7683 _ACEOF
7684 rm -f conftest.$ac_objext
7685 if { (eval echo "$as_me:7685: \"$ac_compile\"") >&5
7686   (eval $ac_compile) 2>&5
7687   ac_status=$?
7688   echo "$as_me:7688: \$? = $ac_status" >&5
7689   (exit $ac_status); } &&
7690          { ac_try='test -s conftest.$ac_objext'
7691   { (eval echo "$as_me:7691: \"$ac_try\"") >&5
7692   (eval $ac_try) 2>&5
7693   ac_status=$?
7694   echo "$as_me:7694: \$? = $ac_status" >&5
7695   (exit $ac_status); }; }; then
7696   ac_cv_sys_largefile_source=1; break
7697 else
7698   echo "$as_me: failed program was:" >&5
7699 cat conftest.$ac_ext >&5
7700 fi
7701 rm -f conftest.$ac_objext conftest.$ac_ext
7702   break
7703 done
7704 fi
7705 echo "$as_me:7705: result: $ac_cv_sys_largefile_source" >&5
7706 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7707 if test "$ac_cv_sys_largefile_source" != no; then
7708
7709 cat >>confdefs.h <<EOF
7710 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7711 EOF
7712
7713 fi
7714 rm -f conftest*
7715
7716 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7717 # in glibc 2.1.3, but that breaks too many other things.
7718 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7719 echo "$as_me:7719: checking for fseeko" >&5
7720 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7721 if test "${ac_cv_func_fseeko+set}" = set; then
7722   echo $ECHO_N "(cached) $ECHO_C" >&6
7723 else
7724   cat >conftest.$ac_ext <<_ACEOF
7725 #line 7725 "configure"
7726 #include "confdefs.h"
7727 #include <stdio.h>
7728 int
7729 main ()
7730 {
7731 return fseeko && fseeko (stdin, 0, 0);
7732   ;
7733   return 0;
7734 }
7735 _ACEOF
7736 rm -f conftest.$ac_objext conftest$ac_exeext
7737 if { (eval echo "$as_me:7737: \"$ac_link\"") >&5
7738   (eval $ac_link) 2>&5
7739   ac_status=$?
7740   echo "$as_me:7740: \$? = $ac_status" >&5
7741   (exit $ac_status); } &&
7742          { ac_try='test -s conftest$ac_exeext'
7743   { (eval echo "$as_me:7743: \"$ac_try\"") >&5
7744   (eval $ac_try) 2>&5
7745   ac_status=$?
7746   echo "$as_me:7746: \$? = $ac_status" >&5
7747   (exit $ac_status); }; }; then
7748   ac_cv_func_fseeko=yes
7749 else
7750   echo "$as_me: failed program was:" >&5
7751 cat conftest.$ac_ext >&5
7752 ac_cv_func_fseeko=no
7753 fi
7754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7755 fi
7756 echo "$as_me:7756: result: $ac_cv_func_fseeko" >&5
7757 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7758 if test $ac_cv_func_fseeko = yes; then
7759
7760 cat >>confdefs.h <<\EOF
7761 #define HAVE_FSEEKO 1
7762 EOF
7763
7764 fi
7765
7766         # Normally we would collect these definitions in the config.h,
7767         # but (like _XOPEN_SOURCE), some environments rely on having these
7768         # defined before any of the system headers are included.  Another
7769         # case comes up with C++, e.g., on AIX the compiler compiles the
7770         # header files by themselves before looking at the body files it is
7771         # told to compile.  For ncurses, those header files do not include
7772         # the config.h
7773         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7774         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7775         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7776
7777         echo "$as_me:7777: checking whether to use struct dirent64" >&5
7778 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7779 if test "${cf_cv_struct_dirent64+set}" = set; then
7780   echo $ECHO_N "(cached) $ECHO_C" >&6
7781 else
7782
7783                 cat >conftest.$ac_ext <<_ACEOF
7784 #line 7784 "configure"
7785 #include "confdefs.h"
7786
7787 #include <sys/types.h>
7788 #include <dirent.h>
7789
7790 int
7791 main ()
7792 {
7793
7794                 /* if transitional largefile support is setup, this is true */
7795                 extern struct dirent64 * readdir(DIR *);
7796                 struct dirent64 *x = readdir((DIR *)0);
7797                 struct dirent *y = readdir((DIR *)0);
7798                 int z = x - y;
7799
7800   ;
7801   return 0;
7802 }
7803 _ACEOF
7804 rm -f conftest.$ac_objext
7805 if { (eval echo "$as_me:7805: \"$ac_compile\"") >&5
7806   (eval $ac_compile) 2>&5
7807   ac_status=$?
7808   echo "$as_me:7808: \$? = $ac_status" >&5
7809   (exit $ac_status); } &&
7810          { ac_try='test -s conftest.$ac_objext'
7811   { (eval echo "$as_me:7811: \"$ac_try\"") >&5
7812   (eval $ac_try) 2>&5
7813   ac_status=$?
7814   echo "$as_me:7814: \$? = $ac_status" >&5
7815   (exit $ac_status); }; }; then
7816   cf_cv_struct_dirent64=yes
7817 else
7818   echo "$as_me: failed program was:" >&5
7819 cat conftest.$ac_ext >&5
7820 cf_cv_struct_dirent64=no
7821 fi
7822 rm -f conftest.$ac_objext conftest.$ac_ext
7823
7824 fi
7825 echo "$as_me:7825: result: $cf_cv_struct_dirent64" >&5
7826 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7827         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7828 #define HAVE_STRUCT_DIRENT64 1
7829 EOF
7830
7831     fi
7832
7833 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7834 echo "$as_me:7834: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7835 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7836
7837 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7838 if test "${enable_tparm_varargs+set}" = set; then
7839   enableval="$enable_tparm_varargs"
7840   with_tparm_varargs=$enableval
7841 else
7842   with_tparm_varargs=yes
7843 fi;
7844 echo "$as_me:7844: result: $with_tparm_varargs" >&5
7845 echo "${ECHO_T}$with_tparm_varargs" >&6
7846 NCURSES_TPARM_VARARGS=0
7847 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7848
7849 ###   use option --with-bool to override bool's type
7850 echo "$as_me:7850: checking for type of bool" >&5
7851 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7852
7853 # Check whether --with-bool or --without-bool was given.
7854 if test "${with_bool+set}" = set; then
7855   withval="$with_bool"
7856   NCURSES_BOOL="$withval"
7857 else
7858   NCURSES_BOOL=auto
7859 fi;
7860 echo "$as_me:7860: result: $NCURSES_BOOL" >&5
7861 echo "${ECHO_T}$NCURSES_BOOL" >&6
7862
7863 echo "$as_me:7863: checking for alternate terminal capabilities file" >&5
7864 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7865
7866 # Check whether --with-caps or --without-caps was given.
7867 if test "${with_caps+set}" = set; then
7868   withval="$with_caps"
7869   TERMINFO_CAPS=Caps.$withval
7870 else
7871   TERMINFO_CAPS=Caps
7872 fi;
7873 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7874 echo "$as_me:7874: result: $TERMINFO_CAPS" >&5
7875 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7876
7877 ###   use option --with-chtype to override chtype's type
7878 echo "$as_me:7878: checking for type of chtype" >&5
7879 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7880
7881 # Check whether --with-chtype or --without-chtype was given.
7882 if test "${with_chtype+set}" = set; then
7883   withval="$with_chtype"
7884   NCURSES_CHTYPE="$withval"
7885 else
7886   NCURSES_CHTYPE=auto
7887 fi;
7888 echo "$as_me:7888: result: $NCURSES_CHTYPE" >&5
7889 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7890
7891 ###   use option --with-ospeed to override ospeed's type
7892 echo "$as_me:7892: checking for type of ospeed" >&5
7893 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7894
7895 # Check whether --with-ospeed or --without-ospeed was given.
7896 if test "${with_ospeed+set}" = set; then
7897   withval="$with_ospeed"
7898   NCURSES_OSPEED="$withval"
7899 else
7900   NCURSES_OSPEED=short
7901 fi;
7902 echo "$as_me:7902: result: $NCURSES_OSPEED" >&5
7903 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7904
7905 ###   use option --with-mmask-t to override mmask_t's type
7906 echo "$as_me:7906: checking for type of mmask_t" >&5
7907 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7908
7909 # Check whether --with-mmask-t or --without-mmask-t was given.
7910 if test "${with_mmask_t+set}" = set; then
7911   withval="$with_mmask_t"
7912   NCURSES_MMASK_T="$withval"
7913 else
7914   NCURSES_MMASK_T=auto
7915 fi;
7916 echo "$as_me:7916: result: $NCURSES_MMASK_T" >&5
7917 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7918
7919 ### Enable compiling-in rcs id's
7920 echo "$as_me:7920: checking if RCS identifiers should be compiled-in" >&5
7921 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7922
7923 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7924 if test "${with_rcs_ids+set}" = set; then
7925   withval="$with_rcs_ids"
7926   with_rcs_ids=$withval
7927 else
7928   with_rcs_ids=no
7929 fi;
7930 echo "$as_me:7930: result: $with_rcs_ids" >&5
7931 echo "${ECHO_T}$with_rcs_ids" >&6
7932 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7933 #define USE_RCS_IDS 1
7934 EOF
7935
7936 ###############################################################################
7937
7938 echo "$as_me:7938: checking format of man-pages" >&5
7939 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7940
7941 # Check whether --with-manpage-format or --without-manpage-format was given.
7942 if test "${with_manpage_format+set}" = set; then
7943   withval="$with_manpage_format"
7944   MANPAGE_FORMAT=$withval
7945 else
7946   MANPAGE_FORMAT=unknown
7947 fi;
7948
7949 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7950 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7951
7952 cf_unknown=
7953
7954 case $MANPAGE_FORMAT in
7955 unknown)
7956   if test -z "$MANPATH" ; then
7957     MANPATH="/usr/man:/usr/share/man"
7958   fi
7959
7960   # look for the 'date' man-page (it's most likely to be installed!)
7961   MANPAGE_FORMAT=
7962   cf_preform=no
7963   cf_catonly=yes
7964   cf_example=date
7965
7966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7967   for cf_dir in $MANPATH; do
7968     test -z "$cf_dir" && cf_dir=/usr/man
7969     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
7970     do
7971       cf_test=`echo $cf_name | sed -e 's/*//'`
7972       if test "x$cf_test" = "x$cf_name" ; then
7973
7974         case "$cf_name" in
7975         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7976         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7977         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7978         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7979         esac
7980
7981         case "$cf_name" in
7982         $cf_dir/man*)
7983           cf_catonly=no
7984           ;;
7985         $cf_dir/cat*)
7986           cf_preform=yes
7987           ;;
7988         esac
7989         break
7990       fi
7991
7992       # if we found a match in either man* or cat*, stop looking
7993       if test -n "$MANPAGE_FORMAT" ; then
7994         cf_found=no
7995         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7996         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7997         case "$cf_name" in
7998         $cf_dir/cat*)
7999           cf_found=yes
8000           ;;
8001         esac
8002         test $cf_found=yes && break
8003       fi
8004     done
8005     # only check the first directory in $MANPATH where we find manpages
8006     if test -n "$MANPAGE_FORMAT" ; then
8007        break
8008     fi
8009   done
8010   # if we did not find the example, just assume it is normal
8011   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8012   IFS="$ac_save_ifs"
8013   ;;
8014 *)
8015   for cf_option in $MANPAGE_FORMAT; do
8016      case $cf_option in #(vi
8017      gzip|compress|BSDI|normal|formatted|catonly)
8018        ;;
8019      *)
8020        cf_unknown="$cf_unknown $cf_option"
8021        ;;
8022      esac
8023   done
8024   ;;
8025 esac
8026
8027 echo "$as_me:8027: result: $MANPAGE_FORMAT" >&5
8028 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8029 if test -n "$cf_unknown" ; then
8030   { echo "$as_me:8030: WARNING: Unexpected manpage-format $cf_unknown" >&5
8031 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8032 fi
8033
8034 echo "$as_me:8034: checking for manpage renaming" >&5
8035 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8036
8037 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8038 if test "${with_manpage_renames+set}" = set; then
8039   withval="$with_manpage_renames"
8040   MANPAGE_RENAMES=$withval
8041 else
8042   MANPAGE_RENAMES=yes
8043 fi;
8044
8045 case ".$MANPAGE_RENAMES" in #(vi
8046 .no) #(vi
8047   ;;
8048 .|.yes)
8049   # Debian 'man' program?
8050   if test -f /etc/debian_version ; then
8051     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8052   else
8053     MANPAGE_RENAMES=no
8054   fi
8055   ;;
8056 esac
8057
8058 if test "$MANPAGE_RENAMES" != no ; then
8059   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8060     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8061   elif test ! -f $MANPAGE_RENAMES ; then
8062     { { echo "$as_me:8062: error: not a filename: $MANPAGE_RENAMES" >&5
8063 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8064    { (exit 1); exit 1; }; }
8065   fi
8066
8067   test ! -d man && mkdir man
8068
8069   # Construct a sed-script to perform renaming within man-pages
8070   if test -n "$MANPAGE_RENAMES" ; then
8071     test ! -d man && mkdir man
8072     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8073   fi
8074 fi
8075
8076 echo "$as_me:8076: result: $MANPAGE_RENAMES" >&5
8077 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8078
8079 echo "$as_me:8079: checking if manpage aliases will be installed" >&5
8080 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8081
8082 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8083 if test "${with_manpage_aliases+set}" = set; then
8084   withval="$with_manpage_aliases"
8085   MANPAGE_ALIASES=$withval
8086 else
8087   MANPAGE_ALIASES=yes
8088 fi;
8089
8090 echo "$as_me:8090: result: $MANPAGE_ALIASES" >&5
8091 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8092
8093 if test "$LN_S" = "ln -s"; then
8094         cf_use_symlinks=yes
8095 else
8096         cf_use_symlinks=no
8097 fi
8098
8099 MANPAGE_SYMLINKS=no
8100 if test "$MANPAGE_ALIASES" = yes ; then
8101 echo "$as_me:8101: checking if manpage symlinks should be used" >&5
8102 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8103
8104 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8105 if test "${with_manpage_symlinks+set}" = set; then
8106   withval="$with_manpage_symlinks"
8107   MANPAGE_SYMLINKS=$withval
8108 else
8109   MANPAGE_SYMLINKS=$cf_use_symlinks
8110 fi;
8111
8112 if test "$$cf_use_symlinks" = no; then
8113 if test "$MANPAGE_SYMLINKS" = yes ; then
8114         { echo "$as_me:8114: WARNING: cannot make symlinks" >&5
8115 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8116         MANPAGE_SYMLINKS=no
8117 fi
8118 fi
8119
8120 echo "$as_me:8120: result: $MANPAGE_SYMLINKS" >&5
8121 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8122 fi
8123
8124 echo "$as_me:8124: checking for manpage tbl" >&5
8125 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8126
8127 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8128 if test "${with_manpage_tbl+set}" = set; then
8129   withval="$with_manpage_tbl"
8130   MANPAGE_TBL=$withval
8131 else
8132   MANPAGE_TBL=no
8133 fi;
8134
8135 echo "$as_me:8135: result: $MANPAGE_TBL" >&5
8136 echo "${ECHO_T}$MANPAGE_TBL" >&6
8137
8138   if test "$prefix" = "NONE" ; then
8139      cf_prefix="$ac_default_prefix"
8140   else
8141      cf_prefix="$prefix"
8142   fi
8143
8144   case "$MANPAGE_FORMAT" in # (vi
8145   *catonly*) # (vi
8146     cf_format=yes
8147     cf_inboth=no
8148     ;;
8149   *formatted*) # (vi
8150     cf_format=yes
8151     cf_inboth=yes
8152     ;;
8153   *)
8154     cf_format=no
8155     cf_inboth=no
8156     ;;
8157   esac
8158
8159 test ! -d man && mkdir man
8160
8161 cf_so_strip=
8162 cf_compress=
8163 case "$MANPAGE_FORMAT" in #(vi
8164 *compress*) #(vi
8165         cf_so_strip="Z"
8166         cf_compress=compress
8167   ;;
8168 *gzip*) #(vi
8169         cf_so_strip="gz"
8170         cf_compress=gzip
8171   ;;
8172 esac
8173
8174 cf_edit_man=./edit_man.sh
8175 cf_man_alias=`pwd`/man_alias.sed
8176
8177 cat >$cf_edit_man <<CF_EOF
8178 #! /bin/sh
8179 # this script is generated by the configure-script CF_MAN_PAGES macro.
8180
8181 prefix="$cf_prefix"
8182 datadir="$datadir"
8183
8184 NCURSES_MAJOR="$NCURSES_MAJOR"
8185 NCURSES_MINOR="$NCURSES_MINOR"
8186 NCURSES_PATCH="$NCURSES_PATCH"
8187
8188 NCURSES_OSPEED="$NCURSES_OSPEED"
8189 TERMINFO="$TERMINFO"
8190
8191 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8192
8193 INSTALL="$INSTALL"
8194 INSTALL_DATA="$INSTALL_DATA"
8195
8196 transform="$program_transform_name"
8197
8198 TMP=\${TMPDIR-/tmp}/man\$\$
8199 trap "rm -f \$TMP" 0 1 2 5 15
8200
8201 form=\$1
8202 shift || exit 1
8203
8204 verb=\$1
8205 shift || exit 1
8206
8207 mandir=\$1
8208 shift || exit 1
8209
8210 srcdir=\$1
8211 top_srcdir=\$srcdir/..
8212 shift || exit 1
8213
8214 if test "\$form" = normal ; then
8215         if test "$cf_format" = yes ; then
8216         if test "$cf_inboth" = no ; then
8217                 sh \$0 format \$verb \$mandir \$srcdir \$*
8218                 exit $?
8219         fi
8220         fi
8221         cf_subdir=\$mandir/man
8222         cf_tables=$MANPAGE_TBL
8223 else
8224         cf_subdir=\$mandir/cat
8225         cf_tables=yes
8226 fi
8227
8228 # process the list of source-files
8229 for i in \$* ; do
8230 case \$i in #(vi
8231 *.orig|*.rej) ;; #(vi
8232 *.[0-9]*)
8233         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8234         if test \$verb = installing ; then
8235         if test ! -d \$cf_subdir\${section} ; then
8236                 \$MKDIRS \$cf_subdir\$section
8237         fi
8238         fi
8239
8240         # replace variables in man page
8241         if test ! -f $cf_man_alias ; then
8242 cat >>$cf_man_alias <<-CF_EOF2
8243                 s,@DATADIR@,\$datadir,g
8244                 s,@TERMINFO@,\$TERMINFO,g
8245                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8246                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8247                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8248                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8249 CF_EOF
8250
8251         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8252         do
8253                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8254                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8255 cat >>$cf_edit_man <<-CF_EOF
8256                 s,@$cf_NAME@,$cf_name,
8257 CF_EOF
8258         done
8259
8260 cat >>$cf_edit_man <<CF_EOF
8261 CF_EOF2
8262                 echo "...made $cf_man_alias"
8263         fi
8264
8265         aliases=
8266         cf_source=\`basename \$i\`
8267         inalias=\$cf_source
8268         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8269         if test ! -f \$inalias ; then
8270                 echo .. skipped \$cf_source
8271                 continue
8272         fi
8273 CF_EOF
8274
8275 if test "$MANPAGE_ALIASES" != no ; then
8276 cat >>$cf_edit_man <<CF_EOF
8277         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8278 CF_EOF
8279 fi
8280
8281 if test "$MANPAGE_RENAMES" = no ; then
8282 cat >>$cf_edit_man <<CF_EOF
8283         # perform program transformations for section 1 man pages
8284         if test \$section = 1 ; then
8285                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8286         else
8287                 cf_target=\$cf_subdir\${section}/\$cf_source
8288         fi
8289 CF_EOF
8290 else
8291 cat >>$cf_edit_man <<CF_EOF
8292         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8293         if test -z "\$cf_target" ; then
8294                 echo '? missing rename for '\$cf_source
8295                 cf_target="\$cf_source"
8296         fi
8297         cf_target="\$cf_subdir\${section}/\${cf_target}"
8298
8299 CF_EOF
8300 fi
8301
8302 cat >>$cf_edit_man <<CF_EOF
8303         sed     -f $cf_man_alias \\
8304 CF_EOF
8305
8306 if test -f $MANPAGE_RENAMES ; then
8307 cat >>$cf_edit_man <<CF_EOF
8308                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8309 CF_EOF
8310 else
8311 cat >>$cf_edit_man <<CF_EOF
8312                 < \$i >\$TMP
8313 CF_EOF
8314 fi
8315
8316 cat >>$cf_edit_man <<CF_EOF
8317 if test \$cf_tables = yes ; then
8318         tbl \$TMP >\$TMP.out
8319         mv \$TMP.out \$TMP
8320 fi
8321 CF_EOF
8322
8323 if test $with_curses_h != yes ; then
8324 cat >>$cf_edit_man <<CF_EOF
8325         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8326         mv \$TMP.out \$TMP
8327 CF_EOF
8328 fi
8329
8330 cat >>$cf_edit_man <<CF_EOF
8331         if test \$form = format ; then
8332                 nroff -man \$TMP >\$TMP.out
8333                 mv \$TMP.out \$TMP
8334         fi
8335 CF_EOF
8336
8337 if test -n "$cf_compress" ; then
8338 cat >>$cf_edit_man <<CF_EOF
8339         if test \$verb = installing ; then
8340         if ( $cf_compress -f \$TMP )
8341         then
8342                 mv \$TMP.$cf_so_strip \$TMP
8343         fi
8344         fi
8345         cf_target="\$cf_target.$cf_so_strip"
8346 CF_EOF
8347 fi
8348
8349 case "$MANPAGE_FORMAT" in #(vi
8350 *BSDI*)
8351 cat >>$cf_edit_man <<CF_EOF
8352         if test \$form = format ; then
8353                 # BSDI installs only .0 suffixes in the cat directories
8354                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8355         fi
8356 CF_EOF
8357   ;;
8358 esac
8359
8360 cat >>$cf_edit_man <<CF_EOF
8361         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8362         if test \$verb = installing ; then
8363                 echo \$verb \$cf_target
8364                 \$INSTALL_DATA \$TMP \$cf_target
8365                 test -d \$cf_subdir\${section} &&
8366                 test -n "\$aliases" && (
8367                         cd \$cf_subdir\${section} && (
8368                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8369                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8370                                 cf_target=\`basename \$cf_target\`
8371                                 for cf_alias in \$aliases
8372                                 do
8373                                         if test \$section = 1 ; then
8374                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8375                                         fi
8376
8377                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8378                                                 if test -f \$cf_alias\${suffix} ; then
8379                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8380                                                         then
8381                                                                 continue
8382                                                         fi
8383                                                 fi
8384                                                 echo .. \$verb alias \$cf_alias\${suffix}
8385                                                 rm -f \$cf_alias\${suffix}
8386                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8387                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8388                                                 echo ".so \$cf_source" >\$TMP
8389 CF_EOF
8390 if test -n "$cf_compress" ; then
8391 cat >>$cf_edit_man <<CF_EOF
8392                                                 if test -n "$cf_so_strip" ; then
8393                                                         $cf_compress -f \$TMP
8394                                                         mv \$TMP.$cf_so_strip \$TMP
8395                                                 fi
8396 CF_EOF
8397 fi
8398 cat >>$cf_edit_man <<CF_EOF
8399                                                 echo .. \$verb alias \$cf_alias\${suffix}
8400                                                 rm -f \$cf_alias\${suffix}
8401                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8402                                         fi
8403                                 done
8404                         )
8405                 )
8406         elif test \$verb = removing ; then
8407                 test -f \$cf_target && (
8408                         echo \$verb \$cf_target
8409                         rm -f \$cf_target
8410                 )
8411                 test -d \$cf_subdir\${section} &&
8412                 test -n "\$aliases" && (
8413                         cd \$cf_subdir\${section} && (
8414                                 for cf_alias in \$aliases
8415                                 do
8416                                         if test \$section = 1 ; then
8417                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8418                                         fi
8419
8420                                         echo .. \$verb alias \$cf_alias\${suffix}
8421                                         rm -f \$cf_alias\${suffix}
8422                                 done
8423                         )
8424                 )
8425         else
8426 #               echo ".hy 0"
8427                 cat \$TMP
8428         fi
8429         ;;
8430 esac
8431 done
8432
8433 if test $cf_inboth = yes ; then
8434 if test \$form != format ; then
8435         sh \$0 format \$verb \$mandir \$srcdir \$*
8436 fi
8437 fi
8438
8439 exit 0
8440 CF_EOF
8441 chmod 755 $cf_edit_man
8442
8443 ###############################################################################
8444
8445 ### Note that some functions (such as const) are normally disabled anyway.
8446 echo "$as_me:8446: checking if you want to build with function extensions" >&5
8447 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8448
8449 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8450 if test "${enable_ext_funcs+set}" = set; then
8451   enableval="$enable_ext_funcs"
8452   with_ext_funcs=$enableval
8453 else
8454   with_ext_funcs=yes
8455 fi;
8456 echo "$as_me:8456: result: $with_ext_funcs" >&5
8457 echo "${ECHO_T}$with_ext_funcs" >&6
8458 if test "$with_ext_funcs" = yes ; then
8459         NCURSES_EXT_FUNCS=1
8460         cat >>confdefs.h <<\EOF
8461 #define HAVE_CURSES_VERSION 1
8462 EOF
8463
8464         cat >>confdefs.h <<\EOF
8465 #define HAVE_HAS_KEY 1
8466 EOF
8467
8468         cat >>confdefs.h <<\EOF
8469 #define HAVE_RESIZETERM 1
8470 EOF
8471
8472         cat >>confdefs.h <<\EOF
8473 #define HAVE_RESIZE_TERM 1
8474 EOF
8475
8476         cat >>confdefs.h <<\EOF
8477 #define HAVE_USE_DEFAULT_COLORS 1
8478 EOF
8479
8480         cat >>confdefs.h <<\EOF
8481 #define HAVE_WRESIZE 1
8482 EOF
8483
8484         cat >>confdefs.h <<\EOF
8485 #define NCURSES_EXT_FUNCS 1
8486 EOF
8487
8488 else
8489         NCURSES_EXT_FUNCS=0
8490 fi
8491
8492 ###   use option --enable-const to turn on use of const beyond that in XSI.
8493 echo "$as_me:8493: checking for extended use of const keyword" >&5
8494 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8495
8496 # Check whether --enable-const or --disable-const was given.
8497 if test "${enable_const+set}" = set; then
8498   enableval="$enable_const"
8499   with_ext_const=$enableval
8500 else
8501   with_ext_const=no
8502 fi;
8503 echo "$as_me:8503: result: $with_ext_const" >&5
8504 echo "${ECHO_T}$with_ext_const" >&6
8505 NCURSES_CONST='/*nothing*/'
8506 if test "$with_ext_const" = yes ; then
8507         NCURSES_CONST=const
8508 fi
8509
8510 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8511 echo "$as_me:8511: checking if you want to use extended colors" >&5
8512 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8513
8514 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8515 if test "${enable_ext_colors+set}" = set; then
8516   enableval="$enable_ext_colors"
8517   with_ext_colors=$enableval
8518 else
8519   with_ext_colors=no
8520 fi;
8521 echo "$as_me:8521: result: $with_ext_colors" >&5
8522 echo "${ECHO_T}$with_ext_colors" >&6
8523 NCURSES_EXT_COLORS=0
8524 if test "$with_ext_colors" = yes ; then
8525         if test "$with_widec" != yes ; then
8526                 { { echo "$as_me:8526: error: This option applies only to wide-character library" >&5
8527 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8528    { (exit 1); exit 1; }; }
8529         else
8530                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8531
8532 if test "${with_abi_version+set}" != set; then
8533         case $cf_cv_rel_version in
8534         5.*)
8535                 cf_cv_rel_version=6.0
8536                 cf_cv_abi_version=6
8537                 { echo "$as_me:8537: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8538 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8539                 ;;
8540         esac
8541 fi
8542
8543         fi
8544         NCURSES_EXT_COLORS=1
8545         cat >>confdefs.h <<\EOF
8546 #define NCURSES_EXT_COLORS 1
8547 EOF
8548
8549 fi
8550
8551 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8552 echo "$as_me:8552: checking if you want to use extended mouse encoding" >&5
8553 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
8554
8555 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8556 if test "${enable_ext_mouse+set}" = set; then
8557   enableval="$enable_ext_mouse"
8558   with_ext_mouse=$enableval
8559 else
8560   with_ext_mouse=no
8561 fi;
8562 echo "$as_me:8562: result: $with_ext_mouse" >&5
8563 echo "${ECHO_T}$with_ext_mouse" >&6
8564 NCURSES_MOUSE_VERSION=1
8565 if test "$with_ext_mouse" = yes ; then
8566         NCURSES_MOUSE_VERSION=2
8567
8568 if test "${with_abi_version+set}" != set; then
8569         case $cf_cv_rel_version in
8570         5.*)
8571                 cf_cv_rel_version=6.0
8572                 cf_cv_abi_version=6
8573                 { echo "$as_me:8573: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8574 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8575                 ;;
8576         esac
8577 fi
8578
8579 fi
8580
8581 echo "$as_me:8581: checking if you want \$NCURSES_NO_PADDING code" >&5
8582 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8583
8584 # Check whether --enable-no-padding or --disable-no-padding was given.
8585 if test "${enable_no_padding+set}" = set; then
8586   enableval="$enable_no_padding"
8587   with_no_padding=$enableval
8588 else
8589   with_no_padding=$with_ext_funcs
8590 fi;
8591 echo "$as_me:8591: result: $with_no_padding" >&5
8592 echo "${ECHO_T}$with_no_padding" >&6
8593 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8594 #define NCURSES_NO_PADDING 1
8595 EOF
8596
8597 echo "$as_me:8597: checking for ANSI C header files" >&5
8598 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8599 if test "${ac_cv_header_stdc+set}" = set; then
8600   echo $ECHO_N "(cached) $ECHO_C" >&6
8601 else
8602   cat >conftest.$ac_ext <<_ACEOF
8603 #line 8603 "configure"
8604 #include "confdefs.h"
8605 #include <stdlib.h>
8606 #include <stdarg.h>
8607 #include <string.h>
8608 #include <float.h>
8609
8610 _ACEOF
8611 if { (eval echo "$as_me:8611: \"$ac_cpp conftest.$ac_ext\"") >&5
8612   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8613   ac_status=$?
8614   egrep -v '^ *\+' conftest.er1 >conftest.err
8615   rm -f conftest.er1
8616   cat conftest.err >&5
8617   echo "$as_me:8617: \$? = $ac_status" >&5
8618   (exit $ac_status); } >/dev/null; then
8619   if test -s conftest.err; then
8620     ac_cpp_err=$ac_c_preproc_warn_flag
8621   else
8622     ac_cpp_err=
8623   fi
8624 else
8625   ac_cpp_err=yes
8626 fi
8627 if test -z "$ac_cpp_err"; then
8628   ac_cv_header_stdc=yes
8629 else
8630   echo "$as_me: failed program was:" >&5
8631   cat conftest.$ac_ext >&5
8632   ac_cv_header_stdc=no
8633 fi
8634 rm -f conftest.err conftest.$ac_ext
8635
8636 if test $ac_cv_header_stdc = yes; then
8637   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8638   cat >conftest.$ac_ext <<_ACEOF
8639 #line 8639 "configure"
8640 #include "confdefs.h"
8641 #include <string.h>
8642
8643 _ACEOF
8644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8645   egrep "memchr" >/dev/null 2>&1; then
8646   :
8647 else
8648   ac_cv_header_stdc=no
8649 fi
8650 rm -f conftest*
8651
8652 fi
8653
8654 if test $ac_cv_header_stdc = yes; then
8655   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8656   cat >conftest.$ac_ext <<_ACEOF
8657 #line 8657 "configure"
8658 #include "confdefs.h"
8659 #include <stdlib.h>
8660
8661 _ACEOF
8662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8663   egrep "free" >/dev/null 2>&1; then
8664   :
8665 else
8666   ac_cv_header_stdc=no
8667 fi
8668 rm -f conftest*
8669
8670 fi
8671
8672 if test $ac_cv_header_stdc = yes; then
8673   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8674   if test "$cross_compiling" = yes; then
8675   :
8676 else
8677   cat >conftest.$ac_ext <<_ACEOF
8678 #line 8678 "configure"
8679 #include "confdefs.h"
8680 #include <ctype.h>
8681 #if ((' ' & 0x0FF) == 0x020)
8682 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8683 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8684 #else
8685 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8686                      || ('j' <= (c) && (c) <= 'r') \
8687                      || ('s' <= (c) && (c) <= 'z'))
8688 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8689 #endif
8690
8691 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8692 int
8693 main ()
8694 {
8695   int i;
8696   for (i = 0; i < 256; i++)
8697     if (XOR (islower (i), ISLOWER (i))
8698         || toupper (i) != TOUPPER (i))
8699       $ac_main_return(2);
8700   $ac_main_return (0);
8701 }
8702 _ACEOF
8703 rm -f conftest$ac_exeext
8704 if { (eval echo "$as_me:8704: \"$ac_link\"") >&5
8705   (eval $ac_link) 2>&5
8706   ac_status=$?
8707   echo "$as_me:8707: \$? = $ac_status" >&5
8708   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8709   { (eval echo "$as_me:8709: \"$ac_try\"") >&5
8710   (eval $ac_try) 2>&5
8711   ac_status=$?
8712   echo "$as_me:8712: \$? = $ac_status" >&5
8713   (exit $ac_status); }; }; then
8714   :
8715 else
8716   echo "$as_me: program exited with status $ac_status" >&5
8717 echo "$as_me: failed program was:" >&5
8718 cat conftest.$ac_ext >&5
8719 ac_cv_header_stdc=no
8720 fi
8721 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8722 fi
8723 fi
8724 fi
8725 echo "$as_me:8725: result: $ac_cv_header_stdc" >&5
8726 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8727 if test $ac_cv_header_stdc = yes; then
8728
8729 cat >>confdefs.h <<\EOF
8730 #define STDC_HEADERS 1
8731 EOF
8732
8733 fi
8734
8735 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8736
8737 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8738                   inttypes.h stdint.h unistd.h
8739 do
8740 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8741 echo "$as_me:8741: checking for $ac_header" >&5
8742 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8743 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8744   echo $ECHO_N "(cached) $ECHO_C" >&6
8745 else
8746   cat >conftest.$ac_ext <<_ACEOF
8747 #line 8747 "configure"
8748 #include "confdefs.h"
8749 $ac_includes_default
8750 #include <$ac_header>
8751 _ACEOF
8752 rm -f conftest.$ac_objext
8753 if { (eval echo "$as_me:8753: \"$ac_compile\"") >&5
8754   (eval $ac_compile) 2>&5
8755   ac_status=$?
8756   echo "$as_me:8756: \$? = $ac_status" >&5
8757   (exit $ac_status); } &&
8758          { ac_try='test -s conftest.$ac_objext'
8759   { (eval echo "$as_me:8759: \"$ac_try\"") >&5
8760   (eval $ac_try) 2>&5
8761   ac_status=$?
8762   echo "$as_me:8762: \$? = $ac_status" >&5
8763   (exit $ac_status); }; }; then
8764   eval "$as_ac_Header=yes"
8765 else
8766   echo "$as_me: failed program was:" >&5
8767 cat conftest.$ac_ext >&5
8768 eval "$as_ac_Header=no"
8769 fi
8770 rm -f conftest.$ac_objext conftest.$ac_ext
8771 fi
8772 echo "$as_me:8772: result: `eval echo '${'$as_ac_Header'}'`" >&5
8773 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8774 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8775   cat >>confdefs.h <<EOF
8776 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8777 EOF
8778
8779 fi
8780 done
8781
8782 echo "$as_me:8782: checking for signed char" >&5
8783 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8784 if test "${ac_cv_type_signed_char+set}" = set; then
8785   echo $ECHO_N "(cached) $ECHO_C" >&6
8786 else
8787   cat >conftest.$ac_ext <<_ACEOF
8788 #line 8788 "configure"
8789 #include "confdefs.h"
8790 $ac_includes_default
8791 int
8792 main ()
8793 {
8794 if ((signed char *) 0)
8795   return 0;
8796 if (sizeof (signed char))
8797   return 0;
8798   ;
8799   return 0;
8800 }
8801 _ACEOF
8802 rm -f conftest.$ac_objext
8803 if { (eval echo "$as_me:8803: \"$ac_compile\"") >&5
8804   (eval $ac_compile) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); } &&
8808          { ac_try='test -s conftest.$ac_objext'
8809   { (eval echo "$as_me:8809: \"$ac_try\"") >&5
8810   (eval $ac_try) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); }; }; then
8814   ac_cv_type_signed_char=yes
8815 else
8816   echo "$as_me: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8818 ac_cv_type_signed_char=no
8819 fi
8820 rm -f conftest.$ac_objext conftest.$ac_ext
8821 fi
8822 echo "$as_me:8822: result: $ac_cv_type_signed_char" >&5
8823 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8824
8825 echo "$as_me:8825: checking size of signed char" >&5
8826 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8827 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8828   echo $ECHO_N "(cached) $ECHO_C" >&6
8829 else
8830   if test "$ac_cv_type_signed_char" = yes; then
8831   if test "$cross_compiling" = yes; then
8832   # Depending upon the size, compute the lo and hi bounds.
8833 cat >conftest.$ac_ext <<_ACEOF
8834 #line 8834 "configure"
8835 #include "confdefs.h"
8836 $ac_includes_default
8837 int
8838 main ()
8839 {
8840 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8841   ;
8842   return 0;
8843 }
8844 _ACEOF
8845 rm -f conftest.$ac_objext
8846 if { (eval echo "$as_me:8846: \"$ac_compile\"") >&5
8847   (eval $ac_compile) 2>&5
8848   ac_status=$?
8849   echo "$as_me:8849: \$? = $ac_status" >&5
8850   (exit $ac_status); } &&
8851          { ac_try='test -s conftest.$ac_objext'
8852   { (eval echo "$as_me:8852: \"$ac_try\"") >&5
8853   (eval $ac_try) 2>&5
8854   ac_status=$?
8855   echo "$as_me:8855: \$? = $ac_status" >&5
8856   (exit $ac_status); }; }; then
8857   ac_lo=0 ac_mid=0
8858   while :; do
8859     cat >conftest.$ac_ext <<_ACEOF
8860 #line 8860 "configure"
8861 #include "confdefs.h"
8862 $ac_includes_default
8863 int
8864 main ()
8865 {
8866 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8867   ;
8868   return 0;
8869 }
8870 _ACEOF
8871 rm -f conftest.$ac_objext
8872 if { (eval echo "$as_me:8872: \"$ac_compile\"") >&5
8873   (eval $ac_compile) 2>&5
8874   ac_status=$?
8875   echo "$as_me:8875: \$? = $ac_status" >&5
8876   (exit $ac_status); } &&
8877          { ac_try='test -s conftest.$ac_objext'
8878   { (eval echo "$as_me:8878: \"$ac_try\"") >&5
8879   (eval $ac_try) 2>&5
8880   ac_status=$?
8881   echo "$as_me:8881: \$? = $ac_status" >&5
8882   (exit $ac_status); }; }; then
8883   ac_hi=$ac_mid; break
8884 else
8885   echo "$as_me: failed program was:" >&5
8886 cat conftest.$ac_ext >&5
8887 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8888 fi
8889 rm -f conftest.$ac_objext conftest.$ac_ext
8890   done
8891 else
8892   echo "$as_me: failed program was:" >&5
8893 cat conftest.$ac_ext >&5
8894 ac_hi=-1 ac_mid=-1
8895   while :; do
8896     cat >conftest.$ac_ext <<_ACEOF
8897 #line 8897 "configure"
8898 #include "confdefs.h"
8899 $ac_includes_default
8900 int
8901 main ()
8902 {
8903 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8904   ;
8905   return 0;
8906 }
8907 _ACEOF
8908 rm -f conftest.$ac_objext
8909 if { (eval echo "$as_me:8909: \"$ac_compile\"") >&5
8910   (eval $ac_compile) 2>&5
8911   ac_status=$?
8912   echo "$as_me:8912: \$? = $ac_status" >&5
8913   (exit $ac_status); } &&
8914          { ac_try='test -s conftest.$ac_objext'
8915   { (eval echo "$as_me:8915: \"$ac_try\"") >&5
8916   (eval $ac_try) 2>&5
8917   ac_status=$?
8918   echo "$as_me:8918: \$? = $ac_status" >&5
8919   (exit $ac_status); }; }; then
8920   ac_lo=$ac_mid; break
8921 else
8922   echo "$as_me: failed program was:" >&5
8923 cat conftest.$ac_ext >&5
8924 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8925 fi
8926 rm -f conftest.$ac_objext conftest.$ac_ext
8927   done
8928 fi
8929 rm -f conftest.$ac_objext conftest.$ac_ext
8930 # Binary search between lo and hi bounds.
8931 while test "x$ac_lo" != "x$ac_hi"; do
8932   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8933   cat >conftest.$ac_ext <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8936 $ac_includes_default
8937 int
8938 main ()
8939 {
8940 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8941   ;
8942   return 0;
8943 }
8944 _ACEOF
8945 rm -f conftest.$ac_objext
8946 if { (eval echo "$as_me:8946: \"$ac_compile\"") >&5
8947   (eval $ac_compile) 2>&5
8948   ac_status=$?
8949   echo "$as_me:8949: \$? = $ac_status" >&5
8950   (exit $ac_status); } &&
8951          { ac_try='test -s conftest.$ac_objext'
8952   { (eval echo "$as_me:8952: \"$ac_try\"") >&5
8953   (eval $ac_try) 2>&5
8954   ac_status=$?
8955   echo "$as_me:8955: \$? = $ac_status" >&5
8956   (exit $ac_status); }; }; then
8957   ac_hi=$ac_mid
8958 else
8959   echo "$as_me: failed program was:" >&5
8960 cat conftest.$ac_ext >&5
8961 ac_lo=`expr $ac_mid + 1`
8962 fi
8963 rm -f conftest.$ac_objext conftest.$ac_ext
8964 done
8965 ac_cv_sizeof_signed_char=$ac_lo
8966 else
8967   if test "$cross_compiling" = yes; then
8968   { { echo "$as_me:8968: error: cannot run test program while cross compiling" >&5
8969 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8970    { (exit 1); exit 1; }; }
8971 else
8972   cat >conftest.$ac_ext <<_ACEOF
8973 #line 8973 "configure"
8974 #include "confdefs.h"
8975 $ac_includes_default
8976 int
8977 main ()
8978 {
8979 FILE *f = fopen ("conftest.val", "w");
8980 if (!f)
8981   $ac_main_return (1);
8982 fprintf (f, "%d", (sizeof (signed char)));
8983 fclose (f);
8984   ;
8985   return 0;
8986 }
8987 _ACEOF
8988 rm -f conftest$ac_exeext
8989 if { (eval echo "$as_me:8989: \"$ac_link\"") >&5
8990   (eval $ac_link) 2>&5
8991   ac_status=$?
8992   echo "$as_me:8992: \$? = $ac_status" >&5
8993   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8994   { (eval echo "$as_me:8994: \"$ac_try\"") >&5
8995   (eval $ac_try) 2>&5
8996   ac_status=$?
8997   echo "$as_me:8997: \$? = $ac_status" >&5
8998   (exit $ac_status); }; }; then
8999   ac_cv_sizeof_signed_char=`cat conftest.val`
9000 else
9001   echo "$as_me: program exited with status $ac_status" >&5
9002 echo "$as_me: failed program was:" >&5
9003 cat conftest.$ac_ext >&5
9004 fi
9005 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9006 fi
9007 fi
9008 rm -f conftest.val
9009 else
9010   ac_cv_sizeof_signed_char=0
9011 fi
9012 fi
9013 echo "$as_me:9013: result: $ac_cv_sizeof_signed_char" >&5
9014 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9015 cat >>confdefs.h <<EOF
9016 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9017 EOF
9018
9019 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9020         NCURSES_SBOOL="signed char"
9021 else
9022         NCURSES_SBOOL="char"
9023 fi
9024 echo "$as_me:9024: checking if you want to use signed Boolean array in term.h" >&5
9025 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9026
9027 # Check whether --enable-signed-char or --disable-signed-char was given.
9028 if test "${enable_signed_char+set}" = set; then
9029   enableval="$enable_signed_char"
9030   with_signed_char=$enableval
9031 else
9032   with_signed_char=no
9033 fi;
9034 echo "$as_me:9034: result: $with_signed_char" >&5
9035 echo "${ECHO_T}$with_signed_char" >&6
9036 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9037
9038 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9039 echo "$as_me:9039: checking if you want SIGWINCH handler" >&5
9040 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9041
9042 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9043 if test "${enable_sigwinch+set}" = set; then
9044   enableval="$enable_sigwinch"
9045   with_sigwinch=$enableval
9046 else
9047   with_sigwinch=$with_ext_funcs
9048 fi;
9049 echo "$as_me:9049: result: $with_sigwinch" >&5
9050 echo "${ECHO_T}$with_sigwinch" >&6
9051 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9052 #define USE_SIGWINCH 1
9053 EOF
9054
9055 ###   use option --enable-tcap-names to allow user to define new capabilities
9056 echo "$as_me:9056: checking if you want user-definable terminal capabilities like termcap" >&5
9057 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9058
9059 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9060 if test "${enable_tcap_names+set}" = set; then
9061   enableval="$enable_tcap_names"
9062   with_tcap_names=$enableval
9063 else
9064   with_tcap_names=$with_ext_funcs
9065 fi;
9066 echo "$as_me:9066: result: $with_tcap_names" >&5
9067 echo "${ECHO_T}$with_tcap_names" >&6
9068 NCURSES_XNAMES=0
9069 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9070
9071 ###############################################################################
9072 # These options are relatively safe to experiment with.
9073
9074 echo "$as_me:9074: checking if you want all development code" >&5
9075 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9076
9077 # Check whether --with-develop or --without-develop was given.
9078 if test "${with_develop+set}" = set; then
9079   withval="$with_develop"
9080   with_develop=$withval
9081 else
9082   with_develop=no
9083 fi;
9084 echo "$as_me:9084: result: $with_develop" >&5
9085 echo "${ECHO_T}$with_develop" >&6
9086
9087 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9088 echo "$as_me:9088: checking if you want hard-tabs code" >&5
9089 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9090
9091 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9092 if test "${enable_hard_tabs+set}" = set; then
9093   enableval="$enable_hard_tabs"
9094
9095 else
9096   enable_hard_tabs=$with_develop
9097 fi;
9098 echo "$as_me:9098: result: $enable_hard_tabs" >&5
9099 echo "${ECHO_T}$enable_hard_tabs" >&6
9100 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9101 #define USE_HARD_TABS 1
9102 EOF
9103
9104 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9105 echo "$as_me:9105: checking if you want limited support for xmc" >&5
9106 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9107
9108 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9109 if test "${enable_xmc_glitch+set}" = set; then
9110   enableval="$enable_xmc_glitch"
9111
9112 else
9113   enable_xmc_glitch=$with_develop
9114 fi;
9115 echo "$as_me:9115: result: $enable_xmc_glitch" >&5
9116 echo "${ECHO_T}$enable_xmc_glitch" >&6
9117 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9118 #define USE_XMC_SUPPORT 1
9119 EOF
9120
9121 ###############################################################################
9122 # These are just experimental, probably should not be in a package:
9123
9124 echo "$as_me:9124: checking if you do not want to assume colors are white-on-black" >&5
9125 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9126
9127 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9128 if test "${enable_assumed_color+set}" = set; then
9129   enableval="$enable_assumed_color"
9130   with_assumed_color=$enableval
9131 else
9132   with_assumed_color=yes
9133 fi;
9134 echo "$as_me:9134: result: $with_assumed_color" >&5
9135 echo "${ECHO_T}$with_assumed_color" >&6
9136 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9137 #define USE_ASSUMED_COLOR 1
9138 EOF
9139
9140 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9141 echo "$as_me:9141: checking if you want hashmap scrolling-optimization code" >&5
9142 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9143
9144 # Check whether --enable-hashmap or --disable-hashmap was given.
9145 if test "${enable_hashmap+set}" = set; then
9146   enableval="$enable_hashmap"
9147   with_hashmap=$enableval
9148 else
9149   with_hashmap=yes
9150 fi;
9151 echo "$as_me:9151: result: $with_hashmap" >&5
9152 echo "${ECHO_T}$with_hashmap" >&6
9153 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9154 #define USE_HASHMAP 1
9155 EOF
9156
9157 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9158 echo "$as_me:9158: checking if you want colorfgbg code" >&5
9159 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9160
9161 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9162 if test "${enable_colorfgbg+set}" = set; then
9163   enableval="$enable_colorfgbg"
9164   with_colorfgbg=$enableval
9165 else
9166   with_colorfgbg=no
9167 fi;
9168 echo "$as_me:9168: result: $with_colorfgbg" >&5
9169 echo "${ECHO_T}$with_colorfgbg" >&6
9170 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9171 #define USE_COLORFGBG 1
9172 EOF
9173
9174 # This is still experimental (20080329), but should ultimately be moved to
9175 # the script-block --with-normal, etc.
9176
9177 echo "$as_me:9177: checking if you want to link with the pthread library" >&5
9178 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9179
9180 # Check whether --with-pthread or --without-pthread was given.
9181 if test "${with_pthread+set}" = set; then
9182   withval="$with_pthread"
9183   with_pthread=$withval
9184 else
9185   with_pthread=no
9186 fi;
9187 echo "$as_me:9187: result: $with_pthread" >&5
9188 echo "${ECHO_T}$with_pthread" >&6
9189
9190 if test "$with_pthread" != no ; then
9191     echo "$as_me:9191: checking for pthread.h" >&5
9192 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9193 if test "${ac_cv_header_pthread_h+set}" = set; then
9194   echo $ECHO_N "(cached) $ECHO_C" >&6
9195 else
9196   cat >conftest.$ac_ext <<_ACEOF
9197 #line 9197 "configure"
9198 #include "confdefs.h"
9199 #include <pthread.h>
9200 _ACEOF
9201 if { (eval echo "$as_me:9201: \"$ac_cpp conftest.$ac_ext\"") >&5
9202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9203   ac_status=$?
9204   egrep -v '^ *\+' conftest.er1 >conftest.err
9205   rm -f conftest.er1
9206   cat conftest.err >&5
9207   echo "$as_me:9207: \$? = $ac_status" >&5
9208   (exit $ac_status); } >/dev/null; then
9209   if test -s conftest.err; then
9210     ac_cpp_err=$ac_c_preproc_warn_flag
9211   else
9212     ac_cpp_err=
9213   fi
9214 else
9215   ac_cpp_err=yes
9216 fi
9217 if test -z "$ac_cpp_err"; then
9218   ac_cv_header_pthread_h=yes
9219 else
9220   echo "$as_me: failed program was:" >&5
9221   cat conftest.$ac_ext >&5
9222   ac_cv_header_pthread_h=no
9223 fi
9224 rm -f conftest.err conftest.$ac_ext
9225 fi
9226 echo "$as_me:9226: result: $ac_cv_header_pthread_h" >&5
9227 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9228 if test $ac_cv_header_pthread_h = yes; then
9229
9230         cat >>confdefs.h <<\EOF
9231 #define HAVE_PTHREADS_H 1
9232 EOF
9233
9234         echo "$as_me:9234: checking for pthread_create in -lpthread" >&5
9235 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9236 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
9237   echo $ECHO_N "(cached) $ECHO_C" >&6
9238 else
9239   ac_check_lib_save_LIBS=$LIBS
9240 LIBS="-lpthread  $LIBS"
9241 cat >conftest.$ac_ext <<_ACEOF
9242 #line 9242 "configure"
9243 #include "confdefs.h"
9244
9245 /* Override any gcc2 internal prototype to avoid an error.  */
9246 #ifdef __cplusplus
9247 extern "C"
9248 #endif
9249 /* We use char because int might match the return type of a gcc2
9250    builtin and then its argument prototype would still apply.  */
9251 char pthread_create ();
9252 int
9253 main ()
9254 {
9255 pthread_create ();
9256   ;
9257   return 0;
9258 }
9259 _ACEOF
9260 rm -f conftest.$ac_objext conftest$ac_exeext
9261 if { (eval echo "$as_me:9261: \"$ac_link\"") >&5
9262   (eval $ac_link) 2>&5
9263   ac_status=$?
9264   echo "$as_me:9264: \$? = $ac_status" >&5
9265   (exit $ac_status); } &&
9266          { ac_try='test -s conftest$ac_exeext'
9267   { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9268   (eval $ac_try) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit $ac_status); }; }; then
9272   ac_cv_lib_pthread_pthread_create=yes
9273 else
9274   echo "$as_me: failed program was:" >&5
9275 cat conftest.$ac_ext >&5
9276 ac_cv_lib_pthread_pthread_create=no
9277 fi
9278 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9279 LIBS=$ac_check_lib_save_LIBS
9280 fi
9281 echo "$as_me:9281: result: $ac_cv_lib_pthread_pthread_create" >&5
9282 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
9283 if test $ac_cv_lib_pthread_pthread_create = yes; then
9284
9285             LIBS="-lpthread $LIBS"
9286             cat >>confdefs.h <<\EOF
9287 #define HAVE_LIBPTHREADS 1
9288 EOF
9289
9290             with_pthread=yes
9291
9292 else
9293
9294             { { echo "$as_me:9294: error: Cannot link with pthread library" >&5
9295 echo "$as_me: error: Cannot link with pthread library" >&2;}
9296    { (exit 1); exit 1; }; }
9297
9298 fi
9299
9300 fi
9301
9302 fi
9303
9304 if test "$with_pthread" = "yes" ; then
9305     cat >>confdefs.h <<\EOF
9306 #define USE_PTHREADS 1
9307 EOF
9308
9309     enable_reentrant=yes
9310 fi
9311
9312 # Reentrant code has to be opaque; there's little advantage to making ncurses
9313 # opaque outside of that, so there is no --enable-opaque option.  We can use
9314 # this option without --with-pthreads, but this will be always set for
9315 # pthreads.
9316 echo "$as_me:9316: checking if you want experimental reentrant code" >&5
9317 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9318
9319 # Check whether --enable-reentrant or --disable-reentrant was given.
9320 if test "${enable_reentrant+set}" = set; then
9321   enableval="$enable_reentrant"
9322   with_reentrant=$enableval
9323 else
9324   with_reentrant=no
9325 fi;
9326 echo "$as_me:9326: result: $with_reentrant" >&5
9327 echo "${ECHO_T}$with_reentrant" >&6
9328 if test "$with_reentrant" = yes ; then
9329         cf_cv_enable_reentrant=1
9330         cf_cv_enable_opaque="NCURSES_INTERNALS"
9331         NCURSES_OPAQUE=1
9332         NCURSES_SIZE_T=int
9333         LIB_SUFFIX="t${LIB_SUFFIX}"
9334         cat >>confdefs.h <<\EOF
9335 #define USE_REENTRANT 1
9336 EOF
9337
9338 if test "${with_abi_version+set}" != set; then
9339         case $cf_cv_rel_version in
9340         5.*)
9341                 cf_cv_rel_version=6.0
9342                 cf_cv_abi_version=6
9343                 { echo "$as_me:9343: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9344 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9345                 ;;
9346         esac
9347 fi
9348
9349 else
9350         cf_cv_enable_reentrant=0
9351         cf_cv_enable_opaque="NCURSES_OPAQUE"
9352         NCURSES_OPAQUE=0
9353         NCURSES_SIZE_T=short
9354 fi
9355
9356 echo "$as_me:9356: checking if you want experimental safe-sprintf code" >&5
9357 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9358
9359 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9360 if test "${enable_safe_sprintf+set}" = set; then
9361   enableval="$enable_safe_sprintf"
9362   with_safe_sprintf=$enableval
9363 else
9364   with_safe_sprintf=no
9365 fi;
9366 echo "$as_me:9366: result: $with_safe_sprintf" >&5
9367 echo "${ECHO_T}$with_safe_sprintf" >&6
9368 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9369 #define USE_SAFE_SPRINTF 1
9370 EOF
9371
9372 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9373 # when hashmap is used scroll hints are useless
9374 if test "$with_hashmap" = no ; then
9375 echo "$as_me:9375: checking if you want to experiment without scrolling-hints code" >&5
9376 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9377
9378 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9379 if test "${enable_scroll_hints+set}" = set; then
9380   enableval="$enable_scroll_hints"
9381   with_scroll_hints=$enableval
9382 else
9383   with_scroll_hints=yes
9384 fi;
9385 echo "$as_me:9385: result: $with_scroll_hints" >&5
9386 echo "${ECHO_T}$with_scroll_hints" >&6
9387 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9388 #define USE_SCROLL_HINTS 1
9389 EOF
9390
9391 fi
9392
9393 echo "$as_me:9393: checking if you want experimental wgetch-events code" >&5
9394 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9395
9396 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9397 if test "${enable_wgetch_events+set}" = set; then
9398   enableval="$enable_wgetch_events"
9399   with_wgetch_events=$enableval
9400 else
9401   with_wgetch_events=no
9402 fi;
9403 echo "$as_me:9403: result: $with_wgetch_events" >&5
9404 echo "${ECHO_T}$with_wgetch_events" >&6
9405 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9406 #define NCURSES_WGETCH_EVENTS 1
9407 EOF
9408
9409 ###############################################################################
9410
9411 ###     use option --disable-echo to suppress full display compiling commands
9412 echo "$as_me:9412: checking if you want to display full commands during build" >&5
9413 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9414
9415 # Check whether --enable-echo or --disable-echo was given.
9416 if test "${enable_echo+set}" = set; then
9417   enableval="$enable_echo"
9418   with_echo=$enableval
9419 else
9420   with_echo=yes
9421 fi;
9422 if test "$with_echo" = yes; then
9423         ECHO_LINK=
9424 else
9425         ECHO_LINK='@ echo linking $@ ... ;'
9426         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9427         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9428 fi
9429 echo "$as_me:9429: result: $with_echo" >&5
9430 echo "${ECHO_T}$with_echo" >&6
9431
9432 ###     use option --enable-warnings to turn on all gcc warnings
9433 echo "$as_me:9433: checking if you want to see compiler warnings" >&5
9434 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9435
9436 # Check whether --enable-warnings or --disable-warnings was given.
9437 if test "${enable_warnings+set}" = set; then
9438   enableval="$enable_warnings"
9439   with_warnings=$enableval
9440 fi;
9441 echo "$as_me:9441: result: $with_warnings" >&5
9442 echo "${ECHO_T}$with_warnings" >&6
9443
9444 if test "x$with_warnings" = "xyes"; then
9445         ADAFLAGS="$ADAFLAGS -gnatg"
9446
9447 INTEL_COMPILER=no
9448
9449 if test "$GCC" = yes ; then
9450         case $host_os in
9451         linux*|gnu*)
9452                 echo "$as_me:9452: checking if this is really Intel C compiler" >&5
9453 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9454                 cf_save_CFLAGS="$CFLAGS"
9455                 CFLAGS="$CFLAGS -no-gcc"
9456                 cat >conftest.$ac_ext <<_ACEOF
9457 #line 9457 "configure"
9458 #include "confdefs.h"
9459
9460 int
9461 main ()
9462 {
9463
9464 #ifdef __INTEL_COMPILER
9465 #else
9466 make an error
9467 #endif
9468
9469   ;
9470   return 0;
9471 }
9472 _ACEOF
9473 rm -f conftest.$ac_objext
9474 if { (eval echo "$as_me:9474: \"$ac_compile\"") >&5
9475   (eval $ac_compile) 2>&5
9476   ac_status=$?
9477   echo "$as_me:9477: \$? = $ac_status" >&5
9478   (exit $ac_status); } &&
9479          { ac_try='test -s conftest.$ac_objext'
9480   { (eval echo "$as_me:9480: \"$ac_try\"") >&5
9481   (eval $ac_try) 2>&5
9482   ac_status=$?
9483   echo "$as_me:9483: \$? = $ac_status" >&5
9484   (exit $ac_status); }; }; then
9485   INTEL_COMPILER=yes
9486 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9487
9488 else
9489   echo "$as_me: failed program was:" >&5
9490 cat conftest.$ac_ext >&5
9491 fi
9492 rm -f conftest.$ac_objext conftest.$ac_ext
9493                 CFLAGS="$cf_save_CFLAGS"
9494                 echo "$as_me:9494: result: $INTEL_COMPILER" >&5
9495 echo "${ECHO_T}$INTEL_COMPILER" >&6
9496                 ;;
9497         esac
9498 fi
9499
9500 cat > conftest.$ac_ext <<EOF
9501 #line 9501 "${as_me-configure}"
9502 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9503 EOF
9504
9505 if test "$INTEL_COMPILER" = yes
9506 then
9507 # The "-wdXXX" options suppress warnings:
9508 # remark #1419: external declaration in primary source file
9509 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9510 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9511 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9512 # remark #193: zero used for undefined preprocessing identifier
9513 # remark #593: variable "curs_sb_left_arrow" was set but never used
9514 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9515 # remark #869: parameter "tw" was never referenced
9516 # remark #981: operands are evaluated in unspecified order
9517 # warning #269: invalid format string conversion
9518
9519         { echo "$as_me:9519: checking for $CC warning options..." >&5
9520 echo "$as_me: checking for $CC warning options..." >&6;}
9521         cf_save_CFLAGS="$CFLAGS"
9522         EXTRA_CFLAGS="-Wall"
9523         for cf_opt in \
9524                 wd1419 \
9525                 wd1682 \
9526                 wd1683 \
9527                 wd1684 \
9528                 wd193 \
9529                 wd279 \
9530                 wd593 \
9531                 wd810 \
9532                 wd869 \
9533                 wd981
9534         do
9535                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9536                 if { (eval echo "$as_me:9536: \"$ac_compile\"") >&5
9537   (eval $ac_compile) 2>&5
9538   ac_status=$?
9539   echo "$as_me:9539: \$? = $ac_status" >&5
9540   (exit $ac_status); }; then
9541                         test -n "$verbose" && echo "$as_me:9541: result: ... -$cf_opt" >&5
9542 echo "${ECHO_T}... -$cf_opt" >&6
9543                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9544                 fi
9545         done
9546         CFLAGS="$cf_save_CFLAGS"
9547
9548 elif test "$GCC" = yes
9549 then
9550         { echo "$as_me:9550: checking for $CC warning options..." >&5
9551 echo "$as_me: checking for $CC warning options..." >&6;}
9552         cf_save_CFLAGS="$CFLAGS"
9553         EXTRA_CFLAGS="-W -Wall"
9554         cf_warn_CONST=""
9555         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9556         for cf_opt in \
9557                 Wbad-function-cast \
9558                 Wcast-align \
9559                 Wcast-qual \
9560                 Winline \
9561                 Wmissing-declarations \
9562                 Wmissing-prototypes \
9563                 Wnested-externs \
9564                 Wpointer-arith \
9565                 Wshadow \
9566                 Wstrict-prototypes \
9567                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9568         do
9569                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9570                 if { (eval echo "$as_me:9570: \"$ac_compile\"") >&5
9571   (eval $ac_compile) 2>&5
9572   ac_status=$?
9573   echo "$as_me:9573: \$? = $ac_status" >&5
9574   (exit $ac_status); }; then
9575                         test -n "$verbose" && echo "$as_me:9575: result: ... -$cf_opt" >&5
9576 echo "${ECHO_T}... -$cf_opt" >&6
9577                         case $cf_opt in #(vi
9578                         Wcast-qual) #(vi
9579                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9580                                 ;;
9581                         Winline) #(vi
9582                                 case $GCC_VERSION in
9583                                 3.3*)
9584                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9585
9586 echo "${as_me-configure}:9586: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9587
9588                                         continue;;
9589                                 esac
9590                                 ;;
9591                         esac
9592                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9593                 fi
9594         done
9595         CFLAGS="$cf_save_CFLAGS"
9596 fi
9597 rm -f conftest*
9598
9599         if test "$cf_with_cxx" = yes ; then
9600
9601 INTEL_CPLUSPLUS=no
9602
9603 if test "$GCC" = yes ; then
9604         case $host_os in
9605         linux*|gnu*)
9606                 echo "$as_me:9606: checking if this is really Intel C++ compiler" >&5
9607 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9608                 cf_save_CFLAGS="$CXXFLAGS"
9609                 CXXFLAGS="$CXXFLAGS -no-gcc"
9610                 cat >conftest.$ac_ext <<_ACEOF
9611 #line 9611 "configure"
9612 #include "confdefs.h"
9613
9614 int
9615 main ()
9616 {
9617
9618 #ifdef __INTEL_COMPILER
9619 #else
9620 make an error
9621 #endif
9622
9623   ;
9624   return 0;
9625 }
9626 _ACEOF
9627 rm -f conftest.$ac_objext
9628 if { (eval echo "$as_me:9628: \"$ac_compile\"") >&5
9629   (eval $ac_compile) 2>&5
9630   ac_status=$?
9631   echo "$as_me:9631: \$? = $ac_status" >&5
9632   (exit $ac_status); } &&
9633          { ac_try='test -s conftest.$ac_objext'
9634   { (eval echo "$as_me:9634: \"$ac_try\"") >&5
9635   (eval $ac_try) 2>&5
9636   ac_status=$?
9637   echo "$as_me:9637: \$? = $ac_status" >&5
9638   (exit $ac_status); }; }; then
9639   INTEL_CPLUSPLUS=yes
9640 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9641
9642 else
9643   echo "$as_me: failed program was:" >&5
9644 cat conftest.$ac_ext >&5
9645 fi
9646 rm -f conftest.$ac_objext conftest.$ac_ext
9647                 CXXFLAGS="$cf_save_CFLAGS"
9648                 echo "$as_me:9648: result: $INTEL_CPLUSPLUS" >&5
9649 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9650                 ;;
9651         esac
9652 fi
9653
9654 ac_ext=cc
9655 ac_cpp='$CXXCPP $CPPFLAGS'
9656 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9657 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9658 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9659 ac_main_return=return
9660
9661 cat > conftest.$ac_ext <<EOF
9662 #line 9662 "configure"
9663 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9664 EOF
9665
9666 if test "$INTEL_CPLUSPLUS" = yes
9667 then
9668 # The "-wdXXX" options suppress warnings:
9669 # remark #1419: external declaration in primary source file
9670 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9671 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9672 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9673 # remark #193: zero used for undefined preprocessing identifier
9674 # remark #593: variable "curs_sb_left_arrow" was set but never used
9675 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9676 # remark #869: parameter "tw" was never referenced
9677 # remark #981: operands are evaluated in unspecified order
9678 # warning #269: invalid format string conversion
9679
9680         { echo "$as_me:9680: checking for $CC warning options..." >&5
9681 echo "$as_me: checking for $CC warning options..." >&6;}
9682         cf_save_CXXFLAGS="$CXXFLAGS"
9683         EXTRA_CXXFLAGS="-Wall"
9684         for cf_opt in \
9685                 wd1419 \
9686                 wd1682 \
9687                 wd1683 \
9688                 wd1684 \
9689                 wd193 \
9690                 wd279 \
9691                 wd593 \
9692                 wd810 \
9693                 wd869 \
9694                 wd981
9695         do
9696                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9697                 if { (eval echo "$as_me:9697: \"$ac_compile\"") >&5
9698   (eval $ac_compile) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); }; then
9702                         test -n "$verbose" && echo "$as_me:9702: result: ... -$cf_opt" >&5
9703 echo "${ECHO_T}... -$cf_opt" >&6
9704                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9705                 fi
9706         done
9707         CXXFLAGS="$cf_save_CXXFLAGS"
9708
9709 elif test "$GXX" = yes
9710 then
9711         { echo "$as_me:9711: checking for $CXX warning options..." >&5
9712 echo "$as_me: checking for $CXX warning options..." >&6;}
9713         cf_save_CXXFLAGS="$CXXFLAGS"
9714         EXTRA_CXXFLAGS="-W -Wall"
9715         cf_gxx_extra_warnings=""
9716         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9717         case "$GCC_VERSION" in
9718         [1-2].*)
9719                 ;;
9720         *)
9721                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9722                 ;;
9723         esac
9724         for cf_opt in \
9725                 Wabi \
9726                 fabi-version=0 \
9727                 Woverloaded-virtual \
9728                 Wsign-promo \
9729                 Wsynth \
9730                 Wold-style-cast \
9731                 Wcast-align \
9732                 Wcast-qual \
9733                 Wmissing-prototypes \
9734                 Wpointer-arith \
9735                 Wshadow \
9736                 Wstrict-prototypes \
9737                 Wundef $cf_gxx_extra_warnings Wno-unused
9738         do
9739                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9740                 if { (eval echo "$as_me:9740: \"$ac_compile\"") >&5
9741   (eval $ac_compile) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); }; then
9745                         test -n "$verbose" && echo "$as_me:9745: result: ... -$cf_opt" >&5
9746 echo "${ECHO_T}... -$cf_opt" >&6
9747                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9748                 else
9749                         test -n "$verbose" && echo "$as_me:9749: result: ... no -$cf_opt" >&5
9750 echo "${ECHO_T}... no -$cf_opt" >&6
9751                 fi
9752         done
9753         CXXFLAGS="$cf_save_CXXFLAGS"
9754 fi
9755
9756 rm -f conftest*
9757 ac_ext=c
9758 ac_cpp='$CPP $CPPFLAGS'
9759 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9760 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9761 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9762 ac_main_return=return
9763
9764         fi
9765 fi
9766
9767 if test "$GCC" = yes
9768 then
9769 cat > conftest.i <<EOF
9770 #ifndef GCC_PRINTF
9771 #define GCC_PRINTF 0
9772 #endif
9773 #ifndef GCC_SCANF
9774 #define GCC_SCANF 0
9775 #endif
9776 #ifndef GCC_NORETURN
9777 #define GCC_NORETURN /* nothing */
9778 #endif
9779 #ifndef GCC_UNUSED
9780 #define GCC_UNUSED /* nothing */
9781 #endif
9782 EOF
9783 if test "$GCC" = yes
9784 then
9785         { echo "$as_me:9785: checking for $CC __attribute__ directives..." >&5
9786 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9787 cat > conftest.$ac_ext <<EOF
9788 #line 9788 "${as_me-configure}"
9789 #include "confdefs.h"
9790 #include "conftest.h"
9791 #include "conftest.i"
9792 #if     GCC_PRINTF
9793 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9794 #else
9795 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9796 #endif
9797 #if     GCC_SCANF
9798 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9799 #else
9800 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9801 #endif
9802 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9803 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9804 extern void foo(void) GCC_NORETURN;
9805 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9806 EOF
9807         for cf_attribute in scanf printf unused noreturn
9808         do
9809
9810 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9811
9812                 cf_directive="__attribute__(($cf_attribute))"
9813                 echo "checking for $CC $cf_directive" 1>&5
9814                 case $cf_attribute in
9815                 scanf|printf)
9816                 cat >conftest.h <<EOF
9817 #define GCC_$cf_ATTRIBUTE 1
9818 EOF
9819                         ;;
9820                 *)
9821                 cat >conftest.h <<EOF
9822 #define GCC_$cf_ATTRIBUTE $cf_directive
9823 EOF
9824                         ;;
9825                 esac
9826                 if { (eval echo "$as_me:9826: \"$ac_compile\"") >&5
9827   (eval $ac_compile) 2>&5
9828   ac_status=$?
9829   echo "$as_me:9829: \$? = $ac_status" >&5
9830   (exit $ac_status); }; then
9831                         test -n "$verbose" && echo "$as_me:9831: result: ... $cf_attribute" >&5
9832 echo "${ECHO_T}... $cf_attribute" >&6
9833                         cat conftest.h >>confdefs.h
9834                 fi
9835         done
9836 else
9837         fgrep define conftest.i >>confdefs.h
9838 fi
9839 rm -rf conftest*
9840 fi
9841
9842 ###     use option --enable-assertions to turn on generation of assertion code
9843 echo "$as_me:9843: checking if you want to enable runtime assertions" >&5
9844 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9845
9846 # Check whether --enable-assertions or --disable-assertions was given.
9847 if test "${enable_assertions+set}" = set; then
9848   enableval="$enable_assertions"
9849   with_assertions=$enableval
9850 else
9851   with_assertions=no
9852 fi;
9853 echo "$as_me:9853: result: $with_assertions" >&5
9854 echo "${ECHO_T}$with_assertions" >&6
9855 if test -n "$GCC"
9856 then
9857         if test "$with_assertions" = no
9858         then
9859                 cat >>confdefs.h <<\EOF
9860 #define NDEBUG 1
9861 EOF
9862
9863                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9864         else
9865                 ADAFLAGS="$ADAFLAGS -gnata"
9866         fi
9867 fi
9868
9869 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9870
9871 echo "$as_me:9871: checking if you want to use dmalloc for testing" >&5
9872 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9873
9874 # Check whether --with-dmalloc or --without-dmalloc was given.
9875 if test "${with_dmalloc+set}" = set; then
9876   withval="$with_dmalloc"
9877   cat >>confdefs.h <<\EOF
9878 #define USE_DMALLOC 1
9879 EOF
9880
9881         : ${with_cflags:=-g}
9882         : ${with_no_leaks:=yes}
9883          with_dmalloc=yes
9884 else
9885   with_dmalloc=
9886 fi;
9887 echo "$as_me:9887: result: ${with_dmalloc:-no}" >&5
9888 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9889
9890 case .$with_cflags in #(vi
9891 .*-g*)
9892         case .$CFLAGS in #(vi
9893         .*-g*) #(vi
9894                 ;;
9895         *)
9896
9897 cf_fix_cppflags=no
9898 cf_new_cflags=
9899 cf_new_cppflags=
9900 cf_new_extra_cppflags=
9901
9902 for cf_add_cflags in -g
9903 do
9904 case $cf_fix_cppflags in
9905 no)
9906         case $cf_add_cflags in #(vi
9907         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9908                 case $cf_add_cflags in
9909                 -D*)
9910                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9911
9912                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9913                         && test -z "${cf_tst_cflags}" \
9914                         && cf_fix_cppflags=yes
9915
9916                         if test $cf_fix_cppflags = yes ; then
9917                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9918                                 continue
9919                         elif test "${cf_tst_cflags}" = "\"'" ; then
9920                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9921                                 continue
9922                         fi
9923                         ;;
9924                 esac
9925                 case "$CPPFLAGS" in
9926                 *$cf_add_cflags) #(vi
9927                         ;;
9928                 *) #(vi
9929                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9930                         ;;
9931                 esac
9932                 ;;
9933         *)
9934                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9935                 ;;
9936         esac
9937         ;;
9938 yes)
9939         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9940
9941         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9942
9943         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9944         && test -z "${cf_tst_cflags}" \
9945         && cf_fix_cppflags=no
9946         ;;
9947 esac
9948 done
9949
9950 if test -n "$cf_new_cflags" ; then
9951
9952         CFLAGS="$CFLAGS $cf_new_cflags"
9953 fi
9954
9955 if test -n "$cf_new_cppflags" ; then
9956
9957         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9958 fi
9959
9960 if test -n "$cf_new_extra_cppflags" ; then
9961
9962         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9963 fi
9964
9965                 ;;
9966         esac
9967         ;;
9968 esac
9969
9970 if test "$with_dmalloc" = yes ; then
9971         echo "$as_me:9971: checking for dmalloc.h" >&5
9972 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9973 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9974   echo $ECHO_N "(cached) $ECHO_C" >&6
9975 else
9976   cat >conftest.$ac_ext <<_ACEOF
9977 #line 9977 "configure"
9978 #include "confdefs.h"
9979 #include <dmalloc.h>
9980 _ACEOF
9981 if { (eval echo "$as_me:9981: \"$ac_cpp conftest.$ac_ext\"") >&5
9982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9983   ac_status=$?
9984   egrep -v '^ *\+' conftest.er1 >conftest.err
9985   rm -f conftest.er1
9986   cat conftest.err >&5
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit $ac_status); } >/dev/null; then
9989   if test -s conftest.err; then
9990     ac_cpp_err=$ac_c_preproc_warn_flag
9991   else
9992     ac_cpp_err=
9993   fi
9994 else
9995   ac_cpp_err=yes
9996 fi
9997 if test -z "$ac_cpp_err"; then
9998   ac_cv_header_dmalloc_h=yes
9999 else
10000   echo "$as_me: failed program was:" >&5
10001   cat conftest.$ac_ext >&5
10002   ac_cv_header_dmalloc_h=no
10003 fi
10004 rm -f conftest.err conftest.$ac_ext
10005 fi
10006 echo "$as_me:10006: result: $ac_cv_header_dmalloc_h" >&5
10007 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10008 if test $ac_cv_header_dmalloc_h = yes; then
10009
10010 echo "$as_me:10010: checking for dmalloc_debug in -ldmalloc" >&5
10011 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10012 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10013   echo $ECHO_N "(cached) $ECHO_C" >&6
10014 else
10015   ac_check_lib_save_LIBS=$LIBS
10016 LIBS="-ldmalloc  $LIBS"
10017 cat >conftest.$ac_ext <<_ACEOF
10018 #line 10018 "configure"
10019 #include "confdefs.h"
10020
10021 /* Override any gcc2 internal prototype to avoid an error.  */
10022 #ifdef __cplusplus
10023 extern "C"
10024 #endif
10025 /* We use char because int might match the return type of a gcc2
10026    builtin and then its argument prototype would still apply.  */
10027 char dmalloc_debug ();
10028 int
10029 main ()
10030 {
10031 dmalloc_debug ();
10032   ;
10033   return 0;
10034 }
10035 _ACEOF
10036 rm -f conftest.$ac_objext conftest$ac_exeext
10037 if { (eval echo "$as_me:10037: \"$ac_link\"") >&5
10038   (eval $ac_link) 2>&5
10039   ac_status=$?
10040   echo "$as_me:10040: \$? = $ac_status" >&5
10041   (exit $ac_status); } &&
10042          { ac_try='test -s conftest$ac_exeext'
10043   { (eval echo "$as_me:10043: \"$ac_try\"") >&5
10044   (eval $ac_try) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); }; }; then
10048   ac_cv_lib_dmalloc_dmalloc_debug=yes
10049 else
10050   echo "$as_me: failed program was:" >&5
10051 cat conftest.$ac_ext >&5
10052 ac_cv_lib_dmalloc_dmalloc_debug=no
10053 fi
10054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10055 LIBS=$ac_check_lib_save_LIBS
10056 fi
10057 echo "$as_me:10057: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10058 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10059 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10060   cat >>confdefs.h <<EOF
10061 #define HAVE_LIBDMALLOC 1
10062 EOF
10063
10064   LIBS="-ldmalloc $LIBS"
10065
10066 fi
10067
10068 fi
10069
10070 fi
10071
10072 echo "$as_me:10072: checking if you want to use dbmalloc for testing" >&5
10073 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10074
10075 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10076 if test "${with_dbmalloc+set}" = set; then
10077   withval="$with_dbmalloc"
10078   cat >>confdefs.h <<\EOF
10079 #define USE_DBMALLOC 1
10080 EOF
10081
10082         : ${with_cflags:=-g}
10083         : ${with_no_leaks:=yes}
10084          with_dbmalloc=yes
10085 else
10086   with_dbmalloc=
10087 fi;
10088 echo "$as_me:10088: result: ${with_dbmalloc:-no}" >&5
10089 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10090
10091 case .$with_cflags in #(vi
10092 .*-g*)
10093         case .$CFLAGS in #(vi
10094         .*-g*) #(vi
10095                 ;;
10096         *)
10097
10098 cf_fix_cppflags=no
10099 cf_new_cflags=
10100 cf_new_cppflags=
10101 cf_new_extra_cppflags=
10102
10103 for cf_add_cflags in -g
10104 do
10105 case $cf_fix_cppflags in
10106 no)
10107         case $cf_add_cflags in #(vi
10108         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10109                 case $cf_add_cflags in
10110                 -D*)
10111                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10112
10113                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10114                         && test -z "${cf_tst_cflags}" \
10115                         && cf_fix_cppflags=yes
10116
10117                         if test $cf_fix_cppflags = yes ; then
10118                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10119                                 continue
10120                         elif test "${cf_tst_cflags}" = "\"'" ; then
10121                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10122                                 continue
10123                         fi
10124                         ;;
10125                 esac
10126                 case "$CPPFLAGS" in
10127                 *$cf_add_cflags) #(vi
10128                         ;;
10129                 *) #(vi
10130                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10131                         ;;
10132                 esac
10133                 ;;
10134         *)
10135                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10136                 ;;
10137         esac
10138         ;;
10139 yes)
10140         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10141
10142         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10143
10144         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10145         && test -z "${cf_tst_cflags}" \
10146         && cf_fix_cppflags=no
10147         ;;
10148 esac
10149 done
10150
10151 if test -n "$cf_new_cflags" ; then
10152
10153         CFLAGS="$CFLAGS $cf_new_cflags"
10154 fi
10155
10156 if test -n "$cf_new_cppflags" ; then
10157
10158         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10159 fi
10160
10161 if test -n "$cf_new_extra_cppflags" ; then
10162
10163         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10164 fi
10165
10166                 ;;
10167         esac
10168         ;;
10169 esac
10170
10171 if test "$with_dbmalloc" = yes ; then
10172         echo "$as_me:10172: checking for dbmalloc.h" >&5
10173 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10174 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10175   echo $ECHO_N "(cached) $ECHO_C" >&6
10176 else
10177   cat >conftest.$ac_ext <<_ACEOF
10178 #line 10178 "configure"
10179 #include "confdefs.h"
10180 #include <dbmalloc.h>
10181 _ACEOF
10182 if { (eval echo "$as_me:10182: \"$ac_cpp conftest.$ac_ext\"") >&5
10183   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10184   ac_status=$?
10185   egrep -v '^ *\+' conftest.er1 >conftest.err
10186   rm -f conftest.er1
10187   cat conftest.err >&5
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); } >/dev/null; then
10190   if test -s conftest.err; then
10191     ac_cpp_err=$ac_c_preproc_warn_flag
10192   else
10193     ac_cpp_err=
10194   fi
10195 else
10196   ac_cpp_err=yes
10197 fi
10198 if test -z "$ac_cpp_err"; then
10199   ac_cv_header_dbmalloc_h=yes
10200 else
10201   echo "$as_me: failed program was:" >&5
10202   cat conftest.$ac_ext >&5
10203   ac_cv_header_dbmalloc_h=no
10204 fi
10205 rm -f conftest.err conftest.$ac_ext
10206 fi
10207 echo "$as_me:10207: result: $ac_cv_header_dbmalloc_h" >&5
10208 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10209 if test $ac_cv_header_dbmalloc_h = yes; then
10210
10211 echo "$as_me:10211: checking for debug_malloc in -ldbmalloc" >&5
10212 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10213 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10214   echo $ECHO_N "(cached) $ECHO_C" >&6
10215 else
10216   ac_check_lib_save_LIBS=$LIBS
10217 LIBS="-ldbmalloc  $LIBS"
10218 cat >conftest.$ac_ext <<_ACEOF
10219 #line 10219 "configure"
10220 #include "confdefs.h"
10221
10222 /* Override any gcc2 internal prototype to avoid an error.  */
10223 #ifdef __cplusplus
10224 extern "C"
10225 #endif
10226 /* We use char because int might match the return type of a gcc2
10227    builtin and then its argument prototype would still apply.  */
10228 char debug_malloc ();
10229 int
10230 main ()
10231 {
10232 debug_malloc ();
10233   ;
10234   return 0;
10235 }
10236 _ACEOF
10237 rm -f conftest.$ac_objext conftest$ac_exeext
10238 if { (eval echo "$as_me:10238: \"$ac_link\"") >&5
10239   (eval $ac_link) 2>&5
10240   ac_status=$?
10241   echo "$as_me:10241: \$? = $ac_status" >&5
10242   (exit $ac_status); } &&
10243          { ac_try='test -s conftest$ac_exeext'
10244   { (eval echo "$as_me:10244: \"$ac_try\"") >&5
10245   (eval $ac_try) 2>&5
10246   ac_status=$?
10247   echo "$as_me:10247: \$? = $ac_status" >&5
10248   (exit $ac_status); }; }; then
10249   ac_cv_lib_dbmalloc_debug_malloc=yes
10250 else
10251   echo "$as_me: failed program was:" >&5
10252 cat conftest.$ac_ext >&5
10253 ac_cv_lib_dbmalloc_debug_malloc=no
10254 fi
10255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10256 LIBS=$ac_check_lib_save_LIBS
10257 fi
10258 echo "$as_me:10258: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10259 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10260 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10261   cat >>confdefs.h <<EOF
10262 #define HAVE_LIBDBMALLOC 1
10263 EOF
10264
10265   LIBS="-ldbmalloc $LIBS"
10266
10267 fi
10268
10269 fi
10270
10271 fi
10272
10273 echo "$as_me:10273: checking if you want to use valgrind for testing" >&5
10274 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10275
10276 # Check whether --with-valgrind or --without-valgrind was given.
10277 if test "${with_valgrind+set}" = set; then
10278   withval="$with_valgrind"
10279   cat >>confdefs.h <<\EOF
10280 #define USE_VALGRIND 1
10281 EOF
10282
10283         : ${with_cflags:=-g}
10284         : ${with_no_leaks:=yes}
10285          with_valgrind=yes
10286 else
10287   with_valgrind=
10288 fi;
10289 echo "$as_me:10289: result: ${with_valgrind:-no}" >&5
10290 echo "${ECHO_T}${with_valgrind:-no}" >&6
10291
10292 case .$with_cflags in #(vi
10293 .*-g*)
10294         case .$CFLAGS in #(vi
10295         .*-g*) #(vi
10296                 ;;
10297         *)
10298
10299 cf_fix_cppflags=no
10300 cf_new_cflags=
10301 cf_new_cppflags=
10302 cf_new_extra_cppflags=
10303
10304 for cf_add_cflags in -g
10305 do
10306 case $cf_fix_cppflags in
10307 no)
10308         case $cf_add_cflags in #(vi
10309         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10310                 case $cf_add_cflags in
10311                 -D*)
10312                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10313
10314                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10315                         && test -z "${cf_tst_cflags}" \
10316                         && cf_fix_cppflags=yes
10317
10318                         if test $cf_fix_cppflags = yes ; then
10319                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10320                                 continue
10321                         elif test "${cf_tst_cflags}" = "\"'" ; then
10322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10323                                 continue
10324                         fi
10325                         ;;
10326                 esac
10327                 case "$CPPFLAGS" in
10328                 *$cf_add_cflags) #(vi
10329                         ;;
10330                 *) #(vi
10331                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10332                         ;;
10333                 esac
10334                 ;;
10335         *)
10336                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10337                 ;;
10338         esac
10339         ;;
10340 yes)
10341         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10342
10343         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10344
10345         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10346         && test -z "${cf_tst_cflags}" \
10347         && cf_fix_cppflags=no
10348         ;;
10349 esac
10350 done
10351
10352 if test -n "$cf_new_cflags" ; then
10353
10354         CFLAGS="$CFLAGS $cf_new_cflags"
10355 fi
10356
10357 if test -n "$cf_new_cppflags" ; then
10358
10359         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10360 fi
10361
10362 if test -n "$cf_new_extra_cppflags" ; then
10363
10364         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10365 fi
10366
10367                 ;;
10368         esac
10369         ;;
10370 esac
10371
10372 echo "$as_me:10372: checking if you want to perform memory-leak testing" >&5
10373 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10374
10375 # Check whether --enable-leaks or --disable-leaks was given.
10376 if test "${enable_leaks+set}" = set; then
10377   enableval="$enable_leaks"
10378   with_no_leaks=yes
10379 else
10380   : ${with_no_leaks:=no}
10381 fi;
10382 echo "$as_me:10382: result: $with_no_leaks" >&5
10383 echo "${ECHO_T}$with_no_leaks" >&6
10384
10385 if test "$with_no_leaks" = yes ; then
10386         cat >>confdefs.h <<\EOF
10387 #define NO_LEAKS 1
10388 EOF
10389
10390 fi
10391
10392 cat >>confdefs.h <<\EOF
10393 #define HAVE_NC_ALLOC_H 1
10394 EOF
10395
10396 ###     use option --enable-expanded to generate certain macros as functions
10397
10398 # Check whether --enable-expanded or --disable-expanded was given.
10399 if test "${enable_expanded+set}" = set; then
10400   enableval="$enable_expanded"
10401   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10402 #define NCURSES_EXPANDED 1
10403 EOF
10404
10405 fi;
10406
10407 ###     use option --disable-macros to suppress macros in favor of functions
10408
10409 # Check whether --enable-macros or --disable-macros was given.
10410 if test "${enable_macros+set}" = set; then
10411   enableval="$enable_macros"
10412   test "$enableval" = no && cat >>confdefs.h <<\EOF
10413 #define NCURSES_NOMACROS 1
10414 EOF
10415
10416 fi;
10417
10418 # Normally we only add trace() to the debug-library.  Allow this to be
10419 # extended to all models of the ncurses library:
10420 cf_all_traces=no
10421 case "$CFLAGS $CPPFLAGS" in
10422 *-DTRACE*)
10423         cf_all_traces=yes
10424         ;;
10425 esac
10426
10427 echo "$as_me:10427: checking whether to add trace feature to all models" >&5
10428 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10429
10430 # Check whether --with-trace or --without-trace was given.
10431 if test "${with_trace+set}" = set; then
10432   withval="$with_trace"
10433   cf_with_trace=$withval
10434 else
10435   cf_with_trace=$cf_all_traces
10436 fi;
10437 echo "$as_me:10437: result: $cf_with_trace" >&5
10438 echo "${ECHO_T}$cf_with_trace" >&6
10439
10440 if test "$cf_with_trace" = yes ; then
10441         LIB_TRACING=all
10442         ADA_TRACE=TRUE
10443
10444 cf_fix_cppflags=no
10445 cf_new_cflags=
10446 cf_new_cppflags=
10447 cf_new_extra_cppflags=
10448
10449 for cf_add_cflags in -DTRACE
10450 do
10451 case $cf_fix_cppflags in
10452 no)
10453         case $cf_add_cflags in #(vi
10454         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10455                 case $cf_add_cflags in
10456                 -D*)
10457                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10458
10459                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10460                         && test -z "${cf_tst_cflags}" \
10461                         && cf_fix_cppflags=yes
10462
10463                         if test $cf_fix_cppflags = yes ; then
10464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10465                                 continue
10466                         elif test "${cf_tst_cflags}" = "\"'" ; then
10467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10468                                 continue
10469                         fi
10470                         ;;
10471                 esac
10472                 case "$CPPFLAGS" in
10473                 *$cf_add_cflags) #(vi
10474                         ;;
10475                 *) #(vi
10476                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10477                         ;;
10478                 esac
10479                 ;;
10480         *)
10481                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10482                 ;;
10483         esac
10484         ;;
10485 yes)
10486         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10487
10488         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10489
10490         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10491         && test -z "${cf_tst_cflags}" \
10492         && cf_fix_cppflags=no
10493         ;;
10494 esac
10495 done
10496
10497 if test -n "$cf_new_cflags" ; then
10498
10499         CFLAGS="$CFLAGS $cf_new_cflags"
10500 fi
10501
10502 if test -n "$cf_new_cppflags" ; then
10503
10504         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10505 fi
10506
10507 if test -n "$cf_new_extra_cppflags" ; then
10508
10509         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10510 fi
10511
10512 else
10513         LIB_TRACING=DEBUG
10514         ADA_TRACE=FALSE
10515 fi
10516
10517 ###     Checks for libraries.
10518 echo "$as_me:10518: checking for gettimeofday" >&5
10519 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10520 if test "${ac_cv_func_gettimeofday+set}" = set; then
10521   echo $ECHO_N "(cached) $ECHO_C" >&6
10522 else
10523   cat >conftest.$ac_ext <<_ACEOF
10524 #line 10524 "configure"
10525 #include "confdefs.h"
10526 /* System header to define __stub macros and hopefully few prototypes,
10527     which can conflict with char gettimeofday (); below.  */
10528 #include <assert.h>
10529 /* Override any gcc2 internal prototype to avoid an error.  */
10530 #ifdef __cplusplus
10531 extern "C"
10532 #endif
10533 /* We use char because int might match the return type of a gcc2
10534    builtin and then its argument prototype would still apply.  */
10535 char gettimeofday ();
10536 char (*f) ();
10537
10538 int
10539 main ()
10540 {
10541 /* The GNU C library defines this for functions which it implements
10542     to always fail with ENOSYS.  Some functions are actually named
10543     something starting with __ and the normal name is an alias.  */
10544 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10545 choke me
10546 #else
10547 f = gettimeofday;
10548 #endif
10549
10550   ;
10551   return 0;
10552 }
10553 _ACEOF
10554 rm -f conftest.$ac_objext conftest$ac_exeext
10555 if { (eval echo "$as_me:10555: \"$ac_link\"") >&5
10556   (eval $ac_link) 2>&5
10557   ac_status=$?
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit $ac_status); } &&
10560          { ac_try='test -s conftest$ac_exeext'
10561   { (eval echo "$as_me:10561: \"$ac_try\"") >&5
10562   (eval $ac_try) 2>&5
10563   ac_status=$?
10564   echo "$as_me:10564: \$? = $ac_status" >&5
10565   (exit $ac_status); }; }; then
10566   ac_cv_func_gettimeofday=yes
10567 else
10568   echo "$as_me: failed program was:" >&5
10569 cat conftest.$ac_ext >&5
10570 ac_cv_func_gettimeofday=no
10571 fi
10572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10573 fi
10574 echo "$as_me:10574: result: $ac_cv_func_gettimeofday" >&5
10575 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10576 if test $ac_cv_func_gettimeofday = yes; then
10577   cat >>confdefs.h <<\EOF
10578 #define HAVE_GETTIMEOFDAY 1
10579 EOF
10580
10581 else
10582
10583 echo "$as_me:10583: checking for gettimeofday in -lbsd" >&5
10584 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10585 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10586   echo $ECHO_N "(cached) $ECHO_C" >&6
10587 else
10588   ac_check_lib_save_LIBS=$LIBS
10589 LIBS="-lbsd  $LIBS"
10590 cat >conftest.$ac_ext <<_ACEOF
10591 #line 10591 "configure"
10592 #include "confdefs.h"
10593
10594 /* Override any gcc2 internal prototype to avoid an error.  */
10595 #ifdef __cplusplus
10596 extern "C"
10597 #endif
10598 /* We use char because int might match the return type of a gcc2
10599    builtin and then its argument prototype would still apply.  */
10600 char gettimeofday ();
10601 int
10602 main ()
10603 {
10604 gettimeofday ();
10605   ;
10606   return 0;
10607 }
10608 _ACEOF
10609 rm -f conftest.$ac_objext conftest$ac_exeext
10610 if { (eval echo "$as_me:10610: \"$ac_link\"") >&5
10611   (eval $ac_link) 2>&5
10612   ac_status=$?
10613   echo "$as_me:10613: \$? = $ac_status" >&5
10614   (exit $ac_status); } &&
10615          { ac_try='test -s conftest$ac_exeext'
10616   { (eval echo "$as_me:10616: \"$ac_try\"") >&5
10617   (eval $ac_try) 2>&5
10618   ac_status=$?
10619   echo "$as_me:10619: \$? = $ac_status" >&5
10620   (exit $ac_status); }; }; then
10621   ac_cv_lib_bsd_gettimeofday=yes
10622 else
10623   echo "$as_me: failed program was:" >&5
10624 cat conftest.$ac_ext >&5
10625 ac_cv_lib_bsd_gettimeofday=no
10626 fi
10627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10628 LIBS=$ac_check_lib_save_LIBS
10629 fi
10630 echo "$as_me:10630: result: $ac_cv_lib_bsd_gettimeofday" >&5
10631 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10632 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10633   cat >>confdefs.h <<\EOF
10634 #define HAVE_GETTIMEOFDAY 1
10635 EOF
10636
10637         LIBS="$LIBS -lbsd"
10638 fi
10639
10640 fi
10641
10642 echo "$as_me:10642: checking if -lm needed for math functions" >&5
10643 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10644 if test "${cf_cv_need_libm+set}" = set; then
10645   echo $ECHO_N "(cached) $ECHO_C" >&6
10646 else
10647
10648         cat >conftest.$ac_ext <<_ACEOF
10649 #line 10649 "configure"
10650 #include "confdefs.h"
10651
10652         #include <stdio.h>
10653         #include <math.h>
10654
10655 int
10656 main ()
10657 {
10658 double x = rand(); printf("result = %g\n", sin(x))
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 rm -f conftest.$ac_objext conftest$ac_exeext
10664 if { (eval echo "$as_me:10664: \"$ac_link\"") >&5
10665   (eval $ac_link) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); } &&
10669          { ac_try='test -s conftest$ac_exeext'
10670   { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671   (eval $ac_try) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit $ac_status); }; }; then
10675   cf_cv_need_libm=no
10676 else
10677   echo "$as_me: failed program was:" >&5
10678 cat conftest.$ac_ext >&5
10679 cf_cv_need_libm=yes
10680 fi
10681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10682 fi
10683 echo "$as_me:10683: result: $cf_cv_need_libm" >&5
10684 echo "${ECHO_T}$cf_cv_need_libm" >&6
10685 if test "$cf_cv_need_libm" = yes
10686 then
10687 MATH_LIB=-lm
10688 fi
10689
10690 ###     Checks for header files.
10691 echo "$as_me:10691: checking for ANSI C header files" >&5
10692 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10693 if test "${ac_cv_header_stdc+set}" = set; then
10694   echo $ECHO_N "(cached) $ECHO_C" >&6
10695 else
10696   cat >conftest.$ac_ext <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699 #include <stdlib.h>
10700 #include <stdarg.h>
10701 #include <string.h>
10702 #include <float.h>
10703
10704 _ACEOF
10705 if { (eval echo "$as_me:10705: \"$ac_cpp conftest.$ac_ext\"") >&5
10706   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10707   ac_status=$?
10708   egrep -v '^ *\+' conftest.er1 >conftest.err
10709   rm -f conftest.er1
10710   cat conftest.err >&5
10711   echo "$as_me:10711: \$? = $ac_status" >&5
10712   (exit $ac_status); } >/dev/null; then
10713   if test -s conftest.err; then
10714     ac_cpp_err=$ac_c_preproc_warn_flag
10715   else
10716     ac_cpp_err=
10717   fi
10718 else
10719   ac_cpp_err=yes
10720 fi
10721 if test -z "$ac_cpp_err"; then
10722   ac_cv_header_stdc=yes
10723 else
10724   echo "$as_me: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   ac_cv_header_stdc=no
10727 fi
10728 rm -f conftest.err conftest.$ac_ext
10729
10730 if test $ac_cv_header_stdc = yes; then
10731   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10732   cat >conftest.$ac_ext <<_ACEOF
10733 #line 10733 "configure"
10734 #include "confdefs.h"
10735 #include <string.h>
10736
10737 _ACEOF
10738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10739   egrep "memchr" >/dev/null 2>&1; then
10740   :
10741 else
10742   ac_cv_header_stdc=no
10743 fi
10744 rm -f conftest*
10745
10746 fi
10747
10748 if test $ac_cv_header_stdc = yes; then
10749   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10750   cat >conftest.$ac_ext <<_ACEOF
10751 #line 10751 "configure"
10752 #include "confdefs.h"
10753 #include <stdlib.h>
10754
10755 _ACEOF
10756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10757   egrep "free" >/dev/null 2>&1; then
10758   :
10759 else
10760   ac_cv_header_stdc=no
10761 fi
10762 rm -f conftest*
10763
10764 fi
10765
10766 if test $ac_cv_header_stdc = yes; then
10767   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10768   if test "$cross_compiling" = yes; then
10769   :
10770 else
10771   cat >conftest.$ac_ext <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774 #include <ctype.h>
10775 #if ((' ' & 0x0FF) == 0x020)
10776 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10777 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10778 #else
10779 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10780                      || ('j' <= (c) && (c) <= 'r') \
10781                      || ('s' <= (c) && (c) <= 'z'))
10782 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10783 #endif
10784
10785 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10786 int
10787 main ()
10788 {
10789   int i;
10790   for (i = 0; i < 256; i++)
10791     if (XOR (islower (i), ISLOWER (i))
10792         || toupper (i) != TOUPPER (i))
10793       $ac_main_return(2);
10794   $ac_main_return (0);
10795 }
10796 _ACEOF
10797 rm -f conftest$ac_exeext
10798 if { (eval echo "$as_me:10798: \"$ac_link\"") >&5
10799   (eval $ac_link) 2>&5
10800   ac_status=$?
10801   echo "$as_me:10801: \$? = $ac_status" >&5
10802   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10803   { (eval echo "$as_me:10803: \"$ac_try\"") >&5
10804   (eval $ac_try) 2>&5
10805   ac_status=$?
10806   echo "$as_me:10806: \$? = $ac_status" >&5
10807   (exit $ac_status); }; }; then
10808   :
10809 else
10810   echo "$as_me: program exited with status $ac_status" >&5
10811 echo "$as_me: failed program was:" >&5
10812 cat conftest.$ac_ext >&5
10813 ac_cv_header_stdc=no
10814 fi
10815 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10816 fi
10817 fi
10818 fi
10819 echo "$as_me:10819: result: $ac_cv_header_stdc" >&5
10820 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10821 if test $ac_cv_header_stdc = yes; then
10822
10823 cat >>confdefs.h <<\EOF
10824 #define STDC_HEADERS 1
10825 EOF
10826
10827 fi
10828
10829 ac_header_dirent=no
10830 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10831   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10832 echo "$as_me:10832: checking for $ac_hdr that defines DIR" >&5
10833 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10835   echo $ECHO_N "(cached) $ECHO_C" >&6
10836 else
10837   cat >conftest.$ac_ext <<_ACEOF
10838 #line 10838 "configure"
10839 #include "confdefs.h"
10840 #include <sys/types.h>
10841 #include <$ac_hdr>
10842
10843 int
10844 main ()
10845 {
10846 if ((DIR *) 0)
10847 return 0;
10848   ;
10849   return 0;
10850 }
10851 _ACEOF
10852 rm -f conftest.$ac_objext
10853 if { (eval echo "$as_me:10853: \"$ac_compile\"") >&5
10854   (eval $ac_compile) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); } &&
10858          { ac_try='test -s conftest.$ac_objext'
10859   { (eval echo "$as_me:10859: \"$ac_try\"") >&5
10860   (eval $ac_try) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit $ac_status); }; }; then
10864   eval "$as_ac_Header=yes"
10865 else
10866   echo "$as_me: failed program was:" >&5
10867 cat conftest.$ac_ext >&5
10868 eval "$as_ac_Header=no"
10869 fi
10870 rm -f conftest.$ac_objext conftest.$ac_ext
10871 fi
10872 echo "$as_me:10872: result: `eval echo '${'$as_ac_Header'}'`" >&5
10873 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10874 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10875   cat >>confdefs.h <<EOF
10876 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10877 EOF
10878
10879 ac_header_dirent=$ac_hdr; break
10880 fi
10881
10882 done
10883 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10884 if test $ac_header_dirent = dirent.h; then
10885   echo "$as_me:10885: checking for opendir in -ldir" >&5
10886 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10887 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10888   echo $ECHO_N "(cached) $ECHO_C" >&6
10889 else
10890   ac_check_lib_save_LIBS=$LIBS
10891 LIBS="-ldir  $LIBS"
10892 cat >conftest.$ac_ext <<_ACEOF
10893 #line 10893 "configure"
10894 #include "confdefs.h"
10895
10896 /* Override any gcc2 internal prototype to avoid an error.  */
10897 #ifdef __cplusplus
10898 extern "C"
10899 #endif
10900 /* We use char because int might match the return type of a gcc2
10901    builtin and then its argument prototype would still apply.  */
10902 char opendir ();
10903 int
10904 main ()
10905 {
10906 opendir ();
10907   ;
10908   return 0;
10909 }
10910 _ACEOF
10911 rm -f conftest.$ac_objext conftest$ac_exeext
10912 if { (eval echo "$as_me:10912: \"$ac_link\"") >&5
10913   (eval $ac_link) 2>&5
10914   ac_status=$?
10915   echo "$as_me:10915: \$? = $ac_status" >&5
10916   (exit $ac_status); } &&
10917          { ac_try='test -s conftest$ac_exeext'
10918   { (eval echo "$as_me:10918: \"$ac_try\"") >&5
10919   (eval $ac_try) 2>&5
10920   ac_status=$?
10921   echo "$as_me:10921: \$? = $ac_status" >&5
10922   (exit $ac_status); }; }; then
10923   ac_cv_lib_dir_opendir=yes
10924 else
10925   echo "$as_me: failed program was:" >&5
10926 cat conftest.$ac_ext >&5
10927 ac_cv_lib_dir_opendir=no
10928 fi
10929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10930 LIBS=$ac_check_lib_save_LIBS
10931 fi
10932 echo "$as_me:10932: result: $ac_cv_lib_dir_opendir" >&5
10933 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10934 if test $ac_cv_lib_dir_opendir = yes; then
10935   LIBS="$LIBS -ldir"
10936 fi
10937
10938 else
10939   echo "$as_me:10939: checking for opendir in -lx" >&5
10940 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10941 if test "${ac_cv_lib_x_opendir+set}" = set; then
10942   echo $ECHO_N "(cached) $ECHO_C" >&6
10943 else
10944   ac_check_lib_save_LIBS=$LIBS
10945 LIBS="-lx  $LIBS"
10946 cat >conftest.$ac_ext <<_ACEOF
10947 #line 10947 "configure"
10948 #include "confdefs.h"
10949
10950 /* Override any gcc2 internal prototype to avoid an error.  */
10951 #ifdef __cplusplus
10952 extern "C"
10953 #endif
10954 /* We use char because int might match the return type of a gcc2
10955    builtin and then its argument prototype would still apply.  */
10956 char opendir ();
10957 int
10958 main ()
10959 {
10960 opendir ();
10961   ;
10962   return 0;
10963 }
10964 _ACEOF
10965 rm -f conftest.$ac_objext conftest$ac_exeext
10966 if { (eval echo "$as_me:10966: \"$ac_link\"") >&5
10967   (eval $ac_link) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit $ac_status); } &&
10971          { ac_try='test -s conftest$ac_exeext'
10972   { (eval echo "$as_me:10972: \"$ac_try\"") >&5
10973   (eval $ac_try) 2>&5
10974   ac_status=$?
10975   echo "$as_me:10975: \$? = $ac_status" >&5
10976   (exit $ac_status); }; }; then
10977   ac_cv_lib_x_opendir=yes
10978 else
10979   echo "$as_me: failed program was:" >&5
10980 cat conftest.$ac_ext >&5
10981 ac_cv_lib_x_opendir=no
10982 fi
10983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10984 LIBS=$ac_check_lib_save_LIBS
10985 fi
10986 echo "$as_me:10986: result: $ac_cv_lib_x_opendir" >&5
10987 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10988 if test $ac_cv_lib_x_opendir = yes; then
10989   LIBS="$LIBS -lx"
10990 fi
10991
10992 fi
10993
10994 echo "$as_me:10994: checking whether time.h and sys/time.h may both be included" >&5
10995 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10996 if test "${ac_cv_header_time+set}" = set; then
10997   echo $ECHO_N "(cached) $ECHO_C" >&6
10998 else
10999   cat >conftest.$ac_ext <<_ACEOF
11000 #line 11000 "configure"
11001 #include "confdefs.h"
11002 #include <sys/types.h>
11003 #include <sys/time.h>
11004 #include <time.h>
11005
11006 int
11007 main ()
11008 {
11009 if ((struct tm *) 0)
11010 return 0;
11011   ;
11012   return 0;
11013 }
11014 _ACEOF
11015 rm -f conftest.$ac_objext
11016 if { (eval echo "$as_me:11016: \"$ac_compile\"") >&5
11017   (eval $ac_compile) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit $ac_status); } &&
11021          { ac_try='test -s conftest.$ac_objext'
11022   { (eval echo "$as_me:11022: \"$ac_try\"") >&5
11023   (eval $ac_try) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit $ac_status); }; }; then
11027   ac_cv_header_time=yes
11028 else
11029   echo "$as_me: failed program was:" >&5
11030 cat conftest.$ac_ext >&5
11031 ac_cv_header_time=no
11032 fi
11033 rm -f conftest.$ac_objext conftest.$ac_ext
11034 fi
11035 echo "$as_me:11035: result: $ac_cv_header_time" >&5
11036 echo "${ECHO_T}$ac_cv_header_time" >&6
11037 if test $ac_cv_header_time = yes; then
11038
11039 cat >>confdefs.h <<\EOF
11040 #define TIME_WITH_SYS_TIME 1
11041 EOF
11042
11043 fi
11044
11045 echo "$as_me:11045: checking for regular-expression headers" >&5
11046 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11047 if test "${cf_cv_regex+set}" = set; then
11048   echo $ECHO_N "(cached) $ECHO_C" >&6
11049 else
11050
11051 cat >conftest.$ac_ext <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #include <sys/types.h>
11055 #include <regex.h>
11056 int
11057 main ()
11058 {
11059
11060         regex_t *p;
11061         int x = regcomp(p, "", 0);
11062         int y = regexec(p, "", 0, 0, 0);
11063         regfree(p);
11064
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 rm -f conftest.$ac_objext conftest$ac_exeext
11070 if { (eval echo "$as_me:11070: \"$ac_link\"") >&5
11071   (eval $ac_link) 2>&5
11072   ac_status=$?
11073   echo "$as_me:11073: \$? = $ac_status" >&5
11074   (exit $ac_status); } &&
11075          { ac_try='test -s conftest$ac_exeext'
11076   { (eval echo "$as_me:11076: \"$ac_try\"") >&5
11077   (eval $ac_try) 2>&5
11078   ac_status=$?
11079   echo "$as_me:11079: \$? = $ac_status" >&5
11080   (exit $ac_status); }; }; then
11081   cf_cv_regex="regex.h"
11082 else
11083   echo "$as_me: failed program was:" >&5
11084 cat conftest.$ac_ext >&5
11085
11086         cat >conftest.$ac_ext <<_ACEOF
11087 #line 11087 "configure"
11088 #include "confdefs.h"
11089 #include <regexp.h>
11090 int
11091 main ()
11092 {
11093
11094                 char *p = compile("", "", "", 0);
11095                 int x = step("", "");
11096
11097   ;
11098   return 0;
11099 }
11100 _ACEOF
11101 rm -f conftest.$ac_objext conftest$ac_exeext
11102 if { (eval echo "$as_me:11102: \"$ac_link\"") >&5
11103   (eval $ac_link) 2>&5
11104   ac_status=$?
11105   echo "$as_me:11105: \$? = $ac_status" >&5
11106   (exit $ac_status); } &&
11107          { ac_try='test -s conftest$ac_exeext'
11108   { (eval echo "$as_me:11108: \"$ac_try\"") >&5
11109   (eval $ac_try) 2>&5
11110   ac_status=$?
11111   echo "$as_me:11111: \$? = $ac_status" >&5
11112   (exit $ac_status); }; }; then
11113   cf_cv_regex="regexp.h"
11114 else
11115   echo "$as_me: failed program was:" >&5
11116 cat conftest.$ac_ext >&5
11117
11118                 cf_save_LIBS="$LIBS"
11119                 LIBS="-lgen $LIBS"
11120                 cat >conftest.$ac_ext <<_ACEOF
11121 #line 11121 "configure"
11122 #include "confdefs.h"
11123 #include <regexpr.h>
11124 int
11125 main ()
11126 {
11127
11128                         char *p = compile("", "", "");
11129                         int x = step("", "");
11130
11131   ;
11132   return 0;
11133 }
11134 _ACEOF
11135 rm -f conftest.$ac_objext conftest$ac_exeext
11136 if { (eval echo "$as_me:11136: \"$ac_link\"") >&5
11137   (eval $ac_link) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); } &&
11141          { ac_try='test -s conftest$ac_exeext'
11142   { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143   (eval $ac_try) 2>&5
11144   ac_status=$?
11145   echo "$as_me:11145: \$? = $ac_status" >&5
11146   (exit $ac_status); }; }; then
11147   cf_cv_regex="regexpr.h"
11148 else
11149   echo "$as_me: failed program was:" >&5
11150 cat conftest.$ac_ext >&5
11151 LIBS="$cf_save_LIBS"
11152 fi
11153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11154 fi
11155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11156 fi
11157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11158
11159 fi
11160
11161 echo "$as_me:11161: result: $cf_cv_regex" >&5
11162 echo "${ECHO_T}$cf_cv_regex" >&6
11163 case $cf_cv_regex in
11164         regex.h)   cat >>confdefs.h <<\EOF
11165 #define HAVE_REGEX_H_FUNCS 1
11166 EOF
11167  ;;
11168         regexp.h)  cat >>confdefs.h <<\EOF
11169 #define HAVE_REGEXP_H_FUNCS 1
11170 EOF
11171  ;;
11172         regexpr.h) cat >>confdefs.h <<\EOF
11173 #define HAVE_REGEXPR_H_FUNCS 1
11174 EOF
11175  ;;
11176 esac
11177
11178 for ac_header in \
11179 fcntl.h \
11180 getopt.h \
11181 limits.h \
11182 locale.h \
11183 poll.h \
11184 sys/bsdtypes.h \
11185 sys/ioctl.h \
11186 sys/param.h \
11187 sys/poll.h \
11188 sys/select.h \
11189 sys/time.h \
11190 sys/times.h \
11191 ttyent.h \
11192 unistd.h \
11193 wctype.h \
11194
11195 do
11196 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11197 echo "$as_me:11197: checking for $ac_header" >&5
11198 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11199 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11200   echo $ECHO_N "(cached) $ECHO_C" >&6
11201 else
11202   cat >conftest.$ac_ext <<_ACEOF
11203 #line 11203 "configure"
11204 #include "confdefs.h"
11205 #include <$ac_header>
11206 _ACEOF
11207 if { (eval echo "$as_me:11207: \"$ac_cpp conftest.$ac_ext\"") >&5
11208   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11209   ac_status=$?
11210   egrep -v '^ *\+' conftest.er1 >conftest.err
11211   rm -f conftest.er1
11212   cat conftest.err >&5
11213   echo "$as_me:11213: \$? = $ac_status" >&5
11214   (exit $ac_status); } >/dev/null; then
11215   if test -s conftest.err; then
11216     ac_cpp_err=$ac_c_preproc_warn_flag
11217   else
11218     ac_cpp_err=
11219   fi
11220 else
11221   ac_cpp_err=yes
11222 fi
11223 if test -z "$ac_cpp_err"; then
11224   eval "$as_ac_Header=yes"
11225 else
11226   echo "$as_me: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   eval "$as_ac_Header=no"
11229 fi
11230 rm -f conftest.err conftest.$ac_ext
11231 fi
11232 echo "$as_me:11232: result: `eval echo '${'$as_ac_Header'}'`" >&5
11233 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11234 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11235   cat >>confdefs.h <<EOF
11236 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11237 EOF
11238
11239 fi
11240 done
11241
11242 # check for ISC (this may also define _POSIX_SOURCE)
11243 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11244 if test "$ISC" = yes ; then
11245
11246 echo "$as_me:11246: checking for main in -lcposix" >&5
11247 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11248 if test "${ac_cv_lib_cposix_main+set}" = set; then
11249   echo $ECHO_N "(cached) $ECHO_C" >&6
11250 else
11251   ac_check_lib_save_LIBS=$LIBS
11252 LIBS="-lcposix  $LIBS"
11253 cat >conftest.$ac_ext <<_ACEOF
11254 #line 11254 "configure"
11255 #include "confdefs.h"
11256
11257 int
11258 main ()
11259 {
11260 main ();
11261   ;
11262   return 0;
11263 }
11264 _ACEOF
11265 rm -f conftest.$ac_objext conftest$ac_exeext
11266 if { (eval echo "$as_me:11266: \"$ac_link\"") >&5
11267   (eval $ac_link) 2>&5
11268   ac_status=$?
11269   echo "$as_me:11269: \$? = $ac_status" >&5
11270   (exit $ac_status); } &&
11271          { ac_try='test -s conftest$ac_exeext'
11272   { (eval echo "$as_me:11272: \"$ac_try\"") >&5
11273   (eval $ac_try) 2>&5
11274   ac_status=$?
11275   echo "$as_me:11275: \$? = $ac_status" >&5
11276   (exit $ac_status); }; }; then
11277   ac_cv_lib_cposix_main=yes
11278 else
11279   echo "$as_me: failed program was:" >&5
11280 cat conftest.$ac_ext >&5
11281 ac_cv_lib_cposix_main=no
11282 fi
11283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11284 LIBS=$ac_check_lib_save_LIBS
11285 fi
11286 echo "$as_me:11286: result: $ac_cv_lib_cposix_main" >&5
11287 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11288 if test $ac_cv_lib_cposix_main = yes; then
11289   cat >>confdefs.h <<EOF
11290 #define HAVE_LIBCPOSIX 1
11291 EOF
11292
11293   LIBS="-lcposix $LIBS"
11294
11295 fi
11296
11297         echo "$as_me:11297: checking for bzero in -linet" >&5
11298 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11299 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11300   echo $ECHO_N "(cached) $ECHO_C" >&6
11301 else
11302   ac_check_lib_save_LIBS=$LIBS
11303 LIBS="-linet  $LIBS"
11304 cat >conftest.$ac_ext <<_ACEOF
11305 #line 11305 "configure"
11306 #include "confdefs.h"
11307
11308 /* Override any gcc2 internal prototype to avoid an error.  */
11309 #ifdef __cplusplus
11310 extern "C"
11311 #endif
11312 /* We use char because int might match the return type of a gcc2
11313    builtin and then its argument prototype would still apply.  */
11314 char bzero ();
11315 int
11316 main ()
11317 {
11318 bzero ();
11319   ;
11320   return 0;
11321 }
11322 _ACEOF
11323 rm -f conftest.$ac_objext conftest$ac_exeext
11324 if { (eval echo "$as_me:11324: \"$ac_link\"") >&5
11325   (eval $ac_link) 2>&5
11326   ac_status=$?
11327   echo "$as_me:11327: \$? = $ac_status" >&5
11328   (exit $ac_status); } &&
11329          { ac_try='test -s conftest$ac_exeext'
11330   { (eval echo "$as_me:11330: \"$ac_try\"") >&5
11331   (eval $ac_try) 2>&5
11332   ac_status=$?
11333   echo "$as_me:11333: \$? = $ac_status" >&5
11334   (exit $ac_status); }; }; then
11335   ac_cv_lib_inet_bzero=yes
11336 else
11337   echo "$as_me: failed program was:" >&5
11338 cat conftest.$ac_ext >&5
11339 ac_cv_lib_inet_bzero=no
11340 fi
11341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11342 LIBS=$ac_check_lib_save_LIBS
11343 fi
11344 echo "$as_me:11344: result: $ac_cv_lib_inet_bzero" >&5
11345 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11346 if test $ac_cv_lib_inet_bzero = yes; then
11347   LIBS="$LIBS -linet"
11348 fi
11349 fi
11350
11351 echo "$as_me:11351: checking if sys/time.h works with sys/select.h" >&5
11352 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11353 if test "${cf_cv_sys_time_select+set}" = set; then
11354   echo $ECHO_N "(cached) $ECHO_C" >&6
11355 else
11356
11357 cat >conftest.$ac_ext <<_ACEOF
11358 #line 11358 "configure"
11359 #include "confdefs.h"
11360
11361 #include <sys/types.h>
11362 #ifdef HAVE_SYS_TIME_H
11363 #include <sys/time.h>
11364 #endif
11365 #ifdef HAVE_SYS_SELECT_H
11366 #include <sys/select.h>
11367 #endif
11368
11369 int
11370 main ()
11371 {
11372
11373   ;
11374   return 0;
11375 }
11376 _ACEOF
11377 rm -f conftest.$ac_objext
11378 if { (eval echo "$as_me:11378: \"$ac_compile\"") >&5
11379   (eval $ac_compile) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit $ac_status); } &&
11383          { ac_try='test -s conftest.$ac_objext'
11384   { (eval echo "$as_me:11384: \"$ac_try\"") >&5
11385   (eval $ac_try) 2>&5
11386   ac_status=$?
11387   echo "$as_me:11387: \$? = $ac_status" >&5
11388   (exit $ac_status); }; }; then
11389   cf_cv_sys_time_select=yes
11390 else
11391   echo "$as_me: failed program was:" >&5
11392 cat conftest.$ac_ext >&5
11393 cf_cv_sys_time_select=no
11394 fi
11395 rm -f conftest.$ac_objext conftest.$ac_ext
11396
11397 fi
11398
11399 echo "$as_me:11399: result: $cf_cv_sys_time_select" >&5
11400 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11401 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11402 #define HAVE_SYS_TIME_SELECT 1
11403 EOF
11404
11405 ###     checks for compiler characteristics
11406 ac_ext=c
11407 ac_cpp='$CPP $CPPFLAGS'
11408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11411 ac_main_return=return
11412
11413 echo "$as_me:11413: checking for $CC option to accept ANSI C" >&5
11414 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11415 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11416   echo $ECHO_N "(cached) $ECHO_C" >&6
11417 else
11418   ac_cv_prog_cc_stdc=no
11419 ac_save_CC=$CC
11420 cat >conftest.$ac_ext <<_ACEOF
11421 #line 11421 "configure"
11422 #include "confdefs.h"
11423 #include <stdarg.h>
11424 #include <stdio.h>
11425 #include <sys/types.h>
11426 #include <sys/stat.h>
11427 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11428 struct buf { int x; };
11429 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11430 static char *e (p, i)
11431      char **p;
11432      int i;
11433 {
11434   return p[i];
11435 }
11436 static char *f (char * (*g) (char **, int), char **p, ...)
11437 {
11438   char *s;
11439   va_list v;
11440   va_start (v,p);
11441   s = g (p, va_arg (v,int));
11442   va_end (v);
11443   return s;
11444 }
11445 int test (int i, double x);
11446 struct s1 {int (*f) (int a);};
11447 struct s2 {int (*f) (double a);};
11448 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11449 int argc;
11450 char **argv;
11451 int
11452 main ()
11453 {
11454 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 # Don't try gcc -ansi; that turns off useful extensions and
11460 # breaks some systems' header files.
11461 # AIX                   -qlanglvl=ansi
11462 # Ultrix and OSF/1      -std1
11463 # HP-UX 10.20 and later -Ae
11464 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11465 # SVR4                  -Xc -D__EXTENSIONS__
11466 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11467 do
11468   CC="$ac_save_CC $ac_arg"
11469   rm -f conftest.$ac_objext
11470 if { (eval echo "$as_me:11470: \"$ac_compile\"") >&5
11471   (eval $ac_compile) 2>&5
11472   ac_status=$?
11473   echo "$as_me:11473: \$? = $ac_status" >&5
11474   (exit $ac_status); } &&
11475          { ac_try='test -s conftest.$ac_objext'
11476   { (eval echo "$as_me:11476: \"$ac_try\"") >&5
11477   (eval $ac_try) 2>&5
11478   ac_status=$?
11479   echo "$as_me:11479: \$? = $ac_status" >&5
11480   (exit $ac_status); }; }; then
11481   ac_cv_prog_cc_stdc=$ac_arg
11482 break
11483 else
11484   echo "$as_me: failed program was:" >&5
11485 cat conftest.$ac_ext >&5
11486 fi
11487 rm -f conftest.$ac_objext
11488 done
11489 rm -f conftest.$ac_ext conftest.$ac_objext
11490 CC=$ac_save_CC
11491
11492 fi
11493
11494 case "x$ac_cv_prog_cc_stdc" in
11495   x|xno)
11496     echo "$as_me:11496: result: none needed" >&5
11497 echo "${ECHO_T}none needed" >&6 ;;
11498   *)
11499     echo "$as_me:11499: result: $ac_cv_prog_cc_stdc" >&5
11500 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11501     CC="$CC $ac_cv_prog_cc_stdc" ;;
11502 esac
11503
11504 echo "$as_me:11504: checking for an ANSI C-conforming const" >&5
11505 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11506 if test "${ac_cv_c_const+set}" = set; then
11507   echo $ECHO_N "(cached) $ECHO_C" >&6
11508 else
11509   cat >conftest.$ac_ext <<_ACEOF
11510 #line 11510 "configure"
11511 #include "confdefs.h"
11512
11513 int
11514 main ()
11515 {
11516 /* FIXME: Include the comments suggested by Paul. */
11517 #ifndef __cplusplus
11518   /* Ultrix mips cc rejects this.  */
11519   typedef int charset[2];
11520   const charset x;
11521   /* SunOS 4.1.1 cc rejects this.  */
11522   char const *const *ccp;
11523   char **p;
11524   /* NEC SVR4.0.2 mips cc rejects this.  */
11525   struct point {int x, y;};
11526   static struct point const zero = {0,0};
11527   /* AIX XL C 1.02.0.0 rejects this.
11528      It does not let you subtract one const X* pointer from another in
11529      an arm of an if-expression whose if-part is not a constant
11530      expression */
11531   const char *g = "string";
11532   ccp = &g + (g ? g-g : 0);
11533   /* HPUX 7.0 cc rejects these. */
11534   ++ccp;
11535   p = (char**) ccp;
11536   ccp = (char const *const *) p;
11537   { /* SCO 3.2v4 cc rejects this.  */
11538     char *t;
11539     char const *s = 0 ? (char *) 0 : (char const *) 0;
11540
11541     *t++ = 0;
11542   }
11543   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11544     int x[] = {25, 17};
11545     const int *foo = &x[0];
11546     ++foo;
11547   }
11548   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11549     typedef const int *iptr;
11550     iptr p = 0;
11551     ++p;
11552   }
11553   { /* AIX XL C 1.02.0.0 rejects this saying
11554        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11555     struct s { int j; const int *ap[3]; };
11556     struct s *b; b->j = 5;
11557   }
11558   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11559     const int foo = 10;
11560   }
11561 #endif
11562
11563   ;
11564   return 0;
11565 }
11566 _ACEOF
11567 rm -f conftest.$ac_objext
11568 if { (eval echo "$as_me:11568: \"$ac_compile\"") >&5
11569   (eval $ac_compile) 2>&5
11570   ac_status=$?
11571   echo "$as_me:11571: \$? = $ac_status" >&5
11572   (exit $ac_status); } &&
11573          { ac_try='test -s conftest.$ac_objext'
11574   { (eval echo "$as_me:11574: \"$ac_try\"") >&5
11575   (eval $ac_try) 2>&5
11576   ac_status=$?
11577   echo "$as_me:11577: \$? = $ac_status" >&5
11578   (exit $ac_status); }; }; then
11579   ac_cv_c_const=yes
11580 else
11581   echo "$as_me: failed program was:" >&5
11582 cat conftest.$ac_ext >&5
11583 ac_cv_c_const=no
11584 fi
11585 rm -f conftest.$ac_objext conftest.$ac_ext
11586 fi
11587 echo "$as_me:11587: result: $ac_cv_c_const" >&5
11588 echo "${ECHO_T}$ac_cv_c_const" >&6
11589 if test $ac_cv_c_const = no; then
11590
11591 cat >>confdefs.h <<\EOF
11592 #define const
11593 EOF
11594
11595 fi
11596
11597 echo "$as_me:11597: checking for inline" >&5
11598 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11599 if test "${ac_cv_c_inline+set}" = set; then
11600   echo $ECHO_N "(cached) $ECHO_C" >&6
11601 else
11602   ac_cv_c_inline=no
11603 for ac_kw in inline __inline__ __inline; do
11604   cat >conftest.$ac_ext <<_ACEOF
11605 #line 11605 "configure"
11606 #include "confdefs.h"
11607 #ifndef __cplusplus
11608 static $ac_kw int static_foo () {return 0; }
11609 $ac_kw int foo () {return 0; }
11610 #endif
11611
11612 _ACEOF
11613 rm -f conftest.$ac_objext
11614 if { (eval echo "$as_me:11614: \"$ac_compile\"") >&5
11615   (eval $ac_compile) 2>&5
11616   ac_status=$?
11617   echo "$as_me:11617: \$? = $ac_status" >&5
11618   (exit $ac_status); } &&
11619          { ac_try='test -s conftest.$ac_objext'
11620   { (eval echo "$as_me:11620: \"$ac_try\"") >&5
11621   (eval $ac_try) 2>&5
11622   ac_status=$?
11623   echo "$as_me:11623: \$? = $ac_status" >&5
11624   (exit $ac_status); }; }; then
11625   ac_cv_c_inline=$ac_kw; break
11626 else
11627   echo "$as_me: failed program was:" >&5
11628 cat conftest.$ac_ext >&5
11629 fi
11630 rm -f conftest.$ac_objext conftest.$ac_ext
11631 done
11632
11633 fi
11634 echo "$as_me:11634: result: $ac_cv_c_inline" >&5
11635 echo "${ECHO_T}$ac_cv_c_inline" >&6
11636 case $ac_cv_c_inline in
11637   inline | yes) ;;
11638   no)
11639 cat >>confdefs.h <<\EOF
11640 #define inline
11641 EOF
11642  ;;
11643   *)  cat >>confdefs.h <<EOF
11644 #define inline $ac_cv_c_inline
11645 EOF
11646  ;;
11647 esac
11648
11649 NCURSES_INLINE=
11650 if test "$ac_cv_c_inline" != no ; then
11651   NCURSES_INLINE=inline
11652   if test "$INTEL_COMPILER" = yes
11653   then
11654     :
11655   elif test "$GCC" = yes
11656   then
11657     echo "$as_me:11657: checking if gcc supports options to tune inlining" >&5
11658 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11659 if test "${cf_cv_gcc_inline+set}" = set; then
11660   echo $ECHO_N "(cached) $ECHO_C" >&6
11661 else
11662
11663       cf_save_CFLAGS=$CFLAGS
11664       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11665       cat >conftest.$ac_ext <<_ACEOF
11666 #line 11666 "configure"
11667 #include "confdefs.h"
11668 inline int foo(void) { return 1; }
11669 int
11670 main ()
11671 {
11672 ${cf_cv_main_return:-return} foo()
11673   ;
11674   return 0;
11675 }
11676 _ACEOF
11677 rm -f conftest.$ac_objext
11678 if { (eval echo "$as_me:11678: \"$ac_compile\"") >&5
11679   (eval $ac_compile) 2>&5
11680   ac_status=$?
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit $ac_status); } &&
11683          { ac_try='test -s conftest.$ac_objext'
11684   { (eval echo "$as_me:11684: \"$ac_try\"") >&5
11685   (eval $ac_try) 2>&5
11686   ac_status=$?
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); }; }; then
11689   cf_cv_gcc_inline=yes
11690 else
11691   echo "$as_me: failed program was:" >&5
11692 cat conftest.$ac_ext >&5
11693 cf_cv_gcc_inline=no
11694 fi
11695 rm -f conftest.$ac_objext conftest.$ac_ext
11696       CFLAGS=$cf_save_CFLAGS
11697
11698 fi
11699 echo "$as_me:11699: result: $cf_cv_gcc_inline" >&5
11700 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11701     if test "$cf_cv_gcc_inline" = yes ; then
11702
11703 cf_fix_cppflags=no
11704 cf_new_cflags=
11705 cf_new_cppflags=
11706 cf_new_extra_cppflags=
11707
11708 for cf_add_cflags in --param max-inline-insns-single=1200
11709 do
11710 case $cf_fix_cppflags in
11711 no)
11712         case $cf_add_cflags in #(vi
11713         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11714                 case $cf_add_cflags in
11715                 -D*)
11716                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11717
11718                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11719                         && test -z "${cf_tst_cflags}" \
11720                         && cf_fix_cppflags=yes
11721
11722                         if test $cf_fix_cppflags = yes ; then
11723                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11724                                 continue
11725                         elif test "${cf_tst_cflags}" = "\"'" ; then
11726                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11727                                 continue
11728                         fi
11729                         ;;
11730                 esac
11731                 case "$CPPFLAGS" in
11732                 *$cf_add_cflags) #(vi
11733                         ;;
11734                 *) #(vi
11735                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11736                         ;;
11737                 esac
11738                 ;;
11739         *)
11740                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11741                 ;;
11742         esac
11743         ;;
11744 yes)
11745         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11746
11747         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11748
11749         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11750         && test -z "${cf_tst_cflags}" \
11751         && cf_fix_cppflags=no
11752         ;;
11753 esac
11754 done
11755
11756 if test -n "$cf_new_cflags" ; then
11757
11758         CFLAGS="$CFLAGS $cf_new_cflags"
11759 fi
11760
11761 if test -n "$cf_new_cppflags" ; then
11762
11763         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11764 fi
11765
11766 if test -n "$cf_new_extra_cppflags" ; then
11767
11768         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11769 fi
11770
11771     fi
11772   fi
11773 fi
11774
11775 echo "$as_me:11775: checking for signal global datatype" >&5
11776 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11777 if test "${cf_cv_sig_atomic_t+set}" = set; then
11778   echo $ECHO_N "(cached) $ECHO_C" >&6
11779 else
11780
11781         for cf_type in \
11782                 "volatile sig_atomic_t" \
11783                 "sig_atomic_t" \
11784                 "int"
11785         do
11786         cat >conftest.$ac_ext <<_ACEOF
11787 #line 11787 "configure"
11788 #include "confdefs.h"
11789
11790 #include <sys/types.h>
11791 #include <signal.h>
11792 #include <stdio.h>
11793
11794 extern $cf_type x;
11795 $cf_type x;
11796 static void handler(int sig)
11797 {
11798         x = 5;
11799 }
11800 int
11801 main ()
11802 {
11803 signal(SIGINT, handler);
11804                  x = 1
11805   ;
11806   return 0;
11807 }
11808 _ACEOF
11809 rm -f conftest.$ac_objext
11810 if { (eval echo "$as_me:11810: \"$ac_compile\"") >&5
11811   (eval $ac_compile) 2>&5
11812   ac_status=$?
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit $ac_status); } &&
11815          { ac_try='test -s conftest.$ac_objext'
11816   { (eval echo "$as_me:11816: \"$ac_try\"") >&5
11817   (eval $ac_try) 2>&5
11818   ac_status=$?
11819   echo "$as_me:11819: \$? = $ac_status" >&5
11820   (exit $ac_status); }; }; then
11821   cf_cv_sig_atomic_t=$cf_type
11822 else
11823   echo "$as_me: failed program was:" >&5
11824 cat conftest.$ac_ext >&5
11825 cf_cv_sig_atomic_t=no
11826 fi
11827 rm -f conftest.$ac_objext conftest.$ac_ext
11828                 test "$cf_cv_sig_atomic_t" != no && break
11829         done
11830
11831 fi
11832
11833 echo "$as_me:11833: result: $cf_cv_sig_atomic_t" >&5
11834 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11835 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11836 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11837 EOF
11838
11839 if test $NCURSES_CHTYPE = auto ; then
11840
11841 echo "$as_me:11841: checking for type of chtype" >&5
11842 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11843 if test "${cf_cv_typeof_chtype+set}" = set; then
11844   echo $ECHO_N "(cached) $ECHO_C" >&6
11845 else
11846
11847                 if test "$cross_compiling" = yes; then
11848   cf_cv_typeof_chtype=long
11849 else
11850   cat >conftest.$ac_ext <<_ACEOF
11851 #line 11851 "configure"
11852 #include "confdefs.h"
11853
11854 #define WANT_BITS 31
11855 #include <stdio.h>
11856 int main()
11857 {
11858         FILE *fp = fopen("cf_test.out", "w");
11859         if (fp != 0) {
11860                 char *result = "long";
11861                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11862                         int n;
11863                         unsigned int x, y;
11864                         for (n = 0; n < WANT_BITS; n++) {
11865                                 x = (1 << n);
11866                                 y = (x >> n);
11867                                 if (y != 1 || x == 0) {
11868                                         x = 0;
11869                                         break;
11870                                 }
11871                         }
11872                         /*
11873                          * If x is nonzero, an int is big enough for the bits
11874                          * that we want.
11875                          */
11876                         result = (x != 0) ? "int" : "long";
11877                 }
11878                 fputs(result, fp);
11879                 fclose(fp);
11880         }
11881         ${cf_cv_main_return:-return}(0);
11882 }
11883
11884 _ACEOF
11885 rm -f conftest$ac_exeext
11886 if { (eval echo "$as_me:11886: \"$ac_link\"") >&5
11887   (eval $ac_link) 2>&5
11888   ac_status=$?
11889   echo "$as_me:11889: \$? = $ac_status" >&5
11890   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11891   { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892   (eval $ac_try) 2>&5
11893   ac_status=$?
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit $ac_status); }; }; then
11896   cf_cv_typeof_chtype=`cat cf_test.out`
11897 else
11898   echo "$as_me: program exited with status $ac_status" >&5
11899 echo "$as_me: failed program was:" >&5
11900 cat conftest.$ac_ext >&5
11901 cf_cv_typeof_chtype=long
11902 fi
11903 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11904 fi
11905                 rm -f cf_test.out
11906
11907 fi
11908
11909 echo "$as_me:11909: result: $cf_cv_typeof_chtype" >&5
11910 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11911
11912 cat >>confdefs.h <<EOF
11913 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11914 EOF
11915
11916 else
11917         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11918 fi
11919 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11920
11921 echo "$as_me:11921: checking if unsigned literals are legal" >&5
11922 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11923 if test "${cf_cv_unsigned_literals+set}" = set; then
11924   echo $ECHO_N "(cached) $ECHO_C" >&6
11925 else
11926
11927         cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930
11931 int
11932 main ()
11933 {
11934 long x = 1L + 1UL + 1U + 1
11935   ;
11936   return 0;
11937 }
11938 _ACEOF
11939 rm -f conftest.$ac_objext
11940 if { (eval echo "$as_me:11940: \"$ac_compile\"") >&5
11941   (eval $ac_compile) 2>&5
11942   ac_status=$?
11943   echo "$as_me:11943: \$? = $ac_status" >&5
11944   (exit $ac_status); } &&
11945          { ac_try='test -s conftest.$ac_objext'
11946   { (eval echo "$as_me:11946: \"$ac_try\"") >&5
11947   (eval $ac_try) 2>&5
11948   ac_status=$?
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit $ac_status); }; }; then
11951   cf_cv_unsigned_literals=yes
11952 else
11953   echo "$as_me: failed program was:" >&5
11954 cat conftest.$ac_ext >&5
11955 cf_cv_unsigned_literals=no
11956 fi
11957 rm -f conftest.$ac_objext conftest.$ac_ext
11958
11959 fi
11960
11961 echo "$as_me:11961: result: $cf_cv_unsigned_literals" >&5
11962 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11963
11964 cf_cv_1UL="1"
11965 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11966 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11967
11968 if test $NCURSES_MMASK_T = auto ; then
11969         cf_cv_typeof_mmask_t=long
11970 else
11971         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11972 fi
11973 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11974
11975 ###     Checks for external-data
11976
11977 echo "$as_me:11977: checking if external errno is declared" >&5
11978 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11979 if test "${cf_cv_dcl_errno+set}" = set; then
11980   echo $ECHO_N "(cached) $ECHO_C" >&6
11981 else
11982
11983     cat >conftest.$ac_ext <<_ACEOF
11984 #line 11984 "configure"
11985 #include "confdefs.h"
11986
11987 #ifdef HAVE_STDLIB_H
11988 #include <stdlib.h>
11989 #endif
11990 #include <stdio.h>
11991 #include <sys/types.h>
11992 #include <errno.h>
11993 int
11994 main ()
11995 {
11996 long x = (long) errno
11997   ;
11998   return 0;
11999 }
12000 _ACEOF
12001 rm -f conftest.$ac_objext
12002 if { (eval echo "$as_me:12002: \"$ac_compile\"") >&5
12003   (eval $ac_compile) 2>&5
12004   ac_status=$?
12005   echo "$as_me:12005: \$? = $ac_status" >&5
12006   (exit $ac_status); } &&
12007          { ac_try='test -s conftest.$ac_objext'
12008   { (eval echo "$as_me:12008: \"$ac_try\"") >&5
12009   (eval $ac_try) 2>&5
12010   ac_status=$?
12011   echo "$as_me:12011: \$? = $ac_status" >&5
12012   (exit $ac_status); }; }; then
12013   cf_cv_dcl_errno=yes
12014 else
12015   echo "$as_me: failed program was:" >&5
12016 cat conftest.$ac_ext >&5
12017 cf_cv_dcl_errno=no
12018 fi
12019 rm -f conftest.$ac_objext conftest.$ac_ext
12020
12021 fi
12022 echo "$as_me:12022: result: $cf_cv_dcl_errno" >&5
12023 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12024
12025 if test "$cf_cv_dcl_errno" = no ; then
12026
12027 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12028
12029     cat >>confdefs.h <<EOF
12030 #define $cf_result 1
12031 EOF
12032
12033 fi
12034
12035 # It's possible (for near-UNIX clones) that the data doesn't exist
12036
12037 echo "$as_me:12037: checking if external errno exists" >&5
12038 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12039 if test "${cf_cv_have_errno+set}" = set; then
12040   echo $ECHO_N "(cached) $ECHO_C" >&6
12041 else
12042
12043     cat >conftest.$ac_ext <<_ACEOF
12044 #line 12044 "configure"
12045 #include "confdefs.h"
12046
12047 #undef errno
12048 extern int errno;
12049
12050 int
12051 main ()
12052 {
12053 errno = 2
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 rm -f conftest.$ac_objext conftest$ac_exeext
12059 if { (eval echo "$as_me:12059: \"$ac_link\"") >&5
12060   (eval $ac_link) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit $ac_status); } &&
12064          { ac_try='test -s conftest$ac_exeext'
12065   { (eval echo "$as_me:12065: \"$ac_try\"") >&5
12066   (eval $ac_try) 2>&5
12067   ac_status=$?
12068   echo "$as_me:12068: \$? = $ac_status" >&5
12069   (exit $ac_status); }; }; then
12070   cf_cv_have_errno=yes
12071 else
12072   echo "$as_me: failed program was:" >&5
12073 cat conftest.$ac_ext >&5
12074 cf_cv_have_errno=no
12075 fi
12076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12077
12078 fi
12079 echo "$as_me:12079: result: $cf_cv_have_errno" >&5
12080 echo "${ECHO_T}$cf_cv_have_errno" >&6
12081
12082 if test "$cf_cv_have_errno" = yes ; then
12083
12084 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12085
12086     cat >>confdefs.h <<EOF
12087 #define $cf_result 1
12088 EOF
12089
12090 fi
12091
12092 echo "$as_me:12092: checking if data-only library module links" >&5
12093 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12094 if test "${cf_cv_link_dataonly+set}" = set; then
12095   echo $ECHO_N "(cached) $ECHO_C" >&6
12096 else
12097
12098         rm -f conftest.a
12099         cat >conftest.$ac_ext <<EOF
12100 #line 12100 "configure"
12101 int     testdata[3] = { 123, 456, 789 };
12102 EOF
12103         if { (eval echo "$as_me:12103: \"$ac_compile\"") >&5
12104   (eval $ac_compile) 2>&5
12105   ac_status=$?
12106   echo "$as_me:12106: \$? = $ac_status" >&5
12107   (exit $ac_status); } ; then
12108                 mv conftest.o data.o && \
12109                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12110         fi
12111         rm -f conftest.$ac_ext data.o
12112         cat >conftest.$ac_ext <<EOF
12113 #line 12113 "configure"
12114 int     testfunc()
12115 {
12116 #if defined(NeXT)
12117         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12118 #else
12119         extern int testdata[3];
12120         return testdata[0] == 123
12121            &&  testdata[1] == 456
12122            &&  testdata[2] == 789;
12123 #endif
12124 }
12125 EOF
12126         if { (eval echo "$as_me:12126: \"$ac_compile\"") >&5
12127   (eval $ac_compile) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); }; then
12131                 mv conftest.o func.o && \
12132                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12133         fi
12134         rm -f conftest.$ac_ext func.o
12135         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12136         cf_saveLIBS="$LIBS"
12137         LIBS="conftest.a $LIBS"
12138         if test "$cross_compiling" = yes; then
12139   cf_cv_link_dataonly=unknown
12140 else
12141   cat >conftest.$ac_ext <<_ACEOF
12142 #line 12142 "configure"
12143 #include "confdefs.h"
12144
12145         int main()
12146         {
12147                 extern int testfunc();
12148                 ${cf_cv_main_return:-return} (!testfunc());
12149         }
12150
12151 _ACEOF
12152 rm -f conftest$ac_exeext
12153 if { (eval echo "$as_me:12153: \"$ac_link\"") >&5
12154   (eval $ac_link) 2>&5
12155   ac_status=$?
12156   echo "$as_me:12156: \$? = $ac_status" >&5
12157   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12158   { (eval echo "$as_me:12158: \"$ac_try\"") >&5
12159   (eval $ac_try) 2>&5
12160   ac_status=$?
12161   echo "$as_me:12161: \$? = $ac_status" >&5
12162   (exit $ac_status); }; }; then
12163   cf_cv_link_dataonly=yes
12164 else
12165   echo "$as_me: program exited with status $ac_status" >&5
12166 echo "$as_me: failed program was:" >&5
12167 cat conftest.$ac_ext >&5
12168 cf_cv_link_dataonly=no
12169 fi
12170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12171 fi
12172         LIBS="$cf_saveLIBS"
12173
12174 fi
12175
12176 echo "$as_me:12176: result: $cf_cv_link_dataonly" >&5
12177 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12178
12179 if test "$cf_cv_link_dataonly" = no ; then
12180         cat >>confdefs.h <<\EOF
12181 #define BROKEN_LINKER 1
12182 EOF
12183
12184         BROKEN_LINKER=1
12185 fi
12186
12187 ###     Checks for library functions.
12188
12189 for ac_func in \
12190 getcwd \
12191 getegid \
12192 geteuid \
12193 getttynam \
12194 issetugid \
12195 poll \
12196 remove \
12197 select \
12198 setbuf \
12199 setbuffer \
12200 setvbuf \
12201 sigaction \
12202 sigvec \
12203 strdup \
12204 strstr \
12205 tcgetpgrp \
12206 times \
12207 vsnprintf \
12208
12209 do
12210 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12211 echo "$as_me:12211: checking for $ac_func" >&5
12212 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12213 if eval "test \"\${$as_ac_var+set}\" = set"; then
12214   echo $ECHO_N "(cached) $ECHO_C" >&6
12215 else
12216   cat >conftest.$ac_ext <<_ACEOF
12217 #line 12217 "configure"
12218 #include "confdefs.h"
12219 /* System header to define __stub macros and hopefully few prototypes,
12220     which can conflict with char $ac_func (); below.  */
12221 #include <assert.h>
12222 /* Override any gcc2 internal prototype to avoid an error.  */
12223 #ifdef __cplusplus
12224 extern "C"
12225 #endif
12226 /* We use char because int might match the return type of a gcc2
12227    builtin and then its argument prototype would still apply.  */
12228 char $ac_func ();
12229 char (*f) ();
12230
12231 int
12232 main ()
12233 {
12234 /* The GNU C library defines this for functions which it implements
12235     to always fail with ENOSYS.  Some functions are actually named
12236     something starting with __ and the normal name is an alias.  */
12237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12238 choke me
12239 #else
12240 f = $ac_func;
12241 #endif
12242
12243   ;
12244   return 0;
12245 }
12246 _ACEOF
12247 rm -f conftest.$ac_objext conftest$ac_exeext
12248 if { (eval echo "$as_me:12248: \"$ac_link\"") >&5
12249   (eval $ac_link) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); } &&
12253          { ac_try='test -s conftest$ac_exeext'
12254   { (eval echo "$as_me:12254: \"$ac_try\"") >&5
12255   (eval $ac_try) 2>&5
12256   ac_status=$?
12257   echo "$as_me:12257: \$? = $ac_status" >&5
12258   (exit $ac_status); }; }; then
12259   eval "$as_ac_var=yes"
12260 else
12261   echo "$as_me: failed program was:" >&5
12262 cat conftest.$ac_ext >&5
12263 eval "$as_ac_var=no"
12264 fi
12265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12266 fi
12267 echo "$as_me:12267: result: `eval echo '${'$as_ac_var'}'`" >&5
12268 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12269 if test `eval echo '${'$as_ac_var'}'` = yes; then
12270   cat >>confdefs.h <<EOF
12271 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12272 EOF
12273
12274 fi
12275 done
12276
12277 if test "$with_getcap" = "yes" ; then
12278
12279 echo "$as_me:12279: checking for terminal-capability database functions" >&5
12280 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12281 if test "${cf_cv_cgetent+set}" = set; then
12282   echo $ECHO_N "(cached) $ECHO_C" >&6
12283 else
12284
12285 cat >conftest.$ac_ext <<_ACEOF
12286 #line 12286 "configure"
12287 #include "confdefs.h"
12288
12289 #include <stdlib.h>
12290 int
12291 main ()
12292 {
12293
12294         char temp[128];
12295         char *buf = temp;
12296         char *db_array = temp;
12297         cgetent(&buf, /* int *, */ &db_array, "vt100");
12298         cgetcap(buf, "tc", '=');
12299         cgetmatch(buf, "tc");
12300
12301   ;
12302   return 0;
12303 }
12304 _ACEOF
12305 rm -f conftest.$ac_objext conftest$ac_exeext
12306 if { (eval echo "$as_me:12306: \"$ac_link\"") >&5
12307   (eval $ac_link) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit $ac_status); } &&
12311          { ac_try='test -s conftest$ac_exeext'
12312   { (eval echo "$as_me:12312: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit $ac_status); }; }; then
12317   cf_cv_cgetent=yes
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 cat conftest.$ac_ext >&5
12321 cf_cv_cgetent=no
12322 fi
12323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12324
12325 fi
12326
12327 echo "$as_me:12327: result: $cf_cv_cgetent" >&5
12328 echo "${ECHO_T}$cf_cv_cgetent" >&6
12329 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12330 #define HAVE_BSD_CGETENT 1
12331 EOF
12332
12333 fi
12334
12335 echo "$as_me:12335: checking for isascii" >&5
12336 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12337 if test "${cf_cv_have_isascii+set}" = set; then
12338   echo $ECHO_N "(cached) $ECHO_C" >&6
12339 else
12340
12341         cat >conftest.$ac_ext <<_ACEOF
12342 #line 12342 "configure"
12343 #include "confdefs.h"
12344 #include <ctype.h>
12345 int
12346 main ()
12347 {
12348 int x = isascii(' ')
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 rm -f conftest.$ac_objext conftest$ac_exeext
12354 if { (eval echo "$as_me:12354: \"$ac_link\"") >&5
12355   (eval $ac_link) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit $ac_status); } &&
12359          { ac_try='test -s conftest$ac_exeext'
12360   { (eval echo "$as_me:12360: \"$ac_try\"") >&5
12361   (eval $ac_try) 2>&5
12362   ac_status=$?
12363   echo "$as_me:12363: \$? = $ac_status" >&5
12364   (exit $ac_status); }; }; then
12365   cf_cv_have_isascii=yes
12366 else
12367   echo "$as_me: failed program was:" >&5
12368 cat conftest.$ac_ext >&5
12369 cf_cv_have_isascii=no
12370 fi
12371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12372
12373 fi
12374 echo "$as_me:12374: result: $cf_cv_have_isascii" >&5
12375 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12376 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12377 #define HAVE_ISASCII 1
12378 EOF
12379
12380 if test "$ac_cv_func_sigaction" = yes; then
12381 echo "$as_me:12381: checking whether sigaction needs _POSIX_SOURCE" >&5
12382 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12383 cat >conftest.$ac_ext <<_ACEOF
12384 #line 12384 "configure"
12385 #include "confdefs.h"
12386
12387 #include <sys/types.h>
12388 #include <signal.h>
12389 int
12390 main ()
12391 {
12392 struct sigaction act
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 rm -f conftest.$ac_objext
12398 if { (eval echo "$as_me:12398: \"$ac_compile\"") >&5
12399   (eval $ac_compile) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } &&
12403          { ac_try='test -s conftest.$ac_objext'
12404   { (eval echo "$as_me:12404: \"$ac_try\"") >&5
12405   (eval $ac_try) 2>&5
12406   ac_status=$?
12407   echo "$as_me:12407: \$? = $ac_status" >&5
12408   (exit $ac_status); }; }; then
12409   sigact_bad=no
12410 else
12411   echo "$as_me: failed program was:" >&5
12412 cat conftest.$ac_ext >&5
12413
12414 cat >conftest.$ac_ext <<_ACEOF
12415 #line 12415 "configure"
12416 #include "confdefs.h"
12417
12418 #define _POSIX_SOURCE
12419 #include <sys/types.h>
12420 #include <signal.h>
12421 int
12422 main ()
12423 {
12424 struct sigaction act
12425   ;
12426   return 0;
12427 }
12428 _ACEOF
12429 rm -f conftest.$ac_objext
12430 if { (eval echo "$as_me:12430: \"$ac_compile\"") >&5
12431   (eval $ac_compile) 2>&5
12432   ac_status=$?
12433   echo "$as_me:12433: \$? = $ac_status" >&5
12434   (exit $ac_status); } &&
12435          { ac_try='test -s conftest.$ac_objext'
12436   { (eval echo "$as_me:12436: \"$ac_try\"") >&5
12437   (eval $ac_try) 2>&5
12438   ac_status=$?
12439   echo "$as_me:12439: \$? = $ac_status" >&5
12440   (exit $ac_status); }; }; then
12441   sigact_bad=yes
12442          cat >>confdefs.h <<\EOF
12443 #define SVR4_ACTION 1
12444 EOF
12445
12446 else
12447   echo "$as_me: failed program was:" >&5
12448 cat conftest.$ac_ext >&5
12449 sigact_bad=unknown
12450 fi
12451 rm -f conftest.$ac_objext conftest.$ac_ext
12452 fi
12453 rm -f conftest.$ac_objext conftest.$ac_ext
12454 echo "$as_me:12454: result: $sigact_bad" >&5
12455 echo "${ECHO_T}$sigact_bad" >&6
12456 fi
12457
12458 echo "$as_me:12458: checking if nanosleep really works" >&5
12459 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12460 if test "${cf_cv_func_nanosleep+set}" = set; then
12461   echo $ECHO_N "(cached) $ECHO_C" >&6
12462 else
12463
12464 if test "$cross_compiling" = yes; then
12465   cf_cv_func_nanosleep=unknown
12466 else
12467   cat >conftest.$ac_ext <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12470
12471 #include <stdio.h>
12472 #include <errno.h>
12473 #include <time.h>
12474
12475 #ifdef HAVE_SYS_TIME_H
12476 #include <sys/time.h>
12477 #endif
12478
12479 int main() {
12480         struct timespec ts1, ts2;
12481         int code;
12482         ts1.tv_sec  = 0;
12483         ts1.tv_nsec = 750000000;
12484         ts2.tv_sec  = 0;
12485         ts2.tv_nsec = 0;
12486         errno = 0;
12487         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12488         ${cf_cv_main_return:-return}(code != 0);
12489 }
12490
12491 _ACEOF
12492 rm -f conftest$ac_exeext
12493 if { (eval echo "$as_me:12493: \"$ac_link\"") >&5
12494   (eval $ac_link) 2>&5
12495   ac_status=$?
12496   echo "$as_me:12496: \$? = $ac_status" >&5
12497   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12498   { (eval echo "$as_me:12498: \"$ac_try\"") >&5
12499   (eval $ac_try) 2>&5
12500   ac_status=$?
12501   echo "$as_me:12501: \$? = $ac_status" >&5
12502   (exit $ac_status); }; }; then
12503   cf_cv_func_nanosleep=yes
12504 else
12505   echo "$as_me: program exited with status $ac_status" >&5
12506 echo "$as_me: failed program was:" >&5
12507 cat conftest.$ac_ext >&5
12508 cf_cv_func_nanosleep=no
12509 fi
12510 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12511 fi
12512 fi
12513 echo "$as_me:12513: result: $cf_cv_func_nanosleep" >&5
12514 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12515
12516 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12517 #define HAVE_NANOSLEEP 1
12518 EOF
12519
12520 for ac_header in \
12521 termio.h \
12522 termios.h \
12523 unistd.h \
12524
12525 do
12526 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12527 echo "$as_me:12527: checking for $ac_header" >&5
12528 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12530   echo $ECHO_N "(cached) $ECHO_C" >&6
12531 else
12532   cat >conftest.$ac_ext <<_ACEOF
12533 #line 12533 "configure"
12534 #include "confdefs.h"
12535 #include <$ac_header>
12536 _ACEOF
12537 if { (eval echo "$as_me:12537: \"$ac_cpp conftest.$ac_ext\"") >&5
12538   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12539   ac_status=$?
12540   egrep -v '^ *\+' conftest.er1 >conftest.err
12541   rm -f conftest.er1
12542   cat conftest.err >&5
12543   echo "$as_me:12543: \$? = $ac_status" >&5
12544   (exit $ac_status); } >/dev/null; then
12545   if test -s conftest.err; then
12546     ac_cpp_err=$ac_c_preproc_warn_flag
12547   else
12548     ac_cpp_err=
12549   fi
12550 else
12551   ac_cpp_err=yes
12552 fi
12553 if test -z "$ac_cpp_err"; then
12554   eval "$as_ac_Header=yes"
12555 else
12556   echo "$as_me: failed program was:" >&5
12557   cat conftest.$ac_ext >&5
12558   eval "$as_ac_Header=no"
12559 fi
12560 rm -f conftest.err conftest.$ac_ext
12561 fi
12562 echo "$as_me:12562: result: `eval echo '${'$as_ac_Header'}'`" >&5
12563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12565   cat >>confdefs.h <<EOF
12566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12567 EOF
12568
12569 fi
12570 done
12571
12572 if test "$ISC" = yes ; then
12573
12574 for ac_header in sys/termio.h
12575 do
12576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12577 echo "$as_me:12577: checking for $ac_header" >&5
12578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12580   echo $ECHO_N "(cached) $ECHO_C" >&6
12581 else
12582   cat >conftest.$ac_ext <<_ACEOF
12583 #line 12583 "configure"
12584 #include "confdefs.h"
12585 #include <$ac_header>
12586 _ACEOF
12587 if { (eval echo "$as_me:12587: \"$ac_cpp conftest.$ac_ext\"") >&5
12588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12589   ac_status=$?
12590   egrep -v '^ *\+' conftest.er1 >conftest.err
12591   rm -f conftest.er1
12592   cat conftest.err >&5
12593   echo "$as_me:12593: \$? = $ac_status" >&5
12594   (exit $ac_status); } >/dev/null; then
12595   if test -s conftest.err; then
12596     ac_cpp_err=$ac_c_preproc_warn_flag
12597   else
12598     ac_cpp_err=
12599   fi
12600 else
12601   ac_cpp_err=yes
12602 fi
12603 if test -z "$ac_cpp_err"; then
12604   eval "$as_ac_Header=yes"
12605 else
12606   echo "$as_me: failed program was:" >&5
12607   cat conftest.$ac_ext >&5
12608   eval "$as_ac_Header=no"
12609 fi
12610 rm -f conftest.err conftest.$ac_ext
12611 fi
12612 echo "$as_me:12612: result: `eval echo '${'$as_ac_Header'}'`" >&5
12613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12615   cat >>confdefs.h <<EOF
12616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12617 EOF
12618
12619 fi
12620 done
12621
12622 fi
12623 if test "$ac_cv_header_termios_h" = yes ; then
12624         case "$CFLAGS $CPPFLAGS" in
12625         *-D_POSIX_SOURCE*)
12626                 termios_bad=dunno ;;
12627         *)      termios_bad=maybe ;;
12628         esac
12629         if test "$termios_bad" = maybe ; then
12630         echo "$as_me:12630: checking whether termios.h needs _POSIX_SOURCE" >&5
12631 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12632         cat >conftest.$ac_ext <<_ACEOF
12633 #line 12633 "configure"
12634 #include "confdefs.h"
12635 #include <termios.h>
12636 int
12637 main ()
12638 {
12639 struct termios foo; int x = foo.c_iflag
12640   ;
12641   return 0;
12642 }
12643 _ACEOF
12644 rm -f conftest.$ac_objext
12645 if { (eval echo "$as_me:12645: \"$ac_compile\"") >&5
12646   (eval $ac_compile) 2>&5
12647   ac_status=$?
12648   echo "$as_me:12648: \$? = $ac_status" >&5
12649   (exit $ac_status); } &&
12650          { ac_try='test -s conftest.$ac_objext'
12651   { (eval echo "$as_me:12651: \"$ac_try\"") >&5
12652   (eval $ac_try) 2>&5
12653   ac_status=$?
12654   echo "$as_me:12654: \$? = $ac_status" >&5
12655   (exit $ac_status); }; }; then
12656   termios_bad=no
12657 else
12658   echo "$as_me: failed program was:" >&5
12659 cat conftest.$ac_ext >&5
12660
12661                 cat >conftest.$ac_ext <<_ACEOF
12662 #line 12662 "configure"
12663 #include "confdefs.h"
12664
12665 #define _POSIX_SOURCE
12666 #include <termios.h>
12667 int
12668 main ()
12669 {
12670 struct termios foo; int x = foo.c_iflag
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 rm -f conftest.$ac_objext
12676 if { (eval echo "$as_me:12676: \"$ac_compile\"") >&5
12677   (eval $ac_compile) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); } &&
12681          { ac_try='test -s conftest.$ac_objext'
12682   { (eval echo "$as_me:12682: \"$ac_try\"") >&5
12683   (eval $ac_try) 2>&5
12684   ac_status=$?
12685   echo "$as_me:12685: \$? = $ac_status" >&5
12686   (exit $ac_status); }; }; then
12687   termios_bad=unknown
12688 else
12689   echo "$as_me: failed program was:" >&5
12690 cat conftest.$ac_ext >&5
12691 termios_bad=yes cat >>confdefs.h <<\EOF
12692 #define SVR4_TERMIO 1
12693 EOF
12694
12695 fi
12696 rm -f conftest.$ac_objext conftest.$ac_ext
12697
12698 fi
12699 rm -f conftest.$ac_objext conftest.$ac_ext
12700         echo "$as_me:12700: result: $termios_bad" >&5
12701 echo "${ECHO_T}$termios_bad" >&6
12702         fi
12703 fi
12704
12705 echo "$as_me:12705: checking for tcgetattr" >&5
12706 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12707 if test "${cf_cv_have_tcgetattr+set}" = set; then
12708   echo $ECHO_N "(cached) $ECHO_C" >&6
12709 else
12710
12711 cat >conftest.$ac_ext <<_ACEOF
12712 #line 12712 "configure"
12713 #include "confdefs.h"
12714
12715 #include <sys/types.h>
12716 #ifdef HAVE_UNISTD_H
12717 #include <unistd.h>
12718 #endif
12719 #ifdef HAVE_TERMIOS_H
12720 #include <termios.h>
12721 #define TTY struct termios
12722 #else
12723 #ifdef HAVE_TERMIO_H
12724 #include <termio.h>
12725 #define TTY struct termio
12726 #endif
12727 #endif
12728
12729 int
12730 main ()
12731 {
12732
12733 TTY foo;
12734 tcgetattr(1, &foo);
12735   ;
12736   return 0;
12737 }
12738 _ACEOF
12739 rm -f conftest.$ac_objext conftest$ac_exeext
12740 if { (eval echo "$as_me:12740: \"$ac_link\"") >&5
12741   (eval $ac_link) 2>&5
12742   ac_status=$?
12743   echo "$as_me:12743: \$? = $ac_status" >&5
12744   (exit $ac_status); } &&
12745          { ac_try='test -s conftest$ac_exeext'
12746   { (eval echo "$as_me:12746: \"$ac_try\"") >&5
12747   (eval $ac_try) 2>&5
12748   ac_status=$?
12749   echo "$as_me:12749: \$? = $ac_status" >&5
12750   (exit $ac_status); }; }; then
12751   cf_cv_have_tcgetattr=yes
12752 else
12753   echo "$as_me: failed program was:" >&5
12754 cat conftest.$ac_ext >&5
12755 cf_cv_have_tcgetattr=no
12756 fi
12757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12758 fi
12759 echo "$as_me:12759: result: $cf_cv_have_tcgetattr" >&5
12760 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12761 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12762 #define HAVE_TCGETATTR 1
12763 EOF
12764
12765 echo "$as_me:12765: checking for vsscanf function or workaround" >&5
12766 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12767 if test "${cf_cv_func_vsscanf+set}" = set; then
12768   echo $ECHO_N "(cached) $ECHO_C" >&6
12769 else
12770
12771 cat >conftest.$ac_ext <<_ACEOF
12772 #line 12772 "configure"
12773 #include "confdefs.h"
12774
12775 #include <stdarg.h>
12776 #include <stdio.h>
12777 int
12778 main ()
12779 {
12780
12781         va_list ap;
12782         vsscanf("from", "%d", ap)
12783   ;
12784   return 0;
12785 }
12786 _ACEOF
12787 rm -f conftest.$ac_objext conftest$ac_exeext
12788 if { (eval echo "$as_me:12788: \"$ac_link\"") >&5
12789   (eval $ac_link) 2>&5
12790   ac_status=$?
12791   echo "$as_me:12791: \$? = $ac_status" >&5
12792   (exit $ac_status); } &&
12793          { ac_try='test -s conftest$ac_exeext'
12794   { (eval echo "$as_me:12794: \"$ac_try\"") >&5
12795   (eval $ac_try) 2>&5
12796   ac_status=$?
12797   echo "$as_me:12797: \$? = $ac_status" >&5
12798   (exit $ac_status); }; }; then
12799   cf_cv_func_vsscanf=vsscanf
12800 else
12801   echo "$as_me: failed program was:" >&5
12802 cat conftest.$ac_ext >&5
12803
12804 cat >conftest.$ac_ext <<_ACEOF
12805 #line 12805 "configure"
12806 #include "confdefs.h"
12807
12808 #include <stdarg.h>
12809 #include <stdio.h>
12810 int
12811 main ()
12812 {
12813
12814     FILE strbuf;
12815     char *str = "from";
12816
12817     strbuf._flag = _IOREAD;
12818     strbuf._ptr = strbuf._base = (unsigned char *) str;
12819     strbuf._cnt = strlen(str);
12820     strbuf._file = _NFILE;
12821     return (vfscanf(&strbuf, "%d", ap))
12822   ;
12823   return 0;
12824 }
12825 _ACEOF
12826 rm -f conftest.$ac_objext conftest$ac_exeext
12827 if { (eval echo "$as_me:12827: \"$ac_link\"") >&5
12828   (eval $ac_link) 2>&5
12829   ac_status=$?
12830   echo "$as_me:12830: \$? = $ac_status" >&5
12831   (exit $ac_status); } &&
12832          { ac_try='test -s conftest$ac_exeext'
12833   { (eval echo "$as_me:12833: \"$ac_try\"") >&5
12834   (eval $ac_try) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit $ac_status); }; }; then
12838   cf_cv_func_vsscanf=vfscanf
12839 else
12840   echo "$as_me: failed program was:" >&5
12841 cat conftest.$ac_ext >&5
12842
12843 cat >conftest.$ac_ext <<_ACEOF
12844 #line 12844 "configure"
12845 #include "confdefs.h"
12846
12847 #include <stdarg.h>
12848 #include <stdio.h>
12849 int
12850 main ()
12851 {
12852
12853     FILE strbuf;
12854     char *str = "from";
12855
12856     strbuf._flag = _IOREAD;
12857     strbuf._ptr = strbuf._base = (unsigned char *) str;
12858     strbuf._cnt = strlen(str);
12859     strbuf._file = _NFILE;
12860     return (_doscan(&strbuf, "%d", ap))
12861   ;
12862   return 0;
12863 }
12864 _ACEOF
12865 rm -f conftest.$ac_objext conftest$ac_exeext
12866 if { (eval echo "$as_me:12866: \"$ac_link\"") >&5
12867   (eval $ac_link) 2>&5
12868   ac_status=$?
12869   echo "$as_me:12869: \$? = $ac_status" >&5
12870   (exit $ac_status); } &&
12871          { ac_try='test -s conftest$ac_exeext'
12872   { (eval echo "$as_me:12872: \"$ac_try\"") >&5
12873   (eval $ac_try) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); }; }; then
12877   cf_cv_func_vsscanf=_doscan
12878 else
12879   echo "$as_me: failed program was:" >&5
12880 cat conftest.$ac_ext >&5
12881
12882 cf_cv_func_vsscanf=no
12883 fi
12884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12885 fi
12886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12887 fi
12888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12889 fi
12890 echo "$as_me:12890: result: $cf_cv_func_vsscanf" >&5
12891 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12892
12893 case $cf_cv_func_vsscanf in #(vi
12894 vsscanf) cat >>confdefs.h <<\EOF
12895 #define HAVE_VSSCANF 1
12896 EOF
12897 ;; #(vi
12898 vfscanf) cat >>confdefs.h <<\EOF
12899 #define HAVE_VFSCANF 1
12900 EOF
12901 ;; #(vi
12902 _doscan) cat >>confdefs.h <<\EOF
12903 #define HAVE__DOSCAN 1
12904 EOF
12905 ;;
12906 esac
12907
12908 echo "$as_me:12908: checking for working mkstemp" >&5
12909 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12910 if test "${cf_cv_func_mkstemp+set}" = set; then
12911   echo $ECHO_N "(cached) $ECHO_C" >&6
12912 else
12913
12914 rm -f conftest*
12915 if test "$cross_compiling" = yes; then
12916   echo "$as_me:12916: checking for mkstemp" >&5
12917 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12918 if test "${ac_cv_func_mkstemp+set}" = set; then
12919   echo $ECHO_N "(cached) $ECHO_C" >&6
12920 else
12921   cat >conftest.$ac_ext <<_ACEOF
12922 #line 12922 "configure"
12923 #include "confdefs.h"
12924 /* System header to define __stub macros and hopefully few prototypes,
12925     which can conflict with char mkstemp (); below.  */
12926 #include <assert.h>
12927 /* Override any gcc2 internal prototype to avoid an error.  */
12928 #ifdef __cplusplus
12929 extern "C"
12930 #endif
12931 /* We use char because int might match the return type of a gcc2
12932    builtin and then its argument prototype would still apply.  */
12933 char mkstemp ();
12934 char (*f) ();
12935
12936 int
12937 main ()
12938 {
12939 /* The GNU C library defines this for functions which it implements
12940     to always fail with ENOSYS.  Some functions are actually named
12941     something starting with __ and the normal name is an alias.  */
12942 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12943 choke me
12944 #else
12945 f = mkstemp;
12946 #endif
12947
12948   ;
12949   return 0;
12950 }
12951 _ACEOF
12952 rm -f conftest.$ac_objext conftest$ac_exeext
12953 if { (eval echo "$as_me:12953: \"$ac_link\"") >&5
12954   (eval $ac_link) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit $ac_status); } &&
12958          { ac_try='test -s conftest$ac_exeext'
12959   { (eval echo "$as_me:12959: \"$ac_try\"") >&5
12960   (eval $ac_try) 2>&5
12961   ac_status=$?
12962   echo "$as_me:12962: \$? = $ac_status" >&5
12963   (exit $ac_status); }; }; then
12964   ac_cv_func_mkstemp=yes
12965 else
12966   echo "$as_me: failed program was:" >&5
12967 cat conftest.$ac_ext >&5
12968 ac_cv_func_mkstemp=no
12969 fi
12970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12971 fi
12972 echo "$as_me:12972: result: $ac_cv_func_mkstemp" >&5
12973 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12974
12975 else
12976   cat >conftest.$ac_ext <<_ACEOF
12977 #line 12977 "configure"
12978 #include "confdefs.h"
12979
12980 #include <sys/types.h>
12981 #include <stdlib.h>
12982 #include <stdio.h>
12983 #include <string.h>
12984 #include <sys/stat.h>
12985 int main()
12986 {
12987         char *tmpl = "conftestXXXXXX";
12988         char name[2][80];
12989         int n;
12990         int result = 0;
12991         int fd;
12992         struct stat sb;
12993
12994         umask(077);
12995         for (n = 0; n < 2; ++n) {
12996                 strcpy(name[n], tmpl);
12997                 if ((fd = mkstemp(name[n])) >= 0) {
12998                         if (!strcmp(name[n], tmpl)
12999                          || stat(name[n], &sb) != 0
13000                          || (sb.st_mode & S_IFMT) != S_IFREG
13001                          || (sb.st_mode & 077) != 0) {
13002                                 result = 1;
13003                         }
13004                         close(fd);
13005                 }
13006         }
13007         if (result == 0
13008          && !strcmp(name[0], name[1]))
13009                 result = 1;
13010         ${cf_cv_main_return:-return}(result);
13011 }
13012
13013 _ACEOF
13014 rm -f conftest$ac_exeext
13015 if { (eval echo "$as_me:13015: \"$ac_link\"") >&5
13016   (eval $ac_link) 2>&5
13017   ac_status=$?
13018   echo "$as_me:13018: \$? = $ac_status" >&5
13019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13020   { (eval echo "$as_me:13020: \"$ac_try\"") >&5
13021   (eval $ac_try) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit $ac_status); }; }; then
13025   cf_cv_func_mkstemp=yes
13026
13027 else
13028   echo "$as_me: program exited with status $ac_status" >&5
13029 echo "$as_me: failed program was:" >&5
13030 cat conftest.$ac_ext >&5
13031 cf_cv_func_mkstemp=no
13032
13033 fi
13034 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13035 fi
13036
13037 fi
13038 echo "$as_me:13038: result: $cf_cv_func_mkstemp" >&5
13039 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13040 if test "$cf_cv_func_mkstemp" = yes ; then
13041         cat >>confdefs.h <<\EOF
13042 #define HAVE_MKSTEMP 1
13043 EOF
13044
13045 fi
13046
13047 # setup for prototype of fallback for vsscanf()
13048
13049 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13050         HAVE_VSSCANF=1
13051 else
13052         HAVE_VSSCANF=0
13053 fi
13054
13055 if test "$cross_compiling" = yes ; then
13056         { echo "$as_me:13056: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13057 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13058 else
13059         echo "$as_me:13059: checking whether setvbuf arguments are reversed" >&5
13060 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13061 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13062   echo $ECHO_N "(cached) $ECHO_C" >&6
13063 else
13064   if test "$cross_compiling" = yes; then
13065   { { echo "$as_me:13065: error: cannot run test program while cross compiling" >&5
13066 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13067    { (exit 1); exit 1; }; }
13068 else
13069   cat >conftest.$ac_ext <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072 #include <stdio.h>
13073 /* If setvbuf has the reversed format, exit 0. */
13074 int
13075 main ()
13076 {
13077   /* This call has the arguments reversed.
13078      A reversed system may check and see that the address of main
13079      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13080   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13081     $ac_main_return(1);
13082   putc('\r', stdout);
13083   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13084 }
13085 _ACEOF
13086 rm -f conftest$ac_exeext
13087 if { (eval echo "$as_me:13087: \"$ac_link\"") >&5
13088   (eval $ac_link) 2>&5
13089   ac_status=$?
13090   echo "$as_me:13090: \$? = $ac_status" >&5
13091   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13092   { (eval echo "$as_me:13092: \"$ac_try\"") >&5
13093   (eval $ac_try) 2>&5
13094   ac_status=$?
13095   echo "$as_me:13095: \$? = $ac_status" >&5
13096   (exit $ac_status); }; }; then
13097   ac_cv_func_setvbuf_reversed=yes
13098 else
13099   echo "$as_me: program exited with status $ac_status" >&5
13100 echo "$as_me: failed program was:" >&5
13101 cat conftest.$ac_ext >&5
13102 ac_cv_func_setvbuf_reversed=no
13103 fi
13104 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13105 fi
13106 rm -f core core.* *.core
13107 fi
13108 echo "$as_me:13108: result: $ac_cv_func_setvbuf_reversed" >&5
13109 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13110 if test $ac_cv_func_setvbuf_reversed = yes; then
13111
13112 cat >>confdefs.h <<\EOF
13113 #define SETVBUF_REVERSED 1
13114 EOF
13115
13116 fi
13117
13118 fi
13119 echo "$as_me:13119: checking return type of signal handlers" >&5
13120 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13121 if test "${ac_cv_type_signal+set}" = set; then
13122   echo $ECHO_N "(cached) $ECHO_C" >&6
13123 else
13124   cat >conftest.$ac_ext <<_ACEOF
13125 #line 13125 "configure"
13126 #include "confdefs.h"
13127 #include <sys/types.h>
13128 #include <signal.h>
13129 #ifdef signal
13130 # undef signal
13131 #endif
13132 #ifdef __cplusplus
13133 extern "C" void (*signal (int, void (*)(int)))(int);
13134 #else
13135 void (*signal ()) ();
13136 #endif
13137
13138 int
13139 main ()
13140 {
13141 int i;
13142   ;
13143   return 0;
13144 }
13145 _ACEOF
13146 rm -f conftest.$ac_objext
13147 if { (eval echo "$as_me:13147: \"$ac_compile\"") >&5
13148   (eval $ac_compile) 2>&5
13149   ac_status=$?
13150   echo "$as_me:13150: \$? = $ac_status" >&5
13151   (exit $ac_status); } &&
13152          { ac_try='test -s conftest.$ac_objext'
13153   { (eval echo "$as_me:13153: \"$ac_try\"") >&5
13154   (eval $ac_try) 2>&5
13155   ac_status=$?
13156   echo "$as_me:13156: \$? = $ac_status" >&5
13157   (exit $ac_status); }; }; then
13158   ac_cv_type_signal=void
13159 else
13160   echo "$as_me: failed program was:" >&5
13161 cat conftest.$ac_ext >&5
13162 ac_cv_type_signal=int
13163 fi
13164 rm -f conftest.$ac_objext conftest.$ac_ext
13165 fi
13166 echo "$as_me:13166: result: $ac_cv_type_signal" >&5
13167 echo "${ECHO_T}$ac_cv_type_signal" >&6
13168
13169 cat >>confdefs.h <<EOF
13170 #define RETSIGTYPE $ac_cv_type_signal
13171 EOF
13172
13173 echo "$as_me:13173: checking for type sigaction_t" >&5
13174 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13175 if test "${cf_cv_type_sigaction+set}" = set; then
13176   echo $ECHO_N "(cached) $ECHO_C" >&6
13177 else
13178
13179         cat >conftest.$ac_ext <<_ACEOF
13180 #line 13180 "configure"
13181 #include "confdefs.h"
13182
13183 #include <signal.h>
13184 int
13185 main ()
13186 {
13187 sigaction_t x
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f conftest.$ac_objext
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194   (eval $ac_compile) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit $ac_status); } &&
13198          { ac_try='test -s conftest.$ac_objext'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit $ac_status); }; }; then
13204   cf_cv_type_sigaction=yes
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 cat conftest.$ac_ext >&5
13208 cf_cv_type_sigaction=no
13209 fi
13210 rm -f conftest.$ac_objext conftest.$ac_ext
13211 fi
13212
13213 echo "$as_me:13213: result: $cf_cv_type_sigaction" >&5
13214 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13215 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13216 #define HAVE_TYPE_SIGACTION 1
13217 EOF
13218
13219 echo "$as_me:13219: checking declaration of size-change" >&5
13220 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13221 if test "${cf_cv_sizechange+set}" = set; then
13222   echo $ECHO_N "(cached) $ECHO_C" >&6
13223 else
13224
13225     cf_cv_sizechange=unknown
13226     cf_save_CPPFLAGS="$CPPFLAGS"
13227
13228 for cf_opts in "" "NEED_PTEM_H"
13229 do
13230
13231     CPPFLAGS="$cf_save_CPPFLAGS"
13232     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13233     cat >conftest.$ac_ext <<_ACEOF
13234 #line 13234 "configure"
13235 #include "confdefs.h"
13236 #include <sys/types.h>
13237 #ifdef HAVE_TERMIOS_H
13238 #include <termios.h>
13239 #else
13240 #ifdef HAVE_TERMIO_H
13241 #include <termio.h>
13242 #endif
13243 #endif
13244 #ifdef NEED_PTEM_H
13245 /* This is a workaround for SCO:  they neglected to define struct winsize in
13246  * termios.h -- it's only in termio.h and ptem.h
13247  */
13248 #include        <sys/stream.h>
13249 #include        <sys/ptem.h>
13250 #endif
13251 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13252 #include <sys/ioctl.h>
13253 #endif
13254
13255 int
13256 main ()
13257 {
13258
13259 #ifdef TIOCGSIZE
13260         struct ttysize win;     /* FIXME: what system is this? */
13261         int y = win.ts_lines;
13262         int x = win.ts_cols;
13263 #else
13264 #ifdef TIOCGWINSZ
13265         struct winsize win;
13266         int y = win.ws_row;
13267         int x = win.ws_col;
13268 #else
13269         no TIOCGSIZE or TIOCGWINSZ
13270 #endif /* TIOCGWINSZ */
13271 #endif /* TIOCGSIZE */
13272
13273   ;
13274   return 0;
13275 }
13276 _ACEOF
13277 rm -f conftest.$ac_objext
13278 if { (eval echo "$as_me:13278: \"$ac_compile\"") >&5
13279   (eval $ac_compile) 2>&5
13280   ac_status=$?
13281   echo "$as_me:13281: \$? = $ac_status" >&5
13282   (exit $ac_status); } &&
13283          { ac_try='test -s conftest.$ac_objext'
13284   { (eval echo "$as_me:13284: \"$ac_try\"") >&5
13285   (eval $ac_try) 2>&5
13286   ac_status=$?
13287   echo "$as_me:13287: \$? = $ac_status" >&5
13288   (exit $ac_status); }; }; then
13289   cf_cv_sizechange=yes
13290 else
13291   echo "$as_me: failed program was:" >&5
13292 cat conftest.$ac_ext >&5
13293 cf_cv_sizechange=no
13294 fi
13295 rm -f conftest.$ac_objext conftest.$ac_ext
13296
13297         CPPFLAGS="$cf_save_CPPFLAGS"
13298         if test "$cf_cv_sizechange" = yes ; then
13299                 echo "size-change succeeded ($cf_opts)" >&5
13300                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13301                 break
13302         fi
13303 done
13304
13305 fi
13306 echo "$as_me:13306: result: $cf_cv_sizechange" >&5
13307 echo "${ECHO_T}$cf_cv_sizechange" >&6
13308 if test "$cf_cv_sizechange" != no ; then
13309         cat >>confdefs.h <<\EOF
13310 #define HAVE_SIZECHANGE 1
13311 EOF
13312
13313         case $cf_cv_sizechange in #(vi
13314         NEED*)
13315                 cat >>confdefs.h <<EOF
13316 #define $cf_cv_sizechange  1
13317 EOF
13318
13319                 ;;
13320         esac
13321 fi
13322
13323 echo "$as_me:13323: checking for memmove" >&5
13324 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13325 if test "${ac_cv_func_memmove+set}" = set; then
13326   echo $ECHO_N "(cached) $ECHO_C" >&6
13327 else
13328   cat >conftest.$ac_ext <<_ACEOF
13329 #line 13329 "configure"
13330 #include "confdefs.h"
13331 /* System header to define __stub macros and hopefully few prototypes,
13332     which can conflict with char memmove (); below.  */
13333 #include <assert.h>
13334 /* Override any gcc2 internal prototype to avoid an error.  */
13335 #ifdef __cplusplus
13336 extern "C"
13337 #endif
13338 /* We use char because int might match the return type of a gcc2
13339    builtin and then its argument prototype would still apply.  */
13340 char memmove ();
13341 char (*f) ();
13342
13343 int
13344 main ()
13345 {
13346 /* The GNU C library defines this for functions which it implements
13347     to always fail with ENOSYS.  Some functions are actually named
13348     something starting with __ and the normal name is an alias.  */
13349 #if defined (__stub_memmove) || defined (__stub___memmove)
13350 choke me
13351 #else
13352 f = memmove;
13353 #endif
13354
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 rm -f conftest.$ac_objext conftest$ac_exeext
13360 if { (eval echo "$as_me:13360: \"$ac_link\"") >&5
13361   (eval $ac_link) 2>&5
13362   ac_status=$?
13363   echo "$as_me:13363: \$? = $ac_status" >&5
13364   (exit $ac_status); } &&
13365          { ac_try='test -s conftest$ac_exeext'
13366   { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367   (eval $ac_try) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); }; }; then
13371   ac_cv_func_memmove=yes
13372 else
13373   echo "$as_me: failed program was:" >&5
13374 cat conftest.$ac_ext >&5
13375 ac_cv_func_memmove=no
13376 fi
13377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13378 fi
13379 echo "$as_me:13379: result: $ac_cv_func_memmove" >&5
13380 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13381 if test $ac_cv_func_memmove = yes; then
13382   :
13383 else
13384
13385 echo "$as_me:13385: checking for bcopy" >&5
13386 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13387 if test "${ac_cv_func_bcopy+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390   cat >conftest.$ac_ext <<_ACEOF
13391 #line 13391 "configure"
13392 #include "confdefs.h"
13393 /* System header to define __stub macros and hopefully few prototypes,
13394     which can conflict with char bcopy (); below.  */
13395 #include <assert.h>
13396 /* Override any gcc2 internal prototype to avoid an error.  */
13397 #ifdef __cplusplus
13398 extern "C"
13399 #endif
13400 /* We use char because int might match the return type of a gcc2
13401    builtin and then its argument prototype would still apply.  */
13402 char bcopy ();
13403 char (*f) ();
13404
13405 int
13406 main ()
13407 {
13408 /* The GNU C library defines this for functions which it implements
13409     to always fail with ENOSYS.  Some functions are actually named
13410     something starting with __ and the normal name is an alias.  */
13411 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13412 choke me
13413 #else
13414 f = bcopy;
13415 #endif
13416
13417   ;
13418   return 0;
13419 }
13420 _ACEOF
13421 rm -f conftest.$ac_objext conftest$ac_exeext
13422 if { (eval echo "$as_me:13422: \"$ac_link\"") >&5
13423   (eval $ac_link) 2>&5
13424   ac_status=$?
13425   echo "$as_me:13425: \$? = $ac_status" >&5
13426   (exit $ac_status); } &&
13427          { ac_try='test -s conftest$ac_exeext'
13428   { (eval echo "$as_me:13428: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit $ac_status); }; }; then
13433   ac_cv_func_bcopy=yes
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat conftest.$ac_ext >&5
13437 ac_cv_func_bcopy=no
13438 fi
13439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13440 fi
13441 echo "$as_me:13441: result: $ac_cv_func_bcopy" >&5
13442 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13443 if test $ac_cv_func_bcopy = yes; then
13444
13445         echo "$as_me:13445: checking if bcopy does overlapping moves" >&5
13446 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13447 if test "${cf_cv_good_bcopy+set}" = set; then
13448   echo $ECHO_N "(cached) $ECHO_C" >&6
13449 else
13450
13451                 if test "$cross_compiling" = yes; then
13452   cf_cv_good_bcopy=unknown
13453 else
13454   cat >conftest.$ac_ext <<_ACEOF
13455 #line 13455 "configure"
13456 #include "confdefs.h"
13457
13458 int main() {
13459         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13460         char temp[40];
13461         bcopy(data, temp, sizeof(data));
13462         bcopy(temp+10, temp, 15);
13463         bcopy(temp+5, temp+15, 10);
13464         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13465 }
13466
13467 _ACEOF
13468 rm -f conftest$ac_exeext
13469 if { (eval echo "$as_me:13469: \"$ac_link\"") >&5
13470   (eval $ac_link) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13474   { (eval echo "$as_me:13474: \"$ac_try\"") >&5
13475   (eval $ac_try) 2>&5
13476   ac_status=$?
13477   echo "$as_me:13477: \$? = $ac_status" >&5
13478   (exit $ac_status); }; }; then
13479   cf_cv_good_bcopy=yes
13480 else
13481   echo "$as_me: program exited with status $ac_status" >&5
13482 echo "$as_me: failed program was:" >&5
13483 cat conftest.$ac_ext >&5
13484 cf_cv_good_bcopy=no
13485 fi
13486 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13487 fi
13488
13489 fi
13490 echo "$as_me:13490: result: $cf_cv_good_bcopy" >&5
13491 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13492
13493 else
13494   cf_cv_good_bcopy=no
13495 fi
13496
13497         if test "$cf_cv_good_bcopy" = yes ; then
13498                 cat >>confdefs.h <<\EOF
13499 #define USE_OK_BCOPY 1
13500 EOF
13501
13502         else
13503                 cat >>confdefs.h <<\EOF
13504 #define USE_MY_MEMMOVE 1
13505 EOF
13506
13507         fi
13508
13509 fi
13510
13511 echo "$as_me:13511: checking if poll really works" >&5
13512 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13513 if test "${cf_cv_working_poll+set}" = set; then
13514   echo $ECHO_N "(cached) $ECHO_C" >&6
13515 else
13516
13517 if test "$cross_compiling" = yes; then
13518   cf_cv_working_poll=unknown
13519 else
13520   cat >conftest.$ac_ext <<_ACEOF
13521 #line 13521 "configure"
13522 #include "confdefs.h"
13523
13524 #include <stdio.h>
13525 #ifdef HAVE_POLL_H
13526 #include <poll.h>
13527 #else
13528 #include <sys/poll.h>
13529 #endif
13530 int main() {
13531         struct pollfd myfds;
13532         int ret;
13533
13534         myfds.fd = 0;
13535         myfds.events = POLLIN;
13536
13537         ret = poll(&myfds, 1, 100);
13538         ${cf_cv_main_return:-return}(ret != 0);
13539 }
13540 _ACEOF
13541 rm -f conftest$ac_exeext
13542 if { (eval echo "$as_me:13542: \"$ac_link\"") >&5
13543   (eval $ac_link) 2>&5
13544   ac_status=$?
13545   echo "$as_me:13545: \$? = $ac_status" >&5
13546   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13547   { (eval echo "$as_me:13547: \"$ac_try\"") >&5
13548   (eval $ac_try) 2>&5
13549   ac_status=$?
13550   echo "$as_me:13550: \$? = $ac_status" >&5
13551   (exit $ac_status); }; }; then
13552   cf_cv_working_poll=yes
13553 else
13554   echo "$as_me: program exited with status $ac_status" >&5
13555 echo "$as_me: failed program was:" >&5
13556 cat conftest.$ac_ext >&5
13557 cf_cv_working_poll=no
13558 fi
13559 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13560 fi
13561 fi
13562 echo "$as_me:13562: result: $cf_cv_working_poll" >&5
13563 echo "${ECHO_T}$cf_cv_working_poll" >&6
13564 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13565 #define HAVE_WORKING_POLL 1
13566 EOF
13567
13568 # special check for test/ditto.c
13569
13570 echo "$as_me:13570: checking for openpty in -lutil" >&5
13571 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13572 if test "${ac_cv_lib_util_openpty+set}" = set; then
13573   echo $ECHO_N "(cached) $ECHO_C" >&6
13574 else
13575   ac_check_lib_save_LIBS=$LIBS
13576 LIBS="-lutil  $LIBS"
13577 cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580
13581 /* Override any gcc2 internal prototype to avoid an error.  */
13582 #ifdef __cplusplus
13583 extern "C"
13584 #endif
13585 /* We use char because int might match the return type of a gcc2
13586    builtin and then its argument prototype would still apply.  */
13587 char openpty ();
13588 int
13589 main ()
13590 {
13591 openpty ();
13592   ;
13593   return 0;
13594 }
13595 _ACEOF
13596 rm -f conftest.$ac_objext conftest$ac_exeext
13597 if { (eval echo "$as_me:13597: \"$ac_link\"") >&5
13598   (eval $ac_link) 2>&5
13599   ac_status=$?
13600   echo "$as_me:13600: \$? = $ac_status" >&5
13601   (exit $ac_status); } &&
13602          { ac_try='test -s conftest$ac_exeext'
13603   { (eval echo "$as_me:13603: \"$ac_try\"") >&5
13604   (eval $ac_try) 2>&5
13605   ac_status=$?
13606   echo "$as_me:13606: \$? = $ac_status" >&5
13607   (exit $ac_status); }; }; then
13608   ac_cv_lib_util_openpty=yes
13609 else
13610   echo "$as_me: failed program was:" >&5
13611 cat conftest.$ac_ext >&5
13612 ac_cv_lib_util_openpty=no
13613 fi
13614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13615 LIBS=$ac_check_lib_save_LIBS
13616 fi
13617 echo "$as_me:13617: result: $ac_cv_lib_util_openpty" >&5
13618 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13619 if test $ac_cv_lib_util_openpty = yes; then
13620   cf_cv_lib_util=yes
13621 else
13622   cf_cv_lib_util=no
13623 fi
13624
13625 echo "$as_me:13625: checking for openpty header" >&5
13626 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
13627 if test "${cf_cv_func_openpty+set}" = set; then
13628   echo $ECHO_N "(cached) $ECHO_C" >&6
13629 else
13630
13631     cf_save_LIBS="$LIBS"
13632     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
13633     for cf_header in pty.h libutil.h util.h
13634     do
13635     cat >conftest.$ac_ext <<_ACEOF
13636 #line 13636 "configure"
13637 #include "confdefs.h"
13638
13639 #include <$cf_header>
13640
13641 int
13642 main ()
13643 {
13644
13645     int x = openpty((int *)0, (int *)0, (char *)0,
13646                    (struct termios *)0, (struct winsize *)0);
13647
13648   ;
13649   return 0;
13650 }
13651 _ACEOF
13652 rm -f conftest.$ac_objext conftest$ac_exeext
13653 if { (eval echo "$as_me:13653: \"$ac_link\"") >&5
13654   (eval $ac_link) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit $ac_status); } &&
13658          { ac_try='test -s conftest$ac_exeext'
13659   { (eval echo "$as_me:13659: \"$ac_try\"") >&5
13660   (eval $ac_try) 2>&5
13661   ac_status=$?
13662   echo "$as_me:13662: \$? = $ac_status" >&5
13663   (exit $ac_status); }; }; then
13664
13665         cf_cv_func_openpty=$cf_header
13666         break
13667
13668 else
13669   echo "$as_me: failed program was:" >&5
13670 cat conftest.$ac_ext >&5
13671
13672         cf_cv_func_openpty=no
13673
13674 fi
13675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13676     done
13677     LIBS="$cf_save_LIBS"
13678
13679 fi
13680 echo "$as_me:13680: result: $cf_cv_func_openpty" >&5
13681 echo "${ECHO_T}$cf_cv_func_openpty" >&6
13682
13683 if test "$cf_cv_func_openpty" != no ; then
13684     cat >>confdefs.h <<EOF
13685 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
13686 EOF
13687
13688     cat >>confdefs.h <<\EOF
13689 #define USE_XTERM_PTY 1
13690 EOF
13691
13692     if test "$cf_cv_lib_util" = yes ; then
13693         TEST_LIBS="-lutil $TEST_LIBS"
13694     fi
13695 fi
13696
13697 if test "$with_hashed_db" != no ; then
13698         cat >>confdefs.h <<\EOF
13699 #define USE_HASHED_DB 1
13700 EOF
13701
13702 case $with_hashed_db in #(vi
13703 yes|*able*) #(vi
13704     ;;
13705 *)
13706     if test -d "$with_hashed_db" ; then
13707
13708 if test -n "$with_hashed_db/include" ; then
13709   for cf_add_incdir in $with_hashed_db/include
13710   do
13711         while test $cf_add_incdir != /usr/include
13712         do
13713           if test -d $cf_add_incdir
13714           then
13715                 cf_have_incdir=no
13716                 if test -n "$CFLAGS$CPPFLAGS" ; then
13717                   # a loop is needed to ensure we can add subdirs of existing dirs
13718                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13719                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13720                           cf_have_incdir=yes; break
13721                         fi
13722                   done
13723                 fi
13724
13725                 if test "$cf_have_incdir" = no ; then
13726           if test "$cf_add_incdir" = /usr/local/include ; then
13727                         if test "$GCC" = yes
13728                         then
13729                           cf_save_CPPFLAGS=$CPPFLAGS
13730                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13731                           cat >conftest.$ac_ext <<_ACEOF
13732 #line 13732 "configure"
13733 #include "confdefs.h"
13734 #include <stdio.h>
13735 int
13736 main ()
13737 {
13738 printf("Hello")
13739   ;
13740   return 0;
13741 }
13742 _ACEOF
13743 rm -f conftest.$ac_objext
13744 if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
13745   (eval $ac_compile) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit $ac_status); } &&
13749          { ac_try='test -s conftest.$ac_objext'
13750   { (eval echo "$as_me:13750: \"$ac_try\"") >&5
13751   (eval $ac_try) 2>&5
13752   ac_status=$?
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit $ac_status); }; }; then
13755   :
13756 else
13757   echo "$as_me: failed program was:" >&5
13758 cat conftest.$ac_ext >&5
13759 cf_have_incdir=yes
13760 fi
13761 rm -f conftest.$ac_objext conftest.$ac_ext
13762                           CPPFLAGS=$cf_save_CPPFLAGS
13763                         fi
13764                   fi
13765                 fi
13766
13767                 if test "$cf_have_incdir" = no ; then
13768                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13769
13770 echo "${as_me-configure}:13770: testing adding $cf_add_incdir to include-path ..." 1>&5
13771
13772                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13773
13774           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13775           test "$cf_top_incdir" = "$cf_add_incdir" && break
13776           cf_add_incdir="$cf_top_incdir"
13777                 else
13778                   break
13779                 fi
13780           fi
13781         done
13782   done
13783 fi
13784
13785 if test -n "$with_hashed_db/lib" ; then
13786   for cf_add_libdir in $with_hashed_db/lib
13787   do
13788     if test $cf_add_libdir = /usr/lib ; then
13789       :
13790     elif test -d $cf_add_libdir
13791     then
13792       cf_have_libdir=no
13793       if test -n "$LDFLAGS$LIBS" ; then
13794         # a loop is needed to ensure we can add subdirs of existing dirs
13795         for cf_test_libdir in $LDFLAGS $LIBS ; do
13796           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13797             cf_have_libdir=yes; break
13798           fi
13799         done
13800       fi
13801       if test "$cf_have_libdir" = no ; then
13802         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13803
13804 echo "${as_me-configure}:13804: testing adding $cf_add_libdir to library-path ..." 1>&5
13805
13806         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13807       fi
13808     fi
13809   done
13810 fi
13811
13812     fi
13813 esac
13814
13815 echo "$as_me:13815: checking for db.h" >&5
13816 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13817 if test "${ac_cv_header_db_h+set}" = set; then
13818   echo $ECHO_N "(cached) $ECHO_C" >&6
13819 else
13820   cat >conftest.$ac_ext <<_ACEOF
13821 #line 13821 "configure"
13822 #include "confdefs.h"
13823 #include <db.h>
13824 _ACEOF
13825 if { (eval echo "$as_me:13825: \"$ac_cpp conftest.$ac_ext\"") >&5
13826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13827   ac_status=$?
13828   egrep -v '^ *\+' conftest.er1 >conftest.err
13829   rm -f conftest.er1
13830   cat conftest.err >&5
13831   echo "$as_me:13831: \$? = $ac_status" >&5
13832   (exit $ac_status); } >/dev/null; then
13833   if test -s conftest.err; then
13834     ac_cpp_err=$ac_c_preproc_warn_flag
13835   else
13836     ac_cpp_err=
13837   fi
13838 else
13839   ac_cpp_err=yes
13840 fi
13841 if test -z "$ac_cpp_err"; then
13842   ac_cv_header_db_h=yes
13843 else
13844   echo "$as_me: failed program was:" >&5
13845   cat conftest.$ac_ext >&5
13846   ac_cv_header_db_h=no
13847 fi
13848 rm -f conftest.err conftest.$ac_ext
13849 fi
13850 echo "$as_me:13850: result: $ac_cv_header_db_h" >&5
13851 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13852 if test $ac_cv_header_db_h = yes; then
13853
13854 echo "$as_me:13854: checking for version of db" >&5
13855 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13856 if test "${cf_cv_hashed_db_version+set}" = set; then
13857   echo $ECHO_N "(cached) $ECHO_C" >&6
13858 else
13859
13860 cf_cv_hashed_db_version=unknown
13861
13862 for cf_db_version in 1 2 3 4 5
13863 do
13864
13865 echo "${as_me-configure}:13865: testing checking for db version $cf_db_version ..." 1>&5
13866
13867         cat >conftest.$ac_ext <<_ACEOF
13868 #line 13868 "configure"
13869 #include "confdefs.h"
13870
13871 $ac_includes_default
13872 #include <db.h>
13873
13874 #ifdef DB_VERSION_MAJOR
13875         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13876 #if $cf_db_version == DB_VERSION_MAJOR
13877         /* ok */
13878 #else
13879         make an error
13880 #endif
13881 #else
13882 #if $cf_db_version == 1
13883         /* ok: assuming this is DB 1.8.5 */
13884 #else
13885         make an error
13886 #endif
13887 #endif
13888
13889 int
13890 main ()
13891 {
13892 DBT *foo = 0
13893   ;
13894   return 0;
13895 }
13896 _ACEOF
13897 rm -f conftest.$ac_objext
13898 if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899   (eval $ac_compile) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); } &&
13903          { ac_try='test -s conftest.$ac_objext'
13904   { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905   (eval $ac_try) 2>&5
13906   ac_status=$?
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit $ac_status); }; }; then
13909
13910         cf_cv_hashed_db_version=$cf_db_version
13911         break
13912
13913 else
13914   echo "$as_me: failed program was:" >&5
13915 cat conftest.$ac_ext >&5
13916 fi
13917 rm -f conftest.$ac_objext conftest.$ac_ext
13918 done
13919
13920 fi
13921 echo "$as_me:13921: result: $cf_cv_hashed_db_version" >&5
13922 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13923
13924 if test "$cf_cv_hashed_db_version" = unknown ; then
13925         { { echo "$as_me:13925: error: Cannot determine version of db" >&5
13926 echo "$as_me: error: Cannot determine version of db" >&2;}
13927    { (exit 1); exit 1; }; }
13928 else
13929
13930 echo "$as_me:13930: checking for db libraries" >&5
13931 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13932 if test "${cf_cv_hashed_db_libs+set}" = set; then
13933   echo $ECHO_N "(cached) $ECHO_C" >&6
13934 else
13935
13936 cf_cv_hashed_db_libs=unknown
13937 for cf_db_libs in db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
13938 do
13939         cf_save_libs="$LIBS"
13940         if test -n "$cf_db_libs"; then
13941                 LIBS="-l$cf_db_libs $LIBS"
13942         fi
13943
13944 echo "${as_me-configure}:13944: testing checking for library "$cf_db_libs" ..." 1>&5
13945
13946         cat >conftest.$ac_ext <<_ACEOF
13947 #line 13947 "configure"
13948 #include "confdefs.h"
13949
13950 $ac_includes_default
13951 #include <db.h>
13952
13953 int
13954 main ()
13955 {
13956
13957         char *path = "/tmp/foo";
13958 #ifdef DB_VERSION_MAJOR
13959 #if DB_VERSION_MAJOR >= 4
13960         DB *result = 0;
13961         db_create(&result, NULL, 0);
13962         result->open(result,
13963                 NULL,
13964                 path,
13965                 path,
13966                 DB_HASH,
13967                 DB_CREATE,
13968                 0644);
13969 #elif DB_VERSION_MAJOR >= 3
13970         DB *result = 0;
13971         db_create(&result, NULL, 0);
13972         result->open(result,
13973                 path,
13974                 path,
13975                 DB_HASH,
13976                 DB_CREATE,
13977                 0644);
13978 #elif DB_VERSION_MAJOR >= 2
13979         DB *result = 0;
13980         db_open(path,
13981                 DB_HASH,
13982                 DB_CREATE,
13983                 0644,
13984                 (DB_ENV *) 0,
13985                 (DB_INFO *) 0,
13986                 &result);
13987 #endif /* DB_VERSION_MAJOR */
13988 #else
13989         DB *result = dbopen(path,
13990                      2,
13991                      0644,
13992                      DB_HASH,
13993                      0);
13994 #endif
13995         ${cf_cv_main_return:-return}(result != 0)
13996
13997   ;
13998   return 0;
13999 }
14000 _ACEOF
14001 rm -f conftest.$ac_objext conftest$ac_exeext
14002 if { (eval echo "$as_me:14002: \"$ac_link\"") >&5
14003   (eval $ac_link) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); } &&
14007          { ac_try='test -s conftest$ac_exeext'
14008   { (eval echo "$as_me:14008: \"$ac_try\"") >&5
14009   (eval $ac_try) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit $ac_status); }; }; then
14013
14014         if test -n "$cf_db_libs" ; then
14015                 cf_cv_hashed_db_libs=$cf_db_libs
14016         else
14017                 cf_cv_hashed_db_libs=default
14018         fi
14019         LIBS="$cf_save_libs"
14020         break
14021
14022 else
14023   echo "$as_me: failed program was:" >&5
14024 cat conftest.$ac_ext >&5
14025 fi
14026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14027         LIBS="$cf_save_libs"
14028 done
14029
14030 fi
14031 echo "$as_me:14031: result: $cf_cv_hashed_db_libs" >&5
14032 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14033
14034         if test "$cf_cv_hashed_db_libs" = unknown ; then
14035                 { { echo "$as_me:14035: error: Cannot determine library for db" >&5
14036 echo "$as_me: error: Cannot determine library for db" >&2;}
14037    { (exit 1); exit 1; }; }
14038         elif test "$cf_cv_hashed_db_libs" != default ; then
14039                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14040         fi
14041 fi
14042
14043 else
14044
14045         { { echo "$as_me:14045: error: Cannot find db.h" >&5
14046 echo "$as_me: error: Cannot find db.h" >&2;}
14047    { (exit 1); exit 1; }; }
14048
14049 fi
14050
14051 fi
14052
14053 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14054         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14055         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14056 fi
14057
14058 # Just in case, check if the C compiler has a bool type.
14059
14060 echo "$as_me:14060: checking if we should include stdbool.h" >&5
14061 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14062
14063 if test "${cf_cv_header_stdbool_h+set}" = set; then
14064   echo $ECHO_N "(cached) $ECHO_C" >&6
14065 else
14066
14067         cat >conftest.$ac_ext <<_ACEOF
14068 #line 14068 "configure"
14069 #include "confdefs.h"
14070
14071 int
14072 main ()
14073 {
14074 bool foo = false
14075   ;
14076   return 0;
14077 }
14078 _ACEOF
14079 rm -f conftest.$ac_objext
14080 if { (eval echo "$as_me:14080: \"$ac_compile\"") >&5
14081   (eval $ac_compile) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); } &&
14085          { ac_try='test -s conftest.$ac_objext'
14086   { (eval echo "$as_me:14086: \"$ac_try\"") >&5
14087   (eval $ac_try) 2>&5
14088   ac_status=$?
14089   echo "$as_me:14089: \$? = $ac_status" >&5
14090   (exit $ac_status); }; }; then
14091   cf_cv_header_stdbool_h=0
14092 else
14093   echo "$as_me: failed program was:" >&5
14094 cat conftest.$ac_ext >&5
14095 cat >conftest.$ac_ext <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098
14099 #ifndef __BEOS__
14100 #include <stdbool.h>
14101 #endif
14102
14103 int
14104 main ()
14105 {
14106 bool foo = false
14107   ;
14108   return 0;
14109 }
14110 _ACEOF
14111 rm -f conftest.$ac_objext
14112 if { (eval echo "$as_me:14112: \"$ac_compile\"") >&5
14113   (eval $ac_compile) 2>&5
14114   ac_status=$?
14115   echo "$as_me:14115: \$? = $ac_status" >&5
14116   (exit $ac_status); } &&
14117          { ac_try='test -s conftest.$ac_objext'
14118   { (eval echo "$as_me:14118: \"$ac_try\"") >&5
14119   (eval $ac_try) 2>&5
14120   ac_status=$?
14121   echo "$as_me:14121: \$? = $ac_status" >&5
14122   (exit $ac_status); }; }; then
14123   cf_cv_header_stdbool_h=1
14124 else
14125   echo "$as_me: failed program was:" >&5
14126 cat conftest.$ac_ext >&5
14127 cf_cv_header_stdbool_h=0
14128 fi
14129 rm -f conftest.$ac_objext conftest.$ac_ext
14130 fi
14131 rm -f conftest.$ac_objext conftest.$ac_ext
14132 fi
14133
14134 if test "$cf_cv_header_stdbool_h" = 1
14135 then    echo "$as_me:14135: result: yes" >&5
14136 echo "${ECHO_T}yes" >&6
14137 else    echo "$as_me:14137: result: no" >&5
14138 echo "${ECHO_T}no" >&6
14139 fi
14140
14141 echo "$as_me:14141: checking for builtin bool type" >&5
14142 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14143
14144 if test "${cf_cv_cc_bool_type+set}" = set; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147
14148         cat >conftest.$ac_ext <<_ACEOF
14149 #line 14149 "configure"
14150 #include "confdefs.h"
14151
14152 #include <stdio.h>
14153 #include <sys/types.h>
14154
14155 int
14156 main ()
14157 {
14158 bool x = false
14159   ;
14160   return 0;
14161 }
14162 _ACEOF
14163 rm -f conftest.$ac_objext
14164 if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
14165   (eval $ac_compile) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); } &&
14169          { ac_try='test -s conftest.$ac_objext'
14170   { (eval echo "$as_me:14170: \"$ac_try\"") >&5
14171   (eval $ac_try) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); }; }; then
14175   cf_cv_cc_bool_type=1
14176 else
14177   echo "$as_me: failed program was:" >&5
14178 cat conftest.$ac_ext >&5
14179 cf_cv_cc_bool_type=0
14180 fi
14181 rm -f conftest.$ac_objext conftest.$ac_ext
14182
14183 fi
14184
14185 if test "$cf_cv_cc_bool_type" = 1
14186 then    echo "$as_me:14186: result: yes" >&5
14187 echo "${ECHO_T}yes" >&6
14188 else    echo "$as_me:14188: result: no" >&5
14189 echo "${ECHO_T}no" >&6
14190 fi
14191
14192 # Check for C++ compiler characteristics (and ensure that it's there!)
14193 if test -n "$CXX" ; then
14194         ac_ext=cc
14195 ac_cpp='$CXXCPP $CPPFLAGS'
14196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14199 ac_main_return=return
14200
14201 if test -n "$GXX" ; then
14202 case $cf_cv_system_name in #(vi
14203 os2*) #(vi
14204         cf_stdcpp_libname=stdcpp
14205         ;;
14206 *)
14207         cf_stdcpp_libname=stdc++
14208         ;;
14209 esac
14210 echo "$as_me:14210: checking for library $cf_stdcpp_libname" >&5
14211 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14212 if test "${cf_cv_libstdcpp+set}" = set; then
14213   echo $ECHO_N "(cached) $ECHO_C" >&6
14214 else
14215
14216         cf_save="$LIBS"
14217         LIBS="$LIBS -l$cf_stdcpp_libname"
14218 cat >conftest.$ac_ext <<_ACEOF
14219 #line 14219 "configure"
14220 #include "confdefs.h"
14221
14222 #include <strstream.h>
14223 int
14224 main ()
14225 {
14226
14227 char buf[80];
14228 strstreambuf foo(buf, sizeof(buf))
14229
14230   ;
14231   return 0;
14232 }
14233 _ACEOF
14234 rm -f conftest.$ac_objext conftest$ac_exeext
14235 if { (eval echo "$as_me:14235: \"$ac_link\"") >&5
14236   (eval $ac_link) 2>&5
14237   ac_status=$?
14238   echo "$as_me:14238: \$? = $ac_status" >&5
14239   (exit $ac_status); } &&
14240          { ac_try='test -s conftest$ac_exeext'
14241   { (eval echo "$as_me:14241: \"$ac_try\"") >&5
14242   (eval $ac_try) 2>&5
14243   ac_status=$?
14244   echo "$as_me:14244: \$? = $ac_status" >&5
14245   (exit $ac_status); }; }; then
14246   cf_cv_libstdcpp=yes
14247 else
14248   echo "$as_me: failed program was:" >&5
14249 cat conftest.$ac_ext >&5
14250 cf_cv_libstdcpp=no
14251 fi
14252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14253         LIBS="$cf_save"
14254
14255 fi
14256 echo "$as_me:14256: result: $cf_cv_libstdcpp" >&5
14257 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14258 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14259 fi
14260
14261         echo "$as_me:14261: checking whether $CXX understands -c and -o together" >&5
14262 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14263 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14264   echo $ECHO_N "(cached) $ECHO_C" >&6
14265 else
14266
14267 cat > conftest.$ac_ext <<CF_EOF
14268 #include <stdio.h>
14269 int main()
14270 {
14271         ${cf_cv_main_return:-return}(0);
14272 }
14273 CF_EOF
14274 # We do the test twice because some compilers refuse to overwrite an
14275 # existing .o file with -o, though they will create one.
14276 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14277 if { (eval echo "$as_me:14277: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:14280: \$? = $ac_status" >&5
14281   (exit $ac_status); } &&
14282   test -f conftest2.$ac_objext && { (eval echo "$as_me:14282: \"$ac_try\"") >&5
14283   (eval $ac_try) 2>&5
14284   ac_status=$?
14285   echo "$as_me:14285: \$? = $ac_status" >&5
14286   (exit $ac_status); };
14287 then
14288   eval cf_cv_prog_CXX_c_o=yes
14289 else
14290   eval cf_cv_prog_CXX_c_o=no
14291 fi
14292 rm -f conftest*
14293
14294 fi
14295 if test $cf_cv_prog_CXX_c_o = yes; then
14296   echo "$as_me:14296: result: yes" >&5
14297 echo "${ECHO_T}yes" >&6
14298 else
14299   echo "$as_me:14299: result: no" >&5
14300 echo "${ECHO_T}no" >&6
14301 fi
14302
14303         case $GXX_VERSION in
14304         1*|2.0-6*)
14305                 cf_cxx_library=yes
14306                 ;;
14307         *-2.7*|2.7*)
14308
14309 cf_cxx_library=unknown
14310 case $cf_cv_system_name in #(vi
14311 os2*) #(vi
14312         cf_gpp_libname=gpp
14313         ;;
14314 *)
14315         cf_gpp_libname=g++
14316         ;;
14317 esac
14318 if test "$GXX" = yes; then
14319         echo "$as_me:14319: checking for lib$cf_gpp_libname" >&5
14320 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14321         cf_save="$LIBS"
14322         LIBS="$LIBS -l$cf_gpp_libname"
14323         cat >conftest.$ac_ext <<_ACEOF
14324 #line 14324 "configure"
14325 #include "confdefs.h"
14326
14327 #include <$cf_gpp_libname/builtin.h>
14328
14329 int
14330 main ()
14331 {
14332 two_arg_error_handler_t foo2 = lib_error_handler
14333   ;
14334   return 0;
14335 }
14336 _ACEOF
14337 rm -f conftest.$ac_objext conftest$ac_exeext
14338 if { (eval echo "$as_me:14338: \"$ac_link\"") >&5
14339   (eval $ac_link) 2>&5
14340   ac_status=$?
14341   echo "$as_me:14341: \$? = $ac_status" >&5
14342   (exit $ac_status); } &&
14343          { ac_try='test -s conftest$ac_exeext'
14344   { (eval echo "$as_me:14344: \"$ac_try\"") >&5
14345   (eval $ac_try) 2>&5
14346   ac_status=$?
14347   echo "$as_me:14347: \$? = $ac_status" >&5
14348   (exit $ac_status); }; }; then
14349   cf_cxx_library=yes
14350          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14351          if test "$cf_gpp_libname" = cpp ; then
14352             cat >>confdefs.h <<\EOF
14353 #define HAVE_GPP_BUILTIN_H 1
14354 EOF
14355
14356          else
14357             cat >>confdefs.h <<\EOF
14358 #define HAVE_GXX_BUILTIN_H 1
14359 EOF
14360
14361          fi
14362 else
14363   echo "$as_me: failed program was:" >&5
14364 cat conftest.$ac_ext >&5
14365 cat >conftest.$ac_ext <<_ACEOF
14366 #line 14366 "configure"
14367 #include "confdefs.h"
14368
14369 #include <builtin.h>
14370
14371 int
14372 main ()
14373 {
14374 two_arg_error_handler_t foo2 = lib_error_handler
14375   ;
14376   return 0;
14377 }
14378 _ACEOF
14379 rm -f conftest.$ac_objext conftest$ac_exeext
14380 if { (eval echo "$as_me:14380: \"$ac_link\"") >&5
14381   (eval $ac_link) 2>&5
14382   ac_status=$?
14383   echo "$as_me:14383: \$? = $ac_status" >&5
14384   (exit $ac_status); } &&
14385          { ac_try='test -s conftest$ac_exeext'
14386   { (eval echo "$as_me:14386: \"$ac_try\"") >&5
14387   (eval $ac_try) 2>&5
14388   ac_status=$?
14389   echo "$as_me:14389: \$? = $ac_status" >&5
14390   (exit $ac_status); }; }; then
14391   cf_cxx_library=yes
14392          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14393          cat >>confdefs.h <<\EOF
14394 #define HAVE_BUILTIN_H 1
14395 EOF
14396
14397 else
14398   echo "$as_me: failed program was:" >&5
14399 cat conftest.$ac_ext >&5
14400 cf_cxx_library=no
14401 fi
14402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14403 fi
14404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14405         LIBS="$cf_save"
14406         echo "$as_me:14406: result: $cf_cxx_library" >&5
14407 echo "${ECHO_T}$cf_cxx_library" >&6
14408 fi
14409
14410                 ;;
14411         *)
14412                 cf_cxx_library=no
14413                 ;;
14414         esac
14415
14416         ac_ext=cc
14417 ac_cpp='$CXXCPP $CPPFLAGS'
14418 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14419 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14420 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14421 ac_main_return=return
14422 echo "$as_me:14422: checking how to run the C++ preprocessor" >&5
14423 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14424 if test -z "$CXXCPP"; then
14425   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14426   echo $ECHO_N "(cached) $ECHO_C" >&6
14427 else
14428       # Double quotes because CXXCPP needs to be expanded
14429     for CXXCPP in "$CXX -E" "/lib/cpp"
14430     do
14431       ac_preproc_ok=false
14432 for ac_cxx_preproc_warn_flag in '' yes
14433 do
14434   # Use a header file that comes with gcc, so configuring glibc
14435   # with a fresh cross-compiler works.
14436   # On the NeXT, cc -E runs the code through the compiler's parser,
14437   # not just through cpp. "Syntax error" is here to catch this case.
14438   cat >conftest.$ac_ext <<_ACEOF
14439 #line 14439 "configure"
14440 #include "confdefs.h"
14441 #include <assert.h>
14442                      Syntax error
14443 _ACEOF
14444 if { (eval echo "$as_me:14444: \"$ac_cpp conftest.$ac_ext\"") >&5
14445   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14446   ac_status=$?
14447   egrep -v '^ *\+' conftest.er1 >conftest.err
14448   rm -f conftest.er1
14449   cat conftest.err >&5
14450   echo "$as_me:14450: \$? = $ac_status" >&5
14451   (exit $ac_status); } >/dev/null; then
14452   if test -s conftest.err; then
14453     ac_cpp_err=$ac_cxx_preproc_warn_flag
14454   else
14455     ac_cpp_err=
14456   fi
14457 else
14458   ac_cpp_err=yes
14459 fi
14460 if test -z "$ac_cpp_err"; then
14461   :
14462 else
14463   echo "$as_me: failed program was:" >&5
14464   cat conftest.$ac_ext >&5
14465   # Broken: fails on valid input.
14466 continue
14467 fi
14468 rm -f conftest.err conftest.$ac_ext
14469
14470   # OK, works on sane cases.  Now check whether non-existent headers
14471   # can be detected and how.
14472   cat >conftest.$ac_ext <<_ACEOF
14473 #line 14473 "configure"
14474 #include "confdefs.h"
14475 #include <ac_nonexistent.h>
14476 _ACEOF
14477 if { (eval echo "$as_me:14477: \"$ac_cpp conftest.$ac_ext\"") >&5
14478   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14479   ac_status=$?
14480   egrep -v '^ *\+' conftest.er1 >conftest.err
14481   rm -f conftest.er1
14482   cat conftest.err >&5
14483   echo "$as_me:14483: \$? = $ac_status" >&5
14484   (exit $ac_status); } >/dev/null; then
14485   if test -s conftest.err; then
14486     ac_cpp_err=$ac_cxx_preproc_warn_flag
14487   else
14488     ac_cpp_err=
14489   fi
14490 else
14491   ac_cpp_err=yes
14492 fi
14493 if test -z "$ac_cpp_err"; then
14494   # Broken: success on invalid input.
14495 continue
14496 else
14497   echo "$as_me: failed program was:" >&5
14498   cat conftest.$ac_ext >&5
14499   # Passes both tests.
14500 ac_preproc_ok=:
14501 break
14502 fi
14503 rm -f conftest.err conftest.$ac_ext
14504
14505 done
14506 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14507 rm -f conftest.err conftest.$ac_ext
14508 if $ac_preproc_ok; then
14509   break
14510 fi
14511
14512     done
14513     ac_cv_prog_CXXCPP=$CXXCPP
14514
14515 fi
14516   CXXCPP=$ac_cv_prog_CXXCPP
14517 else
14518   ac_cv_prog_CXXCPP=$CXXCPP
14519 fi
14520 echo "$as_me:14520: result: $CXXCPP" >&5
14521 echo "${ECHO_T}$CXXCPP" >&6
14522 ac_preproc_ok=false
14523 for ac_cxx_preproc_warn_flag in '' yes
14524 do
14525   # Use a header file that comes with gcc, so configuring glibc
14526   # with a fresh cross-compiler works.
14527   # On the NeXT, cc -E runs the code through the compiler's parser,
14528   # not just through cpp. "Syntax error" is here to catch this case.
14529   cat >conftest.$ac_ext <<_ACEOF
14530 #line 14530 "configure"
14531 #include "confdefs.h"
14532 #include <assert.h>
14533                      Syntax error
14534 _ACEOF
14535 if { (eval echo "$as_me:14535: \"$ac_cpp conftest.$ac_ext\"") >&5
14536   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14537   ac_status=$?
14538   egrep -v '^ *\+' conftest.er1 >conftest.err
14539   rm -f conftest.er1
14540   cat conftest.err >&5
14541   echo "$as_me:14541: \$? = $ac_status" >&5
14542   (exit $ac_status); } >/dev/null; then
14543   if test -s conftest.err; then
14544     ac_cpp_err=$ac_cxx_preproc_warn_flag
14545   else
14546     ac_cpp_err=
14547   fi
14548 else
14549   ac_cpp_err=yes
14550 fi
14551 if test -z "$ac_cpp_err"; then
14552   :
14553 else
14554   echo "$as_me: failed program was:" >&5
14555   cat conftest.$ac_ext >&5
14556   # Broken: fails on valid input.
14557 continue
14558 fi
14559 rm -f conftest.err conftest.$ac_ext
14560
14561   # OK, works on sane cases.  Now check whether non-existent headers
14562   # can be detected and how.
14563   cat >conftest.$ac_ext <<_ACEOF
14564 #line 14564 "configure"
14565 #include "confdefs.h"
14566 #include <ac_nonexistent.h>
14567 _ACEOF
14568 if { (eval echo "$as_me:14568: \"$ac_cpp conftest.$ac_ext\"") >&5
14569   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14570   ac_status=$?
14571   egrep -v '^ *\+' conftest.er1 >conftest.err
14572   rm -f conftest.er1
14573   cat conftest.err >&5
14574   echo "$as_me:14574: \$? = $ac_status" >&5
14575   (exit $ac_status); } >/dev/null; then
14576   if test -s conftest.err; then
14577     ac_cpp_err=$ac_cxx_preproc_warn_flag
14578   else
14579     ac_cpp_err=
14580   fi
14581 else
14582   ac_cpp_err=yes
14583 fi
14584 if test -z "$ac_cpp_err"; then
14585   # Broken: success on invalid input.
14586 continue
14587 else
14588   echo "$as_me: failed program was:" >&5
14589   cat conftest.$ac_ext >&5
14590   # Passes both tests.
14591 ac_preproc_ok=:
14592 break
14593 fi
14594 rm -f conftest.err conftest.$ac_ext
14595
14596 done
14597 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14598 rm -f conftest.err conftest.$ac_ext
14599 if $ac_preproc_ok; then
14600   :
14601 else
14602   { { echo "$as_me:14602: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14603 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14604    { (exit 1); exit 1; }; }
14605 fi
14606
14607 ac_ext=cc
14608 ac_cpp='$CXXCPP $CPPFLAGS'
14609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14612 ac_main_return=return
14613
14614 for ac_header in iostream typeinfo
14615 do
14616 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14617 echo "$as_me:14617: checking for $ac_header" >&5
14618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14620   echo $ECHO_N "(cached) $ECHO_C" >&6
14621 else
14622   cat >conftest.$ac_ext <<_ACEOF
14623 #line 14623 "configure"
14624 #include "confdefs.h"
14625 #include <$ac_header>
14626 _ACEOF
14627 if { (eval echo "$as_me:14627: \"$ac_cpp conftest.$ac_ext\"") >&5
14628   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14629   ac_status=$?
14630   egrep -v '^ *\+' conftest.er1 >conftest.err
14631   rm -f conftest.er1
14632   cat conftest.err >&5
14633   echo "$as_me:14633: \$? = $ac_status" >&5
14634   (exit $ac_status); } >/dev/null; then
14635   if test -s conftest.err; then
14636     ac_cpp_err=$ac_cxx_preproc_warn_flag
14637   else
14638     ac_cpp_err=
14639   fi
14640 else
14641   ac_cpp_err=yes
14642 fi
14643 if test -z "$ac_cpp_err"; then
14644   eval "$as_ac_Header=yes"
14645 else
14646   echo "$as_me: failed program was:" >&5
14647   cat conftest.$ac_ext >&5
14648   eval "$as_ac_Header=no"
14649 fi
14650 rm -f conftest.err conftest.$ac_ext
14651 fi
14652 echo "$as_me:14652: result: `eval echo '${'$as_ac_Header'}'`" >&5
14653 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14654 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14655   cat >>confdefs.h <<EOF
14656 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14657 EOF
14658
14659 fi
14660 done
14661
14662 echo "$as_me:14662: checking if we should include stdbool.h" >&5
14663 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14664
14665 if test "${cf_cv_header_stdbool_h+set}" = set; then
14666   echo $ECHO_N "(cached) $ECHO_C" >&6
14667 else
14668
14669         cat >conftest.$ac_ext <<_ACEOF
14670 #line 14670 "configure"
14671 #include "confdefs.h"
14672
14673 int
14674 main ()
14675 {
14676 bool foo = false
14677   ;
14678   return 0;
14679 }
14680 _ACEOF
14681 rm -f conftest.$ac_objext
14682 if { (eval echo "$as_me:14682: \"$ac_compile\"") >&5
14683   (eval $ac_compile) 2>&5
14684   ac_status=$?
14685   echo "$as_me:14685: \$? = $ac_status" >&5
14686   (exit $ac_status); } &&
14687          { ac_try='test -s conftest.$ac_objext'
14688   { (eval echo "$as_me:14688: \"$ac_try\"") >&5
14689   (eval $ac_try) 2>&5
14690   ac_status=$?
14691   echo "$as_me:14691: \$? = $ac_status" >&5
14692   (exit $ac_status); }; }; then
14693   cf_cv_header_stdbool_h=0
14694 else
14695   echo "$as_me: failed program was:" >&5
14696 cat conftest.$ac_ext >&5
14697 cat >conftest.$ac_ext <<_ACEOF
14698 #line 14698 "configure"
14699 #include "confdefs.h"
14700
14701 #ifndef __BEOS__
14702 #include <stdbool.h>
14703 #endif
14704
14705 int
14706 main ()
14707 {
14708 bool foo = false
14709   ;
14710   return 0;
14711 }
14712 _ACEOF
14713 rm -f conftest.$ac_objext
14714 if { (eval echo "$as_me:14714: \"$ac_compile\"") >&5
14715   (eval $ac_compile) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit $ac_status); } &&
14719          { ac_try='test -s conftest.$ac_objext'
14720   { (eval echo "$as_me:14720: \"$ac_try\"") >&5
14721   (eval $ac_try) 2>&5
14722   ac_status=$?
14723   echo "$as_me:14723: \$? = $ac_status" >&5
14724   (exit $ac_status); }; }; then
14725   cf_cv_header_stdbool_h=1
14726 else
14727   echo "$as_me: failed program was:" >&5
14728 cat conftest.$ac_ext >&5
14729 cf_cv_header_stdbool_h=0
14730 fi
14731 rm -f conftest.$ac_objext conftest.$ac_ext
14732 fi
14733 rm -f conftest.$ac_objext conftest.$ac_ext
14734 fi
14735
14736 if test "$cf_cv_header_stdbool_h" = 1
14737 then    echo "$as_me:14737: result: yes" >&5
14738 echo "${ECHO_T}yes" >&6
14739 else    echo "$as_me:14739: result: no" >&5
14740 echo "${ECHO_T}no" >&6
14741 fi
14742
14743 echo "$as_me:14743: checking for builtin bool type" >&5
14744 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14745
14746 if test "${cf_cv_builtin_bool+set}" = set; then
14747   echo $ECHO_N "(cached) $ECHO_C" >&6
14748 else
14749
14750         cat >conftest.$ac_ext <<_ACEOF
14751 #line 14751 "configure"
14752 #include "confdefs.h"
14753
14754 #include <stdio.h>
14755 #include <sys/types.h>
14756
14757 int
14758 main ()
14759 {
14760 bool x = false
14761   ;
14762   return 0;
14763 }
14764 _ACEOF
14765 rm -f conftest.$ac_objext
14766 if { (eval echo "$as_me:14766: \"$ac_compile\"") >&5
14767   (eval $ac_compile) 2>&5
14768   ac_status=$?
14769   echo "$as_me:14769: \$? = $ac_status" >&5
14770   (exit $ac_status); } &&
14771          { ac_try='test -s conftest.$ac_objext'
14772   { (eval echo "$as_me:14772: \"$ac_try\"") >&5
14773   (eval $ac_try) 2>&5
14774   ac_status=$?
14775   echo "$as_me:14775: \$? = $ac_status" >&5
14776   (exit $ac_status); }; }; then
14777   cf_cv_builtin_bool=1
14778 else
14779   echo "$as_me: failed program was:" >&5
14780 cat conftest.$ac_ext >&5
14781 cf_cv_builtin_bool=0
14782 fi
14783 rm -f conftest.$ac_objext conftest.$ac_ext
14784
14785 fi
14786
14787 if test "$cf_cv_builtin_bool" = 1
14788 then    echo "$as_me:14788: result: yes" >&5
14789 echo "${ECHO_T}yes" >&6
14790 else    echo "$as_me:14790: result: no" >&5
14791 echo "${ECHO_T}no" >&6
14792 fi
14793
14794 echo "$as_me:14794: checking for size of bool" >&5
14795 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14796 if test "${cf_cv_type_of_bool+set}" = set; then
14797   echo $ECHO_N "(cached) $ECHO_C" >&6
14798 else
14799
14800         rm -f cf_test.out
14801         if test "$cross_compiling" = yes; then
14802   cf_cv_type_of_bool=unknown
14803 else
14804   cat >conftest.$ac_ext <<_ACEOF
14805 #line 14805 "configure"
14806 #include "confdefs.h"
14807
14808 #include <stdlib.h>
14809 #include <stdio.h>
14810
14811 #if defined(__cplusplus)
14812
14813 #ifdef HAVE_GXX_BUILTIN_H
14814 #include <g++/builtin.h>
14815 #elif HAVE_GPP_BUILTIN_H
14816 #include <gpp/builtin.h>
14817 #elif HAVE_BUILTIN_H
14818 #include <builtin.h>
14819 #endif
14820
14821 #else
14822
14823 #if $cf_cv_header_stdbool_h
14824 #include <stdbool.h>
14825 #endif
14826
14827 #endif
14828
14829 main()
14830 {
14831         FILE *fp = fopen("cf_test.out", "w");
14832         if (fp != 0) {
14833                 bool x = true;
14834                 if ((bool)(-x) >= 0)
14835                         fputs("unsigned ", fp);
14836                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14837                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14838                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14839                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14840                 fclose(fp);
14841         }
14842         ${cf_cv_main_return:-return}(0);
14843 }
14844
14845 _ACEOF
14846 rm -f conftest$ac_exeext
14847 if { (eval echo "$as_me:14847: \"$ac_link\"") >&5
14848   (eval $ac_link) 2>&5
14849   ac_status=$?
14850   echo "$as_me:14850: \$? = $ac_status" >&5
14851   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14852   { (eval echo "$as_me:14852: \"$ac_try\"") >&5
14853   (eval $ac_try) 2>&5
14854   ac_status=$?
14855   echo "$as_me:14855: \$? = $ac_status" >&5
14856   (exit $ac_status); }; }; then
14857   cf_cv_type_of_bool=`cat cf_test.out`
14858                  if test -z "$cf_cv_type_of_bool"; then
14859                    cf_cv_type_of_bool=unknown
14860                  fi
14861 else
14862   echo "$as_me: program exited with status $ac_status" >&5
14863 echo "$as_me: failed program was:" >&5
14864 cat conftest.$ac_ext >&5
14865 cf_cv_type_of_bool=unknown
14866 fi
14867 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14868 fi
14869
14870 fi
14871
14872         rm -f cf_test.out
14873 echo "$as_me:14873: result: $cf_cv_type_of_bool" >&5
14874 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14875 if test "$cf_cv_type_of_bool" = unknown ; then
14876         case .$NCURSES_BOOL in #(vi
14877         .auto|.) NCURSES_BOOL=unsigned;;
14878         esac
14879         { echo "$as_me:14879: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14880 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14881         cf_cv_type_of_bool=$NCURSES_BOOL
14882 fi
14883
14884 echo "$as_me:14884: checking for special defines needed for etip.h" >&5
14885 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14886 cf_save_CXXFLAGS="$CXXFLAGS"
14887 cf_result="none"
14888 for cf_math in "" MATH_H
14889 do
14890 for cf_excp in "" MATH_EXCEPTION
14891 do
14892         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14893         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14894         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14895 cat >conftest.$ac_ext <<_ACEOF
14896 #line 14896 "configure"
14897 #include "confdefs.h"
14898
14899 #include <etip.h.in>
14900
14901 int
14902 main ()
14903 {
14904
14905   ;
14906   return 0;
14907 }
14908 _ACEOF
14909 rm -f conftest.$ac_objext
14910 if { (eval echo "$as_me:14910: \"$ac_compile\"") >&5
14911   (eval $ac_compile) 2>&5
14912   ac_status=$?
14913   echo "$as_me:14913: \$? = $ac_status" >&5
14914   (exit $ac_status); } &&
14915          { ac_try='test -s conftest.$ac_objext'
14916   { (eval echo "$as_me:14916: \"$ac_try\"") >&5
14917   (eval $ac_try) 2>&5
14918   ac_status=$?
14919   echo "$as_me:14919: \$? = $ac_status" >&5
14920   (exit $ac_status); }; }; then
14921
14922         test -n "$cf_math" && cat >>confdefs.h <<EOF
14923 #define ETIP_NEEDS_${cf_math} 1
14924 EOF
14925
14926         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14927 #define ETIP_NEEDS_${cf_excp} 1
14928 EOF
14929
14930         cf_result="$cf_math $cf_excp"
14931         break
14932
14933 else
14934   echo "$as_me: failed program was:" >&5
14935 cat conftest.$ac_ext >&5
14936 fi
14937 rm -f conftest.$ac_objext conftest.$ac_ext
14938 done
14939 done
14940 echo "$as_me:14940: result: $cf_result" >&5
14941 echo "${ECHO_T}$cf_result" >&6
14942 CXXFLAGS="$cf_save_CXXFLAGS"
14943
14944 if test -n "$CXX"; then
14945 echo "$as_me:14945: checking if $CXX accepts parameter initialization" >&5
14946 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14947 if test "${cf_cv_cpp_param_init+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950
14951         ac_ext=cc
14952 ac_cpp='$CXXCPP $CPPFLAGS'
14953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14956 ac_main_return=return
14957
14958         if test "$cross_compiling" = yes; then
14959   cf_cv_cpp_param_init=unknown
14960 else
14961   cat >conftest.$ac_ext <<_ACEOF
14962 #line 14962 "configure"
14963 #include "confdefs.h"
14964
14965 class TEST {
14966 private:
14967         int value;
14968 public:
14969         TEST(int x = 1);
14970         ~TEST();
14971 };
14972
14973 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14974 {
14975         value = x;
14976 }
14977 void main() { }
14978
14979 _ACEOF
14980 rm -f conftest$ac_exeext
14981 if { (eval echo "$as_me:14981: \"$ac_link\"") >&5
14982   (eval $ac_link) 2>&5
14983   ac_status=$?
14984   echo "$as_me:14984: \$? = $ac_status" >&5
14985   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14986   { (eval echo "$as_me:14986: \"$ac_try\"") >&5
14987   (eval $ac_try) 2>&5
14988   ac_status=$?
14989   echo "$as_me:14989: \$? = $ac_status" >&5
14990   (exit $ac_status); }; }; then
14991   cf_cv_cpp_param_init=yes
14992 else
14993   echo "$as_me: program exited with status $ac_status" >&5
14994 echo "$as_me: failed program was:" >&5
14995 cat conftest.$ac_ext >&5
14996 cf_cv_cpp_param_init=no
14997 fi
14998 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14999 fi
15000         ac_ext=cc
15001 ac_cpp='$CXXCPP $CPPFLAGS'
15002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15003 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15005 ac_main_return=return
15006
15007 fi
15008 echo "$as_me:15008: result: $cf_cv_cpp_param_init" >&5
15009 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15010 fi
15011 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15012 #define CPP_HAS_PARAM_INIT 1
15013 EOF
15014
15015 if test -n "$CXX"; then
15016
15017 echo "$as_me:15017: checking if $CXX accepts static_cast" >&5
15018 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15019 if test "${cf_cv_cpp_static_cast+set}" = set; then
15020   echo $ECHO_N "(cached) $ECHO_C" >&6
15021 else
15022
15023         ac_ext=cc
15024 ac_cpp='$CXXCPP $CPPFLAGS'
15025 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15026 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15027 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15028 ac_main_return=return
15029
15030         cat >conftest.$ac_ext <<_ACEOF
15031 #line 15031 "configure"
15032 #include "confdefs.h"
15033
15034 class NCursesPanel
15035 {
15036 public:
15037   NCursesPanel(int nlines,
15038                int ncols,
15039                int begin_y = 0,
15040                int begin_x = 0)
15041   {
15042   }
15043
15044   ~NCursesPanel();
15045 };
15046
15047 template<class T> class NCursesUserPanel : public NCursesPanel
15048 {
15049 public:
15050   NCursesUserPanel (int nlines,
15051                     int ncols,
15052                     int begin_y = 0,
15053                     int begin_x = 0,
15054                     const T* p_UserData = static_cast<T*>(0))
15055     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15056   {
15057   };
15058   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15059   {
15060   };
15061
15062   virtual ~NCursesUserPanel() {};
15063 };
15064
15065 int
15066 main ()
15067 {
15068
15069         const char* p_UserData = static_cast<char*>(0)
15070   ;
15071   return 0;
15072 }
15073 _ACEOF
15074 rm -f conftest.$ac_objext
15075 if { (eval echo "$as_me:15075: \"$ac_compile\"") >&5
15076   (eval $ac_compile) 2>&5
15077   ac_status=$?
15078   echo "$as_me:15078: \$? = $ac_status" >&5
15079   (exit $ac_status); } &&
15080          { ac_try='test -s conftest.$ac_objext'
15081   { (eval echo "$as_me:15081: \"$ac_try\"") >&5
15082   (eval $ac_try) 2>&5
15083   ac_status=$?
15084   echo "$as_me:15084: \$? = $ac_status" >&5
15085   (exit $ac_status); }; }; then
15086   cf_cv_cpp_static_cast=yes
15087 else
15088   echo "$as_me: failed program was:" >&5
15089 cat conftest.$ac_ext >&5
15090 cf_cv_cpp_static_cast=no
15091 fi
15092 rm -f conftest.$ac_objext conftest.$ac_ext
15093
15094         ac_ext=cc
15095 ac_cpp='$CXXCPP $CPPFLAGS'
15096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15099 ac_main_return=return
15100
15101 fi
15102 echo "$as_me:15102: result: $cf_cv_cpp_static_cast" >&5
15103 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15104
15105 fi
15106
15107 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15108 #define CPP_HAS_STATIC_CAST 1
15109 EOF
15110
15111         CXX_AR='$(AR)'
15112         CXX_AR_OPTS='$(AR_OPTS)'
15113         case $cf_cv_system_name in #(vi
15114         irix*) #(vi
15115             if test "$GXX" != yes ; then
15116                 CXX_AR='$(CXX)'
15117                 CXX_AR_OPTS='-ar -o'
15118             fi
15119             ;;
15120         sco3.2v5*) #(vi
15121             CXXLDFLAGS="-u main"
15122             ;;
15123         solaris2*)
15124             if test "$GXX" != yes ; then
15125                 CXX_AR='$(CXX)'
15126                 CXX_AR_OPTS='-xar -o'
15127             fi
15128             ;;
15129         esac
15130
15131 else
15132         cf_cxx_library=no
15133         cf_cv_builtin_bool=1
15134
15135         # Just because we are not configuring against C++ right now does not
15136         # mean that a user will not want to use C++.  Some distributors disable
15137         # the C++ portion of this configuration as a shortcut (or just to avoid
15138         # compiling the demo in the c++ directory).  So we need a reasonable
15139         # default for the 'bool' type.
15140         #
15141         # Caveat: since the storage of the bool type is not standardized, it
15142         # may change.
15143
15144         if test "$NCURSES_BOOL" != auto ; then
15145                 cf_cv_type_of_bool=$NCURSES_BOOL
15146                 cf_cv_header_stdbool_h=0
15147         else
15148                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15149
15150 echo "$as_me:15150: checking for size of bool" >&5
15151 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15152 if test "${cf_cv_type_of_bool+set}" = set; then
15153   echo $ECHO_N "(cached) $ECHO_C" >&6
15154 else
15155
15156         rm -f cf_test.out
15157         if test "$cross_compiling" = yes; then
15158   cf_cv_type_of_bool=unknown
15159 else
15160   cat >conftest.$ac_ext <<_ACEOF
15161 #line 15161 "configure"
15162 #include "confdefs.h"
15163
15164 #include <stdlib.h>
15165 #include <stdio.h>
15166
15167 #if defined(__cplusplus)
15168
15169 #ifdef HAVE_GXX_BUILTIN_H
15170 #include <g++/builtin.h>
15171 #elif HAVE_GPP_BUILTIN_H
15172 #include <gpp/builtin.h>
15173 #elif HAVE_BUILTIN_H
15174 #include <builtin.h>
15175 #endif
15176
15177 #else
15178
15179 #if $cf_cv_header_stdbool_h
15180 #include <stdbool.h>
15181 #endif
15182
15183 #endif
15184
15185 main()
15186 {
15187         FILE *fp = fopen("cf_test.out", "w");
15188         if (fp != 0) {
15189                 bool x = true;
15190                 if ((bool)(-x) >= 0)
15191                         fputs("unsigned ", fp);
15192                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15193                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15194                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15195                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15196                 fclose(fp);
15197         }
15198         ${cf_cv_main_return:-return}(0);
15199 }
15200
15201 _ACEOF
15202 rm -f conftest$ac_exeext
15203 if { (eval echo "$as_me:15203: \"$ac_link\"") >&5
15204   (eval $ac_link) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15208   { (eval echo "$as_me:15208: \"$ac_try\"") >&5
15209   (eval $ac_try) 2>&5
15210   ac_status=$?
15211   echo "$as_me:15211: \$? = $ac_status" >&5
15212   (exit $ac_status); }; }; then
15213   cf_cv_type_of_bool=`cat cf_test.out`
15214                  if test -z "$cf_cv_type_of_bool"; then
15215                    cf_cv_type_of_bool=unknown
15216                  fi
15217 else
15218   echo "$as_me: program exited with status $ac_status" >&5
15219 echo "$as_me: failed program was:" >&5
15220 cat conftest.$ac_ext >&5
15221 cf_cv_type_of_bool=unknown
15222 fi
15223 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15224 fi
15225
15226 fi
15227
15228         rm -f cf_test.out
15229 echo "$as_me:15229: result: $cf_cv_type_of_bool" >&5
15230 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15231 if test "$cf_cv_type_of_bool" = unknown ; then
15232         case .$NCURSES_BOOL in #(vi
15233         .auto|.) NCURSES_BOOL=unsigned;;
15234         esac
15235         { echo "$as_me:15235: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15236 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15237         cf_cv_type_of_bool=$NCURSES_BOOL
15238 fi
15239
15240                 else
15241                         echo "$as_me:15241: checking for fallback type of bool" >&5
15242 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15243                         case "$host_cpu" in #(vi
15244                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15245                         *)      cf_cv_type_of_bool=int  ;;
15246                         esac
15247                         echo "$as_me:15247: result: $cf_cv_type_of_bool" >&5
15248 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15249                 fi
15250         fi
15251 fi
15252
15253 # If the C compiler did not declare bool, and we did not determine that the C++
15254 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15255 # ncurses library use the same type as C++ bool.  Note that this allows one to
15256 # specify the type of bool in a configure-script option and postpone
15257 # integration with the C++ compiler provided that the types are compatible.
15258 USE_CXX_BOOL=1
15259 if test $cf_cv_cc_bool_type = 1
15260 then
15261         # oops: C has a bool.  Unlikely, but C++ could differ.
15262         USE_CXX_BOOL=0
15263 elif test $cf_cv_builtin_bool = 0
15264 then
15265         # C++ has no bool
15266         USE_CXX_BOOL=0
15267 else
15268         # this is the normal case
15269         USE_CXX_BOOL='defined(__cplusplus)'
15270 fi
15271
15272 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15273
15274 if test "$cf_with_ada" != "no" ; then
15275     if test "$with_libtool" != "no"; then
15276         { echo "$as_me:15276: WARNING: libtool does not support Ada - disabling feature" >&5
15277 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15278         cf_with_ada=no
15279     fi
15280 fi
15281
15282 if test "$cf_with_ada" != "no" ; then
15283 cf_ada_make=gnatmake
15284 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15285 set dummy $cf_ada_make; ac_word=$2
15286 echo "$as_me:15286: checking for $ac_word" >&5
15287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15288 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15289   echo $ECHO_N "(cached) $ECHO_C" >&6
15290 else
15291   if test -n "$gnat_exists"; then
15292   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15293 else
15294   ac_save_IFS=$IFS; IFS=$ac_path_separator
15295 ac_dummy="$PATH"
15296 for ac_dir in $ac_dummy; do
15297   IFS=$ac_save_IFS
15298   test -z "$ac_dir" && ac_dir=.
15299   $as_executable_p "$ac_dir/$ac_word" || continue
15300 ac_cv_prog_gnat_exists="yes"
15301 echo "$as_me:15301: found $ac_dir/$ac_word" >&5
15302 break
15303 done
15304
15305   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15306 fi
15307 fi
15308 gnat_exists=$ac_cv_prog_gnat_exists
15309 if test -n "$gnat_exists"; then
15310   echo "$as_me:15310: result: $gnat_exists" >&5
15311 echo "${ECHO_T}$gnat_exists" >&6
15312 else
15313   echo "$as_me:15313: result: no" >&5
15314 echo "${ECHO_T}no" >&6
15315 fi
15316
15317 if test "$ac_cv_prog_gnat_exists" = no; then
15318    cf_ada_make=
15319 else
15320
15321 echo "$as_me:15321: checking for gnat version" >&5
15322 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15323 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15324   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15325 echo "$as_me:15325: result: $cf_gnat_version" >&5
15326 echo "${ECHO_T}$cf_gnat_version" >&6
15327
15328 case $cf_gnat_version in
15329   3.1[1-9]*|3.[2-9]*|[4-9].*)
15330     cf_cv_prog_gnat_correct=yes
15331     ;;
15332   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15333      cf_cv_prog_gnat_correct=no
15334      ;;
15335 esac
15336 case $cf_gnat_version in
15337   3.[1-9]*|[4-9].*)
15338       cf_compile_generics=generics
15339       cf_generic_objects="\${GENOBJS}"
15340       ;;
15341   *)  cf_compile_generics=
15342       cf_generic_objects=
15343       ;;
15344 esac
15345
15346    # Extract the first word of "m4", so it can be a program name with args.
15347 set dummy m4; ac_word=$2
15348 echo "$as_me:15348: checking for $ac_word" >&5
15349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15350 if test "${ac_cv_prog_M4_exists+set}" = set; then
15351   echo $ECHO_N "(cached) $ECHO_C" >&6
15352 else
15353   if test -n "$M4_exists"; then
15354   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15355 else
15356   ac_save_IFS=$IFS; IFS=$ac_path_separator
15357 ac_dummy="$PATH"
15358 for ac_dir in $ac_dummy; do
15359   IFS=$ac_save_IFS
15360   test -z "$ac_dir" && ac_dir=.
15361   $as_executable_p "$ac_dir/$ac_word" || continue
15362 ac_cv_prog_M4_exists="yes"
15363 echo "$as_me:15363: found $ac_dir/$ac_word" >&5
15364 break
15365 done
15366
15367   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15368 fi
15369 fi
15370 M4_exists=$ac_cv_prog_M4_exists
15371 if test -n "$M4_exists"; then
15372   echo "$as_me:15372: result: $M4_exists" >&5
15373 echo "${ECHO_T}$M4_exists" >&6
15374 else
15375   echo "$as_me:15375: result: no" >&5
15376 echo "${ECHO_T}no" >&6
15377 fi
15378
15379    if test "$ac_cv_prog_M4_exists" = no; then
15380       cf_cv_prog_gnat_correct=no
15381       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15382    fi
15383    if test "$cf_cv_prog_gnat_correct" = yes; then
15384       echo "$as_me:15384: checking if GNAT works" >&5
15385 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15386
15387 rm -f conftest*
15388 cat >>conftest.ads <<CF_EOF
15389 procedure conftest;
15390 CF_EOF
15391 cat >>conftest.adb <<CF_EOF
15392 with Text_IO;
15393 with GNAT.OS_Lib;
15394 procedure conftest is
15395 begin
15396    Text_IO.Put ("Hello World");
15397    Text_IO.New_Line;
15398    GNAT.OS_Lib.OS_Exit (0);
15399 end conftest;
15400 CF_EOF
15401 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15402    if ( ./conftest 1>&5 2>&1 ) ; then
15403       cf_cv_prog_gnat_correct=yes
15404    else
15405       cf_cv_prog_gnat_correct=no
15406    fi
15407 else
15408    cf_cv_prog_gnat_correct=no
15409 fi
15410 rm -f conftest*
15411
15412       echo "$as_me:15412: result: $cf_cv_prog_gnat_correct" >&5
15413 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15414    fi
15415 fi
15416 if test "$cf_cv_prog_gnat_correct" = yes; then
15417    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15418
15419    echo "$as_me:15419: checking if GNAT pragma Unreferenced works" >&5
15420 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15421
15422 rm -f conftest*
15423 cat >>conftest.ads <<CF_EOF
15424 procedure conftest;
15425 CF_EOF
15426 cat >>conftest.adb <<CF_EOF
15427 with Text_IO;
15428 with GNAT.OS_Lib;
15429 procedure conftest is
15430    test : Integer;
15431    pragma Unreferenced (test);
15432 begin
15433    test := 1;
15434    Text_IO.Put ("Hello World");
15435    Text_IO.New_Line;
15436    GNAT.OS_Lib.OS_Exit (0);
15437 end conftest;
15438 CF_EOF
15439 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15440       cf_cv_pragma_unreferenced=yes
15441 else
15442    cf_cv_pragma_unreferenced=no
15443 fi
15444 rm -f conftest*
15445
15446    echo "$as_me:15446: result: $cf_cv_pragma_unreferenced" >&5
15447 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15448
15449    # if the pragma is supported, use it (needed in the Trace code).
15450    if test $cf_cv_pragma_unreferenced = yes ; then
15451       PRAGMA_UNREF=TRUE
15452    else
15453       PRAGMA_UNREF=FALSE
15454    fi
15455
15456 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15457 if test "${with_ada_compiler+set}" = set; then
15458   withval="$with_ada_compiler"
15459   cf_ada_compiler=$withval
15460 else
15461   cf_ada_compiler=gnatmake
15462 fi;
15463
15464    cf_ada_package=terminal_interface
15465
15466 # Check whether --with-ada-include or --without-ada-include was given.
15467 if test "${with_ada_include+set}" = set; then
15468   withval="$with_ada_include"
15469
15470 else
15471   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15472 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15473
15474 if test "x$prefix" != xNONE; then
15475   cf_path_syntax="$prefix"
15476 else
15477   cf_path_syntax="$ac_default_prefix"
15478 fi
15479
15480 case ".$withval" in #(vi
15481 .\$\(*\)*|.\'*\'*) #(vi
15482   ;;
15483 ..|./*|.\\*) #(vi
15484   ;;
15485 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15486   ;;
15487 .\${*prefix}*) #(vi
15488   eval withval="$withval"
15489   case ".$withval" in #(vi
15490   .NONE/*)
15491     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15492     ;;
15493   esac
15494   ;; #(vi
15495 .no|.NONE/*)
15496   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15497   ;;
15498 *)
15499   { { echo "$as_me:15499: error: expected a pathname, not \"$withval\"" >&5
15500 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15501    { (exit 1); exit 1; }; }
15502   ;;
15503 esac
15504
15505 fi
15506 ADA_INCLUDE="$withval"
15507
15508 # Check whether --with-ada-objects or --without-ada-objects was given.
15509 if test "${with_ada_objects+set}" = set; then
15510   withval="$with_ada_objects"
15511
15512 else
15513   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15514 fi; if test -n "$prefix/lib/ada/adalib" ; then
15515
15516 if test "x$prefix" != xNONE; then
15517   cf_path_syntax="$prefix"
15518 else
15519   cf_path_syntax="$ac_default_prefix"
15520 fi
15521
15522 case ".$withval" in #(vi
15523 .\$\(*\)*|.\'*\'*) #(vi
15524   ;;
15525 ..|./*|.\\*) #(vi
15526   ;;
15527 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15528   ;;
15529 .\${*prefix}*) #(vi
15530   eval withval="$withval"
15531   case ".$withval" in #(vi
15532   .NONE/*)
15533     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15534     ;;
15535   esac
15536   ;; #(vi
15537 .no|.NONE/*)
15538   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15539   ;;
15540 *)
15541   { { echo "$as_me:15541: error: expected a pathname, not \"$withval\"" >&5
15542 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15543    { (exit 1); exit 1; }; }
15544   ;;
15545 esac
15546
15547 fi
15548 ADA_OBJECTS="$withval"
15549
15550 fi
15551 fi
15552 else
15553    cf_with_ada=no
15554 fi
15555
15556 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15557 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15558 ###
15559 ### ticlib modules may be a separate library, otherwise contained in termlib.
15560 ### termlib modules may be a separate library, otherwise contained in ncurses.
15561 ###
15562 ### The of "+" or " " between the tokens controls the way the script
15563 ### chooses to split module lists into libraries.
15564 ###
15565 ### (see CF_LIB_RULES).
15566 echo "$as_me:15566: checking for library subsets" >&5
15567 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15568 LIB_SUBSETS=
15569
15570 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15571         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15572         if test "$with_ticlib" != no ; then
15573                 LIB_SUBSETS="${LIB_SUBSETS} "
15574         else
15575                 LIB_SUBSETS="${LIB_SUBSETS}+"
15576         fi
15577 fi
15578
15579 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15580 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15581 if test "$with_termlib" != no ; then
15582         LIB_SUBSETS="${LIB_SUBSETS} "
15583 else
15584         LIB_SUBSETS="${LIB_SUBSETS}+"
15585 fi
15586
15587 LIB_SUBSETS="${LIB_SUBSETS}base"
15588 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15589 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15590
15591 echo "$as_me:15591: result: $LIB_SUBSETS" >&5
15592 echo "${ECHO_T}$LIB_SUBSETS" >&6
15593
15594 ### Construct the list of include-directories to be generated
15595
15596 CPPFLAGS="-I. -I../include $CPPFLAGS"
15597 if test "$srcdir" != "."; then
15598         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15599 fi
15600 if test "$GCC" != yes; then
15601         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15602 elif test "$includedir" != "/usr/include"; then
15603         if test "$includedir" = '${prefix}/include' ; then
15604                 if test $prefix != /usr ; then
15605                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15606                 fi
15607         else
15608                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15609         fi
15610 fi
15611
15612 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15613 if test "$srcdir" != "."; then
15614         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15615 fi
15616 if test "$GCC" != yes; then
15617         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15618 elif test "$includedir" != "/usr/include"; then
15619         if test "$includedir" = '${prefix}/include' ; then
15620                 if test $prefix != /usr ; then
15621                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15622                 fi
15623         else
15624                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15625         fi
15626 fi
15627
15628 ### Build up pieces for makefile rules
15629 echo "$as_me:15629: checking default library suffix" >&5
15630 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15631
15632         case $DFT_LWR_MODEL in
15633         libtool) DFT_ARG_SUFFIX=''   ;;
15634         normal)  DFT_ARG_SUFFIX=''   ;;
15635         debug)   DFT_ARG_SUFFIX='_g' ;;
15636         profile) DFT_ARG_SUFFIX='_p' ;;
15637         shared)  DFT_ARG_SUFFIX=''   ;;
15638         esac
15639         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15640 echo "$as_me:15640: result: $DFT_ARG_SUFFIX" >&5
15641 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15642
15643 echo "$as_me:15643: checking default library-dependency suffix" >&5
15644 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15645
15646         case $DFT_LWR_MODEL in
15647         libtool) DFT_DEP_SUFFIX='.la'  ;;
15648         normal)  DFT_DEP_SUFFIX='.a'   ;;
15649         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15650         profile) DFT_DEP_SUFFIX='_p.a' ;;
15651         shared)
15652                 case $cf_cv_system_name in
15653                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15654                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15655                 hpux*)
15656                         case $target in
15657                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15658                         *)      DFT_DEP_SUFFIX='.sl' ;;
15659                         esac
15660                         ;;
15661                 *)      DFT_DEP_SUFFIX='.so'  ;;
15662                 esac
15663         esac
15664         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15665 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15666 if test $DFT_LWR_MODEL = shared ; then
15667         case $cf_cv_system_name in #(vi
15668         cygwin*)
15669                 DFT_DEP_SUFFIX=".dll.a"
15670                 DFT_LIB_SUFFIX=".dll"
15671                 ;;
15672         esac
15673 fi
15674 echo "$as_me:15674: result: $DFT_DEP_SUFFIX" >&5
15675 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15676
15677 echo "$as_me:15677: checking default object directory" >&5
15678 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15679
15680         case $DFT_LWR_MODEL in
15681         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15682         normal)  DFT_OBJ_SUBDIR='objects' ;;
15683         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15684         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15685         shared)
15686                 case $cf_cv_system_name in #(vi
15687                 cygwin) #(vi
15688                         DFT_OBJ_SUBDIR='objects' ;;
15689                 *)
15690                         DFT_OBJ_SUBDIR='obj_s' ;;
15691                 esac
15692         esac
15693 echo "$as_me:15693: result: $DFT_OBJ_SUBDIR" >&5
15694 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15695
15696 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15697 if test "$cf_with_cxx" = yes ; then
15698 echo "$as_me:15698: checking c++ library-dependency suffix" >&5
15699 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15700 if test "$with_libtool" != "no"; then
15701         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15702 else
15703
15704         case normal in
15705         libtool) CXX_LIB_SUFFIX='.la'  ;;
15706         normal)  CXX_LIB_SUFFIX='.a'   ;;
15707         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15708         profile) CXX_LIB_SUFFIX='_p.a' ;;
15709         shared)
15710                 case $cf_cv_system_name in
15711                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15712                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15713                 hpux*)
15714                         case $target in
15715                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15716                         *)      CXX_LIB_SUFFIX='.sl' ;;
15717                         esac
15718                         ;;
15719                 *)      CXX_LIB_SUFFIX='.so'  ;;
15720                 esac
15721         esac
15722         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15723 fi
15724 echo "$as_me:15724: result: $CXX_LIB_SUFFIX" >&5
15725 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15726
15727 fi
15728
15729 # do not want -ldl in build except as needed for -lncurses dependency
15730 if test "$with_dlsym" = yes ; then
15731 if test $DFT_LWR_MODEL = shared || \
15732    test $DFT_LWR_MODEL = libtool ; then
15733
15734 # remove dl library from $LIBS
15735 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15736
15737 fi
15738 fi
15739 ### Set up low-level terminfo dependencies for makefiles.
15740
15741 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15742 # do not need libdl
15743 TICS_LIST=
15744 if test "$with_dlsym" = yes ; then
15745
15746 # remove dl library from $SHLIB_LIST
15747 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15748
15749 fi
15750
15751 if test "$with_ticlib" != no ; then
15752
15753         if test "$with_ticlib" != yes ; then
15754                 TICS_NAME=$with_ticlib
15755                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15756                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15757                 TICS_LIB_SUFFIX="${with_ticlib}"
15758         else
15759                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15760                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15761                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15762         fi
15763         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15764 else
15765         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15766 fi
15767
15768 if test "$with_termlib" != no ; then
15769
15770         if test "$with_termlib" != yes ; then
15771                 TINFO_NAME=$with_termlib
15772                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15773                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15774                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15775                 TINFO_LIB_SUFFIX="${with_termlib}"
15776         else
15777                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15778                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15779                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15780                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15781         fi
15782
15783         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15784         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15785         if test "$DFT_LWR_MODEL" = "libtool"; then
15786                 TEST_ARGS="${TEST_DEPS}"
15787                 TEST_ARG2="${TEST_DEP2}"
15788                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15789         else
15790                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15791                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15792                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15793                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15794                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15795         fi
15796 else
15797         # the next lines are needed for linking libtic over libncurses
15798         TINFO_NAME=${LIB_NAME}
15799         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15800         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15801         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15802
15803         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15804 fi
15805
15806 if test "$DFT_LWR_MODEL" = shared ; then
15807         case $cf_cv_system_name in #(vi
15808         cygwin*)
15809                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15810                 TINFO_SUFFIX=.dll
15811                 ;;
15812         esac
15813 fi
15814
15815 if test "$with_dlsym" = yes ; then
15816
15817 # remove dl library from $TICS_LIST
15818 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15819
15820 fi
15821
15822 if test "$DFT_LWR_MODEL" = "libtool"; then
15823     OBJEXT=lo
15824 fi
15825
15826 # needed for Ada95
15827 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15828
15829 case $DFT_LWR_MODEL in
15830 normal|debug|profile)
15831
15832 if test "$GCC" = yes ; then
15833         LDFLAGS_STATIC=-static
15834         LDFLAGS_SHARED=-dynamic
15835 else
15836         case $cf_cv_system_name in #(
15837         aix[45]*)       #( from ld manpage
15838                 LDFLAGS_STATIC=-bstatic
15839                 LDFLAGS_SHARED=-bdynamic
15840                 ;;
15841         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15842                 # We could also use just "archive" and "shared".
15843                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15844                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15845                 ;;
15846         irix*)          #( from ld manpage IRIX64
15847                 LDFLAGS_STATIC=-Bstatic
15848                 LDFLAGS_SHARED=-Bdynamic
15849                 ;;
15850         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15851                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15852                 LDFLAGS_STATIC=-noso
15853                 LDFLAGS_SHARED=-so_archive
15854                 ;;
15855         solaris2*)
15856                 LDFLAGS_STATIC=-Bstatic
15857                 LDFLAGS_SHARED=-Bdynamic
15858                 ;;
15859         esac
15860 fi
15861
15862         ;;
15863 esac
15864
15865 echo "$as_me:15865: checking where we will install curses.h" >&5
15866 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15867 test "$with_overwrite" = no && \
15868 test "x$includedir" = 'x${prefix}/include' && \
15869         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15870 echo "$as_me:15870: result: $includedir" >&5
15871 echo "${ECHO_T}$includedir" >&6
15872
15873 ### Resolve a conflict between normal and wide-curses by forcing applications
15874 ### that will need libutf8 to add it to their configure script.
15875 if test "$with_overwrite" != no ; then
15876 if test "$NCURSES_LIBUTF8" = 1 ; then
15877         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15878         { echo "$as_me:15878: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15879 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15880 fi
15881 fi
15882
15883 # used to separate tack out of the tree
15884 NCURSES_TREE=
15885
15886 ### predefined stuff for the test programs
15887 cat >>confdefs.h <<\EOF
15888 #define HAVE_SLK_COLOR 1
15889 EOF
15890
15891 ### Construct the list of subdirectories for which we'll customize makefiles
15892 ### with the appropriate compile-rules.
15893
15894 echo "$as_me:15894: checking for src modules" >&5
15895 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15896
15897 # dependencies and linker-arguments for test-programs
15898 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15899 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15900 if test "$DFT_LWR_MODEL" = "libtool"; then
15901         TEST_ARGS="${TEST_DEPS}"
15902         TEST_ARG2="${TEST_DEP2}"
15903 else
15904         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15905         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15906 fi
15907
15908 cf_cv_src_modules=
15909 for cf_dir in $modules_to_build
15910 do
15911         if test -f $srcdir/$cf_dir/modules; then
15912
15913                 # We may/may not have tack in the distribution, though the
15914                 # makefile is.
15915                 if test $cf_dir = tack ; then
15916                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15917                                 continue
15918                         fi
15919                 fi
15920
15921                 if test -z "$cf_cv_src_modules"; then
15922                         cf_cv_src_modules=$cf_dir
15923                 else
15924                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15925                 fi
15926
15927                 # Make the ncurses_cfg.h file record the library interface files as
15928                 # well.  These are header files that are the same name as their
15929                 # directory.  Ncurses is the only library that does not follow
15930                 # that pattern.
15931                 if test $cf_dir = tack ; then
15932                         continue
15933                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15934
15935 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15936
15937                         cat >>confdefs.h <<EOF
15938 #define HAVE_${cf_have_include}_H 1
15939 EOF
15940
15941                         cat >>confdefs.h <<EOF
15942 #define HAVE_LIB${cf_have_include} 1
15943 EOF
15944
15945                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15946                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15947                         if test "$DFT_LWR_MODEL" = "libtool"; then
15948                                 TEST_ARGS="${TEST_DEPS}"
15949                                 TEST_ARG2="${TEST_DEP2}"
15950                         else
15951                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15952                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15953                         fi
15954                 fi
15955         fi
15956 done
15957 echo "$as_me:15957: result: $cf_cv_src_modules" >&5
15958 echo "${ECHO_T}$cf_cv_src_modules" >&6
15959
15960 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15961 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15962
15963 SRC_SUBDIRS="man include"
15964 for cf_dir in $cf_cv_src_modules
15965 do
15966         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15967 done
15968 SRC_SUBDIRS="$SRC_SUBDIRS test"
15969 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15970 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15971
15972 ADA_SUBDIRS=
15973 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15974    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15975    ADA_SUBDIRS="gen src samples"
15976 fi
15977
15978 SUB_MAKEFILES=
15979 for cf_dir in $SRC_SUBDIRS
15980 do
15981         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15982 done
15983
15984 if test -n "$ADA_SUBDIRS"; then
15985    for cf_dir in $ADA_SUBDIRS
15986    do
15987       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15988    done
15989
15990 fi
15991
15992 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15993    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15994 fi
15995
15996 DIRS_TO_MAKE="lib"
15997 for cf_item in $cf_list_models
15998 do
15999
16000         case $cf_item in
16001         libtool) cf_subdir='obj_lo'  ;;
16002         normal)  cf_subdir='objects' ;;
16003         debug)   cf_subdir='obj_g' ;;
16004         profile) cf_subdir='obj_p' ;;
16005         shared)
16006                 case $cf_cv_system_name in #(vi
16007                 cygwin) #(vi
16008                         cf_subdir='objects' ;;
16009                 *)
16010                         cf_subdir='obj_s' ;;
16011                 esac
16012         esac
16013
16014         for cf_item2 in $DIRS_TO_MAKE
16015         do
16016                 test $cf_item2 = $cf_subdir && break
16017         done
16018         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16019 done
16020 for cf_dir in $DIRS_TO_MAKE
16021 do
16022         test ! -d $cf_dir && mkdir $cf_dir
16023 done
16024
16025 cat >>confdefs.h <<EOF
16026 #define NCURSES_PATHSEP '$PATHSEP'
16027 EOF
16028
16029 cat >>confdefs.h <<EOF
16030 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16031 EOF
16032
16033 ### Now that we're done running tests, add the compiler-warnings, if any
16034
16035 cf_fix_cppflags=no
16036 cf_new_cflags=
16037 cf_new_cppflags=
16038 cf_new_extra_cppflags=
16039
16040 for cf_add_cflags in $EXTRA_CFLAGS
16041 do
16042 case $cf_fix_cppflags in
16043 no)
16044         case $cf_add_cflags in #(vi
16045         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16046                 case $cf_add_cflags in
16047                 -D*)
16048                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16049
16050                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16051                         && test -z "${cf_tst_cflags}" \
16052                         && cf_fix_cppflags=yes
16053
16054                         if test $cf_fix_cppflags = yes ; then
16055                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16056                                 continue
16057                         elif test "${cf_tst_cflags}" = "\"'" ; then
16058                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16059                                 continue
16060                         fi
16061                         ;;
16062                 esac
16063                 case "$CPPFLAGS" in
16064                 *$cf_add_cflags) #(vi
16065                         ;;
16066                 *) #(vi
16067                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16068                         ;;
16069                 esac
16070                 ;;
16071         *)
16072                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16073                 ;;
16074         esac
16075         ;;
16076 yes)
16077         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16078
16079         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16080
16081         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16082         && test -z "${cf_tst_cflags}" \
16083         && cf_fix_cppflags=no
16084         ;;
16085 esac
16086 done
16087
16088 if test -n "$cf_new_cflags" ; then
16089
16090         CFLAGS="$CFLAGS $cf_new_cflags"
16091 fi
16092
16093 if test -n "$cf_new_cppflags" ; then
16094
16095         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16096 fi
16097
16098 if test -n "$cf_new_extra_cppflags" ; then
16099
16100         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16101 fi
16102
16103 ### If we're building with rpath, try to link non-standard libs that way too.
16104 if test "$DFT_LWR_MODEL" = "shared"; then
16105
16106 echo "$as_me:16106: checking for updated LDFLAGS" >&5
16107 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16108 if test -n "$LDFLAGS" ; then
16109 echo "$as_me:16109: result: maybe" >&5
16110 echo "${ECHO_T}maybe" >&6
16111 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16112
16113 echo "${as_me-configure}:16113: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16114
16115 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16116
16117 echo "${as_me-configure}:16117: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16118
16119 case "$EXTRA_LDFLAGS" in #(vi
16120 -Wl,-rpath,*) #(vi
16121     cf_rpath_hack="-Wl,-rpath,"
16122     ;;
16123 -R\ *)
16124     cf_rpath_hack="-R "
16125     ;;
16126 -R*)
16127     cf_rpath_hack="-R"
16128     ;;
16129 *)
16130     cf_rpath_hack=
16131     ;;
16132 esac
16133 if test -n "$cf_rpath_hack" ; then
16134     cf_rpath_dst=
16135     for cf_rpath_src in $LDFLAGS
16136     do
16137         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16138
16139 echo "${as_me-configure}:16139: testing Filtering $cf_rpath_src ..." 1>&5
16140
16141         case $cf_rpath_src in #(vi
16142         -L*) #(vi
16143             if test "$cf_rpath_hack" = "-R " ; then
16144                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16145             else
16146                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16147             fi
16148             test -n "$verbose" && echo "        ...Filter $cf_rpath_tmp" 1>&6
16149
16150 echo "${as_me-configure}:16150: testing ...Filter $cf_rpath_tmp ..." 1>&5
16151
16152             EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16153             ;;
16154         *)
16155             cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16156             ;;
16157         esac
16158     done
16159     LDFLAGS=$cf_rpath_dst
16160     test -n "$verbose" && echo "        ...checked LDFLAGS $LDFLAGS" 1>&6
16161
16162 echo "${as_me-configure}:16162: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16163
16164     test -n "$verbose" && echo "        ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16165
16166 echo "${as_me-configure}:16166: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16167
16168 fi
16169 else
16170 echo "$as_me:16170: result: no" >&5
16171 echo "${ECHO_T}no" >&6
16172 fi
16173
16174 fi
16175
16176 ### Define substitutions for header files to avoid name-pollution
16177
16178 if test "$cf_cv_have_tcgetattr" = yes ; then
16179         HAVE_TCGETATTR=1
16180 else
16181         HAVE_TCGETATTR=0
16182 fi
16183
16184 if test "$ac_cv_header_termio_h" = yes ; then
16185         HAVE_TERMIO_H=1
16186 else
16187         HAVE_TERMIO_H=0
16188 fi
16189
16190 if test "$ac_cv_header_termios_h" = yes ; then
16191         HAVE_TERMIOS_H=1
16192 else
16193         HAVE_TERMIOS_H=0
16194 fi
16195
16196 ################################################################################
16197 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16198 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16199 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"
16200 ac_config_commands="$ac_config_commands default"
16201 cat >confcache <<\_ACEOF
16202 # This file is a shell script that caches the results of configure
16203 # tests run on this system so they can be shared between configure
16204 # scripts and configure runs, see configure's option --config-cache.
16205 # It is not useful on other systems.  If it contains results you don't
16206 # want to keep, you may remove or edit it.
16207 #
16208 # config.status only pays attention to the cache file if you give it
16209 # the --recheck option to rerun configure.
16210 #
16211 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16212 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16213 # following values.
16214
16215 _ACEOF
16216
16217 # The following way of writing the cache mishandles newlines in values,
16218 # but we know of no workaround that is simple, portable, and efficient.
16219 # So, don't put newlines in cache variables' values.
16220 # Ultrix sh set writes to stderr and can't be redirected directly,
16221 # and sets the high bit in the cache file unless we assign to the vars.
16222 {
16223   (set) 2>&1 |
16224     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16225     *ac_space=\ *)
16226       # `set' does not quote correctly, so add quotes (double-quote
16227       # substitution turns \\\\ into \\, and sed turns \\ into \).
16228       sed -n \
16229         "s/'/'\\\\''/g;
16230           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16231       ;;
16232     *)
16233       # `set' quotes correctly as required by POSIX, so do not add quotes.
16234       sed -n \
16235         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16236       ;;
16237     esac;
16238 } |
16239   sed '
16240      t clear
16241      : clear
16242      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16243      t end
16244      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16245      : end' >>confcache
16246 if cmp -s $cache_file confcache; then :; else
16247   if test -w $cache_file; then
16248     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16249     cat confcache >$cache_file
16250   else
16251     echo "not updating unwritable cache $cache_file"
16252   fi
16253 fi
16254 rm -f confcache
16255
16256 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16257 # Let make expand exec_prefix.
16258 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16259
16260 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16261 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16262 # trailing colons and then remove the whole line if VPATH becomes empty
16263 # (actually we leave an empty line to preserve line numbers).
16264 if test "x$srcdir" = x.; then
16265   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16266 s/:*\$(srcdir):*/:/;
16267 s/:*\${srcdir}:*/:/;
16268 s/:*@srcdir@:*/:/;
16269 s/^\([^=]*=[    ]*\):*/\1/;
16270 s/:*$//;
16271 s/^[^=]*=[      ]*$//;
16272 }'
16273 fi
16274
16275 DEFS=-DHAVE_CONFIG_H
16276
16277 : ${CONFIG_STATUS=./config.status}
16278 ac_clean_files_save=$ac_clean_files
16279 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16280 { echo "$as_me:16280: creating $CONFIG_STATUS" >&5
16281 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16282 cat >$CONFIG_STATUS <<_ACEOF
16283 #! $SHELL
16284 # Generated automatically by configure.
16285 # Run this file to recreate the current configuration.
16286 # Compiler output produced by configure, useful for debugging
16287 # configure, is in config.log if it exists.
16288
16289 debug=false
16290 SHELL=\${CONFIG_SHELL-$SHELL}
16291 ac_cs_invocation="\$0 \$@"
16292
16293 _ACEOF
16294
16295 cat >>$CONFIG_STATUS <<\_ACEOF
16296 # Be Bourne compatible
16297 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16298   emulate sh
16299   NULLCMD=:
16300 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16301   set -o posix
16302 fi
16303
16304 # Name of the executable.
16305 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16306
16307 if expr a : '\(a\)' >/dev/null 2>&1; then
16308   as_expr=expr
16309 else
16310   as_expr=false
16311 fi
16312
16313 rm -f conf$$ conf$$.exe conf$$.file
16314 echo >conf$$.file
16315 if ln -s conf$$.file conf$$ 2>/dev/null; then
16316   # We could just check for DJGPP; but this test a) works b) is more generic
16317   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16318   if test -f conf$$.exe; then
16319     # Don't use ln at all; we don't have any links
16320     as_ln_s='cp -p'
16321   else
16322     as_ln_s='ln -s'
16323   fi
16324 elif ln conf$$.file conf$$ 2>/dev/null; then
16325   as_ln_s=ln
16326 else
16327   as_ln_s='cp -p'
16328 fi
16329 rm -f conf$$ conf$$.exe conf$$.file
16330
16331 as_executable_p="test -f"
16332
16333 # Support unset when possible.
16334 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16335   as_unset=unset
16336 else
16337   as_unset=false
16338 fi
16339
16340 # NLS nuisances.
16341 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16342 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16343 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16344 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16345 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16346 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16347 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16348 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16349
16350 # IFS
16351 # We need space, tab and new line, in precisely that order.
16352 as_nl='
16353 '
16354 IFS="   $as_nl"
16355
16356 # CDPATH.
16357 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16358
16359 exec 6>&1
16360
16361 _ACEOF
16362
16363 # Files that config.status was made for.
16364 if test -n "$ac_config_files"; then
16365   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16366 fi
16367
16368 if test -n "$ac_config_headers"; then
16369   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16370 fi
16371
16372 if test -n "$ac_config_links"; then
16373   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16374 fi
16375
16376 if test -n "$ac_config_commands"; then
16377   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16378 fi
16379
16380 cat >>$CONFIG_STATUS <<\EOF
16381
16382 ac_cs_usage="\
16383 \`$as_me' instantiates files from templates according to the
16384 current configuration.
16385
16386 Usage: $0 [OPTIONS] [FILE]...
16387
16388   -h, --help       print this help, then exit
16389   -V, --version    print version number, then exit
16390   -d, --debug      don't remove temporary files
16391       --recheck    update $as_me by reconfiguring in the same conditions
16392   --file=FILE[:TEMPLATE]
16393                    instantiate the configuration file FILE
16394   --header=FILE[:TEMPLATE]
16395                    instantiate the configuration header FILE
16396
16397 Configuration files:
16398 $config_files
16399
16400 Configuration headers:
16401 $config_headers
16402
16403 Configuration commands:
16404 $config_commands
16405
16406 Report bugs to <bug-autoconf@gnu.org>."
16407 EOF
16408
16409 cat >>$CONFIG_STATUS <<EOF
16410 ac_cs_version="\\
16411 config.status
16412 configured by $0, generated by GNU Autoconf 2.52.20080325,
16413   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16414
16415 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16416 Free Software Foundation, Inc.
16417 This config.status script is free software; the Free Software Foundation
16418 gives unlimited permission to copy, distribute and modify it."
16419 srcdir=$srcdir
16420 INSTALL="$INSTALL"
16421 EOF
16422
16423 cat >>$CONFIG_STATUS <<\EOF
16424 # If no file are specified by the user, then we need to provide default
16425 # value.  By we need to know if files were specified by the user.
16426 ac_need_defaults=:
16427 while test $# != 0
16428 do
16429   case $1 in
16430   --*=*)
16431     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16432     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16433     shift
16434     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16435     shift
16436     ;;
16437   -*);;
16438   *) # This is not an option, so the user has probably given explicit
16439      # arguments.
16440      ac_need_defaults=false;;
16441   esac
16442
16443   case $1 in
16444   # Handling of the options.
16445 EOF
16446 cat >>$CONFIG_STATUS <<EOF
16447   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16448     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16449     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16450 EOF
16451 cat >>$CONFIG_STATUS <<\EOF
16452   --version | --vers* | -V )
16453     echo "$ac_cs_version"; exit 0 ;;
16454   --he | --h)
16455     # Conflict between --help and --header
16456     { { echo "$as_me:16456: error: ambiguous option: $1
16457 Try \`$0 --help' for more information." >&5
16458 echo "$as_me: error: ambiguous option: $1
16459 Try \`$0 --help' for more information." >&2;}
16460    { (exit 1); exit 1; }; };;
16461   --help | --hel | -h )
16462     echo "$ac_cs_usage"; exit 0 ;;
16463   --debug | --d* | -d )
16464     debug=: ;;
16465   --file | --fil | --fi | --f )
16466     shift
16467     CONFIG_FILES="$CONFIG_FILES $1"
16468     ac_need_defaults=false;;
16469   --header | --heade | --head | --hea )
16470     shift
16471     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16472     ac_need_defaults=false;;
16473
16474   # This is an error.
16475   -*) { { echo "$as_me:16475: error: unrecognized option: $1
16476 Try \`$0 --help' for more information." >&5
16477 echo "$as_me: error: unrecognized option: $1
16478 Try \`$0 --help' for more information." >&2;}
16479    { (exit 1); exit 1; }; } ;;
16480
16481   *) ac_config_targets="$ac_config_targets $1" ;;
16482
16483   esac
16484   shift
16485 done
16486
16487 exec 5>>config.log
16488 cat >&5 << _ACEOF
16489
16490 ## ----------------------- ##
16491 ## Running config.status.  ##
16492 ## ----------------------- ##
16493
16494 This file was extended by $as_me 2.52.20080325, executed with
16495   CONFIG_FILES    = $CONFIG_FILES
16496   CONFIG_HEADERS  = $CONFIG_HEADERS
16497   CONFIG_LINKS    = $CONFIG_LINKS
16498   CONFIG_COMMANDS = $CONFIG_COMMANDS
16499   > $ac_cs_invocation
16500 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16501
16502 _ACEOF
16503 EOF
16504
16505 cat >>$CONFIG_STATUS <<EOF
16506 #
16507 # INIT-COMMANDS section.
16508 #
16509
16510 ### Special initialization commands, used to pass information from the
16511 ### configuration-run into config.status
16512
16513 AWK="$AWK"
16514 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16515 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16516 ECHO_LINK="$ECHO_LINK"
16517 LDCONFIG="$LDCONFIG"
16518 LIB_NAME="$LIB_NAME"
16519 LIB_SUBSETS="$LIB_SUBSETS"
16520 LIB_SUFFIX="$LIB_SUFFIX"
16521 LIB_TRACING="$LIB_TRACING"
16522 MAKE_TERMINFO="$MAKE_TERMINFO"
16523 NCURSES_MAJOR="$NCURSES_MAJOR"
16524 NCURSES_MINOR="$NCURSES_MINOR"
16525 NCURSES_OSPEED="$NCURSES_OSPEED"
16526 NCURSES_PATCH="$NCURSES_PATCH"
16527 SRC_SUBDIRS="$SRC_SUBDIRS"
16528 TERMINFO="$TERMINFO"
16529 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16530 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16531 TINFO_NAME="$TINFO_NAME"
16532 TINFO_SUFFIX="$TINFO_SUFFIX"
16533 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16534 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16535 TICS_NAME="$TICS_NAME"
16536 WITH_CURSES_H="$with_curses_h"
16537 WITH_ECHO="$with_echo"
16538 WITH_OVERWRITE="$with_overwrite"
16539 cf_LIST_MODELS="$cf_list_models"
16540 cf_cv_abi_version="$cf_cv_abi_version"
16541 cf_cv_do_relink="$cf_cv_do_relink"
16542 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16543 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16544 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16545 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16546 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16547 cf_cv_rel_version="$cf_cv_rel_version"
16548 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16549 cf_cv_shlib_version="$cf_cv_shlib_version"
16550 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16551 cf_cv_system_name="$cf_cv_system_name"
16552 cf_with_cxx_binding="$cf_with_cxx_binding"
16553 host="$host"
16554 target="$target"
16555
16556 EOF
16557
16558 cat >>$CONFIG_STATUS <<\EOF
16559 for ac_config_target in $ac_config_targets
16560 do
16561   case "$ac_config_target" in
16562   # Handling of arguments.
16563   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16564   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16565   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16566   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16567   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16568   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16569   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16570   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16571   *) { { echo "$as_me:16571: error: invalid argument: $ac_config_target" >&5
16572 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16573    { (exit 1); exit 1; }; };;
16574   esac
16575 done
16576
16577 # If the user did not use the arguments to specify the items to instantiate,
16578 # then the envvar interface is used.  Set only those that are not.
16579 # We use the long form for the default assignment because of an extremely
16580 # bizarre bug on SunOS 4.1.3.
16581 if $ac_need_defaults; then
16582   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16583   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16584   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16585 fi
16586
16587 # Create a temporary directory, and hook for its removal unless debugging.
16588 $debug ||
16589 {
16590   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16591   trap '{ (exit 1); exit 1; }' 1 2 13 15
16592 }
16593
16594 # Create a (secure) tmp directory for tmp files.
16595 : ${TMPDIR=/tmp}
16596 {
16597   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16598   test -n "$tmp" && test -d "$tmp"
16599 }  ||
16600 {
16601   tmp=$TMPDIR/cs$$-$RANDOM
16602   (umask 077 && mkdir $tmp)
16603 } ||
16604 {
16605    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16606    { (exit 1); exit 1; }
16607 }
16608
16609 EOF
16610
16611 cat >>$CONFIG_STATUS <<EOF
16612
16613 #
16614 # CONFIG_FILES section.
16615 #
16616
16617 # No need to generate the scripts if there are no CONFIG_FILES.
16618 # This happens for instance when ./config.status config.h
16619 if test -n "\$CONFIG_FILES"; then
16620   # Protect against being on the right side of a sed subst in config.status.
16621   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16622    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16623 s,@SHELL@,$SHELL,;t t
16624 s,@exec_prefix@,$exec_prefix,;t t
16625 s,@prefix@,$prefix,;t t
16626 s,@program_transform_name@,$program_transform_name,;t t
16627 s,@bindir@,$bindir,;t t
16628 s,@sbindir@,$sbindir,;t t
16629 s,@libexecdir@,$libexecdir,;t t
16630 s,@datadir@,$datadir,;t t
16631 s,@sysconfdir@,$sysconfdir,;t t
16632 s,@sharedstatedir@,$sharedstatedir,;t t
16633 s,@localstatedir@,$localstatedir,;t t
16634 s,@libdir@,$libdir,;t t
16635 s,@includedir@,$includedir,;t t
16636 s,@oldincludedir@,$oldincludedir,;t t
16637 s,@infodir@,$infodir,;t t
16638 s,@mandir@,$mandir,;t t
16639 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16640 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16641 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16642 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16643 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16644 s,@build_alias@,$build_alias,;t t
16645 s,@host_alias@,$host_alias,;t t
16646 s,@target_alias@,$target_alias,;t t
16647 s,@ECHO_C@,$ECHO_C,;t t
16648 s,@ECHO_N@,$ECHO_N,;t t
16649 s,@ECHO_T@,$ECHO_T,;t t
16650 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16651 s,@DEFS@,$DEFS,;t t
16652 s,@LIBS@,$LIBS,;t t
16653 s,@top_builddir@,$top_builddir,;t t
16654 s,@EGREP@,$EGREP,;t t
16655 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16656 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16657 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16658 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16659 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16660 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16661 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16662 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16663 s,@build@,$build,;t t
16664 s,@build_cpu@,$build_cpu,;t t
16665 s,@build_vendor@,$build_vendor,;t t
16666 s,@build_os@,$build_os,;t t
16667 s,@host@,$host,;t t
16668 s,@host_cpu@,$host_cpu,;t t
16669 s,@host_vendor@,$host_vendor,;t t
16670 s,@host_os@,$host_os,;t t
16671 s,@target@,$target,;t t
16672 s,@target_cpu@,$target_cpu,;t t
16673 s,@target_vendor@,$target_vendor,;t t
16674 s,@target_os@,$target_os,;t t
16675 s,@CC@,$CC,;t t
16676 s,@CFLAGS@,$CFLAGS,;t t
16677 s,@LDFLAGS@,$LDFLAGS,;t t
16678 s,@CPPFLAGS@,$CPPFLAGS,;t t
16679 s,@ac_ct_CC@,$ac_ct_CC,;t t
16680 s,@EXEEXT@,$EXEEXT,;t t
16681 s,@OBJEXT@,$OBJEXT,;t t
16682 s,@CPP@,$CPP,;t t
16683 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16684 s,@PROG_EXT@,$PROG_EXT,;t t
16685 s,@LDCONFIG@,$LDCONFIG,;t t
16686 s,@CXX@,$CXX,;t t
16687 s,@CXXFLAGS@,$CXXFLAGS,;t t
16688 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16689 s,@AWK@,$AWK,;t t
16690 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16691 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16692 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16693 s,@LINT@,$LINT,;t t
16694 s,@LINT_OPTS@,$LINT_OPTS,;t t
16695 s,@LN_S@,$LN_S,;t t
16696 s,@SET_MAKE@,$SET_MAKE,;t t
16697 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16698 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16699 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16700 s,@RANLIB@,$RANLIB,;t t
16701 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16702 s,@LD@,$LD,;t t
16703 s,@ac_ct_LD@,$ac_ct_LD,;t t
16704 s,@AR@,$AR,;t t
16705 s,@ac_ct_AR@,$ac_ct_AR,;t t
16706 s,@AR_OPTS@,$AR_OPTS,;t t
16707 s,@DESTDIR@,$DESTDIR,;t t
16708 s,@BUILD_CC@,$BUILD_CC,;t t
16709 s,@BUILD_CPP@,$BUILD_CPP,;t t
16710 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16711 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16712 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16713 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16714 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16715 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16716 s,@cf_list_models@,$cf_list_models,;t t
16717 s,@LIBTOOL@,$LIBTOOL,;t t
16718 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16719 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16720 s,@LIB_CREATE@,$LIB_CREATE,;t t
16721 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16722 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16723 s,@LIB_PREP@,$LIB_PREP,;t t
16724 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16725 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16726 s,@LIB_LINK@,$LIB_LINK,;t t
16727 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16728 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16729 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16730 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16731 s,@TICS_NAME@,$TICS_NAME,;t t
16732 s,@TINFO_NAME@,$TINFO_NAME,;t t
16733 s,@LIB_NAME@,$LIB_NAME,;t t
16734 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16735 s,@CC_G_OPT@,$CC_G_OPT,;t t
16736 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16737 s,@LD_MODEL@,$LD_MODEL,;t t
16738 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16739 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16740 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16741 s,@LINK_PROGS@,$LINK_PROGS,;t t
16742 s,@LINK_TESTS@,$LINK_TESTS,;t t
16743 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16744 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16745 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16746 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16747 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16748 s,@PATHSEP@,$PATHSEP,;t t
16749 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16750 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16751 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16752 s,@TERMINFO@,$TERMINFO,;t t
16753 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16754 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16755 s,@TERMPATH@,$TERMPATH,;t t
16756 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16757 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16758 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16759 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16760 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16761 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16762 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16763 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16764 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16765 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16766 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16767 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16768 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16769 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16770 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16771 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16772 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16773 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16774 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16775 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16776 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16777 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16778 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16779 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16780 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16781 s,@ECHO_LINK@,$ECHO_LINK,;t t
16782 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16783 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16784 s,@ADA_TRACE@,$ADA_TRACE,;t t
16785 s,@MATH_LIB@,$MATH_LIB,;t t
16786 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16787 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16788 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16789 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16790 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16791 s,@TEST_LIBS@,$TEST_LIBS,;t t
16792 s,@CXXCPP@,$CXXCPP,;t t
16793 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16794 s,@CXX_AR@,$CXX_AR,;t t
16795 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16796 s,@CXXLIBS@,$CXXLIBS,;t t
16797 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16798 s,@gnat_exists@,$gnat_exists,;t t
16799 s,@M4_exists@,$M4_exists,;t t
16800 s,@cf_ada_make@,$cf_ada_make,;t t
16801 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16802 s,@cf_ada_package@,$cf_ada_package,;t t
16803 s,@ADAFLAGS@,$ADAFLAGS,;t t
16804 s,@cf_compile_generics@,$cf_compile_generics,;t t
16805 s,@cf_generic_objects@,$cf_generic_objects,;t t
16806 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16807 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16808 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16809 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16810 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16811 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16812 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16813 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16814 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16815 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16816 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16817 s,@TICS_ARGS@,$TICS_ARGS,;t t
16818 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16819 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16820 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16821 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16822 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16823 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16824 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16825 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16826 s,@TICS_LIST@,$TICS_LIST,;t t
16827 s,@TINFO_LIST@,$TINFO_LIST,;t t
16828 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16829 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16830 s,@TEST_ARGS@,$TEST_ARGS,;t t
16831 s,@TEST_DEPS@,$TEST_DEPS,;t t
16832 s,@TEST_ARG2@,$TEST_ARG2,;t t
16833 s,@TEST_DEP2@,$TEST_DEP2,;t t
16834 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16835 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16836 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16837 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16838 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16839 CEOF
16840
16841 EOF
16842
16843   cat >>$CONFIG_STATUS <<\EOF
16844   # Split the substitutions into bite-sized pieces for seds with
16845   # small command number limits, like on Digital OSF/1 and HP-UX.
16846   ac_max_sed_lines=48
16847   ac_sed_frag=1 # Number of current file.
16848   ac_beg=1 # First line for current file.
16849   ac_end=$ac_max_sed_lines # Line after last line for current file.
16850   ac_more_lines=:
16851   ac_sed_cmds=
16852   while $ac_more_lines; do
16853     if test $ac_beg -gt 1; then
16854       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16855     else
16856       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16857     fi
16858     if test ! -s $tmp/subs.frag; then
16859       ac_more_lines=false
16860     else
16861       # The purpose of the label and of the branching condition is to
16862       # speed up the sed processing (if there are no `@' at all, there
16863       # is no need to browse any of the substitutions).
16864       # These are the two extra sed commands mentioned above.
16865       (echo ':t
16866   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16867       if test -z "$ac_sed_cmds"; then
16868         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16869       else
16870         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16871       fi
16872       ac_sed_frag=`expr $ac_sed_frag + 1`
16873       ac_beg=$ac_end
16874       ac_end=`expr $ac_end + $ac_max_sed_lines`
16875     fi
16876   done
16877   if test -z "$ac_sed_cmds"; then
16878     ac_sed_cmds=cat
16879   fi
16880 fi # test -n "$CONFIG_FILES"
16881
16882 EOF
16883 cat >>$CONFIG_STATUS <<\EOF
16884 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16885   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16886   case $ac_file in
16887   - | *:- | *:-:* ) # input from stdin
16888         cat >$tmp/stdin
16889         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16890         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16891   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16892         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16893   * )   ac_file_in=$ac_file.in ;;
16894   esac
16895
16896   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16897   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16898          X"$ac_file" : 'X\(//\)[^/]' \| \
16899          X"$ac_file" : 'X\(//\)$' \| \
16900          X"$ac_file" : 'X\(/\)' \| \
16901          .     : '\(.\)' 2>/dev/null ||
16902 echo X"$ac_file" |
16903     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16904           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16905           /^X\(\/\/\)$/{ s//\1/; q; }
16906           /^X\(\/\).*/{ s//\1/; q; }
16907           s/.*/./; q'`
16908   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16909     { case "$ac_dir" in
16910   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16911   *)                      as_incr_dir=.;;
16912 esac
16913 as_dummy="$ac_dir"
16914 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16915   case $as_mkdir_dir in
16916     # Skip DOS drivespec
16917     ?:) as_incr_dir=$as_mkdir_dir ;;
16918     *)
16919       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16920       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16921     ;;
16922   esac
16923 done; }
16924
16925     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16926     # A "../" for each directory in $ac_dir_suffix.
16927     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16928   else
16929     ac_dir_suffix= ac_dots=
16930   fi
16931
16932   case $srcdir in
16933   .)  ac_srcdir=.
16934       if test -z "$ac_dots"; then
16935          ac_top_srcdir=.
16936       else
16937          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16938       fi ;;
16939   [\\/]* | ?:[\\/]* )
16940       ac_srcdir=$srcdir$ac_dir_suffix;
16941       ac_top_srcdir=$srcdir ;;
16942   *) # Relative path.
16943     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16944     ac_top_srcdir=$ac_dots$srcdir ;;
16945   esac
16946
16947   case $INSTALL in
16948   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16949   *) ac_INSTALL=$ac_dots$INSTALL ;;
16950   esac
16951
16952   if test x"$ac_file" != x-; then
16953     { echo "$as_me:16953: creating $ac_file" >&5
16954 echo "$as_me: creating $ac_file" >&6;}
16955     rm -f "$ac_file"
16956   fi
16957   # Let's still pretend it is `configure' which instantiates (i.e., don't
16958   # use $as_me), people would be surprised to read:
16959   #    /* config.h.  Generated automatically by config.status.  */
16960   configure_input="Generated automatically from `echo $ac_file_in |
16961                                                  sed 's,.*/,,'` by configure."
16962
16963   # First look for the input files in the build tree, otherwise in the
16964   # src tree.
16965   ac_file_inputs=`IFS=:
16966     for f in $ac_file_in; do
16967       case $f in
16968       -) echo $tmp/stdin ;;
16969       [\\/$]*)
16970          # Absolute (can't be DOS-style, as IFS=:)
16971          test -f "$f" || { { echo "$as_me:16971: error: cannot find input file: $f" >&5
16972 echo "$as_me: error: cannot find input file: $f" >&2;}
16973    { (exit 1); exit 1; }; }
16974          echo $f;;
16975       *) # Relative
16976          if test -f "$f"; then
16977            # Build tree
16978            echo $f
16979          elif test -f "$srcdir/$f"; then
16980            # Source tree
16981            echo $srcdir/$f
16982          else
16983            # /dev/null tree
16984            { { echo "$as_me:16984: error: cannot find input file: $f" >&5
16985 echo "$as_me: error: cannot find input file: $f" >&2;}
16986    { (exit 1); exit 1; }; }
16987          fi;;
16988       esac
16989     done` || { (exit 1); exit 1; }
16990 EOF
16991 cat >>$CONFIG_STATUS <<EOF
16992   sed "$ac_vpsub
16993 $extrasub
16994 EOF
16995 cat >>$CONFIG_STATUS <<\EOF
16996 :t
16997 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16998 s,@configure_input@,$configure_input,;t t
16999 s,@srcdir@,$ac_srcdir,;t t
17000 s,@top_srcdir@,$ac_top_srcdir,;t t
17001 s,@INSTALL@,$ac_INSTALL,;t t
17002 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17003   rm -f $tmp/stdin
17004   if test x"$ac_file" != x-; then
17005     mv $tmp/out $ac_file
17006   else
17007     cat $tmp/out
17008     rm -f $tmp/out
17009   fi
17010
17011 done
17012 EOF
17013 cat >>$CONFIG_STATUS <<\EOF
17014
17015 #
17016 # CONFIG_HEADER section.
17017 #
17018
17019 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17020 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17021 #
17022 # ac_d sets the value in "#define NAME VALUE" lines.
17023 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17024 ac_dB='[        ].*$,\1#\2'
17025 ac_dC=' '
17026 ac_dD=',;t'
17027 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17028 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17029 ac_iB='\([      ]\),\1#\2define\3'
17030 ac_iC=' '
17031 ac_iD='\4,;t'
17032 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17033 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17034 ac_uB='$,\1#\2define\3'
17035 ac_uC=' '
17036 ac_uD=',;t'
17037
17038 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17039   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17040   case $ac_file in
17041   - | *:- | *:-:* ) # input from stdin
17042         cat >$tmp/stdin
17043         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17044         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17045   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17046         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17047   * )   ac_file_in=$ac_file.in ;;
17048   esac
17049
17050   test x"$ac_file" != x- && { echo "$as_me:17050: creating $ac_file" >&5
17051 echo "$as_me: creating $ac_file" >&6;}
17052
17053   # First look for the input files in the build tree, otherwise in the
17054   # src tree.
17055   ac_file_inputs=`IFS=:
17056     for f in $ac_file_in; do
17057       case $f in
17058       -) echo $tmp/stdin ;;
17059       [\\/$]*)
17060          # Absolute (can't be DOS-style, as IFS=:)
17061          test -f "$f" || { { echo "$as_me:17061: error: cannot find input file: $f" >&5
17062 echo "$as_me: error: cannot find input file: $f" >&2;}
17063    { (exit 1); exit 1; }; }
17064          echo $f;;
17065       *) # Relative
17066          if test -f "$f"; then
17067            # Build tree
17068            echo $f
17069          elif test -f "$srcdir/$f"; then
17070            # Source tree
17071            echo $srcdir/$f
17072          else
17073            # /dev/null tree
17074            { { echo "$as_me:17074: error: cannot find input file: $f" >&5
17075 echo "$as_me: error: cannot find input file: $f" >&2;}
17076    { (exit 1); exit 1; }; }
17077          fi;;
17078       esac
17079     done` || { (exit 1); exit 1; }
17080   # Remove the trailing spaces.
17081   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17082
17083 EOF
17084
17085 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17086 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17087 # be either 'cat' or 'sort'.
17088 cat confdefs.h | uniq >conftest.vals
17089
17090 # Break up conftest.vals because some shells have a limit on
17091 # the size of here documents, and old seds have small limits too.
17092
17093 rm -f conftest.tail
17094 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17095 while grep . conftest.vals >/dev/null
17096 do
17097   # Write chunks of a limited-size here document to conftest.frag.
17098   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17099   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17100   echo 'CEOF' >> $CONFIG_STATUS
17101   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17102   rm -f conftest.vals
17103   mv conftest.tail conftest.vals
17104 done
17105 rm -f conftest.vals
17106
17107 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17108 # marker @DEFS@.
17109 echo '  cat >> conftest.edit <<CEOF
17110 /@DEFS@/r conftest.frag
17111 /@DEFS@/d
17112 CEOF
17113 sed -f conftest.edit $tmp/in > $tmp/out
17114 rm -f $tmp/in
17115 mv $tmp/out $tmp/in
17116 rm -f conftest.edit conftest.frag
17117 ' >> $CONFIG_STATUS
17118
17119 cat >>$CONFIG_STATUS <<\EOF
17120   # Let's still pretend it is `configure' which instantiates (i.e., don't
17121   # use $as_me), people would be surprised to read:
17122   #    /* config.h.  Generated automatically by config.status.  */
17123   if test x"$ac_file" = x-; then
17124     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17125   else
17126     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17127   fi
17128   cat $tmp/in >>$tmp/config.h
17129   rm -f $tmp/in
17130   if test x"$ac_file" != x-; then
17131     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17132       { echo "$as_me:17132: $ac_file is unchanged" >&5
17133 echo "$as_me: $ac_file is unchanged" >&6;}
17134     else
17135       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17136          X"$ac_file" : 'X\(//\)[^/]' \| \
17137          X"$ac_file" : 'X\(//\)$' \| \
17138          X"$ac_file" : 'X\(/\)' \| \
17139          .     : '\(.\)' 2>/dev/null ||
17140 echo X"$ac_file" |
17141     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17142           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17143           /^X\(\/\/\)$/{ s//\1/; q; }
17144           /^X\(\/\).*/{ s//\1/; q; }
17145           s/.*/./; q'`
17146       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17147         { case "$ac_dir" in
17148   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17149   *)                      as_incr_dir=.;;
17150 esac
17151 as_dummy="$ac_dir"
17152 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17153   case $as_mkdir_dir in
17154     # Skip DOS drivespec
17155     ?:) as_incr_dir=$as_mkdir_dir ;;
17156     *)
17157       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17158       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17159     ;;
17160   esac
17161 done; }
17162
17163       fi
17164       rm -f $ac_file
17165       mv $tmp/config.h $ac_file
17166     fi
17167   else
17168     cat $tmp/config.h
17169     rm -f $tmp/config.h
17170   fi
17171 done
17172 EOF
17173 cat >>$CONFIG_STATUS <<\EOF
17174
17175 #
17176 # CONFIG_COMMANDS section.
17177 #
17178 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17179   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17180   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17181
17182   case $ac_dest in
17183     default )
17184
17185 for cf_dir in test
17186 do
17187         if test ! -d $srcdir/$cf_dir; then
17188                 continue
17189         elif test -f $srcdir/$cf_dir/programs; then
17190                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17191         fi
17192 done
17193
17194         case $cf_cv_system_name in
17195         OS/2*)  LIB_PREFIX=''     ;;
17196         os2*)   LIB_PREFIX=''     ;;
17197         *)      LIB_PREFIX='lib'  ;;
17198         esac
17199 cf_prefix=$LIB_PREFIX
17200
17201 for cf_dir in $SRC_SUBDIRS
17202 do
17203         if test ! -d $srcdir/$cf_dir ; then
17204                 continue
17205         elif test -f $srcdir/$cf_dir/modules; then
17206
17207                 SHARED_LIB=
17208                 LIBS_TO_MAKE=
17209                 for cf_item in $cf_LIST_MODELS
17210                 do
17211
17212         case $cf_item in
17213         libtool) cf_suffix='.la'  ;;
17214         normal)  cf_suffix='.a'   ;;
17215         debug)   cf_suffix='_g.a' ;;
17216         profile) cf_suffix='_p.a' ;;
17217         shared)
17218                 case $cf_cv_system_name in
17219                 cygwin*) cf_suffix='.dll' ;;
17220                 darwin*) cf_suffix='.dylib' ;;
17221                 hpux*)
17222                         case $target in
17223                         ia64*)  cf_suffix='.so' ;;
17224                         *)      cf_suffix='.sl' ;;
17225                         esac
17226                         ;;
17227                 *)      cf_suffix='.so'  ;;
17228                 esac
17229         esac
17230         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17231
17232                         if test $cf_item = shared ; then
17233                         if test "$cf_cv_do_symlinks" = yes ; then
17234                                 case "$cf_cv_shlib_version" in #(vi
17235                                 rel) #(vi
17236                                         case "$cf_cv_system_name" in #(vi
17237                                         darwin*)
17238                                         case .${LIB_SUFFIX} in
17239                                         .w*)
17240                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17241                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17242                                                 ;;
17243                                         *)
17244                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17245                                                 ;;
17246                                         esac
17247                                         ;; #(vi
17248                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17249                                         esac
17250                                         ;;
17251                                 abi)
17252                                         case "$cf_cv_system_name" in #(vi
17253                                         darwin*)
17254                                         case .${LIB_SUFFIX} in
17255                                         .w*)
17256                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17257                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17258                                                 ;;
17259                                         *)
17260                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17261                                                 ;;
17262                                         esac
17263                                         ;; #(vi
17264                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17265                                         esac
17266                                         ;;
17267                                 esac
17268                         fi
17269                         # cygwin needs import library, and has unique naming convention
17270                         # use autodetected ${cf_prefix} for import lib and static lib, but
17271                         # use 'cyg' prefix for shared lib.
17272                         if test $cf_cv_shlib_version = cygdll ; then
17273                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
17274                                 continue
17275                         fi
17276                         fi
17277                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17278                 done
17279
17280                 if test $cf_dir = ncurses ; then
17281                         cf_subsets="$LIB_SUBSETS"
17282                         cf_r_parts="$cf_subsets"
17283
17284                         while test -n "$cf_r_parts"
17285                         do
17286                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17287                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17288                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17289                                         case $cf_l_parts in #(vi
17290                                         *termlib*) #(vi
17291                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17292                                                 ;;
17293                                         *ticlib*)
17294                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17295                                                 ;;
17296                                         *)
17297                                                 break
17298                                                 ;;
17299                                         esac
17300                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17301                                 else
17302                                         break
17303                                 fi
17304                         done
17305                 else
17306                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17307                 fi
17308
17309                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17310                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17311                         $cf_dir/Makefile >$cf_dir/Makefile.out
17312                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17313
17314                 $AWK -f $srcdir/mk-0th.awk \
17315                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17316                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17317
17318                 for cf_subset in $cf_subsets
17319                 do
17320                         cf_subdirs=
17321                         for cf_item in $cf_LIST_MODELS
17322                         do
17323                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17324
17325 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17326
17327         case $cf_item in
17328         libtool) cf_suffix='.la'  ;;
17329         normal)  cf_suffix='.a'   ;;
17330         debug)   cf_suffix='_g.a' ;;
17331         profile) cf_suffix='_p.a' ;;
17332         shared)
17333                 case $cf_cv_system_name in
17334                 cygwin*) cf_suffix='.dll' ;;
17335                 darwin*) cf_suffix='.dylib' ;;
17336                 hpux*)
17337                         case $target in
17338                         ia64*)  cf_suffix='.so' ;;
17339                         *)      cf_suffix='.sl' ;;
17340                         esac
17341                         ;;
17342                 *)      cf_suffix='.so'  ;;
17343                 esac
17344         esac
17345         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17346
17347         case $cf_item in
17348         libtool) cf_subdir='obj_lo'  ;;
17349         normal)  cf_subdir='objects' ;;
17350         debug)   cf_subdir='obj_g' ;;
17351         profile) cf_subdir='obj_p' ;;
17352         shared)
17353                 case $cf_cv_system_name in #(vi
17354                 cygwin) #(vi
17355                         cf_subdir='objects' ;;
17356                 *)
17357                         cf_subdir='obj_s' ;;
17358                 esac
17359         esac
17360
17361                         # Test for case where we build libtinfo with a different name.
17362                         cf_libname=$cf_dir
17363                         if test $cf_dir = ncurses ; then
17364                                 case $cf_subset in
17365                                 *base*)
17366                                         ;;
17367                                 *termlib*)
17368                                         cf_libname=$TINFO_LIB_SUFFIX
17369                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17370                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17371                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17372                                         fi
17373                                         ;;
17374                                 ticlib*)
17375                                         cf_libname=$TICS_LIB_SUFFIX
17376                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17377                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17378                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17379                                         fi
17380                                         ;;
17381                                 esac
17382                         fi
17383
17384                         # These dependencies really are for development, not
17385                         # builds, but they are useful in porting, too.
17386                         cf_depend="../include/ncurses_cfg.h"
17387                         if test "$srcdir" = "."; then
17388                                 cf_reldir="."
17389                         else
17390                                 cf_reldir="\${srcdir}"
17391                         fi
17392
17393                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17394                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17395                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17396                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17397                         fi
17398
17399                         cf_dir_suffix=
17400                         old_cf_suffix="$cf_suffix"
17401                         if test "$cf_cv_shlib_version_infix" = yes ; then
17402                         if test -n "$LIB_SUFFIX" ; then
17403                                 case $LIB_SUFFIX in
17404                                 w*)
17405                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17406                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17407                                         cf_dir_suffix=w
17408                                         ;;
17409                                 esac
17410                         fi
17411                         fi
17412
17413                         $AWK -f $srcdir/mk-1st.awk \
17414                                 name=${cf_libname}${cf_dir_suffix} \
17415                                 traces=$LIB_TRACING \
17416                                 MODEL=$cf_ITEM \
17417                                 model=$cf_subdir \
17418                                 prefix=$cf_prefix \
17419                                 suffix=$cf_suffix \
17420                                 subset=$cf_subset \
17421                                 TermlibRoot=$TINFO_NAME \
17422                                 TermlibSuffix=$TINFO_SUFFIX \
17423                                 ShlibVer=$cf_cv_shlib_version \
17424                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17425                                 ReLink=${cf_cv_do_relink-no} \
17426                                 DoLinks=$cf_cv_do_symlinks \
17427                                 rmSoLocs=$cf_cv_rm_so_locs \
17428                                 ldconfig="$LDCONFIG" \
17429                                 overwrite=$WITH_OVERWRITE \
17430                                 depend="$cf_depend" \
17431                                 host="$host" \
17432                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17433
17434                         cf_suffix="$old_cf_suffix"
17435
17436                         for cf_subdir2 in $cf_subdirs lib
17437                         do
17438                                 test $cf_subdir = $cf_subdir2 && break
17439                         done
17440                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17441                         $AWK -f $srcdir/mk-2nd.awk \
17442                                 name=$cf_dir \
17443                                 traces=$LIB_TRACING \
17444                                 MODEL=$cf_ITEM \
17445                                 model=$cf_subdir \
17446                                 subset=$cf_subset \
17447                                 srcdir=$srcdir \
17448                                 echo=$WITH_ECHO \
17449                                 crenames=$cf_cv_prog_CC_c_o \
17450                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17451                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17452                         cf_subdirs="$cf_subdirs $cf_subdir"
17453                         done
17454                 done
17455         fi
17456
17457         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17458 done
17459
17460 for cf_dir in $SRC_SUBDIRS
17461 do
17462         if test ! -d $srcdir/$cf_dir ; then
17463                 continue
17464         fi
17465
17466         if test -f $cf_dir/Makefile ; then
17467                 case "$cf_dir" in
17468                 Ada95) #(vi
17469                         echo 'libs \' >> Makefile
17470                         echo 'install.libs \' >> Makefile
17471                         echo 'uninstall.libs ::' >> Makefile
17472                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17473                         ;;
17474                 esac
17475         fi
17476
17477         if test -f $srcdir/$cf_dir/modules; then
17478                 echo >> Makefile
17479                 if test -f $srcdir/$cf_dir/headers; then
17480 cat >> Makefile <<CF_EOF
17481 install.includes \\
17482 uninstall.includes \\
17483 CF_EOF
17484                 fi
17485 if test "$cf_dir" != "c++" ; then
17486 echo 'lint \' >> Makefile
17487 fi
17488 cat >> Makefile <<CF_EOF
17489 libs \\
17490 lintlib \\
17491 install.libs \\
17492 uninstall.libs \\
17493 install.$cf_dir \\
17494 uninstall.$cf_dir ::
17495         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17496 CF_EOF
17497         elif test -f $srcdir/$cf_dir/headers; then
17498 cat >> Makefile <<CF_EOF
17499
17500 libs \\
17501 install.libs \\
17502 uninstall.libs \\
17503 install.includes \\
17504 uninstall.includes ::
17505         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17506 CF_EOF
17507 fi
17508 done
17509
17510 cat >> Makefile <<CF_EOF
17511
17512 install.libs uninstall.libs \\
17513 install.data uninstall.data ::
17514 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17515
17516 install.man \\
17517 uninstall.man ::
17518         cd man && \${MAKE} \${CF_MFLAGS} \$@
17519
17520 distclean ::
17521         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17522         rm -f headers.sh headers.sed mk_shared_lib.sh
17523         rm -rf \${DIRS_TO_MAKE}
17524 CF_EOF
17525
17526 # Special case: tack's manpage lives in its own directory.
17527 if test -d tack ; then
17528 if test -f $srcdir/$tack.h; then
17529 cat >> Makefile <<CF_EOF
17530
17531 install.man \\
17532 uninstall.man ::
17533         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17534 CF_EOF
17535 fi
17536 fi
17537
17538 rm -f headers.sed headers.sh
17539
17540 echo creating headers.sh
17541 cat >headers.sh <<CF_EOF
17542 #! /bin/sh
17543 # This shell script is generated by the 'configure' script.  It is invoked in a
17544 # subdirectory of the build tree.  It generates a sed-script in the parent
17545 # directory that is used to adjust includes for header files that reside in a
17546 # subdirectory of /usr/include, etc.
17547 PRG=""
17548 while test \$# != 3
17549 do
17550 PRG="\$PRG \$1"; shift
17551 done
17552 DST=\$1
17553 REF=\$2
17554 SRC=\$3
17555 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17556 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17557 echo installing \$SRC in \$DST
17558 CF_EOF
17559
17560 if test $WITH_CURSES_H = yes; then
17561         cat >>headers.sh <<CF_EOF
17562 case \$DST in
17563 /*/include/*)
17564         END=\`basename \$DST\`
17565         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17566         do
17567                 NAME=\`basename \$i\`
17568                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17569         done
17570         ;;
17571 *)
17572         echo "" >> \$TMPSED
17573         ;;
17574 esac
17575 CF_EOF
17576
17577 else
17578         cat >>headers.sh <<CF_EOF
17579 case \$DST in
17580 /*/include/*)
17581         END=\`basename \$DST\`
17582         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17583         do
17584                 NAME=\`basename \$i\`
17585                 if test "\$NAME" = "curses.h"
17586                 then
17587                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17588                         NAME=ncurses.h
17589                 fi
17590                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17591         done
17592         ;;
17593 *)
17594         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17595         ;;
17596 esac
17597 CF_EOF
17598 fi
17599 cat >>headers.sh <<CF_EOF
17600 rm -f \$TMPSRC
17601 sed -f \$TMPSED \$SRC > \$TMPSRC
17602 NAME=\`basename \$SRC\`
17603 CF_EOF
17604 if test $WITH_CURSES_H != yes; then
17605         cat >>headers.sh <<CF_EOF
17606 test "\$NAME" = "curses.h" && NAME=ncurses.h
17607 CF_EOF
17608 fi
17609 cat >>headers.sh <<CF_EOF
17610 # Just in case someone gzip'd manpages, remove the conflicting copy.
17611 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17612
17613 eval \$PRG \$TMPSRC \$DST/\$NAME
17614 rm -f \$TMPSRC \$TMPSED
17615 CF_EOF
17616
17617 chmod 0755 headers.sh
17618
17619 for cf_dir in $SRC_SUBDIRS
17620 do
17621         if test ! -d $srcdir/$cf_dir ; then
17622                 continue
17623         fi
17624
17625         if test -f $srcdir/$cf_dir/headers; then
17626                 $AWK -f $srcdir/mk-hdr.awk \
17627                         subset="$LIB_SUBSETS" \
17628                         compat="$WITH_CURSES_H" \
17629                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17630         fi
17631
17632         if test -f $srcdir/$cf_dir/modules; then
17633                 if test "$cf_dir" != "c++" ; then
17634                         cat >>$cf_dir/Makefile <<"CF_EOF"
17635 depend : ${AUTO_SRC}
17636         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17637
17638 # DO NOT DELETE THIS LINE -- make depend depends on it.
17639 CF_EOF
17640                 fi
17641         fi
17642 done
17643
17644  ;;
17645   esac
17646 done
17647 EOF
17648
17649 cat >>$CONFIG_STATUS <<\EOF
17650
17651 { (exit 0); exit 0; }
17652 EOF
17653 chmod +x $CONFIG_STATUS
17654 ac_clean_files=$ac_clean_files_save
17655
17656 # configure is writing to config.log, and then calls config.status.
17657 # config.status does its own redirection, appending to config.log.
17658 # Unfortunately, on DOS this fails, as config.log is still kept open
17659 # by configure, so config.status won't be able to write to it; its
17660 # output is simply discarded.  So we exec the FD to /dev/null,
17661 # effectively closing config.log, so it can be properly (re)opened and
17662 # appended to by config.status.  When coming back to configure, we
17663 # need to make the FD available again.
17664 if test "$no_create" != yes; then
17665   ac_cs_success=:
17666   exec 5>/dev/null
17667   $SHELL $CONFIG_STATUS || ac_cs_success=false
17668   exec 5>>config.log
17669   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17670   # would make configure fail if this is the last instruction.
17671   $ac_cs_success || { (exit 1); exit 1; }
17672 fi
17673 ${MAKE-make} preinstall