]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
7a72270585f5a26e1c4755e799c1b70629577749
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.421 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --with-install-prefix   prefixes actual install-location ($DESTDIR)
703 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710 Options to Specify the Libraries Built/Used:
711   --with-libtool          generate libraries with libtool
712   --with-shared           generate shared-libraries
713   --with-normal           generate normal-libraries (default)
714   --with-debug            generate debug-libraries (default)
715   --with-profile          generate profile-libraries
716   --with-termlib          generate separate terminfo library
717   --with-ticlib           generate separate tic library
718   --with-gpm              use Alessandro Rubini's GPM library
719   --without-dlsym         do not use dlsym() to load GPM dynamically
720   --with-sysmouse         use sysmouse (FreeBSD console)
721   --enable-rpath          use rpath option when generating shared libraries
722   --disable-relink        relink shared libraries during install
723   --with-shlib-version=X  Specify rel or abi version for shared libs
724 Fine-Tuning Your Configuration:
725   --disable-overwrite     leave out the link to -lcurses
726   --disable-database      do not use terminfo, only fallbacks/termcap
727   --with-database=XXX     specify terminfo source to install
728   --with-hashed-db        specify hashed-database library
729   --with-fallbacks=XXX    specify list of fallback terminal descriptions
730   --without-xterm-new     specify if xterm terminfo should be old version
731   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
732   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
733   --disable-big-core      assume machine has little memory
734   --enable-termcap        compile in termcap fallback support
735   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
736   --enable-getcap         fast termcap load, no xrefs to terminfo
737   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
738   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
739   --disable-root-environ  restrict environment when running as root
740   --enable-symlinks       make tic use symbolic links not hard links
741   --enable-broken_linker  compile with broken-linker support code
742   --enable-bsdpad         recognize BSD-style prefix padding
743   --enable-widec          compile with wide-char/UTF-8 code
744   --disable-lp64          allow chtype to be long (ignore _LP64)
745   --disable-largefile     omit support for large files
746   --disable-tparm-varargs compile tparm() without varargs interface
747   --with-bool=TYPE        override fallback type of bool variable
748   --with-caps=alt         compile with alternate Caps file
749   --with-chtype=TYPE      override type of chtype
750   --with-ospeed=TYPE      override type of ospeed variable
751   --with-mmask-t=TYPE     override type of mmask_t
752   --with-rcs-ids          compile-in RCS identifiers
753 Options to Specify How Manpages are Installed:
754   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
755                           optionally formatted/catonly, e.g., gzip,formatted
756   --with-manpage-renames  specify manpage-renaming
757   --with-manpage-aliases  specify manpage-aliases using .so
758   --with-manpage-symlinks specify manpage-aliases using symlinks
759   --with-manpage-tbl      specify manpage processing with tbl
760 Extensions:
761   --disable-ext-funcs     disable function-extensions
762   --enable-const          compile with extra/non-standard const
763   --enable-no-padding     compile with $NCURSES_NO_PADDING code
764   --enable-signed-char    compile using signed Boolean's in term.h
765   --enable-sigwinch       compile with SIGWINCH handler
766   --enable-tcap-names     compile with user-definable terminal capabilities
767 Development Code:
768   --without-develop       disable development options
769   --enable-hard-tabs      compile with hard-tabs code
770   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
771 Experimental Code:
772   --disable-assumed-color do not assume anything about default-colors
773   --disable-hashmap       compile without hashmap scrolling-optimization
774   --enable-colorfgbg      compile with $COLORFGBG code
775   --enable-ext-colors     compile for experimental 256-color support
776   --enable-ext-mouse      compile for experimental mouse-encoding
777   --enable-reentrant      compile with experimental reentrant code
778   --enable-safe-sprintf   compile with experimental safe-sprintf code
779   --disable-scroll-hints  compile without scroll-hints code
780   --enable-wgetch-events  compile with experimental wgetch-events code
781 Testing/development Options:
782   --enable-echo           build: display "compiling" commands (default)
783   --enable-warnings       build: turn on GCC compiler warnings
784   --enable-assertions     test: turn on generation of assertion code
785   --with-dmalloc          test: use Gray Watson's dmalloc library
786   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
787   --with-valgrind         test: use valgrind
788   --disable-leaks         test: free permanent memory, analyze leaks
789   --enable-expanded       test: generate functions for certain macros
790   --disable-macros        test: use functions rather than macros
791   --with-trace            test: add trace() function to all models of ncurses
792 Ada95 Binding Options:
793   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
794   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
795   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
796
797 Some influential environment variables:
798   CC          C compiler command
799   CFLAGS      C compiler flags
800   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
801               nonstandard directory <lib dir>
802   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
803               headers in a nonstandard directory <include dir>
804   CPP         C preprocessor
805   CXX         C++ compiler command
806   CXXFLAGS    C++ compiler flags
807   CXXCPP      C++ preprocessor
808
809 Use these variables to override the choices made by `configure' or to help
810 it to find libraries and programs with nonstandard names/locations.
811
812 EOF
813 fi
814
815 if test "$ac_init_help" = "recursive"; then
816   # If there are subdirs, report their specific --help.
817   ac_popdir=`pwd`
818   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
819     cd $ac_subdir
820     # A "../" for each directory in /$ac_subdir.
821     ac_dots=`echo $ac_subdir |
822              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
823
824     case $srcdir in
825     .) # No --srcdir option.  We are building in place.
826       ac_sub_srcdir=$srcdir ;;
827     [\\/]* | ?:[\\/]* ) # Absolute path.
828       ac_sub_srcdir=$srcdir/$ac_subdir ;;
829     *) # Relative path.
830       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
831     esac
832
833     # Check for guested configure; otherwise get Cygnus style configure.
834     if test -f $ac_sub_srcdir/configure.gnu; then
835       echo
836       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
837     elif test -f $ac_sub_srcdir/configure; then
838       echo
839       $SHELL $ac_sub_srcdir/configure  --help=recursive
840     elif test -f $ac_sub_srcdir/configure.ac ||
841            test -f $ac_sub_srcdir/configure.in; then
842       echo
843       $ac_configure --help
844     else
845       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
846     fi
847     cd $ac_popdir
848   done
849 fi
850
851 test -n "$ac_init_help" && exit 0
852 if $ac_init_version; then
853   cat <<\EOF
854
855 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
856 Free Software Foundation, Inc.
857 This configure script is free software; the Free Software Foundation
858 gives unlimited permission to copy, distribute and modify it.
859 EOF
860   exit 0
861 fi
862 exec 5>config.log
863 cat >&5 <<EOF
864 This file contains any messages produced by compilers while
865 running configure, to aid debugging if configure makes a mistake.
866
867 It was created by $as_me, which was
868 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
869
870   $ $0 $@
871
872 EOF
873 {
874 cat <<_ASUNAME
875 ## ---------- ##
876 ## Platform.  ##
877 ## ---------- ##
878
879 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
880 uname -m = `(uname -m) 2>/dev/null || echo unknown`
881 uname -r = `(uname -r) 2>/dev/null || echo unknown`
882 uname -s = `(uname -s) 2>/dev/null || echo unknown`
883 uname -v = `(uname -v) 2>/dev/null || echo unknown`
884
885 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
886 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
887
888 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
889 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
890 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
891 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
892 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
893 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
894 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
895
896 PATH = $PATH
897
898 _ASUNAME
899 } >&5
900
901 cat >&5 <<EOF
902 ## ------------ ##
903 ## Core tests.  ##
904 ## ------------ ##
905
906 EOF
907
908 # Keep a trace of the command line.
909 # Strip out --no-create and --no-recursion so they do not pile up.
910 # Also quote any args containing shell meta-characters.
911 ac_configure_args=
912 ac_sep=
913 for ac_arg
914 do
915   case $ac_arg in
916   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
917   | --no-cr | --no-c) ;;
918   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
919   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
920   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
921     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
922     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
923     ac_sep=" " ;;
924   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
925      ac_sep=" " ;;
926   esac
927   # Get rid of the leading space.
928 done
929
930 # When interrupted or exit'd, cleanup temporary files, and complete
931 # config.log.  We remove comments because anyway the quotes in there
932 # would cause problems or look ugly.
933 trap 'exit_status=$?
934   # Save into config.log some information that might help in debugging.
935   echo >&5
936   echo "## ----------------- ##" >&5
937   echo "## Cache variables.  ##" >&5
938   echo "## ----------------- ##" >&5
939   echo >&5
940   # The following way of writing the cache mishandles newlines in values,
941 {
942   (set) 2>&1 |
943     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
944     *ac_space=\ *)
945       sed -n \
946         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
947           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
948       ;;
949     *)
950       sed -n \
951         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
952       ;;
953     esac;
954 } >&5
955   sed "/^$/d" confdefs.h >conftest.log
956   if test -s conftest.log; then
957     echo >&5
958     echo "## ------------ ##" >&5
959     echo "## confdefs.h.  ##" >&5
960     echo "## ------------ ##" >&5
961     echo >&5
962     cat conftest.log >&5
963   fi
964   (echo; echo) >&5
965   test "$ac_signal" != 0 &&
966     echo "$as_me: caught signal $ac_signal" >&5
967   echo "$as_me: exit $exit_status" >&5
968   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
969     exit $exit_status
970      ' 0
971 for ac_signal in 1 2 13 15; do
972   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
973 done
974 ac_signal=0
975
976 # confdefs.h avoids OS command line length limits that DEFS can exceed.
977 rm -rf conftest* confdefs.h
978 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
979 echo >confdefs.h
980
981 # Let the site file select an alternate cache file if it wants to.
982 # Prefer explicitly selected file to automatically selected ones.
983 if test -z "$CONFIG_SITE"; then
984   if test "x$prefix" != xNONE; then
985     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
986   else
987     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
988   fi
989 fi
990 for ac_site_file in $CONFIG_SITE; do
991   if test -r "$ac_site_file"; then
992     { echo "$as_me:992: loading site script $ac_site_file" >&5
993 echo "$as_me: loading site script $ac_site_file" >&6;}
994     cat "$ac_site_file" >&5
995     . "$ac_site_file"
996   fi
997 done
998
999 if test -r "$cache_file"; then
1000   # Some versions of bash will fail to source /dev/null (special
1001   # files actually), so we avoid doing that.
1002   if test -f "$cache_file"; then
1003     { echo "$as_me:1003: loading cache $cache_file" >&5
1004 echo "$as_me: loading cache $cache_file" >&6;}
1005     case $cache_file in
1006       [\\/]* | ?:[\\/]* ) . $cache_file;;
1007       *)                      . ./$cache_file;;
1008     esac
1009   fi
1010 else
1011   { echo "$as_me:1011: creating cache $cache_file" >&5
1012 echo "$as_me: creating cache $cache_file" >&6;}
1013   >$cache_file
1014 fi
1015
1016 # Check that the precious variables saved in the cache have kept the same
1017 # value.
1018 ac_cache_corrupted=false
1019 for ac_var in `(set) 2>&1 |
1020                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1021   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1022   eval ac_new_set=\$ac_env_${ac_var}_set
1023   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1024   eval ac_new_val="\$ac_env_${ac_var}_value"
1025   case $ac_old_set,$ac_new_set in
1026     set,)
1027       { echo "$as_me:1027: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1028 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1029       ac_cache_corrupted=: ;;
1030     ,set)
1031       { echo "$as_me:1031: error: \`$ac_var' was not set in the previous run" >&5
1032 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1033       ac_cache_corrupted=: ;;
1034     ,);;
1035     *)
1036       if test "x$ac_old_val" != "x$ac_new_val"; then
1037         { echo "$as_me:1037: error: \`$ac_var' has changed since the previous run:" >&5
1038 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1039         { echo "$as_me:1039:   former value:  $ac_old_val" >&5
1040 echo "$as_me:   former value:  $ac_old_val" >&2;}
1041         { echo "$as_me:1041:   current value: $ac_new_val" >&5
1042 echo "$as_me:   current value: $ac_new_val" >&2;}
1043         ac_cache_corrupted=:
1044       fi;;
1045   esac
1046   # Pass precious variables to config.status.  It doesn't matter if
1047   # we pass some twice (in addition to the command line arguments).
1048   if test "$ac_new_set" = set; then
1049     case $ac_new_val in
1050     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1051       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1052       ac_configure_args="$ac_configure_args '$ac_arg'"
1053       ;;
1054     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1055        ;;
1056     esac
1057   fi
1058 done
1059 if $ac_cache_corrupted; then
1060   { echo "$as_me:1060: error: changes in the environment can compromise the build" >&5
1061 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1062   { { echo "$as_me:1062: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1063 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1064    { (exit 1); exit 1; }; }
1065 fi
1066
1067 ac_ext=c
1068 ac_cpp='$CPP $CPPFLAGS'
1069 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1070 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1071 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1072 ac_main_return=return
1073
1074 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1075   *c*,-n*) ECHO_N= ECHO_C='
1076 ' ECHO_T='      ' ;;
1077   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1078   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1079 esac
1080 echo "#! $SHELL" >conftest.sh
1081 echo  "exit 0"   >>conftest.sh
1082 chmod +x conftest.sh
1083 if { (echo "$as_me:1083: PATH=\".;.\"; conftest.sh") >&5
1084   (PATH=".;."; conftest.sh) 2>&5
1085   ac_status=$?
1086   echo "$as_me:1086: \$? = $ac_status" >&5
1087   (exit $ac_status); }; then
1088   ac_path_separator=';'
1089 else
1090   ac_path_separator=:
1091 fi
1092 PATH_SEPARATOR="$ac_path_separator"
1093 rm -f conftest.sh
1094
1095 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1096
1097 top_builddir=`pwd`
1098
1099 echo "$as_me:1099: checking for egrep" >&5
1100 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1101 if test "${ac_cv_prog_egrep+set}" = set; then
1102   echo $ECHO_N "(cached) $ECHO_C" >&6
1103 else
1104   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1105     then ac_cv_prog_egrep='grep -E'
1106     else ac_cv_prog_egrep='egrep'
1107     fi
1108 fi
1109 echo "$as_me:1109: result: $ac_cv_prog_egrep" >&5
1110 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1111  EGREP=$ac_cv_prog_egrep
1112
1113 test -z "$EGREP" && { { echo "$as_me:1113: error: No egrep program found" >&5
1114 echo "$as_me: error: No egrep program found" >&2;}
1115    { (exit 1); exit 1; }; }
1116
1117 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1118 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1119 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1120 cf_cv_abi_version=${NCURSES_MAJOR}
1121 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1122 cf_cv_timestamp=`date`
1123 echo "$as_me:1123: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1124 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1125
1126 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1127
1128 # Check whether --with-rel-version or --without-rel-version was given.
1129 if test "${with_rel_version+set}" = set; then
1130   withval="$with_rel_version"
1131   { echo "$as_me:1131: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1132 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1133  cf_cv_rel_version=$withval
1134 fi;
1135
1136  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1137  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1138
1139 if test -n "$NCURSES_MAJOR" ; then
1140   case $NCURSES_MAJOR in #(vi
1141   [0-9]*) #(vi
1142         ;;
1143   *)
1144         { { echo "$as_me:1144: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1145 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1146    { (exit 1); exit 1; }; }
1147         ;;
1148   esac
1149 else
1150   { { echo "$as_me:1150: error: Release major-version value is empty" >&5
1151 echo "$as_me: error: Release major-version value is empty" >&2;}
1152    { (exit 1); exit 1; }; }
1153 fi
1154
1155 if test -n "$NCURSES_MINOR" ; then
1156   case $NCURSES_MINOR in #(vi
1157   [0-9]*) #(vi
1158         ;;
1159   *)
1160         { { echo "$as_me:1160: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1161 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1162    { (exit 1); exit 1; }; }
1163         ;;
1164   esac
1165 else
1166   { { echo "$as_me:1166: error: Release minor-version value is empty" >&5
1167 echo "$as_me: error: Release minor-version value is empty" >&2;}
1168    { (exit 1); exit 1; }; }
1169 fi
1170
1171 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1172
1173 # Check whether --with-abi-version or --without-abi-version was given.
1174 if test "${with_abi_version+set}" = set; then
1175   withval="$with_abi_version"
1176   { echo "$as_me:1176: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1177 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1178  cf_cv_abi_version=$withval
1179 fi;
1180
1181 if test -n "$cf_cv_abi_version" ; then
1182   case $cf_cv_abi_version in #(vi
1183   [0-9]*) #(vi
1184         ;;
1185   *)
1186         { { echo "$as_me:1186: error: ABI version is not a number: $cf_cv_abi_version" >&5
1187 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1188    { (exit 1); exit 1; }; }
1189         ;;
1190   esac
1191 else
1192   { { echo "$as_me:1192: error: ABI version value is empty" >&5
1193 echo "$as_me: error: ABI version value is empty" >&2;}
1194    { (exit 1); exit 1; }; }
1195 fi
1196
1197 ac_aux_dir=
1198 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1199   if test -f $ac_dir/install-sh; then
1200     ac_aux_dir=$ac_dir
1201     ac_install_sh="$ac_aux_dir/install-sh -c"
1202     break
1203   elif 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/shtool; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/shtool install -c"
1210     break
1211   fi
1212 done
1213 if test -z "$ac_aux_dir"; then
1214   { { echo "$as_me:1214: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1215 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1216    { (exit 1); exit 1; }; }
1217 fi
1218 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1219 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1220 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1221
1222 # Make sure we can run config.sub.
1223 $ac_config_sub sun4 >/dev/null 2>&1 ||
1224   { { echo "$as_me:1224: error: cannot run $ac_config_sub" >&5
1225 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1226    { (exit 1); exit 1; }; }
1227
1228 echo "$as_me:1228: checking build system type" >&5
1229 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1230 if test "${ac_cv_build+set}" = set; then
1231   echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233   ac_cv_build_alias=$build_alias
1234 test -z "$ac_cv_build_alias" &&
1235   ac_cv_build_alias=`$ac_config_guess`
1236 test -z "$ac_cv_build_alias" &&
1237   { { echo "$as_me:1237: error: cannot guess build type; you must specify one" >&5
1238 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1239    { (exit 1); exit 1; }; }
1240 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1241   { { echo "$as_me:1241: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1242 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1243    { (exit 1); exit 1; }; }
1244
1245 fi
1246 echo "$as_me:1246: result: $ac_cv_build" >&5
1247 echo "${ECHO_T}$ac_cv_build" >&6
1248 build=$ac_cv_build
1249 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1250 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1251 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1252
1253 echo "$as_me:1253: checking host system type" >&5
1254 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1255 if test "${ac_cv_host+set}" = set; then
1256   echo $ECHO_N "(cached) $ECHO_C" >&6
1257 else
1258   ac_cv_host_alias=$host_alias
1259 test -z "$ac_cv_host_alias" &&
1260   ac_cv_host_alias=$ac_cv_build_alias
1261 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1262   { { echo "$as_me:1262: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1263 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1264    { (exit 1); exit 1; }; }
1265
1266 fi
1267 echo "$as_me:1267: result: $ac_cv_host" >&5
1268 echo "${ECHO_T}$ac_cv_host" >&6
1269 host=$ac_cv_host
1270 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1271 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1272 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1273
1274 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1275         echo "$as_me:1275: checking target system type" >&5
1276 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1277 if test "${ac_cv_target+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   ac_cv_target_alias=$target_alias
1281 test "x$ac_cv_target_alias" = "x" &&
1282   ac_cv_target_alias=$ac_cv_host_alias
1283 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1284   { { echo "$as_me:1284: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1285 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1286    { (exit 1); exit 1; }; }
1287
1288 fi
1289 echo "$as_me:1289: result: $ac_cv_target" >&5
1290 echo "${ECHO_T}$ac_cv_target" >&6
1291 target=$ac_cv_target
1292 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1293 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1294 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1295
1296 # The aliases save the names the user supplied, while $host etc.
1297 # will get canonicalized.
1298 test -n "$target_alias" &&
1299   test "$program_prefix$program_suffix$program_transform_name" = \
1300     NONENONEs,x,x, &&
1301   program_prefix=${target_alias}-
1302         system_name="$host_os"
1303 else
1304         system_name="`(uname -s -r) 2>/dev/null`"
1305         if test -z "$system_name" ; then
1306                 system_name="`(hostname) 2>/dev/null`"
1307         fi
1308 fi
1309 test -n "$system_name" && cat >>confdefs.h <<EOF
1310 #define SYSTEM_NAME "$system_name"
1311 EOF
1312
1313 if test "${cf_cv_system_name+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   cf_cv_system_name="$system_name"
1317 fi
1318
1319 test -z "$system_name" && system_name="$cf_cv_system_name"
1320 test -n "$cf_cv_system_name" && echo "$as_me:1320: result: Configuring for $cf_cv_system_name" >&5
1321 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1322
1323 if test ".$system_name" != ".$cf_cv_system_name" ; then
1324         echo "$as_me:1324: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1325 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1326         { { echo "$as_me:1326: error: \"Please remove config.cache and try again.\"" >&5
1327 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1328    { (exit 1); exit 1; }; }
1329 fi
1330
1331 # Check whether --with-system-type or --without-system-type was given.
1332 if test "${with_system_type+set}" = set; then
1333   withval="$with_system_type"
1334   { echo "$as_me:1334: WARNING: overriding system type to $withval" >&5
1335 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1336  cf_cv_system_name=$withval
1337 fi;
1338
1339 ###     Save the given $CFLAGS to allow user-override.
1340 cf_user_CFLAGS="$CFLAGS"
1341
1342 ###     Default install-location
1343
1344 echo "$as_me:1344: checking for prefix" >&5
1345 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1346 if test "x$prefix" = "xNONE" ; then
1347         case "$cf_cv_system_name" in
1348                 # non-vendor systems don't have a conflict
1349         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1350                 prefix=/usr
1351                 ;;
1352         *)      prefix=$ac_default_prefix
1353                 ;;
1354         esac
1355 fi
1356 echo "$as_me:1356: result: $prefix" >&5
1357 echo "${ECHO_T}$prefix" >&6
1358
1359 if test "x$prefix" = "xNONE" ; then
1360 echo "$as_me:1360: checking for default include-directory" >&5
1361 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1362 test -n "$verbose" && echo 1>&6
1363 for cf_symbol in \
1364         $includedir \
1365         $includedir/ncurses \
1366         $prefix/include \
1367         $prefix/include/ncurses \
1368         /usr/local/include \
1369         /usr/local/include/ncurses \
1370         /usr/include \
1371         /usr/include/ncurses
1372 do
1373         cf_dir=`eval echo $cf_symbol`
1374         if test -f $cf_dir/curses.h ; then
1375         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1376                 includedir="$cf_symbol"
1377                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1378                 break
1379         fi
1380         fi
1381         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1382 done
1383 echo "$as_me:1383: result: $includedir" >&5
1384 echo "${ECHO_T}$includedir" >&6
1385 fi
1386
1387 ###     Checks for programs.
1388 ac_ext=c
1389 ac_cpp='$CPP $CPPFLAGS'
1390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1393 ac_main_return=return
1394 if test -n "$ac_tool_prefix"; then
1395   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1396 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1397 echo "$as_me:1397: checking for $ac_word" >&5
1398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1399 if test "${ac_cv_prog_CC+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   if test -n "$CC"; then
1403   ac_cv_prog_CC="$CC" # Let the user override the test.
1404 else
1405   ac_save_IFS=$IFS; IFS=$ac_path_separator
1406 ac_dummy="$PATH"
1407 for ac_dir in $ac_dummy; do
1408   IFS=$ac_save_IFS
1409   test -z "$ac_dir" && ac_dir=.
1410   $as_executable_p "$ac_dir/$ac_word" || continue
1411 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1412 echo "$as_me:1412: found $ac_dir/$ac_word" >&5
1413 break
1414 done
1415
1416 fi
1417 fi
1418 CC=$ac_cv_prog_CC
1419 if test -n "$CC"; then
1420   echo "$as_me:1420: result: $CC" >&5
1421 echo "${ECHO_T}$CC" >&6
1422 else
1423   echo "$as_me:1423: result: no" >&5
1424 echo "${ECHO_T}no" >&6
1425 fi
1426
1427 fi
1428 if test -z "$ac_cv_prog_CC"; then
1429   ac_ct_CC=$CC
1430   # Extract the first word of "gcc", so it can be a program name with args.
1431 set dummy gcc; ac_word=$2
1432 echo "$as_me:1432: checking for $ac_word" >&5
1433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   if test -n "$ac_ct_CC"; then
1438   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1439 else
1440   ac_save_IFS=$IFS; IFS=$ac_path_separator
1441 ac_dummy="$PATH"
1442 for ac_dir in $ac_dummy; do
1443   IFS=$ac_save_IFS
1444   test -z "$ac_dir" && ac_dir=.
1445   $as_executable_p "$ac_dir/$ac_word" || continue
1446 ac_cv_prog_ac_ct_CC="gcc"
1447 echo "$as_me:1447: found $ac_dir/$ac_word" >&5
1448 break
1449 done
1450
1451 fi
1452 fi
1453 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1454 if test -n "$ac_ct_CC"; then
1455   echo "$as_me:1455: result: $ac_ct_CC" >&5
1456 echo "${ECHO_T}$ac_ct_CC" >&6
1457 else
1458   echo "$as_me:1458: result: no" >&5
1459 echo "${ECHO_T}no" >&6
1460 fi
1461
1462   CC=$ac_ct_CC
1463 else
1464   CC="$ac_cv_prog_CC"
1465 fi
1466
1467 if test -z "$CC"; then
1468   if test -n "$ac_tool_prefix"; then
1469   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1470 set dummy ${ac_tool_prefix}cc; ac_word=$2
1471 echo "$as_me:1471: checking for $ac_word" >&5
1472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1473 if test "${ac_cv_prog_CC+set}" = set; then
1474   echo $ECHO_N "(cached) $ECHO_C" >&6
1475 else
1476   if test -n "$CC"; then
1477   ac_cv_prog_CC="$CC" # Let the user override the test.
1478 else
1479   ac_save_IFS=$IFS; IFS=$ac_path_separator
1480 ac_dummy="$PATH"
1481 for ac_dir in $ac_dummy; do
1482   IFS=$ac_save_IFS
1483   test -z "$ac_dir" && ac_dir=.
1484   $as_executable_p "$ac_dir/$ac_word" || continue
1485 ac_cv_prog_CC="${ac_tool_prefix}cc"
1486 echo "$as_me:1486: found $ac_dir/$ac_word" >&5
1487 break
1488 done
1489
1490 fi
1491 fi
1492 CC=$ac_cv_prog_CC
1493 if test -n "$CC"; then
1494   echo "$as_me:1494: result: $CC" >&5
1495 echo "${ECHO_T}$CC" >&6
1496 else
1497   echo "$as_me:1497: result: no" >&5
1498 echo "${ECHO_T}no" >&6
1499 fi
1500
1501 fi
1502 if test -z "$ac_cv_prog_CC"; then
1503   ac_ct_CC=$CC
1504   # Extract the first word of "cc", so it can be a program name with args.
1505 set dummy cc; ac_word=$2
1506 echo "$as_me:1506: checking for $ac_word" >&5
1507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1508 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1509   echo $ECHO_N "(cached) $ECHO_C" >&6
1510 else
1511   if test -n "$ac_ct_CC"; then
1512   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1513 else
1514   ac_save_IFS=$IFS; IFS=$ac_path_separator
1515 ac_dummy="$PATH"
1516 for ac_dir in $ac_dummy; do
1517   IFS=$ac_save_IFS
1518   test -z "$ac_dir" && ac_dir=.
1519   $as_executable_p "$ac_dir/$ac_word" || continue
1520 ac_cv_prog_ac_ct_CC="cc"
1521 echo "$as_me:1521: found $ac_dir/$ac_word" >&5
1522 break
1523 done
1524
1525 fi
1526 fi
1527 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1528 if test -n "$ac_ct_CC"; then
1529   echo "$as_me:1529: result: $ac_ct_CC" >&5
1530 echo "${ECHO_T}$ac_ct_CC" >&6
1531 else
1532   echo "$as_me:1532: result: no" >&5
1533 echo "${ECHO_T}no" >&6
1534 fi
1535
1536   CC=$ac_ct_CC
1537 else
1538   CC="$ac_cv_prog_CC"
1539 fi
1540
1541 fi
1542 if test -z "$CC"; then
1543   # Extract the first word of "cc", so it can be a program name with args.
1544 set dummy cc; ac_word=$2
1545 echo "$as_me:1545: checking for $ac_word" >&5
1546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1547 if test "${ac_cv_prog_CC+set}" = set; then
1548   echo $ECHO_N "(cached) $ECHO_C" >&6
1549 else
1550   if test -n "$CC"; then
1551   ac_cv_prog_CC="$CC" # Let the user override the test.
1552 else
1553   ac_prog_rejected=no
1554   ac_save_IFS=$IFS; IFS=$ac_path_separator
1555 ac_dummy="$PATH"
1556 for ac_dir in $ac_dummy; do
1557   IFS=$ac_save_IFS
1558   test -z "$ac_dir" && ac_dir=.
1559   $as_executable_p "$ac_dir/$ac_word" || continue
1560 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1561   ac_prog_rejected=yes
1562   continue
1563 fi
1564 ac_cv_prog_CC="cc"
1565 echo "$as_me:1565: found $ac_dir/$ac_word" >&5
1566 break
1567 done
1568
1569 if test $ac_prog_rejected = yes; then
1570   # We found a bogon in the path, so make sure we never use it.
1571   set dummy $ac_cv_prog_CC
1572   shift
1573   if test $# != 0; then
1574     # We chose a different compiler from the bogus one.
1575     # However, it has the same basename, so the bogon will be chosen
1576     # first if we set CC to just the basename; use the full file name.
1577     shift
1578     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1579     shift
1580     ac_cv_prog_CC="$@"
1581   fi
1582 fi
1583 fi
1584 fi
1585 CC=$ac_cv_prog_CC
1586 if test -n "$CC"; then
1587   echo "$as_me:1587: result: $CC" >&5
1588 echo "${ECHO_T}$CC" >&6
1589 else
1590   echo "$as_me:1590: result: no" >&5
1591 echo "${ECHO_T}no" >&6
1592 fi
1593
1594 fi
1595 if test -z "$CC"; then
1596   if test -n "$ac_tool_prefix"; then
1597   for ac_prog in cl
1598   do
1599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1601 echo "$as_me:1601: checking for $ac_word" >&5
1602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1603 if test "${ac_cv_prog_CC+set}" = set; then
1604   echo $ECHO_N "(cached) $ECHO_C" >&6
1605 else
1606   if test -n "$CC"; then
1607   ac_cv_prog_CC="$CC" # Let the user override the test.
1608 else
1609   ac_save_IFS=$IFS; IFS=$ac_path_separator
1610 ac_dummy="$PATH"
1611 for ac_dir in $ac_dummy; do
1612   IFS=$ac_save_IFS
1613   test -z "$ac_dir" && ac_dir=.
1614   $as_executable_p "$ac_dir/$ac_word" || continue
1615 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1616 echo "$as_me:1616: found $ac_dir/$ac_word" >&5
1617 break
1618 done
1619
1620 fi
1621 fi
1622 CC=$ac_cv_prog_CC
1623 if test -n "$CC"; then
1624   echo "$as_me:1624: result: $CC" >&5
1625 echo "${ECHO_T}$CC" >&6
1626 else
1627   echo "$as_me:1627: result: no" >&5
1628 echo "${ECHO_T}no" >&6
1629 fi
1630
1631     test -n "$CC" && break
1632   done
1633 fi
1634 if test -z "$CC"; then
1635   ac_ct_CC=$CC
1636   for ac_prog in cl
1637 do
1638   # Extract the first word of "$ac_prog", so it can be a program name with args.
1639 set dummy $ac_prog; ac_word=$2
1640 echo "$as_me:1640: checking for $ac_word" >&5
1641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1642 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   if test -n "$ac_ct_CC"; then
1646   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1647 else
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   $as_executable_p "$ac_dir/$ac_word" || continue
1654 ac_cv_prog_ac_ct_CC="$ac_prog"
1655 echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656 break
1657 done
1658
1659 fi
1660 fi
1661 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1662 if test -n "$ac_ct_CC"; then
1663   echo "$as_me:1663: result: $ac_ct_CC" >&5
1664 echo "${ECHO_T}$ac_ct_CC" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$ac_ct_CC" && break
1671 done
1672
1673   CC=$ac_ct_CC
1674 fi
1675
1676 fi
1677
1678 test -z "$CC" && { { echo "$as_me:1678: error: no acceptable cc found in \$PATH" >&5
1679 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1680    { (exit 1); exit 1; }; }
1681
1682 # Provide some information about the compiler.
1683 echo "$as_me:1683:" \
1684      "checking for C compiler version" >&5
1685 ac_compiler=`set X $ac_compile; echo $2`
1686 { (eval echo "$as_me:1686: \"$ac_compiler --version </dev/null >&5\"") >&5
1687   (eval $ac_compiler --version </dev/null >&5) 2>&5
1688   ac_status=$?
1689   echo "$as_me:1689: \$? = $ac_status" >&5
1690   (exit $ac_status); }
1691 { (eval echo "$as_me:1691: \"$ac_compiler -v </dev/null >&5\"") >&5
1692   (eval $ac_compiler -v </dev/null >&5) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }
1696 { (eval echo "$as_me:1696: \"$ac_compiler -V </dev/null >&5\"") >&5
1697   (eval $ac_compiler -V </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701
1702 cat >conftest.$ac_ext <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1705
1706 int
1707 main ()
1708 {
1709
1710   ;
1711   return 0;
1712 }
1713 _ACEOF
1714 ac_clean_files_save=$ac_clean_files
1715 ac_clean_files="$ac_clean_files a.out a.exe"
1716 # Try to create an executable without -o first, disregard a.out.
1717 # It will help us diagnose broken compilers, and finding out an intuition
1718 # of exeext.
1719 echo "$as_me:1719: checking for C compiler default output" >&5
1720 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1721 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1722 if { (eval echo "$as_me:1722: \"$ac_link_default\"") >&5
1723   (eval $ac_link_default) 2>&5
1724   ac_status=$?
1725   echo "$as_me:1725: \$? = $ac_status" >&5
1726   (exit $ac_status); }; then
1727   # Find the output, starting from the most likely.  This scheme is
1728 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1729 # resort.
1730 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1731                 ls a.out conftest 2>/dev/null;
1732                 ls a.* conftest.* 2>/dev/null`; do
1733   case $ac_file in
1734     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1735     a.out ) # We found the default executable, but exeext='' is most
1736             # certainly right.
1737             break;;
1738     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1739           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1740           export ac_cv_exeext
1741           break;;
1742     * ) break;;
1743   esac
1744 done
1745 else
1746   echo "$as_me: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 { { echo "$as_me:1748: error: C compiler cannot create executables" >&5
1749 echo "$as_me: error: C compiler cannot create executables" >&2;}
1750    { (exit 77); exit 77; }; }
1751 fi
1752
1753 ac_exeext=$ac_cv_exeext
1754 echo "$as_me:1754: result: $ac_file" >&5
1755 echo "${ECHO_T}$ac_file" >&6
1756
1757 # Check the compiler produces executables we can run.  If not, either
1758 # the compiler is broken, or we cross compile.
1759 echo "$as_me:1759: checking whether the C compiler works" >&5
1760 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1761 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1762 # If not cross compiling, check that we can run a simple program.
1763 if test "$cross_compiling" != yes; then
1764   if { ac_try='./$ac_file'
1765   { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766   (eval $ac_try) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); }; }; then
1770     cross_compiling=no
1771   else
1772     if test "$cross_compiling" = maybe; then
1773         cross_compiling=yes
1774     else
1775         { { echo "$as_me:1775: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&5
1777 echo "$as_me: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&2;}
1779    { (exit 1); exit 1; }; }
1780     fi
1781   fi
1782 fi
1783 echo "$as_me:1783: result: yes" >&5
1784 echo "${ECHO_T}yes" >&6
1785
1786 rm -f a.out a.exe conftest$ac_cv_exeext
1787 ac_clean_files=$ac_clean_files_save
1788 # Check the compiler produces executables we can run.  If not, either
1789 # the compiler is broken, or we cross compile.
1790 echo "$as_me:1790: checking whether we are cross compiling" >&5
1791 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1792 echo "$as_me:1792: result: $cross_compiling" >&5
1793 echo "${ECHO_T}$cross_compiling" >&6
1794
1795 echo "$as_me:1795: checking for executable suffix" >&5
1796 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1797 if { (eval echo "$as_me:1797: \"$ac_link\"") >&5
1798   (eval $ac_link) 2>&5
1799   ac_status=$?
1800   echo "$as_me:1800: \$? = $ac_status" >&5
1801   (exit $ac_status); }; then
1802   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1803 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1804 # work properly (i.e., refer to `conftest.exe'), while it won't with
1805 # `rm'.
1806 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1807   case $ac_file in
1808     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1809     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810           export ac_cv_exeext
1811           break;;
1812     * ) break;;
1813   esac
1814 done
1815 else
1816   { { echo "$as_me:1816: error: cannot compute EXEEXT: cannot compile and link" >&5
1817 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1818    { (exit 1); exit 1; }; }
1819 fi
1820
1821 rm -f conftest$ac_cv_exeext
1822 echo "$as_me:1822: result: $ac_cv_exeext" >&5
1823 echo "${ECHO_T}$ac_cv_exeext" >&6
1824
1825 rm -f conftest.$ac_ext
1826 EXEEXT=$ac_cv_exeext
1827 ac_exeext=$EXEEXT
1828 echo "$as_me:1828: checking for object suffix" >&5
1829 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1830 if test "${ac_cv_objext+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833   cat >conftest.$ac_ext <<_ACEOF
1834 #line 1834 "configure"
1835 #include "confdefs.h"
1836
1837 int
1838 main ()
1839 {
1840
1841   ;
1842   return 0;
1843 }
1844 _ACEOF
1845 rm -f conftest.o conftest.obj
1846 if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847   (eval $ac_compile) 2>&5
1848   ac_status=$?
1849   echo "$as_me:1849: \$? = $ac_status" >&5
1850   (exit $ac_status); }; then
1851   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1852   case $ac_file in
1853     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1854     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1855        break;;
1856   esac
1857 done
1858 else
1859   echo "$as_me: failed program was:" >&5
1860 cat conftest.$ac_ext >&5
1861 { { echo "$as_me:1861: error: cannot compute OBJEXT: cannot compile" >&5
1862 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1863    { (exit 1); exit 1; }; }
1864 fi
1865
1866 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1867 fi
1868 echo "$as_me:1868: result: $ac_cv_objext" >&5
1869 echo "${ECHO_T}$ac_cv_objext" >&6
1870 OBJEXT=$ac_cv_objext
1871 ac_objext=$OBJEXT
1872 echo "$as_me:1872: checking whether we are using the GNU C compiler" >&5
1873 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1874 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main ()
1883 {
1884 #ifndef __GNUC__
1885        choke me
1886 #endif
1887
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   ac_compiler_gnu=yes
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 ac_compiler_gnu=no
1909 fi
1910 rm -f conftest.$ac_objext conftest.$ac_ext
1911 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1912
1913 fi
1914 echo "$as_me:1914: result: $ac_cv_c_compiler_gnu" >&5
1915 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1916 GCC=`test $ac_compiler_gnu = yes && echo yes`
1917 ac_test_CFLAGS=${CFLAGS+set}
1918 ac_save_CFLAGS=$CFLAGS
1919 CFLAGS="-g"
1920 echo "$as_me:1920: checking whether $CC accepts -g" >&5
1921 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1922 if test "${ac_cv_prog_cc_g+set}" = set; then
1923   echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925   cat >conftest.$ac_ext <<_ACEOF
1926 #line 1926 "configure"
1927 #include "confdefs.h"
1928
1929 int
1930 main ()
1931 {
1932
1933   ;
1934   return 0;
1935 }
1936 _ACEOF
1937 rm -f conftest.$ac_objext
1938 if { (eval echo "$as_me:1938: \"$ac_compile\"") >&5
1939   (eval $ac_compile) 2>&5
1940   ac_status=$?
1941   echo "$as_me:1941: \$? = $ac_status" >&5
1942   (exit $ac_status); } &&
1943          { ac_try='test -s conftest.$ac_objext'
1944   { (eval echo "$as_me:1944: \"$ac_try\"") >&5
1945   (eval $ac_try) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); }; }; then
1949   ac_cv_prog_cc_g=yes
1950 else
1951   echo "$as_me: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 ac_cv_prog_cc_g=no
1954 fi
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 fi
1957 echo "$as_me:1957: result: $ac_cv_prog_cc_g" >&5
1958 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1959 if test "$ac_test_CFLAGS" = set; then
1960   CFLAGS=$ac_save_CFLAGS
1961 elif test $ac_cv_prog_cc_g = yes; then
1962   if test "$GCC" = yes; then
1963     CFLAGS="-g -O2"
1964   else
1965     CFLAGS="-g"
1966   fi
1967 else
1968   if test "$GCC" = yes; then
1969     CFLAGS="-O2"
1970   else
1971     CFLAGS=
1972   fi
1973 fi
1974 # Some people use a C++ compiler to compile C.  Since we use `exit',
1975 # in C++ we need to declare it.  In case someone uses the same compiler
1976 # for both compiling C and C++ we need to have the C++ compiler decide
1977 # the declaration of exit, since it's the most demanding environment.
1978 cat >conftest.$ac_ext <<_ACEOF
1979 #ifndef __cplusplus
1980   choke me
1981 #endif
1982 _ACEOF
1983 rm -f conftest.$ac_objext
1984 if { (eval echo "$as_me:1984: \"$ac_compile\"") >&5
1985   (eval $ac_compile) 2>&5
1986   ac_status=$?
1987   echo "$as_me:1987: \$? = $ac_status" >&5
1988   (exit $ac_status); } &&
1989          { ac_try='test -s conftest.$ac_objext'
1990   { (eval echo "$as_me:1990: \"$ac_try\"") >&5
1991   (eval $ac_try) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); }; }; then
1995   for ac_declaration in \
1996    ''\
1997    '#include <stdlib.h>' \
1998    'extern "C" void std::exit (int) throw (); using std::exit;' \
1999    'extern "C" void std::exit (int); using std::exit;' \
2000    'extern "C" void exit (int) throw ();' \
2001    'extern "C" void exit (int);' \
2002    'void exit (int);'
2003 do
2004   cat >conftest.$ac_ext <<_ACEOF
2005 #line 2005 "configure"
2006 #include "confdefs.h"
2007 #include <stdlib.h>
2008 $ac_declaration
2009 int
2010 main ()
2011 {
2012 exit (42);
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:2018: \"$ac_compile\"") >&5
2019   (eval $ac_compile) 2>&5
2020   ac_status=$?
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } &&
2023          { ac_try='test -s conftest.$ac_objext'
2024   { (eval echo "$as_me:2024: \"$ac_try\"") >&5
2025   (eval $ac_try) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); }; }; then
2029   :
2030 else
2031   echo "$as_me: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 continue
2034 fi
2035 rm -f conftest.$ac_objext conftest.$ac_ext
2036   cat >conftest.$ac_ext <<_ACEOF
2037 #line 2037 "configure"
2038 #include "confdefs.h"
2039 $ac_declaration
2040 int
2041 main ()
2042 {
2043 exit (42);
2044   ;
2045   return 0;
2046 }
2047 _ACEOF
2048 rm -f conftest.$ac_objext
2049 if { (eval echo "$as_me:2049: \"$ac_compile\"") >&5
2050   (eval $ac_compile) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } &&
2054          { ac_try='test -s conftest.$ac_objext'
2055   { (eval echo "$as_me:2055: \"$ac_try\"") >&5
2056   (eval $ac_try) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); }; }; then
2060   break
2061 else
2062   echo "$as_me: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 fi
2065 rm -f conftest.$ac_objext conftest.$ac_ext
2066 done
2067 rm -f conftest*
2068 if test -n "$ac_declaration"; then
2069   echo '#ifdef __cplusplus' >>confdefs.h
2070   echo $ac_declaration      >>confdefs.h
2071   echo '#endif'             >>confdefs.h
2072 fi
2073
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 ac_ext=c
2080 ac_cpp='$CPP $CPPFLAGS'
2081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2084 ac_main_return=return
2085
2086 GCC_VERSION=none
2087 if test "$GCC" = yes ; then
2088         echo "$as_me:2088: checking version of $CC" >&5
2089 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2090         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2091         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2092         echo "$as_me:2092: result: $GCC_VERSION" >&5
2093 echo "${ECHO_T}$GCC_VERSION" >&6
2094 fi
2095
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102 echo "$as_me:2102: checking how to run the C preprocessor" >&5
2103 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2104 # On Suns, sometimes $CPP names a directory.
2105 if test -n "$CPP" && test -d "$CPP"; then
2106   CPP=
2107 fi
2108 if test -z "$CPP"; then
2109   if test "${ac_cv_prog_CPP+set}" = set; then
2110   echo $ECHO_N "(cached) $ECHO_C" >&6
2111 else
2112       # Double quotes because CPP needs to be expanded
2113     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2114     do
2115       ac_preproc_ok=false
2116 for ac_c_preproc_warn_flag in '' yes
2117 do
2118   # Use a header file that comes with gcc, so configuring glibc
2119   # with a fresh cross-compiler works.
2120   # On the NeXT, cc -E runs the code through the compiler's parser,
2121   # not just through cpp. "Syntax error" is here to catch this case.
2122   cat >conftest.$ac_ext <<_ACEOF
2123 #line 2123 "configure"
2124 #include "confdefs.h"
2125 #include <assert.h>
2126                      Syntax error
2127 _ACEOF
2128 if { (eval echo "$as_me:2128: \"$ac_cpp conftest.$ac_ext\"") >&5
2129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2130   ac_status=$?
2131   egrep -v '^ *\+' conftest.er1 >conftest.err
2132   rm -f conftest.er1
2133   cat conftest.err >&5
2134   echo "$as_me:2134: \$? = $ac_status" >&5
2135   (exit $ac_status); } >/dev/null; then
2136   if test -s conftest.err; then
2137     ac_cpp_err=$ac_c_preproc_warn_flag
2138   else
2139     ac_cpp_err=
2140   fi
2141 else
2142   ac_cpp_err=yes
2143 fi
2144 if test -z "$ac_cpp_err"; then
2145   :
2146 else
2147   echo "$as_me: failed program was:" >&5
2148   cat conftest.$ac_ext >&5
2149   # Broken: fails on valid input.
2150 continue
2151 fi
2152 rm -f conftest.err conftest.$ac_ext
2153
2154   # OK, works on sane cases.  Now check whether non-existent headers
2155   # can be detected and how.
2156   cat >conftest.$ac_ext <<_ACEOF
2157 #line 2157 "configure"
2158 #include "confdefs.h"
2159 #include <ac_nonexistent.h>
2160 _ACEOF
2161 if { (eval echo "$as_me:2161: \"$ac_cpp conftest.$ac_ext\"") >&5
2162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2163   ac_status=$?
2164   egrep -v '^ *\+' conftest.er1 >conftest.err
2165   rm -f conftest.er1
2166   cat conftest.err >&5
2167   echo "$as_me:2167: \$? = $ac_status" >&5
2168   (exit $ac_status); } >/dev/null; then
2169   if test -s conftest.err; then
2170     ac_cpp_err=$ac_c_preproc_warn_flag
2171   else
2172     ac_cpp_err=
2173   fi
2174 else
2175   ac_cpp_err=yes
2176 fi
2177 if test -z "$ac_cpp_err"; then
2178   # Broken: success on invalid input.
2179 continue
2180 else
2181   echo "$as_me: failed program was:" >&5
2182   cat conftest.$ac_ext >&5
2183   # Passes both tests.
2184 ac_preproc_ok=:
2185 break
2186 fi
2187 rm -f conftest.err conftest.$ac_ext
2188
2189 done
2190 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2191 rm -f conftest.err conftest.$ac_ext
2192 if $ac_preproc_ok; then
2193   break
2194 fi
2195
2196     done
2197     ac_cv_prog_CPP=$CPP
2198
2199 fi
2200   CPP=$ac_cv_prog_CPP
2201 else
2202   ac_cv_prog_CPP=$CPP
2203 fi
2204 echo "$as_me:2204: result: $CPP" >&5
2205 echo "${ECHO_T}$CPP" >&6
2206 ac_preproc_ok=false
2207 for ac_c_preproc_warn_flag in '' yes
2208 do
2209   # Use a header file that comes with gcc, so configuring glibc
2210   # with a fresh cross-compiler works.
2211   # On the NeXT, cc -E runs the code through the compiler's parser,
2212   # not just through cpp. "Syntax error" is here to catch this case.
2213   cat >conftest.$ac_ext <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 #include <assert.h>
2217                      Syntax error
2218 _ACEOF
2219 if { (eval echo "$as_me:2219: \"$ac_cpp conftest.$ac_ext\"") >&5
2220   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2221   ac_status=$?
2222   egrep -v '^ *\+' conftest.er1 >conftest.err
2223   rm -f conftest.er1
2224   cat conftest.err >&5
2225   echo "$as_me:2225: \$? = $ac_status" >&5
2226   (exit $ac_status); } >/dev/null; then
2227   if test -s conftest.err; then
2228     ac_cpp_err=$ac_c_preproc_warn_flag
2229   else
2230     ac_cpp_err=
2231   fi
2232 else
2233   ac_cpp_err=yes
2234 fi
2235 if test -z "$ac_cpp_err"; then
2236   :
2237 else
2238   echo "$as_me: failed program was:" >&5
2239   cat conftest.$ac_ext >&5
2240   # Broken: fails on valid input.
2241 continue
2242 fi
2243 rm -f conftest.err conftest.$ac_ext
2244
2245   # OK, works on sane cases.  Now check whether non-existent headers
2246   # can be detected and how.
2247   cat >conftest.$ac_ext <<_ACEOF
2248 #line 2248 "configure"
2249 #include "confdefs.h"
2250 #include <ac_nonexistent.h>
2251 _ACEOF
2252 if { (eval echo "$as_me:2252: \"$ac_cpp conftest.$ac_ext\"") >&5
2253   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2254   ac_status=$?
2255   egrep -v '^ *\+' conftest.er1 >conftest.err
2256   rm -f conftest.er1
2257   cat conftest.err >&5
2258   echo "$as_me:2258: \$? = $ac_status" >&5
2259   (exit $ac_status); } >/dev/null; then
2260   if test -s conftest.err; then
2261     ac_cpp_err=$ac_c_preproc_warn_flag
2262   else
2263     ac_cpp_err=
2264   fi
2265 else
2266   ac_cpp_err=yes
2267 fi
2268 if test -z "$ac_cpp_err"; then
2269   # Broken: success on invalid input.
2270 continue
2271 else
2272   echo "$as_me: failed program was:" >&5
2273   cat conftest.$ac_ext >&5
2274   # Passes both tests.
2275 ac_preproc_ok=:
2276 break
2277 fi
2278 rm -f conftest.err conftest.$ac_ext
2279
2280 done
2281 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2282 rm -f conftest.err conftest.$ac_ext
2283 if $ac_preproc_ok; then
2284   :
2285 else
2286   { { echo "$as_me:2286: error: C preprocessor \"$CPP\" fails sanity check" >&5
2287 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2288    { (exit 1); exit 1; }; }
2289 fi
2290
2291 ac_ext=c
2292 ac_cpp='$CPP $CPPFLAGS'
2293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296 ac_main_return=return
2297
2298 if test $ac_cv_c_compiler_gnu = yes; then
2299     echo "$as_me:2299: checking whether $CC needs -traditional" >&5
2300 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2301 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2302   echo $ECHO_N "(cached) $ECHO_C" >&6
2303 else
2304     ac_pattern="Autoconf.*'x'"
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <sgtty.h>
2309 int Autoconf = TIOCGETP;
2310 _ACEOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312   egrep "$ac_pattern" >/dev/null 2>&1; then
2313   ac_cv_prog_gcc_traditional=yes
2314 else
2315   ac_cv_prog_gcc_traditional=no
2316 fi
2317 rm -f conftest*
2318
2319   if test $ac_cv_prog_gcc_traditional = no; then
2320     cat >conftest.$ac_ext <<_ACEOF
2321 #line 2321 "configure"
2322 #include "confdefs.h"
2323 #include <termio.h>
2324 int Autoconf = TCGETA;
2325 _ACEOF
2326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2327   egrep "$ac_pattern" >/dev/null 2>&1; then
2328   ac_cv_prog_gcc_traditional=yes
2329 fi
2330 rm -f conftest*
2331
2332   fi
2333 fi
2334 echo "$as_me:2334: result: $ac_cv_prog_gcc_traditional" >&5
2335 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2336   if test $ac_cv_prog_gcc_traditional = yes; then
2337     CC="$CC -traditional"
2338   fi
2339 fi
2340
2341 echo "$as_me:2341: checking whether $CC understands -c and -o together" >&5
2342 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2343 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346
2347 cat > conftest.$ac_ext <<CF_EOF
2348 #include <stdio.h>
2349 int main()
2350 {
2351         ${cf_cv_main_return:-return}(0);
2352 }
2353 CF_EOF
2354 # We do the test twice because some compilers refuse to overwrite an
2355 # existing .o file with -o, though they will create one.
2356 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2357 if { (eval echo "$as_me:2357: \"$ac_try\"") >&5
2358   (eval $ac_try) 2>&5
2359   ac_status=$?
2360   echo "$as_me:2360: \$? = $ac_status" >&5
2361   (exit $ac_status); } &&
2362   test -f conftest2.$ac_objext && { (eval echo "$as_me:2362: \"$ac_try\"") >&5
2363   (eval $ac_try) 2>&5
2364   ac_status=$?
2365   echo "$as_me:2365: \$? = $ac_status" >&5
2366   (exit $ac_status); };
2367 then
2368   eval cf_cv_prog_CC_c_o=yes
2369 else
2370   eval cf_cv_prog_CC_c_o=no
2371 fi
2372 rm -f conftest*
2373
2374 fi
2375 if test $cf_cv_prog_CC_c_o = yes; then
2376   echo "$as_me:2376: result: yes" >&5
2377 echo "${ECHO_T}yes" >&6
2378 else
2379   echo "$as_me:2379: result: no" >&5
2380 echo "${ECHO_T}no" >&6
2381 fi
2382
2383 echo "$as_me:2383: checking for POSIXized ISC" >&5
2384 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2385 if test -d /etc/conf/kconfig.d &&
2386    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2387 then
2388   echo "$as_me:2388: result: yes" >&5
2389 echo "${ECHO_T}yes" >&6
2390   ISC=yes # If later tests want to check for ISC.
2391
2392 cat >>confdefs.h <<\EOF
2393 #define _POSIX_SOURCE 1
2394 EOF
2395
2396   if test "$GCC" = yes; then
2397     CC="$CC -posix"
2398   else
2399     CC="$CC -Xp"
2400   fi
2401 else
2402   echo "$as_me:2402: result: no" >&5
2403 echo "${ECHO_T}no" >&6
2404   ISC=
2405 fi
2406
2407 echo "$as_me:2407: checking for ${CC-cc} option to accept ANSI C" >&5
2408 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2409 if test "${cf_cv_ansi_cc+set}" = set; then
2410   echo $ECHO_N "(cached) $ECHO_C" >&6
2411 else
2412
2413 cf_cv_ansi_cc=no
2414 cf_save_CFLAGS="$CFLAGS"
2415 cf_save_CPPFLAGS="$CPPFLAGS"
2416 # Don't try gcc -ansi; that turns off useful extensions and
2417 # breaks some systems' header files.
2418 # AIX                   -qlanglvl=ansi
2419 # Ultrix and OSF/1      -std1
2420 # HP-UX                 -Aa -D_HPUX_SOURCE
2421 # SVR4                  -Xc
2422 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2423 for cf_arg in "-DCC_HAS_PROTOS" \
2424         "" \
2425         -qlanglvl=ansi \
2426         -std1 \
2427         -Ae \
2428         "-Aa -D_HPUX_SOURCE" \
2429         -Xc
2430 do
2431
2432 cf_fix_cppflags=no
2433 cf_new_cflags=
2434 cf_new_cppflags=
2435 cf_new_extra_cppflags=
2436
2437 for cf_add_cflags in $cf_arg
2438 do
2439 case $cf_fix_cppflags in
2440 no)
2441         case $cf_add_cflags in #(vi
2442         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2443                 case $cf_add_cflags in
2444                 -D*)
2445                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2446
2447                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2448                         && test -z "${cf_tst_cflags}" \
2449                         && cf_fix_cppflags=yes
2450
2451                         if test $cf_fix_cppflags = yes ; then
2452                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2453                                 continue
2454                         elif test "${cf_tst_cflags}" = "\"'" ; then
2455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2456                                 continue
2457                         fi
2458                         ;;
2459                 esac
2460                 case "$CPPFLAGS" in
2461                 *$cf_add_cflags) #(vi
2462                         ;;
2463                 *) #(vi
2464                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2465                         ;;
2466                 esac
2467                 ;;
2468         *)
2469                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2470                 ;;
2471         esac
2472         ;;
2473 yes)
2474         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2475
2476         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2477
2478         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2479         && test -z "${cf_tst_cflags}" \
2480         && cf_fix_cppflags=no
2481         ;;
2482 esac
2483 done
2484
2485 if test -n "$cf_new_cflags" ; then
2486
2487         CFLAGS="$CFLAGS $cf_new_cflags"
2488 fi
2489
2490 if test -n "$cf_new_cppflags" ; then
2491
2492         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2493 fi
2494
2495 if test -n "$cf_new_extra_cppflags" ; then
2496
2497         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2498 fi
2499
2500         cat >conftest.$ac_ext <<_ACEOF
2501 #line 2501 "configure"
2502 #include "confdefs.h"
2503
2504 #ifndef CC_HAS_PROTOS
2505 #if !defined(__STDC__) || (__STDC__ != 1)
2506 choke me
2507 #endif
2508 #endif
2509
2510 int
2511 main ()
2512 {
2513
2514         int test (int i, double x);
2515         struct s1 {int (*f) (int a);};
2516         struct s2 {int (*f) (double a);};
2517   ;
2518   return 0;
2519 }
2520 _ACEOF
2521 rm -f conftest.$ac_objext
2522 if { (eval echo "$as_me:2522: \"$ac_compile\"") >&5
2523   (eval $ac_compile) 2>&5
2524   ac_status=$?
2525   echo "$as_me:2525: \$? = $ac_status" >&5
2526   (exit $ac_status); } &&
2527          { ac_try='test -s conftest.$ac_objext'
2528   { (eval echo "$as_me:2528: \"$ac_try\"") >&5
2529   (eval $ac_try) 2>&5
2530   ac_status=$?
2531   echo "$as_me:2531: \$? = $ac_status" >&5
2532   (exit $ac_status); }; }; then
2533   cf_cv_ansi_cc="$cf_arg"; break
2534 else
2535   echo "$as_me: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 fi
2538 rm -f conftest.$ac_objext conftest.$ac_ext
2539 done
2540 CFLAGS="$cf_save_CFLAGS"
2541 CPPFLAGS="$cf_save_CPPFLAGS"
2542
2543 fi
2544 echo "$as_me:2544: result: $cf_cv_ansi_cc" >&5
2545 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2546
2547 if test "$cf_cv_ansi_cc" != "no"; then
2548 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2549
2550 cf_fix_cppflags=no
2551 cf_new_cflags=
2552 cf_new_cppflags=
2553 cf_new_extra_cppflags=
2554
2555 for cf_add_cflags in $cf_cv_ansi_cc
2556 do
2557 case $cf_fix_cppflags in
2558 no)
2559         case $cf_add_cflags in #(vi
2560         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2561                 case $cf_add_cflags in
2562                 -D*)
2563                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2564
2565                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2566                         && test -z "${cf_tst_cflags}" \
2567                         && cf_fix_cppflags=yes
2568
2569                         if test $cf_fix_cppflags = yes ; then
2570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2571                                 continue
2572                         elif test "${cf_tst_cflags}" = "\"'" ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         fi
2576                         ;;
2577                 esac
2578                 case "$CPPFLAGS" in
2579                 *$cf_add_cflags) #(vi
2580                         ;;
2581                 *) #(vi
2582                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2583                         ;;
2584                 esac
2585                 ;;
2586         *)
2587                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2588                 ;;
2589         esac
2590         ;;
2591 yes)
2592         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2593
2594         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2595
2596         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2597         && test -z "${cf_tst_cflags}" \
2598         && cf_fix_cppflags=no
2599         ;;
2600 esac
2601 done
2602
2603 if test -n "$cf_new_cflags" ; then
2604
2605         CFLAGS="$CFLAGS $cf_new_cflags"
2606 fi
2607
2608 if test -n "$cf_new_cppflags" ; then
2609
2610         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2611 fi
2612
2613 if test -n "$cf_new_extra_cppflags" ; then
2614
2615         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2616 fi
2617
2618 else
2619         cat >>confdefs.h <<\EOF
2620 #define CC_HAS_PROTOS 1
2621 EOF
2622
2623 fi
2624 fi
2625
2626 if test "$cf_cv_ansi_cc" = "no"; then
2627         { { echo "$as_me:2627: error: Your compiler does not appear to recognize prototypes.
2628 You have the following choices:
2629         a. adjust your compiler options
2630         b. get an up-to-date compiler
2631         c. use a wrapper such as unproto" >&5
2632 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2633 You have the following choices:
2634         a. adjust your compiler options
2635         b. get an up-to-date compiler
2636         c. use a wrapper such as unproto" >&2;}
2637    { (exit 1); exit 1; }; }
2638 fi
2639
2640 case $cf_cv_system_name in
2641 os2*)
2642     CFLAGS="$CFLAGS -Zmt"
2643     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2644     CXXFLAGS="$CXXFLAGS -Zmt"
2645     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2646     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2647     ac_cv_exeext=.exe
2648     ;;
2649 esac
2650
2651 PROG_EXT="$EXEEXT"
2652
2653 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2654 #define PROG_EXT "$PROG_EXT"
2655 EOF
2656
2657 if test "$cross_compiling" = yes ; then
2658   LDCONFIG=:
2659 else
2660 case "$cf_cv_system_name" in #(vi
2661 freebsd*) #(vi
2662   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2663   ;;
2664 *) LDPATH=$PATH:/sbin:/usr/sbin
2665   # Extract the first word of "ldconfig", so it can be a program name with args.
2666 set dummy ldconfig; ac_word=$2
2667 echo "$as_me:2667: checking for $ac_word" >&5
2668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2669 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672   case $LDCONFIG in
2673   [\\/]* | ?:[\\/]*)
2674   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2675   ;;
2676   *)
2677   ac_save_IFS=$IFS; IFS=$ac_path_separator
2678 ac_dummy="$LDPATH"
2679 for ac_dir in $ac_dummy; do
2680   IFS=$ac_save_IFS
2681   test -z "$ac_dir" && ac_dir=.
2682   if $as_executable_p "$ac_dir/$ac_word"; then
2683    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2684    echo "$as_me:2684: found $ac_dir/$ac_word" >&5
2685    break
2686 fi
2687 done
2688
2689   ;;
2690 esac
2691 fi
2692 LDCONFIG=$ac_cv_path_LDCONFIG
2693
2694 if test -n "$LDCONFIG"; then
2695   echo "$as_me:2695: result: $LDCONFIG" >&5
2696 echo "${ECHO_T}$LDCONFIG" >&6
2697 else
2698   echo "$as_me:2698: result: no" >&5
2699 echo "${ECHO_T}no" >&6
2700 fi
2701
2702   ;;
2703 esac
2704 fi
2705
2706 echo "$as_me:2706: checking if you want to ensure bool is consistent with C++" >&5
2707 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2708
2709 # Check whether --with-cxx or --without-cxx was given.
2710 if test "${with_cxx+set}" = set; then
2711   withval="$with_cxx"
2712   cf_with_cxx=$withval
2713 else
2714   cf_with_cxx=yes
2715 fi;
2716 echo "$as_me:2716: result: $cf_with_cxx" >&5
2717 echo "${ECHO_T}$cf_with_cxx" >&6
2718 if test "X$cf_with_cxx" = Xno ; then
2719         CXX=""
2720         GXX=""
2721 else
2722         # with autoconf 2.13, we can change the error to a warning:
2723                 ac_ext=cc
2724 ac_cpp='$CXXCPP $CPPFLAGS'
2725 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2726 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2727 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2728 ac_main_return=return
2729 if test -n "$ac_tool_prefix"; then
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731   do
2732     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$CXX"; then
2740   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 CXX=$ac_cv_prog_CXX
2756 if test -n "$CXX"; then
2757   echo "$as_me:2757: result: $CXX" >&5
2758 echo "${ECHO_T}$CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764     test -n "$CXX" && break
2765   done
2766 fi
2767 if test -z "$CXX"; then
2768   ac_ct_CXX=$CXX
2769   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2770 do
2771   # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2776   echo $ECHO_N "(cached) $ECHO_C" >&6
2777 else
2778   if test -n "$ac_ct_CXX"; then
2779   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2780 else
2781   ac_save_IFS=$IFS; IFS=$ac_path_separator
2782 ac_dummy="$PATH"
2783 for ac_dir in $ac_dummy; do
2784   IFS=$ac_save_IFS
2785   test -z "$ac_dir" && ac_dir=.
2786   $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_ac_ct_CXX="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2789 break
2790 done
2791
2792 fi
2793 fi
2794 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2795 if test -n "$ac_ct_CXX"; then
2796   echo "$as_me:2796: result: $ac_ct_CXX" >&5
2797 echo "${ECHO_T}$ac_ct_CXX" >&6
2798 else
2799   echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2801 fi
2802
2803   test -n "$ac_ct_CXX" && break
2804 done
2805 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2806
2807   CXX=$ac_ct_CXX
2808 fi
2809
2810 # Provide some information about the compiler.
2811 echo "$as_me:2811:" \
2812      "checking for C++ compiler version" >&5
2813 ac_compiler=`set X $ac_compile; echo $2`
2814 { (eval echo "$as_me:2814: \"$ac_compiler --version </dev/null >&5\"") >&5
2815   (eval $ac_compiler --version </dev/null >&5) 2>&5
2816   ac_status=$?
2817   echo "$as_me:2817: \$? = $ac_status" >&5
2818   (exit $ac_status); }
2819 { (eval echo "$as_me:2819: \"$ac_compiler -v </dev/null >&5\"") >&5
2820   (eval $ac_compiler -v </dev/null >&5) 2>&5
2821   ac_status=$?
2822   echo "$as_me:2822: \$? = $ac_status" >&5
2823   (exit $ac_status); }
2824 { (eval echo "$as_me:2824: \"$ac_compiler -V </dev/null >&5\"") >&5
2825   (eval $ac_compiler -V </dev/null >&5) 2>&5
2826   ac_status=$?
2827   echo "$as_me:2827: \$? = $ac_status" >&5
2828   (exit $ac_status); }
2829
2830 echo "$as_me:2830: checking whether we are using the GNU C++ compiler" >&5
2831 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2832 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2833   echo $ECHO_N "(cached) $ECHO_C" >&6
2834 else
2835   cat >conftest.$ac_ext <<_ACEOF
2836 #line 2836 "configure"
2837 #include "confdefs.h"
2838
2839 int
2840 main ()
2841 {
2842 #ifndef __GNUC__
2843        choke me
2844 #endif
2845
2846   ;
2847   return 0;
2848 }
2849 _ACEOF
2850 rm -f conftest.$ac_objext
2851 if { (eval echo "$as_me:2851: \"$ac_compile\"") >&5
2852   (eval $ac_compile) 2>&5
2853   ac_status=$?
2854   echo "$as_me:2854: \$? = $ac_status" >&5
2855   (exit $ac_status); } &&
2856          { ac_try='test -s conftest.$ac_objext'
2857   { (eval echo "$as_me:2857: \"$ac_try\"") >&5
2858   (eval $ac_try) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }; }; then
2862   ac_compiler_gnu=yes
2863 else
2864   echo "$as_me: failed program was:" >&5
2865 cat conftest.$ac_ext >&5
2866 ac_compiler_gnu=no
2867 fi
2868 rm -f conftest.$ac_objext conftest.$ac_ext
2869 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2870
2871 fi
2872 echo "$as_me:2872: result: $ac_cv_cxx_compiler_gnu" >&5
2873 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2874 GXX=`test $ac_compiler_gnu = yes && echo yes`
2875 ac_test_CXXFLAGS=${CXXFLAGS+set}
2876 ac_save_CXXFLAGS=$CXXFLAGS
2877 CXXFLAGS="-g"
2878 echo "$as_me:2878: checking whether $CXX accepts -g" >&5
2879 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2880 if test "${ac_cv_prog_cxx_g+set}" = set; then
2881   echo $ECHO_N "(cached) $ECHO_C" >&6
2882 else
2883   cat >conftest.$ac_ext <<_ACEOF
2884 #line 2884 "configure"
2885 #include "confdefs.h"
2886
2887 int
2888 main ()
2889 {
2890
2891   ;
2892   return 0;
2893 }
2894 _ACEOF
2895 rm -f conftest.$ac_objext
2896 if { (eval echo "$as_me:2896: \"$ac_compile\"") >&5
2897   (eval $ac_compile) 2>&5
2898   ac_status=$?
2899   echo "$as_me:2899: \$? = $ac_status" >&5
2900   (exit $ac_status); } &&
2901          { ac_try='test -s conftest.$ac_objext'
2902   { (eval echo "$as_me:2902: \"$ac_try\"") >&5
2903   (eval $ac_try) 2>&5
2904   ac_status=$?
2905   echo "$as_me:2905: \$? = $ac_status" >&5
2906   (exit $ac_status); }; }; then
2907   ac_cv_prog_cxx_g=yes
2908 else
2909   echo "$as_me: failed program was:" >&5
2910 cat conftest.$ac_ext >&5
2911 ac_cv_prog_cxx_g=no
2912 fi
2913 rm -f conftest.$ac_objext conftest.$ac_ext
2914 fi
2915 echo "$as_me:2915: result: $ac_cv_prog_cxx_g" >&5
2916 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2917 if test "$ac_test_CXXFLAGS" = set; then
2918   CXXFLAGS=$ac_save_CXXFLAGS
2919 elif test $ac_cv_prog_cxx_g = yes; then
2920   if test "$GXX" = yes; then
2921     CXXFLAGS="-g -O2"
2922   else
2923     CXXFLAGS="-g"
2924   fi
2925 else
2926   if test "$GXX" = yes; then
2927     CXXFLAGS="-O2"
2928   else
2929     CXXFLAGS=
2930   fi
2931 fi
2932 for ac_declaration in \
2933    ''\
2934    '#include <stdlib.h>' \
2935    'extern "C" void std::exit (int) throw (); using std::exit;' \
2936    'extern "C" void std::exit (int); using std::exit;' \
2937    'extern "C" void exit (int) throw ();' \
2938    'extern "C" void exit (int);' \
2939    'void exit (int);'
2940 do
2941   cat >conftest.$ac_ext <<_ACEOF
2942 #line 2942 "configure"
2943 #include "confdefs.h"
2944 #include <stdlib.h>
2945 $ac_declaration
2946 int
2947 main ()
2948 {
2949 exit (42);
2950   ;
2951   return 0;
2952 }
2953 _ACEOF
2954 rm -f conftest.$ac_objext
2955 if { (eval echo "$as_me:2955: \"$ac_compile\"") >&5
2956   (eval $ac_compile) 2>&5
2957   ac_status=$?
2958   echo "$as_me:2958: \$? = $ac_status" >&5
2959   (exit $ac_status); } &&
2960          { ac_try='test -s conftest.$ac_objext'
2961   { (eval echo "$as_me:2961: \"$ac_try\"") >&5
2962   (eval $ac_try) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); }; }; then
2966   :
2967 else
2968   echo "$as_me: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
2970 continue
2971 fi
2972 rm -f conftest.$ac_objext conftest.$ac_ext
2973   cat >conftest.$ac_ext <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 $ac_declaration
2977 int
2978 main ()
2979 {
2980 exit (42);
2981   ;
2982   return 0;
2983 }
2984 _ACEOF
2985 rm -f conftest.$ac_objext
2986 if { (eval echo "$as_me:2986: \"$ac_compile\"") >&5
2987   (eval $ac_compile) 2>&5
2988   ac_status=$?
2989   echo "$as_me:2989: \$? = $ac_status" >&5
2990   (exit $ac_status); } &&
2991          { ac_try='test -s conftest.$ac_objext'
2992   { (eval echo "$as_me:2992: \"$ac_try\"") >&5
2993   (eval $ac_try) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); }; }; then
2997   break
2998 else
2999   echo "$as_me: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3001 fi
3002 rm -f conftest.$ac_objext conftest.$ac_ext
3003 done
3004 rm -f conftest*
3005 if test -n "$ac_declaration"; then
3006   echo '#ifdef __cplusplus' >>confdefs.h
3007   echo $ac_declaration      >>confdefs.h
3008   echo '#endif'             >>confdefs.h
3009 fi
3010
3011 ac_ext=c
3012 ac_cpp='$CPP $CPPFLAGS'
3013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3016 ac_main_return=return
3017
3018                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3019         if test "$CXX" = "g++" ; then
3020                 # Extract the first word of "g++", so it can be a program name with args.
3021 set dummy g++; ac_word=$2
3022 echo "$as_me:3022: checking for $ac_word" >&5
3023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3024 if test "${ac_cv_path_CXX+set}" = set; then
3025   echo $ECHO_N "(cached) $ECHO_C" >&6
3026 else
3027   case $CXX in
3028   [\\/]* | ?:[\\/]*)
3029   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3030   ;;
3031   *)
3032   ac_save_IFS=$IFS; IFS=$ac_path_separator
3033 ac_dummy="$PATH"
3034 for ac_dir in $ac_dummy; do
3035   IFS=$ac_save_IFS
3036   test -z "$ac_dir" && ac_dir=.
3037   if $as_executable_p "$ac_dir/$ac_word"; then
3038    ac_cv_path_CXX="$ac_dir/$ac_word"
3039    echo "$as_me:3039: found $ac_dir/$ac_word" >&5
3040    break
3041 fi
3042 done
3043
3044   ;;
3045 esac
3046 fi
3047 CXX=$ac_cv_path_CXX
3048
3049 if test -n "$CXX"; then
3050   echo "$as_me:3050: result: $CXX" >&5
3051 echo "${ECHO_T}$CXX" >&6
3052 else
3053   echo "$as_me:3053: result: no" >&5
3054 echo "${ECHO_T}no" >&6
3055 fi
3056
3057         fi
3058         if test "$CXX" = "g++" ; then
3059                 { echo "$as_me:3059: WARNING: ignoring hardcoded g++" >&5
3060 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3061                 cf_with_cxx=no; CXX=""; GXX="";
3062         fi
3063 fi
3064
3065 GXX_VERSION=none
3066 if test "$GXX" = yes; then
3067         echo "$as_me:3067: checking version of g++" >&5
3068 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3069         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3070         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3071         echo "$as_me:3071: result: $GXX_VERSION" >&5
3072 echo "${ECHO_T}$GXX_VERSION" >&6
3073 fi
3074
3075 case $GXX_VERSION in
3076 1*|2.[0-6]*)
3077         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3078         # cf_cxx_library=no
3079         { echo "$as_me:3079: WARNING: templates do not work" >&5
3080 echo "$as_me: WARNING: templates do not work" >&2;}
3081         ;;
3082 esac
3083
3084 echo "$as_me:3084: checking if you want to build C++ binding and demo" >&5
3085 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3086
3087 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3088 if test "${with_cxx_binding+set}" = set; then
3089   withval="$with_cxx_binding"
3090   cf_with_cxx_binding=$withval
3091 else
3092   cf_with_cxx_binding=$cf_with_cxx
3093 fi;
3094 echo "$as_me:3094: result: $cf_with_cxx_binding" >&5
3095 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3096
3097 echo "$as_me:3097: checking if you want to build with Ada95" >&5
3098 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3099
3100 # Check whether --with-ada or --without-ada was given.
3101 if test "${with_ada+set}" = set; then
3102   withval="$with_ada"
3103   cf_with_ada=$withval
3104 else
3105   cf_with_ada=yes
3106 fi;
3107 echo "$as_me:3107: result: $cf_with_ada" >&5
3108 echo "${ECHO_T}$cf_with_ada" >&6
3109
3110 echo "$as_me:3110: checking if you want to build programs such as tic" >&5
3111 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3112
3113 # Check whether --with-progs or --without-progs was given.
3114 if test "${with_progs+set}" = set; then
3115   withval="$with_progs"
3116   cf_with_progs=$withval
3117 else
3118   cf_with_progs=yes
3119 fi;
3120 echo "$as_me:3120: result: $cf_with_progs" >&5
3121 echo "${ECHO_T}$cf_with_progs" >&6
3122
3123 echo "$as_me:3123: checking if you wish to install curses.h" >&5
3124 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3125
3126 # Check whether --with-curses-h or --without-curses-h was given.
3127 if test "${with_curses_h+set}" = set; then
3128   withval="$with_curses_h"
3129   with_curses_h=$withval
3130 else
3131   with_curses_h=yes
3132 fi;
3133 echo "$as_me:3133: result: $with_curses_h" >&5
3134 echo "${ECHO_T}$with_curses_h" >&6
3135
3136 modules_to_build="ncurses"
3137 if test "X$cf_with_progs" != Xno ; then
3138 modules_to_build="$modules_to_build progs tack"
3139 fi
3140 modules_to_build="$modules_to_build panel menu form"
3141
3142 test "$program_prefix" != NONE &&
3143   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3144 # Use a double $ so make ignores it.
3145 test "$program_suffix" != NONE &&
3146   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3147 # Double any \ or $.  echo might interpret backslashes.
3148 # By default was `s,x,x', remove it if useless.
3149 cat <<\_ACEOF >conftest.sed
3150 s/[\\$]/&&/g;s/;s,x,x,$//
3151 _ACEOF
3152 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3153 rm conftest.sed
3154
3155 for ac_prog in mawk gawk nawk awk
3156 do
3157   # Extract the first word of "$ac_prog", so it can be a program name with args.
3158 set dummy $ac_prog; ac_word=$2
3159 echo "$as_me:3159: checking for $ac_word" >&5
3160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3161 if test "${ac_cv_prog_AWK+set}" = set; then
3162   echo $ECHO_N "(cached) $ECHO_C" >&6
3163 else
3164   if test -n "$AWK"; then
3165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3166 else
3167   ac_save_IFS=$IFS; IFS=$ac_path_separator
3168 ac_dummy="$PATH"
3169 for ac_dir in $ac_dummy; do
3170   IFS=$ac_save_IFS
3171   test -z "$ac_dir" && ac_dir=.
3172   $as_executable_p "$ac_dir/$ac_word" || continue
3173 ac_cv_prog_AWK="$ac_prog"
3174 echo "$as_me:3174: found $ac_dir/$ac_word" >&5
3175 break
3176 done
3177
3178 fi
3179 fi
3180 AWK=$ac_cv_prog_AWK
3181 if test -n "$AWK"; then
3182   echo "$as_me:3182: result: $AWK" >&5
3183 echo "${ECHO_T}$AWK" >&6
3184 else
3185   echo "$as_me:3185: result: no" >&5
3186 echo "${ECHO_T}no" >&6
3187 fi
3188
3189   test -n "$AWK" && break
3190 done
3191
3192 test -z "$AWK" && { { echo "$as_me:3192: error: No awk program found" >&5
3193 echo "$as_me: error: No awk program found" >&2;}
3194    { (exit 1); exit 1; }; }
3195
3196 echo "$as_me:3196: checking for egrep" >&5
3197 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3198 if test "${ac_cv_prog_egrep+set}" = set; then
3199   echo $ECHO_N "(cached) $ECHO_C" >&6
3200 else
3201   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3202     then ac_cv_prog_egrep='grep -E'
3203     else ac_cv_prog_egrep='egrep'
3204     fi
3205 fi
3206 echo "$as_me:3206: result: $ac_cv_prog_egrep" >&5
3207 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3208  EGREP=$ac_cv_prog_egrep
3209
3210 test -z "$EGREP" && { { echo "$as_me:3210: error: No egrep program found" >&5
3211 echo "$as_me: error: No egrep program found" >&2;}
3212    { (exit 1); exit 1; }; }
3213
3214 # Find a good install program.  We prefer a C program (faster),
3215 # so one script is as good as another.  But avoid the broken or
3216 # incompatible versions:
3217 # SysV /etc/install, /usr/sbin/install
3218 # SunOS /usr/etc/install
3219 # IRIX /sbin/install
3220 # AIX /bin/install
3221 # AmigaOS /C/install, which installs bootblocks on floppy discs
3222 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3223 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3224 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3225 # ./install, which can be erroneously created by make from ./install.sh.
3226 echo "$as_me:3226: checking for a BSD compatible install" >&5
3227 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3228 if test -z "$INSTALL"; then
3229 if test "${ac_cv_path_install+set}" = set; then
3230   echo $ECHO_N "(cached) $ECHO_C" >&6
3231 else
3232     ac_save_IFS=$IFS; IFS=$ac_path_separator
3233   for ac_dir in $PATH; do
3234     IFS=$ac_save_IFS
3235     # Account for people who put trailing slashes in PATH elements.
3236     case $ac_dir/ in
3237     / | ./ | .// | /cC/* \
3238     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3239     | /usr/ucb/* ) ;;
3240     *)
3241       # OSF1 and SCO ODT 3.0 have their own names for install.
3242       # Don't use installbsd from OSF since it installs stuff as root
3243       # by default.
3244       for ac_prog in ginstall scoinst install; do
3245         if $as_executable_p "$ac_dir/$ac_prog"; then
3246           if test $ac_prog = install &&
3247             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3248             # AIX install.  It has an incompatible calling convention.
3249             :
3250           elif test $ac_prog = install &&
3251             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3252             # program-specific install script used by HP pwplus--don't use.
3253             :
3254           else
3255             ac_cv_path_install="$ac_dir/$ac_prog -c"
3256             break 2
3257           fi
3258         fi
3259       done
3260       ;;
3261     esac
3262   done
3263
3264 fi
3265   if test "${ac_cv_path_install+set}" = set; then
3266     INSTALL=$ac_cv_path_install
3267   else
3268     # As a last resort, use the slow shell script.  We don't cache a
3269     # path for INSTALL within a source directory, because that will
3270     # break other packages using the cache if that directory is
3271     # removed, or if the path is relative.
3272     INSTALL=$ac_install_sh
3273   fi
3274 fi
3275 echo "$as_me:3275: result: $INSTALL" >&5
3276 echo "${ECHO_T}$INSTALL" >&6
3277
3278 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3279 # It thinks the first close brace ends the variable substitution.
3280 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3281
3282 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3283
3284 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3285
3286 case $INSTALL in
3287 /*)
3288   ;;
3289 *)
3290   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3291   test -z "$cf_dir" && cf_dir=.
3292   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3293   ;;
3294 esac
3295
3296 for ac_prog in tdlint lint alint
3297 do
3298   # Extract the first word of "$ac_prog", so it can be a program name with args.
3299 set dummy $ac_prog; ac_word=$2
3300 echo "$as_me:3300: checking for $ac_word" >&5
3301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3302 if test "${ac_cv_prog_LINT+set}" = set; then
3303   echo $ECHO_N "(cached) $ECHO_C" >&6
3304 else
3305   if test -n "$LINT"; then
3306   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3307 else
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   $as_executable_p "$ac_dir/$ac_word" || continue
3314 ac_cv_prog_LINT="$ac_prog"
3315 echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316 break
3317 done
3318
3319 fi
3320 fi
3321 LINT=$ac_cv_prog_LINT
3322 if test -n "$LINT"; then
3323   echo "$as_me:3323: result: $LINT" >&5
3324 echo "${ECHO_T}$LINT" >&6
3325 else
3326   echo "$as_me:3326: result: no" >&5
3327 echo "${ECHO_T}no" >&6
3328 fi
3329
3330   test -n "$LINT" && break
3331 done
3332
3333 echo "$as_me:3333: checking whether ln -s works" >&5
3334 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3335 LN_S=$as_ln_s
3336 if test "$LN_S" = "ln -s"; then
3337   echo "$as_me:3337: result: yes" >&5
3338 echo "${ECHO_T}yes" >&6
3339 else
3340   echo "$as_me:3340: result: no, using $LN_S" >&5
3341 echo "${ECHO_T}no, using $LN_S" >&6
3342 fi
3343
3344 echo "$as_me:3344: checking whether ${MAKE-make} sets \${MAKE}" >&5
3345 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3346 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3347 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3348   echo $ECHO_N "(cached) $ECHO_C" >&6
3349 else
3350   cat >conftest.make <<\EOF
3351 all:
3352         @echo 'ac_maketemp="${MAKE}"'
3353 EOF
3354 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3355 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3356 if test -n "$ac_maketemp"; then
3357   eval ac_cv_prog_make_${ac_make}_set=yes
3358 else
3359   eval ac_cv_prog_make_${ac_make}_set=no
3360 fi
3361 rm -f conftest.make
3362 fi
3363 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3364   echo "$as_me:3364: result: yes" >&5
3365 echo "${ECHO_T}yes" >&6
3366   SET_MAKE=
3367 else
3368   echo "$as_me:3368: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370   SET_MAKE="MAKE=${MAKE-make}"
3371 fi
3372
3373 echo "$as_me:3373: checking if filesystem supports mixed-case filenames" >&5
3374 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3375 if test "${cf_cv_mixedcase+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378
3379 if test "$cross_compiling" = yes ; then
3380         case $target_alias in #(vi
3381         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3382                 cf_cv_mixedcase=no
3383                 ;;
3384         *)
3385                 cf_cv_mixedcase=yes
3386                 ;;
3387         esac
3388 else
3389         rm -f conftest CONFTEST
3390         echo test >conftest
3391         if test -f CONFTEST ; then
3392                 cf_cv_mixedcase=no
3393         else
3394                 cf_cv_mixedcase=yes
3395         fi
3396         rm -f conftest CONFTEST
3397 fi
3398
3399 fi
3400 echo "$as_me:3400: result: $cf_cv_mixedcase" >&5
3401 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3402 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3403 #define MIXEDCASE_FILENAMES 1
3404 EOF
3405
3406 # Extract the first word of "ctags", so it can be a program name with args.
3407 set dummy ctags; ac_word=$2
3408 echo "$as_me:3408: checking for $ac_word" >&5
3409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3410 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3411   echo $ECHO_N "(cached) $ECHO_C" >&6
3412 else
3413   if test -n "$MAKE_LOWER_TAGS"; then
3414   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3415 else
3416   ac_save_IFS=$IFS; IFS=$ac_path_separator
3417 ac_dummy="$PATH"
3418 for ac_dir in $ac_dummy; do
3419   IFS=$ac_save_IFS
3420   test -z "$ac_dir" && ac_dir=.
3421   $as_executable_p "$ac_dir/$ac_word" || continue
3422 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3423 echo "$as_me:3423: found $ac_dir/$ac_word" >&5
3424 break
3425 done
3426
3427   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3428 fi
3429 fi
3430 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3431 if test -n "$MAKE_LOWER_TAGS"; then
3432   echo "$as_me:3432: result: $MAKE_LOWER_TAGS" >&5
3433 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3434 else
3435   echo "$as_me:3435: result: no" >&5
3436 echo "${ECHO_T}no" >&6
3437 fi
3438
3439 if test "$cf_cv_mixedcase" = yes ; then
3440         # Extract the first word of "etags", so it can be a program name with args.
3441 set dummy etags; ac_word=$2
3442 echo "$as_me:3442: checking for $ac_word" >&5
3443 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3444 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3445   echo $ECHO_N "(cached) $ECHO_C" >&6
3446 else
3447   if test -n "$MAKE_UPPER_TAGS"; then
3448   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3449 else
3450   ac_save_IFS=$IFS; IFS=$ac_path_separator
3451 ac_dummy="$PATH"
3452 for ac_dir in $ac_dummy; do
3453   IFS=$ac_save_IFS
3454   test -z "$ac_dir" && ac_dir=.
3455   $as_executable_p "$ac_dir/$ac_word" || continue
3456 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3457 echo "$as_me:3457: found $ac_dir/$ac_word" >&5
3458 break
3459 done
3460
3461   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3462 fi
3463 fi
3464 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3465 if test -n "$MAKE_UPPER_TAGS"; then
3466   echo "$as_me:3466: result: $MAKE_UPPER_TAGS" >&5
3467 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3468 else
3469   echo "$as_me:3469: result: no" >&5
3470 echo "${ECHO_T}no" >&6
3471 fi
3472
3473 else
3474         MAKE_UPPER_TAGS=no
3475 fi
3476
3477 if test "$MAKE_UPPER_TAGS" = yes ; then
3478         MAKE_UPPER_TAGS=
3479 else
3480         MAKE_UPPER_TAGS="#"
3481 fi
3482
3483 if test "$MAKE_LOWER_TAGS" = yes ; then
3484         MAKE_LOWER_TAGS=
3485 else
3486         MAKE_LOWER_TAGS="#"
3487 fi
3488
3489 echo "$as_me:3489: checking for makeflags variable" >&5
3490 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3491 if test "${cf_cv_makeflags+set}" = set; then
3492   echo $ECHO_N "(cached) $ECHO_C" >&6
3493 else
3494
3495         cf_cv_makeflags=''
3496         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3497         do
3498                 cat >cf_makeflags.tmp <<CF_EOF
3499 SHELL = /bin/sh
3500 all :
3501         @ echo '.$cf_option'
3502 CF_EOF
3503                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3504                 case "$cf_result" in
3505                 .*k)
3506                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3507                         case "$cf_result" in
3508                         .*CC=*) cf_cv_makeflags=
3509                                 ;;
3510                         *)      cf_cv_makeflags=$cf_option
3511                                 ;;
3512                         esac
3513                         break
3514                         ;;
3515                 .-)     ;;
3516                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3517                         ;;
3518                 esac
3519         done
3520         rm -f cf_makeflags.tmp
3521
3522 fi
3523 echo "$as_me:3523: result: $cf_cv_makeflags" >&5
3524 echo "${ECHO_T}$cf_cv_makeflags" >&6
3525
3526 echo "$as_me:3526: checking for long file names" >&5
3527 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3528 if test "${ac_cv_sys_long_file_names+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   ac_cv_sys_long_file_names=yes
3532 # Test for long file names in all the places we know might matter:
3533 #      .                the current directory, where building will happen
3534 #      $prefix/lib      where we will be installing things
3535 #      $exec_prefix/lib likewise
3536 # eval it to expand exec_prefix.
3537 #      $TMPDIR          if set, where it might want to write temporary files
3538 # if $TMPDIR is not set:
3539 #      /tmp             where it might want to write temporary files
3540 #      /var/tmp         likewise
3541 #      /usr/tmp         likewise
3542 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3543   ac_tmpdirs=$TMPDIR
3544 else
3545   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3546 fi
3547 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3548   test -d $ac_dir || continue
3549   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3550   ac_xdir=$ac_dir/cf$$
3551   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3552   ac_tf1=$ac_xdir/conftest9012345
3553   ac_tf2=$ac_xdir/conftest9012346
3554   (echo 1 >$ac_tf1) 2>/dev/null
3555   (echo 2 >$ac_tf2) 2>/dev/null
3556   ac_val=`cat $ac_tf1 2>/dev/null`
3557   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3558     ac_cv_sys_long_file_names=no
3559     rm -rf $ac_xdir 2>/dev/null
3560     break
3561   fi
3562   rm -rf $ac_xdir 2>/dev/null
3563 done
3564 fi
3565 echo "$as_me:3565: result: $ac_cv_sys_long_file_names" >&5
3566 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3567 if test $ac_cv_sys_long_file_names = yes; then
3568
3569 cat >>confdefs.h <<\EOF
3570 #define HAVE_LONG_FILE_NAMES 1
3571 EOF
3572
3573 fi
3574
3575 echo "$as_me:3575: checking if filesystem supports mixed-case filenames" >&5
3576 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3577 if test "${cf_cv_mixedcase+set}" = set; then
3578   echo $ECHO_N "(cached) $ECHO_C" >&6
3579 else
3580
3581 if test "$cross_compiling" = yes ; then
3582         case $target_alias in #(vi
3583         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3584                 cf_cv_mixedcase=no
3585                 ;;
3586         *)
3587                 cf_cv_mixedcase=yes
3588                 ;;
3589         esac
3590 else
3591         rm -f conftest CONFTEST
3592         echo test >conftest
3593         if test -f CONFTEST ; then
3594                 cf_cv_mixedcase=no
3595         else
3596                 cf_cv_mixedcase=yes
3597         fi
3598         rm -f conftest CONFTEST
3599 fi
3600
3601 fi
3602 echo "$as_me:3602: result: $cf_cv_mixedcase" >&5
3603 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3604 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3605 #define MIXEDCASE_FILENAMES 1
3606 EOF
3607
3608 if test -n "$ac_tool_prefix"; then
3609   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3610 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3611 echo "$as_me:3611: checking for $ac_word" >&5
3612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3613 if test "${ac_cv_prog_RANLIB+set}" = set; then
3614   echo $ECHO_N "(cached) $ECHO_C" >&6
3615 else
3616   if test -n "$RANLIB"; then
3617   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3618 else
3619   ac_save_IFS=$IFS; IFS=$ac_path_separator
3620 ac_dummy="$PATH"
3621 for ac_dir in $ac_dummy; do
3622   IFS=$ac_save_IFS
3623   test -z "$ac_dir" && ac_dir=.
3624   $as_executable_p "$ac_dir/$ac_word" || continue
3625 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3626 echo "$as_me:3626: found $ac_dir/$ac_word" >&5
3627 break
3628 done
3629
3630 fi
3631 fi
3632 RANLIB=$ac_cv_prog_RANLIB
3633 if test -n "$RANLIB"; then
3634   echo "$as_me:3634: result: $RANLIB" >&5
3635 echo "${ECHO_T}$RANLIB" >&6
3636 else
3637   echo "$as_me:3637: result: no" >&5
3638 echo "${ECHO_T}no" >&6
3639 fi
3640
3641 fi
3642 if test -z "$ac_cv_prog_RANLIB"; then
3643   ac_ct_RANLIB=$RANLIB
3644   # Extract the first word of "ranlib", so it can be a program name with args.
3645 set dummy ranlib; ac_word=$2
3646 echo "$as_me:3646: checking for $ac_word" >&5
3647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3648 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3649   echo $ECHO_N "(cached) $ECHO_C" >&6
3650 else
3651   if test -n "$ac_ct_RANLIB"; then
3652   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3653 else
3654   ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657   IFS=$ac_save_IFS
3658   test -z "$ac_dir" && ac_dir=.
3659   $as_executable_p "$ac_dir/$ac_word" || continue
3660 ac_cv_prog_ac_ct_RANLIB="ranlib"
3661 echo "$as_me:3661: found $ac_dir/$ac_word" >&5
3662 break
3663 done
3664
3665   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3666 fi
3667 fi
3668 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3669 if test -n "$ac_ct_RANLIB"; then
3670   echo "$as_me:3670: result: $ac_ct_RANLIB" >&5
3671 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3672 else
3673   echo "$as_me:3673: result: no" >&5
3674 echo "${ECHO_T}no" >&6
3675 fi
3676
3677   RANLIB=$ac_ct_RANLIB
3678 else
3679   RANLIB="$ac_cv_prog_RANLIB"
3680 fi
3681
3682 if test -n "$ac_tool_prefix"; then
3683   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3684 set dummy ${ac_tool_prefix}ld; ac_word=$2
3685 echo "$as_me:3685: checking for $ac_word" >&5
3686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3687 if test "${ac_cv_prog_LD+set}" = set; then
3688   echo $ECHO_N "(cached) $ECHO_C" >&6
3689 else
3690   if test -n "$LD"; then
3691   ac_cv_prog_LD="$LD" # Let the user override the test.
3692 else
3693   ac_save_IFS=$IFS; IFS=$ac_path_separator
3694 ac_dummy="$PATH"
3695 for ac_dir in $ac_dummy; do
3696   IFS=$ac_save_IFS
3697   test -z "$ac_dir" && ac_dir=.
3698   $as_executable_p "$ac_dir/$ac_word" || continue
3699 ac_cv_prog_LD="${ac_tool_prefix}ld"
3700 echo "$as_me:3700: found $ac_dir/$ac_word" >&5
3701 break
3702 done
3703
3704 fi
3705 fi
3706 LD=$ac_cv_prog_LD
3707 if test -n "$LD"; then
3708   echo "$as_me:3708: result: $LD" >&5
3709 echo "${ECHO_T}$LD" >&6
3710 else
3711   echo "$as_me:3711: result: no" >&5
3712 echo "${ECHO_T}no" >&6
3713 fi
3714
3715 fi
3716 if test -z "$ac_cv_prog_LD"; then
3717   ac_ct_LD=$LD
3718   # Extract the first word of "ld", so it can be a program name with args.
3719 set dummy ld; ac_word=$2
3720 echo "$as_me:3720: checking for $ac_word" >&5
3721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3722 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3723   echo $ECHO_N "(cached) $ECHO_C" >&6
3724 else
3725   if test -n "$ac_ct_LD"; then
3726   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3727 else
3728   ac_save_IFS=$IFS; IFS=$ac_path_separator
3729 ac_dummy="$PATH"
3730 for ac_dir in $ac_dummy; do
3731   IFS=$ac_save_IFS
3732   test -z "$ac_dir" && ac_dir=.
3733   $as_executable_p "$ac_dir/$ac_word" || continue
3734 ac_cv_prog_ac_ct_LD="ld"
3735 echo "$as_me:3735: found $ac_dir/$ac_word" >&5
3736 break
3737 done
3738
3739   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3740 fi
3741 fi
3742 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3743 if test -n "$ac_ct_LD"; then
3744   echo "$as_me:3744: result: $ac_ct_LD" >&5
3745 echo "${ECHO_T}$ac_ct_LD" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751   LD=$ac_ct_LD
3752 else
3753   LD="$ac_cv_prog_LD"
3754 fi
3755
3756 if test -n "$ac_tool_prefix"; then
3757   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3758 set dummy ${ac_tool_prefix}ar; ac_word=$2
3759 echo "$as_me:3759: checking for $ac_word" >&5
3760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3761 if test "${ac_cv_prog_AR+set}" = set; then
3762   echo $ECHO_N "(cached) $ECHO_C" >&6
3763 else
3764   if test -n "$AR"; then
3765   ac_cv_prog_AR="$AR" # Let the user override the test.
3766 else
3767   ac_save_IFS=$IFS; IFS=$ac_path_separator
3768 ac_dummy="$PATH"
3769 for ac_dir in $ac_dummy; do
3770   IFS=$ac_save_IFS
3771   test -z "$ac_dir" && ac_dir=.
3772   $as_executable_p "$ac_dir/$ac_word" || continue
3773 ac_cv_prog_AR="${ac_tool_prefix}ar"
3774 echo "$as_me:3774: found $ac_dir/$ac_word" >&5
3775 break
3776 done
3777
3778 fi
3779 fi
3780 AR=$ac_cv_prog_AR
3781 if test -n "$AR"; then
3782   echo "$as_me:3782: result: $AR" >&5
3783 echo "${ECHO_T}$AR" >&6
3784 else
3785   echo "$as_me:3785: result: no" >&5
3786 echo "${ECHO_T}no" >&6
3787 fi
3788
3789 fi
3790 if test -z "$ac_cv_prog_AR"; then
3791   ac_ct_AR=$AR
3792   # Extract the first word of "ar", so it can be a program name with args.
3793 set dummy ar; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   if test -n "$ac_ct_AR"; then
3800   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3801 else
3802   ac_save_IFS=$IFS; IFS=$ac_path_separator
3803 ac_dummy="$PATH"
3804 for ac_dir in $ac_dummy; do
3805   IFS=$ac_save_IFS
3806   test -z "$ac_dir" && ac_dir=.
3807   $as_executable_p "$ac_dir/$ac_word" || continue
3808 ac_cv_prog_ac_ct_AR="ar"
3809 echo "$as_me:3809: found $ac_dir/$ac_word" >&5
3810 break
3811 done
3812
3813   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3814 fi
3815 fi
3816 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3817 if test -n "$ac_ct_AR"; then
3818   echo "$as_me:3818: result: $ac_ct_AR" >&5
3819 echo "${ECHO_T}$ac_ct_AR" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825   AR=$ac_ct_AR
3826 else
3827   AR="$ac_cv_prog_AR"
3828 fi
3829
3830 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833
3834 echo "$as_me:3834: checking for archiver options (symbol AR_OPTS)" >&5
3835 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3836
3837 if test -z "$AR_OPTS" ; then
3838         AR_OPTS=rv
3839
3840 fi
3841
3842 cf_cv_subst_AR_OPTS=$AR_OPTS
3843 echo "$as_me:3843: result: $AR_OPTS" >&5
3844 echo "${ECHO_T}$AR_OPTS" >&6
3845
3846 fi
3847
3848 echo "$as_me:3848: checking if you have specified an install-prefix" >&5
3849 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3850
3851 # Check whether --with-install-prefix or --without-install-prefix was given.
3852 if test "${with_install_prefix+set}" = set; then
3853   withval="$with_install_prefix"
3854   case "$withval" in #(vi
3855         yes|no) #(vi
3856                 ;;
3857         *)      DESTDIR="$withval"
3858                 ;;
3859         esac
3860 fi;
3861 echo "$as_me:3861: result: $DESTDIR" >&5
3862 echo "${ECHO_T}$DESTDIR" >&6
3863
3864 ###############################################################################
3865
3866 # If we're cross-compiling, allow the user to override the tools and their
3867 # options.  The configure script is oriented toward identifying the host
3868 # compiler, etc., but we need a build compiler to generate parts of the source.
3869
3870 if test "$cross_compiling" = yes ; then
3871
3872         # defaults that we might want to override
3873         : ${BUILD_CFLAGS:=''}
3874         : ${BUILD_CPPFLAGS:=''}
3875         : ${BUILD_LDFLAGS:=''}
3876         : ${BUILD_LIBS:=''}
3877         : ${BUILD_EXEEXT:='$x'}
3878         : ${BUILD_OBJEXT:='o'}
3879
3880 # Check whether --with-build-cc or --without-build-cc was given.
3881 if test "${with_build_cc+set}" = set; then
3882   withval="$with_build_cc"
3883   BUILD_CC="$withval"
3884 else
3885   for ac_prog in gcc cc cl
3886 do
3887   # Extract the first word of "$ac_prog", so it can be a program name with args.
3888 set dummy $ac_prog; ac_word=$2
3889 echo "$as_me:3889: checking for $ac_word" >&5
3890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3891 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3892   echo $ECHO_N "(cached) $ECHO_C" >&6
3893 else
3894   if test -n "$BUILD_CC"; then
3895   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3896 else
3897   ac_save_IFS=$IFS; IFS=$ac_path_separator
3898 ac_dummy="$PATH"
3899 for ac_dir in $ac_dummy; do
3900   IFS=$ac_save_IFS
3901   test -z "$ac_dir" && ac_dir=.
3902   $as_executable_p "$ac_dir/$ac_word" || continue
3903 ac_cv_prog_BUILD_CC="$ac_prog"
3904 echo "$as_me:3904: found $ac_dir/$ac_word" >&5
3905 break
3906 done
3907
3908 fi
3909 fi
3910 BUILD_CC=$ac_cv_prog_BUILD_CC
3911 if test -n "$BUILD_CC"; then
3912   echo "$as_me:3912: result: $BUILD_CC" >&5
3913 echo "${ECHO_T}$BUILD_CC" >&6
3914 else
3915   echo "$as_me:3915: result: no" >&5
3916 echo "${ECHO_T}no" >&6
3917 fi
3918
3919   test -n "$BUILD_CC" && break
3920 done
3921
3922 fi;
3923         echo "$as_me:3923: checking for native build C compiler" >&5
3924 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3925         echo "$as_me:3925: result: $BUILD_CC" >&5
3926 echo "${ECHO_T}$BUILD_CC" >&6
3927
3928         echo "$as_me:3928: checking for native build C preprocessor" >&5
3929 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3930
3931 # Check whether --with-build-cpp or --without-build-cpp was given.
3932 if test "${with_build_cpp+set}" = set; then
3933   withval="$with_build_cpp"
3934   BUILD_CPP="$withval"
3935 else
3936   BUILD_CPP='${BUILD_CC} -E'
3937 fi;
3938         echo "$as_me:3938: result: $BUILD_CPP" >&5
3939 echo "${ECHO_T}$BUILD_CPP" >&6
3940
3941         echo "$as_me:3941: checking for native build C flags" >&5
3942 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3943
3944 # Check whether --with-build-cflags or --without-build-cflags was given.
3945 if test "${with_build_cflags+set}" = set; then
3946   withval="$with_build_cflags"
3947   BUILD_CFLAGS="$withval"
3948 fi;
3949         echo "$as_me:3949: result: $BUILD_CFLAGS" >&5
3950 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3951
3952         echo "$as_me:3952: checking for native build C preprocessor-flags" >&5
3953 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3954
3955 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3956 if test "${with_build_cppflags+set}" = set; then
3957   withval="$with_build_cppflags"
3958   BUILD_CPPFLAGS="$withval"
3959 fi;
3960         echo "$as_me:3960: result: $BUILD_CPPFLAGS" >&5
3961 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3962
3963         echo "$as_me:3963: checking for native build linker-flags" >&5
3964 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3965
3966 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3967 if test "${with_build_ldflags+set}" = set; then
3968   withval="$with_build_ldflags"
3969   BUILD_LDFLAGS="$withval"
3970 fi;
3971         echo "$as_me:3971: result: $BUILD_LDFLAGS" >&5
3972 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3973
3974         echo "$as_me:3974: checking for native build linker-libraries" >&5
3975 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3976
3977 # Check whether --with-build-libs or --without-build-libs was given.
3978 if test "${with_build_libs+set}" = set; then
3979   withval="$with_build_libs"
3980   BUILD_LIBS="$withval"
3981 fi;
3982         echo "$as_me:3982: result: $BUILD_LIBS" >&5
3983 echo "${ECHO_T}$BUILD_LIBS" >&6
3984
3985         # this assumes we're on Unix.
3986         BUILD_EXEEXT=
3987         BUILD_OBJEXT=o
3988
3989         : ${BUILD_CC:='${CC}'}
3990
3991         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3992                 { { echo "$as_me:3992: error: Cross-build requires two compilers.
3993 Use --with-build-cc to specify the native compiler." >&5
3994 echo "$as_me: error: Cross-build requires two compilers.
3995 Use --with-build-cc to specify the native compiler." >&2;}
3996    { (exit 1); exit 1; }; }
3997         fi
3998
3999 else
4000         : ${BUILD_CC:='${CC}'}
4001         : ${BUILD_CPP:='${CPP}'}
4002         : ${BUILD_CFLAGS:='${CFLAGS}'}
4003         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4004         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4005         : ${BUILD_LIBS:='${LIBS}'}
4006         : ${BUILD_EXEEXT:='$x'}
4007         : ${BUILD_OBJEXT:='o'}
4008 fi
4009
4010 ###############################################################################
4011
4012 ### Options to allow the user to specify the set of libraries which are used.
4013 ### Use "--without-normal --with-shared" to allow the default model to be
4014 ### shared, for example.
4015 cf_list_models=""
4016
4017 LIBTOOL=
4018
4019 # common library maintenance symbols that are convenient for libtool scripts:
4020 LIB_CREATE='${AR} -cr'
4021 LIB_OBJECT='${OBJECTS}'
4022 LIB_SUFFIX=.a
4023 LIB_PREP="$RANLIB"
4024
4025 # symbols used to prop libtool up to enable it to determine what it should be
4026 # doing:
4027 LIB_CLEAN=
4028 LIB_COMPILE=
4029 LIB_LINK='${CC}'
4030 LIB_INSTALL=
4031 LIB_UNINSTALL=
4032
4033 echo "$as_me:4033: checking if you want to build libraries with libtool" >&5
4034 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4035
4036 # Check whether --with-libtool or --without-libtool was given.
4037 if test "${with_libtool+set}" = set; then
4038   withval="$with_libtool"
4039   with_libtool=$withval
4040 else
4041   with_libtool=no
4042 fi;
4043 echo "$as_me:4043: result: $with_libtool" >&5
4044 echo "${ECHO_T}$with_libtool" >&6
4045 if test "$with_libtool" != "no"; then
4046
4047         if test "$with_libtool" != "yes" ; then
4048
4049 if test "x$prefix" != xNONE; then
4050   cf_path_syntax="$prefix"
4051 else
4052   cf_path_syntax="$ac_default_prefix"
4053 fi
4054
4055 case ".$with_libtool" in #(vi
4056 .\$\(*\)*|.\'*\'*) #(vi
4057   ;;
4058 ..|./*|.\\*) #(vi
4059   ;;
4060 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4061   ;;
4062 .\${*prefix}*) #(vi
4063   eval with_libtool="$with_libtool"
4064   case ".$with_libtool" in #(vi
4065   .NONE/*)
4066     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4067     ;;
4068   esac
4069   ;; #(vi
4070 .no|.NONE/*)
4071   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4072   ;;
4073 *)
4074   { { echo "$as_me:4074: error: expected a pathname, not \"$with_libtool\"" >&5
4075 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4076    { (exit 1); exit 1; }; }
4077   ;;
4078 esac
4079
4080                 LIBTOOL=$with_libtool
4081         else
4082                 # Extract the first word of "libtool", so it can be a program name with args.
4083 set dummy libtool; ac_word=$2
4084 echo "$as_me:4084: checking for $ac_word" >&5
4085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4086 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4087   echo $ECHO_N "(cached) $ECHO_C" >&6
4088 else
4089   case $LIBTOOL in
4090   [\\/]* | ?:[\\/]*)
4091   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4092   ;;
4093   *)
4094   ac_save_IFS=$IFS; IFS=$ac_path_separator
4095 ac_dummy="$PATH"
4096 for ac_dir in $ac_dummy; do
4097   IFS=$ac_save_IFS
4098   test -z "$ac_dir" && ac_dir=.
4099   if $as_executable_p "$ac_dir/$ac_word"; then
4100    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4101    echo "$as_me:4101: found $ac_dir/$ac_word" >&5
4102    break
4103 fi
4104 done
4105
4106   ;;
4107 esac
4108 fi
4109 LIBTOOL=$ac_cv_path_LIBTOOL
4110
4111 if test -n "$LIBTOOL"; then
4112   echo "$as_me:4112: result: $LIBTOOL" >&5
4113 echo "${ECHO_T}$LIBTOOL" >&6
4114 else
4115   echo "$as_me:4115: result: no" >&5
4116 echo "${ECHO_T}no" >&6
4117 fi
4118
4119         fi
4120         if test -z "$LIBTOOL" ; then
4121                 { { echo "$as_me:4121: error: Cannot find libtool" >&5
4122 echo "$as_me: error: Cannot find libtool" >&2;}
4123    { (exit 1); exit 1; }; }
4124         fi
4125         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4126         LIB_OBJECT='${OBJECTS:.o=.lo}'
4127         LIB_SUFFIX=.la
4128         LIB_CLEAN='${LIBTOOL} --mode=clean'
4129         LIB_COMPILE='${LIBTOOL} --mode=compile'
4130         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4131         LIB_INSTALL='${LIBTOOL} --mode=install'
4132         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4133         LIB_PREP=:
4134
4135         # Show the version of libtool
4136         echo "$as_me:4136: checking version of libtool" >&5
4137 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4138
4139         # Save the version in a cache variable - this is not entirely a good
4140         # thing, but the version string from libtool is very ugly, and for
4141         # bug reports it might be useful to have the original string.
4142         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.].*//'`
4143         echo "$as_me:4143: result: $cf_cv_libtool_version" >&5
4144 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4145         if test -z "$cf_cv_libtool_version" ; then
4146                 { { echo "$as_me:4146: error: This is not GNU libtool" >&5
4147 echo "$as_me: error: This is not GNU libtool" >&2;}
4148    { (exit 1); exit 1; }; }
4149         fi
4150
4151         # special hack to add --tag option for C++ compiler
4152         case $cf_cv_libtool_version in
4153         1.[5-9]*|[2-9]*)
4154                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4155                 ;;
4156         *)
4157                 LIBTOOL_CXX="$LIBTOOL"
4158                 ;;
4159         esac
4160 else
4161         LIBTOOL=""
4162         LIBTOOL_CXX=""
4163 fi
4164
4165 test -z "$LIBTOOL" && ECHO_LT=
4166
4167 if test "$with_libtool" != "no" ; then
4168
4169 cf_list_models="$cf_list_models libtool"
4170
4171 else
4172
4173 echo "$as_me:4173: checking if you want to build shared libraries" >&5
4174 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4175
4176 # Check whether --with-shared or --without-shared was given.
4177 if test "${with_shared+set}" = set; then
4178   withval="$with_shared"
4179   with_shared=$withval
4180 else
4181   with_shared=no
4182 fi;
4183 echo "$as_me:4183: result: $with_shared" >&5
4184 echo "${ECHO_T}$with_shared" >&6
4185 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4186
4187 echo "$as_me:4187: checking if you want to build static libraries" >&5
4188 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4189
4190 # Check whether --with-normal or --without-normal was given.
4191 if test "${with_normal+set}" = set; then
4192   withval="$with_normal"
4193   with_normal=$withval
4194 else
4195   with_normal=yes
4196 fi;
4197 echo "$as_me:4197: result: $with_normal" >&5
4198 echo "${ECHO_T}$with_normal" >&6
4199 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4200
4201 echo "$as_me:4201: checking if you want to build debug libraries" >&5
4202 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4203
4204 # Check whether --with-debug or --without-debug was given.
4205 if test "${with_debug+set}" = set; then
4206   withval="$with_debug"
4207   with_debug=$withval
4208 else
4209   with_debug=yes
4210 fi;
4211 echo "$as_me:4211: result: $with_debug" >&5
4212 echo "${ECHO_T}$with_debug" >&6
4213 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4214
4215 echo "$as_me:4215: checking if you want to build profiling libraries" >&5
4216 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4217
4218 # Check whether --with-profile or --without-profile was given.
4219 if test "${with_profile+set}" = set; then
4220   withval="$with_profile"
4221   with_profile=$withval
4222 else
4223   with_profile=no
4224 fi;
4225 echo "$as_me:4225: result: $with_profile" >&5
4226 echo "${ECHO_T}$with_profile" >&6
4227 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4228
4229 fi
4230
4231 ###############################################################################
4232
4233 echo "$as_me:4233: checking for specified models" >&5
4234 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4235 test -z "$cf_list_models" && cf_list_models=normal
4236 test "$with_libtool" != "no" && cf_list_models=libtool
4237 echo "$as_me:4237: result: $cf_list_models" >&5
4238 echo "${ECHO_T}$cf_list_models" >&6
4239
4240 ### Use the first model as the default, and save its suffix for use in building
4241 ### up test-applications.
4242 echo "$as_me:4242: checking for default model" >&5
4243 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4244 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4245 echo "$as_me:4245: result: $DFT_LWR_MODEL" >&5
4246 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4247
4248 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4249
4250 TICS_NAME=tic
4251
4252 TINFO_NAME=tinfo
4253
4254 LIB_NAME=ncurses
4255
4256 LIB_DIR=../lib
4257 LIB_2ND=../../lib
4258
4259         case $cf_cv_system_name in
4260         OS/2*)  LIB_PREFIX=''     ;;
4261         os2*)   LIB_PREFIX=''     ;;
4262         *)      LIB_PREFIX='lib'  ;;
4263         esac
4264 cf_prefix=$LIB_PREFIX
4265
4266 LIB_PREFIX=$cf_prefix
4267
4268 LIB_SUFFIX=
4269
4270 ###############################################################################
4271
4272 echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
4273 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4274
4275 # Check whether --with-termlib or --without-termlib was given.
4276 if test "${with_termlib+set}" = set; then
4277   withval="$with_termlib"
4278   with_termlib=$withval
4279 else
4280   with_termlib=no
4281 fi;
4282 echo "$as_me:4282: result: $with_termlib" >&5
4283 echo "${ECHO_T}$with_termlib" >&6
4284
4285 echo "$as_me:4285: checking if you want to build a separate tic library" >&5
4286 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4287
4288 # Check whether --with-ticlib or --without-ticlib was given.
4289 if test "${with_ticlib+set}" = set; then
4290   withval="$with_ticlib"
4291   with_ticlib=$withval
4292 else
4293   with_ticlib=no
4294 fi;
4295 echo "$as_me:4295: result: $with_ticlib" >&5
4296 echo "${ECHO_T}$with_ticlib" >&6
4297
4298 ### Checks for special libraries, must be done up-front.
4299 SHLIB_LIST=""
4300
4301 echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
4302 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4303
4304 # Check whether --with-gpm or --without-gpm was given.
4305 if test "${with_gpm+set}" = set; then
4306   withval="$with_gpm"
4307   with_gpm=$withval
4308 else
4309   with_gpm=maybe
4310 fi;
4311 echo "$as_me:4311: result: $with_gpm" >&5
4312 echo "${ECHO_T}$with_gpm" >&6
4313
4314 if test "$with_gpm" != no ; then
4315         echo "$as_me:4315: checking for gpm.h" >&5
4316 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4317 if test "${ac_cv_header_gpm_h+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   cat >conftest.$ac_ext <<_ACEOF
4321 #line 4321 "configure"
4322 #include "confdefs.h"
4323 #include <gpm.h>
4324 _ACEOF
4325 if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
4326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4327   ac_status=$?
4328   egrep -v '^ *\+' conftest.er1 >conftest.err
4329   rm -f conftest.er1
4330   cat conftest.err >&5
4331   echo "$as_me:4331: \$? = $ac_status" >&5
4332   (exit $ac_status); } >/dev/null; then
4333   if test -s conftest.err; then
4334     ac_cpp_err=$ac_c_preproc_warn_flag
4335   else
4336     ac_cpp_err=
4337   fi
4338 else
4339   ac_cpp_err=yes
4340 fi
4341 if test -z "$ac_cpp_err"; then
4342   ac_cv_header_gpm_h=yes
4343 else
4344   echo "$as_me: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   ac_cv_header_gpm_h=no
4347 fi
4348 rm -f conftest.err conftest.$ac_ext
4349 fi
4350 echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
4351 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4352 if test $ac_cv_header_gpm_h = yes; then
4353
4354                 cat >>confdefs.h <<\EOF
4355 #define HAVE_GPM_H 1
4356 EOF
4357
4358                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4359                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4360
4361                         cat >>confdefs.h <<\EOF
4362 #define HAVE_LIBGPM 1
4363 EOF
4364
4365                 else
4366                         echo "$as_me:4366: checking for Gpm_Open in -lgpm" >&5
4367 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4368 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   ac_check_lib_save_LIBS=$LIBS
4372 LIBS="-lgpm  $LIBS"
4373 cat >conftest.$ac_ext <<_ACEOF
4374 #line 4374 "configure"
4375 #include "confdefs.h"
4376
4377 /* Override any gcc2 internal prototype to avoid an error.  */
4378 #ifdef __cplusplus
4379 extern "C"
4380 #endif
4381 /* We use char because int might match the return type of a gcc2
4382    builtin and then its argument prototype would still apply.  */
4383 char Gpm_Open ();
4384 int
4385 main ()
4386 {
4387 Gpm_Open ();
4388   ;
4389   return 0;
4390 }
4391 _ACEOF
4392 rm -f conftest.$ac_objext conftest$ac_exeext
4393 if { (eval echo "$as_me:4393: \"$ac_link\"") >&5
4394   (eval $ac_link) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } &&
4398          { ac_try='test -s conftest$ac_exeext'
4399   { (eval echo "$as_me:4399: \"$ac_try\"") >&5
4400   (eval $ac_try) 2>&5
4401   ac_status=$?
4402   echo "$as_me:4402: \$? = $ac_status" >&5
4403   (exit $ac_status); }; }; then
4404   ac_cv_lib_gpm_Gpm_Open=yes
4405 else
4406   echo "$as_me: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 ac_cv_lib_gpm_Gpm_Open=no
4409 fi
4410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4411 LIBS=$ac_check_lib_save_LIBS
4412 fi
4413 echo "$as_me:4413: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4414 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4415 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4416   :
4417 else
4418
4419                                 { { echo "$as_me:4419: error: Cannot link with GPM library" >&5
4420 echo "$as_me: error: Cannot link with GPM library" >&2;}
4421    { (exit 1); exit 1; }; }
4422                 fi
4423                 with_gpm=yes
4424
4425 fi
4426
4427 else
4428
4429                 test "$with_gpm" != maybe && { echo "$as_me:4429: WARNING: Cannot find GPM header" >&5
4430 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4431                 with_gpm=no
4432
4433 fi
4434
4435 fi
4436
4437 if test "$with_gpm" != no ; then
4438         echo "$as_me:4438: checking if you want to load GPM dynamically" >&5
4439 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4440
4441 # Check whether --with-dlsym or --without-dlsym was given.
4442 if test "${with_dlsym+set}" = set; then
4443   withval="$with_dlsym"
4444   with_dlsym=$withval
4445 else
4446   with_dlsym=yes
4447 fi;
4448         echo "$as_me:4448: result: $with_dlsym" >&5
4449 echo "${ECHO_T}$with_dlsym" >&6
4450         if test "$with_dlsym" = yes ; then
4451
4452 cf_have_dlsym=no
4453 echo "$as_me:4453: checking for dlsym" >&5
4454 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4455 if test "${ac_cv_func_dlsym+set}" = set; then
4456   echo $ECHO_N "(cached) $ECHO_C" >&6
4457 else
4458   cat >conftest.$ac_ext <<_ACEOF
4459 #line 4459 "configure"
4460 #include "confdefs.h"
4461 /* System header to define __stub macros and hopefully few prototypes,
4462     which can conflict with char dlsym (); below.  */
4463 #include <assert.h>
4464 /* Override any gcc2 internal prototype to avoid an error.  */
4465 #ifdef __cplusplus
4466 extern "C"
4467 #endif
4468 /* We use char because int might match the return type of a gcc2
4469    builtin and then its argument prototype would still apply.  */
4470 char dlsym ();
4471 char (*f) ();
4472
4473 int
4474 main ()
4475 {
4476 /* The GNU C library defines this for functions which it implements
4477     to always fail with ENOSYS.  Some functions are actually named
4478     something starting with __ and the normal name is an alias.  */
4479 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4480 choke me
4481 #else
4482 f = dlsym;
4483 #endif
4484
4485   ;
4486   return 0;
4487 }
4488 _ACEOF
4489 rm -f conftest.$ac_objext conftest$ac_exeext
4490 if { (eval echo "$as_me:4490: \"$ac_link\"") >&5
4491   (eval $ac_link) 2>&5
4492   ac_status=$?
4493   echo "$as_me:4493: \$? = $ac_status" >&5
4494   (exit $ac_status); } &&
4495          { ac_try='test -s conftest$ac_exeext'
4496   { (eval echo "$as_me:4496: \"$ac_try\"") >&5
4497   (eval $ac_try) 2>&5
4498   ac_status=$?
4499   echo "$as_me:4499: \$? = $ac_status" >&5
4500   (exit $ac_status); }; }; then
4501   ac_cv_func_dlsym=yes
4502 else
4503   echo "$as_me: failed program was:" >&5
4504 cat conftest.$ac_ext >&5
4505 ac_cv_func_dlsym=no
4506 fi
4507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4508 fi
4509 echo "$as_me:4509: result: $ac_cv_func_dlsym" >&5
4510 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4511 if test $ac_cv_func_dlsym = yes; then
4512   cf_have_dlsym=yes
4513 else
4514
4515 cf_have_libdl=no
4516 echo "$as_me:4516: checking for dlsym in -ldl" >&5
4517 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4518 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4519   echo $ECHO_N "(cached) $ECHO_C" >&6
4520 else
4521   ac_check_lib_save_LIBS=$LIBS
4522 LIBS="-ldl  $LIBS"
4523 cat >conftest.$ac_ext <<_ACEOF
4524 #line 4524 "configure"
4525 #include "confdefs.h"
4526
4527 /* Override any gcc2 internal prototype to avoid an error.  */
4528 #ifdef __cplusplus
4529 extern "C"
4530 #endif
4531 /* We use char because int might match the return type of a gcc2
4532    builtin and then its argument prototype would still apply.  */
4533 char dlsym ();
4534 int
4535 main ()
4536 {
4537 dlsym ();
4538   ;
4539   return 0;
4540 }
4541 _ACEOF
4542 rm -f conftest.$ac_objext conftest$ac_exeext
4543 if { (eval echo "$as_me:4543: \"$ac_link\"") >&5
4544   (eval $ac_link) 2>&5
4545   ac_status=$?
4546   echo "$as_me:4546: \$? = $ac_status" >&5
4547   (exit $ac_status); } &&
4548          { ac_try='test -s conftest$ac_exeext'
4549   { (eval echo "$as_me:4549: \"$ac_try\"") >&5
4550   (eval $ac_try) 2>&5
4551   ac_status=$?
4552   echo "$as_me:4552: \$? = $ac_status" >&5
4553   (exit $ac_status); }; }; then
4554   ac_cv_lib_dl_dlsym=yes
4555 else
4556   echo "$as_me: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 ac_cv_lib_dl_dlsym=no
4559 fi
4560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4561 LIBS=$ac_check_lib_save_LIBS
4562 fi
4563 echo "$as_me:4563: result: $ac_cv_lib_dl_dlsym" >&5
4564 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4565 if test $ac_cv_lib_dl_dlsym = yes; then
4566
4567         cf_have_dlsym=yes
4568         cf_have_libdl=yes
4569 fi
4570
4571 fi
4572
4573 if test "$cf_have_dlsym" = yes ; then
4574         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4575
4576         echo "$as_me:4576: checking whether able to link to dl*() functions" >&5
4577 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4578         cat >conftest.$ac_ext <<_ACEOF
4579 #line 4579 "configure"
4580 #include "confdefs.h"
4581 #include <dlfcn.h>
4582 int
4583 main ()
4584 {
4585
4586                 void *obj;
4587                 if ((obj = dlopen("filename", 0)) != 0) {
4588                         if (dlsym(obj, "symbolname") == 0) {
4589                         dlclose(obj);
4590                         }
4591                 }
4592   ;
4593   return 0;
4594 }
4595 _ACEOF
4596 rm -f conftest.$ac_objext conftest$ac_exeext
4597 if { (eval echo "$as_me:4597: \"$ac_link\"") >&5
4598   (eval $ac_link) 2>&5
4599   ac_status=$?
4600   echo "$as_me:4600: \$? = $ac_status" >&5
4601   (exit $ac_status); } &&
4602          { ac_try='test -s conftest$ac_exeext'
4603   { (eval echo "$as_me:4603: \"$ac_try\"") >&5
4604   (eval $ac_try) 2>&5
4605   ac_status=$?
4606   echo "$as_me:4606: \$? = $ac_status" >&5
4607   (exit $ac_status); }; }; then
4608
4609                 cat >>confdefs.h <<\EOF
4610 #define HAVE_LIBDL 1
4611 EOF
4612
4613 else
4614   echo "$as_me: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
4616
4617                 { { echo "$as_me:4617: error: Cannot link test program for libdl" >&5
4618 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4619    { (exit 1); exit 1; }; }
4620 fi
4621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4622         echo "$as_me:4622: result: ok" >&5
4623 echo "${ECHO_T}ok" >&6
4624 else
4625         { { echo "$as_me:4625: error: Cannot find dlsym function" >&5
4626 echo "$as_me: error: Cannot find dlsym function" >&2;}
4627    { (exit 1); exit 1; }; }
4628 fi
4629
4630                 if test "$with_gpm" != yes ; then
4631                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4632
4633                         cf_cv_gpm_soname="$with_gpm"
4634                 else
4635
4636 echo "$as_me:4636: checking for soname of gpm library" >&5
4637 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4638 if test "${cf_cv_gpm_soname+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642 cf_cv_gpm_soname=unknown
4643 if test "$cross_compiling" != yes ; then
4644 cat >conftest.$ac_ext <<CF_EOF
4645 #include <gpm.h>
4646 int main()
4647 {
4648 if (Gpm_Open(0,0)) Gpm_Close();
4649         ${cf_cv_main_return:-return}(0);
4650 }
4651 CF_EOF
4652 cf_save_LIBS="$LIBS"
4653         LIBS="-lgpm $LIBS"
4654         if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655   (eval $ac_compile) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); } ; then
4659                 if { (eval echo "$as_me:4659: \"$ac_link\"") >&5
4660   (eval $ac_link) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); } ; then
4664                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4665                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4666                 fi
4667         fi
4668 rm -f conftest*
4669 LIBS="$cf_save_LIBS"
4670 fi
4671
4672 fi
4673 echo "$as_me:4673: result: $cf_cv_gpm_soname" >&5
4674 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4675
4676                 fi
4677                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4678 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4679 EOF
4680
4681                 SHLIB_LIST="-ldl $SHLIB_LIST"
4682         else
4683                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4684         fi
4685         cat >>confdefs.h <<\EOF
4686 #define HAVE_LIBGPM 1
4687 EOF
4688
4689 echo "$as_me:4689: checking for Gpm_Wgetch in -lgpm" >&5
4690 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4691 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   ac_check_lib_save_LIBS=$LIBS
4695 LIBS="-lgpm  $LIBS"
4696 cat >conftest.$ac_ext <<_ACEOF
4697 #line 4697 "configure"
4698 #include "confdefs.h"
4699
4700 /* Override any gcc2 internal prototype to avoid an error.  */
4701 #ifdef __cplusplus
4702 extern "C"
4703 #endif
4704 /* We use char because int might match the return type of a gcc2
4705    builtin and then its argument prototype would still apply.  */
4706 char Gpm_Wgetch ();
4707 int
4708 main ()
4709 {
4710 Gpm_Wgetch ();
4711   ;
4712   return 0;
4713 }
4714 _ACEOF
4715 rm -f conftest.$ac_objext conftest$ac_exeext
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717   (eval $ac_link) 2>&5
4718   ac_status=$?
4719   echo "$as_me:4719: \$? = $ac_status" >&5
4720   (exit $ac_status); } &&
4721          { ac_try='test -s conftest$ac_exeext'
4722   { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4723   (eval $ac_try) 2>&5
4724   ac_status=$?
4725   echo "$as_me:4725: \$? = $ac_status" >&5
4726   (exit $ac_status); }; }; then
4727   ac_cv_lib_gpm_Gpm_Wgetch=yes
4728 else
4729   echo "$as_me: failed program was:" >&5
4730 cat conftest.$ac_ext >&5
4731 ac_cv_lib_gpm_Gpm_Wgetch=no
4732 fi
4733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4734 LIBS=$ac_check_lib_save_LIBS
4735 fi
4736 echo "$as_me:4736: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4737 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4738 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4739
4740 echo "$as_me:4740: checking if GPM is weakly bound to curses library" >&5
4741 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4742 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745
4746 cf_cv_check_gpm_wgetch=unknown
4747 if test "$cross_compiling" != yes ; then
4748
4749 cat >conftest.$ac_ext <<CF_EOF
4750 #include <gpm.h>
4751 int main()
4752 {
4753         Gpm_Wgetch();
4754         ${cf_cv_main_return:-return}(0);
4755 }
4756 CF_EOF
4757
4758         cf_save_LIBS="$LIBS"
4759         # This only works if we can look at the symbol table.  If a shared
4760         # library is stripped for install, we cannot use that.  So we're forced
4761         # to rely on the static library, noting that some packagers may not
4762         # include it.
4763         LIBS="-static -lgpm -dynamic $LIBS"
4764         if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5
4765   (eval $ac_compile) 2>&5
4766   ac_status=$?
4767   echo "$as_me:4767: \$? = $ac_status" >&5
4768   (exit $ac_status); } ; then
4769                 if { (eval echo "$as_me:4769: \"$ac_link\"") >&5
4770   (eval $ac_link) 2>&5
4771   ac_status=$?
4772   echo "$as_me:4772: \$? = $ac_status" >&5
4773   (exit $ac_status); } ; then
4774                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4775                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4776                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4777                 fi
4778         fi
4779         rm -f conftest*
4780         LIBS="$cf_save_LIBS"
4781 fi
4782
4783 fi
4784 echo "$as_me:4784: result: $cf_cv_check_gpm_wgetch" >&5
4785 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4786
4787 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4788         { echo "$as_me:4788: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4789 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4790 fi
4791
4792 fi
4793
4794 fi
4795
4796 # not everyone has "test -c"
4797 if test -c /dev/sysmouse 2>/dev/null ; then
4798 echo "$as_me:4798: checking if you want to use sysmouse" >&5
4799 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4800
4801 # Check whether --with-sysmouse or --without-sysmouse was given.
4802 if test "${with_sysmouse+set}" = set; then
4803   withval="$with_sysmouse"
4804   cf_with_sysmouse=$withval
4805 else
4806   cf_with_sysmouse=maybe
4807 fi;
4808         if test "$cf_with_sysmouse" != no ; then
4809         cat >conftest.$ac_ext <<_ACEOF
4810 #line 4810 "configure"
4811 #include "confdefs.h"
4812
4813 #include <osreldate.h>
4814 #if (__FreeBSD_version >= 400017)
4815 #include <sys/consio.h>
4816 #include <sys/fbio.h>
4817 #else
4818 #include <machine/console.h>
4819 #endif
4820
4821 int
4822 main ()
4823 {
4824
4825         struct mouse_info the_mouse;
4826         ioctl(0, CONS_MOUSECTL, &the_mouse);
4827
4828   ;
4829   return 0;
4830 }
4831 _ACEOF
4832 rm -f conftest.$ac_objext
4833 if { (eval echo "$as_me:4833: \"$ac_compile\"") >&5
4834   (eval $ac_compile) 2>&5
4835   ac_status=$?
4836   echo "$as_me:4836: \$? = $ac_status" >&5
4837   (exit $ac_status); } &&
4838          { ac_try='test -s conftest.$ac_objext'
4839   { (eval echo "$as_me:4839: \"$ac_try\"") >&5
4840   (eval $ac_try) 2>&5
4841   ac_status=$?
4842   echo "$as_me:4842: \$? = $ac_status" >&5
4843   (exit $ac_status); }; }; then
4844   cf_with_sysmouse=yes
4845 else
4846   echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 cf_with_sysmouse=no
4849 fi
4850 rm -f conftest.$ac_objext conftest.$ac_ext
4851         fi
4852 echo "$as_me:4852: result: $cf_with_sysmouse" >&5
4853 echo "${ECHO_T}$cf_with_sysmouse" >&6
4854 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4855 #define USE_SYSMOUSE 1
4856 EOF
4857
4858 fi
4859
4860 if test X"$CC_G_OPT" = X"" ; then
4861         CC_G_OPT='-g'
4862         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4863 fi
4864
4865 if test X"$CXX_G_OPT" = X"" ; then
4866         CXX_G_OPT='-g'
4867         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4868 fi
4869
4870 echo "$as_me:4870: checking for default loader flags" >&5
4871 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4872 case $DFT_LWR_MODEL in
4873 libtool) LD_MODEL=''   ;;
4874 normal)  LD_MODEL=''   ;;
4875 debug)   LD_MODEL=$CC_G_OPT ;;
4876 profile) LD_MODEL='-pg';;
4877 shared)  LD_MODEL=''   ;;
4878 esac
4879 echo "$as_me:4879: result: $LD_MODEL" >&5
4880 echo "${ECHO_T}$LD_MODEL" >&6
4881
4882 case $DFT_LWR_MODEL in
4883 shared)
4884 echo "$as_me:4884: checking if rpath option should be used" >&5
4885 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4886
4887 # Check whether --enable-rpath or --disable-rpath was given.
4888 if test "${enable_rpath+set}" = set; then
4889   enableval="$enable_rpath"
4890   cf_cv_ld_rpath=$enableval
4891 else
4892   cf_cv_ld_rpath=no
4893 fi;
4894 echo "$as_me:4894: result: $cf_cv_ld_rpath" >&5
4895 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4896 echo "$as_me:4896: checking if shared libraries should be relinked during install" >&5
4897 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4898
4899 # Check whether --enable-rpath or --disable-rpath was given.
4900 if test "${enable_rpath+set}" = set; then
4901   enableval="$enable_rpath"
4902   cf_cv_do_relink=$enableval
4903 else
4904   cf_cv_do_relink=yes
4905 fi;
4906 echo "$as_me:4906: result: $cf_cv_do_relink" >&5
4907 echo "${ECHO_T}$cf_cv_do_relink" >&6
4908         ;;
4909 esac
4910
4911         LOCAL_LDFLAGS=
4912         LOCAL_LDFLAGS2=
4913         LD_SHARED_OPTS=
4914         INSTALL_LIB="-m 644"
4915
4916         cf_cv_do_symlinks=no
4917
4918         echo "$as_me:4918: checking if release/abi version should be used for shared libs" >&5
4919 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4920
4921 # Check whether --with-shlib-version or --without-shlib-version was given.
4922 if test "${with_shlib_version+set}" = set; then
4923   withval="$with_shlib_version"
4924   test -z "$withval" && withval=auto
4925         case $withval in #(vi
4926         yes) #(vi
4927                 cf_cv_shlib_version=auto
4928                 ;;
4929         rel|abi|auto|no) #(vi
4930                 cf_cv_shlib_version=$withval
4931                 ;;
4932         *)
4933                 { { echo "$as_me:4933: error: option value must be one of: rel, abi, auto or no" >&5
4934 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4935    { (exit 1); exit 1; }; }
4936                 ;;
4937         esac
4938
4939 else
4940   cf_cv_shlib_version=auto
4941 fi;
4942         echo "$as_me:4942: result: $cf_cv_shlib_version" >&5
4943 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4944
4945         cf_cv_rm_so_locs=no
4946
4947         # Some less-capable ports of gcc support only -fpic
4948         CC_SHARED_OPTS=
4949         if test "$GCC" = yes
4950         then
4951                 echo "$as_me:4951: checking which $CC option to use" >&5
4952 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4953                 cf_save_CFLAGS="$CFLAGS"
4954                 for CC_SHARED_OPTS in -fPIC -fpic ''
4955                 do
4956                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4957                         cat >conftest.$ac_ext <<_ACEOF
4958 #line 4958 "configure"
4959 #include "confdefs.h"
4960 #include <stdio.h>
4961 int
4962 main ()
4963 {
4964 int x = 1
4965   ;
4966   return 0;
4967 }
4968 _ACEOF
4969 rm -f conftest.$ac_objext
4970 if { (eval echo "$as_me:4970: \"$ac_compile\"") >&5
4971   (eval $ac_compile) 2>&5
4972   ac_status=$?
4973   echo "$as_me:4973: \$? = $ac_status" >&5
4974   (exit $ac_status); } &&
4975          { ac_try='test -s conftest.$ac_objext'
4976   { (eval echo "$as_me:4976: \"$ac_try\"") >&5
4977   (eval $ac_try) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); }; }; then
4981   break
4982 else
4983   echo "$as_me: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 fi
4986 rm -f conftest.$ac_objext conftest.$ac_ext
4987                 done
4988                 echo "$as_me:4988: result: $CC_SHARED_OPTS" >&5
4989 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4990                 CFLAGS="$cf_save_CFLAGS"
4991         fi
4992
4993         cf_cv_shlib_version_infix=no
4994
4995         case $cf_cv_system_name in
4996         beos*)
4997                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4998                 ;;
4999         cygwin*)
5000                 CC_SHARED_OPTS=
5001                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5002                 cf_cv_shlib_version=cygdll
5003                 cf_cv_shlib_version_infix=cygdll
5004                 cat >mk_shared_lib.sh <<-CF_EOF
5005                 #!/bin/sh
5006                 SHARED_LIB=\$1
5007                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5008                 shift
5009                 cat <<-EOF
5010                 Linking shared library
5011                 ** SHARED_LIB \$SHARED_LIB
5012                 ** IMPORT_LIB \$IMPORT_LIB
5013 EOF
5014                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5015 CF_EOF
5016                 chmod +x mk_shared_lib.sh
5017                 ;;
5018         darwin*)
5019                 EXTRA_CFLAGS="-no-cpp-precomp"
5020                 CC_SHARED_OPTS="-dynamic"
5021                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5023                 cf_cv_shlib_version_infix=yes
5024                 echo "$as_me:5024: checking if ld -search_paths_first works" >&5
5025 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5026 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029
5030                         cf_save_LDFLAGS=$LDFLAGS
5031                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5032                         cat >conftest.$ac_ext <<_ACEOF
5033 #line 5033 "configure"
5034 #include "confdefs.h"
5035
5036 int
5037 main ()
5038 {
5039 int i;
5040   ;
5041   return 0;
5042 }
5043 _ACEOF
5044 rm -f conftest.$ac_objext conftest$ac_exeext
5045 if { (eval echo "$as_me:5045: \"$ac_link\"") >&5
5046   (eval $ac_link) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); } &&
5050          { ac_try='test -s conftest$ac_exeext'
5051   { (eval echo "$as_me:5051: \"$ac_try\"") >&5
5052   (eval $ac_try) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); }; }; then
5056   cf_cv_ldflags_search_paths_first=yes
5057 else
5058   echo "$as_me: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5060 cf_cv_ldflags_search_paths_first=no
5061 fi
5062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5063                                 LDFLAGS=$cf_save_LDFLAGS
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_ldflags_search_paths_first" >&5
5066 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5067                 if test $cf_cv_ldflags_search_paths_first = yes; then
5068                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5069                 fi
5070                 ;;
5071         hpux*)
5072                 # (tested with gcc 2.7.2 -- I don't have c89)
5073                 if test "$GCC" = yes; then
5074                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5075                 else
5076                         CC_SHARED_OPTS='+Z'
5077                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5078                 fi
5079                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5080                 # HP-UX shared libraries must be executable, and should be
5081                 # readonly to exploit a quirk in the memory manager.
5082                 INSTALL_LIB="-m 555"
5083                 ;;
5084         irix*)
5085                 if test "$cf_cv_ld_rpath" = yes ; then
5086                         if test "$GCC" = yes; then
5087                                 cf_ld_rpath_opt="-Wl,-rpath,"
5088                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5089                         else
5090                                 cf_ld_rpath_opt="-rpath "
5091                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5092                         fi
5093                 fi
5094                 # tested with IRIX 5.2 and 'cc'.
5095                 if test "$GCC" != yes; then
5096                         CC_SHARED_OPTS='-KPIC'
5097                 fi
5098                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5099                 cf_cv_rm_so_locs=yes
5100                 ;;
5101         linux*|gnu*|k*bsd*-gnu)
5102                 if test "$DFT_LWR_MODEL" = "shared" ; then
5103                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5104                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5105                 fi
5106                 if test "$cf_cv_ld_rpath" = yes ; then
5107                         cf_ld_rpath_opt="-Wl,-rpath,"
5108                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5109                 fi
5110
5111         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5112         if test "$cf_cv_shlib_version" = rel; then
5113                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5114         else
5115                 cf_shared_soname='`basename $@`'
5116         fi
5117
5118                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5119                 ;;
5120         openbsd[2-9].*)
5121                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5122                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5123                 ;;
5124         openbsd*|freebsd[12].*)
5125                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5126                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5127                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5128                 ;;
5129         freebsd*)
5130                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5131                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5132                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5133                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5134                         cf_ld_rpath_opt="-rpath "
5135                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5136                 fi
5137
5138         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5139         if test "$cf_cv_shlib_version" = rel; then
5140                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5141         else
5142                 cf_shared_soname='`basename $@`'
5143         fi
5144
5145                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5146                 ;;
5147         netbsd*)
5148                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5149                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5150                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5151                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5152                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5153                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5154                         if test "$cf_cv_shlib_version" = auto; then
5155                         if test -f /usr/libexec/ld.elf_so; then
5156                                 cf_cv_shlib_version=abi
5157                         else
5158                                 cf_cv_shlib_version=rel
5159                         fi
5160                         fi
5161
5162         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5163         if test "$cf_cv_shlib_version" = rel; then
5164                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165         else
5166                 cf_shared_soname='`basename $@`'
5167         fi
5168
5169                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5170                 else
5171                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5172                 fi
5173                 ;;
5174         osf*|mls+*)
5175                 # tested with OSF/1 V3.2 and 'cc'
5176                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5177                 # link with shared libs).
5178                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5179                 case $host_os in
5180                 osf4*)
5181                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5182                         ;;
5183                 esac
5184                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5185                 if test "$DFT_LWR_MODEL" = "shared" ; then
5186                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5187                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5188                 fi
5189                 if test "$cf_cv_ld_rpath" = yes ; then
5190                         cf_ld_rpath_opt="-rpath"
5191                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5192                 fi
5193                 cf_cv_rm_so_locs=yes
5194                 ;;
5195         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5196                 # tested with osr5.0.5
5197                 if test "$GCC" != yes; then
5198                         CC_SHARED_OPTS='-belf -KPIC'
5199                 fi
5200                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5201                 if test "$cf_cv_ld_rpath" = yes ; then
5202                         # only way is to set LD_RUN_PATH but no switch for it
5203                         RUN_PATH=$libdir
5204                 fi
5205                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5206                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5207                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5208                 ;;
5209         sunos4*)
5210                 # tested with SunOS 4.1.1 and gcc 2.7.0
5211                 if test "$GCC" != yes; then
5212                         CC_SHARED_OPTS='-KPIC'
5213                 fi
5214                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5215                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5216                 ;;
5217         solaris2*)
5218                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5219                 if test "$GCC" != yes; then
5220                         CC_SHARED_OPTS='-KPIC'
5221                 fi
5222                 if test "$DFT_LWR_MODEL" = "shared" ; then
5223                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5225                 fi
5226                 if test "$cf_cv_ld_rpath" = yes ; then
5227                         cf_ld_rpath_opt="-R"
5228                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5229                 fi
5230
5231         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5232         if test "$cf_cv_shlib_version" = rel; then
5233                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5234         else
5235                 cf_shared_soname='`basename $@`'
5236         fi
5237
5238                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5239                 ;;
5240         sysv5uw7*|unix_sv*)
5241                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5242                 if test "$GCC" != yes; then
5243                         CC_SHARED_OPTS='-KPIC'
5244                 fi
5245                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5246                 ;;
5247         *)
5248                 CC_SHARED_OPTS='unknown'
5249                 MK_SHARED_LIB='echo unknown'
5250                 ;;
5251         esac
5252
5253         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5254         case "$cf_cv_shlib_version" in #(vi
5255         rel|abi)
5256                 case "$MK_SHARED_LIB" in #(vi
5257                 *'-o $@')
5258                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5259                         ;;
5260                 *)
5261                         { echo "$as_me:5261: WARNING: ignored --with-shlib-version" >&5
5262 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5263                         ;;
5264                 esac
5265                 ;;
5266         esac
5267
5268         if test -n "$cf_ld_rpath_opt" ; then
5269                 echo "$as_me:5269: checking if we need a space after rpath option" >&5
5270 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5271                 cf_save_LIBS="$LIBS"
5272                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5273                 cat >conftest.$ac_ext <<_ACEOF
5274 #line 5274 "configure"
5275 #include "confdefs.h"
5276
5277 int
5278 main ()
5279 {
5280
5281   ;
5282   return 0;
5283 }
5284 _ACEOF
5285 rm -f conftest.$ac_objext conftest$ac_exeext
5286 if { (eval echo "$as_me:5286: \"$ac_link\"") >&5
5287   (eval $ac_link) 2>&5
5288   ac_status=$?
5289   echo "$as_me:5289: \$? = $ac_status" >&5
5290   (exit $ac_status); } &&
5291          { ac_try='test -s conftest$ac_exeext'
5292   { (eval echo "$as_me:5292: \"$ac_try\"") >&5
5293   (eval $ac_try) 2>&5
5294   ac_status=$?
5295   echo "$as_me:5295: \$? = $ac_status" >&5
5296   (exit $ac_status); }; }; then
5297   cf_rpath_space=no
5298 else
5299   echo "$as_me: failed program was:" >&5
5300 cat conftest.$ac_ext >&5
5301 cf_rpath_space=yes
5302 fi
5303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5304                 LIBS="$cf_save_LIBS"
5305                 echo "$as_me:5305: result: $cf_rpath_space" >&5
5306 echo "${ECHO_T}$cf_rpath_space" >&6
5307                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5308                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5309         fi
5310
5311 if test "$CC_SHARED_OPTS" = "unknown"; then
5312         for model in $cf_list_models; do
5313                 if test "$model" = "shared"; then
5314                         { { echo "$as_me:5314: error: Shared libraries are not supported in this version" >&5
5315 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5316    { (exit 1); exit 1; }; }
5317                 fi
5318         done
5319 fi
5320
5321 ###############################################################################
5322
5323 ###     use option --disable-overwrite to leave out the link to -lcurses
5324 echo "$as_me:5324: checking if you wish to install ncurses overwriting curses" >&5
5325 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5326
5327 # Check whether --enable-overwrite or --disable-overwrite was given.
5328 if test "${enable_overwrite+set}" = set; then
5329   enableval="$enable_overwrite"
5330   with_overwrite=$enableval
5331 else
5332   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5333 fi;
5334 echo "$as_me:5334: result: $with_overwrite" >&5
5335 echo "${ECHO_T}$with_overwrite" >&6
5336
5337 echo "$as_me:5337: checking if external terminfo-database is used" >&5
5338 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5339
5340 # Check whether --enable-database or --disable-database was given.
5341 if test "${enable_database+set}" = set; then
5342   enableval="$enable_database"
5343   use_database=$enableval
5344 else
5345   use_database=yes
5346 fi;
5347 echo "$as_me:5347: result: $use_database" >&5
5348 echo "${ECHO_T}$use_database" >&6
5349
5350 case $host_os in #(vi
5351 os2*) #(vi
5352         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5353         ;;
5354 *) #(vi
5355         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5356         ;;
5357 esac
5358
5359         case $cf_cv_system_name in
5360         os2*)   PATHSEP=';'  ;;
5361         *)      PATHSEP=':'  ;;
5362         esac
5363
5364 if test "$use_database" != no ; then
5365         cat >>confdefs.h <<\EOF
5366 #define USE_DATABASE 1
5367 EOF
5368
5369         echo "$as_me:5369: checking which terminfo source-file will be installed" >&5
5370 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5371
5372 # Check whether --enable-database or --disable-database was given.
5373 if test "${enable_database+set}" = set; then
5374   enableval="$enable_database"
5375   TERMINFO_SRC=$withval
5376 fi;
5377         echo "$as_me:5377: result: $TERMINFO_SRC" >&5
5378 echo "${ECHO_T}$TERMINFO_SRC" >&6
5379
5380         echo "$as_me:5380: checking whether to use hashed database instead of directory/tree" >&5
5381 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5382
5383 # Check whether --with-hashed-db or --without-hashed-db was given.
5384 if test "${with_hashed_db+set}" = set; then
5385   withval="$with_hashed_db"
5386
5387 else
5388   with_hashed_db=no
5389 fi;
5390         echo "$as_me:5390: result: $with_hashed_db" >&5
5391 echo "${ECHO_T}$with_hashed_db" >&6
5392 fi
5393
5394 echo "$as_me:5394: checking for list of fallback descriptions" >&5
5395 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5396
5397 # Check whether --with-fallbacks or --without-fallbacks was given.
5398 if test "${with_fallbacks+set}" = set; then
5399   withval="$with_fallbacks"
5400   with_fallback=$withval
5401 else
5402   with_fallback=
5403 fi;
5404 echo "$as_me:5404: result: $with_fallback" >&5
5405 echo "${ECHO_T}$with_fallback" >&6
5406 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5407
5408 echo "$as_me:5408: checking if you want modern xterm or antique" >&5
5409 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5410
5411 # Check whether --with-xterm-new or --without-xterm-new was given.
5412 if test "${with_xterm_new+set}" = set; then
5413   withval="$with_xterm_new"
5414   with_xterm_new=$withval
5415 else
5416   with_xterm_new=yes
5417 fi;
5418 case $with_xterm_new in
5419 no)     with_xterm_new=xterm-old;;
5420 *)      with_xterm_new=xterm-new;;
5421 esac
5422 echo "$as_me:5422: result: $with_xterm_new" >&5
5423 echo "${ECHO_T}$with_xterm_new" >&6
5424 WHICH_XTERM=$with_xterm_new
5425
5426 MAKE_TERMINFO=
5427 if test "$use_database" = no ; then
5428         TERMINFO="${datadir}/terminfo"
5429         MAKE_TERMINFO="#"
5430 else
5431
5432 echo "$as_me:5432: checking for list of terminfo directories" >&5
5433 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5434
5435 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5436 if test "${with_terminfo_dirs+set}" = set; then
5437   withval="$with_terminfo_dirs"
5438
5439 else
5440   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5441 fi;
5442 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5443 cf_dst_path=
5444 for cf_src_path in $withval
5445 do
5446
5447 if test "x$prefix" != xNONE; then
5448   cf_path_syntax="$prefix"
5449 else
5450   cf_path_syntax="$ac_default_prefix"
5451 fi
5452
5453 case ".$cf_src_path" in #(vi
5454 .\$\(*\)*|.\'*\'*) #(vi
5455   ;;
5456 ..|./*|.\\*) #(vi
5457   ;;
5458 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5459   ;;
5460 .\${*prefix}*) #(vi
5461   eval cf_src_path="$cf_src_path"
5462   case ".$cf_src_path" in #(vi
5463   .NONE/*)
5464     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5465     ;;
5466   esac
5467   ;; #(vi
5468 .no|.NONE/*)
5469   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5470   ;;
5471 *)
5472   { { echo "$as_me:5472: error: expected a pathname, not \"$cf_src_path\"" >&5
5473 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5474    { (exit 1); exit 1; }; }
5475   ;;
5476 esac
5477
5478   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5479   cf_dst_path="${cf_dst_path}${cf_src_path}"
5480 done
5481 IFS="$ac_save_ifs"
5482
5483 eval 'TERMINFO_DIRS="$cf_dst_path"'
5484
5485 echo "$as_me:5485: result: $TERMINFO_DIRS" >&5
5486 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5487 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5488 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5489 EOF
5490
5491 echo "$as_me:5491: checking for default terminfo directory" >&5
5492 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5493
5494 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5495 if test "${with_default_terminfo_dir+set}" = set; then
5496   withval="$with_default_terminfo_dir"
5497
5498 else
5499   withval="${TERMINFO-${datadir}/terminfo}"
5500 fi; if test -n "${datadir}/terminfo" ; then
5501
5502 if test "x$prefix" != xNONE; then
5503   cf_path_syntax="$prefix"
5504 else
5505   cf_path_syntax="$ac_default_prefix"
5506 fi
5507
5508 case ".$withval" in #(vi
5509 .\$\(*\)*|.\'*\'*) #(vi
5510   ;;
5511 ..|./*|.\\*) #(vi
5512   ;;
5513 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5514   ;;
5515 .\${*prefix}*) #(vi
5516   eval withval="$withval"
5517   case ".$withval" in #(vi
5518   .NONE/*)
5519     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5520     ;;
5521   esac
5522   ;; #(vi
5523 .no|.NONE/*)
5524   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5525   ;;
5526 *)
5527   { { echo "$as_me:5527: error: expected a pathname, not \"$withval\"" >&5
5528 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5529    { (exit 1); exit 1; }; }
5530   ;;
5531 esac
5532
5533 fi
5534 TERMINFO="$withval"
5535
5536 echo "$as_me:5536: result: $TERMINFO" >&5
5537 echo "${ECHO_T}$TERMINFO" >&6
5538 cat >>confdefs.h <<EOF
5539 #define TERMINFO "$TERMINFO"
5540 EOF
5541
5542 fi
5543
5544 ###     use option --disable-big-core to make tic run on small machines
5545 ###     We need 4Mb, check if we can allocate 50% more than that.
5546 echo "$as_me:5546: checking if big-core option selected" >&5
5547 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5548
5549 # Check whether --enable-big-core or --disable-big-core was given.
5550 if test "${enable_big_core+set}" = set; then
5551   enableval="$enable_big_core"
5552   with_big_core=$enableval
5553 else
5554   if test "$cross_compiling" = yes; then
5555   with_big_core=no
5556 else
5557   cat >conftest.$ac_ext <<_ACEOF
5558 #line 5558 "configure"
5559 #include "confdefs.h"
5560
5561 #include <stdlib.h>
5562 #include <string.h>
5563 int main() {
5564         unsigned long n = 6000000L;
5565         char *s = malloc(n);
5566         if (s != 0)
5567                 s[0] = s[n-1] = 0;
5568         ${cf_cv_main_return:-return}(s == 0);
5569 }
5570 _ACEOF
5571 rm -f conftest$ac_exeext
5572 if { (eval echo "$as_me:5572: \"$ac_link\"") >&5
5573   (eval $ac_link) 2>&5
5574   ac_status=$?
5575   echo "$as_me:5575: \$? = $ac_status" >&5
5576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5577   { (eval echo "$as_me:5577: \"$ac_try\"") >&5
5578   (eval $ac_try) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); }; }; then
5582   with_big_core=yes
5583 else
5584   echo "$as_me: program exited with status $ac_status" >&5
5585 echo "$as_me: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5587 with_big_core=no
5588 fi
5589 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5590 fi
5591 fi;
5592 echo "$as_me:5592: result: $with_big_core" >&5
5593 echo "${ECHO_T}$with_big_core" >&6
5594 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5595 #define HAVE_BIG_CORE 1
5596 EOF
5597
5598 ###     use option --enable-termcap to compile in the termcap fallback support
5599 echo "$as_me:5599: checking if you want termcap-fallback support" >&5
5600 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5601
5602 # Check whether --enable-termcap or --disable-termcap was given.
5603 if test "${enable_termcap+set}" = set; then
5604   enableval="$enable_termcap"
5605   with_termcap=$enableval
5606 else
5607   with_termcap=no
5608 fi;
5609 echo "$as_me:5609: result: $with_termcap" >&5
5610 echo "${ECHO_T}$with_termcap" >&6
5611
5612 if test "$with_termcap" != "yes" ; then
5613         if test "$use_database" = no ; then
5614                 if test -z "$with_fallback" ; then
5615                         { { echo "$as_me:5615: error: You have disabled the database w/o specifying fallbacks" >&5
5616 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5617    { (exit 1); exit 1; }; }
5618                 fi
5619         fi
5620         cat >>confdefs.h <<\EOF
5621 #define PURE_TERMINFO 1
5622 EOF
5623
5624 else
5625
5626 if test "$with_ticlib" != no ; then
5627         { { echo "$as_me:5627: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5628 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5629    { (exit 1); exit 1; }; }
5630 fi
5631
5632 cat >>confdefs.h <<\EOF
5633 #define USE_TERMCAP 1
5634 EOF
5635
5636 echo "$as_me:5636: checking for list of termcap files" >&5
5637 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5638
5639 # Check whether --with-termpath or --without-termpath was given.
5640 if test "${with_termpath+set}" = set; then
5641   withval="$with_termpath"
5642
5643 else
5644   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5645 fi;
5646 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5647 cf_dst_path=
5648 for cf_src_path in $withval
5649 do
5650
5651 if test "x$prefix" != xNONE; then
5652   cf_path_syntax="$prefix"
5653 else
5654   cf_path_syntax="$ac_default_prefix"
5655 fi
5656
5657 case ".$cf_src_path" in #(vi
5658 .\$\(*\)*|.\'*\'*) #(vi
5659   ;;
5660 ..|./*|.\\*) #(vi
5661   ;;
5662 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5663   ;;
5664 .\${*prefix}*) #(vi
5665   eval cf_src_path="$cf_src_path"
5666   case ".$cf_src_path" in #(vi
5667   .NONE/*)
5668     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5669     ;;
5670   esac
5671   ;; #(vi
5672 .no|.NONE/*)
5673   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5674   ;;
5675 *)
5676   { { echo "$as_me:5676: error: expected a pathname, not \"$cf_src_path\"" >&5
5677 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5678    { (exit 1); exit 1; }; }
5679   ;;
5680 esac
5681
5682   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5683   cf_dst_path="${cf_dst_path}${cf_src_path}"
5684 done
5685 IFS="$ac_save_ifs"
5686
5687 eval 'TERMPATH="$cf_dst_path"'
5688
5689 echo "$as_me:5689: result: $TERMPATH" >&5
5690 echo "${ECHO_T}$TERMPATH" >&6
5691 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5692 #define TERMPATH "$TERMPATH"
5693 EOF
5694
5695 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5696 echo "$as_me:5696: checking if fast termcap-loader is needed" >&5
5697 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5698
5699 # Check whether --enable-getcap or --disable-getcap was given.
5700 if test "${enable_getcap+set}" = set; then
5701   enableval="$enable_getcap"
5702   with_getcap=$enableval
5703 else
5704   with_getcap=no
5705 fi;
5706 echo "$as_me:5706: result: $with_getcap" >&5
5707 echo "${ECHO_T}$with_getcap" >&6
5708 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5709 #define USE_GETCAP 1
5710 EOF
5711
5712 echo "$as_me:5712: checking if translated termcaps will be cached in ~/.terminfo" >&5
5713 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5714
5715 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5716 if test "${enable_getcap_cache+set}" = set; then
5717   enableval="$enable_getcap_cache"
5718   with_getcap_cache=$enableval
5719 else
5720   with_getcap_cache=no
5721 fi;
5722 echo "$as_me:5722: result: $with_getcap_cache" >&5
5723 echo "${ECHO_T}$with_getcap_cache" >&6
5724 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5725 #define USE_GETCAP_CACHE 1
5726 EOF
5727
5728 fi
5729
5730 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5731 echo "$as_me:5731: checking if ~/.terminfo is wanted" >&5
5732 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5733
5734 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5735 if test "${enable_home_terminfo+set}" = set; then
5736   enableval="$enable_home_terminfo"
5737   with_home_terminfo=$enableval
5738 else
5739   with_home_terminfo=yes
5740 fi;
5741 echo "$as_me:5741: result: $with_home_terminfo" >&5
5742 echo "${ECHO_T}$with_home_terminfo" >&6
5743 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5744 #define USE_HOME_TERMINFO 1
5745 EOF
5746
5747 echo "$as_me:5747: checking if you want to use restricted environment when running as root" >&5
5748 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5749
5750 # Check whether --enable-root-environ or --disable-root-environ was given.
5751 if test "${enable_root_environ+set}" = set; then
5752   enableval="$enable_root_environ"
5753   with_root_environ=$enableval
5754 else
5755   with_root_environ=yes
5756 fi;
5757 echo "$as_me:5757: result: $with_root_environ" >&5
5758 echo "${ECHO_T}$with_root_environ" >&6
5759 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5760 #define USE_ROOT_ENVIRON 1
5761 EOF
5762
5763 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5764 ###   to reduce storage requirements for the terminfo database.
5765
5766 for ac_func in \
5767         remove \
5768         unlink
5769 do
5770 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5771 echo "$as_me:5771: checking for $ac_func" >&5
5772 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5773 if eval "test \"\${$as_ac_var+set}\" = set"; then
5774   echo $ECHO_N "(cached) $ECHO_C" >&6
5775 else
5776   cat >conftest.$ac_ext <<_ACEOF
5777 #line 5777 "configure"
5778 #include "confdefs.h"
5779 /* System header to define __stub macros and hopefully few prototypes,
5780     which can conflict with char $ac_func (); below.  */
5781 #include <assert.h>
5782 /* Override any gcc2 internal prototype to avoid an error.  */
5783 #ifdef __cplusplus
5784 extern "C"
5785 #endif
5786 /* We use char because int might match the return type of a gcc2
5787    builtin and then its argument prototype would still apply.  */
5788 char $ac_func ();
5789 char (*f) ();
5790
5791 int
5792 main ()
5793 {
5794 /* The GNU C library defines this for functions which it implements
5795     to always fail with ENOSYS.  Some functions are actually named
5796     something starting with __ and the normal name is an alias.  */
5797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5798 choke me
5799 #else
5800 f = $ac_func;
5801 #endif
5802
5803   ;
5804   return 0;
5805 }
5806 _ACEOF
5807 rm -f conftest.$ac_objext conftest$ac_exeext
5808 if { (eval echo "$as_me:5808: \"$ac_link\"") >&5
5809   (eval $ac_link) 2>&5
5810   ac_status=$?
5811   echo "$as_me:5811: \$? = $ac_status" >&5
5812   (exit $ac_status); } &&
5813          { ac_try='test -s conftest$ac_exeext'
5814   { (eval echo "$as_me:5814: \"$ac_try\"") >&5
5815   (eval $ac_try) 2>&5
5816   ac_status=$?
5817   echo "$as_me:5817: \$? = $ac_status" >&5
5818   (exit $ac_status); }; }; then
5819   eval "$as_ac_var=yes"
5820 else
5821   echo "$as_me: failed program was:" >&5
5822 cat conftest.$ac_ext >&5
5823 eval "$as_ac_var=no"
5824 fi
5825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5826 fi
5827 echo "$as_me:5827: result: `eval echo '${'$as_ac_var'}'`" >&5
5828 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5829 if test `eval echo '${'$as_ac_var'}'` = yes; then
5830   cat >>confdefs.h <<EOF
5831 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5832 EOF
5833
5834 fi
5835 done
5836
5837 if test "$cross_compiling" = yes ; then
5838
5839 for ac_func in \
5840                 link \
5841                 symlink
5842 do
5843 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5844 echo "$as_me:5844: checking for $ac_func" >&5
5845 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5846 if eval "test \"\${$as_ac_var+set}\" = set"; then
5847   echo $ECHO_N "(cached) $ECHO_C" >&6
5848 else
5849   cat >conftest.$ac_ext <<_ACEOF
5850 #line 5850 "configure"
5851 #include "confdefs.h"
5852 /* System header to define __stub macros and hopefully few prototypes,
5853     which can conflict with char $ac_func (); below.  */
5854 #include <assert.h>
5855 /* Override any gcc2 internal prototype to avoid an error.  */
5856 #ifdef __cplusplus
5857 extern "C"
5858 #endif
5859 /* We use char because int might match the return type of a gcc2
5860    builtin and then its argument prototype would still apply.  */
5861 char $ac_func ();
5862 char (*f) ();
5863
5864 int
5865 main ()
5866 {
5867 /* The GNU C library defines this for functions which it implements
5868     to always fail with ENOSYS.  Some functions are actually named
5869     something starting with __ and the normal name is an alias.  */
5870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5871 choke me
5872 #else
5873 f = $ac_func;
5874 #endif
5875
5876   ;
5877   return 0;
5878 }
5879 _ACEOF
5880 rm -f conftest.$ac_objext conftest$ac_exeext
5881 if { (eval echo "$as_me:5881: \"$ac_link\"") >&5
5882   (eval $ac_link) 2>&5
5883   ac_status=$?
5884   echo "$as_me:5884: \$? = $ac_status" >&5
5885   (exit $ac_status); } &&
5886          { ac_try='test -s conftest$ac_exeext'
5887   { (eval echo "$as_me:5887: \"$ac_try\"") >&5
5888   (eval $ac_try) 2>&5
5889   ac_status=$?
5890   echo "$as_me:5890: \$? = $ac_status" >&5
5891   (exit $ac_status); }; }; then
5892   eval "$as_ac_var=yes"
5893 else
5894   echo "$as_me: failed program was:" >&5
5895 cat conftest.$ac_ext >&5
5896 eval "$as_ac_var=no"
5897 fi
5898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5899 fi
5900 echo "$as_me:5900: result: `eval echo '${'$as_ac_var'}'`" >&5
5901 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5902 if test `eval echo '${'$as_ac_var'}'` = yes; then
5903   cat >>confdefs.h <<EOF
5904 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5905 EOF
5906
5907 fi
5908 done
5909
5910 else
5911         echo "$as_me:5911: checking if link/symlink functions work" >&5
5912 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5913 if test "${cf_cv_link_funcs+set}" = set; then
5914   echo $ECHO_N "(cached) $ECHO_C" >&6
5915 else
5916
5917                 cf_cv_link_funcs=
5918                 for cf_func in link symlink ; do
5919                         if test "$cross_compiling" = yes; then
5920
5921                         eval 'ac_cv_func_'$cf_func'=error'
5922 else
5923   cat >conftest.$ac_ext <<_ACEOF
5924 #line 5924 "configure"
5925 #include "confdefs.h"
5926
5927 #include <sys/types.h>
5928 #include <sys/stat.h>
5929 #ifdef HAVE_UNISTD_H
5930 #include <unistd.h>
5931 #endif
5932 int main()
5933 {
5934         int fail = 0;
5935         char *src = "config.log";
5936         char *dst = "conftest.chk";
5937         struct stat src_sb;
5938         struct stat dst_sb;
5939
5940         stat(src, &src_sb);
5941         fail = ($cf_func("config.log", "conftest.chk") < 0)
5942             || (stat(dst, &dst_sb) < 0)
5943             || (dst_sb.st_mtime != src_sb.st_mtime);
5944 #ifdef HAVE_UNLINK
5945         unlink(dst);
5946 #else
5947         remove(dst);
5948 #endif
5949         ${cf_cv_main_return:-return} (fail);
5950 }
5951
5952 _ACEOF
5953 rm -f conftest$ac_exeext
5954 if { (eval echo "$as_me:5954: \"$ac_link\"") >&5
5955   (eval $ac_link) 2>&5
5956   ac_status=$?
5957   echo "$as_me:5957: \$? = $ac_status" >&5
5958   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5959   { (eval echo "$as_me:5959: \"$ac_try\"") >&5
5960   (eval $ac_try) 2>&5
5961   ac_status=$?
5962   echo "$as_me:5962: \$? = $ac_status" >&5
5963   (exit $ac_status); }; }; then
5964
5965                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5966                         eval 'ac_cv_func_'$cf_func'=yes'
5967 else
5968   echo "$as_me: program exited with status $ac_status" >&5
5969 echo "$as_me: failed program was:" >&5
5970 cat conftest.$ac_ext >&5
5971
5972                         eval 'ac_cv_func_'$cf_func'=no'
5973 fi
5974 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5975 fi
5976                 done
5977                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5978
5979 fi
5980 echo "$as_me:5980: result: $cf_cv_link_funcs" >&5
5981 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5982         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5983 #define HAVE_LINK 1
5984 EOF
5985
5986         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5987 #define HAVE_SYMLINK 1
5988 EOF
5989
5990 fi
5991
5992 with_links=no
5993 with_symlinks=no
5994
5995 # soft links (symbolic links) are useful for some systems where hard links do
5996 # not work, or to make it simpler to copy terminfo trees around.
5997 if test "$ac_cv_func_symlink" = yes ; then
5998     echo "$as_me:5998: checking if tic should use symbolic links" >&5
5999 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6000
6001 # Check whether --enable-symlinks or --disable-symlinks was given.
6002 if test "${enable_symlinks+set}" = set; then
6003   enableval="$enable_symlinks"
6004   with_symlinks=$enableval
6005 else
6006   with_symlinks=no
6007 fi;
6008     echo "$as_me:6008: result: $with_symlinks" >&5
6009 echo "${ECHO_T}$with_symlinks" >&6
6010 fi
6011
6012 # If we have hard links and did not choose to use soft links instead, there is
6013 # no reason to make this choice optional - use the hard links.
6014 if test "$with_symlinks" = no ; then
6015     echo "$as_me:6015: checking if tic should use hard links" >&5
6016 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6017     if test "$ac_cv_func_link" = yes ; then
6018         with_links=yes
6019     else
6020         with_links=no
6021     fi
6022     echo "$as_me:6022: result: $with_links" >&5
6023 echo "${ECHO_T}$with_links" >&6
6024 fi
6025
6026 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6027 #define USE_LINKS 1
6028 EOF
6029
6030 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6031 #define USE_SYMLINKS 1
6032 EOF
6033
6034 ###   use option --enable-broken-linker to force on use of broken-linker support
6035 echo "$as_me:6035: checking if you want broken-linker support code" >&5
6036 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6037
6038 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6039 if test "${enable_broken_linker+set}" = set; then
6040   enableval="$enable_broken_linker"
6041   with_broken_linker=$enableval
6042 else
6043   with_broken_linker=${BROKEN_LINKER-no}
6044 fi;
6045 echo "$as_me:6045: result: $with_broken_linker" >&5
6046 echo "${ECHO_T}$with_broken_linker" >&6
6047
6048 BROKEN_LINKER=0
6049 if test "$with_broken_linker" = yes ; then
6050         cat >>confdefs.h <<\EOF
6051 #define BROKEN_LINKER 1
6052 EOF
6053
6054         BROKEN_LINKER=1
6055 elif test "$DFT_LWR_MODEL" = shared ; then
6056         case $cf_cv_system_name in #(vi
6057         cygwin*)
6058                 cat >>confdefs.h <<\EOF
6059 #define BROKEN_LINKER 1
6060 EOF
6061
6062                 BROKEN_LINKER=1
6063                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6064
6065                 ;;
6066         esac
6067 fi
6068
6069 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6070 echo "$as_me:6070: checking if tputs should process BSD-style prefix padding" >&5
6071 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6072
6073 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6074 if test "${enable_bsdpad+set}" = set; then
6075   enableval="$enable_bsdpad"
6076   with_bsdpad=$enableval
6077 else
6078   with_bsdpad=no
6079 fi;
6080 echo "$as_me:6080: result: $with_bsdpad" >&5
6081 echo "${ECHO_T}$with_bsdpad" >&6
6082 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6083 #define BSD_TPUTS 1
6084 EOF
6085
6086 ###   use option --enable-widec to turn on use of wide-character support
6087 NCURSES_CH_T=chtype
6088 NCURSES_LIBUTF8=0
6089
6090 NEED_WCHAR_H=0
6091 NCURSES_MBSTATE_T=0
6092 NCURSES_WCHAR_T=0
6093 NCURSES_WINT_T=0
6094
6095 # Check to define _XOPEN_SOURCE "automatically"
6096
6097 echo "$as_me:6097: checking if $CC -U and -D options work together" >&5
6098 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6099 if test "${cf_cv_cc_u_d_options+set}" = set; then
6100   echo $ECHO_N "(cached) $ECHO_C" >&6
6101 else
6102
6103         cf_save_CPPFLAGS="$CPPFLAGS"
6104         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6105         cat >conftest.$ac_ext <<_ACEOF
6106 #line 6106 "configure"
6107 #include "confdefs.h"
6108
6109 int
6110 main ()
6111 {
6112
6113 #ifndef U_D_OPTIONS
6114 make an undefined-error
6115 #endif
6116 #ifdef  D_U_OPTIONS
6117 make a defined-error
6118 #endif
6119
6120   ;
6121   return 0;
6122 }
6123 _ACEOF
6124 rm -f conftest.$ac_objext
6125 if { (eval echo "$as_me:6125: \"$ac_compile\"") >&5
6126   (eval $ac_compile) 2>&5
6127   ac_status=$?
6128   echo "$as_me:6128: \$? = $ac_status" >&5
6129   (exit $ac_status); } &&
6130          { ac_try='test -s conftest.$ac_objext'
6131   { (eval echo "$as_me:6131: \"$ac_try\"") >&5
6132   (eval $ac_try) 2>&5
6133   ac_status=$?
6134   echo "$as_me:6134: \$? = $ac_status" >&5
6135   (exit $ac_status); }; }; then
6136
6137         cf_cv_cc_u_d_options=yes
6138 else
6139   echo "$as_me: failed program was:" >&5
6140 cat conftest.$ac_ext >&5
6141
6142         cf_cv_cc_u_d_options=no
6143 fi
6144 rm -f conftest.$ac_objext conftest.$ac_ext
6145         CPPFLAGS="$cf_save_CPPFLAGS"
6146
6147 fi
6148 echo "$as_me:6148: result: $cf_cv_cc_u_d_options" >&5
6149 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6150
6151 cf_XOPEN_SOURCE=500
6152 cf_POSIX_C_SOURCE=199506L
6153
6154 case $host_os in #(vi
6155 aix[45]*) #(vi
6156         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6157         ;;
6158 freebsd*) #(vi
6159         # 5.x headers associate
6160         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6161         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6162         cf_POSIX_C_SOURCE=200112L
6163         cf_XOPEN_SOURCE=600
6164         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6165         ;;
6166 hpux*) #(vi
6167         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6168         ;;
6169 irix[56].*) #(vi
6170         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6171         ;;
6172 linux*|gnu*|k*bsd*-gnu) #(vi
6173
6174 echo "$as_me:6174: checking if we must define _GNU_SOURCE" >&5
6175 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6176 if test "${cf_cv_gnu_source+set}" = set; then
6177   echo $ECHO_N "(cached) $ECHO_C" >&6
6178 else
6179
6180 cat >conftest.$ac_ext <<_ACEOF
6181 #line 6181 "configure"
6182 #include "confdefs.h"
6183 #include <sys/types.h>
6184 int
6185 main ()
6186 {
6187
6188 #ifndef _XOPEN_SOURCE
6189 make an error
6190 #endif
6191   ;
6192   return 0;
6193 }
6194 _ACEOF
6195 rm -f conftest.$ac_objext
6196 if { (eval echo "$as_me:6196: \"$ac_compile\"") >&5
6197   (eval $ac_compile) 2>&5
6198   ac_status=$?
6199   echo "$as_me:6199: \$? = $ac_status" >&5
6200   (exit $ac_status); } &&
6201          { ac_try='test -s conftest.$ac_objext'
6202   { (eval echo "$as_me:6202: \"$ac_try\"") >&5
6203   (eval $ac_try) 2>&5
6204   ac_status=$?
6205   echo "$as_me:6205: \$? = $ac_status" >&5
6206   (exit $ac_status); }; }; then
6207   cf_cv_gnu_source=no
6208 else
6209   echo "$as_me: failed program was:" >&5
6210 cat conftest.$ac_ext >&5
6211 cf_save="$CPPFLAGS"
6212          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6213          cat >conftest.$ac_ext <<_ACEOF
6214 #line 6214 "configure"
6215 #include "confdefs.h"
6216 #include <sys/types.h>
6217 int
6218 main ()
6219 {
6220
6221 #ifdef _XOPEN_SOURCE
6222 make an error
6223 #endif
6224   ;
6225   return 0;
6226 }
6227 _ACEOF
6228 rm -f conftest.$ac_objext
6229 if { (eval echo "$as_me:6229: \"$ac_compile\"") >&5
6230   (eval $ac_compile) 2>&5
6231   ac_status=$?
6232   echo "$as_me:6232: \$? = $ac_status" >&5
6233   (exit $ac_status); } &&
6234          { ac_try='test -s conftest.$ac_objext'
6235   { (eval echo "$as_me:6235: \"$ac_try\"") >&5
6236   (eval $ac_try) 2>&5
6237   ac_status=$?
6238   echo "$as_me:6238: \$? = $ac_status" >&5
6239   (exit $ac_status); }; }; then
6240   cf_cv_gnu_source=no
6241 else
6242   echo "$as_me: failed program was:" >&5
6243 cat conftest.$ac_ext >&5
6244 cf_cv_gnu_source=yes
6245 fi
6246 rm -f conftest.$ac_objext conftest.$ac_ext
6247         CPPFLAGS="$cf_save"
6248
6249 fi
6250 rm -f conftest.$ac_objext conftest.$ac_ext
6251
6252 fi
6253 echo "$as_me:6253: result: $cf_cv_gnu_source" >&5
6254 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6255 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6256
6257         ;;
6258 mirbsd*) #(vi
6259         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6260         ;;
6261 netbsd*) #(vi
6262         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6263         ;;
6264 openbsd*) #(vi
6265         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6266         ;;
6267 osf[45]*) #(vi
6268         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6269         ;;
6270 nto-qnx*) #(vi
6271         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6272         ;;
6273 sco*) #(vi
6274         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6275         ;;
6276 solaris*) #(vi
6277         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6278         ;;
6279 *)
6280         echo "$as_me:6280: checking if we should define _XOPEN_SOURCE" >&5
6281 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6282 if test "${cf_cv_xopen_source+set}" = set; then
6283   echo $ECHO_N "(cached) $ECHO_C" >&6
6284 else
6285
6286         cat >conftest.$ac_ext <<_ACEOF
6287 #line 6287 "configure"
6288 #include "confdefs.h"
6289 #include <sys/types.h>
6290 int
6291 main ()
6292 {
6293
6294 #ifndef _XOPEN_SOURCE
6295 make an error
6296 #endif
6297   ;
6298   return 0;
6299 }
6300 _ACEOF
6301 rm -f conftest.$ac_objext
6302 if { (eval echo "$as_me:6302: \"$ac_compile\"") >&5
6303   (eval $ac_compile) 2>&5
6304   ac_status=$?
6305   echo "$as_me:6305: \$? = $ac_status" >&5
6306   (exit $ac_status); } &&
6307          { ac_try='test -s conftest.$ac_objext'
6308   { (eval echo "$as_me:6308: \"$ac_try\"") >&5
6309   (eval $ac_try) 2>&5
6310   ac_status=$?
6311   echo "$as_me:6311: \$? = $ac_status" >&5
6312   (exit $ac_status); }; }; then
6313   cf_cv_xopen_source=no
6314 else
6315   echo "$as_me: failed program was:" >&5
6316 cat conftest.$ac_ext >&5
6317 cf_save="$CPPFLAGS"
6318          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6319          cat >conftest.$ac_ext <<_ACEOF
6320 #line 6320 "configure"
6321 #include "confdefs.h"
6322 #include <sys/types.h>
6323 int
6324 main ()
6325 {
6326
6327 #ifdef _XOPEN_SOURCE
6328 make an error
6329 #endif
6330   ;
6331   return 0;
6332 }
6333 _ACEOF
6334 rm -f conftest.$ac_objext
6335 if { (eval echo "$as_me:6335: \"$ac_compile\"") >&5
6336   (eval $ac_compile) 2>&5
6337   ac_status=$?
6338   echo "$as_me:6338: \$? = $ac_status" >&5
6339   (exit $ac_status); } &&
6340          { ac_try='test -s conftest.$ac_objext'
6341   { (eval echo "$as_me:6341: \"$ac_try\"") >&5
6342   (eval $ac_try) 2>&5
6343   ac_status=$?
6344   echo "$as_me:6344: \$? = $ac_status" >&5
6345   (exit $ac_status); }; }; then
6346   cf_cv_xopen_source=no
6347 else
6348   echo "$as_me: failed program was:" >&5
6349 cat conftest.$ac_ext >&5
6350 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6351 fi
6352 rm -f conftest.$ac_objext conftest.$ac_ext
6353         CPPFLAGS="$cf_save"
6354
6355 fi
6356 rm -f conftest.$ac_objext conftest.$ac_ext
6357
6358 fi
6359 echo "$as_me:6359: result: $cf_cv_xopen_source" >&5
6360 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6361         if test "$cf_cv_xopen_source" != no ; then
6362
6363 # remove _XOPEN_SOURCE symbol from $CFLAGS
6364 CFLAGS=`echo "$CFLAGS" | \
6365         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6366                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6367
6368 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6369 CPPFLAGS=`echo "$CPPFLAGS" | \
6370         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6371                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6372
6373                 test "$cf_cv_cc_u_d_options" = yes && \
6374                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6375                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6376         fi
6377
6378 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6379
6380 cf_save_CFLAGS="$CFLAGS"
6381 cf_save_CPPFLAGS="$CPPFLAGS"
6382
6383 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6384 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6385         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6386                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6387
6388 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6389 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6390         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6391                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6392
6393 echo "$as_me:6393: checking if we should define _POSIX_C_SOURCE" >&5
6394 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6395 if test "${cf_cv_posix_c_source+set}" = set; then
6396   echo $ECHO_N "(cached) $ECHO_C" >&6
6397 else
6398
6399 echo "(line 6399) testing if the symbol is already defined go no further ..." 1>&5
6400
6401         cat >conftest.$ac_ext <<_ACEOF
6402 #line 6402 "configure"
6403 #include "confdefs.h"
6404 #include <sys/types.h>
6405 int
6406 main ()
6407 {
6408
6409 #ifndef _POSIX_C_SOURCE
6410 make an error
6411 #endif
6412   ;
6413   return 0;
6414 }
6415 _ACEOF
6416 rm -f conftest.$ac_objext
6417 if { (eval echo "$as_me:6417: \"$ac_compile\"") >&5
6418   (eval $ac_compile) 2>&5
6419   ac_status=$?
6420   echo "$as_me:6420: \$? = $ac_status" >&5
6421   (exit $ac_status); } &&
6422          { ac_try='test -s conftest.$ac_objext'
6423   { (eval echo "$as_me:6423: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:6426: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   cf_cv_posix_c_source=no
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 cat conftest.$ac_ext >&5
6432 cf_want_posix_source=no
6433          case .$cf_POSIX_C_SOURCE in #(vi
6434          .[12]??*) #(vi
6435                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6436                 ;;
6437          .2) #(vi
6438                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6439                 cf_want_posix_source=yes
6440                 ;;
6441          .*)
6442                 cf_want_posix_source=yes
6443                 ;;
6444          esac
6445          if test "$cf_want_posix_source" = yes ; then
6446                 cat >conftest.$ac_ext <<_ACEOF
6447 #line 6447 "configure"
6448 #include "confdefs.h"
6449 #include <sys/types.h>
6450 int
6451 main ()
6452 {
6453
6454 #ifdef _POSIX_SOURCE
6455 make an error
6456 #endif
6457   ;
6458   return 0;
6459 }
6460 _ACEOF
6461 rm -f conftest.$ac_objext
6462 if { (eval echo "$as_me:6462: \"$ac_compile\"") >&5
6463   (eval $ac_compile) 2>&5
6464   ac_status=$?
6465   echo "$as_me:6465: \$? = $ac_status" >&5
6466   (exit $ac_status); } &&
6467          { ac_try='test -s conftest.$ac_objext'
6468   { (eval echo "$as_me:6468: \"$ac_try\"") >&5
6469   (eval $ac_try) 2>&5
6470   ac_status=$?
6471   echo "$as_me:6471: \$? = $ac_status" >&5
6472   (exit $ac_status); }; }; then
6473   :
6474 else
6475   echo "$as_me: failed program was:" >&5
6476 cat conftest.$ac_ext >&5
6477 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6478 fi
6479 rm -f conftest.$ac_objext conftest.$ac_ext
6480          fi
6481
6482 echo "(line 6482) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6483
6484          CFLAGS="$cf_trim_CFLAGS"
6485          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6486
6487 echo "(line 6487) testing if the second compile does not leave our definition intact error ..." 1>&5
6488
6489          cat >conftest.$ac_ext <<_ACEOF
6490 #line 6490 "configure"
6491 #include "confdefs.h"
6492 #include <sys/types.h>
6493 int
6494 main ()
6495 {
6496
6497 #ifndef _POSIX_C_SOURCE
6498 make an error
6499 #endif
6500   ;
6501   return 0;
6502 }
6503 _ACEOF
6504 rm -f conftest.$ac_objext
6505 if { (eval echo "$as_me:6505: \"$ac_compile\"") >&5
6506   (eval $ac_compile) 2>&5
6507   ac_status=$?
6508   echo "$as_me:6508: \$? = $ac_status" >&5
6509   (exit $ac_status); } &&
6510          { ac_try='test -s conftest.$ac_objext'
6511   { (eval echo "$as_me:6511: \"$ac_try\"") >&5
6512   (eval $ac_try) 2>&5
6513   ac_status=$?
6514   echo "$as_me:6514: \$? = $ac_status" >&5
6515   (exit $ac_status); }; }; then
6516   :
6517 else
6518   echo "$as_me: failed program was:" >&5
6519 cat conftest.$ac_ext >&5
6520 cf_cv_posix_c_source=no
6521 fi
6522 rm -f conftest.$ac_objext conftest.$ac_ext
6523          CFLAGS="$cf_save_CFLAGS"
6524          CPPFLAGS="$cf_save_CPPFLAGS"
6525
6526 fi
6527 rm -f conftest.$ac_objext conftest.$ac_ext
6528
6529 fi
6530 echo "$as_me:6530: result: $cf_cv_posix_c_source" >&5
6531 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6532
6533 if test "$cf_cv_posix_c_source" != no ; then
6534         CFLAGS="$cf_trim_CFLAGS"
6535         CPPFLAGS="$cf_trim_CPPFLAGS"
6536         if test "$cf_cv_cc_u_d_options" = yes ; then
6537                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6538                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6539                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6540         fi
6541         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6542 fi
6543
6544         ;;
6545 esac
6546
6547 # Work around breakage on OS X
6548
6549 echo "$as_me:6549: checking if SIGWINCH is defined" >&5
6550 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6551 if test "${cf_cv_define_sigwinch+set}" = set; then
6552   echo $ECHO_N "(cached) $ECHO_C" >&6
6553 else
6554
6555         cat >conftest.$ac_ext <<_ACEOF
6556 #line 6556 "configure"
6557 #include "confdefs.h"
6558
6559 #include <sys/types.h>
6560 #include <sys/signal.h>
6561
6562 int
6563 main ()
6564 {
6565 int x = SIGWINCH
6566   ;
6567   return 0;
6568 }
6569 _ACEOF
6570 rm -f conftest.$ac_objext
6571 if { (eval echo "$as_me:6571: \"$ac_compile\"") >&5
6572   (eval $ac_compile) 2>&5
6573   ac_status=$?
6574   echo "$as_me:6574: \$? = $ac_status" >&5
6575   (exit $ac_status); } &&
6576          { ac_try='test -s conftest.$ac_objext'
6577   { (eval echo "$as_me:6577: \"$ac_try\"") >&5
6578   (eval $ac_try) 2>&5
6579   ac_status=$?
6580   echo "$as_me:6580: \$? = $ac_status" >&5
6581   (exit $ac_status); }; }; then
6582   cf_cv_define_sigwinch=yes
6583 else
6584   echo "$as_me: failed program was:" >&5
6585 cat conftest.$ac_ext >&5
6586 cat >conftest.$ac_ext <<_ACEOF
6587 #line 6587 "configure"
6588 #include "confdefs.h"
6589
6590 #undef _XOPEN_SOURCE
6591 #undef _POSIX_SOURCE
6592 #undef _POSIX_C_SOURCE
6593 #include <sys/types.h>
6594 #include <sys/signal.h>
6595
6596 int
6597 main ()
6598 {
6599 int x = SIGWINCH
6600   ;
6601   return 0;
6602 }
6603 _ACEOF
6604 rm -f conftest.$ac_objext
6605 if { (eval echo "$as_me:6605: \"$ac_compile\"") >&5
6606   (eval $ac_compile) 2>&5
6607   ac_status=$?
6608   echo "$as_me:6608: \$? = $ac_status" >&5
6609   (exit $ac_status); } &&
6610          { ac_try='test -s conftest.$ac_objext'
6611   { (eval echo "$as_me:6611: \"$ac_try\"") >&5
6612   (eval $ac_try) 2>&5
6613   ac_status=$?
6614   echo "$as_me:6614: \$? = $ac_status" >&5
6615   (exit $ac_status); }; }; then
6616   cf_cv_define_sigwinch=maybe
6617 else
6618   echo "$as_me: failed program was:" >&5
6619 cat conftest.$ac_ext >&5
6620 cf_cv_define_sigwinch=no
6621 fi
6622 rm -f conftest.$ac_objext conftest.$ac_ext
6623
6624 fi
6625 rm -f conftest.$ac_objext conftest.$ac_ext
6626
6627 fi
6628 echo "$as_me:6628: result: $cf_cv_define_sigwinch" >&5
6629 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6630
6631 if test "$cf_cv_define_sigwinch" = maybe ; then
6632 echo "$as_me:6632: checking for actual SIGWINCH definition" >&5
6633 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6634 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6635   echo $ECHO_N "(cached) $ECHO_C" >&6
6636 else
6637
6638 cf_cv_fixup_sigwinch=unknown
6639 cf_sigwinch=32
6640 while test $cf_sigwinch != 1
6641 do
6642         cat >conftest.$ac_ext <<_ACEOF
6643 #line 6643 "configure"
6644 #include "confdefs.h"
6645
6646 #undef _XOPEN_SOURCE
6647 #undef _POSIX_SOURCE
6648 #undef _POSIX_C_SOURCE
6649 #include <sys/types.h>
6650 #include <sys/signal.h>
6651
6652 int
6653 main ()
6654 {
6655
6656 #if SIGWINCH != $cf_sigwinch
6657 make an error
6658 #endif
6659 int x = SIGWINCH
6660   ;
6661   return 0;
6662 }
6663 _ACEOF
6664 rm -f conftest.$ac_objext
6665 if { (eval echo "$as_me:6665: \"$ac_compile\"") >&5
6666   (eval $ac_compile) 2>&5
6667   ac_status=$?
6668   echo "$as_me:6668: \$? = $ac_status" >&5
6669   (exit $ac_status); } &&
6670          { ac_try='test -s conftest.$ac_objext'
6671   { (eval echo "$as_me:6671: \"$ac_try\"") >&5
6672   (eval $ac_try) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit $ac_status); }; }; then
6676   cf_cv_fixup_sigwinch=$cf_sigwinch
6677          break
6678 else
6679   echo "$as_me: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6681 fi
6682 rm -f conftest.$ac_objext conftest.$ac_ext
6683
6684 cf_sigwinch=`expr $cf_sigwinch - 1`
6685 done
6686
6687 fi
6688 echo "$as_me:6688: result: $cf_cv_fixup_sigwinch" >&5
6689 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6690
6691         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6692                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6693         fi
6694 fi
6695
6696 # Checks for CODESET support.
6697
6698   echo "$as_me:6698: checking for nl_langinfo and CODESET" >&5
6699 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6700 if test "${am_cv_langinfo_codeset+set}" = set; then
6701   echo $ECHO_N "(cached) $ECHO_C" >&6
6702 else
6703   cat >conftest.$ac_ext <<_ACEOF
6704 #line 6704 "configure"
6705 #include "confdefs.h"
6706 #include <langinfo.h>
6707 int
6708 main ()
6709 {
6710 char* cs = nl_langinfo(CODESET);
6711   ;
6712   return 0;
6713 }
6714 _ACEOF
6715 rm -f conftest.$ac_objext conftest$ac_exeext
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717   (eval $ac_link) 2>&5
6718   ac_status=$?
6719   echo "$as_me:6719: \$? = $ac_status" >&5
6720   (exit $ac_status); } &&
6721          { ac_try='test -s conftest$ac_exeext'
6722   { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6723   (eval $ac_try) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit $ac_status); }; }; then
6727   am_cv_langinfo_codeset=yes
6728 else
6729   echo "$as_me: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 am_cv_langinfo_codeset=no
6732 fi
6733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6734
6735 fi
6736 echo "$as_me:6736: result: $am_cv_langinfo_codeset" >&5
6737 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6738   if test $am_cv_langinfo_codeset = yes; then
6739
6740 cat >>confdefs.h <<\EOF
6741 #define HAVE_LANGINFO_CODESET 1
6742 EOF
6743
6744   fi
6745
6746 # use these variables to work around a defect in gcc's fixincludes.
6747 NCURSES_OK_WCHAR_T=
6748 NCURSES_OK_WINT_T=
6749
6750 echo "$as_me:6750: checking if you want wide-character code" >&5
6751 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6752
6753 # Check whether --enable-widec or --disable-widec was given.
6754 if test "${enable_widec+set}" = set; then
6755   enableval="$enable_widec"
6756   with_widec=$enableval
6757 else
6758   with_widec=no
6759 fi;
6760 echo "$as_me:6760: result: $with_widec" >&5
6761 echo "${ECHO_T}$with_widec" >&6
6762 if test "$with_widec" = yes ; then
6763         LIB_SUFFIX="w${LIB_SUFFIX}"
6764         cat >>confdefs.h <<\EOF
6765 #define USE_WIDEC_SUPPORT 1
6766 EOF
6767
6768 echo "$as_me:6768: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6769 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6770 cat >conftest.$ac_ext <<_ACEOF
6771 #line 6771 "configure"
6772 #include "confdefs.h"
6773 #include <sys/types.h>
6774
6775 int
6776 main ()
6777 {
6778
6779 #ifndef _XOPEN_SOURCE_EXTENDED
6780 make an error
6781 #endif
6782   ;
6783   return 0;
6784 }
6785 _ACEOF
6786 rm -f conftest.$ac_objext
6787 if { (eval echo "$as_me:6787: \"$ac_compile\"") >&5
6788   (eval $ac_compile) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit $ac_status); } &&
6792          { ac_try='test -s conftest.$ac_objext'
6793   { (eval echo "$as_me:6793: \"$ac_try\"") >&5
6794   (eval $ac_try) 2>&5
6795   ac_status=$?
6796   echo "$as_me:6796: \$? = $ac_status" >&5
6797   (exit $ac_status); }; }; then
6798   cf_result=no
6799 else
6800   echo "$as_me: failed program was:" >&5
6801 cat conftest.$ac_ext >&5
6802 cf_result=yes
6803 fi
6804 rm -f conftest.$ac_objext conftest.$ac_ext
6805 echo "$as_me:6805: result: $cf_result" >&5
6806 echo "${ECHO_T}$cf_result" >&6
6807
6808 if test "$cf_result" = yes ; then
6809         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6810 elif test "x" != "x" ; then
6811         echo "$as_me:6811: checking checking for compatible value versus " >&5
6812 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6813         cat >conftest.$ac_ext <<_ACEOF
6814 #line 6814 "configure"
6815 #include "confdefs.h"
6816 #include <sys/types.h>
6817
6818 int
6819 main ()
6820 {
6821
6822 #if _XOPEN_SOURCE_EXTENDED- < 0
6823 make an error
6824 #endif
6825   ;
6826   return 0;
6827 }
6828 _ACEOF
6829 rm -f conftest.$ac_objext
6830 if { (eval echo "$as_me:6830: \"$ac_compile\"") >&5
6831   (eval $ac_compile) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); } &&
6835          { ac_try='test -s conftest.$ac_objext'
6836   { (eval echo "$as_me:6836: \"$ac_try\"") >&5
6837   (eval $ac_try) 2>&5
6838   ac_status=$?
6839   echo "$as_me:6839: \$? = $ac_status" >&5
6840   (exit $ac_status); }; }; then
6841   cf_result=yes
6842 else
6843   echo "$as_me: failed program was:" >&5
6844 cat conftest.$ac_ext >&5
6845 cf_result=no
6846 fi
6847 rm -f conftest.$ac_objext conftest.$ac_ext
6848         echo "$as_me:6848: result: $cf_result" >&5
6849 echo "${ECHO_T}$cf_result" >&6
6850         if test "$cf_result" = no ; then
6851                 # perhaps we can override it - try...
6852                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6853         fi
6854 fi
6855
6856         # with_overwrite=no
6857         NCURSES_CH_T=cchar_t
6858
6859 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6860 do
6861 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6862 echo "$as_me:6862: checking for $ac_func" >&5
6863 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6864 if eval "test \"\${$as_ac_var+set}\" = set"; then
6865   echo $ECHO_N "(cached) $ECHO_C" >&6
6866 else
6867   cat >conftest.$ac_ext <<_ACEOF
6868 #line 6868 "configure"
6869 #include "confdefs.h"
6870 /* System header to define __stub macros and hopefully few prototypes,
6871     which can conflict with char $ac_func (); below.  */
6872 #include <assert.h>
6873 /* Override any gcc2 internal prototype to avoid an error.  */
6874 #ifdef __cplusplus
6875 extern "C"
6876 #endif
6877 /* We use char because int might match the return type of a gcc2
6878    builtin and then its argument prototype would still apply.  */
6879 char $ac_func ();
6880 char (*f) ();
6881
6882 int
6883 main ()
6884 {
6885 /* The GNU C library defines this for functions which it implements
6886     to always fail with ENOSYS.  Some functions are actually named
6887     something starting with __ and the normal name is an alias.  */
6888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6889 choke me
6890 #else
6891 f = $ac_func;
6892 #endif
6893
6894   ;
6895   return 0;
6896 }
6897 _ACEOF
6898 rm -f conftest.$ac_objext conftest$ac_exeext
6899 if { (eval echo "$as_me:6899: \"$ac_link\"") >&5
6900   (eval $ac_link) 2>&5
6901   ac_status=$?
6902   echo "$as_me:6902: \$? = $ac_status" >&5
6903   (exit $ac_status); } &&
6904          { ac_try='test -s conftest$ac_exeext'
6905   { (eval echo "$as_me:6905: \"$ac_try\"") >&5
6906   (eval $ac_try) 2>&5
6907   ac_status=$?
6908   echo "$as_me:6908: \$? = $ac_status" >&5
6909   (exit $ac_status); }; }; then
6910   eval "$as_ac_var=yes"
6911 else
6912   echo "$as_me: failed program was:" >&5
6913 cat conftest.$ac_ext >&5
6914 eval "$as_ac_var=no"
6915 fi
6916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6917 fi
6918 echo "$as_me:6918: result: `eval echo '${'$as_ac_var'}'`" >&5
6919 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6920 if test `eval echo '${'$as_ac_var'}'` = yes; then
6921   cat >>confdefs.h <<EOF
6922 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6923 EOF
6924
6925 fi
6926 done
6927
6928         if test "$ac_cv_func_putwc" != yes ; then
6929
6930 echo "$as_me:6930: checking for putwc in libutf8" >&5
6931 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6932 if test "${cf_cv_libutf8+set}" = set; then
6933   echo $ECHO_N "(cached) $ECHO_C" >&6
6934 else
6935
6936         cf_save_LIBS="$LIBS"
6937         LIBS="-lutf8 $LIBS"
6938 cat >conftest.$ac_ext <<_ACEOF
6939 #line 6939 "configure"
6940 #include "confdefs.h"
6941
6942 #include <libutf8.h>
6943 int
6944 main ()
6945 {
6946 putwc(0,0);
6947   ;
6948   return 0;
6949 }
6950 _ACEOF
6951 rm -f conftest.$ac_objext conftest$ac_exeext
6952 if { (eval echo "$as_me:6952: \"$ac_link\"") >&5
6953   (eval $ac_link) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit $ac_status); } &&
6957          { ac_try='test -s conftest$ac_exeext'
6958   { (eval echo "$as_me:6958: \"$ac_try\"") >&5
6959   (eval $ac_try) 2>&5
6960   ac_status=$?
6961   echo "$as_me:6961: \$? = $ac_status" >&5
6962   (exit $ac_status); }; }; then
6963   cf_cv_libutf8=yes
6964 else
6965   echo "$as_me: failed program was:" >&5
6966 cat conftest.$ac_ext >&5
6967 cf_cv_libutf8=no
6968 fi
6969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6970         LIBS="$cf_save_LIBS"
6971
6972 fi
6973 echo "$as_me:6973: result: $cf_cv_libutf8" >&5
6974 echo "${ECHO_T}$cf_cv_libutf8" >&6
6975
6976 if test "$cf_cv_libutf8" = yes ; then
6977         cat >>confdefs.h <<\EOF
6978 #define HAVE_LIBUTF8_H 1
6979 EOF
6980
6981         LIBS="-lutf8 $LIBS"
6982 fi
6983
6984                 if test "$cf_cv_libutf8" = yes ; then
6985                         NCURSES_LIBUTF8=1
6986                 fi
6987         fi
6988
6989 # This is needed on Tru64 5.0 to declare mbstate_t
6990 echo "$as_me:6990: checking if we must include wchar.h to declare mbstate_t" >&5
6991 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6992 if test "${cf_cv_mbstate_t+set}" = set; then
6993   echo $ECHO_N "(cached) $ECHO_C" >&6
6994 else
6995
6996 cat >conftest.$ac_ext <<_ACEOF
6997 #line 6997 "configure"
6998 #include "confdefs.h"
6999
7000 #include <stdlib.h>
7001 #include <stdarg.h>
7002 #include <stdio.h>
7003 #ifdef HAVE_LIBUTF8_H
7004 #include <libutf8.h>
7005 #endif
7006 int
7007 main ()
7008 {
7009 mbstate_t state
7010   ;
7011   return 0;
7012 }
7013 _ACEOF
7014 rm -f conftest.$ac_objext
7015 if { (eval echo "$as_me:7015: \"$ac_compile\"") >&5
7016   (eval $ac_compile) 2>&5
7017   ac_status=$?
7018   echo "$as_me:7018: \$? = $ac_status" >&5
7019   (exit $ac_status); } &&
7020          { ac_try='test -s conftest.$ac_objext'
7021   { (eval echo "$as_me:7021: \"$ac_try\"") >&5
7022   (eval $ac_try) 2>&5
7023   ac_status=$?
7024   echo "$as_me:7024: \$? = $ac_status" >&5
7025   (exit $ac_status); }; }; then
7026   cf_cv_mbstate_t=no
7027 else
7028   echo "$as_me: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7030 cat >conftest.$ac_ext <<_ACEOF
7031 #line 7031 "configure"
7032 #include "confdefs.h"
7033
7034 #include <stdlib.h>
7035 #include <stdarg.h>
7036 #include <stdio.h>
7037 #include <wchar.h>
7038 #ifdef HAVE_LIBUTF8_H
7039 #include <libutf8.h>
7040 #endif
7041 int
7042 main ()
7043 {
7044 mbstate_t value
7045   ;
7046   return 0;
7047 }
7048 _ACEOF
7049 rm -f conftest.$ac_objext
7050 if { (eval echo "$as_me:7050: \"$ac_compile\"") >&5
7051   (eval $ac_compile) 2>&5
7052   ac_status=$?
7053   echo "$as_me:7053: \$? = $ac_status" >&5
7054   (exit $ac_status); } &&
7055          { ac_try='test -s conftest.$ac_objext'
7056   { (eval echo "$as_me:7056: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:7059: \$? = $ac_status" >&5
7060   (exit $ac_status); }; }; then
7061   cf_cv_mbstate_t=yes
7062 else
7063   echo "$as_me: failed program was:" >&5
7064 cat conftest.$ac_ext >&5
7065 cf_cv_mbstate_t=unknown
7066 fi
7067 rm -f conftest.$ac_objext conftest.$ac_ext
7068 fi
7069 rm -f conftest.$ac_objext conftest.$ac_ext
7070 fi
7071 echo "$as_me:7071: result: $cf_cv_mbstate_t" >&5
7072 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7073
7074 if test "$cf_cv_mbstate_t" = yes ; then
7075         cat >>confdefs.h <<\EOF
7076 #define NEED_WCHAR_H 1
7077 EOF
7078
7079         NEED_WCHAR_H=1
7080 fi
7081
7082 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7083 if test "$cf_cv_mbstate_t" = unknown ; then
7084         NCURSES_MBSTATE_T=1
7085 fi
7086
7087 # This is needed on Tru64 5.0 to declare wchar_t
7088 echo "$as_me:7088: checking if we must include wchar.h to declare wchar_t" >&5
7089 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7090 if test "${cf_cv_wchar_t+set}" = set; then
7091   echo $ECHO_N "(cached) $ECHO_C" >&6
7092 else
7093
7094 cat >conftest.$ac_ext <<_ACEOF
7095 #line 7095 "configure"
7096 #include "confdefs.h"
7097
7098 #include <stdlib.h>
7099 #include <stdarg.h>
7100 #include <stdio.h>
7101 #ifdef HAVE_LIBUTF8_H
7102 #include <libutf8.h>
7103 #endif
7104 int
7105 main ()
7106 {
7107 wchar_t state
7108   ;
7109   return 0;
7110 }
7111 _ACEOF
7112 rm -f conftest.$ac_objext
7113 if { (eval echo "$as_me:7113: \"$ac_compile\"") >&5
7114   (eval $ac_compile) 2>&5
7115   ac_status=$?
7116   echo "$as_me:7116: \$? = $ac_status" >&5
7117   (exit $ac_status); } &&
7118          { ac_try='test -s conftest.$ac_objext'
7119   { (eval echo "$as_me:7119: \"$ac_try\"") >&5
7120   (eval $ac_try) 2>&5
7121   ac_status=$?
7122   echo "$as_me:7122: \$? = $ac_status" >&5
7123   (exit $ac_status); }; }; then
7124   cf_cv_wchar_t=no
7125 else
7126   echo "$as_me: failed program was:" >&5
7127 cat conftest.$ac_ext >&5
7128 cat >conftest.$ac_ext <<_ACEOF
7129 #line 7129 "configure"
7130 #include "confdefs.h"
7131
7132 #include <stdlib.h>
7133 #include <stdarg.h>
7134 #include <stdio.h>
7135 #include <wchar.h>
7136 #ifdef HAVE_LIBUTF8_H
7137 #include <libutf8.h>
7138 #endif
7139 int
7140 main ()
7141 {
7142 wchar_t value
7143   ;
7144   return 0;
7145 }
7146 _ACEOF
7147 rm -f conftest.$ac_objext
7148 if { (eval echo "$as_me:7148: \"$ac_compile\"") >&5
7149   (eval $ac_compile) 2>&5
7150   ac_status=$?
7151   echo "$as_me:7151: \$? = $ac_status" >&5
7152   (exit $ac_status); } &&
7153          { ac_try='test -s conftest.$ac_objext'
7154   { (eval echo "$as_me:7154: \"$ac_try\"") >&5
7155   (eval $ac_try) 2>&5
7156   ac_status=$?
7157   echo "$as_me:7157: \$? = $ac_status" >&5
7158   (exit $ac_status); }; }; then
7159   cf_cv_wchar_t=yes
7160 else
7161   echo "$as_me: failed program was:" >&5
7162 cat conftest.$ac_ext >&5
7163 cf_cv_wchar_t=unknown
7164 fi
7165 rm -f conftest.$ac_objext conftest.$ac_ext
7166 fi
7167 rm -f conftest.$ac_objext conftest.$ac_ext
7168 fi
7169 echo "$as_me:7169: result: $cf_cv_wchar_t" >&5
7170 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7171
7172 if test "$cf_cv_wchar_t" = yes ; then
7173         cat >>confdefs.h <<\EOF
7174 #define NEED_WCHAR_H 1
7175 EOF
7176
7177         NEED_WCHAR_H=1
7178 fi
7179
7180 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7181 if test "$cf_cv_wchar_t" = unknown ; then
7182         NCURSES_WCHAR_T=1
7183 fi
7184
7185 # if we find wchar_t in either place, use substitution to provide a fallback.
7186 if test "$cf_cv_wchar_t" != unknown ; then
7187         NCURSES_OK_WCHAR_T=1
7188 fi
7189
7190 # This is needed on Tru64 5.0 to declare wint_t
7191 echo "$as_me:7191: checking if we must include wchar.h to declare wint_t" >&5
7192 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7193 if test "${cf_cv_wint_t+set}" = set; then
7194   echo $ECHO_N "(cached) $ECHO_C" >&6
7195 else
7196
7197 cat >conftest.$ac_ext <<_ACEOF
7198 #line 7198 "configure"
7199 #include "confdefs.h"
7200
7201 #include <stdlib.h>
7202 #include <stdarg.h>
7203 #include <stdio.h>
7204 #ifdef HAVE_LIBUTF8_H
7205 #include <libutf8.h>
7206 #endif
7207 int
7208 main ()
7209 {
7210 wint_t state
7211   ;
7212   return 0;
7213 }
7214 _ACEOF
7215 rm -f conftest.$ac_objext
7216 if { (eval echo "$as_me:7216: \"$ac_compile\"") >&5
7217   (eval $ac_compile) 2>&5
7218   ac_status=$?
7219   echo "$as_me:7219: \$? = $ac_status" >&5
7220   (exit $ac_status); } &&
7221          { ac_try='test -s conftest.$ac_objext'
7222   { (eval echo "$as_me:7222: \"$ac_try\"") >&5
7223   (eval $ac_try) 2>&5
7224   ac_status=$?
7225   echo "$as_me:7225: \$? = $ac_status" >&5
7226   (exit $ac_status); }; }; then
7227   cf_cv_wint_t=no
7228 else
7229   echo "$as_me: failed program was:" >&5
7230 cat conftest.$ac_ext >&5
7231 cat >conftest.$ac_ext <<_ACEOF
7232 #line 7232 "configure"
7233 #include "confdefs.h"
7234
7235 #include <stdlib.h>
7236 #include <stdarg.h>
7237 #include <stdio.h>
7238 #include <wchar.h>
7239 #ifdef HAVE_LIBUTF8_H
7240 #include <libutf8.h>
7241 #endif
7242 int
7243 main ()
7244 {
7245 wint_t value
7246   ;
7247   return 0;
7248 }
7249 _ACEOF
7250 rm -f conftest.$ac_objext
7251 if { (eval echo "$as_me:7251: \"$ac_compile\"") >&5
7252   (eval $ac_compile) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit $ac_status); } &&
7256          { ac_try='test -s conftest.$ac_objext'
7257   { (eval echo "$as_me:7257: \"$ac_try\"") >&5
7258   (eval $ac_try) 2>&5
7259   ac_status=$?
7260   echo "$as_me:7260: \$? = $ac_status" >&5
7261   (exit $ac_status); }; }; then
7262   cf_cv_wint_t=yes
7263 else
7264   echo "$as_me: failed program was:" >&5
7265 cat conftest.$ac_ext >&5
7266 cf_cv_wint_t=unknown
7267 fi
7268 rm -f conftest.$ac_objext conftest.$ac_ext
7269 fi
7270 rm -f conftest.$ac_objext conftest.$ac_ext
7271 fi
7272 echo "$as_me:7272: result: $cf_cv_wint_t" >&5
7273 echo "${ECHO_T}$cf_cv_wint_t" >&6
7274
7275 if test "$cf_cv_wint_t" = yes ; then
7276         cat >>confdefs.h <<\EOF
7277 #define NEED_WCHAR_H 1
7278 EOF
7279
7280         NEED_WCHAR_H=1
7281 fi
7282
7283 # if we do not find wint_t in either place, use substitution to provide a fallback.
7284 if test "$cf_cv_wint_t" = unknown ; then
7285         NCURSES_WINT_T=1
7286 fi
7287
7288 # if we find wint_t in either place, use substitution to provide a fallback.
7289 if test "$cf_cv_wint_t" != unknown ; then
7290         NCURSES_OK_WINT_T=1
7291 fi
7292
7293         if test "$NCURSES_MBSTATE_T" != 0; then
7294                 cat >>confdefs.h <<\EOF
7295 #define NEED_MBSTATE_T_DEF 1
7296 EOF
7297
7298         fi
7299 fi
7300
7301 ###   use option --disable-lp64 to allow long chtype
7302 case $cf_cv_abi_version in
7303 [345]*)
7304         default_with_lp64=no
7305         ;;
7306 *)
7307         default_with_lp64=yes
7308         ;;
7309 esac
7310
7311 echo "$as_me:7311: checking whether to enable _LP64 definition in curses.h" >&5
7312 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7313
7314 # Check whether --enable-lp64 or --disable-lp64 was given.
7315 if test "${enable_lp64+set}" = set; then
7316   enableval="$enable_lp64"
7317   with_lp64=$enableval
7318 else
7319   with_lp64=$default_with_lp64
7320 fi;
7321 echo "$as_me:7321: result: $with_lp64" >&5
7322 echo "${ECHO_T}$with_lp64" >&6
7323
7324 if test "$with_lp64" = yes ; then
7325         cf_cv_enable_lp64=1
7326 else
7327         cf_cv_enable_lp64=0
7328 fi
7329
7330 # Check whether --enable-largefile or --disable-largefile was given.
7331 if test "${enable_largefile+set}" = set; then
7332   enableval="$enable_largefile"
7333
7334 fi;
7335 if test "$enable_largefile" != no; then
7336
7337   echo "$as_me:7337: checking for special C compiler options needed for large files" >&5
7338 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7339 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7340   echo $ECHO_N "(cached) $ECHO_C" >&6
7341 else
7342   ac_cv_sys_largefile_CC=no
7343      if test "$GCC" != yes; then
7344        ac_save_CC=$CC
7345        while :; do
7346          # IRIX 6.2 and later do not support large files by default,
7347          # so use the C compiler's -n32 option if that helps.
7348          cat >conftest.$ac_ext <<_ACEOF
7349 #line 7349 "configure"
7350 #include "confdefs.h"
7351 #include <sys/types.h>
7352  /* Check that off_t can represent 2**63 - 1 correctly.
7353     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7354     since some C++ compilers masquerading as C compilers
7355     incorrectly reject 9223372036854775807.  */
7356 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7357   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7358                        && LARGE_OFF_T % 2147483647 == 1)
7359                       ? 1 : -1];
7360 int
7361 main ()
7362 {
7363
7364   ;
7365   return 0;
7366 }
7367 _ACEOF
7368          rm -f conftest.$ac_objext
7369 if { (eval echo "$as_me:7369: \"$ac_compile\"") >&5
7370   (eval $ac_compile) 2>&5
7371   ac_status=$?
7372   echo "$as_me:7372: \$? = $ac_status" >&5
7373   (exit $ac_status); } &&
7374          { ac_try='test -s conftest.$ac_objext'
7375   { (eval echo "$as_me:7375: \"$ac_try\"") >&5
7376   (eval $ac_try) 2>&5
7377   ac_status=$?
7378   echo "$as_me:7378: \$? = $ac_status" >&5
7379   (exit $ac_status); }; }; then
7380   break
7381 else
7382   echo "$as_me: failed program was:" >&5
7383 cat conftest.$ac_ext >&5
7384 fi
7385 rm -f conftest.$ac_objext
7386          CC="$CC -n32"
7387          rm -f conftest.$ac_objext
7388 if { (eval echo "$as_me:7388: \"$ac_compile\"") >&5
7389   (eval $ac_compile) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -s conftest.$ac_objext'
7394   { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); }; }; then
7399   ac_cv_sys_largefile_CC=' -n32'; break
7400 else
7401   echo "$as_me: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 fi
7404 rm -f conftest.$ac_objext
7405          break
7406        done
7407        CC=$ac_save_CC
7408        rm -f conftest.$ac_ext
7409     fi
7410 fi
7411 echo "$as_me:7411: result: $ac_cv_sys_largefile_CC" >&5
7412 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7413   if test "$ac_cv_sys_largefile_CC" != no; then
7414     CC=$CC$ac_cv_sys_largefile_CC
7415   fi
7416
7417   echo "$as_me:7417: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7418 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7419 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7420   echo $ECHO_N "(cached) $ECHO_C" >&6
7421 else
7422   while :; do
7423   ac_cv_sys_file_offset_bits=no
7424   cat >conftest.$ac_ext <<_ACEOF
7425 #line 7425 "configure"
7426 #include "confdefs.h"
7427 #include <sys/types.h>
7428  /* Check that off_t can represent 2**63 - 1 correctly.
7429     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7430     since some C++ compilers masquerading as C compilers
7431     incorrectly reject 9223372036854775807.  */
7432 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7433   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7434                        && LARGE_OFF_T % 2147483647 == 1)
7435                       ? 1 : -1];
7436 int
7437 main ()
7438 {
7439
7440   ;
7441   return 0;
7442 }
7443 _ACEOF
7444 rm -f conftest.$ac_objext
7445 if { (eval echo "$as_me:7445: \"$ac_compile\"") >&5
7446   (eval $ac_compile) 2>&5
7447   ac_status=$?
7448   echo "$as_me:7448: \$? = $ac_status" >&5
7449   (exit $ac_status); } &&
7450          { ac_try='test -s conftest.$ac_objext'
7451   { (eval echo "$as_me:7451: \"$ac_try\"") >&5
7452   (eval $ac_try) 2>&5
7453   ac_status=$?
7454   echo "$as_me:7454: \$? = $ac_status" >&5
7455   (exit $ac_status); }; }; then
7456   break
7457 else
7458   echo "$as_me: failed program was:" >&5
7459 cat conftest.$ac_ext >&5
7460 fi
7461 rm -f conftest.$ac_objext conftest.$ac_ext
7462   cat >conftest.$ac_ext <<_ACEOF
7463 #line 7463 "configure"
7464 #include "confdefs.h"
7465 #define _FILE_OFFSET_BITS 64
7466 #include <sys/types.h>
7467  /* Check that off_t can represent 2**63 - 1 correctly.
7468     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7469     since some C++ compilers masquerading as C compilers
7470     incorrectly reject 9223372036854775807.  */
7471 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7472   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7473                        && LARGE_OFF_T % 2147483647 == 1)
7474                       ? 1 : -1];
7475 int
7476 main ()
7477 {
7478
7479   ;
7480   return 0;
7481 }
7482 _ACEOF
7483 rm -f conftest.$ac_objext
7484 if { (eval echo "$as_me:7484: \"$ac_compile\"") >&5
7485   (eval $ac_compile) 2>&5
7486   ac_status=$?
7487   echo "$as_me:7487: \$? = $ac_status" >&5
7488   (exit $ac_status); } &&
7489          { ac_try='test -s conftest.$ac_objext'
7490   { (eval echo "$as_me:7490: \"$ac_try\"") >&5
7491   (eval $ac_try) 2>&5
7492   ac_status=$?
7493   echo "$as_me:7493: \$? = $ac_status" >&5
7494   (exit $ac_status); }; }; then
7495   ac_cv_sys_file_offset_bits=64; break
7496 else
7497   echo "$as_me: failed program was:" >&5
7498 cat conftest.$ac_ext >&5
7499 fi
7500 rm -f conftest.$ac_objext conftest.$ac_ext
7501   break
7502 done
7503 fi
7504 echo "$as_me:7504: result: $ac_cv_sys_file_offset_bits" >&5
7505 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7506 if test "$ac_cv_sys_file_offset_bits" != no; then
7507
7508 cat >>confdefs.h <<EOF
7509 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7510 EOF
7511
7512 fi
7513 rm -f conftest*
7514   echo "$as_me:7514: checking for _LARGE_FILES value needed for large files" >&5
7515 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7516 if test "${ac_cv_sys_large_files+set}" = set; then
7517   echo $ECHO_N "(cached) $ECHO_C" >&6
7518 else
7519   while :; do
7520   ac_cv_sys_large_files=no
7521   cat >conftest.$ac_ext <<_ACEOF
7522 #line 7522 "configure"
7523 #include "confdefs.h"
7524 #include <sys/types.h>
7525  /* Check that off_t can represent 2**63 - 1 correctly.
7526     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7527     since some C++ compilers masquerading as C compilers
7528     incorrectly reject 9223372036854775807.  */
7529 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7530   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7531                        && LARGE_OFF_T % 2147483647 == 1)
7532                       ? 1 : -1];
7533 int
7534 main ()
7535 {
7536
7537   ;
7538   return 0;
7539 }
7540 _ACEOF
7541 rm -f conftest.$ac_objext
7542 if { (eval echo "$as_me:7542: \"$ac_compile\"") >&5
7543   (eval $ac_compile) 2>&5
7544   ac_status=$?
7545   echo "$as_me:7545: \$? = $ac_status" >&5
7546   (exit $ac_status); } &&
7547          { ac_try='test -s conftest.$ac_objext'
7548   { (eval echo "$as_me:7548: \"$ac_try\"") >&5
7549   (eval $ac_try) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit $ac_status); }; }; then
7553   break
7554 else
7555   echo "$as_me: failed program was:" >&5
7556 cat conftest.$ac_ext >&5
7557 fi
7558 rm -f conftest.$ac_objext conftest.$ac_ext
7559   cat >conftest.$ac_ext <<_ACEOF
7560 #line 7560 "configure"
7561 #include "confdefs.h"
7562 #define _LARGE_FILES 1
7563 #include <sys/types.h>
7564  /* Check that off_t can represent 2**63 - 1 correctly.
7565     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7566     since some C++ compilers masquerading as C compilers
7567     incorrectly reject 9223372036854775807.  */
7568 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7569   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7570                        && LARGE_OFF_T % 2147483647 == 1)
7571                       ? 1 : -1];
7572 int
7573 main ()
7574 {
7575
7576   ;
7577   return 0;
7578 }
7579 _ACEOF
7580 rm -f conftest.$ac_objext
7581 if { (eval echo "$as_me:7581: \"$ac_compile\"") >&5
7582   (eval $ac_compile) 2>&5
7583   ac_status=$?
7584   echo "$as_me:7584: \$? = $ac_status" >&5
7585   (exit $ac_status); } &&
7586          { ac_try='test -s conftest.$ac_objext'
7587   { (eval echo "$as_me:7587: \"$ac_try\"") >&5
7588   (eval $ac_try) 2>&5
7589   ac_status=$?
7590   echo "$as_me:7590: \$? = $ac_status" >&5
7591   (exit $ac_status); }; }; then
7592   ac_cv_sys_large_files=1; break
7593 else
7594   echo "$as_me: failed program was:" >&5
7595 cat conftest.$ac_ext >&5
7596 fi
7597 rm -f conftest.$ac_objext conftest.$ac_ext
7598   break
7599 done
7600 fi
7601 echo "$as_me:7601: result: $ac_cv_sys_large_files" >&5
7602 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7603 if test "$ac_cv_sys_large_files" != no; then
7604
7605 cat >>confdefs.h <<EOF
7606 #define _LARGE_FILES $ac_cv_sys_large_files
7607 EOF
7608
7609 fi
7610 rm -f conftest*
7611 fi
7612
7613     if test "$enable_largefile" != no ; then
7614         echo "$as_me:7614: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7615 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7616 if test "${ac_cv_sys_largefile_source+set}" = set; then
7617   echo $ECHO_N "(cached) $ECHO_C" >&6
7618 else
7619   while :; do
7620   ac_cv_sys_largefile_source=no
7621   cat >conftest.$ac_ext <<_ACEOF
7622 #line 7622 "configure"
7623 #include "confdefs.h"
7624 #include <stdio.h>
7625 int
7626 main ()
7627 {
7628 return !fseeko;
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f conftest.$ac_objext
7634 if { (eval echo "$as_me:7634: \"$ac_compile\"") >&5
7635   (eval $ac_compile) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit $ac_status); } &&
7639          { ac_try='test -s conftest.$ac_objext'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   break
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 fi
7650 rm -f conftest.$ac_objext conftest.$ac_ext
7651   cat >conftest.$ac_ext <<_ACEOF
7652 #line 7652 "configure"
7653 #include "confdefs.h"
7654 #define _LARGEFILE_SOURCE 1
7655 #include <stdio.h>
7656 int
7657 main ()
7658 {
7659 return !fseeko;
7660   ;
7661   return 0;
7662 }
7663 _ACEOF
7664 rm -f conftest.$ac_objext
7665 if { (eval echo "$as_me:7665: \"$ac_compile\"") >&5
7666   (eval $ac_compile) 2>&5
7667   ac_status=$?
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); } &&
7670          { ac_try='test -s conftest.$ac_objext'
7671   { (eval echo "$as_me:7671: \"$ac_try\"") >&5
7672   (eval $ac_try) 2>&5
7673   ac_status=$?
7674   echo "$as_me:7674: \$? = $ac_status" >&5
7675   (exit $ac_status); }; }; then
7676   ac_cv_sys_largefile_source=1; break
7677 else
7678   echo "$as_me: failed program was:" >&5
7679 cat conftest.$ac_ext >&5
7680 fi
7681 rm -f conftest.$ac_objext conftest.$ac_ext
7682   break
7683 done
7684 fi
7685 echo "$as_me:7685: result: $ac_cv_sys_largefile_source" >&5
7686 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7687 if test "$ac_cv_sys_largefile_source" != no; then
7688
7689 cat >>confdefs.h <<EOF
7690 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7691 EOF
7692
7693 fi
7694 rm -f conftest*
7695
7696 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7697 # in glibc 2.1.3, but that breaks too many other things.
7698 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7699 echo "$as_me:7699: checking for fseeko" >&5
7700 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7701 if test "${ac_cv_func_fseeko+set}" = set; then
7702   echo $ECHO_N "(cached) $ECHO_C" >&6
7703 else
7704   cat >conftest.$ac_ext <<_ACEOF
7705 #line 7705 "configure"
7706 #include "confdefs.h"
7707 #include <stdio.h>
7708 int
7709 main ()
7710 {
7711 return fseeko && fseeko (stdin, 0, 0);
7712   ;
7713   return 0;
7714 }
7715 _ACEOF
7716 rm -f conftest.$ac_objext conftest$ac_exeext
7717 if { (eval echo "$as_me:7717: \"$ac_link\"") >&5
7718   (eval $ac_link) 2>&5
7719   ac_status=$?
7720   echo "$as_me:7720: \$? = $ac_status" >&5
7721   (exit $ac_status); } &&
7722          { ac_try='test -s conftest$ac_exeext'
7723   { (eval echo "$as_me:7723: \"$ac_try\"") >&5
7724   (eval $ac_try) 2>&5
7725   ac_status=$?
7726   echo "$as_me:7726: \$? = $ac_status" >&5
7727   (exit $ac_status); }; }; then
7728   ac_cv_func_fseeko=yes
7729 else
7730   echo "$as_me: failed program was:" >&5
7731 cat conftest.$ac_ext >&5
7732 ac_cv_func_fseeko=no
7733 fi
7734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7735 fi
7736 echo "$as_me:7736: result: $ac_cv_func_fseeko" >&5
7737 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7738 if test $ac_cv_func_fseeko = yes; then
7739
7740 cat >>confdefs.h <<\EOF
7741 #define HAVE_FSEEKO 1
7742 EOF
7743
7744 fi
7745
7746         # Normally we would collect these definitions in the config.h,
7747         # but (like _XOPEN_SOURCE), some environments rely on having these
7748         # defined before any of the system headers are included.  Another
7749         # case comes up with C++, e.g., on AIX the compiler compiles the
7750         # header files by themselves before looking at the body files it is
7751         # told to compile.  For ncurses, those header files do not include
7752         # the config.h
7753         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7754         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7755         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7756
7757         echo "$as_me:7757: checking whether to use struct dirent64" >&5
7758 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7759 if test "${cf_cv_struct_dirent64+set}" = set; then
7760   echo $ECHO_N "(cached) $ECHO_C" >&6
7761 else
7762
7763                 cat >conftest.$ac_ext <<_ACEOF
7764 #line 7764 "configure"
7765 #include "confdefs.h"
7766
7767 #include <sys/types.h>
7768 #include <dirent.h>
7769
7770 int
7771 main ()
7772 {
7773
7774                 /* if transitional largefile support is setup, this is true */
7775                 extern struct dirent64 * readdir(DIR *);
7776                 struct dirent64 *x = readdir((DIR *)0);
7777                 struct dirent *y = readdir((DIR *)0);
7778                 int z = x - y;
7779
7780   ;
7781   return 0;
7782 }
7783 _ACEOF
7784 rm -f conftest.$ac_objext
7785 if { (eval echo "$as_me:7785: \"$ac_compile\"") >&5
7786   (eval $ac_compile) 2>&5
7787   ac_status=$?
7788   echo "$as_me:7788: \$? = $ac_status" >&5
7789   (exit $ac_status); } &&
7790          { ac_try='test -s conftest.$ac_objext'
7791   { (eval echo "$as_me:7791: \"$ac_try\"") >&5
7792   (eval $ac_try) 2>&5
7793   ac_status=$?
7794   echo "$as_me:7794: \$? = $ac_status" >&5
7795   (exit $ac_status); }; }; then
7796   cf_cv_struct_dirent64=yes
7797 else
7798   echo "$as_me: failed program was:" >&5
7799 cat conftest.$ac_ext >&5
7800 cf_cv_struct_dirent64=no
7801 fi
7802 rm -f conftest.$ac_objext conftest.$ac_ext
7803
7804 fi
7805 echo "$as_me:7805: result: $cf_cv_struct_dirent64" >&5
7806 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7807         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7808 #define HAVE_STRUCT_DIRENT64 1
7809 EOF
7810
7811     fi
7812
7813 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7814 echo "$as_me:7814: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7815 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7816
7817 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7818 if test "${enable_tparm_varargs+set}" = set; then
7819   enableval="$enable_tparm_varargs"
7820   with_tparm_varargs=$enableval
7821 else
7822   with_tparm_varargs=yes
7823 fi;
7824 echo "$as_me:7824: result: $with_tparm_varargs" >&5
7825 echo "${ECHO_T}$with_tparm_varargs" >&6
7826 NCURSES_TPARM_VARARGS=0
7827 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7828
7829 ###   use option --with-bool to override bool's type
7830 echo "$as_me:7830: checking for type of bool" >&5
7831 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7832
7833 # Check whether --with-bool or --without-bool was given.
7834 if test "${with_bool+set}" = set; then
7835   withval="$with_bool"
7836   NCURSES_BOOL="$withval"
7837 else
7838   NCURSES_BOOL=auto
7839 fi;
7840 echo "$as_me:7840: result: $NCURSES_BOOL" >&5
7841 echo "${ECHO_T}$NCURSES_BOOL" >&6
7842
7843 echo "$as_me:7843: checking for alternate terminal capabilities file" >&5
7844 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7845
7846 # Check whether --with-caps or --without-caps was given.
7847 if test "${with_caps+set}" = set; then
7848   withval="$with_caps"
7849   TERMINFO_CAPS=Caps.$withval
7850 else
7851   TERMINFO_CAPS=Caps
7852 fi;
7853 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7854 echo "$as_me:7854: result: $TERMINFO_CAPS" >&5
7855 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7856
7857 ###   use option --with-chtype to override chtype's type
7858 echo "$as_me:7858: checking for type of chtype" >&5
7859 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7860
7861 # Check whether --with-chtype or --without-chtype was given.
7862 if test "${with_chtype+set}" = set; then
7863   withval="$with_chtype"
7864   NCURSES_CHTYPE="$withval"
7865 else
7866   NCURSES_CHTYPE=auto
7867 fi;
7868 echo "$as_me:7868: result: $NCURSES_CHTYPE" >&5
7869 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7870
7871 ###   use option --with-ospeed to override ospeed's type
7872 echo "$as_me:7872: checking for type of ospeed" >&5
7873 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7874
7875 # Check whether --with-ospeed or --without-ospeed was given.
7876 if test "${with_ospeed+set}" = set; then
7877   withval="$with_ospeed"
7878   NCURSES_OSPEED="$withval"
7879 else
7880   NCURSES_OSPEED=short
7881 fi;
7882 echo "$as_me:7882: result: $NCURSES_OSPEED" >&5
7883 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7884
7885 ###   use option --with-mmask-t to override mmask_t's type
7886 echo "$as_me:7886: checking for type of mmask_t" >&5
7887 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7888
7889 # Check whether --with-mmask-t or --without-mmask-t was given.
7890 if test "${with_mmask_t+set}" = set; then
7891   withval="$with_mmask_t"
7892   NCURSES_MMASK_T="$withval"
7893 else
7894   NCURSES_MMASK_T=auto
7895 fi;
7896 echo "$as_me:7896: result: $NCURSES_MMASK_T" >&5
7897 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7898
7899 ### Enable compiling-in rcs id's
7900 echo "$as_me:7900: checking if RCS identifiers should be compiled-in" >&5
7901 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7902
7903 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7904 if test "${with_rcs_ids+set}" = set; then
7905   withval="$with_rcs_ids"
7906   with_rcs_ids=$withval
7907 else
7908   with_rcs_ids=no
7909 fi;
7910 echo "$as_me:7910: result: $with_rcs_ids" >&5
7911 echo "${ECHO_T}$with_rcs_ids" >&6
7912 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7913 #define USE_RCS_IDS 1
7914 EOF
7915
7916 ###############################################################################
7917
7918 echo "$as_me:7918: checking format of man-pages" >&5
7919 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7920
7921 # Check whether --with-manpage-format or --without-manpage-format was given.
7922 if test "${with_manpage_format+set}" = set; then
7923   withval="$with_manpage_format"
7924   MANPAGE_FORMAT=$withval
7925 else
7926   MANPAGE_FORMAT=unknown
7927 fi;
7928
7929 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7930 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7931
7932 cf_unknown=
7933
7934 case $MANPAGE_FORMAT in
7935 unknown)
7936   if test -z "$MANPATH" ; then
7937     MANPATH="/usr/man:/usr/share/man"
7938   fi
7939
7940   # look for the 'date' man-page (it's most likely to be installed!)
7941   MANPAGE_FORMAT=
7942   cf_preform=no
7943   cf_catonly=yes
7944   cf_example=date
7945
7946   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7947   for cf_dir in $MANPATH; do
7948     test -z "$cf_dir" && cf_dir=/usr/man
7949     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
7950     do
7951       cf_test=`echo $cf_name | sed -e 's/*//'`
7952       if test "x$cf_test" = "x$cf_name" ; then
7953
7954         case "$cf_name" in
7955         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7956         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7957         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7958         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7959         esac
7960
7961         case "$cf_name" in
7962         $cf_dir/man*)
7963           cf_catonly=no
7964           ;;
7965         $cf_dir/cat*)
7966           cf_preform=yes
7967           ;;
7968         esac
7969         break
7970       fi
7971
7972       # if we found a match in either man* or cat*, stop looking
7973       if test -n "$MANPAGE_FORMAT" ; then
7974         cf_found=no
7975         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7976         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7977         case "$cf_name" in
7978         $cf_dir/cat*)
7979           cf_found=yes
7980           ;;
7981         esac
7982         test $cf_found=yes && break
7983       fi
7984     done
7985     # only check the first directory in $MANPATH where we find manpages
7986     if test -n "$MANPAGE_FORMAT" ; then
7987        break
7988     fi
7989   done
7990   # if we did not find the example, just assume it is normal
7991   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7992   IFS="$ac_save_ifs"
7993   ;;
7994 *)
7995   for cf_option in $MANPAGE_FORMAT; do
7996      case $cf_option in #(vi
7997      gzip|compress|BSDI|normal|formatted|catonly)
7998        ;;
7999      *)
8000        cf_unknown="$cf_unknown $cf_option"
8001        ;;
8002      esac
8003   done
8004   ;;
8005 esac
8006
8007 echo "$as_me:8007: result: $MANPAGE_FORMAT" >&5
8008 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8009 if test -n "$cf_unknown" ; then
8010   { echo "$as_me:8010: WARNING: Unexpected manpage-format $cf_unknown" >&5
8011 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8012 fi
8013
8014 echo "$as_me:8014: checking for manpage renaming" >&5
8015 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8016
8017 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8018 if test "${with_manpage_renames+set}" = set; then
8019   withval="$with_manpage_renames"
8020   MANPAGE_RENAMES=$withval
8021 else
8022   MANPAGE_RENAMES=yes
8023 fi;
8024
8025 case ".$MANPAGE_RENAMES" in #(vi
8026 .no) #(vi
8027   ;;
8028 .|.yes)
8029   # Debian 'man' program?
8030   if test -f /etc/debian_version ; then
8031     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8032   else
8033     MANPAGE_RENAMES=no
8034   fi
8035   ;;
8036 esac
8037
8038 if test "$MANPAGE_RENAMES" != no ; then
8039   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8040     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8041   elif test ! -f $MANPAGE_RENAMES ; then
8042     { { echo "$as_me:8042: error: not a filename: $MANPAGE_RENAMES" >&5
8043 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8044    { (exit 1); exit 1; }; }
8045   fi
8046
8047   test ! -d man && mkdir man
8048
8049   # Construct a sed-script to perform renaming within man-pages
8050   if test -n "$MANPAGE_RENAMES" ; then
8051     test ! -d man && mkdir man
8052     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8053   fi
8054 fi
8055
8056 echo "$as_me:8056: result: $MANPAGE_RENAMES" >&5
8057 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8058
8059 echo "$as_me:8059: checking if manpage aliases will be installed" >&5
8060 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8061
8062 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8063 if test "${with_manpage_aliases+set}" = set; then
8064   withval="$with_manpage_aliases"
8065   MANPAGE_ALIASES=$withval
8066 else
8067   MANPAGE_ALIASES=yes
8068 fi;
8069
8070 echo "$as_me:8070: result: $MANPAGE_ALIASES" >&5
8071 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8072
8073 if test "$LN_S" = "ln -s"; then
8074         cf_use_symlinks=yes
8075 else
8076         cf_use_symlinks=no
8077 fi
8078
8079 MANPAGE_SYMLINKS=no
8080 if test "$MANPAGE_ALIASES" = yes ; then
8081 echo "$as_me:8081: checking if manpage symlinks should be used" >&5
8082 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8083
8084 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8085 if test "${with_manpage_symlinks+set}" = set; then
8086   withval="$with_manpage_symlinks"
8087   MANPAGE_SYMLINKS=$withval
8088 else
8089   MANPAGE_SYMLINKS=$cf_use_symlinks
8090 fi;
8091
8092 if test "$$cf_use_symlinks" = no; then
8093 if test "$MANPAGE_SYMLINKS" = yes ; then
8094         { echo "$as_me:8094: WARNING: cannot make symlinks" >&5
8095 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8096         MANPAGE_SYMLINKS=no
8097 fi
8098 fi
8099
8100 echo "$as_me:8100: result: $MANPAGE_SYMLINKS" >&5
8101 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8102 fi
8103
8104 echo "$as_me:8104: checking for manpage tbl" >&5
8105 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8106
8107 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8108 if test "${with_manpage_tbl+set}" = set; then
8109   withval="$with_manpage_tbl"
8110   MANPAGE_TBL=$withval
8111 else
8112   MANPAGE_TBL=no
8113 fi;
8114
8115 echo "$as_me:8115: result: $MANPAGE_TBL" >&5
8116 echo "${ECHO_T}$MANPAGE_TBL" >&6
8117
8118   if test "$prefix" = "NONE" ; then
8119      cf_prefix="$ac_default_prefix"
8120   else
8121      cf_prefix="$prefix"
8122   fi
8123
8124   case "$MANPAGE_FORMAT" in # (vi
8125   *catonly*) # (vi
8126     cf_format=yes
8127     cf_inboth=no
8128     ;;
8129   *formatted*) # (vi
8130     cf_format=yes
8131     cf_inboth=yes
8132     ;;
8133   *)
8134     cf_format=no
8135     cf_inboth=no
8136     ;;
8137   esac
8138
8139 test ! -d man && mkdir man
8140
8141 cf_so_strip=
8142 cf_compress=
8143 case "$MANPAGE_FORMAT" in #(vi
8144 *compress*) #(vi
8145         cf_so_strip="Z"
8146         cf_compress=compress
8147   ;;
8148 *gzip*) #(vi
8149         cf_so_strip="gz"
8150         cf_compress=gzip
8151   ;;
8152 esac
8153
8154 cf_edit_man=./edit_man.sh
8155 cf_man_alias=`pwd`/man_alias.sed
8156
8157 cat >$cf_edit_man <<CF_EOF
8158 #! /bin/sh
8159 # this script is generated by the configure-script CF_MAN_PAGES macro.
8160
8161 prefix="$cf_prefix"
8162 datadir="$datadir"
8163
8164 NCURSES_MAJOR="$NCURSES_MAJOR"
8165 NCURSES_MINOR="$NCURSES_MINOR"
8166 NCURSES_PATCH="$NCURSES_PATCH"
8167
8168 NCURSES_OSPEED="$NCURSES_OSPEED"
8169 TERMINFO="$TERMINFO"
8170
8171 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8172
8173 INSTALL="$INSTALL"
8174 INSTALL_DATA="$INSTALL_DATA"
8175
8176 transform="$program_transform_name"
8177
8178 TMP=\${TMPDIR-/tmp}/man\$\$
8179 trap "rm -f \$TMP" 0 1 2 5 15
8180
8181 form=\$1
8182 shift || exit 1
8183
8184 verb=\$1
8185 shift || exit 1
8186
8187 mandir=\$1
8188 shift || exit 1
8189
8190 srcdir=\$1
8191 top_srcdir=\$srcdir/..
8192 shift || exit 1
8193
8194 if test "\$form" = normal ; then
8195         if test "$cf_format" = yes ; then
8196         if test "$cf_inboth" = no ; then
8197                 sh \$0 format \$verb \$mandir \$srcdir \$*
8198                 exit $?
8199         fi
8200         fi
8201         cf_subdir=\$mandir/man
8202         cf_tables=$MANPAGE_TBL
8203 else
8204         cf_subdir=\$mandir/cat
8205         cf_tables=yes
8206 fi
8207
8208 # process the list of source-files
8209 for i in \$* ; do
8210 case \$i in #(vi
8211 *.orig|*.rej) ;; #(vi
8212 *.[0-9]*)
8213         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8214         if test \$verb = installing ; then
8215         if test ! -d \$cf_subdir\${section} ; then
8216                 \$MKDIRS \$cf_subdir\$section
8217         fi
8218         fi
8219
8220         # replace variables in man page
8221         if test ! -f $cf_man_alias ; then
8222 cat >>$cf_man_alias <<-CF_EOF2
8223                 s,@DATADIR@,\$datadir,g
8224                 s,@TERMINFO@,\$TERMINFO,g
8225                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8226                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8227                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8228                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8229 CF_EOF
8230
8231         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8232         do
8233                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8234                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8235 cat >>$cf_edit_man <<-CF_EOF
8236                 s,@$cf_NAME@,$cf_name,
8237 CF_EOF
8238         done
8239
8240 cat >>$cf_edit_man <<CF_EOF
8241 CF_EOF2
8242                 echo "...made $cf_man_alias"
8243         fi
8244
8245         aliases=
8246         cf_source=\`basename \$i\`
8247         inalias=\$cf_source
8248         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8249         if test ! -f \$inalias ; then
8250                 echo .. skipped \$cf_source
8251                 continue
8252         fi
8253 CF_EOF
8254
8255 if test "$MANPAGE_ALIASES" != no ; then
8256 cat >>$cf_edit_man <<CF_EOF
8257         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8258 CF_EOF
8259 fi
8260
8261 if test "$MANPAGE_RENAMES" = no ; then
8262 cat >>$cf_edit_man <<CF_EOF
8263         # perform program transformations for section 1 man pages
8264         if test \$section = 1 ; then
8265                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8266         else
8267                 cf_target=\$cf_subdir\${section}/\$cf_source
8268         fi
8269 CF_EOF
8270 else
8271 cat >>$cf_edit_man <<CF_EOF
8272         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8273         if test -z "\$cf_target" ; then
8274                 echo '? missing rename for '\$cf_source
8275                 cf_target="\$cf_source"
8276         fi
8277         cf_target="\$cf_subdir\${section}/\${cf_target}"
8278
8279 CF_EOF
8280 fi
8281
8282 cat >>$cf_edit_man <<CF_EOF
8283         sed     -f $cf_man_alias \\
8284 CF_EOF
8285
8286 if test -f $MANPAGE_RENAMES ; then
8287 cat >>$cf_edit_man <<CF_EOF
8288                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8289 CF_EOF
8290 else
8291 cat >>$cf_edit_man <<CF_EOF
8292                 < \$i >\$TMP
8293 CF_EOF
8294 fi
8295
8296 cat >>$cf_edit_man <<CF_EOF
8297 if test \$cf_tables = yes ; then
8298         tbl \$TMP >\$TMP.out
8299         mv \$TMP.out \$TMP
8300 fi
8301 CF_EOF
8302
8303 if test $with_curses_h != yes ; then
8304 cat >>$cf_edit_man <<CF_EOF
8305         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8306         mv \$TMP.out \$TMP
8307 CF_EOF
8308 fi
8309
8310 cat >>$cf_edit_man <<CF_EOF
8311         if test \$form = format ; then
8312                 nroff -man \$TMP >\$TMP.out
8313                 mv \$TMP.out \$TMP
8314         fi
8315 CF_EOF
8316
8317 if test -n "$cf_compress" ; then
8318 cat >>$cf_edit_man <<CF_EOF
8319         if test \$verb = installing ; then
8320         if ( $cf_compress -f \$TMP )
8321         then
8322                 mv \$TMP.$cf_so_strip \$TMP
8323         fi
8324         fi
8325         cf_target="\$cf_target.$cf_so_strip"
8326 CF_EOF
8327 fi
8328
8329 case "$MANPAGE_FORMAT" in #(vi
8330 *BSDI*)
8331 cat >>$cf_edit_man <<CF_EOF
8332         if test \$form = format ; then
8333                 # BSDI installs only .0 suffixes in the cat directories
8334                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8335         fi
8336 CF_EOF
8337   ;;
8338 esac
8339
8340 cat >>$cf_edit_man <<CF_EOF
8341         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8342         if test \$verb = installing ; then
8343                 echo \$verb \$cf_target
8344                 \$INSTALL_DATA \$TMP \$cf_target
8345                 test -d \$cf_subdir\${section} &&
8346                 test -n "\$aliases" && (
8347                         cd \$cf_subdir\${section} && (
8348                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8349                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8350                                 cf_target=\`basename \$cf_target\`
8351                                 for cf_alias in \$aliases
8352                                 do
8353                                         if test \$section = 1 ; then
8354                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8355                                         fi
8356
8357                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8358                                                 if test -f \$cf_alias\${suffix} ; then
8359                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8360                                                         then
8361                                                                 continue
8362                                                         fi
8363                                                 fi
8364                                                 echo .. \$verb alias \$cf_alias\${suffix}
8365                                                 rm -f \$cf_alias\${suffix}
8366                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8367                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8368                                                 echo ".so \$cf_source" >\$TMP
8369 CF_EOF
8370 if test -n "$cf_compress" ; then
8371 cat >>$cf_edit_man <<CF_EOF
8372                                                 if test -n "$cf_so_strip" ; then
8373                                                         $cf_compress -f \$TMP
8374                                                         mv \$TMP.$cf_so_strip \$TMP
8375                                                 fi
8376 CF_EOF
8377 fi
8378 cat >>$cf_edit_man <<CF_EOF
8379                                                 echo .. \$verb alias \$cf_alias\${suffix}
8380                                                 rm -f \$cf_alias\${suffix}
8381                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8382                                         fi
8383                                 done
8384                         )
8385                 )
8386         elif test \$verb = removing ; then
8387                 test -f \$cf_target && (
8388                         echo \$verb \$cf_target
8389                         rm -f \$cf_target
8390                 )
8391                 test -d \$cf_subdir\${section} &&
8392                 test -n "\$aliases" && (
8393                         cd \$cf_subdir\${section} && (
8394                                 for cf_alias in \$aliases
8395                                 do
8396                                         if test \$section = 1 ; then
8397                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8398                                         fi
8399
8400                                         echo .. \$verb alias \$cf_alias\${suffix}
8401                                         rm -f \$cf_alias\${suffix}
8402                                 done
8403                         )
8404                 )
8405         else
8406 #               echo ".hy 0"
8407                 cat \$TMP
8408         fi
8409         ;;
8410 esac
8411 done
8412
8413 if test $cf_inboth = yes ; then
8414 if test \$form != format ; then
8415         sh \$0 format \$verb \$mandir \$srcdir \$*
8416 fi
8417 fi
8418
8419 exit 0
8420 CF_EOF
8421 chmod 755 $cf_edit_man
8422
8423 ###############################################################################
8424
8425 ### Note that some functions (such as const) are normally disabled anyway.
8426 echo "$as_me:8426: checking if you want to build with function extensions" >&5
8427 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8428
8429 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8430 if test "${enable_ext_funcs+set}" = set; then
8431   enableval="$enable_ext_funcs"
8432   with_ext_funcs=$enableval
8433 else
8434   with_ext_funcs=yes
8435 fi;
8436 echo "$as_me:8436: result: $with_ext_funcs" >&5
8437 echo "${ECHO_T}$with_ext_funcs" >&6
8438 if test "$with_ext_funcs" = yes ; then
8439         NCURSES_EXT_FUNCS=1
8440         cat >>confdefs.h <<\EOF
8441 #define HAVE_CURSES_VERSION 1
8442 EOF
8443
8444         cat >>confdefs.h <<\EOF
8445 #define HAVE_HAS_KEY 1
8446 EOF
8447
8448         cat >>confdefs.h <<\EOF
8449 #define HAVE_RESIZETERM 1
8450 EOF
8451
8452         cat >>confdefs.h <<\EOF
8453 #define HAVE_RESIZE_TERM 1
8454 EOF
8455
8456         cat >>confdefs.h <<\EOF
8457 #define HAVE_USE_DEFAULT_COLORS 1
8458 EOF
8459
8460         cat >>confdefs.h <<\EOF
8461 #define HAVE_WRESIZE 1
8462 EOF
8463
8464         cat >>confdefs.h <<\EOF
8465 #define NCURSES_EXT_FUNCS 1
8466 EOF
8467
8468 else
8469         NCURSES_EXT_FUNCS=0
8470 fi
8471
8472 ###   use option --enable-const to turn on use of const beyond that in XSI.
8473 echo "$as_me:8473: checking for extended use of const keyword" >&5
8474 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8475
8476 # Check whether --enable-const or --disable-const was given.
8477 if test "${enable_const+set}" = set; then
8478   enableval="$enable_const"
8479   with_ext_const=$enableval
8480 else
8481   with_ext_const=no
8482 fi;
8483 echo "$as_me:8483: result: $with_ext_const" >&5
8484 echo "${ECHO_T}$with_ext_const" >&6
8485 NCURSES_CONST='/*nothing*/'
8486 if test "$with_ext_const" = yes ; then
8487         NCURSES_CONST=const
8488 fi
8489
8490 echo "$as_me:8490: checking if you want \$NCURSES_NO_PADDING code" >&5
8491 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8492
8493 # Check whether --enable-no-padding or --disable-no-padding was given.
8494 if test "${enable_no_padding+set}" = set; then
8495   enableval="$enable_no_padding"
8496   with_no_padding=$enableval
8497 else
8498   with_no_padding=$with_ext_funcs
8499 fi;
8500 echo "$as_me:8500: result: $with_no_padding" >&5
8501 echo "${ECHO_T}$with_no_padding" >&6
8502 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8503 #define NCURSES_NO_PADDING 1
8504 EOF
8505
8506 echo "$as_me:8506: checking for ANSI C header files" >&5
8507 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8508 if test "${ac_cv_header_stdc+set}" = set; then
8509   echo $ECHO_N "(cached) $ECHO_C" >&6
8510 else
8511   cat >conftest.$ac_ext <<_ACEOF
8512 #line 8512 "configure"
8513 #include "confdefs.h"
8514 #include <stdlib.h>
8515 #include <stdarg.h>
8516 #include <string.h>
8517 #include <float.h>
8518
8519 _ACEOF
8520 if { (eval echo "$as_me:8520: \"$ac_cpp conftest.$ac_ext\"") >&5
8521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8522   ac_status=$?
8523   egrep -v '^ *\+' conftest.er1 >conftest.err
8524   rm -f conftest.er1
8525   cat conftest.err >&5
8526   echo "$as_me:8526: \$? = $ac_status" >&5
8527   (exit $ac_status); } >/dev/null; then
8528   if test -s conftest.err; then
8529     ac_cpp_err=$ac_c_preproc_warn_flag
8530   else
8531     ac_cpp_err=
8532   fi
8533 else
8534   ac_cpp_err=yes
8535 fi
8536 if test -z "$ac_cpp_err"; then
8537   ac_cv_header_stdc=yes
8538 else
8539   echo "$as_me: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   ac_cv_header_stdc=no
8542 fi
8543 rm -f conftest.err conftest.$ac_ext
8544
8545 if test $ac_cv_header_stdc = yes; then
8546   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8547   cat >conftest.$ac_ext <<_ACEOF
8548 #line 8548 "configure"
8549 #include "confdefs.h"
8550 #include <string.h>
8551
8552 _ACEOF
8553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8554   egrep "memchr" >/dev/null 2>&1; then
8555   :
8556 else
8557   ac_cv_header_stdc=no
8558 fi
8559 rm -f conftest*
8560
8561 fi
8562
8563 if test $ac_cv_header_stdc = yes; then
8564   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8565   cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568 #include <stdlib.h>
8569
8570 _ACEOF
8571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8572   egrep "free" >/dev/null 2>&1; then
8573   :
8574 else
8575   ac_cv_header_stdc=no
8576 fi
8577 rm -f conftest*
8578
8579 fi
8580
8581 if test $ac_cv_header_stdc = yes; then
8582   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8583   if test "$cross_compiling" = yes; then
8584   :
8585 else
8586   cat >conftest.$ac_ext <<_ACEOF
8587 #line 8587 "configure"
8588 #include "confdefs.h"
8589 #include <ctype.h>
8590 #if ((' ' & 0x0FF) == 0x020)
8591 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8592 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8593 #else
8594 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8595                      || ('j' <= (c) && (c) <= 'r') \
8596                      || ('s' <= (c) && (c) <= 'z'))
8597 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8598 #endif
8599
8600 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8601 int
8602 main ()
8603 {
8604   int i;
8605   for (i = 0; i < 256; i++)
8606     if (XOR (islower (i), ISLOWER (i))
8607         || toupper (i) != TOUPPER (i))
8608       $ac_main_return(2);
8609   $ac_main_return (0);
8610 }
8611 _ACEOF
8612 rm -f conftest$ac_exeext
8613 if { (eval echo "$as_me:8613: \"$ac_link\"") >&5
8614   (eval $ac_link) 2>&5
8615   ac_status=$?
8616   echo "$as_me:8616: \$? = $ac_status" >&5
8617   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8618   { (eval echo "$as_me:8618: \"$ac_try\"") >&5
8619   (eval $ac_try) 2>&5
8620   ac_status=$?
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); }; }; then
8623   :
8624 else
8625   echo "$as_me: program exited with status $ac_status" >&5
8626 echo "$as_me: failed program was:" >&5
8627 cat conftest.$ac_ext >&5
8628 ac_cv_header_stdc=no
8629 fi
8630 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8631 fi
8632 fi
8633 fi
8634 echo "$as_me:8634: result: $ac_cv_header_stdc" >&5
8635 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8636 if test $ac_cv_header_stdc = yes; then
8637
8638 cat >>confdefs.h <<\EOF
8639 #define STDC_HEADERS 1
8640 EOF
8641
8642 fi
8643
8644 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8645
8646 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8647                   inttypes.h stdint.h unistd.h
8648 do
8649 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8650 echo "$as_me:8650: checking for $ac_header" >&5
8651 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8652 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8653   echo $ECHO_N "(cached) $ECHO_C" >&6
8654 else
8655   cat >conftest.$ac_ext <<_ACEOF
8656 #line 8656 "configure"
8657 #include "confdefs.h"
8658 $ac_includes_default
8659 #include <$ac_header>
8660 _ACEOF
8661 rm -f conftest.$ac_objext
8662 if { (eval echo "$as_me:8662: \"$ac_compile\"") >&5
8663   (eval $ac_compile) 2>&5
8664   ac_status=$?
8665   echo "$as_me:8665: \$? = $ac_status" >&5
8666   (exit $ac_status); } &&
8667          { ac_try='test -s conftest.$ac_objext'
8668   { (eval echo "$as_me:8668: \"$ac_try\"") >&5
8669   (eval $ac_try) 2>&5
8670   ac_status=$?
8671   echo "$as_me:8671: \$? = $ac_status" >&5
8672   (exit $ac_status); }; }; then
8673   eval "$as_ac_Header=yes"
8674 else
8675   echo "$as_me: failed program was:" >&5
8676 cat conftest.$ac_ext >&5
8677 eval "$as_ac_Header=no"
8678 fi
8679 rm -f conftest.$ac_objext conftest.$ac_ext
8680 fi
8681 echo "$as_me:8681: result: `eval echo '${'$as_ac_Header'}'`" >&5
8682 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8683 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8684   cat >>confdefs.h <<EOF
8685 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8686 EOF
8687
8688 fi
8689 done
8690
8691 echo "$as_me:8691: checking for signed char" >&5
8692 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8693 if test "${ac_cv_type_signed_char+set}" = set; then
8694   echo $ECHO_N "(cached) $ECHO_C" >&6
8695 else
8696   cat >conftest.$ac_ext <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8699 $ac_includes_default
8700 int
8701 main ()
8702 {
8703 if ((signed char *) 0)
8704   return 0;
8705 if (sizeof (signed char))
8706   return 0;
8707   ;
8708   return 0;
8709 }
8710 _ACEOF
8711 rm -f conftest.$ac_objext
8712 if { (eval echo "$as_me:8712: \"$ac_compile\"") >&5
8713   (eval $ac_compile) 2>&5
8714   ac_status=$?
8715   echo "$as_me:8715: \$? = $ac_status" >&5
8716   (exit $ac_status); } &&
8717          { ac_try='test -s conftest.$ac_objext'
8718   { (eval echo "$as_me:8718: \"$ac_try\"") >&5
8719   (eval $ac_try) 2>&5
8720   ac_status=$?
8721   echo "$as_me:8721: \$? = $ac_status" >&5
8722   (exit $ac_status); }; }; then
8723   ac_cv_type_signed_char=yes
8724 else
8725   echo "$as_me: failed program was:" >&5
8726 cat conftest.$ac_ext >&5
8727 ac_cv_type_signed_char=no
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730 fi
8731 echo "$as_me:8731: result: $ac_cv_type_signed_char" >&5
8732 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8733
8734 echo "$as_me:8734: checking size of signed char" >&5
8735 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8736 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8737   echo $ECHO_N "(cached) $ECHO_C" >&6
8738 else
8739   if test "$ac_cv_type_signed_char" = yes; then
8740   if test "$cross_compiling" = yes; then
8741   # Depending upon the size, compute the lo and hi bounds.
8742 cat >conftest.$ac_ext <<_ACEOF
8743 #line 8743 "configure"
8744 #include "confdefs.h"
8745 $ac_includes_default
8746 int
8747 main ()
8748 {
8749 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8750   ;
8751   return 0;
8752 }
8753 _ACEOF
8754 rm -f conftest.$ac_objext
8755 if { (eval echo "$as_me:8755: \"$ac_compile\"") >&5
8756   (eval $ac_compile) 2>&5
8757   ac_status=$?
8758   echo "$as_me:8758: \$? = $ac_status" >&5
8759   (exit $ac_status); } &&
8760          { ac_try='test -s conftest.$ac_objext'
8761   { (eval echo "$as_me:8761: \"$ac_try\"") >&5
8762   (eval $ac_try) 2>&5
8763   ac_status=$?
8764   echo "$as_me:8764: \$? = $ac_status" >&5
8765   (exit $ac_status); }; }; then
8766   ac_lo=0 ac_mid=0
8767   while :; do
8768     cat >conftest.$ac_ext <<_ACEOF
8769 #line 8769 "configure"
8770 #include "confdefs.h"
8771 $ac_includes_default
8772 int
8773 main ()
8774 {
8775 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8776   ;
8777   return 0;
8778 }
8779 _ACEOF
8780 rm -f conftest.$ac_objext
8781 if { (eval echo "$as_me:8781: \"$ac_compile\"") >&5
8782   (eval $ac_compile) 2>&5
8783   ac_status=$?
8784   echo "$as_me:8784: \$? = $ac_status" >&5
8785   (exit $ac_status); } &&
8786          { ac_try='test -s conftest.$ac_objext'
8787   { (eval echo "$as_me:8787: \"$ac_try\"") >&5
8788   (eval $ac_try) 2>&5
8789   ac_status=$?
8790   echo "$as_me:8790: \$? = $ac_status" >&5
8791   (exit $ac_status); }; }; then
8792   ac_hi=$ac_mid; break
8793 else
8794   echo "$as_me: failed program was:" >&5
8795 cat conftest.$ac_ext >&5
8796 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8797 fi
8798 rm -f conftest.$ac_objext conftest.$ac_ext
8799   done
8800 else
8801   echo "$as_me: failed program was:" >&5
8802 cat conftest.$ac_ext >&5
8803 ac_hi=-1 ac_mid=-1
8804   while :; do
8805     cat >conftest.$ac_ext <<_ACEOF
8806 #line 8806 "configure"
8807 #include "confdefs.h"
8808 $ac_includes_default
8809 int
8810 main ()
8811 {
8812 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8813   ;
8814   return 0;
8815 }
8816 _ACEOF
8817 rm -f conftest.$ac_objext
8818 if { (eval echo "$as_me:8818: \"$ac_compile\"") >&5
8819   (eval $ac_compile) 2>&5
8820   ac_status=$?
8821   echo "$as_me:8821: \$? = $ac_status" >&5
8822   (exit $ac_status); } &&
8823          { ac_try='test -s conftest.$ac_objext'
8824   { (eval echo "$as_me:8824: \"$ac_try\"") >&5
8825   (eval $ac_try) 2>&5
8826   ac_status=$?
8827   echo "$as_me:8827: \$? = $ac_status" >&5
8828   (exit $ac_status); }; }; then
8829   ac_lo=$ac_mid; break
8830 else
8831   echo "$as_me: failed program was:" >&5
8832 cat conftest.$ac_ext >&5
8833 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8834 fi
8835 rm -f conftest.$ac_objext conftest.$ac_ext
8836   done
8837 fi
8838 rm -f conftest.$ac_objext conftest.$ac_ext
8839 # Binary search between lo and hi bounds.
8840 while test "x$ac_lo" != "x$ac_hi"; do
8841   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8842   cat >conftest.$ac_ext <<_ACEOF
8843 #line 8843 "configure"
8844 #include "confdefs.h"
8845 $ac_includes_default
8846 int
8847 main ()
8848 {
8849 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8850   ;
8851   return 0;
8852 }
8853 _ACEOF
8854 rm -f conftest.$ac_objext
8855 if { (eval echo "$as_me:8855: \"$ac_compile\"") >&5
8856   (eval $ac_compile) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); } &&
8860          { ac_try='test -s conftest.$ac_objext'
8861   { (eval echo "$as_me:8861: \"$ac_try\"") >&5
8862   (eval $ac_try) 2>&5
8863   ac_status=$?
8864   echo "$as_me:8864: \$? = $ac_status" >&5
8865   (exit $ac_status); }; }; then
8866   ac_hi=$ac_mid
8867 else
8868   echo "$as_me: failed program was:" >&5
8869 cat conftest.$ac_ext >&5
8870 ac_lo=`expr $ac_mid + 1`
8871 fi
8872 rm -f conftest.$ac_objext conftest.$ac_ext
8873 done
8874 ac_cv_sizeof_signed_char=$ac_lo
8875 else
8876   if test "$cross_compiling" = yes; then
8877   { { echo "$as_me:8877: error: cannot run test program while cross compiling" >&5
8878 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8879    { (exit 1); exit 1; }; }
8880 else
8881   cat >conftest.$ac_ext <<_ACEOF
8882 #line 8882 "configure"
8883 #include "confdefs.h"
8884 $ac_includes_default
8885 int
8886 main ()
8887 {
8888 FILE *f = fopen ("conftest.val", "w");
8889 if (!f)
8890   $ac_main_return (1);
8891 fprintf (f, "%d", (sizeof (signed char)));
8892 fclose (f);
8893   ;
8894   return 0;
8895 }
8896 _ACEOF
8897 rm -f conftest$ac_exeext
8898 if { (eval echo "$as_me:8898: \"$ac_link\"") >&5
8899   (eval $ac_link) 2>&5
8900   ac_status=$?
8901   echo "$as_me:8901: \$? = $ac_status" >&5
8902   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8903   { (eval echo "$as_me:8903: \"$ac_try\"") >&5
8904   (eval $ac_try) 2>&5
8905   ac_status=$?
8906   echo "$as_me:8906: \$? = $ac_status" >&5
8907   (exit $ac_status); }; }; then
8908   ac_cv_sizeof_signed_char=`cat conftest.val`
8909 else
8910   echo "$as_me: program exited with status $ac_status" >&5
8911 echo "$as_me: failed program was:" >&5
8912 cat conftest.$ac_ext >&5
8913 fi
8914 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8915 fi
8916 fi
8917 rm -f conftest.val
8918 else
8919   ac_cv_sizeof_signed_char=0
8920 fi
8921 fi
8922 echo "$as_me:8922: result: $ac_cv_sizeof_signed_char" >&5
8923 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8924 cat >>confdefs.h <<EOF
8925 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8926 EOF
8927
8928 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8929         NCURSES_SBOOL="signed char"
8930 else
8931         NCURSES_SBOOL="char"
8932 fi
8933 echo "$as_me:8933: checking if you want to use signed Boolean array in term.h" >&5
8934 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8935
8936 # Check whether --enable-signed-char or --disable-signed-char was given.
8937 if test "${enable_signed_char+set}" = set; then
8938   enableval="$enable_signed_char"
8939   with_signed_char=$enableval
8940 else
8941   with_signed_char=no
8942 fi;
8943 echo "$as_me:8943: result: $with_signed_char" >&5
8944 echo "${ECHO_T}$with_signed_char" >&6
8945 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8946
8947 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8948 echo "$as_me:8948: checking if you want SIGWINCH handler" >&5
8949 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8950
8951 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8952 if test "${enable_sigwinch+set}" = set; then
8953   enableval="$enable_sigwinch"
8954   with_sigwinch=$enableval
8955 else
8956   with_sigwinch=$with_ext_funcs
8957 fi;
8958 echo "$as_me:8958: result: $with_sigwinch" >&5
8959 echo "${ECHO_T}$with_sigwinch" >&6
8960 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8961 #define USE_SIGWINCH 1
8962 EOF
8963
8964 ###   use option --enable-tcap-names to allow user to define new capabilities
8965 echo "$as_me:8965: checking if you want user-definable terminal capabilities like termcap" >&5
8966 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8967
8968 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8969 if test "${enable_tcap_names+set}" = set; then
8970   enableval="$enable_tcap_names"
8971   with_tcap_names=$enableval
8972 else
8973   with_tcap_names=$with_ext_funcs
8974 fi;
8975 echo "$as_me:8975: result: $with_tcap_names" >&5
8976 echo "${ECHO_T}$with_tcap_names" >&6
8977 NCURSES_XNAMES=0
8978 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8979
8980 ###############################################################################
8981 # These options are relatively safe to experiment with.
8982
8983 echo "$as_me:8983: checking if you want all development code" >&5
8984 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8985
8986 # Check whether --with-develop or --without-develop was given.
8987 if test "${with_develop+set}" = set; then
8988   withval="$with_develop"
8989   with_develop=$withval
8990 else
8991   with_develop=no
8992 fi;
8993 echo "$as_me:8993: result: $with_develop" >&5
8994 echo "${ECHO_T}$with_develop" >&6
8995
8996 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8997 echo "$as_me:8997: checking if you want hard-tabs code" >&5
8998 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8999
9000 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9001 if test "${enable_hard_tabs+set}" = set; then
9002   enableval="$enable_hard_tabs"
9003
9004 else
9005   enable_hard_tabs=$with_develop
9006 fi;
9007 echo "$as_me:9007: result: $enable_hard_tabs" >&5
9008 echo "${ECHO_T}$enable_hard_tabs" >&6
9009 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9010 #define USE_HARD_TABS 1
9011 EOF
9012
9013 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9014 echo "$as_me:9014: checking if you want limited support for xmc" >&5
9015 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9016
9017 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9018 if test "${enable_xmc_glitch+set}" = set; then
9019   enableval="$enable_xmc_glitch"
9020
9021 else
9022   enable_xmc_glitch=$with_develop
9023 fi;
9024 echo "$as_me:9024: result: $enable_xmc_glitch" >&5
9025 echo "${ECHO_T}$enable_xmc_glitch" >&6
9026 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9027 #define USE_XMC_SUPPORT 1
9028 EOF
9029
9030 ###############################################################################
9031 # These are just experimental, probably should not be in a package:
9032
9033 echo "$as_me:9033: checking if you do not want to assume colors are white-on-black" >&5
9034 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9035
9036 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9037 if test "${enable_assumed_color+set}" = set; then
9038   enableval="$enable_assumed_color"
9039   with_assumed_color=$enableval
9040 else
9041   with_assumed_color=yes
9042 fi;
9043 echo "$as_me:9043: result: $with_assumed_color" >&5
9044 echo "${ECHO_T}$with_assumed_color" >&6
9045 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9046 #define USE_ASSUMED_COLOR 1
9047 EOF
9048
9049 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9050 echo "$as_me:9050: checking if you want hashmap scrolling-optimization code" >&5
9051 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9052
9053 # Check whether --enable-hashmap or --disable-hashmap was given.
9054 if test "${enable_hashmap+set}" = set; then
9055   enableval="$enable_hashmap"
9056   with_hashmap=$enableval
9057 else
9058   with_hashmap=yes
9059 fi;
9060 echo "$as_me:9060: result: $with_hashmap" >&5
9061 echo "${ECHO_T}$with_hashmap" >&6
9062 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9063 #define USE_HASHMAP 1
9064 EOF
9065
9066 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9067 echo "$as_me:9067: checking if you want colorfgbg code" >&5
9068 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9069
9070 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9071 if test "${enable_colorfgbg+set}" = set; then
9072   enableval="$enable_colorfgbg"
9073   with_colorfgbg=$enableval
9074 else
9075   with_colorfgbg=no
9076 fi;
9077 echo "$as_me:9077: result: $with_colorfgbg" >&5
9078 echo "${ECHO_T}$with_colorfgbg" >&6
9079 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9080 #define USE_COLORFGBG 1
9081 EOF
9082
9083 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9084 echo "$as_me:9084: checking if you want to use experimental extended colors" >&5
9085 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
9086
9087 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9088 if test "${enable_ext_colors+set}" = set; then
9089   enableval="$enable_ext_colors"
9090   with_ext_colors=$enableval
9091 else
9092   with_ext_colors=no
9093 fi;
9094 echo "$as_me:9094: result: $with_ext_colors" >&5
9095 echo "${ECHO_T}$with_ext_colors" >&6
9096 NCURSES_EXT_COLORS=0
9097 if test "$with_ext_colors" = yes ; then
9098         if test "$with_widec" != yes ; then
9099                 { { echo "$as_me:9099: error: This option applies only to wide-character library" >&5
9100 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9101    { (exit 1); exit 1; }; }
9102         else
9103                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9104
9105 if test "${with_abi_version+set}" != set; then
9106         case $cf_cv_rel_version in
9107         5.*)
9108                 cf_cv_rel_version=6.0
9109                 cf_cv_abi_version=6
9110                 { echo "$as_me:9110: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9111 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9112                 ;;
9113         esac
9114 fi
9115
9116         fi
9117         NCURSES_EXT_COLORS=1
9118         cat >>confdefs.h <<\EOF
9119 #define NCURSES_EXT_COLORS 1
9120 EOF
9121
9122 fi
9123
9124 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9125 echo "$as_me:9125: checking if you want to use experimental extended mouse encoding" >&5
9126 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9127
9128 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9129 if test "${enable_ext_mouse+set}" = set; then
9130   enableval="$enable_ext_mouse"
9131   with_ext_mouse=$enableval
9132 else
9133   with_ext_mouse=no
9134 fi;
9135 echo "$as_me:9135: result: $with_ext_mouse" >&5
9136 echo "${ECHO_T}$with_ext_mouse" >&6
9137 NCURSES_MOUSE_VERSION=1
9138 if test "$with_ext_mouse" = yes ; then
9139         NCURSES_MOUSE_VERSION=2
9140
9141 if test "${with_abi_version+set}" != set; then
9142         case $cf_cv_rel_version in
9143         5.*)
9144                 cf_cv_rel_version=6.0
9145                 cf_cv_abi_version=6
9146                 { echo "$as_me:9146: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9147 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9148                 ;;
9149         esac
9150 fi
9151
9152 fi
9153
9154 # Reentrant code has to be opaque; there's little advantage to making ncurses
9155 # opaque outside of that, so there is no --enable-opaque option.
9156 echo "$as_me:9156: checking if you want experimental reentrant code" >&5
9157 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9158
9159 # Check whether --enable-reentrant or --disable-reentrant was given.
9160 if test "${enable_reentrant+set}" = set; then
9161   enableval="$enable_reentrant"
9162   with_reentrant=$enableval
9163 else
9164   with_reentrant=no
9165 fi;
9166 echo "$as_me:9166: result: $with_reentrant" >&5
9167 echo "${ECHO_T}$with_reentrant" >&6
9168 if test "$with_reentrant" = yes ; then
9169         cf_cv_enable_reentrant=1
9170         cf_cv_enable_opaque="NCURSES_INTERNALS"
9171         NCURSES_OPAQUE=1
9172         NCURSES_SIZE_T=int
9173         LIB_SUFFIX="t${LIB_SUFFIX}"
9174         cat >>confdefs.h <<\EOF
9175 #define USE_REENTRANT 1
9176 EOF
9177
9178 if test "${with_abi_version+set}" != set; then
9179         case $cf_cv_rel_version in
9180         5.*)
9181                 cf_cv_rel_version=6.0
9182                 cf_cv_abi_version=6
9183                 { echo "$as_me:9183: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9184 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9185                 ;;
9186         esac
9187 fi
9188
9189 else
9190         cf_cv_enable_reentrant=0
9191         cf_cv_enable_opaque="NCURSES_OPAQUE"
9192         NCURSES_OPAQUE=0
9193         NCURSES_SIZE_T=short
9194 fi
9195
9196 echo "$as_me:9196: checking if you want experimental safe-sprintf code" >&5
9197 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9198
9199 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9200 if test "${enable_safe_sprintf+set}" = set; then
9201   enableval="$enable_safe_sprintf"
9202   with_safe_sprintf=$enableval
9203 else
9204   with_safe_sprintf=no
9205 fi;
9206 echo "$as_me:9206: result: $with_safe_sprintf" >&5
9207 echo "${ECHO_T}$with_safe_sprintf" >&6
9208 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9209 #define USE_SAFE_SPRINTF 1
9210 EOF
9211
9212 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9213 # when hashmap is used scroll hints are useless
9214 if test "$with_hashmap" = no ; then
9215 echo "$as_me:9215: checking if you want to experiment without scrolling-hints code" >&5
9216 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9217
9218 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9219 if test "${enable_scroll_hints+set}" = set; then
9220   enableval="$enable_scroll_hints"
9221   with_scroll_hints=$enableval
9222 else
9223   with_scroll_hints=yes
9224 fi;
9225 echo "$as_me:9225: result: $with_scroll_hints" >&5
9226 echo "${ECHO_T}$with_scroll_hints" >&6
9227 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9228 #define USE_SCROLL_HINTS 1
9229 EOF
9230
9231 fi
9232
9233 echo "$as_me:9233: checking if you want experimental wgetch-events code" >&5
9234 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9235
9236 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9237 if test "${enable_wgetch_events+set}" = set; then
9238   enableval="$enable_wgetch_events"
9239   with_wgetch_events=$enableval
9240 else
9241   with_wgetch_events=no
9242 fi;
9243 echo "$as_me:9243: result: $with_wgetch_events" >&5
9244 echo "${ECHO_T}$with_wgetch_events" >&6
9245 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9246 #define NCURSES_WGETCH_EVENTS 1
9247 EOF
9248
9249 ###############################################################################
9250
9251 ###     use option --disable-echo to suppress full display compiling commands
9252 echo "$as_me:9252: checking if you want to display full commands during build" >&5
9253 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9254
9255 # Check whether --enable-echo or --disable-echo was given.
9256 if test "${enable_echo+set}" = set; then
9257   enableval="$enable_echo"
9258   with_echo=$enableval
9259 else
9260   with_echo=yes
9261 fi;
9262 if test "$with_echo" = yes; then
9263         ECHO_LINK=
9264 else
9265         ECHO_LINK='@ echo linking $@ ... ;'
9266         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9267         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9268 fi
9269 echo "$as_me:9269: result: $with_echo" >&5
9270 echo "${ECHO_T}$with_echo" >&6
9271
9272 ###     use option --enable-warnings to turn on all gcc warnings
9273 echo "$as_me:9273: checking if you want to see compiler warnings" >&5
9274 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9275
9276 # Check whether --enable-warnings or --disable-warnings was given.
9277 if test "${enable_warnings+set}" = set; then
9278   enableval="$enable_warnings"
9279   with_warnings=$enableval
9280 fi;
9281 echo "$as_me:9281: result: $with_warnings" >&5
9282 echo "${ECHO_T}$with_warnings" >&6
9283
9284 if test -n "$with_warnings"; then
9285         ADAFLAGS="$ADAFLAGS -gnatg"
9286
9287 INTEL_COMPILER=no
9288
9289 if test "$GCC" = yes ; then
9290         case $host_os in
9291         linux*|gnu*)
9292                 echo "$as_me:9292: checking if this is really Intel C compiler" >&5
9293 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9294                 cf_save_CFLAGS="$CFLAGS"
9295                 CFLAGS="$CFLAGS -no-gcc"
9296                 cat >conftest.$ac_ext <<_ACEOF
9297 #line 9297 "configure"
9298 #include "confdefs.h"
9299
9300 int
9301 main ()
9302 {
9303
9304 #ifdef __INTEL_COMPILER
9305 #else
9306 make an error
9307 #endif
9308
9309   ;
9310   return 0;
9311 }
9312 _ACEOF
9313 rm -f conftest.$ac_objext
9314 if { (eval echo "$as_me:9314: \"$ac_compile\"") >&5
9315   (eval $ac_compile) 2>&5
9316   ac_status=$?
9317   echo "$as_me:9317: \$? = $ac_status" >&5
9318   (exit $ac_status); } &&
9319          { ac_try='test -s conftest.$ac_objext'
9320   { (eval echo "$as_me:9320: \"$ac_try\"") >&5
9321   (eval $ac_try) 2>&5
9322   ac_status=$?
9323   echo "$as_me:9323: \$? = $ac_status" >&5
9324   (exit $ac_status); }; }; then
9325   INTEL_COMPILER=yes
9326 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9327
9328 else
9329   echo "$as_me: failed program was:" >&5
9330 cat conftest.$ac_ext >&5
9331 fi
9332 rm -f conftest.$ac_objext conftest.$ac_ext
9333                 CFLAGS="$cf_save_CFLAGS"
9334                 echo "$as_me:9334: result: $INTEL_COMPILER" >&5
9335 echo "${ECHO_T}$INTEL_COMPILER" >&6
9336                 ;;
9337         esac
9338 fi
9339
9340 cat > conftest.$ac_ext <<EOF
9341 #line 9341 "configure"
9342 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9343 EOF
9344
9345 if test "$INTEL_COMPILER" = yes
9346 then
9347 # The "-wdXXX" options suppress warnings:
9348 # remark #1419: external declaration in primary source file
9349 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9350 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9351 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9352 # remark #193: zero used for undefined preprocessing identifier
9353 # remark #593: variable "curs_sb_left_arrow" was set but never used
9354 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9355 # remark #869: parameter "tw" was never referenced
9356 # remark #981: operands are evaluated in unspecified order
9357 # warning #269: invalid format string conversion
9358
9359         { echo "$as_me:9359: checking for $CC warning options..." >&5
9360 echo "$as_me: checking for $CC warning options..." >&6;}
9361         cf_save_CFLAGS="$CFLAGS"
9362         EXTRA_CFLAGS="-Wall"
9363         for cf_opt in \
9364                 wd1419 \
9365                 wd1682 \
9366                 wd1683 \
9367                 wd1684 \
9368                 wd193 \
9369                 wd279 \
9370                 wd593 \
9371                 wd810 \
9372                 wd869 \
9373                 wd981
9374         do
9375                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9376                 if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5
9377   (eval $ac_compile) 2>&5
9378   ac_status=$?
9379   echo "$as_me:9379: \$? = $ac_status" >&5
9380   (exit $ac_status); }; then
9381                         test -n "$verbose" && echo "$as_me:9381: result: ... -$cf_opt" >&5
9382 echo "${ECHO_T}... -$cf_opt" >&6
9383                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9384                 fi
9385         done
9386         CFLAGS="$cf_save_CFLAGS"
9387
9388 elif test "$GCC" = yes
9389 then
9390         { echo "$as_me:9390: checking for $CC warning options..." >&5
9391 echo "$as_me: checking for $CC warning options..." >&6;}
9392         cf_save_CFLAGS="$CFLAGS"
9393         EXTRA_CFLAGS="-W -Wall"
9394         cf_warn_CONST=""
9395         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9396         for cf_opt in \
9397                 Wbad-function-cast \
9398                 Wcast-align \
9399                 Wcast-qual \
9400                 Winline \
9401                 Wmissing-declarations \
9402                 Wmissing-prototypes \
9403                 Wnested-externs \
9404                 Wpointer-arith \
9405                 Wshadow \
9406                 Wstrict-prototypes \
9407                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9408         do
9409                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9410                 if { (eval echo "$as_me:9410: \"$ac_compile\"") >&5
9411   (eval $ac_compile) 2>&5
9412   ac_status=$?
9413   echo "$as_me:9413: \$? = $ac_status" >&5
9414   (exit $ac_status); }; then
9415                         test -n "$verbose" && echo "$as_me:9415: result: ... -$cf_opt" >&5
9416 echo "${ECHO_T}... -$cf_opt" >&6
9417                         case $cf_opt in #(vi
9418                         Wcast-qual) #(vi
9419                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9420                                 ;;
9421                         Winline) #(vi
9422                                 case $GCC_VERSION in
9423                                 3.3*)
9424                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9425
9426                                         continue;;
9427                                 esac
9428                                 ;;
9429                         esac
9430                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9431                 fi
9432         done
9433         CFLAGS="$cf_save_CFLAGS"
9434 fi
9435 rm -f conftest*
9436
9437         if test "$cf_with_cxx" = yes ; then
9438
9439 INTEL_CPLUSPLUS=no
9440
9441 if test "$GCC" = yes ; then
9442         case $host_os in
9443         linux*|gnu*)
9444                 echo "$as_me:9444: checking if this is really Intel C++ compiler" >&5
9445 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9446                 cf_save_CFLAGS="$CXXFLAGS"
9447                 CXXFLAGS="$CXXFLAGS -no-gcc"
9448                 cat >conftest.$ac_ext <<_ACEOF
9449 #line 9449 "configure"
9450 #include "confdefs.h"
9451
9452 int
9453 main ()
9454 {
9455
9456 #ifdef __INTEL_COMPILER
9457 #else
9458 make an error
9459 #endif
9460
9461   ;
9462   return 0;
9463 }
9464 _ACEOF
9465 rm -f conftest.$ac_objext
9466 if { (eval echo "$as_me:9466: \"$ac_compile\"") >&5
9467   (eval $ac_compile) 2>&5
9468   ac_status=$?
9469   echo "$as_me:9469: \$? = $ac_status" >&5
9470   (exit $ac_status); } &&
9471          { ac_try='test -s conftest.$ac_objext'
9472   { (eval echo "$as_me:9472: \"$ac_try\"") >&5
9473   (eval $ac_try) 2>&5
9474   ac_status=$?
9475   echo "$as_me:9475: \$? = $ac_status" >&5
9476   (exit $ac_status); }; }; then
9477   INTEL_CPLUSPLUS=yes
9478 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9479
9480 else
9481   echo "$as_me: failed program was:" >&5
9482 cat conftest.$ac_ext >&5
9483 fi
9484 rm -f conftest.$ac_objext conftest.$ac_ext
9485                 CXXFLAGS="$cf_save_CFLAGS"
9486                 echo "$as_me:9486: result: $INTEL_CPLUSPLUS" >&5
9487 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9488                 ;;
9489         esac
9490 fi
9491
9492 ac_ext=cc
9493 ac_cpp='$CXXCPP $CPPFLAGS'
9494 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9495 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9496 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9497 ac_main_return=return
9498
9499 cat > conftest.$ac_ext <<EOF
9500 #line 9500 "configure"
9501 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9502 EOF
9503
9504 if test "$INTEL_CPLUSPLUS" = yes
9505 then
9506 # The "-wdXXX" options suppress warnings:
9507 # remark #1419: external declaration in primary source file
9508 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9509 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9510 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9511 # remark #193: zero used for undefined preprocessing identifier
9512 # remark #593: variable "curs_sb_left_arrow" was set but never used
9513 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9514 # remark #869: parameter "tw" was never referenced
9515 # remark #981: operands are evaluated in unspecified order
9516 # warning #269: invalid format string conversion
9517
9518         { echo "$as_me:9518: checking for $CC warning options..." >&5
9519 echo "$as_me: checking for $CC warning options..." >&6;}
9520         cf_save_CXXFLAGS="$CXXFLAGS"
9521         EXTRA_CXXFLAGS="-Wall"
9522         for cf_opt in \
9523                 wd1419 \
9524                 wd1682 \
9525                 wd1683 \
9526                 wd1684 \
9527                 wd193 \
9528                 wd279 \
9529                 wd593 \
9530                 wd810 \
9531                 wd869 \
9532                 wd981
9533         do
9534                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9535                 if { (eval echo "$as_me:9535: \"$ac_compile\"") >&5
9536   (eval $ac_compile) 2>&5
9537   ac_status=$?
9538   echo "$as_me:9538: \$? = $ac_status" >&5
9539   (exit $ac_status); }; then
9540                         test -n "$verbose" && echo "$as_me:9540: result: ... -$cf_opt" >&5
9541 echo "${ECHO_T}... -$cf_opt" >&6
9542                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9543                 fi
9544         done
9545         CXXFLAGS="$cf_save_CXXFLAGS"
9546
9547 elif test "$GXX" = yes
9548 then
9549         { echo "$as_me:9549: checking for $CXX warning options..." >&5
9550 echo "$as_me: checking for $CXX warning options..." >&6;}
9551         cf_save_CXXFLAGS="$CXXFLAGS"
9552         EXTRA_CXXFLAGS="-W -Wall"
9553         cf_gxx_extra_warnings=""
9554         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9555         case "$GCC_VERSION" in
9556         [1-2].*)
9557                 ;;
9558         *)
9559                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9560                 ;;
9561         esac
9562         for cf_opt in \
9563                 Wabi \
9564                 fabi-version=0 \
9565                 Woverloaded-virtual \
9566                 Wsign-promo \
9567                 Wsynth \
9568                 Wold-style-cast \
9569                 Wcast-align \
9570                 Wcast-qual \
9571                 Wmissing-prototypes \
9572                 Wpointer-arith \
9573                 Wshadow \
9574                 Wstrict-prototypes \
9575                 Wundef $cf_gxx_extra_warnings Wno-unused
9576         do
9577                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9578                 if { (eval echo "$as_me:9578: \"$ac_compile\"") >&5
9579   (eval $ac_compile) 2>&5
9580   ac_status=$?
9581   echo "$as_me:9581: \$? = $ac_status" >&5
9582   (exit $ac_status); }; then
9583                         test -n "$verbose" && echo "$as_me:9583: result: ... -$cf_opt" >&5
9584 echo "${ECHO_T}... -$cf_opt" >&6
9585                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9586                 else
9587                         test -n "$verbose" && echo "$as_me:9587: result: ... no -$cf_opt" >&5
9588 echo "${ECHO_T}... no -$cf_opt" >&6
9589                 fi
9590         done
9591         CXXFLAGS="$cf_save_CXXFLAGS"
9592 fi
9593
9594 rm -f conftest*
9595 ac_ext=c
9596 ac_cpp='$CPP $CPPFLAGS'
9597 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9598 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9599 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9600 ac_main_return=return
9601
9602         fi
9603 fi
9604
9605 if test "$GCC" = yes
9606 then
9607 cat > conftest.i <<EOF
9608 #ifndef GCC_PRINTF
9609 #define GCC_PRINTF 0
9610 #endif
9611 #ifndef GCC_SCANF
9612 #define GCC_SCANF 0
9613 #endif
9614 #ifndef GCC_NORETURN
9615 #define GCC_NORETURN /* nothing */
9616 #endif
9617 #ifndef GCC_UNUSED
9618 #define GCC_UNUSED /* nothing */
9619 #endif
9620 EOF
9621 if test "$GCC" = yes
9622 then
9623         { echo "$as_me:9623: checking for $CC __attribute__ directives..." >&5
9624 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9625 cat > conftest.$ac_ext <<EOF
9626 #line 9626 "configure"
9627 #include "confdefs.h"
9628 #include "conftest.h"
9629 #include "conftest.i"
9630 #if     GCC_PRINTF
9631 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9632 #else
9633 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9634 #endif
9635 #if     GCC_SCANF
9636 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9637 #else
9638 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9639 #endif
9640 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9641 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9642 extern void foo(void) GCC_NORETURN;
9643 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9644 EOF
9645         for cf_attribute in scanf printf unused noreturn
9646         do
9647
9648 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9649
9650                 cf_directive="__attribute__(($cf_attribute))"
9651                 echo "checking for $CC $cf_directive" 1>&5
9652                 case $cf_attribute in
9653                 scanf|printf)
9654                 cat >conftest.h <<EOF
9655 #define GCC_$cf_ATTRIBUTE 1
9656 EOF
9657                         ;;
9658                 *)
9659                 cat >conftest.h <<EOF
9660 #define GCC_$cf_ATTRIBUTE $cf_directive
9661 EOF
9662                         ;;
9663                 esac
9664                 if { (eval echo "$as_me:9664: \"$ac_compile\"") >&5
9665   (eval $ac_compile) 2>&5
9666   ac_status=$?
9667   echo "$as_me:9667: \$? = $ac_status" >&5
9668   (exit $ac_status); }; then
9669                         test -n "$verbose" && echo "$as_me:9669: result: ... $cf_attribute" >&5
9670 echo "${ECHO_T}... $cf_attribute" >&6
9671                         cat conftest.h >>confdefs.h
9672                 fi
9673         done
9674 else
9675         fgrep define conftest.i >>confdefs.h
9676 fi
9677 rm -rf conftest*
9678 fi
9679
9680 ###     use option --enable-assertions to turn on generation of assertion code
9681 echo "$as_me:9681: checking if you want to enable runtime assertions" >&5
9682 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9683
9684 # Check whether --enable-assertions or --disable-assertions was given.
9685 if test "${enable_assertions+set}" = set; then
9686   enableval="$enable_assertions"
9687   with_assertions=$enableval
9688 else
9689   with_assertions=no
9690 fi;
9691 echo "$as_me:9691: result: $with_assertions" >&5
9692 echo "${ECHO_T}$with_assertions" >&6
9693 if test -n "$GCC"
9694 then
9695         if test "$with_assertions" = no
9696         then
9697                 cat >>confdefs.h <<\EOF
9698 #define NDEBUG 1
9699 EOF
9700
9701                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9702         else
9703                 ADAFLAGS="$ADAFLAGS -gnata"
9704         fi
9705 fi
9706
9707 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9708
9709 echo "$as_me:9709: checking if you want to use dmalloc for testing" >&5
9710 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9711
9712 # Check whether --with-dmalloc or --without-dmalloc was given.
9713 if test "${with_dmalloc+set}" = set; then
9714   withval="$with_dmalloc"
9715   cat >>confdefs.h <<\EOF
9716 #define USE_DMALLOC 1
9717 EOF
9718
9719         : ${with_cflags:=-g}
9720         : ${with_no_leaks:=yes}
9721          with_dmalloc=yes
9722 else
9723   with_dmalloc=
9724 fi;
9725 echo "$as_me:9725: result: ${with_dmalloc:-no}" >&5
9726 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9727
9728 case .$with_cflags in #(vi
9729 .*-g*)
9730         case .$CFLAGS in #(vi
9731         .*-g*) #(vi
9732                 ;;
9733         *)
9734
9735 cf_fix_cppflags=no
9736 cf_new_cflags=
9737 cf_new_cppflags=
9738 cf_new_extra_cppflags=
9739
9740 for cf_add_cflags in -g
9741 do
9742 case $cf_fix_cppflags in
9743 no)
9744         case $cf_add_cflags in #(vi
9745         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9746                 case $cf_add_cflags in
9747                 -D*)
9748                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9749
9750                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9751                         && test -z "${cf_tst_cflags}" \
9752                         && cf_fix_cppflags=yes
9753
9754                         if test $cf_fix_cppflags = yes ; then
9755                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9756                                 continue
9757                         elif test "${cf_tst_cflags}" = "\"'" ; then
9758                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9759                                 continue
9760                         fi
9761                         ;;
9762                 esac
9763                 case "$CPPFLAGS" in
9764                 *$cf_add_cflags) #(vi
9765                         ;;
9766                 *) #(vi
9767                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9768                         ;;
9769                 esac
9770                 ;;
9771         *)
9772                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9773                 ;;
9774         esac
9775         ;;
9776 yes)
9777         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9778
9779         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9780
9781         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9782         && test -z "${cf_tst_cflags}" \
9783         && cf_fix_cppflags=no
9784         ;;
9785 esac
9786 done
9787
9788 if test -n "$cf_new_cflags" ; then
9789
9790         CFLAGS="$CFLAGS $cf_new_cflags"
9791 fi
9792
9793 if test -n "$cf_new_cppflags" ; then
9794
9795         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9796 fi
9797
9798 if test -n "$cf_new_extra_cppflags" ; then
9799
9800         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9801 fi
9802
9803                 ;;
9804         esac
9805         ;;
9806 esac
9807
9808 if test "$with_dmalloc" = yes ; then
9809         echo "$as_me:9809: checking for dmalloc.h" >&5
9810 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9811 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9812   echo $ECHO_N "(cached) $ECHO_C" >&6
9813 else
9814   cat >conftest.$ac_ext <<_ACEOF
9815 #line 9815 "configure"
9816 #include "confdefs.h"
9817 #include <dmalloc.h>
9818 _ACEOF
9819 if { (eval echo "$as_me:9819: \"$ac_cpp conftest.$ac_ext\"") >&5
9820   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9821   ac_status=$?
9822   egrep -v '^ *\+' conftest.er1 >conftest.err
9823   rm -f conftest.er1
9824   cat conftest.err >&5
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); } >/dev/null; then
9827   if test -s conftest.err; then
9828     ac_cpp_err=$ac_c_preproc_warn_flag
9829   else
9830     ac_cpp_err=
9831   fi
9832 else
9833   ac_cpp_err=yes
9834 fi
9835 if test -z "$ac_cpp_err"; then
9836   ac_cv_header_dmalloc_h=yes
9837 else
9838   echo "$as_me: failed program was:" >&5
9839   cat conftest.$ac_ext >&5
9840   ac_cv_header_dmalloc_h=no
9841 fi
9842 rm -f conftest.err conftest.$ac_ext
9843 fi
9844 echo "$as_me:9844: result: $ac_cv_header_dmalloc_h" >&5
9845 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9846 if test $ac_cv_header_dmalloc_h = yes; then
9847
9848 echo "$as_me:9848: checking for dmalloc_debug in -ldmalloc" >&5
9849 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9850 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9851   echo $ECHO_N "(cached) $ECHO_C" >&6
9852 else
9853   ac_check_lib_save_LIBS=$LIBS
9854 LIBS="-ldmalloc  $LIBS"
9855 cat >conftest.$ac_ext <<_ACEOF
9856 #line 9856 "configure"
9857 #include "confdefs.h"
9858
9859 /* Override any gcc2 internal prototype to avoid an error.  */
9860 #ifdef __cplusplus
9861 extern "C"
9862 #endif
9863 /* We use char because int might match the return type of a gcc2
9864    builtin and then its argument prototype would still apply.  */
9865 char dmalloc_debug ();
9866 int
9867 main ()
9868 {
9869 dmalloc_debug ();
9870   ;
9871   return 0;
9872 }
9873 _ACEOF
9874 rm -f conftest.$ac_objext conftest$ac_exeext
9875 if { (eval echo "$as_me:9875: \"$ac_link\"") >&5
9876   (eval $ac_link) 2>&5
9877   ac_status=$?
9878   echo "$as_me:9878: \$? = $ac_status" >&5
9879   (exit $ac_status); } &&
9880          { ac_try='test -s conftest$ac_exeext'
9881   { (eval echo "$as_me:9881: \"$ac_try\"") >&5
9882   (eval $ac_try) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); }; }; then
9886   ac_cv_lib_dmalloc_dmalloc_debug=yes
9887 else
9888   echo "$as_me: failed program was:" >&5
9889 cat conftest.$ac_ext >&5
9890 ac_cv_lib_dmalloc_dmalloc_debug=no
9891 fi
9892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9893 LIBS=$ac_check_lib_save_LIBS
9894 fi
9895 echo "$as_me:9895: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9896 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9897 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9898   cat >>confdefs.h <<EOF
9899 #define HAVE_LIBDMALLOC 1
9900 EOF
9901
9902   LIBS="-ldmalloc $LIBS"
9903
9904 fi
9905
9906 fi
9907
9908 fi
9909
9910 echo "$as_me:9910: checking if you want to use dbmalloc for testing" >&5
9911 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9912
9913 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9914 if test "${with_dbmalloc+set}" = set; then
9915   withval="$with_dbmalloc"
9916   cat >>confdefs.h <<\EOF
9917 #define USE_DBMALLOC 1
9918 EOF
9919
9920         : ${with_cflags:=-g}
9921         : ${with_no_leaks:=yes}
9922          with_dbmalloc=yes
9923 else
9924   with_dbmalloc=
9925 fi;
9926 echo "$as_me:9926: result: ${with_dbmalloc:-no}" >&5
9927 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9928
9929 case .$with_cflags in #(vi
9930 .*-g*)
9931         case .$CFLAGS in #(vi
9932         .*-g*) #(vi
9933                 ;;
9934         *)
9935
9936 cf_fix_cppflags=no
9937 cf_new_cflags=
9938 cf_new_cppflags=
9939 cf_new_extra_cppflags=
9940
9941 for cf_add_cflags in -g
9942 do
9943 case $cf_fix_cppflags in
9944 no)
9945         case $cf_add_cflags in #(vi
9946         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9947                 case $cf_add_cflags in
9948                 -D*)
9949                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9950
9951                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9952                         && test -z "${cf_tst_cflags}" \
9953                         && cf_fix_cppflags=yes
9954
9955                         if test $cf_fix_cppflags = yes ; then
9956                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9957                                 continue
9958                         elif test "${cf_tst_cflags}" = "\"'" ; then
9959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9960                                 continue
9961                         fi
9962                         ;;
9963                 esac
9964                 case "$CPPFLAGS" in
9965                 *$cf_add_cflags) #(vi
9966                         ;;
9967                 *) #(vi
9968                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9969                         ;;
9970                 esac
9971                 ;;
9972         *)
9973                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9974                 ;;
9975         esac
9976         ;;
9977 yes)
9978         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9979
9980         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9981
9982         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9983         && test -z "${cf_tst_cflags}" \
9984         && cf_fix_cppflags=no
9985         ;;
9986 esac
9987 done
9988
9989 if test -n "$cf_new_cflags" ; then
9990
9991         CFLAGS="$CFLAGS $cf_new_cflags"
9992 fi
9993
9994 if test -n "$cf_new_cppflags" ; then
9995
9996         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9997 fi
9998
9999 if test -n "$cf_new_extra_cppflags" ; then
10000
10001         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10002 fi
10003
10004                 ;;
10005         esac
10006         ;;
10007 esac
10008
10009 if test "$with_dbmalloc" = yes ; then
10010         echo "$as_me:10010: checking for dbmalloc.h" >&5
10011 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10012 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10013   echo $ECHO_N "(cached) $ECHO_C" >&6
10014 else
10015   cat >conftest.$ac_ext <<_ACEOF
10016 #line 10016 "configure"
10017 #include "confdefs.h"
10018 #include <dbmalloc.h>
10019 _ACEOF
10020 if { (eval echo "$as_me:10020: \"$ac_cpp conftest.$ac_ext\"") >&5
10021   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10022   ac_status=$?
10023   egrep -v '^ *\+' conftest.er1 >conftest.err
10024   rm -f conftest.er1
10025   cat conftest.err >&5
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); } >/dev/null; then
10028   if test -s conftest.err; then
10029     ac_cpp_err=$ac_c_preproc_warn_flag
10030   else
10031     ac_cpp_err=
10032   fi
10033 else
10034   ac_cpp_err=yes
10035 fi
10036 if test -z "$ac_cpp_err"; then
10037   ac_cv_header_dbmalloc_h=yes
10038 else
10039   echo "$as_me: failed program was:" >&5
10040   cat conftest.$ac_ext >&5
10041   ac_cv_header_dbmalloc_h=no
10042 fi
10043 rm -f conftest.err conftest.$ac_ext
10044 fi
10045 echo "$as_me:10045: result: $ac_cv_header_dbmalloc_h" >&5
10046 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10047 if test $ac_cv_header_dbmalloc_h = yes; then
10048
10049 echo "$as_me:10049: checking for debug_malloc in -ldbmalloc" >&5
10050 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10051 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10052   echo $ECHO_N "(cached) $ECHO_C" >&6
10053 else
10054   ac_check_lib_save_LIBS=$LIBS
10055 LIBS="-ldbmalloc  $LIBS"
10056 cat >conftest.$ac_ext <<_ACEOF
10057 #line 10057 "configure"
10058 #include "confdefs.h"
10059
10060 /* Override any gcc2 internal prototype to avoid an error.  */
10061 #ifdef __cplusplus
10062 extern "C"
10063 #endif
10064 /* We use char because int might match the return type of a gcc2
10065    builtin and then its argument prototype would still apply.  */
10066 char debug_malloc ();
10067 int
10068 main ()
10069 {
10070 debug_malloc ();
10071   ;
10072   return 0;
10073 }
10074 _ACEOF
10075 rm -f conftest.$ac_objext conftest$ac_exeext
10076 if { (eval echo "$as_me:10076: \"$ac_link\"") >&5
10077   (eval $ac_link) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); } &&
10081          { ac_try='test -s conftest$ac_exeext'
10082   { (eval echo "$as_me:10082: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   ac_cv_lib_dbmalloc_debug_malloc=yes
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10091 ac_cv_lib_dbmalloc_debug_malloc=no
10092 fi
10093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10094 LIBS=$ac_check_lib_save_LIBS
10095 fi
10096 echo "$as_me:10096: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10097 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10098 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10099   cat >>confdefs.h <<EOF
10100 #define HAVE_LIBDBMALLOC 1
10101 EOF
10102
10103   LIBS="-ldbmalloc $LIBS"
10104
10105 fi
10106
10107 fi
10108
10109 fi
10110
10111 echo "$as_me:10111: checking if you want to use valgrind for testing" >&5
10112 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10113
10114 # Check whether --with-valgrind or --without-valgrind was given.
10115 if test "${with_valgrind+set}" = set; then
10116   withval="$with_valgrind"
10117   cat >>confdefs.h <<\EOF
10118 #define USE_VALGRIND 1
10119 EOF
10120
10121         : ${with_cflags:=-g}
10122         : ${with_no_leaks:=yes}
10123          with_valgrind=yes
10124 else
10125   with_valgrind=
10126 fi;
10127 echo "$as_me:10127: result: ${with_valgrind:-no}" >&5
10128 echo "${ECHO_T}${with_valgrind:-no}" >&6
10129
10130 case .$with_cflags in #(vi
10131 .*-g*)
10132         case .$CFLAGS in #(vi
10133         .*-g*) #(vi
10134                 ;;
10135         *)
10136
10137 cf_fix_cppflags=no
10138 cf_new_cflags=
10139 cf_new_cppflags=
10140 cf_new_extra_cppflags=
10141
10142 for cf_add_cflags in -g
10143 do
10144 case $cf_fix_cppflags in
10145 no)
10146         case $cf_add_cflags in #(vi
10147         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10148                 case $cf_add_cflags in
10149                 -D*)
10150                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10151
10152                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10153                         && test -z "${cf_tst_cflags}" \
10154                         && cf_fix_cppflags=yes
10155
10156                         if test $cf_fix_cppflags = yes ; then
10157                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10158                                 continue
10159                         elif test "${cf_tst_cflags}" = "\"'" ; then
10160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10161                                 continue
10162                         fi
10163                         ;;
10164                 esac
10165                 case "$CPPFLAGS" in
10166                 *$cf_add_cflags) #(vi
10167                         ;;
10168                 *) #(vi
10169                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10170                         ;;
10171                 esac
10172                 ;;
10173         *)
10174                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10175                 ;;
10176         esac
10177         ;;
10178 yes)
10179         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10180
10181         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10182
10183         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10184         && test -z "${cf_tst_cflags}" \
10185         && cf_fix_cppflags=no
10186         ;;
10187 esac
10188 done
10189
10190 if test -n "$cf_new_cflags" ; then
10191
10192         CFLAGS="$CFLAGS $cf_new_cflags"
10193 fi
10194
10195 if test -n "$cf_new_cppflags" ; then
10196
10197         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10198 fi
10199
10200 if test -n "$cf_new_extra_cppflags" ; then
10201
10202         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10203 fi
10204
10205                 ;;
10206         esac
10207         ;;
10208 esac
10209
10210 echo "$as_me:10210: checking if you want to perform memory-leak testing" >&5
10211 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10212
10213 # Check whether --enable-leaks or --disable-leaks was given.
10214 if test "${enable_leaks+set}" = set; then
10215   enableval="$enable_leaks"
10216   with_no_leaks=yes
10217 else
10218   : ${with_no_leaks:=no}
10219 fi;
10220 echo "$as_me:10220: result: $with_no_leaks" >&5
10221 echo "${ECHO_T}$with_no_leaks" >&6
10222
10223 if test "$with_no_leaks" = yes ; then
10224         cat >>confdefs.h <<\EOF
10225 #define NO_LEAKS 1
10226 EOF
10227
10228 fi
10229
10230 cat >>confdefs.h <<\EOF
10231 #define HAVE_NC_ALLOC_H 1
10232 EOF
10233
10234 ###     use option --enable-expanded to generate certain macros as functions
10235
10236 # Check whether --enable-expanded or --disable-expanded was given.
10237 if test "${enable_expanded+set}" = set; then
10238   enableval="$enable_expanded"
10239   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10240 #define NCURSES_EXPANDED 1
10241 EOF
10242
10243 fi;
10244
10245 ###     use option --disable-macros to suppress macros in favor of functions
10246
10247 # Check whether --enable-macros or --disable-macros was given.
10248 if test "${enable_macros+set}" = set; then
10249   enableval="$enable_macros"
10250   test "$enableval" = no && cat >>confdefs.h <<\EOF
10251 #define NCURSES_NOMACROS 1
10252 EOF
10253
10254 fi;
10255
10256 # Normally we only add trace() to the debug-library.  Allow this to be
10257 # extended to all models of the ncurses library:
10258 cf_all_traces=no
10259 case "$CFLAGS $CPPFLAGS" in
10260 *-DTRACE*)
10261         cf_all_traces=yes
10262         ;;
10263 esac
10264
10265 echo "$as_me:10265: checking whether to add trace feature to all models" >&5
10266 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10267
10268 # Check whether --with-trace or --without-trace was given.
10269 if test "${with_trace+set}" = set; then
10270   withval="$with_trace"
10271   cf_with_trace=$withval
10272 else
10273   cf_with_trace=$cf_all_traces
10274 fi;
10275 echo "$as_me:10275: result: $cf_with_trace" >&5
10276 echo "${ECHO_T}$cf_with_trace" >&6
10277
10278 if test "$cf_with_trace" = yes ; then
10279         LIB_TRACING=all
10280         ADA_TRACE=TRUE
10281
10282 cf_fix_cppflags=no
10283 cf_new_cflags=
10284 cf_new_cppflags=
10285 cf_new_extra_cppflags=
10286
10287 for cf_add_cflags in -DTRACE
10288 do
10289 case $cf_fix_cppflags in
10290 no)
10291         case $cf_add_cflags in #(vi
10292         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10293                 case $cf_add_cflags in
10294                 -D*)
10295                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10296
10297                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10298                         && test -z "${cf_tst_cflags}" \
10299                         && cf_fix_cppflags=yes
10300
10301                         if test $cf_fix_cppflags = yes ; then
10302                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10303                                 continue
10304                         elif test "${cf_tst_cflags}" = "\"'" ; then
10305                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10306                                 continue
10307                         fi
10308                         ;;
10309                 esac
10310                 case "$CPPFLAGS" in
10311                 *$cf_add_cflags) #(vi
10312                         ;;
10313                 *) #(vi
10314                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10315                         ;;
10316                 esac
10317                 ;;
10318         *)
10319                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10320                 ;;
10321         esac
10322         ;;
10323 yes)
10324         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10325
10326         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10327
10328         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10329         && test -z "${cf_tst_cflags}" \
10330         && cf_fix_cppflags=no
10331         ;;
10332 esac
10333 done
10334
10335 if test -n "$cf_new_cflags" ; then
10336
10337         CFLAGS="$CFLAGS $cf_new_cflags"
10338 fi
10339
10340 if test -n "$cf_new_cppflags" ; then
10341
10342         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10343 fi
10344
10345 if test -n "$cf_new_extra_cppflags" ; then
10346
10347         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10348 fi
10349
10350 else
10351         LIB_TRACING=DEBUG
10352         ADA_TRACE=FALSE
10353 fi
10354
10355 ###     Checks for libraries.
10356 echo "$as_me:10356: checking for gettimeofday" >&5
10357 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10358 if test "${ac_cv_func_gettimeofday+set}" = set; then
10359   echo $ECHO_N "(cached) $ECHO_C" >&6
10360 else
10361   cat >conftest.$ac_ext <<_ACEOF
10362 #line 10362 "configure"
10363 #include "confdefs.h"
10364 /* System header to define __stub macros and hopefully few prototypes,
10365     which can conflict with char gettimeofday (); below.  */
10366 #include <assert.h>
10367 /* Override any gcc2 internal prototype to avoid an error.  */
10368 #ifdef __cplusplus
10369 extern "C"
10370 #endif
10371 /* We use char because int might match the return type of a gcc2
10372    builtin and then its argument prototype would still apply.  */
10373 char gettimeofday ();
10374 char (*f) ();
10375
10376 int
10377 main ()
10378 {
10379 /* The GNU C library defines this for functions which it implements
10380     to always fail with ENOSYS.  Some functions are actually named
10381     something starting with __ and the normal name is an alias.  */
10382 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10383 choke me
10384 #else
10385 f = gettimeofday;
10386 #endif
10387
10388   ;
10389   return 0;
10390 }
10391 _ACEOF
10392 rm -f conftest.$ac_objext conftest$ac_exeext
10393 if { (eval echo "$as_me:10393: \"$ac_link\"") >&5
10394   (eval $ac_link) 2>&5
10395   ac_status=$?
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); } &&
10398          { ac_try='test -s conftest$ac_exeext'
10399   { (eval echo "$as_me:10399: \"$ac_try\"") >&5
10400   (eval $ac_try) 2>&5
10401   ac_status=$?
10402   echo "$as_me:10402: \$? = $ac_status" >&5
10403   (exit $ac_status); }; }; then
10404   ac_cv_func_gettimeofday=yes
10405 else
10406   echo "$as_me: failed program was:" >&5
10407 cat conftest.$ac_ext >&5
10408 ac_cv_func_gettimeofday=no
10409 fi
10410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10411 fi
10412 echo "$as_me:10412: result: $ac_cv_func_gettimeofday" >&5
10413 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10414 if test $ac_cv_func_gettimeofday = yes; then
10415   cat >>confdefs.h <<\EOF
10416 #define HAVE_GETTIMEOFDAY 1
10417 EOF
10418
10419 else
10420
10421 echo "$as_me:10421: checking for gettimeofday in -lbsd" >&5
10422 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10423 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426   ac_check_lib_save_LIBS=$LIBS
10427 LIBS="-lbsd  $LIBS"
10428 cat >conftest.$ac_ext <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431
10432 /* Override any gcc2 internal prototype to avoid an error.  */
10433 #ifdef __cplusplus
10434 extern "C"
10435 #endif
10436 /* We use char because int might match the return type of a gcc2
10437    builtin and then its argument prototype would still apply.  */
10438 char gettimeofday ();
10439 int
10440 main ()
10441 {
10442 gettimeofday ();
10443   ;
10444   return 0;
10445 }
10446 _ACEOF
10447 rm -f conftest.$ac_objext conftest$ac_exeext
10448 if { (eval echo "$as_me:10448: \"$ac_link\"") >&5
10449   (eval $ac_link) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit $ac_status); } &&
10453          { ac_try='test -s conftest$ac_exeext'
10454   { (eval echo "$as_me:10454: \"$ac_try\"") >&5
10455   (eval $ac_try) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit $ac_status); }; }; then
10459   ac_cv_lib_bsd_gettimeofday=yes
10460 else
10461   echo "$as_me: failed program was:" >&5
10462 cat conftest.$ac_ext >&5
10463 ac_cv_lib_bsd_gettimeofday=no
10464 fi
10465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10466 LIBS=$ac_check_lib_save_LIBS
10467 fi
10468 echo "$as_me:10468: result: $ac_cv_lib_bsd_gettimeofday" >&5
10469 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10470 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10471   cat >>confdefs.h <<\EOF
10472 #define HAVE_GETTIMEOFDAY 1
10473 EOF
10474
10475         LIBS="$LIBS -lbsd"
10476 fi
10477
10478 fi
10479
10480 echo "$as_me:10480: checking if -lm needed for math functions" >&5
10481 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10482 if test "${cf_cv_need_libm+set}" = set; then
10483   echo $ECHO_N "(cached) $ECHO_C" >&6
10484 else
10485
10486         cat >conftest.$ac_ext <<_ACEOF
10487 #line 10487 "configure"
10488 #include "confdefs.h"
10489
10490         #include <stdio.h>
10491         #include <math.h>
10492
10493 int
10494 main ()
10495 {
10496 double x = rand(); printf("result = %g\n", sin(x))
10497   ;
10498   return 0;
10499 }
10500 _ACEOF
10501 rm -f conftest.$ac_objext conftest$ac_exeext
10502 if { (eval echo "$as_me:10502: \"$ac_link\"") >&5
10503   (eval $ac_link) 2>&5
10504   ac_status=$?
10505   echo "$as_me:10505: \$? = $ac_status" >&5
10506   (exit $ac_status); } &&
10507          { ac_try='test -s conftest$ac_exeext'
10508   { (eval echo "$as_me:10508: \"$ac_try\"") >&5
10509   (eval $ac_try) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit $ac_status); }; }; then
10513   cf_cv_need_libm=no
10514 else
10515   echo "$as_me: failed program was:" >&5
10516 cat conftest.$ac_ext >&5
10517 cf_cv_need_libm=yes
10518 fi
10519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10520 fi
10521 echo "$as_me:10521: result: $cf_cv_need_libm" >&5
10522 echo "${ECHO_T}$cf_cv_need_libm" >&6
10523 if test "$cf_cv_need_libm" = yes
10524 then
10525 MATH_LIB=-lm
10526 fi
10527
10528 ###     Checks for header files.
10529 echo "$as_me:10529: checking for ANSI C header files" >&5
10530 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10531 if test "${ac_cv_header_stdc+set}" = set; then
10532   echo $ECHO_N "(cached) $ECHO_C" >&6
10533 else
10534   cat >conftest.$ac_ext <<_ACEOF
10535 #line 10535 "configure"
10536 #include "confdefs.h"
10537 #include <stdlib.h>
10538 #include <stdarg.h>
10539 #include <string.h>
10540 #include <float.h>
10541
10542 _ACEOF
10543 if { (eval echo "$as_me:10543: \"$ac_cpp conftest.$ac_ext\"") >&5
10544   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10545   ac_status=$?
10546   egrep -v '^ *\+' conftest.er1 >conftest.err
10547   rm -f conftest.er1
10548   cat conftest.err >&5
10549   echo "$as_me:10549: \$? = $ac_status" >&5
10550   (exit $ac_status); } >/dev/null; then
10551   if test -s conftest.err; then
10552     ac_cpp_err=$ac_c_preproc_warn_flag
10553   else
10554     ac_cpp_err=
10555   fi
10556 else
10557   ac_cpp_err=yes
10558 fi
10559 if test -z "$ac_cpp_err"; then
10560   ac_cv_header_stdc=yes
10561 else
10562   echo "$as_me: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   ac_cv_header_stdc=no
10565 fi
10566 rm -f conftest.err conftest.$ac_ext
10567
10568 if test $ac_cv_header_stdc = yes; then
10569   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10570   cat >conftest.$ac_ext <<_ACEOF
10571 #line 10571 "configure"
10572 #include "confdefs.h"
10573 #include <string.h>
10574
10575 _ACEOF
10576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10577   egrep "memchr" >/dev/null 2>&1; then
10578   :
10579 else
10580   ac_cv_header_stdc=no
10581 fi
10582 rm -f conftest*
10583
10584 fi
10585
10586 if test $ac_cv_header_stdc = yes; then
10587   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10588   cat >conftest.$ac_ext <<_ACEOF
10589 #line 10589 "configure"
10590 #include "confdefs.h"
10591 #include <stdlib.h>
10592
10593 _ACEOF
10594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10595   egrep "free" >/dev/null 2>&1; then
10596   :
10597 else
10598   ac_cv_header_stdc=no
10599 fi
10600 rm -f conftest*
10601
10602 fi
10603
10604 if test $ac_cv_header_stdc = yes; then
10605   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10606   if test "$cross_compiling" = yes; then
10607   :
10608 else
10609   cat >conftest.$ac_ext <<_ACEOF
10610 #line 10610 "configure"
10611 #include "confdefs.h"
10612 #include <ctype.h>
10613 #if ((' ' & 0x0FF) == 0x020)
10614 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10615 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10616 #else
10617 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10618                      || ('j' <= (c) && (c) <= 'r') \
10619                      || ('s' <= (c) && (c) <= 'z'))
10620 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10621 #endif
10622
10623 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10624 int
10625 main ()
10626 {
10627   int i;
10628   for (i = 0; i < 256; i++)
10629     if (XOR (islower (i), ISLOWER (i))
10630         || toupper (i) != TOUPPER (i))
10631       $ac_main_return(2);
10632   $ac_main_return (0);
10633 }
10634 _ACEOF
10635 rm -f conftest$ac_exeext
10636 if { (eval echo "$as_me:10636: \"$ac_link\"") >&5
10637   (eval $ac_link) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10641   { (eval echo "$as_me:10641: \"$ac_try\"") >&5
10642   (eval $ac_try) 2>&5
10643   ac_status=$?
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit $ac_status); }; }; then
10646   :
10647 else
10648   echo "$as_me: program exited with status $ac_status" >&5
10649 echo "$as_me: failed program was:" >&5
10650 cat conftest.$ac_ext >&5
10651 ac_cv_header_stdc=no
10652 fi
10653 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10654 fi
10655 fi
10656 fi
10657 echo "$as_me:10657: result: $ac_cv_header_stdc" >&5
10658 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10659 if test $ac_cv_header_stdc = yes; then
10660
10661 cat >>confdefs.h <<\EOF
10662 #define STDC_HEADERS 1
10663 EOF
10664
10665 fi
10666
10667 ac_header_dirent=no
10668 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10669   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10670 echo "$as_me:10670: checking for $ac_hdr that defines DIR" >&5
10671 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10673   echo $ECHO_N "(cached) $ECHO_C" >&6
10674 else
10675   cat >conftest.$ac_ext <<_ACEOF
10676 #line 10676 "configure"
10677 #include "confdefs.h"
10678 #include <sys/types.h>
10679 #include <$ac_hdr>
10680
10681 int
10682 main ()
10683 {
10684 if ((DIR *) 0)
10685 return 0;
10686   ;
10687   return 0;
10688 }
10689 _ACEOF
10690 rm -f conftest.$ac_objext
10691 if { (eval echo "$as_me:10691: \"$ac_compile\"") >&5
10692   (eval $ac_compile) 2>&5
10693   ac_status=$?
10694   echo "$as_me:10694: \$? = $ac_status" >&5
10695   (exit $ac_status); } &&
10696          { ac_try='test -s conftest.$ac_objext'
10697   { (eval echo "$as_me:10697: \"$ac_try\"") >&5
10698   (eval $ac_try) 2>&5
10699   ac_status=$?
10700   echo "$as_me:10700: \$? = $ac_status" >&5
10701   (exit $ac_status); }; }; then
10702   eval "$as_ac_Header=yes"
10703 else
10704   echo "$as_me: failed program was:" >&5
10705 cat conftest.$ac_ext >&5
10706 eval "$as_ac_Header=no"
10707 fi
10708 rm -f conftest.$ac_objext conftest.$ac_ext
10709 fi
10710 echo "$as_me:10710: result: `eval echo '${'$as_ac_Header'}'`" >&5
10711 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10712 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10713   cat >>confdefs.h <<EOF
10714 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10715 EOF
10716
10717 ac_header_dirent=$ac_hdr; break
10718 fi
10719
10720 done
10721 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10722 if test $ac_header_dirent = dirent.h; then
10723   echo "$as_me:10723: checking for opendir in -ldir" >&5
10724 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10725 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728   ac_check_lib_save_LIBS=$LIBS
10729 LIBS="-ldir  $LIBS"
10730 cat >conftest.$ac_ext <<_ACEOF
10731 #line 10731 "configure"
10732 #include "confdefs.h"
10733
10734 /* Override any gcc2 internal prototype to avoid an error.  */
10735 #ifdef __cplusplus
10736 extern "C"
10737 #endif
10738 /* We use char because int might match the return type of a gcc2
10739    builtin and then its argument prototype would still apply.  */
10740 char opendir ();
10741 int
10742 main ()
10743 {
10744 opendir ();
10745   ;
10746   return 0;
10747 }
10748 _ACEOF
10749 rm -f conftest.$ac_objext conftest$ac_exeext
10750 if { (eval echo "$as_me:10750: \"$ac_link\"") >&5
10751   (eval $ac_link) 2>&5
10752   ac_status=$?
10753   echo "$as_me:10753: \$? = $ac_status" >&5
10754   (exit $ac_status); } &&
10755          { ac_try='test -s conftest$ac_exeext'
10756   { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757   (eval $ac_try) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit $ac_status); }; }; then
10761   ac_cv_lib_dir_opendir=yes
10762 else
10763   echo "$as_me: failed program was:" >&5
10764 cat conftest.$ac_ext >&5
10765 ac_cv_lib_dir_opendir=no
10766 fi
10767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10768 LIBS=$ac_check_lib_save_LIBS
10769 fi
10770 echo "$as_me:10770: result: $ac_cv_lib_dir_opendir" >&5
10771 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10772 if test $ac_cv_lib_dir_opendir = yes; then
10773   LIBS="$LIBS -ldir"
10774 fi
10775
10776 else
10777   echo "$as_me:10777: checking for opendir in -lx" >&5
10778 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10779 if test "${ac_cv_lib_x_opendir+set}" = set; then
10780   echo $ECHO_N "(cached) $ECHO_C" >&6
10781 else
10782   ac_check_lib_save_LIBS=$LIBS
10783 LIBS="-lx  $LIBS"
10784 cat >conftest.$ac_ext <<_ACEOF
10785 #line 10785 "configure"
10786 #include "confdefs.h"
10787
10788 /* Override any gcc2 internal prototype to avoid an error.  */
10789 #ifdef __cplusplus
10790 extern "C"
10791 #endif
10792 /* We use char because int might match the return type of a gcc2
10793    builtin and then its argument prototype would still apply.  */
10794 char opendir ();
10795 int
10796 main ()
10797 {
10798 opendir ();
10799   ;
10800   return 0;
10801 }
10802 _ACEOF
10803 rm -f conftest.$ac_objext conftest$ac_exeext
10804 if { (eval echo "$as_me:10804: \"$ac_link\"") >&5
10805   (eval $ac_link) 2>&5
10806   ac_status=$?
10807   echo "$as_me:10807: \$? = $ac_status" >&5
10808   (exit $ac_status); } &&
10809          { ac_try='test -s conftest$ac_exeext'
10810   { (eval echo "$as_me:10810: \"$ac_try\"") >&5
10811   (eval $ac_try) 2>&5
10812   ac_status=$?
10813   echo "$as_me:10813: \$? = $ac_status" >&5
10814   (exit $ac_status); }; }; then
10815   ac_cv_lib_x_opendir=yes
10816 else
10817   echo "$as_me: failed program was:" >&5
10818 cat conftest.$ac_ext >&5
10819 ac_cv_lib_x_opendir=no
10820 fi
10821 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10822 LIBS=$ac_check_lib_save_LIBS
10823 fi
10824 echo "$as_me:10824: result: $ac_cv_lib_x_opendir" >&5
10825 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10826 if test $ac_cv_lib_x_opendir = yes; then
10827   LIBS="$LIBS -lx"
10828 fi
10829
10830 fi
10831
10832 echo "$as_me:10832: checking whether time.h and sys/time.h may both be included" >&5
10833 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10834 if test "${ac_cv_header_time+set}" = set; then
10835   echo $ECHO_N "(cached) $ECHO_C" >&6
10836 else
10837   cat >conftest.$ac_ext <<_ACEOF
10838 #line 10838 "configure"
10839 #include "confdefs.h"
10840 #include <sys/types.h>
10841 #include <sys/time.h>
10842 #include <time.h>
10843
10844 int
10845 main ()
10846 {
10847 if ((struct tm *) 0)
10848 return 0;
10849   ;
10850   return 0;
10851 }
10852 _ACEOF
10853 rm -f conftest.$ac_objext
10854 if { (eval echo "$as_me:10854: \"$ac_compile\"") >&5
10855   (eval $ac_compile) 2>&5
10856   ac_status=$?
10857   echo "$as_me:10857: \$? = $ac_status" >&5
10858   (exit $ac_status); } &&
10859          { ac_try='test -s conftest.$ac_objext'
10860   { (eval echo "$as_me:10860: \"$ac_try\"") >&5
10861   (eval $ac_try) 2>&5
10862   ac_status=$?
10863   echo "$as_me:10863: \$? = $ac_status" >&5
10864   (exit $ac_status); }; }; then
10865   ac_cv_header_time=yes
10866 else
10867   echo "$as_me: failed program was:" >&5
10868 cat conftest.$ac_ext >&5
10869 ac_cv_header_time=no
10870 fi
10871 rm -f conftest.$ac_objext conftest.$ac_ext
10872 fi
10873 echo "$as_me:10873: result: $ac_cv_header_time" >&5
10874 echo "${ECHO_T}$ac_cv_header_time" >&6
10875 if test $ac_cv_header_time = yes; then
10876
10877 cat >>confdefs.h <<\EOF
10878 #define TIME_WITH_SYS_TIME 1
10879 EOF
10880
10881 fi
10882
10883 echo "$as_me:10883: checking for regular-expression headers" >&5
10884 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10885 if test "${cf_cv_regex+set}" = set; then
10886   echo $ECHO_N "(cached) $ECHO_C" >&6
10887 else
10888
10889 cat >conftest.$ac_ext <<_ACEOF
10890 #line 10890 "configure"
10891 #include "confdefs.h"
10892 #include <sys/types.h>
10893 #include <regex.h>
10894 int
10895 main ()
10896 {
10897
10898         regex_t *p;
10899         int x = regcomp(p, "", 0);
10900         int y = regexec(p, "", 0, 0, 0);
10901         regfree(p);
10902
10903   ;
10904   return 0;
10905 }
10906 _ACEOF
10907 rm -f conftest.$ac_objext conftest$ac_exeext
10908 if { (eval echo "$as_me:10908: \"$ac_link\"") >&5
10909   (eval $ac_link) 2>&5
10910   ac_status=$?
10911   echo "$as_me:10911: \$? = $ac_status" >&5
10912   (exit $ac_status); } &&
10913          { ac_try='test -s conftest$ac_exeext'
10914   { (eval echo "$as_me:10914: \"$ac_try\"") >&5
10915   (eval $ac_try) 2>&5
10916   ac_status=$?
10917   echo "$as_me:10917: \$? = $ac_status" >&5
10918   (exit $ac_status); }; }; then
10919   cf_cv_regex="regex.h"
10920 else
10921   echo "$as_me: failed program was:" >&5
10922 cat conftest.$ac_ext >&5
10923
10924         cat >conftest.$ac_ext <<_ACEOF
10925 #line 10925 "configure"
10926 #include "confdefs.h"
10927 #include <regexp.h>
10928 int
10929 main ()
10930 {
10931
10932                 char *p = compile("", "", "", 0);
10933                 int x = step("", "");
10934
10935   ;
10936   return 0;
10937 }
10938 _ACEOF
10939 rm -f conftest.$ac_objext conftest$ac_exeext
10940 if { (eval echo "$as_me:10940: \"$ac_link\"") >&5
10941   (eval $ac_link) 2>&5
10942   ac_status=$?
10943   echo "$as_me:10943: \$? = $ac_status" >&5
10944   (exit $ac_status); } &&
10945          { ac_try='test -s conftest$ac_exeext'
10946   { (eval echo "$as_me:10946: \"$ac_try\"") >&5
10947   (eval $ac_try) 2>&5
10948   ac_status=$?
10949   echo "$as_me:10949: \$? = $ac_status" >&5
10950   (exit $ac_status); }; }; then
10951   cf_cv_regex="regexp.h"
10952 else
10953   echo "$as_me: failed program was:" >&5
10954 cat conftest.$ac_ext >&5
10955
10956                 cf_save_LIBS="$LIBS"
10957                 LIBS="-lgen $LIBS"
10958                 cat >conftest.$ac_ext <<_ACEOF
10959 #line 10959 "configure"
10960 #include "confdefs.h"
10961 #include <regexpr.h>
10962 int
10963 main ()
10964 {
10965
10966                         char *p = compile("", "", "");
10967                         int x = step("", "");
10968
10969   ;
10970   return 0;
10971 }
10972 _ACEOF
10973 rm -f conftest.$ac_objext conftest$ac_exeext
10974 if { (eval echo "$as_me:10974: \"$ac_link\"") >&5
10975   (eval $ac_link) 2>&5
10976   ac_status=$?
10977   echo "$as_me:10977: \$? = $ac_status" >&5
10978   (exit $ac_status); } &&
10979          { ac_try='test -s conftest$ac_exeext'
10980   { (eval echo "$as_me:10980: \"$ac_try\"") >&5
10981   (eval $ac_try) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit $ac_status); }; }; then
10985   cf_cv_regex="regexpr.h"
10986 else
10987   echo "$as_me: failed program was:" >&5
10988 cat conftest.$ac_ext >&5
10989 LIBS="$cf_save_LIBS"
10990 fi
10991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10992 fi
10993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10994 fi
10995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10996
10997 fi
10998
10999 echo "$as_me:10999: result: $cf_cv_regex" >&5
11000 echo "${ECHO_T}$cf_cv_regex" >&6
11001 case $cf_cv_regex in
11002         regex.h)   cat >>confdefs.h <<\EOF
11003 #define HAVE_REGEX_H_FUNCS 1
11004 EOF
11005  ;;
11006         regexp.h)  cat >>confdefs.h <<\EOF
11007 #define HAVE_REGEXP_H_FUNCS 1
11008 EOF
11009  ;;
11010         regexpr.h) cat >>confdefs.h <<\EOF
11011 #define HAVE_REGEXPR_H_FUNCS 1
11012 EOF
11013  ;;
11014 esac
11015
11016 for ac_header in \
11017 fcntl.h \
11018 getopt.h \
11019 limits.h \
11020 locale.h \
11021 poll.h \
11022 sys/bsdtypes.h \
11023 sys/ioctl.h \
11024 sys/param.h \
11025 sys/poll.h \
11026 sys/select.h \
11027 sys/time.h \
11028 sys/times.h \
11029 ttyent.h \
11030 unistd.h \
11031 wctype.h \
11032
11033 do
11034 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11035 echo "$as_me:11035: checking for $ac_header" >&5
11036 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11037 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11038   echo $ECHO_N "(cached) $ECHO_C" >&6
11039 else
11040   cat >conftest.$ac_ext <<_ACEOF
11041 #line 11041 "configure"
11042 #include "confdefs.h"
11043 #include <$ac_header>
11044 _ACEOF
11045 if { (eval echo "$as_me:11045: \"$ac_cpp conftest.$ac_ext\"") >&5
11046   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11047   ac_status=$?
11048   egrep -v '^ *\+' conftest.er1 >conftest.err
11049   rm -f conftest.er1
11050   cat conftest.err >&5
11051   echo "$as_me:11051: \$? = $ac_status" >&5
11052   (exit $ac_status); } >/dev/null; then
11053   if test -s conftest.err; then
11054     ac_cpp_err=$ac_c_preproc_warn_flag
11055   else
11056     ac_cpp_err=
11057   fi
11058 else
11059   ac_cpp_err=yes
11060 fi
11061 if test -z "$ac_cpp_err"; then
11062   eval "$as_ac_Header=yes"
11063 else
11064   echo "$as_me: failed program was:" >&5
11065   cat conftest.$ac_ext >&5
11066   eval "$as_ac_Header=no"
11067 fi
11068 rm -f conftest.err conftest.$ac_ext
11069 fi
11070 echo "$as_me:11070: result: `eval echo '${'$as_ac_Header'}'`" >&5
11071 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11072 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11073   cat >>confdefs.h <<EOF
11074 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11075 EOF
11076
11077 fi
11078 done
11079
11080 # check for ISC (this may also define _POSIX_SOURCE)
11081 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11082 if test "$ISC" = yes ; then
11083
11084 echo "$as_me:11084: checking for main in -lcposix" >&5
11085 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11086 if test "${ac_cv_lib_cposix_main+set}" = set; then
11087   echo $ECHO_N "(cached) $ECHO_C" >&6
11088 else
11089   ac_check_lib_save_LIBS=$LIBS
11090 LIBS="-lcposix  $LIBS"
11091 cat >conftest.$ac_ext <<_ACEOF
11092 #line 11092 "configure"
11093 #include "confdefs.h"
11094
11095 int
11096 main ()
11097 {
11098 main ();
11099   ;
11100   return 0;
11101 }
11102 _ACEOF
11103 rm -f conftest.$ac_objext conftest$ac_exeext
11104 if { (eval echo "$as_me:11104: \"$ac_link\"") >&5
11105   (eval $ac_link) 2>&5
11106   ac_status=$?
11107   echo "$as_me:11107: \$? = $ac_status" >&5
11108   (exit $ac_status); } &&
11109          { ac_try='test -s conftest$ac_exeext'
11110   { (eval echo "$as_me:11110: \"$ac_try\"") >&5
11111   (eval $ac_try) 2>&5
11112   ac_status=$?
11113   echo "$as_me:11113: \$? = $ac_status" >&5
11114   (exit $ac_status); }; }; then
11115   ac_cv_lib_cposix_main=yes
11116 else
11117   echo "$as_me: failed program was:" >&5
11118 cat conftest.$ac_ext >&5
11119 ac_cv_lib_cposix_main=no
11120 fi
11121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11122 LIBS=$ac_check_lib_save_LIBS
11123 fi
11124 echo "$as_me:11124: result: $ac_cv_lib_cposix_main" >&5
11125 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11126 if test $ac_cv_lib_cposix_main = yes; then
11127   cat >>confdefs.h <<EOF
11128 #define HAVE_LIBCPOSIX 1
11129 EOF
11130
11131   LIBS="-lcposix $LIBS"
11132
11133 fi
11134
11135         echo "$as_me:11135: checking for bzero in -linet" >&5
11136 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11137 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11138   echo $ECHO_N "(cached) $ECHO_C" >&6
11139 else
11140   ac_check_lib_save_LIBS=$LIBS
11141 LIBS="-linet  $LIBS"
11142 cat >conftest.$ac_ext <<_ACEOF
11143 #line 11143 "configure"
11144 #include "confdefs.h"
11145
11146 /* Override any gcc2 internal prototype to avoid an error.  */
11147 #ifdef __cplusplus
11148 extern "C"
11149 #endif
11150 /* We use char because int might match the return type of a gcc2
11151    builtin and then its argument prototype would still apply.  */
11152 char bzero ();
11153 int
11154 main ()
11155 {
11156 bzero ();
11157   ;
11158   return 0;
11159 }
11160 _ACEOF
11161 rm -f conftest.$ac_objext conftest$ac_exeext
11162 if { (eval echo "$as_me:11162: \"$ac_link\"") >&5
11163   (eval $ac_link) 2>&5
11164   ac_status=$?
11165   echo "$as_me:11165: \$? = $ac_status" >&5
11166   (exit $ac_status); } &&
11167          { ac_try='test -s conftest$ac_exeext'
11168   { (eval echo "$as_me:11168: \"$ac_try\"") >&5
11169   (eval $ac_try) 2>&5
11170   ac_status=$?
11171   echo "$as_me:11171: \$? = $ac_status" >&5
11172   (exit $ac_status); }; }; then
11173   ac_cv_lib_inet_bzero=yes
11174 else
11175   echo "$as_me: failed program was:" >&5
11176 cat conftest.$ac_ext >&5
11177 ac_cv_lib_inet_bzero=no
11178 fi
11179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11180 LIBS=$ac_check_lib_save_LIBS
11181 fi
11182 echo "$as_me:11182: result: $ac_cv_lib_inet_bzero" >&5
11183 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11184 if test $ac_cv_lib_inet_bzero = yes; then
11185   LIBS="$LIBS -linet"
11186 fi
11187 fi
11188
11189 echo "$as_me:11189: checking if sys/time.h works with sys/select.h" >&5
11190 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11191 if test "${cf_cv_sys_time_select+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194
11195 cat >conftest.$ac_ext <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198
11199 #include <sys/types.h>
11200 #ifdef HAVE_SYS_TIME_H
11201 #include <sys/time.h>
11202 #endif
11203 #ifdef HAVE_SYS_SELECT_H
11204 #include <sys/select.h>
11205 #endif
11206
11207 int
11208 main ()
11209 {
11210
11211   ;
11212   return 0;
11213 }
11214 _ACEOF
11215 rm -f conftest.$ac_objext
11216 if { (eval echo "$as_me:11216: \"$ac_compile\"") >&5
11217   (eval $ac_compile) 2>&5
11218   ac_status=$?
11219   echo "$as_me:11219: \$? = $ac_status" >&5
11220   (exit $ac_status); } &&
11221          { ac_try='test -s conftest.$ac_objext'
11222   { (eval echo "$as_me:11222: \"$ac_try\"") >&5
11223   (eval $ac_try) 2>&5
11224   ac_status=$?
11225   echo "$as_me:11225: \$? = $ac_status" >&5
11226   (exit $ac_status); }; }; then
11227   cf_cv_sys_time_select=yes
11228 else
11229   echo "$as_me: failed program was:" >&5
11230 cat conftest.$ac_ext >&5
11231 cf_cv_sys_time_select=no
11232 fi
11233 rm -f conftest.$ac_objext conftest.$ac_ext
11234
11235 fi
11236
11237 echo "$as_me:11237: result: $cf_cv_sys_time_select" >&5
11238 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11239 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11240 #define HAVE_SYS_TIME_SELECT 1
11241 EOF
11242
11243 ###     checks for compiler characteristics
11244 ac_ext=c
11245 ac_cpp='$CPP $CPPFLAGS'
11246 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11247 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11248 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11249 ac_main_return=return
11250
11251 echo "$as_me:11251: checking for $CC option to accept ANSI C" >&5
11252 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11253 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11254   echo $ECHO_N "(cached) $ECHO_C" >&6
11255 else
11256   ac_cv_prog_cc_stdc=no
11257 ac_save_CC=$CC
11258 cat >conftest.$ac_ext <<_ACEOF
11259 #line 11259 "configure"
11260 #include "confdefs.h"
11261 #include <stdarg.h>
11262 #include <stdio.h>
11263 #include <sys/types.h>
11264 #include <sys/stat.h>
11265 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11266 struct buf { int x; };
11267 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11268 static char *e (p, i)
11269      char **p;
11270      int i;
11271 {
11272   return p[i];
11273 }
11274 static char *f (char * (*g) (char **, int), char **p, ...)
11275 {
11276   char *s;
11277   va_list v;
11278   va_start (v,p);
11279   s = g (p, va_arg (v,int));
11280   va_end (v);
11281   return s;
11282 }
11283 int test (int i, double x);
11284 struct s1 {int (*f) (int a);};
11285 struct s2 {int (*f) (double a);};
11286 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11287 int argc;
11288 char **argv;
11289 int
11290 main ()
11291 {
11292 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11293   ;
11294   return 0;
11295 }
11296 _ACEOF
11297 # Don't try gcc -ansi; that turns off useful extensions and
11298 # breaks some systems' header files.
11299 # AIX                   -qlanglvl=ansi
11300 # Ultrix and OSF/1      -std1
11301 # HP-UX 10.20 and later -Ae
11302 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11303 # SVR4                  -Xc -D__EXTENSIONS__
11304 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11305 do
11306   CC="$ac_save_CC $ac_arg"
11307   rm -f conftest.$ac_objext
11308 if { (eval echo "$as_me:11308: \"$ac_compile\"") >&5
11309   (eval $ac_compile) 2>&5
11310   ac_status=$?
11311   echo "$as_me:11311: \$? = $ac_status" >&5
11312   (exit $ac_status); } &&
11313          { ac_try='test -s conftest.$ac_objext'
11314   { (eval echo "$as_me:11314: \"$ac_try\"") >&5
11315   (eval $ac_try) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); }; }; then
11319   ac_cv_prog_cc_stdc=$ac_arg
11320 break
11321 else
11322   echo "$as_me: failed program was:" >&5
11323 cat conftest.$ac_ext >&5
11324 fi
11325 rm -f conftest.$ac_objext
11326 done
11327 rm -f conftest.$ac_ext conftest.$ac_objext
11328 CC=$ac_save_CC
11329
11330 fi
11331
11332 case "x$ac_cv_prog_cc_stdc" in
11333   x|xno)
11334     echo "$as_me:11334: result: none needed" >&5
11335 echo "${ECHO_T}none needed" >&6 ;;
11336   *)
11337     echo "$as_me:11337: result: $ac_cv_prog_cc_stdc" >&5
11338 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11339     CC="$CC $ac_cv_prog_cc_stdc" ;;
11340 esac
11341
11342 echo "$as_me:11342: checking for an ANSI C-conforming const" >&5
11343 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11344 if test "${ac_cv_c_const+set}" = set; then
11345   echo $ECHO_N "(cached) $ECHO_C" >&6
11346 else
11347   cat >conftest.$ac_ext <<_ACEOF
11348 #line 11348 "configure"
11349 #include "confdefs.h"
11350
11351 int
11352 main ()
11353 {
11354 /* FIXME: Include the comments suggested by Paul. */
11355 #ifndef __cplusplus
11356   /* Ultrix mips cc rejects this.  */
11357   typedef int charset[2];
11358   const charset x;
11359   /* SunOS 4.1.1 cc rejects this.  */
11360   char const *const *ccp;
11361   char **p;
11362   /* NEC SVR4.0.2 mips cc rejects this.  */
11363   struct point {int x, y;};
11364   static struct point const zero = {0,0};
11365   /* AIX XL C 1.02.0.0 rejects this.
11366      It does not let you subtract one const X* pointer from another in
11367      an arm of an if-expression whose if-part is not a constant
11368      expression */
11369   const char *g = "string";
11370   ccp = &g + (g ? g-g : 0);
11371   /* HPUX 7.0 cc rejects these. */
11372   ++ccp;
11373   p = (char**) ccp;
11374   ccp = (char const *const *) p;
11375   { /* SCO 3.2v4 cc rejects this.  */
11376     char *t;
11377     char const *s = 0 ? (char *) 0 : (char const *) 0;
11378
11379     *t++ = 0;
11380   }
11381   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11382     int x[] = {25, 17};
11383     const int *foo = &x[0];
11384     ++foo;
11385   }
11386   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11387     typedef const int *iptr;
11388     iptr p = 0;
11389     ++p;
11390   }
11391   { /* AIX XL C 1.02.0.0 rejects this saying
11392        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11393     struct s { int j; const int *ap[3]; };
11394     struct s *b; b->j = 5;
11395   }
11396   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11397     const int foo = 10;
11398   }
11399 #endif
11400
11401   ;
11402   return 0;
11403 }
11404 _ACEOF
11405 rm -f conftest.$ac_objext
11406 if { (eval echo "$as_me:11406: \"$ac_compile\"") >&5
11407   (eval $ac_compile) 2>&5
11408   ac_status=$?
11409   echo "$as_me:11409: \$? = $ac_status" >&5
11410   (exit $ac_status); } &&
11411          { ac_try='test -s conftest.$ac_objext'
11412   { (eval echo "$as_me:11412: \"$ac_try\"") >&5
11413   (eval $ac_try) 2>&5
11414   ac_status=$?
11415   echo "$as_me:11415: \$? = $ac_status" >&5
11416   (exit $ac_status); }; }; then
11417   ac_cv_c_const=yes
11418 else
11419   echo "$as_me: failed program was:" >&5
11420 cat conftest.$ac_ext >&5
11421 ac_cv_c_const=no
11422 fi
11423 rm -f conftest.$ac_objext conftest.$ac_ext
11424 fi
11425 echo "$as_me:11425: result: $ac_cv_c_const" >&5
11426 echo "${ECHO_T}$ac_cv_c_const" >&6
11427 if test $ac_cv_c_const = no; then
11428
11429 cat >>confdefs.h <<\EOF
11430 #define const
11431 EOF
11432
11433 fi
11434
11435 echo "$as_me:11435: checking for inline" >&5
11436 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11437 if test "${ac_cv_c_inline+set}" = set; then
11438   echo $ECHO_N "(cached) $ECHO_C" >&6
11439 else
11440   ac_cv_c_inline=no
11441 for ac_kw in inline __inline__ __inline; do
11442   cat >conftest.$ac_ext <<_ACEOF
11443 #line 11443 "configure"
11444 #include "confdefs.h"
11445 #ifndef __cplusplus
11446 static $ac_kw int static_foo () {return 0; }
11447 $ac_kw int foo () {return 0; }
11448 #endif
11449
11450 _ACEOF
11451 rm -f conftest.$ac_objext
11452 if { (eval echo "$as_me:11452: \"$ac_compile\"") >&5
11453   (eval $ac_compile) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit $ac_status); } &&
11457          { ac_try='test -s conftest.$ac_objext'
11458   { (eval echo "$as_me:11458: \"$ac_try\"") >&5
11459   (eval $ac_try) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); }; }; then
11463   ac_cv_c_inline=$ac_kw; break
11464 else
11465   echo "$as_me: failed program was:" >&5
11466 cat conftest.$ac_ext >&5
11467 fi
11468 rm -f conftest.$ac_objext conftest.$ac_ext
11469 done
11470
11471 fi
11472 echo "$as_me:11472: result: $ac_cv_c_inline" >&5
11473 echo "${ECHO_T}$ac_cv_c_inline" >&6
11474 case $ac_cv_c_inline in
11475   inline | yes) ;;
11476   no)
11477 cat >>confdefs.h <<\EOF
11478 #define inline
11479 EOF
11480  ;;
11481   *)  cat >>confdefs.h <<EOF
11482 #define inline $ac_cv_c_inline
11483 EOF
11484  ;;
11485 esac
11486
11487 NCURSES_INLINE=
11488 if test "$ac_cv_c_inline" != no ; then
11489         NCURSES_INLINE=inline
11490         if test "$GCC" = yes
11491         then
11492                 echo "$as_me:11492: checking if gcc supports options to tune inlining" >&5
11493 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11494 if test "${cf_cv_gcc_inline+set}" = set; then
11495   echo $ECHO_N "(cached) $ECHO_C" >&6
11496 else
11497
11498                         cf_save_CFLAGS=$CFLAGS
11499                         CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11500                         cat >conftest.$ac_ext <<_ACEOF
11501 #line 11501 "configure"
11502 #include "confdefs.h"
11503 inline int foo(void) { return 1; }
11504 int
11505 main ()
11506 {
11507 ${cf_cv_main_return:-return} foo()
11508   ;
11509   return 0;
11510 }
11511 _ACEOF
11512 rm -f conftest.$ac_objext
11513 if { (eval echo "$as_me:11513: \"$ac_compile\"") >&5
11514   (eval $ac_compile) 2>&5
11515   ac_status=$?
11516   echo "$as_me:11516: \$? = $ac_status" >&5
11517   (exit $ac_status); } &&
11518          { ac_try='test -s conftest.$ac_objext'
11519   { (eval echo "$as_me:11519: \"$ac_try\"") >&5
11520   (eval $ac_try) 2>&5
11521   ac_status=$?
11522   echo "$as_me:11522: \$? = $ac_status" >&5
11523   (exit $ac_status); }; }; then
11524   cf_cv_gcc_inline=yes
11525 else
11526   echo "$as_me: failed program was:" >&5
11527 cat conftest.$ac_ext >&5
11528 cf_cv_gcc_inline=no
11529 fi
11530 rm -f conftest.$ac_objext conftest.$ac_ext
11531                         CFLAGS=$cf_save_CFLAGS
11532
11533 fi
11534 echo "$as_me:11534: result: $cf_cv_gcc_inline" >&5
11535 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11536                 if test "$cf_cv_gcc_inline" = yes ; then
11537
11538 cf_fix_cppflags=no
11539 cf_new_cflags=
11540 cf_new_cppflags=
11541 cf_new_extra_cppflags=
11542
11543 for cf_add_cflags in --param max-inline-insns-single=1200
11544 do
11545 case $cf_fix_cppflags in
11546 no)
11547         case $cf_add_cflags in #(vi
11548         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11549                 case $cf_add_cflags in
11550                 -D*)
11551                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11552
11553                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11554                         && test -z "${cf_tst_cflags}" \
11555                         && cf_fix_cppflags=yes
11556
11557                         if test $cf_fix_cppflags = yes ; then
11558                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11559                                 continue
11560                         elif test "${cf_tst_cflags}" = "\"'" ; then
11561                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11562                                 continue
11563                         fi
11564                         ;;
11565                 esac
11566                 case "$CPPFLAGS" in
11567                 *$cf_add_cflags) #(vi
11568                         ;;
11569                 *) #(vi
11570                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11571                         ;;
11572                 esac
11573                 ;;
11574         *)
11575                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11576                 ;;
11577         esac
11578         ;;
11579 yes)
11580         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11581
11582         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11583
11584         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11585         && test -z "${cf_tst_cflags}" \
11586         && cf_fix_cppflags=no
11587         ;;
11588 esac
11589 done
11590
11591 if test -n "$cf_new_cflags" ; then
11592
11593         CFLAGS="$CFLAGS $cf_new_cflags"
11594 fi
11595
11596 if test -n "$cf_new_cppflags" ; then
11597
11598         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11599 fi
11600
11601 if test -n "$cf_new_extra_cppflags" ; then
11602
11603         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11604 fi
11605
11606                 fi
11607         fi
11608 fi
11609
11610 echo "$as_me:11610: checking for signal global datatype" >&5
11611 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11612 if test "${cf_cv_sig_atomic_t+set}" = set; then
11613   echo $ECHO_N "(cached) $ECHO_C" >&6
11614 else
11615
11616         for cf_type in \
11617                 "volatile sig_atomic_t" \
11618                 "sig_atomic_t" \
11619                 "int"
11620         do
11621         cat >conftest.$ac_ext <<_ACEOF
11622 #line 11622 "configure"
11623 #include "confdefs.h"
11624
11625 #include <sys/types.h>
11626 #include <signal.h>
11627 #include <stdio.h>
11628
11629 extern $cf_type x;
11630 $cf_type x;
11631 static void handler(int sig)
11632 {
11633         x = 5;
11634 }
11635 int
11636 main ()
11637 {
11638 signal(SIGINT, handler);
11639                  x = 1
11640   ;
11641   return 0;
11642 }
11643 _ACEOF
11644 rm -f conftest.$ac_objext
11645 if { (eval echo "$as_me:11645: \"$ac_compile\"") >&5
11646   (eval $ac_compile) 2>&5
11647   ac_status=$?
11648   echo "$as_me:11648: \$? = $ac_status" >&5
11649   (exit $ac_status); } &&
11650          { ac_try='test -s conftest.$ac_objext'
11651   { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652   (eval $ac_try) 2>&5
11653   ac_status=$?
11654   echo "$as_me:11654: \$? = $ac_status" >&5
11655   (exit $ac_status); }; }; then
11656   cf_cv_sig_atomic_t=$cf_type
11657 else
11658   echo "$as_me: failed program was:" >&5
11659 cat conftest.$ac_ext >&5
11660 cf_cv_sig_atomic_t=no
11661 fi
11662 rm -f conftest.$ac_objext conftest.$ac_ext
11663                 test "$cf_cv_sig_atomic_t" != no && break
11664         done
11665
11666 fi
11667
11668 echo "$as_me:11668: result: $cf_cv_sig_atomic_t" >&5
11669 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11670 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11671 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11672 EOF
11673
11674 if test $NCURSES_CHTYPE = auto ; then
11675
11676 echo "$as_me:11676: checking for type of chtype" >&5
11677 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11678 if test "${cf_cv_typeof_chtype+set}" = set; then
11679   echo $ECHO_N "(cached) $ECHO_C" >&6
11680 else
11681
11682                 if test "$cross_compiling" = yes; then
11683   cf_cv_typeof_chtype=long
11684 else
11685   cat >conftest.$ac_ext <<_ACEOF
11686 #line 11686 "configure"
11687 #include "confdefs.h"
11688
11689 #define WANT_BITS 31
11690 #include <stdio.h>
11691 int main()
11692 {
11693         FILE *fp = fopen("cf_test.out", "w");
11694         if (fp != 0) {
11695                 char *result = "long";
11696                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11697                         int n;
11698                         unsigned int x, y;
11699                         for (n = 0; n < WANT_BITS; n++) {
11700                                 x = (1 << n);
11701                                 y = (x >> n);
11702                                 if (y != 1 || x == 0) {
11703                                         x = 0;
11704                                         break;
11705                                 }
11706                         }
11707                         /*
11708                          * If x is nonzero, an int is big enough for the bits
11709                          * that we want.
11710                          */
11711                         result = (x != 0) ? "int" : "long";
11712                 }
11713                 fputs(result, fp);
11714                 fclose(fp);
11715         }
11716         ${cf_cv_main_return:-return}(0);
11717 }
11718
11719 _ACEOF
11720 rm -f conftest$ac_exeext
11721 if { (eval echo "$as_me:11721: \"$ac_link\"") >&5
11722   (eval $ac_link) 2>&5
11723   ac_status=$?
11724   echo "$as_me:11724: \$? = $ac_status" >&5
11725   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11726   { (eval echo "$as_me:11726: \"$ac_try\"") >&5
11727   (eval $ac_try) 2>&5
11728   ac_status=$?
11729   echo "$as_me:11729: \$? = $ac_status" >&5
11730   (exit $ac_status); }; }; then
11731   cf_cv_typeof_chtype=`cat cf_test.out`
11732 else
11733   echo "$as_me: program exited with status $ac_status" >&5
11734 echo "$as_me: failed program was:" >&5
11735 cat conftest.$ac_ext >&5
11736 cf_cv_typeof_chtype=long
11737 fi
11738 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11739 fi
11740                 rm -f cf_test.out
11741
11742 fi
11743
11744 echo "$as_me:11744: result: $cf_cv_typeof_chtype" >&5
11745 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11746
11747 cat >>confdefs.h <<EOF
11748 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11749 EOF
11750
11751 else
11752         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11753 fi
11754 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
11755
11756 echo "$as_me:11756: checking if unsigned literals are legal" >&5
11757 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11758 if test "${cf_cv_unsigned_literals+set}" = set; then
11759   echo $ECHO_N "(cached) $ECHO_C" >&6
11760 else
11761
11762         cat >conftest.$ac_ext <<_ACEOF
11763 #line 11763 "configure"
11764 #include "confdefs.h"
11765
11766 int
11767 main ()
11768 {
11769 long x = 1L + 1UL + 1U + 1
11770   ;
11771   return 0;
11772 }
11773 _ACEOF
11774 rm -f conftest.$ac_objext
11775 if { (eval echo "$as_me:11775: \"$ac_compile\"") >&5
11776   (eval $ac_compile) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); } &&
11780          { ac_try='test -s conftest.$ac_objext'
11781   { (eval echo "$as_me:11781: \"$ac_try\"") >&5
11782   (eval $ac_try) 2>&5
11783   ac_status=$?
11784   echo "$as_me:11784: \$? = $ac_status" >&5
11785   (exit $ac_status); }; }; then
11786   cf_cv_unsigned_literals=yes
11787 else
11788   echo "$as_me: failed program was:" >&5
11789 cat conftest.$ac_ext >&5
11790 cf_cv_unsigned_literals=no
11791 fi
11792 rm -f conftest.$ac_objext conftest.$ac_ext
11793
11794 fi
11795
11796 echo "$as_me:11796: result: $cf_cv_unsigned_literals" >&5
11797 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11798
11799 cf_cv_1UL="1"
11800 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
11801 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
11802
11803 if test $NCURSES_MMASK_T = auto ; then
11804         cf_cv_typeof_mmask_t=long
11805 else
11806         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11807 fi
11808 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
11809
11810 ###     Checks for external-data
11811
11812 echo "$as_me:11812: checking if external errno is declared" >&5
11813 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11814 if test "${cf_cv_dcl_errno+set}" = set; then
11815   echo $ECHO_N "(cached) $ECHO_C" >&6
11816 else
11817
11818     cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821
11822 #ifdef HAVE_STDLIB_H
11823 #include <stdlib.h>
11824 #endif
11825 #include <stdio.h>
11826 #include <sys/types.h>
11827 #include <errno.h>
11828 int
11829 main ()
11830 {
11831 long x = (long) errno
11832   ;
11833   return 0;
11834 }
11835 _ACEOF
11836 rm -f conftest.$ac_objext
11837 if { (eval echo "$as_me:11837: \"$ac_compile\"") >&5
11838   (eval $ac_compile) 2>&5
11839   ac_status=$?
11840   echo "$as_me:11840: \$? = $ac_status" >&5
11841   (exit $ac_status); } &&
11842          { ac_try='test -s conftest.$ac_objext'
11843   { (eval echo "$as_me:11843: \"$ac_try\"") >&5
11844   (eval $ac_try) 2>&5
11845   ac_status=$?
11846   echo "$as_me:11846: \$? = $ac_status" >&5
11847   (exit $ac_status); }; }; then
11848   cf_cv_dcl_errno=yes
11849 else
11850   echo "$as_me: failed program was:" >&5
11851 cat conftest.$ac_ext >&5
11852 cf_cv_dcl_errno=no
11853 fi
11854 rm -f conftest.$ac_objext conftest.$ac_ext
11855
11856 fi
11857 echo "$as_me:11857: result: $cf_cv_dcl_errno" >&5
11858 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11859
11860 if test "$cf_cv_dcl_errno" = no ; then
11861
11862 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11863
11864     cat >>confdefs.h <<EOF
11865 #define $cf_result 1
11866 EOF
11867
11868 fi
11869
11870 # It's possible (for near-UNIX clones) that the data doesn't exist
11871
11872 echo "$as_me:11872: checking if external errno exists" >&5
11873 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11874 if test "${cf_cv_have_errno+set}" = set; then
11875   echo $ECHO_N "(cached) $ECHO_C" >&6
11876 else
11877
11878     cat >conftest.$ac_ext <<_ACEOF
11879 #line 11879 "configure"
11880 #include "confdefs.h"
11881
11882 #undef errno
11883 extern int errno;
11884
11885 int
11886 main ()
11887 {
11888 errno = 2
11889   ;
11890   return 0;
11891 }
11892 _ACEOF
11893 rm -f conftest.$ac_objext conftest$ac_exeext
11894 if { (eval echo "$as_me:11894: \"$ac_link\"") >&5
11895   (eval $ac_link) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); } &&
11899          { ac_try='test -s conftest$ac_exeext'
11900   { (eval echo "$as_me:11900: \"$ac_try\"") >&5
11901   (eval $ac_try) 2>&5
11902   ac_status=$?
11903   echo "$as_me:11903: \$? = $ac_status" >&5
11904   (exit $ac_status); }; }; then
11905   cf_cv_have_errno=yes
11906 else
11907   echo "$as_me: failed program was:" >&5
11908 cat conftest.$ac_ext >&5
11909 cf_cv_have_errno=no
11910 fi
11911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11912
11913 fi
11914 echo "$as_me:11914: result: $cf_cv_have_errno" >&5
11915 echo "${ECHO_T}$cf_cv_have_errno" >&6
11916
11917 if test "$cf_cv_have_errno" = yes ; then
11918
11919 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11920
11921     cat >>confdefs.h <<EOF
11922 #define $cf_result 1
11923 EOF
11924
11925 fi
11926
11927 echo "$as_me:11927: checking if data-only library module links" >&5
11928 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11929 if test "${cf_cv_link_dataonly+set}" = set; then
11930   echo $ECHO_N "(cached) $ECHO_C" >&6
11931 else
11932
11933         rm -f conftest.a
11934         cat >conftest.$ac_ext <<EOF
11935 #line 11935 "configure"
11936 int     testdata[3] = { 123, 456, 789 };
11937 EOF
11938         if { (eval echo "$as_me:11938: \"$ac_compile\"") >&5
11939   (eval $ac_compile) 2>&5
11940   ac_status=$?
11941   echo "$as_me:11941: \$? = $ac_status" >&5
11942   (exit $ac_status); } ; then
11943                 mv conftest.o data.o && \
11944                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11945         fi
11946         rm -f conftest.$ac_ext data.o
11947         cat >conftest.$ac_ext <<EOF
11948 #line 11948 "configure"
11949 int     testfunc()
11950 {
11951 #if defined(NeXT)
11952         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11953 #else
11954         extern int testdata[3];
11955         return testdata[0] == 123
11956            &&  testdata[1] == 456
11957            &&  testdata[2] == 789;
11958 #endif
11959 }
11960 EOF
11961         if { (eval echo "$as_me:11961: \"$ac_compile\"") >&5
11962   (eval $ac_compile) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); }; then
11966                 mv conftest.o func.o && \
11967                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11968         fi
11969         rm -f conftest.$ac_ext func.o
11970         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11971         cf_saveLIBS="$LIBS"
11972         LIBS="conftest.a $LIBS"
11973         if test "$cross_compiling" = yes; then
11974   cf_cv_link_dataonly=unknown
11975 else
11976   cat >conftest.$ac_ext <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979
11980         int main()
11981         {
11982                 extern int testfunc();
11983                 ${cf_cv_main_return:-return} (!testfunc());
11984         }
11985
11986 _ACEOF
11987 rm -f conftest$ac_exeext
11988 if { (eval echo "$as_me:11988: \"$ac_link\"") >&5
11989   (eval $ac_link) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11993   { (eval echo "$as_me:11993: \"$ac_try\"") >&5
11994   (eval $ac_try) 2>&5
11995   ac_status=$?
11996   echo "$as_me:11996: \$? = $ac_status" >&5
11997   (exit $ac_status); }; }; then
11998   cf_cv_link_dataonly=yes
11999 else
12000   echo "$as_me: program exited with status $ac_status" >&5
12001 echo "$as_me: failed program was:" >&5
12002 cat conftest.$ac_ext >&5
12003 cf_cv_link_dataonly=no
12004 fi
12005 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12006 fi
12007         LIBS="$cf_saveLIBS"
12008
12009 fi
12010
12011 echo "$as_me:12011: result: $cf_cv_link_dataonly" >&5
12012 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12013
12014 if test "$cf_cv_link_dataonly" = no ; then
12015         cat >>confdefs.h <<\EOF
12016 #define BROKEN_LINKER 1
12017 EOF
12018
12019         BROKEN_LINKER=1
12020 fi
12021
12022 ###     Checks for library functions.
12023
12024 for ac_func in \
12025 getcwd \
12026 getegid \
12027 geteuid \
12028 getttynam \
12029 issetugid \
12030 poll \
12031 remove \
12032 select \
12033 setbuf \
12034 setbuffer \
12035 setvbuf \
12036 sigaction \
12037 sigvec \
12038 strdup \
12039 strstr \
12040 tcgetpgrp \
12041 times \
12042 vsnprintf \
12043
12044 do
12045 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12046 echo "$as_me:12046: checking for $ac_func" >&5
12047 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12048 if eval "test \"\${$as_ac_var+set}\" = set"; then
12049   echo $ECHO_N "(cached) $ECHO_C" >&6
12050 else
12051   cat >conftest.$ac_ext <<_ACEOF
12052 #line 12052 "configure"
12053 #include "confdefs.h"
12054 /* System header to define __stub macros and hopefully few prototypes,
12055     which can conflict with char $ac_func (); below.  */
12056 #include <assert.h>
12057 /* Override any gcc2 internal prototype to avoid an error.  */
12058 #ifdef __cplusplus
12059 extern "C"
12060 #endif
12061 /* We use char because int might match the return type of a gcc2
12062    builtin and then its argument prototype would still apply.  */
12063 char $ac_func ();
12064 char (*f) ();
12065
12066 int
12067 main ()
12068 {
12069 /* The GNU C library defines this for functions which it implements
12070     to always fail with ENOSYS.  Some functions are actually named
12071     something starting with __ and the normal name is an alias.  */
12072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12073 choke me
12074 #else
12075 f = $ac_func;
12076 #endif
12077
12078   ;
12079   return 0;
12080 }
12081 _ACEOF
12082 rm -f conftest.$ac_objext conftest$ac_exeext
12083 if { (eval echo "$as_me:12083: \"$ac_link\"") >&5
12084   (eval $ac_link) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); } &&
12088          { ac_try='test -s conftest$ac_exeext'
12089   { (eval echo "$as_me:12089: \"$ac_try\"") >&5
12090   (eval $ac_try) 2>&5
12091   ac_status=$?
12092   echo "$as_me:12092: \$? = $ac_status" >&5
12093   (exit $ac_status); }; }; then
12094   eval "$as_ac_var=yes"
12095 else
12096   echo "$as_me: failed program was:" >&5
12097 cat conftest.$ac_ext >&5
12098 eval "$as_ac_var=no"
12099 fi
12100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12101 fi
12102 echo "$as_me:12102: result: `eval echo '${'$as_ac_var'}'`" >&5
12103 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12104 if test `eval echo '${'$as_ac_var'}'` = yes; then
12105   cat >>confdefs.h <<EOF
12106 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12107 EOF
12108
12109 fi
12110 done
12111
12112 if test "$with_getcap" = "yes" ; then
12113
12114 echo "$as_me:12114: checking for terminal-capability database functions" >&5
12115 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12116 if test "${cf_cv_cgetent+set}" = set; then
12117   echo $ECHO_N "(cached) $ECHO_C" >&6
12118 else
12119
12120 cat >conftest.$ac_ext <<_ACEOF
12121 #line 12121 "configure"
12122 #include "confdefs.h"
12123
12124 #include <stdlib.h>
12125 int
12126 main ()
12127 {
12128
12129         char temp[128];
12130         char *buf = temp;
12131         char *db_array = temp;
12132         cgetent(&buf, /* int *, */ &db_array, "vt100");
12133         cgetcap(buf, "tc", '=');
12134         cgetmatch(buf, "tc");
12135
12136   ;
12137   return 0;
12138 }
12139 _ACEOF
12140 rm -f conftest.$ac_objext conftest$ac_exeext
12141 if { (eval echo "$as_me:12141: \"$ac_link\"") >&5
12142   (eval $ac_link) 2>&5
12143   ac_status=$?
12144   echo "$as_me:12144: \$? = $ac_status" >&5
12145   (exit $ac_status); } &&
12146          { ac_try='test -s conftest$ac_exeext'
12147   { (eval echo "$as_me:12147: \"$ac_try\"") >&5
12148   (eval $ac_try) 2>&5
12149   ac_status=$?
12150   echo "$as_me:12150: \$? = $ac_status" >&5
12151   (exit $ac_status); }; }; then
12152   cf_cv_cgetent=yes
12153 else
12154   echo "$as_me: failed program was:" >&5
12155 cat conftest.$ac_ext >&5
12156 cf_cv_cgetent=no
12157 fi
12158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12159
12160 fi
12161
12162 echo "$as_me:12162: result: $cf_cv_cgetent" >&5
12163 echo "${ECHO_T}$cf_cv_cgetent" >&6
12164 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12165 #define HAVE_BSD_CGETENT 1
12166 EOF
12167
12168 fi
12169
12170 echo "$as_me:12170: checking for isascii" >&5
12171 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12172 if test "${cf_cv_have_isascii+set}" = set; then
12173   echo $ECHO_N "(cached) $ECHO_C" >&6
12174 else
12175
12176         cat >conftest.$ac_ext <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179 #include <ctype.h>
12180 int
12181 main ()
12182 {
12183 int x = isascii(' ')
12184   ;
12185   return 0;
12186 }
12187 _ACEOF
12188 rm -f conftest.$ac_objext conftest$ac_exeext
12189 if { (eval echo "$as_me:12189: \"$ac_link\"") >&5
12190   (eval $ac_link) 2>&5
12191   ac_status=$?
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); } &&
12194          { ac_try='test -s conftest$ac_exeext'
12195   { (eval echo "$as_me:12195: \"$ac_try\"") >&5
12196   (eval $ac_try) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); }; }; then
12200   cf_cv_have_isascii=yes
12201 else
12202   echo "$as_me: failed program was:" >&5
12203 cat conftest.$ac_ext >&5
12204 cf_cv_have_isascii=no
12205 fi
12206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12207
12208 fi
12209 echo "$as_me:12209: result: $cf_cv_have_isascii" >&5
12210 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12211 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12212 #define HAVE_ISASCII 1
12213 EOF
12214
12215 if test "$ac_cv_func_sigaction" = yes; then
12216 echo "$as_me:12216: checking whether sigaction needs _POSIX_SOURCE" >&5
12217 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12218 cat >conftest.$ac_ext <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12221
12222 #include <sys/types.h>
12223 #include <signal.h>
12224 int
12225 main ()
12226 {
12227 struct sigaction act
12228   ;
12229   return 0;
12230 }
12231 _ACEOF
12232 rm -f conftest.$ac_objext
12233 if { (eval echo "$as_me:12233: \"$ac_compile\"") >&5
12234   (eval $ac_compile) 2>&5
12235   ac_status=$?
12236   echo "$as_me:12236: \$? = $ac_status" >&5
12237   (exit $ac_status); } &&
12238          { ac_try='test -s conftest.$ac_objext'
12239   { (eval echo "$as_me:12239: \"$ac_try\"") >&5
12240   (eval $ac_try) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); }; }; then
12244   sigact_bad=no
12245 else
12246   echo "$as_me: failed program was:" >&5
12247 cat conftest.$ac_ext >&5
12248
12249 cat >conftest.$ac_ext <<_ACEOF
12250 #line 12250 "configure"
12251 #include "confdefs.h"
12252
12253 #define _POSIX_SOURCE
12254 #include <sys/types.h>
12255 #include <signal.h>
12256 int
12257 main ()
12258 {
12259 struct sigaction act
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 rm -f conftest.$ac_objext
12265 if { (eval echo "$as_me:12265: \"$ac_compile\"") >&5
12266   (eval $ac_compile) 2>&5
12267   ac_status=$?
12268   echo "$as_me:12268: \$? = $ac_status" >&5
12269   (exit $ac_status); } &&
12270          { ac_try='test -s conftest.$ac_objext'
12271   { (eval echo "$as_me:12271: \"$ac_try\"") >&5
12272   (eval $ac_try) 2>&5
12273   ac_status=$?
12274   echo "$as_me:12274: \$? = $ac_status" >&5
12275   (exit $ac_status); }; }; then
12276   sigact_bad=yes
12277          cat >>confdefs.h <<\EOF
12278 #define SVR4_ACTION 1
12279 EOF
12280
12281 else
12282   echo "$as_me: failed program was:" >&5
12283 cat conftest.$ac_ext >&5
12284 sigact_bad=unknown
12285 fi
12286 rm -f conftest.$ac_objext conftest.$ac_ext
12287 fi
12288 rm -f conftest.$ac_objext conftest.$ac_ext
12289 echo "$as_me:12289: result: $sigact_bad" >&5
12290 echo "${ECHO_T}$sigact_bad" >&6
12291 fi
12292
12293 echo "$as_me:12293: checking if nanosleep really works" >&5
12294 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12295 if test "${cf_cv_func_nanosleep+set}" = set; then
12296   echo $ECHO_N "(cached) $ECHO_C" >&6
12297 else
12298
12299 if test "$cross_compiling" = yes; then
12300   cf_cv_func_nanosleep=unknown
12301 else
12302   cat >conftest.$ac_ext <<_ACEOF
12303 #line 12303 "configure"
12304 #include "confdefs.h"
12305
12306 #include <stdio.h>
12307 #include <errno.h>
12308 #include <time.h>
12309
12310 #ifdef HAVE_SYS_TIME_H
12311 #include <sys/time.h>
12312 #endif
12313
12314 int main() {
12315         struct timespec ts1, ts2;
12316         int code;
12317         ts1.tv_sec  = 0;
12318         ts1.tv_nsec = 750000000;
12319         ts2.tv_sec  = 0;
12320         ts2.tv_nsec = 0;
12321         errno = 0;
12322         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12323         ${cf_cv_main_return:-return}(code != 0);
12324 }
12325
12326 _ACEOF
12327 rm -f conftest$ac_exeext
12328 if { (eval echo "$as_me:12328: \"$ac_link\"") >&5
12329   (eval $ac_link) 2>&5
12330   ac_status=$?
12331   echo "$as_me:12331: \$? = $ac_status" >&5
12332   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12333   { (eval echo "$as_me:12333: \"$ac_try\"") >&5
12334   (eval $ac_try) 2>&5
12335   ac_status=$?
12336   echo "$as_me:12336: \$? = $ac_status" >&5
12337   (exit $ac_status); }; }; then
12338   cf_cv_func_nanosleep=yes
12339 else
12340   echo "$as_me: program exited with status $ac_status" >&5
12341 echo "$as_me: failed program was:" >&5
12342 cat conftest.$ac_ext >&5
12343 cf_cv_func_nanosleep=no
12344 fi
12345 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12346 fi
12347 fi
12348 echo "$as_me:12348: result: $cf_cv_func_nanosleep" >&5
12349 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12350
12351 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12352 #define HAVE_NANOSLEEP 1
12353 EOF
12354
12355 for ac_header in \
12356 termio.h \
12357 termios.h \
12358 unistd.h \
12359
12360 do
12361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12362 echo "$as_me:12362: checking for $ac_header" >&5
12363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12365   echo $ECHO_N "(cached) $ECHO_C" >&6
12366 else
12367   cat >conftest.$ac_ext <<_ACEOF
12368 #line 12368 "configure"
12369 #include "confdefs.h"
12370 #include <$ac_header>
12371 _ACEOF
12372 if { (eval echo "$as_me:12372: \"$ac_cpp conftest.$ac_ext\"") >&5
12373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12374   ac_status=$?
12375   egrep -v '^ *\+' conftest.er1 >conftest.err
12376   rm -f conftest.er1
12377   cat conftest.err >&5
12378   echo "$as_me:12378: \$? = $ac_status" >&5
12379   (exit $ac_status); } >/dev/null; then
12380   if test -s conftest.err; then
12381     ac_cpp_err=$ac_c_preproc_warn_flag
12382   else
12383     ac_cpp_err=
12384   fi
12385 else
12386   ac_cpp_err=yes
12387 fi
12388 if test -z "$ac_cpp_err"; then
12389   eval "$as_ac_Header=yes"
12390 else
12391   echo "$as_me: failed program was:" >&5
12392   cat conftest.$ac_ext >&5
12393   eval "$as_ac_Header=no"
12394 fi
12395 rm -f conftest.err conftest.$ac_ext
12396 fi
12397 echo "$as_me:12397: result: `eval echo '${'$as_ac_Header'}'`" >&5
12398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12399 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12400   cat >>confdefs.h <<EOF
12401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12402 EOF
12403
12404 fi
12405 done
12406
12407 if test "$ISC" = yes ; then
12408
12409 for ac_header in sys/termio.h
12410 do
12411 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12412 echo "$as_me:12412: checking for $ac_header" >&5
12413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12415   echo $ECHO_N "(cached) $ECHO_C" >&6
12416 else
12417   cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420 #include <$ac_header>
12421 _ACEOF
12422 if { (eval echo "$as_me:12422: \"$ac_cpp conftest.$ac_ext\"") >&5
12423   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12424   ac_status=$?
12425   egrep -v '^ *\+' conftest.er1 >conftest.err
12426   rm -f conftest.er1
12427   cat conftest.err >&5
12428   echo "$as_me:12428: \$? = $ac_status" >&5
12429   (exit $ac_status); } >/dev/null; then
12430   if test -s conftest.err; then
12431     ac_cpp_err=$ac_c_preproc_warn_flag
12432   else
12433     ac_cpp_err=
12434   fi
12435 else
12436   ac_cpp_err=yes
12437 fi
12438 if test -z "$ac_cpp_err"; then
12439   eval "$as_ac_Header=yes"
12440 else
12441   echo "$as_me: failed program was:" >&5
12442   cat conftest.$ac_ext >&5
12443   eval "$as_ac_Header=no"
12444 fi
12445 rm -f conftest.err conftest.$ac_ext
12446 fi
12447 echo "$as_me:12447: result: `eval echo '${'$as_ac_Header'}'`" >&5
12448 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12449 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12450   cat >>confdefs.h <<EOF
12451 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12452 EOF
12453
12454 fi
12455 done
12456
12457 fi
12458 if test "$ac_cv_header_termios_h" = yes ; then
12459         case "$CFLAGS $CPPFLAGS" in
12460         *-D_POSIX_SOURCE*)
12461                 termios_bad=dunno ;;
12462         *)      termios_bad=maybe ;;
12463         esac
12464         if test "$termios_bad" = maybe ; then
12465         echo "$as_me:12465: checking whether termios.h needs _POSIX_SOURCE" >&5
12466 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12467         cat >conftest.$ac_ext <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12470 #include <termios.h>
12471 int
12472 main ()
12473 {
12474 struct termios foo; int x = foo.c_iflag
12475   ;
12476   return 0;
12477 }
12478 _ACEOF
12479 rm -f conftest.$ac_objext
12480 if { (eval echo "$as_me:12480: \"$ac_compile\"") >&5
12481   (eval $ac_compile) 2>&5
12482   ac_status=$?
12483   echo "$as_me:12483: \$? = $ac_status" >&5
12484   (exit $ac_status); } &&
12485          { ac_try='test -s conftest.$ac_objext'
12486   { (eval echo "$as_me:12486: \"$ac_try\"") >&5
12487   (eval $ac_try) 2>&5
12488   ac_status=$?
12489   echo "$as_me:12489: \$? = $ac_status" >&5
12490   (exit $ac_status); }; }; then
12491   termios_bad=no
12492 else
12493   echo "$as_me: failed program was:" >&5
12494 cat conftest.$ac_ext >&5
12495
12496                 cat >conftest.$ac_ext <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499
12500 #define _POSIX_SOURCE
12501 #include <termios.h>
12502 int
12503 main ()
12504 {
12505 struct termios foo; int x = foo.c_iflag
12506   ;
12507   return 0;
12508 }
12509 _ACEOF
12510 rm -f conftest.$ac_objext
12511 if { (eval echo "$as_me:12511: \"$ac_compile\"") >&5
12512   (eval $ac_compile) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); } &&
12516          { ac_try='test -s conftest.$ac_objext'
12517   { (eval echo "$as_me:12517: \"$ac_try\"") >&5
12518   (eval $ac_try) 2>&5
12519   ac_status=$?
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit $ac_status); }; }; then
12522   termios_bad=unknown
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat conftest.$ac_ext >&5
12526 termios_bad=yes cat >>confdefs.h <<\EOF
12527 #define SVR4_TERMIO 1
12528 EOF
12529
12530 fi
12531 rm -f conftest.$ac_objext conftest.$ac_ext
12532
12533 fi
12534 rm -f conftest.$ac_objext conftest.$ac_ext
12535         echo "$as_me:12535: result: $termios_bad" >&5
12536 echo "${ECHO_T}$termios_bad" >&6
12537         fi
12538 fi
12539
12540 echo "$as_me:12540: checking for tcgetattr" >&5
12541 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12542 if test "${cf_cv_have_tcgetattr+set}" = set; then
12543   echo $ECHO_N "(cached) $ECHO_C" >&6
12544 else
12545
12546 cat >conftest.$ac_ext <<_ACEOF
12547 #line 12547 "configure"
12548 #include "confdefs.h"
12549
12550 #include <sys/types.h>
12551 #ifdef HAVE_UNISTD_H
12552 #include <unistd.h>
12553 #endif
12554 #ifdef HAVE_TERMIOS_H
12555 #include <termios.h>
12556 #define TTY struct termios
12557 #else
12558 #ifdef HAVE_TERMIO_H
12559 #include <termio.h>
12560 #define TTY struct termio
12561 #endif
12562 #endif
12563
12564 int
12565 main ()
12566 {
12567
12568 TTY foo;
12569 tcgetattr(1, &foo);
12570   ;
12571   return 0;
12572 }
12573 _ACEOF
12574 rm -f conftest.$ac_objext conftest$ac_exeext
12575 if { (eval echo "$as_me:12575: \"$ac_link\"") >&5
12576   (eval $ac_link) 2>&5
12577   ac_status=$?
12578   echo "$as_me:12578: \$? = $ac_status" >&5
12579   (exit $ac_status); } &&
12580          { ac_try='test -s conftest$ac_exeext'
12581   { (eval echo "$as_me:12581: \"$ac_try\"") >&5
12582   (eval $ac_try) 2>&5
12583   ac_status=$?
12584   echo "$as_me:12584: \$? = $ac_status" >&5
12585   (exit $ac_status); }; }; then
12586   cf_cv_have_tcgetattr=yes
12587 else
12588   echo "$as_me: failed program was:" >&5
12589 cat conftest.$ac_ext >&5
12590 cf_cv_have_tcgetattr=no
12591 fi
12592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12593 fi
12594 echo "$as_me:12594: result: $cf_cv_have_tcgetattr" >&5
12595 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12596 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12597 #define HAVE_TCGETATTR 1
12598 EOF
12599
12600 echo "$as_me:12600: checking for vsscanf function or workaround" >&5
12601 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12602 if test "${cf_cv_func_vsscanf+set}" = set; then
12603   echo $ECHO_N "(cached) $ECHO_C" >&6
12604 else
12605
12606 cat >conftest.$ac_ext <<_ACEOF
12607 #line 12607 "configure"
12608 #include "confdefs.h"
12609
12610 #include <stdarg.h>
12611 #include <stdio.h>
12612 int
12613 main ()
12614 {
12615
12616         va_list ap;
12617         vsscanf("from", "%d", ap)
12618   ;
12619   return 0;
12620 }
12621 _ACEOF
12622 rm -f conftest.$ac_objext conftest$ac_exeext
12623 if { (eval echo "$as_me:12623: \"$ac_link\"") >&5
12624   (eval $ac_link) 2>&5
12625   ac_status=$?
12626   echo "$as_me:12626: \$? = $ac_status" >&5
12627   (exit $ac_status); } &&
12628          { ac_try='test -s conftest$ac_exeext'
12629   { (eval echo "$as_me:12629: \"$ac_try\"") >&5
12630   (eval $ac_try) 2>&5
12631   ac_status=$?
12632   echo "$as_me:12632: \$? = $ac_status" >&5
12633   (exit $ac_status); }; }; then
12634   cf_cv_func_vsscanf=vsscanf
12635 else
12636   echo "$as_me: failed program was:" >&5
12637 cat conftest.$ac_ext >&5
12638
12639 cat >conftest.$ac_ext <<_ACEOF
12640 #line 12640 "configure"
12641 #include "confdefs.h"
12642
12643 #include <stdarg.h>
12644 #include <stdio.h>
12645 int
12646 main ()
12647 {
12648
12649     FILE strbuf;
12650     char *str = "from";
12651
12652     strbuf._flag = _IOREAD;
12653     strbuf._ptr = strbuf._base = (unsigned char *) str;
12654     strbuf._cnt = strlen(str);
12655     strbuf._file = _NFILE;
12656     return (vfscanf(&strbuf, "%d", ap))
12657   ;
12658   return 0;
12659 }
12660 _ACEOF
12661 rm -f conftest.$ac_objext conftest$ac_exeext
12662 if { (eval echo "$as_me:12662: \"$ac_link\"") >&5
12663   (eval $ac_link) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); } &&
12667          { ac_try='test -s conftest$ac_exeext'
12668   { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); }; }; then
12673   cf_cv_func_vsscanf=vfscanf
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 cat conftest.$ac_ext >&5
12677
12678 cat >conftest.$ac_ext <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681
12682 #include <stdarg.h>
12683 #include <stdio.h>
12684 int
12685 main ()
12686 {
12687
12688     FILE strbuf;
12689     char *str = "from";
12690
12691     strbuf._flag = _IOREAD;
12692     strbuf._ptr = strbuf._base = (unsigned char *) str;
12693     strbuf._cnt = strlen(str);
12694     strbuf._file = _NFILE;
12695     return (_doscan(&strbuf, "%d", ap))
12696   ;
12697   return 0;
12698 }
12699 _ACEOF
12700 rm -f conftest.$ac_objext conftest$ac_exeext
12701 if { (eval echo "$as_me:12701: \"$ac_link\"") >&5
12702   (eval $ac_link) 2>&5
12703   ac_status=$?
12704   echo "$as_me:12704: \$? = $ac_status" >&5
12705   (exit $ac_status); } &&
12706          { ac_try='test -s conftest$ac_exeext'
12707   { (eval echo "$as_me:12707: \"$ac_try\"") >&5
12708   (eval $ac_try) 2>&5
12709   ac_status=$?
12710   echo "$as_me:12710: \$? = $ac_status" >&5
12711   (exit $ac_status); }; }; then
12712   cf_cv_func_vsscanf=_doscan
12713 else
12714   echo "$as_me: failed program was:" >&5
12715 cat conftest.$ac_ext >&5
12716
12717 cf_cv_func_vsscanf=no
12718 fi
12719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12720 fi
12721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12722 fi
12723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12724 fi
12725 echo "$as_me:12725: result: $cf_cv_func_vsscanf" >&5
12726 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12727
12728 case $cf_cv_func_vsscanf in #(vi
12729 vsscanf) cat >>confdefs.h <<\EOF
12730 #define HAVE_VSSCANF 1
12731 EOF
12732 ;; #(vi
12733 vfscanf) cat >>confdefs.h <<\EOF
12734 #define HAVE_VFSCANF 1
12735 EOF
12736 ;; #(vi
12737 _doscan) cat >>confdefs.h <<\EOF
12738 #define HAVE__DOSCAN 1
12739 EOF
12740 ;;
12741 esac
12742
12743 echo "$as_me:12743: checking for working mkstemp" >&5
12744 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12745 if test "${cf_cv_func_mkstemp+set}" = set; then
12746   echo $ECHO_N "(cached) $ECHO_C" >&6
12747 else
12748
12749 rm -f conftest*
12750 if test "$cross_compiling" = yes; then
12751   echo "$as_me:12751: checking for mkstemp" >&5
12752 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12753 if test "${ac_cv_func_mkstemp+set}" = set; then
12754   echo $ECHO_N "(cached) $ECHO_C" >&6
12755 else
12756   cat >conftest.$ac_ext <<_ACEOF
12757 #line 12757 "configure"
12758 #include "confdefs.h"
12759 /* System header to define __stub macros and hopefully few prototypes,
12760     which can conflict with char mkstemp (); below.  */
12761 #include <assert.h>
12762 /* Override any gcc2 internal prototype to avoid an error.  */
12763 #ifdef __cplusplus
12764 extern "C"
12765 #endif
12766 /* We use char because int might match the return type of a gcc2
12767    builtin and then its argument prototype would still apply.  */
12768 char mkstemp ();
12769 char (*f) ();
12770
12771 int
12772 main ()
12773 {
12774 /* The GNU C library defines this for functions which it implements
12775     to always fail with ENOSYS.  Some functions are actually named
12776     something starting with __ and the normal name is an alias.  */
12777 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12778 choke me
12779 #else
12780 f = mkstemp;
12781 #endif
12782
12783   ;
12784   return 0;
12785 }
12786 _ACEOF
12787 rm -f conftest.$ac_objext conftest$ac_exeext
12788 if { (eval echo "$as_me:12788: \"$ac_link\"") >&5
12789   (eval $ac_link) 2>&5
12790   ac_status=$?
12791   echo "$as_me:12791: \$? = $ac_status" >&5
12792   (exit $ac_status); } &&
12793          { ac_try='test -s conftest$ac_exeext'
12794   { (eval echo "$as_me:12794: \"$ac_try\"") >&5
12795   (eval $ac_try) 2>&5
12796   ac_status=$?
12797   echo "$as_me:12797: \$? = $ac_status" >&5
12798   (exit $ac_status); }; }; then
12799   ac_cv_func_mkstemp=yes
12800 else
12801   echo "$as_me: failed program was:" >&5
12802 cat conftest.$ac_ext >&5
12803 ac_cv_func_mkstemp=no
12804 fi
12805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12806 fi
12807 echo "$as_me:12807: result: $ac_cv_func_mkstemp" >&5
12808 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12809
12810 else
12811   cat >conftest.$ac_ext <<_ACEOF
12812 #line 12812 "configure"
12813 #include "confdefs.h"
12814
12815 #include <sys/types.h>
12816 #include <stdlib.h>
12817 #include <stdio.h>
12818 #include <string.h>
12819 #include <sys/stat.h>
12820 int main()
12821 {
12822         char *tmpl = "conftestXXXXXX";
12823         char name[2][80];
12824         int n;
12825         int result = 0;
12826         int fd;
12827         struct stat sb;
12828
12829         umask(077);
12830         for (n = 0; n < 2; ++n) {
12831                 strcpy(name[n], tmpl);
12832                 if ((fd = mkstemp(name[n])) >= 0) {
12833                         if (!strcmp(name[n], tmpl)
12834                          || stat(name[n], &sb) != 0
12835                          || (sb.st_mode & S_IFMT) != S_IFREG
12836                          || (sb.st_mode & 077) != 0) {
12837                                 result = 1;
12838                         }
12839                         close(fd);
12840                 }
12841         }
12842         if (result == 0
12843          && !strcmp(name[0], name[1]))
12844                 result = 1;
12845         ${cf_cv_main_return:-return}(result);
12846 }
12847
12848 _ACEOF
12849 rm -f conftest$ac_exeext
12850 if { (eval echo "$as_me:12850: \"$ac_link\"") >&5
12851   (eval $ac_link) 2>&5
12852   ac_status=$?
12853   echo "$as_me:12853: \$? = $ac_status" >&5
12854   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12855   { (eval echo "$as_me:12855: \"$ac_try\"") >&5
12856   (eval $ac_try) 2>&5
12857   ac_status=$?
12858   echo "$as_me:12858: \$? = $ac_status" >&5
12859   (exit $ac_status); }; }; then
12860   cf_cv_func_mkstemp=yes
12861
12862 else
12863   echo "$as_me: program exited with status $ac_status" >&5
12864 echo "$as_me: failed program was:" >&5
12865 cat conftest.$ac_ext >&5
12866 cf_cv_func_mkstemp=no
12867
12868 fi
12869 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12870 fi
12871
12872 fi
12873 echo "$as_me:12873: result: $cf_cv_func_mkstemp" >&5
12874 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12875 if test "$cf_cv_func_mkstemp" = yes ; then
12876         cat >>confdefs.h <<\EOF
12877 #define HAVE_MKSTEMP 1
12878 EOF
12879
12880 fi
12881
12882 # setup for prototype of fallback for vsscanf()
12883
12884 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12885         HAVE_VSSCANF=1
12886 else
12887         HAVE_VSSCANF=0
12888 fi
12889
12890 if test "$cross_compiling" = yes ; then
12891         { echo "$as_me:12891: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12892 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12893 else
12894         echo "$as_me:12894: checking whether setvbuf arguments are reversed" >&5
12895 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12896 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12897   echo $ECHO_N "(cached) $ECHO_C" >&6
12898 else
12899   if test "$cross_compiling" = yes; then
12900   { { echo "$as_me:12900: error: cannot run test program while cross compiling" >&5
12901 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12902    { (exit 1); exit 1; }; }
12903 else
12904   cat >conftest.$ac_ext <<_ACEOF
12905 #line 12905 "configure"
12906 #include "confdefs.h"
12907 #include <stdio.h>
12908 /* If setvbuf has the reversed format, exit 0. */
12909 int
12910 main ()
12911 {
12912   /* This call has the arguments reversed.
12913      A reversed system may check and see that the address of main
12914      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12915   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12916     $ac_main_return(1);
12917   putc('\r', stdout);
12918   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12919 }
12920 _ACEOF
12921 rm -f conftest$ac_exeext
12922 if { (eval echo "$as_me:12922: \"$ac_link\"") >&5
12923   (eval $ac_link) 2>&5
12924   ac_status=$?
12925   echo "$as_me:12925: \$? = $ac_status" >&5
12926   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12927   { (eval echo "$as_me:12927: \"$ac_try\"") >&5
12928   (eval $ac_try) 2>&5
12929   ac_status=$?
12930   echo "$as_me:12930: \$? = $ac_status" >&5
12931   (exit $ac_status); }; }; then
12932   ac_cv_func_setvbuf_reversed=yes
12933 else
12934   echo "$as_me: program exited with status $ac_status" >&5
12935 echo "$as_me: failed program was:" >&5
12936 cat conftest.$ac_ext >&5
12937 ac_cv_func_setvbuf_reversed=no
12938 fi
12939 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12940 fi
12941 rm -f core core.* *.core
12942 fi
12943 echo "$as_me:12943: result: $ac_cv_func_setvbuf_reversed" >&5
12944 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12945 if test $ac_cv_func_setvbuf_reversed = yes; then
12946
12947 cat >>confdefs.h <<\EOF
12948 #define SETVBUF_REVERSED 1
12949 EOF
12950
12951 fi
12952
12953 fi
12954 echo "$as_me:12954: checking return type of signal handlers" >&5
12955 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12956 if test "${ac_cv_type_signal+set}" = set; then
12957   echo $ECHO_N "(cached) $ECHO_C" >&6
12958 else
12959   cat >conftest.$ac_ext <<_ACEOF
12960 #line 12960 "configure"
12961 #include "confdefs.h"
12962 #include <sys/types.h>
12963 #include <signal.h>
12964 #ifdef signal
12965 # undef signal
12966 #endif
12967 #ifdef __cplusplus
12968 extern "C" void (*signal (int, void (*)(int)))(int);
12969 #else
12970 void (*signal ()) ();
12971 #endif
12972
12973 int
12974 main ()
12975 {
12976 int i;
12977   ;
12978   return 0;
12979 }
12980 _ACEOF
12981 rm -f conftest.$ac_objext
12982 if { (eval echo "$as_me:12982: \"$ac_compile\"") >&5
12983   (eval $ac_compile) 2>&5
12984   ac_status=$?
12985   echo "$as_me:12985: \$? = $ac_status" >&5
12986   (exit $ac_status); } &&
12987          { ac_try='test -s conftest.$ac_objext'
12988   { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989   (eval $ac_try) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit $ac_status); }; }; then
12993   ac_cv_type_signal=void
12994 else
12995   echo "$as_me: failed program was:" >&5
12996 cat conftest.$ac_ext >&5
12997 ac_cv_type_signal=int
12998 fi
12999 rm -f conftest.$ac_objext conftest.$ac_ext
13000 fi
13001 echo "$as_me:13001: result: $ac_cv_type_signal" >&5
13002 echo "${ECHO_T}$ac_cv_type_signal" >&6
13003
13004 cat >>confdefs.h <<EOF
13005 #define RETSIGTYPE $ac_cv_type_signal
13006 EOF
13007
13008 echo "$as_me:13008: checking for type sigaction_t" >&5
13009 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13010 if test "${cf_cv_type_sigaction+set}" = set; then
13011   echo $ECHO_N "(cached) $ECHO_C" >&6
13012 else
13013
13014         cat >conftest.$ac_ext <<_ACEOF
13015 #line 13015 "configure"
13016 #include "confdefs.h"
13017
13018 #include <signal.h>
13019 int
13020 main ()
13021 {
13022 sigaction_t x
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 rm -f conftest.$ac_objext
13028 if { (eval echo "$as_me:13028: \"$ac_compile\"") >&5
13029   (eval $ac_compile) 2>&5
13030   ac_status=$?
13031   echo "$as_me:13031: \$? = $ac_status" >&5
13032   (exit $ac_status); } &&
13033          { ac_try='test -s conftest.$ac_objext'
13034   { (eval echo "$as_me:13034: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit $ac_status); }; }; then
13039   cf_cv_type_sigaction=yes
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 cf_cv_type_sigaction=no
13044 fi
13045 rm -f conftest.$ac_objext conftest.$ac_ext
13046 fi
13047
13048 echo "$as_me:13048: result: $cf_cv_type_sigaction" >&5
13049 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13050 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13051 #define HAVE_TYPE_SIGACTION 1
13052 EOF
13053
13054 echo "$as_me:13054: checking declaration of size-change" >&5
13055 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13056 if test "${cf_cv_sizechange+set}" = set; then
13057   echo $ECHO_N "(cached) $ECHO_C" >&6
13058 else
13059
13060     cf_cv_sizechange=unknown
13061     cf_save_CPPFLAGS="$CPPFLAGS"
13062
13063 for cf_opts in "" "NEED_PTEM_H"
13064 do
13065
13066     CPPFLAGS="$cf_save_CPPFLAGS"
13067     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13068     cat >conftest.$ac_ext <<_ACEOF
13069 #line 13069 "configure"
13070 #include "confdefs.h"
13071 #include <sys/types.h>
13072 #ifdef HAVE_TERMIOS_H
13073 #include <termios.h>
13074 #else
13075 #ifdef HAVE_TERMIO_H
13076 #include <termio.h>
13077 #endif
13078 #endif
13079 #ifdef NEED_PTEM_H
13080 /* This is a workaround for SCO:  they neglected to define struct winsize in
13081  * termios.h -- it's only in termio.h and ptem.h
13082  */
13083 #include        <sys/stream.h>
13084 #include        <sys/ptem.h>
13085 #endif
13086 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13087 #include <sys/ioctl.h>
13088 #endif
13089
13090 int
13091 main ()
13092 {
13093
13094 #ifdef TIOCGSIZE
13095         struct ttysize win;     /* FIXME: what system is this? */
13096         int y = win.ts_lines;
13097         int x = win.ts_cols;
13098 #else
13099 #ifdef TIOCGWINSZ
13100         struct winsize win;
13101         int y = win.ws_row;
13102         int x = win.ws_col;
13103 #else
13104         no TIOCGSIZE or TIOCGWINSZ
13105 #endif /* TIOCGWINSZ */
13106 #endif /* TIOCGSIZE */
13107
13108   ;
13109   return 0;
13110 }
13111 _ACEOF
13112 rm -f conftest.$ac_objext
13113 if { (eval echo "$as_me:13113: \"$ac_compile\"") >&5
13114   (eval $ac_compile) 2>&5
13115   ac_status=$?
13116   echo "$as_me:13116: \$? = $ac_status" >&5
13117   (exit $ac_status); } &&
13118          { ac_try='test -s conftest.$ac_objext'
13119   { (eval echo "$as_me:13119: \"$ac_try\"") >&5
13120   (eval $ac_try) 2>&5
13121   ac_status=$?
13122   echo "$as_me:13122: \$? = $ac_status" >&5
13123   (exit $ac_status); }; }; then
13124   cf_cv_sizechange=yes
13125 else
13126   echo "$as_me: failed program was:" >&5
13127 cat conftest.$ac_ext >&5
13128 cf_cv_sizechange=no
13129 fi
13130 rm -f conftest.$ac_objext conftest.$ac_ext
13131
13132         CPPFLAGS="$cf_save_CPPFLAGS"
13133         if test "$cf_cv_sizechange" = yes ; then
13134                 echo "size-change succeeded ($cf_opts)" >&5
13135                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13136                 break
13137         fi
13138 done
13139
13140 fi
13141 echo "$as_me:13141: result: $cf_cv_sizechange" >&5
13142 echo "${ECHO_T}$cf_cv_sizechange" >&6
13143 if test "$cf_cv_sizechange" != no ; then
13144         cat >>confdefs.h <<\EOF
13145 #define HAVE_SIZECHANGE 1
13146 EOF
13147
13148         case $cf_cv_sizechange in #(vi
13149         NEED*)
13150                 cat >>confdefs.h <<EOF
13151 #define $cf_cv_sizechange  1
13152 EOF
13153
13154                 ;;
13155         esac
13156 fi
13157
13158 echo "$as_me:13158: checking for memmove" >&5
13159 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13160 if test "${ac_cv_func_memmove+set}" = set; then
13161   echo $ECHO_N "(cached) $ECHO_C" >&6
13162 else
13163   cat >conftest.$ac_ext <<_ACEOF
13164 #line 13164 "configure"
13165 #include "confdefs.h"
13166 /* System header to define __stub macros and hopefully few prototypes,
13167     which can conflict with char memmove (); below.  */
13168 #include <assert.h>
13169 /* Override any gcc2 internal prototype to avoid an error.  */
13170 #ifdef __cplusplus
13171 extern "C"
13172 #endif
13173 /* We use char because int might match the return type of a gcc2
13174    builtin and then its argument prototype would still apply.  */
13175 char memmove ();
13176 char (*f) ();
13177
13178 int
13179 main ()
13180 {
13181 /* The GNU C library defines this for functions which it implements
13182     to always fail with ENOSYS.  Some functions are actually named
13183     something starting with __ and the normal name is an alias.  */
13184 #if defined (__stub_memmove) || defined (__stub___memmove)
13185 choke me
13186 #else
13187 f = memmove;
13188 #endif
13189
13190   ;
13191   return 0;
13192 }
13193 _ACEOF
13194 rm -f conftest.$ac_objext conftest$ac_exeext
13195 if { (eval echo "$as_me:13195: \"$ac_link\"") >&5
13196   (eval $ac_link) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit $ac_status); } &&
13200          { ac_try='test -s conftest$ac_exeext'
13201   { (eval echo "$as_me:13201: \"$ac_try\"") >&5
13202   (eval $ac_try) 2>&5
13203   ac_status=$?
13204   echo "$as_me:13204: \$? = $ac_status" >&5
13205   (exit $ac_status); }; }; then
13206   ac_cv_func_memmove=yes
13207 else
13208   echo "$as_me: failed program was:" >&5
13209 cat conftest.$ac_ext >&5
13210 ac_cv_func_memmove=no
13211 fi
13212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13213 fi
13214 echo "$as_me:13214: result: $ac_cv_func_memmove" >&5
13215 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13216 if test $ac_cv_func_memmove = yes; then
13217   :
13218 else
13219
13220 echo "$as_me:13220: checking for bcopy" >&5
13221 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13222 if test "${ac_cv_func_bcopy+set}" = set; then
13223   echo $ECHO_N "(cached) $ECHO_C" >&6
13224 else
13225   cat >conftest.$ac_ext <<_ACEOF
13226 #line 13226 "configure"
13227 #include "confdefs.h"
13228 /* System header to define __stub macros and hopefully few prototypes,
13229     which can conflict with char bcopy (); below.  */
13230 #include <assert.h>
13231 /* Override any gcc2 internal prototype to avoid an error.  */
13232 #ifdef __cplusplus
13233 extern "C"
13234 #endif
13235 /* We use char because int might match the return type of a gcc2
13236    builtin and then its argument prototype would still apply.  */
13237 char bcopy ();
13238 char (*f) ();
13239
13240 int
13241 main ()
13242 {
13243 /* The GNU C library defines this for functions which it implements
13244     to always fail with ENOSYS.  Some functions are actually named
13245     something starting with __ and the normal name is an alias.  */
13246 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13247 choke me
13248 #else
13249 f = bcopy;
13250 #endif
13251
13252   ;
13253   return 0;
13254 }
13255 _ACEOF
13256 rm -f conftest.$ac_objext conftest$ac_exeext
13257 if { (eval echo "$as_me:13257: \"$ac_link\"") >&5
13258   (eval $ac_link) 2>&5
13259   ac_status=$?
13260   echo "$as_me:13260: \$? = $ac_status" >&5
13261   (exit $ac_status); } &&
13262          { ac_try='test -s conftest$ac_exeext'
13263   { (eval echo "$as_me:13263: \"$ac_try\"") >&5
13264   (eval $ac_try) 2>&5
13265   ac_status=$?
13266   echo "$as_me:13266: \$? = $ac_status" >&5
13267   (exit $ac_status); }; }; then
13268   ac_cv_func_bcopy=yes
13269 else
13270   echo "$as_me: failed program was:" >&5
13271 cat conftest.$ac_ext >&5
13272 ac_cv_func_bcopy=no
13273 fi
13274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13275 fi
13276 echo "$as_me:13276: result: $ac_cv_func_bcopy" >&5
13277 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13278 if test $ac_cv_func_bcopy = yes; then
13279
13280         echo "$as_me:13280: checking if bcopy does overlapping moves" >&5
13281 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13282 if test "${cf_cv_good_bcopy+set}" = set; then
13283   echo $ECHO_N "(cached) $ECHO_C" >&6
13284 else
13285
13286                 if test "$cross_compiling" = yes; then
13287   cf_cv_good_bcopy=unknown
13288 else
13289   cat >conftest.$ac_ext <<_ACEOF
13290 #line 13290 "configure"
13291 #include "confdefs.h"
13292
13293 int main() {
13294         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13295         char temp[40];
13296         bcopy(data, temp, sizeof(data));
13297         bcopy(temp+10, temp, 15);
13298         bcopy(temp+5, temp+15, 10);
13299         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13300 }
13301
13302 _ACEOF
13303 rm -f conftest$ac_exeext
13304 if { (eval echo "$as_me:13304: \"$ac_link\"") >&5
13305   (eval $ac_link) 2>&5
13306   ac_status=$?
13307   echo "$as_me:13307: \$? = $ac_status" >&5
13308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13309   { (eval echo "$as_me:13309: \"$ac_try\"") >&5
13310   (eval $ac_try) 2>&5
13311   ac_status=$?
13312   echo "$as_me:13312: \$? = $ac_status" >&5
13313   (exit $ac_status); }; }; then
13314   cf_cv_good_bcopy=yes
13315 else
13316   echo "$as_me: program exited with status $ac_status" >&5
13317 echo "$as_me: failed program was:" >&5
13318 cat conftest.$ac_ext >&5
13319 cf_cv_good_bcopy=no
13320 fi
13321 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13322 fi
13323
13324 fi
13325 echo "$as_me:13325: result: $cf_cv_good_bcopy" >&5
13326 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13327
13328 else
13329   cf_cv_good_bcopy=no
13330 fi
13331
13332         if test "$cf_cv_good_bcopy" = yes ; then
13333                 cat >>confdefs.h <<\EOF
13334 #define USE_OK_BCOPY 1
13335 EOF
13336
13337         else
13338                 cat >>confdefs.h <<\EOF
13339 #define USE_MY_MEMMOVE 1
13340 EOF
13341
13342         fi
13343
13344 fi
13345
13346 echo "$as_me:13346: checking if poll really works" >&5
13347 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13348 if test "${cf_cv_working_poll+set}" = set; then
13349   echo $ECHO_N "(cached) $ECHO_C" >&6
13350 else
13351
13352 if test "$cross_compiling" = yes; then
13353   cf_cv_working_poll=unknown
13354 else
13355   cat >conftest.$ac_ext <<_ACEOF
13356 #line 13356 "configure"
13357 #include "confdefs.h"
13358
13359 #include <stdio.h>
13360 #ifdef HAVE_POLL_H
13361 #include <poll.h>
13362 #else
13363 #include <sys/poll.h>
13364 #endif
13365 int main() {
13366         struct pollfd myfds;
13367         int ret;
13368
13369         myfds.fd = 0;
13370         myfds.events = POLLIN;
13371
13372         ret = poll(&myfds, 1, 100);
13373         ${cf_cv_main_return:-return}(ret != 0);
13374 }
13375 _ACEOF
13376 rm -f conftest$ac_exeext
13377 if { (eval echo "$as_me:13377: \"$ac_link\"") >&5
13378   (eval $ac_link) 2>&5
13379   ac_status=$?
13380   echo "$as_me:13380: \$? = $ac_status" >&5
13381   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13382   { (eval echo "$as_me:13382: \"$ac_try\"") >&5
13383   (eval $ac_try) 2>&5
13384   ac_status=$?
13385   echo "$as_me:13385: \$? = $ac_status" >&5
13386   (exit $ac_status); }; }; then
13387   cf_cv_working_poll=yes
13388 else
13389   echo "$as_me: program exited with status $ac_status" >&5
13390 echo "$as_me: failed program was:" >&5
13391 cat conftest.$ac_ext >&5
13392 cf_cv_working_poll=no
13393 fi
13394 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13395 fi
13396 fi
13397 echo "$as_me:13397: result: $cf_cv_working_poll" >&5
13398 echo "${ECHO_T}$cf_cv_working_poll" >&6
13399 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13400 #define HAVE_WORKING_POLL 1
13401 EOF
13402
13403 if test "$with_hashed_db" != no ; then
13404         cat >>confdefs.h <<\EOF
13405 #define USE_HASHED_DB 1
13406 EOF
13407
13408 echo "$as_me:13408: checking for db.h" >&5
13409 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13410 if test "${ac_cv_header_db_h+set}" = set; then
13411   echo $ECHO_N "(cached) $ECHO_C" >&6
13412 else
13413   cat >conftest.$ac_ext <<_ACEOF
13414 #line 13414 "configure"
13415 #include "confdefs.h"
13416 #include <db.h>
13417 _ACEOF
13418 if { (eval echo "$as_me:13418: \"$ac_cpp conftest.$ac_ext\"") >&5
13419   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13420   ac_status=$?
13421   egrep -v '^ *\+' conftest.er1 >conftest.err
13422   rm -f conftest.er1
13423   cat conftest.err >&5
13424   echo "$as_me:13424: \$? = $ac_status" >&5
13425   (exit $ac_status); } >/dev/null; then
13426   if test -s conftest.err; then
13427     ac_cpp_err=$ac_c_preproc_warn_flag
13428   else
13429     ac_cpp_err=
13430   fi
13431 else
13432   ac_cpp_err=yes
13433 fi
13434 if test -z "$ac_cpp_err"; then
13435   ac_cv_header_db_h=yes
13436 else
13437   echo "$as_me: failed program was:" >&5
13438   cat conftest.$ac_ext >&5
13439   ac_cv_header_db_h=no
13440 fi
13441 rm -f conftest.err conftest.$ac_ext
13442 fi
13443 echo "$as_me:13443: result: $ac_cv_header_db_h" >&5
13444 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13445 if test $ac_cv_header_db_h = yes; then
13446
13447 echo "$as_me:13447: checking for version of db" >&5
13448 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13449 if test "${cf_cv_hashed_db_version+set}" = set; then
13450   echo $ECHO_N "(cached) $ECHO_C" >&6
13451 else
13452
13453 cf_cv_hashed_db_version=unknown
13454
13455 for cf_db_version in 1 2 3 4
13456 do
13457
13458 echo "(line 13458) testing checking for db version $cf_db_version ..." 1>&5
13459
13460         cat >conftest.$ac_ext <<_ACEOF
13461 #line 13461 "configure"
13462 #include "confdefs.h"
13463
13464 $ac_includes_default
13465 #include <db.h>
13466
13467 #ifdef DB_VERSION_MAJOR
13468         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13469 #if $cf_db_version == DB_VERSION_MAJOR
13470         /* ok */
13471 #else
13472         make an error
13473 #endif
13474 #else
13475 #if $cf_db_version == 1
13476         /* ok: assuming this is DB 1.8.5 */
13477 #else
13478         make an error
13479 #endif
13480 #endif
13481
13482 int
13483 main ()
13484 {
13485 DBT *foo = 0
13486   ;
13487   return 0;
13488 }
13489 _ACEOF
13490 rm -f conftest.$ac_objext
13491 if { (eval echo "$as_me:13491: \"$ac_compile\"") >&5
13492   (eval $ac_compile) 2>&5
13493   ac_status=$?
13494   echo "$as_me:13494: \$? = $ac_status" >&5
13495   (exit $ac_status); } &&
13496          { ac_try='test -s conftest.$ac_objext'
13497   { (eval echo "$as_me:13497: \"$ac_try\"") >&5
13498   (eval $ac_try) 2>&5
13499   ac_status=$?
13500   echo "$as_me:13500: \$? = $ac_status" >&5
13501   (exit $ac_status); }; }; then
13502
13503         cf_cv_hashed_db_version=$cf_db_version
13504         break
13505
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 cat conftest.$ac_ext >&5
13509 fi
13510 rm -f conftest.$ac_objext conftest.$ac_ext
13511 done
13512
13513 fi
13514 echo "$as_me:13514: result: $cf_cv_hashed_db_version" >&5
13515 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13516
13517 if test "$cf_cv_hashed_db_version" = unknown ; then
13518         { { echo "$as_me:13518: error: Cannot determine version of db" >&5
13519 echo "$as_me: error: Cannot determine version of db" >&2;}
13520    { (exit 1); exit 1; }; }
13521 else
13522
13523 echo "$as_me:13523: checking for db libraries" >&5
13524 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13525 if test "${cf_cv_hashed_db_libs+set}" = set; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528
13529 cf_cv_hashed_db_libs=unknown
13530 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13531 do
13532         cf_save_libs="$LIBS"
13533         if test -n "$cf_db_libs"; then
13534                 LIBS="-l$cf_db_libs $LIBS"
13535         fi
13536
13537 echo "(line 13537) testing checking for library "$cf_db_libs" ..." 1>&5
13538
13539         cat >conftest.$ac_ext <<_ACEOF
13540 #line 13540 "configure"
13541 #include "confdefs.h"
13542
13543 $ac_includes_default
13544 #include <db.h>
13545
13546 int
13547 main ()
13548 {
13549
13550         char *path = "/tmp/foo";
13551 #ifdef DB_VERSION_MAJOR
13552 #if DB_VERSION_MAJOR >= 4
13553         DB *result = 0;
13554         db_create(&result, NULL, 0);
13555         result->open(result,
13556                 NULL,
13557                 path,
13558                 path,
13559                 DB_HASH,
13560                 DB_CREATE,
13561                 0644);
13562 #elif DB_VERSION_MAJOR >= 3
13563         DB *result = 0;
13564         db_create(&result, NULL, 0);
13565         result->open(result,
13566                 path,
13567                 path,
13568                 DB_HASH,
13569                 DB_CREATE,
13570                 0644);
13571 #elif DB_VERSION_MAJOR >= 2
13572         DB *result = 0;
13573         db_open(path,
13574                 DB_HASH,
13575                 DB_CREATE,
13576                 0644,
13577                 (DB_ENV *) 0,
13578                 (DB_INFO *) 0,
13579                 &result);
13580 #endif /* DB_VERSION_MAJOR */
13581 #else
13582         DB *result = dbopen(path,
13583                      2,
13584                      0644,
13585                      DB_HASH,
13586                      0);
13587 #endif
13588         ${cf_cv_main_return:-return}(result != 0)
13589
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext conftest$ac_exeext
13595 if { (eval echo "$as_me:13595: \"$ac_link\"") >&5
13596   (eval $ac_link) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); } &&
13600          { ac_try='test -s conftest$ac_exeext'
13601   { (eval echo "$as_me:13601: \"$ac_try\"") >&5
13602   (eval $ac_try) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); }; }; then
13606
13607         if test -n "$cf_db_libs" ; then
13608                 cf_cv_hashed_db_libs=$cf_db_libs
13609         else
13610                 cf_cv_hashed_db_libs=default
13611         fi
13612         LIBS="$cf_save_libs"
13613         break
13614
13615 else
13616   echo "$as_me: failed program was:" >&5
13617 cat conftest.$ac_ext >&5
13618 fi
13619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13620         LIBS="$cf_save_libs"
13621 done
13622
13623 fi
13624 echo "$as_me:13624: result: $cf_cv_hashed_db_libs" >&5
13625 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13626
13627         if test "$cf_cv_hashed_db_libs" = unknown ; then
13628                 { { echo "$as_me:13628: error: Cannot determine library for db" >&5
13629 echo "$as_me: error: Cannot determine library for db" >&2;}
13630    { (exit 1); exit 1; }; }
13631         elif test "$cf_cv_hashed_db_libs" != default ; then
13632                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13633         fi
13634 fi
13635
13636 else
13637
13638         { { echo "$as_me:13638: error: Cannot find db.h" >&5
13639 echo "$as_me: error: Cannot find db.h" >&2;}
13640    { (exit 1); exit 1; }; }
13641
13642 fi
13643
13644 fi
13645
13646 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13647         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13648         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13649 fi
13650
13651 # Just in case, check if the C compiler has a bool type.
13652
13653 echo "$as_me:13653: checking if we should include stdbool.h" >&5
13654 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13655
13656 if test "${cf_cv_header_stdbool_h+set}" = set; then
13657   echo $ECHO_N "(cached) $ECHO_C" >&6
13658 else
13659
13660         cat >conftest.$ac_ext <<_ACEOF
13661 #line 13661 "configure"
13662 #include "confdefs.h"
13663
13664 int
13665 main ()
13666 {
13667 bool foo = false
13668   ;
13669   return 0;
13670 }
13671 _ACEOF
13672 rm -f conftest.$ac_objext
13673 if { (eval echo "$as_me:13673: \"$ac_compile\"") >&5
13674   (eval $ac_compile) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); } &&
13678          { ac_try='test -s conftest.$ac_objext'
13679   { (eval echo "$as_me:13679: \"$ac_try\"") >&5
13680   (eval $ac_try) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); }; }; then
13684   cf_cv_header_stdbool_h=0
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat conftest.$ac_ext >&5
13688 cat >conftest.$ac_ext <<_ACEOF
13689 #line 13689 "configure"
13690 #include "confdefs.h"
13691
13692 #ifndef __BEOS__
13693 #include <stdbool.h>
13694 #endif
13695
13696 int
13697 main ()
13698 {
13699 bool foo = false
13700   ;
13701   return 0;
13702 }
13703 _ACEOF
13704 rm -f conftest.$ac_objext
13705 if { (eval echo "$as_me:13705: \"$ac_compile\"") >&5
13706   (eval $ac_compile) 2>&5
13707   ac_status=$?
13708   echo "$as_me:13708: \$? = $ac_status" >&5
13709   (exit $ac_status); } &&
13710          { ac_try='test -s conftest.$ac_objext'
13711   { (eval echo "$as_me:13711: \"$ac_try\"") >&5
13712   (eval $ac_try) 2>&5
13713   ac_status=$?
13714   echo "$as_me:13714: \$? = $ac_status" >&5
13715   (exit $ac_status); }; }; then
13716   cf_cv_header_stdbool_h=1
13717 else
13718   echo "$as_me: failed program was:" >&5
13719 cat conftest.$ac_ext >&5
13720 cf_cv_header_stdbool_h=0
13721 fi
13722 rm -f conftest.$ac_objext conftest.$ac_ext
13723 fi
13724 rm -f conftest.$ac_objext conftest.$ac_ext
13725 fi
13726
13727 if test "$cf_cv_header_stdbool_h" = 1
13728 then    echo "$as_me:13728: result: yes" >&5
13729 echo "${ECHO_T}yes" >&6
13730 else    echo "$as_me:13730: result: no" >&5
13731 echo "${ECHO_T}no" >&6
13732 fi
13733
13734 echo "$as_me:13734: checking for builtin bool type" >&5
13735 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13736
13737 if test "${cf_cv_cc_bool_type+set}" = set; then
13738   echo $ECHO_N "(cached) $ECHO_C" >&6
13739 else
13740
13741         cat >conftest.$ac_ext <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744
13745 #include <stdio.h>
13746 #include <sys/types.h>
13747
13748 int
13749 main ()
13750 {
13751 bool x = false
13752   ;
13753   return 0;
13754 }
13755 _ACEOF
13756 rm -f conftest.$ac_objext
13757 if { (eval echo "$as_me:13757: \"$ac_compile\"") >&5
13758   (eval $ac_compile) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } &&
13762          { ac_try='test -s conftest.$ac_objext'
13763   { (eval echo "$as_me:13763: \"$ac_try\"") >&5
13764   (eval $ac_try) 2>&5
13765   ac_status=$?
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); }; }; then
13768   cf_cv_cc_bool_type=1
13769 else
13770   echo "$as_me: failed program was:" >&5
13771 cat conftest.$ac_ext >&5
13772 cf_cv_cc_bool_type=0
13773 fi
13774 rm -f conftest.$ac_objext conftest.$ac_ext
13775
13776 fi
13777
13778 if test "$cf_cv_cc_bool_type" = 1
13779 then    echo "$as_me:13779: result: yes" >&5
13780 echo "${ECHO_T}yes" >&6
13781 else    echo "$as_me:13781: result: no" >&5
13782 echo "${ECHO_T}no" >&6
13783 fi
13784
13785 # Check for C++ compiler characteristics (and ensure that it's there!)
13786 if test -n "$CXX" ; then
13787         ac_ext=cc
13788 ac_cpp='$CXXCPP $CPPFLAGS'
13789 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13790 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13791 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13792 ac_main_return=return
13793
13794 if test -n "$GXX" ; then
13795 case $cf_cv_system_name in #(vi
13796 os2*) #(vi
13797         cf_stdcpp_libname=stdcpp
13798         ;;
13799 *)
13800         cf_stdcpp_libname=stdc++
13801         ;;
13802 esac
13803 echo "$as_me:13803: checking for library $cf_stdcpp_libname" >&5
13804 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13805 if test "${cf_cv_libstdcpp+set}" = set; then
13806   echo $ECHO_N "(cached) $ECHO_C" >&6
13807 else
13808
13809         cf_save="$LIBS"
13810         LIBS="$LIBS -l$cf_stdcpp_libname"
13811 cat >conftest.$ac_ext <<_ACEOF
13812 #line 13812 "configure"
13813 #include "confdefs.h"
13814
13815 #include <strstream.h>
13816 int
13817 main ()
13818 {
13819
13820 char buf[80];
13821 strstreambuf foo(buf, sizeof(buf))
13822
13823   ;
13824   return 0;
13825 }
13826 _ACEOF
13827 rm -f conftest.$ac_objext conftest$ac_exeext
13828 if { (eval echo "$as_me:13828: \"$ac_link\"") >&5
13829   (eval $ac_link) 2>&5
13830   ac_status=$?
13831   echo "$as_me:13831: \$? = $ac_status" >&5
13832   (exit $ac_status); } &&
13833          { ac_try='test -s conftest$ac_exeext'
13834   { (eval echo "$as_me:13834: \"$ac_try\"") >&5
13835   (eval $ac_try) 2>&5
13836   ac_status=$?
13837   echo "$as_me:13837: \$? = $ac_status" >&5
13838   (exit $ac_status); }; }; then
13839   cf_cv_libstdcpp=yes
13840 else
13841   echo "$as_me: failed program was:" >&5
13842 cat conftest.$ac_ext >&5
13843 cf_cv_libstdcpp=no
13844 fi
13845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13846         LIBS="$cf_save"
13847
13848 fi
13849 echo "$as_me:13849: result: $cf_cv_libstdcpp" >&5
13850 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13851 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13852 fi
13853
13854         echo "$as_me:13854: checking whether $CXX understands -c and -o together" >&5
13855 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13856 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13857   echo $ECHO_N "(cached) $ECHO_C" >&6
13858 else
13859
13860 cat > conftest.$ac_ext <<CF_EOF
13861 #include <stdio.h>
13862 int main()
13863 {
13864         ${cf_cv_main_return:-return}(0);
13865 }
13866 CF_EOF
13867 # We do the test twice because some compilers refuse to overwrite an
13868 # existing .o file with -o, though they will create one.
13869 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13870 if { (eval echo "$as_me:13870: \"$ac_try\"") >&5
13871   (eval $ac_try) 2>&5
13872   ac_status=$?
13873   echo "$as_me:13873: \$? = $ac_status" >&5
13874   (exit $ac_status); } &&
13875   test -f conftest2.$ac_objext && { (eval echo "$as_me:13875: \"$ac_try\"") >&5
13876   (eval $ac_try) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); };
13880 then
13881   eval cf_cv_prog_CXX_c_o=yes
13882 else
13883   eval cf_cv_prog_CXX_c_o=no
13884 fi
13885 rm -f conftest*
13886
13887 fi
13888 if test $cf_cv_prog_CXX_c_o = yes; then
13889   echo "$as_me:13889: result: yes" >&5
13890 echo "${ECHO_T}yes" >&6
13891 else
13892   echo "$as_me:13892: result: no" >&5
13893 echo "${ECHO_T}no" >&6
13894 fi
13895
13896         case $GXX_VERSION in
13897         1*|2.0-6*)
13898                 cf_cxx_library=yes
13899                 ;;
13900         *-2.7*|2.7*)
13901
13902 cf_cxx_library=unknown
13903 case $cf_cv_system_name in #(vi
13904 os2*) #(vi
13905         cf_gpp_libname=gpp
13906         ;;
13907 *)
13908         cf_gpp_libname=g++
13909         ;;
13910 esac
13911 if test "$GXX" = yes; then
13912         echo "$as_me:13912: checking for lib$cf_gpp_libname" >&5
13913 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13914         cf_save="$LIBS"
13915         LIBS="$LIBS -l$cf_gpp_libname"
13916         cat >conftest.$ac_ext <<_ACEOF
13917 #line 13917 "configure"
13918 #include "confdefs.h"
13919
13920 #include <$cf_gpp_libname/builtin.h>
13921
13922 int
13923 main ()
13924 {
13925 two_arg_error_handler_t foo2 = lib_error_handler
13926   ;
13927   return 0;
13928 }
13929 _ACEOF
13930 rm -f conftest.$ac_objext conftest$ac_exeext
13931 if { (eval echo "$as_me:13931: \"$ac_link\"") >&5
13932   (eval $ac_link) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); } &&
13936          { ac_try='test -s conftest$ac_exeext'
13937   { (eval echo "$as_me:13937: \"$ac_try\"") >&5
13938   (eval $ac_try) 2>&5
13939   ac_status=$?
13940   echo "$as_me:13940: \$? = $ac_status" >&5
13941   (exit $ac_status); }; }; then
13942   cf_cxx_library=yes
13943          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13944          if test "$cf_gpp_libname" = cpp ; then
13945             cat >>confdefs.h <<\EOF
13946 #define HAVE_GPP_BUILTIN_H 1
13947 EOF
13948
13949          else
13950             cat >>confdefs.h <<\EOF
13951 #define HAVE_GXX_BUILTIN_H 1
13952 EOF
13953
13954          fi
13955 else
13956   echo "$as_me: failed program was:" >&5
13957 cat conftest.$ac_ext >&5
13958 cat >conftest.$ac_ext <<_ACEOF
13959 #line 13959 "configure"
13960 #include "confdefs.h"
13961
13962 #include <builtin.h>
13963
13964 int
13965 main ()
13966 {
13967 two_arg_error_handler_t foo2 = lib_error_handler
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 rm -f conftest.$ac_objext conftest$ac_exeext
13973 if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
13974   (eval $ac_link) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit $ac_status); } &&
13978          { ac_try='test -s conftest$ac_exeext'
13979   { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980   (eval $ac_try) 2>&5
13981   ac_status=$?
13982   echo "$as_me:13982: \$? = $ac_status" >&5
13983   (exit $ac_status); }; }; then
13984   cf_cxx_library=yes
13985          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13986          cat >>confdefs.h <<\EOF
13987 #define HAVE_BUILTIN_H 1
13988 EOF
13989
13990 else
13991   echo "$as_me: failed program was:" >&5
13992 cat conftest.$ac_ext >&5
13993 cf_cxx_library=no
13994 fi
13995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13996 fi
13997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13998         LIBS="$cf_save"
13999         echo "$as_me:13999: result: $cf_cxx_library" >&5
14000 echo "${ECHO_T}$cf_cxx_library" >&6
14001 fi
14002
14003                 ;;
14004         *)
14005                 cf_cxx_library=no
14006                 ;;
14007         esac
14008
14009         ac_ext=cc
14010 ac_cpp='$CXXCPP $CPPFLAGS'
14011 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14012 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14013 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14014 ac_main_return=return
14015 echo "$as_me:14015: checking how to run the C++ preprocessor" >&5
14016 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14017 if test -z "$CXXCPP"; then
14018   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14019   echo $ECHO_N "(cached) $ECHO_C" >&6
14020 else
14021       # Double quotes because CXXCPP needs to be expanded
14022     for CXXCPP in "$CXX -E" "/lib/cpp"
14023     do
14024       ac_preproc_ok=false
14025 for ac_cxx_preproc_warn_flag in '' yes
14026 do
14027   # Use a header file that comes with gcc, so configuring glibc
14028   # with a fresh cross-compiler works.
14029   # On the NeXT, cc -E runs the code through the compiler's parser,
14030   # not just through cpp. "Syntax error" is here to catch this case.
14031   cat >conftest.$ac_ext <<_ACEOF
14032 #line 14032 "configure"
14033 #include "confdefs.h"
14034 #include <assert.h>
14035                      Syntax error
14036 _ACEOF
14037 if { (eval echo "$as_me:14037: \"$ac_cpp conftest.$ac_ext\"") >&5
14038   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14039   ac_status=$?
14040   egrep -v '^ *\+' conftest.er1 >conftest.err
14041   rm -f conftest.er1
14042   cat conftest.err >&5
14043   echo "$as_me:14043: \$? = $ac_status" >&5
14044   (exit $ac_status); } >/dev/null; then
14045   if test -s conftest.err; then
14046     ac_cpp_err=$ac_cxx_preproc_warn_flag
14047   else
14048     ac_cpp_err=
14049   fi
14050 else
14051   ac_cpp_err=yes
14052 fi
14053 if test -z "$ac_cpp_err"; then
14054   :
14055 else
14056   echo "$as_me: failed program was:" >&5
14057   cat conftest.$ac_ext >&5
14058   # Broken: fails on valid input.
14059 continue
14060 fi
14061 rm -f conftest.err conftest.$ac_ext
14062
14063   # OK, works on sane cases.  Now check whether non-existent headers
14064   # can be detected and how.
14065   cat >conftest.$ac_ext <<_ACEOF
14066 #line 14066 "configure"
14067 #include "confdefs.h"
14068 #include <ac_nonexistent.h>
14069 _ACEOF
14070 if { (eval echo "$as_me:14070: \"$ac_cpp conftest.$ac_ext\"") >&5
14071   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14072   ac_status=$?
14073   egrep -v '^ *\+' conftest.er1 >conftest.err
14074   rm -f conftest.er1
14075   cat conftest.err >&5
14076   echo "$as_me:14076: \$? = $ac_status" >&5
14077   (exit $ac_status); } >/dev/null; then
14078   if test -s conftest.err; then
14079     ac_cpp_err=$ac_cxx_preproc_warn_flag
14080   else
14081     ac_cpp_err=
14082   fi
14083 else
14084   ac_cpp_err=yes
14085 fi
14086 if test -z "$ac_cpp_err"; then
14087   # Broken: success on invalid input.
14088 continue
14089 else
14090   echo "$as_me: failed program was:" >&5
14091   cat conftest.$ac_ext >&5
14092   # Passes both tests.
14093 ac_preproc_ok=:
14094 break
14095 fi
14096 rm -f conftest.err conftest.$ac_ext
14097
14098 done
14099 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14100 rm -f conftest.err conftest.$ac_ext
14101 if $ac_preproc_ok; then
14102   break
14103 fi
14104
14105     done
14106     ac_cv_prog_CXXCPP=$CXXCPP
14107
14108 fi
14109   CXXCPP=$ac_cv_prog_CXXCPP
14110 else
14111   ac_cv_prog_CXXCPP=$CXXCPP
14112 fi
14113 echo "$as_me:14113: result: $CXXCPP" >&5
14114 echo "${ECHO_T}$CXXCPP" >&6
14115 ac_preproc_ok=false
14116 for ac_cxx_preproc_warn_flag in '' yes
14117 do
14118   # Use a header file that comes with gcc, so configuring glibc
14119   # with a fresh cross-compiler works.
14120   # On the NeXT, cc -E runs the code through the compiler's parser,
14121   # not just through cpp. "Syntax error" is here to catch this case.
14122   cat >conftest.$ac_ext <<_ACEOF
14123 #line 14123 "configure"
14124 #include "confdefs.h"
14125 #include <assert.h>
14126                      Syntax error
14127 _ACEOF
14128 if { (eval echo "$as_me:14128: \"$ac_cpp conftest.$ac_ext\"") >&5
14129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14130   ac_status=$?
14131   egrep -v '^ *\+' conftest.er1 >conftest.err
14132   rm -f conftest.er1
14133   cat conftest.err >&5
14134   echo "$as_me:14134: \$? = $ac_status" >&5
14135   (exit $ac_status); } >/dev/null; then
14136   if test -s conftest.err; then
14137     ac_cpp_err=$ac_cxx_preproc_warn_flag
14138   else
14139     ac_cpp_err=
14140   fi
14141 else
14142   ac_cpp_err=yes
14143 fi
14144 if test -z "$ac_cpp_err"; then
14145   :
14146 else
14147   echo "$as_me: failed program was:" >&5
14148   cat conftest.$ac_ext >&5
14149   # Broken: fails on valid input.
14150 continue
14151 fi
14152 rm -f conftest.err conftest.$ac_ext
14153
14154   # OK, works on sane cases.  Now check whether non-existent headers
14155   # can be detected and how.
14156   cat >conftest.$ac_ext <<_ACEOF
14157 #line 14157 "configure"
14158 #include "confdefs.h"
14159 #include <ac_nonexistent.h>
14160 _ACEOF
14161 if { (eval echo "$as_me:14161: \"$ac_cpp conftest.$ac_ext\"") >&5
14162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14163   ac_status=$?
14164   egrep -v '^ *\+' conftest.er1 >conftest.err
14165   rm -f conftest.er1
14166   cat conftest.err >&5
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); } >/dev/null; then
14169   if test -s conftest.err; then
14170     ac_cpp_err=$ac_cxx_preproc_warn_flag
14171   else
14172     ac_cpp_err=
14173   fi
14174 else
14175   ac_cpp_err=yes
14176 fi
14177 if test -z "$ac_cpp_err"; then
14178   # Broken: success on invalid input.
14179 continue
14180 else
14181   echo "$as_me: failed program was:" >&5
14182   cat conftest.$ac_ext >&5
14183   # Passes both tests.
14184 ac_preproc_ok=:
14185 break
14186 fi
14187 rm -f conftest.err conftest.$ac_ext
14188
14189 done
14190 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14191 rm -f conftest.err conftest.$ac_ext
14192 if $ac_preproc_ok; then
14193   :
14194 else
14195   { { echo "$as_me:14195: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14196 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14197    { (exit 1); exit 1; }; }
14198 fi
14199
14200 ac_ext=cc
14201 ac_cpp='$CXXCPP $CPPFLAGS'
14202 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14203 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14204 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14205 ac_main_return=return
14206
14207 for ac_header in iostream typeinfo
14208 do
14209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14210 echo "$as_me:14210: checking for $ac_header" >&5
14211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14213   echo $ECHO_N "(cached) $ECHO_C" >&6
14214 else
14215   cat >conftest.$ac_ext <<_ACEOF
14216 #line 14216 "configure"
14217 #include "confdefs.h"
14218 #include <$ac_header>
14219 _ACEOF
14220 if { (eval echo "$as_me:14220: \"$ac_cpp conftest.$ac_ext\"") >&5
14221   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14222   ac_status=$?
14223   egrep -v '^ *\+' conftest.er1 >conftest.err
14224   rm -f conftest.er1
14225   cat conftest.err >&5
14226   echo "$as_me:14226: \$? = $ac_status" >&5
14227   (exit $ac_status); } >/dev/null; then
14228   if test -s conftest.err; then
14229     ac_cpp_err=$ac_cxx_preproc_warn_flag
14230   else
14231     ac_cpp_err=
14232   fi
14233 else
14234   ac_cpp_err=yes
14235 fi
14236 if test -z "$ac_cpp_err"; then
14237   eval "$as_ac_Header=yes"
14238 else
14239   echo "$as_me: failed program was:" >&5
14240   cat conftest.$ac_ext >&5
14241   eval "$as_ac_Header=no"
14242 fi
14243 rm -f conftest.err conftest.$ac_ext
14244 fi
14245 echo "$as_me:14245: result: `eval echo '${'$as_ac_Header'}'`" >&5
14246 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14247 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14248   cat >>confdefs.h <<EOF
14249 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14250 EOF
14251
14252 fi
14253 done
14254
14255 echo "$as_me:14255: checking if we should include stdbool.h" >&5
14256 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14257
14258 if test "${cf_cv_header_stdbool_h+set}" = set; then
14259   echo $ECHO_N "(cached) $ECHO_C" >&6
14260 else
14261
14262         cat >conftest.$ac_ext <<_ACEOF
14263 #line 14263 "configure"
14264 #include "confdefs.h"
14265
14266 int
14267 main ()
14268 {
14269 bool foo = false
14270   ;
14271   return 0;
14272 }
14273 _ACEOF
14274 rm -f conftest.$ac_objext
14275 if { (eval echo "$as_me:14275: \"$ac_compile\"") >&5
14276   (eval $ac_compile) 2>&5
14277   ac_status=$?
14278   echo "$as_me:14278: \$? = $ac_status" >&5
14279   (exit $ac_status); } &&
14280          { ac_try='test -s conftest.$ac_objext'
14281   { (eval echo "$as_me:14281: \"$ac_try\"") >&5
14282   (eval $ac_try) 2>&5
14283   ac_status=$?
14284   echo "$as_me:14284: \$? = $ac_status" >&5
14285   (exit $ac_status); }; }; then
14286   cf_cv_header_stdbool_h=0
14287 else
14288   echo "$as_me: failed program was:" >&5
14289 cat conftest.$ac_ext >&5
14290 cat >conftest.$ac_ext <<_ACEOF
14291 #line 14291 "configure"
14292 #include "confdefs.h"
14293
14294 #ifndef __BEOS__
14295 #include <stdbool.h>
14296 #endif
14297
14298 int
14299 main ()
14300 {
14301 bool foo = false
14302   ;
14303   return 0;
14304 }
14305 _ACEOF
14306 rm -f conftest.$ac_objext
14307 if { (eval echo "$as_me:14307: \"$ac_compile\"") >&5
14308   (eval $ac_compile) 2>&5
14309   ac_status=$?
14310   echo "$as_me:14310: \$? = $ac_status" >&5
14311   (exit $ac_status); } &&
14312          { ac_try='test -s conftest.$ac_objext'
14313   { (eval echo "$as_me:14313: \"$ac_try\"") >&5
14314   (eval $ac_try) 2>&5
14315   ac_status=$?
14316   echo "$as_me:14316: \$? = $ac_status" >&5
14317   (exit $ac_status); }; }; then
14318   cf_cv_header_stdbool_h=1
14319 else
14320   echo "$as_me: failed program was:" >&5
14321 cat conftest.$ac_ext >&5
14322 cf_cv_header_stdbool_h=0
14323 fi
14324 rm -f conftest.$ac_objext conftest.$ac_ext
14325 fi
14326 rm -f conftest.$ac_objext conftest.$ac_ext
14327 fi
14328
14329 if test "$cf_cv_header_stdbool_h" = 1
14330 then    echo "$as_me:14330: result: yes" >&5
14331 echo "${ECHO_T}yes" >&6
14332 else    echo "$as_me:14332: result: no" >&5
14333 echo "${ECHO_T}no" >&6
14334 fi
14335
14336 echo "$as_me:14336: checking for builtin bool type" >&5
14337 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14338
14339 if test "${cf_cv_builtin_bool+set}" = set; then
14340   echo $ECHO_N "(cached) $ECHO_C" >&6
14341 else
14342
14343         cat >conftest.$ac_ext <<_ACEOF
14344 #line 14344 "configure"
14345 #include "confdefs.h"
14346
14347 #include <stdio.h>
14348 #include <sys/types.h>
14349
14350 int
14351 main ()
14352 {
14353 bool x = false
14354   ;
14355   return 0;
14356 }
14357 _ACEOF
14358 rm -f conftest.$ac_objext
14359 if { (eval echo "$as_me:14359: \"$ac_compile\"") >&5
14360   (eval $ac_compile) 2>&5
14361   ac_status=$?
14362   echo "$as_me:14362: \$? = $ac_status" >&5
14363   (exit $ac_status); } &&
14364          { ac_try='test -s conftest.$ac_objext'
14365   { (eval echo "$as_me:14365: \"$ac_try\"") >&5
14366   (eval $ac_try) 2>&5
14367   ac_status=$?
14368   echo "$as_me:14368: \$? = $ac_status" >&5
14369   (exit $ac_status); }; }; then
14370   cf_cv_builtin_bool=1
14371 else
14372   echo "$as_me: failed program was:" >&5
14373 cat conftest.$ac_ext >&5
14374 cf_cv_builtin_bool=0
14375 fi
14376 rm -f conftest.$ac_objext conftest.$ac_ext
14377
14378 fi
14379
14380 if test "$cf_cv_builtin_bool" = 1
14381 then    echo "$as_me:14381: result: yes" >&5
14382 echo "${ECHO_T}yes" >&6
14383 else    echo "$as_me:14383: result: no" >&5
14384 echo "${ECHO_T}no" >&6
14385 fi
14386
14387 echo "$as_me:14387: checking for size of bool" >&5
14388 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14389 if test "${cf_cv_type_of_bool+set}" = set; then
14390   echo $ECHO_N "(cached) $ECHO_C" >&6
14391 else
14392
14393         rm -f cf_test.out
14394         if test "$cross_compiling" = yes; then
14395   cf_cv_type_of_bool=unknown
14396 else
14397   cat >conftest.$ac_ext <<_ACEOF
14398 #line 14398 "configure"
14399 #include "confdefs.h"
14400
14401 #include <stdlib.h>
14402 #include <stdio.h>
14403
14404 #if defined(__cplusplus)
14405
14406 #ifdef HAVE_GXX_BUILTIN_H
14407 #include <g++/builtin.h>
14408 #elif HAVE_GPP_BUILTIN_H
14409 #include <gpp/builtin.h>
14410 #elif HAVE_BUILTIN_H
14411 #include <builtin.h>
14412 #endif
14413
14414 #else
14415
14416 #if $cf_cv_header_stdbool_h
14417 #include <stdbool.h>
14418 #endif
14419
14420 #endif
14421
14422 main()
14423 {
14424         FILE *fp = fopen("cf_test.out", "w");
14425         if (fp != 0) {
14426                 bool x = true;
14427                 if ((bool)(-x) >= 0)
14428                         fputs("unsigned ", fp);
14429                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14430                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14431                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14432                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14433                 fclose(fp);
14434         }
14435         ${cf_cv_main_return:-return}(0);
14436 }
14437
14438 _ACEOF
14439 rm -f conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441   (eval $ac_link) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   cf_cv_type_of_bool=`cat cf_test.out`
14451                  if test -z "$cf_cv_type_of_bool"; then
14452                    cf_cv_type_of_bool=unknown
14453                  fi
14454 else
14455   echo "$as_me: program exited with status $ac_status" >&5
14456 echo "$as_me: failed program was:" >&5
14457 cat conftest.$ac_ext >&5
14458 cf_cv_type_of_bool=unknown
14459 fi
14460 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14461 fi
14462
14463 fi
14464
14465         rm -f cf_test.out
14466 echo "$as_me:14466: result: $cf_cv_type_of_bool" >&5
14467 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14468 if test "$cf_cv_type_of_bool" = unknown ; then
14469         case .$NCURSES_BOOL in #(vi
14470         .auto|.) NCURSES_BOOL=unsigned;;
14471         esac
14472         { echo "$as_me:14472: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14473 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14474         cf_cv_type_of_bool=$NCURSES_BOOL
14475 fi
14476
14477 echo "$as_me:14477: checking for special defines needed for etip.h" >&5
14478 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14479 cf_save_CXXFLAGS="$CXXFLAGS"
14480 cf_result="none"
14481 for cf_math in "" MATH_H
14482 do
14483 for cf_excp in "" MATH_EXCEPTION
14484 do
14485         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14486         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14487         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14488 cat >conftest.$ac_ext <<_ACEOF
14489 #line 14489 "configure"
14490 #include "confdefs.h"
14491
14492 #include <etip.h.in>
14493
14494 int
14495 main ()
14496 {
14497
14498   ;
14499   return 0;
14500 }
14501 _ACEOF
14502 rm -f conftest.$ac_objext
14503 if { (eval echo "$as_me:14503: \"$ac_compile\"") >&5
14504   (eval $ac_compile) 2>&5
14505   ac_status=$?
14506   echo "$as_me:14506: \$? = $ac_status" >&5
14507   (exit $ac_status); } &&
14508          { ac_try='test -s conftest.$ac_objext'
14509   { (eval echo "$as_me:14509: \"$ac_try\"") >&5
14510   (eval $ac_try) 2>&5
14511   ac_status=$?
14512   echo "$as_me:14512: \$? = $ac_status" >&5
14513   (exit $ac_status); }; }; then
14514
14515         test -n "$cf_math" && cat >>confdefs.h <<EOF
14516 #define ETIP_NEEDS_${cf_math} 1
14517 EOF
14518
14519         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14520 #define ETIP_NEEDS_${cf_excp} 1
14521 EOF
14522
14523         cf_result="$cf_math $cf_excp"
14524         break
14525
14526 else
14527   echo "$as_me: failed program was:" >&5
14528 cat conftest.$ac_ext >&5
14529 fi
14530 rm -f conftest.$ac_objext conftest.$ac_ext
14531 done
14532 done
14533 echo "$as_me:14533: result: $cf_result" >&5
14534 echo "${ECHO_T}$cf_result" >&6
14535 CXXFLAGS="$cf_save_CXXFLAGS"
14536
14537 if test -n "$CXX"; then
14538 echo "$as_me:14538: checking if $CXX accepts parameter initialization" >&5
14539 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14540 if test "${cf_cv_cpp_param_init+set}" = set; then
14541   echo $ECHO_N "(cached) $ECHO_C" >&6
14542 else
14543
14544         ac_ext=cc
14545 ac_cpp='$CXXCPP $CPPFLAGS'
14546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14547 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14549 ac_main_return=return
14550
14551         if test "$cross_compiling" = yes; then
14552   cf_cv_cpp_param_init=unknown
14553 else
14554   cat >conftest.$ac_ext <<_ACEOF
14555 #line 14555 "configure"
14556 #include "confdefs.h"
14557
14558 class TEST {
14559 private:
14560         int value;
14561 public:
14562         TEST(int x = 1);
14563         ~TEST();
14564 };
14565
14566 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14567 {
14568         value = x;
14569 }
14570 void main() { }
14571
14572 _ACEOF
14573 rm -f conftest$ac_exeext
14574 if { (eval echo "$as_me:14574: \"$ac_link\"") >&5
14575   (eval $ac_link) 2>&5
14576   ac_status=$?
14577   echo "$as_me:14577: \$? = $ac_status" >&5
14578   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14579   { (eval echo "$as_me:14579: \"$ac_try\"") >&5
14580   (eval $ac_try) 2>&5
14581   ac_status=$?
14582   echo "$as_me:14582: \$? = $ac_status" >&5
14583   (exit $ac_status); }; }; then
14584   cf_cv_cpp_param_init=yes
14585 else
14586   echo "$as_me: program exited with status $ac_status" >&5
14587 echo "$as_me: failed program was:" >&5
14588 cat conftest.$ac_ext >&5
14589 cf_cv_cpp_param_init=no
14590 fi
14591 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14592 fi
14593         ac_ext=cc
14594 ac_cpp='$CXXCPP $CPPFLAGS'
14595 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14596 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14597 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14598 ac_main_return=return
14599
14600 fi
14601 echo "$as_me:14601: result: $cf_cv_cpp_param_init" >&5
14602 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14603 fi
14604 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14605 #define CPP_HAS_PARAM_INIT 1
14606 EOF
14607
14608 if test -n "$CXX"; then
14609
14610 echo "$as_me:14610: checking if $CXX accepts static_cast" >&5
14611 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14612 if test "${cf_cv_cpp_static_cast+set}" = set; then
14613   echo $ECHO_N "(cached) $ECHO_C" >&6
14614 else
14615
14616         ac_ext=cc
14617 ac_cpp='$CXXCPP $CPPFLAGS'
14618 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14619 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14620 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14621 ac_main_return=return
14622
14623         cat >conftest.$ac_ext <<_ACEOF
14624 #line 14624 "configure"
14625 #include "confdefs.h"
14626
14627 class NCursesPanel
14628 {
14629 public:
14630   NCursesPanel(int nlines,
14631                int ncols,
14632                int begin_y = 0,
14633                int begin_x = 0)
14634   {
14635   }
14636
14637   ~NCursesPanel();
14638 };
14639
14640 template<class T> class NCursesUserPanel : public NCursesPanel
14641 {
14642 public:
14643   NCursesUserPanel (int nlines,
14644                     int ncols,
14645                     int begin_y = 0,
14646                     int begin_x = 0,
14647                     const T* p_UserData = static_cast<T*>(0))
14648     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14649   {
14650   };
14651   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14652   {
14653   };
14654
14655   virtual ~NCursesUserPanel() {};
14656 };
14657
14658 int
14659 main ()
14660 {
14661
14662         const char* p_UserData = static_cast<char*>(0)
14663   ;
14664   return 0;
14665 }
14666 _ACEOF
14667 rm -f conftest.$ac_objext
14668 if { (eval echo "$as_me:14668: \"$ac_compile\"") >&5
14669   (eval $ac_compile) 2>&5
14670   ac_status=$?
14671   echo "$as_me:14671: \$? = $ac_status" >&5
14672   (exit $ac_status); } &&
14673          { ac_try='test -s conftest.$ac_objext'
14674   { (eval echo "$as_me:14674: \"$ac_try\"") >&5
14675   (eval $ac_try) 2>&5
14676   ac_status=$?
14677   echo "$as_me:14677: \$? = $ac_status" >&5
14678   (exit $ac_status); }; }; then
14679   cf_cv_cpp_static_cast=yes
14680 else
14681   echo "$as_me: failed program was:" >&5
14682 cat conftest.$ac_ext >&5
14683 cf_cv_cpp_static_cast=no
14684 fi
14685 rm -f conftest.$ac_objext conftest.$ac_ext
14686
14687         ac_ext=cc
14688 ac_cpp='$CXXCPP $CPPFLAGS'
14689 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14690 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14691 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14692 ac_main_return=return
14693
14694 fi
14695 echo "$as_me:14695: result: $cf_cv_cpp_static_cast" >&5
14696 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14697
14698 fi
14699
14700 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14701 #define CPP_HAS_STATIC_CAST 1
14702 EOF
14703
14704         CXX_AR='$(AR)'
14705         CXX_AR_OPTS='$(AR_OPTS)'
14706         case $cf_cv_system_name in #(vi
14707         irix*) #(vi
14708             if test "$GXX" != yes ; then
14709                 CXX_AR='$(CXX)'
14710                 CXX_AR_OPTS='-ar -o'
14711             fi
14712             ;;
14713         sco3.2v5*) #(vi
14714             CXXLDFLAGS="-u main"
14715             ;;
14716         solaris2*)
14717             if test "$GXX" != yes ; then
14718                 CXX_AR='$(CXX)'
14719                 CXX_AR_OPTS='-xar -o'
14720             fi
14721             ;;
14722         esac
14723
14724 else
14725         cf_cxx_library=no
14726         cf_cv_builtin_bool=1
14727
14728         # Just because we are not configuring against C++ right now does not
14729         # mean that a user will not want to use C++.  Some distributors disable
14730         # the C++ portion of this configuration as a shortcut (or just to avoid
14731         # compiling the demo in the c++ directory).  So we need a reasonable
14732         # default for the 'bool' type.
14733         #
14734         # Caveat: since the storage of the bool type is not standardized, it
14735         # may change.
14736
14737         if test "$NCURSES_BOOL" != auto ; then
14738                 cf_cv_type_of_bool=$NCURSES_BOOL
14739                 cf_cv_header_stdbool_h=0
14740         else
14741                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14742
14743 echo "$as_me:14743: checking for size of bool" >&5
14744 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14745 if test "${cf_cv_type_of_bool+set}" = set; then
14746   echo $ECHO_N "(cached) $ECHO_C" >&6
14747 else
14748
14749         rm -f cf_test.out
14750         if test "$cross_compiling" = yes; then
14751   cf_cv_type_of_bool=unknown
14752 else
14753   cat >conftest.$ac_ext <<_ACEOF
14754 #line 14754 "configure"
14755 #include "confdefs.h"
14756
14757 #include <stdlib.h>
14758 #include <stdio.h>
14759
14760 #if defined(__cplusplus)
14761
14762 #ifdef HAVE_GXX_BUILTIN_H
14763 #include <g++/builtin.h>
14764 #elif HAVE_GPP_BUILTIN_H
14765 #include <gpp/builtin.h>
14766 #elif HAVE_BUILTIN_H
14767 #include <builtin.h>
14768 #endif
14769
14770 #else
14771
14772 #if $cf_cv_header_stdbool_h
14773 #include <stdbool.h>
14774 #endif
14775
14776 #endif
14777
14778 main()
14779 {
14780         FILE *fp = fopen("cf_test.out", "w");
14781         if (fp != 0) {
14782                 bool x = true;
14783                 if ((bool)(-x) >= 0)
14784                         fputs("unsigned ", fp);
14785                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14786                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14787                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14788                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14789                 fclose(fp);
14790         }
14791         ${cf_cv_main_return:-return}(0);
14792 }
14793
14794 _ACEOF
14795 rm -f conftest$ac_exeext
14796 if { (eval echo "$as_me:14796: \"$ac_link\"") >&5
14797   (eval $ac_link) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14801   { (eval echo "$as_me:14801: \"$ac_try\"") >&5
14802   (eval $ac_try) 2>&5
14803   ac_status=$?
14804   echo "$as_me:14804: \$? = $ac_status" >&5
14805   (exit $ac_status); }; }; then
14806   cf_cv_type_of_bool=`cat cf_test.out`
14807                  if test -z "$cf_cv_type_of_bool"; then
14808                    cf_cv_type_of_bool=unknown
14809                  fi
14810 else
14811   echo "$as_me: program exited with status $ac_status" >&5
14812 echo "$as_me: failed program was:" >&5
14813 cat conftest.$ac_ext >&5
14814 cf_cv_type_of_bool=unknown
14815 fi
14816 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14817 fi
14818
14819 fi
14820
14821         rm -f cf_test.out
14822 echo "$as_me:14822: result: $cf_cv_type_of_bool" >&5
14823 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14824 if test "$cf_cv_type_of_bool" = unknown ; then
14825         case .$NCURSES_BOOL in #(vi
14826         .auto|.) NCURSES_BOOL=unsigned;;
14827         esac
14828         { echo "$as_me:14828: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14829 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14830         cf_cv_type_of_bool=$NCURSES_BOOL
14831 fi
14832
14833                 else
14834                         echo "$as_me:14834: checking for fallback type of bool" >&5
14835 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14836                         case "$host_cpu" in #(vi
14837                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14838                         *)      cf_cv_type_of_bool=int  ;;
14839                         esac
14840                         echo "$as_me:14840: result: $cf_cv_type_of_bool" >&5
14841 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14842                 fi
14843         fi
14844 fi
14845
14846 # If the C compiler did not declare bool, and we did not determine that the C++
14847 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14848 # ncurses library use the same type as C++ bool.  Note that this allows one to
14849 # specify the type of bool in a configure-script option and postpone
14850 # integration with the C++ compiler provided that the types are compatible.
14851 USE_CXX_BOOL=1
14852 if test $cf_cv_cc_bool_type = 1
14853 then
14854         # oops: C has a bool.  Unlikely, but C++ could differ.
14855         USE_CXX_BOOL=0
14856 elif test $cf_cv_builtin_bool = 0
14857 then
14858         # C++ has no bool
14859         USE_CXX_BOOL=0
14860 else
14861         # this is the normal case
14862         USE_CXX_BOOL='defined(__cplusplus)'
14863 fi
14864
14865 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14866
14867 if test "$cf_with_ada" != "no" ; then
14868     if test "$with_libtool" != "no"; then
14869         { echo "$as_me:14869: WARNING: libtool does not support Ada - disabling feature" >&5
14870 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
14871         cf_with_ada=no
14872     fi
14873 fi
14874
14875 if test "$cf_with_ada" != "no" ; then
14876 cf_ada_make=gnatmake
14877 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14878 set dummy $cf_ada_make; ac_word=$2
14879 echo "$as_me:14879: checking for $ac_word" >&5
14880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14881 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14882   echo $ECHO_N "(cached) $ECHO_C" >&6
14883 else
14884   if test -n "$gnat_exists"; then
14885   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14886 else
14887   ac_save_IFS=$IFS; IFS=$ac_path_separator
14888 ac_dummy="$PATH"
14889 for ac_dir in $ac_dummy; do
14890   IFS=$ac_save_IFS
14891   test -z "$ac_dir" && ac_dir=.
14892   $as_executable_p "$ac_dir/$ac_word" || continue
14893 ac_cv_prog_gnat_exists="yes"
14894 echo "$as_me:14894: found $ac_dir/$ac_word" >&5
14895 break
14896 done
14897
14898   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14899 fi
14900 fi
14901 gnat_exists=$ac_cv_prog_gnat_exists
14902 if test -n "$gnat_exists"; then
14903   echo "$as_me:14903: result: $gnat_exists" >&5
14904 echo "${ECHO_T}$gnat_exists" >&6
14905 else
14906   echo "$as_me:14906: result: no" >&5
14907 echo "${ECHO_T}no" >&6
14908 fi
14909
14910 if test "$ac_cv_prog_gnat_exists" = no; then
14911    cf_ada_make=
14912 else
14913
14914 echo "$as_me:14914: checking for gnat version" >&5
14915 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14916 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14917   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14918 echo "$as_me:14918: result: $cf_gnat_version" >&5
14919 echo "${ECHO_T}$cf_gnat_version" >&6
14920
14921 case $cf_gnat_version in
14922   3.1[1-9]*|3.[2-9]*|[4-9].*)
14923     cf_cv_prog_gnat_correct=yes
14924     ;;
14925   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14926      cf_cv_prog_gnat_correct=no
14927      ;;
14928 esac
14929 case $cf_gnat_version in
14930   3.[1-9]*|[4-9].*)
14931       cf_compile_generics=generics
14932       cf_generic_objects="\${GENOBJS}"
14933       ;;
14934   *)  cf_compile_generics=
14935       cf_generic_objects=
14936       ;;
14937 esac
14938
14939    # Extract the first word of "m4", so it can be a program name with args.
14940 set dummy m4; ac_word=$2
14941 echo "$as_me:14941: checking for $ac_word" >&5
14942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14943 if test "${ac_cv_prog_M4_exists+set}" = set; then
14944   echo $ECHO_N "(cached) $ECHO_C" >&6
14945 else
14946   if test -n "$M4_exists"; then
14947   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14948 else
14949   ac_save_IFS=$IFS; IFS=$ac_path_separator
14950 ac_dummy="$PATH"
14951 for ac_dir in $ac_dummy; do
14952   IFS=$ac_save_IFS
14953   test -z "$ac_dir" && ac_dir=.
14954   $as_executable_p "$ac_dir/$ac_word" || continue
14955 ac_cv_prog_M4_exists="yes"
14956 echo "$as_me:14956: found $ac_dir/$ac_word" >&5
14957 break
14958 done
14959
14960   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14961 fi
14962 fi
14963 M4_exists=$ac_cv_prog_M4_exists
14964 if test -n "$M4_exists"; then
14965   echo "$as_me:14965: result: $M4_exists" >&5
14966 echo "${ECHO_T}$M4_exists" >&6
14967 else
14968   echo "$as_me:14968: result: no" >&5
14969 echo "${ECHO_T}no" >&6
14970 fi
14971
14972    if test "$ac_cv_prog_M4_exists" = no; then
14973       cf_cv_prog_gnat_correct=no
14974       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14975    fi
14976    if test "$cf_cv_prog_gnat_correct" = yes; then
14977       echo "$as_me:14977: checking if GNAT works" >&5
14978 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14979
14980 rm -f conftest*
14981 cat >>conftest.ads <<CF_EOF
14982 procedure conftest;
14983 CF_EOF
14984 cat >>conftest.adb <<CF_EOF
14985 with Text_IO;
14986 with GNAT.OS_Lib;
14987 procedure conftest is
14988 begin
14989    Text_IO.Put ("Hello World");
14990    Text_IO.New_Line;
14991    GNAT.OS_Lib.OS_Exit (0);
14992 end conftest;
14993 CF_EOF
14994 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14995    if ( ./conftest 1>&5 2>&1 ) ; then
14996       cf_cv_prog_gnat_correct=yes
14997    else
14998       cf_cv_prog_gnat_correct=no
14999    fi
15000 else
15001    cf_cv_prog_gnat_correct=no
15002 fi
15003 rm -f conftest*
15004
15005       echo "$as_me:15005: result: $cf_cv_prog_gnat_correct" >&5
15006 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15007    fi
15008 fi
15009 if test "$cf_cv_prog_gnat_correct" = yes; then
15010    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15011
15012    echo "$as_me:15012: checking if GNAT pragma Unreferenced works" >&5
15013 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15014
15015 rm -f conftest*
15016 cat >>conftest.ads <<CF_EOF
15017 procedure conftest;
15018 CF_EOF
15019 cat >>conftest.adb <<CF_EOF
15020 with Text_IO;
15021 with GNAT.OS_Lib;
15022 procedure conftest is
15023    test : Integer;
15024    pragma Unreferenced (test);
15025 begin
15026    test := 1;
15027    Text_IO.Put ("Hello World");
15028    Text_IO.New_Line;
15029    GNAT.OS_Lib.OS_Exit (0);
15030 end conftest;
15031 CF_EOF
15032 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15033       cf_cv_pragma_unreferenced=yes
15034 else
15035    cf_cv_pragma_unreferenced=no
15036 fi
15037 rm -f conftest*
15038
15039    echo "$as_me:15039: result: $cf_cv_pragma_unreferenced" >&5
15040 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15041
15042    # if the pragma is supported, use it (needed in the Trace code).
15043    if test $cf_cv_pragma_unreferenced = yes ; then
15044       PRAGMA_UNREF=TRUE
15045    else
15046       PRAGMA_UNREF=FALSE
15047    fi
15048
15049 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15050 if test "${with_ada_compiler+set}" = set; then
15051   withval="$with_ada_compiler"
15052   cf_ada_compiler=$withval
15053 else
15054   cf_ada_compiler=gnatmake
15055 fi;
15056
15057    cf_ada_package=terminal_interface
15058
15059 # Check whether --with-ada-include or --without-ada-include was given.
15060 if test "${with_ada_include+set}" = set; then
15061   withval="$with_ada_include"
15062
15063 else
15064   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15065 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15066
15067 if test "x$prefix" != xNONE; then
15068   cf_path_syntax="$prefix"
15069 else
15070   cf_path_syntax="$ac_default_prefix"
15071 fi
15072
15073 case ".$withval" in #(vi
15074 .\$\(*\)*|.\'*\'*) #(vi
15075   ;;
15076 ..|./*|.\\*) #(vi
15077   ;;
15078 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15079   ;;
15080 .\${*prefix}*) #(vi
15081   eval withval="$withval"
15082   case ".$withval" in #(vi
15083   .NONE/*)
15084     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15085     ;;
15086   esac
15087   ;; #(vi
15088 .no|.NONE/*)
15089   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15090   ;;
15091 *)
15092   { { echo "$as_me:15092: error: expected a pathname, not \"$withval\"" >&5
15093 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15094    { (exit 1); exit 1; }; }
15095   ;;
15096 esac
15097
15098 fi
15099 ADA_INCLUDE="$withval"
15100
15101 # Check whether --with-ada-objects or --without-ada-objects was given.
15102 if test "${with_ada_objects+set}" = set; then
15103   withval="$with_ada_objects"
15104
15105 else
15106   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15107 fi; if test -n "$prefix/lib/ada/adalib" ; then
15108
15109 if test "x$prefix" != xNONE; then
15110   cf_path_syntax="$prefix"
15111 else
15112   cf_path_syntax="$ac_default_prefix"
15113 fi
15114
15115 case ".$withval" in #(vi
15116 .\$\(*\)*|.\'*\'*) #(vi
15117   ;;
15118 ..|./*|.\\*) #(vi
15119   ;;
15120 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15121   ;;
15122 .\${*prefix}*) #(vi
15123   eval withval="$withval"
15124   case ".$withval" in #(vi
15125   .NONE/*)
15126     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15127     ;;
15128   esac
15129   ;; #(vi
15130 .no|.NONE/*)
15131   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15132   ;;
15133 *)
15134   { { echo "$as_me:15134: error: expected a pathname, not \"$withval\"" >&5
15135 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15136    { (exit 1); exit 1; }; }
15137   ;;
15138 esac
15139
15140 fi
15141 ADA_OBJECTS="$withval"
15142
15143 fi
15144 fi
15145 else
15146    cf_with_ada=no
15147 fi
15148
15149 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15150 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15151 ###
15152 ### ticlib modules may be a separate library, otherwise contained in termlib.
15153 ### termlib modules may be a separate library, otherwise contained in ncurses.
15154 ###
15155 ### The of "+" or " " between the tokens controls the way the script
15156 ### chooses to split module lists into libraries.
15157 ###
15158 ### (see CF_LIB_RULES).
15159 echo "$as_me:15159: checking for library subsets" >&5
15160 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15161 LIB_SUBSETS=
15162
15163 if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
15164         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15165         if test "$with_ticlib" != no ; then
15166                 LIB_SUBSETS="${LIB_SUBSETS} "
15167         else
15168                 LIB_SUBSETS="${LIB_SUBSETS}+"
15169         fi
15170 fi
15171
15172 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15173 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15174 if test "$with_termlib" != no ; then
15175         LIB_SUBSETS="${LIB_SUBSETS} "
15176 else
15177         LIB_SUBSETS="${LIB_SUBSETS}+"
15178 fi
15179
15180 LIB_SUBSETS="${LIB_SUBSETS}base"
15181 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15182 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15183
15184 echo "$as_me:15184: result: $LIB_SUBSETS" >&5
15185 echo "${ECHO_T}$LIB_SUBSETS" >&6
15186
15187 ### Construct the list of include-directories to be generated
15188
15189 CPPFLAGS="-I. -I../include $CPPFLAGS"
15190 if test "$srcdir" != "."; then
15191         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15192 fi
15193 if test "$GCC" != yes; then
15194         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15195 elif test "$includedir" != "/usr/include"; then
15196         if test "$includedir" = '${prefix}/include' ; then
15197                 if test $prefix != /usr ; then
15198                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15199                 fi
15200         else
15201                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15202         fi
15203 fi
15204
15205 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15206 if test "$srcdir" != "."; then
15207         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15208 fi
15209 if test "$GCC" != yes; then
15210         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15211 elif test "$includedir" != "/usr/include"; then
15212         if test "$includedir" = '${prefix}/include' ; then
15213                 if test $prefix != /usr ; then
15214                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15215                 fi
15216         else
15217                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15218         fi
15219 fi
15220
15221 ### Build up pieces for makefile rules
15222 echo "$as_me:15222: checking default library suffix" >&5
15223 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15224
15225         case $DFT_LWR_MODEL in
15226         libtool) DFT_ARG_SUFFIX=''   ;;
15227         normal)  DFT_ARG_SUFFIX=''   ;;
15228         debug)   DFT_ARG_SUFFIX='_g' ;;
15229         profile) DFT_ARG_SUFFIX='_p' ;;
15230         shared)  DFT_ARG_SUFFIX=''   ;;
15231         esac
15232         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15233 echo "$as_me:15233: result: $DFT_ARG_SUFFIX" >&5
15234 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15235
15236 echo "$as_me:15236: checking default library-dependency suffix" >&5
15237 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15238
15239         case $DFT_LWR_MODEL in
15240         libtool) DFT_DEP_SUFFIX='.la'  ;;
15241         normal)  DFT_DEP_SUFFIX='.a'   ;;
15242         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15243         profile) DFT_DEP_SUFFIX='_p.a' ;;
15244         shared)
15245                 case $cf_cv_system_name in
15246                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15247                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15248                 hpux*)
15249                         case $target in
15250                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15251                         *)      DFT_DEP_SUFFIX='.sl' ;;
15252                         esac
15253                         ;;
15254                 *)      DFT_DEP_SUFFIX='.so'  ;;
15255                 esac
15256         esac
15257         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15258 DFT_LIB_SUFFIX=$DFT_DEP_SUFFIX
15259 if test $DFT_LWR_MODEL = shared ; then
15260         case $cf_cv_system_name in #(vi
15261         cygwin*)
15262                 DFT_DEP_SUFFIX=".dll.a"
15263                 DFT_LIB_SUFFIX=".dll"
15264                 ;;
15265         esac
15266 fi
15267 echo "$as_me:15267: result: $DFT_DEP_SUFFIX" >&5
15268 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15269
15270 echo "$as_me:15270: checking default object directory" >&5
15271 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15272
15273         case $DFT_LWR_MODEL in
15274         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15275         normal)  DFT_OBJ_SUBDIR='objects' ;;
15276         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15277         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15278         shared)
15279                 case $cf_cv_system_name in #(vi
15280                 cygwin) #(vi
15281                         DFT_OBJ_SUBDIR='objects' ;;
15282                 *)
15283                         DFT_OBJ_SUBDIR='obj_s' ;;
15284                 esac
15285         esac
15286 echo "$as_me:15286: result: $DFT_OBJ_SUBDIR" >&5
15287 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15288
15289 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15290 if test "$cf_with_cxx" = yes ; then
15291 echo "$as_me:15291: checking c++ library-dependency suffix" >&5
15292 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15293 if test "$with_libtool" != "no"; then
15294         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15295 else
15296
15297         case normal in
15298         libtool) CXX_LIB_SUFFIX='.la'  ;;
15299         normal)  CXX_LIB_SUFFIX='.a'   ;;
15300         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15301         profile) CXX_LIB_SUFFIX='_p.a' ;;
15302         shared)
15303                 case $cf_cv_system_name in
15304                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15305                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15306                 hpux*)
15307                         case $target in
15308                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15309                         *)      CXX_LIB_SUFFIX='.sl' ;;
15310                         esac
15311                         ;;
15312                 *)      CXX_LIB_SUFFIX='.so'  ;;
15313                 esac
15314         esac
15315         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15316 fi
15317 echo "$as_me:15317: result: $CXX_LIB_SUFFIX" >&5
15318 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15319
15320 fi
15321
15322 # do not want -ldl in build except as needed for -lncurses dependency
15323 if test "$with_dlsym" = yes ; then
15324 if test $DFT_LWR_MODEL = shared || \
15325    test $DFT_LWR_MODEL = libtool ; then
15326
15327 # remove dl library from $LIBS
15328 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15329
15330 fi
15331 fi
15332 ### Set up low-level terminfo dependencies for makefiles.
15333
15334 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15335 # do not need libdl
15336 TICS_LIST=
15337 if test "$with_dlsym" = yes ; then
15338
15339 # remove dl library from $SHLIB_LIST
15340 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15341
15342 fi
15343
15344 if test "$with_ticlib" != no ; then
15345
15346         if test "$with_ticlib" != yes ; then
15347                 TICS_NAME=$with_ticlib
15348                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15349                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15350                 TICS_LIB_SUFFIX="${with_ticlib}"
15351         else
15352                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15353                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15354                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15355         fi
15356         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15357 else
15358         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15359 fi
15360
15361 if test "$with_termlib" != no ; then
15362
15363         if test "$with_termlib" != yes ; then
15364                 TINFO_NAME=$with_termlib
15365                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15366                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15367                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15368                 TINFO_LIB_SUFFIX="${with_termlib}"
15369         else
15370                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15371                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15372                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15373                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15374         fi
15375
15376         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15377         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15378         if test "$DFT_LWR_MODEL" = "libtool"; then
15379                 TEST_ARGS="${TEST_DEPS}"
15380                 TEST_ARG2="${TEST_DEP2}"
15381                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15382         else
15383                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15384                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15385                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15386                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15387                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15388         fi
15389 else
15390         # the next lines are needed for linking libtic over libncurses
15391         TINFO_NAME=${LIB_NAME}
15392         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15393         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
15394         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15395
15396         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15397 fi
15398
15399 if test "$DFT_LWR_MODEL" = shared ; then
15400         case $cf_cv_system_name in #(vi
15401         cygwin*)
15402                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15403                 TINFO_SUFFIX=.dll
15404                 ;;
15405         esac
15406 fi
15407
15408 if test "$with_dlsym" = yes ; then
15409
15410 # remove dl library from $TICS_LIST
15411 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
15412
15413 fi
15414
15415 # needed for Ada95
15416 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15417
15418 case $DFT_LWR_MODEL in
15419 normal|debug|profile)
15420
15421 if test "$GCC" = yes ; then
15422         LDFLAGS_STATIC=-static
15423         LDFLAGS_SHARED=-dynamic
15424 else
15425         case $cf_cv_system_name in #(
15426         aix[45]*)       #( from ld manpage
15427                 LDFLAGS_STATIC=-bstatic
15428                 LDFLAGS_SHARED=-bdynamic
15429                 ;;
15430         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
15431                 # We could also use just "archive" and "shared".
15432                 LDFLAGS_STATIC=-Wl,-a,archive_shared
15433                 LDFLAGS_SHARED=-Wl,-a,shared_archive
15434                 ;;
15435         irix*)          #( from ld manpage IRIX64
15436                 LDFLAGS_STATIC=-Bstatic
15437                 LDFLAGS_SHARED=-Bdynamic
15438                 ;;
15439         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
15440                 # alternative "-oldstyle_liblookup" (not in cc manpage)
15441                 LDFLAGS_STATIC=-noso
15442                 LDFLAGS_SHARED=-so_archive
15443                 ;;
15444         solaris2*)
15445                 LDFLAGS_STATIC=-Bstatic
15446                 LDFLAGS_SHARED=-Bdynamic
15447                 ;;
15448         esac
15449 fi
15450
15451         ;;
15452 esac
15453
15454 echo "$as_me:15454: checking where we will install curses.h" >&5
15455 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15456 test "$with_overwrite" = no && \
15457 test "x$includedir" = 'x${prefix}/include' && \
15458         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15459 echo "$as_me:15459: result: $includedir" >&5
15460 echo "${ECHO_T}$includedir" >&6
15461
15462 ### Resolve a conflict between normal and wide-curses by forcing applications
15463 ### that will need libutf8 to add it to their configure script.
15464 if test "$with_overwrite" != no ; then
15465 if test "$NCURSES_LIBUTF8" = 1 ; then
15466         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15467         { echo "$as_me:15467: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15468 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15469 fi
15470 fi
15471
15472 # used to separate tack out of the tree
15473 NCURSES_TREE=
15474
15475 ### predefined stuff for the test programs
15476 cat >>confdefs.h <<\EOF
15477 #define HAVE_SLK_COLOR 1
15478 EOF
15479
15480 ### Construct the list of subdirectories for which we'll customize makefiles
15481 ### with the appropriate compile-rules.
15482
15483 echo "$as_me:15483: checking for src modules" >&5
15484 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15485
15486 # dependencies and linker-arguments for test-programs
15487 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15488 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15489 if test "$DFT_LWR_MODEL" = "libtool"; then
15490         TEST_ARGS="${TEST_DEPS}"
15491         TEST_ARG2="${TEST_DEP2}"
15492 else
15493         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15494         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15495 fi
15496
15497 cf_cv_src_modules=
15498 for cf_dir in $modules_to_build
15499 do
15500         if test -f $srcdir/$cf_dir/modules; then
15501
15502                 # We may/may not have tack in the distribution, though the
15503                 # makefile is.
15504                 if test $cf_dir = tack ; then
15505                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15506                                 continue
15507                         fi
15508                 fi
15509
15510                 if test -z "$cf_cv_src_modules"; then
15511                         cf_cv_src_modules=$cf_dir
15512                 else
15513                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15514                 fi
15515
15516                 # Make the ncurses_cfg.h file record the library interface files as
15517                 # well.  These are header files that are the same name as their
15518                 # directory.  Ncurses is the only library that does not follow
15519                 # that pattern.
15520                 if test $cf_dir = tack ; then
15521                         continue
15522                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15523
15524 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15525
15526                         cat >>confdefs.h <<EOF
15527 #define HAVE_${cf_have_include}_H 1
15528 EOF
15529
15530                         cat >>confdefs.h <<EOF
15531 #define HAVE_LIB${cf_have_include} 1
15532 EOF
15533
15534                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15535                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15536                         if test "$DFT_LWR_MODEL" = "libtool"; then
15537                                 TEST_ARGS="${TEST_DEPS}"
15538                                 TEST_ARG2="${TEST_DEP2}"
15539                         else
15540                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15541                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15542                         fi
15543                 fi
15544         fi
15545 done
15546 echo "$as_me:15546: result: $cf_cv_src_modules" >&5
15547 echo "${ECHO_T}$cf_cv_src_modules" >&6
15548
15549 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15550 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15551
15552 SRC_SUBDIRS="man include"
15553 for cf_dir in $cf_cv_src_modules
15554 do
15555         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15556 done
15557 SRC_SUBDIRS="$SRC_SUBDIRS test"
15558 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15559 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15560
15561 ADA_SUBDIRS=
15562 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15563    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15564    ADA_SUBDIRS="gen src samples"
15565 fi
15566
15567 SUB_MAKEFILES=
15568 for cf_dir in $SRC_SUBDIRS
15569 do
15570         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15571 done
15572
15573 if test -n "$ADA_SUBDIRS"; then
15574    for cf_dir in $ADA_SUBDIRS
15575    do
15576       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15577    done
15578
15579 fi
15580
15581 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
15582    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
15583 fi
15584
15585 DIRS_TO_MAKE="lib"
15586 for cf_item in $cf_list_models
15587 do
15588
15589         case $cf_item in
15590         libtool) cf_subdir='obj_lo'  ;;
15591         normal)  cf_subdir='objects' ;;
15592         debug)   cf_subdir='obj_g' ;;
15593         profile) cf_subdir='obj_p' ;;
15594         shared)
15595                 case $cf_cv_system_name in #(vi
15596                 cygwin) #(vi
15597                         cf_subdir='objects' ;;
15598                 *)
15599                         cf_subdir='obj_s' ;;
15600                 esac
15601         esac
15602
15603         for cf_item2 in $DIRS_TO_MAKE
15604         do
15605                 test $cf_item2 = $cf_subdir && break
15606         done
15607         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15608 done
15609 for cf_dir in $DIRS_TO_MAKE
15610 do
15611         test ! -d $cf_dir && mkdir $cf_dir
15612 done
15613
15614 cat >>confdefs.h <<EOF
15615 #define NCURSES_PATHSEP '$PATHSEP'
15616 EOF
15617
15618 cat >>confdefs.h <<EOF
15619 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15620 EOF
15621
15622 ### Now that we're done running tests, add the compiler-warnings, if any
15623
15624 cf_fix_cppflags=no
15625 cf_new_cflags=
15626 cf_new_cppflags=
15627 cf_new_extra_cppflags=
15628
15629 for cf_add_cflags in $EXTRA_CFLAGS
15630 do
15631 case $cf_fix_cppflags in
15632 no)
15633         case $cf_add_cflags in #(vi
15634         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15635                 case $cf_add_cflags in
15636                 -D*)
15637                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15638
15639                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15640                         && test -z "${cf_tst_cflags}" \
15641                         && cf_fix_cppflags=yes
15642
15643                         if test $cf_fix_cppflags = yes ; then
15644                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15645                                 continue
15646                         elif test "${cf_tst_cflags}" = "\"'" ; then
15647                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15648                                 continue
15649                         fi
15650                         ;;
15651                 esac
15652                 case "$CPPFLAGS" in
15653                 *$cf_add_cflags) #(vi
15654                         ;;
15655                 *) #(vi
15656                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15657                         ;;
15658                 esac
15659                 ;;
15660         *)
15661                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15662                 ;;
15663         esac
15664         ;;
15665 yes)
15666         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15667
15668         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15669
15670         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15671         && test -z "${cf_tst_cflags}" \
15672         && cf_fix_cppflags=no
15673         ;;
15674 esac
15675 done
15676
15677 if test -n "$cf_new_cflags" ; then
15678
15679         CFLAGS="$CFLAGS $cf_new_cflags"
15680 fi
15681
15682 if test -n "$cf_new_cppflags" ; then
15683
15684         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15685 fi
15686
15687 if test -n "$cf_new_extra_cppflags" ; then
15688
15689         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15690 fi
15691
15692 ### Define substitutions for header files to avoid name-pollution
15693
15694 if test "$cf_cv_have_tcgetattr" = yes ; then
15695         HAVE_TCGETATTR=1
15696 else
15697         HAVE_TCGETATTR=0
15698 fi
15699
15700 if test "$ac_cv_header_termio_h" = yes ; then
15701         HAVE_TERMIO_H=1
15702 else
15703         HAVE_TERMIO_H=0
15704 fi
15705
15706 if test "$ac_cv_header_termios_h" = yes ; then
15707         HAVE_TERMIOS_H=1
15708 else
15709         HAVE_TERMIOS_H=0
15710 fi
15711
15712 ################################################################################
15713 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15714 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15715 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"
15716 ac_config_commands="$ac_config_commands default"
15717 cat >confcache <<\_ACEOF
15718 # This file is a shell script that caches the results of configure
15719 # tests run on this system so they can be shared between configure
15720 # scripts and configure runs, see configure's option --config-cache.
15721 # It is not useful on other systems.  If it contains results you don't
15722 # want to keep, you may remove or edit it.
15723 #
15724 # config.status only pays attention to the cache file if you give it
15725 # the --recheck option to rerun configure.
15726 #
15727 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15728 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15729 # following values.
15730
15731 _ACEOF
15732
15733 # The following way of writing the cache mishandles newlines in values,
15734 # but we know of no workaround that is simple, portable, and efficient.
15735 # So, don't put newlines in cache variables' values.
15736 # Ultrix sh set writes to stderr and can't be redirected directly,
15737 # and sets the high bit in the cache file unless we assign to the vars.
15738 {
15739   (set) 2>&1 |
15740     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15741     *ac_space=\ *)
15742       # `set' does not quote correctly, so add quotes (double-quote
15743       # substitution turns \\\\ into \\, and sed turns \\ into \).
15744       sed -n \
15745         "s/'/'\\\\''/g;
15746           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15747       ;;
15748     *)
15749       # `set' quotes correctly as required by POSIX, so do not add quotes.
15750       sed -n \
15751         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15752       ;;
15753     esac;
15754 } |
15755   sed '
15756      t clear
15757      : clear
15758      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15759      t end
15760      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15761      : end' >>confcache
15762 if cmp -s $cache_file confcache; then :; else
15763   if test -w $cache_file; then
15764     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15765     cat confcache >$cache_file
15766   else
15767     echo "not updating unwritable cache $cache_file"
15768   fi
15769 fi
15770 rm -f confcache
15771
15772 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15773 # Let make expand exec_prefix.
15774 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15775
15776 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15777 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15778 # trailing colons and then remove the whole line if VPATH becomes empty
15779 # (actually we leave an empty line to preserve line numbers).
15780 if test "x$srcdir" = x.; then
15781   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15782 s/:*\$(srcdir):*/:/;
15783 s/:*\${srcdir}:*/:/;
15784 s/:*@srcdir@:*/:/;
15785 s/^\([^=]*=[    ]*\):*/\1/;
15786 s/:*$//;
15787 s/^[^=]*=[      ]*$//;
15788 }'
15789 fi
15790
15791 DEFS=-DHAVE_CONFIG_H
15792
15793 : ${CONFIG_STATUS=./config.status}
15794 ac_clean_files_save=$ac_clean_files
15795 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15796 { echo "$as_me:15796: creating $CONFIG_STATUS" >&5
15797 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15798 cat >$CONFIG_STATUS <<_ACEOF
15799 #! $SHELL
15800 # Generated automatically by configure.
15801 # Run this file to recreate the current configuration.
15802 # Compiler output produced by configure, useful for debugging
15803 # configure, is in config.log if it exists.
15804
15805 debug=false
15806 SHELL=\${CONFIG_SHELL-$SHELL}
15807 ac_cs_invocation="\$0 \$@"
15808
15809 _ACEOF
15810
15811 cat >>$CONFIG_STATUS <<\_ACEOF
15812 # Be Bourne compatible
15813 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15814   emulate sh
15815   NULLCMD=:
15816 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15817   set -o posix
15818 fi
15819
15820 # Name of the executable.
15821 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15822
15823 if expr a : '\(a\)' >/dev/null 2>&1; then
15824   as_expr=expr
15825 else
15826   as_expr=false
15827 fi
15828
15829 rm -f conf$$ conf$$.exe conf$$.file
15830 echo >conf$$.file
15831 if ln -s conf$$.file conf$$ 2>/dev/null; then
15832   # We could just check for DJGPP; but this test a) works b) is more generic
15833   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15834   if test -f conf$$.exe; then
15835     # Don't use ln at all; we don't have any links
15836     as_ln_s='cp -p'
15837   else
15838     as_ln_s='ln -s'
15839   fi
15840 elif ln conf$$.file conf$$ 2>/dev/null; then
15841   as_ln_s=ln
15842 else
15843   as_ln_s='cp -p'
15844 fi
15845 rm -f conf$$ conf$$.exe conf$$.file
15846
15847 as_executable_p="test -f"
15848
15849 # Support unset when possible.
15850 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15851   as_unset=unset
15852 else
15853   as_unset=false
15854 fi
15855
15856 # NLS nuisances.
15857 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15858 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15859 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15860 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15861 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15862 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15863 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15864 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15865
15866 # IFS
15867 # We need space, tab and new line, in precisely that order.
15868 as_nl='
15869 '
15870 IFS="   $as_nl"
15871
15872 # CDPATH.
15873 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15874
15875 exec 6>&1
15876
15877 _ACEOF
15878
15879 # Files that config.status was made for.
15880 if test -n "$ac_config_files"; then
15881   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15882 fi
15883
15884 if test -n "$ac_config_headers"; then
15885   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15886 fi
15887
15888 if test -n "$ac_config_links"; then
15889   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15890 fi
15891
15892 if test -n "$ac_config_commands"; then
15893   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15894 fi
15895
15896 cat >>$CONFIG_STATUS <<\EOF
15897
15898 ac_cs_usage="\
15899 \`$as_me' instantiates files from templates according to the
15900 current configuration.
15901
15902 Usage: $0 [OPTIONS] [FILE]...
15903
15904   -h, --help       print this help, then exit
15905   -V, --version    print version number, then exit
15906   -d, --debug      don't remove temporary files
15907       --recheck    update $as_me by reconfiguring in the same conditions
15908   --file=FILE[:TEMPLATE]
15909                    instantiate the configuration file FILE
15910   --header=FILE[:TEMPLATE]
15911                    instantiate the configuration header FILE
15912
15913 Configuration files:
15914 $config_files
15915
15916 Configuration headers:
15917 $config_headers
15918
15919 Configuration commands:
15920 $config_commands
15921
15922 Report bugs to <bug-autoconf@gnu.org>."
15923 EOF
15924
15925 cat >>$CONFIG_STATUS <<EOF
15926 ac_cs_version="\\
15927 config.status
15928 configured by $0, generated by GNU Autoconf 2.52.20061216,
15929   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15930
15931 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15932 Free Software Foundation, Inc.
15933 This config.status script is free software; the Free Software Foundation
15934 gives unlimited permission to copy, distribute and modify it."
15935 srcdir=$srcdir
15936 INSTALL="$INSTALL"
15937 EOF
15938
15939 cat >>$CONFIG_STATUS <<\EOF
15940 # If no file are specified by the user, then we need to provide default
15941 # value.  By we need to know if files were specified by the user.
15942 ac_need_defaults=:
15943 while test $# != 0
15944 do
15945   case $1 in
15946   --*=*)
15947     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15948     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15949     shift
15950     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15951     shift
15952     ;;
15953   -*);;
15954   *) # This is not an option, so the user has probably given explicit
15955      # arguments.
15956      ac_need_defaults=false;;
15957   esac
15958
15959   case $1 in
15960   # Handling of the options.
15961 EOF
15962 cat >>$CONFIG_STATUS <<EOF
15963   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15964     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15965     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15966 EOF
15967 cat >>$CONFIG_STATUS <<\EOF
15968   --version | --vers* | -V )
15969     echo "$ac_cs_version"; exit 0 ;;
15970   --he | --h)
15971     # Conflict between --help and --header
15972     { { echo "$as_me:15972: error: ambiguous option: $1
15973 Try \`$0 --help' for more information." >&5
15974 echo "$as_me: error: ambiguous option: $1
15975 Try \`$0 --help' for more information." >&2;}
15976    { (exit 1); exit 1; }; };;
15977   --help | --hel | -h )
15978     echo "$ac_cs_usage"; exit 0 ;;
15979   --debug | --d* | -d )
15980     debug=: ;;
15981   --file | --fil | --fi | --f )
15982     shift
15983     CONFIG_FILES="$CONFIG_FILES $1"
15984     ac_need_defaults=false;;
15985   --header | --heade | --head | --hea )
15986     shift
15987     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15988     ac_need_defaults=false;;
15989
15990   # This is an error.
15991   -*) { { echo "$as_me:15991: error: unrecognized option: $1
15992 Try \`$0 --help' for more information." >&5
15993 echo "$as_me: error: unrecognized option: $1
15994 Try \`$0 --help' for more information." >&2;}
15995    { (exit 1); exit 1; }; } ;;
15996
15997   *) ac_config_targets="$ac_config_targets $1" ;;
15998
15999   esac
16000   shift
16001 done
16002
16003 exec 5>>config.log
16004 cat >&5 << _ACEOF
16005
16006 ## ----------------------- ##
16007 ## Running config.status.  ##
16008 ## ----------------------- ##
16009
16010 This file was extended by $as_me 2.52.20061216, executed with
16011   CONFIG_FILES    = $CONFIG_FILES
16012   CONFIG_HEADERS  = $CONFIG_HEADERS
16013   CONFIG_LINKS    = $CONFIG_LINKS
16014   CONFIG_COMMANDS = $CONFIG_COMMANDS
16015   > $ac_cs_invocation
16016 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16017
16018 _ACEOF
16019 EOF
16020
16021 cat >>$CONFIG_STATUS <<EOF
16022 #
16023 # INIT-COMMANDS section.
16024 #
16025
16026 ### Special initialization commands, used to pass information from the
16027 ### configuration-run into config.status
16028
16029 AWK="$AWK"
16030 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16031 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16032 ECHO_LINK="$ECHO_LINK"
16033 LDCONFIG="$LDCONFIG"
16034 LIB_NAME="$LIB_NAME"
16035 LIB_SUBSETS="$LIB_SUBSETS"
16036 LIB_SUFFIX="$LIB_SUFFIX"
16037 LIB_TRACING="$LIB_TRACING"
16038 MAKE_TERMINFO="$MAKE_TERMINFO"
16039 NCURSES_MAJOR="$NCURSES_MAJOR"
16040 NCURSES_MINOR="$NCURSES_MINOR"
16041 NCURSES_OSPEED="$NCURSES_OSPEED"
16042 NCURSES_PATCH="$NCURSES_PATCH"
16043 SRC_SUBDIRS="$SRC_SUBDIRS"
16044 TERMINFO="$TERMINFO"
16045 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16046 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16047 TINFO_NAME="$TINFO_NAME"
16048 TINFO_SUFFIX="$TINFO_SUFFIX"
16049 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16050 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16051 TICS_NAME="$TICS_NAME"
16052 WITH_CURSES_H="$with_curses_h"
16053 WITH_ECHO="$with_echo"
16054 WITH_OVERWRITE="$with_overwrite"
16055 cf_LIST_MODELS="$cf_list_models"
16056 cf_cv_abi_version="$cf_cv_abi_version"
16057 cf_cv_do_relink="$cf_cv_do_relink"
16058 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16059 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16060 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16061 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16062 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16063 cf_cv_rel_version="$cf_cv_rel_version"
16064 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16065 cf_cv_shlib_version="$cf_cv_shlib_version"
16066 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16067 cf_cv_system_name="$cf_cv_system_name"
16068 cf_with_cxx_binding="$cf_with_cxx_binding"
16069 host="$host"
16070 target="$target"
16071
16072 EOF
16073
16074 cat >>$CONFIG_STATUS <<\EOF
16075 for ac_config_target in $ac_config_targets
16076 do
16077   case "$ac_config_target" in
16078   # Handling of arguments.
16079   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16080   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16081   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16082   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16083   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16084   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16085   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16086   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16087   *) { { echo "$as_me:16087: error: invalid argument: $ac_config_target" >&5
16088 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16089    { (exit 1); exit 1; }; };;
16090   esac
16091 done
16092
16093 # If the user did not use the arguments to specify the items to instantiate,
16094 # then the envvar interface is used.  Set only those that are not.
16095 # We use the long form for the default assignment because of an extremely
16096 # bizarre bug on SunOS 4.1.3.
16097 if $ac_need_defaults; then
16098   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16099   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16100   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16101 fi
16102
16103 # Create a temporary directory, and hook for its removal unless debugging.
16104 $debug ||
16105 {
16106   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16107   trap '{ (exit 1); exit 1; }' 1 2 13 15
16108 }
16109
16110 # Create a (secure) tmp directory for tmp files.
16111 : ${TMPDIR=/tmp}
16112 {
16113   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16114   test -n "$tmp" && test -d "$tmp"
16115 }  ||
16116 {
16117   tmp=$TMPDIR/cs$$-$RANDOM
16118   (umask 077 && mkdir $tmp)
16119 } ||
16120 {
16121    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16122    { (exit 1); exit 1; }
16123 }
16124
16125 EOF
16126
16127 cat >>$CONFIG_STATUS <<EOF
16128
16129 #
16130 # CONFIG_FILES section.
16131 #
16132
16133 # No need to generate the scripts if there are no CONFIG_FILES.
16134 # This happens for instance when ./config.status config.h
16135 if test -n "\$CONFIG_FILES"; then
16136   # Protect against being on the right side of a sed subst in config.status.
16137   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16138    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16139 s,@SHELL@,$SHELL,;t t
16140 s,@exec_prefix@,$exec_prefix,;t t
16141 s,@prefix@,$prefix,;t t
16142 s,@program_transform_name@,$program_transform_name,;t t
16143 s,@bindir@,$bindir,;t t
16144 s,@sbindir@,$sbindir,;t t
16145 s,@libexecdir@,$libexecdir,;t t
16146 s,@datadir@,$datadir,;t t
16147 s,@sysconfdir@,$sysconfdir,;t t
16148 s,@sharedstatedir@,$sharedstatedir,;t t
16149 s,@localstatedir@,$localstatedir,;t t
16150 s,@libdir@,$libdir,;t t
16151 s,@includedir@,$includedir,;t t
16152 s,@oldincludedir@,$oldincludedir,;t t
16153 s,@infodir@,$infodir,;t t
16154 s,@mandir@,$mandir,;t t
16155 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16156 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16157 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16158 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16159 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16160 s,@build_alias@,$build_alias,;t t
16161 s,@host_alias@,$host_alias,;t t
16162 s,@target_alias@,$target_alias,;t t
16163 s,@ECHO_C@,$ECHO_C,;t t
16164 s,@ECHO_N@,$ECHO_N,;t t
16165 s,@ECHO_T@,$ECHO_T,;t t
16166 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16167 s,@DEFS@,$DEFS,;t t
16168 s,@LIBS@,$LIBS,;t t
16169 s,@top_builddir@,$top_builddir,;t t
16170 s,@EGREP@,$EGREP,;t t
16171 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16172 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16173 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16174 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16175 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16176 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16177 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16178 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16179 s,@build@,$build,;t t
16180 s,@build_cpu@,$build_cpu,;t t
16181 s,@build_vendor@,$build_vendor,;t t
16182 s,@build_os@,$build_os,;t t
16183 s,@host@,$host,;t t
16184 s,@host_cpu@,$host_cpu,;t t
16185 s,@host_vendor@,$host_vendor,;t t
16186 s,@host_os@,$host_os,;t t
16187 s,@target@,$target,;t t
16188 s,@target_cpu@,$target_cpu,;t t
16189 s,@target_vendor@,$target_vendor,;t t
16190 s,@target_os@,$target_os,;t t
16191 s,@CC@,$CC,;t t
16192 s,@CFLAGS@,$CFLAGS,;t t
16193 s,@LDFLAGS@,$LDFLAGS,;t t
16194 s,@CPPFLAGS@,$CPPFLAGS,;t t
16195 s,@ac_ct_CC@,$ac_ct_CC,;t t
16196 s,@EXEEXT@,$EXEEXT,;t t
16197 s,@OBJEXT@,$OBJEXT,;t t
16198 s,@CPP@,$CPP,;t t
16199 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16200 s,@PROG_EXT@,$PROG_EXT,;t t
16201 s,@LDCONFIG@,$LDCONFIG,;t t
16202 s,@CXX@,$CXX,;t t
16203 s,@CXXFLAGS@,$CXXFLAGS,;t t
16204 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16205 s,@AWK@,$AWK,;t t
16206 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16207 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16208 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16209 s,@LINT@,$LINT,;t t
16210 s,@LINT_OPTS@,$LINT_OPTS,;t t
16211 s,@LN_S@,$LN_S,;t t
16212 s,@SET_MAKE@,$SET_MAKE,;t t
16213 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16214 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16215 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16216 s,@RANLIB@,$RANLIB,;t t
16217 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16218 s,@LD@,$LD,;t t
16219 s,@ac_ct_LD@,$ac_ct_LD,;t t
16220 s,@AR@,$AR,;t t
16221 s,@ac_ct_AR@,$ac_ct_AR,;t t
16222 s,@AR_OPTS@,$AR_OPTS,;t t
16223 s,@DESTDIR@,$DESTDIR,;t t
16224 s,@BUILD_CC@,$BUILD_CC,;t t
16225 s,@BUILD_CPP@,$BUILD_CPP,;t t
16226 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16227 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16228 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16229 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16230 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16231 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16232 s,@cf_list_models@,$cf_list_models,;t t
16233 s,@LIBTOOL@,$LIBTOOL,;t t
16234 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16235 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16236 s,@LIB_CREATE@,$LIB_CREATE,;t t
16237 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16238 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16239 s,@LIB_PREP@,$LIB_PREP,;t t
16240 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16241 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16242 s,@LIB_LINK@,$LIB_LINK,;t t
16243 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16244 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16245 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16246 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16247 s,@TICS_NAME@,$TICS_NAME,;t t
16248 s,@TINFO_NAME@,$TINFO_NAME,;t t
16249 s,@LIB_NAME@,$LIB_NAME,;t t
16250 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16251 s,@CC_G_OPT@,$CC_G_OPT,;t t
16252 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16253 s,@LD_MODEL@,$LD_MODEL,;t t
16254 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16255 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16256 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16257 s,@LINK_PROGS@,$LINK_PROGS,;t t
16258 s,@LINK_TESTS@,$LINK_TESTS,;t t
16259 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16260 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16261 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16262 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16263 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16264 s,@PATHSEP@,$PATHSEP,;t t
16265 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16266 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16267 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16268 s,@TERMINFO@,$TERMINFO,;t t
16269 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16270 s,@TERMPATH@,$TERMPATH,;t t
16271 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16272 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16273 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16274 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16275 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16276 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16277 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16278 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16279 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16280 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16281 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16282 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16283 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16284 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16285 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16286 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16287 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16288 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16289 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16290 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16291 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16292 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16293 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
16294 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
16295 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
16296 s,@ECHO_LINK@,$ECHO_LINK,;t t
16297 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16298 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16299 s,@ADA_TRACE@,$ADA_TRACE,;t t
16300 s,@MATH_LIB@,$MATH_LIB,;t t
16301 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16302 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16303 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16304 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16305 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16306 s,@CXXCPP@,$CXXCPP,;t t
16307 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16308 s,@CXX_AR@,$CXX_AR,;t t
16309 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16310 s,@CXXLIBS@,$CXXLIBS,;t t
16311 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16312 s,@gnat_exists@,$gnat_exists,;t t
16313 s,@M4_exists@,$M4_exists,;t t
16314 s,@cf_ada_make@,$cf_ada_make,;t t
16315 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16316 s,@cf_ada_package@,$cf_ada_package,;t t
16317 s,@ADAFLAGS@,$ADAFLAGS,;t t
16318 s,@cf_compile_generics@,$cf_compile_generics,;t t
16319 s,@cf_generic_objects@,$cf_generic_objects,;t t
16320 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16321 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16322 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16323 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16324 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16325 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16326 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16327 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16328 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16329 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16330 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16331 s,@TICS_ARGS@,$TICS_ARGS,;t t
16332 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16333 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16334 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16335 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16336 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16337 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16338 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16339 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16340 s,@TICS_LIST@,$TICS_LIST,;t t
16341 s,@TINFO_LIST@,$TINFO_LIST,;t t
16342 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16343 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16344 s,@TEST_ARGS@,$TEST_ARGS,;t t
16345 s,@TEST_DEPS@,$TEST_DEPS,;t t
16346 s,@TEST_ARG2@,$TEST_ARG2,;t t
16347 s,@TEST_DEP2@,$TEST_DEP2,;t t
16348 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16349 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16350 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16351 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16352 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16353 CEOF
16354
16355 EOF
16356
16357   cat >>$CONFIG_STATUS <<\EOF
16358   # Split the substitutions into bite-sized pieces for seds with
16359   # small command number limits, like on Digital OSF/1 and HP-UX.
16360   ac_max_sed_lines=48
16361   ac_sed_frag=1 # Number of current file.
16362   ac_beg=1 # First line for current file.
16363   ac_end=$ac_max_sed_lines # Line after last line for current file.
16364   ac_more_lines=:
16365   ac_sed_cmds=
16366   while $ac_more_lines; do
16367     if test $ac_beg -gt 1; then
16368       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16369     else
16370       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16371     fi
16372     if test ! -s $tmp/subs.frag; then
16373       ac_more_lines=false
16374     else
16375       # The purpose of the label and of the branching condition is to
16376       # speed up the sed processing (if there are no `@' at all, there
16377       # is no need to browse any of the substitutions).
16378       # These are the two extra sed commands mentioned above.
16379       (echo ':t
16380   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16381       if test -z "$ac_sed_cmds"; then
16382         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16383       else
16384         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16385       fi
16386       ac_sed_frag=`expr $ac_sed_frag + 1`
16387       ac_beg=$ac_end
16388       ac_end=`expr $ac_end + $ac_max_sed_lines`
16389     fi
16390   done
16391   if test -z "$ac_sed_cmds"; then
16392     ac_sed_cmds=cat
16393   fi
16394 fi # test -n "$CONFIG_FILES"
16395
16396 EOF
16397 cat >>$CONFIG_STATUS <<\EOF
16398 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16399   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16400   case $ac_file in
16401   - | *:- | *:-:* ) # input from stdin
16402         cat >$tmp/stdin
16403         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16404         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16405   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16406         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16407   * )   ac_file_in=$ac_file.in ;;
16408   esac
16409
16410   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16411   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16412          X"$ac_file" : 'X\(//\)[^/]' \| \
16413          X"$ac_file" : 'X\(//\)$' \| \
16414          X"$ac_file" : 'X\(/\)' \| \
16415          .     : '\(.\)' 2>/dev/null ||
16416 echo X"$ac_file" |
16417     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16418           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16419           /^X\(\/\/\)$/{ s//\1/; q; }
16420           /^X\(\/\).*/{ s//\1/; q; }
16421           s/.*/./; q'`
16422   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16423     { case "$ac_dir" in
16424   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16425   *)                      as_incr_dir=.;;
16426 esac
16427 as_dummy="$ac_dir"
16428 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16429   case $as_mkdir_dir in
16430     # Skip DOS drivespec
16431     ?:) as_incr_dir=$as_mkdir_dir ;;
16432     *)
16433       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16434       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16435     ;;
16436   esac
16437 done; }
16438
16439     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16440     # A "../" for each directory in $ac_dir_suffix.
16441     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16442   else
16443     ac_dir_suffix= ac_dots=
16444   fi
16445
16446   case $srcdir in
16447   .)  ac_srcdir=.
16448       if test -z "$ac_dots"; then
16449          ac_top_srcdir=.
16450       else
16451          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16452       fi ;;
16453   [\\/]* | ?:[\\/]* )
16454       ac_srcdir=$srcdir$ac_dir_suffix;
16455       ac_top_srcdir=$srcdir ;;
16456   *) # Relative path.
16457     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16458     ac_top_srcdir=$ac_dots$srcdir ;;
16459   esac
16460
16461   case $INSTALL in
16462   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16463   *) ac_INSTALL=$ac_dots$INSTALL ;;
16464   esac
16465
16466   if test x"$ac_file" != x-; then
16467     { echo "$as_me:16467: creating $ac_file" >&5
16468 echo "$as_me: creating $ac_file" >&6;}
16469     rm -f "$ac_file"
16470   fi
16471   # Let's still pretend it is `configure' which instantiates (i.e., don't
16472   # use $as_me), people would be surprised to read:
16473   #    /* config.h.  Generated automatically by config.status.  */
16474   configure_input="Generated automatically from `echo $ac_file_in |
16475                                                  sed 's,.*/,,'` by configure."
16476
16477   # First look for the input files in the build tree, otherwise in the
16478   # src tree.
16479   ac_file_inputs=`IFS=:
16480     for f in $ac_file_in; do
16481       case $f in
16482       -) echo $tmp/stdin ;;
16483       [\\/$]*)
16484          # Absolute (can't be DOS-style, as IFS=:)
16485          test -f "$f" || { { echo "$as_me:16485: error: cannot find input file: $f" >&5
16486 echo "$as_me: error: cannot find input file: $f" >&2;}
16487    { (exit 1); exit 1; }; }
16488          echo $f;;
16489       *) # Relative
16490          if test -f "$f"; then
16491            # Build tree
16492            echo $f
16493          elif test -f "$srcdir/$f"; then
16494            # Source tree
16495            echo $srcdir/$f
16496          else
16497            # /dev/null tree
16498            { { echo "$as_me:16498: error: cannot find input file: $f" >&5
16499 echo "$as_me: error: cannot find input file: $f" >&2;}
16500    { (exit 1); exit 1; }; }
16501          fi;;
16502       esac
16503     done` || { (exit 1); exit 1; }
16504 EOF
16505 cat >>$CONFIG_STATUS <<EOF
16506   sed "$ac_vpsub
16507 $extrasub
16508 EOF
16509 cat >>$CONFIG_STATUS <<\EOF
16510 :t
16511 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16512 s,@configure_input@,$configure_input,;t t
16513 s,@srcdir@,$ac_srcdir,;t t
16514 s,@top_srcdir@,$ac_top_srcdir,;t t
16515 s,@INSTALL@,$ac_INSTALL,;t t
16516 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16517   rm -f $tmp/stdin
16518   if test x"$ac_file" != x-; then
16519     mv $tmp/out $ac_file
16520   else
16521     cat $tmp/out
16522     rm -f $tmp/out
16523   fi
16524
16525 done
16526 EOF
16527 cat >>$CONFIG_STATUS <<\EOF
16528
16529 #
16530 # CONFIG_HEADER section.
16531 #
16532
16533 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16534 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16535 #
16536 # ac_d sets the value in "#define NAME VALUE" lines.
16537 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16538 ac_dB='[        ].*$,\1#\2'
16539 ac_dC=' '
16540 ac_dD=',;t'
16541 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16542 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16543 ac_iB='\([      ]\),\1#\2define\3'
16544 ac_iC=' '
16545 ac_iD='\4,;t'
16546 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16547 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16548 ac_uB='$,\1#\2define\3'
16549 ac_uC=' '
16550 ac_uD=',;t'
16551
16552 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16553   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16554   case $ac_file in
16555   - | *:- | *:-:* ) # input from stdin
16556         cat >$tmp/stdin
16557         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16558         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16559   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16560         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16561   * )   ac_file_in=$ac_file.in ;;
16562   esac
16563
16564   test x"$ac_file" != x- && { echo "$as_me:16564: creating $ac_file" >&5
16565 echo "$as_me: creating $ac_file" >&6;}
16566
16567   # First look for the input files in the build tree, otherwise in the
16568   # src tree.
16569   ac_file_inputs=`IFS=:
16570     for f in $ac_file_in; do
16571       case $f in
16572       -) echo $tmp/stdin ;;
16573       [\\/$]*)
16574          # Absolute (can't be DOS-style, as IFS=:)
16575          test -f "$f" || { { echo "$as_me:16575: error: cannot find input file: $f" >&5
16576 echo "$as_me: error: cannot find input file: $f" >&2;}
16577    { (exit 1); exit 1; }; }
16578          echo $f;;
16579       *) # Relative
16580          if test -f "$f"; then
16581            # Build tree
16582            echo $f
16583          elif test -f "$srcdir/$f"; then
16584            # Source tree
16585            echo $srcdir/$f
16586          else
16587            # /dev/null tree
16588            { { echo "$as_me:16588: error: cannot find input file: $f" >&5
16589 echo "$as_me: error: cannot find input file: $f" >&2;}
16590    { (exit 1); exit 1; }; }
16591          fi;;
16592       esac
16593     done` || { (exit 1); exit 1; }
16594   # Remove the trailing spaces.
16595   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16596
16597 EOF
16598
16599 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16600 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16601 # be either 'cat' or 'sort'.
16602 cat confdefs.h | uniq >conftest.vals
16603
16604 # Break up conftest.vals because some shells have a limit on
16605 # the size of here documents, and old seds have small limits too.
16606
16607 rm -f conftest.tail
16608 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16609 while grep . conftest.vals >/dev/null
16610 do
16611   # Write chunks of a limited-size here document to conftest.frag.
16612   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16613   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16614   echo 'CEOF' >> $CONFIG_STATUS
16615   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16616   rm -f conftest.vals
16617   mv conftest.tail conftest.vals
16618 done
16619 rm -f conftest.vals
16620
16621 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16622 # marker @DEFS@.
16623 echo '  cat >> conftest.edit <<CEOF
16624 /@DEFS@/r conftest.frag
16625 /@DEFS@/d
16626 CEOF
16627 sed -f conftest.edit $tmp/in > $tmp/out
16628 rm -f $tmp/in
16629 mv $tmp/out $tmp/in
16630 rm -f conftest.edit conftest.frag
16631 ' >> $CONFIG_STATUS
16632
16633 cat >>$CONFIG_STATUS <<\EOF
16634   # Let's still pretend it is `configure' which instantiates (i.e., don't
16635   # use $as_me), people would be surprised to read:
16636   #    /* config.h.  Generated automatically by config.status.  */
16637   if test x"$ac_file" = x-; then
16638     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16639   else
16640     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16641   fi
16642   cat $tmp/in >>$tmp/config.h
16643   rm -f $tmp/in
16644   if test x"$ac_file" != x-; then
16645     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16646       { echo "$as_me:16646: $ac_file is unchanged" >&5
16647 echo "$as_me: $ac_file is unchanged" >&6;}
16648     else
16649       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16650          X"$ac_file" : 'X\(//\)[^/]' \| \
16651          X"$ac_file" : 'X\(//\)$' \| \
16652          X"$ac_file" : 'X\(/\)' \| \
16653          .     : '\(.\)' 2>/dev/null ||
16654 echo X"$ac_file" |
16655     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16656           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16657           /^X\(\/\/\)$/{ s//\1/; q; }
16658           /^X\(\/\).*/{ s//\1/; q; }
16659           s/.*/./; q'`
16660       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16661         { case "$ac_dir" in
16662   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16663   *)                      as_incr_dir=.;;
16664 esac
16665 as_dummy="$ac_dir"
16666 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16667   case $as_mkdir_dir in
16668     # Skip DOS drivespec
16669     ?:) as_incr_dir=$as_mkdir_dir ;;
16670     *)
16671       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16672       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16673     ;;
16674   esac
16675 done; }
16676
16677       fi
16678       rm -f $ac_file
16679       mv $tmp/config.h $ac_file
16680     fi
16681   else
16682     cat $tmp/config.h
16683     rm -f $tmp/config.h
16684   fi
16685 done
16686 EOF
16687 cat >>$CONFIG_STATUS <<\EOF
16688
16689 #
16690 # CONFIG_COMMANDS section.
16691 #
16692 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16693   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16694   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16695
16696   case $ac_dest in
16697     default )
16698
16699 for cf_dir in test
16700 do
16701         if test ! -d $srcdir/$cf_dir; then
16702                 continue
16703         elif test -f $srcdir/$cf_dir/programs; then
16704                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16705         fi
16706 done
16707
16708         case $cf_cv_system_name in
16709         OS/2*)  LIB_PREFIX=''     ;;
16710         os2*)   LIB_PREFIX=''     ;;
16711         *)      LIB_PREFIX='lib'  ;;
16712         esac
16713 cf_prefix=$LIB_PREFIX
16714
16715 for cf_dir in $SRC_SUBDIRS
16716 do
16717         if test ! -d $srcdir/$cf_dir ; then
16718                 continue
16719         elif test -f $srcdir/$cf_dir/modules; then
16720
16721                 SHARED_LIB=
16722                 LIBS_TO_MAKE=
16723                 for cf_item in $cf_LIST_MODELS
16724                 do
16725
16726         case $cf_item in
16727         libtool) cf_suffix='.la'  ;;
16728         normal)  cf_suffix='.a'   ;;
16729         debug)   cf_suffix='_g.a' ;;
16730         profile) cf_suffix='_p.a' ;;
16731         shared)
16732                 case $cf_cv_system_name in
16733                 cygwin*) cf_suffix='.dll' ;;
16734                 darwin*) cf_suffix='.dylib' ;;
16735                 hpux*)
16736                         case $target in
16737                         ia64*)  cf_suffix='.so' ;;
16738                         *)      cf_suffix='.sl' ;;
16739                         esac
16740                         ;;
16741                 *)      cf_suffix='.so'  ;;
16742                 esac
16743         esac
16744         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16745
16746                         if test $cf_item = shared ; then
16747                         if test "$cf_cv_do_symlinks" = yes ; then
16748                                 case "$cf_cv_shlib_version" in #(vi
16749                                 rel) #(vi
16750                                         case "$cf_cv_system_name" in #(vi
16751                                         darwin*)
16752                                         case .${LIB_SUFFIX} in
16753                                         .w*)
16754                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16755                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16756                                                 ;;
16757                                         *)
16758                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16759                                                 ;;
16760                                         esac
16761                                         ;; #(vi
16762                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16763                                         esac
16764                                         ;;
16765                                 abi)
16766                                         case "$cf_cv_system_name" in #(vi
16767                                         darwin*)
16768                                         case .${LIB_SUFFIX} in
16769                                         .w*)
16770                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16771                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16772                                                 ;;
16773                                         *)
16774                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16775                                                 ;;
16776                                         esac
16777                                         ;; #(vi
16778                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16779                                         esac
16780                                         ;;
16781                                 esac
16782                         fi
16783                         # cygwin needs import library, and has unique naming convention
16784                         # use autodetected ${cf_prefix} for import lib and static lib, but
16785                         # use 'cyg' prefix for shared lib.
16786                         if test $cf_cv_shlib_version = cygdll ; then
16787                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}\${ABI_VERSION}.dll"
16788                                 continue
16789                         fi
16790                         fi
16791                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16792                 done
16793
16794                 if test $cf_dir = ncurses ; then
16795                         cf_subsets="$LIB_SUBSETS"
16796                         cf_r_parts="$cf_subsets"
16797
16798                         while test -n "$cf_r_parts"
16799                         do
16800                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16801                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16802                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16803                                         case $cf_l_parts in #(vi
16804                                         *termlib*) #(vi
16805                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16806                                                 ;;
16807                                         *ticlib*)
16808                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16809                                                 ;;
16810                                         *)
16811                                                 break
16812                                                 ;;
16813                                         esac
16814                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16815                                 else
16816                                         break
16817                                 fi
16818                         done
16819                 else
16820                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16821                 fi
16822
16823                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16824                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16825                         $cf_dir/Makefile >$cf_dir/Makefile.out
16826                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16827
16828                 $AWK -f $srcdir/mk-0th.awk \
16829                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16830                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16831
16832                 for cf_subset in $cf_subsets
16833                 do
16834                         cf_subdirs=
16835                         for cf_item in $cf_LIST_MODELS
16836                         do
16837                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16838
16839 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16840
16841         case $cf_item in
16842         libtool) cf_suffix='.la'  ;;
16843         normal)  cf_suffix='.a'   ;;
16844         debug)   cf_suffix='_g.a' ;;
16845         profile) cf_suffix='_p.a' ;;
16846         shared)
16847                 case $cf_cv_system_name in
16848                 cygwin*) cf_suffix='.dll' ;;
16849                 darwin*) cf_suffix='.dylib' ;;
16850                 hpux*)
16851                         case $target in
16852                         ia64*)  cf_suffix='.so' ;;
16853                         *)      cf_suffix='.sl' ;;
16854                         esac
16855                         ;;
16856                 *)      cf_suffix='.so'  ;;
16857                 esac
16858         esac
16859         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16860
16861         case $cf_item in
16862         libtool) cf_subdir='obj_lo'  ;;
16863         normal)  cf_subdir='objects' ;;
16864         debug)   cf_subdir='obj_g' ;;
16865         profile) cf_subdir='obj_p' ;;
16866         shared)
16867                 case $cf_cv_system_name in #(vi
16868                 cygwin) #(vi
16869                         cf_subdir='objects' ;;
16870                 *)
16871                         cf_subdir='obj_s' ;;
16872                 esac
16873         esac
16874
16875                         # Test for case where we build libtinfo with a different name.
16876                         cf_libname=$cf_dir
16877                         if test $cf_dir = ncurses ; then
16878                                 case $cf_subset in
16879                                 *base*)
16880                                         ;;
16881                                 *termlib*)
16882                                         cf_libname=$TINFO_LIB_SUFFIX
16883                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16884                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16885                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16886                                         fi
16887                                         ;;
16888                                 ticlib*)
16889                                         cf_libname=$TICS_LIB_SUFFIX
16890                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16891                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16892                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16893                                         fi
16894                                         ;;
16895                                 esac
16896                         fi
16897
16898                         # These dependencies really are for development, not
16899                         # builds, but they are useful in porting, too.
16900                         cf_depend="../include/ncurses_cfg.h"
16901                         if test "$srcdir" = "."; then
16902                                 cf_reldir="."
16903                         else
16904                                 cf_reldir="\${srcdir}"
16905                         fi
16906
16907                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16908                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16909                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16910                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16911                         fi
16912
16913                         cf_dir_suffix=
16914                         old_cf_suffix="$cf_suffix"
16915                         if test "$cf_cv_shlib_version_infix" = yes ; then
16916                         if test -n "$LIB_SUFFIX" ; then
16917                                 case $LIB_SUFFIX in
16918                                 w*)
16919                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16920                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16921                                         cf_dir_suffix=w
16922                                         ;;
16923                                 esac
16924                         fi
16925                         fi
16926
16927                         $AWK -f $srcdir/mk-1st.awk \
16928                                 name=${cf_libname}${cf_dir_suffix} \
16929                                 traces=$LIB_TRACING \
16930                                 MODEL=$cf_ITEM \
16931                                 model=$cf_subdir \
16932                                 prefix=$cf_prefix \
16933                                 suffix=$cf_suffix \
16934                                 subset=$cf_subset \
16935                                 TermlibRoot=$TINFO_NAME \
16936                                 TermlibSuffix=$TINFO_SUFFIX \
16937                                 ShlibVer=$cf_cv_shlib_version \
16938                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16939                                 ReLink=${cf_cv_do_relink-no} \
16940                                 DoLinks=$cf_cv_do_symlinks \
16941                                 rmSoLocs=$cf_cv_rm_so_locs \
16942                                 ldconfig="$LDCONFIG" \
16943                                 overwrite=$WITH_OVERWRITE \
16944                                 depend="$cf_depend" \
16945                                 host="$host" \
16946                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16947
16948                         cf_suffix="$old_cf_suffix"
16949
16950                         for cf_subdir2 in $cf_subdirs lib
16951                         do
16952                                 test $cf_subdir = $cf_subdir2 && break
16953                         done
16954                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16955                         $AWK -f $srcdir/mk-2nd.awk \
16956                                 name=$cf_dir \
16957                                 traces=$LIB_TRACING \
16958                                 MODEL=$cf_ITEM \
16959                                 model=$cf_subdir \
16960                                 subset=$cf_subset \
16961                                 srcdir=$srcdir \
16962                                 echo=$WITH_ECHO \
16963                                 crenames=$cf_cv_prog_CC_c_o \
16964                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16965                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16966                         cf_subdirs="$cf_subdirs $cf_subdir"
16967                         done
16968                 done
16969         fi
16970
16971         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16972 done
16973
16974 for cf_dir in $SRC_SUBDIRS
16975 do
16976         if test ! -d $srcdir/$cf_dir ; then
16977                 continue
16978         fi
16979
16980         if test -f $cf_dir/Makefile ; then
16981                 case "$cf_dir" in
16982                 Ada95) #(vi
16983                         echo 'libs \' >> Makefile
16984                         echo 'install.libs \' >> Makefile
16985                         echo 'uninstall.libs ::' >> Makefile
16986                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16987                         ;;
16988                 esac
16989         fi
16990
16991         if test -f $srcdir/$cf_dir/modules; then
16992                 echo >> Makefile
16993                 if test -f $srcdir/$cf_dir/headers; then
16994 cat >> Makefile <<CF_EOF
16995 install.includes \\
16996 uninstall.includes \\
16997 CF_EOF
16998                 fi
16999 if test "$cf_dir" != "c++" ; then
17000 echo 'lint \' >> Makefile
17001 fi
17002 cat >> Makefile <<CF_EOF
17003 libs \\
17004 lintlib \\
17005 install.libs \\
17006 uninstall.libs \\
17007 install.$cf_dir \\
17008 uninstall.$cf_dir ::
17009         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17010 CF_EOF
17011         elif test -f $srcdir/$cf_dir/headers; then
17012 cat >> Makefile <<CF_EOF
17013
17014 libs \\
17015 install.libs \\
17016 uninstall.libs \\
17017 install.includes \\
17018 uninstall.includes ::
17019         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17020 CF_EOF
17021 fi
17022 done
17023
17024 cat >> Makefile <<CF_EOF
17025
17026 install.libs uninstall.libs \\
17027 install.data uninstall.data ::
17028 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17029
17030 install.man \\
17031 uninstall.man ::
17032         cd man && \${MAKE} \${CF_MFLAGS} \$@
17033
17034 distclean ::
17035         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17036         rm -f headers.sh headers.sed mk_shared_lib.sh
17037         rm -rf \${DIRS_TO_MAKE}
17038 CF_EOF
17039
17040 # Special case: tack's manpage lives in its own directory.
17041 if test -d tack ; then
17042 if test -f $srcdir/$tack.h; then
17043 cat >> Makefile <<CF_EOF
17044
17045 install.man \\
17046 uninstall.man ::
17047         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17048 CF_EOF
17049 fi
17050 fi
17051
17052 rm -f headers.sed headers.sh
17053
17054 echo creating headers.sh
17055 cat >headers.sh <<CF_EOF
17056 #! /bin/sh
17057 # This shell script is generated by the 'configure' script.  It is invoked in a
17058 # subdirectory of the build tree.  It generates a sed-script in the parent
17059 # directory that is used to adjust includes for header files that reside in a
17060 # subdirectory of /usr/include, etc.
17061 PRG=""
17062 while test \$# != 3
17063 do
17064 PRG="\$PRG \$1"; shift
17065 done
17066 DST=\$1
17067 REF=\$2
17068 SRC=\$3
17069 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17070 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17071 echo installing \$SRC in \$DST
17072 CF_EOF
17073
17074 if test $WITH_CURSES_H = yes; then
17075         cat >>headers.sh <<CF_EOF
17076 case \$DST in
17077 /*/include/*)
17078         END=\`basename \$DST\`
17079         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17080         do
17081                 NAME=\`basename \$i\`
17082                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17083         done
17084         ;;
17085 *)
17086         echo "" >> \$TMPSED
17087         ;;
17088 esac
17089 CF_EOF
17090
17091 else
17092         cat >>headers.sh <<CF_EOF
17093 case \$DST in
17094 /*/include/*)
17095         END=\`basename \$DST\`
17096         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17097         do
17098                 NAME=\`basename \$i\`
17099                 if test "\$NAME" = "curses.h"
17100                 then
17101                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17102                         NAME=ncurses.h
17103                 fi
17104                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17105         done
17106         ;;
17107 *)
17108         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17109         ;;
17110 esac
17111 CF_EOF
17112 fi
17113 cat >>headers.sh <<CF_EOF
17114 rm -f \$TMPSRC
17115 sed -f \$TMPSED \$SRC > \$TMPSRC
17116 NAME=\`basename \$SRC\`
17117 CF_EOF
17118 if test $WITH_CURSES_H != yes; then
17119         cat >>headers.sh <<CF_EOF
17120 test "\$NAME" = "curses.h" && NAME=ncurses.h
17121 CF_EOF
17122 fi
17123 cat >>headers.sh <<CF_EOF
17124 # Just in case someone gzip'd manpages, remove the conflicting copy.
17125 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17126
17127 eval \$PRG \$TMPSRC \$DST/\$NAME
17128 rm -f \$TMPSRC \$TMPSED
17129 CF_EOF
17130
17131 chmod 0755 headers.sh
17132
17133 for cf_dir in $SRC_SUBDIRS
17134 do
17135         if test ! -d $srcdir/$cf_dir ; then
17136                 continue
17137         fi
17138
17139         if test -f $srcdir/$cf_dir/headers; then
17140                 $AWK -f $srcdir/mk-hdr.awk \
17141                         subset="$LIB_SUBSETS" \
17142                         compat="$WITH_CURSES_H" \
17143                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17144         fi
17145
17146         if test -f $srcdir/$cf_dir/modules; then
17147                 if test "$cf_dir" != "c++" ; then
17148                         cat >>$cf_dir/Makefile <<"CF_EOF"
17149 depend : ${AUTO_SRC}
17150         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17151
17152 # DO NOT DELETE THIS LINE -- make depend depends on it.
17153 CF_EOF
17154                 fi
17155         fi
17156 done
17157
17158  ;;
17159   esac
17160 done
17161 EOF
17162
17163 cat >>$CONFIG_STATUS <<\EOF
17164
17165 { (exit 0); exit 0; }
17166 EOF
17167 chmod +x $CONFIG_STATUS
17168 ac_clean_files=$ac_clean_files_save
17169
17170 # configure is writing to config.log, and then calls config.status.
17171 # config.status does its own redirection, appending to config.log.
17172 # Unfortunately, on DOS this fails, as config.log is still kept open
17173 # by configure, so config.status won't be able to write to it; its
17174 # output is simply discarded.  So we exec the FD to /dev/null,
17175 # effectively closing config.log, so it can be properly (re)opened and
17176 # appended to by config.status.  When coming back to configure, we
17177 # need to make the FD available again.
17178 if test "$no_create" != yes; then
17179   ac_cs_success=:
17180   exec 5>/dev/null
17181   $SHELL $CONFIG_STATUS || ac_cs_success=false
17182   exec 5>>config.log
17183   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17184   # would make configure fail if this is the last instruction.
17185   $ac_cs_success || { (exit 1); exit 1; }
17186 fi
17187 ${MAKE-make} preinstall