]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
5f10cb5318c1ae912bbd8f20357dfbbf510b6217
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.439 .
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-weak-symbols       enable weak-symbols for pthreads
781   --enable-reentrant      compile with experimental reentrant code
782   --enable-safe-sprintf   compile with experimental safe-sprintf code
783   --disable-scroll-hints  compile without scroll-hints code
784   --enable-wgetch-events  compile with experimental wgetch-events code
785 Testing/development Options:
786   --enable-echo           build: display "compiling" commands (default)
787   --enable-warnings       build: turn on GCC compiler warnings
788   --enable-assertions     test: turn on generation of assertion code
789   --with-dmalloc          test: use Gray Watson's dmalloc library
790   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
791   --with-valgrind         test: use valgrind
792   --disable-leaks         test: free permanent memory, analyze leaks
793   --enable-expanded       test: generate functions for certain macros
794   --disable-macros        test: use functions rather than macros
795   --with-trace            test: add trace() function to all models of ncurses
796 Ada95 Binding Options:
797   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
798   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
799   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
800
801 Some influential environment variables:
802   CC          C compiler command
803   CFLAGS      C compiler flags
804   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
805               nonstandard directory <lib dir>
806   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
807               headers in a nonstandard directory <include dir>
808   CPP         C preprocessor
809   CXX         C++ compiler command
810   CXXFLAGS    C++ compiler flags
811   CXXCPP      C++ preprocessor
812
813 Use these variables to override the choices made by `configure' or to help
814 it to find libraries and programs with nonstandard names/locations.
815
816 EOF
817 fi
818
819 if test "$ac_init_help" = "recursive"; then
820   # If there are subdirs, report their specific --help.
821   ac_popdir=`pwd`
822   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
823     cd $ac_subdir
824     # A "../" for each directory in /$ac_subdir.
825     ac_dots=`echo $ac_subdir |
826              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
827
828     case $srcdir in
829     .) # No --srcdir option.  We are building in place.
830       ac_sub_srcdir=$srcdir ;;
831     [\\/]* | ?:[\\/]* ) # Absolute path.
832       ac_sub_srcdir=$srcdir/$ac_subdir ;;
833     *) # Relative path.
834       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
835     esac
836
837     # Check for guested configure; otherwise get Cygnus style configure.
838     if test -f $ac_sub_srcdir/configure.gnu; then
839       echo
840       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
841     elif test -f $ac_sub_srcdir/configure; then
842       echo
843       $SHELL $ac_sub_srcdir/configure  --help=recursive
844     elif test -f $ac_sub_srcdir/configure.ac ||
845            test -f $ac_sub_srcdir/configure.in; then
846       echo
847       $ac_configure --help
848     else
849       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
850     fi
851     cd $ac_popdir
852   done
853 fi
854
855 test -n "$ac_init_help" && exit 0
856 if $ac_init_version; then
857   cat <<\EOF
858
859 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
860 Free Software Foundation, Inc.
861 This configure script is free software; the Free Software Foundation
862 gives unlimited permission to copy, distribute and modify it.
863 EOF
864   exit 0
865 fi
866 exec 5>config.log
867 cat >&5 <<EOF
868 This file contains any messages produced by compilers while
869 running configure, to aid debugging if configure makes a mistake.
870
871 It was created by $as_me, which was
872 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
873
874   $ $0 $@
875
876 EOF
877 {
878 cat <<_ASUNAME
879 ## ---------- ##
880 ## Platform.  ##
881 ## ---------- ##
882
883 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
884 uname -m = `(uname -m) 2>/dev/null || echo unknown`
885 uname -r = `(uname -r) 2>/dev/null || echo unknown`
886 uname -s = `(uname -s) 2>/dev/null || echo unknown`
887 uname -v = `(uname -v) 2>/dev/null || echo unknown`
888
889 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
890 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
891
892 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
893 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
894 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
895 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
896 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
897 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
898 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
899
900 PATH = $PATH
901
902 _ASUNAME
903 } >&5
904
905 cat >&5 <<EOF
906 ## ------------ ##
907 ## Core tests.  ##
908 ## ------------ ##
909
910 EOF
911
912 # Keep a trace of the command line.
913 # Strip out --no-create and --no-recursion so they do not pile up.
914 # Also quote any args containing shell meta-characters.
915 ac_configure_args=
916 ac_sep=
917 for ac_arg
918 do
919   case $ac_arg in
920   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
921   | --no-cr | --no-c) ;;
922   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
923   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
924   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
926     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
927     ac_sep=" " ;;
928   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
929      ac_sep=" " ;;
930   esac
931   # Get rid of the leading space.
932 done
933
934 # When interrupted or exit'd, cleanup temporary files, and complete
935 # config.log.  We remove comments because anyway the quotes in there
936 # would cause problems or look ugly.
937 trap 'exit_status=$?
938   # Save into config.log some information that might help in debugging.
939   echo >&5
940   echo "## ----------------- ##" >&5
941   echo "## Cache variables.  ##" >&5
942   echo "## ----------------- ##" >&5
943   echo >&5
944   # The following way of writing the cache mishandles newlines in values,
945 {
946   (set) 2>&1 |
947     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
948     *ac_space=\ *)
949       sed -n \
950         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
951           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
952       ;;
953     *)
954       sed -n \
955         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
956       ;;
957     esac;
958 } >&5
959   sed "/^$/d" confdefs.h >conftest.log
960   if test -s conftest.log; then
961     echo >&5
962     echo "## ------------ ##" >&5
963     echo "## confdefs.h.  ##" >&5
964     echo "## ------------ ##" >&5
965     echo >&5
966     cat conftest.log >&5
967   fi
968   (echo; echo) >&5
969   test "$ac_signal" != 0 &&
970     echo "$as_me: caught signal $ac_signal" >&5
971   echo "$as_me: exit $exit_status" >&5
972   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
973     exit $exit_status
974      ' 0
975 for ac_signal in 1 2 13 15; do
976   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
977 done
978 ac_signal=0
979
980 # confdefs.h avoids OS command line length limits that DEFS can exceed.
981 rm -rf conftest* confdefs.h
982 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
983 echo >confdefs.h
984
985 # Let the site file select an alternate cache file if it wants to.
986 # Prefer explicitly selected file to automatically selected ones.
987 if test -z "$CONFIG_SITE"; then
988   if test "x$prefix" != xNONE; then
989     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
990   else
991     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
992   fi
993 fi
994 for ac_site_file in $CONFIG_SITE; do
995   if test -r "$ac_site_file"; then
996     { echo "$as_me:996: loading site script $ac_site_file" >&5
997 echo "$as_me: loading site script $ac_site_file" >&6;}
998     cat "$ac_site_file" >&5
999     . "$ac_site_file"
1000   fi
1001 done
1002
1003 if test -r "$cache_file"; then
1004   # Some versions of bash will fail to source /dev/null (special
1005   # files actually), so we avoid doing that.
1006   if test -f "$cache_file"; then
1007     { echo "$as_me:1007: loading cache $cache_file" >&5
1008 echo "$as_me: loading cache $cache_file" >&6;}
1009     case $cache_file in
1010       [\\/]* | ?:[\\/]* ) . $cache_file;;
1011       *)                      . ./$cache_file;;
1012     esac
1013   fi
1014 else
1015   { echo "$as_me:1015: creating cache $cache_file" >&5
1016 echo "$as_me: creating cache $cache_file" >&6;}
1017   >$cache_file
1018 fi
1019
1020 # Check that the precious variables saved in the cache have kept the same
1021 # value.
1022 ac_cache_corrupted=false
1023 for ac_var in `(set) 2>&1 |
1024                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1025   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1026   eval ac_new_set=\$ac_env_${ac_var}_set
1027   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1028   eval ac_new_val="\$ac_env_${ac_var}_value"
1029   case $ac_old_set,$ac_new_set in
1030     set,)
1031       { echo "$as_me:1031: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1032 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1033       ac_cache_corrupted=: ;;
1034     ,set)
1035       { echo "$as_me:1035: error: \`$ac_var' was not set in the previous run" >&5
1036 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1037       ac_cache_corrupted=: ;;
1038     ,);;
1039     *)
1040       if test "x$ac_old_val" != "x$ac_new_val"; then
1041         { echo "$as_me:1041: error: \`$ac_var' has changed since the previous run:" >&5
1042 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1043         { echo "$as_me:1043:   former value:  $ac_old_val" >&5
1044 echo "$as_me:   former value:  $ac_old_val" >&2;}
1045         { echo "$as_me:1045:   current value: $ac_new_val" >&5
1046 echo "$as_me:   current value: $ac_new_val" >&2;}
1047         ac_cache_corrupted=:
1048       fi;;
1049   esac
1050   # Pass precious variables to config.status.  It doesn't matter if
1051   # we pass some twice (in addition to the command line arguments).
1052   if test "$ac_new_set" = set; then
1053     case $ac_new_val in
1054     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1055       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1056       ac_configure_args="$ac_configure_args '$ac_arg'"
1057       ;;
1058     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1059        ;;
1060     esac
1061   fi
1062 done
1063 if $ac_cache_corrupted; then
1064   { echo "$as_me:1064: error: changes in the environment can compromise the build" >&5
1065 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1066   { { echo "$as_me:1066: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1067 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1068    { (exit 1); exit 1; }; }
1069 fi
1070
1071 ac_ext=c
1072 ac_cpp='$CPP $CPPFLAGS'
1073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1076 ac_main_return=return
1077
1078 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1079   *c*,-n*) ECHO_N= ECHO_C='
1080 ' ECHO_T='      ' ;;
1081   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1082   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1083 esac
1084 echo "#! $SHELL" >conftest.sh
1085 echo  "exit 0"   >>conftest.sh
1086 chmod +x conftest.sh
1087 if { (echo "$as_me:1087: PATH=\".;.\"; conftest.sh") >&5
1088   (PATH=".;."; conftest.sh) 2>&5
1089   ac_status=$?
1090   echo "$as_me:1090: \$? = $ac_status" >&5
1091   (exit $ac_status); }; then
1092   ac_path_separator=';'
1093 else
1094   ac_path_separator=:
1095 fi
1096 PATH_SEPARATOR="$ac_path_separator"
1097 rm -f conftest.sh
1098
1099 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1100
1101 top_builddir=`pwd`
1102
1103 echo "$as_me:1103: checking for egrep" >&5
1104 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1105 if test "${ac_cv_prog_egrep+set}" = set; then
1106   echo $ECHO_N "(cached) $ECHO_C" >&6
1107 else
1108   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1109     then ac_cv_prog_egrep='grep -E'
1110     else ac_cv_prog_egrep='egrep'
1111     fi
1112 fi
1113 echo "$as_me:1113: result: $ac_cv_prog_egrep" >&5
1114 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1115  EGREP=$ac_cv_prog_egrep
1116
1117 test -z "$EGREP" && { { echo "$as_me:1117: error: No egrep program found" >&5
1118 echo "$as_me: error: No egrep program found" >&2;}
1119    { (exit 1); exit 1; }; }
1120
1121 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 cf_cv_abi_version=${NCURSES_MAJOR}
1125 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1126 cf_cv_timestamp=`date`
1127 echo "$as_me:1127: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1128 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1129
1130 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1131
1132 # Check whether --with-rel-version or --without-rel-version was given.
1133 if test "${with_rel_version+set}" = set; then
1134   withval="$with_rel_version"
1135   { echo "$as_me:1135: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1136 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1137  cf_cv_rel_version=$withval
1138 fi;
1139
1140  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1141  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1142
1143 if test -n "$NCURSES_MAJOR" ; then
1144   case $NCURSES_MAJOR in #(vi
1145   [0-9]*) #(vi
1146         ;;
1147   *)
1148         { { echo "$as_me:1148: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1149 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1150    { (exit 1); exit 1; }; }
1151         ;;
1152   esac
1153 else
1154   { { echo "$as_me:1154: error: Release major-version value is empty" >&5
1155 echo "$as_me: error: Release major-version value is empty" >&2;}
1156    { (exit 1); exit 1; }; }
1157 fi
1158
1159 if test -n "$NCURSES_MINOR" ; then
1160   case $NCURSES_MINOR in #(vi
1161   [0-9]*) #(vi
1162         ;;
1163   *)
1164         { { echo "$as_me:1164: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1165 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1166    { (exit 1); exit 1; }; }
1167         ;;
1168   esac
1169 else
1170   { { echo "$as_me:1170: error: Release minor-version value is empty" >&5
1171 echo "$as_me: error: Release minor-version value is empty" >&2;}
1172    { (exit 1); exit 1; }; }
1173 fi
1174
1175 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1176
1177 # Check whether --with-abi-version or --without-abi-version was given.
1178 if test "${with_abi_version+set}" = set; then
1179   withval="$with_abi_version"
1180   { echo "$as_me:1180: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1181 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1182  cf_cv_abi_version=$withval
1183 fi;
1184
1185 if test -n "$cf_cv_abi_version" ; then
1186   case $cf_cv_abi_version in #(vi
1187   [0-9]*) #(vi
1188         ;;
1189   *)
1190         { { echo "$as_me:1190: error: ABI version is not a number: $cf_cv_abi_version" >&5
1191 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1192    { (exit 1); exit 1; }; }
1193         ;;
1194   esac
1195 else
1196   { { echo "$as_me:1196: error: ABI version value is empty" >&5
1197 echo "$as_me: error: ABI version value is empty" >&2;}
1198    { (exit 1); exit 1; }; }
1199 fi
1200
1201 ac_aux_dir=
1202 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1203   if test -f $ac_dir/install-sh; then
1204     ac_aux_dir=$ac_dir
1205     ac_install_sh="$ac_aux_dir/install-sh -c"
1206     break
1207   elif test -f $ac_dir/install.sh; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/install.sh -c"
1210     break
1211   elif test -f $ac_dir/shtool; then
1212     ac_aux_dir=$ac_dir
1213     ac_install_sh="$ac_aux_dir/shtool install -c"
1214     break
1215   fi
1216 done
1217 if test -z "$ac_aux_dir"; then
1218   { { echo "$as_me:1218: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1219 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1220    { (exit 1); exit 1; }; }
1221 fi
1222 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1223 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1224 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1225
1226 # Make sure we can run config.sub.
1227 $ac_config_sub sun4 >/dev/null 2>&1 ||
1228   { { echo "$as_me:1228: error: cannot run $ac_config_sub" >&5
1229 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1230    { (exit 1); exit 1; }; }
1231
1232 echo "$as_me:1232: checking build system type" >&5
1233 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1234 if test "${ac_cv_build+set}" = set; then
1235   echo $ECHO_N "(cached) $ECHO_C" >&6
1236 else
1237   ac_cv_build_alias=$build_alias
1238 test -z "$ac_cv_build_alias" &&
1239   ac_cv_build_alias=`$ac_config_guess`
1240 test -z "$ac_cv_build_alias" &&
1241   { { echo "$as_me:1241: error: cannot guess build type; you must specify one" >&5
1242 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1243    { (exit 1); exit 1; }; }
1244 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1245   { { echo "$as_me:1245: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1246 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1247    { (exit 1); exit 1; }; }
1248
1249 fi
1250 echo "$as_me:1250: result: $ac_cv_build" >&5
1251 echo "${ECHO_T}$ac_cv_build" >&6
1252 build=$ac_cv_build
1253 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1254 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1255 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1256
1257 echo "$as_me:1257: checking host system type" >&5
1258 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1259 if test "${ac_cv_host+set}" = set; then
1260   echo $ECHO_N "(cached) $ECHO_C" >&6
1261 else
1262   ac_cv_host_alias=$host_alias
1263 test -z "$ac_cv_host_alias" &&
1264   ac_cv_host_alias=$ac_cv_build_alias
1265 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1266   { { echo "$as_me:1266: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1267 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1268    { (exit 1); exit 1; }; }
1269
1270 fi
1271 echo "$as_me:1271: result: $ac_cv_host" >&5
1272 echo "${ECHO_T}$ac_cv_host" >&6
1273 host=$ac_cv_host
1274 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1275 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1276 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1277
1278 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1279         echo "$as_me:1279: checking target system type" >&5
1280 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1281 if test "${ac_cv_target+set}" = set; then
1282   echo $ECHO_N "(cached) $ECHO_C" >&6
1283 else
1284   ac_cv_target_alias=$target_alias
1285 test "x$ac_cv_target_alias" = "x" &&
1286   ac_cv_target_alias=$ac_cv_host_alias
1287 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1288   { { echo "$as_me:1288: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1289 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1290    { (exit 1); exit 1; }; }
1291
1292 fi
1293 echo "$as_me:1293: result: $ac_cv_target" >&5
1294 echo "${ECHO_T}$ac_cv_target" >&6
1295 target=$ac_cv_target
1296 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1297 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1298 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1299
1300 # The aliases save the names the user supplied, while $host etc.
1301 # will get canonicalized.
1302 test -n "$target_alias" &&
1303   test "$program_prefix$program_suffix$program_transform_name" = \
1304     NONENONEs,x,x, &&
1305   program_prefix=${target_alias}-
1306         system_name="$host_os"
1307 else
1308         system_name="`(uname -s -r) 2>/dev/null`"
1309         if test -z "$system_name" ; then
1310                 system_name="`(hostname) 2>/dev/null`"
1311         fi
1312 fi
1313 test -n "$system_name" && cat >>confdefs.h <<EOF
1314 #define SYSTEM_NAME "$system_name"
1315 EOF
1316
1317 if test "${cf_cv_system_name+set}" = set; then
1318   echo $ECHO_N "(cached) $ECHO_C" >&6
1319 else
1320   cf_cv_system_name="$system_name"
1321 fi
1322
1323 test -z "$system_name" && system_name="$cf_cv_system_name"
1324 test -n "$cf_cv_system_name" && echo "$as_me:1324: result: Configuring for $cf_cv_system_name" >&5
1325 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1326
1327 if test ".$system_name" != ".$cf_cv_system_name" ; then
1328         echo "$as_me:1328: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1329 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1330         { { echo "$as_me:1330: error: \"Please remove config.cache and try again.\"" >&5
1331 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 # Check whether --with-system-type or --without-system-type was given.
1336 if test "${with_system_type+set}" = set; then
1337   withval="$with_system_type"
1338   { echo "$as_me:1338: WARNING: overriding system type to $withval" >&5
1339 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1340  cf_cv_system_name=$withval
1341 fi;
1342
1343 ###     Save the given $CFLAGS to allow user-override.
1344 cf_user_CFLAGS="$CFLAGS"
1345
1346 ###     Default install-location
1347
1348 echo "$as_me:1348: checking for prefix" >&5
1349 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1350 if test "x$prefix" = "xNONE" ; then
1351         case "$cf_cv_system_name" in
1352                 # non-vendor systems don't have a conflict
1353         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1354                 prefix=/usr
1355                 ;;
1356         *)      prefix=$ac_default_prefix
1357                 ;;
1358         esac
1359 fi
1360 echo "$as_me:1360: result: $prefix" >&5
1361 echo "${ECHO_T}$prefix" >&6
1362
1363 if test "x$prefix" = "xNONE" ; then
1364 echo "$as_me:1364: checking for default include-directory" >&5
1365 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1366 test -n "$verbose" && echo 1>&6
1367 for cf_symbol in \
1368         $includedir \
1369         $includedir/ncurses \
1370         $prefix/include \
1371         $prefix/include/ncurses \
1372         /usr/local/include \
1373         /usr/local/include/ncurses \
1374         /usr/include \
1375         /usr/include/ncurses
1376 do
1377         cf_dir=`eval echo $cf_symbol`
1378         if test -f $cf_dir/curses.h ; then
1379         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1380                 includedir="$cf_symbol"
1381                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1382                 break
1383         fi
1384         fi
1385         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1386 done
1387 echo "$as_me:1387: result: $includedir" >&5
1388 echo "${ECHO_T}$includedir" >&6
1389 fi
1390
1391 ###     Checks for programs.
1392 ac_ext=c
1393 ac_cpp='$CPP $CPPFLAGS'
1394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1397 ac_main_return=return
1398 if test -n "$ac_tool_prefix"; then
1399   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1400 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1401 echo "$as_me:1401: checking for $ac_word" >&5
1402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1403 if test "${ac_cv_prog_CC+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   if test -n "$CC"; then
1407   ac_cv_prog_CC="$CC" # Let the user override the test.
1408 else
1409   ac_save_IFS=$IFS; IFS=$ac_path_separator
1410 ac_dummy="$PATH"
1411 for ac_dir in $ac_dummy; do
1412   IFS=$ac_save_IFS
1413   test -z "$ac_dir" && ac_dir=.
1414   $as_executable_p "$ac_dir/$ac_word" || continue
1415 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1416 echo "$as_me:1416: found $ac_dir/$ac_word" >&5
1417 break
1418 done
1419
1420 fi
1421 fi
1422 CC=$ac_cv_prog_CC
1423 if test -n "$CC"; then
1424   echo "$as_me:1424: result: $CC" >&5
1425 echo "${ECHO_T}$CC" >&6
1426 else
1427   echo "$as_me:1427: result: no" >&5
1428 echo "${ECHO_T}no" >&6
1429 fi
1430
1431 fi
1432 if test -z "$ac_cv_prog_CC"; then
1433   ac_ct_CC=$CC
1434   # Extract the first word of "gcc", so it can be a program name with args.
1435 set dummy gcc; ac_word=$2
1436 echo "$as_me:1436: checking for $ac_word" >&5
1437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   if test -n "$ac_ct_CC"; then
1442   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1443 else
1444   ac_save_IFS=$IFS; IFS=$ac_path_separator
1445 ac_dummy="$PATH"
1446 for ac_dir in $ac_dummy; do
1447   IFS=$ac_save_IFS
1448   test -z "$ac_dir" && ac_dir=.
1449   $as_executable_p "$ac_dir/$ac_word" || continue
1450 ac_cv_prog_ac_ct_CC="gcc"
1451 echo "$as_me:1451: found $ac_dir/$ac_word" >&5
1452 break
1453 done
1454
1455 fi
1456 fi
1457 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1458 if test -n "$ac_ct_CC"; then
1459   echo "$as_me:1459: result: $ac_ct_CC" >&5
1460 echo "${ECHO_T}$ac_ct_CC" >&6
1461 else
1462   echo "$as_me:1462: result: no" >&5
1463 echo "${ECHO_T}no" >&6
1464 fi
1465
1466   CC=$ac_ct_CC
1467 else
1468   CC="$ac_cv_prog_CC"
1469 fi
1470
1471 if test -z "$CC"; then
1472   if test -n "$ac_tool_prefix"; then
1473   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1474 set dummy ${ac_tool_prefix}cc; ac_word=$2
1475 echo "$as_me:1475: checking for $ac_word" >&5
1476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1477 if test "${ac_cv_prog_CC+set}" = set; then
1478   echo $ECHO_N "(cached) $ECHO_C" >&6
1479 else
1480   if test -n "$CC"; then
1481   ac_cv_prog_CC="$CC" # Let the user override the test.
1482 else
1483   ac_save_IFS=$IFS; IFS=$ac_path_separator
1484 ac_dummy="$PATH"
1485 for ac_dir in $ac_dummy; do
1486   IFS=$ac_save_IFS
1487   test -z "$ac_dir" && ac_dir=.
1488   $as_executable_p "$ac_dir/$ac_word" || continue
1489 ac_cv_prog_CC="${ac_tool_prefix}cc"
1490 echo "$as_me:1490: found $ac_dir/$ac_word" >&5
1491 break
1492 done
1493
1494 fi
1495 fi
1496 CC=$ac_cv_prog_CC
1497 if test -n "$CC"; then
1498   echo "$as_me:1498: result: $CC" >&5
1499 echo "${ECHO_T}$CC" >&6
1500 else
1501   echo "$as_me:1501: result: no" >&5
1502 echo "${ECHO_T}no" >&6
1503 fi
1504
1505 fi
1506 if test -z "$ac_cv_prog_CC"; then
1507   ac_ct_CC=$CC
1508   # Extract the first word of "cc", so it can be a program name with args.
1509 set dummy cc; ac_word=$2
1510 echo "$as_me:1510: checking for $ac_word" >&5
1511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1512 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1513   echo $ECHO_N "(cached) $ECHO_C" >&6
1514 else
1515   if test -n "$ac_ct_CC"; then
1516   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1517 else
1518   ac_save_IFS=$IFS; IFS=$ac_path_separator
1519 ac_dummy="$PATH"
1520 for ac_dir in $ac_dummy; do
1521   IFS=$ac_save_IFS
1522   test -z "$ac_dir" && ac_dir=.
1523   $as_executable_p "$ac_dir/$ac_word" || continue
1524 ac_cv_prog_ac_ct_CC="cc"
1525 echo "$as_me:1525: found $ac_dir/$ac_word" >&5
1526 break
1527 done
1528
1529 fi
1530 fi
1531 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1532 if test -n "$ac_ct_CC"; then
1533   echo "$as_me:1533: result: $ac_ct_CC" >&5
1534 echo "${ECHO_T}$ac_ct_CC" >&6
1535 else
1536   echo "$as_me:1536: result: no" >&5
1537 echo "${ECHO_T}no" >&6
1538 fi
1539
1540   CC=$ac_ct_CC
1541 else
1542   CC="$ac_cv_prog_CC"
1543 fi
1544
1545 fi
1546 if test -z "$CC"; then
1547   # Extract the first word of "cc", so it can be a program name with args.
1548 set dummy cc; ac_word=$2
1549 echo "$as_me:1549: checking for $ac_word" >&5
1550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1551 if test "${ac_cv_prog_CC+set}" = set; then
1552   echo $ECHO_N "(cached) $ECHO_C" >&6
1553 else
1554   if test -n "$CC"; then
1555   ac_cv_prog_CC="$CC" # Let the user override the test.
1556 else
1557   ac_prog_rejected=no
1558   ac_save_IFS=$IFS; IFS=$ac_path_separator
1559 ac_dummy="$PATH"
1560 for ac_dir in $ac_dummy; do
1561   IFS=$ac_save_IFS
1562   test -z "$ac_dir" && ac_dir=.
1563   $as_executable_p "$ac_dir/$ac_word" || continue
1564 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1565   ac_prog_rejected=yes
1566   continue
1567 fi
1568 ac_cv_prog_CC="cc"
1569 echo "$as_me:1569: found $ac_dir/$ac_word" >&5
1570 break
1571 done
1572
1573 if test $ac_prog_rejected = yes; then
1574   # We found a bogon in the path, so make sure we never use it.
1575   set dummy $ac_cv_prog_CC
1576   shift
1577   if test $# != 0; then
1578     # We chose a different compiler from the bogus one.
1579     # However, it has the same basename, so the bogon will be chosen
1580     # first if we set CC to just the basename; use the full file name.
1581     shift
1582     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1583     shift
1584     ac_cv_prog_CC="$@"
1585   fi
1586 fi
1587 fi
1588 fi
1589 CC=$ac_cv_prog_CC
1590 if test -n "$CC"; then
1591   echo "$as_me:1591: result: $CC" >&5
1592 echo "${ECHO_T}$CC" >&6
1593 else
1594   echo "$as_me:1594: result: no" >&5
1595 echo "${ECHO_T}no" >&6
1596 fi
1597
1598 fi
1599 if test -z "$CC"; then
1600   if test -n "$ac_tool_prefix"; then
1601   for ac_prog in cl
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in cl
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 fi
1681
1682 test -z "$CC" && { { echo "$as_me:1682: error: no acceptable cc found in \$PATH" >&5
1683 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1684    { (exit 1); exit 1; }; }
1685
1686 # Provide some information about the compiler.
1687 echo "$as_me:1687:" \
1688      "checking for C compiler version" >&5
1689 ac_compiler=`set X $ac_compile; echo $2`
1690 { (eval echo "$as_me:1690: \"$ac_compiler --version </dev/null >&5\"") >&5
1691   (eval $ac_compiler --version </dev/null >&5) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }
1695 { (eval echo "$as_me:1695: \"$ac_compiler -v </dev/null >&5\"") >&5
1696   (eval $ac_compiler -v </dev/null >&5) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }
1700 { (eval echo "$as_me:1700: \"$ac_compiler -V </dev/null >&5\"") >&5
1701   (eval $ac_compiler -V </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705
1706 cat >conftest.$ac_ext <<_ACEOF
1707 #line 1707 "configure"
1708 #include "confdefs.h"
1709
1710 int
1711 main ()
1712 {
1713
1714   ;
1715   return 0;
1716 }
1717 _ACEOF
1718 ac_clean_files_save=$ac_clean_files
1719 ac_clean_files="$ac_clean_files a.out a.exe"
1720 # Try to create an executable without -o first, disregard a.out.
1721 # It will help us diagnose broken compilers, and finding out an intuition
1722 # of exeext.
1723 echo "$as_me:1723: checking for C compiler default output" >&5
1724 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1725 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1726 if { (eval echo "$as_me:1726: \"$ac_link_default\"") >&5
1727   (eval $ac_link_default) 2>&5
1728   ac_status=$?
1729   echo "$as_me:1729: \$? = $ac_status" >&5
1730   (exit $ac_status); }; then
1731   # Find the output, starting from the most likely.  This scheme is
1732 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1733 # resort.
1734 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1735                 ls a.out conftest 2>/dev/null;
1736                 ls a.* conftest.* 2>/dev/null`; do
1737   case $ac_file in
1738     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1739     a.out ) # We found the default executable, but exeext='' is most
1740             # certainly right.
1741             break;;
1742     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1743           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1744           export ac_cv_exeext
1745           break;;
1746     * ) break;;
1747   esac
1748 done
1749 else
1750   echo "$as_me: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 { { echo "$as_me:1752: error: C compiler cannot create executables" >&5
1753 echo "$as_me: error: C compiler cannot create executables" >&2;}
1754    { (exit 77); exit 77; }; }
1755 fi
1756
1757 ac_exeext=$ac_cv_exeext
1758 echo "$as_me:1758: result: $ac_file" >&5
1759 echo "${ECHO_T}$ac_file" >&6
1760
1761 # Check the compiler produces executables we can run.  If not, either
1762 # the compiler is broken, or we cross compile.
1763 echo "$as_me:1763: checking whether the C compiler works" >&5
1764 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1765 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1766 # If not cross compiling, check that we can run a simple program.
1767 if test "$cross_compiling" != yes; then
1768   if { ac_try='./$ac_file'
1769   { (eval echo "$as_me:1769: \"$ac_try\"") >&5
1770   (eval $ac_try) 2>&5
1771   ac_status=$?
1772   echo "$as_me:1772: \$? = $ac_status" >&5
1773   (exit $ac_status); }; }; then
1774     cross_compiling=no
1775   else
1776     if test "$cross_compiling" = maybe; then
1777         cross_compiling=yes
1778     else
1779         { { echo "$as_me:1779: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&5
1781 echo "$as_me: error: cannot run C compiled programs.
1782 If you meant to cross compile, use \`--host'." >&2;}
1783    { (exit 1); exit 1; }; }
1784     fi
1785   fi
1786 fi
1787 echo "$as_me:1787: result: yes" >&5
1788 echo "${ECHO_T}yes" >&6
1789
1790 rm -f a.out a.exe conftest$ac_cv_exeext
1791 ac_clean_files=$ac_clean_files_save
1792 # Check the compiler produces executables we can run.  If not, either
1793 # the compiler is broken, or we cross compile.
1794 echo "$as_me:1794: checking whether we are cross compiling" >&5
1795 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1796 echo "$as_me:1796: result: $cross_compiling" >&5
1797 echo "${ECHO_T}$cross_compiling" >&6
1798
1799 echo "$as_me:1799: checking for executable suffix" >&5
1800 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1801 if { (eval echo "$as_me:1801: \"$ac_link\"") >&5
1802   (eval $ac_link) 2>&5
1803   ac_status=$?
1804   echo "$as_me:1804: \$? = $ac_status" >&5
1805   (exit $ac_status); }; then
1806   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1807 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1808 # work properly (i.e., refer to `conftest.exe'), while it won't with
1809 # `rm'.
1810 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1811   case $ac_file in
1812     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1813     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1814           export ac_cv_exeext
1815           break;;
1816     * ) break;;
1817   esac
1818 done
1819 else
1820   { { echo "$as_me:1820: error: cannot compute EXEEXT: cannot compile and link" >&5
1821 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1822    { (exit 1); exit 1; }; }
1823 fi
1824
1825 rm -f conftest$ac_cv_exeext
1826 echo "$as_me:1826: result: $ac_cv_exeext" >&5
1827 echo "${ECHO_T}$ac_cv_exeext" >&6
1828
1829 rm -f conftest.$ac_ext
1830 EXEEXT=$ac_cv_exeext
1831 ac_exeext=$EXEEXT
1832 echo "$as_me:1832: checking for object suffix" >&5
1833 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1834 if test "${ac_cv_objext+set}" = set; then
1835   echo $ECHO_N "(cached) $ECHO_C" >&6
1836 else
1837   cat >conftest.$ac_ext <<_ACEOF
1838 #line 1838 "configure"
1839 #include "confdefs.h"
1840
1841 int
1842 main ()
1843 {
1844
1845   ;
1846   return 0;
1847 }
1848 _ACEOF
1849 rm -f conftest.o conftest.obj
1850 if { (eval echo "$as_me:1850: \"$ac_compile\"") >&5
1851   (eval $ac_compile) 2>&5
1852   ac_status=$?
1853   echo "$as_me:1853: \$? = $ac_status" >&5
1854   (exit $ac_status); }; then
1855   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1856   case $ac_file in
1857     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1858     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1859        break;;
1860   esac
1861 done
1862 else
1863   echo "$as_me: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1865 { { echo "$as_me:1865: error: cannot compute OBJEXT: cannot compile" >&5
1866 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1867    { (exit 1); exit 1; }; }
1868 fi
1869
1870 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1871 fi
1872 echo "$as_me:1872: result: $ac_cv_objext" >&5
1873 echo "${ECHO_T}$ac_cv_objext" >&6
1874 OBJEXT=$ac_cv_objext
1875 ac_objext=$OBJEXT
1876 echo "$as_me:1876: checking whether we are using the GNU C compiler" >&5
1877 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1878 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1879   echo $ECHO_N "(cached) $ECHO_C" >&6
1880 else
1881   cat >conftest.$ac_ext <<_ACEOF
1882 #line 1882 "configure"
1883 #include "confdefs.h"
1884
1885 int
1886 main ()
1887 {
1888 #ifndef __GNUC__
1889        choke me
1890 #endif
1891
1892   ;
1893   return 0;
1894 }
1895 _ACEOF
1896 rm -f conftest.$ac_objext
1897 if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898   (eval $ac_compile) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); } &&
1902          { ac_try='test -s conftest.$ac_objext'
1903   { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904   (eval $ac_try) 2>&5
1905   ac_status=$?
1906   echo "$as_me:1906: \$? = $ac_status" >&5
1907   (exit $ac_status); }; }; then
1908   ac_compiler_gnu=yes
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 ac_compiler_gnu=no
1913 fi
1914 rm -f conftest.$ac_objext conftest.$ac_ext
1915 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1916
1917 fi
1918 echo "$as_me:1918: result: $ac_cv_c_compiler_gnu" >&5
1919 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1920 GCC=`test $ac_compiler_gnu = yes && echo yes`
1921 ac_test_CFLAGS=${CFLAGS+set}
1922 ac_save_CFLAGS=$CFLAGS
1923 CFLAGS="-g"
1924 echo "$as_me:1924: checking whether $CC accepts -g" >&5
1925 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1926 if test "${ac_cv_prog_cc_g+set}" = set; then
1927   echo $ECHO_N "(cached) $ECHO_C" >&6
1928 else
1929   cat >conftest.$ac_ext <<_ACEOF
1930 #line 1930 "configure"
1931 #include "confdefs.h"
1932
1933 int
1934 main ()
1935 {
1936
1937   ;
1938   return 0;
1939 }
1940 _ACEOF
1941 rm -f conftest.$ac_objext
1942 if { (eval echo "$as_me:1942: \"$ac_compile\"") >&5
1943   (eval $ac_compile) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); } &&
1947          { ac_try='test -s conftest.$ac_objext'
1948   { (eval echo "$as_me:1948: \"$ac_try\"") >&5
1949   (eval $ac_try) 2>&5
1950   ac_status=$?
1951   echo "$as_me:1951: \$? = $ac_status" >&5
1952   (exit $ac_status); }; }; then
1953   ac_cv_prog_cc_g=yes
1954 else
1955   echo "$as_me: failed program was:" >&5
1956 cat conftest.$ac_ext >&5
1957 ac_cv_prog_cc_g=no
1958 fi
1959 rm -f conftest.$ac_objext conftest.$ac_ext
1960 fi
1961 echo "$as_me:1961: result: $ac_cv_prog_cc_g" >&5
1962 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1963 if test "$ac_test_CFLAGS" = set; then
1964   CFLAGS=$ac_save_CFLAGS
1965 elif test $ac_cv_prog_cc_g = yes; then
1966   if test "$GCC" = yes; then
1967     CFLAGS="-g -O2"
1968   else
1969     CFLAGS="-g"
1970   fi
1971 else
1972   if test "$GCC" = yes; then
1973     CFLAGS="-O2"
1974   else
1975     CFLAGS=
1976   fi
1977 fi
1978 # Some people use a C++ compiler to compile C.  Since we use `exit',
1979 # in C++ we need to declare it.  In case someone uses the same compiler
1980 # for both compiling C and C++ we need to have the C++ compiler decide
1981 # the declaration of exit, since it's the most demanding environment.
1982 cat >conftest.$ac_ext <<_ACEOF
1983 #ifndef __cplusplus
1984   choke me
1985 #endif
1986 _ACEOF
1987 rm -f conftest.$ac_objext
1988 if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5
1989   (eval $ac_compile) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); } &&
1993          { ac_try='test -s conftest.$ac_objext'
1994   { (eval echo "$as_me:1994: \"$ac_try\"") >&5
1995   (eval $ac_try) 2>&5
1996   ac_status=$?
1997   echo "$as_me:1997: \$? = $ac_status" >&5
1998   (exit $ac_status); }; }; then
1999   for ac_declaration in \
2000    ''\
2001    '#include <stdlib.h>' \
2002    'extern "C" void std::exit (int) throw (); using std::exit;' \
2003    'extern "C" void std::exit (int); using std::exit;' \
2004    'extern "C" void exit (int) throw ();' \
2005    'extern "C" void exit (int);' \
2006    'void exit (int);'
2007 do
2008   cat >conftest.$ac_ext <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011 #include <stdlib.h>
2012 $ac_declaration
2013 int
2014 main ()
2015 {
2016 exit (42);
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.$ac_objext
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); } &&
2027          { ac_try='test -s conftest.$ac_objext'
2028   { (eval echo "$as_me:2028: \"$ac_try\"") >&5
2029   (eval $ac_try) 2>&5
2030   ac_status=$?
2031   echo "$as_me:2031: \$? = $ac_status" >&5
2032   (exit $ac_status); }; }; then
2033   :
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2037 continue
2038 fi
2039 rm -f conftest.$ac_objext conftest.$ac_ext
2040   cat >conftest.$ac_ext <<_ACEOF
2041 #line 2041 "configure"
2042 #include "confdefs.h"
2043 $ac_declaration
2044 int
2045 main ()
2046 {
2047 exit (42);
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 rm -f conftest.$ac_objext
2053 if { (eval echo "$as_me:2053: \"$ac_compile\"") >&5
2054   (eval $ac_compile) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); } &&
2058          { ac_try='test -s conftest.$ac_objext'
2059   { (eval echo "$as_me:2059: \"$ac_try\"") >&5
2060   (eval $ac_try) 2>&5
2061   ac_status=$?
2062   echo "$as_me:2062: \$? = $ac_status" >&5
2063   (exit $ac_status); }; }; then
2064   break
2065 else
2066   echo "$as_me: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2068 fi
2069 rm -f conftest.$ac_objext conftest.$ac_ext
2070 done
2071 rm -f conftest*
2072 if test -n "$ac_declaration"; then
2073   echo '#ifdef __cplusplus' >>confdefs.h
2074   echo $ac_declaration      >>confdefs.h
2075   echo '#endif'             >>confdefs.h
2076 fi
2077
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 ac_ext=c
2084 ac_cpp='$CPP $CPPFLAGS'
2085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2088 ac_main_return=return
2089
2090 GCC_VERSION=none
2091 if test "$GCC" = yes ; then
2092         echo "$as_me:2092: checking version of $CC" >&5
2093 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2094         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2095         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2096         echo "$as_me:2096: result: $GCC_VERSION" >&5
2097 echo "${ECHO_T}$GCC_VERSION" >&6
2098 fi
2099
2100 ac_ext=c
2101 ac_cpp='$CPP $CPPFLAGS'
2102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2105 ac_main_return=return
2106 echo "$as_me:2106: checking how to run the C preprocessor" >&5
2107 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2108 # On Suns, sometimes $CPP names a directory.
2109 if test -n "$CPP" && test -d "$CPP"; then
2110   CPP=
2111 fi
2112 if test -z "$CPP"; then
2113   if test "${ac_cv_prog_CPP+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116       # Double quotes because CPP needs to be expanded
2117     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2118     do
2119       ac_preproc_ok=false
2120 for ac_c_preproc_warn_flag in '' yes
2121 do
2122   # Use a header file that comes with gcc, so configuring glibc
2123   # with a fresh cross-compiler works.
2124   # On the NeXT, cc -E runs the code through the compiler's parser,
2125   # not just through cpp. "Syntax error" is here to catch this case.
2126   cat >conftest.$ac_ext <<_ACEOF
2127 #line 2127 "configure"
2128 #include "confdefs.h"
2129 #include <assert.h>
2130                      Syntax error
2131 _ACEOF
2132 if { (eval echo "$as_me:2132: \"$ac_cpp conftest.$ac_ext\"") >&5
2133   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2134   ac_status=$?
2135   egrep -v '^ *\+' conftest.er1 >conftest.err
2136   rm -f conftest.er1
2137   cat conftest.err >&5
2138   echo "$as_me:2138: \$? = $ac_status" >&5
2139   (exit $ac_status); } >/dev/null; then
2140   if test -s conftest.err; then
2141     ac_cpp_err=$ac_c_preproc_warn_flag
2142   else
2143     ac_cpp_err=
2144   fi
2145 else
2146   ac_cpp_err=yes
2147 fi
2148 if test -z "$ac_cpp_err"; then
2149   :
2150 else
2151   echo "$as_me: failed program was:" >&5
2152   cat conftest.$ac_ext >&5
2153   # Broken: fails on valid input.
2154 continue
2155 fi
2156 rm -f conftest.err conftest.$ac_ext
2157
2158   # OK, works on sane cases.  Now check whether non-existent headers
2159   # can be detected and how.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <ac_nonexistent.h>
2164 _ACEOF
2165 if { (eval echo "$as_me:2165: \"$ac_cpp conftest.$ac_ext\"") >&5
2166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2167   ac_status=$?
2168   egrep -v '^ *\+' conftest.er1 >conftest.err
2169   rm -f conftest.er1
2170   cat conftest.err >&5
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } >/dev/null; then
2173   if test -s conftest.err; then
2174     ac_cpp_err=$ac_c_preproc_warn_flag
2175   else
2176     ac_cpp_err=
2177   fi
2178 else
2179   ac_cpp_err=yes
2180 fi
2181 if test -z "$ac_cpp_err"; then
2182   # Broken: success on invalid input.
2183 continue
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Passes both tests.
2188 ac_preproc_ok=:
2189 break
2190 fi
2191 rm -f conftest.err conftest.$ac_ext
2192
2193 done
2194 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2195 rm -f conftest.err conftest.$ac_ext
2196 if $ac_preproc_ok; then
2197   break
2198 fi
2199
2200     done
2201     ac_cv_prog_CPP=$CPP
2202
2203 fi
2204   CPP=$ac_cv_prog_CPP
2205 else
2206   ac_cv_prog_CPP=$CPP
2207 fi
2208 echo "$as_me:2208: result: $CPP" >&5
2209 echo "${ECHO_T}$CPP" >&6
2210 ac_preproc_ok=false
2211 for ac_c_preproc_warn_flag in '' yes
2212 do
2213   # Use a header file that comes with gcc, so configuring glibc
2214   # with a fresh cross-compiler works.
2215   # On the NeXT, cc -E runs the code through the compiler's parser,
2216   # not just through cpp. "Syntax error" is here to catch this case.
2217   cat >conftest.$ac_ext <<_ACEOF
2218 #line 2218 "configure"
2219 #include "confdefs.h"
2220 #include <assert.h>
2221                      Syntax error
2222 _ACEOF
2223 if { (eval echo "$as_me:2223: \"$ac_cpp conftest.$ac_ext\"") >&5
2224   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2225   ac_status=$?
2226   egrep -v '^ *\+' conftest.er1 >conftest.err
2227   rm -f conftest.er1
2228   cat conftest.err >&5
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit $ac_status); } >/dev/null; then
2231   if test -s conftest.err; then
2232     ac_cpp_err=$ac_c_preproc_warn_flag
2233   else
2234     ac_cpp_err=
2235   fi
2236 else
2237   ac_cpp_err=yes
2238 fi
2239 if test -z "$ac_cpp_err"; then
2240   :
2241 else
2242   echo "$as_me: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   # Broken: fails on valid input.
2245 continue
2246 fi
2247 rm -f conftest.err conftest.$ac_ext
2248
2249   # OK, works on sane cases.  Now check whether non-existent headers
2250   # can be detected and how.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <ac_nonexistent.h>
2255 _ACEOF
2256 if { (eval echo "$as_me:2256: \"$ac_cpp conftest.$ac_ext\"") >&5
2257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258   ac_status=$?
2259   egrep -v '^ *\+' conftest.er1 >conftest.err
2260   rm -f conftest.er1
2261   cat conftest.err >&5
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit $ac_status); } >/dev/null; then
2264   if test -s conftest.err; then
2265     ac_cpp_err=$ac_c_preproc_warn_flag
2266   else
2267     ac_cpp_err=
2268   fi
2269 else
2270   ac_cpp_err=yes
2271 fi
2272 if test -z "$ac_cpp_err"; then
2273   # Broken: success on invalid input.
2274 continue
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Passes both tests.
2279 ac_preproc_ok=:
2280 break
2281 fi
2282 rm -f conftest.err conftest.$ac_ext
2283
2284 done
2285 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2286 rm -f conftest.err conftest.$ac_ext
2287 if $ac_preproc_ok; then
2288   :
2289 else
2290   { { echo "$as_me:2290: error: C preprocessor \"$CPP\" fails sanity check" >&5
2291 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2292    { (exit 1); exit 1; }; }
2293 fi
2294
2295 ac_ext=c
2296 ac_cpp='$CPP $CPPFLAGS'
2297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2300 ac_main_return=return
2301
2302 if test $ac_cv_c_compiler_gnu = yes; then
2303     echo "$as_me:2303: checking whether $CC needs -traditional" >&5
2304 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2305 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2306   echo $ECHO_N "(cached) $ECHO_C" >&6
2307 else
2308     ac_pattern="Autoconf.*'x'"
2309   cat >conftest.$ac_ext <<_ACEOF
2310 #line 2310 "configure"
2311 #include "confdefs.h"
2312 #include <sgtty.h>
2313 int Autoconf = TIOCGETP;
2314 _ACEOF
2315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2316   egrep "$ac_pattern" >/dev/null 2>&1; then
2317   ac_cv_prog_gcc_traditional=yes
2318 else
2319   ac_cv_prog_gcc_traditional=no
2320 fi
2321 rm -f conftest*
2322
2323   if test $ac_cv_prog_gcc_traditional = no; then
2324     cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <termio.h>
2328 int Autoconf = TCGETA;
2329 _ACEOF
2330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331   egrep "$ac_pattern" >/dev/null 2>&1; then
2332   ac_cv_prog_gcc_traditional=yes
2333 fi
2334 rm -f conftest*
2335
2336   fi
2337 fi
2338 echo "$as_me:2338: result: $ac_cv_prog_gcc_traditional" >&5
2339 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2340   if test $ac_cv_prog_gcc_traditional = yes; then
2341     CC="$CC -traditional"
2342   fi
2343 fi
2344
2345 echo "$as_me:2345: checking whether $CC understands -c and -o together" >&5
2346 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2347 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2348   echo $ECHO_N "(cached) $ECHO_C" >&6
2349 else
2350
2351 cat > conftest.$ac_ext <<CF_EOF
2352 #include <stdio.h>
2353 int main()
2354 {
2355         ${cf_cv_main_return:-return}(0);
2356 }
2357 CF_EOF
2358 # We do the test twice because some compilers refuse to overwrite an
2359 # existing .o file with -o, though they will create one.
2360 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2361 if { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit $ac_status); } &&
2366   test -f conftest2.$ac_objext && { (eval echo "$as_me:2366: \"$ac_try\"") >&5
2367   (eval $ac_try) 2>&5
2368   ac_status=$?
2369   echo "$as_me:2369: \$? = $ac_status" >&5
2370   (exit $ac_status); };
2371 then
2372   eval cf_cv_prog_CC_c_o=yes
2373 else
2374   eval cf_cv_prog_CC_c_o=no
2375 fi
2376 rm -f conftest*
2377
2378 fi
2379 if test $cf_cv_prog_CC_c_o = yes; then
2380   echo "$as_me:2380: result: yes" >&5
2381 echo "${ECHO_T}yes" >&6
2382 else
2383   echo "$as_me:2383: result: no" >&5
2384 echo "${ECHO_T}no" >&6
2385 fi
2386
2387 echo "$as_me:2387: checking for POSIXized ISC" >&5
2388 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2389 if test -d /etc/conf/kconfig.d &&
2390    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2391 then
2392   echo "$as_me:2392: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6
2394   ISC=yes # If later tests want to check for ISC.
2395
2396 cat >>confdefs.h <<\EOF
2397 #define _POSIX_SOURCE 1
2398 EOF
2399
2400   if test "$GCC" = yes; then
2401     CC="$CC -posix"
2402   else
2403     CC="$CC -Xp"
2404   fi
2405 else
2406   echo "$as_me:2406: result: no" >&5
2407 echo "${ECHO_T}no" >&6
2408   ISC=
2409 fi
2410
2411 echo "$as_me:2411: checking for ${CC-cc} option to accept ANSI C" >&5
2412 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2413 if test "${cf_cv_ansi_cc+set}" = set; then
2414   echo $ECHO_N "(cached) $ECHO_C" >&6
2415 else
2416
2417 cf_cv_ansi_cc=no
2418 cf_save_CFLAGS="$CFLAGS"
2419 cf_save_CPPFLAGS="$CPPFLAGS"
2420 # Don't try gcc -ansi; that turns off useful extensions and
2421 # breaks some systems' header files.
2422 # AIX                   -qlanglvl=ansi
2423 # Ultrix and OSF/1      -std1
2424 # HP-UX                 -Aa -D_HPUX_SOURCE
2425 # SVR4                  -Xc
2426 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2427 for cf_arg in "-DCC_HAS_PROTOS" \
2428         "" \
2429         -qlanglvl=ansi \
2430         -std1 \
2431         -Ae \
2432         "-Aa -D_HPUX_SOURCE" \
2433         -Xc
2434 do
2435
2436 cf_fix_cppflags=no
2437 cf_new_cflags=
2438 cf_new_cppflags=
2439 cf_new_extra_cppflags=
2440
2441 for cf_add_cflags in $cf_arg
2442 do
2443 case $cf_fix_cppflags in
2444 no)
2445         case $cf_add_cflags in #(vi
2446         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2447                 case $cf_add_cflags in
2448                 -D*)
2449                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2450
2451                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2452                         && test -z "${cf_tst_cflags}" \
2453                         && cf_fix_cppflags=yes
2454
2455                         if test $cf_fix_cppflags = yes ; then
2456                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2457                                 continue
2458                         elif test "${cf_tst_cflags}" = "\"'" ; then
2459                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2460                                 continue
2461                         fi
2462                         ;;
2463                 esac
2464                 case "$CPPFLAGS" in
2465                 *$cf_add_cflags) #(vi
2466                         ;;
2467                 *) #(vi
2468                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2469                         ;;
2470                 esac
2471                 ;;
2472         *)
2473                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2474                 ;;
2475         esac
2476         ;;
2477 yes)
2478         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2479
2480         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2481
2482         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2483         && test -z "${cf_tst_cflags}" \
2484         && cf_fix_cppflags=no
2485         ;;
2486 esac
2487 done
2488
2489 if test -n "$cf_new_cflags" ; then
2490
2491         CFLAGS="$CFLAGS $cf_new_cflags"
2492 fi
2493
2494 if test -n "$cf_new_cppflags" ; then
2495
2496         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2497 fi
2498
2499 if test -n "$cf_new_extra_cppflags" ; then
2500
2501         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2502 fi
2503
2504         cat >conftest.$ac_ext <<_ACEOF
2505 #line 2505 "configure"
2506 #include "confdefs.h"
2507
2508 #ifndef CC_HAS_PROTOS
2509 #if !defined(__STDC__) || (__STDC__ != 1)
2510 choke me
2511 #endif
2512 #endif
2513
2514 int
2515 main ()
2516 {
2517
2518         int test (int i, double x);
2519         struct s1 {int (*f) (int a);};
2520         struct s2 {int (*f) (double a);};
2521   ;
2522   return 0;
2523 }
2524 _ACEOF
2525 rm -f conftest.$ac_objext
2526 if { (eval echo "$as_me:2526: \"$ac_compile\"") >&5
2527   (eval $ac_compile) 2>&5
2528   ac_status=$?
2529   echo "$as_me:2529: \$? = $ac_status" >&5
2530   (exit $ac_status); } &&
2531          { ac_try='test -s conftest.$ac_objext'
2532   { (eval echo "$as_me:2532: \"$ac_try\"") >&5
2533   (eval $ac_try) 2>&5
2534   ac_status=$?
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); }; }; then
2537   cf_cv_ansi_cc="$cf_arg"; break
2538 else
2539   echo "$as_me: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 fi
2542 rm -f conftest.$ac_objext conftest.$ac_ext
2543 done
2544 CFLAGS="$cf_save_CFLAGS"
2545 CPPFLAGS="$cf_save_CPPFLAGS"
2546
2547 fi
2548 echo "$as_me:2548: result: $cf_cv_ansi_cc" >&5
2549 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2550
2551 if test "$cf_cv_ansi_cc" != "no"; then
2552 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2553
2554 cf_fix_cppflags=no
2555 cf_new_cflags=
2556 cf_new_cppflags=
2557 cf_new_extra_cppflags=
2558
2559 for cf_add_cflags in $cf_cv_ansi_cc
2560 do
2561 case $cf_fix_cppflags in
2562 no)
2563         case $cf_add_cflags in #(vi
2564         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2565                 case $cf_add_cflags in
2566                 -D*)
2567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2568
2569                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2570                         && test -z "${cf_tst_cflags}" \
2571                         && cf_fix_cppflags=yes
2572
2573                         if test $cf_fix_cppflags = yes ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         elif test "${cf_tst_cflags}" = "\"'" ; then
2577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2578                                 continue
2579                         fi
2580                         ;;
2581                 esac
2582                 case "$CPPFLAGS" in
2583                 *$cf_add_cflags) #(vi
2584                         ;;
2585                 *) #(vi
2586                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2587                         ;;
2588                 esac
2589                 ;;
2590         *)
2591                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2592                 ;;
2593         esac
2594         ;;
2595 yes)
2596         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597
2598         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2599
2600         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2601         && test -z "${cf_tst_cflags}" \
2602         && cf_fix_cppflags=no
2603         ;;
2604 esac
2605 done
2606
2607 if test -n "$cf_new_cflags" ; then
2608
2609         CFLAGS="$CFLAGS $cf_new_cflags"
2610 fi
2611
2612 if test -n "$cf_new_cppflags" ; then
2613
2614         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2615 fi
2616
2617 if test -n "$cf_new_extra_cppflags" ; then
2618
2619         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2620 fi
2621
2622 else
2623         cat >>confdefs.h <<\EOF
2624 #define CC_HAS_PROTOS 1
2625 EOF
2626
2627 fi
2628 fi
2629
2630 if test "$cf_cv_ansi_cc" = "no"; then
2631         { { echo "$as_me:2631: error: Your compiler does not appear to recognize prototypes.
2632 You have the following choices:
2633         a. adjust your compiler options
2634         b. get an up-to-date compiler
2635         c. use a wrapper such as unproto" >&5
2636 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2637 You have the following choices:
2638         a. adjust your compiler options
2639         b. get an up-to-date compiler
2640         c. use a wrapper such as unproto" >&2;}
2641    { (exit 1); exit 1; }; }
2642 fi
2643
2644 case $cf_cv_system_name in
2645 os2*)
2646     CFLAGS="$CFLAGS -Zmt"
2647     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2648     CXXFLAGS="$CXXFLAGS -Zmt"
2649     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2650     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2651     ac_cv_exeext=.exe
2652     ;;
2653 esac
2654
2655 PROG_EXT="$EXEEXT"
2656
2657 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2658 #define PROG_EXT "$PROG_EXT"
2659 EOF
2660
2661 if test "$cross_compiling" = yes ; then
2662   LDCONFIG=:
2663 else
2664 case "$cf_cv_system_name" in #(vi
2665 freebsd*) #(vi
2666   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2667   ;;
2668 *) LDPATH=$PATH:/sbin:/usr/sbin
2669   # Extract the first word of "ldconfig", so it can be a program name with args.
2670 set dummy ldconfig; ac_word=$2
2671 echo "$as_me:2671: checking for $ac_word" >&5
2672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2673 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2674   echo $ECHO_N "(cached) $ECHO_C" >&6
2675 else
2676   case $LDCONFIG in
2677   [\\/]* | ?:[\\/]*)
2678   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2679   ;;
2680   *)
2681   ac_save_IFS=$IFS; IFS=$ac_path_separator
2682 ac_dummy="$LDPATH"
2683 for ac_dir in $ac_dummy; do
2684   IFS=$ac_save_IFS
2685   test -z "$ac_dir" && ac_dir=.
2686   if $as_executable_p "$ac_dir/$ac_word"; then
2687    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2688    echo "$as_me:2688: found $ac_dir/$ac_word" >&5
2689    break
2690 fi
2691 done
2692
2693   ;;
2694 esac
2695 fi
2696 LDCONFIG=$ac_cv_path_LDCONFIG
2697
2698 if test -n "$LDCONFIG"; then
2699   echo "$as_me:2699: result: $LDCONFIG" >&5
2700 echo "${ECHO_T}$LDCONFIG" >&6
2701 else
2702   echo "$as_me:2702: result: no" >&5
2703 echo "${ECHO_T}no" >&6
2704 fi
2705
2706   ;;
2707 esac
2708 fi
2709
2710 echo "$as_me:2710: checking if you want to ensure bool is consistent with C++" >&5
2711 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2712
2713 # Check whether --with-cxx or --without-cxx was given.
2714 if test "${with_cxx+set}" = set; then
2715   withval="$with_cxx"
2716   cf_with_cxx=$withval
2717 else
2718   cf_with_cxx=yes
2719 fi;
2720 echo "$as_me:2720: result: $cf_with_cxx" >&5
2721 echo "${ECHO_T}$cf_with_cxx" >&6
2722 if test "X$cf_with_cxx" = Xno ; then
2723         CXX=""
2724         GXX=""
2725 else
2726         # with autoconf 2.13, we can change the error to a warning:
2727                 ac_ext=cc
2728 ac_cpp='$CXXCPP $CPPFLAGS'
2729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2732 ac_main_return=return
2733 if test -n "$ac_tool_prefix"; then
2734   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2735   do
2736     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2737 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2738 echo "$as_me:2738: checking for $ac_word" >&5
2739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2740 if test "${ac_cv_prog_CXX+set}" = set; then
2741   echo $ECHO_N "(cached) $ECHO_C" >&6
2742 else
2743   if test -n "$CXX"; then
2744   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2745 else
2746   ac_save_IFS=$IFS; IFS=$ac_path_separator
2747 ac_dummy="$PATH"
2748 for ac_dir in $ac_dummy; do
2749   IFS=$ac_save_IFS
2750   test -z "$ac_dir" && ac_dir=.
2751   $as_executable_p "$ac_dir/$ac_word" || continue
2752 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2753 echo "$as_me:2753: found $ac_dir/$ac_word" >&5
2754 break
2755 done
2756
2757 fi
2758 fi
2759 CXX=$ac_cv_prog_CXX
2760 if test -n "$CXX"; then
2761   echo "$as_me:2761: result: $CXX" >&5
2762 echo "${ECHO_T}$CXX" >&6
2763 else
2764   echo "$as_me:2764: result: no" >&5
2765 echo "${ECHO_T}no" >&6
2766 fi
2767
2768     test -n "$CXX" && break
2769   done
2770 fi
2771 if test -z "$CXX"; then
2772   ac_ct_CXX=$CXX
2773   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2774 do
2775   # Extract the first word of "$ac_prog", so it can be a program name with args.
2776 set dummy $ac_prog; ac_word=$2
2777 echo "$as_me:2777: checking for $ac_word" >&5
2778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2779 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2780   echo $ECHO_N "(cached) $ECHO_C" >&6
2781 else
2782   if test -n "$ac_ct_CXX"; then
2783   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2784 else
2785   ac_save_IFS=$IFS; IFS=$ac_path_separator
2786 ac_dummy="$PATH"
2787 for ac_dir in $ac_dummy; do
2788   IFS=$ac_save_IFS
2789   test -z "$ac_dir" && ac_dir=.
2790   $as_executable_p "$ac_dir/$ac_word" || continue
2791 ac_cv_prog_ac_ct_CXX="$ac_prog"
2792 echo "$as_me:2792: found $ac_dir/$ac_word" >&5
2793 break
2794 done
2795
2796 fi
2797 fi
2798 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2799 if test -n "$ac_ct_CXX"; then
2800   echo "$as_me:2800: result: $ac_ct_CXX" >&5
2801 echo "${ECHO_T}$ac_ct_CXX" >&6
2802 else
2803   echo "$as_me:2803: result: no" >&5
2804 echo "${ECHO_T}no" >&6
2805 fi
2806
2807   test -n "$ac_ct_CXX" && break
2808 done
2809 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2810
2811   CXX=$ac_ct_CXX
2812 fi
2813
2814 # Provide some information about the compiler.
2815 echo "$as_me:2815:" \
2816      "checking for C++ compiler version" >&5
2817 ac_compiler=`set X $ac_compile; echo $2`
2818 { (eval echo "$as_me:2818: \"$ac_compiler --version </dev/null >&5\"") >&5
2819   (eval $ac_compiler --version </dev/null >&5) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }
2823 { (eval echo "$as_me:2823: \"$ac_compiler -v </dev/null >&5\"") >&5
2824   (eval $ac_compiler -v </dev/null >&5) 2>&5
2825   ac_status=$?
2826   echo "$as_me:2826: \$? = $ac_status" >&5
2827   (exit $ac_status); }
2828 { (eval echo "$as_me:2828: \"$ac_compiler -V </dev/null >&5\"") >&5
2829   (eval $ac_compiler -V </dev/null >&5) 2>&5
2830   ac_status=$?
2831   echo "$as_me:2831: \$? = $ac_status" >&5
2832   (exit $ac_status); }
2833
2834 echo "$as_me:2834: checking whether we are using the GNU C++ compiler" >&5
2835 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2836 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2837   echo $ECHO_N "(cached) $ECHO_C" >&6
2838 else
2839   cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842
2843 int
2844 main ()
2845 {
2846 #ifndef __GNUC__
2847        choke me
2848 #endif
2849
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856   (eval $ac_compile) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); } &&
2860          { ac_try='test -s conftest.$ac_objext'
2861   { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2862   (eval $ac_try) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }; }; then
2866   ac_compiler_gnu=yes
2867 else
2868   echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 ac_compiler_gnu=no
2871 fi
2872 rm -f conftest.$ac_objext conftest.$ac_ext
2873 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2874
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_cxx_compiler_gnu" >&5
2877 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2878 GXX=`test $ac_compiler_gnu = yes && echo yes`
2879 ac_test_CXXFLAGS=${CXXFLAGS+set}
2880 ac_save_CXXFLAGS=$CXXFLAGS
2881 CXXFLAGS="-g"
2882 echo "$as_me:2882: checking whether $CXX accepts -g" >&5
2883 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2884 if test "${ac_cv_prog_cxx_g+set}" = set; then
2885   echo $ECHO_N "(cached) $ECHO_C" >&6
2886 else
2887   cat >conftest.$ac_ext <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890
2891 int
2892 main ()
2893 {
2894
2895   ;
2896   return 0;
2897 }
2898 _ACEOF
2899 rm -f conftest.$ac_objext
2900 if { (eval echo "$as_me:2900: \"$ac_compile\"") >&5
2901   (eval $ac_compile) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); } &&
2905          { ac_try='test -s conftest.$ac_objext'
2906   { (eval echo "$as_me:2906: \"$ac_try\"") >&5
2907   (eval $ac_try) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); }; }; then
2911   ac_cv_prog_cxx_g=yes
2912 else
2913   echo "$as_me: failed program was:" >&5
2914 cat conftest.$ac_ext >&5
2915 ac_cv_prog_cxx_g=no
2916 fi
2917 rm -f conftest.$ac_objext conftest.$ac_ext
2918 fi
2919 echo "$as_me:2919: result: $ac_cv_prog_cxx_g" >&5
2920 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2921 if test "$ac_test_CXXFLAGS" = set; then
2922   CXXFLAGS=$ac_save_CXXFLAGS
2923 elif test $ac_cv_prog_cxx_g = yes; then
2924   if test "$GXX" = yes; then
2925     CXXFLAGS="-g -O2"
2926   else
2927     CXXFLAGS="-g"
2928   fi
2929 else
2930   if test "$GXX" = yes; then
2931     CXXFLAGS="-O2"
2932   else
2933     CXXFLAGS=
2934   fi
2935 fi
2936 for ac_declaration in \
2937    ''\
2938    '#include <stdlib.h>' \
2939    'extern "C" void std::exit (int) throw (); using std::exit;' \
2940    'extern "C" void std::exit (int); using std::exit;' \
2941    'extern "C" void exit (int) throw ();' \
2942    'extern "C" void exit (int);' \
2943    'void exit (int);'
2944 do
2945   cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948 #include <stdlib.h>
2949 $ac_declaration
2950 int
2951 main ()
2952 {
2953 exit (42);
2954   ;
2955   return 0;
2956 }
2957 _ACEOF
2958 rm -f conftest.$ac_objext
2959 if { (eval echo "$as_me:2959: \"$ac_compile\"") >&5
2960   (eval $ac_compile) 2>&5
2961   ac_status=$?
2962   echo "$as_me:2962: \$? = $ac_status" >&5
2963   (exit $ac_status); } &&
2964          { ac_try='test -s conftest.$ac_objext'
2965   { (eval echo "$as_me:2965: \"$ac_try\"") >&5
2966   (eval $ac_try) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }; }; then
2970   :
2971 else
2972   echo "$as_me: failed program was:" >&5
2973 cat conftest.$ac_ext >&5
2974 continue
2975 fi
2976 rm -f conftest.$ac_objext conftest.$ac_ext
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 $ac_declaration
2981 int
2982 main ()
2983 {
2984 exit (42);
2985   ;
2986   return 0;
2987 }
2988 _ACEOF
2989 rm -f conftest.$ac_objext
2990 if { (eval echo "$as_me:2990: \"$ac_compile\"") >&5
2991   (eval $ac_compile) 2>&5
2992   ac_status=$?
2993   echo "$as_me:2993: \$? = $ac_status" >&5
2994   (exit $ac_status); } &&
2995          { ac_try='test -s conftest.$ac_objext'
2996   { (eval echo "$as_me:2996: \"$ac_try\"") >&5
2997   (eval $ac_try) 2>&5
2998   ac_status=$?
2999   echo "$as_me:2999: \$? = $ac_status" >&5
3000   (exit $ac_status); }; }; then
3001   break
3002 else
3003   echo "$as_me: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007 done
3008 rm -f conftest*
3009 if test -n "$ac_declaration"; then
3010   echo '#ifdef __cplusplus' >>confdefs.h
3011   echo $ac_declaration      >>confdefs.h
3012   echo '#endif'             >>confdefs.h
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3018 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return=return
3021
3022                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3023         if test "$CXX" = "g++" ; then
3024                 # Extract the first word of "g++", so it can be a program name with args.
3025 set dummy g++; ac_word=$2
3026 echo "$as_me:3026: checking for $ac_word" >&5
3027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3028 if test "${ac_cv_path_CXX+set}" = set; then
3029   echo $ECHO_N "(cached) $ECHO_C" >&6
3030 else
3031   case $CXX in
3032   [\\/]* | ?:[\\/]*)
3033   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3034   ;;
3035   *)
3036   ac_save_IFS=$IFS; IFS=$ac_path_separator
3037 ac_dummy="$PATH"
3038 for ac_dir in $ac_dummy; do
3039   IFS=$ac_save_IFS
3040   test -z "$ac_dir" && ac_dir=.
3041   if $as_executable_p "$ac_dir/$ac_word"; then
3042    ac_cv_path_CXX="$ac_dir/$ac_word"
3043    echo "$as_me:3043: found $ac_dir/$ac_word" >&5
3044    break
3045 fi
3046 done
3047
3048   ;;
3049 esac
3050 fi
3051 CXX=$ac_cv_path_CXX
3052
3053 if test -n "$CXX"; then
3054   echo "$as_me:3054: result: $CXX" >&5
3055 echo "${ECHO_T}$CXX" >&6
3056 else
3057   echo "$as_me:3057: result: no" >&5
3058 echo "${ECHO_T}no" >&6
3059 fi
3060
3061         fi
3062         if test "$CXX" = "g++" ; then
3063                 { echo "$as_me:3063: WARNING: ignoring hardcoded g++" >&5
3064 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3065                 cf_with_cxx=no; CXX=""; GXX="";
3066         fi
3067 fi
3068
3069 GXX_VERSION=none
3070 if test "$GXX" = yes; then
3071         echo "$as_me:3071: checking version of g++" >&5
3072 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3073         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3074         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3075         echo "$as_me:3075: result: $GXX_VERSION" >&5
3076 echo "${ECHO_T}$GXX_VERSION" >&6
3077 fi
3078
3079 case $GXX_VERSION in
3080 1*|2.[0-6]*)
3081         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3082         # cf_cxx_library=no
3083         { echo "$as_me:3083: WARNING: templates do not work" >&5
3084 echo "$as_me: WARNING: templates do not work" >&2;}
3085         ;;
3086 esac
3087
3088 echo "$as_me:3088: checking if you want to build C++ binding and demo" >&5
3089 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3090
3091 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3092 if test "${with_cxx_binding+set}" = set; then
3093   withval="$with_cxx_binding"
3094   cf_with_cxx_binding=$withval
3095 else
3096   cf_with_cxx_binding=$cf_with_cxx
3097 fi;
3098 echo "$as_me:3098: result: $cf_with_cxx_binding" >&5
3099 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3100
3101 echo "$as_me:3101: checking if you want to build with Ada95" >&5
3102 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3103
3104 # Check whether --with-ada or --without-ada was given.
3105 if test "${with_ada+set}" = set; then
3106   withval="$with_ada"
3107   cf_with_ada=$withval
3108 else
3109   cf_with_ada=yes
3110 fi;
3111 echo "$as_me:3111: result: $cf_with_ada" >&5
3112 echo "${ECHO_T}$cf_with_ada" >&6
3113
3114 echo "$as_me:3114: checking if you want to build programs such as tic" >&5
3115 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3116
3117 # Check whether --with-progs or --without-progs was given.
3118 if test "${with_progs+set}" = set; then
3119   withval="$with_progs"
3120   cf_with_progs=$withval
3121 else
3122   cf_with_progs=yes
3123 fi;
3124 echo "$as_me:3124: result: $cf_with_progs" >&5
3125 echo "${ECHO_T}$cf_with_progs" >&6
3126
3127 echo "$as_me:3127: checking if you wish to install curses.h" >&5
3128 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3129
3130 # Check whether --with-curses-h or --without-curses-h was given.
3131 if test "${with_curses_h+set}" = set; then
3132   withval="$with_curses_h"
3133   with_curses_h=$withval
3134 else
3135   with_curses_h=yes
3136 fi;
3137 echo "$as_me:3137: result: $with_curses_h" >&5
3138 echo "${ECHO_T}$with_curses_h" >&6
3139
3140 modules_to_build="ncurses"
3141 if test "X$cf_with_progs" != Xno ; then
3142 modules_to_build="$modules_to_build progs tack"
3143 fi
3144 modules_to_build="$modules_to_build panel menu form"
3145
3146 test "$program_prefix" != NONE &&
3147   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3148 # Use a double $ so make ignores it.
3149 test "$program_suffix" != NONE &&
3150   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3151 # Double any \ or $.  echo might interpret backslashes.
3152 # By default was `s,x,x', remove it if useless.
3153 cat <<\_ACEOF >conftest.sed
3154 s/[\\$]/&&/g;s/;s,x,x,$//
3155 _ACEOF
3156 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3157 rm conftest.sed
3158
3159 for ac_prog in mawk gawk nawk awk
3160 do
3161   # Extract the first word of "$ac_prog", so it can be a program name with args.
3162 set dummy $ac_prog; ac_word=$2
3163 echo "$as_me:3163: checking for $ac_word" >&5
3164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3165 if test "${ac_cv_prog_AWK+set}" = set; then
3166   echo $ECHO_N "(cached) $ECHO_C" >&6
3167 else
3168   if test -n "$AWK"; then
3169   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3170 else
3171   ac_save_IFS=$IFS; IFS=$ac_path_separator
3172 ac_dummy="$PATH"
3173 for ac_dir in $ac_dummy; do
3174   IFS=$ac_save_IFS
3175   test -z "$ac_dir" && ac_dir=.
3176   $as_executable_p "$ac_dir/$ac_word" || continue
3177 ac_cv_prog_AWK="$ac_prog"
3178 echo "$as_me:3178: found $ac_dir/$ac_word" >&5
3179 break
3180 done
3181
3182 fi
3183 fi
3184 AWK=$ac_cv_prog_AWK
3185 if test -n "$AWK"; then
3186   echo "$as_me:3186: result: $AWK" >&5
3187 echo "${ECHO_T}$AWK" >&6
3188 else
3189   echo "$as_me:3189: result: no" >&5
3190 echo "${ECHO_T}no" >&6
3191 fi
3192
3193   test -n "$AWK" && break
3194 done
3195
3196 test -z "$AWK" && { { echo "$as_me:3196: error: No awk program found" >&5
3197 echo "$as_me: error: No awk program found" >&2;}
3198    { (exit 1); exit 1; }; }
3199
3200 echo "$as_me:3200: checking for egrep" >&5
3201 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3202 if test "${ac_cv_prog_egrep+set}" = set; then
3203   echo $ECHO_N "(cached) $ECHO_C" >&6
3204 else
3205   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3206     then ac_cv_prog_egrep='grep -E'
3207     else ac_cv_prog_egrep='egrep'
3208     fi
3209 fi
3210 echo "$as_me:3210: result: $ac_cv_prog_egrep" >&5
3211 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3212  EGREP=$ac_cv_prog_egrep
3213
3214 test -z "$EGREP" && { { echo "$as_me:3214: error: No egrep program found" >&5
3215 echo "$as_me: error: No egrep program found" >&2;}
3216    { (exit 1); exit 1; }; }
3217
3218 # Find a good install program.  We prefer a C program (faster),
3219 # so one script is as good as another.  But avoid the broken or
3220 # incompatible versions:
3221 # SysV /etc/install, /usr/sbin/install
3222 # SunOS /usr/etc/install
3223 # IRIX /sbin/install
3224 # AIX /bin/install
3225 # AmigaOS /C/install, which installs bootblocks on floppy discs
3226 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3227 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3228 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3229 # ./install, which can be erroneously created by make from ./install.sh.
3230 echo "$as_me:3230: checking for a BSD compatible install" >&5
3231 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3232 if test -z "$INSTALL"; then
3233 if test "${ac_cv_path_install+set}" = set; then
3234   echo $ECHO_N "(cached) $ECHO_C" >&6
3235 else
3236     ac_save_IFS=$IFS; IFS=$ac_path_separator
3237   for ac_dir in $PATH; do
3238     IFS=$ac_save_IFS
3239     # Account for people who put trailing slashes in PATH elements.
3240     case $ac_dir/ in
3241     / | ./ | .// | /cC/* \
3242     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3243     | /usr/ucb/* ) ;;
3244     *)
3245       # OSF1 and SCO ODT 3.0 have their own names for install.
3246       # Don't use installbsd from OSF since it installs stuff as root
3247       # by default.
3248       for ac_prog in ginstall scoinst install; do
3249         if $as_executable_p "$ac_dir/$ac_prog"; then
3250           if test $ac_prog = install &&
3251             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3252             # AIX install.  It has an incompatible calling convention.
3253             :
3254           elif test $ac_prog = install &&
3255             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3256             # program-specific install script used by HP pwplus--don't use.
3257             :
3258           else
3259             ac_cv_path_install="$ac_dir/$ac_prog -c"
3260             break 2
3261           fi
3262         fi
3263       done
3264       ;;
3265     esac
3266   done
3267
3268 fi
3269   if test "${ac_cv_path_install+set}" = set; then
3270     INSTALL=$ac_cv_path_install
3271   else
3272     # As a last resort, use the slow shell script.  We don't cache a
3273     # path for INSTALL within a source directory, because that will
3274     # break other packages using the cache if that directory is
3275     # removed, or if the path is relative.
3276     INSTALL=$ac_install_sh
3277   fi
3278 fi
3279 echo "$as_me:3279: result: $INSTALL" >&5
3280 echo "${ECHO_T}$INSTALL" >&6
3281
3282 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3283 # It thinks the first close brace ends the variable substitution.
3284 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3285
3286 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3287
3288 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3289
3290 case $INSTALL in
3291 /*)
3292   ;;
3293 *)
3294   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3295   test -z "$cf_dir" && cf_dir=.
3296   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3297   ;;
3298 esac
3299
3300 for ac_prog in tdlint lint alint
3301 do
3302   # Extract the first word of "$ac_prog", so it can be a program name with args.
3303 set dummy $ac_prog; ac_word=$2
3304 echo "$as_me:3304: checking for $ac_word" >&5
3305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3306 if test "${ac_cv_prog_LINT+set}" = set; then
3307   echo $ECHO_N "(cached) $ECHO_C" >&6
3308 else
3309   if test -n "$LINT"; then
3310   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3311 else
3312   ac_save_IFS=$IFS; IFS=$ac_path_separator
3313 ac_dummy="$PATH"
3314 for ac_dir in $ac_dummy; do
3315   IFS=$ac_save_IFS
3316   test -z "$ac_dir" && ac_dir=.
3317   $as_executable_p "$ac_dir/$ac_word" || continue
3318 ac_cv_prog_LINT="$ac_prog"
3319 echo "$as_me:3319: found $ac_dir/$ac_word" >&5
3320 break
3321 done
3322
3323 fi
3324 fi
3325 LINT=$ac_cv_prog_LINT
3326 if test -n "$LINT"; then
3327   echo "$as_me:3327: result: $LINT" >&5
3328 echo "${ECHO_T}$LINT" >&6
3329 else
3330   echo "$as_me:3330: result: no" >&5
3331 echo "${ECHO_T}no" >&6
3332 fi
3333
3334   test -n "$LINT" && break
3335 done
3336
3337 echo "$as_me:3337: checking whether ln -s works" >&5
3338 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3339 LN_S=$as_ln_s
3340 if test "$LN_S" = "ln -s"; then
3341   echo "$as_me:3341: result: yes" >&5
3342 echo "${ECHO_T}yes" >&6
3343 else
3344   echo "$as_me:3344: result: no, using $LN_S" >&5
3345 echo "${ECHO_T}no, using $LN_S" >&6
3346 fi
3347
3348 echo "$as_me:3348: checking for long file names" >&5
3349 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3350 if test "${ac_cv_sys_long_file_names+set}" = set; then
3351   echo $ECHO_N "(cached) $ECHO_C" >&6
3352 else
3353   ac_cv_sys_long_file_names=yes
3354 # Test for long file names in all the places we know might matter:
3355 #      .                the current directory, where building will happen
3356 #      $prefix/lib      where we will be installing things
3357 #      $exec_prefix/lib likewise
3358 # eval it to expand exec_prefix.
3359 #      $TMPDIR          if set, where it might want to write temporary files
3360 # if $TMPDIR is not set:
3361 #      /tmp             where it might want to write temporary files
3362 #      /var/tmp         likewise
3363 #      /usr/tmp         likewise
3364 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3365   ac_tmpdirs=$TMPDIR
3366 else
3367   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3368 fi
3369 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3370   test -d $ac_dir || continue
3371   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3372   ac_xdir=$ac_dir/cf$$
3373   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3374   ac_tf1=$ac_xdir/conftest9012345
3375   ac_tf2=$ac_xdir/conftest9012346
3376   (echo 1 >$ac_tf1) 2>/dev/null
3377   (echo 2 >$ac_tf2) 2>/dev/null
3378   ac_val=`cat $ac_tf1 2>/dev/null`
3379   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3380     ac_cv_sys_long_file_names=no
3381     rm -rf $ac_xdir 2>/dev/null
3382     break
3383   fi
3384   rm -rf $ac_xdir 2>/dev/null
3385 done
3386 fi
3387 echo "$as_me:3387: result: $ac_cv_sys_long_file_names" >&5
3388 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3389 if test $ac_cv_sys_long_file_names = yes; then
3390
3391 cat >>confdefs.h <<\EOF
3392 #define HAVE_LONG_FILE_NAMES 1
3393 EOF
3394
3395 fi
3396
3397 echo "$as_me:3397: checking if we should assume mixed-case filenames" >&5
3398 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3399
3400 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3401 if test "${enable_mixed_case+set}" = set; then
3402   enableval="$enable_mixed_case"
3403   enable_mixedcase=$enableval
3404 else
3405   enable_mixedcase=auto
3406 fi;
3407 echo "$as_me:3407: result: $enable_mixedcase" >&5
3408 echo "${ECHO_T}$enable_mixedcase" >&6
3409 if test "$enable_mixedcase" = "auto" ; then
3410
3411 echo "$as_me:3411: checking if filesystem supports mixed-case filenames" >&5
3412 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3413 if test "${cf_cv_mixedcase+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416
3417 if test "$cross_compiling" = yes ; then
3418         case $target_alias in #(vi
3419         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3420                 cf_cv_mixedcase=no
3421                 ;;
3422         *)
3423                 cf_cv_mixedcase=yes
3424                 ;;
3425         esac
3426 else
3427         rm -f conftest CONFTEST
3428         echo test >conftest
3429         if test -f CONFTEST ; then
3430                 cf_cv_mixedcase=no
3431         else
3432                 cf_cv_mixedcase=yes
3433         fi
3434         rm -f conftest CONFTEST
3435 fi
3436
3437 fi
3438 echo "$as_me:3438: result: $cf_cv_mixedcase" >&5
3439 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3440 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3441 #define MIXEDCASE_FILENAMES 1
3442 EOF
3443
3444 else
3445     cf_cv_mixedcase=$enable_mixedcase
3446     if test "$enable_mixedcase" = "yes" ; then
3447         cat >>confdefs.h <<\EOF
3448 #define MIXEDCASE_FILENAMES 1
3449 EOF
3450
3451     fi
3452 fi
3453
3454 # do this after mixed-case option (tags/TAGS is not as important as tic).
3455 echo "$as_me:3455: checking whether ${MAKE-make} sets \${MAKE}" >&5
3456 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3457 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3458 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3459   echo $ECHO_N "(cached) $ECHO_C" >&6
3460 else
3461   cat >conftest.make <<\EOF
3462 all:
3463         @echo 'ac_maketemp="${MAKE}"'
3464 EOF
3465 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3466 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3467 if test -n "$ac_maketemp"; then
3468   eval ac_cv_prog_make_${ac_make}_set=yes
3469 else
3470   eval ac_cv_prog_make_${ac_make}_set=no
3471 fi
3472 rm -f conftest.make
3473 fi
3474 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3475   echo "$as_me:3475: result: yes" >&5
3476 echo "${ECHO_T}yes" >&6
3477   SET_MAKE=
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481   SET_MAKE="MAKE=${MAKE-make}"
3482 fi
3483
3484 # Extract the first word of "ctags", so it can be a program name with args.
3485 set dummy ctags; ac_word=$2
3486 echo "$as_me:3486: checking for $ac_word" >&5
3487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3488 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3489   echo $ECHO_N "(cached) $ECHO_C" >&6
3490 else
3491   if test -n "$MAKE_LOWER_TAGS"; then
3492   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3493 else
3494   ac_save_IFS=$IFS; IFS=$ac_path_separator
3495 ac_dummy="$PATH"
3496 for ac_dir in $ac_dummy; do
3497   IFS=$ac_save_IFS
3498   test -z "$ac_dir" && ac_dir=.
3499   $as_executable_p "$ac_dir/$ac_word" || continue
3500 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3501 echo "$as_me:3501: found $ac_dir/$ac_word" >&5
3502 break
3503 done
3504
3505   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3506 fi
3507 fi
3508 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3509 if test -n "$MAKE_LOWER_TAGS"; then
3510   echo "$as_me:3510: result: $MAKE_LOWER_TAGS" >&5
3511 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3512 else
3513   echo "$as_me:3513: result: no" >&5
3514 echo "${ECHO_T}no" >&6
3515 fi
3516
3517 if test "$cf_cv_mixedcase" = yes ; then
3518         # Extract the first word of "etags", so it can be a program name with args.
3519 set dummy etags; ac_word=$2
3520 echo "$as_me:3520: checking for $ac_word" >&5
3521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3522 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3523   echo $ECHO_N "(cached) $ECHO_C" >&6
3524 else
3525   if test -n "$MAKE_UPPER_TAGS"; then
3526   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3527 else
3528   ac_save_IFS=$IFS; IFS=$ac_path_separator
3529 ac_dummy="$PATH"
3530 for ac_dir in $ac_dummy; do
3531   IFS=$ac_save_IFS
3532   test -z "$ac_dir" && ac_dir=.
3533   $as_executable_p "$ac_dir/$ac_word" || continue
3534 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3535 echo "$as_me:3535: found $ac_dir/$ac_word" >&5
3536 break
3537 done
3538
3539   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3540 fi
3541 fi
3542 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3543 if test -n "$MAKE_UPPER_TAGS"; then
3544   echo "$as_me:3544: result: $MAKE_UPPER_TAGS" >&5
3545 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3546 else
3547   echo "$as_me:3547: result: no" >&5
3548 echo "${ECHO_T}no" >&6
3549 fi
3550
3551 else
3552         MAKE_UPPER_TAGS=no
3553 fi
3554
3555 if test "$MAKE_UPPER_TAGS" = yes ; then
3556         MAKE_UPPER_TAGS=
3557 else
3558         MAKE_UPPER_TAGS="#"
3559 fi
3560
3561 if test "$MAKE_LOWER_TAGS" = yes ; then
3562         MAKE_LOWER_TAGS=
3563 else
3564         MAKE_LOWER_TAGS="#"
3565 fi
3566
3567 echo "$as_me:3567: checking for makeflags variable" >&5
3568 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3569 if test "${cf_cv_makeflags+set}" = set; then
3570   echo $ECHO_N "(cached) $ECHO_C" >&6
3571 else
3572
3573         cf_cv_makeflags=''
3574         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3575         do
3576                 cat >cf_makeflags.tmp <<CF_EOF
3577 SHELL = /bin/sh
3578 all :
3579         @ echo '.$cf_option'
3580 CF_EOF
3581                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3582                 case "$cf_result" in
3583                 .*k)
3584                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3585                         case "$cf_result" in
3586                         .*CC=*) cf_cv_makeflags=
3587                                 ;;
3588                         *)      cf_cv_makeflags=$cf_option
3589                                 ;;
3590                         esac
3591                         break
3592                         ;;
3593                 .-)     ;;
3594                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3595                         ;;
3596                 esac
3597         done
3598         rm -f cf_makeflags.tmp
3599
3600 fi
3601 echo "$as_me:3601: result: $cf_cv_makeflags" >&5
3602 echo "${ECHO_T}$cf_cv_makeflags" >&6
3603
3604 if test -n "$ac_tool_prefix"; then
3605   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3606 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3607 echo "$as_me:3607: checking for $ac_word" >&5
3608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3609 if test "${ac_cv_prog_RANLIB+set}" = set; then
3610   echo $ECHO_N "(cached) $ECHO_C" >&6
3611 else
3612   if test -n "$RANLIB"; then
3613   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3614 else
3615   ac_save_IFS=$IFS; IFS=$ac_path_separator
3616 ac_dummy="$PATH"
3617 for ac_dir in $ac_dummy; do
3618   IFS=$ac_save_IFS
3619   test -z "$ac_dir" && ac_dir=.
3620   $as_executable_p "$ac_dir/$ac_word" || continue
3621 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3622 echo "$as_me:3622: found $ac_dir/$ac_word" >&5
3623 break
3624 done
3625
3626 fi
3627 fi
3628 RANLIB=$ac_cv_prog_RANLIB
3629 if test -n "$RANLIB"; then
3630   echo "$as_me:3630: result: $RANLIB" >&5
3631 echo "${ECHO_T}$RANLIB" >&6
3632 else
3633   echo "$as_me:3633: result: no" >&5
3634 echo "${ECHO_T}no" >&6
3635 fi
3636
3637 fi
3638 if test -z "$ac_cv_prog_RANLIB"; then
3639   ac_ct_RANLIB=$RANLIB
3640   # Extract the first word of "ranlib", so it can be a program name with args.
3641 set dummy ranlib; ac_word=$2
3642 echo "$as_me:3642: checking for $ac_word" >&5
3643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3644 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647   if test -n "$ac_ct_RANLIB"; then
3648   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3649 else
3650   ac_save_IFS=$IFS; IFS=$ac_path_separator
3651 ac_dummy="$PATH"
3652 for ac_dir in $ac_dummy; do
3653   IFS=$ac_save_IFS
3654   test -z "$ac_dir" && ac_dir=.
3655   $as_executable_p "$ac_dir/$ac_word" || continue
3656 ac_cv_prog_ac_ct_RANLIB="ranlib"
3657 echo "$as_me:3657: found $ac_dir/$ac_word" >&5
3658 break
3659 done
3660
3661   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3662 fi
3663 fi
3664 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3665 if test -n "$ac_ct_RANLIB"; then
3666   echo "$as_me:3666: result: $ac_ct_RANLIB" >&5
3667 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3668 else
3669   echo "$as_me:3669: result: no" >&5
3670 echo "${ECHO_T}no" >&6
3671 fi
3672
3673   RANLIB=$ac_ct_RANLIB
3674 else
3675   RANLIB="$ac_cv_prog_RANLIB"
3676 fi
3677
3678 if test -n "$ac_tool_prefix"; then
3679   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3680 set dummy ${ac_tool_prefix}ld; ac_word=$2
3681 echo "$as_me:3681: checking for $ac_word" >&5
3682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683 if test "${ac_cv_prog_LD+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686   if test -n "$LD"; then
3687   ac_cv_prog_LD="$LD" # Let the user override the test.
3688 else
3689   ac_save_IFS=$IFS; IFS=$ac_path_separator
3690 ac_dummy="$PATH"
3691 for ac_dir in $ac_dummy; do
3692   IFS=$ac_save_IFS
3693   test -z "$ac_dir" && ac_dir=.
3694   $as_executable_p "$ac_dir/$ac_word" || continue
3695 ac_cv_prog_LD="${ac_tool_prefix}ld"
3696 echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3697 break
3698 done
3699
3700 fi
3701 fi
3702 LD=$ac_cv_prog_LD
3703 if test -n "$LD"; then
3704   echo "$as_me:3704: result: $LD" >&5
3705 echo "${ECHO_T}$LD" >&6
3706 else
3707   echo "$as_me:3707: result: no" >&5
3708 echo "${ECHO_T}no" >&6
3709 fi
3710
3711 fi
3712 if test -z "$ac_cv_prog_LD"; then
3713   ac_ct_LD=$LD
3714   # Extract the first word of "ld", so it can be a program name with args.
3715 set dummy ld; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3719   echo $ECHO_N "(cached) $ECHO_C" >&6
3720 else
3721   if test -n "$ac_ct_LD"; then
3722   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3723 else
3724   ac_save_IFS=$IFS; IFS=$ac_path_separator
3725 ac_dummy="$PATH"
3726 for ac_dir in $ac_dummy; do
3727   IFS=$ac_save_IFS
3728   test -z "$ac_dir" && ac_dir=.
3729   $as_executable_p "$ac_dir/$ac_word" || continue
3730 ac_cv_prog_ac_ct_LD="ld"
3731 echo "$as_me:3731: found $ac_dir/$ac_word" >&5
3732 break
3733 done
3734
3735   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3736 fi
3737 fi
3738 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3739 if test -n "$ac_ct_LD"; then
3740   echo "$as_me:3740: result: $ac_ct_LD" >&5
3741 echo "${ECHO_T}$ac_ct_LD" >&6
3742 else
3743   echo "$as_me:3743: result: no" >&5
3744 echo "${ECHO_T}no" >&6
3745 fi
3746
3747   LD=$ac_ct_LD
3748 else
3749   LD="$ac_cv_prog_LD"
3750 fi
3751
3752 if test -n "$ac_tool_prefix"; then
3753   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3754 set dummy ${ac_tool_prefix}ar; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_AR+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$AR"; then
3761   ac_cv_prog_AR="$AR" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_AR="${ac_tool_prefix}ar"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 AR=$ac_cv_prog_AR
3777 if test -n "$AR"; then
3778   echo "$as_me:3778: result: $AR" >&5
3779 echo "${ECHO_T}$AR" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785 fi
3786 if test -z "$ac_cv_prog_AR"; then
3787   ac_ct_AR=$AR
3788   # Extract the first word of "ar", so it can be a program name with args.
3789 set dummy ar; ac_word=$2
3790 echo "$as_me:3790: checking for $ac_word" >&5
3791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3792 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3793   echo $ECHO_N "(cached) $ECHO_C" >&6
3794 else
3795   if test -n "$ac_ct_AR"; then
3796   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3797 else
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   $as_executable_p "$ac_dir/$ac_word" || continue
3804 ac_cv_prog_ac_ct_AR="ar"
3805 echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806 break
3807 done
3808
3809   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3810 fi
3811 fi
3812 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3813 if test -n "$ac_ct_AR"; then
3814   echo "$as_me:3814: result: $ac_ct_AR" >&5
3815 echo "${ECHO_T}$ac_ct_AR" >&6
3816 else
3817   echo "$as_me:3817: result: no" >&5
3818 echo "${ECHO_T}no" >&6
3819 fi
3820
3821   AR=$ac_ct_AR
3822 else
3823   AR="$ac_cv_prog_AR"
3824 fi
3825
3826 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3827   echo $ECHO_N "(cached) $ECHO_C" >&6
3828 else
3829
3830 echo "$as_me:3830: checking for archiver options (symbol AR_OPTS)" >&5
3831 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3832
3833 if test -z "$AR_OPTS" ; then
3834         AR_OPTS=rv
3835
3836 fi
3837
3838 cf_cv_subst_AR_OPTS=$AR_OPTS
3839 echo "$as_me:3839: result: $AR_OPTS" >&5
3840 echo "${ECHO_T}$AR_OPTS" >&6
3841
3842 fi
3843
3844 echo "$as_me:3844: checking if you have specified an install-prefix" >&5
3845 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3846
3847 # Check whether --with-install-prefix or --without-install-prefix was given.
3848 if test "${with_install_prefix+set}" = set; then
3849   withval="$with_install_prefix"
3850   case "$withval" in #(vi
3851         yes|no) #(vi
3852                 ;;
3853         *)      DESTDIR="$withval"
3854                 ;;
3855         esac
3856 fi;
3857 echo "$as_me:3857: result: $DESTDIR" >&5
3858 echo "${ECHO_T}$DESTDIR" >&6
3859
3860 ###############################################################################
3861
3862 # If we're cross-compiling, allow the user to override the tools and their
3863 # options.  The configure script is oriented toward identifying the host
3864 # compiler, etc., but we need a build compiler to generate parts of the source.
3865
3866 if test "$cross_compiling" = yes ; then
3867
3868         # defaults that we might want to override
3869         : ${BUILD_CFLAGS:=''}
3870         : ${BUILD_CPPFLAGS:=''}
3871         : ${BUILD_LDFLAGS:=''}
3872         : ${BUILD_LIBS:=''}
3873         : ${BUILD_EXEEXT:='$x'}
3874         : ${BUILD_OBJEXT:='o'}
3875
3876 # Check whether --with-build-cc or --without-build-cc was given.
3877 if test "${with_build_cc+set}" = set; then
3878   withval="$with_build_cc"
3879   BUILD_CC="$withval"
3880 else
3881   for ac_prog in gcc cc cl
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$BUILD_CC"; then
3891   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_BUILD_CC="$ac_prog"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 BUILD_CC=$ac_cv_prog_BUILD_CC
3907 if test -n "$BUILD_CC"; then
3908   echo "$as_me:3908: result: $BUILD_CC" >&5
3909 echo "${ECHO_T}$BUILD_CC" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915   test -n "$BUILD_CC" && break
3916 done
3917
3918 fi;
3919         echo "$as_me:3919: checking for native build C compiler" >&5
3920 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3921         echo "$as_me:3921: result: $BUILD_CC" >&5
3922 echo "${ECHO_T}$BUILD_CC" >&6
3923
3924         echo "$as_me:3924: checking for native build C preprocessor" >&5
3925 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3926
3927 # Check whether --with-build-cpp or --without-build-cpp was given.
3928 if test "${with_build_cpp+set}" = set; then
3929   withval="$with_build_cpp"
3930   BUILD_CPP="$withval"
3931 else
3932   BUILD_CPP='${BUILD_CC} -E'
3933 fi;
3934         echo "$as_me:3934: result: $BUILD_CPP" >&5
3935 echo "${ECHO_T}$BUILD_CPP" >&6
3936
3937         echo "$as_me:3937: checking for native build C flags" >&5
3938 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3939
3940 # Check whether --with-build-cflags or --without-build-cflags was given.
3941 if test "${with_build_cflags+set}" = set; then
3942   withval="$with_build_cflags"
3943   BUILD_CFLAGS="$withval"
3944 fi;
3945         echo "$as_me:3945: result: $BUILD_CFLAGS" >&5
3946 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3947
3948         echo "$as_me:3948: checking for native build C preprocessor-flags" >&5
3949 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3950
3951 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3952 if test "${with_build_cppflags+set}" = set; then
3953   withval="$with_build_cppflags"
3954   BUILD_CPPFLAGS="$withval"
3955 fi;
3956         echo "$as_me:3956: result: $BUILD_CPPFLAGS" >&5
3957 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3958
3959         echo "$as_me:3959: checking for native build linker-flags" >&5
3960 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3961
3962 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3963 if test "${with_build_ldflags+set}" = set; then
3964   withval="$with_build_ldflags"
3965   BUILD_LDFLAGS="$withval"
3966 fi;
3967         echo "$as_me:3967: result: $BUILD_LDFLAGS" >&5
3968 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3969
3970         echo "$as_me:3970: checking for native build linker-libraries" >&5
3971 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3972
3973 # Check whether --with-build-libs or --without-build-libs was given.
3974 if test "${with_build_libs+set}" = set; then
3975   withval="$with_build_libs"
3976   BUILD_LIBS="$withval"
3977 fi;
3978         echo "$as_me:3978: result: $BUILD_LIBS" >&5
3979 echo "${ECHO_T}$BUILD_LIBS" >&6
3980
3981         # this assumes we're on Unix.
3982         BUILD_EXEEXT=
3983         BUILD_OBJEXT=o
3984
3985         : ${BUILD_CC:='${CC}'}
3986
3987         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3988                 { { echo "$as_me:3988: error: Cross-build requires two compilers.
3989 Use --with-build-cc to specify the native compiler." >&5
3990 echo "$as_me: error: Cross-build requires two compilers.
3991 Use --with-build-cc to specify the native compiler." >&2;}
3992    { (exit 1); exit 1; }; }
3993         fi
3994
3995 else
3996         : ${BUILD_CC:='${CC}'}
3997         : ${BUILD_CPP:='${CPP}'}
3998         : ${BUILD_CFLAGS:='${CFLAGS}'}
3999         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4000         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4001         : ${BUILD_LIBS:='${LIBS}'}
4002         : ${BUILD_EXEEXT:='$x'}
4003         : ${BUILD_OBJEXT:='o'}
4004 fi
4005
4006 ###############################################################################
4007
4008 ### Options to allow the user to specify the set of libraries which are used.
4009 ### Use "--without-normal --with-shared" to allow the default model to be
4010 ### shared, for example.
4011 cf_list_models=""
4012
4013 LIBTOOL=
4014
4015 # common library maintenance symbols that are convenient for libtool scripts:
4016 LIB_CREATE='${AR} -cr'
4017 LIB_OBJECT='${OBJECTS}'
4018 LIB_SUFFIX=.a
4019 LIB_PREP="$RANLIB"
4020
4021 # symbols used to prop libtool up to enable it to determine what it should be
4022 # doing:
4023 LIB_CLEAN=
4024 LIB_COMPILE=
4025 LIB_LINK='${CC}'
4026 LIB_INSTALL=
4027 LIB_UNINSTALL=
4028
4029 echo "$as_me:4029: checking if you want to build libraries with libtool" >&5
4030 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4031
4032 # Check whether --with-libtool or --without-libtool was given.
4033 if test "${with_libtool+set}" = set; then
4034   withval="$with_libtool"
4035   with_libtool=$withval
4036 else
4037   with_libtool=no
4038 fi;
4039 echo "$as_me:4039: result: $with_libtool" >&5
4040 echo "${ECHO_T}$with_libtool" >&6
4041 if test "$with_libtool" != "no"; then
4042
4043         if test "$with_libtool" != "yes" ; then
4044
4045 if test "x$prefix" != xNONE; then
4046   cf_path_syntax="$prefix"
4047 else
4048   cf_path_syntax="$ac_default_prefix"
4049 fi
4050
4051 case ".$with_libtool" in #(vi
4052 .\$\(*\)*|.\'*\'*) #(vi
4053   ;;
4054 ..|./*|.\\*) #(vi
4055   ;;
4056 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4057   ;;
4058 .\${*prefix}*) #(vi
4059   eval with_libtool="$with_libtool"
4060   case ".$with_libtool" in #(vi
4061   .NONE/*)
4062     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4063     ;;
4064   esac
4065   ;; #(vi
4066 .no|.NONE/*)
4067   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4068   ;;
4069 *)
4070   { { echo "$as_me:4070: error: expected a pathname, not \"$with_libtool\"" >&5
4071 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4072    { (exit 1); exit 1; }; }
4073   ;;
4074 esac
4075
4076                 LIBTOOL=$with_libtool
4077         else
4078                 # Extract the first word of "libtool", so it can be a program name with args.
4079 set dummy libtool; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   case $LIBTOOL in
4086   [\\/]* | ?:[\\/]*)
4087   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4088   ;;
4089   *)
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   if $as_executable_p "$ac_dir/$ac_word"; then
4096    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4097    echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098    break
4099 fi
4100 done
4101
4102   ;;
4103 esac
4104 fi
4105 LIBTOOL=$ac_cv_path_LIBTOOL
4106
4107 if test -n "$LIBTOOL"; then
4108   echo "$as_me:4108: result: $LIBTOOL" >&5
4109 echo "${ECHO_T}$LIBTOOL" >&6
4110 else
4111   echo "$as_me:4111: result: no" >&5
4112 echo "${ECHO_T}no" >&6
4113 fi
4114
4115         fi
4116         if test -z "$LIBTOOL" ; then
4117                 { { echo "$as_me:4117: error: Cannot find libtool" >&5
4118 echo "$as_me: error: Cannot find libtool" >&2;}
4119    { (exit 1); exit 1; }; }
4120         fi
4121         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4122         LIB_OBJECT='${OBJECTS:.o=.lo}'
4123         LIB_SUFFIX=.la
4124         LIB_CLEAN='${LIBTOOL} --mode=clean'
4125         LIB_COMPILE='${LIBTOOL} --mode=compile'
4126         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4127         LIB_INSTALL='${LIBTOOL} --mode=install'
4128         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4129         LIB_PREP=:
4130
4131         # Show the version of libtool
4132         echo "$as_me:4132: checking version of libtool" >&5
4133 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4134
4135         # Save the version in a cache variable - this is not entirely a good
4136         # thing, but the version string from libtool is very ugly, and for
4137         # bug reports it might be useful to have the original string.
4138         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.].*//'`
4139         echo "$as_me:4139: result: $cf_cv_libtool_version" >&5
4140 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4141         if test -z "$cf_cv_libtool_version" ; then
4142                 { { echo "$as_me:4142: error: This is not GNU libtool" >&5
4143 echo "$as_me: error: This is not GNU libtool" >&2;}
4144    { (exit 1); exit 1; }; }
4145         fi
4146
4147         # special hack to add --tag option for C++ compiler
4148         case $cf_cv_libtool_version in
4149         1.[5-9]*|[2-9]*)
4150                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4151                 LIBTOOL="$LIBTOOL --tag=CC"
4152                 ;;
4153         *)
4154                 LIBTOOL_CXX="$LIBTOOL"
4155                 ;;
4156         esac
4157 else
4158         LIBTOOL=""
4159         LIBTOOL_CXX=""
4160 fi
4161
4162 test -z "$LIBTOOL" && ECHO_LT=
4163
4164 if test "$with_libtool" != "no" ; then
4165
4166 cf_list_models="$cf_list_models libtool"
4167
4168 else
4169
4170 echo "$as_me:4170: checking if you want to build shared libraries" >&5
4171 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4172
4173 # Check whether --with-shared or --without-shared was given.
4174 if test "${with_shared+set}" = set; then
4175   withval="$with_shared"
4176   with_shared=$withval
4177 else
4178   with_shared=no
4179 fi;
4180 echo "$as_me:4180: result: $with_shared" >&5
4181 echo "${ECHO_T}$with_shared" >&6
4182 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4183
4184 echo "$as_me:4184: checking if you want to build static libraries" >&5
4185 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4186
4187 # Check whether --with-normal or --without-normal was given.
4188 if test "${with_normal+set}" = set; then
4189   withval="$with_normal"
4190   with_normal=$withval
4191 else
4192   with_normal=yes
4193 fi;
4194 echo "$as_me:4194: result: $with_normal" >&5
4195 echo "${ECHO_T}$with_normal" >&6
4196 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4197
4198 echo "$as_me:4198: checking if you want to build debug libraries" >&5
4199 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4200
4201 # Check whether --with-debug or --without-debug was given.
4202 if test "${with_debug+set}" = set; then
4203   withval="$with_debug"
4204   with_debug=$withval
4205 else
4206   with_debug=yes
4207 fi;
4208 echo "$as_me:4208: result: $with_debug" >&5
4209 echo "${ECHO_T}$with_debug" >&6
4210 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4211
4212 echo "$as_me:4212: checking if you want to build profiling libraries" >&5
4213 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4214
4215 # Check whether --with-profile or --without-profile was given.
4216 if test "${with_profile+set}" = set; then
4217   withval="$with_profile"
4218   with_profile=$withval
4219 else
4220   with_profile=no
4221 fi;
4222 echo "$as_me:4222: result: $with_profile" >&5
4223 echo "${ECHO_T}$with_profile" >&6
4224 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4225
4226 fi
4227
4228 ###############################################################################
4229
4230 echo "$as_me:4230: checking for specified models" >&5
4231 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4232 test -z "$cf_list_models" && cf_list_models=normal
4233 test "$with_libtool" != "no" && cf_list_models=libtool
4234 echo "$as_me:4234: result: $cf_list_models" >&5
4235 echo "${ECHO_T}$cf_list_models" >&6
4236
4237 ### Use the first model as the default, and save its suffix for use in building
4238 ### up test-applications.
4239 echo "$as_me:4239: checking for default model" >&5
4240 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4241 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4242 echo "$as_me:4242: result: $DFT_LWR_MODEL" >&5
4243 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4244
4245 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4246
4247 TICS_NAME=tic
4248
4249 TINFO_NAME=tinfo
4250
4251 LIB_NAME=ncurses
4252
4253 LIB_DIR=../lib
4254 LIB_2ND=../../lib
4255
4256         case $cf_cv_system_name in
4257         OS/2*)  LIB_PREFIX=''     ;;
4258         os2*)   LIB_PREFIX=''     ;;
4259         *)      LIB_PREFIX='lib'  ;;
4260         esac
4261 cf_prefix=$LIB_PREFIX
4262
4263 LIB_PREFIX=$cf_prefix
4264
4265 LIB_SUFFIX=
4266
4267 ###############################################################################
4268
4269 echo "$as_me:4269: checking if you want to build a separate terminfo library" >&5
4270 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4271
4272 # Check whether --with-termlib or --without-termlib was given.
4273 if test "${with_termlib+set}" = set; then
4274   withval="$with_termlib"
4275   with_termlib=$withval
4276 else
4277   with_termlib=no
4278 fi;
4279 echo "$as_me:4279: result: $with_termlib" >&5
4280 echo "${ECHO_T}$with_termlib" >&6
4281
4282 echo "$as_me:4282: checking if you want to build a separate tic library" >&5
4283 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4284
4285 # Check whether --with-ticlib or --without-ticlib was given.
4286 if test "${with_ticlib+set}" = set; then
4287   withval="$with_ticlib"
4288   with_ticlib=$withval
4289 else
4290   with_ticlib=no
4291 fi;
4292 echo "$as_me:4292: result: $with_ticlib" >&5
4293 echo "${ECHO_T}$with_ticlib" >&6
4294
4295 ### Checks for special libraries, must be done up-front.
4296 SHLIB_LIST=""
4297
4298 echo "$as_me:4298: checking if you want to link with the GPM mouse library" >&5
4299 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4300
4301 # Check whether --with-gpm or --without-gpm was given.
4302 if test "${with_gpm+set}" = set; then
4303   withval="$with_gpm"
4304   with_gpm=$withval
4305 else
4306   with_gpm=maybe
4307 fi;
4308 echo "$as_me:4308: result: $with_gpm" >&5
4309 echo "${ECHO_T}$with_gpm" >&6
4310
4311 if test "$with_gpm" != no ; then
4312         echo "$as_me:4312: checking for gpm.h" >&5
4313 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4314 if test "${ac_cv_header_gpm_h+set}" = set; then
4315   echo $ECHO_N "(cached) $ECHO_C" >&6
4316 else
4317   cat >conftest.$ac_ext <<_ACEOF
4318 #line 4318 "configure"
4319 #include "confdefs.h"
4320 #include <gpm.h>
4321 _ACEOF
4322 if { (eval echo "$as_me:4322: \"$ac_cpp conftest.$ac_ext\"") >&5
4323   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4324   ac_status=$?
4325   egrep -v '^ *\+' conftest.er1 >conftest.err
4326   rm -f conftest.er1
4327   cat conftest.err >&5
4328   echo "$as_me:4328: \$? = $ac_status" >&5
4329   (exit $ac_status); } >/dev/null; then
4330   if test -s conftest.err; then
4331     ac_cpp_err=$ac_c_preproc_warn_flag
4332   else
4333     ac_cpp_err=
4334   fi
4335 else
4336   ac_cpp_err=yes
4337 fi
4338 if test -z "$ac_cpp_err"; then
4339   ac_cv_header_gpm_h=yes
4340 else
4341   echo "$as_me: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   ac_cv_header_gpm_h=no
4344 fi
4345 rm -f conftest.err conftest.$ac_ext
4346 fi
4347 echo "$as_me:4347: result: $ac_cv_header_gpm_h" >&5
4348 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4349 if test $ac_cv_header_gpm_h = yes; then
4350
4351                 cat >>confdefs.h <<\EOF
4352 #define HAVE_GPM_H 1
4353 EOF
4354
4355                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4356                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4357
4358 echo "${as_me-configure}:4358: testing assuming we really have GPM library ..." 1>&5
4359
4360                         cat >>confdefs.h <<\EOF
4361 #define HAVE_LIBGPM 1
4362 EOF
4363
4364                 else
4365                         echo "$as_me:4365: checking for Gpm_Open in -lgpm" >&5
4366 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4367 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4368   echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370   ac_check_lib_save_LIBS=$LIBS
4371 LIBS="-lgpm  $LIBS"
4372 cat >conftest.$ac_ext <<_ACEOF
4373 #line 4373 "configure"
4374 #include "confdefs.h"
4375
4376 /* Override any gcc2 internal prototype to avoid an error.  */
4377 #ifdef __cplusplus
4378 extern "C"
4379 #endif
4380 /* We use char because int might match the return type of a gcc2
4381    builtin and then its argument prototype would still apply.  */
4382 char Gpm_Open ();
4383 int
4384 main ()
4385 {
4386 Gpm_Open ();
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 rm -f conftest.$ac_objext conftest$ac_exeext
4392 if { (eval echo "$as_me:4392: \"$ac_link\"") >&5
4393   (eval $ac_link) 2>&5
4394   ac_status=$?
4395   echo "$as_me:4395: \$? = $ac_status" >&5
4396   (exit $ac_status); } &&
4397          { ac_try='test -s conftest$ac_exeext'
4398   { (eval echo "$as_me:4398: \"$ac_try\"") >&5
4399   (eval $ac_try) 2>&5
4400   ac_status=$?
4401   echo "$as_me:4401: \$? = $ac_status" >&5
4402   (exit $ac_status); }; }; then
4403   ac_cv_lib_gpm_Gpm_Open=yes
4404 else
4405   echo "$as_me: failed program was:" >&5
4406 cat conftest.$ac_ext >&5
4407 ac_cv_lib_gpm_Gpm_Open=no
4408 fi
4409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4410 LIBS=$ac_check_lib_save_LIBS
4411 fi
4412 echo "$as_me:4412: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4413 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4414 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4415   :
4416 else
4417
4418                                 { { echo "$as_me:4418: error: Cannot link with GPM library" >&5
4419 echo "$as_me: error: Cannot link with GPM library" >&2;}
4420    { (exit 1); exit 1; }; }
4421                 fi
4422                 with_gpm=yes
4423
4424 fi
4425
4426 else
4427
4428                 test "$with_gpm" != maybe && { echo "$as_me:4428: WARNING: Cannot find GPM header" >&5
4429 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4430                 with_gpm=no
4431
4432 fi
4433
4434 fi
4435
4436 if test "$with_gpm" != no ; then
4437         echo "$as_me:4437: checking if you want to load GPM dynamically" >&5
4438 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4439
4440 # Check whether --with-dlsym or --without-dlsym was given.
4441 if test "${with_dlsym+set}" = set; then
4442   withval="$with_dlsym"
4443   with_dlsym=$withval
4444 else
4445   with_dlsym=yes
4446 fi;
4447         echo "$as_me:4447: result: $with_dlsym" >&5
4448 echo "${ECHO_T}$with_dlsym" >&6
4449         if test "$with_dlsym" = yes ; then
4450
4451 cf_have_dlsym=no
4452 echo "$as_me:4452: checking for dlsym" >&5
4453 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4454 if test "${ac_cv_func_dlsym+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   cat >conftest.$ac_ext <<_ACEOF
4458 #line 4458 "configure"
4459 #include "confdefs.h"
4460 /* System header to define __stub macros and hopefully few prototypes,
4461     which can conflict with char dlsym (); below.  */
4462 #include <assert.h>
4463 /* Override any gcc2 internal prototype to avoid an error.  */
4464 #ifdef __cplusplus
4465 extern "C"
4466 #endif
4467 /* We use char because int might match the return type of a gcc2
4468    builtin and then its argument prototype would still apply.  */
4469 char dlsym ();
4470 char (*f) ();
4471
4472 int
4473 main ()
4474 {
4475 /* The GNU C library defines this for functions which it implements
4476     to always fail with ENOSYS.  Some functions are actually named
4477     something starting with __ and the normal name is an alias.  */
4478 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4479 choke me
4480 #else
4481 f = dlsym;
4482 #endif
4483
4484   ;
4485   return 0;
4486 }
4487 _ACEOF
4488 rm -f conftest.$ac_objext conftest$ac_exeext
4489 if { (eval echo "$as_me:4489: \"$ac_link\"") >&5
4490   (eval $ac_link) 2>&5
4491   ac_status=$?
4492   echo "$as_me:4492: \$? = $ac_status" >&5
4493   (exit $ac_status); } &&
4494          { ac_try='test -s conftest$ac_exeext'
4495   { (eval echo "$as_me:4495: \"$ac_try\"") >&5
4496   (eval $ac_try) 2>&5
4497   ac_status=$?
4498   echo "$as_me:4498: \$? = $ac_status" >&5
4499   (exit $ac_status); }; }; then
4500   ac_cv_func_dlsym=yes
4501 else
4502   echo "$as_me: failed program was:" >&5
4503 cat conftest.$ac_ext >&5
4504 ac_cv_func_dlsym=no
4505 fi
4506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4507 fi
4508 echo "$as_me:4508: result: $ac_cv_func_dlsym" >&5
4509 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4510 if test $ac_cv_func_dlsym = yes; then
4511   cf_have_dlsym=yes
4512 else
4513
4514 cf_have_libdl=no
4515 echo "$as_me:4515: checking for dlsym in -ldl" >&5
4516 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4517 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520   ac_check_lib_save_LIBS=$LIBS
4521 LIBS="-ldl  $LIBS"
4522 cat >conftest.$ac_ext <<_ACEOF
4523 #line 4523 "configure"
4524 #include "confdefs.h"
4525
4526 /* Override any gcc2 internal prototype to avoid an error.  */
4527 #ifdef __cplusplus
4528 extern "C"
4529 #endif
4530 /* We use char because int might match the return type of a gcc2
4531    builtin and then its argument prototype would still apply.  */
4532 char dlsym ();
4533 int
4534 main ()
4535 {
4536 dlsym ();
4537   ;
4538   return 0;
4539 }
4540 _ACEOF
4541 rm -f conftest.$ac_objext conftest$ac_exeext
4542 if { (eval echo "$as_me:4542: \"$ac_link\"") >&5
4543   (eval $ac_link) 2>&5
4544   ac_status=$?
4545   echo "$as_me:4545: \$? = $ac_status" >&5
4546   (exit $ac_status); } &&
4547          { ac_try='test -s conftest$ac_exeext'
4548   { (eval echo "$as_me:4548: \"$ac_try\"") >&5
4549   (eval $ac_try) 2>&5
4550   ac_status=$?
4551   echo "$as_me:4551: \$? = $ac_status" >&5
4552   (exit $ac_status); }; }; then
4553   ac_cv_lib_dl_dlsym=yes
4554 else
4555   echo "$as_me: failed program was:" >&5
4556 cat conftest.$ac_ext >&5
4557 ac_cv_lib_dl_dlsym=no
4558 fi
4559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4560 LIBS=$ac_check_lib_save_LIBS
4561 fi
4562 echo "$as_me:4562: result: $ac_cv_lib_dl_dlsym" >&5
4563 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4564 if test $ac_cv_lib_dl_dlsym = yes; then
4565
4566         cf_have_dlsym=yes
4567         cf_have_libdl=yes
4568 fi
4569
4570 fi
4571
4572 if test "$cf_have_dlsym" = yes ; then
4573         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4574
4575         echo "$as_me:4575: checking whether able to link to dl*() functions" >&5
4576 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4577         cat >conftest.$ac_ext <<_ACEOF
4578 #line 4578 "configure"
4579 #include "confdefs.h"
4580 #include <dlfcn.h>
4581 int
4582 main ()
4583 {
4584
4585                 void *obj;
4586                 if ((obj = dlopen("filename", 0)) != 0) {
4587                         if (dlsym(obj, "symbolname") == 0) {
4588                         dlclose(obj);
4589                         }
4590                 }
4591   ;
4592   return 0;
4593 }
4594 _ACEOF
4595 rm -f conftest.$ac_objext conftest$ac_exeext
4596 if { (eval echo "$as_me:4596: \"$ac_link\"") >&5
4597   (eval $ac_link) 2>&5
4598   ac_status=$?
4599   echo "$as_me:4599: \$? = $ac_status" >&5
4600   (exit $ac_status); } &&
4601          { ac_try='test -s conftest$ac_exeext'
4602   { (eval echo "$as_me:4602: \"$ac_try\"") >&5
4603   (eval $ac_try) 2>&5
4604   ac_status=$?
4605   echo "$as_me:4605: \$? = $ac_status" >&5
4606   (exit $ac_status); }; }; then
4607
4608                 cat >>confdefs.h <<\EOF
4609 #define HAVE_LIBDL 1
4610 EOF
4611
4612 else
4613   echo "$as_me: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4615
4616                 { { echo "$as_me:4616: error: Cannot link test program for libdl" >&5
4617 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4618    { (exit 1); exit 1; }; }
4619 fi
4620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4621         echo "$as_me:4621: result: ok" >&5
4622 echo "${ECHO_T}ok" >&6
4623 else
4624         { { echo "$as_me:4624: error: Cannot find dlsym function" >&5
4625 echo "$as_me: error: Cannot find dlsym function" >&2;}
4626    { (exit 1); exit 1; }; }
4627 fi
4628
4629                 if test "$with_gpm" != yes ; then
4630                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4631
4632 echo "${as_me-configure}:4632: testing assuming soname for gpm is $with_gpm ..." 1>&5
4633
4634                         cf_cv_gpm_soname="$with_gpm"
4635                 else
4636
4637 echo "$as_me:4637: checking for soname of gpm library" >&5
4638 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4639 if test "${cf_cv_gpm_soname+set}" = set; then
4640   echo $ECHO_N "(cached) $ECHO_C" >&6
4641 else
4642
4643 cf_cv_gpm_soname=unknown
4644 if test "$cross_compiling" != yes ; then
4645 cat >conftest.$ac_ext <<CF_EOF
4646 #include <gpm.h>
4647 int main()
4648 {
4649 if (Gpm_Open(0,0)) Gpm_Close();
4650         ${cf_cv_main_return:-return}(0);
4651 }
4652 CF_EOF
4653 cf_save_LIBS="$LIBS"
4654         LIBS="-lgpm $LIBS"
4655         if { (eval echo "$as_me:4655: \"$ac_compile\"") >&5
4656   (eval $ac_compile) 2>&5
4657   ac_status=$?
4658   echo "$as_me:4658: \$? = $ac_status" >&5
4659   (exit $ac_status); } ; then
4660                 if { (eval echo "$as_me:4660: \"$ac_link\"") >&5
4661   (eval $ac_link) 2>&5
4662   ac_status=$?
4663   echo "$as_me:4663: \$? = $ac_status" >&5
4664   (exit $ac_status); } ; then
4665                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4666                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4667                 fi
4668         fi
4669 rm -f conftest*
4670 LIBS="$cf_save_LIBS"
4671 fi
4672
4673 fi
4674 echo "$as_me:4674: result: $cf_cv_gpm_soname" >&5
4675 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4676
4677                 fi
4678                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4679 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4680 EOF
4681
4682                 SHLIB_LIST="-ldl $SHLIB_LIST"
4683         else
4684                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4685         fi
4686         cat >>confdefs.h <<\EOF
4687 #define HAVE_LIBGPM 1
4688 EOF
4689
4690 echo "$as_me:4690: checking for Gpm_Wgetch in -lgpm" >&5
4691 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4692 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4693   echo $ECHO_N "(cached) $ECHO_C" >&6
4694 else
4695   ac_check_lib_save_LIBS=$LIBS
4696 LIBS="-lgpm  $LIBS"
4697 cat >conftest.$ac_ext <<_ACEOF
4698 #line 4698 "configure"
4699 #include "confdefs.h"
4700
4701 /* Override any gcc2 internal prototype to avoid an error.  */
4702 #ifdef __cplusplus
4703 extern "C"
4704 #endif
4705 /* We use char because int might match the return type of a gcc2
4706    builtin and then its argument prototype would still apply.  */
4707 char Gpm_Wgetch ();
4708 int
4709 main ()
4710 {
4711 Gpm_Wgetch ();
4712   ;
4713   return 0;
4714 }
4715 _ACEOF
4716 rm -f conftest.$ac_objext conftest$ac_exeext
4717 if { (eval echo "$as_me:4717: \"$ac_link\"") >&5
4718   (eval $ac_link) 2>&5
4719   ac_status=$?
4720   echo "$as_me:4720: \$? = $ac_status" >&5
4721   (exit $ac_status); } &&
4722          { ac_try='test -s conftest$ac_exeext'
4723   { (eval echo "$as_me:4723: \"$ac_try\"") >&5
4724   (eval $ac_try) 2>&5
4725   ac_status=$?
4726   echo "$as_me:4726: \$? = $ac_status" >&5
4727   (exit $ac_status); }; }; then
4728   ac_cv_lib_gpm_Gpm_Wgetch=yes
4729 else
4730   echo "$as_me: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4732 ac_cv_lib_gpm_Gpm_Wgetch=no
4733 fi
4734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4735 LIBS=$ac_check_lib_save_LIBS
4736 fi
4737 echo "$as_me:4737: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4738 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4739 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4740
4741 echo "$as_me:4741: checking if GPM is weakly bound to curses library" >&5
4742 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4743 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4744   echo $ECHO_N "(cached) $ECHO_C" >&6
4745 else
4746
4747 cf_cv_check_gpm_wgetch=unknown
4748 if test "$cross_compiling" != yes ; then
4749
4750 cat >conftest.$ac_ext <<CF_EOF
4751 #include <gpm.h>
4752 int main()
4753 {
4754         Gpm_Wgetch();
4755         ${cf_cv_main_return:-return}(0);
4756 }
4757 CF_EOF
4758
4759         cf_save_LIBS="$LIBS"
4760         # This only works if we can look at the symbol table.  If a shared
4761         # library is stripped for install, we cannot use that.  So we're forced
4762         # to rely on the static library, noting that some packagers may not
4763         # include it.
4764         LIBS="-static -lgpm -dynamic $LIBS"
4765         if { (eval echo "$as_me:4765: \"$ac_compile\"") >&5
4766   (eval $ac_compile) 2>&5
4767   ac_status=$?
4768   echo "$as_me:4768: \$? = $ac_status" >&5
4769   (exit $ac_status); } ; then
4770                 if { (eval echo "$as_me:4770: \"$ac_link\"") >&5
4771   (eval $ac_link) 2>&5
4772   ac_status=$?
4773   echo "$as_me:4773: \$? = $ac_status" >&5
4774   (exit $ac_status); } ; then
4775                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4776                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4777                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4778                 fi
4779         fi
4780         rm -f conftest*
4781         LIBS="$cf_save_LIBS"
4782 fi
4783
4784 fi
4785 echo "$as_me:4785: result: $cf_cv_check_gpm_wgetch" >&5
4786 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4787
4788 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4789         { echo "$as_me:4789: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4790 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4791 fi
4792
4793 fi
4794
4795 fi
4796
4797 # not everyone has "test -c"
4798 if test -c /dev/sysmouse 2>/dev/null ; then
4799 echo "$as_me:4799: checking if you want to use sysmouse" >&5
4800 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4801
4802 # Check whether --with-sysmouse or --without-sysmouse was given.
4803 if test "${with_sysmouse+set}" = set; then
4804   withval="$with_sysmouse"
4805   cf_with_sysmouse=$withval
4806 else
4807   cf_with_sysmouse=maybe
4808 fi;
4809         if test "$cf_with_sysmouse" != no ; then
4810         cat >conftest.$ac_ext <<_ACEOF
4811 #line 4811 "configure"
4812 #include "confdefs.h"
4813
4814 #include <osreldate.h>
4815 #if (__FreeBSD_version >= 400017)
4816 #include <sys/consio.h>
4817 #include <sys/fbio.h>
4818 #else
4819 #include <machine/console.h>
4820 #endif
4821
4822 int
4823 main ()
4824 {
4825
4826         struct mouse_info the_mouse;
4827         ioctl(0, CONS_MOUSECTL, &the_mouse);
4828
4829   ;
4830   return 0;
4831 }
4832 _ACEOF
4833 rm -f conftest.$ac_objext
4834 if { (eval echo "$as_me:4834: \"$ac_compile\"") >&5
4835   (eval $ac_compile) 2>&5
4836   ac_status=$?
4837   echo "$as_me:4837: \$? = $ac_status" >&5
4838   (exit $ac_status); } &&
4839          { ac_try='test -s conftest.$ac_objext'
4840   { (eval echo "$as_me:4840: \"$ac_try\"") >&5
4841   (eval $ac_try) 2>&5
4842   ac_status=$?
4843   echo "$as_me:4843: \$? = $ac_status" >&5
4844   (exit $ac_status); }; }; then
4845   cf_with_sysmouse=yes
4846 else
4847   echo "$as_me: failed program was:" >&5
4848 cat conftest.$ac_ext >&5
4849 cf_with_sysmouse=no
4850 fi
4851 rm -f conftest.$ac_objext conftest.$ac_ext
4852         fi
4853 echo "$as_me:4853: result: $cf_with_sysmouse" >&5
4854 echo "${ECHO_T}$cf_with_sysmouse" >&6
4855 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4856 #define USE_SYSMOUSE 1
4857 EOF
4858
4859 fi
4860
4861 if test X"$CC_G_OPT" = X"" ; then
4862         CC_G_OPT='-g'
4863         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4864 fi
4865
4866 if test X"$CXX_G_OPT" = X"" ; then
4867         CXX_G_OPT='-g'
4868         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4869 fi
4870
4871 echo "$as_me:4871: checking for default loader flags" >&5
4872 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4873 case $DFT_LWR_MODEL in
4874 libtool) LD_MODEL=''   ;;
4875 normal)  LD_MODEL=''   ;;
4876 debug)   LD_MODEL=$CC_G_OPT ;;
4877 profile) LD_MODEL='-pg';;
4878 shared)  LD_MODEL=''   ;;
4879 esac
4880 echo "$as_me:4880: result: $LD_MODEL" >&5
4881 echo "${ECHO_T}$LD_MODEL" >&6
4882
4883 case $DFT_LWR_MODEL in
4884 shared)
4885 echo "$as_me:4885: checking if rpath option should be used" >&5
4886 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4887
4888 # Check whether --enable-rpath or --disable-rpath was given.
4889 if test "${enable_rpath+set}" = set; then
4890   enableval="$enable_rpath"
4891   cf_cv_ld_rpath=$enableval
4892 else
4893   cf_cv_ld_rpath=no
4894 fi;
4895 echo "$as_me:4895: result: $cf_cv_ld_rpath" >&5
4896 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4897 echo "$as_me:4897: checking if shared libraries should be relinked during install" >&5
4898 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4899
4900 # Check whether --enable-relink or --disable-relink was given.
4901 if test "${enable_relink+set}" = set; then
4902   enableval="$enable_relink"
4903   cf_cv_do_relink=$enableval
4904 else
4905   cf_cv_do_relink=yes
4906 fi;
4907 echo "$as_me:4907: result: $cf_cv_do_relink" >&5
4908 echo "${ECHO_T}$cf_cv_do_relink" >&6
4909         ;;
4910 esac
4911
4912         LOCAL_LDFLAGS=
4913         LOCAL_LDFLAGS2=
4914         LD_SHARED_OPTS=
4915         INSTALL_LIB="-m 644"
4916
4917         cf_cv_do_symlinks=no
4918
4919         echo "$as_me:4919: checking if release/abi version should be used for shared libs" >&5
4920 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4921
4922 # Check whether --with-shlib-version or --without-shlib-version was given.
4923 if test "${with_shlib_version+set}" = set; then
4924   withval="$with_shlib_version"
4925   test -z "$withval" && withval=auto
4926         case $withval in #(vi
4927         yes) #(vi
4928                 cf_cv_shlib_version=auto
4929                 ;;
4930         rel|abi|auto|no) #(vi
4931                 cf_cv_shlib_version=$withval
4932                 ;;
4933         *)
4934                 { { echo "$as_me:4934: error: option value must be one of: rel, abi, auto or no" >&5
4935 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4936    { (exit 1); exit 1; }; }
4937                 ;;
4938         esac
4939
4940 else
4941   cf_cv_shlib_version=auto
4942 fi;
4943         echo "$as_me:4943: result: $cf_cv_shlib_version" >&5
4944 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4945
4946         cf_cv_rm_so_locs=no
4947
4948         # Some less-capable ports of gcc support only -fpic
4949         CC_SHARED_OPTS=
4950         if test "$GCC" = yes
4951         then
4952                 echo "$as_me:4952: checking which $CC option to use" >&5
4953 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4954                 cf_save_CFLAGS="$CFLAGS"
4955                 for CC_SHARED_OPTS in -fPIC -fpic ''
4956                 do
4957                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4958                         cat >conftest.$ac_ext <<_ACEOF
4959 #line 4959 "configure"
4960 #include "confdefs.h"
4961 #include <stdio.h>
4962 int
4963 main ()
4964 {
4965 int x = 1
4966   ;
4967   return 0;
4968 }
4969 _ACEOF
4970 rm -f conftest.$ac_objext
4971 if { (eval echo "$as_me:4971: \"$ac_compile\"") >&5
4972   (eval $ac_compile) 2>&5
4973   ac_status=$?
4974   echo "$as_me:4974: \$? = $ac_status" >&5
4975   (exit $ac_status); } &&
4976          { ac_try='test -s conftest.$ac_objext'
4977   { (eval echo "$as_me:4977: \"$ac_try\"") >&5
4978   (eval $ac_try) 2>&5
4979   ac_status=$?
4980   echo "$as_me:4980: \$? = $ac_status" >&5
4981   (exit $ac_status); }; }; then
4982   break
4983 else
4984   echo "$as_me: failed program was:" >&5
4985 cat conftest.$ac_ext >&5
4986 fi
4987 rm -f conftest.$ac_objext conftest.$ac_ext
4988                 done
4989                 echo "$as_me:4989: result: $CC_SHARED_OPTS" >&5
4990 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4991                 CFLAGS="$cf_save_CFLAGS"
4992         fi
4993
4994         cf_cv_shlib_version_infix=no
4995
4996         case $cf_cv_system_name in
4997         beos*)
4998                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4999                 ;;
5000         cygwin*)
5001                 CC_SHARED_OPTS=
5002                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5003                 cf_cv_shlib_version=cygdll
5004                 cf_cv_shlib_version_infix=cygdll
5005                 cat >mk_shared_lib.sh <<-CF_EOF
5006                 #!/bin/sh
5007                 SHARED_LIB=\$1
5008                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5009                 shift
5010                 cat <<-EOF
5011                 Linking shared library
5012                 ** SHARED_LIB \$SHARED_LIB
5013                 ** IMPORT_LIB \$IMPORT_LIB
5014 EOF
5015                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5016 CF_EOF
5017                 chmod +x mk_shared_lib.sh
5018                 ;;
5019         darwin*)
5020                 EXTRA_CFLAGS="-no-cpp-precomp"
5021                 CC_SHARED_OPTS="-dynamic"
5022                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5023                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5024                 cf_cv_shlib_version_infix=yes
5025                 echo "$as_me:5025: checking if ld -search_paths_first works" >&5
5026 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5027 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030
5031                         cf_save_LDFLAGS=$LDFLAGS
5032                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5033                         cat >conftest.$ac_ext <<_ACEOF
5034 #line 5034 "configure"
5035 #include "confdefs.h"
5036
5037 int
5038 main ()
5039 {
5040 int i;
5041   ;
5042   return 0;
5043 }
5044 _ACEOF
5045 rm -f conftest.$ac_objext conftest$ac_exeext
5046 if { (eval echo "$as_me:5046: \"$ac_link\"") >&5
5047   (eval $ac_link) 2>&5
5048   ac_status=$?
5049   echo "$as_me:5049: \$? = $ac_status" >&5
5050   (exit $ac_status); } &&
5051          { ac_try='test -s conftest$ac_exeext'
5052   { (eval echo "$as_me:5052: \"$ac_try\"") >&5
5053   (eval $ac_try) 2>&5
5054   ac_status=$?
5055   echo "$as_me:5055: \$? = $ac_status" >&5
5056   (exit $ac_status); }; }; then
5057   cf_cv_ldflags_search_paths_first=yes
5058 else
5059   echo "$as_me: failed program was:" >&5
5060 cat conftest.$ac_ext >&5
5061 cf_cv_ldflags_search_paths_first=no
5062 fi
5063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5064                                 LDFLAGS=$cf_save_LDFLAGS
5065 fi
5066 echo "$as_me:5066: result: $cf_cv_ldflags_search_paths_first" >&5
5067 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5068                 if test $cf_cv_ldflags_search_paths_first = yes; then
5069                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5070                 fi
5071                 ;;
5072         hpux*)
5073                 # (tested with gcc 2.7.2 -- I don't have c89)
5074                 if test "$GCC" = yes; then
5075                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5076                 else
5077                         CC_SHARED_OPTS='+Z'
5078                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5079                 fi
5080                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5081                 # HP-UX shared libraries must be executable, and should be
5082                 # readonly to exploit a quirk in the memory manager.
5083                 INSTALL_LIB="-m 555"
5084                 ;;
5085         irix*)
5086                 if test "$cf_cv_ld_rpath" = yes ; then
5087                         if test "$GCC" = yes; then
5088                                 cf_ld_rpath_opt="-Wl,-rpath,"
5089                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5090                         else
5091                                 cf_ld_rpath_opt="-rpath "
5092                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5093                         fi
5094                 fi
5095                 # tested with IRIX 5.2 and 'cc'.
5096                 if test "$GCC" != yes; then
5097                         CC_SHARED_OPTS='-KPIC'
5098                 fi
5099                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5100                 cf_cv_rm_so_locs=yes
5101                 ;;
5102         linux*|gnu*|k*bsd*-gnu)
5103                 if test "$DFT_LWR_MODEL" = "shared" ; then
5104                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5105                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5106                 fi
5107                 if test "$cf_cv_ld_rpath" = yes ; then
5108                         cf_ld_rpath_opt="-Wl,-rpath,"
5109                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5110                 fi
5111
5112         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5113         if test "$cf_cv_shlib_version" = rel; then
5114                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5115         else
5116                 cf_shared_soname='`basename $@`'
5117         fi
5118
5119                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5120                 ;;
5121         openbsd[2-9].*)
5122                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5123                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5124                 ;;
5125         openbsd*|freebsd[12].*)
5126                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5127                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5128                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5129                 ;;
5130         freebsd*)
5131                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5132                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5133                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5134                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5135                         cf_ld_rpath_opt="-rpath "
5136                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5137                 fi
5138
5139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140         if test "$cf_cv_shlib_version" = rel; then
5141                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5142         else
5143                 cf_shared_soname='`basename $@`'
5144         fi
5145
5146                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5147                 ;;
5148         netbsd*)
5149                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5150                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5151                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5152                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5153                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5154                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5155                         if test "$cf_cv_shlib_version" = auto; then
5156                         if test -f /usr/libexec/ld.elf_so; then
5157                                 cf_cv_shlib_version=abi
5158                         else
5159                                 cf_cv_shlib_version=rel
5160                         fi
5161                         fi
5162
5163         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5164         if test "$cf_cv_shlib_version" = rel; then
5165                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5166         else
5167                 cf_shared_soname='`basename $@`'
5168         fi
5169
5170                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5171                 else
5172                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5173                 fi
5174                 ;;
5175         osf*|mls+*)
5176                 # tested with OSF/1 V3.2 and 'cc'
5177                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5178                 # link with shared libs).
5179                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5180                 case $host_os in
5181                 osf4*)
5182                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5183                         ;;
5184                 esac
5185                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5186                 if test "$DFT_LWR_MODEL" = "shared" ; then
5187                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5188                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5189                 fi
5190                 if test "$cf_cv_ld_rpath" = yes ; then
5191                         cf_ld_rpath_opt="-rpath"
5192                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5193                 fi
5194                 cf_cv_rm_so_locs=yes
5195                 ;;
5196         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5197                 # tested with osr5.0.5
5198                 if test "$GCC" != yes; then
5199                         CC_SHARED_OPTS='-belf -KPIC'
5200                 fi
5201                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5202                 if test "$cf_cv_ld_rpath" = yes ; then
5203                         # only way is to set LD_RUN_PATH but no switch for it
5204                         RUN_PATH=$libdir
5205                 fi
5206                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5207                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5208                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5209                 ;;
5210         sunos4*)
5211                 # tested with SunOS 4.1.1 and gcc 2.7.0
5212                 if test "$GCC" != yes; then
5213                         CC_SHARED_OPTS='-KPIC'
5214                 fi
5215                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5216                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5217                 ;;
5218         solaris2*)
5219                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5220                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5221                 if test "$DFT_LWR_MODEL" = "shared" ; then
5222                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5223                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5224                 fi
5225                 if test "$cf_cv_ld_rpath" = yes ; then
5226                         cf_ld_rpath_opt="-R"
5227                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5228                 fi
5229
5230         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5231         if test "$cf_cv_shlib_version" = rel; then
5232                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5233         else
5234                 cf_shared_soname='`basename $@`'
5235         fi
5236
5237                 if test "$GCC" != yes; then
5238                         CC_SHARED_OPTS='-xcode=pic32'
5239                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5240                 else
5241                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_shared_soname' -o $@'
5242                 fi
5243                 ;;
5244         sysv5uw7*|unix_sv*)
5245                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5246                 if test "$GCC" != yes; then
5247                         CC_SHARED_OPTS='-KPIC'
5248                 fi
5249                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5250                 ;;
5251         *)
5252                 CC_SHARED_OPTS='unknown'
5253                 MK_SHARED_LIB='echo unknown'
5254                 ;;
5255         esac
5256
5257         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5258         case "$cf_cv_shlib_version" in #(vi
5259         rel|abi)
5260                 case "$MK_SHARED_LIB" in #(vi
5261                 *'-o $@')
5262                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5263                         ;;
5264                 *)
5265                         { echo "$as_me:5265: WARNING: ignored --with-shlib-version" >&5
5266 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5267                         ;;
5268                 esac
5269                 ;;
5270         esac
5271
5272         if test -n "$cf_ld_rpath_opt" ; then
5273                 echo "$as_me:5273: checking if we need a space after rpath option" >&5
5274 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5275                 cf_save_LIBS="$LIBS"
5276                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5277                 cat >conftest.$ac_ext <<_ACEOF
5278 #line 5278 "configure"
5279 #include "confdefs.h"
5280
5281 int
5282 main ()
5283 {
5284
5285   ;
5286   return 0;
5287 }
5288 _ACEOF
5289 rm -f conftest.$ac_objext conftest$ac_exeext
5290 if { (eval echo "$as_me:5290: \"$ac_link\"") >&5
5291   (eval $ac_link) 2>&5
5292   ac_status=$?
5293   echo "$as_me:5293: \$? = $ac_status" >&5
5294   (exit $ac_status); } &&
5295          { ac_try='test -s conftest$ac_exeext'
5296   { (eval echo "$as_me:5296: \"$ac_try\"") >&5
5297   (eval $ac_try) 2>&5
5298   ac_status=$?
5299   echo "$as_me:5299: \$? = $ac_status" >&5
5300   (exit $ac_status); }; }; then
5301   cf_rpath_space=no
5302 else
5303   echo "$as_me: failed program was:" >&5
5304 cat conftest.$ac_ext >&5
5305 cf_rpath_space=yes
5306 fi
5307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5308                 LIBS="$cf_save_LIBS"
5309                 echo "$as_me:5309: result: $cf_rpath_space" >&5
5310 echo "${ECHO_T}$cf_rpath_space" >&6
5311                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5312                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5313         fi
5314
5315 if test "$CC_SHARED_OPTS" = "unknown"; then
5316         for model in $cf_list_models; do
5317                 if test "$model" = "shared"; then
5318                         { { echo "$as_me:5318: error: Shared libraries are not supported in this version" >&5
5319 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5320    { (exit 1); exit 1; }; }
5321                 fi
5322         done
5323 fi
5324
5325 ###############################################################################
5326
5327 ###     use option --disable-overwrite to leave out the link to -lcurses
5328 echo "$as_me:5328: checking if you wish to install ncurses overwriting curses" >&5
5329 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5330
5331 # Check whether --enable-overwrite or --disable-overwrite was given.
5332 if test "${enable_overwrite+set}" = set; then
5333   enableval="$enable_overwrite"
5334   with_overwrite=$enableval
5335 else
5336   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5337 fi;
5338 echo "$as_me:5338: result: $with_overwrite" >&5
5339 echo "${ECHO_T}$with_overwrite" >&6
5340
5341 echo "$as_me:5341: checking if external terminfo-database is used" >&5
5342 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5343
5344 # Check whether --enable-database or --disable-database was given.
5345 if test "${enable_database+set}" = set; then
5346   enableval="$enable_database"
5347   use_database=$enableval
5348 else
5349   use_database=yes
5350 fi;
5351 echo "$as_me:5351: result: $use_database" >&5
5352 echo "${ECHO_T}$use_database" >&6
5353
5354 case $host_os in #(vi
5355 os2*) #(vi
5356         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5357         ;;
5358 *) #(vi
5359         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5360         ;;
5361 esac
5362
5363         case $cf_cv_system_name in
5364         os2*)   PATHSEP=';'  ;;
5365         *)      PATHSEP=':'  ;;
5366         esac
5367
5368 if test "$use_database" != no ; then
5369         cat >>confdefs.h <<\EOF
5370 #define USE_DATABASE 1
5371 EOF
5372
5373         echo "$as_me:5373: checking which terminfo source-file will be installed" >&5
5374 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5375
5376 # Check whether --enable-database or --disable-database was given.
5377 if test "${enable_database+set}" = set; then
5378   enableval="$enable_database"
5379   TERMINFO_SRC=$withval
5380 fi;
5381         echo "$as_me:5381: result: $TERMINFO_SRC" >&5
5382 echo "${ECHO_T}$TERMINFO_SRC" >&6
5383
5384         echo "$as_me:5384: checking whether to use hashed database instead of directory/tree" >&5
5385 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5386
5387 # Check whether --with-hashed-db or --without-hashed-db was given.
5388 if test "${with_hashed_db+set}" = set; then
5389   withval="$with_hashed_db"
5390
5391 else
5392   with_hashed_db=no
5393 fi;
5394         echo "$as_me:5394: result: $with_hashed_db" >&5
5395 echo "${ECHO_T}$with_hashed_db" >&6
5396 fi
5397
5398 echo "$as_me:5398: checking for list of fallback descriptions" >&5
5399 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5400
5401 # Check whether --with-fallbacks or --without-fallbacks was given.
5402 if test "${with_fallbacks+set}" = set; then
5403   withval="$with_fallbacks"
5404   with_fallback=$withval
5405 else
5406   with_fallback=
5407 fi;
5408 echo "$as_me:5408: result: $with_fallback" >&5
5409 echo "${ECHO_T}$with_fallback" >&6
5410 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5411
5412 echo "$as_me:5412: checking if you want modern xterm or antique" >&5
5413 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5414
5415 # Check whether --with-xterm-new or --without-xterm-new was given.
5416 if test "${with_xterm_new+set}" = set; then
5417   withval="$with_xterm_new"
5418   with_xterm_new=$withval
5419 else
5420   with_xterm_new=yes
5421 fi;
5422 case $with_xterm_new in
5423 no)     with_xterm_new=xterm-old;;
5424 *)      with_xterm_new=xterm-new;;
5425 esac
5426 echo "$as_me:5426: result: $with_xterm_new" >&5
5427 echo "${ECHO_T}$with_xterm_new" >&6
5428 WHICH_XTERM=$with_xterm_new
5429
5430 MAKE_TERMINFO=
5431 if test "$use_database" = no ; then
5432         TERMINFO="${datadir}/terminfo"
5433         MAKE_TERMINFO="#"
5434 else
5435
5436 echo "$as_me:5436: checking for list of terminfo directories" >&5
5437 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5438
5439 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5440 if test "${with_terminfo_dirs+set}" = set; then
5441   withval="$with_terminfo_dirs"
5442
5443 else
5444   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5445 fi;
5446 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5447 cf_dst_path=
5448 for cf_src_path in $withval
5449 do
5450
5451 if test "x$prefix" != xNONE; then
5452   cf_path_syntax="$prefix"
5453 else
5454   cf_path_syntax="$ac_default_prefix"
5455 fi
5456
5457 case ".$cf_src_path" in #(vi
5458 .\$\(*\)*|.\'*\'*) #(vi
5459   ;;
5460 ..|./*|.\\*) #(vi
5461   ;;
5462 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5463   ;;
5464 .\${*prefix}*) #(vi
5465   eval cf_src_path="$cf_src_path"
5466   case ".$cf_src_path" in #(vi
5467   .NONE/*)
5468     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5469     ;;
5470   esac
5471   ;; #(vi
5472 .no|.NONE/*)
5473   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5474   ;;
5475 *)
5476   { { echo "$as_me:5476: error: expected a pathname, not \"$cf_src_path\"" >&5
5477 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5478    { (exit 1); exit 1; }; }
5479   ;;
5480 esac
5481
5482   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5483   cf_dst_path="${cf_dst_path}${cf_src_path}"
5484 done
5485 IFS="$ac_save_ifs"
5486
5487 eval 'TERMINFO_DIRS="$cf_dst_path"'
5488
5489 echo "$as_me:5489: result: $TERMINFO_DIRS" >&5
5490 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5491 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5492 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5493 EOF
5494
5495 echo "$as_me:5495: checking for default terminfo directory" >&5
5496 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5497
5498 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5499 if test "${with_default_terminfo_dir+set}" = set; then
5500   withval="$with_default_terminfo_dir"
5501
5502 else
5503   withval="${TERMINFO-${datadir}/terminfo}"
5504 fi; if test -n "${datadir}/terminfo" ; then
5505
5506 if test "x$prefix" != xNONE; then
5507   cf_path_syntax="$prefix"
5508 else
5509   cf_path_syntax="$ac_default_prefix"
5510 fi
5511
5512 case ".$withval" in #(vi
5513 .\$\(*\)*|.\'*\'*) #(vi
5514   ;;
5515 ..|./*|.\\*) #(vi
5516   ;;
5517 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5518   ;;
5519 .\${*prefix}*) #(vi
5520   eval withval="$withval"
5521   case ".$withval" in #(vi
5522   .NONE/*)
5523     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5524     ;;
5525   esac
5526   ;; #(vi
5527 .no|.NONE/*)
5528   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5529   ;;
5530 *)
5531   { { echo "$as_me:5531: error: expected a pathname, not \"$withval\"" >&5
5532 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5533    { (exit 1); exit 1; }; }
5534   ;;
5535 esac
5536
5537 fi
5538 TERMINFO="$withval"
5539
5540 echo "$as_me:5540: result: $TERMINFO" >&5
5541 echo "${ECHO_T}$TERMINFO" >&6
5542 cat >>confdefs.h <<EOF
5543 #define TERMINFO "$TERMINFO"
5544 EOF
5545
5546 fi
5547
5548 ###     use option --disable-big-core to make tic run on small machines
5549 ###     We need 4Mb, check if we can allocate 50% more than that.
5550 echo "$as_me:5550: checking if big-core option selected" >&5
5551 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5552
5553 # Check whether --enable-big-core or --disable-big-core was given.
5554 if test "${enable_big_core+set}" = set; then
5555   enableval="$enable_big_core"
5556   with_big_core=$enableval
5557 else
5558   if test "$cross_compiling" = yes; then
5559   with_big_core=no
5560 else
5561   cat >conftest.$ac_ext <<_ACEOF
5562 #line 5562 "configure"
5563 #include "confdefs.h"
5564
5565 #include <stdlib.h>
5566 #include <string.h>
5567 int main() {
5568         unsigned long n = 6000000L;
5569         char *s = malloc(n);
5570         if (s != 0)
5571                 s[0] = s[n-1] = 0;
5572         ${cf_cv_main_return:-return}(s == 0);
5573 }
5574 _ACEOF
5575 rm -f conftest$ac_exeext
5576 if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5581   { (eval echo "$as_me:5581: \"$ac_try\"") >&5
5582   (eval $ac_try) 2>&5
5583   ac_status=$?
5584   echo "$as_me:5584: \$? = $ac_status" >&5
5585   (exit $ac_status); }; }; then
5586   with_big_core=yes
5587 else
5588   echo "$as_me: program exited with status $ac_status" >&5
5589 echo "$as_me: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5591 with_big_core=no
5592 fi
5593 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5594 fi
5595 fi;
5596 echo "$as_me:5596: result: $with_big_core" >&5
5597 echo "${ECHO_T}$with_big_core" >&6
5598 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5599 #define HAVE_BIG_CORE 1
5600 EOF
5601
5602 ### ISO C only guarantees 512-char strings, we have tables which load faster
5603 ### when constructed using "big" strings.
5604 echo "$as_me:5604: checking if big-strings option selected" >&5
5605 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5606
5607 # Check whether --enable-big-strings or --disable-big-strings was given.
5608 if test "${enable_big_strings+set}" = set; then
5609   enableval="$enable_big_strings"
5610   with_big_strings=no
5611 else
5612   with_big_strings=yes
5613 fi;
5614 echo "$as_me:5614: result: $with_big_strings" >&5
5615 echo "${ECHO_T}$with_big_strings" >&6
5616
5617 USE_BIG_STRINGS=0
5618 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5619
5620 ###     use option --enable-termcap to compile in the termcap fallback support
5621 echo "$as_me:5621: checking if you want termcap-fallback support" >&5
5622 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5623
5624 # Check whether --enable-termcap or --disable-termcap was given.
5625 if test "${enable_termcap+set}" = set; then
5626   enableval="$enable_termcap"
5627   with_termcap=$enableval
5628 else
5629   with_termcap=no
5630 fi;
5631 echo "$as_me:5631: result: $with_termcap" >&5
5632 echo "${ECHO_T}$with_termcap" >&6
5633
5634 if test "$with_termcap" != "yes" ; then
5635         if test "$use_database" = no ; then
5636                 if test -z "$with_fallback" ; then
5637                         { { echo "$as_me:5637: error: You have disabled the database w/o specifying fallbacks" >&5
5638 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5639    { (exit 1); exit 1; }; }
5640                 fi
5641         fi
5642         cat >>confdefs.h <<\EOF
5643 #define PURE_TERMINFO 1
5644 EOF
5645
5646 else
5647
5648 if test "$with_ticlib" != no ; then
5649         { { echo "$as_me:5649: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5650 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5651    { (exit 1); exit 1; }; }
5652 fi
5653
5654 cat >>confdefs.h <<\EOF
5655 #define USE_TERMCAP 1
5656 EOF
5657
5658 echo "$as_me:5658: checking for list of termcap files" >&5
5659 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5660
5661 # Check whether --with-termpath or --without-termpath was given.
5662 if test "${with_termpath+set}" = set; then
5663   withval="$with_termpath"
5664
5665 else
5666   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5667 fi;
5668 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5669 cf_dst_path=
5670 for cf_src_path in $withval
5671 do
5672
5673 if test "x$prefix" != xNONE; then
5674   cf_path_syntax="$prefix"
5675 else
5676   cf_path_syntax="$ac_default_prefix"
5677 fi
5678
5679 case ".$cf_src_path" in #(vi
5680 .\$\(*\)*|.\'*\'*) #(vi
5681   ;;
5682 ..|./*|.\\*) #(vi
5683   ;;
5684 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5685   ;;
5686 .\${*prefix}*) #(vi
5687   eval cf_src_path="$cf_src_path"
5688   case ".$cf_src_path" in #(vi
5689   .NONE/*)
5690     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5691     ;;
5692   esac
5693   ;; #(vi
5694 .no|.NONE/*)
5695   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5696   ;;
5697 *)
5698   { { echo "$as_me:5698: error: expected a pathname, not \"$cf_src_path\"" >&5
5699 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5700    { (exit 1); exit 1; }; }
5701   ;;
5702 esac
5703
5704   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5705   cf_dst_path="${cf_dst_path}${cf_src_path}"
5706 done
5707 IFS="$ac_save_ifs"
5708
5709 eval 'TERMPATH="$cf_dst_path"'
5710
5711 echo "$as_me:5711: result: $TERMPATH" >&5
5712 echo "${ECHO_T}$TERMPATH" >&6
5713 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5714 #define TERMPATH "$TERMPATH"
5715 EOF
5716
5717 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5718 echo "$as_me:5718: checking if fast termcap-loader is needed" >&5
5719 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5720
5721 # Check whether --enable-getcap or --disable-getcap was given.
5722 if test "${enable_getcap+set}" = set; then
5723   enableval="$enable_getcap"
5724   with_getcap=$enableval
5725 else
5726   with_getcap=no
5727 fi;
5728 echo "$as_me:5728: result: $with_getcap" >&5
5729 echo "${ECHO_T}$with_getcap" >&6
5730 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5731 #define USE_GETCAP 1
5732 EOF
5733
5734 echo "$as_me:5734: checking if translated termcaps will be cached in ~/.terminfo" >&5
5735 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5736
5737 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5738 if test "${enable_getcap_cache+set}" = set; then
5739   enableval="$enable_getcap_cache"
5740   with_getcap_cache=$enableval
5741 else
5742   with_getcap_cache=no
5743 fi;
5744 echo "$as_me:5744: result: $with_getcap_cache" >&5
5745 echo "${ECHO_T}$with_getcap_cache" >&6
5746 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5747 #define USE_GETCAP_CACHE 1
5748 EOF
5749
5750 fi
5751
5752 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5753 echo "$as_me:5753: checking if ~/.terminfo is wanted" >&5
5754 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5755
5756 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5757 if test "${enable_home_terminfo+set}" = set; then
5758   enableval="$enable_home_terminfo"
5759   with_home_terminfo=$enableval
5760 else
5761   with_home_terminfo=yes
5762 fi;
5763 echo "$as_me:5763: result: $with_home_terminfo" >&5
5764 echo "${ECHO_T}$with_home_terminfo" >&6
5765 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5766 #define USE_HOME_TERMINFO 1
5767 EOF
5768
5769 echo "$as_me:5769: checking if you want to use restricted environment when running as root" >&5
5770 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5771
5772 # Check whether --enable-root-environ or --disable-root-environ was given.
5773 if test "${enable_root_environ+set}" = set; then
5774   enableval="$enable_root_environ"
5775   with_root_environ=$enableval
5776 else
5777   with_root_environ=yes
5778 fi;
5779 echo "$as_me:5779: result: $with_root_environ" >&5
5780 echo "${ECHO_T}$with_root_environ" >&6
5781 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5782 #define USE_ROOT_ENVIRON 1
5783 EOF
5784
5785 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5786 ###   to reduce storage requirements for the terminfo database.
5787
5788 for ac_func in \
5789         remove \
5790         unlink
5791 do
5792 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5793 echo "$as_me:5793: checking for $ac_func" >&5
5794 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5795 if eval "test \"\${$as_ac_var+set}\" = set"; then
5796   echo $ECHO_N "(cached) $ECHO_C" >&6
5797 else
5798   cat >conftest.$ac_ext <<_ACEOF
5799 #line 5799 "configure"
5800 #include "confdefs.h"
5801 /* System header to define __stub macros and hopefully few prototypes,
5802     which can conflict with char $ac_func (); below.  */
5803 #include <assert.h>
5804 /* Override any gcc2 internal prototype to avoid an error.  */
5805 #ifdef __cplusplus
5806 extern "C"
5807 #endif
5808 /* We use char because int might match the return type of a gcc2
5809    builtin and then its argument prototype would still apply.  */
5810 char $ac_func ();
5811 char (*f) ();
5812
5813 int
5814 main ()
5815 {
5816 /* The GNU C library defines this for functions which it implements
5817     to always fail with ENOSYS.  Some functions are actually named
5818     something starting with __ and the normal name is an alias.  */
5819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5820 choke me
5821 #else
5822 f = $ac_func;
5823 #endif
5824
5825   ;
5826   return 0;
5827 }
5828 _ACEOF
5829 rm -f conftest.$ac_objext conftest$ac_exeext
5830 if { (eval echo "$as_me:5830: \"$ac_link\"") >&5
5831   (eval $ac_link) 2>&5
5832   ac_status=$?
5833   echo "$as_me:5833: \$? = $ac_status" >&5
5834   (exit $ac_status); } &&
5835          { ac_try='test -s conftest$ac_exeext'
5836   { (eval echo "$as_me:5836: \"$ac_try\"") >&5
5837   (eval $ac_try) 2>&5
5838   ac_status=$?
5839   echo "$as_me:5839: \$? = $ac_status" >&5
5840   (exit $ac_status); }; }; then
5841   eval "$as_ac_var=yes"
5842 else
5843   echo "$as_me: failed program was:" >&5
5844 cat conftest.$ac_ext >&5
5845 eval "$as_ac_var=no"
5846 fi
5847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5848 fi
5849 echo "$as_me:5849: result: `eval echo '${'$as_ac_var'}'`" >&5
5850 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5851 if test `eval echo '${'$as_ac_var'}'` = yes; then
5852   cat >>confdefs.h <<EOF
5853 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5854 EOF
5855
5856 fi
5857 done
5858
5859 if test "$cross_compiling" = yes ; then
5860
5861 for ac_func in \
5862                 link \
5863                 symlink
5864 do
5865 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5866 echo "$as_me:5866: checking for $ac_func" >&5
5867 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5868 if eval "test \"\${$as_ac_var+set}\" = set"; then
5869   echo $ECHO_N "(cached) $ECHO_C" >&6
5870 else
5871   cat >conftest.$ac_ext <<_ACEOF
5872 #line 5872 "configure"
5873 #include "confdefs.h"
5874 /* System header to define __stub macros and hopefully few prototypes,
5875     which can conflict with char $ac_func (); below.  */
5876 #include <assert.h>
5877 /* Override any gcc2 internal prototype to avoid an error.  */
5878 #ifdef __cplusplus
5879 extern "C"
5880 #endif
5881 /* We use char because int might match the return type of a gcc2
5882    builtin and then its argument prototype would still apply.  */
5883 char $ac_func ();
5884 char (*f) ();
5885
5886 int
5887 main ()
5888 {
5889 /* The GNU C library defines this for functions which it implements
5890     to always fail with ENOSYS.  Some functions are actually named
5891     something starting with __ and the normal name is an alias.  */
5892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5893 choke me
5894 #else
5895 f = $ac_func;
5896 #endif
5897
5898   ;
5899   return 0;
5900 }
5901 _ACEOF
5902 rm -f conftest.$ac_objext conftest$ac_exeext
5903 if { (eval echo "$as_me:5903: \"$ac_link\"") >&5
5904   (eval $ac_link) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit $ac_status); } &&
5908          { ac_try='test -s conftest$ac_exeext'
5909   { (eval echo "$as_me:5909: \"$ac_try\"") >&5
5910   (eval $ac_try) 2>&5
5911   ac_status=$?
5912   echo "$as_me:5912: \$? = $ac_status" >&5
5913   (exit $ac_status); }; }; then
5914   eval "$as_ac_var=yes"
5915 else
5916   echo "$as_me: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 eval "$as_ac_var=no"
5919 fi
5920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5921 fi
5922 echo "$as_me:5922: result: `eval echo '${'$as_ac_var'}'`" >&5
5923 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5924 if test `eval echo '${'$as_ac_var'}'` = yes; then
5925   cat >>confdefs.h <<EOF
5926 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5927 EOF
5928
5929 fi
5930 done
5931
5932 else
5933         echo "$as_me:5933: checking if link/symlink functions work" >&5
5934 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5935 if test "${cf_cv_link_funcs+set}" = set; then
5936   echo $ECHO_N "(cached) $ECHO_C" >&6
5937 else
5938
5939                 cf_cv_link_funcs=
5940                 for cf_func in link symlink ; do
5941                         if test "$cross_compiling" = yes; then
5942
5943                         eval 'ac_cv_func_'$cf_func'=error'
5944 else
5945   cat >conftest.$ac_ext <<_ACEOF
5946 #line 5946 "configure"
5947 #include "confdefs.h"
5948
5949 #include <sys/types.h>
5950 #include <sys/stat.h>
5951 #ifdef HAVE_UNISTD_H
5952 #include <unistd.h>
5953 #endif
5954 int main()
5955 {
5956         int fail = 0;
5957         char *src = "config.log";
5958         char *dst = "conftest.chk";
5959         struct stat src_sb;
5960         struct stat dst_sb;
5961
5962         stat(src, &src_sb);
5963         fail = ($cf_func("config.log", "conftest.chk") < 0)
5964             || (stat(dst, &dst_sb) < 0)
5965             || (dst_sb.st_mtime != src_sb.st_mtime);
5966 #ifdef HAVE_UNLINK
5967         unlink(dst);
5968 #else
5969         remove(dst);
5970 #endif
5971         ${cf_cv_main_return:-return} (fail);
5972 }
5973
5974 _ACEOF
5975 rm -f conftest$ac_exeext
5976 if { (eval echo "$as_me:5976: \"$ac_link\"") >&5
5977   (eval $ac_link) 2>&5
5978   ac_status=$?
5979   echo "$as_me:5979: \$? = $ac_status" >&5
5980   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5981   { (eval echo "$as_me:5981: \"$ac_try\"") >&5
5982   (eval $ac_try) 2>&5
5983   ac_status=$?
5984   echo "$as_me:5984: \$? = $ac_status" >&5
5985   (exit $ac_status); }; }; then
5986
5987                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5988                         eval 'ac_cv_func_'$cf_func'=yes'
5989 else
5990   echo "$as_me: program exited with status $ac_status" >&5
5991 echo "$as_me: failed program was:" >&5
5992 cat conftest.$ac_ext >&5
5993
5994                         eval 'ac_cv_func_'$cf_func'=no'
5995 fi
5996 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5997 fi
5998                 done
5999                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6000
6001 fi
6002 echo "$as_me:6002: result: $cf_cv_link_funcs" >&5
6003 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6004         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6005 #define HAVE_LINK 1
6006 EOF
6007
6008         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6009 #define HAVE_SYMLINK 1
6010 EOF
6011
6012 fi
6013
6014 with_links=no
6015 with_symlinks=no
6016
6017 # soft links (symbolic links) are useful for some systems where hard links do
6018 # not work, or to make it simpler to copy terminfo trees around.
6019 if test "$ac_cv_func_symlink" = yes ; then
6020     echo "$as_me:6020: checking if tic should use symbolic links" >&5
6021 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6022
6023 # Check whether --enable-symlinks or --disable-symlinks was given.
6024 if test "${enable_symlinks+set}" = set; then
6025   enableval="$enable_symlinks"
6026   with_symlinks=$enableval
6027 else
6028   with_symlinks=no
6029 fi;
6030     echo "$as_me:6030: result: $with_symlinks" >&5
6031 echo "${ECHO_T}$with_symlinks" >&6
6032 fi
6033
6034 # If we have hard links and did not choose to use soft links instead, there is
6035 # no reason to make this choice optional - use the hard links.
6036 if test "$with_symlinks" = no ; then
6037     echo "$as_me:6037: checking if tic should use hard links" >&5
6038 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6039     if test "$ac_cv_func_link" = yes ; then
6040         with_links=yes
6041     else
6042         with_links=no
6043     fi
6044     echo "$as_me:6044: result: $with_links" >&5
6045 echo "${ECHO_T}$with_links" >&6
6046 fi
6047
6048 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6049 #define USE_LINKS 1
6050 EOF
6051
6052 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6053 #define USE_SYMLINKS 1
6054 EOF
6055
6056 ###   use option --enable-broken-linker to force on use of broken-linker support
6057 echo "$as_me:6057: checking if you want broken-linker support code" >&5
6058 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6059
6060 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6061 if test "${enable_broken_linker+set}" = set; then
6062   enableval="$enable_broken_linker"
6063   with_broken_linker=$enableval
6064 else
6065   with_broken_linker=${BROKEN_LINKER-no}
6066 fi;
6067 echo "$as_me:6067: result: $with_broken_linker" >&5
6068 echo "${ECHO_T}$with_broken_linker" >&6
6069
6070 BROKEN_LINKER=0
6071 if test "$with_broken_linker" = yes ; then
6072         cat >>confdefs.h <<\EOF
6073 #define BROKEN_LINKER 1
6074 EOF
6075
6076         BROKEN_LINKER=1
6077 elif test "$DFT_LWR_MODEL" = shared ; then
6078         case $cf_cv_system_name in #(vi
6079         cygwin*)
6080                 cat >>confdefs.h <<\EOF
6081 #define BROKEN_LINKER 1
6082 EOF
6083
6084                 BROKEN_LINKER=1
6085                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6086
6087 echo "${as_me-configure}:6087: testing cygwin linker is broken anyway ..." 1>&5
6088
6089                 ;;
6090         esac
6091 fi
6092
6093 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6094 echo "$as_me:6094: checking if tputs should process BSD-style prefix padding" >&5
6095 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6096
6097 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6098 if test "${enable_bsdpad+set}" = set; then
6099   enableval="$enable_bsdpad"
6100   with_bsdpad=$enableval
6101 else
6102   with_bsdpad=no
6103 fi;
6104 echo "$as_me:6104: result: $with_bsdpad" >&5
6105 echo "${ECHO_T}$with_bsdpad" >&6
6106 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6107 #define BSD_TPUTS 1
6108 EOF
6109
6110 ###   use option --enable-widec to turn on use of wide-character support
6111 NCURSES_CH_T=chtype
6112 NCURSES_LIBUTF8=0
6113
6114 NEED_WCHAR_H=0
6115 NCURSES_MBSTATE_T=0
6116 NCURSES_WCHAR_T=0
6117 NCURSES_WINT_T=0
6118
6119 # Check to define _XOPEN_SOURCE "automatically"
6120
6121 echo "$as_me:6121: checking if $CC -U and -D options work together" >&5
6122 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6123 if test "${cf_cv_cc_u_d_options+set}" = set; then
6124   echo $ECHO_N "(cached) $ECHO_C" >&6
6125 else
6126
6127         cf_save_CPPFLAGS="$CPPFLAGS"
6128         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6129         cat >conftest.$ac_ext <<_ACEOF
6130 #line 6130 "configure"
6131 #include "confdefs.h"
6132
6133 int
6134 main ()
6135 {
6136
6137 #ifndef U_D_OPTIONS
6138 make an undefined-error
6139 #endif
6140 #ifdef  D_U_OPTIONS
6141 make a defined-error
6142 #endif
6143
6144   ;
6145   return 0;
6146 }
6147 _ACEOF
6148 rm -f conftest.$ac_objext
6149 if { (eval echo "$as_me:6149: \"$ac_compile\"") >&5
6150   (eval $ac_compile) 2>&5
6151   ac_status=$?
6152   echo "$as_me:6152: \$? = $ac_status" >&5
6153   (exit $ac_status); } &&
6154          { ac_try='test -s conftest.$ac_objext'
6155   { (eval echo "$as_me:6155: \"$ac_try\"") >&5
6156   (eval $ac_try) 2>&5
6157   ac_status=$?
6158   echo "$as_me:6158: \$? = $ac_status" >&5
6159   (exit $ac_status); }; }; then
6160
6161         cf_cv_cc_u_d_options=yes
6162 else
6163   echo "$as_me: failed program was:" >&5
6164 cat conftest.$ac_ext >&5
6165
6166         cf_cv_cc_u_d_options=no
6167 fi
6168 rm -f conftest.$ac_objext conftest.$ac_ext
6169         CPPFLAGS="$cf_save_CPPFLAGS"
6170
6171 fi
6172 echo "$as_me:6172: result: $cf_cv_cc_u_d_options" >&5
6173 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6174
6175 cf_XOPEN_SOURCE=500
6176 cf_POSIX_C_SOURCE=199506L
6177
6178 case $host_os in #(vi
6179 aix[45]*) #(vi
6180         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6181         ;;
6182 freebsd*|dragonfly*) #(vi
6183         # 5.x headers associate
6184         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6185         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6186         cf_POSIX_C_SOURCE=200112L
6187         cf_XOPEN_SOURCE=600
6188         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6189         ;;
6190 hpux*) #(vi
6191         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6192         ;;
6193 irix[56].*) #(vi
6194         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6195         ;;
6196 linux*|gnu*|k*bsd*-gnu) #(vi
6197
6198 echo "$as_me:6198: checking if we must define _GNU_SOURCE" >&5
6199 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6200 if test "${cf_cv_gnu_source+set}" = set; then
6201   echo $ECHO_N "(cached) $ECHO_C" >&6
6202 else
6203
6204 cat >conftest.$ac_ext <<_ACEOF
6205 #line 6205 "configure"
6206 #include "confdefs.h"
6207 #include <sys/types.h>
6208 int
6209 main ()
6210 {
6211
6212 #ifndef _XOPEN_SOURCE
6213 make an error
6214 #endif
6215   ;
6216   return 0;
6217 }
6218 _ACEOF
6219 rm -f conftest.$ac_objext
6220 if { (eval echo "$as_me:6220: \"$ac_compile\"") >&5
6221   (eval $ac_compile) 2>&5
6222   ac_status=$?
6223   echo "$as_me:6223: \$? = $ac_status" >&5
6224   (exit $ac_status); } &&
6225          { ac_try='test -s conftest.$ac_objext'
6226   { (eval echo "$as_me:6226: \"$ac_try\"") >&5
6227   (eval $ac_try) 2>&5
6228   ac_status=$?
6229   echo "$as_me:6229: \$? = $ac_status" >&5
6230   (exit $ac_status); }; }; then
6231   cf_cv_gnu_source=no
6232 else
6233   echo "$as_me: failed program was:" >&5
6234 cat conftest.$ac_ext >&5
6235 cf_save="$CPPFLAGS"
6236          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6237          cat >conftest.$ac_ext <<_ACEOF
6238 #line 6238 "configure"
6239 #include "confdefs.h"
6240 #include <sys/types.h>
6241 int
6242 main ()
6243 {
6244
6245 #ifdef _XOPEN_SOURCE
6246 make an error
6247 #endif
6248   ;
6249   return 0;
6250 }
6251 _ACEOF
6252 rm -f conftest.$ac_objext
6253 if { (eval echo "$as_me:6253: \"$ac_compile\"") >&5
6254   (eval $ac_compile) 2>&5
6255   ac_status=$?
6256   echo "$as_me:6256: \$? = $ac_status" >&5
6257   (exit $ac_status); } &&
6258          { ac_try='test -s conftest.$ac_objext'
6259   { (eval echo "$as_me:6259: \"$ac_try\"") >&5
6260   (eval $ac_try) 2>&5
6261   ac_status=$?
6262   echo "$as_me:6262: \$? = $ac_status" >&5
6263   (exit $ac_status); }; }; then
6264   cf_cv_gnu_source=no
6265 else
6266   echo "$as_me: failed program was:" >&5
6267 cat conftest.$ac_ext >&5
6268 cf_cv_gnu_source=yes
6269 fi
6270 rm -f conftest.$ac_objext conftest.$ac_ext
6271         CPPFLAGS="$cf_save"
6272
6273 fi
6274 rm -f conftest.$ac_objext conftest.$ac_ext
6275
6276 fi
6277 echo "$as_me:6277: result: $cf_cv_gnu_source" >&5
6278 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6279 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6280
6281         ;;
6282 mirbsd*) #(vi
6283         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6284         ;;
6285 netbsd*) #(vi
6286         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6287         ;;
6288 openbsd*) #(vi
6289         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6290         ;;
6291 osf[45]*) #(vi
6292         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6293         ;;
6294 nto-qnx*) #(vi
6295         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6296         ;;
6297 sco*) #(vi
6298         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6299         ;;
6300 solaris*) #(vi
6301         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6302         ;;
6303 *)
6304         echo "$as_me:6304: checking if we should define _XOPEN_SOURCE" >&5
6305 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6306 if test "${cf_cv_xopen_source+set}" = set; then
6307   echo $ECHO_N "(cached) $ECHO_C" >&6
6308 else
6309
6310         cat >conftest.$ac_ext <<_ACEOF
6311 #line 6311 "configure"
6312 #include "confdefs.h"
6313 #include <sys/types.h>
6314 int
6315 main ()
6316 {
6317
6318 #ifndef _XOPEN_SOURCE
6319 make an error
6320 #endif
6321   ;
6322   return 0;
6323 }
6324 _ACEOF
6325 rm -f conftest.$ac_objext
6326 if { (eval echo "$as_me:6326: \"$ac_compile\"") >&5
6327   (eval $ac_compile) 2>&5
6328   ac_status=$?
6329   echo "$as_me:6329: \$? = $ac_status" >&5
6330   (exit $ac_status); } &&
6331          { ac_try='test -s conftest.$ac_objext'
6332   { (eval echo "$as_me:6332: \"$ac_try\"") >&5
6333   (eval $ac_try) 2>&5
6334   ac_status=$?
6335   echo "$as_me:6335: \$? = $ac_status" >&5
6336   (exit $ac_status); }; }; then
6337   cf_cv_xopen_source=no
6338 else
6339   echo "$as_me: failed program was:" >&5
6340 cat conftest.$ac_ext >&5
6341 cf_save="$CPPFLAGS"
6342          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6343          cat >conftest.$ac_ext <<_ACEOF
6344 #line 6344 "configure"
6345 #include "confdefs.h"
6346 #include <sys/types.h>
6347 int
6348 main ()
6349 {
6350
6351 #ifdef _XOPEN_SOURCE
6352 make an error
6353 #endif
6354   ;
6355   return 0;
6356 }
6357 _ACEOF
6358 rm -f conftest.$ac_objext
6359 if { (eval echo "$as_me:6359: \"$ac_compile\"") >&5
6360   (eval $ac_compile) 2>&5
6361   ac_status=$?
6362   echo "$as_me:6362: \$? = $ac_status" >&5
6363   (exit $ac_status); } &&
6364          { ac_try='test -s conftest.$ac_objext'
6365   { (eval echo "$as_me:6365: \"$ac_try\"") >&5
6366   (eval $ac_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:6368: \$? = $ac_status" >&5
6369   (exit $ac_status); }; }; then
6370   cf_cv_xopen_source=no
6371 else
6372   echo "$as_me: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6375 fi
6376 rm -f conftest.$ac_objext conftest.$ac_ext
6377         CPPFLAGS="$cf_save"
6378
6379 fi
6380 rm -f conftest.$ac_objext conftest.$ac_ext
6381
6382 fi
6383 echo "$as_me:6383: result: $cf_cv_xopen_source" >&5
6384 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6385         if test "$cf_cv_xopen_source" != no ; then
6386
6387 # remove _XOPEN_SOURCE symbol from $CFLAGS
6388 CFLAGS=`echo "$CFLAGS" | \
6389         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6390                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6391
6392 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6393 CPPFLAGS=`echo "$CPPFLAGS" | \
6394         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6395                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6396
6397                 test "$cf_cv_cc_u_d_options" = yes && \
6398                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6399                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6400         fi
6401
6402 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6403
6404 cf_save_CFLAGS="$CFLAGS"
6405 cf_save_CPPFLAGS="$CPPFLAGS"
6406
6407 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6408 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6409         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6410                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6411
6412 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6413 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6414         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6415                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6416
6417 echo "$as_me:6417: checking if we should define _POSIX_C_SOURCE" >&5
6418 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6419 if test "${cf_cv_posix_c_source+set}" = set; then
6420   echo $ECHO_N "(cached) $ECHO_C" >&6
6421 else
6422
6423 echo "${as_me-configure}:6423: testing if the symbol is already defined go no further ..." 1>&5
6424
6425         cat >conftest.$ac_ext <<_ACEOF
6426 #line 6426 "configure"
6427 #include "confdefs.h"
6428 #include <sys/types.h>
6429 int
6430 main ()
6431 {
6432
6433 #ifndef _POSIX_C_SOURCE
6434 make an error
6435 #endif
6436   ;
6437   return 0;
6438 }
6439 _ACEOF
6440 rm -f conftest.$ac_objext
6441 if { (eval echo "$as_me:6441: \"$ac_compile\"") >&5
6442   (eval $ac_compile) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); } &&
6446          { ac_try='test -s conftest.$ac_objext'
6447   { (eval echo "$as_me:6447: \"$ac_try\"") >&5
6448   (eval $ac_try) 2>&5
6449   ac_status=$?
6450   echo "$as_me:6450: \$? = $ac_status" >&5
6451   (exit $ac_status); }; }; then
6452   cf_cv_posix_c_source=no
6453 else
6454   echo "$as_me: failed program was:" >&5
6455 cat conftest.$ac_ext >&5
6456 cf_want_posix_source=no
6457          case .$cf_POSIX_C_SOURCE in #(vi
6458          .[12]??*) #(vi
6459                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6460                 ;;
6461          .2) #(vi
6462                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6463                 cf_want_posix_source=yes
6464                 ;;
6465          .*)
6466                 cf_want_posix_source=yes
6467                 ;;
6468          esac
6469          if test "$cf_want_posix_source" = yes ; then
6470                 cat >conftest.$ac_ext <<_ACEOF
6471 #line 6471 "configure"
6472 #include "confdefs.h"
6473 #include <sys/types.h>
6474 int
6475 main ()
6476 {
6477
6478 #ifdef _POSIX_SOURCE
6479 make an error
6480 #endif
6481   ;
6482   return 0;
6483 }
6484 _ACEOF
6485 rm -f conftest.$ac_objext
6486 if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
6487   (eval $ac_compile) 2>&5
6488   ac_status=$?
6489   echo "$as_me:6489: \$? = $ac_status" >&5
6490   (exit $ac_status); } &&
6491          { ac_try='test -s conftest.$ac_objext'
6492   { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6493   (eval $ac_try) 2>&5
6494   ac_status=$?
6495   echo "$as_me:6495: \$? = $ac_status" >&5
6496   (exit $ac_status); }; }; then
6497   :
6498 else
6499   echo "$as_me: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6501 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6502 fi
6503 rm -f conftest.$ac_objext conftest.$ac_ext
6504          fi
6505
6506 echo "${as_me-configure}:6506: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6507
6508          CFLAGS="$cf_trim_CFLAGS"
6509          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6510
6511 echo "${as_me-configure}:6511: testing if the second compile does not leave our definition intact error ..." 1>&5
6512
6513          cat >conftest.$ac_ext <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516 #include <sys/types.h>
6517 int
6518 main ()
6519 {
6520
6521 #ifndef _POSIX_C_SOURCE
6522 make an error
6523 #endif
6524   ;
6525   return 0;
6526 }
6527 _ACEOF
6528 rm -f conftest.$ac_objext
6529 if { (eval echo "$as_me:6529: \"$ac_compile\"") >&5
6530   (eval $ac_compile) 2>&5
6531   ac_status=$?
6532   echo "$as_me:6532: \$? = $ac_status" >&5
6533   (exit $ac_status); } &&
6534          { ac_try='test -s conftest.$ac_objext'
6535   { (eval echo "$as_me:6535: \"$ac_try\"") >&5
6536   (eval $ac_try) 2>&5
6537   ac_status=$?
6538   echo "$as_me:6538: \$? = $ac_status" >&5
6539   (exit $ac_status); }; }; then
6540   :
6541 else
6542   echo "$as_me: failed program was:" >&5
6543 cat conftest.$ac_ext >&5
6544 cf_cv_posix_c_source=no
6545 fi
6546 rm -f conftest.$ac_objext conftest.$ac_ext
6547          CFLAGS="$cf_save_CFLAGS"
6548          CPPFLAGS="$cf_save_CPPFLAGS"
6549
6550 fi
6551 rm -f conftest.$ac_objext conftest.$ac_ext
6552
6553 fi
6554 echo "$as_me:6554: result: $cf_cv_posix_c_source" >&5
6555 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6556
6557 if test "$cf_cv_posix_c_source" != no ; then
6558         CFLAGS="$cf_trim_CFLAGS"
6559         CPPFLAGS="$cf_trim_CPPFLAGS"
6560         if test "$cf_cv_cc_u_d_options" = yes ; then
6561                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6562                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6563                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6564         fi
6565         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6566 fi
6567
6568         ;;
6569 esac
6570
6571 # Work around breakage on OS X
6572
6573 echo "$as_me:6573: checking if SIGWINCH is defined" >&5
6574 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6575 if test "${cf_cv_define_sigwinch+set}" = set; then
6576   echo $ECHO_N "(cached) $ECHO_C" >&6
6577 else
6578
6579         cat >conftest.$ac_ext <<_ACEOF
6580 #line 6580 "configure"
6581 #include "confdefs.h"
6582
6583 #include <sys/types.h>
6584 #include <sys/signal.h>
6585
6586 int
6587 main ()
6588 {
6589 int x = SIGWINCH
6590   ;
6591   return 0;
6592 }
6593 _ACEOF
6594 rm -f conftest.$ac_objext
6595 if { (eval echo "$as_me:6595: \"$ac_compile\"") >&5
6596   (eval $ac_compile) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); } &&
6600          { ac_try='test -s conftest.$ac_objext'
6601   { (eval echo "$as_me:6601: \"$ac_try\"") >&5
6602   (eval $ac_try) 2>&5
6603   ac_status=$?
6604   echo "$as_me:6604: \$? = $ac_status" >&5
6605   (exit $ac_status); }; }; then
6606   cf_cv_define_sigwinch=yes
6607 else
6608   echo "$as_me: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
6610 cat >conftest.$ac_ext <<_ACEOF
6611 #line 6611 "configure"
6612 #include "confdefs.h"
6613
6614 #undef _XOPEN_SOURCE
6615 #undef _POSIX_SOURCE
6616 #undef _POSIX_C_SOURCE
6617 #include <sys/types.h>
6618 #include <sys/signal.h>
6619
6620 int
6621 main ()
6622 {
6623 int x = SIGWINCH
6624   ;
6625   return 0;
6626 }
6627 _ACEOF
6628 rm -f conftest.$ac_objext
6629 if { (eval echo "$as_me:6629: \"$ac_compile\"") >&5
6630   (eval $ac_compile) 2>&5
6631   ac_status=$?
6632   echo "$as_me:6632: \$? = $ac_status" >&5
6633   (exit $ac_status); } &&
6634          { ac_try='test -s conftest.$ac_objext'
6635   { (eval echo "$as_me:6635: \"$ac_try\"") >&5
6636   (eval $ac_try) 2>&5
6637   ac_status=$?
6638   echo "$as_me:6638: \$? = $ac_status" >&5
6639   (exit $ac_status); }; }; then
6640   cf_cv_define_sigwinch=maybe
6641 else
6642   echo "$as_me: failed program was:" >&5
6643 cat conftest.$ac_ext >&5
6644 cf_cv_define_sigwinch=no
6645 fi
6646 rm -f conftest.$ac_objext conftest.$ac_ext
6647
6648 fi
6649 rm -f conftest.$ac_objext conftest.$ac_ext
6650
6651 fi
6652 echo "$as_me:6652: result: $cf_cv_define_sigwinch" >&5
6653 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6654
6655 if test "$cf_cv_define_sigwinch" = maybe ; then
6656 echo "$as_me:6656: checking for actual SIGWINCH definition" >&5
6657 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6658 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6659   echo $ECHO_N "(cached) $ECHO_C" >&6
6660 else
6661
6662 cf_cv_fixup_sigwinch=unknown
6663 cf_sigwinch=32
6664 while test $cf_sigwinch != 1
6665 do
6666         cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669
6670 #undef _XOPEN_SOURCE
6671 #undef _POSIX_SOURCE
6672 #undef _POSIX_C_SOURCE
6673 #include <sys/types.h>
6674 #include <sys/signal.h>
6675
6676 int
6677 main ()
6678 {
6679
6680 #if SIGWINCH != $cf_sigwinch
6681 make an error
6682 #endif
6683 int x = SIGWINCH
6684   ;
6685   return 0;
6686 }
6687 _ACEOF
6688 rm -f conftest.$ac_objext
6689 if { (eval echo "$as_me:6689: \"$ac_compile\"") >&5
6690   (eval $ac_compile) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); } &&
6694          { ac_try='test -s conftest.$ac_objext'
6695   { (eval echo "$as_me:6695: \"$ac_try\"") >&5
6696   (eval $ac_try) 2>&5
6697   ac_status=$?
6698   echo "$as_me:6698: \$? = $ac_status" >&5
6699   (exit $ac_status); }; }; then
6700   cf_cv_fixup_sigwinch=$cf_sigwinch
6701          break
6702 else
6703   echo "$as_me: failed program was:" >&5
6704 cat conftest.$ac_ext >&5
6705 fi
6706 rm -f conftest.$ac_objext conftest.$ac_ext
6707
6708 cf_sigwinch=`expr $cf_sigwinch - 1`
6709 done
6710
6711 fi
6712 echo "$as_me:6712: result: $cf_cv_fixup_sigwinch" >&5
6713 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6714
6715         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6716                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6717         fi
6718 fi
6719
6720 # Checks for CODESET support.
6721
6722   echo "$as_me:6722: checking for nl_langinfo and CODESET" >&5
6723 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6724 if test "${am_cv_langinfo_codeset+set}" = set; then
6725   echo $ECHO_N "(cached) $ECHO_C" >&6
6726 else
6727   cat >conftest.$ac_ext <<_ACEOF
6728 #line 6728 "configure"
6729 #include "confdefs.h"
6730 #include <langinfo.h>
6731 int
6732 main ()
6733 {
6734 char* cs = nl_langinfo(CODESET);
6735   ;
6736   return 0;
6737 }
6738 _ACEOF
6739 rm -f conftest.$ac_objext conftest$ac_exeext
6740 if { (eval echo "$as_me:6740: \"$ac_link\"") >&5
6741   (eval $ac_link) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); } &&
6745          { ac_try='test -s conftest$ac_exeext'
6746   { (eval echo "$as_me:6746: \"$ac_try\"") >&5
6747   (eval $ac_try) 2>&5
6748   ac_status=$?
6749   echo "$as_me:6749: \$? = $ac_status" >&5
6750   (exit $ac_status); }; }; then
6751   am_cv_langinfo_codeset=yes
6752 else
6753   echo "$as_me: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6755 am_cv_langinfo_codeset=no
6756 fi
6757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6758
6759 fi
6760 echo "$as_me:6760: result: $am_cv_langinfo_codeset" >&5
6761 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6762   if test $am_cv_langinfo_codeset = yes; then
6763
6764 cat >>confdefs.h <<\EOF
6765 #define HAVE_LANGINFO_CODESET 1
6766 EOF
6767
6768   fi
6769
6770 # use these variables to work around a defect in gcc's fixincludes.
6771 NCURSES_OK_WCHAR_T=
6772 NCURSES_OK_WINT_T=
6773
6774 echo "$as_me:6774: checking if you want wide-character code" >&5
6775 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6776
6777 # Check whether --enable-widec or --disable-widec was given.
6778 if test "${enable_widec+set}" = set; then
6779   enableval="$enable_widec"
6780   with_widec=$enableval
6781 else
6782   with_widec=no
6783 fi;
6784 echo "$as_me:6784: result: $with_widec" >&5
6785 echo "${ECHO_T}$with_widec" >&6
6786 if test "$with_widec" = yes ; then
6787         LIB_SUFFIX="w${LIB_SUFFIX}"
6788         cat >>confdefs.h <<\EOF
6789 #define USE_WIDEC_SUPPORT 1
6790 EOF
6791
6792 echo "$as_me:6792: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6793 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6794 cat >conftest.$ac_ext <<_ACEOF
6795 #line 6795 "configure"
6796 #include "confdefs.h"
6797 #include <sys/types.h>
6798
6799 int
6800 main ()
6801 {
6802
6803 #ifndef _XOPEN_SOURCE_EXTENDED
6804 make an error
6805 #endif
6806   ;
6807   return 0;
6808 }
6809 _ACEOF
6810 rm -f conftest.$ac_objext
6811 if { (eval echo "$as_me:6811: \"$ac_compile\"") >&5
6812   (eval $ac_compile) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit $ac_status); } &&
6816          { ac_try='test -s conftest.$ac_objext'
6817   { (eval echo "$as_me:6817: \"$ac_try\"") >&5
6818   (eval $ac_try) 2>&5
6819   ac_status=$?
6820   echo "$as_me:6820: \$? = $ac_status" >&5
6821   (exit $ac_status); }; }; then
6822   cf_result=no
6823 else
6824   echo "$as_me: failed program was:" >&5
6825 cat conftest.$ac_ext >&5
6826 cf_result=yes
6827 fi
6828 rm -f conftest.$ac_objext conftest.$ac_ext
6829 echo "$as_me:6829: result: $cf_result" >&5
6830 echo "${ECHO_T}$cf_result" >&6
6831
6832 if test "$cf_result" = yes ; then
6833         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6834 elif test "x" != "x" ; then
6835         echo "$as_me:6835: checking checking for compatible value versus " >&5
6836 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6837         cat >conftest.$ac_ext <<_ACEOF
6838 #line 6838 "configure"
6839 #include "confdefs.h"
6840 #include <sys/types.h>
6841
6842 int
6843 main ()
6844 {
6845
6846 #if _XOPEN_SOURCE_EXTENDED- < 0
6847 make an error
6848 #endif
6849   ;
6850   return 0;
6851 }
6852 _ACEOF
6853 rm -f conftest.$ac_objext
6854 if { (eval echo "$as_me:6854: \"$ac_compile\"") >&5
6855   (eval $ac_compile) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); } &&
6859          { ac_try='test -s conftest.$ac_objext'
6860   { (eval echo "$as_me:6860: \"$ac_try\"") >&5
6861   (eval $ac_try) 2>&5
6862   ac_status=$?
6863   echo "$as_me:6863: \$? = $ac_status" >&5
6864   (exit $ac_status); }; }; then
6865   cf_result=yes
6866 else
6867   echo "$as_me: failed program was:" >&5
6868 cat conftest.$ac_ext >&5
6869 cf_result=no
6870 fi
6871 rm -f conftest.$ac_objext conftest.$ac_ext
6872         echo "$as_me:6872: result: $cf_result" >&5
6873 echo "${ECHO_T}$cf_result" >&6
6874         if test "$cf_result" = no ; then
6875                 # perhaps we can override it - try...
6876                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6877         fi
6878 fi
6879
6880         # with_overwrite=no
6881         NCURSES_CH_T=cchar_t
6882
6883 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6884 do
6885 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6886 echo "$as_me:6886: checking for $ac_func" >&5
6887 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6888 if eval "test \"\${$as_ac_var+set}\" = set"; then
6889   echo $ECHO_N "(cached) $ECHO_C" >&6
6890 else
6891   cat >conftest.$ac_ext <<_ACEOF
6892 #line 6892 "configure"
6893 #include "confdefs.h"
6894 /* System header to define __stub macros and hopefully few prototypes,
6895     which can conflict with char $ac_func (); below.  */
6896 #include <assert.h>
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 #ifdef __cplusplus
6899 extern "C"
6900 #endif
6901 /* We use char because int might match the return type of a gcc2
6902    builtin and then its argument prototype would still apply.  */
6903 char $ac_func ();
6904 char (*f) ();
6905
6906 int
6907 main ()
6908 {
6909 /* The GNU C library defines this for functions which it implements
6910     to always fail with ENOSYS.  Some functions are actually named
6911     something starting with __ and the normal name is an alias.  */
6912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6913 choke me
6914 #else
6915 f = $ac_func;
6916 #endif
6917
6918   ;
6919   return 0;
6920 }
6921 _ACEOF
6922 rm -f conftest.$ac_objext conftest$ac_exeext
6923 if { (eval echo "$as_me:6923: \"$ac_link\"") >&5
6924   (eval $ac_link) 2>&5
6925   ac_status=$?
6926   echo "$as_me:6926: \$? = $ac_status" >&5
6927   (exit $ac_status); } &&
6928          { ac_try='test -s conftest$ac_exeext'
6929   { (eval echo "$as_me:6929: \"$ac_try\"") >&5
6930   (eval $ac_try) 2>&5
6931   ac_status=$?
6932   echo "$as_me:6932: \$? = $ac_status" >&5
6933   (exit $ac_status); }; }; then
6934   eval "$as_ac_var=yes"
6935 else
6936   echo "$as_me: failed program was:" >&5
6937 cat conftest.$ac_ext >&5
6938 eval "$as_ac_var=no"
6939 fi
6940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6941 fi
6942 echo "$as_me:6942: result: `eval echo '${'$as_ac_var'}'`" >&5
6943 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6944 if test `eval echo '${'$as_ac_var'}'` = yes; then
6945   cat >>confdefs.h <<EOF
6946 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6947 EOF
6948
6949 fi
6950 done
6951
6952         if test "$ac_cv_func_putwc" != yes ; then
6953
6954 echo "$as_me:6954: checking for putwc in libutf8" >&5
6955 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6956 if test "${cf_cv_libutf8+set}" = set; then
6957   echo $ECHO_N "(cached) $ECHO_C" >&6
6958 else
6959
6960         cf_save_LIBS="$LIBS"
6961         LIBS="-lutf8 $LIBS"
6962 cat >conftest.$ac_ext <<_ACEOF
6963 #line 6963 "configure"
6964 #include "confdefs.h"
6965
6966 #include <libutf8.h>
6967 int
6968 main ()
6969 {
6970 putwc(0,0);
6971   ;
6972   return 0;
6973 }
6974 _ACEOF
6975 rm -f conftest.$ac_objext conftest$ac_exeext
6976 if { (eval echo "$as_me:6976: \"$ac_link\"") >&5
6977   (eval $ac_link) 2>&5
6978   ac_status=$?
6979   echo "$as_me:6979: \$? = $ac_status" >&5
6980   (exit $ac_status); } &&
6981          { ac_try='test -s conftest$ac_exeext'
6982   { (eval echo "$as_me:6982: \"$ac_try\"") >&5
6983   (eval $ac_try) 2>&5
6984   ac_status=$?
6985   echo "$as_me:6985: \$? = $ac_status" >&5
6986   (exit $ac_status); }; }; then
6987   cf_cv_libutf8=yes
6988 else
6989   echo "$as_me: failed program was:" >&5
6990 cat conftest.$ac_ext >&5
6991 cf_cv_libutf8=no
6992 fi
6993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6994         LIBS="$cf_save_LIBS"
6995
6996 fi
6997 echo "$as_me:6997: result: $cf_cv_libutf8" >&5
6998 echo "${ECHO_T}$cf_cv_libutf8" >&6
6999
7000 if test "$cf_cv_libutf8" = yes ; then
7001         cat >>confdefs.h <<\EOF
7002 #define HAVE_LIBUTF8_H 1
7003 EOF
7004
7005         LIBS="-lutf8 $LIBS"
7006 fi
7007
7008                 if test "$cf_cv_libutf8" = yes ; then
7009                         NCURSES_LIBUTF8=1
7010                 fi
7011         fi
7012
7013 # This is needed on Tru64 5.0 to declare mbstate_t
7014 echo "$as_me:7014: checking if we must include wchar.h to declare mbstate_t" >&5
7015 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7016 if test "${cf_cv_mbstate_t+set}" = set; then
7017   echo $ECHO_N "(cached) $ECHO_C" >&6
7018 else
7019
7020 cat >conftest.$ac_ext <<_ACEOF
7021 #line 7021 "configure"
7022 #include "confdefs.h"
7023
7024 #include <stdlib.h>
7025 #include <stdarg.h>
7026 #include <stdio.h>
7027 #ifdef HAVE_LIBUTF8_H
7028 #include <libutf8.h>
7029 #endif
7030 int
7031 main ()
7032 {
7033 mbstate_t state
7034   ;
7035   return 0;
7036 }
7037 _ACEOF
7038 rm -f conftest.$ac_objext
7039 if { (eval echo "$as_me:7039: \"$ac_compile\"") >&5
7040   (eval $ac_compile) 2>&5
7041   ac_status=$?
7042   echo "$as_me:7042: \$? = $ac_status" >&5
7043   (exit $ac_status); } &&
7044          { ac_try='test -s conftest.$ac_objext'
7045   { (eval echo "$as_me:7045: \"$ac_try\"") >&5
7046   (eval $ac_try) 2>&5
7047   ac_status=$?
7048   echo "$as_me:7048: \$? = $ac_status" >&5
7049   (exit $ac_status); }; }; then
7050   cf_cv_mbstate_t=no
7051 else
7052   echo "$as_me: failed program was:" >&5
7053 cat conftest.$ac_ext >&5
7054 cat >conftest.$ac_ext <<_ACEOF
7055 #line 7055 "configure"
7056 #include "confdefs.h"
7057
7058 #include <stdlib.h>
7059 #include <stdarg.h>
7060 #include <stdio.h>
7061 #include <wchar.h>
7062 #ifdef HAVE_LIBUTF8_H
7063 #include <libutf8.h>
7064 #endif
7065 int
7066 main ()
7067 {
7068 mbstate_t value
7069   ;
7070   return 0;
7071 }
7072 _ACEOF
7073 rm -f conftest.$ac_objext
7074 if { (eval echo "$as_me:7074: \"$ac_compile\"") >&5
7075   (eval $ac_compile) 2>&5
7076   ac_status=$?
7077   echo "$as_me:7077: \$? = $ac_status" >&5
7078   (exit $ac_status); } &&
7079          { ac_try='test -s conftest.$ac_objext'
7080   { (eval echo "$as_me:7080: \"$ac_try\"") >&5
7081   (eval $ac_try) 2>&5
7082   ac_status=$?
7083   echo "$as_me:7083: \$? = $ac_status" >&5
7084   (exit $ac_status); }; }; then
7085   cf_cv_mbstate_t=yes
7086 else
7087   echo "$as_me: failed program was:" >&5
7088 cat conftest.$ac_ext >&5
7089 cf_cv_mbstate_t=unknown
7090 fi
7091 rm -f conftest.$ac_objext conftest.$ac_ext
7092 fi
7093 rm -f conftest.$ac_objext conftest.$ac_ext
7094 fi
7095 echo "$as_me:7095: result: $cf_cv_mbstate_t" >&5
7096 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7097
7098 if test "$cf_cv_mbstate_t" = yes ; then
7099         cat >>confdefs.h <<\EOF
7100 #define NEED_WCHAR_H 1
7101 EOF
7102
7103         NEED_WCHAR_H=1
7104 fi
7105
7106 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7107 if test "$cf_cv_mbstate_t" = unknown ; then
7108         NCURSES_MBSTATE_T=1
7109 fi
7110
7111 # This is needed on Tru64 5.0 to declare wchar_t
7112 echo "$as_me:7112: checking if we must include wchar.h to declare wchar_t" >&5
7113 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7114 if test "${cf_cv_wchar_t+set}" = set; then
7115   echo $ECHO_N "(cached) $ECHO_C" >&6
7116 else
7117
7118 cat >conftest.$ac_ext <<_ACEOF
7119 #line 7119 "configure"
7120 #include "confdefs.h"
7121
7122 #include <stdlib.h>
7123 #include <stdarg.h>
7124 #include <stdio.h>
7125 #ifdef HAVE_LIBUTF8_H
7126 #include <libutf8.h>
7127 #endif
7128 int
7129 main ()
7130 {
7131 wchar_t state
7132   ;
7133   return 0;
7134 }
7135 _ACEOF
7136 rm -f conftest.$ac_objext
7137 if { (eval echo "$as_me:7137: \"$ac_compile\"") >&5
7138   (eval $ac_compile) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); } &&
7142          { ac_try='test -s conftest.$ac_objext'
7143   { (eval echo "$as_me:7143: \"$ac_try\"") >&5
7144   (eval $ac_try) 2>&5
7145   ac_status=$?
7146   echo "$as_me:7146: \$? = $ac_status" >&5
7147   (exit $ac_status); }; }; then
7148   cf_cv_wchar_t=no
7149 else
7150   echo "$as_me: failed program was:" >&5
7151 cat conftest.$ac_ext >&5
7152 cat >conftest.$ac_ext <<_ACEOF
7153 #line 7153 "configure"
7154 #include "confdefs.h"
7155
7156 #include <stdlib.h>
7157 #include <stdarg.h>
7158 #include <stdio.h>
7159 #include <wchar.h>
7160 #ifdef HAVE_LIBUTF8_H
7161 #include <libutf8.h>
7162 #endif
7163 int
7164 main ()
7165 {
7166 wchar_t value
7167   ;
7168   return 0;
7169 }
7170 _ACEOF
7171 rm -f conftest.$ac_objext
7172 if { (eval echo "$as_me:7172: \"$ac_compile\"") >&5
7173   (eval $ac_compile) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit $ac_status); } &&
7177          { ac_try='test -s conftest.$ac_objext'
7178   { (eval echo "$as_me:7178: \"$ac_try\"") >&5
7179   (eval $ac_try) 2>&5
7180   ac_status=$?
7181   echo "$as_me:7181: \$? = $ac_status" >&5
7182   (exit $ac_status); }; }; then
7183   cf_cv_wchar_t=yes
7184 else
7185   echo "$as_me: failed program was:" >&5
7186 cat conftest.$ac_ext >&5
7187 cf_cv_wchar_t=unknown
7188 fi
7189 rm -f conftest.$ac_objext conftest.$ac_ext
7190 fi
7191 rm -f conftest.$ac_objext conftest.$ac_ext
7192 fi
7193 echo "$as_me:7193: result: $cf_cv_wchar_t" >&5
7194 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7195
7196 if test "$cf_cv_wchar_t" = yes ; then
7197         cat >>confdefs.h <<\EOF
7198 #define NEED_WCHAR_H 1
7199 EOF
7200
7201         NEED_WCHAR_H=1
7202 fi
7203
7204 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7205 if test "$cf_cv_wchar_t" = unknown ; then
7206         NCURSES_WCHAR_T=1
7207 fi
7208
7209 # if we find wchar_t in either place, use substitution to provide a fallback.
7210 if test "$cf_cv_wchar_t" != unknown ; then
7211         NCURSES_OK_WCHAR_T=1
7212 fi
7213
7214 # This is needed on Tru64 5.0 to declare wint_t
7215 echo "$as_me:7215: checking if we must include wchar.h to declare wint_t" >&5
7216 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7217 if test "${cf_cv_wint_t+set}" = set; then
7218   echo $ECHO_N "(cached) $ECHO_C" >&6
7219 else
7220
7221 cat >conftest.$ac_ext <<_ACEOF
7222 #line 7222 "configure"
7223 #include "confdefs.h"
7224
7225 #include <stdlib.h>
7226 #include <stdarg.h>
7227 #include <stdio.h>
7228 #ifdef HAVE_LIBUTF8_H
7229 #include <libutf8.h>
7230 #endif
7231 int
7232 main ()
7233 {
7234 wint_t state
7235   ;
7236   return 0;
7237 }
7238 _ACEOF
7239 rm -f conftest.$ac_objext
7240 if { (eval echo "$as_me:7240: \"$ac_compile\"") >&5
7241   (eval $ac_compile) 2>&5
7242   ac_status=$?
7243   echo "$as_me:7243: \$? = $ac_status" >&5
7244   (exit $ac_status); } &&
7245          { ac_try='test -s conftest.$ac_objext'
7246   { (eval echo "$as_me:7246: \"$ac_try\"") >&5
7247   (eval $ac_try) 2>&5
7248   ac_status=$?
7249   echo "$as_me:7249: \$? = $ac_status" >&5
7250   (exit $ac_status); }; }; then
7251   cf_cv_wint_t=no
7252 else
7253   echo "$as_me: failed program was:" >&5
7254 cat conftest.$ac_ext >&5
7255 cat >conftest.$ac_ext <<_ACEOF
7256 #line 7256 "configure"
7257 #include "confdefs.h"
7258
7259 #include <stdlib.h>
7260 #include <stdarg.h>
7261 #include <stdio.h>
7262 #include <wchar.h>
7263 #ifdef HAVE_LIBUTF8_H
7264 #include <libutf8.h>
7265 #endif
7266 int
7267 main ()
7268 {
7269 wint_t value
7270   ;
7271   return 0;
7272 }
7273 _ACEOF
7274 rm -f conftest.$ac_objext
7275 if { (eval echo "$as_me:7275: \"$ac_compile\"") >&5
7276   (eval $ac_compile) 2>&5
7277   ac_status=$?
7278   echo "$as_me:7278: \$? = $ac_status" >&5
7279   (exit $ac_status); } &&
7280          { ac_try='test -s conftest.$ac_objext'
7281   { (eval echo "$as_me:7281: \"$ac_try\"") >&5
7282   (eval $ac_try) 2>&5
7283   ac_status=$?
7284   echo "$as_me:7284: \$? = $ac_status" >&5
7285   (exit $ac_status); }; }; then
7286   cf_cv_wint_t=yes
7287 else
7288   echo "$as_me: failed program was:" >&5
7289 cat conftest.$ac_ext >&5
7290 cf_cv_wint_t=unknown
7291 fi
7292 rm -f conftest.$ac_objext conftest.$ac_ext
7293 fi
7294 rm -f conftest.$ac_objext conftest.$ac_ext
7295 fi
7296 echo "$as_me:7296: result: $cf_cv_wint_t" >&5
7297 echo "${ECHO_T}$cf_cv_wint_t" >&6
7298
7299 if test "$cf_cv_wint_t" = yes ; then
7300         cat >>confdefs.h <<\EOF
7301 #define NEED_WCHAR_H 1
7302 EOF
7303
7304         NEED_WCHAR_H=1
7305 fi
7306
7307 # if we do not find wint_t in either place, use substitution to provide a fallback.
7308 if test "$cf_cv_wint_t" = unknown ; then
7309         NCURSES_WINT_T=1
7310 fi
7311
7312 # if we find wint_t in either place, use substitution to provide a fallback.
7313 if test "$cf_cv_wint_t" != unknown ; then
7314         NCURSES_OK_WINT_T=1
7315 fi
7316
7317         if test "$NCURSES_MBSTATE_T" != 0; then
7318                 cat >>confdefs.h <<\EOF
7319 #define NEED_MBSTATE_T_DEF 1
7320 EOF
7321
7322         fi
7323 fi
7324
7325 ###   use option --disable-lp64 to allow long chtype
7326 case $cf_cv_abi_version in
7327 [345]*)
7328         default_with_lp64=no
7329         ;;
7330 *)
7331         default_with_lp64=yes
7332         ;;
7333 esac
7334
7335 echo "$as_me:7335: checking whether to enable _LP64 definition in curses.h" >&5
7336 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7337
7338 # Check whether --enable-lp64 or --disable-lp64 was given.
7339 if test "${enable_lp64+set}" = set; then
7340   enableval="$enable_lp64"
7341   with_lp64=$enableval
7342 else
7343   with_lp64=$default_with_lp64
7344 fi;
7345 echo "$as_me:7345: result: $with_lp64" >&5
7346 echo "${ECHO_T}$with_lp64" >&6
7347
7348 if test "$with_lp64" = yes ; then
7349         cf_cv_enable_lp64=1
7350 else
7351         cf_cv_enable_lp64=0
7352 fi
7353
7354 # Check whether --enable-largefile or --disable-largefile was given.
7355 if test "${enable_largefile+set}" = set; then
7356   enableval="$enable_largefile"
7357
7358 fi;
7359 if test "$enable_largefile" != no; then
7360
7361   echo "$as_me:7361: checking for special C compiler options needed for large files" >&5
7362 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7363 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7364   echo $ECHO_N "(cached) $ECHO_C" >&6
7365 else
7366   ac_cv_sys_largefile_CC=no
7367      if test "$GCC" != yes; then
7368        ac_save_CC=$CC
7369        while :; do
7370          # IRIX 6.2 and later do not support large files by default,
7371          # so use the C compiler's -n32 option if that helps.
7372          cat >conftest.$ac_ext <<_ACEOF
7373 #line 7373 "configure"
7374 #include "confdefs.h"
7375 #include <sys/types.h>
7376  /* Check that off_t can represent 2**63 - 1 correctly.
7377     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7378     since some C++ compilers masquerading as C compilers
7379     incorrectly reject 9223372036854775807.  */
7380 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7381   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7382                        && LARGE_OFF_T % 2147483647 == 1)
7383                       ? 1 : -1];
7384 int
7385 main ()
7386 {
7387
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392          rm -f conftest.$ac_objext
7393 if { (eval echo "$as_me:7393: \"$ac_compile\"") >&5
7394   (eval $ac_compile) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); } &&
7398          { ac_try='test -s conftest.$ac_objext'
7399   { (eval echo "$as_me:7399: \"$ac_try\"") >&5
7400   (eval $ac_try) 2>&5
7401   ac_status=$?
7402   echo "$as_me:7402: \$? = $ac_status" >&5
7403   (exit $ac_status); }; }; then
7404   break
7405 else
7406   echo "$as_me: failed program was:" >&5
7407 cat conftest.$ac_ext >&5
7408 fi
7409 rm -f conftest.$ac_objext
7410          CC="$CC -n32"
7411          rm -f conftest.$ac_objext
7412 if { (eval echo "$as_me:7412: \"$ac_compile\"") >&5
7413   (eval $ac_compile) 2>&5
7414   ac_status=$?
7415   echo "$as_me:7415: \$? = $ac_status" >&5
7416   (exit $ac_status); } &&
7417          { ac_try='test -s conftest.$ac_objext'
7418   { (eval echo "$as_me:7418: \"$ac_try\"") >&5
7419   (eval $ac_try) 2>&5
7420   ac_status=$?
7421   echo "$as_me:7421: \$? = $ac_status" >&5
7422   (exit $ac_status); }; }; then
7423   ac_cv_sys_largefile_CC=' -n32'; break
7424 else
7425   echo "$as_me: failed program was:" >&5
7426 cat conftest.$ac_ext >&5
7427 fi
7428 rm -f conftest.$ac_objext
7429          break
7430        done
7431        CC=$ac_save_CC
7432        rm -f conftest.$ac_ext
7433     fi
7434 fi
7435 echo "$as_me:7435: result: $ac_cv_sys_largefile_CC" >&5
7436 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7437   if test "$ac_cv_sys_largefile_CC" != no; then
7438     CC=$CC$ac_cv_sys_largefile_CC
7439   fi
7440
7441   echo "$as_me:7441: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7442 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7443 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7444   echo $ECHO_N "(cached) $ECHO_C" >&6
7445 else
7446   while :; do
7447   ac_cv_sys_file_offset_bits=no
7448   cat >conftest.$ac_ext <<_ACEOF
7449 #line 7449 "configure"
7450 #include "confdefs.h"
7451 #include <sys/types.h>
7452  /* Check that off_t can represent 2**63 - 1 correctly.
7453     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7454     since some C++ compilers masquerading as C compilers
7455     incorrectly reject 9223372036854775807.  */
7456 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7457   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7458                        && LARGE_OFF_T % 2147483647 == 1)
7459                       ? 1 : -1];
7460 int
7461 main ()
7462 {
7463
7464   ;
7465   return 0;
7466 }
7467 _ACEOF
7468 rm -f conftest.$ac_objext
7469 if { (eval echo "$as_me:7469: \"$ac_compile\"") >&5
7470   (eval $ac_compile) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); } &&
7474          { ac_try='test -s conftest.$ac_objext'
7475   { (eval echo "$as_me:7475: \"$ac_try\"") >&5
7476   (eval $ac_try) 2>&5
7477   ac_status=$?
7478   echo "$as_me:7478: \$? = $ac_status" >&5
7479   (exit $ac_status); }; }; then
7480   break
7481 else
7482   echo "$as_me: failed program was:" >&5
7483 cat conftest.$ac_ext >&5
7484 fi
7485 rm -f conftest.$ac_objext conftest.$ac_ext
7486   cat >conftest.$ac_ext <<_ACEOF
7487 #line 7487 "configure"
7488 #include "confdefs.h"
7489 #define _FILE_OFFSET_BITS 64
7490 #include <sys/types.h>
7491  /* Check that off_t can represent 2**63 - 1 correctly.
7492     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7493     since some C++ compilers masquerading as C compilers
7494     incorrectly reject 9223372036854775807.  */
7495 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7496   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7497                        && LARGE_OFF_T % 2147483647 == 1)
7498                       ? 1 : -1];
7499 int
7500 main ()
7501 {
7502
7503   ;
7504   return 0;
7505 }
7506 _ACEOF
7507 rm -f conftest.$ac_objext
7508 if { (eval echo "$as_me:7508: \"$ac_compile\"") >&5
7509   (eval $ac_compile) 2>&5
7510   ac_status=$?
7511   echo "$as_me:7511: \$? = $ac_status" >&5
7512   (exit $ac_status); } &&
7513          { ac_try='test -s conftest.$ac_objext'
7514   { (eval echo "$as_me:7514: \"$ac_try\"") >&5
7515   (eval $ac_try) 2>&5
7516   ac_status=$?
7517   echo "$as_me:7517: \$? = $ac_status" >&5
7518   (exit $ac_status); }; }; then
7519   ac_cv_sys_file_offset_bits=64; break
7520 else
7521   echo "$as_me: failed program was:" >&5
7522 cat conftest.$ac_ext >&5
7523 fi
7524 rm -f conftest.$ac_objext conftest.$ac_ext
7525   break
7526 done
7527 fi
7528 echo "$as_me:7528: result: $ac_cv_sys_file_offset_bits" >&5
7529 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7530 if test "$ac_cv_sys_file_offset_bits" != no; then
7531
7532 cat >>confdefs.h <<EOF
7533 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7534 EOF
7535
7536 fi
7537 rm -f conftest*
7538   echo "$as_me:7538: checking for _LARGE_FILES value needed for large files" >&5
7539 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7540 if test "${ac_cv_sys_large_files+set}" = set; then
7541   echo $ECHO_N "(cached) $ECHO_C" >&6
7542 else
7543   while :; do
7544   ac_cv_sys_large_files=no
7545   cat >conftest.$ac_ext <<_ACEOF
7546 #line 7546 "configure"
7547 #include "confdefs.h"
7548 #include <sys/types.h>
7549  /* Check that off_t can represent 2**63 - 1 correctly.
7550     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7551     since some C++ compilers masquerading as C compilers
7552     incorrectly reject 9223372036854775807.  */
7553 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7554   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7555                        && LARGE_OFF_T % 2147483647 == 1)
7556                       ? 1 : -1];
7557 int
7558 main ()
7559 {
7560
7561   ;
7562   return 0;
7563 }
7564 _ACEOF
7565 rm -f conftest.$ac_objext
7566 if { (eval echo "$as_me:7566: \"$ac_compile\"") >&5
7567   (eval $ac_compile) 2>&5
7568   ac_status=$?
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); } &&
7571          { ac_try='test -s conftest.$ac_objext'
7572   { (eval echo "$as_me:7572: \"$ac_try\"") >&5
7573   (eval $ac_try) 2>&5
7574   ac_status=$?
7575   echo "$as_me:7575: \$? = $ac_status" >&5
7576   (exit $ac_status); }; }; then
7577   break
7578 else
7579   echo "$as_me: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
7581 fi
7582 rm -f conftest.$ac_objext conftest.$ac_ext
7583   cat >conftest.$ac_ext <<_ACEOF
7584 #line 7584 "configure"
7585 #include "confdefs.h"
7586 #define _LARGE_FILES 1
7587 #include <sys/types.h>
7588  /* Check that off_t can represent 2**63 - 1 correctly.
7589     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7590     since some C++ compilers masquerading as C compilers
7591     incorrectly reject 9223372036854775807.  */
7592 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7593   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7594                        && LARGE_OFF_T % 2147483647 == 1)
7595                       ? 1 : -1];
7596 int
7597 main ()
7598 {
7599
7600   ;
7601   return 0;
7602 }
7603 _ACEOF
7604 rm -f conftest.$ac_objext
7605 if { (eval echo "$as_me:7605: \"$ac_compile\"") >&5
7606   (eval $ac_compile) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); } &&
7610          { ac_try='test -s conftest.$ac_objext'
7611   { (eval echo "$as_me:7611: \"$ac_try\"") >&5
7612   (eval $ac_try) 2>&5
7613   ac_status=$?
7614   echo "$as_me:7614: \$? = $ac_status" >&5
7615   (exit $ac_status); }; }; then
7616   ac_cv_sys_large_files=1; break
7617 else
7618   echo "$as_me: failed program was:" >&5
7619 cat conftest.$ac_ext >&5
7620 fi
7621 rm -f conftest.$ac_objext conftest.$ac_ext
7622   break
7623 done
7624 fi
7625 echo "$as_me:7625: result: $ac_cv_sys_large_files" >&5
7626 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7627 if test "$ac_cv_sys_large_files" != no; then
7628
7629 cat >>confdefs.h <<EOF
7630 #define _LARGE_FILES $ac_cv_sys_large_files
7631 EOF
7632
7633 fi
7634 rm -f conftest*
7635 fi
7636
7637     if test "$enable_largefile" != no ; then
7638         echo "$as_me:7638: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7639 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7640 if test "${ac_cv_sys_largefile_source+set}" = set; then
7641   echo $ECHO_N "(cached) $ECHO_C" >&6
7642 else
7643   while :; do
7644   ac_cv_sys_largefile_source=no
7645   cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648 #include <stdio.h>
7649 int
7650 main ()
7651 {
7652 return !fseeko;
7653   ;
7654   return 0;
7655 }
7656 _ACEOF
7657 rm -f conftest.$ac_objext
7658 if { (eval echo "$as_me:7658: \"$ac_compile\"") >&5
7659   (eval $ac_compile) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); } &&
7663          { ac_try='test -s conftest.$ac_objext'
7664   { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7665   (eval $ac_try) 2>&5
7666   ac_status=$?
7667   echo "$as_me:7667: \$? = $ac_status" >&5
7668   (exit $ac_status); }; }; then
7669   break
7670 else
7671   echo "$as_me: failed program was:" >&5
7672 cat conftest.$ac_ext >&5
7673 fi
7674 rm -f conftest.$ac_objext conftest.$ac_ext
7675   cat >conftest.$ac_ext <<_ACEOF
7676 #line 7676 "configure"
7677 #include "confdefs.h"
7678 #define _LARGEFILE_SOURCE 1
7679 #include <stdio.h>
7680 int
7681 main ()
7682 {
7683 return !fseeko;
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 rm -f conftest.$ac_objext
7689 if { (eval echo "$as_me:7689: \"$ac_compile\"") >&5
7690   (eval $ac_compile) 2>&5
7691   ac_status=$?
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit $ac_status); } &&
7694          { ac_try='test -s conftest.$ac_objext'
7695   { (eval echo "$as_me:7695: \"$ac_try\"") >&5
7696   (eval $ac_try) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit $ac_status); }; }; then
7700   ac_cv_sys_largefile_source=1; break
7701 else
7702   echo "$as_me: failed program was:" >&5
7703 cat conftest.$ac_ext >&5
7704 fi
7705 rm -f conftest.$ac_objext conftest.$ac_ext
7706   break
7707 done
7708 fi
7709 echo "$as_me:7709: result: $ac_cv_sys_largefile_source" >&5
7710 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7711 if test "$ac_cv_sys_largefile_source" != no; then
7712
7713 cat >>confdefs.h <<EOF
7714 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7715 EOF
7716
7717 fi
7718 rm -f conftest*
7719
7720 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7721 # in glibc 2.1.3, but that breaks too many other things.
7722 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7723 echo "$as_me:7723: checking for fseeko" >&5
7724 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7725 if test "${ac_cv_func_fseeko+set}" = set; then
7726   echo $ECHO_N "(cached) $ECHO_C" >&6
7727 else
7728   cat >conftest.$ac_ext <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731 #include <stdio.h>
7732 int
7733 main ()
7734 {
7735 return fseeko && fseeko (stdin, 0, 0);
7736   ;
7737   return 0;
7738 }
7739 _ACEOF
7740 rm -f conftest.$ac_objext conftest$ac_exeext
7741 if { (eval echo "$as_me:7741: \"$ac_link\"") >&5
7742   (eval $ac_link) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); } &&
7746          { ac_try='test -s conftest$ac_exeext'
7747   { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7748   (eval $ac_try) 2>&5
7749   ac_status=$?
7750   echo "$as_me:7750: \$? = $ac_status" >&5
7751   (exit $ac_status); }; }; then
7752   ac_cv_func_fseeko=yes
7753 else
7754   echo "$as_me: failed program was:" >&5
7755 cat conftest.$ac_ext >&5
7756 ac_cv_func_fseeko=no
7757 fi
7758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7759 fi
7760 echo "$as_me:7760: result: $ac_cv_func_fseeko" >&5
7761 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7762 if test $ac_cv_func_fseeko = yes; then
7763
7764 cat >>confdefs.h <<\EOF
7765 #define HAVE_FSEEKO 1
7766 EOF
7767
7768 fi
7769
7770         # Normally we would collect these definitions in the config.h,
7771         # but (like _XOPEN_SOURCE), some environments rely on having these
7772         # defined before any of the system headers are included.  Another
7773         # case comes up with C++, e.g., on AIX the compiler compiles the
7774         # header files by themselves before looking at the body files it is
7775         # told to compile.  For ncurses, those header files do not include
7776         # the config.h
7777         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7778         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7779         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7780
7781         echo "$as_me:7781: checking whether to use struct dirent64" >&5
7782 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7783 if test "${cf_cv_struct_dirent64+set}" = set; then
7784   echo $ECHO_N "(cached) $ECHO_C" >&6
7785 else
7786
7787                 cat >conftest.$ac_ext <<_ACEOF
7788 #line 7788 "configure"
7789 #include "confdefs.h"
7790
7791 #include <sys/types.h>
7792 #include <dirent.h>
7793
7794 int
7795 main ()
7796 {
7797
7798                 /* if transitional largefile support is setup, this is true */
7799                 extern struct dirent64 * readdir(DIR *);
7800                 struct dirent64 *x = readdir((DIR *)0);
7801                 struct dirent *y = readdir((DIR *)0);
7802                 int z = x - y;
7803
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 rm -f conftest.$ac_objext
7809 if { (eval echo "$as_me:7809: \"$ac_compile\"") >&5
7810   (eval $ac_compile) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); } &&
7814          { ac_try='test -s conftest.$ac_objext'
7815   { (eval echo "$as_me:7815: \"$ac_try\"") >&5
7816   (eval $ac_try) 2>&5
7817   ac_status=$?
7818   echo "$as_me:7818: \$? = $ac_status" >&5
7819   (exit $ac_status); }; }; then
7820   cf_cv_struct_dirent64=yes
7821 else
7822   echo "$as_me: failed program was:" >&5
7823 cat conftest.$ac_ext >&5
7824 cf_cv_struct_dirent64=no
7825 fi
7826 rm -f conftest.$ac_objext conftest.$ac_ext
7827
7828 fi
7829 echo "$as_me:7829: result: $cf_cv_struct_dirent64" >&5
7830 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7831         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7832 #define HAVE_STRUCT_DIRENT64 1
7833 EOF
7834
7835     fi
7836
7837 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7838 echo "$as_me:7838: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7839 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7840
7841 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7842 if test "${enable_tparm_varargs+set}" = set; then
7843   enableval="$enable_tparm_varargs"
7844   with_tparm_varargs=$enableval
7845 else
7846   with_tparm_varargs=yes
7847 fi;
7848 echo "$as_me:7848: result: $with_tparm_varargs" >&5
7849 echo "${ECHO_T}$with_tparm_varargs" >&6
7850 NCURSES_TPARM_VARARGS=0
7851 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7852
7853 ###   use option --with-bool to override bool's type
7854 echo "$as_me:7854: checking for type of bool" >&5
7855 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7856
7857 # Check whether --with-bool or --without-bool was given.
7858 if test "${with_bool+set}" = set; then
7859   withval="$with_bool"
7860   NCURSES_BOOL="$withval"
7861 else
7862   NCURSES_BOOL=auto
7863 fi;
7864 echo "$as_me:7864: result: $NCURSES_BOOL" >&5
7865 echo "${ECHO_T}$NCURSES_BOOL" >&6
7866
7867 echo "$as_me:7867: checking for alternate terminal capabilities file" >&5
7868 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7869
7870 # Check whether --with-caps or --without-caps was given.
7871 if test "${with_caps+set}" = set; then
7872   withval="$with_caps"
7873   TERMINFO_CAPS=Caps.$withval
7874 else
7875   TERMINFO_CAPS=Caps
7876 fi;
7877 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7878 echo "$as_me:7878: result: $TERMINFO_CAPS" >&5
7879 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7880
7881 ###   use option --with-chtype to override chtype's type
7882 echo "$as_me:7882: checking for type of chtype" >&5
7883 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7884
7885 # Check whether --with-chtype or --without-chtype was given.
7886 if test "${with_chtype+set}" = set; then
7887   withval="$with_chtype"
7888   NCURSES_CHTYPE="$withval"
7889 else
7890   NCURSES_CHTYPE=auto
7891 fi;
7892 echo "$as_me:7892: result: $NCURSES_CHTYPE" >&5
7893 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7894
7895 ###   use option --with-ospeed to override ospeed's type
7896 echo "$as_me:7896: checking for type of ospeed" >&5
7897 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7898
7899 # Check whether --with-ospeed or --without-ospeed was given.
7900 if test "${with_ospeed+set}" = set; then
7901   withval="$with_ospeed"
7902   NCURSES_OSPEED="$withval"
7903 else
7904   NCURSES_OSPEED=short
7905 fi;
7906 echo "$as_me:7906: result: $NCURSES_OSPEED" >&5
7907 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7908
7909 ###   use option --with-mmask-t to override mmask_t's type
7910 echo "$as_me:7910: checking for type of mmask_t" >&5
7911 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7912
7913 # Check whether --with-mmask-t or --without-mmask-t was given.
7914 if test "${with_mmask_t+set}" = set; then
7915   withval="$with_mmask_t"
7916   NCURSES_MMASK_T="$withval"
7917 else
7918   NCURSES_MMASK_T=auto
7919 fi;
7920 echo "$as_me:7920: result: $NCURSES_MMASK_T" >&5
7921 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7922
7923 ### Enable compiling-in rcs id's
7924 echo "$as_me:7924: checking if RCS identifiers should be compiled-in" >&5
7925 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7926
7927 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7928 if test "${with_rcs_ids+set}" = set; then
7929   withval="$with_rcs_ids"
7930   with_rcs_ids=$withval
7931 else
7932   with_rcs_ids=no
7933 fi;
7934 echo "$as_me:7934: result: $with_rcs_ids" >&5
7935 echo "${ECHO_T}$with_rcs_ids" >&6
7936 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7937 #define USE_RCS_IDS 1
7938 EOF
7939
7940 ###############################################################################
7941
7942 echo "$as_me:7942: checking format of man-pages" >&5
7943 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7944
7945 # Check whether --with-manpage-format or --without-manpage-format was given.
7946 if test "${with_manpage_format+set}" = set; then
7947   withval="$with_manpage_format"
7948   MANPAGE_FORMAT=$withval
7949 else
7950   MANPAGE_FORMAT=unknown
7951 fi;
7952
7953 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7954 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7955
7956 cf_unknown=
7957
7958 case $MANPAGE_FORMAT in
7959 unknown)
7960   if test -z "$MANPATH" ; then
7961     MANPATH="/usr/man:/usr/share/man"
7962   fi
7963
7964   # look for the 'date' man-page (it's most likely to be installed!)
7965   MANPAGE_FORMAT=
7966   cf_preform=no
7967   cf_catonly=yes
7968   cf_example=date
7969
7970   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7971   for cf_dir in $MANPATH; do
7972     test -z "$cf_dir" && cf_dir=/usr/man
7973     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
7974     do
7975       cf_test=`echo $cf_name | sed -e 's/*//'`
7976       if test "x$cf_test" = "x$cf_name" ; then
7977
7978         case "$cf_name" in
7979         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7980         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7981         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7982         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7983         esac
7984
7985         case "$cf_name" in
7986         $cf_dir/man*)
7987           cf_catonly=no
7988           ;;
7989         $cf_dir/cat*)
7990           cf_preform=yes
7991           ;;
7992         esac
7993         break
7994       fi
7995
7996       # if we found a match in either man* or cat*, stop looking
7997       if test -n "$MANPAGE_FORMAT" ; then
7998         cf_found=no
7999         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8000         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8001         case "$cf_name" in
8002         $cf_dir/cat*)
8003           cf_found=yes
8004           ;;
8005         esac
8006         test $cf_found=yes && break
8007       fi
8008     done
8009     # only check the first directory in $MANPATH where we find manpages
8010     if test -n "$MANPAGE_FORMAT" ; then
8011        break
8012     fi
8013   done
8014   # if we did not find the example, just assume it is normal
8015   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8016   IFS="$ac_save_ifs"
8017   ;;
8018 *)
8019   for cf_option in $MANPAGE_FORMAT; do
8020      case $cf_option in #(vi
8021      gzip|compress|BSDI|normal|formatted|catonly)
8022        ;;
8023      *)
8024        cf_unknown="$cf_unknown $cf_option"
8025        ;;
8026      esac
8027   done
8028   ;;
8029 esac
8030
8031 echo "$as_me:8031: result: $MANPAGE_FORMAT" >&5
8032 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8033 if test -n "$cf_unknown" ; then
8034   { echo "$as_me:8034: WARNING: Unexpected manpage-format $cf_unknown" >&5
8035 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8036 fi
8037
8038 echo "$as_me:8038: checking for manpage renaming" >&5
8039 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8040
8041 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8042 if test "${with_manpage_renames+set}" = set; then
8043   withval="$with_manpage_renames"
8044   MANPAGE_RENAMES=$withval
8045 else
8046   MANPAGE_RENAMES=yes
8047 fi;
8048
8049 case ".$MANPAGE_RENAMES" in #(vi
8050 .no) #(vi
8051   ;;
8052 .|.yes)
8053   # Debian 'man' program?
8054   if test -f /etc/debian_version ; then
8055     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8056   else
8057     MANPAGE_RENAMES=no
8058   fi
8059   ;;
8060 esac
8061
8062 if test "$MANPAGE_RENAMES" != no ; then
8063   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8064     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8065   elif test ! -f $MANPAGE_RENAMES ; then
8066     { { echo "$as_me:8066: error: not a filename: $MANPAGE_RENAMES" >&5
8067 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8068    { (exit 1); exit 1; }; }
8069   fi
8070
8071   test ! -d man && mkdir man
8072
8073   # Construct a sed-script to perform renaming within man-pages
8074   if test -n "$MANPAGE_RENAMES" ; then
8075     test ! -d man && mkdir man
8076     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8077   fi
8078 fi
8079
8080 echo "$as_me:8080: result: $MANPAGE_RENAMES" >&5
8081 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8082
8083 echo "$as_me:8083: checking if manpage aliases will be installed" >&5
8084 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8085
8086 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8087 if test "${with_manpage_aliases+set}" = set; then
8088   withval="$with_manpage_aliases"
8089   MANPAGE_ALIASES=$withval
8090 else
8091   MANPAGE_ALIASES=yes
8092 fi;
8093
8094 echo "$as_me:8094: result: $MANPAGE_ALIASES" >&5
8095 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8096
8097 if test "$LN_S" = "ln -s"; then
8098         cf_use_symlinks=yes
8099 else
8100         cf_use_symlinks=no
8101 fi
8102
8103 MANPAGE_SYMLINKS=no
8104 if test "$MANPAGE_ALIASES" = yes ; then
8105 echo "$as_me:8105: checking if manpage symlinks should be used" >&5
8106 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8107
8108 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8109 if test "${with_manpage_symlinks+set}" = set; then
8110   withval="$with_manpage_symlinks"
8111   MANPAGE_SYMLINKS=$withval
8112 else
8113   MANPAGE_SYMLINKS=$cf_use_symlinks
8114 fi;
8115
8116 if test "$$cf_use_symlinks" = no; then
8117 if test "$MANPAGE_SYMLINKS" = yes ; then
8118         { echo "$as_me:8118: WARNING: cannot make symlinks" >&5
8119 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8120         MANPAGE_SYMLINKS=no
8121 fi
8122 fi
8123
8124 echo "$as_me:8124: result: $MANPAGE_SYMLINKS" >&5
8125 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8126 fi
8127
8128 echo "$as_me:8128: checking for manpage tbl" >&5
8129 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8130
8131 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8132 if test "${with_manpage_tbl+set}" = set; then
8133   withval="$with_manpage_tbl"
8134   MANPAGE_TBL=$withval
8135 else
8136   MANPAGE_TBL=no
8137 fi;
8138
8139 echo "$as_me:8139: result: $MANPAGE_TBL" >&5
8140 echo "${ECHO_T}$MANPAGE_TBL" >&6
8141
8142   if test "$prefix" = "NONE" ; then
8143      cf_prefix="$ac_default_prefix"
8144   else
8145      cf_prefix="$prefix"
8146   fi
8147
8148   case "$MANPAGE_FORMAT" in # (vi
8149   *catonly*) # (vi
8150     cf_format=yes
8151     cf_inboth=no
8152     ;;
8153   *formatted*) # (vi
8154     cf_format=yes
8155     cf_inboth=yes
8156     ;;
8157   *)
8158     cf_format=no
8159     cf_inboth=no
8160     ;;
8161   esac
8162
8163 test ! -d man && mkdir man
8164
8165 cf_so_strip=
8166 cf_compress=
8167 case "$MANPAGE_FORMAT" in #(vi
8168 *compress*) #(vi
8169         cf_so_strip="Z"
8170         cf_compress=compress
8171   ;;
8172 *gzip*) #(vi
8173         cf_so_strip="gz"
8174         cf_compress=gzip
8175   ;;
8176 esac
8177
8178 cf_edit_man=./edit_man.sh
8179 cf_man_alias=`pwd`/man_alias.sed
8180
8181 cat >$cf_edit_man <<CF_EOF
8182 #! /bin/sh
8183 # this script is generated by the configure-script CF_MAN_PAGES macro.
8184
8185 prefix="$cf_prefix"
8186 datadir="$datadir"
8187
8188 NCURSES_MAJOR="$NCURSES_MAJOR"
8189 NCURSES_MINOR="$NCURSES_MINOR"
8190 NCURSES_PATCH="$NCURSES_PATCH"
8191
8192 NCURSES_OSPEED="$NCURSES_OSPEED"
8193 TERMINFO="$TERMINFO"
8194
8195 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8196
8197 INSTALL="$INSTALL"
8198 INSTALL_DATA="$INSTALL_DATA"
8199
8200 transform="$program_transform_name"
8201
8202 TMP=\${TMPDIR-/tmp}/man\$\$
8203 trap "rm -f \$TMP" 0 1 2 5 15
8204
8205 form=\$1
8206 shift || exit 1
8207
8208 verb=\$1
8209 shift || exit 1
8210
8211 mandir=\$1
8212 shift || exit 1
8213
8214 srcdir=\$1
8215 top_srcdir=\$srcdir/..
8216 shift || exit 1
8217
8218 if test "\$form" = normal ; then
8219         if test "$cf_format" = yes ; then
8220         if test "$cf_inboth" = no ; then
8221                 sh \$0 format \$verb \$mandir \$srcdir \$*
8222                 exit $?
8223         fi
8224         fi
8225         cf_subdir=\$mandir/man
8226         cf_tables=$MANPAGE_TBL
8227 else
8228         cf_subdir=\$mandir/cat
8229         cf_tables=yes
8230 fi
8231
8232 # process the list of source-files
8233 for i in \$* ; do
8234 case \$i in #(vi
8235 *.orig|*.rej) ;; #(vi
8236 *.[0-9]*)
8237         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8238         if test \$verb = installing ; then
8239         if test ! -d \$cf_subdir\${section} ; then
8240                 \$MKDIRS \$cf_subdir\$section
8241         fi
8242         fi
8243
8244         # replace variables in man page
8245         if test ! -f $cf_man_alias ; then
8246 cat >>$cf_man_alias <<-CF_EOF2
8247                 s,@DATADIR@,\$datadir,g
8248                 s,@TERMINFO@,\$TERMINFO,g
8249                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8250                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8251                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8252                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8253 CF_EOF
8254
8255         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8256         do
8257                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8258                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8259 cat >>$cf_edit_man <<-CF_EOF
8260                 s,@$cf_NAME@,$cf_name,
8261 CF_EOF
8262         done
8263
8264 cat >>$cf_edit_man <<CF_EOF
8265 CF_EOF2
8266                 echo "...made $cf_man_alias"
8267         fi
8268
8269         aliases=
8270         cf_source=\`basename \$i\`
8271         inalias=\$cf_source
8272         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8273         if test ! -f \$inalias ; then
8274                 echo .. skipped \$cf_source
8275                 continue
8276         fi
8277 CF_EOF
8278
8279 if test "$MANPAGE_ALIASES" != no ; then
8280 cat >>$cf_edit_man <<CF_EOF
8281         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8282 CF_EOF
8283 fi
8284
8285 if test "$MANPAGE_RENAMES" = no ; then
8286 cat >>$cf_edit_man <<CF_EOF
8287         # perform program transformations for section 1 man pages
8288         if test \$section = 1 ; then
8289                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8290         else
8291                 cf_target=\$cf_subdir\${section}/\$cf_source
8292         fi
8293 CF_EOF
8294 else
8295 cat >>$cf_edit_man <<CF_EOF
8296         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8297         if test -z "\$cf_target" ; then
8298                 echo '? missing rename for '\$cf_source
8299                 cf_target="\$cf_source"
8300         fi
8301         cf_target="\$cf_subdir\${section}/\${cf_target}"
8302
8303 CF_EOF
8304 fi
8305
8306 cat >>$cf_edit_man <<CF_EOF
8307         sed     -f $cf_man_alias \\
8308 CF_EOF
8309
8310 if test -f $MANPAGE_RENAMES ; then
8311 cat >>$cf_edit_man <<CF_EOF
8312                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8313 CF_EOF
8314 else
8315 cat >>$cf_edit_man <<CF_EOF
8316                 < \$i >\$TMP
8317 CF_EOF
8318 fi
8319
8320 cat >>$cf_edit_man <<CF_EOF
8321 if test \$cf_tables = yes ; then
8322         tbl \$TMP >\$TMP.out
8323         mv \$TMP.out \$TMP
8324 fi
8325 CF_EOF
8326
8327 if test $with_curses_h != yes ; then
8328 cat >>$cf_edit_man <<CF_EOF
8329         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8330         mv \$TMP.out \$TMP
8331 CF_EOF
8332 fi
8333
8334 cat >>$cf_edit_man <<CF_EOF
8335         if test \$form = format ; then
8336                 nroff -man \$TMP >\$TMP.out
8337                 mv \$TMP.out \$TMP
8338         fi
8339 CF_EOF
8340
8341 if test -n "$cf_compress" ; then
8342 cat >>$cf_edit_man <<CF_EOF
8343         if test \$verb = installing ; then
8344         if ( $cf_compress -f \$TMP )
8345         then
8346                 mv \$TMP.$cf_so_strip \$TMP
8347         fi
8348         fi
8349         cf_target="\$cf_target.$cf_so_strip"
8350 CF_EOF
8351 fi
8352
8353 case "$MANPAGE_FORMAT" in #(vi
8354 *BSDI*)
8355 cat >>$cf_edit_man <<CF_EOF
8356         if test \$form = format ; then
8357                 # BSDI installs only .0 suffixes in the cat directories
8358                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8359         fi
8360 CF_EOF
8361   ;;
8362 esac
8363
8364 cat >>$cf_edit_man <<CF_EOF
8365         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8366         if test \$verb = installing ; then
8367                 echo \$verb \$cf_target
8368                 \$INSTALL_DATA \$TMP \$cf_target
8369                 test -d \$cf_subdir\${section} &&
8370                 test -n "\$aliases" && (
8371                         cd \$cf_subdir\${section} && (
8372                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8373                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8374                                 cf_target=\`basename \$cf_target\`
8375                                 for cf_alias in \$aliases
8376                                 do
8377                                         if test \$section = 1 ; then
8378                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8379                                         fi
8380
8381                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8382                                                 if test -f \$cf_alias\${suffix} ; then
8383                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8384                                                         then
8385                                                                 continue
8386                                                         fi
8387                                                 fi
8388                                                 echo .. \$verb alias \$cf_alias\${suffix}
8389                                                 rm -f \$cf_alias\${suffix}
8390                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8391                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8392                                                 echo ".so \$cf_source" >\$TMP
8393 CF_EOF
8394 if test -n "$cf_compress" ; then
8395 cat >>$cf_edit_man <<CF_EOF
8396                                                 if test -n "$cf_so_strip" ; then
8397                                                         $cf_compress -f \$TMP
8398                                                         mv \$TMP.$cf_so_strip \$TMP
8399                                                 fi
8400 CF_EOF
8401 fi
8402 cat >>$cf_edit_man <<CF_EOF
8403                                                 echo .. \$verb alias \$cf_alias\${suffix}
8404                                                 rm -f \$cf_alias\${suffix}
8405                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8406                                         fi
8407                                 done
8408                         )
8409                 )
8410         elif test \$verb = removing ; then
8411                 test -f \$cf_target && (
8412                         echo \$verb \$cf_target
8413                         rm -f \$cf_target
8414                 )
8415                 test -d \$cf_subdir\${section} &&
8416                 test -n "\$aliases" && (
8417                         cd \$cf_subdir\${section} && (
8418                                 for cf_alias in \$aliases
8419                                 do
8420                                         if test \$section = 1 ; then
8421                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8422                                         fi
8423
8424                                         echo .. \$verb alias \$cf_alias\${suffix}
8425                                         rm -f \$cf_alias\${suffix}
8426                                 done
8427                         )
8428                 )
8429         else
8430 #               echo ".hy 0"
8431                 cat \$TMP
8432         fi
8433         ;;
8434 esac
8435 done
8436
8437 if test $cf_inboth = yes ; then
8438 if test \$form != format ; then
8439         sh \$0 format \$verb \$mandir \$srcdir \$*
8440 fi
8441 fi
8442
8443 exit 0
8444 CF_EOF
8445 chmod 755 $cf_edit_man
8446
8447 ###############################################################################
8448
8449 ### Note that some functions (such as const) are normally disabled anyway.
8450 echo "$as_me:8450: checking if you want to build with function extensions" >&5
8451 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8452
8453 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8454 if test "${enable_ext_funcs+set}" = set; then
8455   enableval="$enable_ext_funcs"
8456   with_ext_funcs=$enableval
8457 else
8458   with_ext_funcs=yes
8459 fi;
8460 echo "$as_me:8460: result: $with_ext_funcs" >&5
8461 echo "${ECHO_T}$with_ext_funcs" >&6
8462 if test "$with_ext_funcs" = yes ; then
8463         NCURSES_EXT_FUNCS=1
8464         cat >>confdefs.h <<\EOF
8465 #define HAVE_CURSES_VERSION 1
8466 EOF
8467
8468         cat >>confdefs.h <<\EOF
8469 #define HAVE_HAS_KEY 1
8470 EOF
8471
8472         cat >>confdefs.h <<\EOF
8473 #define HAVE_RESIZETERM 1
8474 EOF
8475
8476         cat >>confdefs.h <<\EOF
8477 #define HAVE_RESIZE_TERM 1
8478 EOF
8479
8480         cat >>confdefs.h <<\EOF
8481 #define HAVE_USE_DEFAULT_COLORS 1
8482 EOF
8483
8484         cat >>confdefs.h <<\EOF
8485 #define HAVE_WRESIZE 1
8486 EOF
8487
8488         cat >>confdefs.h <<\EOF
8489 #define NCURSES_EXT_FUNCS 1
8490 EOF
8491
8492 else
8493         NCURSES_EXT_FUNCS=0
8494 fi
8495
8496 ###   use option --enable-const to turn on use of const beyond that in XSI.
8497 echo "$as_me:8497: checking for extended use of const keyword" >&5
8498 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8499
8500 # Check whether --enable-const or --disable-const was given.
8501 if test "${enable_const+set}" = set; then
8502   enableval="$enable_const"
8503   with_ext_const=$enableval
8504 else
8505   with_ext_const=no
8506 fi;
8507 echo "$as_me:8507: result: $with_ext_const" >&5
8508 echo "${ECHO_T}$with_ext_const" >&6
8509 NCURSES_CONST='/*nothing*/'
8510 if test "$with_ext_const" = yes ; then
8511         NCURSES_CONST=const
8512 fi
8513
8514 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8515 echo "$as_me:8515: checking if you want to use extended colors" >&5
8516 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8517
8518 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8519 if test "${enable_ext_colors+set}" = set; then
8520   enableval="$enable_ext_colors"
8521   with_ext_colors=$enableval
8522 else
8523   with_ext_colors=no
8524 fi;
8525 echo "$as_me:8525: result: $with_ext_colors" >&5
8526 echo "${ECHO_T}$with_ext_colors" >&6
8527 NCURSES_EXT_COLORS=0
8528 if test "$with_ext_colors" = yes ; then
8529         if test "$with_widec" != yes ; then
8530                 { { echo "$as_me:8530: error: This option applies only to wide-character library" >&5
8531 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8532    { (exit 1); exit 1; }; }
8533         else
8534                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8535
8536 if test "${with_abi_version+set}" != set; then
8537         case $cf_cv_rel_version in
8538         5.*)
8539                 cf_cv_rel_version=6.0
8540                 cf_cv_abi_version=6
8541                 { echo "$as_me:8541: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8542 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8543                 ;;
8544         esac
8545 fi
8546
8547         fi
8548         NCURSES_EXT_COLORS=1
8549         cat >>confdefs.h <<\EOF
8550 #define NCURSES_EXT_COLORS 1
8551 EOF
8552
8553 fi
8554
8555 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8556 echo "$as_me:8556: checking if you want to use extended mouse encoding" >&5
8557 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
8558
8559 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8560 if test "${enable_ext_mouse+set}" = set; then
8561   enableval="$enable_ext_mouse"
8562   with_ext_mouse=$enableval
8563 else
8564   with_ext_mouse=no
8565 fi;
8566 echo "$as_me:8566: result: $with_ext_mouse" >&5
8567 echo "${ECHO_T}$with_ext_mouse" >&6
8568 NCURSES_MOUSE_VERSION=1
8569 if test "$with_ext_mouse" = yes ; then
8570         NCURSES_MOUSE_VERSION=2
8571
8572 if test "${with_abi_version+set}" != set; then
8573         case $cf_cv_rel_version in
8574         5.*)
8575                 cf_cv_rel_version=6.0
8576                 cf_cv_abi_version=6
8577                 { echo "$as_me:8577: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8578 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8579                 ;;
8580         esac
8581 fi
8582
8583 fi
8584
8585 echo "$as_me:8585: checking if you want \$NCURSES_NO_PADDING code" >&5
8586 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8587
8588 # Check whether --enable-no-padding or --disable-no-padding was given.
8589 if test "${enable_no_padding+set}" = set; then
8590   enableval="$enable_no_padding"
8591   with_no_padding=$enableval
8592 else
8593   with_no_padding=$with_ext_funcs
8594 fi;
8595 echo "$as_me:8595: result: $with_no_padding" >&5
8596 echo "${ECHO_T}$with_no_padding" >&6
8597 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8598 #define NCURSES_NO_PADDING 1
8599 EOF
8600
8601 echo "$as_me:8601: checking for ANSI C header files" >&5
8602 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8603 if test "${ac_cv_header_stdc+set}" = set; then
8604   echo $ECHO_N "(cached) $ECHO_C" >&6
8605 else
8606   cat >conftest.$ac_ext <<_ACEOF
8607 #line 8607 "configure"
8608 #include "confdefs.h"
8609 #include <stdlib.h>
8610 #include <stdarg.h>
8611 #include <string.h>
8612 #include <float.h>
8613
8614 _ACEOF
8615 if { (eval echo "$as_me:8615: \"$ac_cpp conftest.$ac_ext\"") >&5
8616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8617   ac_status=$?
8618   egrep -v '^ *\+' conftest.er1 >conftest.err
8619   rm -f conftest.er1
8620   cat conftest.err >&5
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); } >/dev/null; then
8623   if test -s conftest.err; then
8624     ac_cpp_err=$ac_c_preproc_warn_flag
8625   else
8626     ac_cpp_err=
8627   fi
8628 else
8629   ac_cpp_err=yes
8630 fi
8631 if test -z "$ac_cpp_err"; then
8632   ac_cv_header_stdc=yes
8633 else
8634   echo "$as_me: failed program was:" >&5
8635   cat conftest.$ac_ext >&5
8636   ac_cv_header_stdc=no
8637 fi
8638 rm -f conftest.err conftest.$ac_ext
8639
8640 if test $ac_cv_header_stdc = yes; then
8641   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8642   cat >conftest.$ac_ext <<_ACEOF
8643 #line 8643 "configure"
8644 #include "confdefs.h"
8645 #include <string.h>
8646
8647 _ACEOF
8648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8649   egrep "memchr" >/dev/null 2>&1; then
8650   :
8651 else
8652   ac_cv_header_stdc=no
8653 fi
8654 rm -f conftest*
8655
8656 fi
8657
8658 if test $ac_cv_header_stdc = yes; then
8659   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8660   cat >conftest.$ac_ext <<_ACEOF
8661 #line 8661 "configure"
8662 #include "confdefs.h"
8663 #include <stdlib.h>
8664
8665 _ACEOF
8666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8667   egrep "free" >/dev/null 2>&1; then
8668   :
8669 else
8670   ac_cv_header_stdc=no
8671 fi
8672 rm -f conftest*
8673
8674 fi
8675
8676 if test $ac_cv_header_stdc = yes; then
8677   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8678   if test "$cross_compiling" = yes; then
8679   :
8680 else
8681   cat >conftest.$ac_ext <<_ACEOF
8682 #line 8682 "configure"
8683 #include "confdefs.h"
8684 #include <ctype.h>
8685 #if ((' ' & 0x0FF) == 0x020)
8686 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8687 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8688 #else
8689 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8690                      || ('j' <= (c) && (c) <= 'r') \
8691                      || ('s' <= (c) && (c) <= 'z'))
8692 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8693 #endif
8694
8695 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8696 int
8697 main ()
8698 {
8699   int i;
8700   for (i = 0; i < 256; i++)
8701     if (XOR (islower (i), ISLOWER (i))
8702         || toupper (i) != TOUPPER (i))
8703       $ac_main_return(2);
8704   $ac_main_return (0);
8705 }
8706 _ACEOF
8707 rm -f conftest$ac_exeext
8708 if { (eval echo "$as_me:8708: \"$ac_link\"") >&5
8709   (eval $ac_link) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8713   { (eval echo "$as_me:8713: \"$ac_try\"") >&5
8714   (eval $ac_try) 2>&5
8715   ac_status=$?
8716   echo "$as_me:8716: \$? = $ac_status" >&5
8717   (exit $ac_status); }; }; then
8718   :
8719 else
8720   echo "$as_me: program exited with status $ac_status" >&5
8721 echo "$as_me: failed program was:" >&5
8722 cat conftest.$ac_ext >&5
8723 ac_cv_header_stdc=no
8724 fi
8725 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8726 fi
8727 fi
8728 fi
8729 echo "$as_me:8729: result: $ac_cv_header_stdc" >&5
8730 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8731 if test $ac_cv_header_stdc = yes; then
8732
8733 cat >>confdefs.h <<\EOF
8734 #define STDC_HEADERS 1
8735 EOF
8736
8737 fi
8738
8739 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8740
8741 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8742                   inttypes.h stdint.h unistd.h
8743 do
8744 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8745 echo "$as_me:8745: checking for $ac_header" >&5
8746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8748   echo $ECHO_N "(cached) $ECHO_C" >&6
8749 else
8750   cat >conftest.$ac_ext <<_ACEOF
8751 #line 8751 "configure"
8752 #include "confdefs.h"
8753 $ac_includes_default
8754 #include <$ac_header>
8755 _ACEOF
8756 rm -f conftest.$ac_objext
8757 if { (eval echo "$as_me:8757: \"$ac_compile\"") >&5
8758   (eval $ac_compile) 2>&5
8759   ac_status=$?
8760   echo "$as_me:8760: \$? = $ac_status" >&5
8761   (exit $ac_status); } &&
8762          { ac_try='test -s conftest.$ac_objext'
8763   { (eval echo "$as_me:8763: \"$ac_try\"") >&5
8764   (eval $ac_try) 2>&5
8765   ac_status=$?
8766   echo "$as_me:8766: \$? = $ac_status" >&5
8767   (exit $ac_status); }; }; then
8768   eval "$as_ac_Header=yes"
8769 else
8770   echo "$as_me: failed program was:" >&5
8771 cat conftest.$ac_ext >&5
8772 eval "$as_ac_Header=no"
8773 fi
8774 rm -f conftest.$ac_objext conftest.$ac_ext
8775 fi
8776 echo "$as_me:8776: result: `eval echo '${'$as_ac_Header'}'`" >&5
8777 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8778 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8779   cat >>confdefs.h <<EOF
8780 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8781 EOF
8782
8783 fi
8784 done
8785
8786 echo "$as_me:8786: checking for signed char" >&5
8787 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8788 if test "${ac_cv_type_signed_char+set}" = set; then
8789   echo $ECHO_N "(cached) $ECHO_C" >&6
8790 else
8791   cat >conftest.$ac_ext <<_ACEOF
8792 #line 8792 "configure"
8793 #include "confdefs.h"
8794 $ac_includes_default
8795 int
8796 main ()
8797 {
8798 if ((signed char *) 0)
8799   return 0;
8800 if (sizeof (signed char))
8801   return 0;
8802   ;
8803   return 0;
8804 }
8805 _ACEOF
8806 rm -f conftest.$ac_objext
8807 if { (eval echo "$as_me:8807: \"$ac_compile\"") >&5
8808   (eval $ac_compile) 2>&5
8809   ac_status=$?
8810   echo "$as_me:8810: \$? = $ac_status" >&5
8811   (exit $ac_status); } &&
8812          { ac_try='test -s conftest.$ac_objext'
8813   { (eval echo "$as_me:8813: \"$ac_try\"") >&5
8814   (eval $ac_try) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); }; }; then
8818   ac_cv_type_signed_char=yes
8819 else
8820   echo "$as_me: failed program was:" >&5
8821 cat conftest.$ac_ext >&5
8822 ac_cv_type_signed_char=no
8823 fi
8824 rm -f conftest.$ac_objext conftest.$ac_ext
8825 fi
8826 echo "$as_me:8826: result: $ac_cv_type_signed_char" >&5
8827 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8828
8829 echo "$as_me:8829: checking size of signed char" >&5
8830 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8831 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8832   echo $ECHO_N "(cached) $ECHO_C" >&6
8833 else
8834   if test "$ac_cv_type_signed_char" = yes; then
8835   if test "$cross_compiling" = yes; then
8836   # Depending upon the size, compute the lo and hi bounds.
8837 cat >conftest.$ac_ext <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840 $ac_includes_default
8841 int
8842 main ()
8843 {
8844 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8845   ;
8846   return 0;
8847 }
8848 _ACEOF
8849 rm -f conftest.$ac_objext
8850 if { (eval echo "$as_me:8850: \"$ac_compile\"") >&5
8851   (eval $ac_compile) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); } &&
8855          { ac_try='test -s conftest.$ac_objext'
8856   { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857   (eval $ac_try) 2>&5
8858   ac_status=$?
8859   echo "$as_me:8859: \$? = $ac_status" >&5
8860   (exit $ac_status); }; }; then
8861   ac_lo=0 ac_mid=0
8862   while :; do
8863     cat >conftest.$ac_ext <<_ACEOF
8864 #line 8864 "configure"
8865 #include "confdefs.h"
8866 $ac_includes_default
8867 int
8868 main ()
8869 {
8870 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8871   ;
8872   return 0;
8873 }
8874 _ACEOF
8875 rm -f conftest.$ac_objext
8876 if { (eval echo "$as_me:8876: \"$ac_compile\"") >&5
8877   (eval $ac_compile) 2>&5
8878   ac_status=$?
8879   echo "$as_me:8879: \$? = $ac_status" >&5
8880   (exit $ac_status); } &&
8881          { ac_try='test -s conftest.$ac_objext'
8882   { (eval echo "$as_me:8882: \"$ac_try\"") >&5
8883   (eval $ac_try) 2>&5
8884   ac_status=$?
8885   echo "$as_me:8885: \$? = $ac_status" >&5
8886   (exit $ac_status); }; }; then
8887   ac_hi=$ac_mid; break
8888 else
8889   echo "$as_me: failed program was:" >&5
8890 cat conftest.$ac_ext >&5
8891 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8892 fi
8893 rm -f conftest.$ac_objext conftest.$ac_ext
8894   done
8895 else
8896   echo "$as_me: failed program was:" >&5
8897 cat conftest.$ac_ext >&5
8898 ac_hi=-1 ac_mid=-1
8899   while :; do
8900     cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903 $ac_includes_default
8904 int
8905 main ()
8906 {
8907 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8908   ;
8909   return 0;
8910 }
8911 _ACEOF
8912 rm -f conftest.$ac_objext
8913 if { (eval echo "$as_me:8913: \"$ac_compile\"") >&5
8914   (eval $ac_compile) 2>&5
8915   ac_status=$?
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); } &&
8918          { ac_try='test -s conftest.$ac_objext'
8919   { (eval echo "$as_me:8919: \"$ac_try\"") >&5
8920   (eval $ac_try) 2>&5
8921   ac_status=$?
8922   echo "$as_me:8922: \$? = $ac_status" >&5
8923   (exit $ac_status); }; }; then
8924   ac_lo=$ac_mid; break
8925 else
8926   echo "$as_me: failed program was:" >&5
8927 cat conftest.$ac_ext >&5
8928 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8929 fi
8930 rm -f conftest.$ac_objext conftest.$ac_ext
8931   done
8932 fi
8933 rm -f conftest.$ac_objext conftest.$ac_ext
8934 # Binary search between lo and hi bounds.
8935 while test "x$ac_lo" != "x$ac_hi"; do
8936   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8937   cat >conftest.$ac_ext <<_ACEOF
8938 #line 8938 "configure"
8939 #include "confdefs.h"
8940 $ac_includes_default
8941 int
8942 main ()
8943 {
8944 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8945   ;
8946   return 0;
8947 }
8948 _ACEOF
8949 rm -f conftest.$ac_objext
8950 if { (eval echo "$as_me:8950: \"$ac_compile\"") >&5
8951   (eval $ac_compile) 2>&5
8952   ac_status=$?
8953   echo "$as_me:8953: \$? = $ac_status" >&5
8954   (exit $ac_status); } &&
8955          { ac_try='test -s conftest.$ac_objext'
8956   { (eval echo "$as_me:8956: \"$ac_try\"") >&5
8957   (eval $ac_try) 2>&5
8958   ac_status=$?
8959   echo "$as_me:8959: \$? = $ac_status" >&5
8960   (exit $ac_status); }; }; then
8961   ac_hi=$ac_mid
8962 else
8963   echo "$as_me: failed program was:" >&5
8964 cat conftest.$ac_ext >&5
8965 ac_lo=`expr $ac_mid + 1`
8966 fi
8967 rm -f conftest.$ac_objext conftest.$ac_ext
8968 done
8969 ac_cv_sizeof_signed_char=$ac_lo
8970 else
8971   if test "$cross_compiling" = yes; then
8972   { { echo "$as_me:8972: error: cannot run test program while cross compiling" >&5
8973 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8974    { (exit 1); exit 1; }; }
8975 else
8976   cat >conftest.$ac_ext <<_ACEOF
8977 #line 8977 "configure"
8978 #include "confdefs.h"
8979 $ac_includes_default
8980 int
8981 main ()
8982 {
8983 FILE *f = fopen ("conftest.val", "w");
8984 if (!f)
8985   $ac_main_return (1);
8986 fprintf (f, "%d", (sizeof (signed char)));
8987 fclose (f);
8988   ;
8989   return 0;
8990 }
8991 _ACEOF
8992 rm -f conftest$ac_exeext
8993 if { (eval echo "$as_me:8993: \"$ac_link\"") >&5
8994   (eval $ac_link) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8998   { (eval echo "$as_me:8998: \"$ac_try\"") >&5
8999   (eval $ac_try) 2>&5
9000   ac_status=$?
9001   echo "$as_me:9001: \$? = $ac_status" >&5
9002   (exit $ac_status); }; }; then
9003   ac_cv_sizeof_signed_char=`cat conftest.val`
9004 else
9005   echo "$as_me: program exited with status $ac_status" >&5
9006 echo "$as_me: failed program was:" >&5
9007 cat conftest.$ac_ext >&5
9008 fi
9009 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9010 fi
9011 fi
9012 rm -f conftest.val
9013 else
9014   ac_cv_sizeof_signed_char=0
9015 fi
9016 fi
9017 echo "$as_me:9017: result: $ac_cv_sizeof_signed_char" >&5
9018 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9019 cat >>confdefs.h <<EOF
9020 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9021 EOF
9022
9023 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9024         NCURSES_SBOOL="signed char"
9025 else
9026         NCURSES_SBOOL="char"
9027 fi
9028 echo "$as_me:9028: checking if you want to use signed Boolean array in term.h" >&5
9029 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9030
9031 # Check whether --enable-signed-char or --disable-signed-char was given.
9032 if test "${enable_signed_char+set}" = set; then
9033   enableval="$enable_signed_char"
9034   with_signed_char=$enableval
9035 else
9036   with_signed_char=no
9037 fi;
9038 echo "$as_me:9038: result: $with_signed_char" >&5
9039 echo "${ECHO_T}$with_signed_char" >&6
9040 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9041
9042 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9043 echo "$as_me:9043: checking if you want SIGWINCH handler" >&5
9044 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9045
9046 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9047 if test "${enable_sigwinch+set}" = set; then
9048   enableval="$enable_sigwinch"
9049   with_sigwinch=$enableval
9050 else
9051   with_sigwinch=$with_ext_funcs
9052 fi;
9053 echo "$as_me:9053: result: $with_sigwinch" >&5
9054 echo "${ECHO_T}$with_sigwinch" >&6
9055 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9056 #define USE_SIGWINCH 1
9057 EOF
9058
9059 ###   use option --enable-tcap-names to allow user to define new capabilities
9060 echo "$as_me:9060: checking if you want user-definable terminal capabilities like termcap" >&5
9061 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9062
9063 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9064 if test "${enable_tcap_names+set}" = set; then
9065   enableval="$enable_tcap_names"
9066   with_tcap_names=$enableval
9067 else
9068   with_tcap_names=$with_ext_funcs
9069 fi;
9070 echo "$as_me:9070: result: $with_tcap_names" >&5
9071 echo "${ECHO_T}$with_tcap_names" >&6
9072 NCURSES_XNAMES=0
9073 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9074
9075 ###############################################################################
9076 # These options are relatively safe to experiment with.
9077
9078 echo "$as_me:9078: checking if you want all development code" >&5
9079 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9080
9081 # Check whether --with-develop or --without-develop was given.
9082 if test "${with_develop+set}" = set; then
9083   withval="$with_develop"
9084   with_develop=$withval
9085 else
9086   with_develop=no
9087 fi;
9088 echo "$as_me:9088: result: $with_develop" >&5
9089 echo "${ECHO_T}$with_develop" >&6
9090
9091 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9092 echo "$as_me:9092: checking if you want hard-tabs code" >&5
9093 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9094
9095 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9096 if test "${enable_hard_tabs+set}" = set; then
9097   enableval="$enable_hard_tabs"
9098
9099 else
9100   enable_hard_tabs=$with_develop
9101 fi;
9102 echo "$as_me:9102: result: $enable_hard_tabs" >&5
9103 echo "${ECHO_T}$enable_hard_tabs" >&6
9104 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9105 #define USE_HARD_TABS 1
9106 EOF
9107
9108 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9109 echo "$as_me:9109: checking if you want limited support for xmc" >&5
9110 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9111
9112 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9113 if test "${enable_xmc_glitch+set}" = set; then
9114   enableval="$enable_xmc_glitch"
9115
9116 else
9117   enable_xmc_glitch=$with_develop
9118 fi;
9119 echo "$as_me:9119: result: $enable_xmc_glitch" >&5
9120 echo "${ECHO_T}$enable_xmc_glitch" >&6
9121 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9122 #define USE_XMC_SUPPORT 1
9123 EOF
9124
9125 ###############################################################################
9126 # These are just experimental, probably should not be in a package:
9127
9128 echo "$as_me:9128: checking if you do not want to assume colors are white-on-black" >&5
9129 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9130
9131 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9132 if test "${enable_assumed_color+set}" = set; then
9133   enableval="$enable_assumed_color"
9134   with_assumed_color=$enableval
9135 else
9136   with_assumed_color=yes
9137 fi;
9138 echo "$as_me:9138: result: $with_assumed_color" >&5
9139 echo "${ECHO_T}$with_assumed_color" >&6
9140 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9141 #define USE_ASSUMED_COLOR 1
9142 EOF
9143
9144 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9145 echo "$as_me:9145: checking if you want hashmap scrolling-optimization code" >&5
9146 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9147
9148 # Check whether --enable-hashmap or --disable-hashmap was given.
9149 if test "${enable_hashmap+set}" = set; then
9150   enableval="$enable_hashmap"
9151   with_hashmap=$enableval
9152 else
9153   with_hashmap=yes
9154 fi;
9155 echo "$as_me:9155: result: $with_hashmap" >&5
9156 echo "${ECHO_T}$with_hashmap" >&6
9157 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9158 #define USE_HASHMAP 1
9159 EOF
9160
9161 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9162 echo "$as_me:9162: checking if you want colorfgbg code" >&5
9163 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9164
9165 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9166 if test "${enable_colorfgbg+set}" = set; then
9167   enableval="$enable_colorfgbg"
9168   with_colorfgbg=$enableval
9169 else
9170   with_colorfgbg=no
9171 fi;
9172 echo "$as_me:9172: result: $with_colorfgbg" >&5
9173 echo "${ECHO_T}$with_colorfgbg" >&6
9174 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9175 #define USE_COLORFGBG 1
9176 EOF
9177
9178 # This is still experimental (20080329), but should ultimately be moved to
9179 # the script-block --with-normal, etc.
9180
9181 echo "$as_me:9181: checking if you want to link with the pthread library" >&5
9182 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9183
9184 # Check whether --with-pthread or --without-pthread was given.
9185 if test "${with_pthread+set}" = set; then
9186   withval="$with_pthread"
9187   with_pthread=$withval
9188 else
9189   with_pthread=no
9190 fi;
9191 echo "$as_me:9191: result: $with_pthread" >&5
9192 echo "${ECHO_T}$with_pthread" >&6
9193
9194 if test "$with_pthread" != no ; then
9195     echo "$as_me:9195: checking for pthread.h" >&5
9196 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9197 if test "${ac_cv_header_pthread_h+set}" = set; then
9198   echo $ECHO_N "(cached) $ECHO_C" >&6
9199 else
9200   cat >conftest.$ac_ext <<_ACEOF
9201 #line 9201 "configure"
9202 #include "confdefs.h"
9203 #include <pthread.h>
9204 _ACEOF
9205 if { (eval echo "$as_me:9205: \"$ac_cpp conftest.$ac_ext\"") >&5
9206   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9207   ac_status=$?
9208   egrep -v '^ *\+' conftest.er1 >conftest.err
9209   rm -f conftest.er1
9210   cat conftest.err >&5
9211   echo "$as_me:9211: \$? = $ac_status" >&5
9212   (exit $ac_status); } >/dev/null; then
9213   if test -s conftest.err; then
9214     ac_cpp_err=$ac_c_preproc_warn_flag
9215   else
9216     ac_cpp_err=
9217   fi
9218 else
9219   ac_cpp_err=yes
9220 fi
9221 if test -z "$ac_cpp_err"; then
9222   ac_cv_header_pthread_h=yes
9223 else
9224   echo "$as_me: failed program was:" >&5
9225   cat conftest.$ac_ext >&5
9226   ac_cv_header_pthread_h=no
9227 fi
9228 rm -f conftest.err conftest.$ac_ext
9229 fi
9230 echo "$as_me:9230: result: $ac_cv_header_pthread_h" >&5
9231 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9232 if test $ac_cv_header_pthread_h = yes; then
9233
9234         cat >>confdefs.h <<\EOF
9235 #define HAVE_PTHREADS_H 1
9236 EOF
9237
9238         echo "$as_me:9238: checking for pthread_create in -lpthread" >&5
9239 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9240 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
9241   echo $ECHO_N "(cached) $ECHO_C" >&6
9242 else
9243   ac_check_lib_save_LIBS=$LIBS
9244 LIBS="-lpthread  $LIBS"
9245 cat >conftest.$ac_ext <<_ACEOF
9246 #line 9246 "configure"
9247 #include "confdefs.h"
9248
9249 /* Override any gcc2 internal prototype to avoid an error.  */
9250 #ifdef __cplusplus
9251 extern "C"
9252 #endif
9253 /* We use char because int might match the return type of a gcc2
9254    builtin and then its argument prototype would still apply.  */
9255 char pthread_create ();
9256 int
9257 main ()
9258 {
9259 pthread_create ();
9260   ;
9261   return 0;
9262 }
9263 _ACEOF
9264 rm -f conftest.$ac_objext conftest$ac_exeext
9265 if { (eval echo "$as_me:9265: \"$ac_link\"") >&5
9266   (eval $ac_link) 2>&5
9267   ac_status=$?
9268   echo "$as_me:9268: \$? = $ac_status" >&5
9269   (exit $ac_status); } &&
9270          { ac_try='test -s conftest$ac_exeext'
9271   { (eval echo "$as_me:9271: \"$ac_try\"") >&5
9272   (eval $ac_try) 2>&5
9273   ac_status=$?
9274   echo "$as_me:9274: \$? = $ac_status" >&5
9275   (exit $ac_status); }; }; then
9276   ac_cv_lib_pthread_pthread_create=yes
9277 else
9278   echo "$as_me: failed program was:" >&5
9279 cat conftest.$ac_ext >&5
9280 ac_cv_lib_pthread_pthread_create=no
9281 fi
9282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9283 LIBS=$ac_check_lib_save_LIBS
9284 fi
9285 echo "$as_me:9285: result: $ac_cv_lib_pthread_pthread_create" >&5
9286 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
9287 if test $ac_cv_lib_pthread_pthread_create = yes; then
9288
9289             LIBS="-lpthread $LIBS"
9290             cat >>confdefs.h <<\EOF
9291 #define HAVE_LIBPTHREADS 1
9292 EOF
9293
9294             with_pthread=yes
9295
9296 else
9297
9298             { { echo "$as_me:9298: error: Cannot link with pthread library" >&5
9299 echo "$as_me: error: Cannot link with pthread library" >&2;}
9300    { (exit 1); exit 1; }; }
9301
9302 fi
9303
9304 fi
9305
9306 fi
9307
9308 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9309 if test "${enable_weak_symbols+set}" = set; then
9310   enableval="$enable_weak_symbols"
9311   use_weak_symbols=$withval
9312 else
9313   use_weak_symbols=no
9314 fi;
9315 echo "$as_me:9315: result: $use_weak_symbols" >&5
9316 echo "${ECHO_T}$use_weak_symbols" >&6
9317 if test "$use_weak_symbols" = yes ; then
9318
9319 echo "$as_me:9319: checking if $CC supports weak symbols" >&5
9320 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9321 if test "${cf_cv_weak_symbols+set}" = set; then
9322   echo $ECHO_N "(cached) $ECHO_C" >&6
9323 else
9324
9325 cat >conftest.$ac_ext <<_ACEOF
9326 #line 9326 "configure"
9327 #include "confdefs.h"
9328
9329 #include <stdio.h>
9330 int
9331 main ()
9332 {
9333
9334 #if defined(__GNUC__)
9335 #  if defined __USE_ISOC99
9336 #    define _cat_pragma(exp)    _Pragma(#exp)
9337 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9338 #  else
9339 #    define _weak_pragma(exp)
9340 #  endif
9341 #  define _declare(name)        __extension__ extern __typeof__(name) name
9342 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9343 #endif
9344
9345 weak_symbol(fopen);
9346
9347   ;
9348   return 0;
9349 }
9350 _ACEOF
9351 rm -f conftest.$ac_objext
9352 if { (eval echo "$as_me:9352: \"$ac_compile\"") >&5
9353   (eval $ac_compile) 2>&5
9354   ac_status=$?
9355   echo "$as_me:9355: \$? = $ac_status" >&5
9356   (exit $ac_status); } &&
9357          { ac_try='test -s conftest.$ac_objext'
9358   { (eval echo "$as_me:9358: \"$ac_try\"") >&5
9359   (eval $ac_try) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); }; }; then
9363   cf_cv_weak_symbols=yes
9364 else
9365   echo "$as_me: failed program was:" >&5
9366 cat conftest.$ac_ext >&5
9367 cf_cv_weak_symbols=no
9368 fi
9369 rm -f conftest.$ac_objext conftest.$ac_ext
9370
9371 fi
9372 echo "$as_me:9372: result: $cf_cv_weak_symbols" >&5
9373 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9374
9375 else
9376     cf_cv_weak_symbols=no
9377 fi
9378
9379 if test $cf_cv_weak_symbols = yes ; then
9380     cat >>confdefs.h <<\EOF
9381 #define USE_WEAK_SYMBOLS 1
9382 EOF
9383
9384 fi
9385
9386 PTHREAD=
9387 if test "$with_pthread" = "yes" ; then
9388     cat >>confdefs.h <<\EOF
9389 #define USE_PTHREADS 1
9390 EOF
9391
9392     enable_reentrant=yes
9393     if test $cf_cv_weak_symbols = yes ; then
9394         PTHREAD=-lpthread
9395     fi
9396 fi
9397
9398 # Reentrant code has to be opaque; there's little advantage to making ncurses
9399 # opaque outside of that, so there is no --enable-opaque option.  We can use
9400 # this option without --with-pthreads, but this will be always set for
9401 # pthreads.
9402 echo "$as_me:9402: checking if you want experimental reentrant code" >&5
9403 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9404
9405 # Check whether --enable-reentrant or --disable-reentrant was given.
9406 if test "${enable_reentrant+set}" = set; then
9407   enableval="$enable_reentrant"
9408   with_reentrant=$enableval
9409 else
9410   with_reentrant=no
9411 fi;
9412 echo "$as_me:9412: result: $with_reentrant" >&5
9413 echo "${ECHO_T}$with_reentrant" >&6
9414 if test "$with_reentrant" = yes ; then
9415         cf_cv_enable_reentrant=1
9416         cf_cv_enable_opaque="NCURSES_INTERNALS"
9417         NCURSES_OPAQUE=1
9418         NCURSES_SIZE_T=int
9419     if test $cf_cv_weak_symbols = yes ; then
9420
9421 # remove pthread library from $LIBS
9422 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9423
9424     else
9425         LIB_SUFFIX="t${LIB_SUFFIX}"
9426     fi
9427         cat >>confdefs.h <<\EOF
9428 #define USE_REENTRANT 1
9429 EOF
9430
9431 if test "${with_abi_version+set}" != set; then
9432         case $cf_cv_rel_version in
9433         5.*)
9434                 cf_cv_rel_version=6.0
9435                 cf_cv_abi_version=6
9436                 { echo "$as_me:9436: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9437 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9438                 ;;
9439         esac
9440 fi
9441
9442 else
9443         cf_cv_enable_reentrant=0
9444         cf_cv_enable_opaque="NCURSES_OPAQUE"
9445         NCURSES_OPAQUE=0
9446         NCURSES_SIZE_T=short
9447 fi
9448
9449 echo "$as_me:9449: checking if you want experimental safe-sprintf code" >&5
9450 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9451
9452 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9453 if test "${enable_safe_sprintf+set}" = set; then
9454   enableval="$enable_safe_sprintf"
9455   with_safe_sprintf=$enableval
9456 else
9457   with_safe_sprintf=no
9458 fi;
9459 echo "$as_me:9459: result: $with_safe_sprintf" >&5
9460 echo "${ECHO_T}$with_safe_sprintf" >&6
9461 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9462 #define USE_SAFE_SPRINTF 1
9463 EOF
9464
9465 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9466 # when hashmap is used scroll hints are useless
9467 if test "$with_hashmap" = no ; then
9468 echo "$as_me:9468: checking if you want to experiment without scrolling-hints code" >&5
9469 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9470
9471 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9472 if test "${enable_scroll_hints+set}" = set; then
9473   enableval="$enable_scroll_hints"
9474   with_scroll_hints=$enableval
9475 else
9476   with_scroll_hints=yes
9477 fi;
9478 echo "$as_me:9478: result: $with_scroll_hints" >&5
9479 echo "${ECHO_T}$with_scroll_hints" >&6
9480 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9481 #define USE_SCROLL_HINTS 1
9482 EOF
9483
9484 fi
9485
9486 echo "$as_me:9486: checking if you want experimental wgetch-events code" >&5
9487 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9488
9489 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9490 if test "${enable_wgetch_events+set}" = set; then
9491   enableval="$enable_wgetch_events"
9492   with_wgetch_events=$enableval
9493 else
9494   with_wgetch_events=no
9495 fi;
9496 echo "$as_me:9496: result: $with_wgetch_events" >&5
9497 echo "${ECHO_T}$with_wgetch_events" >&6
9498 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9499 #define NCURSES_WGETCH_EVENTS 1
9500 EOF
9501
9502 ###############################################################################
9503
9504 ###     use option --disable-echo to suppress full display compiling commands
9505 echo "$as_me:9505: checking if you want to display full commands during build" >&5
9506 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9507
9508 # Check whether --enable-echo or --disable-echo was given.
9509 if test "${enable_echo+set}" = set; then
9510   enableval="$enable_echo"
9511   with_echo=$enableval
9512 else
9513   with_echo=yes
9514 fi;
9515 if test "$with_echo" = yes; then
9516         ECHO_LINK=
9517 else
9518         ECHO_LINK='@ echo linking $@ ... ;'
9519         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9520         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9521 fi
9522 echo "$as_me:9522: result: $with_echo" >&5
9523 echo "${ECHO_T}$with_echo" >&6
9524
9525 ###     use option --enable-warnings to turn on all gcc warnings
9526 echo "$as_me:9526: checking if you want to see compiler warnings" >&5
9527 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9528
9529 # Check whether --enable-warnings or --disable-warnings was given.
9530 if test "${enable_warnings+set}" = set; then
9531   enableval="$enable_warnings"
9532   with_warnings=$enableval
9533 fi;
9534 echo "$as_me:9534: result: $with_warnings" >&5
9535 echo "${ECHO_T}$with_warnings" >&6
9536
9537 if test "x$with_warnings" = "xyes"; then
9538         ADAFLAGS="$ADAFLAGS -gnatg"
9539
9540 INTEL_COMPILER=no
9541
9542 if test "$GCC" = yes ; then
9543         case $host_os in
9544         linux*|gnu*)
9545                 echo "$as_me:9545: checking if this is really Intel C compiler" >&5
9546 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9547                 cf_save_CFLAGS="$CFLAGS"
9548                 CFLAGS="$CFLAGS -no-gcc"
9549                 cat >conftest.$ac_ext <<_ACEOF
9550 #line 9550 "configure"
9551 #include "confdefs.h"
9552
9553 int
9554 main ()
9555 {
9556
9557 #ifdef __INTEL_COMPILER
9558 #else
9559 make an error
9560 #endif
9561
9562   ;
9563   return 0;
9564 }
9565 _ACEOF
9566 rm -f conftest.$ac_objext
9567 if { (eval echo "$as_me:9567: \"$ac_compile\"") >&5
9568   (eval $ac_compile) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit $ac_status); } &&
9572          { ac_try='test -s conftest.$ac_objext'
9573   { (eval echo "$as_me:9573: \"$ac_try\"") >&5
9574   (eval $ac_try) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); }; }; then
9578   INTEL_COMPILER=yes
9579 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9580
9581 else
9582   echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9584 fi
9585 rm -f conftest.$ac_objext conftest.$ac_ext
9586                 CFLAGS="$cf_save_CFLAGS"
9587                 echo "$as_me:9587: result: $INTEL_COMPILER" >&5
9588 echo "${ECHO_T}$INTEL_COMPILER" >&6
9589                 ;;
9590         esac
9591 fi
9592
9593 cat > conftest.$ac_ext <<EOF
9594 #line 9594 "${as_me-configure}"
9595 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9596 EOF
9597
9598 if test "$INTEL_COMPILER" = yes
9599 then
9600 # The "-wdXXX" options suppress warnings:
9601 # remark #1419: external declaration in primary source file
9602 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9603 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9604 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9605 # remark #193: zero used for undefined preprocessing identifier
9606 # remark #593: variable "curs_sb_left_arrow" was set but never used
9607 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9608 # remark #869: parameter "tw" was never referenced
9609 # remark #981: operands are evaluated in unspecified order
9610 # warning #269: invalid format string conversion
9611
9612         { echo "$as_me:9612: checking for $CC warning options..." >&5
9613 echo "$as_me: checking for $CC warning options..." >&6;}
9614         cf_save_CFLAGS="$CFLAGS"
9615         EXTRA_CFLAGS="-Wall"
9616         for cf_opt in \
9617                 wd1419 \
9618                 wd1682 \
9619                 wd1683 \
9620                 wd1684 \
9621                 wd193 \
9622                 wd279 \
9623                 wd593 \
9624                 wd810 \
9625                 wd869 \
9626                 wd981
9627         do
9628                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9629                 if { (eval echo "$as_me:9629: \"$ac_compile\"") >&5
9630   (eval $ac_compile) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); }; then
9634                         test -n "$verbose" && echo "$as_me:9634: result: ... -$cf_opt" >&5
9635 echo "${ECHO_T}... -$cf_opt" >&6
9636                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9637                 fi
9638         done
9639         CFLAGS="$cf_save_CFLAGS"
9640
9641 elif test "$GCC" = yes
9642 then
9643         { echo "$as_me:9643: checking for $CC warning options..." >&5
9644 echo "$as_me: checking for $CC warning options..." >&6;}
9645         cf_save_CFLAGS="$CFLAGS"
9646         EXTRA_CFLAGS="-W -Wall"
9647         cf_warn_CONST=""
9648         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9649         for cf_opt in \
9650                 Wbad-function-cast \
9651                 Wcast-align \
9652                 Wcast-qual \
9653                 Winline \
9654                 Wmissing-declarations \
9655                 Wmissing-prototypes \
9656                 Wnested-externs \
9657                 Wpointer-arith \
9658                 Wshadow \
9659                 Wstrict-prototypes \
9660                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9661         do
9662                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9663                 if { (eval echo "$as_me:9663: \"$ac_compile\"") >&5
9664   (eval $ac_compile) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); }; then
9668                         test -n "$verbose" && echo "$as_me:9668: result: ... -$cf_opt" >&5
9669 echo "${ECHO_T}... -$cf_opt" >&6
9670                         case $cf_opt in #(vi
9671                         Wcast-qual) #(vi
9672                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9673                                 ;;
9674                         Winline) #(vi
9675                                 case $GCC_VERSION in
9676                                 [34].*)
9677                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9678
9679 echo "${as_me-configure}:9679: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9680
9681                                         continue;;
9682                                 esac
9683                                 ;;
9684                         esac
9685                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9686                 fi
9687         done
9688         CFLAGS="$cf_save_CFLAGS"
9689 fi
9690 rm -f conftest*
9691
9692         if test "$cf_with_cxx" = yes ; then
9693
9694 INTEL_CPLUSPLUS=no
9695
9696 if test "$GCC" = yes ; then
9697         case $host_os in
9698         linux*|gnu*)
9699                 echo "$as_me:9699: checking if this is really Intel C++ compiler" >&5
9700 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9701                 cf_save_CFLAGS="$CXXFLAGS"
9702                 CXXFLAGS="$CXXFLAGS -no-gcc"
9703                 cat >conftest.$ac_ext <<_ACEOF
9704 #line 9704 "configure"
9705 #include "confdefs.h"
9706
9707 int
9708 main ()
9709 {
9710
9711 #ifdef __INTEL_COMPILER
9712 #else
9713 make an error
9714 #endif
9715
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest.$ac_objext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732   INTEL_CPLUSPLUS=yes
9733 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9734
9735 else
9736   echo "$as_me: failed program was:" >&5
9737 cat conftest.$ac_ext >&5
9738 fi
9739 rm -f conftest.$ac_objext conftest.$ac_ext
9740                 CXXFLAGS="$cf_save_CFLAGS"
9741                 echo "$as_me:9741: result: $INTEL_CPLUSPLUS" >&5
9742 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9743                 ;;
9744         esac
9745 fi
9746
9747 ac_ext=cc
9748 ac_cpp='$CXXCPP $CPPFLAGS'
9749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9752 ac_main_return=return
9753
9754 cat > conftest.$ac_ext <<EOF
9755 #line 9755 "configure"
9756 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9757 EOF
9758
9759 if test "$INTEL_CPLUSPLUS" = yes
9760 then
9761 # The "-wdXXX" options suppress warnings:
9762 # remark #1419: external declaration in primary source file
9763 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9764 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9765 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9766 # remark #193: zero used for undefined preprocessing identifier
9767 # remark #593: variable "curs_sb_left_arrow" was set but never used
9768 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9769 # remark #869: parameter "tw" was never referenced
9770 # remark #981: operands are evaluated in unspecified order
9771 # warning #269: invalid format string conversion
9772
9773         { echo "$as_me:9773: checking for $CC warning options..." >&5
9774 echo "$as_me: checking for $CC warning options..." >&6;}
9775         cf_save_CXXFLAGS="$CXXFLAGS"
9776         EXTRA_CXXFLAGS="-Wall"
9777         for cf_opt in \
9778                 wd1419 \
9779                 wd1682 \
9780                 wd1683 \
9781                 wd1684 \
9782                 wd193 \
9783                 wd279 \
9784                 wd593 \
9785                 wd810 \
9786                 wd869 \
9787                 wd981
9788         do
9789                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9790                 if { (eval echo "$as_me:9790: \"$ac_compile\"") >&5
9791   (eval $ac_compile) 2>&5
9792   ac_status=$?
9793   echo "$as_me:9793: \$? = $ac_status" >&5
9794   (exit $ac_status); }; then
9795                         test -n "$verbose" && echo "$as_me:9795: result: ... -$cf_opt" >&5
9796 echo "${ECHO_T}... -$cf_opt" >&6
9797                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9798                 fi
9799         done
9800         CXXFLAGS="$cf_save_CXXFLAGS"
9801
9802 elif test "$GXX" = yes
9803 then
9804         { echo "$as_me:9804: checking for $CXX warning options..." >&5
9805 echo "$as_me: checking for $CXX warning options..." >&6;}
9806         cf_save_CXXFLAGS="$CXXFLAGS"
9807         EXTRA_CXXFLAGS="-W -Wall"
9808         cf_gxx_extra_warnings=""
9809         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9810         case "$GCC_VERSION" in
9811         [1-2].*)
9812                 ;;
9813         *)
9814                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9815                 ;;
9816         esac
9817         for cf_opt in \
9818                 Wabi \
9819                 fabi-version=0 \
9820                 Woverloaded-virtual \
9821                 Wsign-promo \
9822                 Wsynth \
9823                 Wold-style-cast \
9824                 Wcast-align \
9825                 Wcast-qual \
9826                 Wmissing-prototypes \
9827                 Wpointer-arith \
9828                 Wshadow \
9829                 Wstrict-prototypes \
9830                 Wundef $cf_gxx_extra_warnings Wno-unused
9831         do
9832                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9833                 if { (eval echo "$as_me:9833: \"$ac_compile\"") >&5
9834   (eval $ac_compile) 2>&5
9835   ac_status=$?
9836   echo "$as_me:9836: \$? = $ac_status" >&5
9837   (exit $ac_status); }; then
9838                         test -n "$verbose" && echo "$as_me:9838: result: ... -$cf_opt" >&5
9839 echo "${ECHO_T}... -$cf_opt" >&6
9840                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9841                 else
9842                         test -n "$verbose" && echo "$as_me:9842: result: ... no -$cf_opt" >&5
9843 echo "${ECHO_T}... no -$cf_opt" >&6
9844                 fi
9845         done
9846         CXXFLAGS="$cf_save_CXXFLAGS"
9847 fi
9848
9849 rm -f conftest*
9850 ac_ext=c
9851 ac_cpp='$CPP $CPPFLAGS'
9852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9855 ac_main_return=return
9856
9857         fi
9858 fi
9859
9860 if test "$GCC" = yes
9861 then
9862 cat > conftest.i <<EOF
9863 #ifndef GCC_PRINTF
9864 #define GCC_PRINTF 0
9865 #endif
9866 #ifndef GCC_SCANF
9867 #define GCC_SCANF 0
9868 #endif
9869 #ifndef GCC_NORETURN
9870 #define GCC_NORETURN /* nothing */
9871 #endif
9872 #ifndef GCC_UNUSED
9873 #define GCC_UNUSED /* nothing */
9874 #endif
9875 EOF
9876 if test "$GCC" = yes
9877 then
9878         { echo "$as_me:9878: checking for $CC __attribute__ directives..." >&5
9879 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9880 cat > conftest.$ac_ext <<EOF
9881 #line 9881 "${as_me-configure}"
9882 #include "confdefs.h"
9883 #include "conftest.h"
9884 #include "conftest.i"
9885 #if     GCC_PRINTF
9886 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9887 #else
9888 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9889 #endif
9890 #if     GCC_SCANF
9891 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9892 #else
9893 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9894 #endif
9895 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9896 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9897 extern void foo(void) GCC_NORETURN;
9898 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9899 EOF
9900         for cf_attribute in scanf printf unused noreturn
9901         do
9902
9903 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9904
9905                 cf_directive="__attribute__(($cf_attribute))"
9906                 echo "checking for $CC $cf_directive" 1>&5
9907                 case $cf_attribute in
9908                 scanf|printf)
9909                 cat >conftest.h <<EOF
9910 #define GCC_$cf_ATTRIBUTE 1
9911 EOF
9912                         ;;
9913                 *)
9914                 cat >conftest.h <<EOF
9915 #define GCC_$cf_ATTRIBUTE $cf_directive
9916 EOF
9917                         ;;
9918                 esac
9919                 if { (eval echo "$as_me:9919: \"$ac_compile\"") >&5
9920   (eval $ac_compile) 2>&5
9921   ac_status=$?
9922   echo "$as_me:9922: \$? = $ac_status" >&5
9923   (exit $ac_status); }; then
9924                         test -n "$verbose" && echo "$as_me:9924: result: ... $cf_attribute" >&5
9925 echo "${ECHO_T}... $cf_attribute" >&6
9926                         cat conftest.h >>confdefs.h
9927                 fi
9928         done
9929 else
9930         fgrep define conftest.i >>confdefs.h
9931 fi
9932 rm -rf conftest*
9933 fi
9934
9935 ###     use option --enable-assertions to turn on generation of assertion code
9936 echo "$as_me:9936: checking if you want to enable runtime assertions" >&5
9937 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9938
9939 # Check whether --enable-assertions or --disable-assertions was given.
9940 if test "${enable_assertions+set}" = set; then
9941   enableval="$enable_assertions"
9942   with_assertions=$enableval
9943 else
9944   with_assertions=no
9945 fi;
9946 echo "$as_me:9946: result: $with_assertions" >&5
9947 echo "${ECHO_T}$with_assertions" >&6
9948 if test -n "$GCC"
9949 then
9950         if test "$with_assertions" = no
9951         then
9952                 cat >>confdefs.h <<\EOF
9953 #define NDEBUG 1
9954 EOF
9955
9956                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9957         else
9958                 ADAFLAGS="$ADAFLAGS -gnata"
9959         fi
9960 fi
9961
9962 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9963
9964 echo "$as_me:9964: checking if you want to use dmalloc for testing" >&5
9965 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9966
9967 # Check whether --with-dmalloc or --without-dmalloc was given.
9968 if test "${with_dmalloc+set}" = set; then
9969   withval="$with_dmalloc"
9970   cat >>confdefs.h <<\EOF
9971 #define USE_DMALLOC 1
9972 EOF
9973
9974         : ${with_cflags:=-g}
9975         : ${with_no_leaks:=yes}
9976          with_dmalloc=yes
9977 else
9978   with_dmalloc=
9979 fi;
9980 echo "$as_me:9980: result: ${with_dmalloc:-no}" >&5
9981 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9982
9983 case .$with_cflags in #(vi
9984 .*-g*)
9985         case .$CFLAGS in #(vi
9986         .*-g*) #(vi
9987                 ;;
9988         *)
9989
9990 cf_fix_cppflags=no
9991 cf_new_cflags=
9992 cf_new_cppflags=
9993 cf_new_extra_cppflags=
9994
9995 for cf_add_cflags in -g
9996 do
9997 case $cf_fix_cppflags in
9998 no)
9999         case $cf_add_cflags in #(vi
10000         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10001                 case $cf_add_cflags in
10002                 -D*)
10003                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10004
10005                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10006                         && test -z "${cf_tst_cflags}" \
10007                         && cf_fix_cppflags=yes
10008
10009                         if test $cf_fix_cppflags = yes ; then
10010                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10011                                 continue
10012                         elif test "${cf_tst_cflags}" = "\"'" ; then
10013                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10014                                 continue
10015                         fi
10016                         ;;
10017                 esac
10018                 case "$CPPFLAGS" in
10019                 *$cf_add_cflags) #(vi
10020                         ;;
10021                 *) #(vi
10022                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10023                         ;;
10024                 esac
10025                 ;;
10026         *)
10027                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10028                 ;;
10029         esac
10030         ;;
10031 yes)
10032         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10033
10034         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10035
10036         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10037         && test -z "${cf_tst_cflags}" \
10038         && cf_fix_cppflags=no
10039         ;;
10040 esac
10041 done
10042
10043 if test -n "$cf_new_cflags" ; then
10044
10045         CFLAGS="$CFLAGS $cf_new_cflags"
10046 fi
10047
10048 if test -n "$cf_new_cppflags" ; then
10049
10050         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10051 fi
10052
10053 if test -n "$cf_new_extra_cppflags" ; then
10054
10055         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10056 fi
10057
10058                 ;;
10059         esac
10060         ;;
10061 esac
10062
10063 if test "$with_dmalloc" = yes ; then
10064         echo "$as_me:10064: checking for dmalloc.h" >&5
10065 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10066 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10067   echo $ECHO_N "(cached) $ECHO_C" >&6
10068 else
10069   cat >conftest.$ac_ext <<_ACEOF
10070 #line 10070 "configure"
10071 #include "confdefs.h"
10072 #include <dmalloc.h>
10073 _ACEOF
10074 if { (eval echo "$as_me:10074: \"$ac_cpp conftest.$ac_ext\"") >&5
10075   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10076   ac_status=$?
10077   egrep -v '^ *\+' conftest.er1 >conftest.err
10078   rm -f conftest.er1
10079   cat conftest.err >&5
10080   echo "$as_me:10080: \$? = $ac_status" >&5
10081   (exit $ac_status); } >/dev/null; then
10082   if test -s conftest.err; then
10083     ac_cpp_err=$ac_c_preproc_warn_flag
10084   else
10085     ac_cpp_err=
10086   fi
10087 else
10088   ac_cpp_err=yes
10089 fi
10090 if test -z "$ac_cpp_err"; then
10091   ac_cv_header_dmalloc_h=yes
10092 else
10093   echo "$as_me: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   ac_cv_header_dmalloc_h=no
10096 fi
10097 rm -f conftest.err conftest.$ac_ext
10098 fi
10099 echo "$as_me:10099: result: $ac_cv_header_dmalloc_h" >&5
10100 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10101 if test $ac_cv_header_dmalloc_h = yes; then
10102
10103 echo "$as_me:10103: checking for dmalloc_debug in -ldmalloc" >&5
10104 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10105 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10106   echo $ECHO_N "(cached) $ECHO_C" >&6
10107 else
10108   ac_check_lib_save_LIBS=$LIBS
10109 LIBS="-ldmalloc  $LIBS"
10110 cat >conftest.$ac_ext <<_ACEOF
10111 #line 10111 "configure"
10112 #include "confdefs.h"
10113
10114 /* Override any gcc2 internal prototype to avoid an error.  */
10115 #ifdef __cplusplus
10116 extern "C"
10117 #endif
10118 /* We use char because int might match the return type of a gcc2
10119    builtin and then its argument prototype would still apply.  */
10120 char dmalloc_debug ();
10121 int
10122 main ()
10123 {
10124 dmalloc_debug ();
10125   ;
10126   return 0;
10127 }
10128 _ACEOF
10129 rm -f conftest.$ac_objext conftest$ac_exeext
10130 if { (eval echo "$as_me:10130: \"$ac_link\"") >&5
10131   (eval $ac_link) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit $ac_status); } &&
10135          { ac_try='test -s conftest$ac_exeext'
10136   { (eval echo "$as_me:10136: \"$ac_try\"") >&5
10137   (eval $ac_try) 2>&5
10138   ac_status=$?
10139   echo "$as_me:10139: \$? = $ac_status" >&5
10140   (exit $ac_status); }; }; then
10141   ac_cv_lib_dmalloc_dmalloc_debug=yes
10142 else
10143   echo "$as_me: failed program was:" >&5
10144 cat conftest.$ac_ext >&5
10145 ac_cv_lib_dmalloc_dmalloc_debug=no
10146 fi
10147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10148 LIBS=$ac_check_lib_save_LIBS
10149 fi
10150 echo "$as_me:10150: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10151 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10152 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10153   cat >>confdefs.h <<EOF
10154 #define HAVE_LIBDMALLOC 1
10155 EOF
10156
10157   LIBS="-ldmalloc $LIBS"
10158
10159 fi
10160
10161 fi
10162
10163 fi
10164
10165 echo "$as_me:10165: checking if you want to use dbmalloc for testing" >&5
10166 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10167
10168 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10169 if test "${with_dbmalloc+set}" = set; then
10170   withval="$with_dbmalloc"
10171   cat >>confdefs.h <<\EOF
10172 #define USE_DBMALLOC 1
10173 EOF
10174
10175         : ${with_cflags:=-g}
10176         : ${with_no_leaks:=yes}
10177          with_dbmalloc=yes
10178 else
10179   with_dbmalloc=
10180 fi;
10181 echo "$as_me:10181: result: ${with_dbmalloc:-no}" >&5
10182 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10183
10184 case .$with_cflags in #(vi
10185 .*-g*)
10186         case .$CFLAGS in #(vi
10187         .*-g*) #(vi
10188                 ;;
10189         *)
10190
10191 cf_fix_cppflags=no
10192 cf_new_cflags=
10193 cf_new_cppflags=
10194 cf_new_extra_cppflags=
10195
10196 for cf_add_cflags in -g
10197 do
10198 case $cf_fix_cppflags in
10199 no)
10200         case $cf_add_cflags in #(vi
10201         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10202                 case $cf_add_cflags in
10203                 -D*)
10204                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10205
10206                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10207                         && test -z "${cf_tst_cflags}" \
10208                         && cf_fix_cppflags=yes
10209
10210                         if test $cf_fix_cppflags = yes ; then
10211                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10212                                 continue
10213                         elif test "${cf_tst_cflags}" = "\"'" ; then
10214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10215                                 continue
10216                         fi
10217                         ;;
10218                 esac
10219                 case "$CPPFLAGS" in
10220                 *$cf_add_cflags) #(vi
10221                         ;;
10222                 *) #(vi
10223                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10224                         ;;
10225                 esac
10226                 ;;
10227         *)
10228                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10229                 ;;
10230         esac
10231         ;;
10232 yes)
10233         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10234
10235         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10236
10237         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10238         && test -z "${cf_tst_cflags}" \
10239         && cf_fix_cppflags=no
10240         ;;
10241 esac
10242 done
10243
10244 if test -n "$cf_new_cflags" ; then
10245
10246         CFLAGS="$CFLAGS $cf_new_cflags"
10247 fi
10248
10249 if test -n "$cf_new_cppflags" ; then
10250
10251         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10252 fi
10253
10254 if test -n "$cf_new_extra_cppflags" ; then
10255
10256         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10257 fi
10258
10259                 ;;
10260         esac
10261         ;;
10262 esac
10263
10264 if test "$with_dbmalloc" = yes ; then
10265         echo "$as_me:10265: checking for dbmalloc.h" >&5
10266 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10267 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10268   echo $ECHO_N "(cached) $ECHO_C" >&6
10269 else
10270   cat >conftest.$ac_ext <<_ACEOF
10271 #line 10271 "configure"
10272 #include "confdefs.h"
10273 #include <dbmalloc.h>
10274 _ACEOF
10275 if { (eval echo "$as_me:10275: \"$ac_cpp conftest.$ac_ext\"") >&5
10276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10277   ac_status=$?
10278   egrep -v '^ *\+' conftest.er1 >conftest.err
10279   rm -f conftest.er1
10280   cat conftest.err >&5
10281   echo "$as_me:10281: \$? = $ac_status" >&5
10282   (exit $ac_status); } >/dev/null; then
10283   if test -s conftest.err; then
10284     ac_cpp_err=$ac_c_preproc_warn_flag
10285   else
10286     ac_cpp_err=
10287   fi
10288 else
10289   ac_cpp_err=yes
10290 fi
10291 if test -z "$ac_cpp_err"; then
10292   ac_cv_header_dbmalloc_h=yes
10293 else
10294   echo "$as_me: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   ac_cv_header_dbmalloc_h=no
10297 fi
10298 rm -f conftest.err conftest.$ac_ext
10299 fi
10300 echo "$as_me:10300: result: $ac_cv_header_dbmalloc_h" >&5
10301 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10302 if test $ac_cv_header_dbmalloc_h = yes; then
10303
10304 echo "$as_me:10304: checking for debug_malloc in -ldbmalloc" >&5
10305 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10306 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10307   echo $ECHO_N "(cached) $ECHO_C" >&6
10308 else
10309   ac_check_lib_save_LIBS=$LIBS
10310 LIBS="-ldbmalloc  $LIBS"
10311 cat >conftest.$ac_ext <<_ACEOF
10312 #line 10312 "configure"
10313 #include "confdefs.h"
10314
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 #ifdef __cplusplus
10317 extern "C"
10318 #endif
10319 /* We use char because int might match the return type of a gcc2
10320    builtin and then its argument prototype would still apply.  */
10321 char debug_malloc ();
10322 int
10323 main ()
10324 {
10325 debug_malloc ();
10326   ;
10327   return 0;
10328 }
10329 _ACEOF
10330 rm -f conftest.$ac_objext conftest$ac_exeext
10331 if { (eval echo "$as_me:10331: \"$ac_link\"") >&5
10332   (eval $ac_link) 2>&5
10333   ac_status=$?
10334   echo "$as_me:10334: \$? = $ac_status" >&5
10335   (exit $ac_status); } &&
10336          { ac_try='test -s conftest$ac_exeext'
10337   { (eval echo "$as_me:10337: \"$ac_try\"") >&5
10338   (eval $ac_try) 2>&5
10339   ac_status=$?
10340   echo "$as_me:10340: \$? = $ac_status" >&5
10341   (exit $ac_status); }; }; then
10342   ac_cv_lib_dbmalloc_debug_malloc=yes
10343 else
10344   echo "$as_me: failed program was:" >&5
10345 cat conftest.$ac_ext >&5
10346 ac_cv_lib_dbmalloc_debug_malloc=no
10347 fi
10348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10349 LIBS=$ac_check_lib_save_LIBS
10350 fi
10351 echo "$as_me:10351: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10352 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10353 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10354   cat >>confdefs.h <<EOF
10355 #define HAVE_LIBDBMALLOC 1
10356 EOF
10357
10358   LIBS="-ldbmalloc $LIBS"
10359
10360 fi
10361
10362 fi
10363
10364 fi
10365
10366 echo "$as_me:10366: checking if you want to use valgrind for testing" >&5
10367 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10368
10369 # Check whether --with-valgrind or --without-valgrind was given.
10370 if test "${with_valgrind+set}" = set; then
10371   withval="$with_valgrind"
10372   cat >>confdefs.h <<\EOF
10373 #define USE_VALGRIND 1
10374 EOF
10375
10376         : ${with_cflags:=-g}
10377         : ${with_no_leaks:=yes}
10378          with_valgrind=yes
10379 else
10380   with_valgrind=
10381 fi;
10382 echo "$as_me:10382: result: ${with_valgrind:-no}" >&5
10383 echo "${ECHO_T}${with_valgrind:-no}" >&6
10384
10385 case .$with_cflags in #(vi
10386 .*-g*)
10387         case .$CFLAGS in #(vi
10388         .*-g*) #(vi
10389                 ;;
10390         *)
10391
10392 cf_fix_cppflags=no
10393 cf_new_cflags=
10394 cf_new_cppflags=
10395 cf_new_extra_cppflags=
10396
10397 for cf_add_cflags in -g
10398 do
10399 case $cf_fix_cppflags in
10400 no)
10401         case $cf_add_cflags in #(vi
10402         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10403                 case $cf_add_cflags in
10404                 -D*)
10405                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10406
10407                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10408                         && test -z "${cf_tst_cflags}" \
10409                         && cf_fix_cppflags=yes
10410
10411                         if test $cf_fix_cppflags = yes ; then
10412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10413                                 continue
10414                         elif test "${cf_tst_cflags}" = "\"'" ; then
10415                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10416                                 continue
10417                         fi
10418                         ;;
10419                 esac
10420                 case "$CPPFLAGS" in
10421                 *$cf_add_cflags) #(vi
10422                         ;;
10423                 *) #(vi
10424                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10425                         ;;
10426                 esac
10427                 ;;
10428         *)
10429                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10430                 ;;
10431         esac
10432         ;;
10433 yes)
10434         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10435
10436         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10437
10438         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10439         && test -z "${cf_tst_cflags}" \
10440         && cf_fix_cppflags=no
10441         ;;
10442 esac
10443 done
10444
10445 if test -n "$cf_new_cflags" ; then
10446
10447         CFLAGS="$CFLAGS $cf_new_cflags"
10448 fi
10449
10450 if test -n "$cf_new_cppflags" ; then
10451
10452         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10453 fi
10454
10455 if test -n "$cf_new_extra_cppflags" ; then
10456
10457         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10458 fi
10459
10460                 ;;
10461         esac
10462         ;;
10463 esac
10464
10465 echo "$as_me:10465: checking if you want to perform memory-leak testing" >&5
10466 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10467
10468 # Check whether --enable-leaks or --disable-leaks was given.
10469 if test "${enable_leaks+set}" = set; then
10470   enableval="$enable_leaks"
10471   with_no_leaks=yes
10472 else
10473   : ${with_no_leaks:=no}
10474 fi;
10475 echo "$as_me:10475: result: $with_no_leaks" >&5
10476 echo "${ECHO_T}$with_no_leaks" >&6
10477
10478 if test "$with_no_leaks" = yes ; then
10479         cat >>confdefs.h <<\EOF
10480 #define NO_LEAKS 1
10481 EOF
10482
10483 fi
10484
10485 cat >>confdefs.h <<\EOF
10486 #define HAVE_NC_ALLOC_H 1
10487 EOF
10488
10489 ###     use option --enable-expanded to generate certain macros as functions
10490
10491 # Check whether --enable-expanded or --disable-expanded was given.
10492 if test "${enable_expanded+set}" = set; then
10493   enableval="$enable_expanded"
10494   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10495 #define NCURSES_EXPANDED 1
10496 EOF
10497
10498 fi;
10499
10500 ###     use option --disable-macros to suppress macros in favor of functions
10501
10502 # Check whether --enable-macros or --disable-macros was given.
10503 if test "${enable_macros+set}" = set; then
10504   enableval="$enable_macros"
10505   test "$enableval" = no && cat >>confdefs.h <<\EOF
10506 #define NCURSES_NOMACROS 1
10507 EOF
10508
10509 fi;
10510
10511 # Normally we only add trace() to the debug-library.  Allow this to be
10512 # extended to all models of the ncurses library:
10513 cf_all_traces=no
10514 case "$CFLAGS $CPPFLAGS" in
10515 *-DTRACE*)
10516         cf_all_traces=yes
10517         ;;
10518 esac
10519
10520 echo "$as_me:10520: checking whether to add trace feature to all models" >&5
10521 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10522
10523 # Check whether --with-trace or --without-trace was given.
10524 if test "${with_trace+set}" = set; then
10525   withval="$with_trace"
10526   cf_with_trace=$withval
10527 else
10528   cf_with_trace=$cf_all_traces
10529 fi;
10530 echo "$as_me:10530: result: $cf_with_trace" >&5
10531 echo "${ECHO_T}$cf_with_trace" >&6
10532
10533 if test "$cf_with_trace" = yes ; then
10534         LIB_TRACING=all
10535         ADA_TRACE=TRUE
10536
10537 cf_fix_cppflags=no
10538 cf_new_cflags=
10539 cf_new_cppflags=
10540 cf_new_extra_cppflags=
10541
10542 for cf_add_cflags in -DTRACE
10543 do
10544 case $cf_fix_cppflags in
10545 no)
10546         case $cf_add_cflags in #(vi
10547         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10548                 case $cf_add_cflags in
10549                 -D*)
10550                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10551
10552                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10553                         && test -z "${cf_tst_cflags}" \
10554                         && cf_fix_cppflags=yes
10555
10556                         if test $cf_fix_cppflags = yes ; then
10557                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10558                                 continue
10559                         elif test "${cf_tst_cflags}" = "\"'" ; then
10560                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10561                                 continue
10562                         fi
10563                         ;;
10564                 esac
10565                 case "$CPPFLAGS" in
10566                 *$cf_add_cflags) #(vi
10567                         ;;
10568                 *) #(vi
10569                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10570                         ;;
10571                 esac
10572                 ;;
10573         *)
10574                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10575                 ;;
10576         esac
10577         ;;
10578 yes)
10579         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10580
10581         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10582
10583         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10584         && test -z "${cf_tst_cflags}" \
10585         && cf_fix_cppflags=no
10586         ;;
10587 esac
10588 done
10589
10590 if test -n "$cf_new_cflags" ; then
10591
10592         CFLAGS="$CFLAGS $cf_new_cflags"
10593 fi
10594
10595 if test -n "$cf_new_cppflags" ; then
10596
10597         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10598 fi
10599
10600 if test -n "$cf_new_extra_cppflags" ; then
10601
10602         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10603 fi
10604
10605 else
10606         LIB_TRACING=DEBUG
10607         ADA_TRACE=FALSE
10608 fi
10609
10610 ###     Checks for libraries.
10611 echo "$as_me:10611: checking for gettimeofday" >&5
10612 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10613 if test "${ac_cv_func_gettimeofday+set}" = set; then
10614   echo $ECHO_N "(cached) $ECHO_C" >&6
10615 else
10616   cat >conftest.$ac_ext <<_ACEOF
10617 #line 10617 "configure"
10618 #include "confdefs.h"
10619 /* System header to define __stub macros and hopefully few prototypes,
10620     which can conflict with char gettimeofday (); below.  */
10621 #include <assert.h>
10622 /* Override any gcc2 internal prototype to avoid an error.  */
10623 #ifdef __cplusplus
10624 extern "C"
10625 #endif
10626 /* We use char because int might match the return type of a gcc2
10627    builtin and then its argument prototype would still apply.  */
10628 char gettimeofday ();
10629 char (*f) ();
10630
10631 int
10632 main ()
10633 {
10634 /* The GNU C library defines this for functions which it implements
10635     to always fail with ENOSYS.  Some functions are actually named
10636     something starting with __ and the normal name is an alias.  */
10637 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10638 choke me
10639 #else
10640 f = gettimeofday;
10641 #endif
10642
10643   ;
10644   return 0;
10645 }
10646 _ACEOF
10647 rm -f conftest.$ac_objext conftest$ac_exeext
10648 if { (eval echo "$as_me:10648: \"$ac_link\"") >&5
10649   (eval $ac_link) 2>&5
10650   ac_status=$?
10651   echo "$as_me:10651: \$? = $ac_status" >&5
10652   (exit $ac_status); } &&
10653          { ac_try='test -s conftest$ac_exeext'
10654   { (eval echo "$as_me:10654: \"$ac_try\"") >&5
10655   (eval $ac_try) 2>&5
10656   ac_status=$?
10657   echo "$as_me:10657: \$? = $ac_status" >&5
10658   (exit $ac_status); }; }; then
10659   ac_cv_func_gettimeofday=yes
10660 else
10661   echo "$as_me: failed program was:" >&5
10662 cat conftest.$ac_ext >&5
10663 ac_cv_func_gettimeofday=no
10664 fi
10665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10666 fi
10667 echo "$as_me:10667: result: $ac_cv_func_gettimeofday" >&5
10668 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10669 if test $ac_cv_func_gettimeofday = yes; then
10670   cat >>confdefs.h <<\EOF
10671 #define HAVE_GETTIMEOFDAY 1
10672 EOF
10673
10674 else
10675
10676 echo "$as_me:10676: checking for gettimeofday in -lbsd" >&5
10677 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10678 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10679   echo $ECHO_N "(cached) $ECHO_C" >&6
10680 else
10681   ac_check_lib_save_LIBS=$LIBS
10682 LIBS="-lbsd  $LIBS"
10683 cat >conftest.$ac_ext <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686
10687 /* Override any gcc2 internal prototype to avoid an error.  */
10688 #ifdef __cplusplus
10689 extern "C"
10690 #endif
10691 /* We use char because int might match the return type of a gcc2
10692    builtin and then its argument prototype would still apply.  */
10693 char gettimeofday ();
10694 int
10695 main ()
10696 {
10697 gettimeofday ();
10698   ;
10699   return 0;
10700 }
10701 _ACEOF
10702 rm -f conftest.$ac_objext conftest$ac_exeext
10703 if { (eval echo "$as_me:10703: \"$ac_link\"") >&5
10704   (eval $ac_link) 2>&5
10705   ac_status=$?
10706   echo "$as_me:10706: \$? = $ac_status" >&5
10707   (exit $ac_status); } &&
10708          { ac_try='test -s conftest$ac_exeext'
10709   { (eval echo "$as_me:10709: \"$ac_try\"") >&5
10710   (eval $ac_try) 2>&5
10711   ac_status=$?
10712   echo "$as_me:10712: \$? = $ac_status" >&5
10713   (exit $ac_status); }; }; then
10714   ac_cv_lib_bsd_gettimeofday=yes
10715 else
10716   echo "$as_me: failed program was:" >&5
10717 cat conftest.$ac_ext >&5
10718 ac_cv_lib_bsd_gettimeofday=no
10719 fi
10720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10721 LIBS=$ac_check_lib_save_LIBS
10722 fi
10723 echo "$as_me:10723: result: $ac_cv_lib_bsd_gettimeofday" >&5
10724 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10725 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10726   cat >>confdefs.h <<\EOF
10727 #define HAVE_GETTIMEOFDAY 1
10728 EOF
10729
10730         LIBS="$LIBS -lbsd"
10731 fi
10732
10733 fi
10734
10735 echo "$as_me:10735: checking if -lm needed for math functions" >&5
10736 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10737 if test "${cf_cv_need_libm+set}" = set; then
10738   echo $ECHO_N "(cached) $ECHO_C" >&6
10739 else
10740
10741         cat >conftest.$ac_ext <<_ACEOF
10742 #line 10742 "configure"
10743 #include "confdefs.h"
10744
10745         #include <stdio.h>
10746         #include <math.h>
10747
10748 int
10749 main ()
10750 {
10751 double x = rand(); printf("result = %g\n", sin(x))
10752   ;
10753   return 0;
10754 }
10755 _ACEOF
10756 rm -f conftest.$ac_objext conftest$ac_exeext
10757 if { (eval echo "$as_me:10757: \"$ac_link\"") >&5
10758   (eval $ac_link) 2>&5
10759   ac_status=$?
10760   echo "$as_me:10760: \$? = $ac_status" >&5
10761   (exit $ac_status); } &&
10762          { ac_try='test -s conftest$ac_exeext'
10763   { (eval echo "$as_me:10763: \"$ac_try\"") >&5
10764   (eval $ac_try) 2>&5
10765   ac_status=$?
10766   echo "$as_me:10766: \$? = $ac_status" >&5
10767   (exit $ac_status); }; }; then
10768   cf_cv_need_libm=no
10769 else
10770   echo "$as_me: failed program was:" >&5
10771 cat conftest.$ac_ext >&5
10772 cf_cv_need_libm=yes
10773 fi
10774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10775 fi
10776 echo "$as_me:10776: result: $cf_cv_need_libm" >&5
10777 echo "${ECHO_T}$cf_cv_need_libm" >&6
10778 if test "$cf_cv_need_libm" = yes
10779 then
10780 MATH_LIB=-lm
10781 fi
10782
10783 ###     Checks for header files.
10784 echo "$as_me:10784: checking for ANSI C header files" >&5
10785 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10786 if test "${ac_cv_header_stdc+set}" = set; then
10787   echo $ECHO_N "(cached) $ECHO_C" >&6
10788 else
10789   cat >conftest.$ac_ext <<_ACEOF
10790 #line 10790 "configure"
10791 #include "confdefs.h"
10792 #include <stdlib.h>
10793 #include <stdarg.h>
10794 #include <string.h>
10795 #include <float.h>
10796
10797 _ACEOF
10798 if { (eval echo "$as_me:10798: \"$ac_cpp conftest.$ac_ext\"") >&5
10799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10800   ac_status=$?
10801   egrep -v '^ *\+' conftest.er1 >conftest.err
10802   rm -f conftest.er1
10803   cat conftest.err >&5
10804   echo "$as_me:10804: \$? = $ac_status" >&5
10805   (exit $ac_status); } >/dev/null; then
10806   if test -s conftest.err; then
10807     ac_cpp_err=$ac_c_preproc_warn_flag
10808   else
10809     ac_cpp_err=
10810   fi
10811 else
10812   ac_cpp_err=yes
10813 fi
10814 if test -z "$ac_cpp_err"; then
10815   ac_cv_header_stdc=yes
10816 else
10817   echo "$as_me: failed program was:" >&5
10818   cat conftest.$ac_ext >&5
10819   ac_cv_header_stdc=no
10820 fi
10821 rm -f conftest.err conftest.$ac_ext
10822
10823 if test $ac_cv_header_stdc = yes; then
10824   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10825   cat >conftest.$ac_ext <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10828 #include <string.h>
10829
10830 _ACEOF
10831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10832   egrep "memchr" >/dev/null 2>&1; then
10833   :
10834 else
10835   ac_cv_header_stdc=no
10836 fi
10837 rm -f conftest*
10838
10839 fi
10840
10841 if test $ac_cv_header_stdc = yes; then
10842   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10843   cat >conftest.$ac_ext <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846 #include <stdlib.h>
10847
10848 _ACEOF
10849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10850   egrep "free" >/dev/null 2>&1; then
10851   :
10852 else
10853   ac_cv_header_stdc=no
10854 fi
10855 rm -f conftest*
10856
10857 fi
10858
10859 if test $ac_cv_header_stdc = yes; then
10860   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10861   if test "$cross_compiling" = yes; then
10862   :
10863 else
10864   cat >conftest.$ac_ext <<_ACEOF
10865 #line 10865 "configure"
10866 #include "confdefs.h"
10867 #include <ctype.h>
10868 #if ((' ' & 0x0FF) == 0x020)
10869 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10870 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10871 #else
10872 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10873                      || ('j' <= (c) && (c) <= 'r') \
10874                      || ('s' <= (c) && (c) <= 'z'))
10875 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10876 #endif
10877
10878 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10879 int
10880 main ()
10881 {
10882   int i;
10883   for (i = 0; i < 256; i++)
10884     if (XOR (islower (i), ISLOWER (i))
10885         || toupper (i) != TOUPPER (i))
10886       $ac_main_return(2);
10887   $ac_main_return (0);
10888 }
10889 _ACEOF
10890 rm -f conftest$ac_exeext
10891 if { (eval echo "$as_me:10891: \"$ac_link\"") >&5
10892   (eval $ac_link) 2>&5
10893   ac_status=$?
10894   echo "$as_me:10894: \$? = $ac_status" >&5
10895   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10896   { (eval echo "$as_me:10896: \"$ac_try\"") >&5
10897   (eval $ac_try) 2>&5
10898   ac_status=$?
10899   echo "$as_me:10899: \$? = $ac_status" >&5
10900   (exit $ac_status); }; }; then
10901   :
10902 else
10903   echo "$as_me: program exited with status $ac_status" >&5
10904 echo "$as_me: failed program was:" >&5
10905 cat conftest.$ac_ext >&5
10906 ac_cv_header_stdc=no
10907 fi
10908 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10909 fi
10910 fi
10911 fi
10912 echo "$as_me:10912: result: $ac_cv_header_stdc" >&5
10913 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10914 if test $ac_cv_header_stdc = yes; then
10915
10916 cat >>confdefs.h <<\EOF
10917 #define STDC_HEADERS 1
10918 EOF
10919
10920 fi
10921
10922 ac_header_dirent=no
10923 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10924   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10925 echo "$as_me:10925: checking for $ac_hdr that defines DIR" >&5
10926 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10927 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10928   echo $ECHO_N "(cached) $ECHO_C" >&6
10929 else
10930   cat >conftest.$ac_ext <<_ACEOF
10931 #line 10931 "configure"
10932 #include "confdefs.h"
10933 #include <sys/types.h>
10934 #include <$ac_hdr>
10935
10936 int
10937 main ()
10938 {
10939 if ((DIR *) 0)
10940 return 0;
10941   ;
10942   return 0;
10943 }
10944 _ACEOF
10945 rm -f conftest.$ac_objext
10946 if { (eval echo "$as_me:10946: \"$ac_compile\"") >&5
10947   (eval $ac_compile) 2>&5
10948   ac_status=$?
10949   echo "$as_me:10949: \$? = $ac_status" >&5
10950   (exit $ac_status); } &&
10951          { ac_try='test -s conftest.$ac_objext'
10952   { (eval echo "$as_me:10952: \"$ac_try\"") >&5
10953   (eval $ac_try) 2>&5
10954   ac_status=$?
10955   echo "$as_me:10955: \$? = $ac_status" >&5
10956   (exit $ac_status); }; }; then
10957   eval "$as_ac_Header=yes"
10958 else
10959   echo "$as_me: failed program was:" >&5
10960 cat conftest.$ac_ext >&5
10961 eval "$as_ac_Header=no"
10962 fi
10963 rm -f conftest.$ac_objext conftest.$ac_ext
10964 fi
10965 echo "$as_me:10965: result: `eval echo '${'$as_ac_Header'}'`" >&5
10966 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10967 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10968   cat >>confdefs.h <<EOF
10969 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10970 EOF
10971
10972 ac_header_dirent=$ac_hdr; break
10973 fi
10974
10975 done
10976 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10977 if test $ac_header_dirent = dirent.h; then
10978   echo "$as_me:10978: checking for opendir in -ldir" >&5
10979 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10980 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10981   echo $ECHO_N "(cached) $ECHO_C" >&6
10982 else
10983   ac_check_lib_save_LIBS=$LIBS
10984 LIBS="-ldir  $LIBS"
10985 cat >conftest.$ac_ext <<_ACEOF
10986 #line 10986 "configure"
10987 #include "confdefs.h"
10988
10989 /* Override any gcc2 internal prototype to avoid an error.  */
10990 #ifdef __cplusplus
10991 extern "C"
10992 #endif
10993 /* We use char because int might match the return type of a gcc2
10994    builtin and then its argument prototype would still apply.  */
10995 char opendir ();
10996 int
10997 main ()
10998 {
10999 opendir ();
11000   ;
11001   return 0;
11002 }
11003 _ACEOF
11004 rm -f conftest.$ac_objext conftest$ac_exeext
11005 if { (eval echo "$as_me:11005: \"$ac_link\"") >&5
11006   (eval $ac_link) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); } &&
11010          { ac_try='test -s conftest$ac_exeext'
11011   { (eval echo "$as_me:11011: \"$ac_try\"") >&5
11012   (eval $ac_try) 2>&5
11013   ac_status=$?
11014   echo "$as_me:11014: \$? = $ac_status" >&5
11015   (exit $ac_status); }; }; then
11016   ac_cv_lib_dir_opendir=yes
11017 else
11018   echo "$as_me: failed program was:" >&5
11019 cat conftest.$ac_ext >&5
11020 ac_cv_lib_dir_opendir=no
11021 fi
11022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11023 LIBS=$ac_check_lib_save_LIBS
11024 fi
11025 echo "$as_me:11025: result: $ac_cv_lib_dir_opendir" >&5
11026 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11027 if test $ac_cv_lib_dir_opendir = yes; then
11028   LIBS="$LIBS -ldir"
11029 fi
11030
11031 else
11032   echo "$as_me:11032: checking for opendir in -lx" >&5
11033 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11034 if test "${ac_cv_lib_x_opendir+set}" = set; then
11035   echo $ECHO_N "(cached) $ECHO_C" >&6
11036 else
11037   ac_check_lib_save_LIBS=$LIBS
11038 LIBS="-lx  $LIBS"
11039 cat >conftest.$ac_ext <<_ACEOF
11040 #line 11040 "configure"
11041 #include "confdefs.h"
11042
11043 /* Override any gcc2 internal prototype to avoid an error.  */
11044 #ifdef __cplusplus
11045 extern "C"
11046 #endif
11047 /* We use char because int might match the return type of a gcc2
11048    builtin and then its argument prototype would still apply.  */
11049 char opendir ();
11050 int
11051 main ()
11052 {
11053 opendir ();
11054   ;
11055   return 0;
11056 }
11057 _ACEOF
11058 rm -f conftest.$ac_objext conftest$ac_exeext
11059 if { (eval echo "$as_me:11059: \"$ac_link\"") >&5
11060   (eval $ac_link) 2>&5
11061   ac_status=$?
11062   echo "$as_me:11062: \$? = $ac_status" >&5
11063   (exit $ac_status); } &&
11064          { ac_try='test -s conftest$ac_exeext'
11065   { (eval echo "$as_me:11065: \"$ac_try\"") >&5
11066   (eval $ac_try) 2>&5
11067   ac_status=$?
11068   echo "$as_me:11068: \$? = $ac_status" >&5
11069   (exit $ac_status); }; }; then
11070   ac_cv_lib_x_opendir=yes
11071 else
11072   echo "$as_me: failed program was:" >&5
11073 cat conftest.$ac_ext >&5
11074 ac_cv_lib_x_opendir=no
11075 fi
11076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11077 LIBS=$ac_check_lib_save_LIBS
11078 fi
11079 echo "$as_me:11079: result: $ac_cv_lib_x_opendir" >&5
11080 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11081 if test $ac_cv_lib_x_opendir = yes; then
11082   LIBS="$LIBS -lx"
11083 fi
11084
11085 fi
11086
11087 echo "$as_me:11087: checking whether time.h and sys/time.h may both be included" >&5
11088 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11089 if test "${ac_cv_header_time+set}" = set; then
11090   echo $ECHO_N "(cached) $ECHO_C" >&6
11091 else
11092   cat >conftest.$ac_ext <<_ACEOF
11093 #line 11093 "configure"
11094 #include "confdefs.h"
11095 #include <sys/types.h>
11096 #include <sys/time.h>
11097 #include <time.h>
11098
11099 int
11100 main ()
11101 {
11102 if ((struct tm *) 0)
11103 return 0;
11104   ;
11105   return 0;
11106 }
11107 _ACEOF
11108 rm -f conftest.$ac_objext
11109 if { (eval echo "$as_me:11109: \"$ac_compile\"") >&5
11110   (eval $ac_compile) 2>&5
11111   ac_status=$?
11112   echo "$as_me:11112: \$? = $ac_status" >&5
11113   (exit $ac_status); } &&
11114          { ac_try='test -s conftest.$ac_objext'
11115   { (eval echo "$as_me:11115: \"$ac_try\"") >&5
11116   (eval $ac_try) 2>&5
11117   ac_status=$?
11118   echo "$as_me:11118: \$? = $ac_status" >&5
11119   (exit $ac_status); }; }; then
11120   ac_cv_header_time=yes
11121 else
11122   echo "$as_me: failed program was:" >&5
11123 cat conftest.$ac_ext >&5
11124 ac_cv_header_time=no
11125 fi
11126 rm -f conftest.$ac_objext conftest.$ac_ext
11127 fi
11128 echo "$as_me:11128: result: $ac_cv_header_time" >&5
11129 echo "${ECHO_T}$ac_cv_header_time" >&6
11130 if test $ac_cv_header_time = yes; then
11131
11132 cat >>confdefs.h <<\EOF
11133 #define TIME_WITH_SYS_TIME 1
11134 EOF
11135
11136 fi
11137
11138 echo "$as_me:11138: checking for regular-expression headers" >&5
11139 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11140 if test "${cf_cv_regex+set}" = set; then
11141   echo $ECHO_N "(cached) $ECHO_C" >&6
11142 else
11143
11144 cat >conftest.$ac_ext <<_ACEOF
11145 #line 11145 "configure"
11146 #include "confdefs.h"
11147 #include <sys/types.h>
11148 #include <regex.h>
11149 int
11150 main ()
11151 {
11152
11153         regex_t *p;
11154         int x = regcomp(p, "", 0);
11155         int y = regexec(p, "", 0, 0, 0);
11156         regfree(p);
11157
11158   ;
11159   return 0;
11160 }
11161 _ACEOF
11162 rm -f conftest.$ac_objext conftest$ac_exeext
11163 if { (eval echo "$as_me:11163: \"$ac_link\"") >&5
11164   (eval $ac_link) 2>&5
11165   ac_status=$?
11166   echo "$as_me:11166: \$? = $ac_status" >&5
11167   (exit $ac_status); } &&
11168          { ac_try='test -s conftest$ac_exeext'
11169   { (eval echo "$as_me:11169: \"$ac_try\"") >&5
11170   (eval $ac_try) 2>&5
11171   ac_status=$?
11172   echo "$as_me:11172: \$? = $ac_status" >&5
11173   (exit $ac_status); }; }; then
11174   cf_cv_regex="regex.h"
11175 else
11176   echo "$as_me: failed program was:" >&5
11177 cat conftest.$ac_ext >&5
11178
11179         cat >conftest.$ac_ext <<_ACEOF
11180 #line 11180 "configure"
11181 #include "confdefs.h"
11182 #include <regexp.h>
11183 int
11184 main ()
11185 {
11186
11187                 char *p = compile("", "", "", 0);
11188                 int x = step("", "");
11189
11190   ;
11191   return 0;
11192 }
11193 _ACEOF
11194 rm -f conftest.$ac_objext conftest$ac_exeext
11195 if { (eval echo "$as_me:11195: \"$ac_link\"") >&5
11196   (eval $ac_link) 2>&5
11197   ac_status=$?
11198   echo "$as_me:11198: \$? = $ac_status" >&5
11199   (exit $ac_status); } &&
11200          { ac_try='test -s conftest$ac_exeext'
11201   { (eval echo "$as_me:11201: \"$ac_try\"") >&5
11202   (eval $ac_try) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit $ac_status); }; }; then
11206   cf_cv_regex="regexp.h"
11207 else
11208   echo "$as_me: failed program was:" >&5
11209 cat conftest.$ac_ext >&5
11210
11211                 cf_save_LIBS="$LIBS"
11212                 LIBS="-lgen $LIBS"
11213                 cat >conftest.$ac_ext <<_ACEOF
11214 #line 11214 "configure"
11215 #include "confdefs.h"
11216 #include <regexpr.h>
11217 int
11218 main ()
11219 {
11220
11221                         char *p = compile("", "", "");
11222                         int x = step("", "");
11223
11224   ;
11225   return 0;
11226 }
11227 _ACEOF
11228 rm -f conftest.$ac_objext conftest$ac_exeext
11229 if { (eval echo "$as_me:11229: \"$ac_link\"") >&5
11230   (eval $ac_link) 2>&5
11231   ac_status=$?
11232   echo "$as_me:11232: \$? = $ac_status" >&5
11233   (exit $ac_status); } &&
11234          { ac_try='test -s conftest$ac_exeext'
11235   { (eval echo "$as_me:11235: \"$ac_try\"") >&5
11236   (eval $ac_try) 2>&5
11237   ac_status=$?
11238   echo "$as_me:11238: \$? = $ac_status" >&5
11239   (exit $ac_status); }; }; then
11240   cf_cv_regex="regexpr.h"
11241 else
11242   echo "$as_me: failed program was:" >&5
11243 cat conftest.$ac_ext >&5
11244 LIBS="$cf_save_LIBS"
11245 fi
11246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11247 fi
11248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11249 fi
11250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11251
11252 fi
11253
11254 echo "$as_me:11254: result: $cf_cv_regex" >&5
11255 echo "${ECHO_T}$cf_cv_regex" >&6
11256 case $cf_cv_regex in
11257         regex.h)   cat >>confdefs.h <<\EOF
11258 #define HAVE_REGEX_H_FUNCS 1
11259 EOF
11260  ;;
11261         regexp.h)  cat >>confdefs.h <<\EOF
11262 #define HAVE_REGEXP_H_FUNCS 1
11263 EOF
11264  ;;
11265         regexpr.h) cat >>confdefs.h <<\EOF
11266 #define HAVE_REGEXPR_H_FUNCS 1
11267 EOF
11268  ;;
11269 esac
11270
11271 for ac_header in \
11272 fcntl.h \
11273 getopt.h \
11274 limits.h \
11275 locale.h \
11276 poll.h \
11277 sys/bsdtypes.h \
11278 sys/ioctl.h \
11279 sys/param.h \
11280 sys/poll.h \
11281 sys/select.h \
11282 sys/time.h \
11283 sys/times.h \
11284 ttyent.h \
11285 unistd.h \
11286 wctype.h \
11287
11288 do
11289 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11290 echo "$as_me:11290: checking for $ac_header" >&5
11291 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11292 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11293   echo $ECHO_N "(cached) $ECHO_C" >&6
11294 else
11295   cat >conftest.$ac_ext <<_ACEOF
11296 #line 11296 "configure"
11297 #include "confdefs.h"
11298 #include <$ac_header>
11299 _ACEOF
11300 if { (eval echo "$as_me:11300: \"$ac_cpp conftest.$ac_ext\"") >&5
11301   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11302   ac_status=$?
11303   egrep -v '^ *\+' conftest.er1 >conftest.err
11304   rm -f conftest.er1
11305   cat conftest.err >&5
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit $ac_status); } >/dev/null; then
11308   if test -s conftest.err; then
11309     ac_cpp_err=$ac_c_preproc_warn_flag
11310   else
11311     ac_cpp_err=
11312   fi
11313 else
11314   ac_cpp_err=yes
11315 fi
11316 if test -z "$ac_cpp_err"; then
11317   eval "$as_ac_Header=yes"
11318 else
11319   echo "$as_me: failed program was:" >&5
11320   cat conftest.$ac_ext >&5
11321   eval "$as_ac_Header=no"
11322 fi
11323 rm -f conftest.err conftest.$ac_ext
11324 fi
11325 echo "$as_me:11325: result: `eval echo '${'$as_ac_Header'}'`" >&5
11326 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11327 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11328   cat >>confdefs.h <<EOF
11329 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11330 EOF
11331
11332 fi
11333 done
11334
11335 # check for ISC (this may also define _POSIX_SOURCE)
11336 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11337 if test "$ISC" = yes ; then
11338
11339 echo "$as_me:11339: checking for main in -lcposix" >&5
11340 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11341 if test "${ac_cv_lib_cposix_main+set}" = set; then
11342   echo $ECHO_N "(cached) $ECHO_C" >&6
11343 else
11344   ac_check_lib_save_LIBS=$LIBS
11345 LIBS="-lcposix  $LIBS"
11346 cat >conftest.$ac_ext <<_ACEOF
11347 #line 11347 "configure"
11348 #include "confdefs.h"
11349
11350 int
11351 main ()
11352 {
11353 main ();
11354   ;
11355   return 0;
11356 }
11357 _ACEOF
11358 rm -f conftest.$ac_objext conftest$ac_exeext
11359 if { (eval echo "$as_me:11359: \"$ac_link\"") >&5
11360   (eval $ac_link) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); } &&
11364          { ac_try='test -s conftest$ac_exeext'
11365   { (eval echo "$as_me:11365: \"$ac_try\"") >&5
11366   (eval $ac_try) 2>&5
11367   ac_status=$?
11368   echo "$as_me:11368: \$? = $ac_status" >&5
11369   (exit $ac_status); }; }; then
11370   ac_cv_lib_cposix_main=yes
11371 else
11372   echo "$as_me: failed program was:" >&5
11373 cat conftest.$ac_ext >&5
11374 ac_cv_lib_cposix_main=no
11375 fi
11376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11377 LIBS=$ac_check_lib_save_LIBS
11378 fi
11379 echo "$as_me:11379: result: $ac_cv_lib_cposix_main" >&5
11380 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11381 if test $ac_cv_lib_cposix_main = yes; then
11382   cat >>confdefs.h <<EOF
11383 #define HAVE_LIBCPOSIX 1
11384 EOF
11385
11386   LIBS="-lcposix $LIBS"
11387
11388 fi
11389
11390         echo "$as_me:11390: checking for bzero in -linet" >&5
11391 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11392 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11393   echo $ECHO_N "(cached) $ECHO_C" >&6
11394 else
11395   ac_check_lib_save_LIBS=$LIBS
11396 LIBS="-linet  $LIBS"
11397 cat >conftest.$ac_ext <<_ACEOF
11398 #line 11398 "configure"
11399 #include "confdefs.h"
11400
11401 /* Override any gcc2 internal prototype to avoid an error.  */
11402 #ifdef __cplusplus
11403 extern "C"
11404 #endif
11405 /* We use char because int might match the return type of a gcc2
11406    builtin and then its argument prototype would still apply.  */
11407 char bzero ();
11408 int
11409 main ()
11410 {
11411 bzero ();
11412   ;
11413   return 0;
11414 }
11415 _ACEOF
11416 rm -f conftest.$ac_objext conftest$ac_exeext
11417 if { (eval echo "$as_me:11417: \"$ac_link\"") >&5
11418   (eval $ac_link) 2>&5
11419   ac_status=$?
11420   echo "$as_me:11420: \$? = $ac_status" >&5
11421   (exit $ac_status); } &&
11422          { ac_try='test -s conftest$ac_exeext'
11423   { (eval echo "$as_me:11423: \"$ac_try\"") >&5
11424   (eval $ac_try) 2>&5
11425   ac_status=$?
11426   echo "$as_me:11426: \$? = $ac_status" >&5
11427   (exit $ac_status); }; }; then
11428   ac_cv_lib_inet_bzero=yes
11429 else
11430   echo "$as_me: failed program was:" >&5
11431 cat conftest.$ac_ext >&5
11432 ac_cv_lib_inet_bzero=no
11433 fi
11434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11435 LIBS=$ac_check_lib_save_LIBS
11436 fi
11437 echo "$as_me:11437: result: $ac_cv_lib_inet_bzero" >&5
11438 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11439 if test $ac_cv_lib_inet_bzero = yes; then
11440   LIBS="$LIBS -linet"
11441 fi
11442 fi
11443
11444 echo "$as_me:11444: checking if sys/time.h works with sys/select.h" >&5
11445 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11446 if test "${cf_cv_sys_time_select+set}" = set; then
11447   echo $ECHO_N "(cached) $ECHO_C" >&6
11448 else
11449
11450 cat >conftest.$ac_ext <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11453
11454 #include <sys/types.h>
11455 #ifdef HAVE_SYS_TIME_H
11456 #include <sys/time.h>
11457 #endif
11458 #ifdef HAVE_SYS_SELECT_H
11459 #include <sys/select.h>
11460 #endif
11461
11462 int
11463 main ()
11464 {
11465
11466   ;
11467   return 0;
11468 }
11469 _ACEOF
11470 rm -f conftest.$ac_objext
11471 if { (eval echo "$as_me:11471: \"$ac_compile\"") >&5
11472   (eval $ac_compile) 2>&5
11473   ac_status=$?
11474   echo "$as_me:11474: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -s conftest.$ac_objext'
11477   { (eval echo "$as_me:11477: \"$ac_try\"") >&5
11478   (eval $ac_try) 2>&5
11479   ac_status=$?
11480   echo "$as_me:11480: \$? = $ac_status" >&5
11481   (exit $ac_status); }; }; then
11482   cf_cv_sys_time_select=yes
11483 else
11484   echo "$as_me: failed program was:" >&5
11485 cat conftest.$ac_ext >&5
11486 cf_cv_sys_time_select=no
11487 fi
11488 rm -f conftest.$ac_objext conftest.$ac_ext
11489
11490 fi
11491
11492 echo "$as_me:11492: result: $cf_cv_sys_time_select" >&5
11493 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11494 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11495 #define HAVE_SYS_TIME_SELECT 1
11496 EOF
11497
11498 ###     checks for compiler characteristics
11499 ac_ext=c
11500 ac_cpp='$CPP $CPPFLAGS'
11501 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11502 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11504 ac_main_return=return
11505
11506 echo "$as_me:11506: checking for $CC option to accept ANSI C" >&5
11507 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11508 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11509   echo $ECHO_N "(cached) $ECHO_C" >&6
11510 else
11511   ac_cv_prog_cc_stdc=no
11512 ac_save_CC=$CC
11513 cat >conftest.$ac_ext <<_ACEOF
11514 #line 11514 "configure"
11515 #include "confdefs.h"
11516 #include <stdarg.h>
11517 #include <stdio.h>
11518 #include <sys/types.h>
11519 #include <sys/stat.h>
11520 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11521 struct buf { int x; };
11522 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11523 static char *e (p, i)
11524      char **p;
11525      int i;
11526 {
11527   return p[i];
11528 }
11529 static char *f (char * (*g) (char **, int), char **p, ...)
11530 {
11531   char *s;
11532   va_list v;
11533   va_start (v,p);
11534   s = g (p, va_arg (v,int));
11535   va_end (v);
11536   return s;
11537 }
11538 int test (int i, double x);
11539 struct s1 {int (*f) (int a);};
11540 struct s2 {int (*f) (double a);};
11541 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11542 int argc;
11543 char **argv;
11544 int
11545 main ()
11546 {
11547 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11548   ;
11549   return 0;
11550 }
11551 _ACEOF
11552 # Don't try gcc -ansi; that turns off useful extensions and
11553 # breaks some systems' header files.
11554 # AIX                   -qlanglvl=ansi
11555 # Ultrix and OSF/1      -std1
11556 # HP-UX 10.20 and later -Ae
11557 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11558 # SVR4                  -Xc -D__EXTENSIONS__
11559 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11560 do
11561   CC="$ac_save_CC $ac_arg"
11562   rm -f conftest.$ac_objext
11563 if { (eval echo "$as_me:11563: \"$ac_compile\"") >&5
11564   (eval $ac_compile) 2>&5
11565   ac_status=$?
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit $ac_status); } &&
11568          { ac_try='test -s conftest.$ac_objext'
11569   { (eval echo "$as_me:11569: \"$ac_try\"") >&5
11570   (eval $ac_try) 2>&5
11571   ac_status=$?
11572   echo "$as_me:11572: \$? = $ac_status" >&5
11573   (exit $ac_status); }; }; then
11574   ac_cv_prog_cc_stdc=$ac_arg
11575 break
11576 else
11577   echo "$as_me: failed program was:" >&5
11578 cat conftest.$ac_ext >&5
11579 fi
11580 rm -f conftest.$ac_objext
11581 done
11582 rm -f conftest.$ac_ext conftest.$ac_objext
11583 CC=$ac_save_CC
11584
11585 fi
11586
11587 case "x$ac_cv_prog_cc_stdc" in
11588   x|xno)
11589     echo "$as_me:11589: result: none needed" >&5
11590 echo "${ECHO_T}none needed" >&6 ;;
11591   *)
11592     echo "$as_me:11592: result: $ac_cv_prog_cc_stdc" >&5
11593 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11594     CC="$CC $ac_cv_prog_cc_stdc" ;;
11595 esac
11596
11597 echo "$as_me:11597: checking for an ANSI C-conforming const" >&5
11598 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11599 if test "${ac_cv_c_const+set}" = set; then
11600   echo $ECHO_N "(cached) $ECHO_C" >&6
11601 else
11602   cat >conftest.$ac_ext <<_ACEOF
11603 #line 11603 "configure"
11604 #include "confdefs.h"
11605
11606 int
11607 main ()
11608 {
11609 /* FIXME: Include the comments suggested by Paul. */
11610 #ifndef __cplusplus
11611   /* Ultrix mips cc rejects this.  */
11612   typedef int charset[2];
11613   const charset x;
11614   /* SunOS 4.1.1 cc rejects this.  */
11615   char const *const *ccp;
11616   char **p;
11617   /* NEC SVR4.0.2 mips cc rejects this.  */
11618   struct point {int x, y;};
11619   static struct point const zero = {0,0};
11620   /* AIX XL C 1.02.0.0 rejects this.
11621      It does not let you subtract one const X* pointer from another in
11622      an arm of an if-expression whose if-part is not a constant
11623      expression */
11624   const char *g = "string";
11625   ccp = &g + (g ? g-g : 0);
11626   /* HPUX 7.0 cc rejects these. */
11627   ++ccp;
11628   p = (char**) ccp;
11629   ccp = (char const *const *) p;
11630   { /* SCO 3.2v4 cc rejects this.  */
11631     char *t;
11632     char const *s = 0 ? (char *) 0 : (char const *) 0;
11633
11634     *t++ = 0;
11635   }
11636   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11637     int x[] = {25, 17};
11638     const int *foo = &x[0];
11639     ++foo;
11640   }
11641   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11642     typedef const int *iptr;
11643     iptr p = 0;
11644     ++p;
11645   }
11646   { /* AIX XL C 1.02.0.0 rejects this saying
11647        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11648     struct s { int j; const int *ap[3]; };
11649     struct s *b; b->j = 5;
11650   }
11651   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11652     const int foo = 10;
11653   }
11654 #endif
11655
11656   ;
11657   return 0;
11658 }
11659 _ACEOF
11660 rm -f conftest.$ac_objext
11661 if { (eval echo "$as_me:11661: \"$ac_compile\"") >&5
11662   (eval $ac_compile) 2>&5
11663   ac_status=$?
11664   echo "$as_me:11664: \$? = $ac_status" >&5
11665   (exit $ac_status); } &&
11666          { ac_try='test -s conftest.$ac_objext'
11667   { (eval echo "$as_me:11667: \"$ac_try\"") >&5
11668   (eval $ac_try) 2>&5
11669   ac_status=$?
11670   echo "$as_me:11670: \$? = $ac_status" >&5
11671   (exit $ac_status); }; }; then
11672   ac_cv_c_const=yes
11673 else
11674   echo "$as_me: failed program was:" >&5
11675 cat conftest.$ac_ext >&5
11676 ac_cv_c_const=no
11677 fi
11678 rm -f conftest.$ac_objext conftest.$ac_ext
11679 fi
11680 echo "$as_me:11680: result: $ac_cv_c_const" >&5
11681 echo "${ECHO_T}$ac_cv_c_const" >&6
11682 if test $ac_cv_c_const = no; then
11683
11684 cat >>confdefs.h <<\EOF
11685 #define const
11686 EOF
11687
11688 fi
11689
11690 echo "$as_me:11690: checking for inline" >&5
11691 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11692 if test "${ac_cv_c_inline+set}" = set; then
11693   echo $ECHO_N "(cached) $ECHO_C" >&6
11694 else
11695   ac_cv_c_inline=no
11696 for ac_kw in inline __inline__ __inline; do
11697   cat >conftest.$ac_ext <<_ACEOF
11698 #line 11698 "configure"
11699 #include "confdefs.h"
11700 #ifndef __cplusplus
11701 static $ac_kw int static_foo () {return 0; }
11702 $ac_kw int foo () {return 0; }
11703 #endif
11704
11705 _ACEOF
11706 rm -f conftest.$ac_objext
11707 if { (eval echo "$as_me:11707: \"$ac_compile\"") >&5
11708   (eval $ac_compile) 2>&5
11709   ac_status=$?
11710   echo "$as_me:11710: \$? = $ac_status" >&5
11711   (exit $ac_status); } &&
11712          { ac_try='test -s conftest.$ac_objext'
11713   { (eval echo "$as_me:11713: \"$ac_try\"") >&5
11714   (eval $ac_try) 2>&5
11715   ac_status=$?
11716   echo "$as_me:11716: \$? = $ac_status" >&5
11717   (exit $ac_status); }; }; then
11718   ac_cv_c_inline=$ac_kw; break
11719 else
11720   echo "$as_me: failed program was:" >&5
11721 cat conftest.$ac_ext >&5
11722 fi
11723 rm -f conftest.$ac_objext conftest.$ac_ext
11724 done
11725
11726 fi
11727 echo "$as_me:11727: result: $ac_cv_c_inline" >&5
11728 echo "${ECHO_T}$ac_cv_c_inline" >&6
11729 case $ac_cv_c_inline in
11730   inline | yes) ;;
11731   no)
11732 cat >>confdefs.h <<\EOF
11733 #define inline
11734 EOF
11735  ;;
11736   *)  cat >>confdefs.h <<EOF
11737 #define inline $ac_cv_c_inline
11738 EOF
11739  ;;
11740 esac
11741
11742 NCURSES_INLINE=
11743 if test "$ac_cv_c_inline" != no ; then
11744   NCURSES_INLINE=inline
11745   if test "$INTEL_COMPILER" = yes
11746   then
11747     :
11748   elif test "$GCC" = yes
11749   then
11750     echo "$as_me:11750: checking if gcc supports options to tune inlining" >&5
11751 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11752 if test "${cf_cv_gcc_inline+set}" = set; then
11753   echo $ECHO_N "(cached) $ECHO_C" >&6
11754 else
11755
11756       cf_save_CFLAGS=$CFLAGS
11757       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11758       cat >conftest.$ac_ext <<_ACEOF
11759 #line 11759 "configure"
11760 #include "confdefs.h"
11761 inline int foo(void) { return 1; }
11762 int
11763 main ()
11764 {
11765 ${cf_cv_main_return:-return} foo()
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 rm -f conftest.$ac_objext
11771 if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5
11772   (eval $ac_compile) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); } &&
11776          { ac_try='test -s conftest.$ac_objext'
11777   { (eval echo "$as_me:11777: \"$ac_try\"") >&5
11778   (eval $ac_try) 2>&5
11779   ac_status=$?
11780   echo "$as_me:11780: \$? = $ac_status" >&5
11781   (exit $ac_status); }; }; then
11782   cf_cv_gcc_inline=yes
11783 else
11784   echo "$as_me: failed program was:" >&5
11785 cat conftest.$ac_ext >&5
11786 cf_cv_gcc_inline=no
11787 fi
11788 rm -f conftest.$ac_objext conftest.$ac_ext
11789       CFLAGS=$cf_save_CFLAGS
11790
11791 fi
11792 echo "$as_me:11792: result: $cf_cv_gcc_inline" >&5
11793 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11794     if test "$cf_cv_gcc_inline" = yes ; then
11795
11796 cf_fix_cppflags=no
11797 cf_new_cflags=
11798 cf_new_cppflags=
11799 cf_new_extra_cppflags=
11800
11801 for cf_add_cflags in --param max-inline-insns-single=1200
11802 do
11803 case $cf_fix_cppflags in
11804 no)
11805         case $cf_add_cflags in #(vi
11806         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11807                 case $cf_add_cflags in
11808                 -D*)
11809                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11810
11811                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11812                         && test -z "${cf_tst_cflags}" \
11813                         && cf_fix_cppflags=yes
11814
11815                         if test $cf_fix_cppflags = yes ; then
11816                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11817                                 continue
11818                         elif test "${cf_tst_cflags}" = "\"'" ; then
11819                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11820                                 continue
11821                         fi
11822                         ;;
11823                 esac
11824                 case "$CPPFLAGS" in
11825                 *$cf_add_cflags) #(vi
11826                         ;;
11827                 *) #(vi
11828                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11829                         ;;
11830                 esac
11831                 ;;
11832         *)
11833                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11834                 ;;
11835         esac
11836         ;;
11837 yes)
11838         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11839
11840         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11841
11842         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11843         && test -z "${cf_tst_cflags}" \
11844         && cf_fix_cppflags=no
11845         ;;
11846 esac
11847 done
11848
11849 if test -n "$cf_new_cflags" ; then
11850
11851         CFLAGS="$CFLAGS $cf_new_cflags"
11852 fi
11853
11854 if test -n "$cf_new_cppflags" ; then
11855
11856         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11857 fi
11858
11859 if test -n "$cf_new_extra_cppflags" ; then
11860
11861         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11862 fi
11863
11864     fi
11865   fi
11866 fi
11867
11868 echo "$as_me:11868: checking for signal global datatype" >&5
11869 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11870 if test "${cf_cv_sig_atomic_t+set}" = set; then
11871   echo $ECHO_N "(cached) $ECHO_C" >&6
11872 else
11873
11874         for cf_type in \
11875                 "volatile sig_atomic_t" \
11876                 "sig_atomic_t" \
11877                 "int"
11878         do
11879         cat >conftest.$ac_ext <<_ACEOF
11880 #line 11880 "configure"
11881 #include "confdefs.h"
11882
11883 #include <sys/types.h>
11884 #include <signal.h>
11885 #include <stdio.h>
11886
11887 extern $cf_type x;
11888 $cf_type x;
11889 static void handler(int sig)
11890 {
11891         x = 5;
11892 }
11893 int
11894 main ()
11895 {
11896 signal(SIGINT, handler);
11897                  x = 1
11898   ;
11899   return 0;
11900 }
11901 _ACEOF
11902 rm -f conftest.$ac_objext
11903 if { (eval echo "$as_me:11903: \"$ac_compile\"") >&5
11904   (eval $ac_compile) 2>&5
11905   ac_status=$?
11906   echo "$as_me:11906: \$? = $ac_status" >&5
11907   (exit $ac_status); } &&
11908          { ac_try='test -s conftest.$ac_objext'
11909   { (eval echo "$as_me:11909: \"$ac_try\"") >&5
11910   (eval $ac_try) 2>&5
11911   ac_status=$?
11912   echo "$as_me:11912: \$? = $ac_status" >&5
11913   (exit $ac_status); }; }; then
11914   cf_cv_sig_atomic_t=$cf_type
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 cat conftest.$ac_ext >&5
11918 cf_cv_sig_atomic_t=no
11919 fi
11920 rm -f conftest.$ac_objext conftest.$ac_ext
11921                 test "$cf_cv_sig_atomic_t" != no && break
11922         done
11923
11924 fi
11925
11926 echo "$as_me:11926: result: $cf_cv_sig_atomic_t" >&5
11927 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11928 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11929 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11930 EOF
11931
11932 if test $NCURSES_CHTYPE = auto ; then
11933
11934 echo "$as_me:11934: checking for type of chtype" >&5
11935 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11936 if test "${cf_cv_typeof_chtype+set}" = set; then
11937   echo $ECHO_N "(cached) $ECHO_C" >&6
11938 else
11939
11940                 if test "$cross_compiling" = yes; then
11941   cf_cv_typeof_chtype=long
11942 else
11943   cat >conftest.$ac_ext <<_ACEOF
11944 #line 11944 "configure"
11945 #include "confdefs.h"
11946
11947 #define WANT_BITS 31
11948 #include <stdio.h>
11949 int main()
11950 {
11951         FILE *fp = fopen("cf_test.out", "w");
11952         if (fp != 0) {
11953                 char *result = "long";
11954                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11955                         int n;
11956                         unsigned int x, y;
11957                         for (n = 0; n < WANT_BITS; n++) {
11958                                 x = (1 << n);
11959                                 y = (x >> n);
11960                                 if (y != 1 || x == 0) {
11961                                         x = 0;
11962                                         break;
11963                                 }
11964                         }
11965                         /*
11966                          * If x is nonzero, an int is big enough for the bits
11967                          * that we want.
11968                          */
11969                         result = (x != 0) ? "int" : "long";
11970                 }
11971                 fputs(result, fp);
11972                 fclose(fp);
11973         }
11974         ${cf_cv_main_return:-return}(0);
11975 }
11976
11977 _ACEOF
11978 rm -f conftest$ac_exeext
11979 if { (eval echo "$as_me:11979: \"$ac_link\"") >&5
11980   (eval $ac_link) 2>&5
11981   ac_status=$?
11982   echo "$as_me:11982: \$? = $ac_status" >&5
11983   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11984   { (eval echo "$as_me:11984: \"$ac_try\"") >&5
11985   (eval $ac_try) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); }; }; then
11989   cf_cv_typeof_chtype=`cat cf_test.out`
11990 else
11991   echo "$as_me: program exited with status $ac_status" >&5
11992 echo "$as_me: failed program was:" >&5
11993 cat conftest.$ac_ext >&5
11994 cf_cv_typeof_chtype=long
11995 fi
11996 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11997 fi
11998                 rm -f cf_test.out
11999
12000 fi
12001
12002 echo "$as_me:12002: result: $cf_cv_typeof_chtype" >&5
12003 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12004
12005 cat >>confdefs.h <<EOF
12006 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12007 EOF
12008
12009 else
12010         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12011 fi
12012 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12013
12014 echo "$as_me:12014: checking if unsigned literals are legal" >&5
12015 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12016 if test "${cf_cv_unsigned_literals+set}" = set; then
12017   echo $ECHO_N "(cached) $ECHO_C" >&6
12018 else
12019
12020         cat >conftest.$ac_ext <<_ACEOF
12021 #line 12021 "configure"
12022 #include "confdefs.h"
12023
12024 int
12025 main ()
12026 {
12027 long x = 1L + 1UL + 1U + 1
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 rm -f conftest.$ac_objext
12033 if { (eval echo "$as_me:12033: \"$ac_compile\"") >&5
12034   (eval $ac_compile) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit $ac_status); } &&
12038          { ac_try='test -s conftest.$ac_objext'
12039   { (eval echo "$as_me:12039: \"$ac_try\"") >&5
12040   (eval $ac_try) 2>&5
12041   ac_status=$?
12042   echo "$as_me:12042: \$? = $ac_status" >&5
12043   (exit $ac_status); }; }; then
12044   cf_cv_unsigned_literals=yes
12045 else
12046   echo "$as_me: failed program was:" >&5
12047 cat conftest.$ac_ext >&5
12048 cf_cv_unsigned_literals=no
12049 fi
12050 rm -f conftest.$ac_objext conftest.$ac_ext
12051
12052 fi
12053
12054 echo "$as_me:12054: result: $cf_cv_unsigned_literals" >&5
12055 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12056
12057 cf_cv_1UL="1"
12058 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12059 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12060
12061 if test $NCURSES_MMASK_T = auto ; then
12062         cf_cv_typeof_mmask_t=long
12063 else
12064         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12065 fi
12066 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12067
12068 ###     Checks for external-data
12069
12070 echo "$as_me:12070: checking if external errno is declared" >&5
12071 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12072 if test "${cf_cv_dcl_errno+set}" = set; then
12073   echo $ECHO_N "(cached) $ECHO_C" >&6
12074 else
12075
12076     cat >conftest.$ac_ext <<_ACEOF
12077 #line 12077 "configure"
12078 #include "confdefs.h"
12079
12080 #ifdef HAVE_STDLIB_H
12081 #include <stdlib.h>
12082 #endif
12083 #include <stdio.h>
12084 #include <sys/types.h>
12085 #include <errno.h>
12086 int
12087 main ()
12088 {
12089 long x = (long) errno
12090   ;
12091   return 0;
12092 }
12093 _ACEOF
12094 rm -f conftest.$ac_objext
12095 if { (eval echo "$as_me:12095: \"$ac_compile\"") >&5
12096   (eval $ac_compile) 2>&5
12097   ac_status=$?
12098   echo "$as_me:12098: \$? = $ac_status" >&5
12099   (exit $ac_status); } &&
12100          { ac_try='test -s conftest.$ac_objext'
12101   { (eval echo "$as_me:12101: \"$ac_try\"") >&5
12102   (eval $ac_try) 2>&5
12103   ac_status=$?
12104   echo "$as_me:12104: \$? = $ac_status" >&5
12105   (exit $ac_status); }; }; then
12106   cf_cv_dcl_errno=yes
12107 else
12108   echo "$as_me: failed program was:" >&5
12109 cat conftest.$ac_ext >&5
12110 cf_cv_dcl_errno=no
12111 fi
12112 rm -f conftest.$ac_objext conftest.$ac_ext
12113
12114 fi
12115 echo "$as_me:12115: result: $cf_cv_dcl_errno" >&5
12116 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12117
12118 if test "$cf_cv_dcl_errno" = no ; then
12119
12120 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12121
12122     cat >>confdefs.h <<EOF
12123 #define $cf_result 1
12124 EOF
12125
12126 fi
12127
12128 # It's possible (for near-UNIX clones) that the data doesn't exist
12129
12130 echo "$as_me:12130: checking if external errno exists" >&5
12131 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12132 if test "${cf_cv_have_errno+set}" = set; then
12133   echo $ECHO_N "(cached) $ECHO_C" >&6
12134 else
12135
12136     cat >conftest.$ac_ext <<_ACEOF
12137 #line 12137 "configure"
12138 #include "confdefs.h"
12139
12140 #undef errno
12141 extern int errno;
12142
12143 int
12144 main ()
12145 {
12146 errno = 2
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 rm -f conftest.$ac_objext conftest$ac_exeext
12152 if { (eval echo "$as_me:12152: \"$ac_link\"") >&5
12153   (eval $ac_link) 2>&5
12154   ac_status=$?
12155   echo "$as_me:12155: \$? = $ac_status" >&5
12156   (exit $ac_status); } &&
12157          { ac_try='test -s 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_have_errno=yes
12164 else
12165   echo "$as_me: failed program was:" >&5
12166 cat conftest.$ac_ext >&5
12167 cf_cv_have_errno=no
12168 fi
12169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12170
12171 fi
12172 echo "$as_me:12172: result: $cf_cv_have_errno" >&5
12173 echo "${ECHO_T}$cf_cv_have_errno" >&6
12174
12175 if test "$cf_cv_have_errno" = yes ; then
12176
12177 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12178
12179     cat >>confdefs.h <<EOF
12180 #define $cf_result 1
12181 EOF
12182
12183 fi
12184
12185 echo "$as_me:12185: checking if data-only library module links" >&5
12186 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12187 if test "${cf_cv_link_dataonly+set}" = set; then
12188   echo $ECHO_N "(cached) $ECHO_C" >&6
12189 else
12190
12191         rm -f conftest.a
12192         cat >conftest.$ac_ext <<EOF
12193 #line 12193 "configure"
12194 int     testdata[3] = { 123, 456, 789 };
12195 EOF
12196         if { (eval echo "$as_me:12196: \"$ac_compile\"") >&5
12197   (eval $ac_compile) 2>&5
12198   ac_status=$?
12199   echo "$as_me:12199: \$? = $ac_status" >&5
12200   (exit $ac_status); } ; then
12201                 mv conftest.o data.o && \
12202                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12203         fi
12204         rm -f conftest.$ac_ext data.o
12205         cat >conftest.$ac_ext <<EOF
12206 #line 12206 "configure"
12207 int     testfunc()
12208 {
12209 #if defined(NeXT)
12210         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12211 #else
12212         extern int testdata[3];
12213         return testdata[0] == 123
12214            &&  testdata[1] == 456
12215            &&  testdata[2] == 789;
12216 #endif
12217 }
12218 EOF
12219         if { (eval echo "$as_me:12219: \"$ac_compile\"") >&5
12220   (eval $ac_compile) 2>&5
12221   ac_status=$?
12222   echo "$as_me:12222: \$? = $ac_status" >&5
12223   (exit $ac_status); }; then
12224                 mv conftest.o func.o && \
12225                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12226         fi
12227         rm -f conftest.$ac_ext func.o
12228         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12229         cf_saveLIBS="$LIBS"
12230         LIBS="conftest.a $LIBS"
12231         if test "$cross_compiling" = yes; then
12232   cf_cv_link_dataonly=unknown
12233 else
12234   cat >conftest.$ac_ext <<_ACEOF
12235 #line 12235 "configure"
12236 #include "confdefs.h"
12237
12238         int main()
12239         {
12240                 extern int testfunc();
12241                 ${cf_cv_main_return:-return} (!testfunc());
12242         }
12243
12244 _ACEOF
12245 rm -f conftest$ac_exeext
12246 if { (eval echo "$as_me:12246: \"$ac_link\"") >&5
12247   (eval $ac_link) 2>&5
12248   ac_status=$?
12249   echo "$as_me:12249: \$? = $ac_status" >&5
12250   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12251   { (eval echo "$as_me:12251: \"$ac_try\"") >&5
12252   (eval $ac_try) 2>&5
12253   ac_status=$?
12254   echo "$as_me:12254: \$? = $ac_status" >&5
12255   (exit $ac_status); }; }; then
12256   cf_cv_link_dataonly=yes
12257 else
12258   echo "$as_me: program exited with status $ac_status" >&5
12259 echo "$as_me: failed program was:" >&5
12260 cat conftest.$ac_ext >&5
12261 cf_cv_link_dataonly=no
12262 fi
12263 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12264 fi
12265         LIBS="$cf_saveLIBS"
12266
12267 fi
12268
12269 echo "$as_me:12269: result: $cf_cv_link_dataonly" >&5
12270 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12271
12272 if test "$cf_cv_link_dataonly" = no ; then
12273         cat >>confdefs.h <<\EOF
12274 #define BROKEN_LINKER 1
12275 EOF
12276
12277         BROKEN_LINKER=1
12278 fi
12279
12280 ###     Checks for library functions.
12281
12282 for ac_func in \
12283 getcwd \
12284 getegid \
12285 geteuid \
12286 getttynam \
12287 issetugid \
12288 poll \
12289 remove \
12290 select \
12291 setbuf \
12292 setbuffer \
12293 setvbuf \
12294 sigaction \
12295 sigvec \
12296 strdup \
12297 strstr \
12298 tcgetpgrp \
12299 times \
12300 vsnprintf \
12301
12302 do
12303 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12304 echo "$as_me:12304: checking for $ac_func" >&5
12305 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12306 if eval "test \"\${$as_ac_var+set}\" = set"; then
12307   echo $ECHO_N "(cached) $ECHO_C" >&6
12308 else
12309   cat >conftest.$ac_ext <<_ACEOF
12310 #line 12310 "configure"
12311 #include "confdefs.h"
12312 /* System header to define __stub macros and hopefully few prototypes,
12313     which can conflict with char $ac_func (); below.  */
12314 #include <assert.h>
12315 /* Override any gcc2 internal prototype to avoid an error.  */
12316 #ifdef __cplusplus
12317 extern "C"
12318 #endif
12319 /* We use char because int might match the return type of a gcc2
12320    builtin and then its argument prototype would still apply.  */
12321 char $ac_func ();
12322 char (*f) ();
12323
12324 int
12325 main ()
12326 {
12327 /* The GNU C library defines this for functions which it implements
12328     to always fail with ENOSYS.  Some functions are actually named
12329     something starting with __ and the normal name is an alias.  */
12330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12331 choke me
12332 #else
12333 f = $ac_func;
12334 #endif
12335
12336   ;
12337   return 0;
12338 }
12339 _ACEOF
12340 rm -f conftest.$ac_objext conftest$ac_exeext
12341 if { (eval echo "$as_me:12341: \"$ac_link\"") >&5
12342   (eval $ac_link) 2>&5
12343   ac_status=$?
12344   echo "$as_me:12344: \$? = $ac_status" >&5
12345   (exit $ac_status); } &&
12346          { ac_try='test -s conftest$ac_exeext'
12347   { (eval echo "$as_me:12347: \"$ac_try\"") >&5
12348   (eval $ac_try) 2>&5
12349   ac_status=$?
12350   echo "$as_me:12350: \$? = $ac_status" >&5
12351   (exit $ac_status); }; }; then
12352   eval "$as_ac_var=yes"
12353 else
12354   echo "$as_me: failed program was:" >&5
12355 cat conftest.$ac_ext >&5
12356 eval "$as_ac_var=no"
12357 fi
12358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12359 fi
12360 echo "$as_me:12360: result: `eval echo '${'$as_ac_var'}'`" >&5
12361 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12362 if test `eval echo '${'$as_ac_var'}'` = yes; then
12363   cat >>confdefs.h <<EOF
12364 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12365 EOF
12366
12367 fi
12368 done
12369
12370 if test "$with_getcap" = "yes" ; then
12371
12372 echo "$as_me:12372: checking for terminal-capability database functions" >&5
12373 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12374 if test "${cf_cv_cgetent+set}" = set; then
12375   echo $ECHO_N "(cached) $ECHO_C" >&6
12376 else
12377
12378 cat >conftest.$ac_ext <<_ACEOF
12379 #line 12379 "configure"
12380 #include "confdefs.h"
12381
12382 #include <stdlib.h>
12383 int
12384 main ()
12385 {
12386
12387         char temp[128];
12388         char *buf = temp;
12389         char *db_array = temp;
12390         cgetent(&buf, /* int *, */ &db_array, "vt100");
12391         cgetcap(buf, "tc", '=');
12392         cgetmatch(buf, "tc");
12393
12394   ;
12395   return 0;
12396 }
12397 _ACEOF
12398 rm -f conftest.$ac_objext conftest$ac_exeext
12399 if { (eval echo "$as_me:12399: \"$ac_link\"") >&5
12400   (eval $ac_link) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); } &&
12404          { ac_try='test -s conftest$ac_exeext'
12405   { (eval echo "$as_me:12405: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   cf_cv_cgetent=yes
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 cat conftest.$ac_ext >&5
12414 cf_cv_cgetent=no
12415 fi
12416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12417
12418 fi
12419
12420 echo "$as_me:12420: result: $cf_cv_cgetent" >&5
12421 echo "${ECHO_T}$cf_cv_cgetent" >&6
12422 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12423 #define HAVE_BSD_CGETENT 1
12424 EOF
12425
12426 fi
12427
12428 echo "$as_me:12428: checking for isascii" >&5
12429 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12430 if test "${cf_cv_have_isascii+set}" = set; then
12431   echo $ECHO_N "(cached) $ECHO_C" >&6
12432 else
12433
12434         cat >conftest.$ac_ext <<_ACEOF
12435 #line 12435 "configure"
12436 #include "confdefs.h"
12437 #include <ctype.h>
12438 int
12439 main ()
12440 {
12441 int x = isascii(' ')
12442   ;
12443   return 0;
12444 }
12445 _ACEOF
12446 rm -f conftest.$ac_objext conftest$ac_exeext
12447 if { (eval echo "$as_me:12447: \"$ac_link\"") >&5
12448   (eval $ac_link) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); } &&
12452          { ac_try='test -s conftest$ac_exeext'
12453   { (eval echo "$as_me:12453: \"$ac_try\"") >&5
12454   (eval $ac_try) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; }; then
12458   cf_cv_have_isascii=yes
12459 else
12460   echo "$as_me: failed program was:" >&5
12461 cat conftest.$ac_ext >&5
12462 cf_cv_have_isascii=no
12463 fi
12464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12465
12466 fi
12467 echo "$as_me:12467: result: $cf_cv_have_isascii" >&5
12468 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12469 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12470 #define HAVE_ISASCII 1
12471 EOF
12472
12473 if test "$ac_cv_func_sigaction" = yes; then
12474 echo "$as_me:12474: checking whether sigaction needs _POSIX_SOURCE" >&5
12475 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12476 cat >conftest.$ac_ext <<_ACEOF
12477 #line 12477 "configure"
12478 #include "confdefs.h"
12479
12480 #include <sys/types.h>
12481 #include <signal.h>
12482 int
12483 main ()
12484 {
12485 struct sigaction act
12486   ;
12487   return 0;
12488 }
12489 _ACEOF
12490 rm -f conftest.$ac_objext
12491 if { (eval echo "$as_me:12491: \"$ac_compile\"") >&5
12492   (eval $ac_compile) 2>&5
12493   ac_status=$?
12494   echo "$as_me:12494: \$? = $ac_status" >&5
12495   (exit $ac_status); } &&
12496          { ac_try='test -s conftest.$ac_objext'
12497   { (eval echo "$as_me:12497: \"$ac_try\"") >&5
12498   (eval $ac_try) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit $ac_status); }; }; then
12502   sigact_bad=no
12503 else
12504   echo "$as_me: failed program was:" >&5
12505 cat conftest.$ac_ext >&5
12506
12507 cat >conftest.$ac_ext <<_ACEOF
12508 #line 12508 "configure"
12509 #include "confdefs.h"
12510
12511 #define _POSIX_SOURCE
12512 #include <sys/types.h>
12513 #include <signal.h>
12514 int
12515 main ()
12516 {
12517 struct sigaction act
12518   ;
12519   return 0;
12520 }
12521 _ACEOF
12522 rm -f conftest.$ac_objext
12523 if { (eval echo "$as_me:12523: \"$ac_compile\"") >&5
12524   (eval $ac_compile) 2>&5
12525   ac_status=$?
12526   echo "$as_me:12526: \$? = $ac_status" >&5
12527   (exit $ac_status); } &&
12528          { ac_try='test -s conftest.$ac_objext'
12529   { (eval echo "$as_me:12529: \"$ac_try\"") >&5
12530   (eval $ac_try) 2>&5
12531   ac_status=$?
12532   echo "$as_me:12532: \$? = $ac_status" >&5
12533   (exit $ac_status); }; }; then
12534   sigact_bad=yes
12535          cat >>confdefs.h <<\EOF
12536 #define SVR4_ACTION 1
12537 EOF
12538
12539 else
12540   echo "$as_me: failed program was:" >&5
12541 cat conftest.$ac_ext >&5
12542 sigact_bad=unknown
12543 fi
12544 rm -f conftest.$ac_objext conftest.$ac_ext
12545 fi
12546 rm -f conftest.$ac_objext conftest.$ac_ext
12547 echo "$as_me:12547: result: $sigact_bad" >&5
12548 echo "${ECHO_T}$sigact_bad" >&6
12549 fi
12550
12551 echo "$as_me:12551: checking if nanosleep really works" >&5
12552 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12553 if test "${cf_cv_func_nanosleep+set}" = set; then
12554   echo $ECHO_N "(cached) $ECHO_C" >&6
12555 else
12556
12557 if test "$cross_compiling" = yes; then
12558   cf_cv_func_nanosleep=unknown
12559 else
12560   cat >conftest.$ac_ext <<_ACEOF
12561 #line 12561 "configure"
12562 #include "confdefs.h"
12563
12564 #include <stdio.h>
12565 #include <errno.h>
12566 #include <time.h>
12567
12568 #ifdef HAVE_SYS_TIME_H
12569 #include <sys/time.h>
12570 #endif
12571
12572 int main() {
12573         struct timespec ts1, ts2;
12574         int code;
12575         ts1.tv_sec  = 0;
12576         ts1.tv_nsec = 750000000;
12577         ts2.tv_sec  = 0;
12578         ts2.tv_nsec = 0;
12579         errno = 0;
12580         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12581         ${cf_cv_main_return:-return}(code != 0);
12582 }
12583
12584 _ACEOF
12585 rm -f conftest$ac_exeext
12586 if { (eval echo "$as_me:12586: \"$ac_link\"") >&5
12587   (eval $ac_link) 2>&5
12588   ac_status=$?
12589   echo "$as_me:12589: \$? = $ac_status" >&5
12590   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12591   { (eval echo "$as_me:12591: \"$ac_try\"") >&5
12592   (eval $ac_try) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit $ac_status); }; }; then
12596   cf_cv_func_nanosleep=yes
12597 else
12598   echo "$as_me: program exited with status $ac_status" >&5
12599 echo "$as_me: failed program was:" >&5
12600 cat conftest.$ac_ext >&5
12601 cf_cv_func_nanosleep=no
12602 fi
12603 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12604 fi
12605 fi
12606 echo "$as_me:12606: result: $cf_cv_func_nanosleep" >&5
12607 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12608
12609 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12610 #define HAVE_NANOSLEEP 1
12611 EOF
12612
12613 for ac_header in \
12614 termio.h \
12615 termios.h \
12616 unistd.h \
12617
12618 do
12619 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12620 echo "$as_me:12620: checking for $ac_header" >&5
12621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12623   echo $ECHO_N "(cached) $ECHO_C" >&6
12624 else
12625   cat >conftest.$ac_ext <<_ACEOF
12626 #line 12626 "configure"
12627 #include "confdefs.h"
12628 #include <$ac_header>
12629 _ACEOF
12630 if { (eval echo "$as_me:12630: \"$ac_cpp conftest.$ac_ext\"") >&5
12631   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12632   ac_status=$?
12633   egrep -v '^ *\+' conftest.er1 >conftest.err
12634   rm -f conftest.er1
12635   cat conftest.err >&5
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit $ac_status); } >/dev/null; then
12638   if test -s conftest.err; then
12639     ac_cpp_err=$ac_c_preproc_warn_flag
12640   else
12641     ac_cpp_err=
12642   fi
12643 else
12644   ac_cpp_err=yes
12645 fi
12646 if test -z "$ac_cpp_err"; then
12647   eval "$as_ac_Header=yes"
12648 else
12649   echo "$as_me: failed program was:" >&5
12650   cat conftest.$ac_ext >&5
12651   eval "$as_ac_Header=no"
12652 fi
12653 rm -f conftest.err conftest.$ac_ext
12654 fi
12655 echo "$as_me:12655: result: `eval echo '${'$as_ac_Header'}'`" >&5
12656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12657 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12658   cat >>confdefs.h <<EOF
12659 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12660 EOF
12661
12662 fi
12663 done
12664
12665 if test "$ISC" = yes ; then
12666
12667 for ac_header in sys/termio.h
12668 do
12669 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12670 echo "$as_me:12670: checking for $ac_header" >&5
12671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12673   echo $ECHO_N "(cached) $ECHO_C" >&6
12674 else
12675   cat >conftest.$ac_ext <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678 #include <$ac_header>
12679 _ACEOF
12680 if { (eval echo "$as_me:12680: \"$ac_cpp conftest.$ac_ext\"") >&5
12681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12682   ac_status=$?
12683   egrep -v '^ *\+' conftest.er1 >conftest.err
12684   rm -f conftest.er1
12685   cat conftest.err >&5
12686   echo "$as_me:12686: \$? = $ac_status" >&5
12687   (exit $ac_status); } >/dev/null; then
12688   if test -s conftest.err; then
12689     ac_cpp_err=$ac_c_preproc_warn_flag
12690   else
12691     ac_cpp_err=
12692   fi
12693 else
12694   ac_cpp_err=yes
12695 fi
12696 if test -z "$ac_cpp_err"; then
12697   eval "$as_ac_Header=yes"
12698 else
12699   echo "$as_me: failed program was:" >&5
12700   cat conftest.$ac_ext >&5
12701   eval "$as_ac_Header=no"
12702 fi
12703 rm -f conftest.err conftest.$ac_ext
12704 fi
12705 echo "$as_me:12705: result: `eval echo '${'$as_ac_Header'}'`" >&5
12706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12708   cat >>confdefs.h <<EOF
12709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12710 EOF
12711
12712 fi
12713 done
12714
12715 fi
12716 if test "$ac_cv_header_termios_h" = yes ; then
12717         case "$CFLAGS $CPPFLAGS" in
12718         *-D_POSIX_SOURCE*)
12719                 termios_bad=dunno ;;
12720         *)      termios_bad=maybe ;;
12721         esac
12722         if test "$termios_bad" = maybe ; then
12723         echo "$as_me:12723: checking whether termios.h needs _POSIX_SOURCE" >&5
12724 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12725         cat >conftest.$ac_ext <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12728 #include <termios.h>
12729 int
12730 main ()
12731 {
12732 struct termios foo; int x = foo.c_iflag
12733   ;
12734   return 0;
12735 }
12736 _ACEOF
12737 rm -f conftest.$ac_objext
12738 if { (eval echo "$as_me:12738: \"$ac_compile\"") >&5
12739   (eval $ac_compile) 2>&5
12740   ac_status=$?
12741   echo "$as_me:12741: \$? = $ac_status" >&5
12742   (exit $ac_status); } &&
12743          { ac_try='test -s conftest.$ac_objext'
12744   { (eval echo "$as_me:12744: \"$ac_try\"") >&5
12745   (eval $ac_try) 2>&5
12746   ac_status=$?
12747   echo "$as_me:12747: \$? = $ac_status" >&5
12748   (exit $ac_status); }; }; then
12749   termios_bad=no
12750 else
12751   echo "$as_me: failed program was:" >&5
12752 cat conftest.$ac_ext >&5
12753
12754                 cat >conftest.$ac_ext <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757
12758 #define _POSIX_SOURCE
12759 #include <termios.h>
12760 int
12761 main ()
12762 {
12763 struct termios foo; int x = foo.c_iflag
12764   ;
12765   return 0;
12766 }
12767 _ACEOF
12768 rm -f conftest.$ac_objext
12769 if { (eval echo "$as_me:12769: \"$ac_compile\"") >&5
12770   (eval $ac_compile) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit $ac_status); } &&
12774          { ac_try='test -s conftest.$ac_objext'
12775   { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776   (eval $ac_try) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit $ac_status); }; }; then
12780   termios_bad=unknown
12781 else
12782   echo "$as_me: failed program was:" >&5
12783 cat conftest.$ac_ext >&5
12784 termios_bad=yes cat >>confdefs.h <<\EOF
12785 #define SVR4_TERMIO 1
12786 EOF
12787
12788 fi
12789 rm -f conftest.$ac_objext conftest.$ac_ext
12790
12791 fi
12792 rm -f conftest.$ac_objext conftest.$ac_ext
12793         echo "$as_me:12793: result: $termios_bad" >&5
12794 echo "${ECHO_T}$termios_bad" >&6
12795         fi
12796 fi
12797
12798 echo "$as_me:12798: checking for tcgetattr" >&5
12799 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12800 if test "${cf_cv_have_tcgetattr+set}" = set; then
12801   echo $ECHO_N "(cached) $ECHO_C" >&6
12802 else
12803
12804 cat >conftest.$ac_ext <<_ACEOF
12805 #line 12805 "configure"
12806 #include "confdefs.h"
12807
12808 #include <sys/types.h>
12809 #ifdef HAVE_UNISTD_H
12810 #include <unistd.h>
12811 #endif
12812 #ifdef HAVE_TERMIOS_H
12813 #include <termios.h>
12814 #define TTY struct termios
12815 #else
12816 #ifdef HAVE_TERMIO_H
12817 #include <termio.h>
12818 #define TTY struct termio
12819 #endif
12820 #endif
12821
12822 int
12823 main ()
12824 {
12825
12826 TTY foo;
12827 tcgetattr(1, &foo);
12828   ;
12829   return 0;
12830 }
12831 _ACEOF
12832 rm -f conftest.$ac_objext conftest$ac_exeext
12833 if { (eval echo "$as_me:12833: \"$ac_link\"") >&5
12834   (eval $ac_link) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit $ac_status); } &&
12838          { ac_try='test -s conftest$ac_exeext'
12839   { (eval echo "$as_me:12839: \"$ac_try\"") >&5
12840   (eval $ac_try) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit $ac_status); }; }; then
12844   cf_cv_have_tcgetattr=yes
12845 else
12846   echo "$as_me: failed program was:" >&5
12847 cat conftest.$ac_ext >&5
12848 cf_cv_have_tcgetattr=no
12849 fi
12850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12851 fi
12852 echo "$as_me:12852: result: $cf_cv_have_tcgetattr" >&5
12853 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12854 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12855 #define HAVE_TCGETATTR 1
12856 EOF
12857
12858 echo "$as_me:12858: checking for vsscanf function or workaround" >&5
12859 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12860 if test "${cf_cv_func_vsscanf+set}" = set; then
12861   echo $ECHO_N "(cached) $ECHO_C" >&6
12862 else
12863
12864 cat >conftest.$ac_ext <<_ACEOF
12865 #line 12865 "configure"
12866 #include "confdefs.h"
12867
12868 #include <stdarg.h>
12869 #include <stdio.h>
12870 int
12871 main ()
12872 {
12873
12874         va_list ap;
12875         vsscanf("from", "%d", ap)
12876   ;
12877   return 0;
12878 }
12879 _ACEOF
12880 rm -f conftest.$ac_objext conftest$ac_exeext
12881 if { (eval echo "$as_me:12881: \"$ac_link\"") >&5
12882   (eval $ac_link) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit $ac_status); } &&
12886          { ac_try='test -s conftest$ac_exeext'
12887   { (eval echo "$as_me:12887: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); }; }; then
12892   cf_cv_func_vsscanf=vsscanf
12893 else
12894   echo "$as_me: failed program was:" >&5
12895 cat conftest.$ac_ext >&5
12896
12897 cat >conftest.$ac_ext <<_ACEOF
12898 #line 12898 "configure"
12899 #include "confdefs.h"
12900
12901 #include <stdarg.h>
12902 #include <stdio.h>
12903 int
12904 main ()
12905 {
12906
12907     FILE strbuf;
12908     char *str = "from";
12909
12910     strbuf._flag = _IOREAD;
12911     strbuf._ptr = strbuf._base = (unsigned char *) str;
12912     strbuf._cnt = strlen(str);
12913     strbuf._file = _NFILE;
12914     return (vfscanf(&strbuf, "%d", ap))
12915   ;
12916   return 0;
12917 }
12918 _ACEOF
12919 rm -f conftest.$ac_objext conftest$ac_exeext
12920 if { (eval echo "$as_me:12920: \"$ac_link\"") >&5
12921   (eval $ac_link) 2>&5
12922   ac_status=$?
12923   echo "$as_me:12923: \$? = $ac_status" >&5
12924   (exit $ac_status); } &&
12925          { ac_try='test -s conftest$ac_exeext'
12926   { (eval echo "$as_me:12926: \"$ac_try\"") >&5
12927   (eval $ac_try) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); }; }; then
12931   cf_cv_func_vsscanf=vfscanf
12932 else
12933   echo "$as_me: failed program was:" >&5
12934 cat conftest.$ac_ext >&5
12935
12936 cat >conftest.$ac_ext <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939
12940 #include <stdarg.h>
12941 #include <stdio.h>
12942 int
12943 main ()
12944 {
12945
12946     FILE strbuf;
12947     char *str = "from";
12948
12949     strbuf._flag = _IOREAD;
12950     strbuf._ptr = strbuf._base = (unsigned char *) str;
12951     strbuf._cnt = strlen(str);
12952     strbuf._file = _NFILE;
12953     return (_doscan(&strbuf, "%d", ap))
12954   ;
12955   return 0;
12956 }
12957 _ACEOF
12958 rm -f conftest.$ac_objext conftest$ac_exeext
12959 if { (eval echo "$as_me:12959: \"$ac_link\"") >&5
12960   (eval $ac_link) 2>&5
12961   ac_status=$?
12962   echo "$as_me:12962: \$? = $ac_status" >&5
12963   (exit $ac_status); } &&
12964          { ac_try='test -s conftest$ac_exeext'
12965   { (eval echo "$as_me:12965: \"$ac_try\"") >&5
12966   (eval $ac_try) 2>&5
12967   ac_status=$?
12968   echo "$as_me:12968: \$? = $ac_status" >&5
12969   (exit $ac_status); }; }; then
12970   cf_cv_func_vsscanf=_doscan
12971 else
12972   echo "$as_me: failed program was:" >&5
12973 cat conftest.$ac_ext >&5
12974
12975 cf_cv_func_vsscanf=no
12976 fi
12977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12978 fi
12979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12980 fi
12981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12982 fi
12983 echo "$as_me:12983: result: $cf_cv_func_vsscanf" >&5
12984 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12985
12986 case $cf_cv_func_vsscanf in #(vi
12987 vsscanf) cat >>confdefs.h <<\EOF
12988 #define HAVE_VSSCANF 1
12989 EOF
12990 ;; #(vi
12991 vfscanf) cat >>confdefs.h <<\EOF
12992 #define HAVE_VFSCANF 1
12993 EOF
12994 ;; #(vi
12995 _doscan) cat >>confdefs.h <<\EOF
12996 #define HAVE__DOSCAN 1
12997 EOF
12998 ;;
12999 esac
13000
13001 echo "$as_me:13001: checking for working mkstemp" >&5
13002 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13003 if test "${cf_cv_func_mkstemp+set}" = set; then
13004   echo $ECHO_N "(cached) $ECHO_C" >&6
13005 else
13006
13007 rm -f conftest*
13008 if test "$cross_compiling" = yes; then
13009   echo "$as_me:13009: checking for mkstemp" >&5
13010 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13011 if test "${ac_cv_func_mkstemp+set}" = set; then
13012   echo $ECHO_N "(cached) $ECHO_C" >&6
13013 else
13014   cat >conftest.$ac_ext <<_ACEOF
13015 #line 13015 "configure"
13016 #include "confdefs.h"
13017 /* System header to define __stub macros and hopefully few prototypes,
13018     which can conflict with char mkstemp (); below.  */
13019 #include <assert.h>
13020 /* Override any gcc2 internal prototype to avoid an error.  */
13021 #ifdef __cplusplus
13022 extern "C"
13023 #endif
13024 /* We use char because int might match the return type of a gcc2
13025    builtin and then its argument prototype would still apply.  */
13026 char mkstemp ();
13027 char (*f) ();
13028
13029 int
13030 main ()
13031 {
13032 /* The GNU C library defines this for functions which it implements
13033     to always fail with ENOSYS.  Some functions are actually named
13034     something starting with __ and the normal name is an alias.  */
13035 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13036 choke me
13037 #else
13038 f = mkstemp;
13039 #endif
13040
13041   ;
13042   return 0;
13043 }
13044 _ACEOF
13045 rm -f conftest.$ac_objext conftest$ac_exeext
13046 if { (eval echo "$as_me:13046: \"$ac_link\"") >&5
13047   (eval $ac_link) 2>&5
13048   ac_status=$?
13049   echo "$as_me:13049: \$? = $ac_status" >&5
13050   (exit $ac_status); } &&
13051          { ac_try='test -s conftest$ac_exeext'
13052   { (eval echo "$as_me:13052: \"$ac_try\"") >&5
13053   (eval $ac_try) 2>&5
13054   ac_status=$?
13055   echo "$as_me:13055: \$? = $ac_status" >&5
13056   (exit $ac_status); }; }; then
13057   ac_cv_func_mkstemp=yes
13058 else
13059   echo "$as_me: failed program was:" >&5
13060 cat conftest.$ac_ext >&5
13061 ac_cv_func_mkstemp=no
13062 fi
13063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13064 fi
13065 echo "$as_me:13065: result: $ac_cv_func_mkstemp" >&5
13066 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13067
13068 else
13069   cat >conftest.$ac_ext <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072
13073 #include <sys/types.h>
13074 #include <stdlib.h>
13075 #include <stdio.h>
13076 #include <string.h>
13077 #include <sys/stat.h>
13078 int main()
13079 {
13080         char *tmpl = "conftestXXXXXX";
13081         char name[2][80];
13082         int n;
13083         int result = 0;
13084         int fd;
13085         struct stat sb;
13086
13087         umask(077);
13088         for (n = 0; n < 2; ++n) {
13089                 strcpy(name[n], tmpl);
13090                 if ((fd = mkstemp(name[n])) >= 0) {
13091                         if (!strcmp(name[n], tmpl)
13092                          || stat(name[n], &sb) != 0
13093                          || (sb.st_mode & S_IFMT) != S_IFREG
13094                          || (sb.st_mode & 077) != 0) {
13095                                 result = 1;
13096                         }
13097                         close(fd);
13098                 }
13099         }
13100         if (result == 0
13101          && !strcmp(name[0], name[1]))
13102                 result = 1;
13103         ${cf_cv_main_return:-return}(result);
13104 }
13105
13106 _ACEOF
13107 rm -f conftest$ac_exeext
13108 if { (eval echo "$as_me:13108: \"$ac_link\"") >&5
13109   (eval $ac_link) 2>&5
13110   ac_status=$?
13111   echo "$as_me:13111: \$? = $ac_status" >&5
13112   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13113   { (eval echo "$as_me:13113: \"$ac_try\"") >&5
13114   (eval $ac_try) 2>&5
13115   ac_status=$?
13116   echo "$as_me:13116: \$? = $ac_status" >&5
13117   (exit $ac_status); }; }; then
13118   cf_cv_func_mkstemp=yes
13119
13120 else
13121   echo "$as_me: program exited with status $ac_status" >&5
13122 echo "$as_me: failed program was:" >&5
13123 cat conftest.$ac_ext >&5
13124 cf_cv_func_mkstemp=no
13125
13126 fi
13127 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13128 fi
13129
13130 fi
13131 echo "$as_me:13131: result: $cf_cv_func_mkstemp" >&5
13132 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13133 if test "$cf_cv_func_mkstemp" = yes ; then
13134         cat >>confdefs.h <<\EOF
13135 #define HAVE_MKSTEMP 1
13136 EOF
13137
13138 fi
13139
13140 # setup for prototype of fallback for vsscanf()
13141
13142 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13143         HAVE_VSSCANF=1
13144 else
13145         HAVE_VSSCANF=0
13146 fi
13147
13148 if test "$cross_compiling" = yes ; then
13149         { echo "$as_me:13149: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13150 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13151 else
13152         echo "$as_me:13152: checking whether setvbuf arguments are reversed" >&5
13153 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13154 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13155   echo $ECHO_N "(cached) $ECHO_C" >&6
13156 else
13157   if test "$cross_compiling" = yes; then
13158   { { echo "$as_me:13158: error: cannot run test program while cross compiling" >&5
13159 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13160    { (exit 1); exit 1; }; }
13161 else
13162   cat >conftest.$ac_ext <<_ACEOF
13163 #line 13163 "configure"
13164 #include "confdefs.h"
13165 #include <stdio.h>
13166 /* If setvbuf has the reversed format, exit 0. */
13167 int
13168 main ()
13169 {
13170   /* This call has the arguments reversed.
13171      A reversed system may check and see that the address of main
13172      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13173   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13174     $ac_main_return(1);
13175   putc('\r', stdout);
13176   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13177 }
13178 _ACEOF
13179 rm -f conftest$ac_exeext
13180 if { (eval echo "$as_me:13180: \"$ac_link\"") >&5
13181   (eval $ac_link) 2>&5
13182   ac_status=$?
13183   echo "$as_me:13183: \$? = $ac_status" >&5
13184   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13185   { (eval echo "$as_me:13185: \"$ac_try\"") >&5
13186   (eval $ac_try) 2>&5
13187   ac_status=$?
13188   echo "$as_me:13188: \$? = $ac_status" >&5
13189   (exit $ac_status); }; }; then
13190   ac_cv_func_setvbuf_reversed=yes
13191 else
13192   echo "$as_me: program exited with status $ac_status" >&5
13193 echo "$as_me: failed program was:" >&5
13194 cat conftest.$ac_ext >&5
13195 ac_cv_func_setvbuf_reversed=no
13196 fi
13197 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13198 fi
13199 rm -f core core.* *.core
13200 fi
13201 echo "$as_me:13201: result: $ac_cv_func_setvbuf_reversed" >&5
13202 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13203 if test $ac_cv_func_setvbuf_reversed = yes; then
13204
13205 cat >>confdefs.h <<\EOF
13206 #define SETVBUF_REVERSED 1
13207 EOF
13208
13209 fi
13210
13211 fi
13212 echo "$as_me:13212: checking return type of signal handlers" >&5
13213 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13214 if test "${ac_cv_type_signal+set}" = set; then
13215   echo $ECHO_N "(cached) $ECHO_C" >&6
13216 else
13217   cat >conftest.$ac_ext <<_ACEOF
13218 #line 13218 "configure"
13219 #include "confdefs.h"
13220 #include <sys/types.h>
13221 #include <signal.h>
13222 #ifdef signal
13223 # undef signal
13224 #endif
13225 #ifdef __cplusplus
13226 extern "C" void (*signal (int, void (*)(int)))(int);
13227 #else
13228 void (*signal ()) ();
13229 #endif
13230
13231 int
13232 main ()
13233 {
13234 int i;
13235   ;
13236   return 0;
13237 }
13238 _ACEOF
13239 rm -f conftest.$ac_objext
13240 if { (eval echo "$as_me:13240: \"$ac_compile\"") >&5
13241   (eval $ac_compile) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); } &&
13245          { ac_try='test -s conftest.$ac_objext'
13246   { (eval echo "$as_me:13246: \"$ac_try\"") >&5
13247   (eval $ac_try) 2>&5
13248   ac_status=$?
13249   echo "$as_me:13249: \$? = $ac_status" >&5
13250   (exit $ac_status); }; }; then
13251   ac_cv_type_signal=void
13252 else
13253   echo "$as_me: failed program was:" >&5
13254 cat conftest.$ac_ext >&5
13255 ac_cv_type_signal=int
13256 fi
13257 rm -f conftest.$ac_objext conftest.$ac_ext
13258 fi
13259 echo "$as_me:13259: result: $ac_cv_type_signal" >&5
13260 echo "${ECHO_T}$ac_cv_type_signal" >&6
13261
13262 cat >>confdefs.h <<EOF
13263 #define RETSIGTYPE $ac_cv_type_signal
13264 EOF
13265
13266 echo "$as_me:13266: checking for type sigaction_t" >&5
13267 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13268 if test "${cf_cv_type_sigaction+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271
13272         cat >conftest.$ac_ext <<_ACEOF
13273 #line 13273 "configure"
13274 #include "confdefs.h"
13275
13276 #include <signal.h>
13277 int
13278 main ()
13279 {
13280 sigaction_t x
13281   ;
13282   return 0;
13283 }
13284 _ACEOF
13285 rm -f conftest.$ac_objext
13286 if { (eval echo "$as_me:13286: \"$ac_compile\"") >&5
13287   (eval $ac_compile) 2>&5
13288   ac_status=$?
13289   echo "$as_me:13289: \$? = $ac_status" >&5
13290   (exit $ac_status); } &&
13291          { ac_try='test -s conftest.$ac_objext'
13292   { (eval echo "$as_me:13292: \"$ac_try\"") >&5
13293   (eval $ac_try) 2>&5
13294   ac_status=$?
13295   echo "$as_me:13295: \$? = $ac_status" >&5
13296   (exit $ac_status); }; }; then
13297   cf_cv_type_sigaction=yes
13298 else
13299   echo "$as_me: failed program was:" >&5
13300 cat conftest.$ac_ext >&5
13301 cf_cv_type_sigaction=no
13302 fi
13303 rm -f conftest.$ac_objext conftest.$ac_ext
13304 fi
13305
13306 echo "$as_me:13306: result: $cf_cv_type_sigaction" >&5
13307 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13308 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13309 #define HAVE_TYPE_SIGACTION 1
13310 EOF
13311
13312 echo "$as_me:13312: checking declaration of size-change" >&5
13313 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13314 if test "${cf_cv_sizechange+set}" = set; then
13315   echo $ECHO_N "(cached) $ECHO_C" >&6
13316 else
13317
13318     cf_cv_sizechange=unknown
13319     cf_save_CPPFLAGS="$CPPFLAGS"
13320
13321 for cf_opts in "" "NEED_PTEM_H"
13322 do
13323
13324     CPPFLAGS="$cf_save_CPPFLAGS"
13325     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13326     cat >conftest.$ac_ext <<_ACEOF
13327 #line 13327 "configure"
13328 #include "confdefs.h"
13329 #include <sys/types.h>
13330 #ifdef HAVE_TERMIOS_H
13331 #include <termios.h>
13332 #else
13333 #ifdef HAVE_TERMIO_H
13334 #include <termio.h>
13335 #endif
13336 #endif
13337 #ifdef NEED_PTEM_H
13338 /* This is a workaround for SCO:  they neglected to define struct winsize in
13339  * termios.h -- it's only in termio.h and ptem.h
13340  */
13341 #include        <sys/stream.h>
13342 #include        <sys/ptem.h>
13343 #endif
13344 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13345 #include <sys/ioctl.h>
13346 #endif
13347
13348 int
13349 main ()
13350 {
13351
13352 #ifdef TIOCGSIZE
13353         struct ttysize win;     /* FIXME: what system is this? */
13354         int y = win.ts_lines;
13355         int x = win.ts_cols;
13356 #else
13357 #ifdef TIOCGWINSZ
13358         struct winsize win;
13359         int y = win.ws_row;
13360         int x = win.ws_col;
13361 #else
13362         no TIOCGSIZE or TIOCGWINSZ
13363 #endif /* TIOCGWINSZ */
13364 #endif /* TIOCGSIZE */
13365
13366   ;
13367   return 0;
13368 }
13369 _ACEOF
13370 rm -f conftest.$ac_objext
13371 if { (eval echo "$as_me:13371: \"$ac_compile\"") >&5
13372   (eval $ac_compile) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit $ac_status); } &&
13376          { ac_try='test -s conftest.$ac_objext'
13377   { (eval echo "$as_me:13377: \"$ac_try\"") >&5
13378   (eval $ac_try) 2>&5
13379   ac_status=$?
13380   echo "$as_me:13380: \$? = $ac_status" >&5
13381   (exit $ac_status); }; }; then
13382   cf_cv_sizechange=yes
13383 else
13384   echo "$as_me: failed program was:" >&5
13385 cat conftest.$ac_ext >&5
13386 cf_cv_sizechange=no
13387 fi
13388 rm -f conftest.$ac_objext conftest.$ac_ext
13389
13390         CPPFLAGS="$cf_save_CPPFLAGS"
13391         if test "$cf_cv_sizechange" = yes ; then
13392                 echo "size-change succeeded ($cf_opts)" >&5
13393                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13394                 break
13395         fi
13396 done
13397
13398 fi
13399 echo "$as_me:13399: result: $cf_cv_sizechange" >&5
13400 echo "${ECHO_T}$cf_cv_sizechange" >&6
13401 if test "$cf_cv_sizechange" != no ; then
13402         cat >>confdefs.h <<\EOF
13403 #define HAVE_SIZECHANGE 1
13404 EOF
13405
13406         case $cf_cv_sizechange in #(vi
13407         NEED*)
13408                 cat >>confdefs.h <<EOF
13409 #define $cf_cv_sizechange  1
13410 EOF
13411
13412                 ;;
13413         esac
13414 fi
13415
13416 echo "$as_me:13416: checking for memmove" >&5
13417 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13418 if test "${ac_cv_func_memmove+set}" = set; then
13419   echo $ECHO_N "(cached) $ECHO_C" >&6
13420 else
13421   cat >conftest.$ac_ext <<_ACEOF
13422 #line 13422 "configure"
13423 #include "confdefs.h"
13424 /* System header to define __stub macros and hopefully few prototypes,
13425     which can conflict with char memmove (); below.  */
13426 #include <assert.h>
13427 /* Override any gcc2 internal prototype to avoid an error.  */
13428 #ifdef __cplusplus
13429 extern "C"
13430 #endif
13431 /* We use char because int might match the return type of a gcc2
13432    builtin and then its argument prototype would still apply.  */
13433 char memmove ();
13434 char (*f) ();
13435
13436 int
13437 main ()
13438 {
13439 /* The GNU C library defines this for functions which it implements
13440     to always fail with ENOSYS.  Some functions are actually named
13441     something starting with __ and the normal name is an alias.  */
13442 #if defined (__stub_memmove) || defined (__stub___memmove)
13443 choke me
13444 #else
13445 f = memmove;
13446 #endif
13447
13448   ;
13449   return 0;
13450 }
13451 _ACEOF
13452 rm -f conftest.$ac_objext conftest$ac_exeext
13453 if { (eval echo "$as_me:13453: \"$ac_link\"") >&5
13454   (eval $ac_link) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); } &&
13458          { ac_try='test -s conftest$ac_exeext'
13459   { (eval echo "$as_me:13459: \"$ac_try\"") >&5
13460   (eval $ac_try) 2>&5
13461   ac_status=$?
13462   echo "$as_me:13462: \$? = $ac_status" >&5
13463   (exit $ac_status); }; }; then
13464   ac_cv_func_memmove=yes
13465 else
13466   echo "$as_me: failed program was:" >&5
13467 cat conftest.$ac_ext >&5
13468 ac_cv_func_memmove=no
13469 fi
13470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13471 fi
13472 echo "$as_me:13472: result: $ac_cv_func_memmove" >&5
13473 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13474 if test $ac_cv_func_memmove = yes; then
13475   :
13476 else
13477
13478 echo "$as_me:13478: checking for bcopy" >&5
13479 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13480 if test "${ac_cv_func_bcopy+set}" = set; then
13481   echo $ECHO_N "(cached) $ECHO_C" >&6
13482 else
13483   cat >conftest.$ac_ext <<_ACEOF
13484 #line 13484 "configure"
13485 #include "confdefs.h"
13486 /* System header to define __stub macros and hopefully few prototypes,
13487     which can conflict with char bcopy (); below.  */
13488 #include <assert.h>
13489 /* Override any gcc2 internal prototype to avoid an error.  */
13490 #ifdef __cplusplus
13491 extern "C"
13492 #endif
13493 /* We use char because int might match the return type of a gcc2
13494    builtin and then its argument prototype would still apply.  */
13495 char bcopy ();
13496 char (*f) ();
13497
13498 int
13499 main ()
13500 {
13501 /* The GNU C library defines this for functions which it implements
13502     to always fail with ENOSYS.  Some functions are actually named
13503     something starting with __ and the normal name is an alias.  */
13504 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13505 choke me
13506 #else
13507 f = bcopy;
13508 #endif
13509
13510   ;
13511   return 0;
13512 }
13513 _ACEOF
13514 rm -f conftest.$ac_objext conftest$ac_exeext
13515 if { (eval echo "$as_me:13515: \"$ac_link\"") >&5
13516   (eval $ac_link) 2>&5
13517   ac_status=$?
13518   echo "$as_me:13518: \$? = $ac_status" >&5
13519   (exit $ac_status); } &&
13520          { ac_try='test -s conftest$ac_exeext'
13521   { (eval echo "$as_me:13521: \"$ac_try\"") >&5
13522   (eval $ac_try) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); }; }; then
13526   ac_cv_func_bcopy=yes
13527 else
13528   echo "$as_me: failed program was:" >&5
13529 cat conftest.$ac_ext >&5
13530 ac_cv_func_bcopy=no
13531 fi
13532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13533 fi
13534 echo "$as_me:13534: result: $ac_cv_func_bcopy" >&5
13535 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13536 if test $ac_cv_func_bcopy = yes; then
13537
13538         echo "$as_me:13538: checking if bcopy does overlapping moves" >&5
13539 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13540 if test "${cf_cv_good_bcopy+set}" = set; then
13541   echo $ECHO_N "(cached) $ECHO_C" >&6
13542 else
13543
13544                 if test "$cross_compiling" = yes; then
13545   cf_cv_good_bcopy=unknown
13546 else
13547   cat >conftest.$ac_ext <<_ACEOF
13548 #line 13548 "configure"
13549 #include "confdefs.h"
13550
13551 int main() {
13552         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13553         char temp[40];
13554         bcopy(data, temp, sizeof(data));
13555         bcopy(temp+10, temp, 15);
13556         bcopy(temp+5, temp+15, 10);
13557         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13558 }
13559
13560 _ACEOF
13561 rm -f conftest$ac_exeext
13562 if { (eval echo "$as_me:13562: \"$ac_link\"") >&5
13563   (eval $ac_link) 2>&5
13564   ac_status=$?
13565   echo "$as_me:13565: \$? = $ac_status" >&5
13566   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13567   { (eval echo "$as_me:13567: \"$ac_try\"") >&5
13568   (eval $ac_try) 2>&5
13569   ac_status=$?
13570   echo "$as_me:13570: \$? = $ac_status" >&5
13571   (exit $ac_status); }; }; then
13572   cf_cv_good_bcopy=yes
13573 else
13574   echo "$as_me: program exited with status $ac_status" >&5
13575 echo "$as_me: failed program was:" >&5
13576 cat conftest.$ac_ext >&5
13577 cf_cv_good_bcopy=no
13578 fi
13579 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13580 fi
13581
13582 fi
13583 echo "$as_me:13583: result: $cf_cv_good_bcopy" >&5
13584 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13585
13586 else
13587   cf_cv_good_bcopy=no
13588 fi
13589
13590         if test "$cf_cv_good_bcopy" = yes ; then
13591                 cat >>confdefs.h <<\EOF
13592 #define USE_OK_BCOPY 1
13593 EOF
13594
13595         else
13596                 cat >>confdefs.h <<\EOF
13597 #define USE_MY_MEMMOVE 1
13598 EOF
13599
13600         fi
13601
13602 fi
13603
13604 echo "$as_me:13604: checking if poll really works" >&5
13605 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13606 if test "${cf_cv_working_poll+set}" = set; then
13607   echo $ECHO_N "(cached) $ECHO_C" >&6
13608 else
13609
13610 if test "$cross_compiling" = yes; then
13611   cf_cv_working_poll=unknown
13612 else
13613   cat >conftest.$ac_ext <<_ACEOF
13614 #line 13614 "configure"
13615 #include "confdefs.h"
13616
13617 #include <stdio.h>
13618 #ifdef HAVE_POLL_H
13619 #include <poll.h>
13620 #else
13621 #include <sys/poll.h>
13622 #endif
13623 int main() {
13624         struct pollfd myfds;
13625         int ret;
13626
13627         myfds.fd = 0;
13628         myfds.events = POLLIN;
13629
13630         ret = poll(&myfds, 1, 100);
13631         ${cf_cv_main_return:-return}(ret != 0);
13632 }
13633 _ACEOF
13634 rm -f conftest$ac_exeext
13635 if { (eval echo "$as_me:13635: \"$ac_link\"") >&5
13636   (eval $ac_link) 2>&5
13637   ac_status=$?
13638   echo "$as_me:13638: \$? = $ac_status" >&5
13639   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13640   { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641   (eval $ac_try) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); }; }; then
13645   cf_cv_working_poll=yes
13646 else
13647   echo "$as_me: program exited with status $ac_status" >&5
13648 echo "$as_me: failed program was:" >&5
13649 cat conftest.$ac_ext >&5
13650 cf_cv_working_poll=no
13651 fi
13652 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13653 fi
13654 fi
13655 echo "$as_me:13655: result: $cf_cv_working_poll" >&5
13656 echo "${ECHO_T}$cf_cv_working_poll" >&6
13657 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13658 #define HAVE_WORKING_POLL 1
13659 EOF
13660
13661 # special check for test/ditto.c
13662
13663 echo "$as_me:13663: checking for openpty in -lutil" >&5
13664 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13665 if test "${ac_cv_lib_util_openpty+set}" = set; then
13666   echo $ECHO_N "(cached) $ECHO_C" >&6
13667 else
13668   ac_check_lib_save_LIBS=$LIBS
13669 LIBS="-lutil  $LIBS"
13670 cat >conftest.$ac_ext <<_ACEOF
13671 #line 13671 "configure"
13672 #include "confdefs.h"
13673
13674 /* Override any gcc2 internal prototype to avoid an error.  */
13675 #ifdef __cplusplus
13676 extern "C"
13677 #endif
13678 /* We use char because int might match the return type of a gcc2
13679    builtin and then its argument prototype would still apply.  */
13680 char openpty ();
13681 int
13682 main ()
13683 {
13684 openpty ();
13685   ;
13686   return 0;
13687 }
13688 _ACEOF
13689 rm -f conftest.$ac_objext conftest$ac_exeext
13690 if { (eval echo "$as_me:13690: \"$ac_link\"") >&5
13691   (eval $ac_link) 2>&5
13692   ac_status=$?
13693   echo "$as_me:13693: \$? = $ac_status" >&5
13694   (exit $ac_status); } &&
13695          { ac_try='test -s conftest$ac_exeext'
13696   { (eval echo "$as_me:13696: \"$ac_try\"") >&5
13697   (eval $ac_try) 2>&5
13698   ac_status=$?
13699   echo "$as_me:13699: \$? = $ac_status" >&5
13700   (exit $ac_status); }; }; then
13701   ac_cv_lib_util_openpty=yes
13702 else
13703   echo "$as_me: failed program was:" >&5
13704 cat conftest.$ac_ext >&5
13705 ac_cv_lib_util_openpty=no
13706 fi
13707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13708 LIBS=$ac_check_lib_save_LIBS
13709 fi
13710 echo "$as_me:13710: result: $ac_cv_lib_util_openpty" >&5
13711 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13712 if test $ac_cv_lib_util_openpty = yes; then
13713   cf_cv_lib_util=yes
13714 else
13715   cf_cv_lib_util=no
13716 fi
13717
13718 echo "$as_me:13718: checking for openpty header" >&5
13719 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
13720 if test "${cf_cv_func_openpty+set}" = set; then
13721   echo $ECHO_N "(cached) $ECHO_C" >&6
13722 else
13723
13724     cf_save_LIBS="$LIBS"
13725     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
13726     for cf_header in pty.h libutil.h util.h
13727     do
13728     cat >conftest.$ac_ext <<_ACEOF
13729 #line 13729 "configure"
13730 #include "confdefs.h"
13731
13732 #include <$cf_header>
13733
13734 int
13735 main ()
13736 {
13737
13738     int x = openpty((int *)0, (int *)0, (char *)0,
13739                    (struct termios *)0, (struct winsize *)0);
13740
13741   ;
13742   return 0;
13743 }
13744 _ACEOF
13745 rm -f conftest.$ac_objext conftest$ac_exeext
13746 if { (eval echo "$as_me:13746: \"$ac_link\"") >&5
13747   (eval $ac_link) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); } &&
13751          { ac_try='test -s conftest$ac_exeext'
13752   { (eval echo "$as_me:13752: \"$ac_try\"") >&5
13753   (eval $ac_try) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit $ac_status); }; }; then
13757
13758         cf_cv_func_openpty=$cf_header
13759         break
13760
13761 else
13762   echo "$as_me: failed program was:" >&5
13763 cat conftest.$ac_ext >&5
13764
13765         cf_cv_func_openpty=no
13766
13767 fi
13768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13769     done
13770     LIBS="$cf_save_LIBS"
13771
13772 fi
13773 echo "$as_me:13773: result: $cf_cv_func_openpty" >&5
13774 echo "${ECHO_T}$cf_cv_func_openpty" >&6
13775
13776 if test "$cf_cv_func_openpty" != no ; then
13777     cat >>confdefs.h <<EOF
13778 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
13779 EOF
13780
13781     cat >>confdefs.h <<\EOF
13782 #define USE_XTERM_PTY 1
13783 EOF
13784
13785     if test "$cf_cv_lib_util" = yes ; then
13786         TEST_LIBS="-lutil $TEST_LIBS"
13787     fi
13788 fi
13789
13790 if test "$with_hashed_db" != no ; then
13791         cat >>confdefs.h <<\EOF
13792 #define USE_HASHED_DB 1
13793 EOF
13794
13795 case $with_hashed_db in #(vi
13796 yes|*able*) #(vi
13797     ;;
13798 *)
13799     if test -d "$with_hashed_db" ; then
13800
13801 if test -n "$with_hashed_db/include" ; then
13802   for cf_add_incdir in $with_hashed_db/include
13803   do
13804         while test $cf_add_incdir != /usr/include
13805         do
13806           if test -d $cf_add_incdir
13807           then
13808                 cf_have_incdir=no
13809                 if test -n "$CFLAGS$CPPFLAGS" ; then
13810                   # a loop is needed to ensure we can add subdirs of existing dirs
13811                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13812                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13813                           cf_have_incdir=yes; break
13814                         fi
13815                   done
13816                 fi
13817
13818                 if test "$cf_have_incdir" = no ; then
13819           if test "$cf_add_incdir" = /usr/local/include ; then
13820                         if test "$GCC" = yes
13821                         then
13822                           cf_save_CPPFLAGS=$CPPFLAGS
13823                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13824                           cat >conftest.$ac_ext <<_ACEOF
13825 #line 13825 "configure"
13826 #include "confdefs.h"
13827 #include <stdio.h>
13828 int
13829 main ()
13830 {
13831 printf("Hello")
13832   ;
13833   return 0;
13834 }
13835 _ACEOF
13836 rm -f conftest.$ac_objext
13837 if { (eval echo "$as_me:13837: \"$ac_compile\"") >&5
13838   (eval $ac_compile) 2>&5
13839   ac_status=$?
13840   echo "$as_me:13840: \$? = $ac_status" >&5
13841   (exit $ac_status); } &&
13842          { ac_try='test -s conftest.$ac_objext'
13843   { (eval echo "$as_me:13843: \"$ac_try\"") >&5
13844   (eval $ac_try) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); }; }; then
13848   :
13849 else
13850   echo "$as_me: failed program was:" >&5
13851 cat conftest.$ac_ext >&5
13852 cf_have_incdir=yes
13853 fi
13854 rm -f conftest.$ac_objext conftest.$ac_ext
13855                           CPPFLAGS=$cf_save_CPPFLAGS
13856                         fi
13857                   fi
13858                 fi
13859
13860                 if test "$cf_have_incdir" = no ; then
13861                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13862
13863 echo "${as_me-configure}:13863: testing adding $cf_add_incdir to include-path ..." 1>&5
13864
13865                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13866
13867           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13868           test "$cf_top_incdir" = "$cf_add_incdir" && break
13869           cf_add_incdir="$cf_top_incdir"
13870                 else
13871                   break
13872                 fi
13873           fi
13874         done
13875   done
13876 fi
13877
13878 if test -n "$with_hashed_db/lib" ; then
13879   for cf_add_libdir in $with_hashed_db/lib
13880   do
13881     if test $cf_add_libdir = /usr/lib ; then
13882       :
13883     elif test -d $cf_add_libdir
13884     then
13885       cf_have_libdir=no
13886       if test -n "$LDFLAGS$LIBS" ; then
13887         # a loop is needed to ensure we can add subdirs of existing dirs
13888         for cf_test_libdir in $LDFLAGS $LIBS ; do
13889           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13890             cf_have_libdir=yes; break
13891           fi
13892         done
13893       fi
13894       if test "$cf_have_libdir" = no ; then
13895         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13896
13897 echo "${as_me-configure}:13897: testing adding $cf_add_libdir to library-path ..." 1>&5
13898
13899         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13900       fi
13901     fi
13902   done
13903 fi
13904
13905     fi
13906 esac
13907
13908 echo "$as_me:13908: checking for db.h" >&5
13909 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13910 if test "${ac_cv_header_db_h+set}" = set; then
13911   echo $ECHO_N "(cached) $ECHO_C" >&6
13912 else
13913   cat >conftest.$ac_ext <<_ACEOF
13914 #line 13914 "configure"
13915 #include "confdefs.h"
13916 #include <db.h>
13917 _ACEOF
13918 if { (eval echo "$as_me:13918: \"$ac_cpp conftest.$ac_ext\"") >&5
13919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13920   ac_status=$?
13921   egrep -v '^ *\+' conftest.er1 >conftest.err
13922   rm -f conftest.er1
13923   cat conftest.err >&5
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit $ac_status); } >/dev/null; then
13926   if test -s conftest.err; then
13927     ac_cpp_err=$ac_c_preproc_warn_flag
13928   else
13929     ac_cpp_err=
13930   fi
13931 else
13932   ac_cpp_err=yes
13933 fi
13934 if test -z "$ac_cpp_err"; then
13935   ac_cv_header_db_h=yes
13936 else
13937   echo "$as_me: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939   ac_cv_header_db_h=no
13940 fi
13941 rm -f conftest.err conftest.$ac_ext
13942 fi
13943 echo "$as_me:13943: result: $ac_cv_header_db_h" >&5
13944 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13945 if test $ac_cv_header_db_h = yes; then
13946
13947 echo "$as_me:13947: checking for version of db" >&5
13948 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13949 if test "${cf_cv_hashed_db_version+set}" = set; then
13950   echo $ECHO_N "(cached) $ECHO_C" >&6
13951 else
13952
13953 cf_cv_hashed_db_version=unknown
13954
13955 for cf_db_version in 1 2 3 4 5
13956 do
13957
13958 echo "${as_me-configure}:13958: testing checking for db version $cf_db_version ..." 1>&5
13959
13960         cat >conftest.$ac_ext <<_ACEOF
13961 #line 13961 "configure"
13962 #include "confdefs.h"
13963
13964 $ac_includes_default
13965 #include <db.h>
13966
13967 #ifdef DB_VERSION_MAJOR
13968         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13969 #if $cf_db_version == DB_VERSION_MAJOR
13970         /* ok */
13971 #else
13972         make an error
13973 #endif
13974 #else
13975 #if $cf_db_version == 1
13976         /* ok: assuming this is DB 1.8.5 */
13977 #else
13978         make an error
13979 #endif
13980 #endif
13981
13982 int
13983 main ()
13984 {
13985 DBT *foo = 0
13986   ;
13987   return 0;
13988 }
13989 _ACEOF
13990 rm -f conftest.$ac_objext
13991 if { (eval echo "$as_me:13991: \"$ac_compile\"") >&5
13992   (eval $ac_compile) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); } &&
13996          { ac_try='test -s conftest.$ac_objext'
13997   { (eval echo "$as_me:13997: \"$ac_try\"") >&5
13998   (eval $ac_try) 2>&5
13999   ac_status=$?
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); }; }; then
14002
14003         cf_cv_hashed_db_version=$cf_db_version
14004         break
14005
14006 else
14007   echo "$as_me: failed program was:" >&5
14008 cat conftest.$ac_ext >&5
14009 fi
14010 rm -f conftest.$ac_objext conftest.$ac_ext
14011 done
14012
14013 fi
14014 echo "$as_me:14014: result: $cf_cv_hashed_db_version" >&5
14015 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14016
14017 if test "$cf_cv_hashed_db_version" = unknown ; then
14018         { { echo "$as_me:14018: error: Cannot determine version of db" >&5
14019 echo "$as_me: error: Cannot determine version of db" >&2;}
14020    { (exit 1); exit 1; }; }
14021 else
14022
14023 echo "$as_me:14023: checking for db libraries" >&5
14024 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14025 if test "${cf_cv_hashed_db_libs+set}" = set; then
14026   echo $ECHO_N "(cached) $ECHO_C" >&6
14027 else
14028
14029 cf_cv_hashed_db_libs=unknown
14030 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14031 do
14032         cf_save_libs="$LIBS"
14033         if test -n "$cf_db_libs"; then
14034                 LIBS="-l$cf_db_libs $LIBS"
14035         fi
14036
14037 echo "${as_me-configure}:14037: testing checking for library "$cf_db_libs" ..." 1>&5
14038
14039         cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042
14043 $ac_includes_default
14044 #include <db.h>
14045
14046 int
14047 main ()
14048 {
14049
14050         char *path = "/tmp/foo";
14051 #ifdef DB_VERSION_MAJOR
14052 #if DB_VERSION_MAJOR >= 4
14053         DB *result = 0;
14054         db_create(&result, NULL, 0);
14055         result->open(result,
14056                 NULL,
14057                 path,
14058                 path,
14059                 DB_HASH,
14060                 DB_CREATE,
14061                 0644);
14062 #elif DB_VERSION_MAJOR >= 3
14063         DB *result = 0;
14064         db_create(&result, NULL, 0);
14065         result->open(result,
14066                 path,
14067                 path,
14068                 DB_HASH,
14069                 DB_CREATE,
14070                 0644);
14071 #elif DB_VERSION_MAJOR >= 2
14072         DB *result = 0;
14073         db_open(path,
14074                 DB_HASH,
14075                 DB_CREATE,
14076                 0644,
14077                 (DB_ENV *) 0,
14078                 (DB_INFO *) 0,
14079                 &result);
14080 #endif /* DB_VERSION_MAJOR */
14081 #else
14082         DB *result = dbopen(path,
14083                      2,
14084                      0644,
14085                      DB_HASH,
14086                      0);
14087 #endif
14088         ${cf_cv_main_return:-return}(result != 0)
14089
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -f conftest.$ac_objext conftest$ac_exeext
14095 if { (eval echo "$as_me:14095: \"$ac_link\"") >&5
14096   (eval $ac_link) 2>&5
14097   ac_status=$?
14098   echo "$as_me:14098: \$? = $ac_status" >&5
14099   (exit $ac_status); } &&
14100          { ac_try='test -s conftest$ac_exeext'
14101   { (eval echo "$as_me:14101: \"$ac_try\"") >&5
14102   (eval $ac_try) 2>&5
14103   ac_status=$?
14104   echo "$as_me:14104: \$? = $ac_status" >&5
14105   (exit $ac_status); }; }; then
14106
14107         if test -n "$cf_db_libs" ; then
14108                 cf_cv_hashed_db_libs=$cf_db_libs
14109         else
14110                 cf_cv_hashed_db_libs=default
14111         fi
14112         LIBS="$cf_save_libs"
14113         break
14114
14115 else
14116   echo "$as_me: failed program was:" >&5
14117 cat conftest.$ac_ext >&5
14118 fi
14119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14120         LIBS="$cf_save_libs"
14121 done
14122
14123 fi
14124 echo "$as_me:14124: result: $cf_cv_hashed_db_libs" >&5
14125 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14126
14127         if test "$cf_cv_hashed_db_libs" = unknown ; then
14128                 { { echo "$as_me:14128: error: Cannot determine library for db" >&5
14129 echo "$as_me: error: Cannot determine library for db" >&2;}
14130    { (exit 1); exit 1; }; }
14131         elif test "$cf_cv_hashed_db_libs" != default ; then
14132                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14133         fi
14134 fi
14135
14136 else
14137
14138         { { echo "$as_me:14138: error: Cannot find db.h" >&5
14139 echo "$as_me: error: Cannot find db.h" >&2;}
14140    { (exit 1); exit 1; }; }
14141
14142 fi
14143
14144 fi
14145
14146 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14147         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14148         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14149 fi
14150
14151 # Just in case, check if the C compiler has a bool type.
14152
14153 echo "$as_me:14153: checking if we should include stdbool.h" >&5
14154 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14155
14156 if test "${cf_cv_header_stdbool_h+set}" = set; then
14157   echo $ECHO_N "(cached) $ECHO_C" >&6
14158 else
14159
14160         cat >conftest.$ac_ext <<_ACEOF
14161 #line 14161 "configure"
14162 #include "confdefs.h"
14163
14164 int
14165 main ()
14166 {
14167 bool foo = false
14168   ;
14169   return 0;
14170 }
14171 _ACEOF
14172 rm -f conftest.$ac_objext
14173 if { (eval echo "$as_me:14173: \"$ac_compile\"") >&5
14174   (eval $ac_compile) 2>&5
14175   ac_status=$?
14176   echo "$as_me:14176: \$? = $ac_status" >&5
14177   (exit $ac_status); } &&
14178          { ac_try='test -s conftest.$ac_objext'
14179   { (eval echo "$as_me:14179: \"$ac_try\"") >&5
14180   (eval $ac_try) 2>&5
14181   ac_status=$?
14182   echo "$as_me:14182: \$? = $ac_status" >&5
14183   (exit $ac_status); }; }; then
14184   cf_cv_header_stdbool_h=0
14185 else
14186   echo "$as_me: failed program was:" >&5
14187 cat conftest.$ac_ext >&5
14188 cat >conftest.$ac_ext <<_ACEOF
14189 #line 14189 "configure"
14190 #include "confdefs.h"
14191
14192 #ifndef __BEOS__
14193 #include <stdbool.h>
14194 #endif
14195
14196 int
14197 main ()
14198 {
14199 bool foo = false
14200   ;
14201   return 0;
14202 }
14203 _ACEOF
14204 rm -f conftest.$ac_objext
14205 if { (eval echo "$as_me:14205: \"$ac_compile\"") >&5
14206   (eval $ac_compile) 2>&5
14207   ac_status=$?
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit $ac_status); } &&
14210          { ac_try='test -s conftest.$ac_objext'
14211   { (eval echo "$as_me:14211: \"$ac_try\"") >&5
14212   (eval $ac_try) 2>&5
14213   ac_status=$?
14214   echo "$as_me:14214: \$? = $ac_status" >&5
14215   (exit $ac_status); }; }; then
14216   cf_cv_header_stdbool_h=1
14217 else
14218   echo "$as_me: failed program was:" >&5
14219 cat conftest.$ac_ext >&5
14220 cf_cv_header_stdbool_h=0
14221 fi
14222 rm -f conftest.$ac_objext conftest.$ac_ext
14223 fi
14224 rm -f conftest.$ac_objext conftest.$ac_ext
14225 fi
14226
14227 if test "$cf_cv_header_stdbool_h" = 1
14228 then    echo "$as_me:14228: result: yes" >&5
14229 echo "${ECHO_T}yes" >&6
14230 else    echo "$as_me:14230: result: no" >&5
14231 echo "${ECHO_T}no" >&6
14232 fi
14233
14234 echo "$as_me:14234: checking for builtin bool type" >&5
14235 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14236
14237 if test "${cf_cv_cc_bool_type+set}" = set; then
14238   echo $ECHO_N "(cached) $ECHO_C" >&6
14239 else
14240
14241         cat >conftest.$ac_ext <<_ACEOF
14242 #line 14242 "configure"
14243 #include "confdefs.h"
14244
14245 #include <stdio.h>
14246 #include <sys/types.h>
14247
14248 int
14249 main ()
14250 {
14251 bool x = false
14252   ;
14253   return 0;
14254 }
14255 _ACEOF
14256 rm -f conftest.$ac_objext
14257 if { (eval echo "$as_me:14257: \"$ac_compile\"") >&5
14258   (eval $ac_compile) 2>&5
14259   ac_status=$?
14260   echo "$as_me:14260: \$? = $ac_status" >&5
14261   (exit $ac_status); } &&
14262          { ac_try='test -s conftest.$ac_objext'
14263   { (eval echo "$as_me:14263: \"$ac_try\"") >&5
14264   (eval $ac_try) 2>&5
14265   ac_status=$?
14266   echo "$as_me:14266: \$? = $ac_status" >&5
14267   (exit $ac_status); }; }; then
14268   cf_cv_cc_bool_type=1
14269 else
14270   echo "$as_me: failed program was:" >&5
14271 cat conftest.$ac_ext >&5
14272 cf_cv_cc_bool_type=0
14273 fi
14274 rm -f conftest.$ac_objext conftest.$ac_ext
14275
14276 fi
14277
14278 if test "$cf_cv_cc_bool_type" = 1
14279 then    echo "$as_me:14279: result: yes" >&5
14280 echo "${ECHO_T}yes" >&6
14281 else    echo "$as_me:14281: result: no" >&5
14282 echo "${ECHO_T}no" >&6
14283 fi
14284
14285 # Check for C++ compiler characteristics (and ensure that it's there!)
14286 if test -n "$CXX" ; then
14287         ac_ext=cc
14288 ac_cpp='$CXXCPP $CPPFLAGS'
14289 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14290 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14291 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14292 ac_main_return=return
14293
14294 if test -n "$GXX" ; then
14295 case $cf_cv_system_name in #(vi
14296 os2*) #(vi
14297         cf_stdcpp_libname=stdcpp
14298         ;;
14299 *)
14300         cf_stdcpp_libname=stdc++
14301         ;;
14302 esac
14303 echo "$as_me:14303: checking for library $cf_stdcpp_libname" >&5
14304 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14305 if test "${cf_cv_libstdcpp+set}" = set; then
14306   echo $ECHO_N "(cached) $ECHO_C" >&6
14307 else
14308
14309         cf_save="$LIBS"
14310         LIBS="$LIBS -l$cf_stdcpp_libname"
14311 cat >conftest.$ac_ext <<_ACEOF
14312 #line 14312 "configure"
14313 #include "confdefs.h"
14314
14315 #include <strstream.h>
14316 int
14317 main ()
14318 {
14319
14320 char buf[80];
14321 strstreambuf foo(buf, sizeof(buf))
14322
14323   ;
14324   return 0;
14325 }
14326 _ACEOF
14327 rm -f conftest.$ac_objext conftest$ac_exeext
14328 if { (eval echo "$as_me:14328: \"$ac_link\"") >&5
14329   (eval $ac_link) 2>&5
14330   ac_status=$?
14331   echo "$as_me:14331: \$? = $ac_status" >&5
14332   (exit $ac_status); } &&
14333          { ac_try='test -s conftest$ac_exeext'
14334   { (eval echo "$as_me:14334: \"$ac_try\"") >&5
14335   (eval $ac_try) 2>&5
14336   ac_status=$?
14337   echo "$as_me:14337: \$? = $ac_status" >&5
14338   (exit $ac_status); }; }; then
14339   cf_cv_libstdcpp=yes
14340 else
14341   echo "$as_me: failed program was:" >&5
14342 cat conftest.$ac_ext >&5
14343 cf_cv_libstdcpp=no
14344 fi
14345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14346         LIBS="$cf_save"
14347
14348 fi
14349 echo "$as_me:14349: result: $cf_cv_libstdcpp" >&5
14350 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14351 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14352 fi
14353
14354         echo "$as_me:14354: checking whether $CXX understands -c and -o together" >&5
14355 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14356 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14357   echo $ECHO_N "(cached) $ECHO_C" >&6
14358 else
14359
14360 cat > conftest.$ac_ext <<CF_EOF
14361 #include <stdio.h>
14362 int main()
14363 {
14364         ${cf_cv_main_return:-return}(0);
14365 }
14366 CF_EOF
14367 # We do the test twice because some compilers refuse to overwrite an
14368 # existing .o file with -o, though they will create one.
14369 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14370 if { (eval echo "$as_me:14370: \"$ac_try\"") >&5
14371   (eval $ac_try) 2>&5
14372   ac_status=$?
14373   echo "$as_me:14373: \$? = $ac_status" >&5
14374   (exit $ac_status); } &&
14375   test -f conftest2.$ac_objext && { (eval echo "$as_me:14375: \"$ac_try\"") >&5
14376   (eval $ac_try) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit $ac_status); };
14380 then
14381   eval cf_cv_prog_CXX_c_o=yes
14382 else
14383   eval cf_cv_prog_CXX_c_o=no
14384 fi
14385 rm -f conftest*
14386
14387 fi
14388 if test $cf_cv_prog_CXX_c_o = yes; then
14389   echo "$as_me:14389: result: yes" >&5
14390 echo "${ECHO_T}yes" >&6
14391 else
14392   echo "$as_me:14392: result: no" >&5
14393 echo "${ECHO_T}no" >&6
14394 fi
14395
14396         case $GXX_VERSION in
14397         1*|2.0-6*)
14398                 cf_cxx_library=yes
14399                 ;;
14400         *-2.7*|2.7*)
14401
14402 cf_cxx_library=unknown
14403 case $cf_cv_system_name in #(vi
14404 os2*) #(vi
14405         cf_gpp_libname=gpp
14406         ;;
14407 *)
14408         cf_gpp_libname=g++
14409         ;;
14410 esac
14411 if test "$GXX" = yes; then
14412         echo "$as_me:14412: checking for lib$cf_gpp_libname" >&5
14413 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14414         cf_save="$LIBS"
14415         LIBS="$LIBS -l$cf_gpp_libname"
14416         cat >conftest.$ac_ext <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419
14420 #include <$cf_gpp_libname/builtin.h>
14421
14422 int
14423 main ()
14424 {
14425 two_arg_error_handler_t foo2 = lib_error_handler
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 rm -f conftest.$ac_objext conftest$ac_exeext
14431 if { (eval echo "$as_me:14431: \"$ac_link\"") >&5
14432   (eval $ac_link) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit $ac_status); } &&
14436          { ac_try='test -s conftest$ac_exeext'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit $ac_status); }; }; then
14442   cf_cxx_library=yes
14443          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14444          if test "$cf_gpp_libname" = cpp ; then
14445             cat >>confdefs.h <<\EOF
14446 #define HAVE_GPP_BUILTIN_H 1
14447 EOF
14448
14449          else
14450             cat >>confdefs.h <<\EOF
14451 #define HAVE_GXX_BUILTIN_H 1
14452 EOF
14453
14454          fi
14455 else
14456   echo "$as_me: failed program was:" >&5
14457 cat conftest.$ac_ext >&5
14458 cat >conftest.$ac_ext <<_ACEOF
14459 #line 14459 "configure"
14460 #include "confdefs.h"
14461
14462 #include <builtin.h>
14463
14464 int
14465 main ()
14466 {
14467 two_arg_error_handler_t foo2 = lib_error_handler
14468   ;
14469   return 0;
14470 }
14471 _ACEOF
14472 rm -f conftest.$ac_objext conftest$ac_exeext
14473 if { (eval echo "$as_me:14473: \"$ac_link\"") >&5
14474   (eval $ac_link) 2>&5
14475   ac_status=$?
14476   echo "$as_me:14476: \$? = $ac_status" >&5
14477   (exit $ac_status); } &&
14478          { ac_try='test -s conftest$ac_exeext'
14479   { (eval echo "$as_me:14479: \"$ac_try\"") >&5
14480   (eval $ac_try) 2>&5
14481   ac_status=$?
14482   echo "$as_me:14482: \$? = $ac_status" >&5
14483   (exit $ac_status); }; }; then
14484   cf_cxx_library=yes
14485          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14486          cat >>confdefs.h <<\EOF
14487 #define HAVE_BUILTIN_H 1
14488 EOF
14489
14490 else
14491   echo "$as_me: failed program was:" >&5
14492 cat conftest.$ac_ext >&5
14493 cf_cxx_library=no
14494 fi
14495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14496 fi
14497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14498         LIBS="$cf_save"
14499         echo "$as_me:14499: result: $cf_cxx_library" >&5
14500 echo "${ECHO_T}$cf_cxx_library" >&6
14501 fi
14502
14503                 ;;
14504         *)
14505                 cf_cxx_library=no
14506                 ;;
14507         esac
14508
14509         ac_ext=cc
14510 ac_cpp='$CXXCPP $CPPFLAGS'
14511 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14512 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14513 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14514 ac_main_return=return
14515 echo "$as_me:14515: checking how to run the C++ preprocessor" >&5
14516 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14517 if test -z "$CXXCPP"; then
14518   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14519   echo $ECHO_N "(cached) $ECHO_C" >&6
14520 else
14521       # Double quotes because CXXCPP needs to be expanded
14522     for CXXCPP in "$CXX -E" "/lib/cpp"
14523     do
14524       ac_preproc_ok=false
14525 for ac_cxx_preproc_warn_flag in '' yes
14526 do
14527   # Use a header file that comes with gcc, so configuring glibc
14528   # with a fresh cross-compiler works.
14529   # On the NeXT, cc -E runs the code through the compiler's parser,
14530   # not just through cpp. "Syntax error" is here to catch this case.
14531   cat >conftest.$ac_ext <<_ACEOF
14532 #line 14532 "configure"
14533 #include "confdefs.h"
14534 #include <assert.h>
14535                      Syntax error
14536 _ACEOF
14537 if { (eval echo "$as_me:14537: \"$ac_cpp conftest.$ac_ext\"") >&5
14538   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14539   ac_status=$?
14540   egrep -v '^ *\+' conftest.er1 >conftest.err
14541   rm -f conftest.er1
14542   cat conftest.err >&5
14543   echo "$as_me:14543: \$? = $ac_status" >&5
14544   (exit $ac_status); } >/dev/null; then
14545   if test -s conftest.err; then
14546     ac_cpp_err=$ac_cxx_preproc_warn_flag
14547   else
14548     ac_cpp_err=
14549   fi
14550 else
14551   ac_cpp_err=yes
14552 fi
14553 if test -z "$ac_cpp_err"; then
14554   :
14555 else
14556   echo "$as_me: failed program was:" >&5
14557   cat conftest.$ac_ext >&5
14558   # Broken: fails on valid input.
14559 continue
14560 fi
14561 rm -f conftest.err conftest.$ac_ext
14562
14563   # OK, works on sane cases.  Now check whether non-existent headers
14564   # can be detected and how.
14565   cat >conftest.$ac_ext <<_ACEOF
14566 #line 14566 "configure"
14567 #include "confdefs.h"
14568 #include <ac_nonexistent.h>
14569 _ACEOF
14570 if { (eval echo "$as_me:14570: \"$ac_cpp conftest.$ac_ext\"") >&5
14571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14572   ac_status=$?
14573   egrep -v '^ *\+' conftest.er1 >conftest.err
14574   rm -f conftest.er1
14575   cat conftest.err >&5
14576   echo "$as_me:14576: \$? = $ac_status" >&5
14577   (exit $ac_status); } >/dev/null; then
14578   if test -s conftest.err; then
14579     ac_cpp_err=$ac_cxx_preproc_warn_flag
14580   else
14581     ac_cpp_err=
14582   fi
14583 else
14584   ac_cpp_err=yes
14585 fi
14586 if test -z "$ac_cpp_err"; then
14587   # Broken: success on invalid input.
14588 continue
14589 else
14590   echo "$as_me: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   # Passes both tests.
14593 ac_preproc_ok=:
14594 break
14595 fi
14596 rm -f conftest.err conftest.$ac_ext
14597
14598 done
14599 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14600 rm -f conftest.err conftest.$ac_ext
14601 if $ac_preproc_ok; then
14602   break
14603 fi
14604
14605     done
14606     ac_cv_prog_CXXCPP=$CXXCPP
14607
14608 fi
14609   CXXCPP=$ac_cv_prog_CXXCPP
14610 else
14611   ac_cv_prog_CXXCPP=$CXXCPP
14612 fi
14613 echo "$as_me:14613: result: $CXXCPP" >&5
14614 echo "${ECHO_T}$CXXCPP" >&6
14615 ac_preproc_ok=false
14616 for ac_cxx_preproc_warn_flag in '' yes
14617 do
14618   # Use a header file that comes with gcc, so configuring glibc
14619   # with a fresh cross-compiler works.
14620   # On the NeXT, cc -E runs the code through the compiler's parser,
14621   # not just through cpp. "Syntax error" is here to catch this case.
14622   cat >conftest.$ac_ext <<_ACEOF
14623 #line 14623 "configure"
14624 #include "confdefs.h"
14625 #include <assert.h>
14626                      Syntax error
14627 _ACEOF
14628 if { (eval echo "$as_me:14628: \"$ac_cpp conftest.$ac_ext\"") >&5
14629   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14630   ac_status=$?
14631   egrep -v '^ *\+' conftest.er1 >conftest.err
14632   rm -f conftest.er1
14633   cat conftest.err >&5
14634   echo "$as_me:14634: \$? = $ac_status" >&5
14635   (exit $ac_status); } >/dev/null; then
14636   if test -s conftest.err; then
14637     ac_cpp_err=$ac_cxx_preproc_warn_flag
14638   else
14639     ac_cpp_err=
14640   fi
14641 else
14642   ac_cpp_err=yes
14643 fi
14644 if test -z "$ac_cpp_err"; then
14645   :
14646 else
14647   echo "$as_me: failed program was:" >&5
14648   cat conftest.$ac_ext >&5
14649   # Broken: fails on valid input.
14650 continue
14651 fi
14652 rm -f conftest.err conftest.$ac_ext
14653
14654   # OK, works on sane cases.  Now check whether non-existent headers
14655   # can be detected and how.
14656   cat >conftest.$ac_ext <<_ACEOF
14657 #line 14657 "configure"
14658 #include "confdefs.h"
14659 #include <ac_nonexistent.h>
14660 _ACEOF
14661 if { (eval echo "$as_me:14661: \"$ac_cpp conftest.$ac_ext\"") >&5
14662   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14663   ac_status=$?
14664   egrep -v '^ *\+' conftest.er1 >conftest.err
14665   rm -f conftest.er1
14666   cat conftest.err >&5
14667   echo "$as_me:14667: \$? = $ac_status" >&5
14668   (exit $ac_status); } >/dev/null; then
14669   if test -s conftest.err; then
14670     ac_cpp_err=$ac_cxx_preproc_warn_flag
14671   else
14672     ac_cpp_err=
14673   fi
14674 else
14675   ac_cpp_err=yes
14676 fi
14677 if test -z "$ac_cpp_err"; then
14678   # Broken: success on invalid input.
14679 continue
14680 else
14681   echo "$as_me: failed program was:" >&5
14682   cat conftest.$ac_ext >&5
14683   # Passes both tests.
14684 ac_preproc_ok=:
14685 break
14686 fi
14687 rm -f conftest.err conftest.$ac_ext
14688
14689 done
14690 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14691 rm -f conftest.err conftest.$ac_ext
14692 if $ac_preproc_ok; then
14693   :
14694 else
14695   { { echo "$as_me:14695: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14696 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14697    { (exit 1); exit 1; }; }
14698 fi
14699
14700 ac_ext=cc
14701 ac_cpp='$CXXCPP $CPPFLAGS'
14702 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14703 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14704 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14705 ac_main_return=return
14706
14707 for ac_header in iostream typeinfo
14708 do
14709 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14710 echo "$as_me:14710: checking for $ac_header" >&5
14711 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14712 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14713   echo $ECHO_N "(cached) $ECHO_C" >&6
14714 else
14715   cat >conftest.$ac_ext <<_ACEOF
14716 #line 14716 "configure"
14717 #include "confdefs.h"
14718 #include <$ac_header>
14719 _ACEOF
14720 if { (eval echo "$as_me:14720: \"$ac_cpp conftest.$ac_ext\"") >&5
14721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14722   ac_status=$?
14723   egrep -v '^ *\+' conftest.er1 >conftest.err
14724   rm -f conftest.er1
14725   cat conftest.err >&5
14726   echo "$as_me:14726: \$? = $ac_status" >&5
14727   (exit $ac_status); } >/dev/null; then
14728   if test -s conftest.err; then
14729     ac_cpp_err=$ac_cxx_preproc_warn_flag
14730   else
14731     ac_cpp_err=
14732   fi
14733 else
14734   ac_cpp_err=yes
14735 fi
14736 if test -z "$ac_cpp_err"; then
14737   eval "$as_ac_Header=yes"
14738 else
14739   echo "$as_me: failed program was:" >&5
14740   cat conftest.$ac_ext >&5
14741   eval "$as_ac_Header=no"
14742 fi
14743 rm -f conftest.err conftest.$ac_ext
14744 fi
14745 echo "$as_me:14745: result: `eval echo '${'$as_ac_Header'}'`" >&5
14746 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14748   cat >>confdefs.h <<EOF
14749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14750 EOF
14751
14752 fi
14753 done
14754
14755 echo "$as_me:14755: checking if we should include stdbool.h" >&5
14756 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14757
14758 if test "${cf_cv_header_stdbool_h+set}" = set; then
14759   echo $ECHO_N "(cached) $ECHO_C" >&6
14760 else
14761
14762         cat >conftest.$ac_ext <<_ACEOF
14763 #line 14763 "configure"
14764 #include "confdefs.h"
14765
14766 int
14767 main ()
14768 {
14769 bool foo = false
14770   ;
14771   return 0;
14772 }
14773 _ACEOF
14774 rm -f conftest.$ac_objext
14775 if { (eval echo "$as_me:14775: \"$ac_compile\"") >&5
14776   (eval $ac_compile) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); } &&
14780          { ac_try='test -s conftest.$ac_objext'
14781   { (eval echo "$as_me:14781: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786   cf_cv_header_stdbool_h=0
14787 else
14788   echo "$as_me: failed program was:" >&5
14789 cat conftest.$ac_ext >&5
14790 cat >conftest.$ac_ext <<_ACEOF
14791 #line 14791 "configure"
14792 #include "confdefs.h"
14793
14794 #ifndef __BEOS__
14795 #include <stdbool.h>
14796 #endif
14797
14798 int
14799 main ()
14800 {
14801 bool foo = false
14802   ;
14803   return 0;
14804 }
14805 _ACEOF
14806 rm -f conftest.$ac_objext
14807 if { (eval echo "$as_me:14807: \"$ac_compile\"") >&5
14808   (eval $ac_compile) 2>&5
14809   ac_status=$?
14810   echo "$as_me:14810: \$? = $ac_status" >&5
14811   (exit $ac_status); } &&
14812          { ac_try='test -s conftest.$ac_objext'
14813   { (eval echo "$as_me:14813: \"$ac_try\"") >&5
14814   (eval $ac_try) 2>&5
14815   ac_status=$?
14816   echo "$as_me:14816: \$? = $ac_status" >&5
14817   (exit $ac_status); }; }; then
14818   cf_cv_header_stdbool_h=1
14819 else
14820   echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14822 cf_cv_header_stdbool_h=0
14823 fi
14824 rm -f conftest.$ac_objext conftest.$ac_ext
14825 fi
14826 rm -f conftest.$ac_objext conftest.$ac_ext
14827 fi
14828
14829 if test "$cf_cv_header_stdbool_h" = 1
14830 then    echo "$as_me:14830: result: yes" >&5
14831 echo "${ECHO_T}yes" >&6
14832 else    echo "$as_me:14832: result: no" >&5
14833 echo "${ECHO_T}no" >&6
14834 fi
14835
14836 echo "$as_me:14836: checking for builtin bool type" >&5
14837 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14838
14839 if test "${cf_cv_builtin_bool+set}" = set; then
14840   echo $ECHO_N "(cached) $ECHO_C" >&6
14841 else
14842
14843         cat >conftest.$ac_ext <<_ACEOF
14844 #line 14844 "configure"
14845 #include "confdefs.h"
14846
14847 #include <stdio.h>
14848 #include <sys/types.h>
14849
14850 int
14851 main ()
14852 {
14853 bool x = false
14854   ;
14855   return 0;
14856 }
14857 _ACEOF
14858 rm -f conftest.$ac_objext
14859 if { (eval echo "$as_me:14859: \"$ac_compile\"") >&5
14860   (eval $ac_compile) 2>&5
14861   ac_status=$?
14862   echo "$as_me:14862: \$? = $ac_status" >&5
14863   (exit $ac_status); } &&
14864          { ac_try='test -s conftest.$ac_objext'
14865   { (eval echo "$as_me:14865: \"$ac_try\"") >&5
14866   (eval $ac_try) 2>&5
14867   ac_status=$?
14868   echo "$as_me:14868: \$? = $ac_status" >&5
14869   (exit $ac_status); }; }; then
14870   cf_cv_builtin_bool=1
14871 else
14872   echo "$as_me: failed program was:" >&5
14873 cat conftest.$ac_ext >&5
14874 cf_cv_builtin_bool=0
14875 fi
14876 rm -f conftest.$ac_objext conftest.$ac_ext
14877
14878 fi
14879
14880 if test "$cf_cv_builtin_bool" = 1
14881 then    echo "$as_me:14881: result: yes" >&5
14882 echo "${ECHO_T}yes" >&6
14883 else    echo "$as_me:14883: result: no" >&5
14884 echo "${ECHO_T}no" >&6
14885 fi
14886
14887 echo "$as_me:14887: checking for size of bool" >&5
14888 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14889 if test "${cf_cv_type_of_bool+set}" = set; then
14890   echo $ECHO_N "(cached) $ECHO_C" >&6
14891 else
14892
14893         rm -f cf_test.out
14894         if test "$cross_compiling" = yes; then
14895   cf_cv_type_of_bool=unknown
14896 else
14897   cat >conftest.$ac_ext <<_ACEOF
14898 #line 14898 "configure"
14899 #include "confdefs.h"
14900
14901 #include <stdlib.h>
14902 #include <stdio.h>
14903
14904 #if defined(__cplusplus)
14905
14906 #ifdef HAVE_GXX_BUILTIN_H
14907 #include <g++/builtin.h>
14908 #elif HAVE_GPP_BUILTIN_H
14909 #include <gpp/builtin.h>
14910 #elif HAVE_BUILTIN_H
14911 #include <builtin.h>
14912 #endif
14913
14914 #else
14915
14916 #if $cf_cv_header_stdbool_h
14917 #include <stdbool.h>
14918 #endif
14919
14920 #endif
14921
14922 main()
14923 {
14924         FILE *fp = fopen("cf_test.out", "w");
14925         if (fp != 0) {
14926                 bool x = true;
14927                 if ((bool)(-x) >= 0)
14928                         fputs("unsigned ", fp);
14929                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14930                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14931                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14932                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14933                 fclose(fp);
14934         }
14935         ${cf_cv_main_return:-return}(0);
14936 }
14937
14938 _ACEOF
14939 rm -f conftest$ac_exeext
14940 if { (eval echo "$as_me:14940: \"$ac_link\"") >&5
14941   (eval $ac_link) 2>&5
14942   ac_status=$?
14943   echo "$as_me:14943: \$? = $ac_status" >&5
14944   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14945   { (eval echo "$as_me:14945: \"$ac_try\"") >&5
14946   (eval $ac_try) 2>&5
14947   ac_status=$?
14948   echo "$as_me:14948: \$? = $ac_status" >&5
14949   (exit $ac_status); }; }; then
14950   cf_cv_type_of_bool=`cat cf_test.out`
14951                  if test -z "$cf_cv_type_of_bool"; then
14952                    cf_cv_type_of_bool=unknown
14953                  fi
14954 else
14955   echo "$as_me: program exited with status $ac_status" >&5
14956 echo "$as_me: failed program was:" >&5
14957 cat conftest.$ac_ext >&5
14958 cf_cv_type_of_bool=unknown
14959 fi
14960 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14961 fi
14962
14963 fi
14964
14965         rm -f cf_test.out
14966 echo "$as_me:14966: result: $cf_cv_type_of_bool" >&5
14967 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14968 if test "$cf_cv_type_of_bool" = unknown ; then
14969         case .$NCURSES_BOOL in #(vi
14970         .auto|.) NCURSES_BOOL=unsigned;;
14971         esac
14972         { echo "$as_me:14972: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14973 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14974         cf_cv_type_of_bool=$NCURSES_BOOL
14975 fi
14976
14977 echo "$as_me:14977: checking for special defines needed for etip.h" >&5
14978 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14979 cf_save_CXXFLAGS="$CXXFLAGS"
14980 cf_result="none"
14981 for cf_math in "" MATH_H
14982 do
14983 for cf_excp in "" MATH_EXCEPTION
14984 do
14985         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14986         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14987         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14988 cat >conftest.$ac_ext <<_ACEOF
14989 #line 14989 "configure"
14990 #include "confdefs.h"
14991
14992 #include <etip.h.in>
14993
14994 int
14995 main ()
14996 {
14997
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext
15003 if { (eval echo "$as_me:15003: \"$ac_compile\"") >&5
15004   (eval $ac_compile) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); } &&
15008          { ac_try='test -s conftest.$ac_objext'
15009   { (eval echo "$as_me:15009: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); }; }; then
15014
15015         test -n "$cf_math" && cat >>confdefs.h <<EOF
15016 #define ETIP_NEEDS_${cf_math} 1
15017 EOF
15018
15019         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15020 #define ETIP_NEEDS_${cf_excp} 1
15021 EOF
15022
15023         cf_result="$cf_math $cf_excp"
15024         break
15025
15026 else
15027   echo "$as_me: failed program was:" >&5
15028 cat conftest.$ac_ext >&5
15029 fi
15030 rm -f conftest.$ac_objext conftest.$ac_ext
15031 done
15032 done
15033 echo "$as_me:15033: result: $cf_result" >&5
15034 echo "${ECHO_T}$cf_result" >&6
15035 CXXFLAGS="$cf_save_CXXFLAGS"
15036
15037 if test -n "$CXX"; then
15038 echo "$as_me:15038: checking if $CXX accepts parameter initialization" >&5
15039 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15040 if test "${cf_cv_cpp_param_init+set}" = set; then
15041   echo $ECHO_N "(cached) $ECHO_C" >&6
15042 else
15043
15044         ac_ext=cc
15045 ac_cpp='$CXXCPP $CPPFLAGS'
15046 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15047 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15048 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15049 ac_main_return=return
15050
15051         if test "$cross_compiling" = yes; then
15052   cf_cv_cpp_param_init=unknown
15053 else
15054   cat >conftest.$ac_ext <<_ACEOF
15055 #line 15055 "configure"
15056 #include "confdefs.h"
15057
15058 class TEST {
15059 private:
15060         int value;
15061 public:
15062         TEST(int x = 1);
15063         ~TEST();
15064 };
15065
15066 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15067 {
15068         value = x;
15069 }
15070 void main() { }
15071
15072 _ACEOF
15073 rm -f conftest$ac_exeext
15074 if { (eval echo "$as_me:15074: \"$ac_link\"") >&5
15075   (eval $ac_link) 2>&5
15076   ac_status=$?
15077   echo "$as_me:15077: \$? = $ac_status" >&5
15078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15079   { (eval echo "$as_me:15079: \"$ac_try\"") >&5
15080   (eval $ac_try) 2>&5
15081   ac_status=$?
15082   echo "$as_me:15082: \$? = $ac_status" >&5
15083   (exit $ac_status); }; }; then
15084   cf_cv_cpp_param_init=yes
15085 else
15086   echo "$as_me: program exited with status $ac_status" >&5
15087 echo "$as_me: failed program was:" >&5
15088 cat conftest.$ac_ext >&5
15089 cf_cv_cpp_param_init=no
15090 fi
15091 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15092 fi
15093         ac_ext=cc
15094 ac_cpp='$CXXCPP $CPPFLAGS'
15095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15098 ac_main_return=return
15099
15100 fi
15101 echo "$as_me:15101: result: $cf_cv_cpp_param_init" >&5
15102 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15103 fi
15104 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15105 #define CPP_HAS_PARAM_INIT 1
15106 EOF
15107
15108 if test -n "$CXX"; then
15109
15110 echo "$as_me:15110: checking if $CXX accepts static_cast" >&5
15111 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15112 if test "${cf_cv_cpp_static_cast+set}" = set; then
15113   echo $ECHO_N "(cached) $ECHO_C" >&6
15114 else
15115
15116         ac_ext=cc
15117 ac_cpp='$CXXCPP $CPPFLAGS'
15118 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15119 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15120 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15121 ac_main_return=return
15122
15123         cat >conftest.$ac_ext <<_ACEOF
15124 #line 15124 "configure"
15125 #include "confdefs.h"
15126
15127 class NCursesPanel
15128 {
15129 public:
15130   NCursesPanel(int nlines,
15131                int ncols,
15132                int begin_y = 0,
15133                int begin_x = 0)
15134   {
15135   }
15136
15137   ~NCursesPanel();
15138 };
15139
15140 template<class T> class NCursesUserPanel : public NCursesPanel
15141 {
15142 public:
15143   NCursesUserPanel (int nlines,
15144                     int ncols,
15145                     int begin_y = 0,
15146                     int begin_x = 0,
15147                     const T* p_UserData = static_cast<T*>(0))
15148     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15149   {
15150   };
15151   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15152   {
15153   };
15154
15155   virtual ~NCursesUserPanel() {};
15156 };
15157
15158 int
15159 main ()
15160 {
15161
15162         const char* p_UserData = static_cast<char*>(0)
15163   ;
15164   return 0;
15165 }
15166 _ACEOF
15167 rm -f conftest.$ac_objext
15168 if { (eval echo "$as_me:15168: \"$ac_compile\"") >&5
15169   (eval $ac_compile) 2>&5
15170   ac_status=$?
15171   echo "$as_me:15171: \$? = $ac_status" >&5
15172   (exit $ac_status); } &&
15173          { ac_try='test -s conftest.$ac_objext'
15174   { (eval echo "$as_me:15174: \"$ac_try\"") >&5
15175   (eval $ac_try) 2>&5
15176   ac_status=$?
15177   echo "$as_me:15177: \$? = $ac_status" >&5
15178   (exit $ac_status); }; }; then
15179   cf_cv_cpp_static_cast=yes
15180 else
15181   echo "$as_me: failed program was:" >&5
15182 cat conftest.$ac_ext >&5
15183 cf_cv_cpp_static_cast=no
15184 fi
15185 rm -f conftest.$ac_objext conftest.$ac_ext
15186
15187         ac_ext=cc
15188 ac_cpp='$CXXCPP $CPPFLAGS'
15189 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15190 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15191 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15192 ac_main_return=return
15193
15194 fi
15195 echo "$as_me:15195: result: $cf_cv_cpp_static_cast" >&5
15196 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15197
15198 fi
15199
15200 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15201 #define CPP_HAS_STATIC_CAST 1
15202 EOF
15203
15204         CXX_AR='$(AR)'
15205         CXX_AR_OPTS='$(AR_OPTS)'
15206         case $cf_cv_system_name in #(vi
15207         irix*) #(vi
15208             if test "$GXX" != yes ; then
15209                 CXX_AR='$(CXX)'
15210                 CXX_AR_OPTS='-ar -o'
15211             fi
15212             ;;
15213         sco3.2v5*) #(vi
15214             CXXLDFLAGS="-u main"
15215             ;;
15216         solaris2*)
15217             if test "$GXX" != yes ; then
15218                 CXX_AR='$(CXX)'
15219                 CXX_AR_OPTS='-xar -o'
15220             fi
15221             ;;
15222         esac
15223
15224 else
15225         cf_cxx_library=no
15226         cf_cv_builtin_bool=1
15227
15228         # Just because we are not configuring against C++ right now does not
15229         # mean that a user will not want to use C++.  Some distributors disable
15230         # the C++ portion of this configuration as a shortcut (or just to avoid
15231         # compiling the demo in the c++ directory).  So we need a reasonable
15232         # default for the 'bool' type.
15233         #
15234         # Caveat: since the storage of the bool type is not standardized, it
15235         # may change.
15236
15237         if test "$NCURSES_BOOL" != auto ; then
15238                 cf_cv_type_of_bool=$NCURSES_BOOL
15239                 cf_cv_header_stdbool_h=0
15240         else
15241                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15242
15243 echo "$as_me:15243: checking for size of bool" >&5
15244 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15245 if test "${cf_cv_type_of_bool+set}" = set; then
15246   echo $ECHO_N "(cached) $ECHO_C" >&6
15247 else
15248
15249         rm -f cf_test.out
15250         if test "$cross_compiling" = yes; then
15251   cf_cv_type_of_bool=unknown
15252 else
15253   cat >conftest.$ac_ext <<_ACEOF
15254 #line 15254 "configure"
15255 #include "confdefs.h"
15256
15257 #include <stdlib.h>
15258 #include <stdio.h>
15259
15260 #if defined(__cplusplus)
15261
15262 #ifdef HAVE_GXX_BUILTIN_H
15263 #include <g++/builtin.h>
15264 #elif HAVE_GPP_BUILTIN_H
15265 #include <gpp/builtin.h>
15266 #elif HAVE_BUILTIN_H
15267 #include <builtin.h>
15268 #endif
15269
15270 #else
15271
15272 #if $cf_cv_header_stdbool_h
15273 #include <stdbool.h>
15274 #endif
15275
15276 #endif
15277
15278 main()
15279 {
15280         FILE *fp = fopen("cf_test.out", "w");
15281         if (fp != 0) {
15282                 bool x = true;
15283                 if ((bool)(-x) >= 0)
15284                         fputs("unsigned ", fp);
15285                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15286                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15287                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15288                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15289                 fclose(fp);
15290         }
15291         ${cf_cv_main_return:-return}(0);
15292 }
15293
15294 _ACEOF
15295 rm -f conftest$ac_exeext
15296 if { (eval echo "$as_me:15296: \"$ac_link\"") >&5
15297   (eval $ac_link) 2>&5
15298   ac_status=$?
15299   echo "$as_me:15299: \$? = $ac_status" >&5
15300   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15301   { (eval echo "$as_me:15301: \"$ac_try\"") >&5
15302   (eval $ac_try) 2>&5
15303   ac_status=$?
15304   echo "$as_me:15304: \$? = $ac_status" >&5
15305   (exit $ac_status); }; }; then
15306   cf_cv_type_of_bool=`cat cf_test.out`
15307                  if test -z "$cf_cv_type_of_bool"; then
15308                    cf_cv_type_of_bool=unknown
15309                  fi
15310 else
15311   echo "$as_me: program exited with status $ac_status" >&5
15312 echo "$as_me: failed program was:" >&5
15313 cat conftest.$ac_ext >&5
15314 cf_cv_type_of_bool=unknown
15315 fi
15316 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15317 fi
15318
15319 fi
15320
15321         rm -f cf_test.out
15322 echo "$as_me:15322: result: $cf_cv_type_of_bool" >&5
15323 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15324 if test "$cf_cv_type_of_bool" = unknown ; then
15325         case .$NCURSES_BOOL in #(vi
15326         .auto|.) NCURSES_BOOL=unsigned;;
15327         esac
15328         { echo "$as_me:15328: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15329 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15330         cf_cv_type_of_bool=$NCURSES_BOOL
15331 fi
15332
15333                 else
15334                         echo "$as_me:15334: checking for fallback type of bool" >&5
15335 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15336                         case "$host_cpu" in #(vi
15337                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15338                         *)      cf_cv_type_of_bool=int  ;;
15339                         esac
15340                         echo "$as_me:15340: result: $cf_cv_type_of_bool" >&5
15341 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15342                 fi
15343         fi
15344 fi
15345
15346 # If the C compiler did not declare bool, and we did not determine that the C++
15347 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15348 # ncurses library use the same type as C++ bool.  Note that this allows one to
15349 # specify the type of bool in a configure-script option and postpone
15350 # integration with the C++ compiler provided that the types are compatible.
15351 USE_CXX_BOOL=1
15352 if test $cf_cv_cc_bool_type = 1
15353 then
15354         # oops: C has a bool.  Unlikely, but C++ could differ.
15355         USE_CXX_BOOL=0
15356 elif test $cf_cv_builtin_bool = 0
15357 then
15358         # C++ has no bool
15359         USE_CXX_BOOL=0
15360 else
15361         # this is the normal case
15362         USE_CXX_BOOL='defined(__cplusplus)'
15363 fi
15364
15365 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15366
15367 if test "$cf_with_ada" != "no" ; then
15368     if test "$with_libtool" != "no"; then
15369         { echo "$as_me:15369: WARNING: libtool does not support Ada - disabling feature" >&5
15370 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15371         cf_with_ada=no
15372     fi
15373 fi
15374
15375 if test "$cf_with_ada" != "no" ; then
15376 cf_ada_make=gnatmake
15377 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15378 set dummy $cf_ada_make; ac_word=$2
15379 echo "$as_me:15379: checking for $ac_word" >&5
15380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15381 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384   if test -n "$gnat_exists"; then
15385   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15386 else
15387   ac_save_IFS=$IFS; IFS=$ac_path_separator
15388 ac_dummy="$PATH"
15389 for ac_dir in $ac_dummy; do
15390   IFS=$ac_save_IFS
15391   test -z "$ac_dir" && ac_dir=.
15392   $as_executable_p "$ac_dir/$ac_word" || continue
15393 ac_cv_prog_gnat_exists="yes"
15394 echo "$as_me:15394: found $ac_dir/$ac_word" >&5
15395 break
15396 done
15397
15398   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15399 fi
15400 fi
15401 gnat_exists=$ac_cv_prog_gnat_exists
15402 if test -n "$gnat_exists"; then
15403   echo "$as_me:15403: result: $gnat_exists" >&5
15404 echo "${ECHO_T}$gnat_exists" >&6
15405 else
15406   echo "$as_me:15406: result: no" >&5
15407 echo "${ECHO_T}no" >&6
15408 fi
15409
15410 if test "$ac_cv_prog_gnat_exists" = no; then
15411    cf_ada_make=
15412 else
15413
15414 echo "$as_me:15414: checking for gnat version" >&5
15415 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15416 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15417   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15418 echo "$as_me:15418: result: $cf_gnat_version" >&5
15419 echo "${ECHO_T}$cf_gnat_version" >&6
15420
15421 case $cf_gnat_version in
15422   3.1[1-9]*|3.[2-9]*|[4-9].*)
15423     cf_cv_prog_gnat_correct=yes
15424     ;;
15425   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15426      cf_cv_prog_gnat_correct=no
15427      ;;
15428 esac
15429 case $cf_gnat_version in
15430   3.[1-9]*|[4-9].*)
15431       cf_compile_generics=generics
15432       cf_generic_objects="\${GENOBJS}"
15433       ;;
15434   *)  cf_compile_generics=
15435       cf_generic_objects=
15436       ;;
15437 esac
15438
15439    # Extract the first word of "m4", so it can be a program name with args.
15440 set dummy m4; ac_word=$2
15441 echo "$as_me:15441: checking for $ac_word" >&5
15442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15443 if test "${ac_cv_prog_M4_exists+set}" = set; then
15444   echo $ECHO_N "(cached) $ECHO_C" >&6
15445 else
15446   if test -n "$M4_exists"; then
15447   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15448 else
15449   ac_save_IFS=$IFS; IFS=$ac_path_separator
15450 ac_dummy="$PATH"
15451 for ac_dir in $ac_dummy; do
15452   IFS=$ac_save_IFS
15453   test -z "$ac_dir" && ac_dir=.
15454   $as_executable_p "$ac_dir/$ac_word" || continue
15455 ac_cv_prog_M4_exists="yes"
15456 echo "$as_me:15456: found $ac_dir/$ac_word" >&5
15457 break
15458 done
15459
15460   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15461 fi
15462 fi
15463 M4_exists=$ac_cv_prog_M4_exists
15464 if test -n "$M4_exists"; then
15465   echo "$as_me:15465: result: $M4_exists" >&5
15466 echo "${ECHO_T}$M4_exists" >&6
15467 else
15468   echo "$as_me:15468: result: no" >&5
15469 echo "${ECHO_T}no" >&6
15470 fi
15471
15472    if test "$ac_cv_prog_M4_exists" = no; then
15473       cf_cv_prog_gnat_correct=no
15474       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15475    fi
15476    if test "$cf_cv_prog_gnat_correct" = yes; then
15477       echo "$as_me:15477: checking if GNAT works" >&5
15478 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15479
15480 rm -f conftest*
15481 cat >>conftest.ads <<CF_EOF
15482 procedure conftest;
15483 CF_EOF
15484 cat >>conftest.adb <<CF_EOF
15485 with Text_IO;
15486 with GNAT.OS_Lib;
15487 procedure conftest is
15488 begin
15489    Text_IO.Put ("Hello World");
15490    Text_IO.New_Line;
15491    GNAT.OS_Lib.OS_Exit (0);
15492 end conftest;
15493 CF_EOF
15494 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15495    if ( ./conftest 1>&5 2>&1 ) ; then
15496       cf_cv_prog_gnat_correct=yes
15497    else
15498       cf_cv_prog_gnat_correct=no
15499    fi
15500 else
15501    cf_cv_prog_gnat_correct=no
15502 fi
15503 rm -f conftest*
15504
15505       echo "$as_me:15505: result: $cf_cv_prog_gnat_correct" >&5
15506 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15507    fi
15508 fi
15509 if test "$cf_cv_prog_gnat_correct" = yes; then
15510    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15511
15512    echo "$as_me:15512: checking if GNAT pragma Unreferenced works" >&5
15513 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15514
15515 rm -f conftest*
15516 cat >>conftest.ads <<CF_EOF
15517 procedure conftest;
15518 CF_EOF
15519 cat >>conftest.adb <<CF_EOF
15520 with Text_IO;
15521 with GNAT.OS_Lib;
15522 procedure conftest is
15523    test : Integer;
15524    pragma Unreferenced (test);
15525 begin
15526    test := 1;
15527    Text_IO.Put ("Hello World");
15528    Text_IO.New_Line;
15529    GNAT.OS_Lib.OS_Exit (0);
15530 end conftest;
15531 CF_EOF
15532 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15533       cf_cv_pragma_unreferenced=yes
15534 else
15535    cf_cv_pragma_unreferenced=no
15536 fi
15537 rm -f conftest*
15538
15539    echo "$as_me:15539: result: $cf_cv_pragma_unreferenced" >&5
15540 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15541
15542    # if the pragma is supported, use it (needed in the Trace code).
15543    if test $cf_cv_pragma_unreferenced = yes ; then
15544       PRAGMA_UNREF=TRUE
15545    else
15546       PRAGMA_UNREF=FALSE
15547    fi
15548
15549 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15550 if test "${with_ada_compiler+set}" = set; then
15551   withval="$with_ada_compiler"
15552   cf_ada_compiler=$withval
15553 else
15554   cf_ada_compiler=gnatmake
15555 fi;
15556
15557    cf_ada_package=terminal_interface
15558
15559 # Check whether --with-ada-include or --without-ada-include was given.
15560 if test "${with_ada_include+set}" = set; then
15561   withval="$with_ada_include"
15562
15563 else
15564   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15565 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15566
15567 if test "x$prefix" != xNONE; then
15568   cf_path_syntax="$prefix"
15569 else
15570   cf_path_syntax="$ac_default_prefix"
15571 fi
15572
15573 case ".$withval" in #(vi
15574 .\$\(*\)*|.\'*\'*) #(vi
15575   ;;
15576 ..|./*|.\\*) #(vi
15577   ;;
15578 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15579   ;;
15580 .\${*prefix}*) #(vi
15581   eval withval="$withval"
15582   case ".$withval" in #(vi
15583   .NONE/*)
15584     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15585     ;;
15586   esac
15587   ;; #(vi
15588 .no|.NONE/*)
15589   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15590   ;;
15591 *)
15592   { { echo "$as_me:15592: error: expected a pathname, not \"$withval\"" >&5
15593 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15594    { (exit 1); exit 1; }; }
15595   ;;
15596 esac
15597
15598 fi
15599 ADA_INCLUDE="$withval"
15600
15601 # Check whether --with-ada-objects or --without-ada-objects was given.
15602 if test "${with_ada_objects+set}" = set; then
15603   withval="$with_ada_objects"
15604
15605 else
15606   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15607 fi; if test -n "$prefix/lib/ada/adalib" ; then
15608
15609 if test "x$prefix" != xNONE; then
15610   cf_path_syntax="$prefix"
15611 else
15612   cf_path_syntax="$ac_default_prefix"
15613 fi
15614
15615 case ".$withval" in #(vi
15616 .\$\(*\)*|.\'*\'*) #(vi
15617   ;;
15618 ..|./*|.\\*) #(vi
15619   ;;
15620 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15621   ;;
15622 .\${*prefix}*) #(vi
15623   eval withval="$withval"
15624   case ".$withval" in #(vi
15625   .NONE/*)
15626     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15627     ;;
15628   esac
15629   ;; #(vi
15630 .no|.NONE/*)
15631   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15632   ;;
15633 *)
15634   { { echo "$as_me:15634: error: expected a pathname, not \"$withval\"" >&5
15635 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15636    { (exit 1); exit 1; }; }
15637   ;;
15638 esac
15639
15640 fi
15641 ADA_OBJECTS="$withval"
15642
15643 fi
15644 fi
15645 else
15646    cf_with_ada=no
15647 fi
15648
15649 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15650 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15651 ###
15652 ### ticlib modules may be a separate library, otherwise contained in termlib.
15653 ### termlib modules may be a separate library, otherwise contained in ncurses.
15654 ###
15655 ### The of "+" or " " between the tokens controls the way the script
15656 ### chooses to split module lists into libraries.
15657 ###
15658 ### (see CF_LIB_RULES).
15659 echo "$as_me:15659: checking for library subsets" >&5
15660 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15661 LIB_SUBSETS=
15662
15663 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15664         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15665         if test "$with_ticlib" != no ; then
15666                 LIB_SUBSETS="${LIB_SUBSETS} "
15667         else
15668                 LIB_SUBSETS="${LIB_SUBSETS}+"
15669         fi
15670 fi
15671
15672 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15673 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15674 if test "$with_termlib" != no ; then
15675         LIB_SUBSETS="${LIB_SUBSETS} "
15676 else
15677         LIB_SUBSETS="${LIB_SUBSETS}+"
15678 fi
15679
15680 LIB_SUBSETS="${LIB_SUBSETS}base"
15681 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15682 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15683
15684 echo "$as_me:15684: result: $LIB_SUBSETS" >&5
15685 echo "${ECHO_T}$LIB_SUBSETS" >&6
15686
15687 ### Construct the list of include-directories to be generated
15688
15689 CPPFLAGS="-I. -I../include $CPPFLAGS"
15690 if test "$srcdir" != "."; then
15691         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15692 fi
15693 if test "$GCC" != yes; then
15694         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15695 elif test "$includedir" != "/usr/include"; then
15696         if test "$includedir" = '${prefix}/include' ; then
15697                 if test $prefix != /usr ; then
15698                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15699                 fi
15700         else
15701                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15702         fi
15703 fi
15704
15705 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15706 if test "$srcdir" != "."; then
15707         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15708 fi
15709 if test "$GCC" != yes; then
15710         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15711 elif test "$includedir" != "/usr/include"; then
15712         if test "$includedir" = '${prefix}/include' ; then
15713                 if test $prefix != /usr ; then
15714                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15715                 fi
15716         else
15717                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15718         fi
15719 fi
15720
15721 ### Build up pieces for makefile rules
15722 echo "$as_me:15722: checking default library suffix" >&5
15723 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15724
15725         case $DFT_LWR_MODEL in
15726         libtool) DFT_ARG_SUFFIX=''   ;;
15727         normal)  DFT_ARG_SUFFIX=''   ;;
15728         debug)   DFT_ARG_SUFFIX='_g' ;;
15729         profile) DFT_ARG_SUFFIX='_p' ;;
15730         shared)  DFT_ARG_SUFFIX=''   ;;
15731         esac
15732         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15733 echo "$as_me:15733: result: $DFT_ARG_SUFFIX" >&5
15734 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15735
15736 echo "$as_me:15736: checking default library-dependency suffix" >&5
15737 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15738
15739         case $DFT_LWR_MODEL in
15740         libtool) DFT_DEP_SUFFIX='.la'  ;;
15741         normal)  DFT_DEP_SUFFIX='.a'   ;;
15742         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15743         profile) DFT_DEP_SUFFIX='_p.a' ;;
15744         shared)
15745                 case $cf_cv_system_name in
15746                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15747                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15748                 hpux*)
15749                         case $target in
15750                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15751                         *)      DFT_DEP_SUFFIX='.sl' ;;
15752                         esac
15753                         ;;
15754                 *)      DFT_DEP_SUFFIX='.so'  ;;
15755                 esac
15756         esac
15757         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15758 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15759 if test $DFT_LWR_MODEL = shared ; then
15760         case $cf_cv_system_name in #(vi
15761         cygwin*)
15762                 DFT_DEP_SUFFIX=".dll.a"
15763                 DFT_LIB_SUFFIX=".dll"
15764                 ;;
15765         esac
15766 fi
15767 echo "$as_me:15767: result: $DFT_DEP_SUFFIX" >&5
15768 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15769
15770 echo "$as_me:15770: checking default object directory" >&5
15771 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15772
15773         case $DFT_LWR_MODEL in
15774         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15775         normal)  DFT_OBJ_SUBDIR='objects' ;;
15776         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15777         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15778         shared)
15779                 case $cf_cv_system_name in #(vi
15780                 cygwin) #(vi
15781                         DFT_OBJ_SUBDIR='objects' ;;
15782                 *)
15783                         DFT_OBJ_SUBDIR='obj_s' ;;
15784                 esac
15785         esac
15786 echo "$as_me:15786: result: $DFT_OBJ_SUBDIR" >&5
15787 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15788
15789 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15790 if test "$cf_with_cxx" = yes ; then
15791 echo "$as_me:15791: checking c++ library-dependency suffix" >&5
15792 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15793 if test "$with_libtool" != "no"; then
15794         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15795 else
15796
15797         case normal in
15798         libtool) CXX_LIB_SUFFIX='.la'  ;;
15799         normal)  CXX_LIB_SUFFIX='.a'   ;;
15800         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15801         profile) CXX_LIB_SUFFIX='_p.a' ;;
15802         shared)
15803                 case $cf_cv_system_name in
15804                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15805                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15806                 hpux*)
15807                         case $target in
15808                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15809                         *)      CXX_LIB_SUFFIX='.sl' ;;
15810                         esac
15811                         ;;
15812                 *)      CXX_LIB_SUFFIX='.so'  ;;
15813                 esac
15814         esac
15815         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15816 fi
15817 echo "$as_me:15817: result: $CXX_LIB_SUFFIX" >&5
15818 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15819
15820 fi
15821
15822 # do not want -ldl in build except as needed for -lncurses dependency
15823 if test "$with_dlsym" = yes ; then
15824 if test $DFT_LWR_MODEL = shared || \
15825    test $DFT_LWR_MODEL = libtool ; then
15826
15827 # remove dl library from $LIBS
15828 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15829
15830 fi
15831 fi
15832 ### Set up low-level terminfo dependencies for makefiles.
15833
15834 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15835 # do not need libdl
15836 TICS_LIST=
15837 if test "$with_dlsym" = yes ; then
15838
15839 # remove dl library from $SHLIB_LIST
15840 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15841
15842 fi
15843
15844 if test "$with_ticlib" != no ; then
15845
15846         if test "$with_ticlib" != yes ; then
15847                 TICS_NAME=$with_ticlib
15848                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15849                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15850                 TICS_LIB_SUFFIX="${with_ticlib}"
15851         else
15852                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15853                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15854                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15855         fi
15856         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15857 else
15858         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15859 fi
15860
15861 if test "$with_termlib" != no ; then
15862
15863         if test "$with_termlib" != yes ; then
15864                 TINFO_NAME=$with_termlib
15865                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15866                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15867                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15868                 TINFO_LIB_SUFFIX="${with_termlib}"
15869         else
15870                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15871                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15872                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15873                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15874         fi
15875
15876         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15877         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15878         if test "$DFT_LWR_MODEL" = "libtool"; then
15879                 TEST_ARGS="${TEST_DEPS}"
15880                 TEST_ARG2="${TEST_DEP2}"
15881                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15882         else
15883                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15884                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15885                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15886                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15887                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15888         fi
15889 else
15890         # the next lines are needed for linking libtic over libncurses
15891         TINFO_NAME=${LIB_NAME}
15892         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15893         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15894         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15895
15896         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15897 fi
15898
15899 if test "$DFT_LWR_MODEL" = shared ; then
15900         case $cf_cv_system_name in #(vi
15901         cygwin*)
15902                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15903                 TINFO_SUFFIX=.dll
15904                 ;;
15905         esac
15906 fi
15907
15908 if test "$with_dlsym" = yes ; then
15909
15910 # remove dl library from $TICS_LIST
15911 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15912
15913 fi
15914
15915 if test "$DFT_LWR_MODEL" = "libtool"; then
15916     OBJEXT=lo
15917 fi
15918
15919 # needed for Ada95
15920 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15921
15922 case $DFT_LWR_MODEL in
15923 normal|debug|profile)
15924
15925 if test "$GCC" = yes ; then
15926         case $cf_cv_system_name in #(
15927         aix[45]*)       #( gcc 4.2.4 linkage on AIX is broken
15928                 LDFLAGS_STATIC=
15929                 LDFLAGS_SHARED=
15930                 ;;
15931     *)  #( normally, except when broken
15932         LDFLAGS_STATIC=-static
15933         LDFLAGS_SHARED=-dynamic
15934         ;;
15935     esac
15936 else
15937         case $cf_cv_system_name in #(
15938         aix[45]*)       #( from ld manpage
15939                 LDFLAGS_STATIC=-bstatic
15940                 LDFLAGS_SHARED=-bdynamic
15941                 ;;
15942         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15943                 # We could also use just "archive" and "shared".
15944                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15945                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15946                 ;;
15947         irix*)          #( from ld manpage IRIX64
15948                 LDFLAGS_STATIC=-Bstatic
15949                 LDFLAGS_SHARED=-Bdynamic
15950                 ;;
15951         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15952                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15953                 LDFLAGS_STATIC=-noso
15954                 LDFLAGS_SHARED=-so_archive
15955                 ;;
15956         solaris2*)
15957                 LDFLAGS_STATIC=-Bstatic
15958                 LDFLAGS_SHARED=-Bdynamic
15959                 ;;
15960         esac
15961 fi
15962
15963         ;;
15964 esac
15965
15966 echo "$as_me:15966: checking where we will install curses.h" >&5
15967 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15968 test "$with_overwrite" = no && \
15969 test "x$includedir" = 'x${prefix}/include' && \
15970         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15971 echo "$as_me:15971: result: $includedir" >&5
15972 echo "${ECHO_T}$includedir" >&6
15973
15974 ### Resolve a conflict between normal and wide-curses by forcing applications
15975 ### that will need libutf8 to add it to their configure script.
15976 if test "$with_overwrite" != no ; then
15977 if test "$NCURSES_LIBUTF8" = 1 ; then
15978         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15979         { echo "$as_me:15979: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15980 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15981 fi
15982 fi
15983
15984 # used to separate tack out of the tree
15985 NCURSES_TREE=
15986
15987 ### predefined stuff for the test programs
15988 cat >>confdefs.h <<\EOF
15989 #define HAVE_SLK_COLOR 1
15990 EOF
15991
15992 ### Construct the list of subdirectories for which we'll customize makefiles
15993 ### with the appropriate compile-rules.
15994
15995 echo "$as_me:15995: checking for src modules" >&5
15996 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15997
15998 # dependencies and linker-arguments for test-programs
15999 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16000 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16001 if test "$DFT_LWR_MODEL" = "libtool"; then
16002         TEST_ARGS="${TEST_DEPS}"
16003         TEST_ARG2="${TEST_DEP2}"
16004 else
16005         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16006         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16007 fi
16008
16009 cf_cv_src_modules=
16010 for cf_dir in $modules_to_build
16011 do
16012         if test -f $srcdir/$cf_dir/modules; then
16013
16014                 # We may/may not have tack in the distribution, though the
16015                 # makefile is.
16016                 if test $cf_dir = tack ; then
16017                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16018                                 continue
16019                         fi
16020                 fi
16021
16022                 if test -z "$cf_cv_src_modules"; then
16023                         cf_cv_src_modules=$cf_dir
16024                 else
16025                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16026                 fi
16027
16028                 # Make the ncurses_cfg.h file record the library interface files as
16029                 # well.  These are header files that are the same name as their
16030                 # directory.  Ncurses is the only library that does not follow
16031                 # that pattern.
16032                 if test $cf_dir = tack ; then
16033                         continue
16034                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16035
16036 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16037
16038                         cat >>confdefs.h <<EOF
16039 #define HAVE_${cf_have_include}_H 1
16040 EOF
16041
16042                         cat >>confdefs.h <<EOF
16043 #define HAVE_LIB${cf_have_include} 1
16044 EOF
16045
16046                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16047                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16048                         if test "$DFT_LWR_MODEL" = "libtool"; then
16049                                 TEST_ARGS="${TEST_DEPS}"
16050                                 TEST_ARG2="${TEST_DEP2}"
16051                         else
16052                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16053                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16054                         fi
16055                 fi
16056         fi
16057 done
16058 echo "$as_me:16058: result: $cf_cv_src_modules" >&5
16059 echo "${ECHO_T}$cf_cv_src_modules" >&6
16060
16061 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16062 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16063
16064 SRC_SUBDIRS="man include"
16065 for cf_dir in $cf_cv_src_modules
16066 do
16067         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16068 done
16069 SRC_SUBDIRS="$SRC_SUBDIRS test"
16070 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16071 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16072
16073 ADA_SUBDIRS=
16074 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16075    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16076    ADA_SUBDIRS="gen src samples"
16077 fi
16078
16079 SUB_MAKEFILES=
16080 for cf_dir in $SRC_SUBDIRS
16081 do
16082         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16083 done
16084
16085 if test -n "$ADA_SUBDIRS"; then
16086    for cf_dir in $ADA_SUBDIRS
16087    do
16088       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16089    done
16090
16091 fi
16092
16093 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16094    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16095 fi
16096
16097 DIRS_TO_MAKE="lib"
16098 for cf_item in $cf_list_models
16099 do
16100
16101         case $cf_item in
16102         libtool) cf_subdir='obj_lo'  ;;
16103         normal)  cf_subdir='objects' ;;
16104         debug)   cf_subdir='obj_g' ;;
16105         profile) cf_subdir='obj_p' ;;
16106         shared)
16107                 case $cf_cv_system_name in #(vi
16108                 cygwin) #(vi
16109                         cf_subdir='objects' ;;
16110                 *)
16111                         cf_subdir='obj_s' ;;
16112                 esac
16113         esac
16114
16115         for cf_item2 in $DIRS_TO_MAKE
16116         do
16117                 test $cf_item2 = $cf_subdir && break
16118         done
16119         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16120 done
16121 for cf_dir in $DIRS_TO_MAKE
16122 do
16123         test ! -d $cf_dir && mkdir $cf_dir
16124 done
16125
16126 cat >>confdefs.h <<EOF
16127 #define NCURSES_PATHSEP '$PATHSEP'
16128 EOF
16129
16130 cat >>confdefs.h <<EOF
16131 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16132 EOF
16133
16134 ### Now that we're done running tests, add the compiler-warnings, if any
16135
16136 cf_fix_cppflags=no
16137 cf_new_cflags=
16138 cf_new_cppflags=
16139 cf_new_extra_cppflags=
16140
16141 for cf_add_cflags in $EXTRA_CFLAGS
16142 do
16143 case $cf_fix_cppflags in
16144 no)
16145         case $cf_add_cflags in #(vi
16146         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16147                 case $cf_add_cflags in
16148                 -D*)
16149                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16150
16151                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16152                         && test -z "${cf_tst_cflags}" \
16153                         && cf_fix_cppflags=yes
16154
16155                         if test $cf_fix_cppflags = yes ; then
16156                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16157                                 continue
16158                         elif test "${cf_tst_cflags}" = "\"'" ; then
16159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16160                                 continue
16161                         fi
16162                         ;;
16163                 esac
16164                 case "$CPPFLAGS" in
16165                 *$cf_add_cflags) #(vi
16166                         ;;
16167                 *) #(vi
16168                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16169                         ;;
16170                 esac
16171                 ;;
16172         *)
16173                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16174                 ;;
16175         esac
16176         ;;
16177 yes)
16178         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16179
16180         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16181
16182         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16183         && test -z "${cf_tst_cflags}" \
16184         && cf_fix_cppflags=no
16185         ;;
16186 esac
16187 done
16188
16189 if test -n "$cf_new_cflags" ; then
16190
16191         CFLAGS="$CFLAGS $cf_new_cflags"
16192 fi
16193
16194 if test -n "$cf_new_cppflags" ; then
16195
16196         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16197 fi
16198
16199 if test -n "$cf_new_extra_cppflags" ; then
16200
16201         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16202 fi
16203
16204 ### If we're building with rpath, try to link non-standard libs that way too.
16205 if test "$DFT_LWR_MODEL" = "shared"; then
16206
16207 echo "$as_me:16207: checking for updated LDFLAGS" >&5
16208 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16209 if test -n "$LDFLAGS" ; then
16210 echo "$as_me:16210: result: maybe" >&5
16211 echo "${ECHO_T}maybe" >&6
16212 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16213
16214 echo "${as_me-configure}:16214: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16215
16216 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16217
16218 echo "${as_me-configure}:16218: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16219
16220 case "$EXTRA_LDFLAGS" in #(vi
16221 -Wl,-rpath,*) #(vi
16222     cf_rpath_hack="-Wl,-rpath,"
16223     ;;
16224 -R\ *)
16225     cf_rpath_hack="-R "
16226     ;;
16227 -R*)
16228     cf_rpath_hack="-R"
16229     ;;
16230 *)
16231     cf_rpath_hack=
16232     ;;
16233 esac
16234 if test -n "$cf_rpath_hack" ; then
16235     cf_rpath_dst=
16236     for cf_rpath_src in $LDFLAGS
16237     do
16238         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16239
16240 echo "${as_me-configure}:16240: testing Filtering $cf_rpath_src ..." 1>&5
16241
16242         case $cf_rpath_src in #(vi
16243         -L*) #(vi
16244             if test "$cf_rpath_hack" = "-R " ; then
16245                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16246             else
16247                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16248             fi
16249             test -n "$verbose" && echo "        ...Filter $cf_rpath_tmp" 1>&6
16250
16251 echo "${as_me-configure}:16251: testing ...Filter $cf_rpath_tmp ..." 1>&5
16252
16253             EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16254             ;;
16255         *)
16256             cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16257             ;;
16258         esac
16259     done
16260     LDFLAGS=$cf_rpath_dst
16261     test -n "$verbose" && echo "        ...checked LDFLAGS $LDFLAGS" 1>&6
16262
16263 echo "${as_me-configure}:16263: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16264
16265     test -n "$verbose" && echo "        ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16266
16267 echo "${as_me-configure}:16267: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16268
16269 fi
16270 else
16271 echo "$as_me:16271: result: no" >&5
16272 echo "${ECHO_T}no" >&6
16273 fi
16274
16275 fi
16276
16277 ### Define substitutions for header files to avoid name-pollution
16278
16279 if test "$cf_cv_have_tcgetattr" = yes ; then
16280         HAVE_TCGETATTR=1
16281 else
16282         HAVE_TCGETATTR=0
16283 fi
16284
16285 if test "$ac_cv_header_termio_h" = yes ; then
16286         HAVE_TERMIO_H=1
16287 else
16288         HAVE_TERMIO_H=0
16289 fi
16290
16291 if test "$ac_cv_header_termios_h" = yes ; then
16292         HAVE_TERMIOS_H=1
16293 else
16294         HAVE_TERMIOS_H=0
16295 fi
16296
16297 ################################################################################
16298 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16299 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16300 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"
16301 ac_config_commands="$ac_config_commands default"
16302 cat >confcache <<\_ACEOF
16303 # This file is a shell script that caches the results of configure
16304 # tests run on this system so they can be shared between configure
16305 # scripts and configure runs, see configure's option --config-cache.
16306 # It is not useful on other systems.  If it contains results you don't
16307 # want to keep, you may remove or edit it.
16308 #
16309 # config.status only pays attention to the cache file if you give it
16310 # the --recheck option to rerun configure.
16311 #
16312 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16313 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16314 # following values.
16315
16316 _ACEOF
16317
16318 # The following way of writing the cache mishandles newlines in values,
16319 # but we know of no workaround that is simple, portable, and efficient.
16320 # So, don't put newlines in cache variables' values.
16321 # Ultrix sh set writes to stderr and can't be redirected directly,
16322 # and sets the high bit in the cache file unless we assign to the vars.
16323 {
16324   (set) 2>&1 |
16325     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16326     *ac_space=\ *)
16327       # `set' does not quote correctly, so add quotes (double-quote
16328       # substitution turns \\\\ into \\, and sed turns \\ into \).
16329       sed -n \
16330         "s/'/'\\\\''/g;
16331           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16332       ;;
16333     *)
16334       # `set' quotes correctly as required by POSIX, so do not add quotes.
16335       sed -n \
16336         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16337       ;;
16338     esac;
16339 } |
16340   sed '
16341      t clear
16342      : clear
16343      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16344      t end
16345      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16346      : end' >>confcache
16347 if cmp -s $cache_file confcache; then :; else
16348   if test -w $cache_file; then
16349     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16350     cat confcache >$cache_file
16351   else
16352     echo "not updating unwritable cache $cache_file"
16353   fi
16354 fi
16355 rm -f confcache
16356
16357 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16358 # Let make expand exec_prefix.
16359 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16360
16361 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16362 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16363 # trailing colons and then remove the whole line if VPATH becomes empty
16364 # (actually we leave an empty line to preserve line numbers).
16365 if test "x$srcdir" = x.; then
16366   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16367 s/:*\$(srcdir):*/:/;
16368 s/:*\${srcdir}:*/:/;
16369 s/:*@srcdir@:*/:/;
16370 s/^\([^=]*=[    ]*\):*/\1/;
16371 s/:*$//;
16372 s/^[^=]*=[      ]*$//;
16373 }'
16374 fi
16375
16376 DEFS=-DHAVE_CONFIG_H
16377
16378 : ${CONFIG_STATUS=./config.status}
16379 ac_clean_files_save=$ac_clean_files
16380 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16381 { echo "$as_me:16381: creating $CONFIG_STATUS" >&5
16382 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16383 cat >$CONFIG_STATUS <<_ACEOF
16384 #! $SHELL
16385 # Generated automatically by configure.
16386 # Run this file to recreate the current configuration.
16387 # Compiler output produced by configure, useful for debugging
16388 # configure, is in config.log if it exists.
16389
16390 debug=false
16391 SHELL=\${CONFIG_SHELL-$SHELL}
16392 ac_cs_invocation="\$0 \$@"
16393
16394 _ACEOF
16395
16396 cat >>$CONFIG_STATUS <<\_ACEOF
16397 # Be Bourne compatible
16398 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16399   emulate sh
16400   NULLCMD=:
16401 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16402   set -o posix
16403 fi
16404
16405 # Name of the executable.
16406 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16407
16408 if expr a : '\(a\)' >/dev/null 2>&1; then
16409   as_expr=expr
16410 else
16411   as_expr=false
16412 fi
16413
16414 rm -f conf$$ conf$$.exe conf$$.file
16415 echo >conf$$.file
16416 if ln -s conf$$.file conf$$ 2>/dev/null; then
16417   # We could just check for DJGPP; but this test a) works b) is more generic
16418   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16419   if test -f conf$$.exe; then
16420     # Don't use ln at all; we don't have any links
16421     as_ln_s='cp -p'
16422   else
16423     as_ln_s='ln -s'
16424   fi
16425 elif ln conf$$.file conf$$ 2>/dev/null; then
16426   as_ln_s=ln
16427 else
16428   as_ln_s='cp -p'
16429 fi
16430 rm -f conf$$ conf$$.exe conf$$.file
16431
16432 as_executable_p="test -f"
16433
16434 # Support unset when possible.
16435 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16436   as_unset=unset
16437 else
16438   as_unset=false
16439 fi
16440
16441 # NLS nuisances.
16442 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16443 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16444 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16445 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16446 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16447 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16448 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16449 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16450
16451 # IFS
16452 # We need space, tab and new line, in precisely that order.
16453 as_nl='
16454 '
16455 IFS="   $as_nl"
16456
16457 # CDPATH.
16458 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16459
16460 exec 6>&1
16461
16462 _ACEOF
16463
16464 # Files that config.status was made for.
16465 if test -n "$ac_config_files"; then
16466   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16467 fi
16468
16469 if test -n "$ac_config_headers"; then
16470   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16471 fi
16472
16473 if test -n "$ac_config_links"; then
16474   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16475 fi
16476
16477 if test -n "$ac_config_commands"; then
16478   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16479 fi
16480
16481 cat >>$CONFIG_STATUS <<\EOF
16482
16483 ac_cs_usage="\
16484 \`$as_me' instantiates files from templates according to the
16485 current configuration.
16486
16487 Usage: $0 [OPTIONS] [FILE]...
16488
16489   -h, --help       print this help, then exit
16490   -V, --version    print version number, then exit
16491   -d, --debug      don't remove temporary files
16492       --recheck    update $as_me by reconfiguring in the same conditions
16493   --file=FILE[:TEMPLATE]
16494                    instantiate the configuration file FILE
16495   --header=FILE[:TEMPLATE]
16496                    instantiate the configuration header FILE
16497
16498 Configuration files:
16499 $config_files
16500
16501 Configuration headers:
16502 $config_headers
16503
16504 Configuration commands:
16505 $config_commands
16506
16507 Report bugs to <bug-autoconf@gnu.org>."
16508 EOF
16509
16510 cat >>$CONFIG_STATUS <<EOF
16511 ac_cs_version="\\
16512 config.status
16513 configured by $0, generated by GNU Autoconf 2.52.20080325,
16514   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16515
16516 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16517 Free Software Foundation, Inc.
16518 This config.status script is free software; the Free Software Foundation
16519 gives unlimited permission to copy, distribute and modify it."
16520 srcdir=$srcdir
16521 INSTALL="$INSTALL"
16522 EOF
16523
16524 cat >>$CONFIG_STATUS <<\EOF
16525 # If no file are specified by the user, then we need to provide default
16526 # value.  By we need to know if files were specified by the user.
16527 ac_need_defaults=:
16528 while test $# != 0
16529 do
16530   case $1 in
16531   --*=*)
16532     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16533     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16534     shift
16535     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16536     shift
16537     ;;
16538   -*);;
16539   *) # This is not an option, so the user has probably given explicit
16540      # arguments.
16541      ac_need_defaults=false;;
16542   esac
16543
16544   case $1 in
16545   # Handling of the options.
16546 EOF
16547 cat >>$CONFIG_STATUS <<EOF
16548   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16549     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16550     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16551 EOF
16552 cat >>$CONFIG_STATUS <<\EOF
16553   --version | --vers* | -V )
16554     echo "$ac_cs_version"; exit 0 ;;
16555   --he | --h)
16556     # Conflict between --help and --header
16557     { { echo "$as_me:16557: error: ambiguous option: $1
16558 Try \`$0 --help' for more information." >&5
16559 echo "$as_me: error: ambiguous option: $1
16560 Try \`$0 --help' for more information." >&2;}
16561    { (exit 1); exit 1; }; };;
16562   --help | --hel | -h )
16563     echo "$ac_cs_usage"; exit 0 ;;
16564   --debug | --d* | -d )
16565     debug=: ;;
16566   --file | --fil | --fi | --f )
16567     shift
16568     CONFIG_FILES="$CONFIG_FILES $1"
16569     ac_need_defaults=false;;
16570   --header | --heade | --head | --hea )
16571     shift
16572     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16573     ac_need_defaults=false;;
16574
16575   # This is an error.
16576   -*) { { echo "$as_me:16576: error: unrecognized option: $1
16577 Try \`$0 --help' for more information." >&5
16578 echo "$as_me: error: unrecognized option: $1
16579 Try \`$0 --help' for more information." >&2;}
16580    { (exit 1); exit 1; }; } ;;
16581
16582   *) ac_config_targets="$ac_config_targets $1" ;;
16583
16584   esac
16585   shift
16586 done
16587
16588 exec 5>>config.log
16589 cat >&5 << _ACEOF
16590
16591 ## ----------------------- ##
16592 ## Running config.status.  ##
16593 ## ----------------------- ##
16594
16595 This file was extended by $as_me 2.52.20080325, executed with
16596   CONFIG_FILES    = $CONFIG_FILES
16597   CONFIG_HEADERS  = $CONFIG_HEADERS
16598   CONFIG_LINKS    = $CONFIG_LINKS
16599   CONFIG_COMMANDS = $CONFIG_COMMANDS
16600   > $ac_cs_invocation
16601 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16602
16603 _ACEOF
16604 EOF
16605
16606 cat >>$CONFIG_STATUS <<EOF
16607 #
16608 # INIT-COMMANDS section.
16609 #
16610
16611 ### Special initialization commands, used to pass information from the
16612 ### configuration-run into config.status
16613
16614 AWK="$AWK"
16615 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16616 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16617 ECHO_LINK="$ECHO_LINK"
16618 LDCONFIG="$LDCONFIG"
16619 LIB_NAME="$LIB_NAME"
16620 LIB_SUBSETS="$LIB_SUBSETS"
16621 LIB_SUFFIX="$LIB_SUFFIX"
16622 LIB_TRACING="$LIB_TRACING"
16623 MAKE_TERMINFO="$MAKE_TERMINFO"
16624 NCURSES_MAJOR="$NCURSES_MAJOR"
16625 NCURSES_MINOR="$NCURSES_MINOR"
16626 NCURSES_OSPEED="$NCURSES_OSPEED"
16627 NCURSES_PATCH="$NCURSES_PATCH"
16628 SRC_SUBDIRS="$SRC_SUBDIRS"
16629 TERMINFO="$TERMINFO"
16630 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16631 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16632 TINFO_NAME="$TINFO_NAME"
16633 TINFO_SUFFIX="$TINFO_SUFFIX"
16634 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16635 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16636 TICS_NAME="$TICS_NAME"
16637 WITH_CURSES_H="$with_curses_h"
16638 WITH_ECHO="$with_echo"
16639 WITH_OVERWRITE="$with_overwrite"
16640 cf_LIST_MODELS="$cf_list_models"
16641 cf_cv_abi_version="$cf_cv_abi_version"
16642 cf_cv_do_relink="$cf_cv_do_relink"
16643 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16644 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16645 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16646 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16647 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16648 cf_cv_rel_version="$cf_cv_rel_version"
16649 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16650 cf_cv_shlib_version="$cf_cv_shlib_version"
16651 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16652 cf_cv_system_name="$cf_cv_system_name"
16653 cf_with_cxx_binding="$cf_with_cxx_binding"
16654 host="$host"
16655 target="$target"
16656
16657 EOF
16658
16659 cat >>$CONFIG_STATUS <<\EOF
16660 for ac_config_target in $ac_config_targets
16661 do
16662   case "$ac_config_target" in
16663   # Handling of arguments.
16664   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16665   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16666   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16667   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16668   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16669   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16670   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16671   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16672   *) { { echo "$as_me:16672: error: invalid argument: $ac_config_target" >&5
16673 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16674    { (exit 1); exit 1; }; };;
16675   esac
16676 done
16677
16678 # If the user did not use the arguments to specify the items to instantiate,
16679 # then the envvar interface is used.  Set only those that are not.
16680 # We use the long form for the default assignment because of an extremely
16681 # bizarre bug on SunOS 4.1.3.
16682 if $ac_need_defaults; then
16683   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16684   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16685   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16686 fi
16687
16688 # Create a temporary directory, and hook for its removal unless debugging.
16689 $debug ||
16690 {
16691   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16692   trap '{ (exit 1); exit 1; }' 1 2 13 15
16693 }
16694
16695 # Create a (secure) tmp directory for tmp files.
16696 : ${TMPDIR=/tmp}
16697 {
16698   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16699   test -n "$tmp" && test -d "$tmp"
16700 }  ||
16701 {
16702   tmp=$TMPDIR/cs$$-$RANDOM
16703   (umask 077 && mkdir $tmp)
16704 } ||
16705 {
16706    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16707    { (exit 1); exit 1; }
16708 }
16709
16710 EOF
16711
16712 cat >>$CONFIG_STATUS <<EOF
16713
16714 #
16715 # CONFIG_FILES section.
16716 #
16717
16718 # No need to generate the scripts if there are no CONFIG_FILES.
16719 # This happens for instance when ./config.status config.h
16720 if test -n "\$CONFIG_FILES"; then
16721   # Protect against being on the right side of a sed subst in config.status.
16722   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16723    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16724 s,@SHELL@,$SHELL,;t t
16725 s,@exec_prefix@,$exec_prefix,;t t
16726 s,@prefix@,$prefix,;t t
16727 s,@program_transform_name@,$program_transform_name,;t t
16728 s,@bindir@,$bindir,;t t
16729 s,@sbindir@,$sbindir,;t t
16730 s,@libexecdir@,$libexecdir,;t t
16731 s,@datadir@,$datadir,;t t
16732 s,@sysconfdir@,$sysconfdir,;t t
16733 s,@sharedstatedir@,$sharedstatedir,;t t
16734 s,@localstatedir@,$localstatedir,;t t
16735 s,@libdir@,$libdir,;t t
16736 s,@includedir@,$includedir,;t t
16737 s,@oldincludedir@,$oldincludedir,;t t
16738 s,@infodir@,$infodir,;t t
16739 s,@mandir@,$mandir,;t t
16740 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16741 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16742 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16743 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16744 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16745 s,@build_alias@,$build_alias,;t t
16746 s,@host_alias@,$host_alias,;t t
16747 s,@target_alias@,$target_alias,;t t
16748 s,@ECHO_C@,$ECHO_C,;t t
16749 s,@ECHO_N@,$ECHO_N,;t t
16750 s,@ECHO_T@,$ECHO_T,;t t
16751 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16752 s,@DEFS@,$DEFS,;t t
16753 s,@LIBS@,$LIBS,;t t
16754 s,@top_builddir@,$top_builddir,;t t
16755 s,@EGREP@,$EGREP,;t t
16756 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16757 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16758 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16759 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16760 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16761 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16762 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16763 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16764 s,@build@,$build,;t t
16765 s,@build_cpu@,$build_cpu,;t t
16766 s,@build_vendor@,$build_vendor,;t t
16767 s,@build_os@,$build_os,;t t
16768 s,@host@,$host,;t t
16769 s,@host_cpu@,$host_cpu,;t t
16770 s,@host_vendor@,$host_vendor,;t t
16771 s,@host_os@,$host_os,;t t
16772 s,@target@,$target,;t t
16773 s,@target_cpu@,$target_cpu,;t t
16774 s,@target_vendor@,$target_vendor,;t t
16775 s,@target_os@,$target_os,;t t
16776 s,@CC@,$CC,;t t
16777 s,@CFLAGS@,$CFLAGS,;t t
16778 s,@LDFLAGS@,$LDFLAGS,;t t
16779 s,@CPPFLAGS@,$CPPFLAGS,;t t
16780 s,@ac_ct_CC@,$ac_ct_CC,;t t
16781 s,@EXEEXT@,$EXEEXT,;t t
16782 s,@OBJEXT@,$OBJEXT,;t t
16783 s,@CPP@,$CPP,;t t
16784 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16785 s,@PROG_EXT@,$PROG_EXT,;t t
16786 s,@LDCONFIG@,$LDCONFIG,;t t
16787 s,@CXX@,$CXX,;t t
16788 s,@CXXFLAGS@,$CXXFLAGS,;t t
16789 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16790 s,@AWK@,$AWK,;t t
16791 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16792 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16793 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16794 s,@LINT@,$LINT,;t t
16795 s,@LINT_OPTS@,$LINT_OPTS,;t t
16796 s,@LN_S@,$LN_S,;t t
16797 s,@SET_MAKE@,$SET_MAKE,;t t
16798 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16799 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16800 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16801 s,@RANLIB@,$RANLIB,;t t
16802 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16803 s,@LD@,$LD,;t t
16804 s,@ac_ct_LD@,$ac_ct_LD,;t t
16805 s,@AR@,$AR,;t t
16806 s,@ac_ct_AR@,$ac_ct_AR,;t t
16807 s,@AR_OPTS@,$AR_OPTS,;t t
16808 s,@DESTDIR@,$DESTDIR,;t t
16809 s,@BUILD_CC@,$BUILD_CC,;t t
16810 s,@BUILD_CPP@,$BUILD_CPP,;t t
16811 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16812 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16813 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16814 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16815 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16816 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16817 s,@cf_list_models@,$cf_list_models,;t t
16818 s,@LIBTOOL@,$LIBTOOL,;t t
16819 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16820 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16821 s,@LIB_CREATE@,$LIB_CREATE,;t t
16822 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16823 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16824 s,@LIB_PREP@,$LIB_PREP,;t t
16825 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16826 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16827 s,@LIB_LINK@,$LIB_LINK,;t t
16828 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16829 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16830 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16831 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16832 s,@TICS_NAME@,$TICS_NAME,;t t
16833 s,@TINFO_NAME@,$TINFO_NAME,;t t
16834 s,@LIB_NAME@,$LIB_NAME,;t t
16835 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16836 s,@CC_G_OPT@,$CC_G_OPT,;t t
16837 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16838 s,@LD_MODEL@,$LD_MODEL,;t t
16839 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16840 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16841 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16842 s,@LINK_PROGS@,$LINK_PROGS,;t t
16843 s,@LINK_TESTS@,$LINK_TESTS,;t t
16844 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16845 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16846 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16847 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16848 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16849 s,@PATHSEP@,$PATHSEP,;t t
16850 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16851 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16852 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16853 s,@TERMINFO@,$TERMINFO,;t t
16854 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16855 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16856 s,@TERMPATH@,$TERMPATH,;t t
16857 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16858 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16859 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16860 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16861 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16862 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16863 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16864 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16865 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16866 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16867 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16868 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16869 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16870 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16871 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16872 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16873 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16874 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16875 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16876 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16877 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16878 s,@PTHREAD@,$PTHREAD,;t t
16879 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16880 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16881 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16882 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16883 s,@ECHO_LINK@,$ECHO_LINK,;t t
16884 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16885 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16886 s,@ADA_TRACE@,$ADA_TRACE,;t t
16887 s,@MATH_LIB@,$MATH_LIB,;t t
16888 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16889 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16890 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16891 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16892 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16893 s,@TEST_LIBS@,$TEST_LIBS,;t t
16894 s,@CXXCPP@,$CXXCPP,;t t
16895 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16896 s,@CXX_AR@,$CXX_AR,;t t
16897 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16898 s,@CXXLIBS@,$CXXLIBS,;t t
16899 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16900 s,@gnat_exists@,$gnat_exists,;t t
16901 s,@M4_exists@,$M4_exists,;t t
16902 s,@cf_ada_make@,$cf_ada_make,;t t
16903 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16904 s,@cf_ada_package@,$cf_ada_package,;t t
16905 s,@ADAFLAGS@,$ADAFLAGS,;t t
16906 s,@cf_compile_generics@,$cf_compile_generics,;t t
16907 s,@cf_generic_objects@,$cf_generic_objects,;t t
16908 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16909 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16910 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16911 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16912 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16913 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16914 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16915 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16916 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16917 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16918 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16919 s,@TICS_ARGS@,$TICS_ARGS,;t t
16920 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16921 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16922 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16923 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16924 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16925 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16926 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16927 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16928 s,@TICS_LIST@,$TICS_LIST,;t t
16929 s,@TINFO_LIST@,$TINFO_LIST,;t t
16930 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16931 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16932 s,@TEST_ARGS@,$TEST_ARGS,;t t
16933 s,@TEST_DEPS@,$TEST_DEPS,;t t
16934 s,@TEST_ARG2@,$TEST_ARG2,;t t
16935 s,@TEST_DEP2@,$TEST_DEP2,;t t
16936 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16937 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16938 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16939 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16940 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16941 CEOF
16942
16943 EOF
16944
16945   cat >>$CONFIG_STATUS <<\EOF
16946   # Split the substitutions into bite-sized pieces for seds with
16947   # small command number limits, like on Digital OSF/1 and HP-UX.
16948   ac_max_sed_lines=48
16949   ac_sed_frag=1 # Number of current file.
16950   ac_beg=1 # First line for current file.
16951   ac_end=$ac_max_sed_lines # Line after last line for current file.
16952   ac_more_lines=:
16953   ac_sed_cmds=
16954   while $ac_more_lines; do
16955     if test $ac_beg -gt 1; then
16956       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16957     else
16958       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16959     fi
16960     if test ! -s $tmp/subs.frag; then
16961       ac_more_lines=false
16962     else
16963       # The purpose of the label and of the branching condition is to
16964       # speed up the sed processing (if there are no `@' at all, there
16965       # is no need to browse any of the substitutions).
16966       # These are the two extra sed commands mentioned above.
16967       (echo ':t
16968   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16969       if test -z "$ac_sed_cmds"; then
16970         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16971       else
16972         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16973       fi
16974       ac_sed_frag=`expr $ac_sed_frag + 1`
16975       ac_beg=$ac_end
16976       ac_end=`expr $ac_end + $ac_max_sed_lines`
16977     fi
16978   done
16979   if test -z "$ac_sed_cmds"; then
16980     ac_sed_cmds=cat
16981   fi
16982 fi # test -n "$CONFIG_FILES"
16983
16984 EOF
16985 cat >>$CONFIG_STATUS <<\EOF
16986 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16987   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16988   case $ac_file in
16989   - | *:- | *:-:* ) # input from stdin
16990         cat >$tmp/stdin
16991         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16992         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16993   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16994         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16995   * )   ac_file_in=$ac_file.in ;;
16996   esac
16997
16998   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16999   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17000          X"$ac_file" : 'X\(//\)[^/]' \| \
17001          X"$ac_file" : 'X\(//\)$' \| \
17002          X"$ac_file" : 'X\(/\)' \| \
17003          .     : '\(.\)' 2>/dev/null ||
17004 echo X"$ac_file" |
17005     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17006           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17007           /^X\(\/\/\)$/{ s//\1/; q; }
17008           /^X\(\/\).*/{ s//\1/; q; }
17009           s/.*/./; q'`
17010   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17011     { case "$ac_dir" in
17012   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17013   *)                      as_incr_dir=.;;
17014 esac
17015 as_dummy="$ac_dir"
17016 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17017   case $as_mkdir_dir in
17018     # Skip DOS drivespec
17019     ?:) as_incr_dir=$as_mkdir_dir ;;
17020     *)
17021       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17022       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17023     ;;
17024   esac
17025 done; }
17026
17027     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17028     # A "../" for each directory in $ac_dir_suffix.
17029     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17030   else
17031     ac_dir_suffix= ac_dots=
17032   fi
17033
17034   case $srcdir in
17035   .)  ac_srcdir=.
17036       if test -z "$ac_dots"; then
17037          ac_top_srcdir=.
17038       else
17039          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17040       fi ;;
17041   [\\/]* | ?:[\\/]* )
17042       ac_srcdir=$srcdir$ac_dir_suffix;
17043       ac_top_srcdir=$srcdir ;;
17044   *) # Relative path.
17045     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17046     ac_top_srcdir=$ac_dots$srcdir ;;
17047   esac
17048
17049   case $INSTALL in
17050   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17051   *) ac_INSTALL=$ac_dots$INSTALL ;;
17052   esac
17053
17054   if test x"$ac_file" != x-; then
17055     { echo "$as_me:17055: creating $ac_file" >&5
17056 echo "$as_me: creating $ac_file" >&6;}
17057     rm -f "$ac_file"
17058   fi
17059   # Let's still pretend it is `configure' which instantiates (i.e., don't
17060   # use $as_me), people would be surprised to read:
17061   #    /* config.h.  Generated automatically by config.status.  */
17062   configure_input="Generated automatically from `echo $ac_file_in |
17063                                                  sed 's,.*/,,'` by configure."
17064
17065   # First look for the input files in the build tree, otherwise in the
17066   # src tree.
17067   ac_file_inputs=`IFS=:
17068     for f in $ac_file_in; do
17069       case $f in
17070       -) echo $tmp/stdin ;;
17071       [\\/$]*)
17072          # Absolute (can't be DOS-style, as IFS=:)
17073          test -f "$f" || { { echo "$as_me:17073: error: cannot find input file: $f" >&5
17074 echo "$as_me: error: cannot find input file: $f" >&2;}
17075    { (exit 1); exit 1; }; }
17076          echo $f;;
17077       *) # Relative
17078          if test -f "$f"; then
17079            # Build tree
17080            echo $f
17081          elif test -f "$srcdir/$f"; then
17082            # Source tree
17083            echo $srcdir/$f
17084          else
17085            # /dev/null tree
17086            { { echo "$as_me:17086: error: cannot find input file: $f" >&5
17087 echo "$as_me: error: cannot find input file: $f" >&2;}
17088    { (exit 1); exit 1; }; }
17089          fi;;
17090       esac
17091     done` || { (exit 1); exit 1; }
17092 EOF
17093 cat >>$CONFIG_STATUS <<EOF
17094   sed "$ac_vpsub
17095 $extrasub
17096 EOF
17097 cat >>$CONFIG_STATUS <<\EOF
17098 :t
17099 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17100 s,@configure_input@,$configure_input,;t t
17101 s,@srcdir@,$ac_srcdir,;t t
17102 s,@top_srcdir@,$ac_top_srcdir,;t t
17103 s,@INSTALL@,$ac_INSTALL,;t t
17104 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17105   rm -f $tmp/stdin
17106   if test x"$ac_file" != x-; then
17107     mv $tmp/out $ac_file
17108   else
17109     cat $tmp/out
17110     rm -f $tmp/out
17111   fi
17112
17113 done
17114 EOF
17115 cat >>$CONFIG_STATUS <<\EOF
17116
17117 #
17118 # CONFIG_HEADER section.
17119 #
17120
17121 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17122 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17123 #
17124 # ac_d sets the value in "#define NAME VALUE" lines.
17125 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17126 ac_dB='[        ].*$,\1#\2'
17127 ac_dC=' '
17128 ac_dD=',;t'
17129 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17130 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17131 ac_iB='\([      ]\),\1#\2define\3'
17132 ac_iC=' '
17133 ac_iD='\4,;t'
17134 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17135 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17136 ac_uB='$,\1#\2define\3'
17137 ac_uC=' '
17138 ac_uD=',;t'
17139
17140 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17141   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17142   case $ac_file in
17143   - | *:- | *:-:* ) # input from stdin
17144         cat >$tmp/stdin
17145         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17146         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17147   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17148         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17149   * )   ac_file_in=$ac_file.in ;;
17150   esac
17151
17152   test x"$ac_file" != x- && { echo "$as_me:17152: creating $ac_file" >&5
17153 echo "$as_me: creating $ac_file" >&6;}
17154
17155   # First look for the input files in the build tree, otherwise in the
17156   # src tree.
17157   ac_file_inputs=`IFS=:
17158     for f in $ac_file_in; do
17159       case $f in
17160       -) echo $tmp/stdin ;;
17161       [\\/$]*)
17162          # Absolute (can't be DOS-style, as IFS=:)
17163          test -f "$f" || { { echo "$as_me:17163: error: cannot find input file: $f" >&5
17164 echo "$as_me: error: cannot find input file: $f" >&2;}
17165    { (exit 1); exit 1; }; }
17166          echo $f;;
17167       *) # Relative
17168          if test -f "$f"; then
17169            # Build tree
17170            echo $f
17171          elif test -f "$srcdir/$f"; then
17172            # Source tree
17173            echo $srcdir/$f
17174          else
17175            # /dev/null tree
17176            { { echo "$as_me:17176: error: cannot find input file: $f" >&5
17177 echo "$as_me: error: cannot find input file: $f" >&2;}
17178    { (exit 1); exit 1; }; }
17179          fi;;
17180       esac
17181     done` || { (exit 1); exit 1; }
17182   # Remove the trailing spaces.
17183   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17184
17185 EOF
17186
17187 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17188 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17189 # be either 'cat' or 'sort'.
17190 cat confdefs.h | uniq >conftest.vals
17191
17192 # Break up conftest.vals because some shells have a limit on
17193 # the size of here documents, and old seds have small limits too.
17194
17195 rm -f conftest.tail
17196 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17197 while grep . conftest.vals >/dev/null
17198 do
17199   # Write chunks of a limited-size here document to conftest.frag.
17200   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17201   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17202   echo 'CEOF' >> $CONFIG_STATUS
17203   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17204   rm -f conftest.vals
17205   mv conftest.tail conftest.vals
17206 done
17207 rm -f conftest.vals
17208
17209 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17210 # marker @DEFS@.
17211 echo '  cat >> conftest.edit <<CEOF
17212 /@DEFS@/r conftest.frag
17213 /@DEFS@/d
17214 CEOF
17215 sed -f conftest.edit $tmp/in > $tmp/out
17216 rm -f $tmp/in
17217 mv $tmp/out $tmp/in
17218 rm -f conftest.edit conftest.frag
17219 ' >> $CONFIG_STATUS
17220
17221 cat >>$CONFIG_STATUS <<\EOF
17222   # Let's still pretend it is `configure' which instantiates (i.e., don't
17223   # use $as_me), people would be surprised to read:
17224   #    /* config.h.  Generated automatically by config.status.  */
17225   if test x"$ac_file" = x-; then
17226     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17227   else
17228     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17229   fi
17230   cat $tmp/in >>$tmp/config.h
17231   rm -f $tmp/in
17232   if test x"$ac_file" != x-; then
17233     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17234       { echo "$as_me:17234: $ac_file is unchanged" >&5
17235 echo "$as_me: $ac_file is unchanged" >&6;}
17236     else
17237       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17238          X"$ac_file" : 'X\(//\)[^/]' \| \
17239          X"$ac_file" : 'X\(//\)$' \| \
17240          X"$ac_file" : 'X\(/\)' \| \
17241          .     : '\(.\)' 2>/dev/null ||
17242 echo X"$ac_file" |
17243     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17244           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17245           /^X\(\/\/\)$/{ s//\1/; q; }
17246           /^X\(\/\).*/{ s//\1/; q; }
17247           s/.*/./; q'`
17248       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17249         { case "$ac_dir" in
17250   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17251   *)                      as_incr_dir=.;;
17252 esac
17253 as_dummy="$ac_dir"
17254 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17255   case $as_mkdir_dir in
17256     # Skip DOS drivespec
17257     ?:) as_incr_dir=$as_mkdir_dir ;;
17258     *)
17259       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17260       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17261     ;;
17262   esac
17263 done; }
17264
17265       fi
17266       rm -f $ac_file
17267       mv $tmp/config.h $ac_file
17268     fi
17269   else
17270     cat $tmp/config.h
17271     rm -f $tmp/config.h
17272   fi
17273 done
17274 EOF
17275 cat >>$CONFIG_STATUS <<\EOF
17276
17277 #
17278 # CONFIG_COMMANDS section.
17279 #
17280 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17281   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17282   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17283
17284   case $ac_dest in
17285     default )
17286
17287 for cf_dir in test
17288 do
17289         if test ! -d $srcdir/$cf_dir; then
17290                 continue
17291         elif test -f $srcdir/$cf_dir/programs; then
17292                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17293         fi
17294 done
17295
17296         case $cf_cv_system_name in
17297         OS/2*)  LIB_PREFIX=''     ;;
17298         os2*)   LIB_PREFIX=''     ;;
17299         *)      LIB_PREFIX='lib'  ;;
17300         esac
17301 cf_prefix=$LIB_PREFIX
17302
17303 for cf_dir in $SRC_SUBDIRS
17304 do
17305         if test ! -d $srcdir/$cf_dir ; then
17306                 continue
17307         elif test -f $srcdir/$cf_dir/modules; then
17308
17309                 SHARED_LIB=
17310                 LIBS_TO_MAKE=
17311                 for cf_item in $cf_LIST_MODELS
17312                 do
17313
17314         case $cf_item in
17315         libtool) cf_suffix='.la'  ;;
17316         normal)  cf_suffix='.a'   ;;
17317         debug)   cf_suffix='_g.a' ;;
17318         profile) cf_suffix='_p.a' ;;
17319         shared)
17320                 case $cf_cv_system_name in
17321                 cygwin*) cf_suffix='.dll' ;;
17322                 darwin*) cf_suffix='.dylib' ;;
17323                 hpux*)
17324                         case $target in
17325                         ia64*)  cf_suffix='.so' ;;
17326                         *)      cf_suffix='.sl' ;;
17327                         esac
17328                         ;;
17329                 *)      cf_suffix='.so'  ;;
17330                 esac
17331         esac
17332         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17333
17334                         if test $cf_item = shared ; then
17335                         if test "$cf_cv_do_symlinks" = yes ; then
17336                                 case "$cf_cv_shlib_version" in #(vi
17337                                 rel) #(vi
17338                                         case "$cf_cv_system_name" in #(vi
17339                                         darwin*)
17340                                         case .${LIB_SUFFIX} in
17341                                         .w*)
17342                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17343                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17344                                                 ;;
17345                                         *)
17346                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17347                                                 ;;
17348                                         esac
17349                                         ;; #(vi
17350                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17351                                         esac
17352                                         ;;
17353                                 abi)
17354                                         case "$cf_cv_system_name" in #(vi
17355                                         darwin*)
17356                                         case .${LIB_SUFFIX} in
17357                                         .w*)
17358                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17359                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17360                                                 ;;
17361                                         *)
17362                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17363                                                 ;;
17364                                         esac
17365                                         ;; #(vi
17366                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17367                                         esac
17368                                         ;;
17369                                 esac
17370                         fi
17371                         # cygwin needs import library, and has unique naming convention
17372                         # use autodetected ${cf_prefix} for import lib and static lib, but
17373                         # use 'cyg' prefix for shared lib.
17374                         if test $cf_cv_shlib_version = cygdll ; then
17375                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
17376                                 continue
17377                         fi
17378                         fi
17379                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17380                 done
17381
17382                 if test $cf_dir = ncurses ; then
17383                         cf_subsets="$LIB_SUBSETS"
17384                         cf_r_parts="$cf_subsets"
17385
17386                         while test -n "$cf_r_parts"
17387                         do
17388                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17389                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17390                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17391                                         case $cf_l_parts in #(vi
17392                                         *termlib*) #(vi
17393                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17394                                                 ;;
17395                                         *ticlib*)
17396                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17397                                                 ;;
17398                                         *)
17399                                                 break
17400                                                 ;;
17401                                         esac
17402                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17403                                 else
17404                                         break
17405                                 fi
17406                         done
17407                 else
17408                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17409                 fi
17410
17411                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17412                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17413                         $cf_dir/Makefile >$cf_dir/Makefile.out
17414                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17415
17416                 $AWK -f $srcdir/mk-0th.awk \
17417                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17418                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17419
17420                 for cf_subset in $cf_subsets
17421                 do
17422                         cf_subdirs=
17423                         for cf_item in $cf_LIST_MODELS
17424                         do
17425                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17426
17427 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17428
17429         case $cf_item in
17430         libtool) cf_suffix='.la'  ;;
17431         normal)  cf_suffix='.a'   ;;
17432         debug)   cf_suffix='_g.a' ;;
17433         profile) cf_suffix='_p.a' ;;
17434         shared)
17435                 case $cf_cv_system_name in
17436                 cygwin*) cf_suffix='.dll' ;;
17437                 darwin*) cf_suffix='.dylib' ;;
17438                 hpux*)
17439                         case $target in
17440                         ia64*)  cf_suffix='.so' ;;
17441                         *)      cf_suffix='.sl' ;;
17442                         esac
17443                         ;;
17444                 *)      cf_suffix='.so'  ;;
17445                 esac
17446         esac
17447         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17448
17449         case $cf_item in
17450         libtool) cf_subdir='obj_lo'  ;;
17451         normal)  cf_subdir='objects' ;;
17452         debug)   cf_subdir='obj_g' ;;
17453         profile) cf_subdir='obj_p' ;;
17454         shared)
17455                 case $cf_cv_system_name in #(vi
17456                 cygwin) #(vi
17457                         cf_subdir='objects' ;;
17458                 *)
17459                         cf_subdir='obj_s' ;;
17460                 esac
17461         esac
17462
17463                         # Test for case where we build libtinfo with a different name.
17464                         cf_libname=$cf_dir
17465                         if test $cf_dir = ncurses ; then
17466                                 case $cf_subset in
17467                                 *base*)
17468                                         ;;
17469                                 *termlib*)
17470                                         cf_libname=$TINFO_LIB_SUFFIX
17471                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17472                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17473                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17474                                         fi
17475                                         ;;
17476                                 ticlib*)
17477                                         cf_libname=$TICS_LIB_SUFFIX
17478                                         if test -n "${DFT_ARG_SUFFIX}" ; then
17479                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17480                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17481                                         fi
17482                                         ;;
17483                                 esac
17484                         fi
17485
17486                         # These dependencies really are for development, not
17487                         # builds, but they are useful in porting, too.
17488                         cf_depend="../include/ncurses_cfg.h"
17489                         if test "$srcdir" = "."; then
17490                                 cf_reldir="."
17491                         else
17492                                 cf_reldir="\${srcdir}"
17493                         fi
17494
17495                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17496                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17497                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17498                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17499                         fi
17500
17501                         cf_dir_suffix=
17502                         old_cf_suffix="$cf_suffix"
17503                         if test "$cf_cv_shlib_version_infix" = yes ; then
17504                         if test -n "$LIB_SUFFIX" ; then
17505                                 case $LIB_SUFFIX in
17506                                 w*)
17507                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17508                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17509                                         cf_dir_suffix=w
17510                                         ;;
17511                                 esac
17512                         fi
17513                         fi
17514
17515                         $AWK -f $srcdir/mk-1st.awk \
17516                                 name=${cf_libname}${cf_dir_suffix} \
17517                                 traces=$LIB_TRACING \
17518                                 MODEL=$cf_ITEM \
17519                                 model=$cf_subdir \
17520                                 prefix=$cf_prefix \
17521                                 suffix=$cf_suffix \
17522                                 subset=$cf_subset \
17523                                 TermlibRoot=$TINFO_NAME \
17524                                 TermlibSuffix=$TINFO_SUFFIX \
17525                                 ShlibVer=$cf_cv_shlib_version \
17526                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17527                                 ReLink=${cf_cv_do_relink-no} \
17528                                 DoLinks=$cf_cv_do_symlinks \
17529                                 rmSoLocs=$cf_cv_rm_so_locs \
17530                                 ldconfig="$LDCONFIG" \
17531                                 overwrite=$WITH_OVERWRITE \
17532                                 depend="$cf_depend" \
17533                                 host="$host" \
17534                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17535
17536                         cf_suffix="$old_cf_suffix"
17537
17538                         for cf_subdir2 in $cf_subdirs lib
17539                         do
17540                                 test $cf_subdir = $cf_subdir2 && break
17541                         done
17542                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17543                         $AWK -f $srcdir/mk-2nd.awk \
17544                                 name=$cf_dir \
17545                                 traces=$LIB_TRACING \
17546                                 MODEL=$cf_ITEM \
17547                                 model=$cf_subdir \
17548                                 subset=$cf_subset \
17549                                 srcdir=$srcdir \
17550                                 echo=$WITH_ECHO \
17551                                 crenames=$cf_cv_prog_CC_c_o \
17552                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17553                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17554                         cf_subdirs="$cf_subdirs $cf_subdir"
17555                         done
17556                 done
17557         fi
17558
17559         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17560 done
17561
17562 for cf_dir in $SRC_SUBDIRS
17563 do
17564         if test ! -d $srcdir/$cf_dir ; then
17565                 continue
17566         fi
17567
17568         if test -f $cf_dir/Makefile ; then
17569                 case "$cf_dir" in
17570                 Ada95) #(vi
17571                         echo 'libs \' >> Makefile
17572                         echo 'install.libs \' >> Makefile
17573                         echo 'uninstall.libs ::' >> Makefile
17574                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17575                         ;;
17576                 esac
17577         fi
17578
17579         if test -f $srcdir/$cf_dir/modules; then
17580                 echo >> Makefile
17581                 if test -f $srcdir/$cf_dir/headers; then
17582 cat >> Makefile <<CF_EOF
17583 install.includes \\
17584 uninstall.includes \\
17585 CF_EOF
17586                 fi
17587 if test "$cf_dir" != "c++" ; then
17588 echo 'lint \' >> Makefile
17589 fi
17590 cat >> Makefile <<CF_EOF
17591 libs \\
17592 lintlib \\
17593 install.libs \\
17594 uninstall.libs \\
17595 install.$cf_dir \\
17596 uninstall.$cf_dir ::
17597         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17598 CF_EOF
17599         elif test -f $srcdir/$cf_dir/headers; then
17600 cat >> Makefile <<CF_EOF
17601
17602 libs \\
17603 install.libs \\
17604 uninstall.libs \\
17605 install.includes \\
17606 uninstall.includes ::
17607         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17608 CF_EOF
17609 fi
17610 done
17611
17612 cat >> Makefile <<CF_EOF
17613
17614 install.libs uninstall.libs \\
17615 install.data uninstall.data ::
17616 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17617
17618 install.man \\
17619 uninstall.man ::
17620         cd man && \${MAKE} \${CF_MFLAGS} \$@
17621
17622 distclean ::
17623         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17624         rm -f headers.sh headers.sed mk_shared_lib.sh
17625         rm -rf \${DIRS_TO_MAKE}
17626 CF_EOF
17627
17628 # Special case: tack's manpage lives in its own directory.
17629 if test -d tack ; then
17630 if test -f $srcdir/$tack.h; then
17631 cat >> Makefile <<CF_EOF
17632
17633 install.man \\
17634 uninstall.man ::
17635         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17636 CF_EOF
17637 fi
17638 fi
17639
17640 rm -f headers.sed headers.sh
17641
17642 echo creating headers.sh
17643 cat >headers.sh <<CF_EOF
17644 #! /bin/sh
17645 # This shell script is generated by the 'configure' script.  It is invoked in a
17646 # subdirectory of the build tree.  It generates a sed-script in the parent
17647 # directory that is used to adjust includes for header files that reside in a
17648 # subdirectory of /usr/include, etc.
17649 PRG=""
17650 while test \$# != 3
17651 do
17652 PRG="\$PRG \$1"; shift
17653 done
17654 DST=\$1
17655 REF=\$2
17656 SRC=\$3
17657 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17658 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17659 echo installing \$SRC in \$DST
17660 CF_EOF
17661
17662 if test $WITH_CURSES_H = yes; then
17663         cat >>headers.sh <<CF_EOF
17664 case \$DST in
17665 /*/include/*)
17666         END=\`basename \$DST\`
17667         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17668         do
17669                 NAME=\`basename \$i\`
17670                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17671         done
17672         ;;
17673 *)
17674         echo "" >> \$TMPSED
17675         ;;
17676 esac
17677 CF_EOF
17678
17679 else
17680         cat >>headers.sh <<CF_EOF
17681 case \$DST in
17682 /*/include/*)
17683         END=\`basename \$DST\`
17684         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17685         do
17686                 NAME=\`basename \$i\`
17687                 if test "\$NAME" = "curses.h"
17688                 then
17689                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17690                         NAME=ncurses.h
17691                 fi
17692                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17693         done
17694         ;;
17695 *)
17696         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17697         ;;
17698 esac
17699 CF_EOF
17700 fi
17701 cat >>headers.sh <<CF_EOF
17702 rm -f \$TMPSRC
17703 sed -f \$TMPSED \$SRC > \$TMPSRC
17704 NAME=\`basename \$SRC\`
17705 CF_EOF
17706 if test $WITH_CURSES_H != yes; then
17707         cat >>headers.sh <<CF_EOF
17708 test "\$NAME" = "curses.h" && NAME=ncurses.h
17709 CF_EOF
17710 fi
17711 cat >>headers.sh <<CF_EOF
17712 # Just in case someone gzip'd manpages, remove the conflicting copy.
17713 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17714
17715 eval \$PRG \$TMPSRC \$DST/\$NAME
17716 rm -f \$TMPSRC \$TMPSED
17717 CF_EOF
17718
17719 chmod 0755 headers.sh
17720
17721 for cf_dir in $SRC_SUBDIRS
17722 do
17723         if test ! -d $srcdir/$cf_dir ; then
17724                 continue
17725         fi
17726
17727         if test -f $srcdir/$cf_dir/headers; then
17728                 $AWK -f $srcdir/mk-hdr.awk \
17729                         subset="$LIB_SUBSETS" \
17730                         compat="$WITH_CURSES_H" \
17731                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17732         fi
17733
17734         if test -f $srcdir/$cf_dir/modules; then
17735                 if test "$cf_dir" != "c++" ; then
17736                         cat >>$cf_dir/Makefile <<"CF_EOF"
17737 depend : ${AUTO_SRC}
17738         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17739
17740 # DO NOT DELETE THIS LINE -- make depend depends on it.
17741 CF_EOF
17742                 fi
17743         fi
17744 done
17745
17746  ;;
17747   esac
17748 done
17749 EOF
17750
17751 cat >>$CONFIG_STATUS <<\EOF
17752
17753 { (exit 0); exit 0; }
17754 EOF
17755 chmod +x $CONFIG_STATUS
17756 ac_clean_files=$ac_clean_files_save
17757
17758 # configure is writing to config.log, and then calls config.status.
17759 # config.status does its own redirection, appending to config.log.
17760 # Unfortunately, on DOS this fails, as config.log is still kept open
17761 # by configure, so config.status won't be able to write to it; its
17762 # output is simply discarded.  So we exec the FD to /dev/null,
17763 # effectively closing config.log, so it can be properly (re)opened and
17764 # appended to by config.status.  When coming back to configure, we
17765 # need to make the FD available again.
17766 if test "$no_create" != yes; then
17767   ac_cs_success=:
17768   exec 5>/dev/null
17769   $SHELL $CONFIG_STATUS || ac_cs_success=false
17770   exec 5>>config.log
17771   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17772   # would make configure fail if this is the last instruction.
17773   $ac_cs_success || { (exit 1); exit 1; }
17774 fi
17775 ${MAKE-make} preinstall