]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20081018
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.454 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --disable-tic-depends   link tic library without explicit dependency on ncurses library
750   --with-bool=TYPE        override fallback type of bool variable
751   --with-caps=alt         compile with alternate Caps file
752   --with-chtype=TYPE      override type of chtype
753   --with-ospeed=TYPE      override type of ospeed variable
754   --with-mmask-t=TYPE     override type of mmask_t
755   --with-rcs-ids          compile-in RCS identifiers
756 Options to Specify How Manpages are Installed:
757   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
758                           optionally formatted/catonly, e.g., gzip,formatted
759   --with-manpage-renames  specify manpage-renaming
760   --with-manpage-aliases  specify manpage-aliases using .so
761   --with-manpage-symlinks specify manpage-aliases using symlinks
762   --with-manpage-tbl      specify manpage processing with tbl
763 Extensions:
764   --disable-ext-funcs     disable function-extensions
765   --enable-const          compile with extra/non-standard const
766   --enable-ext-colors     compile for 256-color support
767   --enable-ext-mouse      compile for extended mouse-encoding
768   --enable-no-padding     compile with $NCURSES_NO_PADDING code
769   --enable-signed-char    compile using signed Boolean's in term.h
770   --enable-sigwinch       compile with SIGWINCH handler
771   --enable-tcap-names     compile with user-definable terminal capabilities
772 Development Code:
773   --without-develop       disable development options
774   --enable-hard-tabs      compile with hard-tabs code
775   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
776 Experimental Code:
777   --disable-assumed-color do not assume anything about default-colors
778   --disable-hashmap       compile without hashmap scrolling-optimization
779   --enable-colorfgbg      compile with $COLORFGBG code
780   --with-pthread          use POSIX thread library
781   --enable-weak-symbols   enable weak-symbols for pthreads
782   --enable-reentrant      compile with experimental reentrant code
783   --enable-safe-sprintf   compile with experimental safe-sprintf code
784   --disable-scroll-hints  compile without scroll-hints code
785   --enable-wgetch-events  compile with experimental wgetch-events code
786 Testing/development Options:
787   --enable-echo           build: display "compiling" commands (default)
788   --enable-warnings       build: turn on GCC compiler warnings
789   --enable-assertions     test: turn on generation of assertion code
790   --with-dmalloc          test: use Gray Watson's dmalloc library
791   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
792   --with-valgrind         test: use valgrind
793   --disable-leaks         test: free permanent memory, analyze leaks
794   --enable-expanded       test: generate functions for certain macros
795   --disable-macros        test: use functions rather than macros
796   --with-trace            test: add trace() function to all models of ncurses
797 Ada95 Binding Options:
798   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
799   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
800   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
801
802 Some influential environment variables:
803   CC          C compiler command
804   CFLAGS      C compiler flags
805   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
806               nonstandard directory <lib dir>
807   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
808               headers in a nonstandard directory <include dir>
809   CPP         C preprocessor
810   CXX         C++ compiler command
811   CXXFLAGS    C++ compiler flags
812   CXXCPP      C++ preprocessor
813
814 Use these variables to override the choices made by `configure' or to help
815 it to find libraries and programs with nonstandard names/locations.
816
817 EOF
818 fi
819
820 if test "$ac_init_help" = "recursive"; then
821   # If there are subdirs, report their specific --help.
822   ac_popdir=`pwd`
823   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
824     cd $ac_subdir
825     # A "../" for each directory in /$ac_subdir.
826     ac_dots=`echo $ac_subdir |
827              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
828
829     case $srcdir in
830     .) # No --srcdir option.  We are building in place.
831       ac_sub_srcdir=$srcdir ;;
832     [\\/]* | ?:[\\/]* ) # Absolute path.
833       ac_sub_srcdir=$srcdir/$ac_subdir ;;
834     *) # Relative path.
835       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
836     esac
837
838     # Check for guested configure; otherwise get Cygnus style configure.
839     if test -f $ac_sub_srcdir/configure.gnu; then
840       echo
841       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
842     elif test -f $ac_sub_srcdir/configure; then
843       echo
844       $SHELL $ac_sub_srcdir/configure  --help=recursive
845     elif test -f $ac_sub_srcdir/configure.ac ||
846            test -f $ac_sub_srcdir/configure.in; then
847       echo
848       $ac_configure --help
849     else
850       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
851     fi
852     cd $ac_popdir
853   done
854 fi
855
856 test -n "$ac_init_help" && exit 0
857 if $ac_init_version; then
858   cat <<\EOF
859
860 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
861 Free Software Foundation, Inc.
862 This configure script is free software; the Free Software Foundation
863 gives unlimited permission to copy, distribute and modify it.
864 EOF
865   exit 0
866 fi
867 exec 5>config.log
868 cat >&5 <<EOF
869 This file contains any messages produced by compilers while
870 running configure, to aid debugging if configure makes a mistake.
871
872 It was created by $as_me, which was
873 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
874
875   $ $0 $@
876
877 EOF
878 {
879 cat <<_ASUNAME
880 ## ---------- ##
881 ## Platform.  ##
882 ## ---------- ##
883
884 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
885 uname -m = `(uname -m) 2>/dev/null || echo unknown`
886 uname -r = `(uname -r) 2>/dev/null || echo unknown`
887 uname -s = `(uname -s) 2>/dev/null || echo unknown`
888 uname -v = `(uname -v) 2>/dev/null || echo unknown`
889
890 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
891 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
892
893 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
894 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
895 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
896 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
897 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
898 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
899 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
900
901 PATH = $PATH
902
903 _ASUNAME
904 } >&5
905
906 cat >&5 <<EOF
907 ## ------------ ##
908 ## Core tests.  ##
909 ## ------------ ##
910
911 EOF
912
913 # Keep a trace of the command line.
914 # Strip out --no-create and --no-recursion so they do not pile up.
915 # Also quote any args containing shell meta-characters.
916 ac_configure_args=
917 ac_sep=
918 for ac_arg
919 do
920   case $ac_arg in
921   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
922   | --no-cr | --no-c) ;;
923   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
924   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
925   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
926     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
927     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
928     ac_sep=" " ;;
929   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
930      ac_sep=" " ;;
931   esac
932   # Get rid of the leading space.
933 done
934
935 # When interrupted or exit'd, cleanup temporary files, and complete
936 # config.log.  We remove comments because anyway the quotes in there
937 # would cause problems or look ugly.
938 trap 'exit_status=$?
939   # Save into config.log some information that might help in debugging.
940   echo >&5
941   echo "## ----------------- ##" >&5
942   echo "## Cache variables.  ##" >&5
943   echo "## ----------------- ##" >&5
944   echo >&5
945   # The following way of writing the cache mishandles newlines in values,
946 {
947   (set) 2>&1 |
948     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
949     *ac_space=\ *)
950       sed -n \
951         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
952           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
953       ;;
954     *)
955       sed -n \
956         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
957       ;;
958     esac;
959 } >&5
960   sed "/^$/d" confdefs.h >conftest.log
961   if test -s conftest.log; then
962     echo >&5
963     echo "## ------------ ##" >&5
964     echo "## confdefs.h.  ##" >&5
965     echo "## ------------ ##" >&5
966     echo >&5
967     cat conftest.log >&5
968   fi
969   (echo; echo) >&5
970   test "$ac_signal" != 0 &&
971     echo "$as_me: caught signal $ac_signal" >&5
972   echo "$as_me: exit $exit_status" >&5
973   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
974     exit $exit_status
975      ' 0
976 for ac_signal in 1 2 13 15; do
977   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
978 done
979 ac_signal=0
980
981 # confdefs.h avoids OS command line length limits that DEFS can exceed.
982 rm -rf conftest* confdefs.h
983 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
984 echo >confdefs.h
985
986 # Let the site file select an alternate cache file if it wants to.
987 # Prefer explicitly selected file to automatically selected ones.
988 if test -z "$CONFIG_SITE"; then
989   if test "x$prefix" != xNONE; then
990     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
991   else
992     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
993   fi
994 fi
995 for ac_site_file in $CONFIG_SITE; do
996   if test -r "$ac_site_file"; then
997     { echo "$as_me:997: loading site script $ac_site_file" >&5
998 echo "$as_me: loading site script $ac_site_file" >&6;}
999     cat "$ac_site_file" >&5
1000     . "$ac_site_file"
1001   fi
1002 done
1003
1004 if test -r "$cache_file"; then
1005   # Some versions of bash will fail to source /dev/null (special
1006   # files actually), so we avoid doing that.
1007   if test -f "$cache_file"; then
1008     { echo "$as_me:1008: loading cache $cache_file" >&5
1009 echo "$as_me: loading cache $cache_file" >&6;}
1010     case $cache_file in
1011       [\\/]* | ?:[\\/]* ) . $cache_file;;
1012       *)                      . ./$cache_file;;
1013     esac
1014   fi
1015 else
1016   { echo "$as_me:1016: creating cache $cache_file" >&5
1017 echo "$as_me: creating cache $cache_file" >&6;}
1018   >$cache_file
1019 fi
1020
1021 # Check that the precious variables saved in the cache have kept the same
1022 # value.
1023 ac_cache_corrupted=false
1024 for ac_var in `(set) 2>&1 |
1025                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1026   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1027   eval ac_new_set=\$ac_env_${ac_var}_set
1028   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1029   eval ac_new_val="\$ac_env_${ac_var}_value"
1030   case $ac_old_set,$ac_new_set in
1031     set,)
1032       { echo "$as_me:1032: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1033 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1034       ac_cache_corrupted=: ;;
1035     ,set)
1036       { echo "$as_me:1036: error: \`$ac_var' was not set in the previous run" >&5
1037 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1038       ac_cache_corrupted=: ;;
1039     ,);;
1040     *)
1041       if test "x$ac_old_val" != "x$ac_new_val"; then
1042         { echo "$as_me:1042: error: \`$ac_var' has changed since the previous run:" >&5
1043 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1044         { echo "$as_me:1044:   former value:  $ac_old_val" >&5
1045 echo "$as_me:   former value:  $ac_old_val" >&2;}
1046         { echo "$as_me:1046:   current value: $ac_new_val" >&5
1047 echo "$as_me:   current value: $ac_new_val" >&2;}
1048         ac_cache_corrupted=:
1049       fi;;
1050   esac
1051   # Pass precious variables to config.status.  It doesn't matter if
1052   # we pass some twice (in addition to the command line arguments).
1053   if test "$ac_new_set" = set; then
1054     case $ac_new_val in
1055     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1056       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1057       ac_configure_args="$ac_configure_args '$ac_arg'"
1058       ;;
1059     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1060        ;;
1061     esac
1062   fi
1063 done
1064 if $ac_cache_corrupted; then
1065   { echo "$as_me:1065: error: changes in the environment can compromise the build" >&5
1066 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1067   { { echo "$as_me:1067: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1068 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1069    { (exit 1); exit 1; }; }
1070 fi
1071
1072 ac_ext=c
1073 ac_cpp='$CPP $CPPFLAGS'
1074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1077 ac_main_return=return
1078
1079 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1080   *c*,-n*) ECHO_N= ECHO_C='
1081 ' ECHO_T='      ' ;;
1082   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1083   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1084 esac
1085 echo "#! $SHELL" >conftest.sh
1086 echo  "exit 0"   >>conftest.sh
1087 chmod +x conftest.sh
1088 if { (echo "$as_me:1088: PATH=\".;.\"; conftest.sh") >&5
1089   (PATH=".;."; conftest.sh) 2>&5
1090   ac_status=$?
1091   echo "$as_me:1091: \$? = $ac_status" >&5
1092   (exit $ac_status); }; then
1093   ac_path_separator=';'
1094 else
1095   ac_path_separator=:
1096 fi
1097 PATH_SEPARATOR="$ac_path_separator"
1098 rm -f conftest.sh
1099
1100 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1101
1102 top_builddir=`pwd`
1103
1104 echo "$as_me:1104: checking for egrep" >&5
1105 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1106 if test "${ac_cv_prog_egrep+set}" = set; then
1107   echo $ECHO_N "(cached) $ECHO_C" >&6
1108 else
1109   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1110     then ac_cv_prog_egrep='grep -E'
1111     else ac_cv_prog_egrep='egrep'
1112     fi
1113 fi
1114 echo "$as_me:1114: result: $ac_cv_prog_egrep" >&5
1115 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1116  EGREP=$ac_cv_prog_egrep
1117
1118 test -z "$EGREP" && { { echo "$as_me:1118: error: No egrep program found" >&5
1119 echo "$as_me: error: No egrep program found" >&2;}
1120    { (exit 1); exit 1; }; }
1121
1122 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1125 cf_cv_abi_version=${NCURSES_MAJOR}
1126 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1127 cf_cv_timestamp=`date`
1128 echo "$as_me:1128: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1129 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1130
1131 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1132
1133 # Check whether --with-rel-version or --without-rel-version was given.
1134 if test "${with_rel_version+set}" = set; then
1135   withval="$with_rel_version"
1136   { echo "$as_me:1136: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1137 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1138  cf_cv_rel_version=$withval
1139 fi;
1140
1141  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1142  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1143
1144 if test -n "$NCURSES_MAJOR" ; then
1145   case $NCURSES_MAJOR in #(vi
1146   [0-9]*) #(vi
1147         ;;
1148   *)
1149         { { echo "$as_me:1149: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1150 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1151    { (exit 1); exit 1; }; }
1152         ;;
1153   esac
1154 else
1155   { { echo "$as_me:1155: error: Release major-version value is empty" >&5
1156 echo "$as_me: error: Release major-version value is empty" >&2;}
1157    { (exit 1); exit 1; }; }
1158 fi
1159
1160 if test -n "$NCURSES_MINOR" ; then
1161   case $NCURSES_MINOR in #(vi
1162   [0-9]*) #(vi
1163         ;;
1164   *)
1165         { { echo "$as_me:1165: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1166 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1167    { (exit 1); exit 1; }; }
1168         ;;
1169   esac
1170 else
1171   { { echo "$as_me:1171: error: Release minor-version value is empty" >&5
1172 echo "$as_me: error: Release minor-version value is empty" >&2;}
1173    { (exit 1); exit 1; }; }
1174 fi
1175
1176 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1177
1178 # Check whether --with-abi-version or --without-abi-version was given.
1179 if test "${with_abi_version+set}" = set; then
1180   withval="$with_abi_version"
1181   { echo "$as_me:1181: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1182 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1183  cf_cv_abi_version=$withval
1184 fi;
1185
1186 if test -n "$cf_cv_abi_version" ; then
1187   case $cf_cv_abi_version in #(vi
1188   [0-9]*) #(vi
1189         ;;
1190   *)
1191         { { echo "$as_me:1191: error: ABI version is not a number: $cf_cv_abi_version" >&5
1192 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1193    { (exit 1); exit 1; }; }
1194         ;;
1195   esac
1196 else
1197   { { echo "$as_me:1197: error: ABI version value is empty" >&5
1198 echo "$as_me: error: ABI version value is empty" >&2;}
1199    { (exit 1); exit 1; }; }
1200 fi
1201
1202 ac_aux_dir=
1203 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1204   if test -f $ac_dir/install-sh; then
1205     ac_aux_dir=$ac_dir
1206     ac_install_sh="$ac_aux_dir/install-sh -c"
1207     break
1208   elif test -f $ac_dir/install.sh; then
1209     ac_aux_dir=$ac_dir
1210     ac_install_sh="$ac_aux_dir/install.sh -c"
1211     break
1212   elif test -f $ac_dir/shtool; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/shtool install -c"
1215     break
1216   fi
1217 done
1218 if test -z "$ac_aux_dir"; then
1219   { { echo "$as_me:1219: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1220 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1221    { (exit 1); exit 1; }; }
1222 fi
1223 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1224 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1225 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1226
1227 # Make sure we can run config.sub.
1228 $ac_config_sub sun4 >/dev/null 2>&1 ||
1229   { { echo "$as_me:1229: error: cannot run $ac_config_sub" >&5
1230 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1231    { (exit 1); exit 1; }; }
1232
1233 echo "$as_me:1233: checking build system type" >&5
1234 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1235 if test "${ac_cv_build+set}" = set; then
1236   echo $ECHO_N "(cached) $ECHO_C" >&6
1237 else
1238   ac_cv_build_alias=$build_alias
1239 test -z "$ac_cv_build_alias" &&
1240   ac_cv_build_alias=`$ac_config_guess`
1241 test -z "$ac_cv_build_alias" &&
1242   { { echo "$as_me:1242: error: cannot guess build type; you must specify one" >&5
1243 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1244    { (exit 1); exit 1; }; }
1245 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1246   { { echo "$as_me:1246: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1247 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1248    { (exit 1); exit 1; }; }
1249
1250 fi
1251 echo "$as_me:1251: result: $ac_cv_build" >&5
1252 echo "${ECHO_T}$ac_cv_build" >&6
1253 build=$ac_cv_build
1254 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1255 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1256 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1257
1258 echo "$as_me:1258: checking host system type" >&5
1259 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1260 if test "${ac_cv_host+set}" = set; then
1261   echo $ECHO_N "(cached) $ECHO_C" >&6
1262 else
1263   ac_cv_host_alias=$host_alias
1264 test -z "$ac_cv_host_alias" &&
1265   ac_cv_host_alias=$ac_cv_build_alias
1266 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1267   { { echo "$as_me:1267: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1268 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1269    { (exit 1); exit 1; }; }
1270
1271 fi
1272 echo "$as_me:1272: result: $ac_cv_host" >&5
1273 echo "${ECHO_T}$ac_cv_host" >&6
1274 host=$ac_cv_host
1275 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1276 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1277 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1278
1279 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1280         echo "$as_me:1280: checking target system type" >&5
1281 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1282 if test "${ac_cv_target+set}" = set; then
1283   echo $ECHO_N "(cached) $ECHO_C" >&6
1284 else
1285   ac_cv_target_alias=$target_alias
1286 test "x$ac_cv_target_alias" = "x" &&
1287   ac_cv_target_alias=$ac_cv_host_alias
1288 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1289   { { echo "$as_me:1289: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1290 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1291    { (exit 1); exit 1; }; }
1292
1293 fi
1294 echo "$as_me:1294: result: $ac_cv_target" >&5
1295 echo "${ECHO_T}$ac_cv_target" >&6
1296 target=$ac_cv_target
1297 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1298 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1299 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1300
1301 # The aliases save the names the user supplied, while $host etc.
1302 # will get canonicalized.
1303 test -n "$target_alias" &&
1304   test "$program_prefix$program_suffix$program_transform_name" = \
1305     NONENONEs,x,x, &&
1306   program_prefix=${target_alias}-
1307         system_name="$host_os"
1308 else
1309         system_name="`(uname -s -r) 2>/dev/null`"
1310         if test -z "$system_name" ; then
1311                 system_name="`(hostname) 2>/dev/null`"
1312         fi
1313 fi
1314 test -n "$system_name" && cat >>confdefs.h <<EOF
1315 #define SYSTEM_NAME "$system_name"
1316 EOF
1317
1318 if test "${cf_cv_system_name+set}" = set; then
1319   echo $ECHO_N "(cached) $ECHO_C" >&6
1320 else
1321   cf_cv_system_name="$system_name"
1322 fi
1323
1324 test -z "$system_name" && system_name="$cf_cv_system_name"
1325 test -n "$cf_cv_system_name" && echo "$as_me:1325: result: Configuring for $cf_cv_system_name" >&5
1326 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1327
1328 if test ".$system_name" != ".$cf_cv_system_name" ; then
1329         echo "$as_me:1329: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1330 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1331         { { echo "$as_me:1331: error: \"Please remove config.cache and try again.\"" >&5
1332 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1333    { (exit 1); exit 1; }; }
1334 fi
1335
1336 # Check whether --with-system-type or --without-system-type was given.
1337 if test "${with_system_type+set}" = set; then
1338   withval="$with_system_type"
1339   { echo "$as_me:1339: WARNING: overriding system type to $withval" >&5
1340 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1341  cf_cv_system_name=$withval
1342 fi;
1343
1344 ###     Save the given $CFLAGS to allow user-override.
1345 cf_user_CFLAGS="$CFLAGS"
1346
1347 ###     Default install-location
1348
1349 echo "$as_me:1349: checking for prefix" >&5
1350 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1351 if test "x$prefix" = "xNONE" ; then
1352         case "$cf_cv_system_name" in
1353                 # non-vendor systems don't have a conflict
1354         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1355                 prefix=/usr
1356                 ;;
1357         *)      prefix=$ac_default_prefix
1358                 ;;
1359         esac
1360 fi
1361 echo "$as_me:1361: result: $prefix" >&5
1362 echo "${ECHO_T}$prefix" >&6
1363
1364 if test "x$prefix" = "xNONE" ; then
1365 echo "$as_me:1365: checking for default include-directory" >&5
1366 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1367 test -n "$verbose" && echo 1>&6
1368 for cf_symbol in \
1369         $includedir \
1370         $includedir/ncurses \
1371         $prefix/include \
1372         $prefix/include/ncurses \
1373         /usr/local/include \
1374         /usr/local/include/ncurses \
1375         /usr/include \
1376         /usr/include/ncurses
1377 do
1378         cf_dir=`eval echo $cf_symbol`
1379         if test -f $cf_dir/curses.h ; then
1380         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1381                 includedir="$cf_symbol"
1382                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1383                 break
1384         fi
1385         fi
1386         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1387 done
1388 echo "$as_me:1388: result: $includedir" >&5
1389 echo "${ECHO_T}$includedir" >&6
1390 fi
1391
1392 ###     Checks for programs.
1393 ac_ext=c
1394 ac_cpp='$CPP $CPPFLAGS'
1395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1398 ac_main_return=return
1399 if test -n "$ac_tool_prefix"; then
1400   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1401 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1402 echo "$as_me:1402: checking for $ac_word" >&5
1403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1404 if test "${ac_cv_prog_CC+set}" = set; then
1405   echo $ECHO_N "(cached) $ECHO_C" >&6
1406 else
1407   if test -n "$CC"; then
1408   ac_cv_prog_CC="$CC" # Let the user override the test.
1409 else
1410   ac_save_IFS=$IFS; IFS=$ac_path_separator
1411 ac_dummy="$PATH"
1412 for ac_dir in $ac_dummy; do
1413   IFS=$ac_save_IFS
1414   test -z "$ac_dir" && ac_dir=.
1415   $as_executable_p "$ac_dir/$ac_word" || continue
1416 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1417 echo "$as_me:1417: found $ac_dir/$ac_word" >&5
1418 break
1419 done
1420
1421 fi
1422 fi
1423 CC=$ac_cv_prog_CC
1424 if test -n "$CC"; then
1425   echo "$as_me:1425: result: $CC" >&5
1426 echo "${ECHO_T}$CC" >&6
1427 else
1428   echo "$as_me:1428: result: no" >&5
1429 echo "${ECHO_T}no" >&6
1430 fi
1431
1432 fi
1433 if test -z "$ac_cv_prog_CC"; then
1434   ac_ct_CC=$CC
1435   # Extract the first word of "gcc", so it can be a program name with args.
1436 set dummy gcc; ac_word=$2
1437 echo "$as_me:1437: checking for $ac_word" >&5
1438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1439 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1440   echo $ECHO_N "(cached) $ECHO_C" >&6
1441 else
1442   if test -n "$ac_ct_CC"; then
1443   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1444 else
1445   ac_save_IFS=$IFS; IFS=$ac_path_separator
1446 ac_dummy="$PATH"
1447 for ac_dir in $ac_dummy; do
1448   IFS=$ac_save_IFS
1449   test -z "$ac_dir" && ac_dir=.
1450   $as_executable_p "$ac_dir/$ac_word" || continue
1451 ac_cv_prog_ac_ct_CC="gcc"
1452 echo "$as_me:1452: found $ac_dir/$ac_word" >&5
1453 break
1454 done
1455
1456 fi
1457 fi
1458 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1459 if test -n "$ac_ct_CC"; then
1460   echo "$as_me:1460: result: $ac_ct_CC" >&5
1461 echo "${ECHO_T}$ac_ct_CC" >&6
1462 else
1463   echo "$as_me:1463: result: no" >&5
1464 echo "${ECHO_T}no" >&6
1465 fi
1466
1467   CC=$ac_ct_CC
1468 else
1469   CC="$ac_cv_prog_CC"
1470 fi
1471
1472 if test -z "$CC"; then
1473   if test -n "$ac_tool_prefix"; then
1474   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1475 set dummy ${ac_tool_prefix}cc; ac_word=$2
1476 echo "$as_me:1476: checking for $ac_word" >&5
1477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1478 if test "${ac_cv_prog_CC+set}" = set; then
1479   echo $ECHO_N "(cached) $ECHO_C" >&6
1480 else
1481   if test -n "$CC"; then
1482   ac_cv_prog_CC="$CC" # Let the user override the test.
1483 else
1484   ac_save_IFS=$IFS; IFS=$ac_path_separator
1485 ac_dummy="$PATH"
1486 for ac_dir in $ac_dummy; do
1487   IFS=$ac_save_IFS
1488   test -z "$ac_dir" && ac_dir=.
1489   $as_executable_p "$ac_dir/$ac_word" || continue
1490 ac_cv_prog_CC="${ac_tool_prefix}cc"
1491 echo "$as_me:1491: found $ac_dir/$ac_word" >&5
1492 break
1493 done
1494
1495 fi
1496 fi
1497 CC=$ac_cv_prog_CC
1498 if test -n "$CC"; then
1499   echo "$as_me:1499: result: $CC" >&5
1500 echo "${ECHO_T}$CC" >&6
1501 else
1502   echo "$as_me:1502: result: no" >&5
1503 echo "${ECHO_T}no" >&6
1504 fi
1505
1506 fi
1507 if test -z "$ac_cv_prog_CC"; then
1508   ac_ct_CC=$CC
1509   # Extract the first word of "cc", so it can be a program name with args.
1510 set dummy cc; ac_word=$2
1511 echo "$as_me:1511: checking for $ac_word" >&5
1512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1513 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1514   echo $ECHO_N "(cached) $ECHO_C" >&6
1515 else
1516   if test -n "$ac_ct_CC"; then
1517   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1518 else
1519   ac_save_IFS=$IFS; IFS=$ac_path_separator
1520 ac_dummy="$PATH"
1521 for ac_dir in $ac_dummy; do
1522   IFS=$ac_save_IFS
1523   test -z "$ac_dir" && ac_dir=.
1524   $as_executable_p "$ac_dir/$ac_word" || continue
1525 ac_cv_prog_ac_ct_CC="cc"
1526 echo "$as_me:1526: found $ac_dir/$ac_word" >&5
1527 break
1528 done
1529
1530 fi
1531 fi
1532 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1533 if test -n "$ac_ct_CC"; then
1534   echo "$as_me:1534: result: $ac_ct_CC" >&5
1535 echo "${ECHO_T}$ac_ct_CC" >&6
1536 else
1537   echo "$as_me:1537: result: no" >&5
1538 echo "${ECHO_T}no" >&6
1539 fi
1540
1541   CC=$ac_ct_CC
1542 else
1543   CC="$ac_cv_prog_CC"
1544 fi
1545
1546 fi
1547 if test -z "$CC"; then
1548   # Extract the first word of "cc", so it can be a program name with args.
1549 set dummy cc; ac_word=$2
1550 echo "$as_me:1550: checking for $ac_word" >&5
1551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1552 if test "${ac_cv_prog_CC+set}" = set; then
1553   echo $ECHO_N "(cached) $ECHO_C" >&6
1554 else
1555   if test -n "$CC"; then
1556   ac_cv_prog_CC="$CC" # Let the user override the test.
1557 else
1558   ac_prog_rejected=no
1559   ac_save_IFS=$IFS; IFS=$ac_path_separator
1560 ac_dummy="$PATH"
1561 for ac_dir in $ac_dummy; do
1562   IFS=$ac_save_IFS
1563   test -z "$ac_dir" && ac_dir=.
1564   $as_executable_p "$ac_dir/$ac_word" || continue
1565 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1566   ac_prog_rejected=yes
1567   continue
1568 fi
1569 ac_cv_prog_CC="cc"
1570 echo "$as_me:1570: found $ac_dir/$ac_word" >&5
1571 break
1572 done
1573
1574 if test $ac_prog_rejected = yes; then
1575   # We found a bogon in the path, so make sure we never use it.
1576   set dummy $ac_cv_prog_CC
1577   shift
1578   if test $# != 0; then
1579     # We chose a different compiler from the bogus one.
1580     # However, it has the same basename, so the bogon will be chosen
1581     # first if we set CC to just the basename; use the full file name.
1582     shift
1583     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1584     shift
1585     ac_cv_prog_CC="$@"
1586   fi
1587 fi
1588 fi
1589 fi
1590 CC=$ac_cv_prog_CC
1591 if test -n "$CC"; then
1592   echo "$as_me:1592: result: $CC" >&5
1593 echo "${ECHO_T}$CC" >&6
1594 else
1595   echo "$as_me:1595: result: no" >&5
1596 echo "${ECHO_T}no" >&6
1597 fi
1598
1599 fi
1600 if test -z "$CC"; then
1601   if test -n "$ac_tool_prefix"; then
1602   for ac_prog in cl
1603   do
1604     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1605 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1606 echo "$as_me:1606: checking for $ac_word" >&5
1607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608 if test "${ac_cv_prog_CC+set}" = set; then
1609   echo $ECHO_N "(cached) $ECHO_C" >&6
1610 else
1611   if test -n "$CC"; then
1612   ac_cv_prog_CC="$CC" # Let the user override the test.
1613 else
1614   ac_save_IFS=$IFS; IFS=$ac_path_separator
1615 ac_dummy="$PATH"
1616 for ac_dir in $ac_dummy; do
1617   IFS=$ac_save_IFS
1618   test -z "$ac_dir" && ac_dir=.
1619   $as_executable_p "$ac_dir/$ac_word" || continue
1620 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1621 echo "$as_me:1621: found $ac_dir/$ac_word" >&5
1622 break
1623 done
1624
1625 fi
1626 fi
1627 CC=$ac_cv_prog_CC
1628 if test -n "$CC"; then
1629   echo "$as_me:1629: result: $CC" >&5
1630 echo "${ECHO_T}$CC" >&6
1631 else
1632   echo "$as_me:1632: result: no" >&5
1633 echo "${ECHO_T}no" >&6
1634 fi
1635
1636     test -n "$CC" && break
1637   done
1638 fi
1639 if test -z "$CC"; then
1640   ac_ct_CC=$CC
1641   for ac_prog in cl
1642 do
1643   # Extract the first word of "$ac_prog", so it can be a program name with args.
1644 set dummy $ac_prog; ac_word=$2
1645 echo "$as_me:1645: checking for $ac_word" >&5
1646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1647 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1648   echo $ECHO_N "(cached) $ECHO_C" >&6
1649 else
1650   if test -n "$ac_ct_CC"; then
1651   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1652 else
1653   ac_save_IFS=$IFS; IFS=$ac_path_separator
1654 ac_dummy="$PATH"
1655 for ac_dir in $ac_dummy; do
1656   IFS=$ac_save_IFS
1657   test -z "$ac_dir" && ac_dir=.
1658   $as_executable_p "$ac_dir/$ac_word" || continue
1659 ac_cv_prog_ac_ct_CC="$ac_prog"
1660 echo "$as_me:1660: found $ac_dir/$ac_word" >&5
1661 break
1662 done
1663
1664 fi
1665 fi
1666 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1667 if test -n "$ac_ct_CC"; then
1668   echo "$as_me:1668: result: $ac_ct_CC" >&5
1669 echo "${ECHO_T}$ac_ct_CC" >&6
1670 else
1671   echo "$as_me:1671: result: no" >&5
1672 echo "${ECHO_T}no" >&6
1673 fi
1674
1675   test -n "$ac_ct_CC" && break
1676 done
1677
1678   CC=$ac_ct_CC
1679 fi
1680
1681 fi
1682
1683 test -z "$CC" && { { echo "$as_me:1683: error: no acceptable cc found in \$PATH" >&5
1684 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1685    { (exit 1); exit 1; }; }
1686
1687 # Provide some information about the compiler.
1688 echo "$as_me:1688:" \
1689      "checking for C compiler version" >&5
1690 ac_compiler=`set X $ac_compile; echo $2`
1691 { (eval echo "$as_me:1691: \"$ac_compiler --version </dev/null >&5\"") >&5
1692   (eval $ac_compiler --version </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 { (eval echo "$as_me:1701: \"$ac_compiler -V </dev/null >&5\"") >&5
1702   (eval $ac_compiler -V </dev/null >&5) 2>&5
1703   ac_status=$?
1704   echo "$as_me:1704: \$? = $ac_status" >&5
1705   (exit $ac_status); }
1706
1707 cat >conftest.$ac_ext <<_ACEOF
1708 #line 1708 "configure"
1709 #include "confdefs.h"
1710
1711 int
1712 main ()
1713 {
1714
1715   ;
1716   return 0;
1717 }
1718 _ACEOF
1719 ac_clean_files_save=$ac_clean_files
1720 ac_clean_files="$ac_clean_files a.out a.exe"
1721 # Try to create an executable without -o first, disregard a.out.
1722 # It will help us diagnose broken compilers, and finding out an intuition
1723 # of exeext.
1724 echo "$as_me:1724: checking for C compiler default output" >&5
1725 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1726 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1727 if { (eval echo "$as_me:1727: \"$ac_link_default\"") >&5
1728   (eval $ac_link_default) 2>&5
1729   ac_status=$?
1730   echo "$as_me:1730: \$? = $ac_status" >&5
1731   (exit $ac_status); }; then
1732   # Find the output, starting from the most likely.  This scheme is
1733 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1734 # resort.
1735 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1736                 ls a.out conftest 2>/dev/null;
1737                 ls a.* conftest.* 2>/dev/null`; do
1738   case $ac_file in
1739     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1740     a.out ) # We found the default executable, but exeext='' is most
1741             # certainly right.
1742             break;;
1743     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1744           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1745           export ac_cv_exeext
1746           break;;
1747     * ) break;;
1748   esac
1749 done
1750 else
1751   echo "$as_me: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 { { echo "$as_me:1753: error: C compiler cannot create executables" >&5
1754 echo "$as_me: error: C compiler cannot create executables" >&2;}
1755    { (exit 77); exit 77; }; }
1756 fi
1757
1758 ac_exeext=$ac_cv_exeext
1759 echo "$as_me:1759: result: $ac_file" >&5
1760 echo "${ECHO_T}$ac_file" >&6
1761
1762 # Check the compiler produces executables we can run.  If not, either
1763 # the compiler is broken, or we cross compile.
1764 echo "$as_me:1764: checking whether the C compiler works" >&5
1765 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1766 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1767 # If not cross compiling, check that we can run a simple program.
1768 if test "$cross_compiling" != yes; then
1769   if { ac_try='./$ac_file'
1770   { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1771   (eval $ac_try) 2>&5
1772   ac_status=$?
1773   echo "$as_me:1773: \$? = $ac_status" >&5
1774   (exit $ac_status); }; }; then
1775     cross_compiling=no
1776   else
1777     if test "$cross_compiling" = maybe; then
1778         cross_compiling=yes
1779     else
1780         { { echo "$as_me:1780: error: cannot run C compiled programs.
1781 If you meant to cross compile, use \`--host'." >&5
1782 echo "$as_me: error: cannot run C compiled programs.
1783 If you meant to cross compile, use \`--host'." >&2;}
1784    { (exit 1); exit 1; }; }
1785     fi
1786   fi
1787 fi
1788 echo "$as_me:1788: result: yes" >&5
1789 echo "${ECHO_T}yes" >&6
1790
1791 rm -f a.out a.exe conftest$ac_cv_exeext
1792 ac_clean_files=$ac_clean_files_save
1793 # Check the compiler produces executables we can run.  If not, either
1794 # the compiler is broken, or we cross compile.
1795 echo "$as_me:1795: checking whether we are cross compiling" >&5
1796 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1797 echo "$as_me:1797: result: $cross_compiling" >&5
1798 echo "${ECHO_T}$cross_compiling" >&6
1799
1800 echo "$as_me:1800: checking for executable suffix" >&5
1801 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1802 if { (eval echo "$as_me:1802: \"$ac_link\"") >&5
1803   (eval $ac_link) 2>&5
1804   ac_status=$?
1805   echo "$as_me:1805: \$? = $ac_status" >&5
1806   (exit $ac_status); }; then
1807   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1808 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1809 # work properly (i.e., refer to `conftest.exe'), while it won't with
1810 # `rm'.
1811 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1812   case $ac_file in
1813     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1814     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815           export ac_cv_exeext
1816           break;;
1817     * ) break;;
1818   esac
1819 done
1820 else
1821   { { echo "$as_me:1821: error: cannot compute EXEEXT: cannot compile and link" >&5
1822 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1823    { (exit 1); exit 1; }; }
1824 fi
1825
1826 rm -f conftest$ac_cv_exeext
1827 echo "$as_me:1827: result: $ac_cv_exeext" >&5
1828 echo "${ECHO_T}$ac_cv_exeext" >&6
1829
1830 rm -f conftest.$ac_ext
1831 EXEEXT=$ac_cv_exeext
1832 ac_exeext=$EXEEXT
1833 echo "$as_me:1833: checking for object suffix" >&5
1834 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1835 if test "${ac_cv_objext+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   cat >conftest.$ac_ext <<_ACEOF
1839 #line 1839 "configure"
1840 #include "confdefs.h"
1841
1842 int
1843 main ()
1844 {
1845
1846   ;
1847   return 0;
1848 }
1849 _ACEOF
1850 rm -f conftest.o conftest.obj
1851 if { (eval echo "$as_me:1851: \"$ac_compile\"") >&5
1852   (eval $ac_compile) 2>&5
1853   ac_status=$?
1854   echo "$as_me:1854: \$? = $ac_status" >&5
1855   (exit $ac_status); }; then
1856   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1857   case $ac_file in
1858     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1859     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1860        break;;
1861   esac
1862 done
1863 else
1864   echo "$as_me: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1866 { { echo "$as_me:1866: error: cannot compute OBJEXT: cannot compile" >&5
1867 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1868    { (exit 1); exit 1; }; }
1869 fi
1870
1871 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1872 fi
1873 echo "$as_me:1873: result: $ac_cv_objext" >&5
1874 echo "${ECHO_T}$ac_cv_objext" >&6
1875 OBJEXT=$ac_cv_objext
1876 ac_objext=$OBJEXT
1877 echo "$as_me:1877: checking whether we are using the GNU C compiler" >&5
1878 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1879 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1880   echo $ECHO_N "(cached) $ECHO_C" >&6
1881 else
1882   cat >conftest.$ac_ext <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1885
1886 int
1887 main ()
1888 {
1889 #ifndef __GNUC__
1890        choke me
1891 #endif
1892
1893   ;
1894   return 0;
1895 }
1896 _ACEOF
1897 rm -f conftest.$ac_objext
1898 if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
1899   (eval $ac_compile) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); } &&
1903          { ac_try='test -s conftest.$ac_objext'
1904   { (eval echo "$as_me:1904: \"$ac_try\"") >&5
1905   (eval $ac_try) 2>&5
1906   ac_status=$?
1907   echo "$as_me:1907: \$? = $ac_status" >&5
1908   (exit $ac_status); }; }; then
1909   ac_compiler_gnu=yes
1910 else
1911   echo "$as_me: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 ac_compiler_gnu=no
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1917
1918 fi
1919 echo "$as_me:1919: result: $ac_cv_c_compiler_gnu" >&5
1920 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1921 GCC=`test $ac_compiler_gnu = yes && echo yes`
1922 ac_test_CFLAGS=${CFLAGS+set}
1923 ac_save_CFLAGS=$CFLAGS
1924 CFLAGS="-g"
1925 echo "$as_me:1925: checking whether $CC accepts -g" >&5
1926 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1927 if test "${ac_cv_prog_cc_g+set}" = set; then
1928   echo $ECHO_N "(cached) $ECHO_C" >&6
1929 else
1930   cat >conftest.$ac_ext <<_ACEOF
1931 #line 1931 "configure"
1932 #include "confdefs.h"
1933
1934 int
1935 main ()
1936 {
1937
1938   ;
1939   return 0;
1940 }
1941 _ACEOF
1942 rm -f conftest.$ac_objext
1943 if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
1944   (eval $ac_compile) 2>&5
1945   ac_status=$?
1946   echo "$as_me:1946: \$? = $ac_status" >&5
1947   (exit $ac_status); } &&
1948          { ac_try='test -s conftest.$ac_objext'
1949   { (eval echo "$as_me:1949: \"$ac_try\"") >&5
1950   (eval $ac_try) 2>&5
1951   ac_status=$?
1952   echo "$as_me:1952: \$? = $ac_status" >&5
1953   (exit $ac_status); }; }; then
1954   ac_cv_prog_cc_g=yes
1955 else
1956   echo "$as_me: failed program was:" >&5
1957 cat conftest.$ac_ext >&5
1958 ac_cv_prog_cc_g=no
1959 fi
1960 rm -f conftest.$ac_objext conftest.$ac_ext
1961 fi
1962 echo "$as_me:1962: result: $ac_cv_prog_cc_g" >&5
1963 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1964 if test "$ac_test_CFLAGS" = set; then
1965   CFLAGS=$ac_save_CFLAGS
1966 elif test $ac_cv_prog_cc_g = yes; then
1967   if test "$GCC" = yes; then
1968     CFLAGS="-g -O2"
1969   else
1970     CFLAGS="-g"
1971   fi
1972 else
1973   if test "$GCC" = yes; then
1974     CFLAGS="-O2"
1975   else
1976     CFLAGS=
1977   fi
1978 fi
1979 # Some people use a C++ compiler to compile C.  Since we use `exit',
1980 # in C++ we need to declare it.  In case someone uses the same compiler
1981 # for both compiling C and C++ we need to have the C++ compiler decide
1982 # the declaration of exit, since it's the most demanding environment.
1983 cat >conftest.$ac_ext <<_ACEOF
1984 #ifndef __cplusplus
1985   choke me
1986 #endif
1987 _ACEOF
1988 rm -f conftest.$ac_objext
1989 if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990   (eval $ac_compile) 2>&5
1991   ac_status=$?
1992   echo "$as_me:1992: \$? = $ac_status" >&5
1993   (exit $ac_status); } &&
1994          { ac_try='test -s conftest.$ac_objext'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit $ac_status); }; }; then
2000   for ac_declaration in \
2001    ''\
2002    '#include <stdlib.h>' \
2003    'extern "C" void std::exit (int) throw (); using std::exit;' \
2004    'extern "C" void std::exit (int); using std::exit;' \
2005    'extern "C" void exit (int) throw ();' \
2006    'extern "C" void exit (int);' \
2007    'void exit (int);'
2008 do
2009   cat >conftest.$ac_ext <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012 #include <stdlib.h>
2013 $ac_declaration
2014 int
2015 main ()
2016 {
2017 exit (42);
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.$ac_objext
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit $ac_status); } &&
2028          { ac_try='test -s conftest.$ac_objext'
2029   { (eval echo "$as_me:2029: \"$ac_try\"") >&5
2030   (eval $ac_try) 2>&5
2031   ac_status=$?
2032   echo "$as_me:2032: \$? = $ac_status" >&5
2033   (exit $ac_status); }; }; then
2034   :
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
2038 continue
2039 fi
2040 rm -f conftest.$ac_objext conftest.$ac_ext
2041   cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 $ac_declaration
2045 int
2046 main ()
2047 {
2048 exit (42);
2049   ;
2050   return 0;
2051 }
2052 _ACEOF
2053 rm -f conftest.$ac_objext
2054 if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5
2055   (eval $ac_compile) 2>&5
2056   ac_status=$?
2057   echo "$as_me:2057: \$? = $ac_status" >&5
2058   (exit $ac_status); } &&
2059          { ac_try='test -s conftest.$ac_objext'
2060   { (eval echo "$as_me:2060: \"$ac_try\"") >&5
2061   (eval $ac_try) 2>&5
2062   ac_status=$?
2063   echo "$as_me:2063: \$? = $ac_status" >&5
2064   (exit $ac_status); }; }; then
2065   break
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 done
2072 rm -f conftest*
2073 if test -n "$ac_declaration"; then
2074   echo '#ifdef __cplusplus' >>confdefs.h
2075   echo $ac_declaration      >>confdefs.h
2076   echo '#endif'             >>confdefs.h
2077 fi
2078
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 ac_ext=c
2085 ac_cpp='$CPP $CPPFLAGS'
2086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2089 ac_main_return=return
2090
2091 GCC_VERSION=none
2092 if test "$GCC" = yes ; then
2093         echo "$as_me:2093: checking version of $CC" >&5
2094 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2095         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2096         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2097         echo "$as_me:2097: result: $GCC_VERSION" >&5
2098 echo "${ECHO_T}$GCC_VERSION" >&6
2099 fi
2100
2101 ac_ext=c
2102 ac_cpp='$CPP $CPPFLAGS'
2103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2106 ac_main_return=return
2107 echo "$as_me:2107: checking how to run the C preprocessor" >&5
2108 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2109 # On Suns, sometimes $CPP names a directory.
2110 if test -n "$CPP" && test -d "$CPP"; then
2111   CPP=
2112 fi
2113 if test -z "$CPP"; then
2114   if test "${ac_cv_prog_CPP+set}" = set; then
2115   echo $ECHO_N "(cached) $ECHO_C" >&6
2116 else
2117       # Double quotes because CPP needs to be expanded
2118     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2119     do
2120       ac_preproc_ok=false
2121 for ac_c_preproc_warn_flag in '' yes
2122 do
2123   # Use a header file that comes with gcc, so configuring glibc
2124   # with a fresh cross-compiler works.
2125   # On the NeXT, cc -E runs the code through the compiler's parser,
2126   # not just through cpp. "Syntax error" is here to catch this case.
2127   cat >conftest.$ac_ext <<_ACEOF
2128 #line 2128 "configure"
2129 #include "confdefs.h"
2130 #include <assert.h>
2131                      Syntax error
2132 _ACEOF
2133 if { (eval echo "$as_me:2133: \"$ac_cpp conftest.$ac_ext\"") >&5
2134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2135   ac_status=$?
2136   egrep -v '^ *\+' conftest.er1 >conftest.err
2137   rm -f conftest.er1
2138   cat conftest.err >&5
2139   echo "$as_me:2139: \$? = $ac_status" >&5
2140   (exit $ac_status); } >/dev/null; then
2141   if test -s conftest.err; then
2142     ac_cpp_err=$ac_c_preproc_warn_flag
2143   else
2144     ac_cpp_err=
2145   fi
2146 else
2147   ac_cpp_err=yes
2148 fi
2149 if test -z "$ac_cpp_err"; then
2150   :
2151 else
2152   echo "$as_me: failed program was:" >&5
2153   cat conftest.$ac_ext >&5
2154   # Broken: fails on valid input.
2155 continue
2156 fi
2157 rm -f conftest.err conftest.$ac_ext
2158
2159   # OK, works on sane cases.  Now check whether non-existent headers
2160   # can be detected and how.
2161   cat >conftest.$ac_ext <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164 #include <ac_nonexistent.h>
2165 _ACEOF
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168   ac_status=$?
2169   egrep -v '^ *\+' conftest.er1 >conftest.err
2170   rm -f conftest.er1
2171   cat conftest.err >&5
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit $ac_status); } >/dev/null; then
2174   if test -s conftest.err; then
2175     ac_cpp_err=$ac_c_preproc_warn_flag
2176   else
2177     ac_cpp_err=
2178   fi
2179 else
2180   ac_cpp_err=yes
2181 fi
2182 if test -z "$ac_cpp_err"; then
2183   # Broken: success on invalid input.
2184 continue
2185 else
2186   echo "$as_me: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   # Passes both tests.
2189 ac_preproc_ok=:
2190 break
2191 fi
2192 rm -f conftest.err conftest.$ac_ext
2193
2194 done
2195 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2196 rm -f conftest.err conftest.$ac_ext
2197 if $ac_preproc_ok; then
2198   break
2199 fi
2200
2201     done
2202     ac_cv_prog_CPP=$CPP
2203
2204 fi
2205   CPP=$ac_cv_prog_CPP
2206 else
2207   ac_cv_prog_CPP=$CPP
2208 fi
2209 echo "$as_me:2209: result: $CPP" >&5
2210 echo "${ECHO_T}$CPP" >&6
2211 ac_preproc_ok=false
2212 for ac_c_preproc_warn_flag in '' yes
2213 do
2214   # Use a header file that comes with gcc, so configuring glibc
2215   # with a fresh cross-compiler works.
2216   # On the NeXT, cc -E runs the code through the compiler's parser,
2217   # not just through cpp. "Syntax error" is here to catch this case.
2218   cat >conftest.$ac_ext <<_ACEOF
2219 #line 2219 "configure"
2220 #include "confdefs.h"
2221 #include <assert.h>
2222                      Syntax error
2223 _ACEOF
2224 if { (eval echo "$as_me:2224: \"$ac_cpp conftest.$ac_ext\"") >&5
2225   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2226   ac_status=$?
2227   egrep -v '^ *\+' conftest.er1 >conftest.err
2228   rm -f conftest.er1
2229   cat conftest.err >&5
2230   echo "$as_me:2230: \$? = $ac_status" >&5
2231   (exit $ac_status); } >/dev/null; then
2232   if test -s conftest.err; then
2233     ac_cpp_err=$ac_c_preproc_warn_flag
2234   else
2235     ac_cpp_err=
2236   fi
2237 else
2238   ac_cpp_err=yes
2239 fi
2240 if test -z "$ac_cpp_err"; then
2241   :
2242 else
2243   echo "$as_me: failed program was:" >&5
2244   cat conftest.$ac_ext >&5
2245   # Broken: fails on valid input.
2246 continue
2247 fi
2248 rm -f conftest.err conftest.$ac_ext
2249
2250   # OK, works on sane cases.  Now check whether non-existent headers
2251   # can be detected and how.
2252   cat >conftest.$ac_ext <<_ACEOF
2253 #line 2253 "configure"
2254 #include "confdefs.h"
2255 #include <ac_nonexistent.h>
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   # Broken: success on invalid input.
2275 continue
2276 else
2277   echo "$as_me: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   # Passes both tests.
2280 ac_preproc_ok=:
2281 break
2282 fi
2283 rm -f conftest.err conftest.$ac_ext
2284
2285 done
2286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2287 rm -f conftest.err conftest.$ac_ext
2288 if $ac_preproc_ok; then
2289   :
2290 else
2291   { { echo "$as_me:2291: error: C preprocessor \"$CPP\" fails sanity check" >&5
2292 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2293    { (exit 1); exit 1; }; }
2294 fi
2295
2296 ac_ext=c
2297 ac_cpp='$CPP $CPPFLAGS'
2298 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2299 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2300 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2301 ac_main_return=return
2302
2303 if test $ac_cv_c_compiler_gnu = yes; then
2304     echo "$as_me:2304: checking whether $CC needs -traditional" >&5
2305 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2306 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2307   echo $ECHO_N "(cached) $ECHO_C" >&6
2308 else
2309     ac_pattern="Autoconf.*'x'"
2310   cat >conftest.$ac_ext <<_ACEOF
2311 #line 2311 "configure"
2312 #include "confdefs.h"
2313 #include <sgtty.h>
2314 int Autoconf = TIOCGETP;
2315 _ACEOF
2316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2317   egrep "$ac_pattern" >/dev/null 2>&1; then
2318   ac_cv_prog_gcc_traditional=yes
2319 else
2320   ac_cv_prog_gcc_traditional=no
2321 fi
2322 rm -f conftest*
2323
2324   if test $ac_cv_prog_gcc_traditional = no; then
2325     cat >conftest.$ac_ext <<_ACEOF
2326 #line 2326 "configure"
2327 #include "confdefs.h"
2328 #include <termio.h>
2329 int Autoconf = TCGETA;
2330 _ACEOF
2331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2332   egrep "$ac_pattern" >/dev/null 2>&1; then
2333   ac_cv_prog_gcc_traditional=yes
2334 fi
2335 rm -f conftest*
2336
2337   fi
2338 fi
2339 echo "$as_me:2339: result: $ac_cv_prog_gcc_traditional" >&5
2340 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2341   if test $ac_cv_prog_gcc_traditional = yes; then
2342     CC="$CC -traditional"
2343   fi
2344 fi
2345
2346 echo "$as_me:2346: checking whether $CC understands -c and -o together" >&5
2347 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2348 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2349   echo $ECHO_N "(cached) $ECHO_C" >&6
2350 else
2351
2352 cat > conftest.$ac_ext <<CF_EOF
2353 #include <stdio.h>
2354 int main()
2355 {
2356         ${cf_cv_main_return:-return}(0);
2357 }
2358 CF_EOF
2359 # We do the test twice because some compilers refuse to overwrite an
2360 # existing .o file with -o, though they will create one.
2361 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2362 if { (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   test -f conftest2.$ac_objext && { (eval echo "$as_me:2367: \"$ac_try\"") >&5
2368   (eval $ac_try) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); };
2372 then
2373   eval cf_cv_prog_CC_c_o=yes
2374 else
2375   eval cf_cv_prog_CC_c_o=no
2376 fi
2377 rm -f conftest*
2378
2379 fi
2380 if test $cf_cv_prog_CC_c_o = yes; then
2381   echo "$as_me:2381: result: yes" >&5
2382 echo "${ECHO_T}yes" >&6
2383 else
2384   echo "$as_me:2384: result: no" >&5
2385 echo "${ECHO_T}no" >&6
2386 fi
2387
2388 echo "$as_me:2388: checking for POSIXized ISC" >&5
2389 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2390 if test -d /etc/conf/kconfig.d &&
2391    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2392 then
2393   echo "$as_me:2393: result: yes" >&5
2394 echo "${ECHO_T}yes" >&6
2395   ISC=yes # If later tests want to check for ISC.
2396
2397 cat >>confdefs.h <<\EOF
2398 #define _POSIX_SOURCE 1
2399 EOF
2400
2401   if test "$GCC" = yes; then
2402     CC="$CC -posix"
2403   else
2404     CC="$CC -Xp"
2405   fi
2406 else
2407   echo "$as_me:2407: result: no" >&5
2408 echo "${ECHO_T}no" >&6
2409   ISC=
2410 fi
2411
2412 echo "$as_me:2412: checking for ${CC-cc} option to accept ANSI C" >&5
2413 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2414 if test "${cf_cv_ansi_cc+set}" = set; then
2415   echo $ECHO_N "(cached) $ECHO_C" >&6
2416 else
2417
2418 cf_cv_ansi_cc=no
2419 cf_save_CFLAGS="$CFLAGS"
2420 cf_save_CPPFLAGS="$CPPFLAGS"
2421 # Don't try gcc -ansi; that turns off useful extensions and
2422 # breaks some systems' header files.
2423 # AIX                   -qlanglvl=ansi
2424 # Ultrix and OSF/1      -std1
2425 # HP-UX                 -Aa -D_HPUX_SOURCE
2426 # SVR4                  -Xc
2427 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2428 for cf_arg in "-DCC_HAS_PROTOS" \
2429         "" \
2430         -qlanglvl=ansi \
2431         -std1 \
2432         -Ae \
2433         "-Aa -D_HPUX_SOURCE" \
2434         -Xc
2435 do
2436
2437 cf_fix_cppflags=no
2438 cf_new_cflags=
2439 cf_new_cppflags=
2440 cf_new_extra_cppflags=
2441
2442 for cf_add_cflags in $cf_arg
2443 do
2444 case $cf_fix_cppflags in
2445 no)
2446         case $cf_add_cflags in #(vi
2447         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2448                 case $cf_add_cflags in
2449                 -D*)
2450                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2451
2452                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2453                         && test -z "${cf_tst_cflags}" \
2454                         && cf_fix_cppflags=yes
2455
2456                         if test $cf_fix_cppflags = yes ; then
2457                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2458                                 continue
2459                         elif test "${cf_tst_cflags}" = "\"'" ; then
2460                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2461                                 continue
2462                         fi
2463                         ;;
2464                 esac
2465                 case "$CPPFLAGS" in
2466                 *$cf_add_cflags) #(vi
2467                         ;;
2468                 *) #(vi
2469                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2470                         ;;
2471                 esac
2472                 ;;
2473         *)
2474                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2475                 ;;
2476         esac
2477         ;;
2478 yes)
2479         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2480
2481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2482
2483         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2484         && test -z "${cf_tst_cflags}" \
2485         && cf_fix_cppflags=no
2486         ;;
2487 esac
2488 done
2489
2490 if test -n "$cf_new_cflags" ; then
2491
2492         CFLAGS="$CFLAGS $cf_new_cflags"
2493 fi
2494
2495 if test -n "$cf_new_cppflags" ; then
2496
2497         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2498 fi
2499
2500 if test -n "$cf_new_extra_cppflags" ; then
2501
2502         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2503 fi
2504
2505         cat >conftest.$ac_ext <<_ACEOF
2506 #line 2506 "configure"
2507 #include "confdefs.h"
2508
2509 #ifndef CC_HAS_PROTOS
2510 #if !defined(__STDC__) || (__STDC__ != 1)
2511 choke me
2512 #endif
2513 #endif
2514
2515 int
2516 main ()
2517 {
2518
2519         int test (int i, double x);
2520         struct s1 {int (*f) (int a);};
2521         struct s2 {int (*f) (double a);};
2522   ;
2523   return 0;
2524 }
2525 _ACEOF
2526 rm -f conftest.$ac_objext
2527 if { (eval echo "$as_me:2527: \"$ac_compile\"") >&5
2528   (eval $ac_compile) 2>&5
2529   ac_status=$?
2530   echo "$as_me:2530: \$? = $ac_status" >&5
2531   (exit $ac_status); } &&
2532          { ac_try='test -s conftest.$ac_objext'
2533   { (eval echo "$as_me:2533: \"$ac_try\"") >&5
2534   (eval $ac_try) 2>&5
2535   ac_status=$?
2536   echo "$as_me:2536: \$? = $ac_status" >&5
2537   (exit $ac_status); }; }; then
2538   cf_cv_ansi_cc="$cf_arg"; break
2539 else
2540   echo "$as_me: failed program was:" >&5
2541 cat conftest.$ac_ext >&5
2542 fi
2543 rm -f conftest.$ac_objext conftest.$ac_ext
2544 done
2545 CFLAGS="$cf_save_CFLAGS"
2546 CPPFLAGS="$cf_save_CPPFLAGS"
2547
2548 fi
2549 echo "$as_me:2549: result: $cf_cv_ansi_cc" >&5
2550 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2551
2552 if test "$cf_cv_ansi_cc" != "no"; then
2553 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2554
2555 cf_fix_cppflags=no
2556 cf_new_cflags=
2557 cf_new_cppflags=
2558 cf_new_extra_cppflags=
2559
2560 for cf_add_cflags in $cf_cv_ansi_cc
2561 do
2562 case $cf_fix_cppflags in
2563 no)
2564         case $cf_add_cflags in #(vi
2565         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2566                 case $cf_add_cflags in
2567                 -D*)
2568                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2569
2570                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2571                         && test -z "${cf_tst_cflags}" \
2572                         && cf_fix_cppflags=yes
2573
2574                         if test $cf_fix_cppflags = yes ; then
2575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2576                                 continue
2577                         elif test "${cf_tst_cflags}" = "\"'" ; then
2578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579                                 continue
2580                         fi
2581                         ;;
2582                 esac
2583                 case "$CPPFLAGS" in
2584                 *$cf_add_cflags) #(vi
2585                         ;;
2586                 *) #(vi
2587                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2588                         ;;
2589                 esac
2590                 ;;
2591         *)
2592                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2593                 ;;
2594         esac
2595         ;;
2596 yes)
2597         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598
2599         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2600
2601         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2602         && test -z "${cf_tst_cflags}" \
2603         && cf_fix_cppflags=no
2604         ;;
2605 esac
2606 done
2607
2608 if test -n "$cf_new_cflags" ; then
2609
2610         CFLAGS="$CFLAGS $cf_new_cflags"
2611 fi
2612
2613 if test -n "$cf_new_cppflags" ; then
2614
2615         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2616 fi
2617
2618 if test -n "$cf_new_extra_cppflags" ; then
2619
2620         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2621 fi
2622
2623 else
2624         cat >>confdefs.h <<\EOF
2625 #define CC_HAS_PROTOS 1
2626 EOF
2627
2628 fi
2629 fi
2630
2631 if test "$cf_cv_ansi_cc" = "no"; then
2632         { { echo "$as_me:2632: 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" >&5
2637 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2638 You have the following choices:
2639         a. adjust your compiler options
2640         b. get an up-to-date compiler
2641         c. use a wrapper such as unproto" >&2;}
2642    { (exit 1); exit 1; }; }
2643 fi
2644
2645 case $cf_cv_system_name in
2646 os2*)
2647     CFLAGS="$CFLAGS -Zmt"
2648     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2649     CXXFLAGS="$CXXFLAGS -Zmt"
2650     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2651     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2652     ac_cv_exeext=.exe
2653     ;;
2654 esac
2655
2656 PROG_EXT="$EXEEXT"
2657
2658 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2659 #define PROG_EXT "$PROG_EXT"
2660 EOF
2661
2662 if test "$cross_compiling" = yes ; then
2663   LDCONFIG=:
2664 else
2665 case "$cf_cv_system_name" in #(vi
2666 freebsd*) #(vi
2667   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2668   ;;
2669 *) LDPATH=$PATH:/sbin:/usr/sbin
2670   # Extract the first word of "ldconfig", so it can be a program name with args.
2671 set dummy ldconfig; ac_word=$2
2672 echo "$as_me:2672: checking for $ac_word" >&5
2673 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2674 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2675   echo $ECHO_N "(cached) $ECHO_C" >&6
2676 else
2677   case $LDCONFIG in
2678   [\\/]* | ?:[\\/]*)
2679   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2680   ;;
2681   *)
2682   ac_save_IFS=$IFS; IFS=$ac_path_separator
2683 ac_dummy="$LDPATH"
2684 for ac_dir in $ac_dummy; do
2685   IFS=$ac_save_IFS
2686   test -z "$ac_dir" && ac_dir=.
2687   if $as_executable_p "$ac_dir/$ac_word"; then
2688    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2689    echo "$as_me:2689: found $ac_dir/$ac_word" >&5
2690    break
2691 fi
2692 done
2693
2694   ;;
2695 esac
2696 fi
2697 LDCONFIG=$ac_cv_path_LDCONFIG
2698
2699 if test -n "$LDCONFIG"; then
2700   echo "$as_me:2700: result: $LDCONFIG" >&5
2701 echo "${ECHO_T}$LDCONFIG" >&6
2702 else
2703   echo "$as_me:2703: result: no" >&5
2704 echo "${ECHO_T}no" >&6
2705 fi
2706
2707   ;;
2708 esac
2709 fi
2710
2711 echo "$as_me:2711: checking if you want to ensure bool is consistent with C++" >&5
2712 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2713
2714 # Check whether --with-cxx or --without-cxx was given.
2715 if test "${with_cxx+set}" = set; then
2716   withval="$with_cxx"
2717   cf_with_cxx=$withval
2718 else
2719   cf_with_cxx=yes
2720 fi;
2721 echo "$as_me:2721: result: $cf_with_cxx" >&5
2722 echo "${ECHO_T}$cf_with_cxx" >&6
2723 if test "X$cf_with_cxx" = Xno ; then
2724         CXX=""
2725         GXX=""
2726 else
2727         # with autoconf 2.13, we can change the error to a warning:
2728                 ac_ext=cc
2729 ac_cpp='$CXXCPP $CPPFLAGS'
2730 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2733 ac_main_return=return
2734 if test -n "$ac_tool_prefix"; then
2735   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2736   do
2737     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2738 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2739 echo "$as_me:2739: checking for $ac_word" >&5
2740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2741 if test "${ac_cv_prog_CXX+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   if test -n "$CXX"; then
2745   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2746 else
2747   ac_save_IFS=$IFS; IFS=$ac_path_separator
2748 ac_dummy="$PATH"
2749 for ac_dir in $ac_dummy; do
2750   IFS=$ac_save_IFS
2751   test -z "$ac_dir" && ac_dir=.
2752   $as_executable_p "$ac_dir/$ac_word" || continue
2753 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2754 echo "$as_me:2754: found $ac_dir/$ac_word" >&5
2755 break
2756 done
2757
2758 fi
2759 fi
2760 CXX=$ac_cv_prog_CXX
2761 if test -n "$CXX"; then
2762   echo "$as_me:2762: result: $CXX" >&5
2763 echo "${ECHO_T}$CXX" >&6
2764 else
2765   echo "$as_me:2765: result: no" >&5
2766 echo "${ECHO_T}no" >&6
2767 fi
2768
2769     test -n "$CXX" && break
2770   done
2771 fi
2772 if test -z "$CXX"; then
2773   ac_ct_CXX=$CXX
2774   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2775 do
2776   # Extract the first word of "$ac_prog", so it can be a program name with args.
2777 set dummy $ac_prog; ac_word=$2
2778 echo "$as_me:2778: checking for $ac_word" >&5
2779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2780 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2781   echo $ECHO_N "(cached) $ECHO_C" >&6
2782 else
2783   if test -n "$ac_ct_CXX"; then
2784   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2785 else
2786   ac_save_IFS=$IFS; IFS=$ac_path_separator
2787 ac_dummy="$PATH"
2788 for ac_dir in $ac_dummy; do
2789   IFS=$ac_save_IFS
2790   test -z "$ac_dir" && ac_dir=.
2791   $as_executable_p "$ac_dir/$ac_word" || continue
2792 ac_cv_prog_ac_ct_CXX="$ac_prog"
2793 echo "$as_me:2793: found $ac_dir/$ac_word" >&5
2794 break
2795 done
2796
2797 fi
2798 fi
2799 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2800 if test -n "$ac_ct_CXX"; then
2801   echo "$as_me:2801: result: $ac_ct_CXX" >&5
2802 echo "${ECHO_T}$ac_ct_CXX" >&6
2803 else
2804   echo "$as_me:2804: result: no" >&5
2805 echo "${ECHO_T}no" >&6
2806 fi
2807
2808   test -n "$ac_ct_CXX" && break
2809 done
2810 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2811
2812   CXX=$ac_ct_CXX
2813 fi
2814
2815 # Provide some information about the compiler.
2816 echo "$as_me:2816:" \
2817      "checking for C++ compiler version" >&5
2818 ac_compiler=`set X $ac_compile; echo $2`
2819 { (eval echo "$as_me:2819: \"$ac_compiler --version </dev/null >&5\"") >&5
2820   (eval $ac_compiler --version </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 { (eval echo "$as_me:2829: \"$ac_compiler -V </dev/null >&5\"") >&5
2830   (eval $ac_compiler -V </dev/null >&5) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); }
2834
2835 echo "$as_me:2835: checking whether we are using the GNU C++ compiler" >&5
2836 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2837 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2838   echo $ECHO_N "(cached) $ECHO_C" >&6
2839 else
2840   cat >conftest.$ac_ext <<_ACEOF
2841 #line 2841 "configure"
2842 #include "confdefs.h"
2843
2844 int
2845 main ()
2846 {
2847 #ifndef __GNUC__
2848        choke me
2849 #endif
2850
2851   ;
2852   return 0;
2853 }
2854 _ACEOF
2855 rm -f conftest.$ac_objext
2856 if { (eval echo "$as_me:2856: \"$ac_compile\"") >&5
2857   (eval $ac_compile) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); } &&
2861          { ac_try='test -s conftest.$ac_objext'
2862   { (eval echo "$as_me:2862: \"$ac_try\"") >&5
2863   (eval $ac_try) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }; }; then
2867   ac_compiler_gnu=yes
2868 else
2869   echo "$as_me: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2871 ac_compiler_gnu=no
2872 fi
2873 rm -f conftest.$ac_objext conftest.$ac_ext
2874 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2875
2876 fi
2877 echo "$as_me:2877: result: $ac_cv_cxx_compiler_gnu" >&5
2878 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2879 GXX=`test $ac_compiler_gnu = yes && echo yes`
2880 ac_test_CXXFLAGS=${CXXFLAGS+set}
2881 ac_save_CXXFLAGS=$CXXFLAGS
2882 CXXFLAGS="-g"
2883 echo "$as_me:2883: checking whether $CXX accepts -g" >&5
2884 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2885 if test "${ac_cv_prog_cxx_g+set}" = set; then
2886   echo $ECHO_N "(cached) $ECHO_C" >&6
2887 else
2888   cat >conftest.$ac_ext <<_ACEOF
2889 #line 2889 "configure"
2890 #include "confdefs.h"
2891
2892 int
2893 main ()
2894 {
2895
2896   ;
2897   return 0;
2898 }
2899 _ACEOF
2900 rm -f conftest.$ac_objext
2901 if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5
2902   (eval $ac_compile) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); } &&
2906          { ac_try='test -s conftest.$ac_objext'
2907   { (eval echo "$as_me:2907: \"$ac_try\"") >&5
2908   (eval $ac_try) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); }; }; then
2912   ac_cv_prog_cxx_g=yes
2913 else
2914   echo "$as_me: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 ac_cv_prog_cxx_g=no
2917 fi
2918 rm -f conftest.$ac_objext conftest.$ac_ext
2919 fi
2920 echo "$as_me:2920: result: $ac_cv_prog_cxx_g" >&5
2921 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2922 if test "$ac_test_CXXFLAGS" = set; then
2923   CXXFLAGS=$ac_save_CXXFLAGS
2924 elif test $ac_cv_prog_cxx_g = yes; then
2925   if test "$GXX" = yes; then
2926     CXXFLAGS="-g -O2"
2927   else
2928     CXXFLAGS="-g"
2929   fi
2930 else
2931   if test "$GXX" = yes; then
2932     CXXFLAGS="-O2"
2933   else
2934     CXXFLAGS=
2935   fi
2936 fi
2937 for ac_declaration in \
2938    ''\
2939    '#include <stdlib.h>' \
2940    'extern "C" void std::exit (int) throw (); using std::exit;' \
2941    'extern "C" void std::exit (int); using std::exit;' \
2942    'extern "C" void exit (int) throw ();' \
2943    'extern "C" void exit (int);' \
2944    'void exit (int);'
2945 do
2946   cat >conftest.$ac_ext <<_ACEOF
2947 #line 2947 "configure"
2948 #include "confdefs.h"
2949 #include <stdlib.h>
2950 $ac_declaration
2951 int
2952 main ()
2953 {
2954 exit (42);
2955   ;
2956   return 0;
2957 }
2958 _ACEOF
2959 rm -f conftest.$ac_objext
2960 if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
2961   (eval $ac_compile) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); } &&
2965          { ac_try='test -s conftest.$ac_objext'
2966   { (eval echo "$as_me:2966: \"$ac_try\"") >&5
2967   (eval $ac_try) 2>&5
2968   ac_status=$?
2969   echo "$as_me:2969: \$? = $ac_status" >&5
2970   (exit $ac_status); }; }; then
2971   :
2972 else
2973   echo "$as_me: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 continue
2976 fi
2977 rm -f conftest.$ac_objext conftest.$ac_ext
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981 $ac_declaration
2982 int
2983 main ()
2984 {
2985 exit (42);
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); } &&
2996          { ac_try='test -s conftest.$ac_objext'
2997   { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998   (eval $ac_try) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002   break
3003 else
3004   echo "$as_me: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 fi
3007 rm -f conftest.$ac_objext conftest.$ac_ext
3008 done
3009 rm -f conftest*
3010 if test -n "$ac_declaration"; then
3011   echo '#ifdef __cplusplus' >>confdefs.h
3012   echo $ac_declaration      >>confdefs.h
3013   echo '#endif'             >>confdefs.h
3014 fi
3015
3016 ac_ext=c
3017 ac_cpp='$CPP $CPPFLAGS'
3018 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3019 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3020 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3021 ac_main_return=return
3022
3023                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3024         if test "$CXX" = "g++" ; then
3025                 # Extract the first word of "g++", so it can be a program name with args.
3026 set dummy g++; ac_word=$2
3027 echo "$as_me:3027: checking for $ac_word" >&5
3028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3029 if test "${ac_cv_path_CXX+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032   case $CXX in
3033   [\\/]* | ?:[\\/]*)
3034   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3035   ;;
3036   *)
3037   ac_save_IFS=$IFS; IFS=$ac_path_separator
3038 ac_dummy="$PATH"
3039 for ac_dir in $ac_dummy; do
3040   IFS=$ac_save_IFS
3041   test -z "$ac_dir" && ac_dir=.
3042   if $as_executable_p "$ac_dir/$ac_word"; then
3043    ac_cv_path_CXX="$ac_dir/$ac_word"
3044    echo "$as_me:3044: found $ac_dir/$ac_word" >&5
3045    break
3046 fi
3047 done
3048
3049   ;;
3050 esac
3051 fi
3052 CXX=$ac_cv_path_CXX
3053
3054 if test -n "$CXX"; then
3055   echo "$as_me:3055: result: $CXX" >&5
3056 echo "${ECHO_T}$CXX" >&6
3057 else
3058   echo "$as_me:3058: result: no" >&5
3059 echo "${ECHO_T}no" >&6
3060 fi
3061
3062         fi
3063         if test "$CXX" = "g++" ; then
3064                 { echo "$as_me:3064: WARNING: ignoring hardcoded g++" >&5
3065 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3066                 cf_with_cxx=no; CXX=""; GXX="";
3067         fi
3068 fi
3069
3070 GXX_VERSION=none
3071 if test "$GXX" = yes; then
3072         echo "$as_me:3072: checking version of g++" >&5
3073 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3074         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3075         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3076         echo "$as_me:3076: result: $GXX_VERSION" >&5
3077 echo "${ECHO_T}$GXX_VERSION" >&6
3078 fi
3079
3080 case $GXX_VERSION in
3081 1*|2.[0-6]*)
3082         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3083         # cf_cxx_library=no
3084         { echo "$as_me:3084: WARNING: templates do not work" >&5
3085 echo "$as_me: WARNING: templates do not work" >&2;}
3086         ;;
3087 esac
3088
3089 echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
3090 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3091
3092 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3093 if test "${with_cxx_binding+set}" = set; then
3094   withval="$with_cxx_binding"
3095   cf_with_cxx_binding=$withval
3096 else
3097   cf_with_cxx_binding=$cf_with_cxx
3098 fi;
3099 echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
3100 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3101
3102 echo "$as_me:3102: checking if you want to build with Ada95" >&5
3103 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3104
3105 # Check whether --with-ada or --without-ada was given.
3106 if test "${with_ada+set}" = set; then
3107   withval="$with_ada"
3108   cf_with_ada=$withval
3109 else
3110   cf_with_ada=yes
3111 fi;
3112 echo "$as_me:3112: result: $cf_with_ada" >&5
3113 echo "${ECHO_T}$cf_with_ada" >&6
3114
3115 echo "$as_me:3115: checking if you want to build programs such as tic" >&5
3116 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3117
3118 # Check whether --with-progs or --without-progs was given.
3119 if test "${with_progs+set}" = set; then
3120   withval="$with_progs"
3121   cf_with_progs=$withval
3122 else
3123   cf_with_progs=yes
3124 fi;
3125 echo "$as_me:3125: result: $cf_with_progs" >&5
3126 echo "${ECHO_T}$cf_with_progs" >&6
3127
3128 echo "$as_me:3128: checking if you wish to install curses.h" >&5
3129 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3130
3131 # Check whether --with-curses-h or --without-curses-h was given.
3132 if test "${with_curses_h+set}" = set; then
3133   withval="$with_curses_h"
3134   with_curses_h=$withval
3135 else
3136   with_curses_h=yes
3137 fi;
3138 echo "$as_me:3138: result: $with_curses_h" >&5
3139 echo "${ECHO_T}$with_curses_h" >&6
3140
3141 modules_to_build="ncurses"
3142 if test "X$cf_with_progs" != Xno ; then
3143 modules_to_build="$modules_to_build progs tack"
3144 fi
3145 modules_to_build="$modules_to_build panel menu form"
3146
3147 test "$program_prefix" != NONE &&
3148   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3149 # Use a double $ so make ignores it.
3150 test "$program_suffix" != NONE &&
3151   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3152 # Double any \ or $.  echo might interpret backslashes.
3153 # By default was `s,x,x', remove it if useless.
3154 cat <<\_ACEOF >conftest.sed
3155 s/[\\$]/&&/g;s/;s,x,x,$//
3156 _ACEOF
3157 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3158 rm conftest.sed
3159
3160 for ac_prog in mawk gawk nawk awk
3161 do
3162   # Extract the first word of "$ac_prog", so it can be a program name with args.
3163 set dummy $ac_prog; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_prog_AWK+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   if test -n "$AWK"; then
3170   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3171 else
3172   ac_save_IFS=$IFS; IFS=$ac_path_separator
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175   IFS=$ac_save_IFS
3176   test -z "$ac_dir" && ac_dir=.
3177   $as_executable_p "$ac_dir/$ac_word" || continue
3178 ac_cv_prog_AWK="$ac_prog"
3179 echo "$as_me:3179: found $ac_dir/$ac_word" >&5
3180 break
3181 done
3182
3183 fi
3184 fi
3185 AWK=$ac_cv_prog_AWK
3186 if test -n "$AWK"; then
3187   echo "$as_me:3187: result: $AWK" >&5
3188 echo "${ECHO_T}$AWK" >&6
3189 else
3190   echo "$as_me:3190: result: no" >&5
3191 echo "${ECHO_T}no" >&6
3192 fi
3193
3194   test -n "$AWK" && break
3195 done
3196
3197 test -z "$AWK" && { { echo "$as_me:3197: error: No awk program found" >&5
3198 echo "$as_me: error: No awk program found" >&2;}
3199    { (exit 1); exit 1; }; }
3200
3201 echo "$as_me:3201: checking for egrep" >&5
3202 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3203 if test "${ac_cv_prog_egrep+set}" = set; then
3204   echo $ECHO_N "(cached) $ECHO_C" >&6
3205 else
3206   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3207     then ac_cv_prog_egrep='grep -E'
3208     else ac_cv_prog_egrep='egrep'
3209     fi
3210 fi
3211 echo "$as_me:3211: result: $ac_cv_prog_egrep" >&5
3212 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3213  EGREP=$ac_cv_prog_egrep
3214
3215 test -z "$EGREP" && { { echo "$as_me:3215: error: No egrep program found" >&5
3216 echo "$as_me: error: No egrep program found" >&2;}
3217    { (exit 1); exit 1; }; }
3218
3219 # Find a good install program.  We prefer a C program (faster),
3220 # so one script is as good as another.  But avoid the broken or
3221 # incompatible versions:
3222 # SysV /etc/install, /usr/sbin/install
3223 # SunOS /usr/etc/install
3224 # IRIX /sbin/install
3225 # AIX /bin/install
3226 # AmigaOS /C/install, which installs bootblocks on floppy discs
3227 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3228 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3229 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3230 # ./install, which can be erroneously created by make from ./install.sh.
3231 echo "$as_me:3231: checking for a BSD compatible install" >&5
3232 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3233 if test -z "$INSTALL"; then
3234 if test "${ac_cv_path_install+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237     ac_save_IFS=$IFS; IFS=$ac_path_separator
3238   for ac_dir in $PATH; do
3239     IFS=$ac_save_IFS
3240     # Account for people who put trailing slashes in PATH elements.
3241     case $ac_dir/ in
3242     / | ./ | .// | /cC/* \
3243     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3244     | /usr/ucb/* ) ;;
3245     *)
3246       # OSF1 and SCO ODT 3.0 have their own names for install.
3247       # Don't use installbsd from OSF since it installs stuff as root
3248       # by default.
3249       for ac_prog in ginstall scoinst install; do
3250         if $as_executable_p "$ac_dir/$ac_prog"; then
3251           if test $ac_prog = install &&
3252             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3253             # AIX install.  It has an incompatible calling convention.
3254             :
3255           elif test $ac_prog = install &&
3256             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3257             # program-specific install script used by HP pwplus--don't use.
3258             :
3259           else
3260             ac_cv_path_install="$ac_dir/$ac_prog -c"
3261             break 2
3262           fi
3263         fi
3264       done
3265       ;;
3266     esac
3267   done
3268
3269 fi
3270   if test "${ac_cv_path_install+set}" = set; then
3271     INSTALL=$ac_cv_path_install
3272   else
3273     # As a last resort, use the slow shell script.  We don't cache a
3274     # path for INSTALL within a source directory, because that will
3275     # break other packages using the cache if that directory is
3276     # removed, or if the path is relative.
3277     INSTALL=$ac_install_sh
3278   fi
3279 fi
3280 echo "$as_me:3280: result: $INSTALL" >&5
3281 echo "${ECHO_T}$INSTALL" >&6
3282
3283 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3284 # It thinks the first close brace ends the variable substitution.
3285 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3286
3287 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3288
3289 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3290
3291 case $INSTALL in
3292 /*)
3293   ;;
3294 *)
3295   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3296   test -z "$cf_dir" && cf_dir=.
3297   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3298   ;;
3299 esac
3300
3301 for ac_prog in tdlint lint alint
3302 do
3303   # Extract the first word of "$ac_prog", so it can be a program name with args.
3304 set dummy $ac_prog; ac_word=$2
3305 echo "$as_me:3305: checking for $ac_word" >&5
3306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3307 if test "${ac_cv_prog_LINT+set}" = set; then
3308   echo $ECHO_N "(cached) $ECHO_C" >&6
3309 else
3310   if test -n "$LINT"; then
3311   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3312 else
3313   ac_save_IFS=$IFS; IFS=$ac_path_separator
3314 ac_dummy="$PATH"
3315 for ac_dir in $ac_dummy; do
3316   IFS=$ac_save_IFS
3317   test -z "$ac_dir" && ac_dir=.
3318   $as_executable_p "$ac_dir/$ac_word" || continue
3319 ac_cv_prog_LINT="$ac_prog"
3320 echo "$as_me:3320: found $ac_dir/$ac_word" >&5
3321 break
3322 done
3323
3324 fi
3325 fi
3326 LINT=$ac_cv_prog_LINT
3327 if test -n "$LINT"; then
3328   echo "$as_me:3328: result: $LINT" >&5
3329 echo "${ECHO_T}$LINT" >&6
3330 else
3331   echo "$as_me:3331: result: no" >&5
3332 echo "${ECHO_T}no" >&6
3333 fi
3334
3335   test -n "$LINT" && break
3336 done
3337
3338 echo "$as_me:3338: checking whether ln -s works" >&5
3339 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3340 LN_S=$as_ln_s
3341 if test "$LN_S" = "ln -s"; then
3342   echo "$as_me:3342: result: yes" >&5
3343 echo "${ECHO_T}yes" >&6
3344 else
3345   echo "$as_me:3345: result: no, using $LN_S" >&5
3346 echo "${ECHO_T}no, using $LN_S" >&6
3347 fi
3348
3349 echo "$as_me:3349: checking for long file names" >&5
3350 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3351 if test "${ac_cv_sys_long_file_names+set}" = set; then
3352   echo $ECHO_N "(cached) $ECHO_C" >&6
3353 else
3354   ac_cv_sys_long_file_names=yes
3355 # Test for long file names in all the places we know might matter:
3356 #      .                the current directory, where building will happen
3357 #      $prefix/lib      where we will be installing things
3358 #      $exec_prefix/lib likewise
3359 # eval it to expand exec_prefix.
3360 #      $TMPDIR          if set, where it might want to write temporary files
3361 # if $TMPDIR is not set:
3362 #      /tmp             where it might want to write temporary files
3363 #      /var/tmp         likewise
3364 #      /usr/tmp         likewise
3365 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3366   ac_tmpdirs=$TMPDIR
3367 else
3368   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3369 fi
3370 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3371   test -d $ac_dir || continue
3372   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3373   ac_xdir=$ac_dir/cf$$
3374   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3375   ac_tf1=$ac_xdir/conftest9012345
3376   ac_tf2=$ac_xdir/conftest9012346
3377   (echo 1 >$ac_tf1) 2>/dev/null
3378   (echo 2 >$ac_tf2) 2>/dev/null
3379   ac_val=`cat $ac_tf1 2>/dev/null`
3380   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3381     ac_cv_sys_long_file_names=no
3382     rm -rf $ac_xdir 2>/dev/null
3383     break
3384   fi
3385   rm -rf $ac_xdir 2>/dev/null
3386 done
3387 fi
3388 echo "$as_me:3388: result: $ac_cv_sys_long_file_names" >&5
3389 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3390 if test $ac_cv_sys_long_file_names = yes; then
3391
3392 cat >>confdefs.h <<\EOF
3393 #define HAVE_LONG_FILE_NAMES 1
3394 EOF
3395
3396 fi
3397
3398 echo "$as_me:3398: checking if we should assume mixed-case filenames" >&5
3399 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3400
3401 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3402 if test "${enable_mixed_case+set}" = set; then
3403   enableval="$enable_mixed_case"
3404   enable_mixedcase=$enableval
3405 else
3406   enable_mixedcase=auto
3407 fi;
3408 echo "$as_me:3408: result: $enable_mixedcase" >&5
3409 echo "${ECHO_T}$enable_mixedcase" >&6
3410 if test "$enable_mixedcase" = "auto" ; then
3411
3412 echo "$as_me:3412: checking if filesystem supports mixed-case filenames" >&5
3413 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3414 if test "${cf_cv_mixedcase+set}" = set; then
3415   echo $ECHO_N "(cached) $ECHO_C" >&6
3416 else
3417
3418 if test "$cross_compiling" = yes ; then
3419         case $target_alias in #(vi
3420         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3421                 cf_cv_mixedcase=no
3422                 ;;
3423         *)
3424                 cf_cv_mixedcase=yes
3425                 ;;
3426         esac
3427 else
3428         rm -f conftest CONFTEST
3429         echo test >conftest
3430         if test -f CONFTEST ; then
3431                 cf_cv_mixedcase=no
3432         else
3433                 cf_cv_mixedcase=yes
3434         fi
3435         rm -f conftest CONFTEST
3436 fi
3437
3438 fi
3439 echo "$as_me:3439: result: $cf_cv_mixedcase" >&5
3440 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3441 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3442 #define MIXEDCASE_FILENAMES 1
3443 EOF
3444
3445 else
3446     cf_cv_mixedcase=$enable_mixedcase
3447     if test "$enable_mixedcase" = "yes" ; then
3448         cat >>confdefs.h <<\EOF
3449 #define MIXEDCASE_FILENAMES 1
3450 EOF
3451
3452     fi
3453 fi
3454
3455 # do this after mixed-case option (tags/TAGS is not as important as tic).
3456 echo "$as_me:3456: checking whether ${MAKE-make} sets \${MAKE}" >&5
3457 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3458 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3459 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3460   echo $ECHO_N "(cached) $ECHO_C" >&6
3461 else
3462   cat >conftest.make <<\EOF
3463 all:
3464         @echo 'ac_maketemp="${MAKE}"'
3465 EOF
3466 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3467 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3468 if test -n "$ac_maketemp"; then
3469   eval ac_cv_prog_make_${ac_make}_set=yes
3470 else
3471   eval ac_cv_prog_make_${ac_make}_set=no
3472 fi
3473 rm -f conftest.make
3474 fi
3475 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3476   echo "$as_me:3476: result: yes" >&5
3477 echo "${ECHO_T}yes" >&6
3478   SET_MAKE=
3479 else
3480   echo "$as_me:3480: result: no" >&5
3481 echo "${ECHO_T}no" >&6
3482   SET_MAKE="MAKE=${MAKE-make}"
3483 fi
3484
3485 # Extract the first word of "ctags", so it can be a program name with args.
3486 set dummy ctags; ac_word=$2
3487 echo "$as_me:3487: checking for $ac_word" >&5
3488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3489 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" >&6
3491 else
3492   if test -n "$MAKE_LOWER_TAGS"; then
3493   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3494 else
3495   ac_save_IFS=$IFS; IFS=$ac_path_separator
3496 ac_dummy="$PATH"
3497 for ac_dir in $ac_dummy; do
3498   IFS=$ac_save_IFS
3499   test -z "$ac_dir" && ac_dir=.
3500   $as_executable_p "$ac_dir/$ac_word" || continue
3501 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3502 echo "$as_me:3502: found $ac_dir/$ac_word" >&5
3503 break
3504 done
3505
3506   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3507 fi
3508 fi
3509 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3510 if test -n "$MAKE_LOWER_TAGS"; then
3511   echo "$as_me:3511: result: $MAKE_LOWER_TAGS" >&5
3512 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3513 else
3514   echo "$as_me:3514: result: no" >&5
3515 echo "${ECHO_T}no" >&6
3516 fi
3517
3518 if test "$cf_cv_mixedcase" = yes ; then
3519         # Extract the first word of "etags", so it can be a program name with args.
3520 set dummy etags; ac_word=$2
3521 echo "$as_me:3521: checking for $ac_word" >&5
3522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3523 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3524   echo $ECHO_N "(cached) $ECHO_C" >&6
3525 else
3526   if test -n "$MAKE_UPPER_TAGS"; then
3527   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3528 else
3529   ac_save_IFS=$IFS; IFS=$ac_path_separator
3530 ac_dummy="$PATH"
3531 for ac_dir in $ac_dummy; do
3532   IFS=$ac_save_IFS
3533   test -z "$ac_dir" && ac_dir=.
3534   $as_executable_p "$ac_dir/$ac_word" || continue
3535 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3536 echo "$as_me:3536: found $ac_dir/$ac_word" >&5
3537 break
3538 done
3539
3540   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3541 fi
3542 fi
3543 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3544 if test -n "$MAKE_UPPER_TAGS"; then
3545   echo "$as_me:3545: result: $MAKE_UPPER_TAGS" >&5
3546 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3547 else
3548   echo "$as_me:3548: result: no" >&5
3549 echo "${ECHO_T}no" >&6
3550 fi
3551
3552 else
3553         MAKE_UPPER_TAGS=no
3554 fi
3555
3556 if test "$MAKE_UPPER_TAGS" = yes ; then
3557         MAKE_UPPER_TAGS=
3558 else
3559         MAKE_UPPER_TAGS="#"
3560 fi
3561
3562 if test "$MAKE_LOWER_TAGS" = yes ; then
3563         MAKE_LOWER_TAGS=
3564 else
3565         MAKE_LOWER_TAGS="#"
3566 fi
3567
3568 echo "$as_me:3568: checking for makeflags variable" >&5
3569 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3570 if test "${cf_cv_makeflags+set}" = set; then
3571   echo $ECHO_N "(cached) $ECHO_C" >&6
3572 else
3573
3574         cf_cv_makeflags=''
3575         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3576         do
3577                 cat >cf_makeflags.tmp <<CF_EOF
3578 SHELL = /bin/sh
3579 all :
3580         @ echo '.$cf_option'
3581 CF_EOF
3582                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3583                 case "$cf_result" in
3584                 .*k)
3585                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3586                         case "$cf_result" in
3587                         .*CC=*) cf_cv_makeflags=
3588                                 ;;
3589                         *)      cf_cv_makeflags=$cf_option
3590                                 ;;
3591                         esac
3592                         break
3593                         ;;
3594                 .-)     ;;
3595                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3596                         ;;
3597                 esac
3598         done
3599         rm -f cf_makeflags.tmp
3600
3601 fi
3602 echo "$as_me:3602: result: $cf_cv_makeflags" >&5
3603 echo "${ECHO_T}$cf_cv_makeflags" >&6
3604
3605 if test -n "$ac_tool_prefix"; then
3606   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3607 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3608 echo "$as_me:3608: checking for $ac_word" >&5
3609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3610 if test "${ac_cv_prog_RANLIB+set}" = set; then
3611   echo $ECHO_N "(cached) $ECHO_C" >&6
3612 else
3613   if test -n "$RANLIB"; then
3614   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3615 else
3616   ac_save_IFS=$IFS; IFS=$ac_path_separator
3617 ac_dummy="$PATH"
3618 for ac_dir in $ac_dummy; do
3619   IFS=$ac_save_IFS
3620   test -z "$ac_dir" && ac_dir=.
3621   $as_executable_p "$ac_dir/$ac_word" || continue
3622 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3623 echo "$as_me:3623: found $ac_dir/$ac_word" >&5
3624 break
3625 done
3626
3627 fi
3628 fi
3629 RANLIB=$ac_cv_prog_RANLIB
3630 if test -n "$RANLIB"; then
3631   echo "$as_me:3631: result: $RANLIB" >&5
3632 echo "${ECHO_T}$RANLIB" >&6
3633 else
3634   echo "$as_me:3634: result: no" >&5
3635 echo "${ECHO_T}no" >&6
3636 fi
3637
3638 fi
3639 if test -z "$ac_cv_prog_RANLIB"; then
3640   ac_ct_RANLIB=$RANLIB
3641   # Extract the first word of "ranlib", so it can be a program name with args.
3642 set dummy ranlib; ac_word=$2
3643 echo "$as_me:3643: checking for $ac_word" >&5
3644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3646   echo $ECHO_N "(cached) $ECHO_C" >&6
3647 else
3648   if test -n "$ac_ct_RANLIB"; then
3649   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3650 else
3651   ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 ac_dummy="$PATH"
3653 for ac_dir in $ac_dummy; do
3654   IFS=$ac_save_IFS
3655   test -z "$ac_dir" && ac_dir=.
3656   $as_executable_p "$ac_dir/$ac_word" || continue
3657 ac_cv_prog_ac_ct_RANLIB="ranlib"
3658 echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659 break
3660 done
3661
3662   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3663 fi
3664 fi
3665 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3666 if test -n "$ac_ct_RANLIB"; then
3667   echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
3668 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3669 else
3670   echo "$as_me:3670: result: no" >&5
3671 echo "${ECHO_T}no" >&6
3672 fi
3673
3674   RANLIB=$ac_ct_RANLIB
3675 else
3676   RANLIB="$ac_cv_prog_RANLIB"
3677 fi
3678
3679 if test -n "$ac_tool_prefix"; then
3680   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3681 set dummy ${ac_tool_prefix}ld; ac_word=$2
3682 echo "$as_me:3682: checking for $ac_word" >&5
3683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3684 if test "${ac_cv_prog_LD+set}" = set; then
3685   echo $ECHO_N "(cached) $ECHO_C" >&6
3686 else
3687   if test -n "$LD"; then
3688   ac_cv_prog_LD="$LD" # Let the user override the test.
3689 else
3690   ac_save_IFS=$IFS; IFS=$ac_path_separator
3691 ac_dummy="$PATH"
3692 for ac_dir in $ac_dummy; do
3693   IFS=$ac_save_IFS
3694   test -z "$ac_dir" && ac_dir=.
3695   $as_executable_p "$ac_dir/$ac_word" || continue
3696 ac_cv_prog_LD="${ac_tool_prefix}ld"
3697 echo "$as_me:3697: found $ac_dir/$ac_word" >&5
3698 break
3699 done
3700
3701 fi
3702 fi
3703 LD=$ac_cv_prog_LD
3704 if test -n "$LD"; then
3705   echo "$as_me:3705: result: $LD" >&5
3706 echo "${ECHO_T}$LD" >&6
3707 else
3708   echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3710 fi
3711
3712 fi
3713 if test -z "$ac_cv_prog_LD"; then
3714   ac_ct_LD=$LD
3715   # Extract the first word of "ld", so it can be a program name with args.
3716 set dummy ld; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   if test -n "$ac_ct_LD"; then
3723   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3724 else
3725   ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 ac_dummy="$PATH"
3727 for ac_dir in $ac_dummy; do
3728   IFS=$ac_save_IFS
3729   test -z "$ac_dir" && ac_dir=.
3730   $as_executable_p "$ac_dir/$ac_word" || continue
3731 ac_cv_prog_ac_ct_LD="ld"
3732 echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733 break
3734 done
3735
3736   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3737 fi
3738 fi
3739 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3740 if test -n "$ac_ct_LD"; then
3741   echo "$as_me:3741: result: $ac_ct_LD" >&5
3742 echo "${ECHO_T}$ac_ct_LD" >&6
3743 else
3744   echo "$as_me:3744: result: no" >&5
3745 echo "${ECHO_T}no" >&6
3746 fi
3747
3748   LD=$ac_ct_LD
3749 else
3750   LD="$ac_cv_prog_LD"
3751 fi
3752
3753 if test -n "$ac_tool_prefix"; then
3754   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3755 set dummy ${ac_tool_prefix}ar; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_AR+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$AR"; then
3762   ac_cv_prog_AR="$AR" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_AR="${ac_tool_prefix}ar"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775 fi
3776 fi
3777 AR=$ac_cv_prog_AR
3778 if test -n "$AR"; then
3779   echo "$as_me:3779: result: $AR" >&5
3780 echo "${ECHO_T}$AR" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786 fi
3787 if test -z "$ac_cv_prog_AR"; then
3788   ac_ct_AR=$AR
3789   # Extract the first word of "ar", so it can be a program name with args.
3790 set dummy ar; ac_word=$2
3791 echo "$as_me:3791: checking for $ac_word" >&5
3792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   if test -n "$ac_ct_AR"; then
3797   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3798 else
3799   ac_save_IFS=$IFS; IFS=$ac_path_separator
3800 ac_dummy="$PATH"
3801 for ac_dir in $ac_dummy; do
3802   IFS=$ac_save_IFS
3803   test -z "$ac_dir" && ac_dir=.
3804   $as_executable_p "$ac_dir/$ac_word" || continue
3805 ac_cv_prog_ac_ct_AR="ar"
3806 echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807 break
3808 done
3809
3810   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3811 fi
3812 fi
3813 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3814 if test -n "$ac_ct_AR"; then
3815   echo "$as_me:3815: result: $ac_ct_AR" >&5
3816 echo "${ECHO_T}$ac_ct_AR" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822   AR=$ac_ct_AR
3823 else
3824   AR="$ac_cv_prog_AR"
3825 fi
3826
3827 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830
3831 echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
3832 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3833
3834 if test -z "$AR_OPTS" ; then
3835         AR_OPTS=rv
3836
3837 fi
3838
3839 cf_cv_subst_AR_OPTS=$AR_OPTS
3840 echo "$as_me:3840: result: $AR_OPTS" >&5
3841 echo "${ECHO_T}$AR_OPTS" >&6
3842
3843 fi
3844
3845 echo "$as_me:3845: checking if you have specified an install-prefix" >&5
3846 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3847
3848 # Check whether --with-install-prefix or --without-install-prefix was given.
3849 if test "${with_install_prefix+set}" = set; then
3850   withval="$with_install_prefix"
3851   case "$withval" in #(vi
3852         yes|no) #(vi
3853                 ;;
3854         *)      DESTDIR="$withval"
3855                 ;;
3856         esac
3857 fi;
3858 echo "$as_me:3858: result: $DESTDIR" >&5
3859 echo "${ECHO_T}$DESTDIR" >&6
3860
3861 ###############################################################################
3862
3863 # If we're cross-compiling, allow the user to override the tools and their
3864 # options.  The configure script is oriented toward identifying the host
3865 # compiler, etc., but we need a build compiler to generate parts of the source.
3866
3867 if test "$cross_compiling" = yes ; then
3868
3869         # defaults that we might want to override
3870         : ${BUILD_CFLAGS:=''}
3871         : ${BUILD_CPPFLAGS:=''}
3872         : ${BUILD_LDFLAGS:=''}
3873         : ${BUILD_LIBS:=''}
3874         : ${BUILD_EXEEXT:='$x'}
3875         : ${BUILD_OBJEXT:='o'}
3876
3877 # Check whether --with-build-cc or --without-build-cc was given.
3878 if test "${with_build_cc+set}" = set; then
3879   withval="$with_build_cc"
3880   BUILD_CC="$withval"
3881 else
3882   for ac_prog in gcc cc cl
3883 do
3884   # Extract the first word of "$ac_prog", so it can be a program name with args.
3885 set dummy $ac_prog; ac_word=$2
3886 echo "$as_me:3886: checking for $ac_word" >&5
3887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3888 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3889   echo $ECHO_N "(cached) $ECHO_C" >&6
3890 else
3891   if test -n "$BUILD_CC"; then
3892   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3893 else
3894   ac_save_IFS=$IFS; IFS=$ac_path_separator
3895 ac_dummy="$PATH"
3896 for ac_dir in $ac_dummy; do
3897   IFS=$ac_save_IFS
3898   test -z "$ac_dir" && ac_dir=.
3899   $as_executable_p "$ac_dir/$ac_word" || continue
3900 ac_cv_prog_BUILD_CC="$ac_prog"
3901 echo "$as_me:3901: found $ac_dir/$ac_word" >&5
3902 break
3903 done
3904
3905 fi
3906 fi
3907 BUILD_CC=$ac_cv_prog_BUILD_CC
3908 if test -n "$BUILD_CC"; then
3909   echo "$as_me:3909: result: $BUILD_CC" >&5
3910 echo "${ECHO_T}$BUILD_CC" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916   test -n "$BUILD_CC" && break
3917 done
3918
3919 fi;
3920         echo "$as_me:3920: checking for native build C compiler" >&5
3921 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3922         echo "$as_me:3922: result: $BUILD_CC" >&5
3923 echo "${ECHO_T}$BUILD_CC" >&6
3924
3925         echo "$as_me:3925: checking for native build C preprocessor" >&5
3926 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3927
3928 # Check whether --with-build-cpp or --without-build-cpp was given.
3929 if test "${with_build_cpp+set}" = set; then
3930   withval="$with_build_cpp"
3931   BUILD_CPP="$withval"
3932 else
3933   BUILD_CPP='${BUILD_CC} -E'
3934 fi;
3935         echo "$as_me:3935: result: $BUILD_CPP" >&5
3936 echo "${ECHO_T}$BUILD_CPP" >&6
3937
3938         echo "$as_me:3938: checking for native build C flags" >&5
3939 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3940
3941 # Check whether --with-build-cflags or --without-build-cflags was given.
3942 if test "${with_build_cflags+set}" = set; then
3943   withval="$with_build_cflags"
3944   BUILD_CFLAGS="$withval"
3945 fi;
3946         echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
3947 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3948
3949         echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
3950 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3951
3952 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3953 if test "${with_build_cppflags+set}" = set; then
3954   withval="$with_build_cppflags"
3955   BUILD_CPPFLAGS="$withval"
3956 fi;
3957         echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
3958 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3959
3960         echo "$as_me:3960: checking for native build linker-flags" >&5
3961 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3962
3963 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3964 if test "${with_build_ldflags+set}" = set; then
3965   withval="$with_build_ldflags"
3966   BUILD_LDFLAGS="$withval"
3967 fi;
3968         echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
3969 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3970
3971         echo "$as_me:3971: checking for native build linker-libraries" >&5
3972 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3973
3974 # Check whether --with-build-libs or --without-build-libs was given.
3975 if test "${with_build_libs+set}" = set; then
3976   withval="$with_build_libs"
3977   BUILD_LIBS="$withval"
3978 fi;
3979         echo "$as_me:3979: result: $BUILD_LIBS" >&5
3980 echo "${ECHO_T}$BUILD_LIBS" >&6
3981
3982         # this assumes we're on Unix.
3983         BUILD_EXEEXT=
3984         BUILD_OBJEXT=o
3985
3986         : ${BUILD_CC:='${CC}'}
3987
3988         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3989                 { { echo "$as_me:3989: error: Cross-build requires two compilers.
3990 Use --with-build-cc to specify the native compiler." >&5
3991 echo "$as_me: error: Cross-build requires two compilers.
3992 Use --with-build-cc to specify the native compiler." >&2;}
3993    { (exit 1); exit 1; }; }
3994         fi
3995
3996 else
3997         : ${BUILD_CC:='${CC}'}
3998         : ${BUILD_CPP:='${CPP}'}
3999         : ${BUILD_CFLAGS:='${CFLAGS}'}
4000         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4001         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4002         : ${BUILD_LIBS:='${LIBS}'}
4003         : ${BUILD_EXEEXT:='$x'}
4004         : ${BUILD_OBJEXT:='o'}
4005 fi
4006
4007 ###############################################################################
4008
4009 ### Options to allow the user to specify the set of libraries which are used.
4010 ### Use "--without-normal --with-shared" to allow the default model to be
4011 ### shared, for example.
4012 cf_list_models=""
4013
4014 LIBTOOL=
4015
4016 # common library maintenance symbols that are convenient for libtool scripts:
4017 LIB_CREATE='${AR} -cr'
4018 LIB_OBJECT='${OBJECTS}'
4019 LIB_SUFFIX=.a
4020 LIB_PREP="$RANLIB"
4021
4022 # symbols used to prop libtool up to enable it to determine what it should be
4023 # doing:
4024 LIB_CLEAN=
4025 LIB_COMPILE=
4026 LIB_LINK='${CC}'
4027 LIB_INSTALL=
4028 LIB_UNINSTALL=
4029
4030 echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
4031 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4032
4033 # Check whether --with-libtool or --without-libtool was given.
4034 if test "${with_libtool+set}" = set; then
4035   withval="$with_libtool"
4036   with_libtool=$withval
4037 else
4038   with_libtool=no
4039 fi;
4040 echo "$as_me:4040: result: $with_libtool" >&5
4041 echo "${ECHO_T}$with_libtool" >&6
4042 if test "$with_libtool" != "no"; then
4043
4044         if test "$with_libtool" != "yes" ; then
4045
4046 if test "x$prefix" != xNONE; then
4047   cf_path_syntax="$prefix"
4048 else
4049   cf_path_syntax="$ac_default_prefix"
4050 fi
4051
4052 case ".$with_libtool" in #(vi
4053 .\$\(*\)*|.\'*\'*) #(vi
4054   ;;
4055 ..|./*|.\\*) #(vi
4056   ;;
4057 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4058   ;;
4059 .\${*prefix}*) #(vi
4060   eval with_libtool="$with_libtool"
4061   case ".$with_libtool" in #(vi
4062   .NONE/*)
4063     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4064     ;;
4065   esac
4066   ;; #(vi
4067 .no|.NONE/*)
4068   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4069   ;;
4070 *)
4071   { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
4072 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4073    { (exit 1); exit 1; }; }
4074   ;;
4075 esac
4076
4077                 LIBTOOL=$with_libtool
4078         else
4079                 # Extract the first word of "libtool", so it can be a program name with args.
4080 set dummy libtool; ac_word=$2
4081 echo "$as_me:4081: checking for $ac_word" >&5
4082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   case $LIBTOOL in
4087   [\\/]* | ?:[\\/]*)
4088   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4089   ;;
4090   *)
4091   ac_save_IFS=$IFS; IFS=$ac_path_separator
4092 ac_dummy="$PATH"
4093 for ac_dir in $ac_dummy; do
4094   IFS=$ac_save_IFS
4095   test -z "$ac_dir" && ac_dir=.
4096   if $as_executable_p "$ac_dir/$ac_word"; then
4097    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4098    echo "$as_me:4098: found $ac_dir/$ac_word" >&5
4099    break
4100 fi
4101 done
4102
4103   ;;
4104 esac
4105 fi
4106 LIBTOOL=$ac_cv_path_LIBTOOL
4107
4108 if test -n "$LIBTOOL"; then
4109   echo "$as_me:4109: result: $LIBTOOL" >&5
4110 echo "${ECHO_T}$LIBTOOL" >&6
4111 else
4112   echo "$as_me:4112: result: no" >&5
4113 echo "${ECHO_T}no" >&6
4114 fi
4115
4116         fi
4117         if test -z "$LIBTOOL" ; then
4118                 { { echo "$as_me:4118: error: Cannot find libtool" >&5
4119 echo "$as_me: error: Cannot find libtool" >&2;}
4120    { (exit 1); exit 1; }; }
4121         fi
4122         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4123         LIB_OBJECT='${OBJECTS:.o=.lo}'
4124         LIB_SUFFIX=.la
4125         LIB_CLEAN='${LIBTOOL} --mode=clean'
4126         LIB_COMPILE='${LIBTOOL} --mode=compile'
4127         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4128         LIB_INSTALL='${LIBTOOL} --mode=install'
4129         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4130         LIB_PREP=:
4131
4132         # Show the version of libtool
4133         echo "$as_me:4133: checking version of libtool" >&5
4134 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4135
4136         # Save the version in a cache variable - this is not entirely a good
4137         # thing, but the version string from libtool is very ugly, and for
4138         # bug reports it might be useful to have the original string.
4139         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.].*//'`
4140         echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
4141 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4142         if test -z "$cf_cv_libtool_version" ; then
4143                 { { echo "$as_me:4143: error: This is not GNU libtool" >&5
4144 echo "$as_me: error: This is not GNU libtool" >&2;}
4145    { (exit 1); exit 1; }; }
4146         fi
4147
4148         # special hack to add --tag option for C++ compiler
4149         case $cf_cv_libtool_version in
4150         1.[5-9]*|[2-9]*)
4151                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4152                 LIBTOOL="$LIBTOOL --tag=CC"
4153                 ;;
4154         *)
4155                 LIBTOOL_CXX="$LIBTOOL"
4156                 ;;
4157         esac
4158 else
4159         LIBTOOL=""
4160         LIBTOOL_CXX=""
4161 fi
4162
4163 test -z "$LIBTOOL" && ECHO_LT=
4164
4165 if test "$with_libtool" != "no" ; then
4166
4167 cf_list_models="$cf_list_models libtool"
4168
4169 else
4170
4171 echo "$as_me:4171: checking if you want to build shared libraries" >&5
4172 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4173
4174 # Check whether --with-shared or --without-shared was given.
4175 if test "${with_shared+set}" = set; then
4176   withval="$with_shared"
4177   with_shared=$withval
4178 else
4179   with_shared=no
4180 fi;
4181 echo "$as_me:4181: result: $with_shared" >&5
4182 echo "${ECHO_T}$with_shared" >&6
4183 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4184
4185 echo "$as_me:4185: checking if you want to build static libraries" >&5
4186 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4187
4188 # Check whether --with-normal or --without-normal was given.
4189 if test "${with_normal+set}" = set; then
4190   withval="$with_normal"
4191   with_normal=$withval
4192 else
4193   with_normal=yes
4194 fi;
4195 echo "$as_me:4195: result: $with_normal" >&5
4196 echo "${ECHO_T}$with_normal" >&6
4197 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4198
4199 echo "$as_me:4199: checking if you want to build debug libraries" >&5
4200 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-debug or --without-debug was given.
4203 if test "${with_debug+set}" = set; then
4204   withval="$with_debug"
4205   with_debug=$withval
4206 else
4207   with_debug=yes
4208 fi;
4209 echo "$as_me:4209: result: $with_debug" >&5
4210 echo "${ECHO_T}$with_debug" >&6
4211 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4212
4213 echo "$as_me:4213: checking if you want to build profiling libraries" >&5
4214 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4215
4216 # Check whether --with-profile or --without-profile was given.
4217 if test "${with_profile+set}" = set; then
4218   withval="$with_profile"
4219   with_profile=$withval
4220 else
4221   with_profile=no
4222 fi;
4223 echo "$as_me:4223: result: $with_profile" >&5
4224 echo "${ECHO_T}$with_profile" >&6
4225 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4226
4227 fi
4228
4229 ###############################################################################
4230
4231 echo "$as_me:4231: checking for specified models" >&5
4232 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4233 test -z "$cf_list_models" && cf_list_models=normal
4234 test "$with_libtool" != "no" && cf_list_models=libtool
4235 echo "$as_me:4235: result: $cf_list_models" >&5
4236 echo "${ECHO_T}$cf_list_models" >&6
4237
4238 ### Use the first model as the default, and save its suffix for use in building
4239 ### up test-applications.
4240 echo "$as_me:4240: checking for default model" >&5
4241 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4242 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4243 echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
4244 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4245
4246 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4247
4248 TICS_NAME=tic
4249
4250 TINFO_NAME=tinfo
4251
4252 LIB_NAME=ncurses
4253
4254 LIB_DIR=../lib
4255 LIB_2ND=../../lib
4256
4257         case $cf_cv_system_name in #(vi
4258         OS/2*|os2*) #(vi
4259         LIB_PREFIX=''
4260         ;;
4261         *)      LIB_PREFIX='lib'
4262         ;;
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 echo "${as_me-configure}:4361: testing assuming we really have GPM library ..." 1>&5
4362
4363                         cat >>confdefs.h <<\EOF
4364 #define HAVE_LIBGPM 1
4365 EOF
4366
4367                 else
4368                         echo "$as_me:4368: checking for Gpm_Open in -lgpm" >&5
4369 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4370 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4371   echo $ECHO_N "(cached) $ECHO_C" >&6
4372 else
4373   ac_check_lib_save_LIBS=$LIBS
4374 LIBS="-lgpm  $LIBS"
4375 cat >conftest.$ac_ext <<_ACEOF
4376 #line 4376 "configure"
4377 #include "confdefs.h"
4378
4379 /* Override any gcc2 internal prototype to avoid an error.  */
4380 #ifdef __cplusplus
4381 extern "C"
4382 #endif
4383 /* We use char because int might match the return type of a gcc2
4384    builtin and then its argument prototype would still apply.  */
4385 char Gpm_Open ();
4386 int
4387 main ()
4388 {
4389 Gpm_Open ();
4390   ;
4391   return 0;
4392 }
4393 _ACEOF
4394 rm -f conftest.$ac_objext conftest$ac_exeext
4395 if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
4396   (eval $ac_link) 2>&5
4397   ac_status=$?
4398   echo "$as_me:4398: \$? = $ac_status" >&5
4399   (exit $ac_status); } &&
4400          { ac_try='test -s conftest$ac_exeext'
4401   { (eval echo "$as_me:4401: \"$ac_try\"") >&5
4402   (eval $ac_try) 2>&5
4403   ac_status=$?
4404   echo "$as_me:4404: \$? = $ac_status" >&5
4405   (exit $ac_status); }; }; then
4406   ac_cv_lib_gpm_Gpm_Open=yes
4407 else
4408   echo "$as_me: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4410 ac_cv_lib_gpm_Gpm_Open=no
4411 fi
4412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4413 LIBS=$ac_check_lib_save_LIBS
4414 fi
4415 echo "$as_me:4415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4416 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4417 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4418   :
4419 else
4420
4421                                 { { echo "$as_me:4421: error: Cannot link with GPM library" >&5
4422 echo "$as_me: error: Cannot link with GPM library" >&2;}
4423    { (exit 1); exit 1; }; }
4424                 fi
4425                 with_gpm=yes
4426
4427 fi
4428
4429 else
4430
4431                 test "$with_gpm" != maybe && { echo "$as_me:4431: WARNING: Cannot find GPM header" >&5
4432 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4433                 with_gpm=no
4434
4435 fi
4436
4437 fi
4438
4439 if test "$with_gpm" != no ; then
4440         echo "$as_me:4440: checking if you want to load GPM dynamically" >&5
4441 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4442
4443 # Check whether --with-dlsym or --without-dlsym was given.
4444 if test "${with_dlsym+set}" = set; then
4445   withval="$with_dlsym"
4446   with_dlsym=$withval
4447 else
4448   with_dlsym=yes
4449 fi;
4450         echo "$as_me:4450: result: $with_dlsym" >&5
4451 echo "${ECHO_T}$with_dlsym" >&6
4452         if test "$with_dlsym" = yes ; then
4453
4454 cf_have_dlsym=no
4455 echo "$as_me:4455: checking for dlsym" >&5
4456 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4457 if test "${ac_cv_func_dlsym+set}" = set; then
4458   echo $ECHO_N "(cached) $ECHO_C" >&6
4459 else
4460   cat >conftest.$ac_ext <<_ACEOF
4461 #line 4461 "configure"
4462 #include "confdefs.h"
4463 /* System header to define __stub macros and hopefully few prototypes,
4464     which can conflict with char dlsym (); below.  */
4465 #include <assert.h>
4466 /* Override any gcc2 internal prototype to avoid an error.  */
4467 #ifdef __cplusplus
4468 extern "C"
4469 #endif
4470 /* We use char because int might match the return type of a gcc2
4471    builtin and then its argument prototype would still apply.  */
4472 char dlsym ();
4473 char (*f) ();
4474
4475 int
4476 main ()
4477 {
4478 /* The GNU C library defines this for functions which it implements
4479     to always fail with ENOSYS.  Some functions are actually named
4480     something starting with __ and the normal name is an alias.  */
4481 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4482 choke me
4483 #else
4484 f = dlsym;
4485 #endif
4486
4487   ;
4488   return 0;
4489 }
4490 _ACEOF
4491 rm -f conftest.$ac_objext conftest$ac_exeext
4492 if { (eval echo "$as_me:4492: \"$ac_link\"") >&5
4493   (eval $ac_link) 2>&5
4494   ac_status=$?
4495   echo "$as_me:4495: \$? = $ac_status" >&5
4496   (exit $ac_status); } &&
4497          { ac_try='test -s conftest$ac_exeext'
4498   { (eval echo "$as_me:4498: \"$ac_try\"") >&5
4499   (eval $ac_try) 2>&5
4500   ac_status=$?
4501   echo "$as_me:4501: \$? = $ac_status" >&5
4502   (exit $ac_status); }; }; then
4503   ac_cv_func_dlsym=yes
4504 else
4505   echo "$as_me: failed program was:" >&5
4506 cat conftest.$ac_ext >&5
4507 ac_cv_func_dlsym=no
4508 fi
4509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4510 fi
4511 echo "$as_me:4511: result: $ac_cv_func_dlsym" >&5
4512 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4513 if test $ac_cv_func_dlsym = yes; then
4514   cf_have_dlsym=yes
4515 else
4516
4517 cf_have_libdl=no
4518 echo "$as_me:4518: checking for dlsym in -ldl" >&5
4519 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4520 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4521   echo $ECHO_N "(cached) $ECHO_C" >&6
4522 else
4523   ac_check_lib_save_LIBS=$LIBS
4524 LIBS="-ldl  $LIBS"
4525 cat >conftest.$ac_ext <<_ACEOF
4526 #line 4526 "configure"
4527 #include "confdefs.h"
4528
4529 /* Override any gcc2 internal prototype to avoid an error.  */
4530 #ifdef __cplusplus
4531 extern "C"
4532 #endif
4533 /* We use char because int might match the return type of a gcc2
4534    builtin and then its argument prototype would still apply.  */
4535 char dlsym ();
4536 int
4537 main ()
4538 {
4539 dlsym ();
4540   ;
4541   return 0;
4542 }
4543 _ACEOF
4544 rm -f conftest.$ac_objext conftest$ac_exeext
4545 if { (eval echo "$as_me:4545: \"$ac_link\"") >&5
4546   (eval $ac_link) 2>&5
4547   ac_status=$?
4548   echo "$as_me:4548: \$? = $ac_status" >&5
4549   (exit $ac_status); } &&
4550          { ac_try='test -s conftest$ac_exeext'
4551   { (eval echo "$as_me:4551: \"$ac_try\"") >&5
4552   (eval $ac_try) 2>&5
4553   ac_status=$?
4554   echo "$as_me:4554: \$? = $ac_status" >&5
4555   (exit $ac_status); }; }; then
4556   ac_cv_lib_dl_dlsym=yes
4557 else
4558   echo "$as_me: failed program was:" >&5
4559 cat conftest.$ac_ext >&5
4560 ac_cv_lib_dl_dlsym=no
4561 fi
4562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4563 LIBS=$ac_check_lib_save_LIBS
4564 fi
4565 echo "$as_me:4565: result: $ac_cv_lib_dl_dlsym" >&5
4566 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4567 if test $ac_cv_lib_dl_dlsym = yes; then
4568
4569         cf_have_dlsym=yes
4570         cf_have_libdl=yes
4571 fi
4572
4573 fi
4574
4575 if test "$cf_have_dlsym" = yes ; then
4576         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4577
4578         echo "$as_me:4578: checking whether able to link to dl*() functions" >&5
4579 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4580         cat >conftest.$ac_ext <<_ACEOF
4581 #line 4581 "configure"
4582 #include "confdefs.h"
4583 #include <dlfcn.h>
4584 int
4585 main ()
4586 {
4587
4588                 void *obj;
4589                 if ((obj = dlopen("filename", 0)) != 0) {
4590                         if (dlsym(obj, "symbolname") == 0) {
4591                         dlclose(obj);
4592                         }
4593                 }
4594   ;
4595   return 0;
4596 }
4597 _ACEOF
4598 rm -f conftest.$ac_objext conftest$ac_exeext
4599 if { (eval echo "$as_me:4599: \"$ac_link\"") >&5
4600   (eval $ac_link) 2>&5
4601   ac_status=$?
4602   echo "$as_me:4602: \$? = $ac_status" >&5
4603   (exit $ac_status); } &&
4604          { ac_try='test -s conftest$ac_exeext'
4605   { (eval echo "$as_me:4605: \"$ac_try\"") >&5
4606   (eval $ac_try) 2>&5
4607   ac_status=$?
4608   echo "$as_me:4608: \$? = $ac_status" >&5
4609   (exit $ac_status); }; }; then
4610
4611                 cat >>confdefs.h <<\EOF
4612 #define HAVE_LIBDL 1
4613 EOF
4614
4615 else
4616   echo "$as_me: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618
4619                 { { echo "$as_me:4619: error: Cannot link test program for libdl" >&5
4620 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4621    { (exit 1); exit 1; }; }
4622 fi
4623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4624         echo "$as_me:4624: result: ok" >&5
4625 echo "${ECHO_T}ok" >&6
4626 else
4627         { { echo "$as_me:4627: error: Cannot find dlsym function" >&5
4628 echo "$as_me: error: Cannot find dlsym function" >&2;}
4629    { (exit 1); exit 1; }; }
4630 fi
4631
4632                 if test "$with_gpm" != yes ; then
4633                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4634
4635 echo "${as_me-configure}:4635: testing assuming soname for gpm is $with_gpm ..." 1>&5
4636
4637                         cf_cv_gpm_soname="$with_gpm"
4638                 else
4639
4640 echo "$as_me:4640: checking for soname of gpm library" >&5
4641 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4642 if test "${cf_cv_gpm_soname+set}" = set; then
4643   echo $ECHO_N "(cached) $ECHO_C" >&6
4644 else
4645
4646 cf_cv_gpm_soname=unknown
4647 if test "$cross_compiling" != yes ; then
4648 cat >conftest.$ac_ext <<CF_EOF
4649 #include <gpm.h>
4650 int main()
4651 {
4652 if (Gpm_Open(0,0)) Gpm_Close();
4653         ${cf_cv_main_return:-return}(0);
4654 }
4655 CF_EOF
4656 cf_save_LIBS="$LIBS"
4657         LIBS="-lgpm $LIBS"
4658         if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
4659   (eval $ac_compile) 2>&5
4660   ac_status=$?
4661   echo "$as_me:4661: \$? = $ac_status" >&5
4662   (exit $ac_status); } ; then
4663                 if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
4664   (eval $ac_link) 2>&5
4665   ac_status=$?
4666   echo "$as_me:4666: \$? = $ac_status" >&5
4667   (exit $ac_status); } ; then
4668                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4669                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4670                 fi
4671         fi
4672 rm -f conftest*
4673 LIBS="$cf_save_LIBS"
4674 fi
4675
4676 fi
4677 echo "$as_me:4677: result: $cf_cv_gpm_soname" >&5
4678 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4679
4680                 fi
4681                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4682 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4683 EOF
4684
4685                 SHLIB_LIST="-ldl $SHLIB_LIST"
4686         else
4687                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4688         fi
4689         cat >>confdefs.h <<\EOF
4690 #define HAVE_LIBGPM 1
4691 EOF
4692
4693 echo "$as_me:4693: checking for Gpm_Wgetch in -lgpm" >&5
4694 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4695 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   ac_check_lib_save_LIBS=$LIBS
4699 LIBS="-lgpm  $LIBS"
4700 cat >conftest.$ac_ext <<_ACEOF
4701 #line 4701 "configure"
4702 #include "confdefs.h"
4703
4704 /* Override any gcc2 internal prototype to avoid an error.  */
4705 #ifdef __cplusplus
4706 extern "C"
4707 #endif
4708 /* We use char because int might match the return type of a gcc2
4709    builtin and then its argument prototype would still apply.  */
4710 char Gpm_Wgetch ();
4711 int
4712 main ()
4713 {
4714 Gpm_Wgetch ();
4715   ;
4716   return 0;
4717 }
4718 _ACEOF
4719 rm -f conftest.$ac_objext conftest$ac_exeext
4720 if { (eval echo "$as_me:4720: \"$ac_link\"") >&5
4721   (eval $ac_link) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); } &&
4725          { ac_try='test -s conftest$ac_exeext'
4726   { (eval echo "$as_me:4726: \"$ac_try\"") >&5
4727   (eval $ac_try) 2>&5
4728   ac_status=$?
4729   echo "$as_me:4729: \$? = $ac_status" >&5
4730   (exit $ac_status); }; }; then
4731   ac_cv_lib_gpm_Gpm_Wgetch=yes
4732 else
4733   echo "$as_me: failed program was:" >&5
4734 cat conftest.$ac_ext >&5
4735 ac_cv_lib_gpm_Gpm_Wgetch=no
4736 fi
4737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4738 LIBS=$ac_check_lib_save_LIBS
4739 fi
4740 echo "$as_me:4740: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4741 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4742 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4743
4744 echo "$as_me:4744: checking if GPM is weakly bound to curses library" >&5
4745 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4746 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 else
4749
4750 cf_cv_check_gpm_wgetch=unknown
4751 if test "$cross_compiling" != yes ; then
4752
4753 cat >conftest.$ac_ext <<CF_EOF
4754 #include <gpm.h>
4755 int main()
4756 {
4757         Gpm_Wgetch();
4758         ${cf_cv_main_return:-return}(0);
4759 }
4760 CF_EOF
4761
4762         cf_save_LIBS="$LIBS"
4763         # This only works if we can look at the symbol table.  If a shared
4764         # library is stripped for install, we cannot use that.  So we're forced
4765         # to rely on the static library, noting that some packagers may not
4766         # include it.
4767         LIBS="-static -lgpm -dynamic $LIBS"
4768         if { (eval echo "$as_me:4768: \"$ac_compile\"") >&5
4769   (eval $ac_compile) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); } ; then
4773                 if { (eval echo "$as_me:4773: \"$ac_link\"") >&5
4774   (eval $ac_link) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); } ; then
4778                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4779                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4780                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4781                 fi
4782         fi
4783         rm -f conftest*
4784         LIBS="$cf_save_LIBS"
4785 fi
4786
4787 fi
4788 echo "$as_me:4788: result: $cf_cv_check_gpm_wgetch" >&5
4789 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4790
4791 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4792         { echo "$as_me:4792: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4793 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4794 fi
4795
4796 fi
4797
4798 fi
4799
4800 # not everyone has "test -c"
4801 if test -c /dev/sysmouse 2>/dev/null ; then
4802 echo "$as_me:4802: checking if you want to use sysmouse" >&5
4803 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4804
4805 # Check whether --with-sysmouse or --without-sysmouse was given.
4806 if test "${with_sysmouse+set}" = set; then
4807   withval="$with_sysmouse"
4808   cf_with_sysmouse=$withval
4809 else
4810   cf_with_sysmouse=maybe
4811 fi;
4812         if test "$cf_with_sysmouse" != no ; then
4813         cat >conftest.$ac_ext <<_ACEOF
4814 #line 4814 "configure"
4815 #include "confdefs.h"
4816
4817 #include <osreldate.h>
4818 #if (__FreeBSD_version >= 400017)
4819 #include <sys/consio.h>
4820 #include <sys/fbio.h>
4821 #else
4822 #include <machine/console.h>
4823 #endif
4824
4825 int
4826 main ()
4827 {
4828
4829         struct mouse_info the_mouse;
4830         ioctl(0, CONS_MOUSECTL, &the_mouse);
4831
4832   ;
4833   return 0;
4834 }
4835 _ACEOF
4836 rm -f conftest.$ac_objext
4837 if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
4838   (eval $ac_compile) 2>&5
4839   ac_status=$?
4840   echo "$as_me:4840: \$? = $ac_status" >&5
4841   (exit $ac_status); } &&
4842          { ac_try='test -s conftest.$ac_objext'
4843   { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844   (eval $ac_try) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); }; }; then
4848   cf_with_sysmouse=yes
4849 else
4850   echo "$as_me: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 cf_with_sysmouse=no
4853 fi
4854 rm -f conftest.$ac_objext conftest.$ac_ext
4855         fi
4856 echo "$as_me:4856: result: $cf_with_sysmouse" >&5
4857 echo "${ECHO_T}$cf_with_sysmouse" >&6
4858 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4859 #define USE_SYSMOUSE 1
4860 EOF
4861
4862 fi
4863
4864 if test X"$CC_G_OPT" = X"" ; then
4865         CC_G_OPT='-g'
4866         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4867 fi
4868
4869 if test X"$CXX_G_OPT" = X"" ; then
4870         CXX_G_OPT='-g'
4871         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4872 fi
4873
4874 echo "$as_me:4874: checking for default loader flags" >&5
4875 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4876 case $DFT_LWR_MODEL in
4877 libtool) LD_MODEL=''   ;;
4878 normal)  LD_MODEL=''   ;;
4879 debug)   LD_MODEL=$CC_G_OPT ;;
4880 profile) LD_MODEL='-pg';;
4881 shared)  LD_MODEL=''   ;;
4882 esac
4883 echo "$as_me:4883: result: $LD_MODEL" >&5
4884 echo "${ECHO_T}$LD_MODEL" >&6
4885
4886 case $DFT_LWR_MODEL in
4887 shared)
4888
4889 echo "$as_me:4889: checking if rpath option should be used" >&5
4890 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4891
4892 # Check whether --enable-rpath or --disable-rpath was given.
4893 if test "${enable_rpath+set}" = set; then
4894   enableval="$enable_rpath"
4895   cf_cv_ld_rpath=$enableval
4896 else
4897   cf_cv_ld_rpath=no
4898 fi;
4899 echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
4900 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4901
4902 echo "$as_me:4902: checking if shared libraries should be relinked during install" >&5
4903 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4904
4905 # Check whether --enable-relink or --disable-relink was given.
4906 if test "${enable_relink+set}" = set; then
4907   enableval="$enable_relink"
4908   cf_cv_do_relink=$enableval
4909 else
4910   cf_cv_do_relink=yes
4911 fi;
4912 echo "$as_me:4912: result: $cf_cv_do_relink" >&5
4913 echo "${ECHO_T}$cf_cv_do_relink" >&6
4914         ;;
4915 esac
4916
4917         LOCAL_LDFLAGS=
4918         LOCAL_LDFLAGS2=
4919         LD_SHARED_OPTS=
4920         INSTALL_LIB="-m 644"
4921
4922         cf_cv_do_symlinks=no
4923
4924         echo "$as_me:4924: checking if release/abi version should be used for shared libs" >&5
4925 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4926
4927 # Check whether --with-shlib-version or --without-shlib-version was given.
4928 if test "${with_shlib_version+set}" = set; then
4929   withval="$with_shlib_version"
4930   test -z "$withval" && withval=auto
4931         case $withval in #(vi
4932         yes) #(vi
4933                 cf_cv_shlib_version=auto
4934                 ;;
4935         rel|abi|auto|no) #(vi
4936                 cf_cv_shlib_version=$withval
4937                 ;;
4938         *)
4939                 { { echo "$as_me:4939: error: option value must be one of: rel, abi, auto or no" >&5
4940 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4941    { (exit 1); exit 1; }; }
4942                 ;;
4943         esac
4944
4945 else
4946   cf_cv_shlib_version=auto
4947 fi;
4948         echo "$as_me:4948: result: $cf_cv_shlib_version" >&5
4949 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4950
4951         cf_cv_rm_so_locs=no
4952
4953         # Some less-capable ports of gcc support only -fpic
4954         CC_SHARED_OPTS=
4955         if test "$GCC" = yes
4956         then
4957                 echo "$as_me:4957: checking which $CC option to use" >&5
4958 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4959                 cf_save_CFLAGS="$CFLAGS"
4960                 for CC_SHARED_OPTS in -fPIC -fpic ''
4961                 do
4962                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4963                         cat >conftest.$ac_ext <<_ACEOF
4964 #line 4964 "configure"
4965 #include "confdefs.h"
4966 #include <stdio.h>
4967 int
4968 main ()
4969 {
4970 int x = 1
4971   ;
4972   return 0;
4973 }
4974 _ACEOF
4975 rm -f conftest.$ac_objext
4976 if { (eval echo "$as_me:4976: \"$ac_compile\"") >&5
4977   (eval $ac_compile) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); } &&
4981          { ac_try='test -s conftest.$ac_objext'
4982   { (eval echo "$as_me:4982: \"$ac_try\"") >&5
4983   (eval $ac_try) 2>&5
4984   ac_status=$?
4985   echo "$as_me:4985: \$? = $ac_status" >&5
4986   (exit $ac_status); }; }; then
4987   break
4988 else
4989   echo "$as_me: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4991 fi
4992 rm -f conftest.$ac_objext conftest.$ac_ext
4993                 done
4994                 echo "$as_me:4994: result: $CC_SHARED_OPTS" >&5
4995 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4996                 CFLAGS="$cf_save_CFLAGS"
4997         fi
4998
4999         cf_cv_shlib_version_infix=no
5000
5001         case $cf_cv_system_name in
5002         beos*)
5003                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5004                 ;;
5005         cygwin*)
5006                 CC_SHARED_OPTS=
5007                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5008                 cf_cv_shlib_version=cygdll
5009                 cf_cv_shlib_version_infix=cygdll
5010                 cat >mk_shared_lib.sh <<-CF_EOF
5011                 #!/bin/sh
5012                 SHARED_LIB=\$1
5013                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5014                 shift
5015                 cat <<-EOF
5016                 Linking shared library
5017                 ** SHARED_LIB \$SHARED_LIB
5018                 ** IMPORT_LIB \$IMPORT_LIB
5019 EOF
5020                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5021 CF_EOF
5022                 chmod +x mk_shared_lib.sh
5023                 ;;
5024         darwin*)
5025                 EXTRA_CFLAGS="-no-cpp-precomp"
5026                 CC_SHARED_OPTS="-dynamic"
5027                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5028                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5029                 cf_cv_shlib_version_infix=yes
5030                 echo "$as_me:5030: checking if ld -search_paths_first works" >&5
5031 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5032 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5033   echo $ECHO_N "(cached) $ECHO_C" >&6
5034 else
5035
5036                         cf_save_LDFLAGS=$LDFLAGS
5037                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5038                         cat >conftest.$ac_ext <<_ACEOF
5039 #line 5039 "configure"
5040 #include "confdefs.h"
5041
5042 int
5043 main ()
5044 {
5045 int i;
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 rm -f conftest.$ac_objext conftest$ac_exeext
5051 if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052   (eval $ac_link) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -s conftest$ac_exeext'
5057   { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058   (eval $ac_try) 2>&5
5059   ac_status=$?
5060   echo "$as_me:5060: \$? = $ac_status" >&5
5061   (exit $ac_status); }; }; then
5062   cf_cv_ldflags_search_paths_first=yes
5063 else
5064   echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 cf_cv_ldflags_search_paths_first=no
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069                                 LDFLAGS=$cf_save_LDFLAGS
5070 fi
5071 echo "$as_me:5071: result: $cf_cv_ldflags_search_paths_first" >&5
5072 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5073                 if test $cf_cv_ldflags_search_paths_first = yes; then
5074                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5075                 fi
5076                 ;;
5077         hpux*)
5078                 # (tested with gcc 2.7.2 -- I don't have c89)
5079                 if test "$GCC" = yes; then
5080                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5081                 else
5082                         CC_SHARED_OPTS='+Z'
5083                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5084                 fi
5085                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5086                 # HP-UX shared libraries must be executable, and should be
5087                 # readonly to exploit a quirk in the memory manager.
5088                 INSTALL_LIB="-m 555"
5089                 ;;
5090         irix*)
5091                 if test "$cf_cv_ld_rpath" = yes ; then
5092                         if test "$GCC" = yes; then
5093                                 cf_ld_rpath_opt="-Wl,-rpath,"
5094                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5095                         else
5096                                 cf_ld_rpath_opt="-rpath "
5097                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5098                         fi
5099                 fi
5100                 # tested with IRIX 5.2 and 'cc'.
5101                 if test "$GCC" != yes; then
5102                         CC_SHARED_OPTS='-KPIC'
5103                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5104                 else
5105                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5106                 fi
5107                 cf_cv_rm_so_locs=yes
5108                 ;;
5109         linux*|gnu*|k*bsd*-gnu)
5110                 if test "$DFT_LWR_MODEL" = "shared" ; then
5111                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5112                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5113                 fi
5114                 if test "$cf_cv_ld_rpath" = yes ; then
5115                         cf_ld_rpath_opt="-Wl,-rpath,"
5116                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5117                 fi
5118
5119         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5120         if test "$cf_cv_shlib_version" = rel; then
5121                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5122         else
5123                 cf_cv_shared_soname='`basename $@`'
5124         fi
5125
5126                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5127                 ;;
5128         openbsd[2-9].*)
5129                 if test "$DFT_LWR_MODEL" = "shared" ; then
5130                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5131                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5132                 fi
5133                 if test "$cf_cv_ld_rpath" = yes ; then
5134                         cf_ld_rpath_opt="-Wl,-rpath,"
5135                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5136                 fi
5137                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5138
5139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140         if test "$cf_cv_shlib_version" = rel; then
5141                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5142         else
5143                 cf_cv_shared_soname='`basename $@`'
5144         fi
5145
5146                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5147                 ;;
5148         openbsd*|freebsd[12].*)
5149                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5150                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5151                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5152                 ;;
5153         freebsd*)
5154                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5155                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5156                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5157                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5158                         cf_ld_rpath_opt="-rpath "
5159                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
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_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165         else
5166                 cf_cv_shared_soname='`basename $@`'
5167         fi
5168
5169                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5170                 ;;
5171         netbsd*)
5172                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5173                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5174                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5175                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5176                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5177                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5178                         if test "$cf_cv_shlib_version" = auto; then
5179                         if test -f /usr/libexec/ld.elf_so; then
5180                                 cf_cv_shlib_version=abi
5181                         else
5182                                 cf_cv_shlib_version=rel
5183                         fi
5184                         fi
5185
5186         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5187         if test "$cf_cv_shlib_version" = rel; then
5188                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5189         else
5190                 cf_cv_shared_soname='`basename $@`'
5191         fi
5192
5193                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5194                 else
5195                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5196                 fi
5197                 ;;
5198         osf*|mls+*)
5199                 # tested with OSF/1 V3.2 and 'cc'
5200                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5201                 # link with shared libs).
5202                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5203                 case $host_os in
5204                 osf4*)
5205                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5206                         ;;
5207                 esac
5208                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5209                 if test "$DFT_LWR_MODEL" = "shared" ; then
5210                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5211                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5212                 fi
5213                 if test "$cf_cv_ld_rpath" = yes ; then
5214                         cf_ld_rpath_opt="-rpath"
5215                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5216                 fi
5217                 cf_cv_rm_so_locs=yes
5218                 ;;
5219         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5220                 # tested with osr5.0.5
5221                 if test "$GCC" != yes; then
5222                         CC_SHARED_OPTS='-belf -KPIC'
5223                 fi
5224                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5225                 if test "$cf_cv_ld_rpath" = yes ; then
5226                         # only way is to set LD_RUN_PATH but no switch for it
5227                         RUN_PATH=$libdir
5228                 fi
5229                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5230                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5231                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5232                 ;;
5233         sunos4*)
5234                 # tested with SunOS 4.1.1 and gcc 2.7.0
5235                 if test "$GCC" != yes; then
5236                         CC_SHARED_OPTS='-KPIC'
5237                 fi
5238                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5239                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5240                 ;;
5241         solaris2*)
5242                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5243                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5244                 if test "$DFT_LWR_MODEL" = "shared" ; then
5245                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5246                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5247                 fi
5248                 if test "$cf_cv_ld_rpath" = yes ; then
5249                         cf_ld_rpath_opt="-R"
5250                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5251                 fi
5252
5253         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5254         if test "$cf_cv_shlib_version" = rel; then
5255                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5256         else
5257                 cf_cv_shared_soname='`basename $@`'
5258         fi
5259
5260                 if test "$GCC" != yes; then
5261                         CC_SHARED_OPTS='-xcode=pic32'
5262                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5263                 else
5264                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5265                 fi
5266                 ;;
5267         sysv5uw7*|unix_sv*)
5268                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5269                 if test "$GCC" != yes; then
5270                         CC_SHARED_OPTS='-KPIC'
5271                 fi
5272                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5273                 ;;
5274         *)
5275                 CC_SHARED_OPTS='unknown'
5276                 MK_SHARED_LIB='echo unknown'
5277                 ;;
5278         esac
5279
5280         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5281         case "$cf_cv_shlib_version" in #(vi
5282         rel|abi)
5283                 case "$MK_SHARED_LIB" in #(vi
5284                 *'-o $@')
5285                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5286                         ;;
5287                 *)
5288                         { echo "$as_me:5288: WARNING: ignored --with-shlib-version" >&5
5289 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5290                         ;;
5291                 esac
5292                 ;;
5293         esac
5294
5295         if test -n "$cf_ld_rpath_opt" ; then
5296                 echo "$as_me:5296: checking if we need a space after rpath option" >&5
5297 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5298                 cf_save_LIBS="$LIBS"
5299                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5300                 cat >conftest.$ac_ext <<_ACEOF
5301 #line 5301 "configure"
5302 #include "confdefs.h"
5303
5304 int
5305 main ()
5306 {
5307
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext conftest$ac_exeext
5313 if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
5314   (eval $ac_link) 2>&5
5315   ac_status=$?
5316   echo "$as_me:5316: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest$ac_exeext'
5319   { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   cf_rpath_space=no
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 cf_rpath_space=yes
5329 fi
5330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5331                 LIBS="$cf_save_LIBS"
5332                 echo "$as_me:5332: result: $cf_rpath_space" >&5
5333 echo "${ECHO_T}$cf_rpath_space" >&6
5334                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5335                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5336         fi
5337
5338 if test "$CC_SHARED_OPTS" = "unknown"; then
5339         for model in $cf_list_models; do
5340                 if test "$model" = "shared"; then
5341                         { { echo "$as_me:5341: error: Shared libraries are not supported in this version" >&5
5342 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5343    { (exit 1); exit 1; }; }
5344                 fi
5345         done
5346 fi
5347
5348 ###############################################################################
5349
5350 ###     use option --disable-overwrite to leave out the link to -lcurses
5351 echo "$as_me:5351: checking if you wish to install ncurses overwriting curses" >&5
5352 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5353
5354 # Check whether --enable-overwrite or --disable-overwrite was given.
5355 if test "${enable_overwrite+set}" = set; then
5356   enableval="$enable_overwrite"
5357   with_overwrite=$enableval
5358 else
5359   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5360 fi;
5361 echo "$as_me:5361: result: $with_overwrite" >&5
5362 echo "${ECHO_T}$with_overwrite" >&6
5363
5364 echo "$as_me:5364: checking if external terminfo-database is used" >&5
5365 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5366
5367 # Check whether --enable-database or --disable-database was given.
5368 if test "${enable_database+set}" = set; then
5369   enableval="$enable_database"
5370   use_database=$enableval
5371 else
5372   use_database=yes
5373 fi;
5374 echo "$as_me:5374: result: $use_database" >&5
5375 echo "${ECHO_T}$use_database" >&6
5376
5377 case $host_os in #(vi
5378 os2*) #(vi
5379         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5380         ;;
5381 *) #(vi
5382         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5383         ;;
5384 esac
5385
5386         case $cf_cv_system_name in
5387         os2*)   PATHSEP=';'  ;;
5388         *)      PATHSEP=':'  ;;
5389         esac
5390
5391 if test "$use_database" != no ; then
5392         cat >>confdefs.h <<\EOF
5393 #define USE_DATABASE 1
5394 EOF
5395
5396         echo "$as_me:5396: checking which terminfo source-file will be installed" >&5
5397 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5398
5399 # Check whether --enable-database or --disable-database was given.
5400 if test "${enable_database+set}" = set; then
5401   enableval="$enable_database"
5402   TERMINFO_SRC=$withval
5403 fi;
5404         echo "$as_me:5404: result: $TERMINFO_SRC" >&5
5405 echo "${ECHO_T}$TERMINFO_SRC" >&6
5406
5407         echo "$as_me:5407: checking whether to use hashed database instead of directory/tree" >&5
5408 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5409
5410 # Check whether --with-hashed-db or --without-hashed-db was given.
5411 if test "${with_hashed_db+set}" = set; then
5412   withval="$with_hashed_db"
5413
5414 else
5415   with_hashed_db=no
5416 fi;
5417         echo "$as_me:5417: result: $with_hashed_db" >&5
5418 echo "${ECHO_T}$with_hashed_db" >&6
5419 else
5420         with_hashed_db=no
5421 fi
5422
5423 echo "$as_me:5423: checking for list of fallback descriptions" >&5
5424 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5425
5426 # Check whether --with-fallbacks or --without-fallbacks was given.
5427 if test "${with_fallbacks+set}" = set; then
5428   withval="$with_fallbacks"
5429   with_fallback=$withval
5430 else
5431   with_fallback=
5432 fi;
5433 echo "$as_me:5433: result: $with_fallback" >&5
5434 echo "${ECHO_T}$with_fallback" >&6
5435 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5436
5437 echo "$as_me:5437: checking if you want modern xterm or antique" >&5
5438 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5439
5440 # Check whether --with-xterm-new or --without-xterm-new was given.
5441 if test "${with_xterm_new+set}" = set; then
5442   withval="$with_xterm_new"
5443   with_xterm_new=$withval
5444 else
5445   with_xterm_new=yes
5446 fi;
5447 case $with_xterm_new in
5448 no)     with_xterm_new=xterm-old;;
5449 *)      with_xterm_new=xterm-new;;
5450 esac
5451 echo "$as_me:5451: result: $with_xterm_new" >&5
5452 echo "${ECHO_T}$with_xterm_new" >&6
5453 WHICH_XTERM=$with_xterm_new
5454
5455 MAKE_TERMINFO=
5456 if test "$use_database" = no ; then
5457         TERMINFO="${datadir}/terminfo"
5458         MAKE_TERMINFO="#"
5459 else
5460
5461 echo "$as_me:5461: checking for list of terminfo directories" >&5
5462 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5463
5464 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5465 if test "${with_terminfo_dirs+set}" = set; then
5466   withval="$with_terminfo_dirs"
5467
5468 else
5469   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5470 fi;
5471 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5472 cf_dst_path=
5473 for cf_src_path in $withval
5474 do
5475
5476 if test "x$prefix" != xNONE; then
5477   cf_path_syntax="$prefix"
5478 else
5479   cf_path_syntax="$ac_default_prefix"
5480 fi
5481
5482 case ".$cf_src_path" in #(vi
5483 .\$\(*\)*|.\'*\'*) #(vi
5484   ;;
5485 ..|./*|.\\*) #(vi
5486   ;;
5487 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5488   ;;
5489 .\${*prefix}*) #(vi
5490   eval cf_src_path="$cf_src_path"
5491   case ".$cf_src_path" in #(vi
5492   .NONE/*)
5493     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5494     ;;
5495   esac
5496   ;; #(vi
5497 .no|.NONE/*)
5498   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5499   ;;
5500 *)
5501   { { echo "$as_me:5501: error: expected a pathname, not \"$cf_src_path\"" >&5
5502 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5503    { (exit 1); exit 1; }; }
5504   ;;
5505 esac
5506
5507   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5508   cf_dst_path="${cf_dst_path}${cf_src_path}"
5509 done
5510 IFS="$ac_save_ifs"
5511
5512 eval 'TERMINFO_DIRS="$cf_dst_path"'
5513
5514 echo "$as_me:5514: result: $TERMINFO_DIRS" >&5
5515 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5516 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5517 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5518 EOF
5519
5520 echo "$as_me:5520: checking for default terminfo directory" >&5
5521 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5522
5523 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5524 if test "${with_default_terminfo_dir+set}" = set; then
5525   withval="$with_default_terminfo_dir"
5526
5527 else
5528   withval="${TERMINFO-${datadir}/terminfo}"
5529 fi; if test -n "${datadir}/terminfo" ; then
5530
5531 if test "x$prefix" != xNONE; then
5532   cf_path_syntax="$prefix"
5533 else
5534   cf_path_syntax="$ac_default_prefix"
5535 fi
5536
5537 case ".$withval" in #(vi
5538 .\$\(*\)*|.\'*\'*) #(vi
5539   ;;
5540 ..|./*|.\\*) #(vi
5541   ;;
5542 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5543   ;;
5544 .\${*prefix}*) #(vi
5545   eval withval="$withval"
5546   case ".$withval" in #(vi
5547   .NONE/*)
5548     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5549     ;;
5550   esac
5551   ;; #(vi
5552 .no|.NONE/*)
5553   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5554   ;;
5555 *)
5556   { { echo "$as_me:5556: error: expected a pathname, not \"$withval\"" >&5
5557 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5558    { (exit 1); exit 1; }; }
5559   ;;
5560 esac
5561
5562 fi
5563 TERMINFO="$withval"
5564
5565 echo "$as_me:5565: result: $TERMINFO" >&5
5566 echo "${ECHO_T}$TERMINFO" >&6
5567 cat >>confdefs.h <<EOF
5568 #define TERMINFO "$TERMINFO"
5569 EOF
5570
5571 fi
5572
5573 ###     use option --disable-big-core to make tic run on small machines
5574 ###     We need 4Mb, check if we can allocate 50% more than that.
5575 echo "$as_me:5575: checking if big-core option selected" >&5
5576 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5577
5578 # Check whether --enable-big-core or --disable-big-core was given.
5579 if test "${enable_big_core+set}" = set; then
5580   enableval="$enable_big_core"
5581   with_big_core=$enableval
5582 else
5583   if test "$cross_compiling" = yes; then
5584   with_big_core=no
5585 else
5586   cat >conftest.$ac_ext <<_ACEOF
5587 #line 5587 "configure"
5588 #include "confdefs.h"
5589
5590 #include <stdlib.h>
5591 #include <string.h>
5592 int main() {
5593         unsigned long n = 6000000L;
5594         char *s = malloc(n);
5595         if (s != 0)
5596                 s[0] = s[n-1] = 0;
5597         ${cf_cv_main_return:-return}(s == 0);
5598 }
5599 _ACEOF
5600 rm -f conftest$ac_exeext
5601 if { (eval echo "$as_me:5601: \"$ac_link\"") >&5
5602   (eval $ac_link) 2>&5
5603   ac_status=$?
5604   echo "$as_me:5604: \$? = $ac_status" >&5
5605   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5606   { (eval echo "$as_me:5606: \"$ac_try\"") >&5
5607   (eval $ac_try) 2>&5
5608   ac_status=$?
5609   echo "$as_me:5609: \$? = $ac_status" >&5
5610   (exit $ac_status); }; }; then
5611   with_big_core=yes
5612 else
5613   echo "$as_me: program exited with status $ac_status" >&5
5614 echo "$as_me: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 with_big_core=no
5617 fi
5618 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5619 fi
5620 fi;
5621 echo "$as_me:5621: result: $with_big_core" >&5
5622 echo "${ECHO_T}$with_big_core" >&6
5623 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5624 #define HAVE_BIG_CORE 1
5625 EOF
5626
5627 ### ISO C only guarantees 512-char strings, we have tables which load faster
5628 ### when constructed using "big" strings.  More than the C compiler, the awk
5629 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5630 echo "$as_me:5630: checking if big-strings option selected" >&5
5631 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5632
5633 # Check whether --enable-big-strings or --disable-big-strings was given.
5634 if test "${enable_big_strings+set}" = set; then
5635   enableval="$enable_big_strings"
5636   with_big_strings=$enableval
5637 else
5638
5639     case x$AWK in #(vi
5640     x)
5641         eval with_big_strings=no
5642         ;;
5643     *) #(vi
5644         if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5645             | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
5646             eval with_big_strings=yes
5647         else
5648             eval with_big_strings=no
5649         fi
5650         ;;
5651     esac
5652
5653 fi;
5654 echo "$as_me:5654: result: $with_big_strings" >&5
5655 echo "${ECHO_T}$with_big_strings" >&6
5656
5657 USE_BIG_STRINGS=0
5658 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5659
5660 ###     use option --enable-termcap to compile in the termcap fallback support
5661 echo "$as_me:5661: checking if you want termcap-fallback support" >&5
5662 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5663
5664 # Check whether --enable-termcap or --disable-termcap was given.
5665 if test "${enable_termcap+set}" = set; then
5666   enableval="$enable_termcap"
5667   with_termcap=$enableval
5668 else
5669   with_termcap=no
5670 fi;
5671 echo "$as_me:5671: result: $with_termcap" >&5
5672 echo "${ECHO_T}$with_termcap" >&6
5673
5674 if test "$with_termcap" != "yes" ; then
5675         if test "$use_database" = no ; then
5676                 if test -z "$with_fallback" ; then
5677                         { { echo "$as_me:5677: error: You have disabled the database w/o specifying fallbacks" >&5
5678 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5679    { (exit 1); exit 1; }; }
5680                 fi
5681         fi
5682         cat >>confdefs.h <<\EOF
5683 #define PURE_TERMINFO 1
5684 EOF
5685
5686 else
5687
5688 if test "$with_ticlib" != no ; then
5689         { { echo "$as_me:5689: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5690 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5691    { (exit 1); exit 1; }; }
5692 fi
5693
5694 cat >>confdefs.h <<\EOF
5695 #define USE_TERMCAP 1
5696 EOF
5697
5698 echo "$as_me:5698: checking for list of termcap files" >&5
5699 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5700
5701 # Check whether --with-termpath or --without-termpath was given.
5702 if test "${with_termpath+set}" = set; then
5703   withval="$with_termpath"
5704
5705 else
5706   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5707 fi;
5708 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5709 cf_dst_path=
5710 for cf_src_path in $withval
5711 do
5712
5713 if test "x$prefix" != xNONE; then
5714   cf_path_syntax="$prefix"
5715 else
5716   cf_path_syntax="$ac_default_prefix"
5717 fi
5718
5719 case ".$cf_src_path" in #(vi
5720 .\$\(*\)*|.\'*\'*) #(vi
5721   ;;
5722 ..|./*|.\\*) #(vi
5723   ;;
5724 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5725   ;;
5726 .\${*prefix}*) #(vi
5727   eval cf_src_path="$cf_src_path"
5728   case ".$cf_src_path" in #(vi
5729   .NONE/*)
5730     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5731     ;;
5732   esac
5733   ;; #(vi
5734 .no|.NONE/*)
5735   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5736   ;;
5737 *)
5738   { { echo "$as_me:5738: error: expected a pathname, not \"$cf_src_path\"" >&5
5739 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5740    { (exit 1); exit 1; }; }
5741   ;;
5742 esac
5743
5744   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5745   cf_dst_path="${cf_dst_path}${cf_src_path}"
5746 done
5747 IFS="$ac_save_ifs"
5748
5749 eval 'TERMPATH="$cf_dst_path"'
5750
5751 echo "$as_me:5751: result: $TERMPATH" >&5
5752 echo "${ECHO_T}$TERMPATH" >&6
5753 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5754 #define TERMPATH "$TERMPATH"
5755 EOF
5756
5757 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5758 echo "$as_me:5758: checking if fast termcap-loader is needed" >&5
5759 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5760
5761 # Check whether --enable-getcap or --disable-getcap was given.
5762 if test "${enable_getcap+set}" = set; then
5763   enableval="$enable_getcap"
5764   with_getcap=$enableval
5765 else
5766   with_getcap=no
5767 fi;
5768 echo "$as_me:5768: result: $with_getcap" >&5
5769 echo "${ECHO_T}$with_getcap" >&6
5770 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5771 #define USE_GETCAP 1
5772 EOF
5773
5774 echo "$as_me:5774: checking if translated termcaps will be cached in ~/.terminfo" >&5
5775 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5776
5777 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5778 if test "${enable_getcap_cache+set}" = set; then
5779   enableval="$enable_getcap_cache"
5780   with_getcap_cache=$enableval
5781 else
5782   with_getcap_cache=no
5783 fi;
5784 echo "$as_me:5784: result: $with_getcap_cache" >&5
5785 echo "${ECHO_T}$with_getcap_cache" >&6
5786 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5787 #define USE_GETCAP_CACHE 1
5788 EOF
5789
5790 fi
5791
5792 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5793 echo "$as_me:5793: checking if ~/.terminfo is wanted" >&5
5794 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5795
5796 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5797 if test "${enable_home_terminfo+set}" = set; then
5798   enableval="$enable_home_terminfo"
5799   with_home_terminfo=$enableval
5800 else
5801   with_home_terminfo=yes
5802 fi;
5803 echo "$as_me:5803: result: $with_home_terminfo" >&5
5804 echo "${ECHO_T}$with_home_terminfo" >&6
5805 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5806 #define USE_HOME_TERMINFO 1
5807 EOF
5808
5809 echo "$as_me:5809: checking if you want to use restricted environment when running as root" >&5
5810 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5811
5812 # Check whether --enable-root-environ or --disable-root-environ was given.
5813 if test "${enable_root_environ+set}" = set; then
5814   enableval="$enable_root_environ"
5815   with_root_environ=$enableval
5816 else
5817   with_root_environ=yes
5818 fi;
5819 echo "$as_me:5819: result: $with_root_environ" >&5
5820 echo "${ECHO_T}$with_root_environ" >&6
5821 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5822 #define USE_ROOT_ENVIRON 1
5823 EOF
5824
5825 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5826 ###   to reduce storage requirements for the terminfo database.
5827
5828 for ac_func in \
5829         remove \
5830         unlink
5831 do
5832 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5833 echo "$as_me:5833: checking for $ac_func" >&5
5834 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5835 if eval "test \"\${$as_ac_var+set}\" = set"; then
5836   echo $ECHO_N "(cached) $ECHO_C" >&6
5837 else
5838   cat >conftest.$ac_ext <<_ACEOF
5839 #line 5839 "configure"
5840 #include "confdefs.h"
5841 /* System header to define __stub macros and hopefully few prototypes,
5842     which can conflict with char $ac_func (); below.  */
5843 #include <assert.h>
5844 /* Override any gcc2 internal prototype to avoid an error.  */
5845 #ifdef __cplusplus
5846 extern "C"
5847 #endif
5848 /* We use char because int might match the return type of a gcc2
5849    builtin and then its argument prototype would still apply.  */
5850 char $ac_func ();
5851 char (*f) ();
5852
5853 int
5854 main ()
5855 {
5856 /* The GNU C library defines this for functions which it implements
5857     to always fail with ENOSYS.  Some functions are actually named
5858     something starting with __ and the normal name is an alias.  */
5859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5860 choke me
5861 #else
5862 f = $ac_func;
5863 #endif
5864
5865   ;
5866   return 0;
5867 }
5868 _ACEOF
5869 rm -f conftest.$ac_objext conftest$ac_exeext
5870 if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
5871   (eval $ac_link) 2>&5
5872   ac_status=$?
5873   echo "$as_me:5873: \$? = $ac_status" >&5
5874   (exit $ac_status); } &&
5875          { ac_try='test -s conftest$ac_exeext'
5876   { (eval echo "$as_me:5876: \"$ac_try\"") >&5
5877   (eval $ac_try) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); }; }; then
5881   eval "$as_ac_var=yes"
5882 else
5883   echo "$as_me: failed program was:" >&5
5884 cat conftest.$ac_ext >&5
5885 eval "$as_ac_var=no"
5886 fi
5887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5888 fi
5889 echo "$as_me:5889: result: `eval echo '${'$as_ac_var'}'`" >&5
5890 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5891 if test `eval echo '${'$as_ac_var'}'` = yes; then
5892   cat >>confdefs.h <<EOF
5893 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5894 EOF
5895
5896 fi
5897 done
5898
5899 if test "$cross_compiling" = yes ; then
5900
5901 for ac_func in \
5902                 link \
5903                 symlink
5904 do
5905 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5906 echo "$as_me:5906: checking for $ac_func" >&5
5907 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5908 if eval "test \"\${$as_ac_var+set}\" = set"; then
5909   echo $ECHO_N "(cached) $ECHO_C" >&6
5910 else
5911   cat >conftest.$ac_ext <<_ACEOF
5912 #line 5912 "configure"
5913 #include "confdefs.h"
5914 /* System header to define __stub macros and hopefully few prototypes,
5915     which can conflict with char $ac_func (); below.  */
5916 #include <assert.h>
5917 /* Override any gcc2 internal prototype to avoid an error.  */
5918 #ifdef __cplusplus
5919 extern "C"
5920 #endif
5921 /* We use char because int might match the return type of a gcc2
5922    builtin and then its argument prototype would still apply.  */
5923 char $ac_func ();
5924 char (*f) ();
5925
5926 int
5927 main ()
5928 {
5929 /* The GNU C library defines this for functions which it implements
5930     to always fail with ENOSYS.  Some functions are actually named
5931     something starting with __ and the normal name is an alias.  */
5932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5933 choke me
5934 #else
5935 f = $ac_func;
5936 #endif
5937
5938   ;
5939   return 0;
5940 }
5941 _ACEOF
5942 rm -f conftest.$ac_objext conftest$ac_exeext
5943 if { (eval echo "$as_me:5943: \"$ac_link\"") >&5
5944   (eval $ac_link) 2>&5
5945   ac_status=$?
5946   echo "$as_me:5946: \$? = $ac_status" >&5
5947   (exit $ac_status); } &&
5948          { ac_try='test -s conftest$ac_exeext'
5949   { (eval echo "$as_me:5949: \"$ac_try\"") >&5
5950   (eval $ac_try) 2>&5
5951   ac_status=$?
5952   echo "$as_me:5952: \$? = $ac_status" >&5
5953   (exit $ac_status); }; }; then
5954   eval "$as_ac_var=yes"
5955 else
5956   echo "$as_me: failed program was:" >&5
5957 cat conftest.$ac_ext >&5
5958 eval "$as_ac_var=no"
5959 fi
5960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5961 fi
5962 echo "$as_me:5962: result: `eval echo '${'$as_ac_var'}'`" >&5
5963 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5964 if test `eval echo '${'$as_ac_var'}'` = yes; then
5965   cat >>confdefs.h <<EOF
5966 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5967 EOF
5968
5969 fi
5970 done
5971
5972 else
5973         echo "$as_me:5973: checking if link/symlink functions work" >&5
5974 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5975 if test "${cf_cv_link_funcs+set}" = set; then
5976   echo $ECHO_N "(cached) $ECHO_C" >&6
5977 else
5978
5979                 cf_cv_link_funcs=
5980                 for cf_func in link symlink ; do
5981                         if test "$cross_compiling" = yes; then
5982
5983                         eval 'ac_cv_func_'$cf_func'=error'
5984 else
5985   cat >conftest.$ac_ext <<_ACEOF
5986 #line 5986 "configure"
5987 #include "confdefs.h"
5988
5989 #include <sys/types.h>
5990 #include <sys/stat.h>
5991 #ifdef HAVE_UNISTD_H
5992 #include <unistd.h>
5993 #endif
5994 int main()
5995 {
5996         int fail = 0;
5997         char *src = "config.log";
5998         char *dst = "conftest.chk";
5999         struct stat src_sb;
6000         struct stat dst_sb;
6001
6002         stat(src, &src_sb);
6003         fail = ($cf_func("config.log", "conftest.chk") < 0)
6004             || (stat(dst, &dst_sb) < 0)
6005             || (dst_sb.st_mtime != src_sb.st_mtime);
6006 #ifdef HAVE_UNLINK
6007         unlink(dst);
6008 #else
6009         remove(dst);
6010 #endif
6011         ${cf_cv_main_return:-return} (fail);
6012 }
6013
6014 _ACEOF
6015 rm -f conftest$ac_exeext
6016 if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
6017   (eval $ac_link) 2>&5
6018   ac_status=$?
6019   echo "$as_me:6019: \$? = $ac_status" >&5
6020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6021   { (eval echo "$as_me:6021: \"$ac_try\"") >&5
6022   (eval $ac_try) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); }; }; then
6026
6027                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6028                         eval 'ac_cv_func_'$cf_func'=yes'
6029 else
6030   echo "$as_me: program exited with status $ac_status" >&5
6031 echo "$as_me: failed program was:" >&5
6032 cat conftest.$ac_ext >&5
6033
6034                         eval 'ac_cv_func_'$cf_func'=no'
6035 fi
6036 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6037 fi
6038                 done
6039                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6040
6041 fi
6042 echo "$as_me:6042: result: $cf_cv_link_funcs" >&5
6043 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6044         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6045 #define HAVE_LINK 1
6046 EOF
6047
6048         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6049 #define HAVE_SYMLINK 1
6050 EOF
6051
6052 fi
6053
6054 with_links=no
6055 with_symlinks=no
6056
6057 # soft links (symbolic links) are useful for some systems where hard links do
6058 # not work, or to make it simpler to copy terminfo trees around.
6059 if test "$ac_cv_func_symlink" = yes ; then
6060     echo "$as_me:6060: checking if tic should use symbolic links" >&5
6061 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6062
6063 # Check whether --enable-symlinks or --disable-symlinks was given.
6064 if test "${enable_symlinks+set}" = set; then
6065   enableval="$enable_symlinks"
6066   with_symlinks=$enableval
6067 else
6068   with_symlinks=no
6069 fi;
6070     echo "$as_me:6070: result: $with_symlinks" >&5
6071 echo "${ECHO_T}$with_symlinks" >&6
6072 fi
6073
6074 # If we have hard links and did not choose to use soft links instead, there is
6075 # no reason to make this choice optional - use the hard links.
6076 if test "$with_symlinks" = no ; then
6077     echo "$as_me:6077: checking if tic should use hard links" >&5
6078 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6079     if test "$ac_cv_func_link" = yes ; then
6080         with_links=yes
6081     else
6082         with_links=no
6083     fi
6084     echo "$as_me:6084: result: $with_links" >&5
6085 echo "${ECHO_T}$with_links" >&6
6086 fi
6087
6088 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6089 #define USE_LINKS 1
6090 EOF
6091
6092 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6093 #define USE_SYMLINKS 1
6094 EOF
6095
6096 ###   use option --enable-broken-linker to force on use of broken-linker support
6097 echo "$as_me:6097: checking if you want broken-linker support code" >&5
6098 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6099
6100 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6101 if test "${enable_broken_linker+set}" = set; then
6102   enableval="$enable_broken_linker"
6103   with_broken_linker=$enableval
6104 else
6105   with_broken_linker=${BROKEN_LINKER-no}
6106 fi;
6107 echo "$as_me:6107: result: $with_broken_linker" >&5
6108 echo "${ECHO_T}$with_broken_linker" >&6
6109
6110 BROKEN_LINKER=0
6111 if test "$with_broken_linker" = yes ; then
6112         cat >>confdefs.h <<\EOF
6113 #define BROKEN_LINKER 1
6114 EOF
6115
6116         BROKEN_LINKER=1
6117 elif test "$DFT_LWR_MODEL" = shared ; then
6118         case $cf_cv_system_name in #(vi
6119         cygwin*)
6120                 cat >>confdefs.h <<\EOF
6121 #define BROKEN_LINKER 1
6122 EOF
6123
6124                 BROKEN_LINKER=1
6125                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6126
6127 echo "${as_me-configure}:6127: testing cygwin linker is broken anyway ..." 1>&5
6128
6129                 ;;
6130         esac
6131 fi
6132
6133 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6134 echo "$as_me:6134: checking if tputs should process BSD-style prefix padding" >&5
6135 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6136
6137 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6138 if test "${enable_bsdpad+set}" = set; then
6139   enableval="$enable_bsdpad"
6140   with_bsdpad=$enableval
6141 else
6142   with_bsdpad=no
6143 fi;
6144 echo "$as_me:6144: result: $with_bsdpad" >&5
6145 echo "${ECHO_T}$with_bsdpad" >&6
6146 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6147 #define BSD_TPUTS 1
6148 EOF
6149
6150 ###   use option --enable-widec to turn on use of wide-character support
6151 NCURSES_CH_T=chtype
6152 NCURSES_LIBUTF8=0
6153
6154 NEED_WCHAR_H=0
6155 NCURSES_MBSTATE_T=0
6156 NCURSES_WCHAR_T=0
6157 NCURSES_WINT_T=0
6158
6159 # Check to define _XOPEN_SOURCE "automatically"
6160
6161 echo "$as_me:6161: checking if $CC -U and -D options work together" >&5
6162 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6163 if test "${cf_cv_cc_u_d_options+set}" = set; then
6164   echo $ECHO_N "(cached) $ECHO_C" >&6
6165 else
6166
6167         cf_save_CPPFLAGS="$CPPFLAGS"
6168         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6169         cat >conftest.$ac_ext <<_ACEOF
6170 #line 6170 "configure"
6171 #include "confdefs.h"
6172
6173 int
6174 main ()
6175 {
6176
6177 #ifndef U_D_OPTIONS
6178 make an undefined-error
6179 #endif
6180 #ifdef  D_U_OPTIONS
6181 make a defined-error
6182 #endif
6183
6184   ;
6185   return 0;
6186 }
6187 _ACEOF
6188 rm -f conftest.$ac_objext
6189 if { (eval echo "$as_me:6189: \"$ac_compile\"") >&5
6190   (eval $ac_compile) 2>&5
6191   ac_status=$?
6192   echo "$as_me:6192: \$? = $ac_status" >&5
6193   (exit $ac_status); } &&
6194          { ac_try='test -s conftest.$ac_objext'
6195   { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6196   (eval $ac_try) 2>&5
6197   ac_status=$?
6198   echo "$as_me:6198: \$? = $ac_status" >&5
6199   (exit $ac_status); }; }; then
6200
6201         cf_cv_cc_u_d_options=yes
6202 else
6203   echo "$as_me: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205
6206         cf_cv_cc_u_d_options=no
6207 fi
6208 rm -f conftest.$ac_objext conftest.$ac_ext
6209         CPPFLAGS="$cf_save_CPPFLAGS"
6210
6211 fi
6212 echo "$as_me:6212: result: $cf_cv_cc_u_d_options" >&5
6213 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6214
6215 cf_XOPEN_SOURCE=500
6216 cf_POSIX_C_SOURCE=199506L
6217
6218 case $host_os in #(vi
6219 aix[45]*) #(vi
6220         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6221         ;;
6222 freebsd*|dragonfly*) #(vi
6223         # 5.x headers associate
6224         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6225         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6226         cf_POSIX_C_SOURCE=200112L
6227         cf_XOPEN_SOURCE=600
6228         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6229         ;;
6230 hpux*) #(vi
6231         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6232         ;;
6233 irix[56].*) #(vi
6234         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6235         ;;
6236 linux*|gnu*|k*bsd*-gnu) #(vi
6237
6238 echo "$as_me:6238: checking if we must define _GNU_SOURCE" >&5
6239 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6240 if test "${cf_cv_gnu_source+set}" = set; then
6241   echo $ECHO_N "(cached) $ECHO_C" >&6
6242 else
6243
6244 cat >conftest.$ac_ext <<_ACEOF
6245 #line 6245 "configure"
6246 #include "confdefs.h"
6247 #include <sys/types.h>
6248 int
6249 main ()
6250 {
6251
6252 #ifndef _XOPEN_SOURCE
6253 make an error
6254 #endif
6255   ;
6256   return 0;
6257 }
6258 _ACEOF
6259 rm -f conftest.$ac_objext
6260 if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
6261   (eval $ac_compile) 2>&5
6262   ac_status=$?
6263   echo "$as_me:6263: \$? = $ac_status" >&5
6264   (exit $ac_status); } &&
6265          { ac_try='test -s conftest.$ac_objext'
6266   { (eval echo "$as_me:6266: \"$ac_try\"") >&5
6267   (eval $ac_try) 2>&5
6268   ac_status=$?
6269   echo "$as_me:6269: \$? = $ac_status" >&5
6270   (exit $ac_status); }; }; then
6271   cf_cv_gnu_source=no
6272 else
6273   echo "$as_me: failed program was:" >&5
6274 cat conftest.$ac_ext >&5
6275 cf_save="$CPPFLAGS"
6276          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6277          cat >conftest.$ac_ext <<_ACEOF
6278 #line 6278 "configure"
6279 #include "confdefs.h"
6280 #include <sys/types.h>
6281 int
6282 main ()
6283 {
6284
6285 #ifdef _XOPEN_SOURCE
6286 make an error
6287 #endif
6288   ;
6289   return 0;
6290 }
6291 _ACEOF
6292 rm -f conftest.$ac_objext
6293 if { (eval echo "$as_me:6293: \"$ac_compile\"") >&5
6294   (eval $ac_compile) 2>&5
6295   ac_status=$?
6296   echo "$as_me:6296: \$? = $ac_status" >&5
6297   (exit $ac_status); } &&
6298          { ac_try='test -s conftest.$ac_objext'
6299   { (eval echo "$as_me:6299: \"$ac_try\"") >&5
6300   (eval $ac_try) 2>&5
6301   ac_status=$?
6302   echo "$as_me:6302: \$? = $ac_status" >&5
6303   (exit $ac_status); }; }; then
6304   cf_cv_gnu_source=no
6305 else
6306   echo "$as_me: failed program was:" >&5
6307 cat conftest.$ac_ext >&5
6308 cf_cv_gnu_source=yes
6309 fi
6310 rm -f conftest.$ac_objext conftest.$ac_ext
6311         CPPFLAGS="$cf_save"
6312
6313 fi
6314 rm -f conftest.$ac_objext conftest.$ac_ext
6315
6316 fi
6317 echo "$as_me:6317: result: $cf_cv_gnu_source" >&5
6318 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6319 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6320
6321         ;;
6322 mirbsd*) #(vi
6323         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6324         ;;
6325 netbsd*) #(vi
6326         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6327         ;;
6328 openbsd*) #(vi
6329         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6330         ;;
6331 osf[45]*) #(vi
6332         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6333         ;;
6334 nto-qnx*) #(vi
6335         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6336         ;;
6337 sco*) #(vi
6338         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6339         ;;
6340 solaris*) #(vi
6341         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6342         ;;
6343 *)
6344         echo "$as_me:6344: checking if we should define _XOPEN_SOURCE" >&5
6345 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6346 if test "${cf_cv_xopen_source+set}" = set; then
6347   echo $ECHO_N "(cached) $ECHO_C" >&6
6348 else
6349
6350         cat >conftest.$ac_ext <<_ACEOF
6351 #line 6351 "configure"
6352 #include "confdefs.h"
6353 #include <sys/types.h>
6354 int
6355 main ()
6356 {
6357
6358 #ifndef _XOPEN_SOURCE
6359 make an error
6360 #endif
6361   ;
6362   return 0;
6363 }
6364 _ACEOF
6365 rm -f conftest.$ac_objext
6366 if { (eval echo "$as_me:6366: \"$ac_compile\"") >&5
6367   (eval $ac_compile) 2>&5
6368   ac_status=$?
6369   echo "$as_me:6369: \$? = $ac_status" >&5
6370   (exit $ac_status); } &&
6371          { ac_try='test -s conftest.$ac_objext'
6372   { (eval echo "$as_me:6372: \"$ac_try\"") >&5
6373   (eval $ac_try) 2>&5
6374   ac_status=$?
6375   echo "$as_me:6375: \$? = $ac_status" >&5
6376   (exit $ac_status); }; }; then
6377   cf_cv_xopen_source=no
6378 else
6379   echo "$as_me: failed program was:" >&5
6380 cat conftest.$ac_ext >&5
6381 cf_save="$CPPFLAGS"
6382          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6383          cat >conftest.$ac_ext <<_ACEOF
6384 #line 6384 "configure"
6385 #include "confdefs.h"
6386 #include <sys/types.h>
6387 int
6388 main ()
6389 {
6390
6391 #ifdef _XOPEN_SOURCE
6392 make an error
6393 #endif
6394   ;
6395   return 0;
6396 }
6397 _ACEOF
6398 rm -f conftest.$ac_objext
6399 if { (eval echo "$as_me:6399: \"$ac_compile\"") >&5
6400   (eval $ac_compile) 2>&5
6401   ac_status=$?
6402   echo "$as_me:6402: \$? = $ac_status" >&5
6403   (exit $ac_status); } &&
6404          { ac_try='test -s conftest.$ac_objext'
6405   { (eval echo "$as_me:6405: \"$ac_try\"") >&5
6406   (eval $ac_try) 2>&5
6407   ac_status=$?
6408   echo "$as_me:6408: \$? = $ac_status" >&5
6409   (exit $ac_status); }; }; then
6410   cf_cv_xopen_source=no
6411 else
6412   echo "$as_me: failed program was:" >&5
6413 cat conftest.$ac_ext >&5
6414 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6415 fi
6416 rm -f conftest.$ac_objext conftest.$ac_ext
6417         CPPFLAGS="$cf_save"
6418
6419 fi
6420 rm -f conftest.$ac_objext conftest.$ac_ext
6421
6422 fi
6423 echo "$as_me:6423: result: $cf_cv_xopen_source" >&5
6424 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6425         if test "$cf_cv_xopen_source" != no ; then
6426
6427 # remove _XOPEN_SOURCE symbol from $CFLAGS
6428 CFLAGS=`echo "$CFLAGS" | \
6429         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6430                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6431
6432 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6433 CPPFLAGS=`echo "$CPPFLAGS" | \
6434         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6435                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6436
6437                 test "$cf_cv_cc_u_d_options" = yes && \
6438                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6439                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6440         fi
6441
6442 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6443
6444 cf_save_CFLAGS="$CFLAGS"
6445 cf_save_CPPFLAGS="$CPPFLAGS"
6446
6447 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6448 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6449         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6450                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6451
6452 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6453 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6454         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6455                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6456
6457 echo "$as_me:6457: checking if we should define _POSIX_C_SOURCE" >&5
6458 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6459 if test "${cf_cv_posix_c_source+set}" = set; then
6460   echo $ECHO_N "(cached) $ECHO_C" >&6
6461 else
6462
6463 echo "${as_me-configure}:6463: testing if the symbol is already defined go no further ..." 1>&5
6464
6465         cat >conftest.$ac_ext <<_ACEOF
6466 #line 6466 "configure"
6467 #include "confdefs.h"
6468 #include <sys/types.h>
6469 int
6470 main ()
6471 {
6472
6473 #ifndef _POSIX_C_SOURCE
6474 make an error
6475 #endif
6476   ;
6477   return 0;
6478 }
6479 _ACEOF
6480 rm -f conftest.$ac_objext
6481 if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
6482   (eval $ac_compile) 2>&5
6483   ac_status=$?
6484   echo "$as_me:6484: \$? = $ac_status" >&5
6485   (exit $ac_status); } &&
6486          { ac_try='test -s conftest.$ac_objext'
6487   { (eval echo "$as_me:6487: \"$ac_try\"") >&5
6488   (eval $ac_try) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); }; }; then
6492   cf_cv_posix_c_source=no
6493 else
6494   echo "$as_me: failed program was:" >&5
6495 cat conftest.$ac_ext >&5
6496 cf_want_posix_source=no
6497          case .$cf_POSIX_C_SOURCE in #(vi
6498          .[12]??*) #(vi
6499                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6500                 ;;
6501          .2) #(vi
6502                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6503                 cf_want_posix_source=yes
6504                 ;;
6505          .*)
6506                 cf_want_posix_source=yes
6507                 ;;
6508          esac
6509          if test "$cf_want_posix_source" = yes ; then
6510                 cat >conftest.$ac_ext <<_ACEOF
6511 #line 6511 "configure"
6512 #include "confdefs.h"
6513 #include <sys/types.h>
6514 int
6515 main ()
6516 {
6517
6518 #ifdef _POSIX_SOURCE
6519 make an error
6520 #endif
6521   ;
6522   return 0;
6523 }
6524 _ACEOF
6525 rm -f conftest.$ac_objext
6526 if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5
6527   (eval $ac_compile) 2>&5
6528   ac_status=$?
6529   echo "$as_me:6529: \$? = $ac_status" >&5
6530   (exit $ac_status); } &&
6531          { ac_try='test -s conftest.$ac_objext'
6532   { (eval echo "$as_me:6532: \"$ac_try\"") >&5
6533   (eval $ac_try) 2>&5
6534   ac_status=$?
6535   echo "$as_me:6535: \$? = $ac_status" >&5
6536   (exit $ac_status); }; }; then
6537   :
6538 else
6539   echo "$as_me: failed program was:" >&5
6540 cat conftest.$ac_ext >&5
6541 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6542 fi
6543 rm -f conftest.$ac_objext conftest.$ac_ext
6544          fi
6545
6546 echo "${as_me-configure}:6546: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6547
6548          CFLAGS="$cf_trim_CFLAGS"
6549          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6550
6551 echo "${as_me-configure}:6551: testing if the second compile does not leave our definition intact error ..." 1>&5
6552
6553          cat >conftest.$ac_ext <<_ACEOF
6554 #line 6554 "configure"
6555 #include "confdefs.h"
6556 #include <sys/types.h>
6557 int
6558 main ()
6559 {
6560
6561 #ifndef _POSIX_C_SOURCE
6562 make an error
6563 #endif
6564   ;
6565   return 0;
6566 }
6567 _ACEOF
6568 rm -f conftest.$ac_objext
6569 if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
6570   (eval $ac_compile) 2>&5
6571   ac_status=$?
6572   echo "$as_me:6572: \$? = $ac_status" >&5
6573   (exit $ac_status); } &&
6574          { ac_try='test -s conftest.$ac_objext'
6575   { (eval echo "$as_me:6575: \"$ac_try\"") >&5
6576   (eval $ac_try) 2>&5
6577   ac_status=$?
6578   echo "$as_me:6578: \$? = $ac_status" >&5
6579   (exit $ac_status); }; }; then
6580   :
6581 else
6582   echo "$as_me: failed program was:" >&5
6583 cat conftest.$ac_ext >&5
6584 cf_cv_posix_c_source=no
6585 fi
6586 rm -f conftest.$ac_objext conftest.$ac_ext
6587          CFLAGS="$cf_save_CFLAGS"
6588          CPPFLAGS="$cf_save_CPPFLAGS"
6589
6590 fi
6591 rm -f conftest.$ac_objext conftest.$ac_ext
6592
6593 fi
6594 echo "$as_me:6594: result: $cf_cv_posix_c_source" >&5
6595 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6596
6597 if test "$cf_cv_posix_c_source" != no ; then
6598         CFLAGS="$cf_trim_CFLAGS"
6599         CPPFLAGS="$cf_trim_CPPFLAGS"
6600         if test "$cf_cv_cc_u_d_options" = yes ; then
6601                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6602                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6603                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6604         fi
6605         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6606 fi
6607
6608         ;;
6609 esac
6610
6611 # Work around breakage on OS X
6612
6613 echo "$as_me:6613: checking if SIGWINCH is defined" >&5
6614 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6615 if test "${cf_cv_define_sigwinch+set}" = set; then
6616   echo $ECHO_N "(cached) $ECHO_C" >&6
6617 else
6618
6619         cat >conftest.$ac_ext <<_ACEOF
6620 #line 6620 "configure"
6621 #include "confdefs.h"
6622
6623 #include <sys/types.h>
6624 #include <sys/signal.h>
6625
6626 int
6627 main ()
6628 {
6629 int x = SIGWINCH
6630   ;
6631   return 0;
6632 }
6633 _ACEOF
6634 rm -f conftest.$ac_objext
6635 if { (eval echo "$as_me:6635: \"$ac_compile\"") >&5
6636   (eval $ac_compile) 2>&5
6637   ac_status=$?
6638   echo "$as_me:6638: \$? = $ac_status" >&5
6639   (exit $ac_status); } &&
6640          { ac_try='test -s conftest.$ac_objext'
6641   { (eval echo "$as_me:6641: \"$ac_try\"") >&5
6642   (eval $ac_try) 2>&5
6643   ac_status=$?
6644   echo "$as_me:6644: \$? = $ac_status" >&5
6645   (exit $ac_status); }; }; then
6646   cf_cv_define_sigwinch=yes
6647 else
6648   echo "$as_me: failed program was:" >&5
6649 cat conftest.$ac_ext >&5
6650 cat >conftest.$ac_ext <<_ACEOF
6651 #line 6651 "configure"
6652 #include "confdefs.h"
6653
6654 #undef _XOPEN_SOURCE
6655 #undef _POSIX_SOURCE
6656 #undef _POSIX_C_SOURCE
6657 #include <sys/types.h>
6658 #include <sys/signal.h>
6659
6660 int
6661 main ()
6662 {
6663 int x = SIGWINCH
6664   ;
6665   return 0;
6666 }
6667 _ACEOF
6668 rm -f conftest.$ac_objext
6669 if { (eval echo "$as_me:6669: \"$ac_compile\"") >&5
6670   (eval $ac_compile) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); } &&
6674          { ac_try='test -s conftest.$ac_objext'
6675   { (eval echo "$as_me:6675: \"$ac_try\"") >&5
6676   (eval $ac_try) 2>&5
6677   ac_status=$?
6678   echo "$as_me:6678: \$? = $ac_status" >&5
6679   (exit $ac_status); }; }; then
6680   cf_cv_define_sigwinch=maybe
6681 else
6682   echo "$as_me: failed program was:" >&5
6683 cat conftest.$ac_ext >&5
6684 cf_cv_define_sigwinch=no
6685 fi
6686 rm -f conftest.$ac_objext conftest.$ac_ext
6687
6688 fi
6689 rm -f conftest.$ac_objext conftest.$ac_ext
6690
6691 fi
6692 echo "$as_me:6692: result: $cf_cv_define_sigwinch" >&5
6693 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6694
6695 if test "$cf_cv_define_sigwinch" = maybe ; then
6696 echo "$as_me:6696: checking for actual SIGWINCH definition" >&5
6697 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6698 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6699   echo $ECHO_N "(cached) $ECHO_C" >&6
6700 else
6701
6702 cf_cv_fixup_sigwinch=unknown
6703 cf_sigwinch=32
6704 while test $cf_sigwinch != 1
6705 do
6706         cat >conftest.$ac_ext <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6709
6710 #undef _XOPEN_SOURCE
6711 #undef _POSIX_SOURCE
6712 #undef _POSIX_C_SOURCE
6713 #include <sys/types.h>
6714 #include <sys/signal.h>
6715
6716 int
6717 main ()
6718 {
6719
6720 #if SIGWINCH != $cf_sigwinch
6721 make an error
6722 #endif
6723 int x = SIGWINCH
6724   ;
6725   return 0;
6726 }
6727 _ACEOF
6728 rm -f conftest.$ac_objext
6729 if { (eval echo "$as_me:6729: \"$ac_compile\"") >&5
6730   (eval $ac_compile) 2>&5
6731   ac_status=$?
6732   echo "$as_me:6732: \$? = $ac_status" >&5
6733   (exit $ac_status); } &&
6734          { ac_try='test -s conftest.$ac_objext'
6735   { (eval echo "$as_me:6735: \"$ac_try\"") >&5
6736   (eval $ac_try) 2>&5
6737   ac_status=$?
6738   echo "$as_me:6738: \$? = $ac_status" >&5
6739   (exit $ac_status); }; }; then
6740   cf_cv_fixup_sigwinch=$cf_sigwinch
6741          break
6742 else
6743   echo "$as_me: failed program was:" >&5
6744 cat conftest.$ac_ext >&5
6745 fi
6746 rm -f conftest.$ac_objext conftest.$ac_ext
6747
6748 cf_sigwinch=`expr $cf_sigwinch - 1`
6749 done
6750
6751 fi
6752 echo "$as_me:6752: result: $cf_cv_fixup_sigwinch" >&5
6753 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6754
6755         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6756                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6757         fi
6758 fi
6759
6760 # Checks for CODESET support.
6761
6762   echo "$as_me:6762: checking for nl_langinfo and CODESET" >&5
6763 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6764 if test "${am_cv_langinfo_codeset+set}" = set; then
6765   echo $ECHO_N "(cached) $ECHO_C" >&6
6766 else
6767   cat >conftest.$ac_ext <<_ACEOF
6768 #line 6768 "configure"
6769 #include "confdefs.h"
6770 #include <langinfo.h>
6771 int
6772 main ()
6773 {
6774 char* cs = nl_langinfo(CODESET);
6775   ;
6776   return 0;
6777 }
6778 _ACEOF
6779 rm -f conftest.$ac_objext conftest$ac_exeext
6780 if { (eval echo "$as_me:6780: \"$ac_link\"") >&5
6781   (eval $ac_link) 2>&5
6782   ac_status=$?
6783   echo "$as_me:6783: \$? = $ac_status" >&5
6784   (exit $ac_status); } &&
6785          { ac_try='test -s conftest$ac_exeext'
6786   { (eval echo "$as_me:6786: \"$ac_try\"") >&5
6787   (eval $ac_try) 2>&5
6788   ac_status=$?
6789   echo "$as_me:6789: \$? = $ac_status" >&5
6790   (exit $ac_status); }; }; then
6791   am_cv_langinfo_codeset=yes
6792 else
6793   echo "$as_me: failed program was:" >&5
6794 cat conftest.$ac_ext >&5
6795 am_cv_langinfo_codeset=no
6796 fi
6797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6798
6799 fi
6800 echo "$as_me:6800: result: $am_cv_langinfo_codeset" >&5
6801 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6802   if test $am_cv_langinfo_codeset = yes; then
6803
6804 cat >>confdefs.h <<\EOF
6805 #define HAVE_LANGINFO_CODESET 1
6806 EOF
6807
6808   fi
6809
6810 # use these variables to work around a defect in gcc's fixincludes.
6811 NCURSES_OK_WCHAR_T=
6812 NCURSES_OK_WINT_T=
6813
6814 echo "$as_me:6814: checking if you want wide-character code" >&5
6815 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6816
6817 # Check whether --enable-widec or --disable-widec was given.
6818 if test "${enable_widec+set}" = set; then
6819   enableval="$enable_widec"
6820   with_widec=$enableval
6821 else
6822   with_widec=no
6823 fi;
6824 echo "$as_me:6824: result: $with_widec" >&5
6825 echo "${ECHO_T}$with_widec" >&6
6826 if test "$with_widec" = yes ; then
6827         LIB_SUFFIX="w${LIB_SUFFIX}"
6828         cat >>confdefs.h <<\EOF
6829 #define USE_WIDEC_SUPPORT 1
6830 EOF
6831
6832 echo "$as_me:6832: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6833 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6834 cat >conftest.$ac_ext <<_ACEOF
6835 #line 6835 "configure"
6836 #include "confdefs.h"
6837 #include <sys/types.h>
6838
6839 int
6840 main ()
6841 {
6842
6843 #ifndef _XOPEN_SOURCE_EXTENDED
6844 make an error
6845 #endif
6846   ;
6847   return 0;
6848 }
6849 _ACEOF
6850 rm -f conftest.$ac_objext
6851 if { (eval echo "$as_me:6851: \"$ac_compile\"") >&5
6852   (eval $ac_compile) 2>&5
6853   ac_status=$?
6854   echo "$as_me:6854: \$? = $ac_status" >&5
6855   (exit $ac_status); } &&
6856          { ac_try='test -s conftest.$ac_objext'
6857   { (eval echo "$as_me:6857: \"$ac_try\"") >&5
6858   (eval $ac_try) 2>&5
6859   ac_status=$?
6860   echo "$as_me:6860: \$? = $ac_status" >&5
6861   (exit $ac_status); }; }; then
6862   cf_result=no
6863 else
6864   echo "$as_me: failed program was:" >&5
6865 cat conftest.$ac_ext >&5
6866 cf_result=yes
6867 fi
6868 rm -f conftest.$ac_objext conftest.$ac_ext
6869 echo "$as_me:6869: result: $cf_result" >&5
6870 echo "${ECHO_T}$cf_result" >&6
6871
6872 if test "$cf_result" = yes ; then
6873         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6874 elif test "x" != "x" ; then
6875         echo "$as_me:6875: checking checking for compatible value versus " >&5
6876 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6877         cat >conftest.$ac_ext <<_ACEOF
6878 #line 6878 "configure"
6879 #include "confdefs.h"
6880 #include <sys/types.h>
6881
6882 int
6883 main ()
6884 {
6885
6886 #if _XOPEN_SOURCE_EXTENDED- < 0
6887 make an error
6888 #endif
6889   ;
6890   return 0;
6891 }
6892 _ACEOF
6893 rm -f conftest.$ac_objext
6894 if { (eval echo "$as_me:6894: \"$ac_compile\"") >&5
6895   (eval $ac_compile) 2>&5
6896   ac_status=$?
6897   echo "$as_me:6897: \$? = $ac_status" >&5
6898   (exit $ac_status); } &&
6899          { ac_try='test -s conftest.$ac_objext'
6900   { (eval echo "$as_me:6900: \"$ac_try\"") >&5
6901   (eval $ac_try) 2>&5
6902   ac_status=$?
6903   echo "$as_me:6903: \$? = $ac_status" >&5
6904   (exit $ac_status); }; }; then
6905   cf_result=yes
6906 else
6907   echo "$as_me: failed program was:" >&5
6908 cat conftest.$ac_ext >&5
6909 cf_result=no
6910 fi
6911 rm -f conftest.$ac_objext conftest.$ac_ext
6912         echo "$as_me:6912: result: $cf_result" >&5
6913 echo "${ECHO_T}$cf_result" >&6
6914         if test "$cf_result" = no ; then
6915                 # perhaps we can override it - try...
6916                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6917         fi
6918 fi
6919
6920         # with_overwrite=no
6921         NCURSES_CH_T=cchar_t
6922
6923 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6924 do
6925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6926 echo "$as_me:6926: checking for $ac_func" >&5
6927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6928 if eval "test \"\${$as_ac_var+set}\" = set"; then
6929   echo $ECHO_N "(cached) $ECHO_C" >&6
6930 else
6931   cat >conftest.$ac_ext <<_ACEOF
6932 #line 6932 "configure"
6933 #include "confdefs.h"
6934 /* System header to define __stub macros and hopefully few prototypes,
6935     which can conflict with char $ac_func (); below.  */
6936 #include <assert.h>
6937 /* Override any gcc2 internal prototype to avoid an error.  */
6938 #ifdef __cplusplus
6939 extern "C"
6940 #endif
6941 /* We use char because int might match the return type of a gcc2
6942    builtin and then its argument prototype would still apply.  */
6943 char $ac_func ();
6944 char (*f) ();
6945
6946 int
6947 main ()
6948 {
6949 /* The GNU C library defines this for functions which it implements
6950     to always fail with ENOSYS.  Some functions are actually named
6951     something starting with __ and the normal name is an alias.  */
6952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6953 choke me
6954 #else
6955 f = $ac_func;
6956 #endif
6957
6958   ;
6959   return 0;
6960 }
6961 _ACEOF
6962 rm -f conftest.$ac_objext conftest$ac_exeext
6963 if { (eval echo "$as_me:6963: \"$ac_link\"") >&5
6964   (eval $ac_link) 2>&5
6965   ac_status=$?
6966   echo "$as_me:6966: \$? = $ac_status" >&5
6967   (exit $ac_status); } &&
6968          { ac_try='test -s conftest$ac_exeext'
6969   { (eval echo "$as_me:6969: \"$ac_try\"") >&5
6970   (eval $ac_try) 2>&5
6971   ac_status=$?
6972   echo "$as_me:6972: \$? = $ac_status" >&5
6973   (exit $ac_status); }; }; then
6974   eval "$as_ac_var=yes"
6975 else
6976   echo "$as_me: failed program was:" >&5
6977 cat conftest.$ac_ext >&5
6978 eval "$as_ac_var=no"
6979 fi
6980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6981 fi
6982 echo "$as_me:6982: result: `eval echo '${'$as_ac_var'}'`" >&5
6983 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6984 if test `eval echo '${'$as_ac_var'}'` = yes; then
6985   cat >>confdefs.h <<EOF
6986 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6987 EOF
6988
6989 fi
6990 done
6991
6992         if test "$ac_cv_func_putwc" != yes ; then
6993
6994 echo "$as_me:6994: checking for multibyte character support" >&5
6995 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6996 if test "${cf_cv_utf8_lib+set}" = set; then
6997   echo $ECHO_N "(cached) $ECHO_C" >&6
6998 else
6999
7000         cf_save_LIBS="$LIBS"
7001         cat >conftest.$ac_ext <<_ACEOF
7002 #line 7002 "configure"
7003 #include "confdefs.h"
7004
7005 #include <stdlib.h>
7006 int
7007 main ()
7008 {
7009 putwc(0,0);
7010   ;
7011   return 0;
7012 }
7013 _ACEOF
7014 rm -f conftest.$ac_objext conftest$ac_exeext
7015 if { (eval echo "$as_me:7015: \"$ac_link\"") >&5
7016   (eval $ac_link) 2>&5
7017   ac_status=$?
7018   echo "$as_me:7018: \$? = $ac_status" >&5
7019   (exit $ac_status); } &&
7020          { ac_try='test -s conftest$ac_exeext'
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_utf8_lib=yes
7027 else
7028   echo "$as_me: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7030
7031 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7032 # will be set on completion of the AC_TRY_LINK below.
7033 cf_cv_header_path_utf8=
7034 cf_cv_library_path_utf8=
7035
7036 echo "${as_me-configure}:7036: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7037
7038 cat >conftest.$ac_ext <<_ACEOF
7039 #line 7039 "configure"
7040 #include "confdefs.h"
7041
7042 #include <libutf8.h>
7043 int
7044 main ()
7045 {
7046 putwc(0,0);
7047   ;
7048   return 0;
7049 }
7050 _ACEOF
7051 rm -f conftest.$ac_objext conftest$ac_exeext
7052 if { (eval echo "$as_me:7052: \"$ac_link\"") >&5
7053   (eval $ac_link) 2>&5
7054   ac_status=$?
7055   echo "$as_me:7055: \$? = $ac_status" >&5
7056   (exit $ac_status); } &&
7057          { ac_try='test -s conftest$ac_exeext'
7058   { (eval echo "$as_me:7058: \"$ac_try\"") >&5
7059   (eval $ac_try) 2>&5
7060   ac_status=$?
7061   echo "$as_me:7061: \$? = $ac_status" >&5
7062   (exit $ac_status); }; }; then
7063   cf_cv_find_linkage_utf8=yes
7064 else
7065   echo "$as_me: failed program was:" >&5
7066 cat conftest.$ac_ext >&5
7067
7068     cf_cv_find_linkage_utf8=no
7069
7070 echo "${as_me-configure}:7070: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7071
7072     cf_save_CPPFLAGS="$CPPFLAGS"
7073     cf_test_CPPFLAGS="$CPPFLAGS"
7074
7075     cf_search=""
7076
7077 test "/usr" != "$prefix" && \
7078 test -d "/usr" && \
7079 (test $prefix = NONE || test -d $prefix) && {
7080         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7081         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7082         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7083         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7084         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7085         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7086 }
7087
7088 test "$prefix" != "NONE" && \
7089 test -d "$prefix" && \
7090  {
7091         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7092         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7093         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7094         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7095         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7096         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7097 }
7098
7099 test "/usr/local" != "$prefix" && \
7100 test -d "/usr/local" && \
7101 (test $prefix = NONE || test -d $prefix) && {
7102         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7103         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7104         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7105         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7106         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7107         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7108 }
7109
7110 test "/opt" != "$prefix" && \
7111 test -d "/opt" && \
7112 (test $prefix = NONE || test -d $prefix) && {
7113         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7114         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7115         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7116         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7117         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7118         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7119 }
7120
7121 test "$HOME" != "$prefix" && \
7122 test -d "$HOME" && \
7123 (test $prefix = NONE || test -d $prefix) && {
7124         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7125         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7126         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7127         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7128         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7129         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7130 }
7131
7132 test "$includedir" != NONE && \
7133 test "$includedir" != "/usr/include" && \
7134 test -d "$includedir" && {
7135         test -d $includedir &&    cf_search="$cf_search $includedir"
7136         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7137 }
7138
7139 test "$oldincludedir" != NONE && \
7140 test "$oldincludedir" != "/usr/include" && \
7141 test -d "$oldincludedir" && {
7142         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7143         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7144 }
7145
7146     for cf_cv_header_path_utf8 in $cf_search
7147     do
7148       if test -d $cf_cv_header_path_utf8 ; then
7149         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7150
7151 echo "${as_me-configure}:7151: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7152
7153         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7154         cat >conftest.$ac_ext <<_ACEOF
7155 #line 7155 "configure"
7156 #include "confdefs.h"
7157
7158 #include <libutf8.h>
7159 int
7160 main ()
7161 {
7162 putwc(0,0);
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext
7168 if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -s conftest.$ac_objext'
7174   { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); }; }; then
7179
7180             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7181
7182 echo "${as_me-configure}:7182: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7183
7184             cf_cv_find_linkage_utf8=maybe
7185             cf_test_CPPFLAGS="$CPPFLAGS"
7186             break
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat conftest.$ac_ext >&5
7190
7191             CPPFLAGS="$cf_save_CPPFLAGS"
7192
7193 fi
7194 rm -f conftest.$ac_objext conftest.$ac_ext
7195       fi
7196     done
7197
7198     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7199
7200 echo "${as_me-configure}:7200: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7201
7202       cf_save_LIBS="$LIBS"
7203       cf_save_LDFLAGS="$LDFLAGS"
7204
7205       if test "$cf_cv_find_linkage_utf8" != yes ; then
7206         cf_search=""
7207
7208 test "/usr" != "$prefix" && \
7209 test -d "/usr" && \
7210 (test $prefix = NONE || test -d $prefix) && {
7211         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7212         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7213         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7214         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7215         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7216         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7217 }
7218
7219 test "$prefix" != "NONE" && \
7220 test -d "$prefix" && \
7221  {
7222         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7223         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7224         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7225         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7226         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7227         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7228 }
7229
7230 test "/usr/local" != "$prefix" && \
7231 test -d "/usr/local" && \
7232 (test $prefix = NONE || test -d $prefix) && {
7233         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7234         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7235         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7236         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7237         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7238         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7239 }
7240
7241 test "/opt" != "$prefix" && \
7242 test -d "/opt" && \
7243 (test $prefix = NONE || test -d $prefix) && {
7244         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7245         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7246         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7247         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7248         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7249         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7250 }
7251
7252 test "$HOME" != "$prefix" && \
7253 test -d "$HOME" && \
7254 (test $prefix = NONE || test -d $prefix) && {
7255         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7256         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7257         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7258         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7259         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7260         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7261 }
7262
7263         for cf_cv_library_path_utf8 in $cf_search
7264         do
7265           if test -d $cf_cv_library_path_utf8 ; then
7266             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7267
7268 echo "${as_me-configure}:7268: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7269
7270             CPPFLAGS="$cf_test_CPPFLAGS"
7271             LIBS="-lutf8  $cf_save_LIBS"
7272             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7273             cat >conftest.$ac_ext <<_ACEOF
7274 #line 7274 "configure"
7275 #include "confdefs.h"
7276
7277 #include <libutf8.h>
7278 int
7279 main ()
7280 {
7281 putwc(0,0);
7282   ;
7283   return 0;
7284 }
7285 _ACEOF
7286 rm -f conftest.$ac_objext conftest$ac_exeext
7287 if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7288   (eval $ac_link) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); } &&
7292          { ac_try='test -s conftest$ac_exeext'
7293   { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7294   (eval $ac_try) 2>&5
7295   ac_status=$?
7296   echo "$as_me:7296: \$? = $ac_status" >&5
7297   (exit $ac_status); }; }; then
7298
7299                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7300
7301 echo "${as_me-configure}:7301: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7302
7303                 cf_cv_find_linkage_utf8=yes
7304                 cf_cv_library_file_utf8="-lutf8"
7305                 break
7306 else
7307   echo "$as_me: failed program was:" >&5
7308 cat conftest.$ac_ext >&5
7309
7310                 CPPFLAGS="$cf_save_CPPFLAGS"
7311                 LIBS="$cf_save_LIBS"
7312                 LDFLAGS="$cf_save_LDFLAGS"
7313
7314 fi
7315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7316           fi
7317         done
7318         LIBS="$cf_save_LIBS"
7319         CPPFLAGS="$cf_save_CPPFLAGS"
7320         LDFLAGS="$cf_save_LDFLAGS"
7321       fi
7322
7323     else
7324       cf_cv_find_linkage_utf8=no
7325     fi
7326
7327 fi
7328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7329
7330 if test "$cf_cv_find_linkage_utf8" = yes ; then
7331 cf_cv_utf8_lib=add-on
7332 else
7333 cf_cv_utf8_lib=no
7334 fi
7335
7336 fi
7337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7338 fi
7339 echo "$as_me:7339: result: $cf_cv_utf8_lib" >&5
7340 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7341
7342 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7343 # ncurses/ncursesw:
7344 if test "$cf_cv_utf8_lib" = "add-on" ; then
7345         cat >>confdefs.h <<\EOF
7346 #define HAVE_LIBUTF8_H 1
7347 EOF
7348
7349 if test -n "$cf_cv_header_path_utf8" ; then
7350   for cf_add_incdir in $cf_cv_header_path_utf8
7351   do
7352         while test $cf_add_incdir != /usr/include
7353         do
7354           if test -d $cf_add_incdir
7355           then
7356                 cf_have_incdir=no
7357                 if test -n "$CFLAGS$CPPFLAGS" ; then
7358                   # a loop is needed to ensure we can add subdirs of existing dirs
7359                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7360                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7361                           cf_have_incdir=yes; break
7362                         fi
7363                   done
7364                 fi
7365
7366                 if test "$cf_have_incdir" = no ; then
7367           if test "$cf_add_incdir" = /usr/local/include ; then
7368                         if test "$GCC" = yes
7369                         then
7370                           cf_save_CPPFLAGS=$CPPFLAGS
7371                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7372                           cat >conftest.$ac_ext <<_ACEOF
7373 #line 7373 "configure"
7374 #include "confdefs.h"
7375 #include <stdio.h>
7376 int
7377 main ()
7378 {
7379 printf("Hello")
7380   ;
7381   return 0;
7382 }
7383 _ACEOF
7384 rm -f conftest.$ac_objext
7385 if { (eval echo "$as_me:7385: \"$ac_compile\"") >&5
7386   (eval $ac_compile) 2>&5
7387   ac_status=$?
7388   echo "$as_me:7388: \$? = $ac_status" >&5
7389   (exit $ac_status); } &&
7390          { ac_try='test -s conftest.$ac_objext'
7391   { (eval echo "$as_me:7391: \"$ac_try\"") >&5
7392   (eval $ac_try) 2>&5
7393   ac_status=$?
7394   echo "$as_me:7394: \$? = $ac_status" >&5
7395   (exit $ac_status); }; }; then
7396   :
7397 else
7398   echo "$as_me: failed program was:" >&5
7399 cat conftest.$ac_ext >&5
7400 cf_have_incdir=yes
7401 fi
7402 rm -f conftest.$ac_objext conftest.$ac_ext
7403                           CPPFLAGS=$cf_save_CPPFLAGS
7404                         fi
7405                   fi
7406                 fi
7407
7408                 if test "$cf_have_incdir" = no ; then
7409                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7410
7411 echo "${as_me-configure}:7411: testing adding $cf_add_incdir to include-path ..." 1>&5
7412
7413                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
7414
7415           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7416           test "$cf_top_incdir" = "$cf_add_incdir" && break
7417           cf_add_incdir="$cf_top_incdir"
7418                 else
7419                   break
7420                 fi
7421           fi
7422         done
7423   done
7424 fi
7425
7426 if test -n "$cf_cv_library_path_utf8" ; then
7427   for cf_add_libdir in $cf_cv_library_path_utf8
7428   do
7429     if test $cf_add_libdir = /usr/lib ; then
7430       :
7431     elif test -d $cf_add_libdir
7432     then
7433       cf_have_libdir=no
7434       if test -n "$LDFLAGS$LIBS" ; then
7435         # a loop is needed to ensure we can add subdirs of existing dirs
7436         for cf_test_libdir in $LDFLAGS $LIBS ; do
7437           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7438             cf_have_libdir=yes; break
7439           fi
7440         done
7441       fi
7442       if test "$cf_have_libdir" = no ; then
7443         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7444
7445 echo "${as_me-configure}:7445: testing adding $cf_add_libdir to library-path ..." 1>&5
7446
7447         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7448       fi
7449     fi
7450   done
7451 fi
7452
7453         LIBS="-lutf8 $LIBS"
7454 fi
7455
7456                 if test "$cf_cv_utf8_lib" != no ; then
7457                         NCURSES_LIBUTF8=1
7458                 fi
7459         fi
7460
7461 # This is needed on Tru64 5.0 to declare mbstate_t
7462 echo "$as_me:7462: checking if we must include wchar.h to declare mbstate_t" >&5
7463 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7464 if test "${cf_cv_mbstate_t+set}" = set; then
7465   echo $ECHO_N "(cached) $ECHO_C" >&6
7466 else
7467
7468 cat >conftest.$ac_ext <<_ACEOF
7469 #line 7469 "configure"
7470 #include "confdefs.h"
7471
7472 #include <stdlib.h>
7473 #include <stdarg.h>
7474 #include <stdio.h>
7475 #ifdef HAVE_LIBUTF8_H
7476 #include <libutf8.h>
7477 #endif
7478 int
7479 main ()
7480 {
7481 mbstate_t state
7482   ;
7483   return 0;
7484 }
7485 _ACEOF
7486 rm -f conftest.$ac_objext
7487 if { (eval echo "$as_me:7487: \"$ac_compile\"") >&5
7488   (eval $ac_compile) 2>&5
7489   ac_status=$?
7490   echo "$as_me:7490: \$? = $ac_status" >&5
7491   (exit $ac_status); } &&
7492          { ac_try='test -s conftest.$ac_objext'
7493   { (eval echo "$as_me:7493: \"$ac_try\"") >&5
7494   (eval $ac_try) 2>&5
7495   ac_status=$?
7496   echo "$as_me:7496: \$? = $ac_status" >&5
7497   (exit $ac_status); }; }; then
7498   cf_cv_mbstate_t=no
7499 else
7500   echo "$as_me: failed program was:" >&5
7501 cat conftest.$ac_ext >&5
7502 cat >conftest.$ac_ext <<_ACEOF
7503 #line 7503 "configure"
7504 #include "confdefs.h"
7505
7506 #include <stdlib.h>
7507 #include <stdarg.h>
7508 #include <stdio.h>
7509 #include <wchar.h>
7510 #ifdef HAVE_LIBUTF8_H
7511 #include <libutf8.h>
7512 #endif
7513 int
7514 main ()
7515 {
7516 mbstate_t value
7517   ;
7518   return 0;
7519 }
7520 _ACEOF
7521 rm -f conftest.$ac_objext
7522 if { (eval echo "$as_me:7522: \"$ac_compile\"") >&5
7523   (eval $ac_compile) 2>&5
7524   ac_status=$?
7525   echo "$as_me:7525: \$? = $ac_status" >&5
7526   (exit $ac_status); } &&
7527          { ac_try='test -s conftest.$ac_objext'
7528   { (eval echo "$as_me:7528: \"$ac_try\"") >&5
7529   (eval $ac_try) 2>&5
7530   ac_status=$?
7531   echo "$as_me:7531: \$? = $ac_status" >&5
7532   (exit $ac_status); }; }; then
7533   cf_cv_mbstate_t=yes
7534 else
7535   echo "$as_me: failed program was:" >&5
7536 cat conftest.$ac_ext >&5
7537 cf_cv_mbstate_t=unknown
7538 fi
7539 rm -f conftest.$ac_objext conftest.$ac_ext
7540 fi
7541 rm -f conftest.$ac_objext conftest.$ac_ext
7542 fi
7543 echo "$as_me:7543: result: $cf_cv_mbstate_t" >&5
7544 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7545
7546 if test "$cf_cv_mbstate_t" = yes ; then
7547         cat >>confdefs.h <<\EOF
7548 #define NEED_WCHAR_H 1
7549 EOF
7550
7551         NEED_WCHAR_H=1
7552 fi
7553
7554 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7555 if test "$cf_cv_mbstate_t" = unknown ; then
7556         NCURSES_MBSTATE_T=1
7557 fi
7558
7559 # This is needed on Tru64 5.0 to declare wchar_t
7560 echo "$as_me:7560: checking if we must include wchar.h to declare wchar_t" >&5
7561 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7562 if test "${cf_cv_wchar_t+set}" = set; then
7563   echo $ECHO_N "(cached) $ECHO_C" >&6
7564 else
7565
7566 cat >conftest.$ac_ext <<_ACEOF
7567 #line 7567 "configure"
7568 #include "confdefs.h"
7569
7570 #include <stdlib.h>
7571 #include <stdarg.h>
7572 #include <stdio.h>
7573 #ifdef HAVE_LIBUTF8_H
7574 #include <libutf8.h>
7575 #endif
7576 int
7577 main ()
7578 {
7579 wchar_t state
7580   ;
7581   return 0;
7582 }
7583 _ACEOF
7584 rm -f conftest.$ac_objext
7585 if { (eval echo "$as_me:7585: \"$ac_compile\"") >&5
7586   (eval $ac_compile) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); } &&
7590          { ac_try='test -s conftest.$ac_objext'
7591   { (eval echo "$as_me:7591: \"$ac_try\"") >&5
7592   (eval $ac_try) 2>&5
7593   ac_status=$?
7594   echo "$as_me:7594: \$? = $ac_status" >&5
7595   (exit $ac_status); }; }; then
7596   cf_cv_wchar_t=no
7597 else
7598   echo "$as_me: failed program was:" >&5
7599 cat conftest.$ac_ext >&5
7600 cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603
7604 #include <stdlib.h>
7605 #include <stdarg.h>
7606 #include <stdio.h>
7607 #include <wchar.h>
7608 #ifdef HAVE_LIBUTF8_H
7609 #include <libutf8.h>
7610 #endif
7611 int
7612 main ()
7613 {
7614 wchar_t value
7615   ;
7616   return 0;
7617 }
7618 _ACEOF
7619 rm -f conftest.$ac_objext
7620 if { (eval echo "$as_me:7620: \"$ac_compile\"") >&5
7621   (eval $ac_compile) 2>&5
7622   ac_status=$?
7623   echo "$as_me:7623: \$? = $ac_status" >&5
7624   (exit $ac_status); } &&
7625          { ac_try='test -s conftest.$ac_objext'
7626   { (eval echo "$as_me:7626: \"$ac_try\"") >&5
7627   (eval $ac_try) 2>&5
7628   ac_status=$?
7629   echo "$as_me:7629: \$? = $ac_status" >&5
7630   (exit $ac_status); }; }; then
7631   cf_cv_wchar_t=yes
7632 else
7633   echo "$as_me: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635 cf_cv_wchar_t=unknown
7636 fi
7637 rm -f conftest.$ac_objext conftest.$ac_ext
7638 fi
7639 rm -f conftest.$ac_objext conftest.$ac_ext
7640 fi
7641 echo "$as_me:7641: result: $cf_cv_wchar_t" >&5
7642 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7643
7644 if test "$cf_cv_wchar_t" = yes ; then
7645         cat >>confdefs.h <<\EOF
7646 #define NEED_WCHAR_H 1
7647 EOF
7648
7649         NEED_WCHAR_H=1
7650 fi
7651
7652 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7653 if test "$cf_cv_wchar_t" = unknown ; then
7654         NCURSES_WCHAR_T=1
7655 fi
7656
7657 # if we find wchar_t in either place, use substitution to provide a fallback.
7658 if test "$cf_cv_wchar_t" != unknown ; then
7659         NCURSES_OK_WCHAR_T=1
7660 fi
7661
7662 # This is needed on Tru64 5.0 to declare wint_t
7663 echo "$as_me:7663: checking if we must include wchar.h to declare wint_t" >&5
7664 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7665 if test "${cf_cv_wint_t+set}" = set; then
7666   echo $ECHO_N "(cached) $ECHO_C" >&6
7667 else
7668
7669 cat >conftest.$ac_ext <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672
7673 #include <stdlib.h>
7674 #include <stdarg.h>
7675 #include <stdio.h>
7676 #ifdef HAVE_LIBUTF8_H
7677 #include <libutf8.h>
7678 #endif
7679 int
7680 main ()
7681 {
7682 wint_t state
7683   ;
7684   return 0;
7685 }
7686 _ACEOF
7687 rm -f conftest.$ac_objext
7688 if { (eval echo "$as_me:7688: \"$ac_compile\"") >&5
7689   (eval $ac_compile) 2>&5
7690   ac_status=$?
7691   echo "$as_me:7691: \$? = $ac_status" >&5
7692   (exit $ac_status); } &&
7693          { ac_try='test -s conftest.$ac_objext'
7694   { (eval echo "$as_me:7694: \"$ac_try\"") >&5
7695   (eval $ac_try) 2>&5
7696   ac_status=$?
7697   echo "$as_me:7697: \$? = $ac_status" >&5
7698   (exit $ac_status); }; }; then
7699   cf_cv_wint_t=no
7700 else
7701   echo "$as_me: failed program was:" >&5
7702 cat conftest.$ac_ext >&5
7703 cat >conftest.$ac_ext <<_ACEOF
7704 #line 7704 "configure"
7705 #include "confdefs.h"
7706
7707 #include <stdlib.h>
7708 #include <stdarg.h>
7709 #include <stdio.h>
7710 #include <wchar.h>
7711 #ifdef HAVE_LIBUTF8_H
7712 #include <libutf8.h>
7713 #endif
7714 int
7715 main ()
7716 {
7717 wint_t value
7718   ;
7719   return 0;
7720 }
7721 _ACEOF
7722 rm -f conftest.$ac_objext
7723 if { (eval echo "$as_me:7723: \"$ac_compile\"") >&5
7724   (eval $ac_compile) 2>&5
7725   ac_status=$?
7726   echo "$as_me:7726: \$? = $ac_status" >&5
7727   (exit $ac_status); } &&
7728          { ac_try='test -s conftest.$ac_objext'
7729   { (eval echo "$as_me:7729: \"$ac_try\"") >&5
7730   (eval $ac_try) 2>&5
7731   ac_status=$?
7732   echo "$as_me:7732: \$? = $ac_status" >&5
7733   (exit $ac_status); }; }; then
7734   cf_cv_wint_t=yes
7735 else
7736   echo "$as_me: failed program was:" >&5
7737 cat conftest.$ac_ext >&5
7738 cf_cv_wint_t=unknown
7739 fi
7740 rm -f conftest.$ac_objext conftest.$ac_ext
7741 fi
7742 rm -f conftest.$ac_objext conftest.$ac_ext
7743 fi
7744 echo "$as_me:7744: result: $cf_cv_wint_t" >&5
7745 echo "${ECHO_T}$cf_cv_wint_t" >&6
7746
7747 if test "$cf_cv_wint_t" = yes ; then
7748         cat >>confdefs.h <<\EOF
7749 #define NEED_WCHAR_H 1
7750 EOF
7751
7752         NEED_WCHAR_H=1
7753 fi
7754
7755 # if we do not find wint_t in either place, use substitution to provide a fallback.
7756 if test "$cf_cv_wint_t" = unknown ; then
7757         NCURSES_WINT_T=1
7758 fi
7759
7760 # if we find wint_t in either place, use substitution to provide a fallback.
7761 if test "$cf_cv_wint_t" != unknown ; then
7762         NCURSES_OK_WINT_T=1
7763 fi
7764
7765         if test "$NCURSES_MBSTATE_T" != 0; then
7766                 cat >>confdefs.h <<\EOF
7767 #define NEED_MBSTATE_T_DEF 1
7768 EOF
7769
7770         fi
7771 fi
7772
7773 ###   use option --disable-lp64 to allow long chtype
7774 case $cf_cv_abi_version in
7775 [345]*)
7776         default_with_lp64=no
7777         ;;
7778 *)
7779         default_with_lp64=yes
7780         ;;
7781 esac
7782
7783 echo "$as_me:7783: checking whether to enable _LP64 definition in curses.h" >&5
7784 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7785
7786 # Check whether --enable-lp64 or --disable-lp64 was given.
7787 if test "${enable_lp64+set}" = set; then
7788   enableval="$enable_lp64"
7789   with_lp64=$enableval
7790 else
7791   with_lp64=$default_with_lp64
7792 fi;
7793 echo "$as_me:7793: result: $with_lp64" >&5
7794 echo "${ECHO_T}$with_lp64" >&6
7795
7796 if test "$with_lp64" = yes ; then
7797         cf_cv_enable_lp64=1
7798 else
7799         cf_cv_enable_lp64=0
7800 fi
7801
7802 # Check whether --enable-largefile or --disable-largefile was given.
7803 if test "${enable_largefile+set}" = set; then
7804   enableval="$enable_largefile"
7805
7806 fi;
7807 if test "$enable_largefile" != no; then
7808
7809   echo "$as_me:7809: checking for special C compiler options needed for large files" >&5
7810 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7811 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7812   echo $ECHO_N "(cached) $ECHO_C" >&6
7813 else
7814   ac_cv_sys_largefile_CC=no
7815      if test "$GCC" != yes; then
7816        ac_save_CC=$CC
7817        while :; do
7818          # IRIX 6.2 and later do not support large files by default,
7819          # so use the C compiler's -n32 option if that helps.
7820          cat >conftest.$ac_ext <<_ACEOF
7821 #line 7821 "configure"
7822 #include "confdefs.h"
7823 #include <sys/types.h>
7824  /* Check that off_t can represent 2**63 - 1 correctly.
7825     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7826     since some C++ compilers masquerading as C compilers
7827     incorrectly reject 9223372036854775807.  */
7828 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7829   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7830                        && LARGE_OFF_T % 2147483647 == 1)
7831                       ? 1 : -1];
7832 int
7833 main ()
7834 {
7835
7836   ;
7837   return 0;
7838 }
7839 _ACEOF
7840          rm -f conftest.$ac_objext
7841 if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
7842   (eval $ac_compile) 2>&5
7843   ac_status=$?
7844   echo "$as_me:7844: \$? = $ac_status" >&5
7845   (exit $ac_status); } &&
7846          { ac_try='test -s conftest.$ac_objext'
7847   { (eval echo "$as_me:7847: \"$ac_try\"") >&5
7848   (eval $ac_try) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); }; }; then
7852   break
7853 else
7854   echo "$as_me: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856 fi
7857 rm -f conftest.$ac_objext
7858          CC="$CC -n32"
7859          rm -f conftest.$ac_objext
7860 if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7861   (eval $ac_compile) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); } &&
7865          { ac_try='test -s conftest.$ac_objext'
7866   { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7867   (eval $ac_try) 2>&5
7868   ac_status=$?
7869   echo "$as_me:7869: \$? = $ac_status" >&5
7870   (exit $ac_status); }; }; then
7871   ac_cv_sys_largefile_CC=' -n32'; break
7872 else
7873   echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 fi
7876 rm -f conftest.$ac_objext
7877          break
7878        done
7879        CC=$ac_save_CC
7880        rm -f conftest.$ac_ext
7881     fi
7882 fi
7883 echo "$as_me:7883: result: $ac_cv_sys_largefile_CC" >&5
7884 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7885   if test "$ac_cv_sys_largefile_CC" != no; then
7886     CC=$CC$ac_cv_sys_largefile_CC
7887   fi
7888
7889   echo "$as_me:7889: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7890 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7891 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7892   echo $ECHO_N "(cached) $ECHO_C" >&6
7893 else
7894   while :; do
7895   ac_cv_sys_file_offset_bits=no
7896   cat >conftest.$ac_ext <<_ACEOF
7897 #line 7897 "configure"
7898 #include "confdefs.h"
7899 #include <sys/types.h>
7900  /* Check that off_t can represent 2**63 - 1 correctly.
7901     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7902     since some C++ compilers masquerading as C compilers
7903     incorrectly reject 9223372036854775807.  */
7904 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7905   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7906                        && LARGE_OFF_T % 2147483647 == 1)
7907                       ? 1 : -1];
7908 int
7909 main ()
7910 {
7911
7912   ;
7913   return 0;
7914 }
7915 _ACEOF
7916 rm -f conftest.$ac_objext
7917 if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
7918   (eval $ac_compile) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit $ac_status); } &&
7922          { ac_try='test -s conftest.$ac_objext'
7923   { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7924   (eval $ac_try) 2>&5
7925   ac_status=$?
7926   echo "$as_me:7926: \$? = $ac_status" >&5
7927   (exit $ac_status); }; }; then
7928   break
7929 else
7930   echo "$as_me: failed program was:" >&5
7931 cat conftest.$ac_ext >&5
7932 fi
7933 rm -f conftest.$ac_objext conftest.$ac_ext
7934   cat >conftest.$ac_ext <<_ACEOF
7935 #line 7935 "configure"
7936 #include "confdefs.h"
7937 #define _FILE_OFFSET_BITS 64
7938 #include <sys/types.h>
7939  /* Check that off_t can represent 2**63 - 1 correctly.
7940     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7941     since some C++ compilers masquerading as C compilers
7942     incorrectly reject 9223372036854775807.  */
7943 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7944   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7945                        && LARGE_OFF_T % 2147483647 == 1)
7946                       ? 1 : -1];
7947 int
7948 main ()
7949 {
7950
7951   ;
7952   return 0;
7953 }
7954 _ACEOF
7955 rm -f conftest.$ac_objext
7956 if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
7957   (eval $ac_compile) 2>&5
7958   ac_status=$?
7959   echo "$as_me:7959: \$? = $ac_status" >&5
7960   (exit $ac_status); } &&
7961          { ac_try='test -s conftest.$ac_objext'
7962   { (eval echo "$as_me:7962: \"$ac_try\"") >&5
7963   (eval $ac_try) 2>&5
7964   ac_status=$?
7965   echo "$as_me:7965: \$? = $ac_status" >&5
7966   (exit $ac_status); }; }; then
7967   ac_cv_sys_file_offset_bits=64; break
7968 else
7969   echo "$as_me: failed program was:" >&5
7970 cat conftest.$ac_ext >&5
7971 fi
7972 rm -f conftest.$ac_objext conftest.$ac_ext
7973   break
7974 done
7975 fi
7976 echo "$as_me:7976: result: $ac_cv_sys_file_offset_bits" >&5
7977 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7978 if test "$ac_cv_sys_file_offset_bits" != no; then
7979
7980 cat >>confdefs.h <<EOF
7981 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7982 EOF
7983
7984 fi
7985 rm -f conftest*
7986   echo "$as_me:7986: checking for _LARGE_FILES value needed for large files" >&5
7987 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7988 if test "${ac_cv_sys_large_files+set}" = set; then
7989   echo $ECHO_N "(cached) $ECHO_C" >&6
7990 else
7991   while :; do
7992   ac_cv_sys_large_files=no
7993   cat >conftest.$ac_ext <<_ACEOF
7994 #line 7994 "configure"
7995 #include "confdefs.h"
7996 #include <sys/types.h>
7997  /* Check that off_t can represent 2**63 - 1 correctly.
7998     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7999     since some C++ compilers masquerading as C compilers
8000     incorrectly reject 9223372036854775807.  */
8001 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8002   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8003                        && LARGE_OFF_T % 2147483647 == 1)
8004                       ? 1 : -1];
8005 int
8006 main ()
8007 {
8008
8009   ;
8010   return 0;
8011 }
8012 _ACEOF
8013 rm -f conftest.$ac_objext
8014 if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
8015   (eval $ac_compile) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); } &&
8019          { ac_try='test -s conftest.$ac_objext'
8020   { (eval echo "$as_me:8020: \"$ac_try\"") >&5
8021   (eval $ac_try) 2>&5
8022   ac_status=$?
8023   echo "$as_me:8023: \$? = $ac_status" >&5
8024   (exit $ac_status); }; }; then
8025   break
8026 else
8027   echo "$as_me: failed program was:" >&5
8028 cat conftest.$ac_ext >&5
8029 fi
8030 rm -f conftest.$ac_objext conftest.$ac_ext
8031   cat >conftest.$ac_ext <<_ACEOF
8032 #line 8032 "configure"
8033 #include "confdefs.h"
8034 #define _LARGE_FILES 1
8035 #include <sys/types.h>
8036  /* Check that off_t can represent 2**63 - 1 correctly.
8037     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8038     since some C++ compilers masquerading as C compilers
8039     incorrectly reject 9223372036854775807.  */
8040 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8041   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8042                        && LARGE_OFF_T % 2147483647 == 1)
8043                       ? 1 : -1];
8044 int
8045 main ()
8046 {
8047
8048   ;
8049   return 0;
8050 }
8051 _ACEOF
8052 rm -f conftest.$ac_objext
8053 if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
8054   (eval $ac_compile) 2>&5
8055   ac_status=$?
8056   echo "$as_me:8056: \$? = $ac_status" >&5
8057   (exit $ac_status); } &&
8058          { ac_try='test -s conftest.$ac_objext'
8059   { (eval echo "$as_me:8059: \"$ac_try\"") >&5
8060   (eval $ac_try) 2>&5
8061   ac_status=$?
8062   echo "$as_me:8062: \$? = $ac_status" >&5
8063   (exit $ac_status); }; }; then
8064   ac_cv_sys_large_files=1; break
8065 else
8066   echo "$as_me: failed program was:" >&5
8067 cat conftest.$ac_ext >&5
8068 fi
8069 rm -f conftest.$ac_objext conftest.$ac_ext
8070   break
8071 done
8072 fi
8073 echo "$as_me:8073: result: $ac_cv_sys_large_files" >&5
8074 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8075 if test "$ac_cv_sys_large_files" != no; then
8076
8077 cat >>confdefs.h <<EOF
8078 #define _LARGE_FILES $ac_cv_sys_large_files
8079 EOF
8080
8081 fi
8082 rm -f conftest*
8083 fi
8084
8085     if test "$enable_largefile" != no ; then
8086         echo "$as_me:8086: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8087 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8088 if test "${ac_cv_sys_largefile_source+set}" = set; then
8089   echo $ECHO_N "(cached) $ECHO_C" >&6
8090 else
8091   while :; do
8092   ac_cv_sys_largefile_source=no
8093   cat >conftest.$ac_ext <<_ACEOF
8094 #line 8094 "configure"
8095 #include "confdefs.h"
8096 #include <stdio.h>
8097 int
8098 main ()
8099 {
8100 return !fseeko;
8101   ;
8102   return 0;
8103 }
8104 _ACEOF
8105 rm -f conftest.$ac_objext
8106 if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
8107   (eval $ac_compile) 2>&5
8108   ac_status=$?
8109   echo "$as_me:8109: \$? = $ac_status" >&5
8110   (exit $ac_status); } &&
8111          { ac_try='test -s conftest.$ac_objext'
8112   { (eval echo "$as_me:8112: \"$ac_try\"") >&5
8113   (eval $ac_try) 2>&5
8114   ac_status=$?
8115   echo "$as_me:8115: \$? = $ac_status" >&5
8116   (exit $ac_status); }; }; then
8117   break
8118 else
8119   echo "$as_me: failed program was:" >&5
8120 cat conftest.$ac_ext >&5
8121 fi
8122 rm -f conftest.$ac_objext conftest.$ac_ext
8123   cat >conftest.$ac_ext <<_ACEOF
8124 #line 8124 "configure"
8125 #include "confdefs.h"
8126 #define _LARGEFILE_SOURCE 1
8127 #include <stdio.h>
8128 int
8129 main ()
8130 {
8131 return !fseeko;
8132   ;
8133   return 0;
8134 }
8135 _ACEOF
8136 rm -f conftest.$ac_objext
8137 if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
8138   (eval $ac_compile) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); } &&
8142          { ac_try='test -s conftest.$ac_objext'
8143   { (eval echo "$as_me:8143: \"$ac_try\"") >&5
8144   (eval $ac_try) 2>&5
8145   ac_status=$?
8146   echo "$as_me:8146: \$? = $ac_status" >&5
8147   (exit $ac_status); }; }; then
8148   ac_cv_sys_largefile_source=1; break
8149 else
8150   echo "$as_me: failed program was:" >&5
8151 cat conftest.$ac_ext >&5
8152 fi
8153 rm -f conftest.$ac_objext conftest.$ac_ext
8154   break
8155 done
8156 fi
8157 echo "$as_me:8157: result: $ac_cv_sys_largefile_source" >&5
8158 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8159 if test "$ac_cv_sys_largefile_source" != no; then
8160
8161 cat >>confdefs.h <<EOF
8162 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8163 EOF
8164
8165 fi
8166 rm -f conftest*
8167
8168 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8169 # in glibc 2.1.3, but that breaks too many other things.
8170 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8171 echo "$as_me:8171: checking for fseeko" >&5
8172 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8173 if test "${ac_cv_func_fseeko+set}" = set; then
8174   echo $ECHO_N "(cached) $ECHO_C" >&6
8175 else
8176   cat >conftest.$ac_ext <<_ACEOF
8177 #line 8177 "configure"
8178 #include "confdefs.h"
8179 #include <stdio.h>
8180 int
8181 main ()
8182 {
8183 return fseeko && fseeko (stdin, 0, 0);
8184   ;
8185   return 0;
8186 }
8187 _ACEOF
8188 rm -f conftest.$ac_objext conftest$ac_exeext
8189 if { (eval echo "$as_me:8189: \"$ac_link\"") >&5
8190   (eval $ac_link) 2>&5
8191   ac_status=$?
8192   echo "$as_me:8192: \$? = $ac_status" >&5
8193   (exit $ac_status); } &&
8194          { ac_try='test -s conftest$ac_exeext'
8195   { (eval echo "$as_me:8195: \"$ac_try\"") >&5
8196   (eval $ac_try) 2>&5
8197   ac_status=$?
8198   echo "$as_me:8198: \$? = $ac_status" >&5
8199   (exit $ac_status); }; }; then
8200   ac_cv_func_fseeko=yes
8201 else
8202   echo "$as_me: failed program was:" >&5
8203 cat conftest.$ac_ext >&5
8204 ac_cv_func_fseeko=no
8205 fi
8206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8207 fi
8208 echo "$as_me:8208: result: $ac_cv_func_fseeko" >&5
8209 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8210 if test $ac_cv_func_fseeko = yes; then
8211
8212 cat >>confdefs.h <<\EOF
8213 #define HAVE_FSEEKO 1
8214 EOF
8215
8216 fi
8217
8218         # Normally we would collect these definitions in the config.h,
8219         # but (like _XOPEN_SOURCE), some environments rely on having these
8220         # defined before any of the system headers are included.  Another
8221         # case comes up with C++, e.g., on AIX the compiler compiles the
8222         # header files by themselves before looking at the body files it is
8223         # told to compile.  For ncurses, those header files do not include
8224         # the config.h
8225         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8226         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8227         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8228
8229         echo "$as_me:8229: checking whether to use struct dirent64" >&5
8230 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8231 if test "${cf_cv_struct_dirent64+set}" = set; then
8232   echo $ECHO_N "(cached) $ECHO_C" >&6
8233 else
8234
8235                 cat >conftest.$ac_ext <<_ACEOF
8236 #line 8236 "configure"
8237 #include "confdefs.h"
8238
8239 #include <sys/types.h>
8240 #include <dirent.h>
8241
8242 int
8243 main ()
8244 {
8245
8246                 /* if transitional largefile support is setup, this is true */
8247                 extern struct dirent64 * readdir(DIR *);
8248                 struct dirent64 *x = readdir((DIR *)0);
8249                 struct dirent *y = readdir((DIR *)0);
8250                 int z = x - y;
8251
8252   ;
8253   return 0;
8254 }
8255 _ACEOF
8256 rm -f conftest.$ac_objext
8257 if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
8258   (eval $ac_compile) 2>&5
8259   ac_status=$?
8260   echo "$as_me:8260: \$? = $ac_status" >&5
8261   (exit $ac_status); } &&
8262          { ac_try='test -s conftest.$ac_objext'
8263   { (eval echo "$as_me:8263: \"$ac_try\"") >&5
8264   (eval $ac_try) 2>&5
8265   ac_status=$?
8266   echo "$as_me:8266: \$? = $ac_status" >&5
8267   (exit $ac_status); }; }; then
8268   cf_cv_struct_dirent64=yes
8269 else
8270   echo "$as_me: failed program was:" >&5
8271 cat conftest.$ac_ext >&5
8272 cf_cv_struct_dirent64=no
8273 fi
8274 rm -f conftest.$ac_objext conftest.$ac_ext
8275
8276 fi
8277 echo "$as_me:8277: result: $cf_cv_struct_dirent64" >&5
8278 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8279         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8280 #define HAVE_STRUCT_DIRENT64 1
8281 EOF
8282
8283     fi
8284
8285 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8286 echo "$as_me:8286: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8287 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8288
8289 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8290 if test "${enable_tparm_varargs+set}" = set; then
8291   enableval="$enable_tparm_varargs"
8292   with_tparm_varargs=$enableval
8293 else
8294   with_tparm_varargs=yes
8295 fi;
8296 echo "$as_me:8296: result: $with_tparm_varargs" >&5
8297 echo "${ECHO_T}$with_tparm_varargs" >&6
8298 NCURSES_TPARM_VARARGS=0
8299 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8300
8301 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8302 if test "$with_ticlib" != no ; then
8303 echo "$as_me:8303: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8304 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8305
8306 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8307 if test "${enable_tic_depends+set}" = set; then
8308   enableval="$enable_tic_depends"
8309   with_tic_depends=$enableval
8310 else
8311   with_tic_depends=yes
8312 fi;
8313 echo "$as_me:8313: result: $with_tic_depends" >&5
8314 echo "${ECHO_T}$with_tic_depends" >&6
8315 else
8316         with_tic_depends=no
8317 fi
8318
8319 ###   use option --with-bool to override bool's type
8320 echo "$as_me:8320: checking for type of bool" >&5
8321 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8322
8323 # Check whether --with-bool or --without-bool was given.
8324 if test "${with_bool+set}" = set; then
8325   withval="$with_bool"
8326   NCURSES_BOOL="$withval"
8327 else
8328   NCURSES_BOOL=auto
8329 fi;
8330 echo "$as_me:8330: result: $NCURSES_BOOL" >&5
8331 echo "${ECHO_T}$NCURSES_BOOL" >&6
8332
8333 echo "$as_me:8333: checking for alternate terminal capabilities file" >&5
8334 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8335
8336 # Check whether --with-caps or --without-caps was given.
8337 if test "${with_caps+set}" = set; then
8338   withval="$with_caps"
8339   TERMINFO_CAPS=Caps.$withval
8340 else
8341   TERMINFO_CAPS=Caps
8342 fi;
8343 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8344 echo "$as_me:8344: result: $TERMINFO_CAPS" >&5
8345 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8346
8347 ###   use option --with-chtype to override chtype's type
8348 echo "$as_me:8348: checking for type of chtype" >&5
8349 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8350
8351 # Check whether --with-chtype or --without-chtype was given.
8352 if test "${with_chtype+set}" = set; then
8353   withval="$with_chtype"
8354   NCURSES_CHTYPE="$withval"
8355 else
8356   NCURSES_CHTYPE=auto
8357 fi;
8358 echo "$as_me:8358: result: $NCURSES_CHTYPE" >&5
8359 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8360
8361 ###   use option --with-ospeed to override ospeed's type
8362 echo "$as_me:8362: checking for type of ospeed" >&5
8363 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8364
8365 # Check whether --with-ospeed or --without-ospeed was given.
8366 if test "${with_ospeed+set}" = set; then
8367   withval="$with_ospeed"
8368   NCURSES_OSPEED="$withval"
8369 else
8370   NCURSES_OSPEED=short
8371 fi;
8372 echo "$as_me:8372: result: $NCURSES_OSPEED" >&5
8373 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8374
8375 ###   use option --with-mmask-t to override mmask_t's type
8376 echo "$as_me:8376: checking for type of mmask_t" >&5
8377 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8378
8379 # Check whether --with-mmask-t or --without-mmask-t was given.
8380 if test "${with_mmask_t+set}" = set; then
8381   withval="$with_mmask_t"
8382   NCURSES_MMASK_T="$withval"
8383 else
8384   NCURSES_MMASK_T=auto
8385 fi;
8386 echo "$as_me:8386: result: $NCURSES_MMASK_T" >&5
8387 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8388
8389 ### Enable compiling-in rcs id's
8390 echo "$as_me:8390: checking if RCS identifiers should be compiled-in" >&5
8391 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8392
8393 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8394 if test "${with_rcs_ids+set}" = set; then
8395   withval="$with_rcs_ids"
8396   with_rcs_ids=$withval
8397 else
8398   with_rcs_ids=no
8399 fi;
8400 echo "$as_me:8400: result: $with_rcs_ids" >&5
8401 echo "${ECHO_T}$with_rcs_ids" >&6
8402 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8403 #define USE_RCS_IDS 1
8404 EOF
8405
8406 ###############################################################################
8407
8408 echo "$as_me:8408: checking format of man-pages" >&5
8409 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8410
8411 # Check whether --with-manpage-format or --without-manpage-format was given.
8412 if test "${with_manpage_format+set}" = set; then
8413   withval="$with_manpage_format"
8414   MANPAGE_FORMAT=$withval
8415 else
8416   MANPAGE_FORMAT=unknown
8417 fi;
8418
8419 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8420 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8421
8422 cf_unknown=
8423
8424 case $MANPAGE_FORMAT in
8425 unknown)
8426   if test -z "$MANPATH" ; then
8427     MANPATH="/usr/man:/usr/share/man"
8428   fi
8429
8430   # look for the 'date' man-page (it's most likely to be installed!)
8431   MANPAGE_FORMAT=
8432   cf_preform=no
8433   cf_catonly=yes
8434   cf_example=date
8435
8436   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8437   for cf_dir in $MANPATH; do
8438     test -z "$cf_dir" && cf_dir=/usr/man
8439     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
8440     do
8441       cf_test=`echo $cf_name | sed -e 's/*//'`
8442       if test "x$cf_test" = "x$cf_name" ; then
8443
8444         case "$cf_name" in
8445         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8446         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8447         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8448         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8449         esac
8450
8451         case "$cf_name" in
8452         $cf_dir/man*)
8453           cf_catonly=no
8454           ;;
8455         $cf_dir/cat*)
8456           cf_preform=yes
8457           ;;
8458         esac
8459         break
8460       fi
8461
8462       # if we found a match in either man* or cat*, stop looking
8463       if test -n "$MANPAGE_FORMAT" ; then
8464         cf_found=no
8465         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8466         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8467         case "$cf_name" in
8468         $cf_dir/cat*)
8469           cf_found=yes
8470           ;;
8471         esac
8472         test $cf_found=yes && break
8473       fi
8474     done
8475     # only check the first directory in $MANPATH where we find manpages
8476     if test -n "$MANPAGE_FORMAT" ; then
8477        break
8478     fi
8479   done
8480   # if we did not find the example, just assume it is normal
8481   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8482   IFS="$ac_save_ifs"
8483   ;;
8484 *)
8485   for cf_option in $MANPAGE_FORMAT; do
8486      case $cf_option in #(vi
8487      gzip|compress|BSDI|normal|formatted|catonly)
8488        ;;
8489      *)
8490        cf_unknown="$cf_unknown $cf_option"
8491        ;;
8492      esac
8493   done
8494   ;;
8495 esac
8496
8497 echo "$as_me:8497: result: $MANPAGE_FORMAT" >&5
8498 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8499 if test -n "$cf_unknown" ; then
8500   { echo "$as_me:8500: WARNING: Unexpected manpage-format $cf_unknown" >&5
8501 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8502 fi
8503
8504 echo "$as_me:8504: checking for manpage renaming" >&5
8505 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8506
8507 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8508 if test "${with_manpage_renames+set}" = set; then
8509   withval="$with_manpage_renames"
8510   MANPAGE_RENAMES=$withval
8511 else
8512   MANPAGE_RENAMES=yes
8513 fi;
8514
8515 case ".$MANPAGE_RENAMES" in #(vi
8516 .no) #(vi
8517   ;;
8518 .|.yes)
8519   # Debian 'man' program?
8520   if test -f /etc/debian_version ; then
8521     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8522   else
8523     MANPAGE_RENAMES=no
8524   fi
8525   ;;
8526 esac
8527
8528 if test "$MANPAGE_RENAMES" != no ; then
8529   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8530     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8531   elif test ! -f $MANPAGE_RENAMES ; then
8532     { { echo "$as_me:8532: error: not a filename: $MANPAGE_RENAMES" >&5
8533 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8534    { (exit 1); exit 1; }; }
8535   fi
8536
8537   test ! -d man && mkdir man
8538
8539   # Construct a sed-script to perform renaming within man-pages
8540   if test -n "$MANPAGE_RENAMES" ; then
8541     test ! -d man && mkdir man
8542     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8543   fi
8544 fi
8545
8546 echo "$as_me:8546: result: $MANPAGE_RENAMES" >&5
8547 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8548
8549 echo "$as_me:8549: checking if manpage aliases will be installed" >&5
8550 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8551
8552 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8553 if test "${with_manpage_aliases+set}" = set; then
8554   withval="$with_manpage_aliases"
8555   MANPAGE_ALIASES=$withval
8556 else
8557   MANPAGE_ALIASES=yes
8558 fi;
8559
8560 echo "$as_me:8560: result: $MANPAGE_ALIASES" >&5
8561 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8562
8563 if test "$LN_S" = "ln -s"; then
8564         cf_use_symlinks=yes
8565 else
8566         cf_use_symlinks=no
8567 fi
8568
8569 MANPAGE_SYMLINKS=no
8570 if test "$MANPAGE_ALIASES" = yes ; then
8571 echo "$as_me:8571: checking if manpage symlinks should be used" >&5
8572 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8573
8574 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8575 if test "${with_manpage_symlinks+set}" = set; then
8576   withval="$with_manpage_symlinks"
8577   MANPAGE_SYMLINKS=$withval
8578 else
8579   MANPAGE_SYMLINKS=$cf_use_symlinks
8580 fi;
8581
8582 if test "$$cf_use_symlinks" = no; then
8583 if test "$MANPAGE_SYMLINKS" = yes ; then
8584         { echo "$as_me:8584: WARNING: cannot make symlinks" >&5
8585 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8586         MANPAGE_SYMLINKS=no
8587 fi
8588 fi
8589
8590 echo "$as_me:8590: result: $MANPAGE_SYMLINKS" >&5
8591 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8592 fi
8593
8594 echo "$as_me:8594: checking for manpage tbl" >&5
8595 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8596
8597 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8598 if test "${with_manpage_tbl+set}" = set; then
8599   withval="$with_manpage_tbl"
8600   MANPAGE_TBL=$withval
8601 else
8602   MANPAGE_TBL=no
8603 fi;
8604
8605 echo "$as_me:8605: result: $MANPAGE_TBL" >&5
8606 echo "${ECHO_T}$MANPAGE_TBL" >&6
8607
8608   if test "$prefix" = "NONE" ; then
8609      cf_prefix="$ac_default_prefix"
8610   else
8611      cf_prefix="$prefix"
8612   fi
8613
8614   case "$MANPAGE_FORMAT" in # (vi
8615   *catonly*) # (vi
8616     cf_format=yes
8617     cf_inboth=no
8618     ;;
8619   *formatted*) # (vi
8620     cf_format=yes
8621     cf_inboth=yes
8622     ;;
8623   *)
8624     cf_format=no
8625     cf_inboth=no
8626     ;;
8627   esac
8628
8629 test ! -d man && mkdir man
8630
8631 cf_so_strip=
8632 cf_compress=
8633 case "$MANPAGE_FORMAT" in #(vi
8634 *compress*) #(vi
8635         cf_so_strip="Z"
8636         cf_compress=compress
8637   ;;
8638 *gzip*) #(vi
8639         cf_so_strip="gz"
8640         cf_compress=gzip
8641   ;;
8642 esac
8643
8644 cf_edit_man=./edit_man.sh
8645 cf_man_alias=`pwd`/man_alias.sed
8646
8647 cat >$cf_edit_man <<CF_EOF
8648 #! /bin/sh
8649 # this script is generated by the configure-script CF_MAN_PAGES macro.
8650
8651 prefix="$cf_prefix"
8652 datadir="$datadir"
8653
8654 NCURSES_MAJOR="$NCURSES_MAJOR"
8655 NCURSES_MINOR="$NCURSES_MINOR"
8656 NCURSES_PATCH="$NCURSES_PATCH"
8657
8658 NCURSES_OSPEED="$NCURSES_OSPEED"
8659 TERMINFO="$TERMINFO"
8660
8661 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8662
8663 INSTALL="$INSTALL"
8664 INSTALL_DATA="$INSTALL_DATA"
8665
8666 transform="$program_transform_name"
8667
8668 TMP=\${TMPDIR-/tmp}/man\$\$
8669 trap "rm -f \$TMP" 0 1 2 5 15
8670
8671 form=\$1
8672 shift || exit 1
8673
8674 verb=\$1
8675 shift || exit 1
8676
8677 mandir=\$1
8678 shift || exit 1
8679
8680 srcdir=\$1
8681 top_srcdir=\$srcdir/..
8682 shift || exit 1
8683
8684 if test "\$form" = normal ; then
8685         if test "$cf_format" = yes ; then
8686         if test "$cf_inboth" = no ; then
8687                 sh \$0 format \$verb \$mandir \$srcdir \$*
8688                 exit $?
8689         fi
8690         fi
8691         cf_subdir=\$mandir/man
8692         cf_tables=$MANPAGE_TBL
8693 else
8694         cf_subdir=\$mandir/cat
8695         cf_tables=yes
8696 fi
8697
8698 # process the list of source-files
8699 for i in \$* ; do
8700 case \$i in #(vi
8701 *.orig|*.rej) ;; #(vi
8702 *.[0-9]*)
8703         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8704         if test \$verb = installing ; then
8705         if test ! -d \$cf_subdir\${section} ; then
8706                 \$MKDIRS \$cf_subdir\$section
8707         fi
8708         fi
8709
8710         # replace variables in man page
8711         if test ! -f $cf_man_alias ; then
8712 cat >>$cf_man_alias <<-CF_EOF2
8713                 s,@DATADIR@,\$datadir,g
8714                 s,@TERMINFO@,\$TERMINFO,g
8715                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8716                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8717                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8718                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8719 CF_EOF
8720
8721         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8722         do
8723                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8724                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8725 cat >>$cf_edit_man <<-CF_EOF
8726                 s,@$cf_NAME@,$cf_name,
8727 CF_EOF
8728         done
8729
8730 cat >>$cf_edit_man <<CF_EOF
8731 CF_EOF2
8732                 echo "...made $cf_man_alias"
8733         fi
8734
8735         aliases=
8736         cf_source=\`basename \$i\`
8737         inalias=\$cf_source
8738         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8739         if test ! -f \$inalias ; then
8740                 echo .. skipped \$cf_source
8741                 continue
8742         fi
8743 CF_EOF
8744
8745 if test "$MANPAGE_ALIASES" != no ; then
8746 cat >>$cf_edit_man <<CF_EOF
8747         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8748 CF_EOF
8749 fi
8750
8751 if test "$MANPAGE_RENAMES" = no ; then
8752 cat >>$cf_edit_man <<CF_EOF
8753         # perform program transformations for section 1 man pages
8754         if test \$section = 1 ; then
8755                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8756         else
8757                 cf_target=\$cf_subdir\${section}/\$cf_source
8758         fi
8759 CF_EOF
8760 else
8761 cat >>$cf_edit_man <<CF_EOF
8762         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8763         if test -z "\$cf_target" ; then
8764                 echo '? missing rename for '\$cf_source
8765                 cf_target="\$cf_source"
8766         fi
8767         cf_target="\$cf_subdir\${section}/\${cf_target}"
8768
8769 CF_EOF
8770 fi
8771
8772 cat >>$cf_edit_man <<CF_EOF
8773         sed     -f $cf_man_alias \\
8774 CF_EOF
8775
8776 if test -f $MANPAGE_RENAMES ; then
8777 cat >>$cf_edit_man <<CF_EOF
8778                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8779 CF_EOF
8780 else
8781 cat >>$cf_edit_man <<CF_EOF
8782                 < \$i >\$TMP
8783 CF_EOF
8784 fi
8785
8786 cat >>$cf_edit_man <<CF_EOF
8787 if test \$cf_tables = yes ; then
8788         tbl \$TMP >\$TMP.out
8789         mv \$TMP.out \$TMP
8790 fi
8791 CF_EOF
8792
8793 if test $with_curses_h != yes ; then
8794 cat >>$cf_edit_man <<CF_EOF
8795         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8796         mv \$TMP.out \$TMP
8797 CF_EOF
8798 fi
8799
8800 cat >>$cf_edit_man <<CF_EOF
8801         if test \$form = format ; then
8802                 nroff -man \$TMP >\$TMP.out
8803                 mv \$TMP.out \$TMP
8804         fi
8805 CF_EOF
8806
8807 if test -n "$cf_compress" ; then
8808 cat >>$cf_edit_man <<CF_EOF
8809         if test \$verb = installing ; then
8810         if ( $cf_compress -f \$TMP )
8811         then
8812                 mv \$TMP.$cf_so_strip \$TMP
8813         fi
8814         fi
8815         cf_target="\$cf_target.$cf_so_strip"
8816 CF_EOF
8817 fi
8818
8819 case "$MANPAGE_FORMAT" in #(vi
8820 *BSDI*)
8821 cat >>$cf_edit_man <<CF_EOF
8822         if test \$form = format ; then
8823                 # BSDI installs only .0 suffixes in the cat directories
8824                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8825         fi
8826 CF_EOF
8827   ;;
8828 esac
8829
8830 cat >>$cf_edit_man <<CF_EOF
8831         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8832         if test \$verb = installing ; then
8833                 echo \$verb \$cf_target
8834                 \$INSTALL_DATA \$TMP \$cf_target
8835                 test -d \$cf_subdir\${section} &&
8836                 test -n "\$aliases" && (
8837                         cd \$cf_subdir\${section} && (
8838                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8839                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8840                                 cf_target=\`basename \$cf_target\`
8841                                 for cf_alias in \$aliases
8842                                 do
8843                                         if test \$section = 1 ; then
8844                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8845                                         fi
8846
8847                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8848                                                 if test -f \$cf_alias\${suffix} ; then
8849                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8850                                                         then
8851                                                                 continue
8852                                                         fi
8853                                                 fi
8854                                                 echo .. \$verb alias \$cf_alias\${suffix}
8855                                                 rm -f \$cf_alias\${suffix}
8856                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8857                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8858                                                 echo ".so \$cf_source" >\$TMP
8859 CF_EOF
8860 if test -n "$cf_compress" ; then
8861 cat >>$cf_edit_man <<CF_EOF
8862                                                 if test -n "$cf_so_strip" ; then
8863                                                         $cf_compress -f \$TMP
8864                                                         mv \$TMP.$cf_so_strip \$TMP
8865                                                 fi
8866 CF_EOF
8867 fi
8868 cat >>$cf_edit_man <<CF_EOF
8869                                                 echo .. \$verb alias \$cf_alias\${suffix}
8870                                                 rm -f \$cf_alias\${suffix}
8871                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8872                                         fi
8873                                 done
8874                         )
8875                 )
8876         elif test \$verb = removing ; then
8877                 test -f \$cf_target && (
8878                         echo \$verb \$cf_target
8879                         rm -f \$cf_target
8880                 )
8881                 test -d \$cf_subdir\${section} &&
8882                 test -n "\$aliases" && (
8883                         cd \$cf_subdir\${section} && (
8884                                 for cf_alias in \$aliases
8885                                 do
8886                                         if test \$section = 1 ; then
8887                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8888                                         fi
8889
8890                                         echo .. \$verb alias \$cf_alias\${suffix}
8891                                         rm -f \$cf_alias\${suffix}
8892                                 done
8893                         )
8894                 )
8895         else
8896 #               echo ".hy 0"
8897                 cat \$TMP
8898         fi
8899         ;;
8900 esac
8901 done
8902
8903 if test $cf_inboth = yes ; then
8904 if test \$form != format ; then
8905         sh \$0 format \$verb \$mandir \$srcdir \$*
8906 fi
8907 fi
8908
8909 exit 0
8910 CF_EOF
8911 chmod 755 $cf_edit_man
8912
8913 ###############################################################################
8914
8915 ### Note that some functions (such as const) are normally disabled anyway.
8916 echo "$as_me:8916: checking if you want to build with function extensions" >&5
8917 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8918
8919 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8920 if test "${enable_ext_funcs+set}" = set; then
8921   enableval="$enable_ext_funcs"
8922   with_ext_funcs=$enableval
8923 else
8924   with_ext_funcs=yes
8925 fi;
8926 echo "$as_me:8926: result: $with_ext_funcs" >&5
8927 echo "${ECHO_T}$with_ext_funcs" >&6
8928 if test "$with_ext_funcs" = yes ; then
8929         NCURSES_EXT_FUNCS=1
8930         cat >>confdefs.h <<\EOF
8931 #define HAVE_CURSES_VERSION 1
8932 EOF
8933
8934         cat >>confdefs.h <<\EOF
8935 #define HAVE_HAS_KEY 1
8936 EOF
8937
8938         cat >>confdefs.h <<\EOF
8939 #define HAVE_RESIZETERM 1
8940 EOF
8941
8942         cat >>confdefs.h <<\EOF
8943 #define HAVE_RESIZE_TERM 1
8944 EOF
8945
8946         cat >>confdefs.h <<\EOF
8947 #define HAVE_USE_DEFAULT_COLORS 1
8948 EOF
8949
8950         cat >>confdefs.h <<\EOF
8951 #define HAVE_WRESIZE 1
8952 EOF
8953
8954         cat >>confdefs.h <<\EOF
8955 #define NCURSES_EXT_FUNCS 1
8956 EOF
8957
8958 else
8959         NCURSES_EXT_FUNCS=0
8960 fi
8961
8962 ###   use option --enable-const to turn on use of const beyond that in XSI.
8963 echo "$as_me:8963: checking for extended use of const keyword" >&5
8964 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8965
8966 # Check whether --enable-const or --disable-const was given.
8967 if test "${enable_const+set}" = set; then
8968   enableval="$enable_const"
8969   with_ext_const=$enableval
8970 else
8971   with_ext_const=no
8972 fi;
8973 echo "$as_me:8973: result: $with_ext_const" >&5
8974 echo "${ECHO_T}$with_ext_const" >&6
8975 NCURSES_CONST='/*nothing*/'
8976 if test "$with_ext_const" = yes ; then
8977         NCURSES_CONST=const
8978 fi
8979
8980 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8981 echo "$as_me:8981: checking if you want to use extended colors" >&5
8982 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8983
8984 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8985 if test "${enable_ext_colors+set}" = set; then
8986   enableval="$enable_ext_colors"
8987   with_ext_colors=$enableval
8988 else
8989   with_ext_colors=no
8990 fi;
8991 echo "$as_me:8991: result: $with_ext_colors" >&5
8992 echo "${ECHO_T}$with_ext_colors" >&6
8993 NCURSES_EXT_COLORS=0
8994 if test "$with_ext_colors" = yes ; then
8995         if test "$with_widec" != yes ; then
8996                 { { echo "$as_me:8996: error: This option applies only to wide-character library" >&5
8997 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8998    { (exit 1); exit 1; }; }
8999         else
9000                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9001
9002 if test "${with_abi_version+set}" != set; then
9003         case $cf_cv_rel_version in
9004         5.*)
9005                 cf_cv_rel_version=6.0
9006                 cf_cv_abi_version=6
9007                 { echo "$as_me:9007: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9008 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9009                 ;;
9010         esac
9011 fi
9012
9013         fi
9014         NCURSES_EXT_COLORS=1
9015         cat >>confdefs.h <<\EOF
9016 #define NCURSES_EXT_COLORS 1
9017 EOF
9018
9019 fi
9020
9021 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9022 echo "$as_me:9022: checking if you want to use extended mouse encoding" >&5
9023 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9024
9025 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9026 if test "${enable_ext_mouse+set}" = set; then
9027   enableval="$enable_ext_mouse"
9028   with_ext_mouse=$enableval
9029 else
9030   with_ext_mouse=no
9031 fi;
9032 echo "$as_me:9032: result: $with_ext_mouse" >&5
9033 echo "${ECHO_T}$with_ext_mouse" >&6
9034 NCURSES_MOUSE_VERSION=1
9035 if test "$with_ext_mouse" = yes ; then
9036         NCURSES_MOUSE_VERSION=2
9037
9038 if test "${with_abi_version+set}" != set; then
9039         case $cf_cv_rel_version in
9040         5.*)
9041                 cf_cv_rel_version=6.0
9042                 cf_cv_abi_version=6
9043                 { echo "$as_me:9043: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9044 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9045                 ;;
9046         esac
9047 fi
9048
9049 fi
9050
9051 echo "$as_me:9051: checking if you want \$NCURSES_NO_PADDING code" >&5
9052 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9053
9054 # Check whether --enable-no-padding or --disable-no-padding was given.
9055 if test "${enable_no_padding+set}" = set; then
9056   enableval="$enable_no_padding"
9057   with_no_padding=$enableval
9058 else
9059   with_no_padding=$with_ext_funcs
9060 fi;
9061 echo "$as_me:9061: result: $with_no_padding" >&5
9062 echo "${ECHO_T}$with_no_padding" >&6
9063 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9064 #define NCURSES_NO_PADDING 1
9065 EOF
9066
9067 echo "$as_me:9067: checking for ANSI C header files" >&5
9068 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9069 if test "${ac_cv_header_stdc+set}" = set; then
9070   echo $ECHO_N "(cached) $ECHO_C" >&6
9071 else
9072   cat >conftest.$ac_ext <<_ACEOF
9073 #line 9073 "configure"
9074 #include "confdefs.h"
9075 #include <stdlib.h>
9076 #include <stdarg.h>
9077 #include <string.h>
9078 #include <float.h>
9079
9080 _ACEOF
9081 if { (eval echo "$as_me:9081: \"$ac_cpp conftest.$ac_ext\"") >&5
9082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9083   ac_status=$?
9084   egrep -v '^ *\+' conftest.er1 >conftest.err
9085   rm -f conftest.er1
9086   cat conftest.err >&5
9087   echo "$as_me:9087: \$? = $ac_status" >&5
9088   (exit $ac_status); } >/dev/null; then
9089   if test -s conftest.err; then
9090     ac_cpp_err=$ac_c_preproc_warn_flag
9091   else
9092     ac_cpp_err=
9093   fi
9094 else
9095   ac_cpp_err=yes
9096 fi
9097 if test -z "$ac_cpp_err"; then
9098   ac_cv_header_stdc=yes
9099 else
9100   echo "$as_me: failed program was:" >&5
9101   cat conftest.$ac_ext >&5
9102   ac_cv_header_stdc=no
9103 fi
9104 rm -f conftest.err conftest.$ac_ext
9105
9106 if test $ac_cv_header_stdc = yes; then
9107   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9108   cat >conftest.$ac_ext <<_ACEOF
9109 #line 9109 "configure"
9110 #include "confdefs.h"
9111 #include <string.h>
9112
9113 _ACEOF
9114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9115   egrep "memchr" >/dev/null 2>&1; then
9116   :
9117 else
9118   ac_cv_header_stdc=no
9119 fi
9120 rm -f conftest*
9121
9122 fi
9123
9124 if test $ac_cv_header_stdc = yes; then
9125   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9126   cat >conftest.$ac_ext <<_ACEOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9129 #include <stdlib.h>
9130
9131 _ACEOF
9132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9133   egrep "free" >/dev/null 2>&1; then
9134   :
9135 else
9136   ac_cv_header_stdc=no
9137 fi
9138 rm -f conftest*
9139
9140 fi
9141
9142 if test $ac_cv_header_stdc = yes; then
9143   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9144   if test "$cross_compiling" = yes; then
9145   :
9146 else
9147   cat >conftest.$ac_ext <<_ACEOF
9148 #line 9148 "configure"
9149 #include "confdefs.h"
9150 #include <ctype.h>
9151 #if ((' ' & 0x0FF) == 0x020)
9152 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9153 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9154 #else
9155 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9156                      || ('j' <= (c) && (c) <= 'r') \
9157                      || ('s' <= (c) && (c) <= 'z'))
9158 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9159 #endif
9160
9161 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9162 int
9163 main ()
9164 {
9165   int i;
9166   for (i = 0; i < 256; i++)
9167     if (XOR (islower (i), ISLOWER (i))
9168         || toupper (i) != TOUPPER (i))
9169       $ac_main_return(2);
9170   $ac_main_return (0);
9171 }
9172 _ACEOF
9173 rm -f conftest$ac_exeext
9174 if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
9175   (eval $ac_link) 2>&5
9176   ac_status=$?
9177   echo "$as_me:9177: \$? = $ac_status" >&5
9178   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9179   { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9180   (eval $ac_try) 2>&5
9181   ac_status=$?
9182   echo "$as_me:9182: \$? = $ac_status" >&5
9183   (exit $ac_status); }; }; then
9184   :
9185 else
9186   echo "$as_me: program exited with status $ac_status" >&5
9187 echo "$as_me: failed program was:" >&5
9188 cat conftest.$ac_ext >&5
9189 ac_cv_header_stdc=no
9190 fi
9191 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9192 fi
9193 fi
9194 fi
9195 echo "$as_me:9195: result: $ac_cv_header_stdc" >&5
9196 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9197 if test $ac_cv_header_stdc = yes; then
9198
9199 cat >>confdefs.h <<\EOF
9200 #define STDC_HEADERS 1
9201 EOF
9202
9203 fi
9204
9205 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9206
9207 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9208                   inttypes.h stdint.h unistd.h
9209 do
9210 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9211 echo "$as_me:9211: checking for $ac_header" >&5
9212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9214   echo $ECHO_N "(cached) $ECHO_C" >&6
9215 else
9216   cat >conftest.$ac_ext <<_ACEOF
9217 #line 9217 "configure"
9218 #include "confdefs.h"
9219 $ac_includes_default
9220 #include <$ac_header>
9221 _ACEOF
9222 rm -f conftest.$ac_objext
9223 if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
9224   (eval $ac_compile) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); } &&
9228          { ac_try='test -s conftest.$ac_objext'
9229   { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9230   (eval $ac_try) 2>&5
9231   ac_status=$?
9232   echo "$as_me:9232: \$? = $ac_status" >&5
9233   (exit $ac_status); }; }; then
9234   eval "$as_ac_Header=yes"
9235 else
9236   echo "$as_me: failed program was:" >&5
9237 cat conftest.$ac_ext >&5
9238 eval "$as_ac_Header=no"
9239 fi
9240 rm -f conftest.$ac_objext conftest.$ac_ext
9241 fi
9242 echo "$as_me:9242: result: `eval echo '${'$as_ac_Header'}'`" >&5
9243 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9244 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9245   cat >>confdefs.h <<EOF
9246 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9247 EOF
9248
9249 fi
9250 done
9251
9252 echo "$as_me:9252: checking for signed char" >&5
9253 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9254 if test "${ac_cv_type_signed_char+set}" = set; then
9255   echo $ECHO_N "(cached) $ECHO_C" >&6
9256 else
9257   cat >conftest.$ac_ext <<_ACEOF
9258 #line 9258 "configure"
9259 #include "confdefs.h"
9260 $ac_includes_default
9261 int
9262 main ()
9263 {
9264 if ((signed char *) 0)
9265   return 0;
9266 if (sizeof (signed char))
9267   return 0;
9268   ;
9269   return 0;
9270 }
9271 _ACEOF
9272 rm -f conftest.$ac_objext
9273 if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
9274   (eval $ac_compile) 2>&5
9275   ac_status=$?
9276   echo "$as_me:9276: \$? = $ac_status" >&5
9277   (exit $ac_status); } &&
9278          { ac_try='test -s conftest.$ac_objext'
9279   { (eval echo "$as_me:9279: \"$ac_try\"") >&5
9280   (eval $ac_try) 2>&5
9281   ac_status=$?
9282   echo "$as_me:9282: \$? = $ac_status" >&5
9283   (exit $ac_status); }; }; then
9284   ac_cv_type_signed_char=yes
9285 else
9286   echo "$as_me: failed program was:" >&5
9287 cat conftest.$ac_ext >&5
9288 ac_cv_type_signed_char=no
9289 fi
9290 rm -f conftest.$ac_objext conftest.$ac_ext
9291 fi
9292 echo "$as_me:9292: result: $ac_cv_type_signed_char" >&5
9293 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9294
9295 echo "$as_me:9295: checking size of signed char" >&5
9296 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9297 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9298   echo $ECHO_N "(cached) $ECHO_C" >&6
9299 else
9300   if test "$ac_cv_type_signed_char" = yes; then
9301   if test "$cross_compiling" = yes; then
9302   # Depending upon the size, compute the lo and hi bounds.
9303 cat >conftest.$ac_ext <<_ACEOF
9304 #line 9304 "configure"
9305 #include "confdefs.h"
9306 $ac_includes_default
9307 int
9308 main ()
9309 {
9310 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9311   ;
9312   return 0;
9313 }
9314 _ACEOF
9315 rm -f conftest.$ac_objext
9316 if { (eval echo "$as_me:9316: \"$ac_compile\"") >&5
9317   (eval $ac_compile) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit $ac_status); } &&
9321          { ac_try='test -s conftest.$ac_objext'
9322   { (eval echo "$as_me:9322: \"$ac_try\"") >&5
9323   (eval $ac_try) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit $ac_status); }; }; then
9327   ac_lo=0 ac_mid=0
9328   while :; do
9329     cat >conftest.$ac_ext <<_ACEOF
9330 #line 9330 "configure"
9331 #include "confdefs.h"
9332 $ac_includes_default
9333 int
9334 main ()
9335 {
9336 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext
9342 if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
9343   (eval $ac_compile) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -s conftest.$ac_objext'
9348   { (eval echo "$as_me:9348: \"$ac_try\"") >&5
9349   (eval $ac_try) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); }; }; then
9353   ac_hi=$ac_mid; break
9354 else
9355   echo "$as_me: failed program was:" >&5
9356 cat conftest.$ac_ext >&5
9357 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9358 fi
9359 rm -f conftest.$ac_objext conftest.$ac_ext
9360   done
9361 else
9362   echo "$as_me: failed program was:" >&5
9363 cat conftest.$ac_ext >&5
9364 ac_hi=-1 ac_mid=-1
9365   while :; do
9366     cat >conftest.$ac_ext <<_ACEOF
9367 #line 9367 "configure"
9368 #include "confdefs.h"
9369 $ac_includes_default
9370 int
9371 main ()
9372 {
9373 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9374   ;
9375   return 0;
9376 }
9377 _ACEOF
9378 rm -f conftest.$ac_objext
9379 if { (eval echo "$as_me:9379: \"$ac_compile\"") >&5
9380   (eval $ac_compile) 2>&5
9381   ac_status=$?
9382   echo "$as_me:9382: \$? = $ac_status" >&5
9383   (exit $ac_status); } &&
9384          { ac_try='test -s conftest.$ac_objext'
9385   { (eval echo "$as_me:9385: \"$ac_try\"") >&5
9386   (eval $ac_try) 2>&5
9387   ac_status=$?
9388   echo "$as_me:9388: \$? = $ac_status" >&5
9389   (exit $ac_status); }; }; then
9390   ac_lo=$ac_mid; break
9391 else
9392   echo "$as_me: failed program was:" >&5
9393 cat conftest.$ac_ext >&5
9394 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9395 fi
9396 rm -f conftest.$ac_objext conftest.$ac_ext
9397   done
9398 fi
9399 rm -f conftest.$ac_objext conftest.$ac_ext
9400 # Binary search between lo and hi bounds.
9401 while test "x$ac_lo" != "x$ac_hi"; do
9402   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9403   cat >conftest.$ac_ext <<_ACEOF
9404 #line 9404 "configure"
9405 #include "confdefs.h"
9406 $ac_includes_default
9407 int
9408 main ()
9409 {
9410 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9411   ;
9412   return 0;
9413 }
9414 _ACEOF
9415 rm -f conftest.$ac_objext
9416 if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
9417   (eval $ac_compile) 2>&5
9418   ac_status=$?
9419   echo "$as_me:9419: \$? = $ac_status" >&5
9420   (exit $ac_status); } &&
9421          { ac_try='test -s conftest.$ac_objext'
9422   { (eval echo "$as_me:9422: \"$ac_try\"") >&5
9423   (eval $ac_try) 2>&5
9424   ac_status=$?
9425   echo "$as_me:9425: \$? = $ac_status" >&5
9426   (exit $ac_status); }; }; then
9427   ac_hi=$ac_mid
9428 else
9429   echo "$as_me: failed program was:" >&5
9430 cat conftest.$ac_ext >&5
9431 ac_lo=`expr $ac_mid + 1`
9432 fi
9433 rm -f conftest.$ac_objext conftest.$ac_ext
9434 done
9435 ac_cv_sizeof_signed_char=$ac_lo
9436 else
9437   if test "$cross_compiling" = yes; then
9438   { { echo "$as_me:9438: error: cannot run test program while cross compiling" >&5
9439 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9440    { (exit 1); exit 1; }; }
9441 else
9442   cat >conftest.$ac_ext <<_ACEOF
9443 #line 9443 "configure"
9444 #include "confdefs.h"
9445 $ac_includes_default
9446 int
9447 main ()
9448 {
9449 FILE *f = fopen ("conftest.val", "w");
9450 if (!f)
9451   $ac_main_return (1);
9452 fprintf (f, "%d", (sizeof (signed char)));
9453 fclose (f);
9454   ;
9455   return 0;
9456 }
9457 _ACEOF
9458 rm -f conftest$ac_exeext
9459 if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
9460   (eval $ac_link) 2>&5
9461   ac_status=$?
9462   echo "$as_me:9462: \$? = $ac_status" >&5
9463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9464   { (eval echo "$as_me:9464: \"$ac_try\"") >&5
9465   (eval $ac_try) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); }; }; then
9469   ac_cv_sizeof_signed_char=`cat conftest.val`
9470 else
9471   echo "$as_me: program exited with status $ac_status" >&5
9472 echo "$as_me: failed program was:" >&5
9473 cat conftest.$ac_ext >&5
9474 fi
9475 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9476 fi
9477 fi
9478 rm -f conftest.val
9479 else
9480   ac_cv_sizeof_signed_char=0
9481 fi
9482 fi
9483 echo "$as_me:9483: result: $ac_cv_sizeof_signed_char" >&5
9484 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9485 cat >>confdefs.h <<EOF
9486 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9487 EOF
9488
9489 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9490         NCURSES_SBOOL="signed char"
9491 else
9492         NCURSES_SBOOL="char"
9493 fi
9494 echo "$as_me:9494: checking if you want to use signed Boolean array in term.h" >&5
9495 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9496
9497 # Check whether --enable-signed-char or --disable-signed-char was given.
9498 if test "${enable_signed_char+set}" = set; then
9499   enableval="$enable_signed_char"
9500   with_signed_char=$enableval
9501 else
9502   with_signed_char=no
9503 fi;
9504 echo "$as_me:9504: result: $with_signed_char" >&5
9505 echo "${ECHO_T}$with_signed_char" >&6
9506 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9507
9508 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9509 echo "$as_me:9509: checking if you want SIGWINCH handler" >&5
9510 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9511
9512 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9513 if test "${enable_sigwinch+set}" = set; then
9514   enableval="$enable_sigwinch"
9515   with_sigwinch=$enableval
9516 else
9517   with_sigwinch=$with_ext_funcs
9518 fi;
9519 echo "$as_me:9519: result: $with_sigwinch" >&5
9520 echo "${ECHO_T}$with_sigwinch" >&6
9521 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9522 #define USE_SIGWINCH 1
9523 EOF
9524
9525 ###   use option --enable-tcap-names to allow user to define new capabilities
9526 echo "$as_me:9526: checking if you want user-definable terminal capabilities like termcap" >&5
9527 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9528
9529 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9530 if test "${enable_tcap_names+set}" = set; then
9531   enableval="$enable_tcap_names"
9532   with_tcap_names=$enableval
9533 else
9534   with_tcap_names=$with_ext_funcs
9535 fi;
9536 echo "$as_me:9536: result: $with_tcap_names" >&5
9537 echo "${ECHO_T}$with_tcap_names" >&6
9538 NCURSES_XNAMES=0
9539 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9540
9541 ###############################################################################
9542 # These options are relatively safe to experiment with.
9543
9544 echo "$as_me:9544: checking if you want all development code" >&5
9545 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9546
9547 # Check whether --with-develop or --without-develop was given.
9548 if test "${with_develop+set}" = set; then
9549   withval="$with_develop"
9550   with_develop=$withval
9551 else
9552   with_develop=no
9553 fi;
9554 echo "$as_me:9554: result: $with_develop" >&5
9555 echo "${ECHO_T}$with_develop" >&6
9556
9557 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9558 echo "$as_me:9558: checking if you want hard-tabs code" >&5
9559 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9560
9561 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9562 if test "${enable_hard_tabs+set}" = set; then
9563   enableval="$enable_hard_tabs"
9564
9565 else
9566   enable_hard_tabs=$with_develop
9567 fi;
9568 echo "$as_me:9568: result: $enable_hard_tabs" >&5
9569 echo "${ECHO_T}$enable_hard_tabs" >&6
9570 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9571 #define USE_HARD_TABS 1
9572 EOF
9573
9574 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9575 echo "$as_me:9575: checking if you want limited support for xmc" >&5
9576 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9577
9578 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9579 if test "${enable_xmc_glitch+set}" = set; then
9580   enableval="$enable_xmc_glitch"
9581
9582 else
9583   enable_xmc_glitch=$with_develop
9584 fi;
9585 echo "$as_me:9585: result: $enable_xmc_glitch" >&5
9586 echo "${ECHO_T}$enable_xmc_glitch" >&6
9587 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9588 #define USE_XMC_SUPPORT 1
9589 EOF
9590
9591 ###############################################################################
9592 # These are just experimental, probably should not be in a package:
9593
9594 echo "$as_me:9594: checking if you do not want to assume colors are white-on-black" >&5
9595 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9596
9597 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9598 if test "${enable_assumed_color+set}" = set; then
9599   enableval="$enable_assumed_color"
9600   with_assumed_color=$enableval
9601 else
9602   with_assumed_color=yes
9603 fi;
9604 echo "$as_me:9604: result: $with_assumed_color" >&5
9605 echo "${ECHO_T}$with_assumed_color" >&6
9606 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9607 #define USE_ASSUMED_COLOR 1
9608 EOF
9609
9610 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9611 echo "$as_me:9611: checking if you want hashmap scrolling-optimization code" >&5
9612 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9613
9614 # Check whether --enable-hashmap or --disable-hashmap was given.
9615 if test "${enable_hashmap+set}" = set; then
9616   enableval="$enable_hashmap"
9617   with_hashmap=$enableval
9618 else
9619   with_hashmap=yes
9620 fi;
9621 echo "$as_me:9621: result: $with_hashmap" >&5
9622 echo "${ECHO_T}$with_hashmap" >&6
9623 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9624 #define USE_HASHMAP 1
9625 EOF
9626
9627 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9628 echo "$as_me:9628: checking if you want colorfgbg code" >&5
9629 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9630
9631 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9632 if test "${enable_colorfgbg+set}" = set; then
9633   enableval="$enable_colorfgbg"
9634   with_colorfgbg=$enableval
9635 else
9636   with_colorfgbg=no
9637 fi;
9638 echo "$as_me:9638: result: $with_colorfgbg" >&5
9639 echo "${ECHO_T}$with_colorfgbg" >&6
9640 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9641 #define USE_COLORFGBG 1
9642 EOF
9643
9644 # This is still experimental (20080329), but should ultimately be moved to
9645 # the script-block --with-normal, etc.
9646
9647 echo "$as_me:9647: checking if you want to link with the pthread library" >&5
9648 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9649
9650 # Check whether --with-pthread or --without-pthread was given.
9651 if test "${with_pthread+set}" = set; then
9652   withval="$with_pthread"
9653   with_pthread=$withval
9654 else
9655   with_pthread=no
9656 fi;
9657 echo "$as_me:9657: result: $with_pthread" >&5
9658 echo "${ECHO_T}$with_pthread" >&6
9659
9660 if test "$with_pthread" != no ; then
9661     echo "$as_me:9661: checking for pthread.h" >&5
9662 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9663 if test "${ac_cv_header_pthread_h+set}" = set; then
9664   echo $ECHO_N "(cached) $ECHO_C" >&6
9665 else
9666   cat >conftest.$ac_ext <<_ACEOF
9667 #line 9667 "configure"
9668 #include "confdefs.h"
9669 #include <pthread.h>
9670 _ACEOF
9671 if { (eval echo "$as_me:9671: \"$ac_cpp conftest.$ac_ext\"") >&5
9672   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9673   ac_status=$?
9674   egrep -v '^ *\+' conftest.er1 >conftest.err
9675   rm -f conftest.er1
9676   cat conftest.err >&5
9677   echo "$as_me:9677: \$? = $ac_status" >&5
9678   (exit $ac_status); } >/dev/null; then
9679   if test -s conftest.err; then
9680     ac_cpp_err=$ac_c_preproc_warn_flag
9681   else
9682     ac_cpp_err=
9683   fi
9684 else
9685   ac_cpp_err=yes
9686 fi
9687 if test -z "$ac_cpp_err"; then
9688   ac_cv_header_pthread_h=yes
9689 else
9690   echo "$as_me: failed program was:" >&5
9691   cat conftest.$ac_ext >&5
9692   ac_cv_header_pthread_h=no
9693 fi
9694 rm -f conftest.err conftest.$ac_ext
9695 fi
9696 echo "$as_me:9696: result: $ac_cv_header_pthread_h" >&5
9697 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9698 if test $ac_cv_header_pthread_h = yes; then
9699
9700         cat >>confdefs.h <<\EOF
9701 #define HAVE_PTHREADS_H 1
9702 EOF
9703
9704         echo "$as_me:9704: checking if we can link with the pthread library" >&5
9705 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9706         cf_save_LIBS="$LIBS"
9707         LIBS="-lpthread $LIBS"
9708         cat >conftest.$ac_ext <<_ACEOF
9709 #line 9709 "configure"
9710 #include "confdefs.h"
9711
9712 #include <pthread.h>
9713
9714 int
9715 main ()
9716 {
9717
9718         int rc = pthread_create(0,0,0,0);
9719
9720   ;
9721   return 0;
9722 }
9723 _ACEOF
9724 rm -f conftest.$ac_objext conftest$ac_exeext
9725 if { (eval echo "$as_me:9725: \"$ac_link\"") >&5
9726   (eval $ac_link) 2>&5
9727   ac_status=$?
9728   echo "$as_me:9728: \$? = $ac_status" >&5
9729   (exit $ac_status); } &&
9730          { ac_try='test -s conftest$ac_exeext'
9731   { (eval echo "$as_me:9731: \"$ac_try\"") >&5
9732   (eval $ac_try) 2>&5
9733   ac_status=$?
9734   echo "$as_me:9734: \$? = $ac_status" >&5
9735   (exit $ac_status); }; }; then
9736   with_pthread=yes
9737 else
9738   echo "$as_me: failed program was:" >&5
9739 cat conftest.$ac_ext >&5
9740 with_pthread=no
9741 fi
9742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9743         LIBS="$cf_save_LIBS"
9744         echo "$as_me:9744: result: $with_pthread" >&5
9745 echo "${ECHO_T}$with_pthread" >&6
9746
9747         if test "$with_pthread" = yes ; then
9748             LIBS="-lpthread $LIBS"
9749             cat >>confdefs.h <<\EOF
9750 #define HAVE_LIBPTHREADS 1
9751 EOF
9752
9753         else
9754             { { echo "$as_me:9754: error: Cannot link with pthread library" >&5
9755 echo "$as_me: error: Cannot link with pthread library" >&2;}
9756    { (exit 1); exit 1; }; }
9757         fi
9758
9759 fi
9760
9761 fi
9762
9763 echo "$as_me:9763: checking if you want to use weak-symbols for pthreads" >&5
9764 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9765
9766 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9767 if test "${enable_weak_symbols+set}" = set; then
9768   enableval="$enable_weak_symbols"
9769   use_weak_symbols=$withval
9770 else
9771   use_weak_symbols=no
9772 fi;
9773 echo "$as_me:9773: result: $use_weak_symbols" >&5
9774 echo "${ECHO_T}$use_weak_symbols" >&6
9775 if test "$use_weak_symbols" = yes ; then
9776
9777 echo "$as_me:9777: checking if $CC supports weak symbols" >&5
9778 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9779 if test "${cf_cv_weak_symbols+set}" = set; then
9780   echo $ECHO_N "(cached) $ECHO_C" >&6
9781 else
9782
9783 cat >conftest.$ac_ext <<_ACEOF
9784 #line 9784 "configure"
9785 #include "confdefs.h"
9786
9787 #include <stdio.h>
9788 int
9789 main ()
9790 {
9791
9792 #if defined(__GNUC__)
9793 #  if defined __USE_ISOC99
9794 #    define _cat_pragma(exp)    _Pragma(#exp)
9795 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9796 #  else
9797 #    define _weak_pragma(exp)
9798 #  endif
9799 #  define _declare(name)        __extension__ extern __typeof__(name) name
9800 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9801 #endif
9802
9803 weak_symbol(fopen);
9804
9805   ;
9806   return 0;
9807 }
9808 _ACEOF
9809 rm -f conftest.$ac_objext
9810 if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
9811   (eval $ac_compile) 2>&5
9812   ac_status=$?
9813   echo "$as_me:9813: \$? = $ac_status" >&5
9814   (exit $ac_status); } &&
9815          { ac_try='test -s conftest.$ac_objext'
9816   { (eval echo "$as_me:9816: \"$ac_try\"") >&5
9817   (eval $ac_try) 2>&5
9818   ac_status=$?
9819   echo "$as_me:9819: \$? = $ac_status" >&5
9820   (exit $ac_status); }; }; then
9821   cf_cv_weak_symbols=yes
9822 else
9823   echo "$as_me: failed program was:" >&5
9824 cat conftest.$ac_ext >&5
9825 cf_cv_weak_symbols=no
9826 fi
9827 rm -f conftest.$ac_objext conftest.$ac_ext
9828
9829 fi
9830 echo "$as_me:9830: result: $cf_cv_weak_symbols" >&5
9831 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9832
9833 else
9834     cf_cv_weak_symbols=no
9835 fi
9836
9837 if test $cf_cv_weak_symbols = yes ; then
9838     cat >>confdefs.h <<\EOF
9839 #define USE_WEAK_SYMBOLS 1
9840 EOF
9841
9842 fi
9843
9844 PTHREAD=
9845 if test "$with_pthread" = "yes" ; then
9846     cat >>confdefs.h <<\EOF
9847 #define USE_PTHREADS 1
9848 EOF
9849
9850     enable_reentrant=yes
9851     if test $cf_cv_weak_symbols = yes ; then
9852         PTHREAD=-lpthread
9853     fi
9854 fi
9855
9856 # Reentrant code has to be opaque; there's little advantage to making ncurses
9857 # opaque outside of that, so there is no --enable-opaque option.  We can use
9858 # this option without --with-pthreads, but this will be always set for
9859 # pthreads.
9860 echo "$as_me:9860: checking if you want experimental reentrant code" >&5
9861 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9862
9863 # Check whether --enable-reentrant or --disable-reentrant was given.
9864 if test "${enable_reentrant+set}" = set; then
9865   enableval="$enable_reentrant"
9866   with_reentrant=$enableval
9867 else
9868   with_reentrant=no
9869 fi;
9870 echo "$as_me:9870: result: $with_reentrant" >&5
9871 echo "${ECHO_T}$with_reentrant" >&6
9872 if test "$with_reentrant" = yes ; then
9873         cf_cv_enable_reentrant=1
9874         cf_cv_enable_opaque="NCURSES_INTERNALS"
9875         NCURSES_OPAQUE=1
9876         NCURSES_SIZE_T=int
9877     if test $cf_cv_weak_symbols = yes ; then
9878
9879 # remove pthread library from $LIBS
9880 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9881
9882     else
9883         LIB_SUFFIX="t${LIB_SUFFIX}"
9884     fi
9885         cat >>confdefs.h <<\EOF
9886 #define USE_REENTRANT 1
9887 EOF
9888
9889 if test "${with_abi_version+set}" != set; then
9890         case $cf_cv_rel_version in
9891         5.*)
9892                 cf_cv_rel_version=6.0
9893                 cf_cv_abi_version=6
9894                 { echo "$as_me:9894: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9895 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9896                 ;;
9897         esac
9898 fi
9899
9900 else
9901         cf_cv_enable_reentrant=0
9902         cf_cv_enable_opaque="NCURSES_OPAQUE"
9903         NCURSES_OPAQUE=0
9904         NCURSES_SIZE_T=short
9905 fi
9906
9907 echo "$as_me:9907: checking if you want experimental safe-sprintf code" >&5
9908 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9909
9910 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9911 if test "${enable_safe_sprintf+set}" = set; then
9912   enableval="$enable_safe_sprintf"
9913   with_safe_sprintf=$enableval
9914 else
9915   with_safe_sprintf=no
9916 fi;
9917 echo "$as_me:9917: result: $with_safe_sprintf" >&5
9918 echo "${ECHO_T}$with_safe_sprintf" >&6
9919 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9920 #define USE_SAFE_SPRINTF 1
9921 EOF
9922
9923 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9924 # when hashmap is used scroll hints are useless
9925 if test "$with_hashmap" = no ; then
9926 echo "$as_me:9926: checking if you want to experiment without scrolling-hints code" >&5
9927 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9928
9929 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9930 if test "${enable_scroll_hints+set}" = set; then
9931   enableval="$enable_scroll_hints"
9932   with_scroll_hints=$enableval
9933 else
9934   with_scroll_hints=yes
9935 fi;
9936 echo "$as_me:9936: result: $with_scroll_hints" >&5
9937 echo "${ECHO_T}$with_scroll_hints" >&6
9938 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9939 #define USE_SCROLL_HINTS 1
9940 EOF
9941
9942 fi
9943
9944 echo "$as_me:9944: checking if you want experimental wgetch-events code" >&5
9945 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9946
9947 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9948 if test "${enable_wgetch_events+set}" = set; then
9949   enableval="$enable_wgetch_events"
9950   with_wgetch_events=$enableval
9951 else
9952   with_wgetch_events=no
9953 fi;
9954 echo "$as_me:9954: result: $with_wgetch_events" >&5
9955 echo "${ECHO_T}$with_wgetch_events" >&6
9956 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9957 #define NCURSES_WGETCH_EVENTS 1
9958 EOF
9959
9960 ###############################################################################
9961
9962 ###     use option --disable-echo to suppress full display compiling commands
9963 echo "$as_me:9963: checking if you want to display full commands during build" >&5
9964 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9965
9966 # Check whether --enable-echo or --disable-echo was given.
9967 if test "${enable_echo+set}" = set; then
9968   enableval="$enable_echo"
9969   with_echo=$enableval
9970 else
9971   with_echo=yes
9972 fi;
9973 if test "$with_echo" = yes; then
9974         ECHO_LINK=
9975 else
9976         ECHO_LINK='@ echo linking $@ ... ;'
9977         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9978         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9979 fi
9980 echo "$as_me:9980: result: $with_echo" >&5
9981 echo "${ECHO_T}$with_echo" >&6
9982
9983 ###     use option --enable-warnings to turn on all gcc warnings
9984 echo "$as_me:9984: checking if you want to see compiler warnings" >&5
9985 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9986
9987 # Check whether --enable-warnings or --disable-warnings was given.
9988 if test "${enable_warnings+set}" = set; then
9989   enableval="$enable_warnings"
9990   with_warnings=$enableval
9991 fi;
9992 echo "$as_me:9992: result: $with_warnings" >&5
9993 echo "${ECHO_T}$with_warnings" >&6
9994
9995 if test "x$with_warnings" = "xyes"; then
9996         ADAFLAGS="$ADAFLAGS -gnatg"
9997
9998 INTEL_COMPILER=no
9999
10000 if test "$GCC" = yes ; then
10001         case $host_os in
10002         linux*|gnu*)
10003                 echo "$as_me:10003: checking if this is really Intel C compiler" >&5
10004 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10005                 cf_save_CFLAGS="$CFLAGS"
10006                 CFLAGS="$CFLAGS -no-gcc"
10007                 cat >conftest.$ac_ext <<_ACEOF
10008 #line 10008 "configure"
10009 #include "confdefs.h"
10010
10011 int
10012 main ()
10013 {
10014
10015 #ifdef __INTEL_COMPILER
10016 #else
10017 make an error
10018 #endif
10019
10020   ;
10021   return 0;
10022 }
10023 _ACEOF
10024 rm -f conftest.$ac_objext
10025 if { (eval echo "$as_me:10025: \"$ac_compile\"") >&5
10026   (eval $ac_compile) 2>&5
10027   ac_status=$?
10028   echo "$as_me:10028: \$? = $ac_status" >&5
10029   (exit $ac_status); } &&
10030          { ac_try='test -s conftest.$ac_objext'
10031   { (eval echo "$as_me:10031: \"$ac_try\"") >&5
10032   (eval $ac_try) 2>&5
10033   ac_status=$?
10034   echo "$as_me:10034: \$? = $ac_status" >&5
10035   (exit $ac_status); }; }; then
10036   INTEL_COMPILER=yes
10037 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10038
10039 else
10040   echo "$as_me: failed program was:" >&5
10041 cat conftest.$ac_ext >&5
10042 fi
10043 rm -f conftest.$ac_objext conftest.$ac_ext
10044                 CFLAGS="$cf_save_CFLAGS"
10045                 echo "$as_me:10045: result: $INTEL_COMPILER" >&5
10046 echo "${ECHO_T}$INTEL_COMPILER" >&6
10047                 ;;
10048         esac
10049 fi
10050
10051 cat > conftest.$ac_ext <<EOF
10052 #line 10052 "${as_me-configure}"
10053 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10054 EOF
10055
10056 if test "$INTEL_COMPILER" = yes
10057 then
10058 # The "-wdXXX" options suppress warnings:
10059 # remark #1419: external declaration in primary source file
10060 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10061 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10062 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10063 # remark #193: zero used for undefined preprocessing identifier
10064 # remark #593: variable "curs_sb_left_arrow" was set but never used
10065 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10066 # remark #869: parameter "tw" was never referenced
10067 # remark #981: operands are evaluated in unspecified order
10068 # warning #269: invalid format string conversion
10069
10070         { echo "$as_me:10070: checking for $CC warning options..." >&5
10071 echo "$as_me: checking for $CC warning options..." >&6;}
10072         cf_save_CFLAGS="$CFLAGS"
10073         EXTRA_CFLAGS="-Wall"
10074         for cf_opt in \
10075                 wd1419 \
10076                 wd1682 \
10077                 wd1683 \
10078                 wd1684 \
10079                 wd193 \
10080                 wd279 \
10081                 wd593 \
10082                 wd810 \
10083                 wd869 \
10084                 wd981
10085         do
10086                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10087                 if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
10088   (eval $ac_compile) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); }; then
10092                         test -n "$verbose" && echo "$as_me:10092: result: ... -$cf_opt" >&5
10093 echo "${ECHO_T}... -$cf_opt" >&6
10094                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10095                 fi
10096         done
10097         CFLAGS="$cf_save_CFLAGS"
10098
10099 elif test "$GCC" = yes
10100 then
10101         { echo "$as_me:10101: checking for $CC warning options..." >&5
10102 echo "$as_me: checking for $CC warning options..." >&6;}
10103         cf_save_CFLAGS="$CFLAGS"
10104         EXTRA_CFLAGS="-W -Wall"
10105         cf_warn_CONST=""
10106         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10107         for cf_opt in \
10108                 Wbad-function-cast \
10109                 Wcast-align \
10110                 Wcast-qual \
10111                 Winline \
10112                 Wmissing-declarations \
10113                 Wmissing-prototypes \
10114                 Wnested-externs \
10115                 Wpointer-arith \
10116                 Wshadow \
10117                 Wstrict-prototypes \
10118                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10119         do
10120                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10121                 if { (eval echo "$as_me:10121: \"$ac_compile\"") >&5
10122   (eval $ac_compile) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit $ac_status); }; then
10126                         test -n "$verbose" && echo "$as_me:10126: result: ... -$cf_opt" >&5
10127 echo "${ECHO_T}... -$cf_opt" >&6
10128                         case $cf_opt in #(vi
10129                         Wcast-qual) #(vi
10130                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10131                                 ;;
10132                         Winline) #(vi
10133                                 case $GCC_VERSION in
10134                                 [34].*)
10135                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10136
10137 echo "${as_me-configure}:10137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10138
10139                                         continue;;
10140                                 esac
10141                                 ;;
10142                         esac
10143                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10144                 fi
10145         done
10146         CFLAGS="$cf_save_CFLAGS"
10147 fi
10148 rm -f conftest*
10149
10150         if test "$cf_with_cxx" = yes ; then
10151
10152 INTEL_CPLUSPLUS=no
10153
10154 if test "$GCC" = yes ; then
10155         case $host_os in
10156         linux*|gnu*)
10157                 echo "$as_me:10157: checking if this is really Intel C++ compiler" >&5
10158 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10159                 cf_save_CFLAGS="$CXXFLAGS"
10160                 CXXFLAGS="$CXXFLAGS -no-gcc"
10161                 cat >conftest.$ac_ext <<_ACEOF
10162 #line 10162 "configure"
10163 #include "confdefs.h"
10164
10165 int
10166 main ()
10167 {
10168
10169 #ifdef __INTEL_COMPILER
10170 #else
10171 make an error
10172 #endif
10173
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 rm -f conftest.$ac_objext
10179 if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10180   (eval $ac_compile) 2>&5
10181   ac_status=$?
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } &&
10184          { ac_try='test -s conftest.$ac_objext'
10185   { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10186   (eval $ac_try) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); }; }; then
10190   INTEL_CPLUSPLUS=yes
10191 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10192
10193 else
10194   echo "$as_me: failed program was:" >&5
10195 cat conftest.$ac_ext >&5
10196 fi
10197 rm -f conftest.$ac_objext conftest.$ac_ext
10198                 CXXFLAGS="$cf_save_CFLAGS"
10199                 echo "$as_me:10199: result: $INTEL_CPLUSPLUS" >&5
10200 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10201                 ;;
10202         esac
10203 fi
10204
10205 ac_ext=cc
10206 ac_cpp='$CXXCPP $CPPFLAGS'
10207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10210 ac_main_return=return
10211
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10213 "configure"
10214 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10215 EOF
10216
10217 if test "$INTEL_CPLUSPLUS" = yes
10218 then
10219 # The "-wdXXX" options suppress warnings:
10220 # remark #1419: external declaration in primary source file
10221 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10222 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10223 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10224 # remark #193: zero used for undefined preprocessing identifier
10225 # remark #593: variable "curs_sb_left_arrow" was set but never used
10226 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10227 # remark #869: parameter "tw" was never referenced
10228 # remark #981: operands are evaluated in unspecified order
10229 # warning #269: invalid format string conversion
10230
10231         { echo "$as_me:10231: checking for $CC warning options..." >&5
10232 echo "$as_me: checking for $CC warning options..." >&6;}
10233         cf_save_CXXFLAGS="$CXXFLAGS"
10234         EXTRA_CXXFLAGS="-Wall"
10235         for cf_opt in \
10236                 wd1419 \
10237                 wd1682 \
10238                 wd1683 \
10239                 wd1684 \
10240                 wd193 \
10241                 wd279 \
10242                 wd593 \
10243                 wd810 \
10244                 wd869 \
10245                 wd981
10246         do
10247                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10248                 if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249   (eval $ac_compile) 2>&5
10250   ac_status=$?
10251   echo "$as_me:10251: \$? = $ac_status" >&5
10252   (exit $ac_status); }; then
10253                         test -n "$verbose" && echo "$as_me:10253: result: ... -$cf_opt" >&5
10254 echo "${ECHO_T}... -$cf_opt" >&6
10255                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10256                 fi
10257         done
10258         CXXFLAGS="$cf_save_CXXFLAGS"
10259
10260 elif test "$GXX" = yes
10261 then
10262         { echo "$as_me:10262: checking for $CXX warning options..." >&5
10263 echo "$as_me: checking for $CXX warning options..." >&6;}
10264         cf_save_CXXFLAGS="$CXXFLAGS"
10265         EXTRA_CXXFLAGS="-W -Wall"
10266         cf_gxx_extra_warnings=""
10267         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10268         case "$GCC_VERSION" in
10269         [1-2].*)
10270                 ;;
10271         *)
10272                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10273                 ;;
10274         esac
10275         for cf_opt in \
10276                 Wabi \
10277                 fabi-version=0 \
10278                 Woverloaded-virtual \
10279                 Wsign-promo \
10280                 Wsynth \
10281                 Wold-style-cast \
10282                 Wcast-align \
10283                 Wcast-qual \
10284                 Wmissing-prototypes \
10285                 Wpointer-arith \
10286                 Wshadow \
10287                 Wstrict-prototypes \
10288                 Wundef $cf_gxx_extra_warnings Wno-unused
10289         do
10290                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10291                 if { (eval echo "$as_me:10291: \"$ac_compile\"") >&5
10292   (eval $ac_compile) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); }; then
10296                         test -n "$verbose" && echo "$as_me:10296: result: ... -$cf_opt" >&5
10297 echo "${ECHO_T}... -$cf_opt" >&6
10298                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10299                 else
10300                         test -n "$verbose" && echo "$as_me:10300: result: ... no -$cf_opt" >&5
10301 echo "${ECHO_T}... no -$cf_opt" >&6
10302                 fi
10303         done
10304         CXXFLAGS="$cf_save_CXXFLAGS"
10305 fi
10306
10307 rm -f conftest*
10308 ac_ext=c
10309 ac_cpp='$CPP $CPPFLAGS'
10310 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10311 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10312 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10313 ac_main_return=return
10314
10315         fi
10316 fi
10317
10318 if test "$GCC" = yes
10319 then
10320 cat > conftest.i <<EOF
10321 #ifndef GCC_PRINTF
10322 #define GCC_PRINTF 0
10323 #endif
10324 #ifndef GCC_SCANF
10325 #define GCC_SCANF 0
10326 #endif
10327 #ifndef GCC_NORETURN
10328 #define GCC_NORETURN /* nothing */
10329 #endif
10330 #ifndef GCC_UNUSED
10331 #define GCC_UNUSED /* nothing */
10332 #endif
10333 EOF
10334 if test "$GCC" = yes
10335 then
10336         { echo "$as_me:10336: checking for $CC __attribute__ directives..." >&5
10337 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10338 cat > conftest.$ac_ext <<EOF
10339 #line 10339 "${as_me-configure}"
10340 #include "confdefs.h"
10341 #include "conftest.h"
10342 #include "conftest.i"
10343 #if     GCC_PRINTF
10344 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10345 #else
10346 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10347 #endif
10348 #if     GCC_SCANF
10349 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10350 #else
10351 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10352 #endif
10353 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10354 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10355 extern void foo(void) GCC_NORETURN;
10356 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10357 EOF
10358         for cf_attribute in scanf printf unused noreturn
10359         do
10360
10361 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10362
10363                 cf_directive="__attribute__(($cf_attribute))"
10364                 echo "checking for $CC $cf_directive" 1>&5
10365                 case $cf_attribute in
10366                 scanf|printf)
10367                 cat >conftest.h <<EOF
10368 #define GCC_$cf_ATTRIBUTE 1
10369 EOF
10370                         ;;
10371                 *)
10372                 cat >conftest.h <<EOF
10373 #define GCC_$cf_ATTRIBUTE $cf_directive
10374 EOF
10375                         ;;
10376                 esac
10377                 if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
10378   (eval $ac_compile) 2>&5
10379   ac_status=$?
10380   echo "$as_me:10380: \$? = $ac_status" >&5
10381   (exit $ac_status); }; then
10382                         test -n "$verbose" && echo "$as_me:10382: result: ... $cf_attribute" >&5
10383 echo "${ECHO_T}... $cf_attribute" >&6
10384                         cat conftest.h >>confdefs.h
10385                 fi
10386         done
10387 else
10388         fgrep define conftest.i >>confdefs.h
10389 fi
10390 rm -rf conftest*
10391 fi
10392
10393 ###     use option --enable-assertions to turn on generation of assertion code
10394 echo "$as_me:10394: checking if you want to enable runtime assertions" >&5
10395 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10396
10397 # Check whether --enable-assertions or --disable-assertions was given.
10398 if test "${enable_assertions+set}" = set; then
10399   enableval="$enable_assertions"
10400   with_assertions=$enableval
10401 else
10402   with_assertions=no
10403 fi;
10404 echo "$as_me:10404: result: $with_assertions" >&5
10405 echo "${ECHO_T}$with_assertions" >&6
10406 if test -n "$GCC"
10407 then
10408         if test "$with_assertions" = no
10409         then
10410                 cat >>confdefs.h <<\EOF
10411 #define NDEBUG 1
10412 EOF
10413
10414                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10415         else
10416                 ADAFLAGS="$ADAFLAGS -gnata"
10417         fi
10418 fi
10419
10420 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10421
10422 echo "$as_me:10422: checking if you want to use dmalloc for testing" >&5
10423 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10424
10425 # Check whether --with-dmalloc or --without-dmalloc was given.
10426 if test "${with_dmalloc+set}" = set; then
10427   withval="$with_dmalloc"
10428   cat >>confdefs.h <<\EOF
10429 #define USE_DMALLOC 1
10430 EOF
10431
10432         : ${with_cflags:=-g}
10433         : ${with_no_leaks:=yes}
10434          with_dmalloc=yes
10435 else
10436   with_dmalloc=
10437 fi;
10438 echo "$as_me:10438: result: ${with_dmalloc:-no}" >&5
10439 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10440
10441 case .$with_cflags in #(vi
10442 .*-g*)
10443         case .$CFLAGS in #(vi
10444         .*-g*) #(vi
10445                 ;;
10446         *)
10447
10448 cf_fix_cppflags=no
10449 cf_new_cflags=
10450 cf_new_cppflags=
10451 cf_new_extra_cppflags=
10452
10453 for cf_add_cflags in -g
10454 do
10455 case $cf_fix_cppflags in
10456 no)
10457         case $cf_add_cflags in #(vi
10458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10459                 case $cf_add_cflags in
10460                 -D*)
10461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10462
10463                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10464                         && test -z "${cf_tst_cflags}" \
10465                         && cf_fix_cppflags=yes
10466
10467                         if test $cf_fix_cppflags = yes ; then
10468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10469                                 continue
10470                         elif test "${cf_tst_cflags}" = "\"'" ; then
10471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10472                                 continue
10473                         fi
10474                         ;;
10475                 esac
10476                 case "$CPPFLAGS" in
10477                 *$cf_add_cflags) #(vi
10478                         ;;
10479                 *) #(vi
10480                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10481                         ;;
10482                 esac
10483                 ;;
10484         *)
10485                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10486                 ;;
10487         esac
10488         ;;
10489 yes)
10490         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10491
10492         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10493
10494         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10495         && test -z "${cf_tst_cflags}" \
10496         && cf_fix_cppflags=no
10497         ;;
10498 esac
10499 done
10500
10501 if test -n "$cf_new_cflags" ; then
10502
10503         CFLAGS="$CFLAGS $cf_new_cflags"
10504 fi
10505
10506 if test -n "$cf_new_cppflags" ; then
10507
10508         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10509 fi
10510
10511 if test -n "$cf_new_extra_cppflags" ; then
10512
10513         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10514 fi
10515
10516                 ;;
10517         esac
10518         ;;
10519 esac
10520
10521 if test "$with_dmalloc" = yes ; then
10522         echo "$as_me:10522: checking for dmalloc.h" >&5
10523 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10524 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10525   echo $ECHO_N "(cached) $ECHO_C" >&6
10526 else
10527   cat >conftest.$ac_ext <<_ACEOF
10528 #line 10528 "configure"
10529 #include "confdefs.h"
10530 #include <dmalloc.h>
10531 _ACEOF
10532 if { (eval echo "$as_me:10532: \"$ac_cpp conftest.$ac_ext\"") >&5
10533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10534   ac_status=$?
10535   egrep -v '^ *\+' conftest.er1 >conftest.err
10536   rm -f conftest.er1
10537   cat conftest.err >&5
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); } >/dev/null; then
10540   if test -s conftest.err; then
10541     ac_cpp_err=$ac_c_preproc_warn_flag
10542   else
10543     ac_cpp_err=
10544   fi
10545 else
10546   ac_cpp_err=yes
10547 fi
10548 if test -z "$ac_cpp_err"; then
10549   ac_cv_header_dmalloc_h=yes
10550 else
10551   echo "$as_me: failed program was:" >&5
10552   cat conftest.$ac_ext >&5
10553   ac_cv_header_dmalloc_h=no
10554 fi
10555 rm -f conftest.err conftest.$ac_ext
10556 fi
10557 echo "$as_me:10557: result: $ac_cv_header_dmalloc_h" >&5
10558 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10559 if test $ac_cv_header_dmalloc_h = yes; then
10560
10561 echo "$as_me:10561: checking for dmalloc_debug in -ldmalloc" >&5
10562 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10563 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10564   echo $ECHO_N "(cached) $ECHO_C" >&6
10565 else
10566   ac_check_lib_save_LIBS=$LIBS
10567 LIBS="-ldmalloc  $LIBS"
10568 cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10571
10572 /* Override any gcc2 internal prototype to avoid an error.  */
10573 #ifdef __cplusplus
10574 extern "C"
10575 #endif
10576 /* We use char because int might match the return type of a gcc2
10577    builtin and then its argument prototype would still apply.  */
10578 char dmalloc_debug ();
10579 int
10580 main ()
10581 {
10582 dmalloc_debug ();
10583   ;
10584   return 0;
10585 }
10586 _ACEOF
10587 rm -f conftest.$ac_objext conftest$ac_exeext
10588 if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
10589   (eval $ac_link) 2>&5
10590   ac_status=$?
10591   echo "$as_me:10591: \$? = $ac_status" >&5
10592   (exit $ac_status); } &&
10593          { ac_try='test -s conftest$ac_exeext'
10594   { (eval echo "$as_me:10594: \"$ac_try\"") >&5
10595   (eval $ac_try) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); }; }; then
10599   ac_cv_lib_dmalloc_dmalloc_debug=yes
10600 else
10601   echo "$as_me: failed program was:" >&5
10602 cat conftest.$ac_ext >&5
10603 ac_cv_lib_dmalloc_dmalloc_debug=no
10604 fi
10605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10606 LIBS=$ac_check_lib_save_LIBS
10607 fi
10608 echo "$as_me:10608: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10609 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10610 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10611   cat >>confdefs.h <<EOF
10612 #define HAVE_LIBDMALLOC 1
10613 EOF
10614
10615   LIBS="-ldmalloc $LIBS"
10616
10617 fi
10618
10619 fi
10620
10621 fi
10622
10623 echo "$as_me:10623: checking if you want to use dbmalloc for testing" >&5
10624 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10625
10626 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10627 if test "${with_dbmalloc+set}" = set; then
10628   withval="$with_dbmalloc"
10629   cat >>confdefs.h <<\EOF
10630 #define USE_DBMALLOC 1
10631 EOF
10632
10633         : ${with_cflags:=-g}
10634         : ${with_no_leaks:=yes}
10635          with_dbmalloc=yes
10636 else
10637   with_dbmalloc=
10638 fi;
10639 echo "$as_me:10639: result: ${with_dbmalloc:-no}" >&5
10640 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10641
10642 case .$with_cflags in #(vi
10643 .*-g*)
10644         case .$CFLAGS in #(vi
10645         .*-g*) #(vi
10646                 ;;
10647         *)
10648
10649 cf_fix_cppflags=no
10650 cf_new_cflags=
10651 cf_new_cppflags=
10652 cf_new_extra_cppflags=
10653
10654 for cf_add_cflags in -g
10655 do
10656 case $cf_fix_cppflags in
10657 no)
10658         case $cf_add_cflags in #(vi
10659         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10660                 case $cf_add_cflags in
10661                 -D*)
10662                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10663
10664                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10665                         && test -z "${cf_tst_cflags}" \
10666                         && cf_fix_cppflags=yes
10667
10668                         if test $cf_fix_cppflags = yes ; then
10669                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10670                                 continue
10671                         elif test "${cf_tst_cflags}" = "\"'" ; then
10672                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10673                                 continue
10674                         fi
10675                         ;;
10676                 esac
10677                 case "$CPPFLAGS" in
10678                 *$cf_add_cflags) #(vi
10679                         ;;
10680                 *) #(vi
10681                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10682                         ;;
10683                 esac
10684                 ;;
10685         *)
10686                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10687                 ;;
10688         esac
10689         ;;
10690 yes)
10691         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10692
10693         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10694
10695         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10696         && test -z "${cf_tst_cflags}" \
10697         && cf_fix_cppflags=no
10698         ;;
10699 esac
10700 done
10701
10702 if test -n "$cf_new_cflags" ; then
10703
10704         CFLAGS="$CFLAGS $cf_new_cflags"
10705 fi
10706
10707 if test -n "$cf_new_cppflags" ; then
10708
10709         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10710 fi
10711
10712 if test -n "$cf_new_extra_cppflags" ; then
10713
10714         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10715 fi
10716
10717                 ;;
10718         esac
10719         ;;
10720 esac
10721
10722 if test "$with_dbmalloc" = yes ; then
10723         echo "$as_me:10723: checking for dbmalloc.h" >&5
10724 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10725 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728   cat >conftest.$ac_ext <<_ACEOF
10729 #line 10729 "configure"
10730 #include "confdefs.h"
10731 #include <dbmalloc.h>
10732 _ACEOF
10733 if { (eval echo "$as_me:10733: \"$ac_cpp conftest.$ac_ext\"") >&5
10734   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10735   ac_status=$?
10736   egrep -v '^ *\+' conftest.er1 >conftest.err
10737   rm -f conftest.er1
10738   cat conftest.err >&5
10739   echo "$as_me:10739: \$? = $ac_status" >&5
10740   (exit $ac_status); } >/dev/null; then
10741   if test -s conftest.err; then
10742     ac_cpp_err=$ac_c_preproc_warn_flag
10743   else
10744     ac_cpp_err=
10745   fi
10746 else
10747   ac_cpp_err=yes
10748 fi
10749 if test -z "$ac_cpp_err"; then
10750   ac_cv_header_dbmalloc_h=yes
10751 else
10752   echo "$as_me: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   ac_cv_header_dbmalloc_h=no
10755 fi
10756 rm -f conftest.err conftest.$ac_ext
10757 fi
10758 echo "$as_me:10758: result: $ac_cv_header_dbmalloc_h" >&5
10759 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10760 if test $ac_cv_header_dbmalloc_h = yes; then
10761
10762 echo "$as_me:10762: checking for debug_malloc in -ldbmalloc" >&5
10763 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10764 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10765   echo $ECHO_N "(cached) $ECHO_C" >&6
10766 else
10767   ac_check_lib_save_LIBS=$LIBS
10768 LIBS="-ldbmalloc  $LIBS"
10769 cat >conftest.$ac_ext <<_ACEOF
10770 #line 10770 "configure"
10771 #include "confdefs.h"
10772
10773 /* Override any gcc2 internal prototype to avoid an error.  */
10774 #ifdef __cplusplus
10775 extern "C"
10776 #endif
10777 /* We use char because int might match the return type of a gcc2
10778    builtin and then its argument prototype would still apply.  */
10779 char debug_malloc ();
10780 int
10781 main ()
10782 {
10783 debug_malloc ();
10784   ;
10785   return 0;
10786 }
10787 _ACEOF
10788 rm -f conftest.$ac_objext conftest$ac_exeext
10789 if { (eval echo "$as_me:10789: \"$ac_link\"") >&5
10790   (eval $ac_link) 2>&5
10791   ac_status=$?
10792   echo "$as_me:10792: \$? = $ac_status" >&5
10793   (exit $ac_status); } &&
10794          { ac_try='test -s conftest$ac_exeext'
10795   { (eval echo "$as_me:10795: \"$ac_try\"") >&5
10796   (eval $ac_try) 2>&5
10797   ac_status=$?
10798   echo "$as_me:10798: \$? = $ac_status" >&5
10799   (exit $ac_status); }; }; then
10800   ac_cv_lib_dbmalloc_debug_malloc=yes
10801 else
10802   echo "$as_me: failed program was:" >&5
10803 cat conftest.$ac_ext >&5
10804 ac_cv_lib_dbmalloc_debug_malloc=no
10805 fi
10806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10807 LIBS=$ac_check_lib_save_LIBS
10808 fi
10809 echo "$as_me:10809: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10810 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10811 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10812   cat >>confdefs.h <<EOF
10813 #define HAVE_LIBDBMALLOC 1
10814 EOF
10815
10816   LIBS="-ldbmalloc $LIBS"
10817
10818 fi
10819
10820 fi
10821
10822 fi
10823
10824 echo "$as_me:10824: checking if you want to use valgrind for testing" >&5
10825 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10826
10827 # Check whether --with-valgrind or --without-valgrind was given.
10828 if test "${with_valgrind+set}" = set; then
10829   withval="$with_valgrind"
10830   cat >>confdefs.h <<\EOF
10831 #define USE_VALGRIND 1
10832 EOF
10833
10834         : ${with_cflags:=-g}
10835         : ${with_no_leaks:=yes}
10836          with_valgrind=yes
10837 else
10838   with_valgrind=
10839 fi;
10840 echo "$as_me:10840: result: ${with_valgrind:-no}" >&5
10841 echo "${ECHO_T}${with_valgrind:-no}" >&6
10842
10843 case .$with_cflags in #(vi
10844 .*-g*)
10845         case .$CFLAGS in #(vi
10846         .*-g*) #(vi
10847                 ;;
10848         *)
10849
10850 cf_fix_cppflags=no
10851 cf_new_cflags=
10852 cf_new_cppflags=
10853 cf_new_extra_cppflags=
10854
10855 for cf_add_cflags in -g
10856 do
10857 case $cf_fix_cppflags in
10858 no)
10859         case $cf_add_cflags in #(vi
10860         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10861                 case $cf_add_cflags in
10862                 -D*)
10863                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10864
10865                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10866                         && test -z "${cf_tst_cflags}" \
10867                         && cf_fix_cppflags=yes
10868
10869                         if test $cf_fix_cppflags = yes ; then
10870                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10871                                 continue
10872                         elif test "${cf_tst_cflags}" = "\"'" ; then
10873                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10874                                 continue
10875                         fi
10876                         ;;
10877                 esac
10878                 case "$CPPFLAGS" in
10879                 *$cf_add_cflags) #(vi
10880                         ;;
10881                 *) #(vi
10882                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10883                         ;;
10884                 esac
10885                 ;;
10886         *)
10887                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10888                 ;;
10889         esac
10890         ;;
10891 yes)
10892         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10893
10894         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10895
10896         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10897         && test -z "${cf_tst_cflags}" \
10898         && cf_fix_cppflags=no
10899         ;;
10900 esac
10901 done
10902
10903 if test -n "$cf_new_cflags" ; then
10904
10905         CFLAGS="$CFLAGS $cf_new_cflags"
10906 fi
10907
10908 if test -n "$cf_new_cppflags" ; then
10909
10910         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10911 fi
10912
10913 if test -n "$cf_new_extra_cppflags" ; then
10914
10915         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10916 fi
10917
10918                 ;;
10919         esac
10920         ;;
10921 esac
10922
10923 echo "$as_me:10923: checking if you want to perform memory-leak testing" >&5
10924 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10925
10926 # Check whether --enable-leaks or --disable-leaks was given.
10927 if test "${enable_leaks+set}" = set; then
10928   enableval="$enable_leaks"
10929   with_no_leaks=yes
10930 else
10931   : ${with_no_leaks:=no}
10932 fi;
10933 echo "$as_me:10933: result: $with_no_leaks" >&5
10934 echo "${ECHO_T}$with_no_leaks" >&6
10935
10936 if test "$with_no_leaks" = yes ; then
10937         cat >>confdefs.h <<\EOF
10938 #define NO_LEAKS 1
10939 EOF
10940
10941 fi
10942
10943 cat >>confdefs.h <<\EOF
10944 #define HAVE_NC_ALLOC_H 1
10945 EOF
10946
10947 ###     use option --enable-expanded to generate certain macros as functions
10948
10949 # Check whether --enable-expanded or --disable-expanded was given.
10950 if test "${enable_expanded+set}" = set; then
10951   enableval="$enable_expanded"
10952   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10953 #define NCURSES_EXPANDED 1
10954 EOF
10955
10956 fi;
10957
10958 ###     use option --disable-macros to suppress macros in favor of functions
10959
10960 # Check whether --enable-macros or --disable-macros was given.
10961 if test "${enable_macros+set}" = set; then
10962   enableval="$enable_macros"
10963   test "$enableval" = no && cat >>confdefs.h <<\EOF
10964 #define NCURSES_NOMACROS 1
10965 EOF
10966
10967 fi;
10968
10969 # Normally we only add trace() to the debug-library.  Allow this to be
10970 # extended to all models of the ncurses library:
10971 cf_all_traces=no
10972 case "$CFLAGS $CPPFLAGS" in
10973 *-DTRACE*)
10974         cf_all_traces=yes
10975         ;;
10976 esac
10977
10978 echo "$as_me:10978: checking whether to add trace feature to all models" >&5
10979 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10980
10981 # Check whether --with-trace or --without-trace was given.
10982 if test "${with_trace+set}" = set; then
10983   withval="$with_trace"
10984   cf_with_trace=$withval
10985 else
10986   cf_with_trace=$cf_all_traces
10987 fi;
10988 echo "$as_me:10988: result: $cf_with_trace" >&5
10989 echo "${ECHO_T}$cf_with_trace" >&6
10990
10991 if test "$cf_with_trace" = yes ; then
10992         LIB_TRACING=all
10993         ADA_TRACE=TRUE
10994
10995 cf_fix_cppflags=no
10996 cf_new_cflags=
10997 cf_new_cppflags=
10998 cf_new_extra_cppflags=
10999
11000 for cf_add_cflags in -DTRACE
11001 do
11002 case $cf_fix_cppflags in
11003 no)
11004         case $cf_add_cflags in #(vi
11005         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11006                 case $cf_add_cflags in
11007                 -D*)
11008                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11009
11010                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11011                         && test -z "${cf_tst_cflags}" \
11012                         && cf_fix_cppflags=yes
11013
11014                         if test $cf_fix_cppflags = yes ; then
11015                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11016                                 continue
11017                         elif test "${cf_tst_cflags}" = "\"'" ; then
11018                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11019                                 continue
11020                         fi
11021                         ;;
11022                 esac
11023                 case "$CPPFLAGS" in
11024                 *$cf_add_cflags) #(vi
11025                         ;;
11026                 *) #(vi
11027                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11028                         ;;
11029                 esac
11030                 ;;
11031         *)
11032                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11033                 ;;
11034         esac
11035         ;;
11036 yes)
11037         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11038
11039         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11040
11041         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11042         && test -z "${cf_tst_cflags}" \
11043         && cf_fix_cppflags=no
11044         ;;
11045 esac
11046 done
11047
11048 if test -n "$cf_new_cflags" ; then
11049
11050         CFLAGS="$CFLAGS $cf_new_cflags"
11051 fi
11052
11053 if test -n "$cf_new_cppflags" ; then
11054
11055         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11056 fi
11057
11058 if test -n "$cf_new_extra_cppflags" ; then
11059
11060         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11061 fi
11062
11063 else
11064         LIB_TRACING=DEBUG
11065         ADA_TRACE=FALSE
11066 fi
11067
11068 ###     Checks for libraries.
11069 echo "$as_me:11069: checking for gettimeofday" >&5
11070 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11071 if test "${ac_cv_func_gettimeofday+set}" = set; then
11072   echo $ECHO_N "(cached) $ECHO_C" >&6
11073 else
11074   cat >conftest.$ac_ext <<_ACEOF
11075 #line 11075 "configure"
11076 #include "confdefs.h"
11077 /* System header to define __stub macros and hopefully few prototypes,
11078     which can conflict with char gettimeofday (); below.  */
11079 #include <assert.h>
11080 /* Override any gcc2 internal prototype to avoid an error.  */
11081 #ifdef __cplusplus
11082 extern "C"
11083 #endif
11084 /* We use char because int might match the return type of a gcc2
11085    builtin and then its argument prototype would still apply.  */
11086 char gettimeofday ();
11087 char (*f) ();
11088
11089 int
11090 main ()
11091 {
11092 /* The GNU C library defines this for functions which it implements
11093     to always fail with ENOSYS.  Some functions are actually named
11094     something starting with __ and the normal name is an alias.  */
11095 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11096 choke me
11097 #else
11098 f = gettimeofday;
11099 #endif
11100
11101   ;
11102   return 0;
11103 }
11104 _ACEOF
11105 rm -f conftest.$ac_objext conftest$ac_exeext
11106 if { (eval echo "$as_me:11106: \"$ac_link\"") >&5
11107   (eval $ac_link) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } &&
11111          { ac_try='test -s conftest$ac_exeext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   ac_cv_func_gettimeofday=yes
11118 else
11119   echo "$as_me: failed program was:" >&5
11120 cat conftest.$ac_ext >&5
11121 ac_cv_func_gettimeofday=no
11122 fi
11123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11124 fi
11125 echo "$as_me:11125: result: $ac_cv_func_gettimeofday" >&5
11126 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11127 if test $ac_cv_func_gettimeofday = yes; then
11128   cat >>confdefs.h <<\EOF
11129 #define HAVE_GETTIMEOFDAY 1
11130 EOF
11131
11132 else
11133
11134 echo "$as_me:11134: checking for gettimeofday in -lbsd" >&5
11135 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11136 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11137   echo $ECHO_N "(cached) $ECHO_C" >&6
11138 else
11139   ac_check_lib_save_LIBS=$LIBS
11140 LIBS="-lbsd  $LIBS"
11141 cat >conftest.$ac_ext <<_ACEOF
11142 #line 11142 "configure"
11143 #include "confdefs.h"
11144
11145 /* Override any gcc2 internal prototype to avoid an error.  */
11146 #ifdef __cplusplus
11147 extern "C"
11148 #endif
11149 /* We use char because int might match the return type of a gcc2
11150    builtin and then its argument prototype would still apply.  */
11151 char gettimeofday ();
11152 int
11153 main ()
11154 {
11155 gettimeofday ();
11156   ;
11157   return 0;
11158 }
11159 _ACEOF
11160 rm -f conftest.$ac_objext conftest$ac_exeext
11161 if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
11162   (eval $ac_link) 2>&5
11163   ac_status=$?
11164   echo "$as_me:11164: \$? = $ac_status" >&5
11165   (exit $ac_status); } &&
11166          { ac_try='test -s conftest$ac_exeext'
11167   { (eval echo "$as_me:11167: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:11170: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172   ac_cv_lib_bsd_gettimeofday=yes
11173 else
11174   echo "$as_me: failed program was:" >&5
11175 cat conftest.$ac_ext >&5
11176 ac_cv_lib_bsd_gettimeofday=no
11177 fi
11178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11179 LIBS=$ac_check_lib_save_LIBS
11180 fi
11181 echo "$as_me:11181: result: $ac_cv_lib_bsd_gettimeofday" >&5
11182 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11183 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11184   cat >>confdefs.h <<\EOF
11185 #define HAVE_GETTIMEOFDAY 1
11186 EOF
11187
11188         LIBS="$LIBS -lbsd"
11189 fi
11190
11191 fi
11192
11193 echo "$as_me:11193: checking if -lm needed for math functions" >&5
11194 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11195 if test "${cf_cv_need_libm+set}" = set; then
11196   echo $ECHO_N "(cached) $ECHO_C" >&6
11197 else
11198
11199         cat >conftest.$ac_ext <<_ACEOF
11200 #line 11200 "configure"
11201 #include "confdefs.h"
11202
11203         #include <stdio.h>
11204         #include <math.h>
11205
11206 int
11207 main ()
11208 {
11209 double x = rand(); printf("result = %g\n", sin(x))
11210   ;
11211   return 0;
11212 }
11213 _ACEOF
11214 rm -f conftest.$ac_objext conftest$ac_exeext
11215 if { (eval echo "$as_me:11215: \"$ac_link\"") >&5
11216   (eval $ac_link) 2>&5
11217   ac_status=$?
11218   echo "$as_me:11218: \$? = $ac_status" >&5
11219   (exit $ac_status); } &&
11220          { ac_try='test -s conftest$ac_exeext'
11221   { (eval echo "$as_me:11221: \"$ac_try\"") >&5
11222   (eval $ac_try) 2>&5
11223   ac_status=$?
11224   echo "$as_me:11224: \$? = $ac_status" >&5
11225   (exit $ac_status); }; }; then
11226   cf_cv_need_libm=no
11227 else
11228   echo "$as_me: failed program was:" >&5
11229 cat conftest.$ac_ext >&5
11230 cf_cv_need_libm=yes
11231 fi
11232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11233 fi
11234 echo "$as_me:11234: result: $cf_cv_need_libm" >&5
11235 echo "${ECHO_T}$cf_cv_need_libm" >&6
11236 if test "$cf_cv_need_libm" = yes
11237 then
11238 MATH_LIB=-lm
11239 fi
11240
11241 ###     Checks for header files.
11242 echo "$as_me:11242: checking for ANSI C header files" >&5
11243 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11244 if test "${ac_cv_header_stdc+set}" = set; then
11245   echo $ECHO_N "(cached) $ECHO_C" >&6
11246 else
11247   cat >conftest.$ac_ext <<_ACEOF
11248 #line 11248 "configure"
11249 #include "confdefs.h"
11250 #include <stdlib.h>
11251 #include <stdarg.h>
11252 #include <string.h>
11253 #include <float.h>
11254
11255 _ACEOF
11256 if { (eval echo "$as_me:11256: \"$ac_cpp conftest.$ac_ext\"") >&5
11257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11258   ac_status=$?
11259   egrep -v '^ *\+' conftest.er1 >conftest.err
11260   rm -f conftest.er1
11261   cat conftest.err >&5
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit $ac_status); } >/dev/null; then
11264   if test -s conftest.err; then
11265     ac_cpp_err=$ac_c_preproc_warn_flag
11266   else
11267     ac_cpp_err=
11268   fi
11269 else
11270   ac_cpp_err=yes
11271 fi
11272 if test -z "$ac_cpp_err"; then
11273   ac_cv_header_stdc=yes
11274 else
11275   echo "$as_me: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   ac_cv_header_stdc=no
11278 fi
11279 rm -f conftest.err conftest.$ac_ext
11280
11281 if test $ac_cv_header_stdc = yes; then
11282   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11283   cat >conftest.$ac_ext <<_ACEOF
11284 #line 11284 "configure"
11285 #include "confdefs.h"
11286 #include <string.h>
11287
11288 _ACEOF
11289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11290   egrep "memchr" >/dev/null 2>&1; then
11291   :
11292 else
11293   ac_cv_header_stdc=no
11294 fi
11295 rm -f conftest*
11296
11297 fi
11298
11299 if test $ac_cv_header_stdc = yes; then
11300   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11301   cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11304 #include <stdlib.h>
11305
11306 _ACEOF
11307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11308   egrep "free" >/dev/null 2>&1; then
11309   :
11310 else
11311   ac_cv_header_stdc=no
11312 fi
11313 rm -f conftest*
11314
11315 fi
11316
11317 if test $ac_cv_header_stdc = yes; then
11318   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11319   if test "$cross_compiling" = yes; then
11320   :
11321 else
11322   cat >conftest.$ac_ext <<_ACEOF
11323 #line 11323 "configure"
11324 #include "confdefs.h"
11325 #include <ctype.h>
11326 #if ((' ' & 0x0FF) == 0x020)
11327 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11328 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11329 #else
11330 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11331                      || ('j' <= (c) && (c) <= 'r') \
11332                      || ('s' <= (c) && (c) <= 'z'))
11333 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11334 #endif
11335
11336 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11337 int
11338 main ()
11339 {
11340   int i;
11341   for (i = 0; i < 256; i++)
11342     if (XOR (islower (i), ISLOWER (i))
11343         || toupper (i) != TOUPPER (i))
11344       $ac_main_return(2);
11345   $ac_main_return (0);
11346 }
11347 _ACEOF
11348 rm -f conftest$ac_exeext
11349 if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
11350   (eval $ac_link) 2>&5
11351   ac_status=$?
11352   echo "$as_me:11352: \$? = $ac_status" >&5
11353   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11354   { (eval echo "$as_me:11354: \"$ac_try\"") >&5
11355   (eval $ac_try) 2>&5
11356   ac_status=$?
11357   echo "$as_me:11357: \$? = $ac_status" >&5
11358   (exit $ac_status); }; }; then
11359   :
11360 else
11361   echo "$as_me: program exited with status $ac_status" >&5
11362 echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 ac_cv_header_stdc=no
11365 fi
11366 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11367 fi
11368 fi
11369 fi
11370 echo "$as_me:11370: result: $ac_cv_header_stdc" >&5
11371 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11372 if test $ac_cv_header_stdc = yes; then
11373
11374 cat >>confdefs.h <<\EOF
11375 #define STDC_HEADERS 1
11376 EOF
11377
11378 fi
11379
11380 ac_header_dirent=no
11381 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11382   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11383 echo "$as_me:11383: checking for $ac_hdr that defines DIR" >&5
11384 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11385 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11386   echo $ECHO_N "(cached) $ECHO_C" >&6
11387 else
11388   cat >conftest.$ac_ext <<_ACEOF
11389 #line 11389 "configure"
11390 #include "confdefs.h"
11391 #include <sys/types.h>
11392 #include <$ac_hdr>
11393
11394 int
11395 main ()
11396 {
11397 if ((DIR *) 0)
11398 return 0;
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 rm -f conftest.$ac_objext
11404 if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
11405   (eval $ac_compile) 2>&5
11406   ac_status=$?
11407   echo "$as_me:11407: \$? = $ac_status" >&5
11408   (exit $ac_status); } &&
11409          { ac_try='test -s conftest.$ac_objext'
11410   { (eval echo "$as_me:11410: \"$ac_try\"") >&5
11411   (eval $ac_try) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit $ac_status); }; }; then
11415   eval "$as_ac_Header=yes"
11416 else
11417   echo "$as_me: failed program was:" >&5
11418 cat conftest.$ac_ext >&5
11419 eval "$as_ac_Header=no"
11420 fi
11421 rm -f conftest.$ac_objext conftest.$ac_ext
11422 fi
11423 echo "$as_me:11423: result: `eval echo '${'$as_ac_Header'}'`" >&5
11424 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11425 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11426   cat >>confdefs.h <<EOF
11427 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11428 EOF
11429
11430 ac_header_dirent=$ac_hdr; break
11431 fi
11432
11433 done
11434 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11435 if test $ac_header_dirent = dirent.h; then
11436   echo "$as_me:11436: checking for opendir in -ldir" >&5
11437 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11438 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11439   echo $ECHO_N "(cached) $ECHO_C" >&6
11440 else
11441   ac_check_lib_save_LIBS=$LIBS
11442 LIBS="-ldir  $LIBS"
11443 cat >conftest.$ac_ext <<_ACEOF
11444 #line 11444 "configure"
11445 #include "confdefs.h"
11446
11447 /* Override any gcc2 internal prototype to avoid an error.  */
11448 #ifdef __cplusplus
11449 extern "C"
11450 #endif
11451 /* We use char because int might match the return type of a gcc2
11452    builtin and then its argument prototype would still apply.  */
11453 char opendir ();
11454 int
11455 main ()
11456 {
11457 opendir ();
11458   ;
11459   return 0;
11460 }
11461 _ACEOF
11462 rm -f conftest.$ac_objext conftest$ac_exeext
11463 if { (eval echo "$as_me:11463: \"$ac_link\"") >&5
11464   (eval $ac_link) 2>&5
11465   ac_status=$?
11466   echo "$as_me:11466: \$? = $ac_status" >&5
11467   (exit $ac_status); } &&
11468          { ac_try='test -s conftest$ac_exeext'
11469   { (eval echo "$as_me:11469: \"$ac_try\"") >&5
11470   (eval $ac_try) 2>&5
11471   ac_status=$?
11472   echo "$as_me:11472: \$? = $ac_status" >&5
11473   (exit $ac_status); }; }; then
11474   ac_cv_lib_dir_opendir=yes
11475 else
11476   echo "$as_me: failed program was:" >&5
11477 cat conftest.$ac_ext >&5
11478 ac_cv_lib_dir_opendir=no
11479 fi
11480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11481 LIBS=$ac_check_lib_save_LIBS
11482 fi
11483 echo "$as_me:11483: result: $ac_cv_lib_dir_opendir" >&5
11484 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11485 if test $ac_cv_lib_dir_opendir = yes; then
11486   LIBS="$LIBS -ldir"
11487 fi
11488
11489 else
11490   echo "$as_me:11490: checking for opendir in -lx" >&5
11491 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11492 if test "${ac_cv_lib_x_opendir+set}" = set; then
11493   echo $ECHO_N "(cached) $ECHO_C" >&6
11494 else
11495   ac_check_lib_save_LIBS=$LIBS
11496 LIBS="-lx  $LIBS"
11497 cat >conftest.$ac_ext <<_ACEOF
11498 #line 11498 "configure"
11499 #include "confdefs.h"
11500
11501 /* Override any gcc2 internal prototype to avoid an error.  */
11502 #ifdef __cplusplus
11503 extern "C"
11504 #endif
11505 /* We use char because int might match the return type of a gcc2
11506    builtin and then its argument prototype would still apply.  */
11507 char opendir ();
11508 int
11509 main ()
11510 {
11511 opendir ();
11512   ;
11513   return 0;
11514 }
11515 _ACEOF
11516 rm -f conftest.$ac_objext conftest$ac_exeext
11517 if { (eval echo "$as_me:11517: \"$ac_link\"") >&5
11518   (eval $ac_link) 2>&5
11519   ac_status=$?
11520   echo "$as_me:11520: \$? = $ac_status" >&5
11521   (exit $ac_status); } &&
11522          { ac_try='test -s conftest$ac_exeext'
11523   { (eval echo "$as_me:11523: \"$ac_try\"") >&5
11524   (eval $ac_try) 2>&5
11525   ac_status=$?
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit $ac_status); }; }; then
11528   ac_cv_lib_x_opendir=yes
11529 else
11530   echo "$as_me: failed program was:" >&5
11531 cat conftest.$ac_ext >&5
11532 ac_cv_lib_x_opendir=no
11533 fi
11534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11535 LIBS=$ac_check_lib_save_LIBS
11536 fi
11537 echo "$as_me:11537: result: $ac_cv_lib_x_opendir" >&5
11538 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11539 if test $ac_cv_lib_x_opendir = yes; then
11540   LIBS="$LIBS -lx"
11541 fi
11542
11543 fi
11544
11545 echo "$as_me:11545: checking whether time.h and sys/time.h may both be included" >&5
11546 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11547 if test "${ac_cv_header_time+set}" = set; then
11548   echo $ECHO_N "(cached) $ECHO_C" >&6
11549 else
11550   cat >conftest.$ac_ext <<_ACEOF
11551 #line 11551 "configure"
11552 #include "confdefs.h"
11553 #include <sys/types.h>
11554 #include <sys/time.h>
11555 #include <time.h>
11556
11557 int
11558 main ()
11559 {
11560 if ((struct tm *) 0)
11561 return 0;
11562   ;
11563   return 0;
11564 }
11565 _ACEOF
11566 rm -f conftest.$ac_objext
11567 if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
11568   (eval $ac_compile) 2>&5
11569   ac_status=$?
11570   echo "$as_me:11570: \$? = $ac_status" >&5
11571   (exit $ac_status); } &&
11572          { ac_try='test -s conftest.$ac_objext'
11573   { (eval echo "$as_me:11573: \"$ac_try\"") >&5
11574   (eval $ac_try) 2>&5
11575   ac_status=$?
11576   echo "$as_me:11576: \$? = $ac_status" >&5
11577   (exit $ac_status); }; }; then
11578   ac_cv_header_time=yes
11579 else
11580   echo "$as_me: failed program was:" >&5
11581 cat conftest.$ac_ext >&5
11582 ac_cv_header_time=no
11583 fi
11584 rm -f conftest.$ac_objext conftest.$ac_ext
11585 fi
11586 echo "$as_me:11586: result: $ac_cv_header_time" >&5
11587 echo "${ECHO_T}$ac_cv_header_time" >&6
11588 if test $ac_cv_header_time = yes; then
11589
11590 cat >>confdefs.h <<\EOF
11591 #define TIME_WITH_SYS_TIME 1
11592 EOF
11593
11594 fi
11595
11596 echo "$as_me:11596: checking for regular-expression headers" >&5
11597 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11598 if test "${cf_cv_regex+set}" = set; then
11599   echo $ECHO_N "(cached) $ECHO_C" >&6
11600 else
11601
11602 cat >conftest.$ac_ext <<_ACEOF
11603 #line 11603 "configure"
11604 #include "confdefs.h"
11605 #include <sys/types.h>
11606 #include <regex.h>
11607 int
11608 main ()
11609 {
11610
11611         regex_t *p;
11612         int x = regcomp(p, "", 0);
11613         int y = regexec(p, "", 0, 0, 0);
11614         regfree(p);
11615
11616   ;
11617   return 0;
11618 }
11619 _ACEOF
11620 rm -f conftest.$ac_objext conftest$ac_exeext
11621 if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
11622   (eval $ac_link) 2>&5
11623   ac_status=$?
11624   echo "$as_me:11624: \$? = $ac_status" >&5
11625   (exit $ac_status); } &&
11626          { ac_try='test -s conftest$ac_exeext'
11627   { (eval echo "$as_me:11627: \"$ac_try\"") >&5
11628   (eval $ac_try) 2>&5
11629   ac_status=$?
11630   echo "$as_me:11630: \$? = $ac_status" >&5
11631   (exit $ac_status); }; }; then
11632   cf_cv_regex="regex.h"
11633 else
11634   echo "$as_me: failed program was:" >&5
11635 cat conftest.$ac_ext >&5
11636
11637         cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640 #include <regexp.h>
11641 int
11642 main ()
11643 {
11644
11645                 char *p = compile("", "", "", 0);
11646                 int x = step("", "");
11647
11648   ;
11649   return 0;
11650 }
11651 _ACEOF
11652 rm -f conftest.$ac_objext conftest$ac_exeext
11653 if { (eval echo "$as_me:11653: \"$ac_link\"") >&5
11654   (eval $ac_link) 2>&5
11655   ac_status=$?
11656   echo "$as_me:11656: \$? = $ac_status" >&5
11657   (exit $ac_status); } &&
11658          { ac_try='test -s conftest$ac_exeext'
11659   { (eval echo "$as_me:11659: \"$ac_try\"") >&5
11660   (eval $ac_try) 2>&5
11661   ac_status=$?
11662   echo "$as_me:11662: \$? = $ac_status" >&5
11663   (exit $ac_status); }; }; then
11664   cf_cv_regex="regexp.h"
11665 else
11666   echo "$as_me: failed program was:" >&5
11667 cat conftest.$ac_ext >&5
11668
11669                 cf_save_LIBS="$LIBS"
11670                 LIBS="-lgen $LIBS"
11671                 cat >conftest.$ac_ext <<_ACEOF
11672 #line 11672 "configure"
11673 #include "confdefs.h"
11674 #include <regexpr.h>
11675 int
11676 main ()
11677 {
11678
11679                         char *p = compile("", "", "");
11680                         int x = step("", "");
11681
11682   ;
11683   return 0;
11684 }
11685 _ACEOF
11686 rm -f conftest.$ac_objext conftest$ac_exeext
11687 if { (eval echo "$as_me:11687: \"$ac_link\"") >&5
11688   (eval $ac_link) 2>&5
11689   ac_status=$?
11690   echo "$as_me:11690: \$? = $ac_status" >&5
11691   (exit $ac_status); } &&
11692          { ac_try='test -s conftest$ac_exeext'
11693   { (eval echo "$as_me:11693: \"$ac_try\"") >&5
11694   (eval $ac_try) 2>&5
11695   ac_status=$?
11696   echo "$as_me:11696: \$? = $ac_status" >&5
11697   (exit $ac_status); }; }; then
11698   cf_cv_regex="regexpr.h"
11699 else
11700   echo "$as_me: failed program was:" >&5
11701 cat conftest.$ac_ext >&5
11702 LIBS="$cf_save_LIBS"
11703 fi
11704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11705 fi
11706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11707 fi
11708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11709
11710 fi
11711
11712 echo "$as_me:11712: result: $cf_cv_regex" >&5
11713 echo "${ECHO_T}$cf_cv_regex" >&6
11714 case $cf_cv_regex in
11715         regex.h)   cat >>confdefs.h <<\EOF
11716 #define HAVE_REGEX_H_FUNCS 1
11717 EOF
11718  ;;
11719         regexp.h)  cat >>confdefs.h <<\EOF
11720 #define HAVE_REGEXP_H_FUNCS 1
11721 EOF
11722  ;;
11723         regexpr.h) cat >>confdefs.h <<\EOF
11724 #define HAVE_REGEXPR_H_FUNCS 1
11725 EOF
11726  ;;
11727 esac
11728
11729 for ac_header in \
11730 fcntl.h \
11731 getopt.h \
11732 limits.h \
11733 locale.h \
11734 poll.h \
11735 sys/bsdtypes.h \
11736 sys/ioctl.h \
11737 sys/param.h \
11738 sys/poll.h \
11739 sys/select.h \
11740 sys/time.h \
11741 sys/times.h \
11742 ttyent.h \
11743 unistd.h \
11744 wctype.h \
11745
11746 do
11747 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11748 echo "$as_me:11748: checking for $ac_header" >&5
11749 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11750 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11751   echo $ECHO_N "(cached) $ECHO_C" >&6
11752 else
11753   cat >conftest.$ac_ext <<_ACEOF
11754 #line 11754 "configure"
11755 #include "confdefs.h"
11756 #include <$ac_header>
11757 _ACEOF
11758 if { (eval echo "$as_me:11758: \"$ac_cpp conftest.$ac_ext\"") >&5
11759   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11760   ac_status=$?
11761   egrep -v '^ *\+' conftest.er1 >conftest.err
11762   rm -f conftest.er1
11763   cat conftest.err >&5
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit $ac_status); } >/dev/null; then
11766   if test -s conftest.err; then
11767     ac_cpp_err=$ac_c_preproc_warn_flag
11768   else
11769     ac_cpp_err=
11770   fi
11771 else
11772   ac_cpp_err=yes
11773 fi
11774 if test -z "$ac_cpp_err"; then
11775   eval "$as_ac_Header=yes"
11776 else
11777   echo "$as_me: failed program was:" >&5
11778   cat conftest.$ac_ext >&5
11779   eval "$as_ac_Header=no"
11780 fi
11781 rm -f conftest.err conftest.$ac_ext
11782 fi
11783 echo "$as_me:11783: result: `eval echo '${'$as_ac_Header'}'`" >&5
11784 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11785 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11786   cat >>confdefs.h <<EOF
11787 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11788 EOF
11789
11790 fi
11791 done
11792
11793 # check for ISC (this may also define _POSIX_SOURCE)
11794 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11795 if test "$ISC" = yes ; then
11796
11797 echo "$as_me:11797: checking for main in -lcposix" >&5
11798 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11799 if test "${ac_cv_lib_cposix_main+set}" = set; then
11800   echo $ECHO_N "(cached) $ECHO_C" >&6
11801 else
11802   ac_check_lib_save_LIBS=$LIBS
11803 LIBS="-lcposix  $LIBS"
11804 cat >conftest.$ac_ext <<_ACEOF
11805 #line 11805 "configure"
11806 #include "confdefs.h"
11807
11808 int
11809 main ()
11810 {
11811 main ();
11812   ;
11813   return 0;
11814 }
11815 _ACEOF
11816 rm -f conftest.$ac_objext conftest$ac_exeext
11817 if { (eval echo "$as_me:11817: \"$ac_link\"") >&5
11818   (eval $ac_link) 2>&5
11819   ac_status=$?
11820   echo "$as_me:11820: \$? = $ac_status" >&5
11821   (exit $ac_status); } &&
11822          { ac_try='test -s conftest$ac_exeext'
11823   { (eval echo "$as_me:11823: \"$ac_try\"") >&5
11824   (eval $ac_try) 2>&5
11825   ac_status=$?
11826   echo "$as_me:11826: \$? = $ac_status" >&5
11827   (exit $ac_status); }; }; then
11828   ac_cv_lib_cposix_main=yes
11829 else
11830   echo "$as_me: failed program was:" >&5
11831 cat conftest.$ac_ext >&5
11832 ac_cv_lib_cposix_main=no
11833 fi
11834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11835 LIBS=$ac_check_lib_save_LIBS
11836 fi
11837 echo "$as_me:11837: result: $ac_cv_lib_cposix_main" >&5
11838 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11839 if test $ac_cv_lib_cposix_main = yes; then
11840   cat >>confdefs.h <<EOF
11841 #define HAVE_LIBCPOSIX 1
11842 EOF
11843
11844   LIBS="-lcposix $LIBS"
11845
11846 fi
11847
11848         echo "$as_me:11848: checking for bzero in -linet" >&5
11849 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11850 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11851   echo $ECHO_N "(cached) $ECHO_C" >&6
11852 else
11853   ac_check_lib_save_LIBS=$LIBS
11854 LIBS="-linet  $LIBS"
11855 cat >conftest.$ac_ext <<_ACEOF
11856 #line 11856 "configure"
11857 #include "confdefs.h"
11858
11859 /* Override any gcc2 internal prototype to avoid an error.  */
11860 #ifdef __cplusplus
11861 extern "C"
11862 #endif
11863 /* We use char because int might match the return type of a gcc2
11864    builtin and then its argument prototype would still apply.  */
11865 char bzero ();
11866 int
11867 main ()
11868 {
11869 bzero ();
11870   ;
11871   return 0;
11872 }
11873 _ACEOF
11874 rm -f conftest.$ac_objext conftest$ac_exeext
11875 if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
11876   (eval $ac_link) 2>&5
11877   ac_status=$?
11878   echo "$as_me:11878: \$? = $ac_status" >&5
11879   (exit $ac_status); } &&
11880          { ac_try='test -s conftest$ac_exeext'
11881   { (eval echo "$as_me:11881: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:11884: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886   ac_cv_lib_inet_bzero=yes
11887 else
11888   echo "$as_me: failed program was:" >&5
11889 cat conftest.$ac_ext >&5
11890 ac_cv_lib_inet_bzero=no
11891 fi
11892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11893 LIBS=$ac_check_lib_save_LIBS
11894 fi
11895 echo "$as_me:11895: result: $ac_cv_lib_inet_bzero" >&5
11896 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11897 if test $ac_cv_lib_inet_bzero = yes; then
11898   LIBS="$LIBS -linet"
11899 fi
11900 fi
11901
11902 echo "$as_me:11902: checking if sys/time.h works with sys/select.h" >&5
11903 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11904 if test "${cf_cv_sys_time_select+set}" = set; then
11905   echo $ECHO_N "(cached) $ECHO_C" >&6
11906 else
11907
11908 cat >conftest.$ac_ext <<_ACEOF
11909 #line 11909 "configure"
11910 #include "confdefs.h"
11911
11912 #include <sys/types.h>
11913 #ifdef HAVE_SYS_TIME_H
11914 #include <sys/time.h>
11915 #endif
11916 #ifdef HAVE_SYS_SELECT_H
11917 #include <sys/select.h>
11918 #endif
11919
11920 int
11921 main ()
11922 {
11923
11924   ;
11925   return 0;
11926 }
11927 _ACEOF
11928 rm -f conftest.$ac_objext
11929 if { (eval echo "$as_me:11929: \"$ac_compile\"") >&5
11930   (eval $ac_compile) 2>&5
11931   ac_status=$?
11932   echo "$as_me:11932: \$? = $ac_status" >&5
11933   (exit $ac_status); } &&
11934          { ac_try='test -s conftest.$ac_objext'
11935   { (eval echo "$as_me:11935: \"$ac_try\"") >&5
11936   (eval $ac_try) 2>&5
11937   ac_status=$?
11938   echo "$as_me:11938: \$? = $ac_status" >&5
11939   (exit $ac_status); }; }; then
11940   cf_cv_sys_time_select=yes
11941 else
11942   echo "$as_me: failed program was:" >&5
11943 cat conftest.$ac_ext >&5
11944 cf_cv_sys_time_select=no
11945 fi
11946 rm -f conftest.$ac_objext conftest.$ac_ext
11947
11948 fi
11949
11950 echo "$as_me:11950: result: $cf_cv_sys_time_select" >&5
11951 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11952 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11953 #define HAVE_SYS_TIME_SELECT 1
11954 EOF
11955
11956 ###     checks for compiler characteristics
11957 ac_ext=c
11958 ac_cpp='$CPP $CPPFLAGS'
11959 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11960 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11961 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11962 ac_main_return=return
11963
11964 echo "$as_me:11964: checking for $CC option to accept ANSI C" >&5
11965 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11966 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11967   echo $ECHO_N "(cached) $ECHO_C" >&6
11968 else
11969   ac_cv_prog_cc_stdc=no
11970 ac_save_CC=$CC
11971 cat >conftest.$ac_ext <<_ACEOF
11972 #line 11972 "configure"
11973 #include "confdefs.h"
11974 #include <stdarg.h>
11975 #include <stdio.h>
11976 #include <sys/types.h>
11977 #include <sys/stat.h>
11978 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11979 struct buf { int x; };
11980 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11981 static char *e (p, i)
11982      char **p;
11983      int i;
11984 {
11985   return p[i];
11986 }
11987 static char *f (char * (*g) (char **, int), char **p, ...)
11988 {
11989   char *s;
11990   va_list v;
11991   va_start (v,p);
11992   s = g (p, va_arg (v,int));
11993   va_end (v);
11994   return s;
11995 }
11996 int test (int i, double x);
11997 struct s1 {int (*f) (int a);};
11998 struct s2 {int (*f) (double a);};
11999 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12000 int argc;
12001 char **argv;
12002 int
12003 main ()
12004 {
12005 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12006   ;
12007   return 0;
12008 }
12009 _ACEOF
12010 # Don't try gcc -ansi; that turns off useful extensions and
12011 # breaks some systems' header files.
12012 # AIX                   -qlanglvl=ansi
12013 # Ultrix and OSF/1      -std1
12014 # HP-UX 10.20 and later -Ae
12015 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12016 # SVR4                  -Xc -D__EXTENSIONS__
12017 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12018 do
12019   CC="$ac_save_CC $ac_arg"
12020   rm -f conftest.$ac_objext
12021 if { (eval echo "$as_me:12021: \"$ac_compile\"") >&5
12022   (eval $ac_compile) 2>&5
12023   ac_status=$?
12024   echo "$as_me:12024: \$? = $ac_status" >&5
12025   (exit $ac_status); } &&
12026          { ac_try='test -s conftest.$ac_objext'
12027   { (eval echo "$as_me:12027: \"$ac_try\"") >&5
12028   (eval $ac_try) 2>&5
12029   ac_status=$?
12030   echo "$as_me:12030: \$? = $ac_status" >&5
12031   (exit $ac_status); }; }; then
12032   ac_cv_prog_cc_stdc=$ac_arg
12033 break
12034 else
12035   echo "$as_me: failed program was:" >&5
12036 cat conftest.$ac_ext >&5
12037 fi
12038 rm -f conftest.$ac_objext
12039 done
12040 rm -f conftest.$ac_ext conftest.$ac_objext
12041 CC=$ac_save_CC
12042
12043 fi
12044
12045 case "x$ac_cv_prog_cc_stdc" in
12046   x|xno)
12047     echo "$as_me:12047: result: none needed" >&5
12048 echo "${ECHO_T}none needed" >&6 ;;
12049   *)
12050     echo "$as_me:12050: result: $ac_cv_prog_cc_stdc" >&5
12051 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12052     CC="$CC $ac_cv_prog_cc_stdc" ;;
12053 esac
12054
12055 echo "$as_me:12055: checking for an ANSI C-conforming const" >&5
12056 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12057 if test "${ac_cv_c_const+set}" = set; then
12058   echo $ECHO_N "(cached) $ECHO_C" >&6
12059 else
12060   cat >conftest.$ac_ext <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12063
12064 int
12065 main ()
12066 {
12067 /* FIXME: Include the comments suggested by Paul. */
12068 #ifndef __cplusplus
12069   /* Ultrix mips cc rejects this.  */
12070   typedef int charset[2];
12071   const charset x;
12072   /* SunOS 4.1.1 cc rejects this.  */
12073   char const *const *ccp;
12074   char **p;
12075   /* NEC SVR4.0.2 mips cc rejects this.  */
12076   struct point {int x, y;};
12077   static struct point const zero = {0,0};
12078   /* AIX XL C 1.02.0.0 rejects this.
12079      It does not let you subtract one const X* pointer from another in
12080      an arm of an if-expression whose if-part is not a constant
12081      expression */
12082   const char *g = "string";
12083   ccp = &g + (g ? g-g : 0);
12084   /* HPUX 7.0 cc rejects these. */
12085   ++ccp;
12086   p = (char**) ccp;
12087   ccp = (char const *const *) p;
12088   { /* SCO 3.2v4 cc rejects this.  */
12089     char *t;
12090     char const *s = 0 ? (char *) 0 : (char const *) 0;
12091
12092     *t++ = 0;
12093   }
12094   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12095     int x[] = {25, 17};
12096     const int *foo = &x[0];
12097     ++foo;
12098   }
12099   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12100     typedef const int *iptr;
12101     iptr p = 0;
12102     ++p;
12103   }
12104   { /* AIX XL C 1.02.0.0 rejects this saying
12105        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12106     struct s { int j; const int *ap[3]; };
12107     struct s *b; b->j = 5;
12108   }
12109   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12110     const int foo = 10;
12111   }
12112 #endif
12113
12114   ;
12115   return 0;
12116 }
12117 _ACEOF
12118 rm -f conftest.$ac_objext
12119 if { (eval echo "$as_me:12119: \"$ac_compile\"") >&5
12120   (eval $ac_compile) 2>&5
12121   ac_status=$?
12122   echo "$as_me:12122: \$? = $ac_status" >&5
12123   (exit $ac_status); } &&
12124          { ac_try='test -s conftest.$ac_objext'
12125   { (eval echo "$as_me:12125: \"$ac_try\"") >&5
12126   (eval $ac_try) 2>&5
12127   ac_status=$?
12128   echo "$as_me:12128: \$? = $ac_status" >&5
12129   (exit $ac_status); }; }; then
12130   ac_cv_c_const=yes
12131 else
12132   echo "$as_me: failed program was:" >&5
12133 cat conftest.$ac_ext >&5
12134 ac_cv_c_const=no
12135 fi
12136 rm -f conftest.$ac_objext conftest.$ac_ext
12137 fi
12138 echo "$as_me:12138: result: $ac_cv_c_const" >&5
12139 echo "${ECHO_T}$ac_cv_c_const" >&6
12140 if test $ac_cv_c_const = no; then
12141
12142 cat >>confdefs.h <<\EOF
12143 #define const
12144 EOF
12145
12146 fi
12147
12148 echo "$as_me:12148: checking for inline" >&5
12149 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12150 if test "${ac_cv_c_inline+set}" = set; then
12151   echo $ECHO_N "(cached) $ECHO_C" >&6
12152 else
12153   ac_cv_c_inline=no
12154 for ac_kw in inline __inline__ __inline; do
12155   cat >conftest.$ac_ext <<_ACEOF
12156 #line 12156 "configure"
12157 #include "confdefs.h"
12158 #ifndef __cplusplus
12159 static $ac_kw int static_foo () {return 0; }
12160 $ac_kw int foo () {return 0; }
12161 #endif
12162
12163 _ACEOF
12164 rm -f conftest.$ac_objext
12165 if { (eval echo "$as_me:12165: \"$ac_compile\"") >&5
12166   (eval $ac_compile) 2>&5
12167   ac_status=$?
12168   echo "$as_me:12168: \$? = $ac_status" >&5
12169   (exit $ac_status); } &&
12170          { ac_try='test -s conftest.$ac_objext'
12171   { (eval echo "$as_me:12171: \"$ac_try\"") >&5
12172   (eval $ac_try) 2>&5
12173   ac_status=$?
12174   echo "$as_me:12174: \$? = $ac_status" >&5
12175   (exit $ac_status); }; }; then
12176   ac_cv_c_inline=$ac_kw; break
12177 else
12178   echo "$as_me: failed program was:" >&5
12179 cat conftest.$ac_ext >&5
12180 fi
12181 rm -f conftest.$ac_objext conftest.$ac_ext
12182 done
12183
12184 fi
12185 echo "$as_me:12185: result: $ac_cv_c_inline" >&5
12186 echo "${ECHO_T}$ac_cv_c_inline" >&6
12187 case $ac_cv_c_inline in
12188   inline | yes) ;;
12189   no)
12190 cat >>confdefs.h <<\EOF
12191 #define inline
12192 EOF
12193  ;;
12194   *)  cat >>confdefs.h <<EOF
12195 #define inline $ac_cv_c_inline
12196 EOF
12197  ;;
12198 esac
12199
12200 NCURSES_INLINE=
12201 if test "$ac_cv_c_inline" != no ; then
12202   NCURSES_INLINE=inline
12203   if test "$INTEL_COMPILER" = yes
12204   then
12205     :
12206   elif test "$GCC" = yes
12207   then
12208     echo "$as_me:12208: checking if gcc supports options to tune inlining" >&5
12209 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12210 if test "${cf_cv_gcc_inline+set}" = set; then
12211   echo $ECHO_N "(cached) $ECHO_C" >&6
12212 else
12213
12214       cf_save_CFLAGS=$CFLAGS
12215       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12216       cat >conftest.$ac_ext <<_ACEOF
12217 #line 12217 "configure"
12218 #include "confdefs.h"
12219 inline int foo(void) { return 1; }
12220 int
12221 main ()
12222 {
12223 ${cf_cv_main_return:-return} foo()
12224   ;
12225   return 0;
12226 }
12227 _ACEOF
12228 rm -f conftest.$ac_objext
12229 if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
12230   (eval $ac_compile) 2>&5
12231   ac_status=$?
12232   echo "$as_me:12232: \$? = $ac_status" >&5
12233   (exit $ac_status); } &&
12234          { ac_try='test -s conftest.$ac_objext'
12235   { (eval echo "$as_me:12235: \"$ac_try\"") >&5
12236   (eval $ac_try) 2>&5
12237   ac_status=$?
12238   echo "$as_me:12238: \$? = $ac_status" >&5
12239   (exit $ac_status); }; }; then
12240   cf_cv_gcc_inline=yes
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 cat conftest.$ac_ext >&5
12244 cf_cv_gcc_inline=no
12245 fi
12246 rm -f conftest.$ac_objext conftest.$ac_ext
12247       CFLAGS=$cf_save_CFLAGS
12248
12249 fi
12250 echo "$as_me:12250: result: $cf_cv_gcc_inline" >&5
12251 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12252     if test "$cf_cv_gcc_inline" = yes ; then
12253
12254 cf_fix_cppflags=no
12255 cf_new_cflags=
12256 cf_new_cppflags=
12257 cf_new_extra_cppflags=
12258
12259 for cf_add_cflags in --param max-inline-insns-single=1200
12260 do
12261 case $cf_fix_cppflags in
12262 no)
12263         case $cf_add_cflags in #(vi
12264         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12265                 case $cf_add_cflags in
12266                 -D*)
12267                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12268
12269                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12270                         && test -z "${cf_tst_cflags}" \
12271                         && cf_fix_cppflags=yes
12272
12273                         if test $cf_fix_cppflags = yes ; then
12274                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12275                                 continue
12276                         elif test "${cf_tst_cflags}" = "\"'" ; then
12277                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12278                                 continue
12279                         fi
12280                         ;;
12281                 esac
12282                 case "$CPPFLAGS" in
12283                 *$cf_add_cflags) #(vi
12284                         ;;
12285                 *) #(vi
12286                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12287                         ;;
12288                 esac
12289                 ;;
12290         *)
12291                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12292                 ;;
12293         esac
12294         ;;
12295 yes)
12296         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12297
12298         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12299
12300         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12301         && test -z "${cf_tst_cflags}" \
12302         && cf_fix_cppflags=no
12303         ;;
12304 esac
12305 done
12306
12307 if test -n "$cf_new_cflags" ; then
12308
12309         CFLAGS="$CFLAGS $cf_new_cflags"
12310 fi
12311
12312 if test -n "$cf_new_cppflags" ; then
12313
12314         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12315 fi
12316
12317 if test -n "$cf_new_extra_cppflags" ; then
12318
12319         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12320 fi
12321
12322     fi
12323   fi
12324 fi
12325
12326 echo "$as_me:12326: checking for signal global datatype" >&5
12327 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12328 if test "${cf_cv_sig_atomic_t+set}" = set; then
12329   echo $ECHO_N "(cached) $ECHO_C" >&6
12330 else
12331
12332         for cf_type in \
12333                 "volatile sig_atomic_t" \
12334                 "sig_atomic_t" \
12335                 "int"
12336         do
12337         cat >conftest.$ac_ext <<_ACEOF
12338 #line 12338 "configure"
12339 #include "confdefs.h"
12340
12341 #include <sys/types.h>
12342 #include <signal.h>
12343 #include <stdio.h>
12344
12345 extern $cf_type x;
12346 $cf_type x;
12347 static void handler(int sig)
12348 {
12349         x = 5;
12350 }
12351 int
12352 main ()
12353 {
12354 signal(SIGINT, handler);
12355                  x = 1
12356   ;
12357   return 0;
12358 }
12359 _ACEOF
12360 rm -f conftest.$ac_objext
12361 if { (eval echo "$as_me:12361: \"$ac_compile\"") >&5
12362   (eval $ac_compile) 2>&5
12363   ac_status=$?
12364   echo "$as_me:12364: \$? = $ac_status" >&5
12365   (exit $ac_status); } &&
12366          { ac_try='test -s conftest.$ac_objext'
12367   { (eval echo "$as_me:12367: \"$ac_try\"") >&5
12368   (eval $ac_try) 2>&5
12369   ac_status=$?
12370   echo "$as_me:12370: \$? = $ac_status" >&5
12371   (exit $ac_status); }; }; then
12372   cf_cv_sig_atomic_t=$cf_type
12373 else
12374   echo "$as_me: failed program was:" >&5
12375 cat conftest.$ac_ext >&5
12376 cf_cv_sig_atomic_t=no
12377 fi
12378 rm -f conftest.$ac_objext conftest.$ac_ext
12379                 test "$cf_cv_sig_atomic_t" != no && break
12380         done
12381
12382 fi
12383
12384 echo "$as_me:12384: result: $cf_cv_sig_atomic_t" >&5
12385 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12386 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12387 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12388 EOF
12389
12390 if test $NCURSES_CHTYPE = auto ; then
12391
12392 echo "$as_me:12392: checking for type of chtype" >&5
12393 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12394 if test "${cf_cv_typeof_chtype+set}" = set; then
12395   echo $ECHO_N "(cached) $ECHO_C" >&6
12396 else
12397
12398                 if test "$cross_compiling" = yes; then
12399   cf_cv_typeof_chtype=long
12400 else
12401   cat >conftest.$ac_ext <<_ACEOF
12402 #line 12402 "configure"
12403 #include "confdefs.h"
12404
12405 #define WANT_BITS 31
12406 #include <stdio.h>
12407 int main()
12408 {
12409         FILE *fp = fopen("cf_test.out", "w");
12410         if (fp != 0) {
12411                 char *result = "long";
12412                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12413                         int n;
12414                         unsigned int x, y;
12415                         for (n = 0; n < WANT_BITS; n++) {
12416                                 x = (1 << n);
12417                                 y = (x >> n);
12418                                 if (y != 1 || x == 0) {
12419                                         x = 0;
12420                                         break;
12421                                 }
12422                         }
12423                         /*
12424                          * If x is nonzero, an int is big enough for the bits
12425                          * that we want.
12426                          */
12427                         result = (x != 0) ? "int" : "long";
12428                 }
12429                 fputs(result, fp);
12430                 fclose(fp);
12431         }
12432         ${cf_cv_main_return:-return}(0);
12433 }
12434
12435 _ACEOF
12436 rm -f conftest$ac_exeext
12437 if { (eval echo "$as_me:12437: \"$ac_link\"") >&5
12438   (eval $ac_link) 2>&5
12439   ac_status=$?
12440   echo "$as_me:12440: \$? = $ac_status" >&5
12441   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12442   { (eval echo "$as_me:12442: \"$ac_try\"") >&5
12443   (eval $ac_try) 2>&5
12444   ac_status=$?
12445   echo "$as_me:12445: \$? = $ac_status" >&5
12446   (exit $ac_status); }; }; then
12447   cf_cv_typeof_chtype=`cat cf_test.out`
12448 else
12449   echo "$as_me: program exited with status $ac_status" >&5
12450 echo "$as_me: failed program was:" >&5
12451 cat conftest.$ac_ext >&5
12452 cf_cv_typeof_chtype=long
12453 fi
12454 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12455 fi
12456                 rm -f cf_test.out
12457
12458 fi
12459
12460 echo "$as_me:12460: result: $cf_cv_typeof_chtype" >&5
12461 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12462
12463 cat >>confdefs.h <<EOF
12464 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12465 EOF
12466
12467 else
12468         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12469 fi
12470 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12471
12472 echo "$as_me:12472: checking if unsigned literals are legal" >&5
12473 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12474 if test "${cf_cv_unsigned_literals+set}" = set; then
12475   echo $ECHO_N "(cached) $ECHO_C" >&6
12476 else
12477
12478         cat >conftest.$ac_ext <<_ACEOF
12479 #line 12479 "configure"
12480 #include "confdefs.h"
12481
12482 int
12483 main ()
12484 {
12485 long x = 1L + 1UL + 1U + 1
12486   ;
12487   return 0;
12488 }
12489 _ACEOF
12490 rm -f conftest.$ac_objext
12491 if { (eval echo "$as_me:12491: \"$ac_compile\"") >&5
12492   (eval $ac_compile) 2>&5
12493   ac_status=$?
12494   echo "$as_me:12494: \$? = $ac_status" >&5
12495   (exit $ac_status); } &&
12496          { ac_try='test -s conftest.$ac_objext'
12497   { (eval echo "$as_me:12497: \"$ac_try\"") >&5
12498   (eval $ac_try) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit $ac_status); }; }; then
12502   cf_cv_unsigned_literals=yes
12503 else
12504   echo "$as_me: failed program was:" >&5
12505 cat conftest.$ac_ext >&5
12506 cf_cv_unsigned_literals=no
12507 fi
12508 rm -f conftest.$ac_objext conftest.$ac_ext
12509
12510 fi
12511
12512 echo "$as_me:12512: result: $cf_cv_unsigned_literals" >&5
12513 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12514
12515 cf_cv_1UL="1"
12516 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12517 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12518
12519 if test $NCURSES_MMASK_T = auto ; then
12520         cf_cv_typeof_mmask_t=long
12521 else
12522         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12523 fi
12524 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12525
12526 ###     Checks for external-data
12527
12528 echo "$as_me:12528: checking if external errno is declared" >&5
12529 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12530 if test "${cf_cv_dcl_errno+set}" = set; then
12531   echo $ECHO_N "(cached) $ECHO_C" >&6
12532 else
12533
12534     cat >conftest.$ac_ext <<_ACEOF
12535 #line 12535 "configure"
12536 #include "confdefs.h"
12537
12538 #ifdef HAVE_STDLIB_H
12539 #include <stdlib.h>
12540 #endif
12541 #include <stdio.h>
12542 #include <sys/types.h>
12543 #include <errno.h>
12544 int
12545 main ()
12546 {
12547 int x = (int) errno
12548   ;
12549   return 0;
12550 }
12551 _ACEOF
12552 rm -f conftest.$ac_objext
12553 if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
12554   (eval $ac_compile) 2>&5
12555   ac_status=$?
12556   echo "$as_me:12556: \$? = $ac_status" >&5
12557   (exit $ac_status); } &&
12558          { ac_try='test -s conftest.$ac_objext'
12559   { (eval echo "$as_me:12559: \"$ac_try\"") >&5
12560   (eval $ac_try) 2>&5
12561   ac_status=$?
12562   echo "$as_me:12562: \$? = $ac_status" >&5
12563   (exit $ac_status); }; }; then
12564   cf_cv_dcl_errno=yes
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 cat conftest.$ac_ext >&5
12568 cf_cv_dcl_errno=no
12569 fi
12570 rm -f conftest.$ac_objext conftest.$ac_ext
12571
12572 fi
12573 echo "$as_me:12573: result: $cf_cv_dcl_errno" >&5
12574 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12575
12576 if test "$cf_cv_dcl_errno" = no ; then
12577
12578 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12579
12580     cat >>confdefs.h <<EOF
12581 #define $cf_result 1
12582 EOF
12583
12584 fi
12585
12586 # It's possible (for near-UNIX clones) that the data doesn't exist
12587
12588 echo "$as_me:12588: checking if external errno exists" >&5
12589 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12590 if test "${cf_cv_have_errno+set}" = set; then
12591   echo $ECHO_N "(cached) $ECHO_C" >&6
12592 else
12593
12594     cat >conftest.$ac_ext <<_ACEOF
12595 #line 12595 "configure"
12596 #include "confdefs.h"
12597
12598 #undef errno
12599 extern int errno;
12600
12601 int
12602 main ()
12603 {
12604 errno = 2
12605   ;
12606   return 0;
12607 }
12608 _ACEOF
12609 rm -f conftest.$ac_objext conftest$ac_exeext
12610 if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
12611   (eval $ac_link) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit $ac_status); } &&
12615          { ac_try='test -s conftest$ac_exeext'
12616   { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617   (eval $ac_try) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); }; }; then
12621   cf_cv_have_errno=yes
12622 else
12623   echo "$as_me: failed program was:" >&5
12624 cat conftest.$ac_ext >&5
12625 cf_cv_have_errno=no
12626 fi
12627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12628
12629 fi
12630 echo "$as_me:12630: result: $cf_cv_have_errno" >&5
12631 echo "${ECHO_T}$cf_cv_have_errno" >&6
12632
12633 if test "$cf_cv_have_errno" = yes ; then
12634
12635 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12636
12637     cat >>confdefs.h <<EOF
12638 #define $cf_result 1
12639 EOF
12640
12641 fi
12642
12643 echo "$as_me:12643: checking if data-only library module links" >&5
12644 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12645 if test "${cf_cv_link_dataonly+set}" = set; then
12646   echo $ECHO_N "(cached) $ECHO_C" >&6
12647 else
12648
12649         rm -f conftest.a
12650         cat >conftest.$ac_ext <<EOF
12651 #line 12651 "configure"
12652 int     testdata[3] = { 123, 456, 789 };
12653 EOF
12654         if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
12655   (eval $ac_compile) 2>&5
12656   ac_status=$?
12657   echo "$as_me:12657: \$? = $ac_status" >&5
12658   (exit $ac_status); } ; then
12659                 mv conftest.o data.o && \
12660                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12661         fi
12662         rm -f conftest.$ac_ext data.o
12663         cat >conftest.$ac_ext <<EOF
12664 #line 12664 "configure"
12665 int     testfunc()
12666 {
12667 #if defined(NeXT)
12668         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12669 #else
12670         extern int testdata[3];
12671         return testdata[0] == 123
12672            &&  testdata[1] == 456
12673            &&  testdata[2] == 789;
12674 #endif
12675 }
12676 EOF
12677         if { (eval echo "$as_me:12677: \"$ac_compile\"") >&5
12678   (eval $ac_compile) 2>&5
12679   ac_status=$?
12680   echo "$as_me:12680: \$? = $ac_status" >&5
12681   (exit $ac_status); }; then
12682                 mv conftest.o func.o && \
12683                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12684         fi
12685         rm -f conftest.$ac_ext func.o
12686         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12687         cf_saveLIBS="$LIBS"
12688         LIBS="conftest.a $LIBS"
12689         if test "$cross_compiling" = yes; then
12690   cf_cv_link_dataonly=unknown
12691 else
12692   cat >conftest.$ac_ext <<_ACEOF
12693 #line 12693 "configure"
12694 #include "confdefs.h"
12695
12696         int main()
12697         {
12698                 extern int testfunc();
12699                 ${cf_cv_main_return:-return} (!testfunc());
12700         }
12701
12702 _ACEOF
12703 rm -f conftest$ac_exeext
12704 if { (eval echo "$as_me:12704: \"$ac_link\"") >&5
12705   (eval $ac_link) 2>&5
12706   ac_status=$?
12707   echo "$as_me:12707: \$? = $ac_status" >&5
12708   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12709   { (eval echo "$as_me:12709: \"$ac_try\"") >&5
12710   (eval $ac_try) 2>&5
12711   ac_status=$?
12712   echo "$as_me:12712: \$? = $ac_status" >&5
12713   (exit $ac_status); }; }; then
12714   cf_cv_link_dataonly=yes
12715 else
12716   echo "$as_me: program exited with status $ac_status" >&5
12717 echo "$as_me: failed program was:" >&5
12718 cat conftest.$ac_ext >&5
12719 cf_cv_link_dataonly=no
12720 fi
12721 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12722 fi
12723         LIBS="$cf_saveLIBS"
12724
12725 fi
12726
12727 echo "$as_me:12727: result: $cf_cv_link_dataonly" >&5
12728 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12729
12730 if test "$cf_cv_link_dataonly" = no ; then
12731         cat >>confdefs.h <<\EOF
12732 #define BROKEN_LINKER 1
12733 EOF
12734
12735         BROKEN_LINKER=1
12736 fi
12737
12738 ###     Checks for library functions.
12739
12740 for ac_func in \
12741 getcwd \
12742 getegid \
12743 geteuid \
12744 getttynam \
12745 issetugid \
12746 poll \
12747 remove \
12748 select \
12749 setbuf \
12750 setbuffer \
12751 setvbuf \
12752 sigaction \
12753 sigvec \
12754 strdup \
12755 strstr \
12756 tcgetpgrp \
12757 times \
12758 vsnprintf \
12759
12760 do
12761 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12762 echo "$as_me:12762: checking for $ac_func" >&5
12763 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12764 if eval "test \"\${$as_ac_var+set}\" = set"; then
12765   echo $ECHO_N "(cached) $ECHO_C" >&6
12766 else
12767   cat >conftest.$ac_ext <<_ACEOF
12768 #line 12768 "configure"
12769 #include "confdefs.h"
12770 /* System header to define __stub macros and hopefully few prototypes,
12771     which can conflict with char $ac_func (); below.  */
12772 #include <assert.h>
12773 /* Override any gcc2 internal prototype to avoid an error.  */
12774 #ifdef __cplusplus
12775 extern "C"
12776 #endif
12777 /* We use char because int might match the return type of a gcc2
12778    builtin and then its argument prototype would still apply.  */
12779 char $ac_func ();
12780 char (*f) ();
12781
12782 int
12783 main ()
12784 {
12785 /* The GNU C library defines this for functions which it implements
12786     to always fail with ENOSYS.  Some functions are actually named
12787     something starting with __ and the normal name is an alias.  */
12788 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12789 choke me
12790 #else
12791 f = $ac_func;
12792 #endif
12793
12794   ;
12795   return 0;
12796 }
12797 _ACEOF
12798 rm -f conftest.$ac_objext conftest$ac_exeext
12799 if { (eval echo "$as_me:12799: \"$ac_link\"") >&5
12800   (eval $ac_link) 2>&5
12801   ac_status=$?
12802   echo "$as_me:12802: \$? = $ac_status" >&5
12803   (exit $ac_status); } &&
12804          { ac_try='test -s conftest$ac_exeext'
12805   { (eval echo "$as_me:12805: \"$ac_try\"") >&5
12806   (eval $ac_try) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit $ac_status); }; }; then
12810   eval "$as_ac_var=yes"
12811 else
12812   echo "$as_me: failed program was:" >&5
12813 cat conftest.$ac_ext >&5
12814 eval "$as_ac_var=no"
12815 fi
12816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12817 fi
12818 echo "$as_me:12818: result: `eval echo '${'$as_ac_var'}'`" >&5
12819 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12820 if test `eval echo '${'$as_ac_var'}'` = yes; then
12821   cat >>confdefs.h <<EOF
12822 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12823 EOF
12824
12825 fi
12826 done
12827
12828 if test "$with_getcap" = "yes" ; then
12829
12830 echo "$as_me:12830: checking for terminal-capability database functions" >&5
12831 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12832 if test "${cf_cv_cgetent+set}" = set; then
12833   echo $ECHO_N "(cached) $ECHO_C" >&6
12834 else
12835
12836 cat >conftest.$ac_ext <<_ACEOF
12837 #line 12837 "configure"
12838 #include "confdefs.h"
12839
12840 #include <stdlib.h>
12841 int
12842 main ()
12843 {
12844
12845         char temp[128];
12846         char *buf = temp;
12847         char *db_array = temp;
12848         cgetent(&buf, /* int *, */ &db_array, "vt100");
12849         cgetcap(buf, "tc", '=');
12850         cgetmatch(buf, "tc");
12851
12852   ;
12853   return 0;
12854 }
12855 _ACEOF
12856 rm -f conftest.$ac_objext conftest$ac_exeext
12857 if { (eval echo "$as_me:12857: \"$ac_link\"") >&5
12858   (eval $ac_link) 2>&5
12859   ac_status=$?
12860   echo "$as_me:12860: \$? = $ac_status" >&5
12861   (exit $ac_status); } &&
12862          { ac_try='test -s conftest$ac_exeext'
12863   { (eval echo "$as_me:12863: \"$ac_try\"") >&5
12864   (eval $ac_try) 2>&5
12865   ac_status=$?
12866   echo "$as_me:12866: \$? = $ac_status" >&5
12867   (exit $ac_status); }; }; then
12868   cf_cv_cgetent=yes
12869 else
12870   echo "$as_me: failed program was:" >&5
12871 cat conftest.$ac_ext >&5
12872 cf_cv_cgetent=no
12873 fi
12874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12875
12876 fi
12877
12878 echo "$as_me:12878: result: $cf_cv_cgetent" >&5
12879 echo "${ECHO_T}$cf_cv_cgetent" >&6
12880 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12881 #define HAVE_BSD_CGETENT 1
12882 EOF
12883
12884 fi
12885
12886 echo "$as_me:12886: checking for isascii" >&5
12887 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12888 if test "${cf_cv_have_isascii+set}" = set; then
12889   echo $ECHO_N "(cached) $ECHO_C" >&6
12890 else
12891
12892         cat >conftest.$ac_ext <<_ACEOF
12893 #line 12893 "configure"
12894 #include "confdefs.h"
12895 #include <ctype.h>
12896 int
12897 main ()
12898 {
12899 int x = isascii(' ')
12900   ;
12901   return 0;
12902 }
12903 _ACEOF
12904 rm -f conftest.$ac_objext conftest$ac_exeext
12905 if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
12906   (eval $ac_link) 2>&5
12907   ac_status=$?
12908   echo "$as_me:12908: \$? = $ac_status" >&5
12909   (exit $ac_status); } &&
12910          { ac_try='test -s conftest$ac_exeext'
12911   { (eval echo "$as_me:12911: \"$ac_try\"") >&5
12912   (eval $ac_try) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); }; }; then
12916   cf_cv_have_isascii=yes
12917 else
12918   echo "$as_me: failed program was:" >&5
12919 cat conftest.$ac_ext >&5
12920 cf_cv_have_isascii=no
12921 fi
12922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12923
12924 fi
12925 echo "$as_me:12925: result: $cf_cv_have_isascii" >&5
12926 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12927 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12928 #define HAVE_ISASCII 1
12929 EOF
12930
12931 if test "$ac_cv_func_sigaction" = yes; then
12932 echo "$as_me:12932: checking whether sigaction needs _POSIX_SOURCE" >&5
12933 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12934 cat >conftest.$ac_ext <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12937
12938 #include <sys/types.h>
12939 #include <signal.h>
12940 int
12941 main ()
12942 {
12943 struct sigaction act
12944   ;
12945   return 0;
12946 }
12947 _ACEOF
12948 rm -f conftest.$ac_objext
12949 if { (eval echo "$as_me:12949: \"$ac_compile\"") >&5
12950   (eval $ac_compile) 2>&5
12951   ac_status=$?
12952   echo "$as_me:12952: \$? = $ac_status" >&5
12953   (exit $ac_status); } &&
12954          { ac_try='test -s conftest.$ac_objext'
12955   { (eval echo "$as_me:12955: \"$ac_try\"") >&5
12956   (eval $ac_try) 2>&5
12957   ac_status=$?
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit $ac_status); }; }; then
12960   sigact_bad=no
12961 else
12962   echo "$as_me: failed program was:" >&5
12963 cat conftest.$ac_ext >&5
12964
12965 cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968
12969 #define _POSIX_SOURCE
12970 #include <sys/types.h>
12971 #include <signal.h>
12972 int
12973 main ()
12974 {
12975 struct sigaction act
12976   ;
12977   return 0;
12978 }
12979 _ACEOF
12980 rm -f conftest.$ac_objext
12981 if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
12982   (eval $ac_compile) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); } &&
12986          { ac_try='test -s conftest.$ac_objext'
12987   { (eval echo "$as_me:12987: \"$ac_try\"") >&5
12988   (eval $ac_try) 2>&5
12989   ac_status=$?
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit $ac_status); }; }; then
12992   sigact_bad=yes
12993          cat >>confdefs.h <<\EOF
12994 #define SVR4_ACTION 1
12995 EOF
12996
12997 else
12998   echo "$as_me: failed program was:" >&5
12999 cat conftest.$ac_ext >&5
13000 sigact_bad=unknown
13001 fi
13002 rm -f conftest.$ac_objext conftest.$ac_ext
13003 fi
13004 rm -f conftest.$ac_objext conftest.$ac_ext
13005 echo "$as_me:13005: result: $sigact_bad" >&5
13006 echo "${ECHO_T}$sigact_bad" >&6
13007 fi
13008
13009 echo "$as_me:13009: checking if nanosleep really works" >&5
13010 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13011 if test "${cf_cv_func_nanosleep+set}" = set; then
13012   echo $ECHO_N "(cached) $ECHO_C" >&6
13013 else
13014
13015 if test "$cross_compiling" = yes; then
13016   cf_cv_func_nanosleep=unknown
13017 else
13018   cat >conftest.$ac_ext <<_ACEOF
13019 #line 13019 "configure"
13020 #include "confdefs.h"
13021
13022 #include <stdio.h>
13023 #include <errno.h>
13024 #include <time.h>
13025
13026 #ifdef HAVE_SYS_TIME_H
13027 #include <sys/time.h>
13028 #endif
13029
13030 int main() {
13031         struct timespec ts1, ts2;
13032         int code;
13033         ts1.tv_sec  = 0;
13034         ts1.tv_nsec = 750000000;
13035         ts2.tv_sec  = 0;
13036         ts2.tv_nsec = 0;
13037         errno = 0;
13038         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13039         ${cf_cv_main_return:-return}(code != 0);
13040 }
13041
13042 _ACEOF
13043 rm -f conftest$ac_exeext
13044 if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
13045   (eval $ac_link) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13049   { (eval echo "$as_me:13049: \"$ac_try\"") >&5
13050   (eval $ac_try) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit $ac_status); }; }; then
13054   cf_cv_func_nanosleep=yes
13055 else
13056   echo "$as_me: program exited with status $ac_status" >&5
13057 echo "$as_me: failed program was:" >&5
13058 cat conftest.$ac_ext >&5
13059 cf_cv_func_nanosleep=no
13060 fi
13061 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13062 fi
13063 fi
13064 echo "$as_me:13064: result: $cf_cv_func_nanosleep" >&5
13065 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13066
13067 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13068 #define HAVE_NANOSLEEP 1
13069 EOF
13070
13071 for ac_header in \
13072 termio.h \
13073 termios.h \
13074 unistd.h \
13075
13076 do
13077 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13078 echo "$as_me:13078: checking for $ac_header" >&5
13079 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13080 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13081   echo $ECHO_N "(cached) $ECHO_C" >&6
13082 else
13083   cat >conftest.$ac_ext <<_ACEOF
13084 #line 13084 "configure"
13085 #include "confdefs.h"
13086 #include <$ac_header>
13087 _ACEOF
13088 if { (eval echo "$as_me:13088: \"$ac_cpp conftest.$ac_ext\"") >&5
13089   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13090   ac_status=$?
13091   egrep -v '^ *\+' conftest.er1 >conftest.err
13092   rm -f conftest.er1
13093   cat conftest.err >&5
13094   echo "$as_me:13094: \$? = $ac_status" >&5
13095   (exit $ac_status); } >/dev/null; then
13096   if test -s conftest.err; then
13097     ac_cpp_err=$ac_c_preproc_warn_flag
13098   else
13099     ac_cpp_err=
13100   fi
13101 else
13102   ac_cpp_err=yes
13103 fi
13104 if test -z "$ac_cpp_err"; then
13105   eval "$as_ac_Header=yes"
13106 else
13107   echo "$as_me: failed program was:" >&5
13108   cat conftest.$ac_ext >&5
13109   eval "$as_ac_Header=no"
13110 fi
13111 rm -f conftest.err conftest.$ac_ext
13112 fi
13113 echo "$as_me:13113: result: `eval echo '${'$as_ac_Header'}'`" >&5
13114 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13115 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13116   cat >>confdefs.h <<EOF
13117 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13118 EOF
13119
13120 fi
13121 done
13122
13123 if test "$ISC" = yes ; then
13124
13125 for ac_header in sys/termio.h
13126 do
13127 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13128 echo "$as_me:13128: checking for $ac_header" >&5
13129 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13130 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13131   echo $ECHO_N "(cached) $ECHO_C" >&6
13132 else
13133   cat >conftest.$ac_ext <<_ACEOF
13134 #line 13134 "configure"
13135 #include "confdefs.h"
13136 #include <$ac_header>
13137 _ACEOF
13138 if { (eval echo "$as_me:13138: \"$ac_cpp conftest.$ac_ext\"") >&5
13139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13140   ac_status=$?
13141   egrep -v '^ *\+' conftest.er1 >conftest.err
13142   rm -f conftest.er1
13143   cat conftest.err >&5
13144   echo "$as_me:13144: \$? = $ac_status" >&5
13145   (exit $ac_status); } >/dev/null; then
13146   if test -s conftest.err; then
13147     ac_cpp_err=$ac_c_preproc_warn_flag
13148   else
13149     ac_cpp_err=
13150   fi
13151 else
13152   ac_cpp_err=yes
13153 fi
13154 if test -z "$ac_cpp_err"; then
13155   eval "$as_ac_Header=yes"
13156 else
13157   echo "$as_me: failed program was:" >&5
13158   cat conftest.$ac_ext >&5
13159   eval "$as_ac_Header=no"
13160 fi
13161 rm -f conftest.err conftest.$ac_ext
13162 fi
13163 echo "$as_me:13163: result: `eval echo '${'$as_ac_Header'}'`" >&5
13164 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13165 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13166   cat >>confdefs.h <<EOF
13167 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13168 EOF
13169
13170 fi
13171 done
13172
13173 fi
13174 if test "$ac_cv_header_termios_h" = yes ; then
13175         case "$CFLAGS $CPPFLAGS" in
13176         *-D_POSIX_SOURCE*)
13177                 termios_bad=dunno ;;
13178         *)      termios_bad=maybe ;;
13179         esac
13180         if test "$termios_bad" = maybe ; then
13181         echo "$as_me:13181: checking whether termios.h needs _POSIX_SOURCE" >&5
13182 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13183         cat >conftest.$ac_ext <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13186 #include <termios.h>
13187 int
13188 main ()
13189 {
13190 struct termios foo; int x = foo.c_iflag
13191   ;
13192   return 0;
13193 }
13194 _ACEOF
13195 rm -f conftest.$ac_objext
13196 if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13197   (eval $ac_compile) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit $ac_status); } &&
13201          { ac_try='test -s conftest.$ac_objext'
13202   { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13203   (eval $ac_try) 2>&5
13204   ac_status=$?
13205   echo "$as_me:13205: \$? = $ac_status" >&5
13206   (exit $ac_status); }; }; then
13207   termios_bad=no
13208 else
13209   echo "$as_me: failed program was:" >&5
13210 cat conftest.$ac_ext >&5
13211
13212                 cat >conftest.$ac_ext <<_ACEOF
13213 #line 13213 "configure"
13214 #include "confdefs.h"
13215
13216 #define _POSIX_SOURCE
13217 #include <termios.h>
13218 int
13219 main ()
13220 {
13221 struct termios foo; int x = foo.c_iflag
13222   ;
13223   return 0;
13224 }
13225 _ACEOF
13226 rm -f conftest.$ac_objext
13227 if { (eval echo "$as_me:13227: \"$ac_compile\"") >&5
13228   (eval $ac_compile) 2>&5
13229   ac_status=$?
13230   echo "$as_me:13230: \$? = $ac_status" >&5
13231   (exit $ac_status); } &&
13232          { ac_try='test -s conftest.$ac_objext'
13233   { (eval echo "$as_me:13233: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:13236: \$? = $ac_status" >&5
13237   (exit $ac_status); }; }; then
13238   termios_bad=unknown
13239 else
13240   echo "$as_me: failed program was:" >&5
13241 cat conftest.$ac_ext >&5
13242 termios_bad=yes cat >>confdefs.h <<\EOF
13243 #define SVR4_TERMIO 1
13244 EOF
13245
13246 fi
13247 rm -f conftest.$ac_objext conftest.$ac_ext
13248
13249 fi
13250 rm -f conftest.$ac_objext conftest.$ac_ext
13251         echo "$as_me:13251: result: $termios_bad" >&5
13252 echo "${ECHO_T}$termios_bad" >&6
13253         fi
13254 fi
13255
13256 echo "$as_me:13256: checking for tcgetattr" >&5
13257 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13258 if test "${cf_cv_have_tcgetattr+set}" = set; then
13259   echo $ECHO_N "(cached) $ECHO_C" >&6
13260 else
13261
13262 cat >conftest.$ac_ext <<_ACEOF
13263 #line 13263 "configure"
13264 #include "confdefs.h"
13265
13266 #include <sys/types.h>
13267 #ifdef HAVE_UNISTD_H
13268 #include <unistd.h>
13269 #endif
13270 #ifdef HAVE_TERMIOS_H
13271 #include <termios.h>
13272 #define TTY struct termios
13273 #else
13274 #ifdef HAVE_TERMIO_H
13275 #include <termio.h>
13276 #define TTY struct termio
13277 #endif
13278 #endif
13279
13280 int
13281 main ()
13282 {
13283
13284 TTY foo;
13285 tcgetattr(1, &foo);
13286   ;
13287   return 0;
13288 }
13289 _ACEOF
13290 rm -f conftest.$ac_objext conftest$ac_exeext
13291 if { (eval echo "$as_me:13291: \"$ac_link\"") >&5
13292   (eval $ac_link) 2>&5
13293   ac_status=$?
13294   echo "$as_me:13294: \$? = $ac_status" >&5
13295   (exit $ac_status); } &&
13296          { ac_try='test -s conftest$ac_exeext'
13297   { (eval echo "$as_me:13297: \"$ac_try\"") >&5
13298   (eval $ac_try) 2>&5
13299   ac_status=$?
13300   echo "$as_me:13300: \$? = $ac_status" >&5
13301   (exit $ac_status); }; }; then
13302   cf_cv_have_tcgetattr=yes
13303 else
13304   echo "$as_me: failed program was:" >&5
13305 cat conftest.$ac_ext >&5
13306 cf_cv_have_tcgetattr=no
13307 fi
13308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13309 fi
13310 echo "$as_me:13310: result: $cf_cv_have_tcgetattr" >&5
13311 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13312 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13313 #define HAVE_TCGETATTR 1
13314 EOF
13315
13316 echo "$as_me:13316: checking for vsscanf function or workaround" >&5
13317 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13318 if test "${cf_cv_func_vsscanf+set}" = set; then
13319   echo $ECHO_N "(cached) $ECHO_C" >&6
13320 else
13321
13322 cat >conftest.$ac_ext <<_ACEOF
13323 #line 13323 "configure"
13324 #include "confdefs.h"
13325
13326 #include <stdarg.h>
13327 #include <stdio.h>
13328 int
13329 main ()
13330 {
13331
13332         va_list ap;
13333         vsscanf("from", "%d", ap)
13334   ;
13335   return 0;
13336 }
13337 _ACEOF
13338 rm -f conftest.$ac_objext conftest$ac_exeext
13339 if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
13340   (eval $ac_link) 2>&5
13341   ac_status=$?
13342   echo "$as_me:13342: \$? = $ac_status" >&5
13343   (exit $ac_status); } &&
13344          { ac_try='test -s conftest$ac_exeext'
13345   { (eval echo "$as_me:13345: \"$ac_try\"") >&5
13346   (eval $ac_try) 2>&5
13347   ac_status=$?
13348   echo "$as_me:13348: \$? = $ac_status" >&5
13349   (exit $ac_status); }; }; then
13350   cf_cv_func_vsscanf=vsscanf
13351 else
13352   echo "$as_me: failed program was:" >&5
13353 cat conftest.$ac_ext >&5
13354
13355 cat >conftest.$ac_ext <<_ACEOF
13356 #line 13356 "configure"
13357 #include "confdefs.h"
13358
13359 #include <stdarg.h>
13360 #include <stdio.h>
13361 int
13362 main ()
13363 {
13364
13365     FILE strbuf;
13366     char *str = "from";
13367
13368     strbuf._flag = _IOREAD;
13369     strbuf._ptr = strbuf._base = (unsigned char *) str;
13370     strbuf._cnt = strlen(str);
13371     strbuf._file = _NFILE;
13372     return (vfscanf(&strbuf, "%d", ap))
13373   ;
13374   return 0;
13375 }
13376 _ACEOF
13377 rm -f conftest.$ac_objext conftest$ac_exeext
13378 if { (eval echo "$as_me:13378: \"$ac_link\"") >&5
13379   (eval $ac_link) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit $ac_status); } &&
13383          { ac_try='test -s conftest$ac_exeext'
13384   { (eval echo "$as_me:13384: \"$ac_try\"") >&5
13385   (eval $ac_try) 2>&5
13386   ac_status=$?
13387   echo "$as_me:13387: \$? = $ac_status" >&5
13388   (exit $ac_status); }; }; then
13389   cf_cv_func_vsscanf=vfscanf
13390 else
13391   echo "$as_me: failed program was:" >&5
13392 cat conftest.$ac_ext >&5
13393
13394 cat >conftest.$ac_ext <<_ACEOF
13395 #line 13395 "configure"
13396 #include "confdefs.h"
13397
13398 #include <stdarg.h>
13399 #include <stdio.h>
13400 int
13401 main ()
13402 {
13403
13404     FILE strbuf;
13405     char *str = "from";
13406
13407     strbuf._flag = _IOREAD;
13408     strbuf._ptr = strbuf._base = (unsigned char *) str;
13409     strbuf._cnt = strlen(str);
13410     strbuf._file = _NFILE;
13411     return (_doscan(&strbuf, "%d", ap))
13412   ;
13413   return 0;
13414 }
13415 _ACEOF
13416 rm -f conftest.$ac_objext conftest$ac_exeext
13417 if { (eval echo "$as_me:13417: \"$ac_link\"") >&5
13418   (eval $ac_link) 2>&5
13419   ac_status=$?
13420   echo "$as_me:13420: \$? = $ac_status" >&5
13421   (exit $ac_status); } &&
13422          { ac_try='test -s conftest$ac_exeext'
13423   { (eval echo "$as_me:13423: \"$ac_try\"") >&5
13424   (eval $ac_try) 2>&5
13425   ac_status=$?
13426   echo "$as_me:13426: \$? = $ac_status" >&5
13427   (exit $ac_status); }; }; then
13428   cf_cv_func_vsscanf=_doscan
13429 else
13430   echo "$as_me: failed program was:" >&5
13431 cat conftest.$ac_ext >&5
13432
13433 cf_cv_func_vsscanf=no
13434 fi
13435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13436 fi
13437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13438 fi
13439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13440 fi
13441 echo "$as_me:13441: result: $cf_cv_func_vsscanf" >&5
13442 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13443
13444 case $cf_cv_func_vsscanf in #(vi
13445 vsscanf) cat >>confdefs.h <<\EOF
13446 #define HAVE_VSSCANF 1
13447 EOF
13448 ;; #(vi
13449 vfscanf) cat >>confdefs.h <<\EOF
13450 #define HAVE_VFSCANF 1
13451 EOF
13452 ;; #(vi
13453 _doscan) cat >>confdefs.h <<\EOF
13454 #define HAVE__DOSCAN 1
13455 EOF
13456 ;;
13457 esac
13458
13459 echo "$as_me:13459: checking for working mkstemp" >&5
13460 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13461 if test "${cf_cv_func_mkstemp+set}" = set; then
13462   echo $ECHO_N "(cached) $ECHO_C" >&6
13463 else
13464
13465 rm -f conftest*
13466 if test "$cross_compiling" = yes; then
13467   echo "$as_me:13467: checking for mkstemp" >&5
13468 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13469 if test "${ac_cv_func_mkstemp+set}" = set; then
13470   echo $ECHO_N "(cached) $ECHO_C" >&6
13471 else
13472   cat >conftest.$ac_ext <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475 /* System header to define __stub macros and hopefully few prototypes,
13476     which can conflict with char mkstemp (); below.  */
13477 #include <assert.h>
13478 /* Override any gcc2 internal prototype to avoid an error.  */
13479 #ifdef __cplusplus
13480 extern "C"
13481 #endif
13482 /* We use char because int might match the return type of a gcc2
13483    builtin and then its argument prototype would still apply.  */
13484 char mkstemp ();
13485 char (*f) ();
13486
13487 int
13488 main ()
13489 {
13490 /* The GNU C library defines this for functions which it implements
13491     to always fail with ENOSYS.  Some functions are actually named
13492     something starting with __ and the normal name is an alias.  */
13493 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13494 choke me
13495 #else
13496 f = mkstemp;
13497 #endif
13498
13499   ;
13500   return 0;
13501 }
13502 _ACEOF
13503 rm -f conftest.$ac_objext conftest$ac_exeext
13504 if { (eval echo "$as_me:13504: \"$ac_link\"") >&5
13505   (eval $ac_link) 2>&5
13506   ac_status=$?
13507   echo "$as_me:13507: \$? = $ac_status" >&5
13508   (exit $ac_status); } &&
13509          { ac_try='test -s conftest$ac_exeext'
13510   { (eval echo "$as_me:13510: \"$ac_try\"") >&5
13511   (eval $ac_try) 2>&5
13512   ac_status=$?
13513   echo "$as_me:13513: \$? = $ac_status" >&5
13514   (exit $ac_status); }; }; then
13515   ac_cv_func_mkstemp=yes
13516 else
13517   echo "$as_me: failed program was:" >&5
13518 cat conftest.$ac_ext >&5
13519 ac_cv_func_mkstemp=no
13520 fi
13521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13522 fi
13523 echo "$as_me:13523: result: $ac_cv_func_mkstemp" >&5
13524 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13525
13526 else
13527   cat >conftest.$ac_ext <<_ACEOF
13528 #line 13528 "configure"
13529 #include "confdefs.h"
13530
13531 #include <sys/types.h>
13532 #include <stdlib.h>
13533 #include <stdio.h>
13534 #include <string.h>
13535 #include <sys/stat.h>
13536 int main()
13537 {
13538         char *tmpl = "conftestXXXXXX";
13539         char name[2][80];
13540         int n;
13541         int result = 0;
13542         int fd;
13543         struct stat sb;
13544
13545         umask(077);
13546         for (n = 0; n < 2; ++n) {
13547                 strcpy(name[n], tmpl);
13548                 if ((fd = mkstemp(name[n])) >= 0) {
13549                         if (!strcmp(name[n], tmpl)
13550                          || stat(name[n], &sb) != 0
13551                          || (sb.st_mode & S_IFMT) != S_IFREG
13552                          || (sb.st_mode & 077) != 0) {
13553                                 result = 1;
13554                         }
13555                         close(fd);
13556                 }
13557         }
13558         if (result == 0
13559          && !strcmp(name[0], name[1]))
13560                 result = 1;
13561         ${cf_cv_main_return:-return}(result);
13562 }
13563
13564 _ACEOF
13565 rm -f conftest$ac_exeext
13566 if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
13567   (eval $ac_link) 2>&5
13568   ac_status=$?
13569   echo "$as_me:13569: \$? = $ac_status" >&5
13570   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13571   { (eval echo "$as_me:13571: \"$ac_try\"") >&5
13572   (eval $ac_try) 2>&5
13573   ac_status=$?
13574   echo "$as_me:13574: \$? = $ac_status" >&5
13575   (exit $ac_status); }; }; then
13576   cf_cv_func_mkstemp=yes
13577
13578 else
13579   echo "$as_me: program exited with status $ac_status" >&5
13580 echo "$as_me: failed program was:" >&5
13581 cat conftest.$ac_ext >&5
13582 cf_cv_func_mkstemp=no
13583
13584 fi
13585 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13586 fi
13587
13588 fi
13589 echo "$as_me:13589: result: $cf_cv_func_mkstemp" >&5
13590 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13591 if test "$cf_cv_func_mkstemp" = yes ; then
13592         cat >>confdefs.h <<\EOF
13593 #define HAVE_MKSTEMP 1
13594 EOF
13595
13596 fi
13597
13598 # setup for prototype of fallback for vsscanf()
13599
13600 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13601         HAVE_VSSCANF=1
13602 else
13603         HAVE_VSSCANF=0
13604 fi
13605
13606 if test "$cross_compiling" = yes ; then
13607         { echo "$as_me:13607: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13608 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13609 else
13610         echo "$as_me:13610: checking whether setvbuf arguments are reversed" >&5
13611 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13612 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13613   echo $ECHO_N "(cached) $ECHO_C" >&6
13614 else
13615   if test "$cross_compiling" = yes; then
13616   { { echo "$as_me:13616: error: cannot run test program while cross compiling" >&5
13617 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13618    { (exit 1); exit 1; }; }
13619 else
13620   cat >conftest.$ac_ext <<_ACEOF
13621 #line 13621 "configure"
13622 #include "confdefs.h"
13623 #include <stdio.h>
13624 /* If setvbuf has the reversed format, exit 0. */
13625 int
13626 main ()
13627 {
13628   /* This call has the arguments reversed.
13629      A reversed system may check and see that the address of main
13630      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13631   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13632     $ac_main_return(1);
13633   putc('\r', stdout);
13634   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13635 }
13636 _ACEOF
13637 rm -f conftest$ac_exeext
13638 if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
13639   (eval $ac_link) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   ac_cv_func_setvbuf_reversed=yes
13649 else
13650   echo "$as_me: program exited with status $ac_status" >&5
13651 echo "$as_me: failed program was:" >&5
13652 cat conftest.$ac_ext >&5
13653 ac_cv_func_setvbuf_reversed=no
13654 fi
13655 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13656 fi
13657 rm -f core core.* *.core
13658 fi
13659 echo "$as_me:13659: result: $ac_cv_func_setvbuf_reversed" >&5
13660 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13661 if test $ac_cv_func_setvbuf_reversed = yes; then
13662
13663 cat >>confdefs.h <<\EOF
13664 #define SETVBUF_REVERSED 1
13665 EOF
13666
13667 fi
13668
13669 fi
13670 echo "$as_me:13670: checking return type of signal handlers" >&5
13671 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13672 if test "${ac_cv_type_signal+set}" = set; then
13673   echo $ECHO_N "(cached) $ECHO_C" >&6
13674 else
13675   cat >conftest.$ac_ext <<_ACEOF
13676 #line 13676 "configure"
13677 #include "confdefs.h"
13678 #include <sys/types.h>
13679 #include <signal.h>
13680 #ifdef signal
13681 # undef signal
13682 #endif
13683 #ifdef __cplusplus
13684 extern "C" void (*signal (int, void (*)(int)))(int);
13685 #else
13686 void (*signal ()) ();
13687 #endif
13688
13689 int
13690 main ()
13691 {
13692 int i;
13693   ;
13694   return 0;
13695 }
13696 _ACEOF
13697 rm -f conftest.$ac_objext
13698 if { (eval echo "$as_me:13698: \"$ac_compile\"") >&5
13699   (eval $ac_compile) 2>&5
13700   ac_status=$?
13701   echo "$as_me:13701: \$? = $ac_status" >&5
13702   (exit $ac_status); } &&
13703          { ac_try='test -s conftest.$ac_objext'
13704   { (eval echo "$as_me:13704: \"$ac_try\"") >&5
13705   (eval $ac_try) 2>&5
13706   ac_status=$?
13707   echo "$as_me:13707: \$? = $ac_status" >&5
13708   (exit $ac_status); }; }; then
13709   ac_cv_type_signal=void
13710 else
13711   echo "$as_me: failed program was:" >&5
13712 cat conftest.$ac_ext >&5
13713 ac_cv_type_signal=int
13714 fi
13715 rm -f conftest.$ac_objext conftest.$ac_ext
13716 fi
13717 echo "$as_me:13717: result: $ac_cv_type_signal" >&5
13718 echo "${ECHO_T}$ac_cv_type_signal" >&6
13719
13720 cat >>confdefs.h <<EOF
13721 #define RETSIGTYPE $ac_cv_type_signal
13722 EOF
13723
13724 echo "$as_me:13724: checking for type sigaction_t" >&5
13725 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13726 if test "${cf_cv_type_sigaction+set}" = set; then
13727   echo $ECHO_N "(cached) $ECHO_C" >&6
13728 else
13729
13730         cat >conftest.$ac_ext <<_ACEOF
13731 #line 13731 "configure"
13732 #include "confdefs.h"
13733
13734 #include <signal.h>
13735 int
13736 main ()
13737 {
13738 sigaction_t x
13739   ;
13740   return 0;
13741 }
13742 _ACEOF
13743 rm -f conftest.$ac_objext
13744 if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
13745   (eval $ac_compile) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit $ac_status); } &&
13749          { ac_try='test -s conftest.$ac_objext'
13750   { (eval echo "$as_me:13750: \"$ac_try\"") >&5
13751   (eval $ac_try) 2>&5
13752   ac_status=$?
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit $ac_status); }; }; then
13755   cf_cv_type_sigaction=yes
13756 else
13757   echo "$as_me: failed program was:" >&5
13758 cat conftest.$ac_ext >&5
13759 cf_cv_type_sigaction=no
13760 fi
13761 rm -f conftest.$ac_objext conftest.$ac_ext
13762 fi
13763
13764 echo "$as_me:13764: result: $cf_cv_type_sigaction" >&5
13765 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13766 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13767 #define HAVE_TYPE_SIGACTION 1
13768 EOF
13769
13770 echo "$as_me:13770: checking declaration of size-change" >&5
13771 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13772 if test "${cf_cv_sizechange+set}" = set; then
13773   echo $ECHO_N "(cached) $ECHO_C" >&6
13774 else
13775
13776     cf_cv_sizechange=unknown
13777     cf_save_CPPFLAGS="$CPPFLAGS"
13778
13779 for cf_opts in "" "NEED_PTEM_H"
13780 do
13781
13782     CPPFLAGS="$cf_save_CPPFLAGS"
13783     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13784     cat >conftest.$ac_ext <<_ACEOF
13785 #line 13785 "configure"
13786 #include "confdefs.h"
13787 #include <sys/types.h>
13788 #ifdef HAVE_TERMIOS_H
13789 #include <termios.h>
13790 #else
13791 #ifdef HAVE_TERMIO_H
13792 #include <termio.h>
13793 #endif
13794 #endif
13795 #ifdef NEED_PTEM_H
13796 /* This is a workaround for SCO:  they neglected to define struct winsize in
13797  * termios.h -- it's only in termio.h and ptem.h
13798  */
13799 #include        <sys/stream.h>
13800 #include        <sys/ptem.h>
13801 #endif
13802 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13803 #include <sys/ioctl.h>
13804 #endif
13805
13806 int
13807 main ()
13808 {
13809
13810 #ifdef TIOCGSIZE
13811         struct ttysize win;     /* FIXME: what system is this? */
13812         int y = win.ts_lines;
13813         int x = win.ts_cols;
13814 #else
13815 #ifdef TIOCGWINSZ
13816         struct winsize win;
13817         int y = win.ws_row;
13818         int x = win.ws_col;
13819 #else
13820         no TIOCGSIZE or TIOCGWINSZ
13821 #endif /* TIOCGWINSZ */
13822 #endif /* TIOCGSIZE */
13823
13824   ;
13825   return 0;
13826 }
13827 _ACEOF
13828 rm -f conftest.$ac_objext
13829 if { (eval echo "$as_me:13829: \"$ac_compile\"") >&5
13830   (eval $ac_compile) 2>&5
13831   ac_status=$?
13832   echo "$as_me:13832: \$? = $ac_status" >&5
13833   (exit $ac_status); } &&
13834          { ac_try='test -s conftest.$ac_objext'
13835   { (eval echo "$as_me:13835: \"$ac_try\"") >&5
13836   (eval $ac_try) 2>&5
13837   ac_status=$?
13838   echo "$as_me:13838: \$? = $ac_status" >&5
13839   (exit $ac_status); }; }; then
13840   cf_cv_sizechange=yes
13841 else
13842   echo "$as_me: failed program was:" >&5
13843 cat conftest.$ac_ext >&5
13844 cf_cv_sizechange=no
13845 fi
13846 rm -f conftest.$ac_objext conftest.$ac_ext
13847
13848         CPPFLAGS="$cf_save_CPPFLAGS"
13849         if test "$cf_cv_sizechange" = yes ; then
13850                 echo "size-change succeeded ($cf_opts)" >&5
13851                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13852                 break
13853         fi
13854 done
13855
13856 fi
13857 echo "$as_me:13857: result: $cf_cv_sizechange" >&5
13858 echo "${ECHO_T}$cf_cv_sizechange" >&6
13859 if test "$cf_cv_sizechange" != no ; then
13860         cat >>confdefs.h <<\EOF
13861 #define HAVE_SIZECHANGE 1
13862 EOF
13863
13864         case $cf_cv_sizechange in #(vi
13865         NEED*)
13866                 cat >>confdefs.h <<EOF
13867 #define $cf_cv_sizechange  1
13868 EOF
13869
13870                 ;;
13871         esac
13872 fi
13873
13874 echo "$as_me:13874: checking for memmove" >&5
13875 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13876 if test "${ac_cv_func_memmove+set}" = set; then
13877   echo $ECHO_N "(cached) $ECHO_C" >&6
13878 else
13879   cat >conftest.$ac_ext <<_ACEOF
13880 #line 13880 "configure"
13881 #include "confdefs.h"
13882 /* System header to define __stub macros and hopefully few prototypes,
13883     which can conflict with char memmove (); below.  */
13884 #include <assert.h>
13885 /* Override any gcc2 internal prototype to avoid an error.  */
13886 #ifdef __cplusplus
13887 extern "C"
13888 #endif
13889 /* We use char because int might match the return type of a gcc2
13890    builtin and then its argument prototype would still apply.  */
13891 char memmove ();
13892 char (*f) ();
13893
13894 int
13895 main ()
13896 {
13897 /* The GNU C library defines this for functions which it implements
13898     to always fail with ENOSYS.  Some functions are actually named
13899     something starting with __ and the normal name is an alias.  */
13900 #if defined (__stub_memmove) || defined (__stub___memmove)
13901 choke me
13902 #else
13903 f = memmove;
13904 #endif
13905
13906   ;
13907   return 0;
13908 }
13909 _ACEOF
13910 rm -f conftest.$ac_objext conftest$ac_exeext
13911 if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
13912   (eval $ac_link) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit $ac_status); } &&
13916          { ac_try='test -s conftest$ac_exeext'
13917   { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit $ac_status); }; }; then
13922   ac_cv_func_memmove=yes
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 cat conftest.$ac_ext >&5
13926 ac_cv_func_memmove=no
13927 fi
13928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13929 fi
13930 echo "$as_me:13930: result: $ac_cv_func_memmove" >&5
13931 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13932 if test $ac_cv_func_memmove = yes; then
13933   :
13934 else
13935
13936 echo "$as_me:13936: checking for bcopy" >&5
13937 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13938 if test "${ac_cv_func_bcopy+set}" = set; then
13939   echo $ECHO_N "(cached) $ECHO_C" >&6
13940 else
13941   cat >conftest.$ac_ext <<_ACEOF
13942 #line 13942 "configure"
13943 #include "confdefs.h"
13944 /* System header to define __stub macros and hopefully few prototypes,
13945     which can conflict with char bcopy (); below.  */
13946 #include <assert.h>
13947 /* Override any gcc2 internal prototype to avoid an error.  */
13948 #ifdef __cplusplus
13949 extern "C"
13950 #endif
13951 /* We use char because int might match the return type of a gcc2
13952    builtin and then its argument prototype would still apply.  */
13953 char bcopy ();
13954 char (*f) ();
13955
13956 int
13957 main ()
13958 {
13959 /* The GNU C library defines this for functions which it implements
13960     to always fail with ENOSYS.  Some functions are actually named
13961     something starting with __ and the normal name is an alias.  */
13962 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13963 choke me
13964 #else
13965 f = bcopy;
13966 #endif
13967
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   ac_cv_func_bcopy=yes
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat conftest.$ac_ext >&5
13988 ac_cv_func_bcopy=no
13989 fi
13990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13991 fi
13992 echo "$as_me:13992: result: $ac_cv_func_bcopy" >&5
13993 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13994 if test $ac_cv_func_bcopy = yes; then
13995
13996         echo "$as_me:13996: checking if bcopy does overlapping moves" >&5
13997 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13998 if test "${cf_cv_good_bcopy+set}" = set; then
13999   echo $ECHO_N "(cached) $ECHO_C" >&6
14000 else
14001
14002                 if test "$cross_compiling" = yes; then
14003   cf_cv_good_bcopy=unknown
14004 else
14005   cat >conftest.$ac_ext <<_ACEOF
14006 #line 14006 "configure"
14007 #include "confdefs.h"
14008
14009 int main() {
14010         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14011         char temp[40];
14012         bcopy(data, temp, sizeof(data));
14013         bcopy(temp+10, temp, 15);
14014         bcopy(temp+5, temp+15, 10);
14015         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14016 }
14017
14018 _ACEOF
14019 rm -f conftest$ac_exeext
14020 if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
14021   (eval $ac_link) 2>&5
14022   ac_status=$?
14023   echo "$as_me:14023: \$? = $ac_status" >&5
14024   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14025   { (eval echo "$as_me:14025: \"$ac_try\"") >&5
14026   (eval $ac_try) 2>&5
14027   ac_status=$?
14028   echo "$as_me:14028: \$? = $ac_status" >&5
14029   (exit $ac_status); }; }; then
14030   cf_cv_good_bcopy=yes
14031 else
14032   echo "$as_me: program exited with status $ac_status" >&5
14033 echo "$as_me: failed program was:" >&5
14034 cat conftest.$ac_ext >&5
14035 cf_cv_good_bcopy=no
14036 fi
14037 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14038 fi
14039
14040 fi
14041 echo "$as_me:14041: result: $cf_cv_good_bcopy" >&5
14042 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14043
14044 else
14045   cf_cv_good_bcopy=no
14046 fi
14047
14048         if test "$cf_cv_good_bcopy" = yes ; then
14049                 cat >>confdefs.h <<\EOF
14050 #define USE_OK_BCOPY 1
14051 EOF
14052
14053         else
14054                 cat >>confdefs.h <<\EOF
14055 #define USE_MY_MEMMOVE 1
14056 EOF
14057
14058         fi
14059
14060 fi
14061
14062 echo "$as_me:14062: checking if poll really works" >&5
14063 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14064 if test "${cf_cv_working_poll+set}" = set; then
14065   echo $ECHO_N "(cached) $ECHO_C" >&6
14066 else
14067
14068 if test "$cross_compiling" = yes; then
14069   cf_cv_working_poll=unknown
14070 else
14071   cat >conftest.$ac_ext <<_ACEOF
14072 #line 14072 "configure"
14073 #include "confdefs.h"
14074
14075 #include <stdio.h>
14076 #ifdef HAVE_POLL_H
14077 #include <poll.h>
14078 #else
14079 #include <sys/poll.h>
14080 #endif
14081 int main() {
14082         struct pollfd myfds;
14083         int ret;
14084
14085         myfds.fd = 0;
14086         myfds.events = POLLIN;
14087
14088         ret = poll(&myfds, 1, 100);
14089         ${cf_cv_main_return:-return}(ret != 0);
14090 }
14091 _ACEOF
14092 rm -f conftest$ac_exeext
14093 if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
14094   (eval $ac_link) 2>&5
14095   ac_status=$?
14096   echo "$as_me:14096: \$? = $ac_status" >&5
14097   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14098   { (eval echo "$as_me:14098: \"$ac_try\"") >&5
14099   (eval $ac_try) 2>&5
14100   ac_status=$?
14101   echo "$as_me:14101: \$? = $ac_status" >&5
14102   (exit $ac_status); }; }; then
14103   cf_cv_working_poll=yes
14104 else
14105   echo "$as_me: program exited with status $ac_status" >&5
14106 echo "$as_me: failed program was:" >&5
14107 cat conftest.$ac_ext >&5
14108 cf_cv_working_poll=no
14109 fi
14110 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14111 fi
14112 fi
14113 echo "$as_me:14113: result: $cf_cv_working_poll" >&5
14114 echo "${ECHO_T}$cf_cv_working_poll" >&6
14115 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14116 #define HAVE_WORKING_POLL 1
14117 EOF
14118
14119 # special check for test/ditto.c
14120
14121 echo "$as_me:14121: checking for openpty in -lutil" >&5
14122 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14123 if test "${ac_cv_lib_util_openpty+set}" = set; then
14124   echo $ECHO_N "(cached) $ECHO_C" >&6
14125 else
14126   ac_check_lib_save_LIBS=$LIBS
14127 LIBS="-lutil  $LIBS"
14128 cat >conftest.$ac_ext <<_ACEOF
14129 #line 14129 "configure"
14130 #include "confdefs.h"
14131
14132 /* Override any gcc2 internal prototype to avoid an error.  */
14133 #ifdef __cplusplus
14134 extern "C"
14135 #endif
14136 /* We use char because int might match the return type of a gcc2
14137    builtin and then its argument prototype would still apply.  */
14138 char openpty ();
14139 int
14140 main ()
14141 {
14142 openpty ();
14143   ;
14144   return 0;
14145 }
14146 _ACEOF
14147 rm -f conftest.$ac_objext conftest$ac_exeext
14148 if { (eval echo "$as_me:14148: \"$ac_link\"") >&5
14149   (eval $ac_link) 2>&5
14150   ac_status=$?
14151   echo "$as_me:14151: \$? = $ac_status" >&5
14152   (exit $ac_status); } &&
14153          { ac_try='test -s conftest$ac_exeext'
14154   { (eval echo "$as_me:14154: \"$ac_try\"") >&5
14155   (eval $ac_try) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit $ac_status); }; }; then
14159   ac_cv_lib_util_openpty=yes
14160 else
14161   echo "$as_me: failed program was:" >&5
14162 cat conftest.$ac_ext >&5
14163 ac_cv_lib_util_openpty=no
14164 fi
14165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14166 LIBS=$ac_check_lib_save_LIBS
14167 fi
14168 echo "$as_me:14168: result: $ac_cv_lib_util_openpty" >&5
14169 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14170 if test $ac_cv_lib_util_openpty = yes; then
14171   cf_cv_lib_util=yes
14172 else
14173   cf_cv_lib_util=no
14174 fi
14175
14176 echo "$as_me:14176: checking for openpty header" >&5
14177 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14178 if test "${cf_cv_func_openpty+set}" = set; then
14179   echo $ECHO_N "(cached) $ECHO_C" >&6
14180 else
14181
14182     cf_save_LIBS="$LIBS"
14183     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14184     for cf_header in pty.h libutil.h util.h
14185     do
14186     cat >conftest.$ac_ext <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189
14190 #include <$cf_header>
14191
14192 int
14193 main ()
14194 {
14195
14196     int x = openpty((int *)0, (int *)0, (char *)0,
14197                    (struct termios *)0, (struct winsize *)0);
14198
14199   ;
14200   return 0;
14201 }
14202 _ACEOF
14203 rm -f conftest.$ac_objext conftest$ac_exeext
14204 if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
14205   (eval $ac_link) 2>&5
14206   ac_status=$?
14207   echo "$as_me:14207: \$? = $ac_status" >&5
14208   (exit $ac_status); } &&
14209          { ac_try='test -s conftest$ac_exeext'
14210   { (eval echo "$as_me:14210: \"$ac_try\"") >&5
14211   (eval $ac_try) 2>&5
14212   ac_status=$?
14213   echo "$as_me:14213: \$? = $ac_status" >&5
14214   (exit $ac_status); }; }; then
14215
14216         cf_cv_func_openpty=$cf_header
14217         break
14218
14219 else
14220   echo "$as_me: failed program was:" >&5
14221 cat conftest.$ac_ext >&5
14222
14223         cf_cv_func_openpty=no
14224
14225 fi
14226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14227     done
14228     LIBS="$cf_save_LIBS"
14229
14230 fi
14231 echo "$as_me:14231: result: $cf_cv_func_openpty" >&5
14232 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14233
14234 if test "$cf_cv_func_openpty" != no ; then
14235     cat >>confdefs.h <<EOF
14236 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14237 EOF
14238
14239     cat >>confdefs.h <<\EOF
14240 #define USE_XTERM_PTY 1
14241 EOF
14242
14243     if test "$cf_cv_lib_util" = yes ; then
14244         TEST_LIBS="-lutil $TEST_LIBS"
14245     fi
14246 fi
14247
14248 if test "$with_hashed_db" != no ; then
14249         cat >>confdefs.h <<\EOF
14250 #define USE_HASHED_DB 1
14251 EOF
14252
14253 case $with_hashed_db in #(vi
14254 yes|*able*) #(vi
14255     ;;
14256 *)
14257     if test -d "$with_hashed_db" ; then
14258
14259 if test -n "$with_hashed_db/include" ; then
14260   for cf_add_incdir in $with_hashed_db/include
14261   do
14262         while test $cf_add_incdir != /usr/include
14263         do
14264           if test -d $cf_add_incdir
14265           then
14266                 cf_have_incdir=no
14267                 if test -n "$CFLAGS$CPPFLAGS" ; then
14268                   # a loop is needed to ensure we can add subdirs of existing dirs
14269                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14270                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14271                           cf_have_incdir=yes; break
14272                         fi
14273                   done
14274                 fi
14275
14276                 if test "$cf_have_incdir" = no ; then
14277           if test "$cf_add_incdir" = /usr/local/include ; then
14278                         if test "$GCC" = yes
14279                         then
14280                           cf_save_CPPFLAGS=$CPPFLAGS
14281                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14282                           cat >conftest.$ac_ext <<_ACEOF
14283 #line 14283 "configure"
14284 #include "confdefs.h"
14285 #include <stdio.h>
14286 int
14287 main ()
14288 {
14289 printf("Hello")
14290   ;
14291   return 0;
14292 }
14293 _ACEOF
14294 rm -f conftest.$ac_objext
14295 if { (eval echo "$as_me:14295: \"$ac_compile\"") >&5
14296   (eval $ac_compile) 2>&5
14297   ac_status=$?
14298   echo "$as_me:14298: \$? = $ac_status" >&5
14299   (exit $ac_status); } &&
14300          { ac_try='test -s conftest.$ac_objext'
14301   { (eval echo "$as_me:14301: \"$ac_try\"") >&5
14302   (eval $ac_try) 2>&5
14303   ac_status=$?
14304   echo "$as_me:14304: \$? = $ac_status" >&5
14305   (exit $ac_status); }; }; then
14306   :
14307 else
14308   echo "$as_me: failed program was:" >&5
14309 cat conftest.$ac_ext >&5
14310 cf_have_incdir=yes
14311 fi
14312 rm -f conftest.$ac_objext conftest.$ac_ext
14313                           CPPFLAGS=$cf_save_CPPFLAGS
14314                         fi
14315                   fi
14316                 fi
14317
14318                 if test "$cf_have_incdir" = no ; then
14319                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14320
14321 echo "${as_me-configure}:14321: testing adding $cf_add_incdir to include-path ..." 1>&5
14322
14323                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
14324
14325           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14326           test "$cf_top_incdir" = "$cf_add_incdir" && break
14327           cf_add_incdir="$cf_top_incdir"
14328                 else
14329                   break
14330                 fi
14331           fi
14332         done
14333   done
14334 fi
14335
14336 if test -n "$with_hashed_db/lib" ; then
14337   for cf_add_libdir in $with_hashed_db/lib
14338   do
14339     if test $cf_add_libdir = /usr/lib ; then
14340       :
14341     elif test -d $cf_add_libdir
14342     then
14343       cf_have_libdir=no
14344       if test -n "$LDFLAGS$LIBS" ; then
14345         # a loop is needed to ensure we can add subdirs of existing dirs
14346         for cf_test_libdir in $LDFLAGS $LIBS ; do
14347           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14348             cf_have_libdir=yes; break
14349           fi
14350         done
14351       fi
14352       if test "$cf_have_libdir" = no ; then
14353         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14354
14355 echo "${as_me-configure}:14355: testing adding $cf_add_libdir to library-path ..." 1>&5
14356
14357         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14358       fi
14359     fi
14360   done
14361 fi
14362
14363     fi
14364 esac
14365
14366 echo "$as_me:14366: checking for db.h" >&5
14367 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14368 if test "${ac_cv_header_db_h+set}" = set; then
14369   echo $ECHO_N "(cached) $ECHO_C" >&6
14370 else
14371   cat >conftest.$ac_ext <<_ACEOF
14372 #line 14372 "configure"
14373 #include "confdefs.h"
14374 #include <db.h>
14375 _ACEOF
14376 if { (eval echo "$as_me:14376: \"$ac_cpp conftest.$ac_ext\"") >&5
14377   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14378   ac_status=$?
14379   egrep -v '^ *\+' conftest.er1 >conftest.err
14380   rm -f conftest.er1
14381   cat conftest.err >&5
14382   echo "$as_me:14382: \$? = $ac_status" >&5
14383   (exit $ac_status); } >/dev/null; then
14384   if test -s conftest.err; then
14385     ac_cpp_err=$ac_c_preproc_warn_flag
14386   else
14387     ac_cpp_err=
14388   fi
14389 else
14390   ac_cpp_err=yes
14391 fi
14392 if test -z "$ac_cpp_err"; then
14393   ac_cv_header_db_h=yes
14394 else
14395   echo "$as_me: failed program was:" >&5
14396   cat conftest.$ac_ext >&5
14397   ac_cv_header_db_h=no
14398 fi
14399 rm -f conftest.err conftest.$ac_ext
14400 fi
14401 echo "$as_me:14401: result: $ac_cv_header_db_h" >&5
14402 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14403 if test $ac_cv_header_db_h = yes; then
14404
14405 echo "$as_me:14405: checking for version of db" >&5
14406 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14407 if test "${cf_cv_hashed_db_version+set}" = set; then
14408   echo $ECHO_N "(cached) $ECHO_C" >&6
14409 else
14410
14411 cf_cv_hashed_db_version=unknown
14412
14413 for cf_db_version in 1 2 3 4 5
14414 do
14415
14416 echo "${as_me-configure}:14416: testing checking for db version $cf_db_version ..." 1>&5
14417
14418         cat >conftest.$ac_ext <<_ACEOF
14419 #line 14419 "configure"
14420 #include "confdefs.h"
14421
14422 $ac_includes_default
14423 #include <db.h>
14424
14425 #ifdef DB_VERSION_MAJOR
14426         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14427 #if $cf_db_version == DB_VERSION_MAJOR
14428         /* ok */
14429 #else
14430         make an error
14431 #endif
14432 #else
14433 #if $cf_db_version == 1
14434         /* ok: assuming this is DB 1.8.5 */
14435 #else
14436         make an error
14437 #endif
14438 #endif
14439
14440 int
14441 main ()
14442 {
14443 DBT *foo = 0
14444   ;
14445   return 0;
14446 }
14447 _ACEOF
14448 rm -f conftest.$ac_objext
14449 if { (eval echo "$as_me:14449: \"$ac_compile\"") >&5
14450   (eval $ac_compile) 2>&5
14451   ac_status=$?
14452   echo "$as_me:14452: \$? = $ac_status" >&5
14453   (exit $ac_status); } &&
14454          { ac_try='test -s conftest.$ac_objext'
14455   { (eval echo "$as_me:14455: \"$ac_try\"") >&5
14456   (eval $ac_try) 2>&5
14457   ac_status=$?
14458   echo "$as_me:14458: \$? = $ac_status" >&5
14459   (exit $ac_status); }; }; then
14460
14461         cf_cv_hashed_db_version=$cf_db_version
14462         break
14463
14464 else
14465   echo "$as_me: failed program was:" >&5
14466 cat conftest.$ac_ext >&5
14467 fi
14468 rm -f conftest.$ac_objext conftest.$ac_ext
14469 done
14470
14471 fi
14472 echo "$as_me:14472: result: $cf_cv_hashed_db_version" >&5
14473 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14474
14475 if test "$cf_cv_hashed_db_version" = unknown ; then
14476         { { echo "$as_me:14476: error: Cannot determine version of db" >&5
14477 echo "$as_me: error: Cannot determine version of db" >&2;}
14478    { (exit 1); exit 1; }; }
14479 else
14480
14481 echo "$as_me:14481: checking for db libraries" >&5
14482 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14483 if test "${cf_cv_hashed_db_libs+set}" = set; then
14484   echo $ECHO_N "(cached) $ECHO_C" >&6
14485 else
14486
14487 cf_cv_hashed_db_libs=unknown
14488 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14489 do
14490         cf_save_libs="$LIBS"
14491         if test -n "$cf_db_libs"; then
14492                 LIBS="-l$cf_db_libs $LIBS"
14493         fi
14494
14495 echo "${as_me-configure}:14495: testing checking for library "$cf_db_libs" ..." 1>&5
14496
14497         cat >conftest.$ac_ext <<_ACEOF
14498 #line 14498 "configure"
14499 #include "confdefs.h"
14500
14501 $ac_includes_default
14502 #include <db.h>
14503
14504 int
14505 main ()
14506 {
14507
14508         char *path = "/tmp/foo";
14509 #ifdef DB_VERSION_MAJOR
14510 #if DB_VERSION_MAJOR >= 4
14511         DB *result = 0;
14512         db_create(&result, NULL, 0);
14513         result->open(result,
14514                 NULL,
14515                 path,
14516                 path,
14517                 DB_HASH,
14518                 DB_CREATE,
14519                 0644);
14520 #elif DB_VERSION_MAJOR >= 3
14521         DB *result = 0;
14522         db_create(&result, NULL, 0);
14523         result->open(result,
14524                 path,
14525                 path,
14526                 DB_HASH,
14527                 DB_CREATE,
14528                 0644);
14529 #elif DB_VERSION_MAJOR >= 2
14530         DB *result = 0;
14531         db_open(path,
14532                 DB_HASH,
14533                 DB_CREATE,
14534                 0644,
14535                 (DB_ENV *) 0,
14536                 (DB_INFO *) 0,
14537                 &result);
14538 #endif /* DB_VERSION_MAJOR */
14539 #else
14540         DB *result = dbopen(path,
14541                      2,
14542                      0644,
14543                      DB_HASH,
14544                      0);
14545 #endif
14546         ${cf_cv_main_return:-return}(result != 0)
14547
14548   ;
14549   return 0;
14550 }
14551 _ACEOF
14552 rm -f conftest.$ac_objext conftest$ac_exeext
14553 if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
14554   (eval $ac_link) 2>&5
14555   ac_status=$?
14556   echo "$as_me:14556: \$? = $ac_status" >&5
14557   (exit $ac_status); } &&
14558          { ac_try='test -s conftest$ac_exeext'
14559   { (eval echo "$as_me:14559: \"$ac_try\"") >&5
14560   (eval $ac_try) 2>&5
14561   ac_status=$?
14562   echo "$as_me:14562: \$? = $ac_status" >&5
14563   (exit $ac_status); }; }; then
14564
14565         if test -n "$cf_db_libs" ; then
14566                 cf_cv_hashed_db_libs=$cf_db_libs
14567         else
14568                 cf_cv_hashed_db_libs=default
14569         fi
14570         LIBS="$cf_save_libs"
14571         break
14572
14573 else
14574   echo "$as_me: failed program was:" >&5
14575 cat conftest.$ac_ext >&5
14576 fi
14577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14578         LIBS="$cf_save_libs"
14579 done
14580
14581 fi
14582 echo "$as_me:14582: result: $cf_cv_hashed_db_libs" >&5
14583 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14584
14585         if test "$cf_cv_hashed_db_libs" = unknown ; then
14586                 { { echo "$as_me:14586: error: Cannot determine library for db" >&5
14587 echo "$as_me: error: Cannot determine library for db" >&2;}
14588    { (exit 1); exit 1; }; }
14589         elif test "$cf_cv_hashed_db_libs" != default ; then
14590                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14591         fi
14592 fi
14593
14594 else
14595
14596         { { echo "$as_me:14596: error: Cannot find db.h" >&5
14597 echo "$as_me: error: Cannot find db.h" >&2;}
14598    { (exit 1); exit 1; }; }
14599
14600 fi
14601
14602 fi
14603
14604 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14605         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14606         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14607 fi
14608
14609 # Just in case, check if the C compiler has a bool type.
14610
14611 echo "$as_me:14611: checking if we should include stdbool.h" >&5
14612 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14613
14614 if test "${cf_cv_header_stdbool_h+set}" = set; then
14615   echo $ECHO_N "(cached) $ECHO_C" >&6
14616 else
14617
14618         cat >conftest.$ac_ext <<_ACEOF
14619 #line 14619 "configure"
14620 #include "confdefs.h"
14621
14622 int
14623 main ()
14624 {
14625 bool foo = false
14626   ;
14627   return 0;
14628 }
14629 _ACEOF
14630 rm -f conftest.$ac_objext
14631 if { (eval echo "$as_me:14631: \"$ac_compile\"") >&5
14632   (eval $ac_compile) 2>&5
14633   ac_status=$?
14634   echo "$as_me:14634: \$? = $ac_status" >&5
14635   (exit $ac_status); } &&
14636          { ac_try='test -s conftest.$ac_objext'
14637   { (eval echo "$as_me:14637: \"$ac_try\"") >&5
14638   (eval $ac_try) 2>&5
14639   ac_status=$?
14640   echo "$as_me:14640: \$? = $ac_status" >&5
14641   (exit $ac_status); }; }; then
14642   cf_cv_header_stdbool_h=0
14643 else
14644   echo "$as_me: failed program was:" >&5
14645 cat conftest.$ac_ext >&5
14646 cat >conftest.$ac_ext <<_ACEOF
14647 #line 14647 "configure"
14648 #include "confdefs.h"
14649
14650 #ifndef __BEOS__
14651 #include <stdbool.h>
14652 #endif
14653
14654 int
14655 main ()
14656 {
14657 bool foo = false
14658   ;
14659   return 0;
14660 }
14661 _ACEOF
14662 rm -f conftest.$ac_objext
14663 if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
14664   (eval $ac_compile) 2>&5
14665   ac_status=$?
14666   echo "$as_me:14666: \$? = $ac_status" >&5
14667   (exit $ac_status); } &&
14668          { ac_try='test -s conftest.$ac_objext'
14669   { (eval echo "$as_me:14669: \"$ac_try\"") >&5
14670   (eval $ac_try) 2>&5
14671   ac_status=$?
14672   echo "$as_me:14672: \$? = $ac_status" >&5
14673   (exit $ac_status); }; }; then
14674   cf_cv_header_stdbool_h=1
14675 else
14676   echo "$as_me: failed program was:" >&5
14677 cat conftest.$ac_ext >&5
14678 cf_cv_header_stdbool_h=0
14679 fi
14680 rm -f conftest.$ac_objext conftest.$ac_ext
14681 fi
14682 rm -f conftest.$ac_objext conftest.$ac_ext
14683 fi
14684
14685 if test "$cf_cv_header_stdbool_h" = 1
14686 then    echo "$as_me:14686: result: yes" >&5
14687 echo "${ECHO_T}yes" >&6
14688 else    echo "$as_me:14688: result: no" >&5
14689 echo "${ECHO_T}no" >&6
14690 fi
14691
14692 echo "$as_me:14692: checking for builtin bool type" >&5
14693 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14694
14695 if test "${cf_cv_cc_bool_type+set}" = set; then
14696   echo $ECHO_N "(cached) $ECHO_C" >&6
14697 else
14698
14699         cat >conftest.$ac_ext <<_ACEOF
14700 #line 14700 "configure"
14701 #include "confdefs.h"
14702
14703 #include <stdio.h>
14704 #include <sys/types.h>
14705
14706 int
14707 main ()
14708 {
14709 bool x = false
14710   ;
14711   return 0;
14712 }
14713 _ACEOF
14714 rm -f conftest.$ac_objext
14715 if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
14716   (eval $ac_compile) 2>&5
14717   ac_status=$?
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit $ac_status); } &&
14720          { ac_try='test -s conftest.$ac_objext'
14721   { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722   (eval $ac_try) 2>&5
14723   ac_status=$?
14724   echo "$as_me:14724: \$? = $ac_status" >&5
14725   (exit $ac_status); }; }; then
14726   cf_cv_cc_bool_type=1
14727 else
14728   echo "$as_me: failed program was:" >&5
14729 cat conftest.$ac_ext >&5
14730 cf_cv_cc_bool_type=0
14731 fi
14732 rm -f conftest.$ac_objext conftest.$ac_ext
14733
14734 fi
14735
14736 if test "$cf_cv_cc_bool_type" = 1
14737 then    echo "$as_me:14737: result: yes" >&5
14738 echo "${ECHO_T}yes" >&6
14739 else    echo "$as_me:14739: result: no" >&5
14740 echo "${ECHO_T}no" >&6
14741 fi
14742
14743 # Check for C++ compiler characteristics (and ensure that it's there!)
14744 if test -n "$CXX" ; then
14745         ac_ext=cc
14746 ac_cpp='$CXXCPP $CPPFLAGS'
14747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14750 ac_main_return=return
14751
14752 if test -n "$GXX" ; then
14753 case $cf_cv_system_name in #(vi
14754 os2*) #(vi
14755         cf_stdcpp_libname=stdcpp
14756         ;;
14757 *)
14758         cf_stdcpp_libname=stdc++
14759         ;;
14760 esac
14761 echo "$as_me:14761: checking for library $cf_stdcpp_libname" >&5
14762 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14763 if test "${cf_cv_libstdcpp+set}" = set; then
14764   echo $ECHO_N "(cached) $ECHO_C" >&6
14765 else
14766
14767         cf_save="$LIBS"
14768         LIBS="$LIBS -l$cf_stdcpp_libname"
14769 cat >conftest.$ac_ext <<_ACEOF
14770 #line 14770 "configure"
14771 #include "confdefs.h"
14772
14773 #include <strstream.h>
14774 int
14775 main ()
14776 {
14777
14778 char buf[80];
14779 strstreambuf foo(buf, sizeof(buf))
14780
14781   ;
14782   return 0;
14783 }
14784 _ACEOF
14785 rm -f conftest.$ac_objext conftest$ac_exeext
14786 if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
14787   (eval $ac_link) 2>&5
14788   ac_status=$?
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); } &&
14791          { ac_try='test -s conftest$ac_exeext'
14792   { (eval echo "$as_me:14792: \"$ac_try\"") >&5
14793   (eval $ac_try) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); }; }; then
14797   cf_cv_libstdcpp=yes
14798 else
14799   echo "$as_me: failed program was:" >&5
14800 cat conftest.$ac_ext >&5
14801 cf_cv_libstdcpp=no
14802 fi
14803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14804         LIBS="$cf_save"
14805
14806 fi
14807 echo "$as_me:14807: result: $cf_cv_libstdcpp" >&5
14808 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14809 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14810 fi
14811
14812         echo "$as_me:14812: checking whether $CXX understands -c and -o together" >&5
14813 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14814 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14815   echo $ECHO_N "(cached) $ECHO_C" >&6
14816 else
14817
14818 cat > conftest.$ac_ext <<CF_EOF
14819 #include <stdio.h>
14820 int main()
14821 {
14822         ${cf_cv_main_return:-return}(0);
14823 }
14824 CF_EOF
14825 # We do the test twice because some compilers refuse to overwrite an
14826 # existing .o file with -o, though they will create one.
14827 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14828 if { (eval echo "$as_me:14828: \"$ac_try\"") >&5
14829   (eval $ac_try) 2>&5
14830   ac_status=$?
14831   echo "$as_me:14831: \$? = $ac_status" >&5
14832   (exit $ac_status); } &&
14833   test -f conftest2.$ac_objext && { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14834   (eval $ac_try) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); };
14838 then
14839   eval cf_cv_prog_CXX_c_o=yes
14840 else
14841   eval cf_cv_prog_CXX_c_o=no
14842 fi
14843 rm -f conftest*
14844
14845 fi
14846 if test $cf_cv_prog_CXX_c_o = yes; then
14847   echo "$as_me:14847: result: yes" >&5
14848 echo "${ECHO_T}yes" >&6
14849 else
14850   echo "$as_me:14850: result: no" >&5
14851 echo "${ECHO_T}no" >&6
14852 fi
14853
14854         case $GXX_VERSION in
14855         1*|2.0-6*)
14856                 cf_cxx_library=yes
14857                 ;;
14858         *-2.7*|2.7*)
14859
14860 cf_cxx_library=unknown
14861 case $cf_cv_system_name in #(vi
14862 os2*) #(vi
14863         cf_gpp_libname=gpp
14864         ;;
14865 *)
14866         cf_gpp_libname=g++
14867         ;;
14868 esac
14869 if test "$GXX" = yes; then
14870         echo "$as_me:14870: checking for lib$cf_gpp_libname" >&5
14871 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14872         cf_save="$LIBS"
14873         LIBS="$LIBS -l$cf_gpp_libname"
14874         cat >conftest.$ac_ext <<_ACEOF
14875 #line 14875 "configure"
14876 #include "confdefs.h"
14877
14878 #include <$cf_gpp_libname/builtin.h>
14879
14880 int
14881 main ()
14882 {
14883 two_arg_error_handler_t foo2 = lib_error_handler
14884   ;
14885   return 0;
14886 }
14887 _ACEOF
14888 rm -f conftest.$ac_objext conftest$ac_exeext
14889 if { (eval echo "$as_me:14889: \"$ac_link\"") >&5
14890   (eval $ac_link) 2>&5
14891   ac_status=$?
14892   echo "$as_me:14892: \$? = $ac_status" >&5
14893   (exit $ac_status); } &&
14894          { ac_try='test -s conftest$ac_exeext'
14895   { (eval echo "$as_me:14895: \"$ac_try\"") >&5
14896   (eval $ac_try) 2>&5
14897   ac_status=$?
14898   echo "$as_me:14898: \$? = $ac_status" >&5
14899   (exit $ac_status); }; }; then
14900   cf_cxx_library=yes
14901          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14902          if test "$cf_gpp_libname" = cpp ; then
14903             cat >>confdefs.h <<\EOF
14904 #define HAVE_GPP_BUILTIN_H 1
14905 EOF
14906
14907          else
14908             cat >>confdefs.h <<\EOF
14909 #define HAVE_GXX_BUILTIN_H 1
14910 EOF
14911
14912          fi
14913 else
14914   echo "$as_me: failed program was:" >&5
14915 cat conftest.$ac_ext >&5
14916 cat >conftest.$ac_ext <<_ACEOF
14917 #line 14917 "configure"
14918 #include "confdefs.h"
14919
14920 #include <builtin.h>
14921
14922 int
14923 main ()
14924 {
14925 two_arg_error_handler_t foo2 = lib_error_handler
14926   ;
14927   return 0;
14928 }
14929 _ACEOF
14930 rm -f conftest.$ac_objext conftest$ac_exeext
14931 if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14932   (eval $ac_link) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -s conftest$ac_exeext'
14937   { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938   (eval $ac_try) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); }; }; then
14942   cf_cxx_library=yes
14943          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14944          cat >>confdefs.h <<\EOF
14945 #define HAVE_BUILTIN_H 1
14946 EOF
14947
14948 else
14949   echo "$as_me: failed program was:" >&5
14950 cat conftest.$ac_ext >&5
14951 cf_cxx_library=no
14952 fi
14953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14954 fi
14955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14956         LIBS="$cf_save"
14957         echo "$as_me:14957: result: $cf_cxx_library" >&5
14958 echo "${ECHO_T}$cf_cxx_library" >&6
14959 fi
14960
14961                 ;;
14962         *)
14963                 cf_cxx_library=no
14964                 ;;
14965         esac
14966
14967         ac_ext=cc
14968 ac_cpp='$CXXCPP $CPPFLAGS'
14969 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14970 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14971 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14972 ac_main_return=return
14973 echo "$as_me:14973: checking how to run the C++ preprocessor" >&5
14974 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14975 if test -z "$CXXCPP"; then
14976   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14977   echo $ECHO_N "(cached) $ECHO_C" >&6
14978 else
14979       # Double quotes because CXXCPP needs to be expanded
14980     for CXXCPP in "$CXX -E" "/lib/cpp"
14981     do
14982       ac_preproc_ok=false
14983 for ac_cxx_preproc_warn_flag in '' yes
14984 do
14985   # Use a header file that comes with gcc, so configuring glibc
14986   # with a fresh cross-compiler works.
14987   # On the NeXT, cc -E runs the code through the compiler's parser,
14988   # not just through cpp. "Syntax error" is here to catch this case.
14989   cat >conftest.$ac_ext <<_ACEOF
14990 #line 14990 "configure"
14991 #include "confdefs.h"
14992 #include <assert.h>
14993                      Syntax error
14994 _ACEOF
14995 if { (eval echo "$as_me:14995: \"$ac_cpp conftest.$ac_ext\"") >&5
14996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14997   ac_status=$?
14998   egrep -v '^ *\+' conftest.er1 >conftest.err
14999   rm -f conftest.er1
15000   cat conftest.err >&5
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); } >/dev/null; then
15003   if test -s conftest.err; then
15004     ac_cpp_err=$ac_cxx_preproc_warn_flag
15005   else
15006     ac_cpp_err=
15007   fi
15008 else
15009   ac_cpp_err=yes
15010 fi
15011 if test -z "$ac_cpp_err"; then
15012   :
15013 else
15014   echo "$as_me: failed program was:" >&5
15015   cat conftest.$ac_ext >&5
15016   # Broken: fails on valid input.
15017 continue
15018 fi
15019 rm -f conftest.err conftest.$ac_ext
15020
15021   # OK, works on sane cases.  Now check whether non-existent headers
15022   # can be detected and how.
15023   cat >conftest.$ac_ext <<_ACEOF
15024 #line 15024 "configure"
15025 #include "confdefs.h"
15026 #include <ac_nonexistent.h>
15027 _ACEOF
15028 if { (eval echo "$as_me:15028: \"$ac_cpp conftest.$ac_ext\"") >&5
15029   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15030   ac_status=$?
15031   egrep -v '^ *\+' conftest.er1 >conftest.err
15032   rm -f conftest.er1
15033   cat conftest.err >&5
15034   echo "$as_me:15034: \$? = $ac_status" >&5
15035   (exit $ac_status); } >/dev/null; then
15036   if test -s conftest.err; then
15037     ac_cpp_err=$ac_cxx_preproc_warn_flag
15038   else
15039     ac_cpp_err=
15040   fi
15041 else
15042   ac_cpp_err=yes
15043 fi
15044 if test -z "$ac_cpp_err"; then
15045   # Broken: success on invalid input.
15046 continue
15047 else
15048   echo "$as_me: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   # Passes both tests.
15051 ac_preproc_ok=:
15052 break
15053 fi
15054 rm -f conftest.err conftest.$ac_ext
15055
15056 done
15057 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15058 rm -f conftest.err conftest.$ac_ext
15059 if $ac_preproc_ok; then
15060   break
15061 fi
15062
15063     done
15064     ac_cv_prog_CXXCPP=$CXXCPP
15065
15066 fi
15067   CXXCPP=$ac_cv_prog_CXXCPP
15068 else
15069   ac_cv_prog_CXXCPP=$CXXCPP
15070 fi
15071 echo "$as_me:15071: result: $CXXCPP" >&5
15072 echo "${ECHO_T}$CXXCPP" >&6
15073 ac_preproc_ok=false
15074 for ac_cxx_preproc_warn_flag in '' yes
15075 do
15076   # Use a header file that comes with gcc, so configuring glibc
15077   # with a fresh cross-compiler works.
15078   # On the NeXT, cc -E runs the code through the compiler's parser,
15079   # not just through cpp. "Syntax error" is here to catch this case.
15080   cat >conftest.$ac_ext <<_ACEOF
15081 #line 15081 "configure"
15082 #include "confdefs.h"
15083 #include <assert.h>
15084                      Syntax error
15085 _ACEOF
15086 if { (eval echo "$as_me:15086: \"$ac_cpp conftest.$ac_ext\"") >&5
15087   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15088   ac_status=$?
15089   egrep -v '^ *\+' conftest.er1 >conftest.err
15090   rm -f conftest.er1
15091   cat conftest.err >&5
15092   echo "$as_me:15092: \$? = $ac_status" >&5
15093   (exit $ac_status); } >/dev/null; then
15094   if test -s conftest.err; then
15095     ac_cpp_err=$ac_cxx_preproc_warn_flag
15096   else
15097     ac_cpp_err=
15098   fi
15099 else
15100   ac_cpp_err=yes
15101 fi
15102 if test -z "$ac_cpp_err"; then
15103   :
15104 else
15105   echo "$as_me: failed program was:" >&5
15106   cat conftest.$ac_ext >&5
15107   # Broken: fails on valid input.
15108 continue
15109 fi
15110 rm -f conftest.err conftest.$ac_ext
15111
15112   # OK, works on sane cases.  Now check whether non-existent headers
15113   # can be detected and how.
15114   cat >conftest.$ac_ext <<_ACEOF
15115 #line 15115 "configure"
15116 #include "confdefs.h"
15117 #include <ac_nonexistent.h>
15118 _ACEOF
15119 if { (eval echo "$as_me:15119: \"$ac_cpp conftest.$ac_ext\"") >&5
15120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15121   ac_status=$?
15122   egrep -v '^ *\+' conftest.er1 >conftest.err
15123   rm -f conftest.er1
15124   cat conftest.err >&5
15125   echo "$as_me:15125: \$? = $ac_status" >&5
15126   (exit $ac_status); } >/dev/null; then
15127   if test -s conftest.err; then
15128     ac_cpp_err=$ac_cxx_preproc_warn_flag
15129   else
15130     ac_cpp_err=
15131   fi
15132 else
15133   ac_cpp_err=yes
15134 fi
15135 if test -z "$ac_cpp_err"; then
15136   # Broken: success on invalid input.
15137 continue
15138 else
15139   echo "$as_me: failed program was:" >&5
15140   cat conftest.$ac_ext >&5
15141   # Passes both tests.
15142 ac_preproc_ok=:
15143 break
15144 fi
15145 rm -f conftest.err conftest.$ac_ext
15146
15147 done
15148 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15149 rm -f conftest.err conftest.$ac_ext
15150 if $ac_preproc_ok; then
15151   :
15152 else
15153   { { echo "$as_me:15153: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15154 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15155    { (exit 1); exit 1; }; }
15156 fi
15157
15158 ac_ext=cc
15159 ac_cpp='$CXXCPP $CPPFLAGS'
15160 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15161 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15162 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15163 ac_main_return=return
15164
15165 for ac_header in iostream typeinfo
15166 do
15167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15168 echo "$as_me:15168: checking for $ac_header" >&5
15169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173   cat >conftest.$ac_ext <<_ACEOF
15174 #line 15174 "configure"
15175 #include "confdefs.h"
15176 #include <$ac_header>
15177 _ACEOF
15178 if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
15179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15180   ac_status=$?
15181   egrep -v '^ *\+' conftest.er1 >conftest.err
15182   rm -f conftest.er1
15183   cat conftest.err >&5
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } >/dev/null; then
15186   if test -s conftest.err; then
15187     ac_cpp_err=$ac_cxx_preproc_warn_flag
15188   else
15189     ac_cpp_err=
15190   fi
15191 else
15192   ac_cpp_err=yes
15193 fi
15194 if test -z "$ac_cpp_err"; then
15195   eval "$as_ac_Header=yes"
15196 else
15197   echo "$as_me: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   eval "$as_ac_Header=no"
15200 fi
15201 rm -f conftest.err conftest.$ac_ext
15202 fi
15203 echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
15204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15206   cat >>confdefs.h <<EOF
15207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15208 EOF
15209
15210 fi
15211 done
15212
15213     if test x"$ac_cv_header_iostream" = xyes ; then
15214         echo "$as_me:15214: checking if iostream uses std-namespace" >&5
15215 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15216         cat >conftest.$ac_ext <<_ACEOF
15217 #line 15217 "configure"
15218 #include "confdefs.h"
15219
15220 #include <iostream>
15221 using std::endl;
15222 using std::cerr;
15223 int
15224 main ()
15225 {
15226
15227 cerr << "testing" << endl;
15228
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 rm -f conftest.$ac_objext
15234 if { (eval echo "$as_me:15234: \"$ac_compile\"") >&5
15235   (eval $ac_compile) 2>&5
15236   ac_status=$?
15237   echo "$as_me:15237: \$? = $ac_status" >&5
15238   (exit $ac_status); } &&
15239          { ac_try='test -s conftest.$ac_objext'
15240   { (eval echo "$as_me:15240: \"$ac_try\"") >&5
15241   (eval $ac_try) 2>&5
15242   ac_status=$?
15243   echo "$as_me:15243: \$? = $ac_status" >&5
15244   (exit $ac_status); }; }; then
15245   cf_iostream_namespace=yes
15246 else
15247   echo "$as_me: failed program was:" >&5
15248 cat conftest.$ac_ext >&5
15249 cf_iostream_namespace=no
15250 fi
15251 rm -f conftest.$ac_objext conftest.$ac_ext
15252         echo "$as_me:15252: result: $cf_iostream_namespace" >&5
15253 echo "${ECHO_T}$cf_iostream_namespace" >&6
15254         if test "$cf_iostream_namespace" = yes ; then
15255             cat >>confdefs.h <<\EOF
15256 #define IOSTREAM_NAMESPACE 1
15257 EOF
15258
15259         fi
15260     fi
15261
15262 echo "$as_me:15262: checking if we should include stdbool.h" >&5
15263 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15264
15265 if test "${cf_cv_header_stdbool_h+set}" = set; then
15266   echo $ECHO_N "(cached) $ECHO_C" >&6
15267 else
15268
15269         cat >conftest.$ac_ext <<_ACEOF
15270 #line 15270 "configure"
15271 #include "confdefs.h"
15272
15273 int
15274 main ()
15275 {
15276 bool foo = false
15277   ;
15278   return 0;
15279 }
15280 _ACEOF
15281 rm -f conftest.$ac_objext
15282 if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
15283   (eval $ac_compile) 2>&5
15284   ac_status=$?
15285   echo "$as_me:15285: \$? = $ac_status" >&5
15286   (exit $ac_status); } &&
15287          { ac_try='test -s conftest.$ac_objext'
15288   { (eval echo "$as_me:15288: \"$ac_try\"") >&5
15289   (eval $ac_try) 2>&5
15290   ac_status=$?
15291   echo "$as_me:15291: \$? = $ac_status" >&5
15292   (exit $ac_status); }; }; then
15293   cf_cv_header_stdbool_h=0
15294 else
15295   echo "$as_me: failed program was:" >&5
15296 cat conftest.$ac_ext >&5
15297 cat >conftest.$ac_ext <<_ACEOF
15298 #line 15298 "configure"
15299 #include "confdefs.h"
15300
15301 #ifndef __BEOS__
15302 #include <stdbool.h>
15303 #endif
15304
15305 int
15306 main ()
15307 {
15308 bool foo = false
15309   ;
15310   return 0;
15311 }
15312 _ACEOF
15313 rm -f conftest.$ac_objext
15314 if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
15315   (eval $ac_compile) 2>&5
15316   ac_status=$?
15317   echo "$as_me:15317: \$? = $ac_status" >&5
15318   (exit $ac_status); } &&
15319          { ac_try='test -s conftest.$ac_objext'
15320   { (eval echo "$as_me:15320: \"$ac_try\"") >&5
15321   (eval $ac_try) 2>&5
15322   ac_status=$?
15323   echo "$as_me:15323: \$? = $ac_status" >&5
15324   (exit $ac_status); }; }; then
15325   cf_cv_header_stdbool_h=1
15326 else
15327   echo "$as_me: failed program was:" >&5
15328 cat conftest.$ac_ext >&5
15329 cf_cv_header_stdbool_h=0
15330 fi
15331 rm -f conftest.$ac_objext conftest.$ac_ext
15332 fi
15333 rm -f conftest.$ac_objext conftest.$ac_ext
15334 fi
15335
15336 if test "$cf_cv_header_stdbool_h" = 1
15337 then    echo "$as_me:15337: result: yes" >&5
15338 echo "${ECHO_T}yes" >&6
15339 else    echo "$as_me:15339: result: no" >&5
15340 echo "${ECHO_T}no" >&6
15341 fi
15342
15343 echo "$as_me:15343: checking for builtin bool type" >&5
15344 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15345
15346 if test "${cf_cv_builtin_bool+set}" = set; then
15347   echo $ECHO_N "(cached) $ECHO_C" >&6
15348 else
15349
15350         cat >conftest.$ac_ext <<_ACEOF
15351 #line 15351 "configure"
15352 #include "confdefs.h"
15353
15354 #include <stdio.h>
15355 #include <sys/types.h>
15356
15357 int
15358 main ()
15359 {
15360 bool x = false
15361   ;
15362   return 0;
15363 }
15364 _ACEOF
15365 rm -f conftest.$ac_objext
15366 if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
15367   (eval $ac_compile) 2>&5
15368   ac_status=$?
15369   echo "$as_me:15369: \$? = $ac_status" >&5
15370   (exit $ac_status); } &&
15371          { ac_try='test -s conftest.$ac_objext'
15372   { (eval echo "$as_me:15372: \"$ac_try\"") >&5
15373   (eval $ac_try) 2>&5
15374   ac_status=$?
15375   echo "$as_me:15375: \$? = $ac_status" >&5
15376   (exit $ac_status); }; }; then
15377   cf_cv_builtin_bool=1
15378 else
15379   echo "$as_me: failed program was:" >&5
15380 cat conftest.$ac_ext >&5
15381 cf_cv_builtin_bool=0
15382 fi
15383 rm -f conftest.$ac_objext conftest.$ac_ext
15384
15385 fi
15386
15387 if test "$cf_cv_builtin_bool" = 1
15388 then    echo "$as_me:15388: result: yes" >&5
15389 echo "${ECHO_T}yes" >&6
15390 else    echo "$as_me:15390: result: no" >&5
15391 echo "${ECHO_T}no" >&6
15392 fi
15393
15394 echo "$as_me:15394: checking for size of bool" >&5
15395 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15396 if test "${cf_cv_type_of_bool+set}" = set; then
15397   echo $ECHO_N "(cached) $ECHO_C" >&6
15398 else
15399
15400         rm -f cf_test.out
15401         if test "$cross_compiling" = yes; then
15402   cf_cv_type_of_bool=unknown
15403 else
15404   cat >conftest.$ac_ext <<_ACEOF
15405 #line 15405 "configure"
15406 #include "confdefs.h"
15407
15408 #include <stdlib.h>
15409 #include <stdio.h>
15410
15411 #if defined(__cplusplus)
15412
15413 #ifdef HAVE_GXX_BUILTIN_H
15414 #include <g++/builtin.h>
15415 #elif HAVE_GPP_BUILTIN_H
15416 #include <gpp/builtin.h>
15417 #elif HAVE_BUILTIN_H
15418 #include <builtin.h>
15419 #endif
15420
15421 #else
15422
15423 #if $cf_cv_header_stdbool_h
15424 #include <stdbool.h>
15425 #endif
15426
15427 #endif
15428
15429 main()
15430 {
15431         FILE *fp = fopen("cf_test.out", "w");
15432         if (fp != 0) {
15433                 bool x = true;
15434                 if ((bool)(-x) >= 0)
15435                         fputs("unsigned ", fp);
15436                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15437                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15438                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15439                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15440                 fclose(fp);
15441         }
15442         ${cf_cv_main_return:-return}(0);
15443 }
15444
15445 _ACEOF
15446 rm -f conftest$ac_exeext
15447 if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
15448   (eval $ac_link) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15452   { (eval echo "$as_me:15452: \"$ac_try\"") >&5
15453   (eval $ac_try) 2>&5
15454   ac_status=$?
15455   echo "$as_me:15455: \$? = $ac_status" >&5
15456   (exit $ac_status); }; }; then
15457   cf_cv_type_of_bool=`cat cf_test.out`
15458                  if test -z "$cf_cv_type_of_bool"; then
15459                    cf_cv_type_of_bool=unknown
15460                  fi
15461 else
15462   echo "$as_me: program exited with status $ac_status" >&5
15463 echo "$as_me: failed program was:" >&5
15464 cat conftest.$ac_ext >&5
15465 cf_cv_type_of_bool=unknown
15466 fi
15467 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15468 fi
15469
15470 fi
15471
15472         rm -f cf_test.out
15473 echo "$as_me:15473: result: $cf_cv_type_of_bool" >&5
15474 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15475 if test "$cf_cv_type_of_bool" = unknown ; then
15476         case .$NCURSES_BOOL in #(vi
15477         .auto|.) NCURSES_BOOL=unsigned;;
15478         esac
15479         { echo "$as_me:15479: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15480 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15481         cf_cv_type_of_bool=$NCURSES_BOOL
15482 fi
15483
15484 echo "$as_me:15484: checking for special defines needed for etip.h" >&5
15485 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15486 cf_save_CXXFLAGS="$CXXFLAGS"
15487 cf_result="none"
15488 for cf_math in "" MATH_H
15489 do
15490 for cf_excp in "" MATH_EXCEPTION
15491 do
15492         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15493         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15494         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15495 cat >conftest.$ac_ext <<_ACEOF
15496 #line 15496 "configure"
15497 #include "confdefs.h"
15498
15499 #include <etip.h.in>
15500
15501 int
15502 main ()
15503 {
15504
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext
15510 if { (eval echo "$as_me:15510: \"$ac_compile\"") >&5
15511   (eval $ac_compile) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); } &&
15515          { ac_try='test -s conftest.$ac_objext'
15516   { (eval echo "$as_me:15516: \"$ac_try\"") >&5
15517   (eval $ac_try) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); }; }; then
15521
15522         test -n "$cf_math" && cat >>confdefs.h <<EOF
15523 #define ETIP_NEEDS_${cf_math} 1
15524 EOF
15525
15526         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15527 #define ETIP_NEEDS_${cf_excp} 1
15528 EOF
15529
15530         cf_result="$cf_math $cf_excp"
15531         break
15532
15533 else
15534   echo "$as_me: failed program was:" >&5
15535 cat conftest.$ac_ext >&5
15536 fi
15537 rm -f conftest.$ac_objext conftest.$ac_ext
15538 done
15539 done
15540 echo "$as_me:15540: result: $cf_result" >&5
15541 echo "${ECHO_T}$cf_result" >&6
15542 CXXFLAGS="$cf_save_CXXFLAGS"
15543
15544 if test -n "$CXX"; then
15545 echo "$as_me:15545: checking if $CXX accepts parameter initialization" >&5
15546 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15547 if test "${cf_cv_cpp_param_init+set}" = set; then
15548   echo $ECHO_N "(cached) $ECHO_C" >&6
15549 else
15550
15551         ac_ext=cc
15552 ac_cpp='$CXXCPP $CPPFLAGS'
15553 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15554 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15555 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15556 ac_main_return=return
15557
15558         if test "$cross_compiling" = yes; then
15559   cf_cv_cpp_param_init=unknown
15560 else
15561   cat >conftest.$ac_ext <<_ACEOF
15562 #line 15562 "configure"
15563 #include "confdefs.h"
15564
15565 class TEST {
15566 private:
15567         int value;
15568 public:
15569         TEST(int x = 1);
15570         ~TEST();
15571 };
15572
15573 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15574 {
15575         value = x;
15576 }
15577 void main() { }
15578
15579 _ACEOF
15580 rm -f conftest$ac_exeext
15581 if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
15582   (eval $ac_link) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15586   { (eval echo "$as_me:15586: \"$ac_try\"") >&5
15587   (eval $ac_try) 2>&5
15588   ac_status=$?
15589   echo "$as_me:15589: \$? = $ac_status" >&5
15590   (exit $ac_status); }; }; then
15591   cf_cv_cpp_param_init=yes
15592 else
15593   echo "$as_me: program exited with status $ac_status" >&5
15594 echo "$as_me: failed program was:" >&5
15595 cat conftest.$ac_ext >&5
15596 cf_cv_cpp_param_init=no
15597 fi
15598 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15599 fi
15600         ac_ext=cc
15601 ac_cpp='$CXXCPP $CPPFLAGS'
15602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15603 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15605 ac_main_return=return
15606
15607 fi
15608 echo "$as_me:15608: result: $cf_cv_cpp_param_init" >&5
15609 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15610 fi
15611 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15612 #define CPP_HAS_PARAM_INIT 1
15613 EOF
15614
15615 if test -n "$CXX"; then
15616
15617 echo "$as_me:15617: checking if $CXX accepts static_cast" >&5
15618 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15619 if test "${cf_cv_cpp_static_cast+set}" = set; then
15620   echo $ECHO_N "(cached) $ECHO_C" >&6
15621 else
15622
15623         ac_ext=cc
15624 ac_cpp='$CXXCPP $CPPFLAGS'
15625 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15626 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15627 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15628 ac_main_return=return
15629
15630         cat >conftest.$ac_ext <<_ACEOF
15631 #line 15631 "configure"
15632 #include "confdefs.h"
15633
15634 class NCursesPanel
15635 {
15636 public:
15637   NCursesPanel(int nlines,
15638                int ncols,
15639                int begin_y = 0,
15640                int begin_x = 0)
15641   {
15642   }
15643
15644   ~NCursesPanel();
15645 };
15646
15647 template<class T> class NCursesUserPanel : public NCursesPanel
15648 {
15649 public:
15650   NCursesUserPanel (int nlines,
15651                     int ncols,
15652                     int begin_y = 0,
15653                     int begin_x = 0,
15654                     const T* p_UserData = static_cast<T*>(0))
15655     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15656   {
15657   };
15658   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15659   {
15660   };
15661
15662   virtual ~NCursesUserPanel() {};
15663 };
15664
15665 int
15666 main ()
15667 {
15668
15669         const char* p_UserData = static_cast<char*>(0)
15670   ;
15671   return 0;
15672 }
15673 _ACEOF
15674 rm -f conftest.$ac_objext
15675 if { (eval echo "$as_me:15675: \"$ac_compile\"") >&5
15676   (eval $ac_compile) 2>&5
15677   ac_status=$?
15678   echo "$as_me:15678: \$? = $ac_status" >&5
15679   (exit $ac_status); } &&
15680          { ac_try='test -s conftest.$ac_objext'
15681   { (eval echo "$as_me:15681: \"$ac_try\"") >&5
15682   (eval $ac_try) 2>&5
15683   ac_status=$?
15684   echo "$as_me:15684: \$? = $ac_status" >&5
15685   (exit $ac_status); }; }; then
15686   cf_cv_cpp_static_cast=yes
15687 else
15688   echo "$as_me: failed program was:" >&5
15689 cat conftest.$ac_ext >&5
15690 cf_cv_cpp_static_cast=no
15691 fi
15692 rm -f conftest.$ac_objext conftest.$ac_ext
15693
15694         ac_ext=cc
15695 ac_cpp='$CXXCPP $CPPFLAGS'
15696 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15697 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15698 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15699 ac_main_return=return
15700
15701 fi
15702 echo "$as_me:15702: result: $cf_cv_cpp_static_cast" >&5
15703 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15704
15705 fi
15706
15707 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15708 #define CPP_HAS_STATIC_CAST 1
15709 EOF
15710
15711         CXX_AR='$(AR)'
15712         CXX_AR_OPTS='$(AR_OPTS)'
15713         case $cf_cv_system_name in #(vi
15714         irix*) #(vi
15715             if test "$GXX" != yes ; then
15716                 CXX_AR='$(CXX)'
15717                 CXX_AR_OPTS='-ar -o'
15718             fi
15719             ;;
15720         sco3.2v5*) #(vi
15721             CXXLDFLAGS="-u main"
15722             ;;
15723         solaris2*)
15724             if test "$GXX" != yes ; then
15725                 CXX_AR='$(CXX)'
15726                 CXX_AR_OPTS='-xar -o'
15727             fi
15728             ;;
15729         esac
15730
15731 else
15732         cf_cxx_library=no
15733         cf_cv_builtin_bool=1
15734
15735         # Just because we are not configuring against C++ right now does not
15736         # mean that a user will not want to use C++.  Some distributors disable
15737         # the C++ portion of this configuration as a shortcut (or just to avoid
15738         # compiling the demo in the c++ directory).  So we need a reasonable
15739         # default for the 'bool' type.
15740         #
15741         # Caveat: since the storage of the bool type is not standardized, it
15742         # may change.
15743
15744         if test "$NCURSES_BOOL" != auto ; then
15745                 cf_cv_type_of_bool=$NCURSES_BOOL
15746                 cf_cv_header_stdbool_h=0
15747         else
15748                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15749
15750 echo "$as_me:15750: checking for size of bool" >&5
15751 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15752 if test "${cf_cv_type_of_bool+set}" = set; then
15753   echo $ECHO_N "(cached) $ECHO_C" >&6
15754 else
15755
15756         rm -f cf_test.out
15757         if test "$cross_compiling" = yes; then
15758   cf_cv_type_of_bool=unknown
15759 else
15760   cat >conftest.$ac_ext <<_ACEOF
15761 #line 15761 "configure"
15762 #include "confdefs.h"
15763
15764 #include <stdlib.h>
15765 #include <stdio.h>
15766
15767 #if defined(__cplusplus)
15768
15769 #ifdef HAVE_GXX_BUILTIN_H
15770 #include <g++/builtin.h>
15771 #elif HAVE_GPP_BUILTIN_H
15772 #include <gpp/builtin.h>
15773 #elif HAVE_BUILTIN_H
15774 #include <builtin.h>
15775 #endif
15776
15777 #else
15778
15779 #if $cf_cv_header_stdbool_h
15780 #include <stdbool.h>
15781 #endif
15782
15783 #endif
15784
15785 main()
15786 {
15787         FILE *fp = fopen("cf_test.out", "w");
15788         if (fp != 0) {
15789                 bool x = true;
15790                 if ((bool)(-x) >= 0)
15791                         fputs("unsigned ", fp);
15792                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15793                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15794                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15795                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15796                 fclose(fp);
15797         }
15798         ${cf_cv_main_return:-return}(0);
15799 }
15800
15801 _ACEOF
15802 rm -f conftest$ac_exeext
15803 if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
15804   (eval $ac_link) 2>&5
15805   ac_status=$?
15806   echo "$as_me:15806: \$? = $ac_status" >&5
15807   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15808   { (eval echo "$as_me:15808: \"$ac_try\"") >&5
15809   (eval $ac_try) 2>&5
15810   ac_status=$?
15811   echo "$as_me:15811: \$? = $ac_status" >&5
15812   (exit $ac_status); }; }; then
15813   cf_cv_type_of_bool=`cat cf_test.out`
15814                  if test -z "$cf_cv_type_of_bool"; then
15815                    cf_cv_type_of_bool=unknown
15816                  fi
15817 else
15818   echo "$as_me: program exited with status $ac_status" >&5
15819 echo "$as_me: failed program was:" >&5
15820 cat conftest.$ac_ext >&5
15821 cf_cv_type_of_bool=unknown
15822 fi
15823 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15824 fi
15825
15826 fi
15827
15828         rm -f cf_test.out
15829 echo "$as_me:15829: result: $cf_cv_type_of_bool" >&5
15830 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15831 if test "$cf_cv_type_of_bool" = unknown ; then
15832         case .$NCURSES_BOOL in #(vi
15833         .auto|.) NCURSES_BOOL=unsigned;;
15834         esac
15835         { echo "$as_me:15835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15836 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15837         cf_cv_type_of_bool=$NCURSES_BOOL
15838 fi
15839
15840                 else
15841                         echo "$as_me:15841: checking for fallback type of bool" >&5
15842 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15843                         case "$host_cpu" in #(vi
15844                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15845                         *)      cf_cv_type_of_bool=int  ;;
15846                         esac
15847                         echo "$as_me:15847: result: $cf_cv_type_of_bool" >&5
15848 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15849                 fi
15850         fi
15851 fi
15852
15853 # If the C compiler did not declare bool, and we did not determine that the C++
15854 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15855 # ncurses library use the same type as C++ bool.  Note that this allows one to
15856 # specify the type of bool in a configure-script option and postpone
15857 # integration with the C++ compiler provided that the types are compatible.
15858 USE_CXX_BOOL=1
15859 if test $cf_cv_cc_bool_type = 1
15860 then
15861         # oops: C has a bool.  Unlikely, but C++ could differ.
15862         USE_CXX_BOOL=0
15863 elif test $cf_cv_builtin_bool = 0
15864 then
15865         # C++ has no bool
15866         USE_CXX_BOOL=0
15867 else
15868         # this is the normal case
15869         USE_CXX_BOOL='defined(__cplusplus)'
15870 fi
15871
15872 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15873
15874 if test "$cf_with_ada" != "no" ; then
15875     if test "$with_libtool" != "no"; then
15876         { echo "$as_me:15876: WARNING: libtool does not support Ada - disabling feature" >&5
15877 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15878         cf_with_ada=no
15879     fi
15880 fi
15881
15882 if test "$cf_with_ada" != "no" ; then
15883 cf_ada_make=gnatmake
15884 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15885 set dummy $cf_ada_make; ac_word=$2
15886 echo "$as_me:15886: checking for $ac_word" >&5
15887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15888 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15889   echo $ECHO_N "(cached) $ECHO_C" >&6
15890 else
15891   if test -n "$gnat_exists"; then
15892   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15893 else
15894   ac_save_IFS=$IFS; IFS=$ac_path_separator
15895 ac_dummy="$PATH"
15896 for ac_dir in $ac_dummy; do
15897   IFS=$ac_save_IFS
15898   test -z "$ac_dir" && ac_dir=.
15899   $as_executable_p "$ac_dir/$ac_word" || continue
15900 ac_cv_prog_gnat_exists="yes"
15901 echo "$as_me:15901: found $ac_dir/$ac_word" >&5
15902 break
15903 done
15904
15905   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15906 fi
15907 fi
15908 gnat_exists=$ac_cv_prog_gnat_exists
15909 if test -n "$gnat_exists"; then
15910   echo "$as_me:15910: result: $gnat_exists" >&5
15911 echo "${ECHO_T}$gnat_exists" >&6
15912 else
15913   echo "$as_me:15913: result: no" >&5
15914 echo "${ECHO_T}no" >&6
15915 fi
15916
15917 if test "$ac_cv_prog_gnat_exists" = no; then
15918    cf_ada_make=
15919 else
15920
15921 echo "$as_me:15921: checking for gnat version" >&5
15922 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15923 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15924   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15925 echo "$as_me:15925: result: $cf_gnat_version" >&5
15926 echo "${ECHO_T}$cf_gnat_version" >&6
15927
15928 case $cf_gnat_version in
15929   3.1[1-9]*|3.[2-9]*|[4-9].*)
15930     cf_cv_prog_gnat_correct=yes
15931     ;;
15932   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15933      cf_cv_prog_gnat_correct=no
15934      ;;
15935 esac
15936 case $cf_gnat_version in
15937   3.[1-9]*|[4-9].*)
15938       cf_compile_generics=generics
15939       cf_generic_objects="\${GENOBJS}"
15940       ;;
15941   *)  cf_compile_generics=
15942       cf_generic_objects=
15943       ;;
15944 esac
15945
15946    # Extract the first word of "m4", so it can be a program name with args.
15947 set dummy m4; ac_word=$2
15948 echo "$as_me:15948: checking for $ac_word" >&5
15949 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15950 if test "${ac_cv_prog_M4_exists+set}" = set; then
15951   echo $ECHO_N "(cached) $ECHO_C" >&6
15952 else
15953   if test -n "$M4_exists"; then
15954   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15955 else
15956   ac_save_IFS=$IFS; IFS=$ac_path_separator
15957 ac_dummy="$PATH"
15958 for ac_dir in $ac_dummy; do
15959   IFS=$ac_save_IFS
15960   test -z "$ac_dir" && ac_dir=.
15961   $as_executable_p "$ac_dir/$ac_word" || continue
15962 ac_cv_prog_M4_exists="yes"
15963 echo "$as_me:15963: found $ac_dir/$ac_word" >&5
15964 break
15965 done
15966
15967   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15968 fi
15969 fi
15970 M4_exists=$ac_cv_prog_M4_exists
15971 if test -n "$M4_exists"; then
15972   echo "$as_me:15972: result: $M4_exists" >&5
15973 echo "${ECHO_T}$M4_exists" >&6
15974 else
15975   echo "$as_me:15975: result: no" >&5
15976 echo "${ECHO_T}no" >&6
15977 fi
15978
15979    if test "$ac_cv_prog_M4_exists" = no; then
15980       cf_cv_prog_gnat_correct=no
15981       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15982    fi
15983    if test "$cf_cv_prog_gnat_correct" = yes; then
15984       echo "$as_me:15984: checking if GNAT works" >&5
15985 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15986
15987 rm -f conftest*
15988 cat >>conftest.ads <<CF_EOF
15989 procedure conftest;
15990 CF_EOF
15991 cat >>conftest.adb <<CF_EOF
15992 with Text_IO;
15993 with GNAT.OS_Lib;
15994 procedure conftest is
15995 begin
15996    Text_IO.Put ("Hello World");
15997    Text_IO.New_Line;
15998    GNAT.OS_Lib.OS_Exit (0);
15999 end conftest;
16000 CF_EOF
16001 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16002    if ( ./conftest 1>&5 2>&1 ) ; then
16003       cf_cv_prog_gnat_correct=yes
16004    else
16005       cf_cv_prog_gnat_correct=no
16006    fi
16007 else
16008    cf_cv_prog_gnat_correct=no
16009 fi
16010 rm -f conftest*
16011
16012       echo "$as_me:16012: result: $cf_cv_prog_gnat_correct" >&5
16013 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16014    fi
16015 fi
16016 if test "$cf_cv_prog_gnat_correct" = yes; then
16017    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16018
16019    echo "$as_me:16019: checking if GNAT pragma Unreferenced works" >&5
16020 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16021
16022 rm -f conftest*
16023 cat >>conftest.ads <<CF_EOF
16024 procedure conftest;
16025 CF_EOF
16026 cat >>conftest.adb <<CF_EOF
16027 with Text_IO;
16028 with GNAT.OS_Lib;
16029 procedure conftest is
16030    test : Integer;
16031    pragma Unreferenced (test);
16032 begin
16033    test := 1;
16034    Text_IO.Put ("Hello World");
16035    Text_IO.New_Line;
16036    GNAT.OS_Lib.OS_Exit (0);
16037 end conftest;
16038 CF_EOF
16039 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16040       cf_cv_pragma_unreferenced=yes
16041 else
16042    cf_cv_pragma_unreferenced=no
16043 fi
16044 rm -f conftest*
16045
16046    echo "$as_me:16046: result: $cf_cv_pragma_unreferenced" >&5
16047 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16048
16049    # if the pragma is supported, use it (needed in the Trace code).
16050    if test $cf_cv_pragma_unreferenced = yes ; then
16051       PRAGMA_UNREF=TRUE
16052    else
16053       PRAGMA_UNREF=FALSE
16054    fi
16055
16056 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16057 if test "${with_ada_compiler+set}" = set; then
16058   withval="$with_ada_compiler"
16059   cf_ada_compiler=$withval
16060 else
16061   cf_ada_compiler=gnatmake
16062 fi;
16063
16064    cf_ada_package=terminal_interface
16065
16066 # Check whether --with-ada-include or --without-ada-include was given.
16067 if test "${with_ada_include+set}" = set; then
16068   withval="$with_ada_include"
16069
16070 else
16071   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16072 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16073
16074 if test "x$prefix" != xNONE; then
16075   cf_path_syntax="$prefix"
16076 else
16077   cf_path_syntax="$ac_default_prefix"
16078 fi
16079
16080 case ".$withval" in #(vi
16081 .\$\(*\)*|.\'*\'*) #(vi
16082   ;;
16083 ..|./*|.\\*) #(vi
16084   ;;
16085 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16086   ;;
16087 .\${*prefix}*) #(vi
16088   eval withval="$withval"
16089   case ".$withval" in #(vi
16090   .NONE/*)
16091     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16092     ;;
16093   esac
16094   ;; #(vi
16095 .no|.NONE/*)
16096   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16097   ;;
16098 *)
16099   { { echo "$as_me:16099: error: expected a pathname, not \"$withval\"" >&5
16100 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16101    { (exit 1); exit 1; }; }
16102   ;;
16103 esac
16104
16105 fi
16106 ADA_INCLUDE="$withval"
16107
16108 # Check whether --with-ada-objects or --without-ada-objects was given.
16109 if test "${with_ada_objects+set}" = set; then
16110   withval="$with_ada_objects"
16111
16112 else
16113   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16114 fi; if test -n "$prefix/lib/ada/adalib" ; then
16115
16116 if test "x$prefix" != xNONE; then
16117   cf_path_syntax="$prefix"
16118 else
16119   cf_path_syntax="$ac_default_prefix"
16120 fi
16121
16122 case ".$withval" in #(vi
16123 .\$\(*\)*|.\'*\'*) #(vi
16124   ;;
16125 ..|./*|.\\*) #(vi
16126   ;;
16127 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16128   ;;
16129 .\${*prefix}*) #(vi
16130   eval withval="$withval"
16131   case ".$withval" in #(vi
16132   .NONE/*)
16133     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16134     ;;
16135   esac
16136   ;; #(vi
16137 .no|.NONE/*)
16138   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16139   ;;
16140 *)
16141   { { echo "$as_me:16141: error: expected a pathname, not \"$withval\"" >&5
16142 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16143    { (exit 1); exit 1; }; }
16144   ;;
16145 esac
16146
16147 fi
16148 ADA_OBJECTS="$withval"
16149
16150 fi
16151 fi
16152 else
16153    cf_with_ada=no
16154 fi
16155
16156 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16157 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16158 ###
16159 ### ticlib modules may be a separate library, otherwise contained in termlib.
16160 ### termlib modules may be a separate library, otherwise contained in ncurses.
16161 ###
16162 ### The of "+" or " " between the tokens controls the way the script
16163 ### chooses to split module lists into libraries.
16164 ###
16165 ### (see CF_LIB_RULES).
16166 echo "$as_me:16166: checking for library subsets" >&5
16167 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16168 LIB_SUBSETS=
16169
16170 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16171         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16172         if test "$with_ticlib" != no ; then
16173                 LIB_SUBSETS="${LIB_SUBSETS} "
16174         else
16175                 LIB_SUBSETS="${LIB_SUBSETS}+"
16176         fi
16177 fi
16178
16179 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16180 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16181 if test "$with_termlib" != no ; then
16182         LIB_SUBSETS="${LIB_SUBSETS} "
16183 else
16184         LIB_SUBSETS="${LIB_SUBSETS}+"
16185 fi
16186
16187 LIB_SUBSETS="${LIB_SUBSETS}base"
16188 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16189 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16190
16191 echo "$as_me:16191: result: $LIB_SUBSETS" >&5
16192 echo "${ECHO_T}$LIB_SUBSETS" >&6
16193
16194 ### Construct the list of include-directories to be generated
16195
16196 CPPFLAGS="-I. -I../include $CPPFLAGS"
16197 if test "$srcdir" != "."; then
16198         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16199 fi
16200 if test "$GCC" != yes; then
16201         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16202 elif test "$includedir" != "/usr/include"; then
16203         if test "$includedir" = '${prefix}/include' ; then
16204                 if test $prefix != /usr ; then
16205                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16206                 fi
16207         else
16208                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16209         fi
16210 fi
16211
16212 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16213 if test "$srcdir" != "."; then
16214         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16215 fi
16216 if test "$GCC" != yes; then
16217         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16218 elif test "$includedir" != "/usr/include"; then
16219         if test "$includedir" = '${prefix}/include' ; then
16220                 if test $prefix != /usr ; then
16221                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16222                 fi
16223         else
16224                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16225         fi
16226 fi
16227
16228 ### Build up pieces for makefile rules
16229 echo "$as_me:16229: checking default library suffix" >&5
16230 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16231
16232         case $DFT_LWR_MODEL in
16233         libtool) DFT_ARG_SUFFIX=''   ;;
16234         normal)  DFT_ARG_SUFFIX=''   ;;
16235         debug)   DFT_ARG_SUFFIX='_g' ;;
16236         profile) DFT_ARG_SUFFIX='_p' ;;
16237         shared)  DFT_ARG_SUFFIX=''   ;;
16238         esac
16239         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16240 echo "$as_me:16240: result: $DFT_ARG_SUFFIX" >&5
16241 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16242
16243 echo "$as_me:16243: checking default library-dependency suffix" >&5
16244 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16245
16246         case $DFT_LWR_MODEL in
16247         libtool)
16248                 DFT_LIB_SUFFIX='.la'
16249                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16250                 ;;
16251         normal)
16252                 DFT_LIB_SUFFIX='.a'
16253                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16254                 ;;
16255         debug)
16256                 DFT_LIB_SUFFIX='_g.a'
16257                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16258                 ;;
16259         profile)
16260                 DFT_LIB_SUFFIX='_p.a'
16261                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16262                 ;;
16263         shared)
16264                 case $cf_cv_system_name in
16265                 cygwin*)
16266                         DFT_LIB_SUFFIX='.dll'
16267                         DFT_DEP_SUFFIX='.dll.a'
16268                         ;;
16269                 darwin*)
16270                         DFT_LIB_SUFFIX='.dylib'
16271                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16272                         ;;
16273                 hpux*)
16274                         case $target in
16275                         ia64*)
16276                                 DFT_LIB_SUFFIX='.so'
16277                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16278                                 ;;
16279                         *)
16280                                 DFT_LIB_SUFFIX='.sl'
16281                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16282                                 ;;
16283                         esac
16284                         ;;
16285                 *)      DFT_LIB_SUFFIX='.so'
16286                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16287                         ;;
16288                 esac
16289         esac
16290         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16291         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16292 echo "$as_me:16292: result: $DFT_DEP_SUFFIX" >&5
16293 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16294
16295 echo "$as_me:16295: checking default object directory" >&5
16296 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16297
16298         case $DFT_LWR_MODEL in
16299         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16300         normal)  DFT_OBJ_SUBDIR='objects' ;;
16301         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16302         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16303         shared)
16304                 case $cf_cv_system_name in #(vi
16305                 cygwin) #(vi
16306                         DFT_OBJ_SUBDIR='objects' ;;
16307                 *)
16308                         DFT_OBJ_SUBDIR='obj_s' ;;
16309                 esac
16310         esac
16311 echo "$as_me:16311: result: $DFT_OBJ_SUBDIR" >&5
16312 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16313
16314 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16315 if test "$cf_with_cxx" = yes ; then
16316 echo "$as_me:16316: checking c++ library-dependency suffix" >&5
16317 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16318 if test "$with_libtool" != "no"; then
16319         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16320 else
16321
16322         case normal in
16323         libtool)
16324                 CXX_LIB_SUFFIX='.la'
16325                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16326                 ;;
16327         normal)
16328                 CXX_LIB_SUFFIX='.a'
16329                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16330                 ;;
16331         debug)
16332                 CXX_LIB_SUFFIX='_g.a'
16333                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16334                 ;;
16335         profile)
16336                 CXX_LIB_SUFFIX='_p.a'
16337                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16338                 ;;
16339         shared)
16340                 case $cf_cv_system_name in
16341                 cygwin*)
16342                         CXX_LIB_SUFFIX='.dll'
16343                         CXX_DEP_SUFFIX='.dll.a'
16344                         ;;
16345                 darwin*)
16346                         CXX_LIB_SUFFIX='.dylib'
16347                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16348                         ;;
16349                 hpux*)
16350                         case $target in
16351                         ia64*)
16352                                 CXX_LIB_SUFFIX='.so'
16353                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16354                                 ;;
16355                         *)
16356                                 CXX_LIB_SUFFIX='.sl'
16357                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16358                                 ;;
16359                         esac
16360                         ;;
16361                 *)      CXX_LIB_SUFFIX='.so'
16362                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16363                         ;;
16364                 esac
16365         esac
16366         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16367         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16368 fi
16369 echo "$as_me:16369: result: $CXX_LIB_SUFFIX" >&5
16370 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16371
16372 fi
16373
16374 # do not want -ldl in build except as needed for -lncurses dependency
16375 if test "$with_dlsym" = yes ; then
16376 if test $DFT_LWR_MODEL = shared || \
16377    test $DFT_LWR_MODEL = libtool ; then
16378
16379 # remove dl library from $LIBS
16380 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16381
16382 fi
16383 fi
16384 ### Set up low-level terminfo dependencies for makefiles.
16385
16386 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16387 # do not need libdl
16388 TICS_LIST=
16389 if test "$with_dlsym" = yes ; then
16390
16391 # remove dl library from $SHLIB_LIST
16392 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16393
16394 fi
16395
16396 if test "$with_ticlib" != no ; then
16397
16398         if test "$with_ticlib" != yes ; then
16399                 TICS_NAME=$with_ticlib
16400                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16401                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16402                 TICS_LIB_SUFFIX="${with_ticlib}"
16403         else
16404                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16405                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16406                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16407         fi
16408         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16409 else
16410         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16411 fi
16412
16413 if test "$with_termlib" != no ; then
16414
16415         if test "$with_termlib" != yes ; then
16416                 TINFO_NAME=$with_termlib
16417                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16418                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16419                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16420                 TINFO_LIB_SUFFIX="${with_termlib}"
16421         else
16422                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16423                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16424                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16425                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16426         fi
16427
16428         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16429         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16430         if test "$DFT_LWR_MODEL" = "libtool"; then
16431                 TEST_ARGS="${TEST_DEPS}"
16432                 TEST_ARG2="${TEST_DEP2}"
16433                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16434         else
16435                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16436                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16437                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16438                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16439                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16440         fi
16441 else
16442         # the next lines are needed for linking libtic over libncurses
16443         TINFO_NAME=${LIB_NAME}
16444         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16445         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16446         if test "$with_tic_depends" = yes ; then
16447                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16448         else
16449                 TICS_LIST="$SHLIB_LIST"
16450         fi
16451
16452         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16453 fi
16454
16455 if test "$DFT_LWR_MODEL" = shared ; then
16456         case $cf_cv_system_name in #(vi
16457         cygwin*)
16458                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16459                 TINFO_SUFFIX=.dll
16460                 ;;
16461         esac
16462 fi
16463
16464 if test "$with_dlsym" = yes ; then
16465
16466 # remove dl library from $TICS_LIST
16467 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16468
16469 fi
16470
16471 if test "$DFT_LWR_MODEL" = "libtool"; then
16472     OBJEXT=lo
16473 fi
16474
16475 # needed for Ada95
16476 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16477
16478 case $DFT_LWR_MODEL in
16479 normal|debug|profile)
16480
16481 if test "$GCC" = yes ; then
16482         case $cf_cv_system_name in #(
16483         OS/2*|os2*|aix[45]*)    #( vi
16484                 LDFLAGS_STATIC=
16485                 LDFLAGS_SHARED=
16486                 ;;
16487     *)  #( normally, except when broken
16488         LDFLAGS_STATIC=-static
16489         LDFLAGS_SHARED=-dynamic
16490         ;;
16491     esac
16492 else
16493         case $cf_cv_system_name in #(
16494         aix[45]*)       #( from ld manpage
16495                 LDFLAGS_STATIC=-bstatic
16496                 LDFLAGS_SHARED=-bdynamic
16497                 ;;
16498         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16499                 # We could also use just "archive" and "shared".
16500                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16501                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16502                 ;;
16503         irix*)          #( from ld manpage IRIX64
16504                 LDFLAGS_STATIC=-Bstatic
16505                 LDFLAGS_SHARED=-Bdynamic
16506                 ;;
16507         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16508                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16509                 LDFLAGS_STATIC=-noso
16510                 LDFLAGS_SHARED=-so_archive
16511                 ;;
16512         solaris2*)
16513                 LDFLAGS_STATIC=-Bstatic
16514                 LDFLAGS_SHARED=-Bdynamic
16515                 ;;
16516         esac
16517 fi
16518
16519         ;;
16520 esac
16521
16522 echo "$as_me:16522: checking where we will install curses.h" >&5
16523 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16524 test "$with_overwrite" = no && \
16525 test "x$includedir" = 'x${prefix}/include' && \
16526         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16527 echo "$as_me:16527: result: $includedir" >&5
16528 echo "${ECHO_T}$includedir" >&6
16529
16530 ### Resolve a conflict between normal and wide-curses by forcing applications
16531 ### that will need libutf8 to add it to their configure script.
16532 if test "$with_overwrite" != no ; then
16533 if test "$NCURSES_LIBUTF8" = 1 ; then
16534         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16535         { echo "$as_me:16535: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16536 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16537 fi
16538 fi
16539
16540 # used to separate tack out of the tree
16541 NCURSES_TREE=
16542
16543 ### predefined stuff for the test programs
16544 cat >>confdefs.h <<\EOF
16545 #define HAVE_SLK_COLOR 1
16546 EOF
16547
16548 ### Construct the list of subdirectories for which we'll customize makefiles
16549 ### with the appropriate compile-rules.
16550
16551 echo "$as_me:16551: checking for src modules" >&5
16552 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16553
16554 # dependencies and linker-arguments for test-programs
16555 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16556 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16557 if test "$DFT_LWR_MODEL" = "libtool"; then
16558         TEST_ARGS="${TEST_DEPS}"
16559         TEST_ARG2="${TEST_DEP2}"
16560 else
16561         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16562         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16563 fi
16564
16565 cf_cv_src_modules=
16566 for cf_dir in $modules_to_build
16567 do
16568         if test -f $srcdir/$cf_dir/modules; then
16569
16570                 # We may/may not have tack in the distribution, though the
16571                 # makefile is.
16572                 if test $cf_dir = tack ; then
16573                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16574                                 continue
16575                         fi
16576                 fi
16577
16578                 if test -z "$cf_cv_src_modules"; then
16579                         cf_cv_src_modules=$cf_dir
16580                 else
16581                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16582                 fi
16583
16584                 # Make the ncurses_cfg.h file record the library interface files as
16585                 # well.  These are header files that are the same name as their
16586                 # directory.  Ncurses is the only library that does not follow
16587                 # that pattern.
16588                 if test $cf_dir = tack ; then
16589                         continue
16590                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16591
16592 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16593
16594                         cat >>confdefs.h <<EOF
16595 #define HAVE_${cf_have_include}_H 1
16596 EOF
16597
16598                         cat >>confdefs.h <<EOF
16599 #define HAVE_LIB${cf_have_include} 1
16600 EOF
16601
16602                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16603                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16604                         if test "$DFT_LWR_MODEL" = "libtool"; then
16605                                 TEST_ARGS="${TEST_DEPS}"
16606                                 TEST_ARG2="${TEST_DEP2}"
16607                         else
16608                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16609                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16610                         fi
16611                 fi
16612         fi
16613 done
16614 echo "$as_me:16614: result: $cf_cv_src_modules" >&5
16615 echo "${ECHO_T}$cf_cv_src_modules" >&6
16616
16617 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16618 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16619
16620 SRC_SUBDIRS="man include"
16621 for cf_dir in $cf_cv_src_modules
16622 do
16623         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16624 done
16625 SRC_SUBDIRS="$SRC_SUBDIRS test"
16626 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16627 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16628
16629 ADA_SUBDIRS=
16630 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16631    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16632    ADA_SUBDIRS="gen src samples"
16633 fi
16634
16635 SUB_MAKEFILES=
16636 for cf_dir in $SRC_SUBDIRS
16637 do
16638         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16639 done
16640
16641 if test -n "$ADA_SUBDIRS"; then
16642    for cf_dir in $ADA_SUBDIRS
16643    do
16644       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16645    done
16646
16647 fi
16648
16649 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16650    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16651 fi
16652
16653 DIRS_TO_MAKE="lib"
16654 for cf_item in $cf_list_models
16655 do
16656
16657         case $cf_item in
16658         libtool) cf_subdir='obj_lo'  ;;
16659         normal)  cf_subdir='objects' ;;
16660         debug)   cf_subdir='obj_g' ;;
16661         profile) cf_subdir='obj_p' ;;
16662         shared)
16663                 case $cf_cv_system_name in #(vi
16664                 cygwin) #(vi
16665                         cf_subdir='objects' ;;
16666                 *)
16667                         cf_subdir='obj_s' ;;
16668                 esac
16669         esac
16670
16671         for cf_item2 in $DIRS_TO_MAKE
16672         do
16673                 test $cf_item2 = $cf_subdir && break
16674         done
16675         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16676 done
16677 for cf_dir in $DIRS_TO_MAKE
16678 do
16679         test ! -d $cf_dir && mkdir $cf_dir
16680 done
16681
16682 cat >>confdefs.h <<EOF
16683 #define NCURSES_PATHSEP '$PATHSEP'
16684 EOF
16685
16686 cat >>confdefs.h <<EOF
16687 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16688 EOF
16689
16690 ### Now that we're done running tests, add the compiler-warnings, if any
16691
16692 cf_fix_cppflags=no
16693 cf_new_cflags=
16694 cf_new_cppflags=
16695 cf_new_extra_cppflags=
16696
16697 for cf_add_cflags in $EXTRA_CFLAGS
16698 do
16699 case $cf_fix_cppflags in
16700 no)
16701         case $cf_add_cflags in #(vi
16702         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16703                 case $cf_add_cflags in
16704                 -D*)
16705                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16706
16707                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16708                         && test -z "${cf_tst_cflags}" \
16709                         && cf_fix_cppflags=yes
16710
16711                         if test $cf_fix_cppflags = yes ; then
16712                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16713                                 continue
16714                         elif test "${cf_tst_cflags}" = "\"'" ; then
16715                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16716                                 continue
16717                         fi
16718                         ;;
16719                 esac
16720                 case "$CPPFLAGS" in
16721                 *$cf_add_cflags) #(vi
16722                         ;;
16723                 *) #(vi
16724                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16725                         ;;
16726                 esac
16727                 ;;
16728         *)
16729                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16730                 ;;
16731         esac
16732         ;;
16733 yes)
16734         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16735
16736         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16737
16738         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16739         && test -z "${cf_tst_cflags}" \
16740         && cf_fix_cppflags=no
16741         ;;
16742 esac
16743 done
16744
16745 if test -n "$cf_new_cflags" ; then
16746
16747         CFLAGS="$CFLAGS $cf_new_cflags"
16748 fi
16749
16750 if test -n "$cf_new_cppflags" ; then
16751
16752         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16753 fi
16754
16755 if test -n "$cf_new_extra_cppflags" ; then
16756
16757         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16758 fi
16759
16760 ### If we're building with rpath, try to link non-standard libs that way too.
16761 if test "$DFT_LWR_MODEL" = "shared"; then
16762
16763 echo "$as_me:16763: checking for updated LDFLAGS" >&5
16764 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16765 if test -n "$LDFLAGS" ; then
16766 echo "$as_me:16766: result: maybe" >&5
16767 echo "${ECHO_T}maybe" >&6
16768 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16769
16770 echo "${as_me-configure}:16770: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16771
16772 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16773
16774 echo "${as_me-configure}:16774: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16775
16776 case "$EXTRA_LDFLAGS" in #(vi
16777 -Wl,-rpath,*) #(vi
16778         cf_rpath_hack="-Wl,-rpath,"
16779         ;;
16780 -R\ *)
16781         cf_rpath_hack="-R "
16782         ;;
16783 -R*)
16784         cf_rpath_hack="-R"
16785         ;;
16786 *)
16787         cf_rpath_hack=
16788         ;;
16789 esac
16790 if test -n "$cf_rpath_hack" ; then
16791         cf_rpath_dst=
16792         for cf_rpath_src in $LDFLAGS
16793         do
16794                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16795
16796 echo "${as_me-configure}:16796: testing Filtering $cf_rpath_src ..." 1>&5
16797
16798                 case $cf_rpath_src in #(vi
16799                 -L*) #(vi
16800                         if test "$cf_rpath_hack" = "-R " ; then
16801                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16802                         else
16803                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16804                         fi
16805                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
16806
16807 echo "${as_me-configure}:16807: testing ...Filter $cf_rpath_tmp ..." 1>&5
16808
16809                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16810                         ;;
16811                 esac
16812                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16813         done
16814         LDFLAGS=$cf_rpath_dst
16815         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16816
16817 echo "${as_me-configure}:16817: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16818
16819         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16820
16821 echo "${as_me-configure}:16821: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16822
16823 fi
16824 else
16825 echo "$as_me:16825: result: no" >&5
16826 echo "${ECHO_T}no" >&6
16827 fi
16828
16829 fi
16830
16831 ### Define substitutions for header files to avoid name-pollution
16832
16833 if test "$cf_cv_have_tcgetattr" = yes ; then
16834         HAVE_TCGETATTR=1
16835 else
16836         HAVE_TCGETATTR=0
16837 fi
16838
16839 if test "$ac_cv_header_termio_h" = yes ; then
16840         HAVE_TERMIO_H=1
16841 else
16842         HAVE_TERMIO_H=0
16843 fi
16844
16845 if test "$ac_cv_header_termios_h" = yes ; then
16846         HAVE_TERMIOS_H=1
16847 else
16848         HAVE_TERMIOS_H=0
16849 fi
16850
16851 ################################################################################
16852 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16853 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16854 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"
16855 ac_config_commands="$ac_config_commands default"
16856 cat >confcache <<\_ACEOF
16857 # This file is a shell script that caches the results of configure
16858 # tests run on this system so they can be shared between configure
16859 # scripts and configure runs, see configure's option --config-cache.
16860 # It is not useful on other systems.  If it contains results you don't
16861 # want to keep, you may remove or edit it.
16862 #
16863 # config.status only pays attention to the cache file if you give it
16864 # the --recheck option to rerun configure.
16865 #
16866 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16867 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16868 # following values.
16869
16870 _ACEOF
16871
16872 # The following way of writing the cache mishandles newlines in values,
16873 # but we know of no workaround that is simple, portable, and efficient.
16874 # So, don't put newlines in cache variables' values.
16875 # Ultrix sh set writes to stderr and can't be redirected directly,
16876 # and sets the high bit in the cache file unless we assign to the vars.
16877 {
16878   (set) 2>&1 |
16879     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16880     *ac_space=\ *)
16881       # `set' does not quote correctly, so add quotes (double-quote
16882       # substitution turns \\\\ into \\, and sed turns \\ into \).
16883       sed -n \
16884         "s/'/'\\\\''/g;
16885           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16886       ;;
16887     *)
16888       # `set' quotes correctly as required by POSIX, so do not add quotes.
16889       sed -n \
16890         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16891       ;;
16892     esac;
16893 } |
16894   sed '
16895      t clear
16896      : clear
16897      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16898      t end
16899      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16900      : end' >>confcache
16901 if cmp -s $cache_file confcache; then :; else
16902   if test -w $cache_file; then
16903     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16904     cat confcache >$cache_file
16905   else
16906     echo "not updating unwritable cache $cache_file"
16907   fi
16908 fi
16909 rm -f confcache
16910
16911 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16912 # Let make expand exec_prefix.
16913 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16914
16915 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16916 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16917 # trailing colons and then remove the whole line if VPATH becomes empty
16918 # (actually we leave an empty line to preserve line numbers).
16919 if test "x$srcdir" = x.; then
16920   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16921 s/:*\$(srcdir):*/:/;
16922 s/:*\${srcdir}:*/:/;
16923 s/:*@srcdir@:*/:/;
16924 s/^\([^=]*=[    ]*\):*/\1/;
16925 s/:*$//;
16926 s/^[^=]*=[      ]*$//;
16927 }'
16928 fi
16929
16930 DEFS=-DHAVE_CONFIG_H
16931
16932 : ${CONFIG_STATUS=./config.status}
16933 ac_clean_files_save=$ac_clean_files
16934 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16935 { echo "$as_me:16935: creating $CONFIG_STATUS" >&5
16936 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16937 cat >$CONFIG_STATUS <<_ACEOF
16938 #! $SHELL
16939 # Generated automatically by configure.
16940 # Run this file to recreate the current configuration.
16941 # Compiler output produced by configure, useful for debugging
16942 # configure, is in config.log if it exists.
16943
16944 debug=false
16945 SHELL=\${CONFIG_SHELL-$SHELL}
16946 ac_cs_invocation="\$0 \$@"
16947
16948 _ACEOF
16949
16950 cat >>$CONFIG_STATUS <<\_ACEOF
16951 # Be Bourne compatible
16952 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16953   emulate sh
16954   NULLCMD=:
16955 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16956   set -o posix
16957 fi
16958
16959 # Name of the executable.
16960 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16961
16962 if expr a : '\(a\)' >/dev/null 2>&1; then
16963   as_expr=expr
16964 else
16965   as_expr=false
16966 fi
16967
16968 rm -f conf$$ conf$$.exe conf$$.file
16969 echo >conf$$.file
16970 if ln -s conf$$.file conf$$ 2>/dev/null; then
16971   # We could just check for DJGPP; but this test a) works b) is more generic
16972   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16973   if test -f conf$$.exe; then
16974     # Don't use ln at all; we don't have any links
16975     as_ln_s='cp -p'
16976   else
16977     as_ln_s='ln -s'
16978   fi
16979 elif ln conf$$.file conf$$ 2>/dev/null; then
16980   as_ln_s=ln
16981 else
16982   as_ln_s='cp -p'
16983 fi
16984 rm -f conf$$ conf$$.exe conf$$.file
16985
16986 as_executable_p="test -f"
16987
16988 # Support unset when possible.
16989 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16990   as_unset=unset
16991 else
16992   as_unset=false
16993 fi
16994
16995 # NLS nuisances.
16996 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16997 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16998 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16999 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17000 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17001 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17002 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17003 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17004
17005 # IFS
17006 # We need space, tab and new line, in precisely that order.
17007 as_nl='
17008 '
17009 IFS="   $as_nl"
17010
17011 # CDPATH.
17012 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17013
17014 exec 6>&1
17015
17016 _ACEOF
17017
17018 # Files that config.status was made for.
17019 if test -n "$ac_config_files"; then
17020   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17021 fi
17022
17023 if test -n "$ac_config_headers"; then
17024   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17025 fi
17026
17027 if test -n "$ac_config_links"; then
17028   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17029 fi
17030
17031 if test -n "$ac_config_commands"; then
17032   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17033 fi
17034
17035 cat >>$CONFIG_STATUS <<\EOF
17036
17037 ac_cs_usage="\
17038 \`$as_me' instantiates files from templates according to the
17039 current configuration.
17040
17041 Usage: $0 [OPTIONS] [FILE]...
17042
17043   -h, --help       print this help, then exit
17044   -V, --version    print version number, then exit
17045   -d, --debug      don't remove temporary files
17046       --recheck    update $as_me by reconfiguring in the same conditions
17047   --file=FILE[:TEMPLATE]
17048                    instantiate the configuration file FILE
17049   --header=FILE[:TEMPLATE]
17050                    instantiate the configuration header FILE
17051
17052 Configuration files:
17053 $config_files
17054
17055 Configuration headers:
17056 $config_headers
17057
17058 Configuration commands:
17059 $config_commands
17060
17061 Report bugs to <bug-autoconf@gnu.org>."
17062 EOF
17063
17064 cat >>$CONFIG_STATUS <<EOF
17065 ac_cs_version="\\
17066 config.status
17067 configured by $0, generated by GNU Autoconf 2.52.20080325,
17068   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17069
17070 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17071 Free Software Foundation, Inc.
17072 This config.status script is free software; the Free Software Foundation
17073 gives unlimited permission to copy, distribute and modify it."
17074 srcdir=$srcdir
17075 INSTALL="$INSTALL"
17076 EOF
17077
17078 cat >>$CONFIG_STATUS <<\EOF
17079 # If no file are specified by the user, then we need to provide default
17080 # value.  By we need to know if files were specified by the user.
17081 ac_need_defaults=:
17082 while test $# != 0
17083 do
17084   case $1 in
17085   --*=*)
17086     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17087     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17088     shift
17089     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17090     shift
17091     ;;
17092   -*);;
17093   *) # This is not an option, so the user has probably given explicit
17094      # arguments.
17095      ac_need_defaults=false;;
17096   esac
17097
17098   case $1 in
17099   # Handling of the options.
17100 EOF
17101 cat >>$CONFIG_STATUS <<EOF
17102   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17103     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17104     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17105 EOF
17106 cat >>$CONFIG_STATUS <<\EOF
17107   --version | --vers* | -V )
17108     echo "$ac_cs_version"; exit 0 ;;
17109   --he | --h)
17110     # Conflict between --help and --header
17111     { { echo "$as_me:17111: error: ambiguous option: $1
17112 Try \`$0 --help' for more information." >&5
17113 echo "$as_me: error: ambiguous option: $1
17114 Try \`$0 --help' for more information." >&2;}
17115    { (exit 1); exit 1; }; };;
17116   --help | --hel | -h )
17117     echo "$ac_cs_usage"; exit 0 ;;
17118   --debug | --d* | -d )
17119     debug=: ;;
17120   --file | --fil | --fi | --f )
17121     shift
17122     CONFIG_FILES="$CONFIG_FILES $1"
17123     ac_need_defaults=false;;
17124   --header | --heade | --head | --hea )
17125     shift
17126     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17127     ac_need_defaults=false;;
17128
17129   # This is an error.
17130   -*) { { echo "$as_me:17130: error: unrecognized option: $1
17131 Try \`$0 --help' for more information." >&5
17132 echo "$as_me: error: unrecognized option: $1
17133 Try \`$0 --help' for more information." >&2;}
17134    { (exit 1); exit 1; }; } ;;
17135
17136   *) ac_config_targets="$ac_config_targets $1" ;;
17137
17138   esac
17139   shift
17140 done
17141
17142 exec 5>>config.log
17143 cat >&5 << _ACEOF
17144
17145 ## ----------------------- ##
17146 ## Running config.status.  ##
17147 ## ----------------------- ##
17148
17149 This file was extended by $as_me 2.52.20080325, executed with
17150   CONFIG_FILES    = $CONFIG_FILES
17151   CONFIG_HEADERS  = $CONFIG_HEADERS
17152   CONFIG_LINKS    = $CONFIG_LINKS
17153   CONFIG_COMMANDS = $CONFIG_COMMANDS
17154   > $ac_cs_invocation
17155 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17156
17157 _ACEOF
17158 EOF
17159
17160 cat >>$CONFIG_STATUS <<EOF
17161 #
17162 # INIT-COMMANDS section.
17163 #
17164
17165 ### Special initialization commands, used to pass information from the
17166 ### configuration-run into config.status
17167
17168 AWK="$AWK"
17169 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17170 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17171 ECHO_LINK="$ECHO_LINK"
17172 LDCONFIG="$LDCONFIG"
17173 LIB_NAME="$LIB_NAME"
17174 LIB_SUBSETS="$LIB_SUBSETS"
17175 LIB_SUFFIX="$LIB_SUFFIX"
17176 LIB_TRACING="$LIB_TRACING"
17177 MAKE_TERMINFO="$MAKE_TERMINFO"
17178 NCURSES_MAJOR="$NCURSES_MAJOR"
17179 NCURSES_MINOR="$NCURSES_MINOR"
17180 NCURSES_OSPEED="$NCURSES_OSPEED"
17181 NCURSES_PATCH="$NCURSES_PATCH"
17182 SRC_SUBDIRS="$SRC_SUBDIRS"
17183 TERMINFO="$TERMINFO"
17184 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17185 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17186 TINFO_NAME="$TINFO_NAME"
17187 TINFO_SUFFIX="$TINFO_SUFFIX"
17188 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17189 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17190 TICS_NAME="$TICS_NAME"
17191 WITH_CURSES_H="$with_curses_h"
17192 WITH_ECHO="$with_echo"
17193 WITH_OVERWRITE="$with_overwrite"
17194 cf_LIST_MODELS="$cf_list_models"
17195 cf_cv_abi_version="$cf_cv_abi_version"
17196 cf_cv_do_relink="$cf_cv_do_relink"
17197 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17198 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17199 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17200 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17201 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17202 cf_cv_rel_version="$cf_cv_rel_version"
17203 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17204 cf_cv_shared_soname='$cf_cv_shared_soname'
17205 cf_cv_shlib_version="$cf_cv_shlib_version"
17206 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17207 cf_cv_system_name="$cf_cv_system_name"
17208 cf_with_cxx_binding="$cf_with_cxx_binding"
17209 host="$host"
17210 target="$target"
17211
17212 EOF
17213
17214 cat >>$CONFIG_STATUS <<\EOF
17215 for ac_config_target in $ac_config_targets
17216 do
17217   case "$ac_config_target" in
17218   # Handling of arguments.
17219   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17220   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17221   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17222   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17223   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17224   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17225   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17226   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17227   *) { { echo "$as_me:17227: error: invalid argument: $ac_config_target" >&5
17228 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17229    { (exit 1); exit 1; }; };;
17230   esac
17231 done
17232
17233 # If the user did not use the arguments to specify the items to instantiate,
17234 # then the envvar interface is used.  Set only those that are not.
17235 # We use the long form for the default assignment because of an extremely
17236 # bizarre bug on SunOS 4.1.3.
17237 if $ac_need_defaults; then
17238   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17239   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17240   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17241 fi
17242
17243 # Create a temporary directory, and hook for its removal unless debugging.
17244 $debug ||
17245 {
17246   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17247   trap '{ (exit 1); exit 1; }' 1 2 13 15
17248 }
17249
17250 # Create a (secure) tmp directory for tmp files.
17251 : ${TMPDIR=/tmp}
17252 {
17253   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17254   test -n "$tmp" && test -d "$tmp"
17255 }  ||
17256 {
17257   tmp=$TMPDIR/cs$$-$RANDOM
17258   (umask 077 && mkdir $tmp)
17259 } ||
17260 {
17261    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17262    { (exit 1); exit 1; }
17263 }
17264
17265 EOF
17266
17267 cat >>$CONFIG_STATUS <<EOF
17268
17269 #
17270 # CONFIG_FILES section.
17271 #
17272
17273 # No need to generate the scripts if there are no CONFIG_FILES.
17274 # This happens for instance when ./config.status config.h
17275 if test -n "\$CONFIG_FILES"; then
17276   # Protect against being on the right side of a sed subst in config.status.
17277   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17278    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17279 s,@SHELL@,$SHELL,;t t
17280 s,@exec_prefix@,$exec_prefix,;t t
17281 s,@prefix@,$prefix,;t t
17282 s,@program_transform_name@,$program_transform_name,;t t
17283 s,@bindir@,$bindir,;t t
17284 s,@sbindir@,$sbindir,;t t
17285 s,@libexecdir@,$libexecdir,;t t
17286 s,@datadir@,$datadir,;t t
17287 s,@sysconfdir@,$sysconfdir,;t t
17288 s,@sharedstatedir@,$sharedstatedir,;t t
17289 s,@localstatedir@,$localstatedir,;t t
17290 s,@libdir@,$libdir,;t t
17291 s,@includedir@,$includedir,;t t
17292 s,@oldincludedir@,$oldincludedir,;t t
17293 s,@infodir@,$infodir,;t t
17294 s,@mandir@,$mandir,;t t
17295 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17296 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17297 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17298 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17299 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17300 s,@build_alias@,$build_alias,;t t
17301 s,@host_alias@,$host_alias,;t t
17302 s,@target_alias@,$target_alias,;t t
17303 s,@ECHO_C@,$ECHO_C,;t t
17304 s,@ECHO_N@,$ECHO_N,;t t
17305 s,@ECHO_T@,$ECHO_T,;t t
17306 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17307 s,@DEFS@,$DEFS,;t t
17308 s,@LIBS@,$LIBS,;t t
17309 s,@top_builddir@,$top_builddir,;t t
17310 s,@EGREP@,$EGREP,;t t
17311 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17312 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17313 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17314 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17315 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17316 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17317 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17318 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17319 s,@build@,$build,;t t
17320 s,@build_cpu@,$build_cpu,;t t
17321 s,@build_vendor@,$build_vendor,;t t
17322 s,@build_os@,$build_os,;t t
17323 s,@host@,$host,;t t
17324 s,@host_cpu@,$host_cpu,;t t
17325 s,@host_vendor@,$host_vendor,;t t
17326 s,@host_os@,$host_os,;t t
17327 s,@target@,$target,;t t
17328 s,@target_cpu@,$target_cpu,;t t
17329 s,@target_vendor@,$target_vendor,;t t
17330 s,@target_os@,$target_os,;t t
17331 s,@CC@,$CC,;t t
17332 s,@CFLAGS@,$CFLAGS,;t t
17333 s,@LDFLAGS@,$LDFLAGS,;t t
17334 s,@CPPFLAGS@,$CPPFLAGS,;t t
17335 s,@ac_ct_CC@,$ac_ct_CC,;t t
17336 s,@EXEEXT@,$EXEEXT,;t t
17337 s,@OBJEXT@,$OBJEXT,;t t
17338 s,@CPP@,$CPP,;t t
17339 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17340 s,@PROG_EXT@,$PROG_EXT,;t t
17341 s,@LDCONFIG@,$LDCONFIG,;t t
17342 s,@CXX@,$CXX,;t t
17343 s,@CXXFLAGS@,$CXXFLAGS,;t t
17344 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17345 s,@AWK@,$AWK,;t t
17346 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17347 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17348 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17349 s,@LINT@,$LINT,;t t
17350 s,@LINT_OPTS@,$LINT_OPTS,;t t
17351 s,@LN_S@,$LN_S,;t t
17352 s,@SET_MAKE@,$SET_MAKE,;t t
17353 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17354 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17355 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17356 s,@RANLIB@,$RANLIB,;t t
17357 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17358 s,@LD@,$LD,;t t
17359 s,@ac_ct_LD@,$ac_ct_LD,;t t
17360 s,@AR@,$AR,;t t
17361 s,@ac_ct_AR@,$ac_ct_AR,;t t
17362 s,@AR_OPTS@,$AR_OPTS,;t t
17363 s,@DESTDIR@,$DESTDIR,;t t
17364 s,@BUILD_CC@,$BUILD_CC,;t t
17365 s,@BUILD_CPP@,$BUILD_CPP,;t t
17366 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17367 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17368 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17369 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17370 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17371 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17372 s,@cf_list_models@,$cf_list_models,;t t
17373 s,@LIBTOOL@,$LIBTOOL,;t t
17374 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17375 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17376 s,@LIB_CREATE@,$LIB_CREATE,;t t
17377 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17378 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17379 s,@LIB_PREP@,$LIB_PREP,;t t
17380 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17381 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17382 s,@LIB_LINK@,$LIB_LINK,;t t
17383 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17384 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17385 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17386 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17387 s,@TICS_NAME@,$TICS_NAME,;t t
17388 s,@TINFO_NAME@,$TINFO_NAME,;t t
17389 s,@LIB_NAME@,$LIB_NAME,;t t
17390 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17391 s,@CC_G_OPT@,$CC_G_OPT,;t t
17392 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17393 s,@LD_MODEL@,$LD_MODEL,;t t
17394 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17395 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17396 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17397 s,@LINK_PROGS@,$LINK_PROGS,;t t
17398 s,@LINK_TESTS@,$LINK_TESTS,;t t
17399 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17400 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17401 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17402 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17403 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17404 s,@PATHSEP@,$PATHSEP,;t t
17405 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17406 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17407 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17408 s,@TERMINFO@,$TERMINFO,;t t
17409 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17410 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17411 s,@TERMPATH@,$TERMPATH,;t t
17412 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17413 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17414 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17415 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17416 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17417 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17418 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17419 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17420 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17421 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17422 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17423 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17424 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17425 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17426 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17427 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17428 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17429 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17430 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17431 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17432 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17433 s,@PTHREAD@,$PTHREAD,;t t
17434 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17435 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17436 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17437 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17438 s,@ECHO_LINK@,$ECHO_LINK,;t t
17439 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17440 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17441 s,@ADA_TRACE@,$ADA_TRACE,;t t
17442 s,@MATH_LIB@,$MATH_LIB,;t t
17443 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17444 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17445 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17446 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17447 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17448 s,@TEST_LIBS@,$TEST_LIBS,;t t
17449 s,@CXXCPP@,$CXXCPP,;t t
17450 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17451 s,@CXX_AR@,$CXX_AR,;t t
17452 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17453 s,@CXXLIBS@,$CXXLIBS,;t t
17454 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17455 s,@gnat_exists@,$gnat_exists,;t t
17456 s,@M4_exists@,$M4_exists,;t t
17457 s,@cf_ada_make@,$cf_ada_make,;t t
17458 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17459 s,@cf_ada_package@,$cf_ada_package,;t t
17460 s,@ADAFLAGS@,$ADAFLAGS,;t t
17461 s,@cf_compile_generics@,$cf_compile_generics,;t t
17462 s,@cf_generic_objects@,$cf_generic_objects,;t t
17463 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17464 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17465 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17466 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17467 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17468 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17469 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17470 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17471 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17472 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17473 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17474 s,@TICS_ARGS@,$TICS_ARGS,;t t
17475 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17476 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17477 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17478 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17479 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17480 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17481 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17482 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17483 s,@TICS_LIST@,$TICS_LIST,;t t
17484 s,@TINFO_LIST@,$TINFO_LIST,;t t
17485 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17486 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17487 s,@TEST_ARGS@,$TEST_ARGS,;t t
17488 s,@TEST_DEPS@,$TEST_DEPS,;t t
17489 s,@TEST_ARG2@,$TEST_ARG2,;t t
17490 s,@TEST_DEP2@,$TEST_DEP2,;t t
17491 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17492 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17493 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17494 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17495 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17496 CEOF
17497
17498 EOF
17499
17500   cat >>$CONFIG_STATUS <<\EOF
17501   # Split the substitutions into bite-sized pieces for seds with
17502   # small command number limits, like on Digital OSF/1 and HP-UX.
17503   ac_max_sed_lines=48
17504   ac_sed_frag=1 # Number of current file.
17505   ac_beg=1 # First line for current file.
17506   ac_end=$ac_max_sed_lines # Line after last line for current file.
17507   ac_more_lines=:
17508   ac_sed_cmds=
17509   while $ac_more_lines; do
17510     if test $ac_beg -gt 1; then
17511       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17512     else
17513       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17514     fi
17515     if test ! -s $tmp/subs.frag; then
17516       ac_more_lines=false
17517     else
17518       # The purpose of the label and of the branching condition is to
17519       # speed up the sed processing (if there are no `@' at all, there
17520       # is no need to browse any of the substitutions).
17521       # These are the two extra sed commands mentioned above.
17522       (echo ':t
17523   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17524       if test -z "$ac_sed_cmds"; then
17525         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17526       else
17527         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17528       fi
17529       ac_sed_frag=`expr $ac_sed_frag + 1`
17530       ac_beg=$ac_end
17531       ac_end=`expr $ac_end + $ac_max_sed_lines`
17532     fi
17533   done
17534   if test -z "$ac_sed_cmds"; then
17535     ac_sed_cmds=cat
17536   fi
17537 fi # test -n "$CONFIG_FILES"
17538
17539 EOF
17540 cat >>$CONFIG_STATUS <<\EOF
17541 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17542   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17543   case $ac_file in
17544   - | *:- | *:-:* ) # input from stdin
17545         cat >$tmp/stdin
17546         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17547         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17548   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17549         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17550   * )   ac_file_in=$ac_file.in ;;
17551   esac
17552
17553   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17554   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17555          X"$ac_file" : 'X\(//\)[^/]' \| \
17556          X"$ac_file" : 'X\(//\)$' \| \
17557          X"$ac_file" : 'X\(/\)' \| \
17558          .     : '\(.\)' 2>/dev/null ||
17559 echo X"$ac_file" |
17560     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17561           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17562           /^X\(\/\/\)$/{ s//\1/; q; }
17563           /^X\(\/\).*/{ s//\1/; q; }
17564           s/.*/./; q'`
17565   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17566     { case "$ac_dir" in
17567   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17568   *)                      as_incr_dir=.;;
17569 esac
17570 as_dummy="$ac_dir"
17571 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17572   case $as_mkdir_dir in
17573     # Skip DOS drivespec
17574     ?:) as_incr_dir=$as_mkdir_dir ;;
17575     *)
17576       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17577       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17578     ;;
17579   esac
17580 done; }
17581
17582     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17583     # A "../" for each directory in $ac_dir_suffix.
17584     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17585   else
17586     ac_dir_suffix= ac_dots=
17587   fi
17588
17589   case $srcdir in
17590   .)  ac_srcdir=.
17591       if test -z "$ac_dots"; then
17592          ac_top_srcdir=.
17593       else
17594          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17595       fi ;;
17596   [\\/]* | ?:[\\/]* )
17597       ac_srcdir=$srcdir$ac_dir_suffix;
17598       ac_top_srcdir=$srcdir ;;
17599   *) # Relative path.
17600     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17601     ac_top_srcdir=$ac_dots$srcdir ;;
17602   esac
17603
17604   case $INSTALL in
17605   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17606   *) ac_INSTALL=$ac_dots$INSTALL ;;
17607   esac
17608
17609   if test x"$ac_file" != x-; then
17610     { echo "$as_me:17610: creating $ac_file" >&5
17611 echo "$as_me: creating $ac_file" >&6;}
17612     rm -f "$ac_file"
17613   fi
17614   # Let's still pretend it is `configure' which instantiates (i.e., don't
17615   # use $as_me), people would be surprised to read:
17616   #    /* config.h.  Generated automatically by config.status.  */
17617   configure_input="Generated automatically from `echo $ac_file_in |
17618                                                  sed 's,.*/,,'` by configure."
17619
17620   # First look for the input files in the build tree, otherwise in the
17621   # src tree.
17622   ac_file_inputs=`IFS=:
17623     for f in $ac_file_in; do
17624       case $f in
17625       -) echo $tmp/stdin ;;
17626       [\\/$]*)
17627          # Absolute (can't be DOS-style, as IFS=:)
17628          test -f "$f" || { { echo "$as_me:17628: error: cannot find input file: $f" >&5
17629 echo "$as_me: error: cannot find input file: $f" >&2;}
17630    { (exit 1); exit 1; }; }
17631          echo $f;;
17632       *) # Relative
17633          if test -f "$f"; then
17634            # Build tree
17635            echo $f
17636          elif test -f "$srcdir/$f"; then
17637            # Source tree
17638            echo $srcdir/$f
17639          else
17640            # /dev/null tree
17641            { { echo "$as_me:17641: error: cannot find input file: $f" >&5
17642 echo "$as_me: error: cannot find input file: $f" >&2;}
17643    { (exit 1); exit 1; }; }
17644          fi;;
17645       esac
17646     done` || { (exit 1); exit 1; }
17647 EOF
17648 cat >>$CONFIG_STATUS <<EOF
17649   sed "$ac_vpsub
17650 $extrasub
17651 EOF
17652 cat >>$CONFIG_STATUS <<\EOF
17653 :t
17654 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17655 s,@configure_input@,$configure_input,;t t
17656 s,@srcdir@,$ac_srcdir,;t t
17657 s,@top_srcdir@,$ac_top_srcdir,;t t
17658 s,@INSTALL@,$ac_INSTALL,;t t
17659 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17660   rm -f $tmp/stdin
17661   if test x"$ac_file" != x-; then
17662     mv $tmp/out $ac_file
17663   else
17664     cat $tmp/out
17665     rm -f $tmp/out
17666   fi
17667
17668 done
17669 EOF
17670 cat >>$CONFIG_STATUS <<\EOF
17671
17672 #
17673 # CONFIG_HEADER section.
17674 #
17675
17676 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17677 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17678 #
17679 # ac_d sets the value in "#define NAME VALUE" lines.
17680 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17681 ac_dB='[        ].*$,\1#\2'
17682 ac_dC=' '
17683 ac_dD=',;t'
17684 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17685 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17686 ac_iB='\([      ]\),\1#\2define\3'
17687 ac_iC=' '
17688 ac_iD='\4,;t'
17689 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17690 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17691 ac_uB='$,\1#\2define\3'
17692 ac_uC=' '
17693 ac_uD=',;t'
17694
17695 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17696   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17697   case $ac_file in
17698   - | *:- | *:-:* ) # input from stdin
17699         cat >$tmp/stdin
17700         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17701         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17702   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17703         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17704   * )   ac_file_in=$ac_file.in ;;
17705   esac
17706
17707   test x"$ac_file" != x- && { echo "$as_me:17707: creating $ac_file" >&5
17708 echo "$as_me: creating $ac_file" >&6;}
17709
17710   # First look for the input files in the build tree, otherwise in the
17711   # src tree.
17712   ac_file_inputs=`IFS=:
17713     for f in $ac_file_in; do
17714       case $f in
17715       -) echo $tmp/stdin ;;
17716       [\\/$]*)
17717          # Absolute (can't be DOS-style, as IFS=:)
17718          test -f "$f" || { { echo "$as_me:17718: error: cannot find input file: $f" >&5
17719 echo "$as_me: error: cannot find input file: $f" >&2;}
17720    { (exit 1); exit 1; }; }
17721          echo $f;;
17722       *) # Relative
17723          if test -f "$f"; then
17724            # Build tree
17725            echo $f
17726          elif test -f "$srcdir/$f"; then
17727            # Source tree
17728            echo $srcdir/$f
17729          else
17730            # /dev/null tree
17731            { { echo "$as_me:17731: error: cannot find input file: $f" >&5
17732 echo "$as_me: error: cannot find input file: $f" >&2;}
17733    { (exit 1); exit 1; }; }
17734          fi;;
17735       esac
17736     done` || { (exit 1); exit 1; }
17737   # Remove the trailing spaces.
17738   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17739
17740 EOF
17741
17742 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17743 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17744 # be either 'cat' or 'sort'.
17745 cat confdefs.h | uniq >conftest.vals
17746
17747 # Break up conftest.vals because some shells have a limit on
17748 # the size of here documents, and old seds have small limits too.
17749
17750 rm -f conftest.tail
17751 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17752 while grep . conftest.vals >/dev/null
17753 do
17754   # Write chunks of a limited-size here document to conftest.frag.
17755   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17756   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17757   echo 'CEOF' >> $CONFIG_STATUS
17758   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17759   rm -f conftest.vals
17760   mv conftest.tail conftest.vals
17761 done
17762 rm -f conftest.vals
17763
17764 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17765 # marker @DEFS@.
17766 echo '  cat >> conftest.edit <<CEOF
17767 /@DEFS@/r conftest.frag
17768 /@DEFS@/d
17769 CEOF
17770 sed -f conftest.edit $tmp/in > $tmp/out
17771 rm -f $tmp/in
17772 mv $tmp/out $tmp/in
17773 rm -f conftest.edit conftest.frag
17774 ' >> $CONFIG_STATUS
17775
17776 cat >>$CONFIG_STATUS <<\EOF
17777   # Let's still pretend it is `configure' which instantiates (i.e., don't
17778   # use $as_me), people would be surprised to read:
17779   #    /* config.h.  Generated automatically by config.status.  */
17780   if test x"$ac_file" = x-; then
17781     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17782   else
17783     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17784   fi
17785   cat $tmp/in >>$tmp/config.h
17786   rm -f $tmp/in
17787   if test x"$ac_file" != x-; then
17788     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17789       { echo "$as_me:17789: $ac_file is unchanged" >&5
17790 echo "$as_me: $ac_file is unchanged" >&6;}
17791     else
17792       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17793          X"$ac_file" : 'X\(//\)[^/]' \| \
17794          X"$ac_file" : 'X\(//\)$' \| \
17795          X"$ac_file" : 'X\(/\)' \| \
17796          .     : '\(.\)' 2>/dev/null ||
17797 echo X"$ac_file" |
17798     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17799           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17800           /^X\(\/\/\)$/{ s//\1/; q; }
17801           /^X\(\/\).*/{ s//\1/; q; }
17802           s/.*/./; q'`
17803       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17804         { case "$ac_dir" in
17805   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17806   *)                      as_incr_dir=.;;
17807 esac
17808 as_dummy="$ac_dir"
17809 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17810   case $as_mkdir_dir in
17811     # Skip DOS drivespec
17812     ?:) as_incr_dir=$as_mkdir_dir ;;
17813     *)
17814       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17815       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17816     ;;
17817   esac
17818 done; }
17819
17820       fi
17821       rm -f $ac_file
17822       mv $tmp/config.h $ac_file
17823     fi
17824   else
17825     cat $tmp/config.h
17826     rm -f $tmp/config.h
17827   fi
17828 done
17829 EOF
17830 cat >>$CONFIG_STATUS <<\EOF
17831
17832 #
17833 # CONFIG_COMMANDS section.
17834 #
17835 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17836   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17837   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17838
17839   case $ac_dest in
17840     default )
17841
17842 for cf_dir in test
17843 do
17844         if test ! -d $srcdir/$cf_dir; then
17845                 continue
17846         elif test -f $srcdir/$cf_dir/programs; then
17847                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17848         fi
17849 done
17850
17851         case $cf_cv_system_name in #(vi
17852         OS/2*|os2*) #(vi
17853         LIB_PREFIX=''
17854         ;;
17855         *)      LIB_PREFIX='lib'
17856         ;;
17857         esac
17858 cf_prefix=$LIB_PREFIX
17859
17860 if test $cf_cv_shlib_version = cygdll ; then
17861         TINFO_NAME=$TINFO_ARG_SUFFIX
17862         TINFO_SUFFIX=.dll
17863 fi
17864
17865 for cf_dir in $SRC_SUBDIRS
17866 do
17867         if test ! -d $srcdir/$cf_dir ; then
17868                 continue
17869         elif test -f $srcdir/$cf_dir/modules; then
17870
17871                 SHARED_LIB=
17872                 LIBS_TO_MAKE=
17873                 for cf_item in $cf_LIST_MODELS
17874                 do
17875
17876         case $cf_item in
17877         libtool)
17878                 cf_suffix='.la'
17879                 cf_depsuf=$cf_suffix
17880                 ;;
17881         normal)
17882                 cf_suffix='.a'
17883                 cf_depsuf=$cf_suffix
17884                 ;;
17885         debug)
17886                 cf_suffix='_g.a'
17887                 cf_depsuf=$cf_suffix
17888                 ;;
17889         profile)
17890                 cf_suffix='_p.a'
17891                 cf_depsuf=$cf_suffix
17892                 ;;
17893         shared)
17894                 case $cf_cv_system_name in
17895                 cygwin*)
17896                         cf_suffix='.dll'
17897                         cf_depsuf='.dll.a'
17898                         ;;
17899                 darwin*)
17900                         cf_suffix='.dylib'
17901                         cf_depsuf=$cf_suffix
17902                         ;;
17903                 hpux*)
17904                         case $target in
17905                         ia64*)
17906                                 cf_suffix='.so'
17907                                 cf_depsuf=$cf_suffix
17908                                 ;;
17909                         *)
17910                                 cf_suffix='.sl'
17911                                 cf_depsuf=$cf_suffix
17912                                 ;;
17913                         esac
17914                         ;;
17915                 *)      cf_suffix='.so'
17916                         cf_depsuf=$cf_suffix
17917                         ;;
17918                 esac
17919         esac
17920         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17921         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17922
17923                         if test $cf_item = shared ; then
17924                         if test "$cf_cv_do_symlinks" = yes ; then
17925                                 case "$cf_cv_shlib_version" in #(vi
17926                                 rel) #(vi
17927                                         case "$cf_cv_system_name" in #(vi
17928                                         darwin*)
17929                                         case .${LIB_SUFFIX} in
17930                                         .w*)
17931                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17932                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17933                                                 ;;
17934                                         *)
17935                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17936                                                 ;;
17937                                         esac
17938                                         ;; #(vi
17939                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17940                                         esac
17941                                         ;;
17942                                 abi)
17943                                         case "$cf_cv_system_name" in #(vi
17944                                         darwin*)
17945                                         case .${LIB_SUFFIX} in
17946                                         .w*)
17947                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17948                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17949                                                 ;;
17950                                         *)
17951                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17952                                                 ;;
17953                                         esac
17954                                         ;; #(vi
17955                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17956                                         esac
17957                                         ;;
17958                                 esac
17959                         fi
17960                         # cygwin needs import library, and has unique naming convention
17961                         # use autodetected ${cf_prefix} for import lib and static lib, but
17962                         # use 'cyg' prefix for shared lib.
17963                         if test $cf_cv_shlib_version = cygdll ; then
17964                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
17965                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
17966                                 continue
17967                         fi
17968                         fi
17969                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17970                 done
17971
17972                 if test $cf_dir = ncurses ; then
17973                         cf_subsets="$LIB_SUBSETS"
17974                         cf_r_parts="$cf_subsets"
17975                         cf_liblist="$LIBS_TO_MAKE"
17976
17977                         while test -n "$cf_r_parts"
17978                         do
17979                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17980                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17981                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17982                                         cf_item=
17983                                         case $cf_l_parts in #(vi
17984                                         *termlib*) #(vi
17985                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17986                                                 ;;
17987                                         *ticlib*)
17988                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17989                                                 ;;
17990                                         *)
17991                                                 break
17992                                                 ;;
17993                                         esac
17994                                         if test -n "$cf_item"; then
17995                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17996                                         fi
17997                                 else
17998                                         break
17999                                 fi
18000                         done
18001                 else
18002                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18003                 fi
18004
18005                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18006                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18007                         $cf_dir/Makefile >$cf_dir/Makefile.out
18008                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18009
18010                 $AWK -f $srcdir/mk-0th.awk \
18011                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18012                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18013
18014                 for cf_subset in $cf_subsets
18015                 do
18016                         cf_subdirs=
18017                         for cf_item in $cf_LIST_MODELS
18018                         do
18019                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18020
18021 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18022
18023         case $cf_item in
18024         libtool)
18025                 cf_suffix='.la'
18026                 cf_depsuf=$cf_suffix
18027                 ;;
18028         normal)
18029                 cf_suffix='.a'
18030                 cf_depsuf=$cf_suffix
18031                 ;;
18032         debug)
18033                 cf_suffix='_g.a'
18034                 cf_depsuf=$cf_suffix
18035                 ;;
18036         profile)
18037                 cf_suffix='_p.a'
18038                 cf_depsuf=$cf_suffix
18039                 ;;
18040         shared)
18041                 case $cf_cv_system_name in
18042                 cygwin*)
18043                         cf_suffix='.dll'
18044                         cf_depsuf='.dll.a'
18045                         ;;
18046                 darwin*)
18047                         cf_suffix='.dylib'
18048                         cf_depsuf=$cf_suffix
18049                         ;;
18050                 hpux*)
18051                         case $target in
18052                         ia64*)
18053                                 cf_suffix='.so'
18054                                 cf_depsuf=$cf_suffix
18055                                 ;;
18056                         *)
18057                                 cf_suffix='.sl'
18058                                 cf_depsuf=$cf_suffix
18059                                 ;;
18060                         esac
18061                         ;;
18062                 *)      cf_suffix='.so'
18063                         cf_depsuf=$cf_suffix
18064                         ;;
18065                 esac
18066         esac
18067         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18068         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18069
18070         case $cf_item in
18071         libtool) cf_subdir='obj_lo'  ;;
18072         normal)  cf_subdir='objects' ;;
18073         debug)   cf_subdir='obj_g' ;;
18074         profile) cf_subdir='obj_p' ;;
18075         shared)
18076                 case $cf_cv_system_name in #(vi
18077                 cygwin) #(vi
18078                         cf_subdir='objects' ;;
18079                 *)
18080                         cf_subdir='obj_s' ;;
18081                 esac
18082         esac
18083
18084                         # Test for case where we build libtinfo with a different name.
18085                         cf_libname=$cf_dir
18086                         if test $cf_dir = ncurses ; then
18087                                 case $cf_subset in
18088                                 *base*)
18089                                         cf_libname=${cf_libname}$LIB_SUFFIX
18090                                         ;;
18091                                 *termlib*)
18092                                         cf_libname=$TINFO_LIB_SUFFIX
18093                                         ;;
18094                                 ticlib*)
18095                                         cf_libname=$TICS_LIB_SUFFIX
18096                                         ;;
18097                                 esac
18098                         else
18099                                 cf_libname=${cf_libname}$LIB_SUFFIX
18100                         fi
18101                         if test -n "${DFT_ARG_SUFFIX}" ; then
18102                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18103                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18104                         fi
18105
18106                         # These dependencies really are for development, not
18107                         # builds, but they are useful in porting, too.
18108                         cf_depend="../include/ncurses_cfg.h"
18109                         if test "$srcdir" = "."; then
18110                                 cf_reldir="."
18111                         else
18112                                 cf_reldir="\${srcdir}"
18113                         fi
18114
18115                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18116                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18117                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18118                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18119                         fi
18120
18121                         cf_dir_suffix=
18122                         old_cf_suffix="$cf_suffix"
18123                         if test "$cf_cv_shlib_version_infix" = yes ; then
18124                         if test -n "$LIB_SUFFIX" ; then
18125                                 case $LIB_SUFFIX in
18126                                 w*)
18127                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18128                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18129                                         cf_dir_suffix=w
18130                                         ;;
18131                                 esac
18132                         fi
18133                         fi
18134
18135                         $AWK -f $srcdir/mk-1st.awk \
18136                                 name=${cf_libname}${cf_dir_suffix} \
18137                                 traces=$LIB_TRACING \
18138                                 MODEL=$cf_ITEM \
18139                                 model=$cf_subdir \
18140                                 prefix=$cf_prefix \
18141                                 suffix=$cf_suffix \
18142                                 subset=$cf_subset \
18143                                 TermlibRoot=$TINFO_NAME \
18144                                 TermlibSuffix=$TINFO_SUFFIX \
18145                                 ShlibVer=$cf_cv_shlib_version \
18146                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18147                                 ReLink=${cf_cv_do_relink-no} \
18148                                 DoLinks=$cf_cv_do_symlinks \
18149                                 rmSoLocs=$cf_cv_rm_so_locs \
18150                                 ldconfig="$LDCONFIG" \
18151                                 overwrite=$WITH_OVERWRITE \
18152                                 depend="$cf_depend" \
18153                                 host="$host" \
18154                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18155
18156                         cf_suffix="$old_cf_suffix"
18157
18158                         for cf_subdir2 in $cf_subdirs lib
18159                         do
18160                                 test $cf_subdir = $cf_subdir2 && break
18161                         done
18162                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18163                         $AWK -f $srcdir/mk-2nd.awk \
18164                                 name=$cf_dir \
18165                                 traces=$LIB_TRACING \
18166                                 MODEL=$cf_ITEM \
18167                                 model=$cf_subdir \
18168                                 subset=$cf_subset \
18169                                 srcdir=$srcdir \
18170                                 echo=$WITH_ECHO \
18171                                 crenames=$cf_cv_prog_CC_c_o \
18172                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18173                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18174                         cf_subdirs="$cf_subdirs $cf_subdir"
18175                         done
18176                 done
18177         fi
18178
18179         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18180 done
18181
18182 for cf_dir in $SRC_SUBDIRS
18183 do
18184         if test ! -d $srcdir/$cf_dir ; then
18185                 continue
18186         fi
18187
18188         if test -f $cf_dir/Makefile ; then
18189                 case "$cf_dir" in
18190                 Ada95) #(vi
18191                         echo 'libs \' >> Makefile
18192                         echo 'install.libs \' >> Makefile
18193                         echo 'uninstall.libs ::' >> Makefile
18194                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18195                         ;;
18196                 esac
18197         fi
18198
18199         if test -f $srcdir/$cf_dir/modules; then
18200                 echo >> Makefile
18201                 if test -f $srcdir/$cf_dir/headers; then
18202 cat >> Makefile <<CF_EOF
18203 install.includes \\
18204 uninstall.includes \\
18205 CF_EOF
18206                 fi
18207 if test "$cf_dir" != "c++" ; then
18208 echo 'lint \' >> Makefile
18209 fi
18210 cat >> Makefile <<CF_EOF
18211 libs \\
18212 lintlib \\
18213 install.libs \\
18214 uninstall.libs \\
18215 install.$cf_dir \\
18216 uninstall.$cf_dir ::
18217         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18218 CF_EOF
18219         elif test -f $srcdir/$cf_dir/headers; then
18220 cat >> Makefile <<CF_EOF
18221
18222 libs \\
18223 install.libs \\
18224 uninstall.libs \\
18225 install.includes \\
18226 uninstall.includes ::
18227         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18228 CF_EOF
18229 fi
18230 done
18231
18232 cat >> Makefile <<CF_EOF
18233
18234 install.libs uninstall.libs \\
18235 install.data uninstall.data ::
18236 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18237
18238 install.man \\
18239 uninstall.man ::
18240         cd man && \${MAKE} \${CF_MFLAGS} \$@
18241
18242 distclean ::
18243         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18244         rm -f headers.sh headers.sed mk_shared_lib.sh
18245         rm -rf \${DIRS_TO_MAKE}
18246 CF_EOF
18247
18248 # Special case: tack's manpage lives in its own directory.
18249 if test -d tack ; then
18250 if test -f $srcdir/$tack.h; then
18251 cat >> Makefile <<CF_EOF
18252
18253 install.man \\
18254 uninstall.man ::
18255         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18256 CF_EOF
18257 fi
18258 fi
18259
18260 rm -f headers.sed headers.sh
18261
18262 echo creating headers.sh
18263 cat >headers.sh <<CF_EOF
18264 #! /bin/sh
18265 # This shell script is generated by the 'configure' script.  It is invoked in a
18266 # subdirectory of the build tree.  It generates a sed-script in the parent
18267 # directory that is used to adjust includes for header files that reside in a
18268 # subdirectory of /usr/include, etc.
18269 PRG=""
18270 while test \$# != 3
18271 do
18272 PRG="\$PRG \$1"; shift
18273 done
18274 DST=\$1
18275 REF=\$2
18276 SRC=\$3
18277 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18278 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18279 echo installing \$SRC in \$DST
18280 CF_EOF
18281
18282 if test $WITH_CURSES_H = yes; then
18283         cat >>headers.sh <<CF_EOF
18284 case \$DST in
18285 /*/include/*)
18286         END=\`basename \$DST\`
18287         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18288         do
18289                 NAME=\`basename \$i\`
18290                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18291         done
18292         ;;
18293 *)
18294         echo "" >> \$TMPSED
18295         ;;
18296 esac
18297 CF_EOF
18298
18299 else
18300         cat >>headers.sh <<CF_EOF
18301 case \$DST in
18302 /*/include/*)
18303         END=\`basename \$DST\`
18304         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18305         do
18306                 NAME=\`basename \$i\`
18307                 if test "\$NAME" = "curses.h"
18308                 then
18309                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18310                         NAME=ncurses.h
18311                 fi
18312                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18313         done
18314         ;;
18315 *)
18316         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18317         ;;
18318 esac
18319 CF_EOF
18320 fi
18321 cat >>headers.sh <<CF_EOF
18322 rm -f \$TMPSRC
18323 sed -f \$TMPSED \$SRC > \$TMPSRC
18324 NAME=\`basename \$SRC\`
18325 CF_EOF
18326 if test $WITH_CURSES_H != yes; then
18327         cat >>headers.sh <<CF_EOF
18328 test "\$NAME" = "curses.h" && NAME=ncurses.h
18329 CF_EOF
18330 fi
18331 cat >>headers.sh <<CF_EOF
18332 # Just in case someone gzip'd manpages, remove the conflicting copy.
18333 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18334
18335 eval \$PRG \$TMPSRC \$DST/\$NAME
18336 rm -f \$TMPSRC \$TMPSED
18337 CF_EOF
18338
18339 chmod 0755 headers.sh
18340
18341 for cf_dir in $SRC_SUBDIRS
18342 do
18343         if test ! -d $srcdir/$cf_dir ; then
18344                 continue
18345         fi
18346
18347         if test -f $srcdir/$cf_dir/headers; then
18348                 $AWK -f $srcdir/mk-hdr.awk \
18349                         subset="$LIB_SUBSETS" \
18350                         compat="$WITH_CURSES_H" \
18351                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18352         fi
18353
18354         if test -f $srcdir/$cf_dir/modules; then
18355                 if test "$cf_dir" != "c++" ; then
18356                         cat >>$cf_dir/Makefile <<"CF_EOF"
18357 depend : ${AUTO_SRC}
18358         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18359
18360 # DO NOT DELETE THIS LINE -- make depend depends on it.
18361 CF_EOF
18362                 fi
18363         fi
18364 done
18365
18366  ;;
18367   esac
18368 done
18369 EOF
18370
18371 cat >>$CONFIG_STATUS <<\EOF
18372
18373 { (exit 0); exit 0; }
18374 EOF
18375 chmod +x $CONFIG_STATUS
18376 ac_clean_files=$ac_clean_files_save
18377
18378 # configure is writing to config.log, and then calls config.status.
18379 # config.status does its own redirection, appending to config.log.
18380 # Unfortunately, on DOS this fails, as config.log is still kept open
18381 # by configure, so config.status won't be able to write to it; its
18382 # output is simply discarded.  So we exec the FD to /dev/null,
18383 # effectively closing config.log, so it can be properly (re)opened and
18384 # appended to by config.status.  When coming back to configure, we
18385 # need to make the FD available again.
18386 if test "$no_create" != yes; then
18387   ac_cs_success=:
18388   exec 5>/dev/null
18389   $SHELL $CONFIG_STATUS || ac_cs_success=false
18390   exec 5>>config.log
18391   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18392   # would make configure fail if this is the last instruction.
18393   $ac_cs_success || { (exit 1); exit 1; }
18394 fi
18395 ${MAKE-make} preinstall