]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20081227
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.457 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
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-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --enable-mixed-case     tic should assume mixed-case filenames
704   --with-install-prefix   prefixes actual install-location ($DESTDIR)
705 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
706   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
707   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
708   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
709   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
710   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
711   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
712 Options to Specify the Libraries Built/Used:
713   --with-libtool          generate libraries with libtool
714   --with-shared           generate shared-libraries
715   --with-normal           generate normal-libraries (default)
716   --with-debug            generate debug-libraries (default)
717   --with-profile          generate profile-libraries
718   --with-termlib          generate separate terminfo library
719   --with-ticlib           generate separate tic library
720   --with-gpm              use Alessandro Rubini's GPM library
721   --without-dlsym         do not use dlsym() to load GPM dynamically
722   --with-sysmouse         use sysmouse (FreeBSD console)
723   --enable-rpath          use rpath option when generating shared libraries
724   --disable-relink        relink shared libraries during install
725   --with-shlib-version=X  Specify rel or abi version for shared libs
726 Fine-Tuning Your Configuration:
727   --disable-overwrite     leave out the link to -lcurses
728   --disable-database      do not use terminfo, only fallbacks/termcap
729   --with-database=XXX     specify terminfo source to install
730   --with-hashed-db        specify hashed-database library
731   --with-fallbacks=XXX    specify list of fallback terminal descriptions
732   --without-xterm-new     specify if xterm terminfo should be old version
733   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
734   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
735   --disable-big-core      assume machine has little memory
736   --disable-big-strings   assume compiler has only standard-size strings
737   --enable-termcap        compile in termcap fallback support
738   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
739   --enable-getcap         fast termcap load, no xrefs to terminfo
740   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
741   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
742   --disable-root-environ  restrict environment when running as root
743   --enable-symlinks       make tic use symbolic links not hard links
744   --enable-broken_linker  compile with broken-linker support code
745   --enable-bsdpad         recognize BSD-style prefix padding
746   --enable-widec          compile with wide-char/UTF-8 code
747   --disable-lp64          allow chtype to be long (ignore _LP64)
748   --disable-largefile     omit support for large files
749   --disable-tparm-varargs compile tparm() without varargs interface
750   --disable-tic-depends   link tic library without explicit dependency on ncurses library
751   --with-bool=TYPE        override fallback type of bool variable
752   --with-caps=alt         compile with alternate Caps file
753   --with-chtype=TYPE      override type of chtype
754   --with-ospeed=TYPE      override type of ospeed variable
755   --with-mmask-t=TYPE     override type of mmask_t
756   --with-rcs-ids          compile-in RCS identifiers
757 Options to Specify How Manpages are Installed:
758   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
759                           optionally formatted/catonly, e.g., gzip,formatted
760   --with-manpage-renames  specify manpage-renaming
761   --with-manpage-aliases  specify manpage-aliases using .so
762   --with-manpage-symlinks specify manpage-aliases using symlinks
763   --with-manpage-tbl      specify manpage processing with tbl
764 Extensions:
765   --disable-ext-funcs     disable function-extensions
766   --enable-const          compile with extra/non-standard const
767   --enable-ext-colors     compile for 256-color support
768   --enable-ext-mouse      compile for extended mouse-encoding
769   --enable-no-padding     compile with $NCURSES_NO_PADDING code
770   --enable-signed-char    compile using signed Boolean's in term.h
771   --enable-sigwinch       compile with SIGWINCH handler
772   --enable-tcap-names     compile with user-definable terminal capabilities
773 Development Code:
774   --without-develop       disable development options
775   --enable-hard-tabs      compile with hard-tabs code
776   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
777 Experimental Code:
778   --disable-assumed-color do not assume anything about default-colors
779   --disable-hashmap       compile without hashmap scrolling-optimization
780   --enable-colorfgbg      compile with $COLORFGBG code
781   --with-pthread          use POSIX thread library
782   --enable-weak-symbols   enable weak-symbols for pthreads
783   --enable-reentrant      compile with experimental reentrant code
784   --enable-safe-sprintf   compile with experimental safe-sprintf code
785   --disable-scroll-hints  compile without scroll-hints code
786   --enable-wgetch-events  compile with experimental wgetch-events code
787 Testing/development Options:
788   --enable-echo           build: display "compiling" commands (default)
789   --enable-warnings       build: turn on GCC compiler warnings
790   --enable-assertions     test: turn on generation of assertion code
791   --with-dmalloc          test: use Gray Watson's dmalloc library
792   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
793   --with-valgrind         test: use valgrind
794   --disable-leaks         test: free permanent memory, analyze leaks
795   --enable-expanded       test: generate functions for certain macros
796   --disable-macros        test: use functions rather than macros
797   --with-trace            test: add trace() function to all models of ncurses
798 Ada95 Binding Options:
799   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
800   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
801   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
802
803 Some influential environment variables:
804   CC          C compiler command
805   CFLAGS      C compiler flags
806   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
807               nonstandard directory <lib dir>
808   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
809               headers in a nonstandard directory <include dir>
810   CPP         C preprocessor
811   CXX         C++ compiler command
812   CXXFLAGS    C++ compiler flags
813   CXXCPP      C++ preprocessor
814
815 Use these variables to override the choices made by `configure' or to help
816 it to find libraries and programs with nonstandard names/locations.
817
818 EOF
819 fi
820
821 if test "$ac_init_help" = "recursive"; then
822   # If there are subdirs, report their specific --help.
823   ac_popdir=`pwd`
824   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
825     cd $ac_subdir
826     # A "../" for each directory in /$ac_subdir.
827     ac_dots=`echo $ac_subdir |
828              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
829
830     case $srcdir in
831     .) # No --srcdir option.  We are building in place.
832       ac_sub_srcdir=$srcdir ;;
833     [\\/]* | ?:[\\/]* ) # Absolute path.
834       ac_sub_srcdir=$srcdir/$ac_subdir ;;
835     *) # Relative path.
836       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
837     esac
838
839     # Check for guested configure; otherwise get Cygnus style configure.
840     if test -f $ac_sub_srcdir/configure.gnu; then
841       echo
842       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
843     elif test -f $ac_sub_srcdir/configure; then
844       echo
845       $SHELL $ac_sub_srcdir/configure  --help=recursive
846     elif test -f $ac_sub_srcdir/configure.ac ||
847            test -f $ac_sub_srcdir/configure.in; then
848       echo
849       $ac_configure --help
850     else
851       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
852     fi
853     cd $ac_popdir
854   done
855 fi
856
857 test -n "$ac_init_help" && exit 0
858 if $ac_init_version; then
859   cat <<\EOF
860
861 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
862 Free Software Foundation, Inc.
863 This configure script is free software; the Free Software Foundation
864 gives unlimited permission to copy, distribute and modify it.
865 EOF
866   exit 0
867 fi
868 exec 5>config.log
869 cat >&5 <<EOF
870 This file contains any messages produced by compilers while
871 running configure, to aid debugging if configure makes a mistake.
872
873 It was created by $as_me, which was
874 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
875
876   $ $0 $@
877
878 EOF
879 {
880 cat <<_ASUNAME
881 ## ---------- ##
882 ## Platform.  ##
883 ## ---------- ##
884
885 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
886 uname -m = `(uname -m) 2>/dev/null || echo unknown`
887 uname -r = `(uname -r) 2>/dev/null || echo unknown`
888 uname -s = `(uname -s) 2>/dev/null || echo unknown`
889 uname -v = `(uname -v) 2>/dev/null || echo unknown`
890
891 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
892 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
893
894 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
895 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
896 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
897 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
898 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
899 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
900 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
901
902 PATH = $PATH
903
904 _ASUNAME
905 } >&5
906
907 cat >&5 <<EOF
908 ## ------------ ##
909 ## Core tests.  ##
910 ## ------------ ##
911
912 EOF
913
914 # Keep a trace of the command line.
915 # Strip out --no-create and --no-recursion so they do not pile up.
916 # Also quote any args containing shell meta-characters.
917 ac_configure_args=
918 ac_sep=
919 for ac_arg
920 do
921   case $ac_arg in
922   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
923   | --no-cr | --no-c) ;;
924   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
925   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
926   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
927     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
928     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
929     ac_sep=" " ;;
930   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
931      ac_sep=" " ;;
932   esac
933   # Get rid of the leading space.
934 done
935
936 # When interrupted or exit'd, cleanup temporary files, and complete
937 # config.log.  We remove comments because anyway the quotes in there
938 # would cause problems or look ugly.
939 trap 'exit_status=$?
940   # Save into config.log some information that might help in debugging.
941   echo >&5
942   echo "## ----------------- ##" >&5
943   echo "## Cache variables.  ##" >&5
944   echo "## ----------------- ##" >&5
945   echo >&5
946   # The following way of writing the cache mishandles newlines in values,
947 {
948   (set) 2>&1 |
949     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
950     *ac_space=\ *)
951       sed -n \
952         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
953           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
954       ;;
955     *)
956       sed -n \
957         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
958       ;;
959     esac;
960 } >&5
961   sed "/^$/d" confdefs.h >conftest.log
962   if test -s conftest.log; then
963     echo >&5
964     echo "## ------------ ##" >&5
965     echo "## confdefs.h.  ##" >&5
966     echo "## ------------ ##" >&5
967     echo >&5
968     cat conftest.log >&5
969   fi
970   (echo; echo) >&5
971   test "$ac_signal" != 0 &&
972     echo "$as_me: caught signal $ac_signal" >&5
973   echo "$as_me: exit $exit_status" >&5
974   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
975     exit $exit_status
976      ' 0
977 for ac_signal in 1 2 13 15; do
978   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
979 done
980 ac_signal=0
981
982 # confdefs.h avoids OS command line length limits that DEFS can exceed.
983 rm -rf conftest* confdefs.h
984 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
985 echo >confdefs.h
986
987 # Let the site file select an alternate cache file if it wants to.
988 # Prefer explicitly selected file to automatically selected ones.
989 if test -z "$CONFIG_SITE"; then
990   if test "x$prefix" != xNONE; then
991     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
992   else
993     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
994   fi
995 fi
996 for ac_site_file in $CONFIG_SITE; do
997   if test -r "$ac_site_file"; then
998     { echo "$as_me:998: loading site script $ac_site_file" >&5
999 echo "$as_me: loading site script $ac_site_file" >&6;}
1000     cat "$ac_site_file" >&5
1001     . "$ac_site_file"
1002   fi
1003 done
1004
1005 if test -r "$cache_file"; then
1006   # Some versions of bash will fail to source /dev/null (special
1007   # files actually), so we avoid doing that.
1008   if test -f "$cache_file"; then
1009     { echo "$as_me:1009: loading cache $cache_file" >&5
1010 echo "$as_me: loading cache $cache_file" >&6;}
1011     case $cache_file in
1012       [\\/]* | ?:[\\/]* ) . $cache_file;;
1013       *)                      . ./$cache_file;;
1014     esac
1015   fi
1016 else
1017   { echo "$as_me:1017: creating cache $cache_file" >&5
1018 echo "$as_me: creating cache $cache_file" >&6;}
1019   >$cache_file
1020 fi
1021
1022 # Check that the precious variables saved in the cache have kept the same
1023 # value.
1024 ac_cache_corrupted=false
1025 for ac_var in `(set) 2>&1 |
1026                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1027   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1028   eval ac_new_set=\$ac_env_${ac_var}_set
1029   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1030   eval ac_new_val="\$ac_env_${ac_var}_value"
1031   case $ac_old_set,$ac_new_set in
1032     set,)
1033       { echo "$as_me:1033: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1034 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1035       ac_cache_corrupted=: ;;
1036     ,set)
1037       { echo "$as_me:1037: error: \`$ac_var' was not set in the previous run" >&5
1038 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1039       ac_cache_corrupted=: ;;
1040     ,);;
1041     *)
1042       if test "x$ac_old_val" != "x$ac_new_val"; then
1043         { echo "$as_me:1043: error: \`$ac_var' has changed since the previous run:" >&5
1044 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1045         { echo "$as_me:1045:   former value:  $ac_old_val" >&5
1046 echo "$as_me:   former value:  $ac_old_val" >&2;}
1047         { echo "$as_me:1047:   current value: $ac_new_val" >&5
1048 echo "$as_me:   current value: $ac_new_val" >&2;}
1049         ac_cache_corrupted=:
1050       fi;;
1051   esac
1052   # Pass precious variables to config.status.  It doesn't matter if
1053   # we pass some twice (in addition to the command line arguments).
1054   if test "$ac_new_set" = set; then
1055     case $ac_new_val in
1056     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1057       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1058       ac_configure_args="$ac_configure_args '$ac_arg'"
1059       ;;
1060     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1061        ;;
1062     esac
1063   fi
1064 done
1065 if $ac_cache_corrupted; then
1066   { echo "$as_me:1066: error: changes in the environment can compromise the build" >&5
1067 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1068   { { echo "$as_me:1068: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1069 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1070    { (exit 1); exit 1; }; }
1071 fi
1072
1073 ac_ext=c
1074 ac_cpp='$CPP $CPPFLAGS'
1075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1078 ac_main_return=return
1079
1080 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1081   *c*,-n*) ECHO_N= ECHO_C='
1082 ' ECHO_T='      ' ;;
1083   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1084   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1085 esac
1086 echo "#! $SHELL" >conftest.sh
1087 echo  "exit 0"   >>conftest.sh
1088 chmod +x conftest.sh
1089 if { (echo "$as_me:1089: PATH=\".;.\"; conftest.sh") >&5
1090   (PATH=".;."; conftest.sh) 2>&5
1091   ac_status=$?
1092   echo "$as_me:1092: \$? = $ac_status" >&5
1093   (exit $ac_status); }; then
1094   ac_path_separator=';'
1095 else
1096   ac_path_separator=:
1097 fi
1098 PATH_SEPARATOR="$ac_path_separator"
1099 rm -f conftest.sh
1100
1101 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1102
1103 top_builddir=`pwd`
1104
1105 echo "$as_me:1105: checking for egrep" >&5
1106 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1107 if test "${ac_cv_prog_egrep+set}" = set; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1111     then ac_cv_prog_egrep='grep -E'
1112     else ac_cv_prog_egrep='egrep'
1113     fi
1114 fi
1115 echo "$as_me:1115: result: $ac_cv_prog_egrep" >&5
1116 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1117  EGREP=$ac_cv_prog_egrep
1118
1119 test -z "$EGREP" && { { echo "$as_me:1119: error: No egrep program found" >&5
1120 echo "$as_me: error: No egrep program found" >&2;}
1121    { (exit 1); exit 1; }; }
1122
1123 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1125 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1126 cf_cv_abi_version=${NCURSES_MAJOR}
1127 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1128 cf_cv_timestamp=`date`
1129 echo "$as_me:1129: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1130 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1131
1132 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1133
1134 # Check whether --with-rel-version or --without-rel-version was given.
1135 if test "${with_rel_version+set}" = set; then
1136   withval="$with_rel_version"
1137   { echo "$as_me:1137: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1138 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1139  cf_cv_rel_version=$withval
1140 fi;
1141
1142  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1143  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1144
1145 if test -n "$NCURSES_MAJOR" ; then
1146   case $NCURSES_MAJOR in #(vi
1147   [0-9]*) #(vi
1148         ;;
1149   *)
1150         { { echo "$as_me:1150: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1151 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1152    { (exit 1); exit 1; }; }
1153         ;;
1154   esac
1155 else
1156   { { echo "$as_me:1156: error: Release major-version value is empty" >&5
1157 echo "$as_me: error: Release major-version value is empty" >&2;}
1158    { (exit 1); exit 1; }; }
1159 fi
1160
1161 if test -n "$NCURSES_MINOR" ; then
1162   case $NCURSES_MINOR in #(vi
1163   [0-9]*) #(vi
1164         ;;
1165   *)
1166         { { echo "$as_me:1166: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1167 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1168    { (exit 1); exit 1; }; }
1169         ;;
1170   esac
1171 else
1172   { { echo "$as_me:1172: error: Release minor-version value is empty" >&5
1173 echo "$as_me: error: Release minor-version value is empty" >&2;}
1174    { (exit 1); exit 1; }; }
1175 fi
1176
1177 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1178
1179 # Check whether --with-abi-version or --without-abi-version was given.
1180 if test "${with_abi_version+set}" = set; then
1181   withval="$with_abi_version"
1182   { echo "$as_me:1182: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1183 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1184  cf_cv_abi_version=$withval
1185 fi;
1186
1187 if test -n "$cf_cv_abi_version" ; then
1188   case $cf_cv_abi_version in #(vi
1189   [0-9]*) #(vi
1190         ;;
1191   *)
1192         { { echo "$as_me:1192: error: ABI version is not a number: $cf_cv_abi_version" >&5
1193 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1194    { (exit 1); exit 1; }; }
1195         ;;
1196   esac
1197 else
1198   { { echo "$as_me:1198: error: ABI version value is empty" >&5
1199 echo "$as_me: error: ABI version value is empty" >&2;}
1200    { (exit 1); exit 1; }; }
1201 fi
1202
1203 ac_aux_dir=
1204 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1205   if test -f $ac_dir/install-sh; then
1206     ac_aux_dir=$ac_dir
1207     ac_install_sh="$ac_aux_dir/install-sh -c"
1208     break
1209   elif test -f $ac_dir/install.sh; then
1210     ac_aux_dir=$ac_dir
1211     ac_install_sh="$ac_aux_dir/install.sh -c"
1212     break
1213   elif test -f $ac_dir/shtool; then
1214     ac_aux_dir=$ac_dir
1215     ac_install_sh="$ac_aux_dir/shtool install -c"
1216     break
1217   fi
1218 done
1219 if test -z "$ac_aux_dir"; then
1220   { { echo "$as_me:1220: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1221 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1222    { (exit 1); exit 1; }; }
1223 fi
1224 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1225 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1226 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1227
1228 # Make sure we can run config.sub.
1229 $ac_config_sub sun4 >/dev/null 2>&1 ||
1230   { { echo "$as_me:1230: error: cannot run $ac_config_sub" >&5
1231 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1232    { (exit 1); exit 1; }; }
1233
1234 echo "$as_me:1234: checking build system type" >&5
1235 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1236 if test "${ac_cv_build+set}" = set; then
1237   echo $ECHO_N "(cached) $ECHO_C" >&6
1238 else
1239   ac_cv_build_alias=$build_alias
1240 test -z "$ac_cv_build_alias" &&
1241   ac_cv_build_alias=`$ac_config_guess`
1242 test -z "$ac_cv_build_alias" &&
1243   { { echo "$as_me:1243: error: cannot guess build type; you must specify one" >&5
1244 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1245    { (exit 1); exit 1; }; }
1246 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1247   { { echo "$as_me:1247: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1248 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1249    { (exit 1); exit 1; }; }
1250
1251 fi
1252 echo "$as_me:1252: result: $ac_cv_build" >&5
1253 echo "${ECHO_T}$ac_cv_build" >&6
1254 build=$ac_cv_build
1255 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1256 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1257 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1258
1259 echo "$as_me:1259: checking host system type" >&5
1260 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1261 if test "${ac_cv_host+set}" = set; then
1262   echo $ECHO_N "(cached) $ECHO_C" >&6
1263 else
1264   ac_cv_host_alias=$host_alias
1265 test -z "$ac_cv_host_alias" &&
1266   ac_cv_host_alias=$ac_cv_build_alias
1267 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1268   { { echo "$as_me:1268: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1269 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1270    { (exit 1); exit 1; }; }
1271
1272 fi
1273 echo "$as_me:1273: result: $ac_cv_host" >&5
1274 echo "${ECHO_T}$ac_cv_host" >&6
1275 host=$ac_cv_host
1276 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1277 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1278 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1279
1280 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1281         echo "$as_me:1281: checking target system type" >&5
1282 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1283 if test "${ac_cv_target+set}" = set; then
1284   echo $ECHO_N "(cached) $ECHO_C" >&6
1285 else
1286   ac_cv_target_alias=$target_alias
1287 test "x$ac_cv_target_alias" = "x" &&
1288   ac_cv_target_alias=$ac_cv_host_alias
1289 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1290   { { echo "$as_me:1290: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1291 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1292    { (exit 1); exit 1; }; }
1293
1294 fi
1295 echo "$as_me:1295: result: $ac_cv_target" >&5
1296 echo "${ECHO_T}$ac_cv_target" >&6
1297 target=$ac_cv_target
1298 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1299 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1300 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1301
1302 # The aliases save the names the user supplied, while $host etc.
1303 # will get canonicalized.
1304 test -n "$target_alias" &&
1305   test "$program_prefix$program_suffix$program_transform_name" = \
1306     NONENONEs,x,x, &&
1307   program_prefix=${target_alias}-
1308         system_name="$host_os"
1309 else
1310         system_name="`(uname -s -r) 2>/dev/null`"
1311         if test -z "$system_name" ; then
1312                 system_name="`(hostname) 2>/dev/null`"
1313         fi
1314 fi
1315 test -n "$system_name" && cat >>confdefs.h <<EOF
1316 #define SYSTEM_NAME "$system_name"
1317 EOF
1318
1319 if test "${cf_cv_system_name+set}" = set; then
1320   echo $ECHO_N "(cached) $ECHO_C" >&6
1321 else
1322   cf_cv_system_name="$system_name"
1323 fi
1324
1325 test -z "$system_name" && system_name="$cf_cv_system_name"
1326 test -n "$cf_cv_system_name" && echo "$as_me:1326: result: Configuring for $cf_cv_system_name" >&5
1327 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1328
1329 if test ".$system_name" != ".$cf_cv_system_name" ; then
1330         echo "$as_me:1330: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1331 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1332         { { echo "$as_me:1332: error: \"Please remove config.cache and try again.\"" >&5
1333 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1334    { (exit 1); exit 1; }; }
1335 fi
1336
1337 # Check whether --with-system-type or --without-system-type was given.
1338 if test "${with_system_type+set}" = set; then
1339   withval="$with_system_type"
1340   { echo "$as_me:1340: WARNING: overriding system type to $withval" >&5
1341 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1342  cf_cv_system_name=$withval
1343 fi;
1344
1345 ###     Save the given $CFLAGS to allow user-override.
1346 cf_user_CFLAGS="$CFLAGS"
1347
1348 ###     Default install-location
1349
1350 echo "$as_me:1350: checking for prefix" >&5
1351 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1352 if test "x$prefix" = "xNONE" ; then
1353         case "$cf_cv_system_name" in
1354                 # non-vendor systems don't have a conflict
1355         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1356                 prefix=/usr
1357                 ;;
1358         *)      prefix=$ac_default_prefix
1359                 ;;
1360         esac
1361 fi
1362 echo "$as_me:1362: result: $prefix" >&5
1363 echo "${ECHO_T}$prefix" >&6
1364
1365 if test "x$prefix" = "xNONE" ; then
1366 echo "$as_me:1366: checking for default include-directory" >&5
1367 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1368 test -n "$verbose" && echo 1>&6
1369 for cf_symbol in \
1370         $includedir \
1371         $includedir/ncurses \
1372         $prefix/include \
1373         $prefix/include/ncurses \
1374         /usr/local/include \
1375         /usr/local/include/ncurses \
1376         /usr/include \
1377         /usr/include/ncurses
1378 do
1379         cf_dir=`eval echo $cf_symbol`
1380         if test -f $cf_dir/curses.h ; then
1381         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1382                 includedir="$cf_symbol"
1383                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1384                 break
1385         fi
1386         fi
1387         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1388 done
1389 echo "$as_me:1389: result: $includedir" >&5
1390 echo "${ECHO_T}$includedir" >&6
1391 fi
1392
1393 ###     Checks for programs.
1394 ac_ext=c
1395 ac_cpp='$CPP $CPPFLAGS'
1396 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1397 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1398 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1399 ac_main_return=return
1400 if test -n "$ac_tool_prefix"; then
1401   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1402 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1403 echo "$as_me:1403: checking for $ac_word" >&5
1404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405 if test "${ac_cv_prog_CC+set}" = set; then
1406   echo $ECHO_N "(cached) $ECHO_C" >&6
1407 else
1408   if test -n "$CC"; then
1409   ac_cv_prog_CC="$CC" # Let the user override the test.
1410 else
1411   ac_save_IFS=$IFS; IFS=$ac_path_separator
1412 ac_dummy="$PATH"
1413 for ac_dir in $ac_dummy; do
1414   IFS=$ac_save_IFS
1415   test -z "$ac_dir" && ac_dir=.
1416   $as_executable_p "$ac_dir/$ac_word" || continue
1417 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1418 echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1419 break
1420 done
1421
1422 fi
1423 fi
1424 CC=$ac_cv_prog_CC
1425 if test -n "$CC"; then
1426   echo "$as_me:1426: result: $CC" >&5
1427 echo "${ECHO_T}$CC" >&6
1428 else
1429   echo "$as_me:1429: result: no" >&5
1430 echo "${ECHO_T}no" >&6
1431 fi
1432
1433 fi
1434 if test -z "$ac_cv_prog_CC"; then
1435   ac_ct_CC=$CC
1436   # Extract the first word of "gcc", so it can be a program name with args.
1437 set dummy gcc; ac_word=$2
1438 echo "$as_me:1438: checking for $ac_word" >&5
1439 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1440 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1441   echo $ECHO_N "(cached) $ECHO_C" >&6
1442 else
1443   if test -n "$ac_ct_CC"; then
1444   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1445 else
1446   ac_save_IFS=$IFS; IFS=$ac_path_separator
1447 ac_dummy="$PATH"
1448 for ac_dir in $ac_dummy; do
1449   IFS=$ac_save_IFS
1450   test -z "$ac_dir" && ac_dir=.
1451   $as_executable_p "$ac_dir/$ac_word" || continue
1452 ac_cv_prog_ac_ct_CC="gcc"
1453 echo "$as_me:1453: found $ac_dir/$ac_word" >&5
1454 break
1455 done
1456
1457 fi
1458 fi
1459 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1460 if test -n "$ac_ct_CC"; then
1461   echo "$as_me:1461: result: $ac_ct_CC" >&5
1462 echo "${ECHO_T}$ac_ct_CC" >&6
1463 else
1464   echo "$as_me:1464: result: no" >&5
1465 echo "${ECHO_T}no" >&6
1466 fi
1467
1468   CC=$ac_ct_CC
1469 else
1470   CC="$ac_cv_prog_CC"
1471 fi
1472
1473 if test -z "$CC"; then
1474   if test -n "$ac_tool_prefix"; then
1475   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1476 set dummy ${ac_tool_prefix}cc; ac_word=$2
1477 echo "$as_me:1477: checking for $ac_word" >&5
1478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1479 if test "${ac_cv_prog_CC+set}" = set; then
1480   echo $ECHO_N "(cached) $ECHO_C" >&6
1481 else
1482   if test -n "$CC"; then
1483   ac_cv_prog_CC="$CC" # Let the user override the test.
1484 else
1485   ac_save_IFS=$IFS; IFS=$ac_path_separator
1486 ac_dummy="$PATH"
1487 for ac_dir in $ac_dummy; do
1488   IFS=$ac_save_IFS
1489   test -z "$ac_dir" && ac_dir=.
1490   $as_executable_p "$ac_dir/$ac_word" || continue
1491 ac_cv_prog_CC="${ac_tool_prefix}cc"
1492 echo "$as_me:1492: found $ac_dir/$ac_word" >&5
1493 break
1494 done
1495
1496 fi
1497 fi
1498 CC=$ac_cv_prog_CC
1499 if test -n "$CC"; then
1500   echo "$as_me:1500: result: $CC" >&5
1501 echo "${ECHO_T}$CC" >&6
1502 else
1503   echo "$as_me:1503: result: no" >&5
1504 echo "${ECHO_T}no" >&6
1505 fi
1506
1507 fi
1508 if test -z "$ac_cv_prog_CC"; then
1509   ac_ct_CC=$CC
1510   # Extract the first word of "cc", so it can be a program name with args.
1511 set dummy cc; ac_word=$2
1512 echo "$as_me:1512: checking for $ac_word" >&5
1513 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1514 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1515   echo $ECHO_N "(cached) $ECHO_C" >&6
1516 else
1517   if test -n "$ac_ct_CC"; then
1518   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1519 else
1520   ac_save_IFS=$IFS; IFS=$ac_path_separator
1521 ac_dummy="$PATH"
1522 for ac_dir in $ac_dummy; do
1523   IFS=$ac_save_IFS
1524   test -z "$ac_dir" && ac_dir=.
1525   $as_executable_p "$ac_dir/$ac_word" || continue
1526 ac_cv_prog_ac_ct_CC="cc"
1527 echo "$as_me:1527: found $ac_dir/$ac_word" >&5
1528 break
1529 done
1530
1531 fi
1532 fi
1533 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1534 if test -n "$ac_ct_CC"; then
1535   echo "$as_me:1535: result: $ac_ct_CC" >&5
1536 echo "${ECHO_T}$ac_ct_CC" >&6
1537 else
1538   echo "$as_me:1538: result: no" >&5
1539 echo "${ECHO_T}no" >&6
1540 fi
1541
1542   CC=$ac_ct_CC
1543 else
1544   CC="$ac_cv_prog_CC"
1545 fi
1546
1547 fi
1548 if test -z "$CC"; then
1549   # Extract the first word of "cc", so it can be a program name with args.
1550 set dummy cc; ac_word=$2
1551 echo "$as_me:1551: checking for $ac_word" >&5
1552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1553 if test "${ac_cv_prog_CC+set}" = set; then
1554   echo $ECHO_N "(cached) $ECHO_C" >&6
1555 else
1556   if test -n "$CC"; then
1557   ac_cv_prog_CC="$CC" # Let the user override the test.
1558 else
1559   ac_prog_rejected=no
1560   ac_save_IFS=$IFS; IFS=$ac_path_separator
1561 ac_dummy="$PATH"
1562 for ac_dir in $ac_dummy; do
1563   IFS=$ac_save_IFS
1564   test -z "$ac_dir" && ac_dir=.
1565   $as_executable_p "$ac_dir/$ac_word" || continue
1566 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1567   ac_prog_rejected=yes
1568   continue
1569 fi
1570 ac_cv_prog_CC="cc"
1571 echo "$as_me:1571: found $ac_dir/$ac_word" >&5
1572 break
1573 done
1574
1575 if test $ac_prog_rejected = yes; then
1576   # We found a bogon in the path, so make sure we never use it.
1577   set dummy $ac_cv_prog_CC
1578   shift
1579   if test $# != 0; then
1580     # We chose a different compiler from the bogus one.
1581     # However, it has the same basename, so the bogon will be chosen
1582     # first if we set CC to just the basename; use the full file name.
1583     shift
1584     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1585     shift
1586     ac_cv_prog_CC="$@"
1587   fi
1588 fi
1589 fi
1590 fi
1591 CC=$ac_cv_prog_CC
1592 if test -n "$CC"; then
1593   echo "$as_me:1593: result: $CC" >&5
1594 echo "${ECHO_T}$CC" >&6
1595 else
1596   echo "$as_me:1596: result: no" >&5
1597 echo "${ECHO_T}no" >&6
1598 fi
1599
1600 fi
1601 if test -z "$CC"; then
1602   if test -n "$ac_tool_prefix"; then
1603   for ac_prog in cl
1604   do
1605     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1606 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1607 echo "$as_me:1607: checking for $ac_word" >&5
1608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1609 if test "${ac_cv_prog_CC+set}" = set; then
1610   echo $ECHO_N "(cached) $ECHO_C" >&6
1611 else
1612   if test -n "$CC"; then
1613   ac_cv_prog_CC="$CC" # Let the user override the test.
1614 else
1615   ac_save_IFS=$IFS; IFS=$ac_path_separator
1616 ac_dummy="$PATH"
1617 for ac_dir in $ac_dummy; do
1618   IFS=$ac_save_IFS
1619   test -z "$ac_dir" && ac_dir=.
1620   $as_executable_p "$ac_dir/$ac_word" || continue
1621 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1622 echo "$as_me:1622: found $ac_dir/$ac_word" >&5
1623 break
1624 done
1625
1626 fi
1627 fi
1628 CC=$ac_cv_prog_CC
1629 if test -n "$CC"; then
1630   echo "$as_me:1630: result: $CC" >&5
1631 echo "${ECHO_T}$CC" >&6
1632 else
1633   echo "$as_me:1633: result: no" >&5
1634 echo "${ECHO_T}no" >&6
1635 fi
1636
1637     test -n "$CC" && break
1638   done
1639 fi
1640 if test -z "$CC"; then
1641   ac_ct_CC=$CC
1642   for ac_prog in cl
1643 do
1644   # Extract the first word of "$ac_prog", so it can be a program name with args.
1645 set dummy $ac_prog; ac_word=$2
1646 echo "$as_me:1646: checking for $ac_word" >&5
1647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1648 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1649   echo $ECHO_N "(cached) $ECHO_C" >&6
1650 else
1651   if test -n "$ac_ct_CC"; then
1652   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1653 else
1654   ac_save_IFS=$IFS; IFS=$ac_path_separator
1655 ac_dummy="$PATH"
1656 for ac_dir in $ac_dummy; do
1657   IFS=$ac_save_IFS
1658   test -z "$ac_dir" && ac_dir=.
1659   $as_executable_p "$ac_dir/$ac_word" || continue
1660 ac_cv_prog_ac_ct_CC="$ac_prog"
1661 echo "$as_me:1661: found $ac_dir/$ac_word" >&5
1662 break
1663 done
1664
1665 fi
1666 fi
1667 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1668 if test -n "$ac_ct_CC"; then
1669   echo "$as_me:1669: result: $ac_ct_CC" >&5
1670 echo "${ECHO_T}$ac_ct_CC" >&6
1671 else
1672   echo "$as_me:1672: result: no" >&5
1673 echo "${ECHO_T}no" >&6
1674 fi
1675
1676   test -n "$ac_ct_CC" && break
1677 done
1678
1679   CC=$ac_ct_CC
1680 fi
1681
1682 fi
1683
1684 test -z "$CC" && { { echo "$as_me:1684: error: no acceptable cc found in \$PATH" >&5
1685 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1686    { (exit 1); exit 1; }; }
1687
1688 # Provide some information about the compiler.
1689 echo "$as_me:1689:" \
1690      "checking for C compiler version" >&5
1691 ac_compiler=`set X $ac_compile; echo $2`
1692 { (eval echo "$as_me:1692: \"$ac_compiler --version </dev/null >&5\"") >&5
1693   (eval $ac_compiler --version </dev/null >&5) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }
1697 { (eval echo "$as_me:1697: \"$ac_compiler -v </dev/null >&5\"") >&5
1698   (eval $ac_compiler -v </dev/null >&5) 2>&5
1699   ac_status=$?
1700   echo "$as_me:1700: \$? = $ac_status" >&5
1701   (exit $ac_status); }
1702 { (eval echo "$as_me:1702: \"$ac_compiler -V </dev/null >&5\"") >&5
1703   (eval $ac_compiler -V </dev/null >&5) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }
1707
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #line 1709 "configure"
1710 #include "confdefs.h"
1711
1712 int
1713 main ()
1714 {
1715
1716   ;
1717   return 0;
1718 }
1719 _ACEOF
1720 ac_clean_files_save=$ac_clean_files
1721 ac_clean_files="$ac_clean_files a.out a.exe"
1722 # Try to create an executable without -o first, disregard a.out.
1723 # It will help us diagnose broken compilers, and finding out an intuition
1724 # of exeext.
1725 echo "$as_me:1725: checking for C compiler default output" >&5
1726 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1727 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1728 if { (eval echo "$as_me:1728: \"$ac_link_default\"") >&5
1729   (eval $ac_link_default) 2>&5
1730   ac_status=$?
1731   echo "$as_me:1731: \$? = $ac_status" >&5
1732   (exit $ac_status); }; then
1733   # Find the output, starting from the most likely.  This scheme is
1734 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1735 # resort.
1736 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1737                 ls a.out conftest 2>/dev/null;
1738                 ls a.* conftest.* 2>/dev/null`; do
1739   case $ac_file in
1740     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1741     a.out ) # We found the default executable, but exeext='' is most
1742             # certainly right.
1743             break;;
1744     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1745           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1746           export ac_cv_exeext
1747           break;;
1748     * ) break;;
1749   esac
1750 done
1751 else
1752   echo "$as_me: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754 { { echo "$as_me:1754: error: C compiler cannot create executables" >&5
1755 echo "$as_me: error: C compiler cannot create executables" >&2;}
1756    { (exit 77); exit 77; }; }
1757 fi
1758
1759 ac_exeext=$ac_cv_exeext
1760 echo "$as_me:1760: result: $ac_file" >&5
1761 echo "${ECHO_T}$ac_file" >&6
1762
1763 # Check the compiler produces executables we can run.  If not, either
1764 # the compiler is broken, or we cross compile.
1765 echo "$as_me:1765: checking whether the C compiler works" >&5
1766 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1767 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1768 # If not cross compiling, check that we can run a simple program.
1769 if test "$cross_compiling" != yes; then
1770   if { ac_try='./$ac_file'
1771   { (eval echo "$as_me:1771: \"$ac_try\"") >&5
1772   (eval $ac_try) 2>&5
1773   ac_status=$?
1774   echo "$as_me:1774: \$? = $ac_status" >&5
1775   (exit $ac_status); }; }; then
1776     cross_compiling=no
1777   else
1778     if test "$cross_compiling" = maybe; then
1779         cross_compiling=yes
1780     else
1781         { { echo "$as_me:1781: error: cannot run C compiled programs.
1782 If you meant to cross compile, use \`--host'." >&5
1783 echo "$as_me: error: cannot run C compiled programs.
1784 If you meant to cross compile, use \`--host'." >&2;}
1785    { (exit 1); exit 1; }; }
1786     fi
1787   fi
1788 fi
1789 echo "$as_me:1789: result: yes" >&5
1790 echo "${ECHO_T}yes" >&6
1791
1792 rm -f a.out a.exe conftest$ac_cv_exeext
1793 ac_clean_files=$ac_clean_files_save
1794 # Check the compiler produces executables we can run.  If not, either
1795 # the compiler is broken, or we cross compile.
1796 echo "$as_me:1796: checking whether we are cross compiling" >&5
1797 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1798 echo "$as_me:1798: result: $cross_compiling" >&5
1799 echo "${ECHO_T}$cross_compiling" >&6
1800
1801 echo "$as_me:1801: checking for executable suffix" >&5
1802 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1803 if { (eval echo "$as_me:1803: \"$ac_link\"") >&5
1804   (eval $ac_link) 2>&5
1805   ac_status=$?
1806   echo "$as_me:1806: \$? = $ac_status" >&5
1807   (exit $ac_status); }; then
1808   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1809 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1810 # work properly (i.e., refer to `conftest.exe'), while it won't with
1811 # `rm'.
1812 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1813   case $ac_file in
1814     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1815     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1816           export ac_cv_exeext
1817           break;;
1818     * ) break;;
1819   esac
1820 done
1821 else
1822   { { echo "$as_me:1822: error: cannot compute EXEEXT: cannot compile and link" >&5
1823 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1824    { (exit 1); exit 1; }; }
1825 fi
1826
1827 rm -f conftest$ac_cv_exeext
1828 echo "$as_me:1828: result: $ac_cv_exeext" >&5
1829 echo "${ECHO_T}$ac_cv_exeext" >&6
1830
1831 rm -f conftest.$ac_ext
1832 EXEEXT=$ac_cv_exeext
1833 ac_exeext=$EXEEXT
1834 echo "$as_me:1834: checking for object suffix" >&5
1835 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1836 if test "${ac_cv_objext+set}" = set; then
1837   echo $ECHO_N "(cached) $ECHO_C" >&6
1838 else
1839   cat >conftest.$ac_ext <<_ACEOF
1840 #line 1840 "configure"
1841 #include "confdefs.h"
1842
1843 int
1844 main ()
1845 {
1846
1847   ;
1848   return 0;
1849 }
1850 _ACEOF
1851 rm -f conftest.o conftest.obj
1852 if { (eval echo "$as_me:1852: \"$ac_compile\"") >&5
1853   (eval $ac_compile) 2>&5
1854   ac_status=$?
1855   echo "$as_me:1855: \$? = $ac_status" >&5
1856   (exit $ac_status); }; then
1857   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1858   case $ac_file in
1859     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1860     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1861        break;;
1862   esac
1863 done
1864 else
1865   echo "$as_me: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1867 { { echo "$as_me:1867: error: cannot compute OBJEXT: cannot compile" >&5
1868 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1869    { (exit 1); exit 1; }; }
1870 fi
1871
1872 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1873 fi
1874 echo "$as_me:1874: result: $ac_cv_objext" >&5
1875 echo "${ECHO_T}$ac_cv_objext" >&6
1876 OBJEXT=$ac_cv_objext
1877 ac_objext=$OBJEXT
1878 echo "$as_me:1878: checking whether we are using the GNU C compiler" >&5
1879 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1880 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1881   echo $ECHO_N "(cached) $ECHO_C" >&6
1882 else
1883   cat >conftest.$ac_ext <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1886
1887 int
1888 main ()
1889 {
1890 #ifndef __GNUC__
1891        choke me
1892 #endif
1893
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   ac_compiler_gnu=yes
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 ac_compiler_gnu=no
1915 fi
1916 rm -f conftest.$ac_objext conftest.$ac_ext
1917 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1918
1919 fi
1920 echo "$as_me:1920: result: $ac_cv_c_compiler_gnu" >&5
1921 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1922 GCC=`test $ac_compiler_gnu = yes && echo yes`
1923 ac_test_CFLAGS=${CFLAGS+set}
1924 ac_save_CFLAGS=$CFLAGS
1925 CFLAGS="-g"
1926 echo "$as_me:1926: checking whether $CC accepts -g" >&5
1927 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1928 if test "${ac_cv_prog_cc_g+set}" = set; then
1929   echo $ECHO_N "(cached) $ECHO_C" >&6
1930 else
1931   cat >conftest.$ac_ext <<_ACEOF
1932 #line 1932 "configure"
1933 #include "confdefs.h"
1934
1935 int
1936 main ()
1937 {
1938
1939   ;
1940   return 0;
1941 }
1942 _ACEOF
1943 rm -f conftest.$ac_objext
1944 if { (eval echo "$as_me:1944: \"$ac_compile\"") >&5
1945   (eval $ac_compile) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); } &&
1949          { ac_try='test -s conftest.$ac_objext'
1950   { (eval echo "$as_me:1950: \"$ac_try\"") >&5
1951   (eval $ac_try) 2>&5
1952   ac_status=$?
1953   echo "$as_me:1953: \$? = $ac_status" >&5
1954   (exit $ac_status); }; }; then
1955   ac_cv_prog_cc_g=yes
1956 else
1957   echo "$as_me: failed program was:" >&5
1958 cat conftest.$ac_ext >&5
1959 ac_cv_prog_cc_g=no
1960 fi
1961 rm -f conftest.$ac_objext conftest.$ac_ext
1962 fi
1963 echo "$as_me:1963: result: $ac_cv_prog_cc_g" >&5
1964 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1965 if test "$ac_test_CFLAGS" = set; then
1966   CFLAGS=$ac_save_CFLAGS
1967 elif test $ac_cv_prog_cc_g = yes; then
1968   if test "$GCC" = yes; then
1969     CFLAGS="-g -O2"
1970   else
1971     CFLAGS="-g"
1972   fi
1973 else
1974   if test "$GCC" = yes; then
1975     CFLAGS="-O2"
1976   else
1977     CFLAGS=
1978   fi
1979 fi
1980 # Some people use a C++ compiler to compile C.  Since we use `exit',
1981 # in C++ we need to declare it.  In case someone uses the same compiler
1982 # for both compiling C and C++ we need to have the C++ compiler decide
1983 # the declaration of exit, since it's the most demanding environment.
1984 cat >conftest.$ac_ext <<_ACEOF
1985 #ifndef __cplusplus
1986   choke me
1987 #endif
1988 _ACEOF
1989 rm -f conftest.$ac_objext
1990 if { (eval echo "$as_me:1990: \"$ac_compile\"") >&5
1991   (eval $ac_compile) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); } &&
1995          { ac_try='test -s conftest.$ac_objext'
1996   { (eval echo "$as_me:1996: \"$ac_try\"") >&5
1997   (eval $ac_try) 2>&5
1998   ac_status=$?
1999   echo "$as_me:1999: \$? = $ac_status" >&5
2000   (exit $ac_status); }; }; then
2001   for ac_declaration in \
2002    ''\
2003    '#include <stdlib.h>' \
2004    'extern "C" void std::exit (int) throw (); using std::exit;' \
2005    'extern "C" void std::exit (int); using std::exit;' \
2006    'extern "C" void exit (int) throw ();' \
2007    'extern "C" void exit (int);' \
2008    'void exit (int);'
2009 do
2010   cat >conftest.$ac_ext <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013 #include <stdlib.h>
2014 $ac_declaration
2015 int
2016 main ()
2017 {
2018 exit (42);
2019   ;
2020   return 0;
2021 }
2022 _ACEOF
2023 rm -f conftest.$ac_objext
2024 if { (eval echo "$as_me:2024: \"$ac_compile\"") >&5
2025   (eval $ac_compile) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); } &&
2029          { ac_try='test -s conftest.$ac_objext'
2030   { (eval echo "$as_me:2030: \"$ac_try\"") >&5
2031   (eval $ac_try) 2>&5
2032   ac_status=$?
2033   echo "$as_me:2033: \$? = $ac_status" >&5
2034   (exit $ac_status); }; }; then
2035   :
2036 else
2037   echo "$as_me: failed program was:" >&5
2038 cat conftest.$ac_ext >&5
2039 continue
2040 fi
2041 rm -f conftest.$ac_objext conftest.$ac_ext
2042   cat >conftest.$ac_ext <<_ACEOF
2043 #line 2043 "configure"
2044 #include "confdefs.h"
2045 $ac_declaration
2046 int
2047 main ()
2048 {
2049 exit (42);
2050   ;
2051   return 0;
2052 }
2053 _ACEOF
2054 rm -f conftest.$ac_objext
2055 if { (eval echo "$as_me:2055: \"$ac_compile\"") >&5
2056   (eval $ac_compile) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); } &&
2060          { ac_try='test -s conftest.$ac_objext'
2061   { (eval echo "$as_me:2061: \"$ac_try\"") >&5
2062   (eval $ac_try) 2>&5
2063   ac_status=$?
2064   echo "$as_me:2064: \$? = $ac_status" >&5
2065   (exit $ac_status); }; }; then
2066   break
2067 else
2068   echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 fi
2071 rm -f conftest.$ac_objext conftest.$ac_ext
2072 done
2073 rm -f conftest*
2074 if test -n "$ac_declaration"; then
2075   echo '#ifdef __cplusplus' >>confdefs.h
2076   echo $ac_declaration      >>confdefs.h
2077   echo '#endif'             >>confdefs.h
2078 fi
2079
2080 else
2081   echo "$as_me: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2083 fi
2084 rm -f conftest.$ac_objext conftest.$ac_ext
2085 ac_ext=c
2086 ac_cpp='$CPP $CPPFLAGS'
2087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2090 ac_main_return=return
2091
2092 GCC_VERSION=none
2093 if test "$GCC" = yes ; then
2094         echo "$as_me:2094: checking version of $CC" >&5
2095 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2096         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2097         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2098         echo "$as_me:2098: result: $GCC_VERSION" >&5
2099 echo "${ECHO_T}$GCC_VERSION" >&6
2100 fi
2101
2102 ac_ext=c
2103 ac_cpp='$CPP $CPPFLAGS'
2104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2107 ac_main_return=return
2108 echo "$as_me:2108: checking how to run the C preprocessor" >&5
2109 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2110 # On Suns, sometimes $CPP names a directory.
2111 if test -n "$CPP" && test -d "$CPP"; then
2112   CPP=
2113 fi
2114 if test -z "$CPP"; then
2115   if test "${ac_cv_prog_CPP+set}" = set; then
2116   echo $ECHO_N "(cached) $ECHO_C" >&6
2117 else
2118       # Double quotes because CPP needs to be expanded
2119     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2120     do
2121       ac_preproc_ok=false
2122 for ac_c_preproc_warn_flag in '' yes
2123 do
2124   # Use a header file that comes with gcc, so configuring glibc
2125   # with a fresh cross-compiler works.
2126   # On the NeXT, cc -E runs the code through the compiler's parser,
2127   # not just through cpp. "Syntax error" is here to catch this case.
2128   cat >conftest.$ac_ext <<_ACEOF
2129 #line 2129 "configure"
2130 #include "confdefs.h"
2131 #include <assert.h>
2132                      Syntax error
2133 _ACEOF
2134 if { (eval echo "$as_me:2134: \"$ac_cpp conftest.$ac_ext\"") >&5
2135   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2136   ac_status=$?
2137   egrep -v '^ *\+' conftest.er1 >conftest.err
2138   rm -f conftest.er1
2139   cat conftest.err >&5
2140   echo "$as_me:2140: \$? = $ac_status" >&5
2141   (exit $ac_status); } >/dev/null; then
2142   if test -s conftest.err; then
2143     ac_cpp_err=$ac_c_preproc_warn_flag
2144   else
2145     ac_cpp_err=
2146   fi
2147 else
2148   ac_cpp_err=yes
2149 fi
2150 if test -z "$ac_cpp_err"; then
2151   :
2152 else
2153   echo "$as_me: failed program was:" >&5
2154   cat conftest.$ac_ext >&5
2155   # Broken: fails on valid input.
2156 continue
2157 fi
2158 rm -f conftest.err conftest.$ac_ext
2159
2160   # OK, works on sane cases.  Now check whether non-existent headers
2161   # can be detected and how.
2162   cat >conftest.$ac_ext <<_ACEOF
2163 #line 2163 "configure"
2164 #include "confdefs.h"
2165 #include <ac_nonexistent.h>
2166 _ACEOF
2167 if { (eval echo "$as_me:2167: \"$ac_cpp conftest.$ac_ext\"") >&5
2168   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169   ac_status=$?
2170   egrep -v '^ *\+' conftest.er1 >conftest.err
2171   rm -f conftest.er1
2172   cat conftest.err >&5
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit $ac_status); } >/dev/null; then
2175   if test -s conftest.err; then
2176     ac_cpp_err=$ac_c_preproc_warn_flag
2177   else
2178     ac_cpp_err=
2179   fi
2180 else
2181   ac_cpp_err=yes
2182 fi
2183 if test -z "$ac_cpp_err"; then
2184   # Broken: success on invalid input.
2185 continue
2186 else
2187   echo "$as_me: failed program was:" >&5
2188   cat conftest.$ac_ext >&5
2189   # Passes both tests.
2190 ac_preproc_ok=:
2191 break
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195 done
2196 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2197 rm -f conftest.err conftest.$ac_ext
2198 if $ac_preproc_ok; then
2199   break
2200 fi
2201
2202     done
2203     ac_cv_prog_CPP=$CPP
2204
2205 fi
2206   CPP=$ac_cv_prog_CPP
2207 else
2208   ac_cv_prog_CPP=$CPP
2209 fi
2210 echo "$as_me:2210: result: $CPP" >&5
2211 echo "${ECHO_T}$CPP" >&6
2212 ac_preproc_ok=false
2213 for ac_c_preproc_warn_flag in '' yes
2214 do
2215   # Use a header file that comes with gcc, so configuring glibc
2216   # with a fresh cross-compiler works.
2217   # On the NeXT, cc -E runs the code through the compiler's parser,
2218   # not just through cpp. "Syntax error" is here to catch this case.
2219   cat >conftest.$ac_ext <<_ACEOF
2220 #line 2220 "configure"
2221 #include "confdefs.h"
2222 #include <assert.h>
2223                      Syntax error
2224 _ACEOF
2225 if { (eval echo "$as_me:2225: \"$ac_cpp conftest.$ac_ext\"") >&5
2226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2227   ac_status=$?
2228   egrep -v '^ *\+' conftest.er1 >conftest.err
2229   rm -f conftest.er1
2230   cat conftest.err >&5
2231   echo "$as_me:2231: \$? = $ac_status" >&5
2232   (exit $ac_status); } >/dev/null; then
2233   if test -s conftest.err; then
2234     ac_cpp_err=$ac_c_preproc_warn_flag
2235   else
2236     ac_cpp_err=
2237   fi
2238 else
2239   ac_cpp_err=yes
2240 fi
2241 if test -z "$ac_cpp_err"; then
2242   :
2243 else
2244   echo "$as_me: failed program was:" >&5
2245   cat conftest.$ac_ext >&5
2246   # Broken: fails on valid input.
2247 continue
2248 fi
2249 rm -f conftest.err conftest.$ac_ext
2250
2251   # OK, works on sane cases.  Now check whether non-existent headers
2252   # can be detected and how.
2253   cat >conftest.$ac_ext <<_ACEOF
2254 #line 2254 "configure"
2255 #include "confdefs.h"
2256 #include <ac_nonexistent.h>
2257 _ACEOF
2258 if { (eval echo "$as_me:2258: \"$ac_cpp conftest.$ac_ext\"") >&5
2259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260   ac_status=$?
2261   egrep -v '^ *\+' conftest.er1 >conftest.err
2262   rm -f conftest.er1
2263   cat conftest.err >&5
2264   echo "$as_me:2264: \$? = $ac_status" >&5
2265   (exit $ac_status); } >/dev/null; then
2266   if test -s conftest.err; then
2267     ac_cpp_err=$ac_c_preproc_warn_flag
2268   else
2269     ac_cpp_err=
2270   fi
2271 else
2272   ac_cpp_err=yes
2273 fi
2274 if test -z "$ac_cpp_err"; then
2275   # Broken: success on invalid input.
2276 continue
2277 else
2278   echo "$as_me: failed program was:" >&5
2279   cat conftest.$ac_ext >&5
2280   # Passes both tests.
2281 ac_preproc_ok=:
2282 break
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286 done
2287 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2288 rm -f conftest.err conftest.$ac_ext
2289 if $ac_preproc_ok; then
2290   :
2291 else
2292   { { echo "$as_me:2292: error: C preprocessor \"$CPP\" fails sanity check" >&5
2293 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2294    { (exit 1); exit 1; }; }
2295 fi
2296
2297 ac_ext=c
2298 ac_cpp='$CPP $CPPFLAGS'
2299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2302 ac_main_return=return
2303
2304 if test $ac_cv_c_compiler_gnu = yes; then
2305     echo "$as_me:2305: checking whether $CC needs -traditional" >&5
2306 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2307 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2308   echo $ECHO_N "(cached) $ECHO_C" >&6
2309 else
2310     ac_pattern="Autoconf.*'x'"
2311   cat >conftest.$ac_ext <<_ACEOF
2312 #line 2312 "configure"
2313 #include "confdefs.h"
2314 #include <sgtty.h>
2315 int Autoconf = TIOCGETP;
2316 _ACEOF
2317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2318   egrep "$ac_pattern" >/dev/null 2>&1; then
2319   ac_cv_prog_gcc_traditional=yes
2320 else
2321   ac_cv_prog_gcc_traditional=no
2322 fi
2323 rm -f conftest*
2324
2325   if test $ac_cv_prog_gcc_traditional = no; then
2326     cat >conftest.$ac_ext <<_ACEOF
2327 #line 2327 "configure"
2328 #include "confdefs.h"
2329 #include <termio.h>
2330 int Autoconf = TCGETA;
2331 _ACEOF
2332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2333   egrep "$ac_pattern" >/dev/null 2>&1; then
2334   ac_cv_prog_gcc_traditional=yes
2335 fi
2336 rm -f conftest*
2337
2338   fi
2339 fi
2340 echo "$as_me:2340: result: $ac_cv_prog_gcc_traditional" >&5
2341 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2342   if test $ac_cv_prog_gcc_traditional = yes; then
2343     CC="$CC -traditional"
2344   fi
2345 fi
2346
2347 echo "$as_me:2347: checking whether $CC understands -c and -o together" >&5
2348 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2349 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2350   echo $ECHO_N "(cached) $ECHO_C" >&6
2351 else
2352
2353 cat > conftest.$ac_ext <<CF_EOF
2354 #include <stdio.h>
2355 int main()
2356 {
2357         ${cf_cv_main_return:-return}(0);
2358 }
2359 CF_EOF
2360 # We do the test twice because some compilers refuse to overwrite an
2361 # existing .o file with -o, though they will create one.
2362 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2363 if { (eval echo "$as_me:2363: \"$ac_try\"") >&5
2364   (eval $ac_try) 2>&5
2365   ac_status=$?
2366   echo "$as_me:2366: \$? = $ac_status" >&5
2367   (exit $ac_status); } &&
2368   test -f conftest2.$ac_objext && { (eval echo "$as_me:2368: \"$ac_try\"") >&5
2369   (eval $ac_try) 2>&5
2370   ac_status=$?
2371   echo "$as_me:2371: \$? = $ac_status" >&5
2372   (exit $ac_status); };
2373 then
2374   eval cf_cv_prog_CC_c_o=yes
2375 else
2376   eval cf_cv_prog_CC_c_o=no
2377 fi
2378 rm -f conftest*
2379
2380 fi
2381 if test $cf_cv_prog_CC_c_o = yes; then
2382   echo "$as_me:2382: result: yes" >&5
2383 echo "${ECHO_T}yes" >&6
2384 else
2385   echo "$as_me:2385: result: no" >&5
2386 echo "${ECHO_T}no" >&6
2387 fi
2388
2389 echo "$as_me:2389: checking for POSIXized ISC" >&5
2390 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2391 if test -d /etc/conf/kconfig.d &&
2392    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2393 then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396   ISC=yes # If later tests want to check for ISC.
2397
2398 cat >>confdefs.h <<\EOF
2399 #define _POSIX_SOURCE 1
2400 EOF
2401
2402   if test "$GCC" = yes; then
2403     CC="$CC -posix"
2404   else
2405     CC="$CC -Xp"
2406   fi
2407 else
2408   echo "$as_me:2408: result: no" >&5
2409 echo "${ECHO_T}no" >&6
2410   ISC=
2411 fi
2412
2413 echo "$as_me:2413: checking for ${CC-cc} option to accept ANSI C" >&5
2414 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2415 if test "${cf_cv_ansi_cc+set}" = set; then
2416   echo $ECHO_N "(cached) $ECHO_C" >&6
2417 else
2418
2419 cf_cv_ansi_cc=no
2420 cf_save_CFLAGS="$CFLAGS"
2421 cf_save_CPPFLAGS="$CPPFLAGS"
2422 # Don't try gcc -ansi; that turns off useful extensions and
2423 # breaks some systems' header files.
2424 # AIX                   -qlanglvl=ansi
2425 # Ultrix and OSF/1      -std1
2426 # HP-UX                 -Aa -D_HPUX_SOURCE
2427 # SVR4                  -Xc
2428 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2429 for cf_arg in "-DCC_HAS_PROTOS" \
2430         "" \
2431         -qlanglvl=ansi \
2432         -std1 \
2433         -Ae \
2434         "-Aa -D_HPUX_SOURCE" \
2435         -Xc
2436 do
2437
2438 cf_fix_cppflags=no
2439 cf_new_cflags=
2440 cf_new_cppflags=
2441 cf_new_extra_cppflags=
2442
2443 for cf_add_cflags in $cf_arg
2444 do
2445 case $cf_fix_cppflags in
2446 no)
2447         case $cf_add_cflags in #(vi
2448         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2449                 case $cf_add_cflags in
2450                 -D*)
2451                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2452
2453                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2454                         && test -z "${cf_tst_cflags}" \
2455                         && cf_fix_cppflags=yes
2456
2457                         if test $cf_fix_cppflags = yes ; then
2458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2459                                 continue
2460                         elif test "${cf_tst_cflags}" = "\"'" ; then
2461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2462                                 continue
2463                         fi
2464                         ;;
2465                 esac
2466                 case "$CPPFLAGS" in
2467                 *$cf_add_cflags) #(vi
2468                         ;;
2469                 *) #(vi
2470                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2471                         ;;
2472                 esac
2473                 ;;
2474         *)
2475                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2476                 ;;
2477         esac
2478         ;;
2479 yes)
2480         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2481
2482         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2483
2484         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2485         && test -z "${cf_tst_cflags}" \
2486         && cf_fix_cppflags=no
2487         ;;
2488 esac
2489 done
2490
2491 if test -n "$cf_new_cflags" ; then
2492
2493         CFLAGS="$CFLAGS $cf_new_cflags"
2494 fi
2495
2496 if test -n "$cf_new_cppflags" ; then
2497
2498         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2499 fi
2500
2501 if test -n "$cf_new_extra_cppflags" ; then
2502
2503         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2504 fi
2505
2506         cat >conftest.$ac_ext <<_ACEOF
2507 #line 2507 "configure"
2508 #include "confdefs.h"
2509
2510 #ifndef CC_HAS_PROTOS
2511 #if !defined(__STDC__) || (__STDC__ != 1)
2512 choke me
2513 #endif
2514 #endif
2515
2516 int
2517 main ()
2518 {
2519
2520         int test (int i, double x);
2521         struct s1 {int (*f) (int a);};
2522         struct s2 {int (*f) (double a);};
2523   ;
2524   return 0;
2525 }
2526 _ACEOF
2527 rm -f conftest.$ac_objext
2528 if { (eval echo "$as_me:2528: \"$ac_compile\"") >&5
2529   (eval $ac_compile) 2>&5
2530   ac_status=$?
2531   echo "$as_me:2531: \$? = $ac_status" >&5
2532   (exit $ac_status); } &&
2533          { ac_try='test -s conftest.$ac_objext'
2534   { (eval echo "$as_me:2534: \"$ac_try\"") >&5
2535   (eval $ac_try) 2>&5
2536   ac_status=$?
2537   echo "$as_me:2537: \$? = $ac_status" >&5
2538   (exit $ac_status); }; }; then
2539   cf_cv_ansi_cc="$cf_arg"; break
2540 else
2541   echo "$as_me: failed program was:" >&5
2542 cat conftest.$ac_ext >&5
2543 fi
2544 rm -f conftest.$ac_objext conftest.$ac_ext
2545 done
2546 CFLAGS="$cf_save_CFLAGS"
2547 CPPFLAGS="$cf_save_CPPFLAGS"
2548
2549 fi
2550 echo "$as_me:2550: result: $cf_cv_ansi_cc" >&5
2551 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2552
2553 if test "$cf_cv_ansi_cc" != "no"; then
2554 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_cv_ansi_cc
2562 do
2563 case $cf_fix_cppflags in
2564 no)
2565         case $cf_add_cflags in #(vi
2566         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2567                 case $cf_add_cflags in
2568                 -D*)
2569                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2572                         && test -z "${cf_tst_cflags}" \
2573                         && cf_fix_cppflags=yes
2574
2575                         if test $cf_fix_cppflags = yes ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         elif test "${cf_tst_cflags}" = "\"'" ; then
2579                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2580                                 continue
2581                         fi
2582                         ;;
2583                 esac
2584                 case "$CPPFLAGS" in
2585                 *$cf_add_cflags) #(vi
2586                         ;;
2587                 *) #(vi
2588                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2589                         ;;
2590                 esac
2591                 ;;
2592         *)
2593                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2594                 ;;
2595         esac
2596         ;;
2597 yes)
2598         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2599
2600         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2601
2602         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2603         && test -z "${cf_tst_cflags}" \
2604         && cf_fix_cppflags=no
2605         ;;
2606 esac
2607 done
2608
2609 if test -n "$cf_new_cflags" ; then
2610
2611         CFLAGS="$CFLAGS $cf_new_cflags"
2612 fi
2613
2614 if test -n "$cf_new_cppflags" ; then
2615
2616         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2617 fi
2618
2619 if test -n "$cf_new_extra_cppflags" ; then
2620
2621         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2622 fi
2623
2624 else
2625         cat >>confdefs.h <<\EOF
2626 #define CC_HAS_PROTOS 1
2627 EOF
2628
2629 fi
2630 fi
2631
2632 if test "$cf_cv_ansi_cc" = "no"; then
2633         { { echo "$as_me:2633: error: Your compiler does not appear to recognize prototypes.
2634 You have the following choices:
2635         a. adjust your compiler options
2636         b. get an up-to-date compiler
2637         c. use a wrapper such as unproto" >&5
2638 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2639 You have the following choices:
2640         a. adjust your compiler options
2641         b. get an up-to-date compiler
2642         c. use a wrapper such as unproto" >&2;}
2643    { (exit 1); exit 1; }; }
2644 fi
2645
2646 case $cf_cv_system_name in
2647 os2*)
2648     CFLAGS="$CFLAGS -Zmt"
2649     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2650     CXXFLAGS="$CXXFLAGS -Zmt"
2651     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2652     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2653     ac_cv_exeext=.exe
2654     ;;
2655 esac
2656
2657 PROG_EXT="$EXEEXT"
2658
2659 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2660 #define PROG_EXT "$PROG_EXT"
2661 EOF
2662
2663 if test "$cross_compiling" = yes ; then
2664   LDCONFIG=:
2665 else
2666 case "$cf_cv_system_name" in #(vi
2667 dragonfly*|freebsd*) #(vi
2668   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2669   ;;
2670 *) LDPATH=$PATH:/sbin:/usr/sbin
2671   # Extract the first word of "ldconfig", so it can be a program name with args.
2672 set dummy ldconfig; ac_word=$2
2673 echo "$as_me:2673: checking for $ac_word" >&5
2674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2675 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2676   echo $ECHO_N "(cached) $ECHO_C" >&6
2677 else
2678   case $LDCONFIG in
2679   [\\/]* | ?:[\\/]*)
2680   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2681   ;;
2682   *)
2683   ac_save_IFS=$IFS; IFS=$ac_path_separator
2684 ac_dummy="$LDPATH"
2685 for ac_dir in $ac_dummy; do
2686   IFS=$ac_save_IFS
2687   test -z "$ac_dir" && ac_dir=.
2688   if $as_executable_p "$ac_dir/$ac_word"; then
2689    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2690    echo "$as_me:2690: found $ac_dir/$ac_word" >&5
2691    break
2692 fi
2693 done
2694
2695   ;;
2696 esac
2697 fi
2698 LDCONFIG=$ac_cv_path_LDCONFIG
2699
2700 if test -n "$LDCONFIG"; then
2701   echo "$as_me:2701: result: $LDCONFIG" >&5
2702 echo "${ECHO_T}$LDCONFIG" >&6
2703 else
2704   echo "$as_me:2704: result: no" >&5
2705 echo "${ECHO_T}no" >&6
2706 fi
2707
2708   ;;
2709 esac
2710 fi
2711
2712 echo "$as_me:2712: checking if you want to ensure bool is consistent with C++" >&5
2713 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2714
2715 # Check whether --with-cxx or --without-cxx was given.
2716 if test "${with_cxx+set}" = set; then
2717   withval="$with_cxx"
2718   cf_with_cxx=$withval
2719 else
2720   cf_with_cxx=yes
2721 fi;
2722 echo "$as_me:2722: result: $cf_with_cxx" >&5
2723 echo "${ECHO_T}$cf_with_cxx" >&6
2724 if test "X$cf_with_cxx" = Xno ; then
2725         CXX=""
2726         GXX=""
2727 else
2728         # with autoconf 2.13, we can change the error to a warning:
2729                 ac_ext=cc
2730 ac_cpp='$CXXCPP $CPPFLAGS'
2731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2734 ac_main_return=return
2735 if test -n "$ac_tool_prefix"; then
2736   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2737   do
2738     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2739 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2740 echo "$as_me:2740: checking for $ac_word" >&5
2741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2742 if test "${ac_cv_prog_CXX+set}" = set; then
2743   echo $ECHO_N "(cached) $ECHO_C" >&6
2744 else
2745   if test -n "$CXX"; then
2746   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2747 else
2748   ac_save_IFS=$IFS; IFS=$ac_path_separator
2749 ac_dummy="$PATH"
2750 for ac_dir in $ac_dummy; do
2751   IFS=$ac_save_IFS
2752   test -z "$ac_dir" && ac_dir=.
2753   $as_executable_p "$ac_dir/$ac_word" || continue
2754 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2755 echo "$as_me:2755: found $ac_dir/$ac_word" >&5
2756 break
2757 done
2758
2759 fi
2760 fi
2761 CXX=$ac_cv_prog_CXX
2762 if test -n "$CXX"; then
2763   echo "$as_me:2763: result: $CXX" >&5
2764 echo "${ECHO_T}$CXX" >&6
2765 else
2766   echo "$as_me:2766: result: no" >&5
2767 echo "${ECHO_T}no" >&6
2768 fi
2769
2770     test -n "$CXX" && break
2771   done
2772 fi
2773 if test -z "$CXX"; then
2774   ac_ct_CXX=$CXX
2775   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2776 do
2777   # Extract the first word of "$ac_prog", so it can be a program name with args.
2778 set dummy $ac_prog; ac_word=$2
2779 echo "$as_me:2779: checking for $ac_word" >&5
2780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2781 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2782   echo $ECHO_N "(cached) $ECHO_C" >&6
2783 else
2784   if test -n "$ac_ct_CXX"; then
2785   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2786 else
2787   ac_save_IFS=$IFS; IFS=$ac_path_separator
2788 ac_dummy="$PATH"
2789 for ac_dir in $ac_dummy; do
2790   IFS=$ac_save_IFS
2791   test -z "$ac_dir" && ac_dir=.
2792   $as_executable_p "$ac_dir/$ac_word" || continue
2793 ac_cv_prog_ac_ct_CXX="$ac_prog"
2794 echo "$as_me:2794: found $ac_dir/$ac_word" >&5
2795 break
2796 done
2797
2798 fi
2799 fi
2800 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2801 if test -n "$ac_ct_CXX"; then
2802   echo "$as_me:2802: result: $ac_ct_CXX" >&5
2803 echo "${ECHO_T}$ac_ct_CXX" >&6
2804 else
2805   echo "$as_me:2805: result: no" >&5
2806 echo "${ECHO_T}no" >&6
2807 fi
2808
2809   test -n "$ac_ct_CXX" && break
2810 done
2811 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2812
2813   CXX=$ac_ct_CXX
2814 fi
2815
2816 # Provide some information about the compiler.
2817 echo "$as_me:2817:" \
2818      "checking for C++ compiler version" >&5
2819 ac_compiler=`set X $ac_compile; echo $2`
2820 { (eval echo "$as_me:2820: \"$ac_compiler --version </dev/null >&5\"") >&5
2821   (eval $ac_compiler --version </dev/null >&5) 2>&5
2822   ac_status=$?
2823   echo "$as_me:2823: \$? = $ac_status" >&5
2824   (exit $ac_status); }
2825 { (eval echo "$as_me:2825: \"$ac_compiler -v </dev/null >&5\"") >&5
2826   (eval $ac_compiler -v </dev/null >&5) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); }
2830 { (eval echo "$as_me:2830: \"$ac_compiler -V </dev/null >&5\"") >&5
2831   (eval $ac_compiler -V </dev/null >&5) 2>&5
2832   ac_status=$?
2833   echo "$as_me:2833: \$? = $ac_status" >&5
2834   (exit $ac_status); }
2835
2836 echo "$as_me:2836: checking whether we are using the GNU C++ compiler" >&5
2837 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2838 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2839   echo $ECHO_N "(cached) $ECHO_C" >&6
2840 else
2841   cat >conftest.$ac_ext <<_ACEOF
2842 #line 2842 "configure"
2843 #include "confdefs.h"
2844
2845 int
2846 main ()
2847 {
2848 #ifndef __GNUC__
2849        choke me
2850 #endif
2851
2852   ;
2853   return 0;
2854 }
2855 _ACEOF
2856 rm -f conftest.$ac_objext
2857 if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5
2858   (eval $ac_compile) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:2863: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   ac_compiler_gnu=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 ac_compiler_gnu=no
2873 fi
2874 rm -f conftest.$ac_objext conftest.$ac_ext
2875 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2876
2877 fi
2878 echo "$as_me:2878: result: $ac_cv_cxx_compiler_gnu" >&5
2879 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2880 GXX=`test $ac_compiler_gnu = yes && echo yes`
2881 ac_test_CXXFLAGS=${CXXFLAGS+set}
2882 ac_save_CXXFLAGS=$CXXFLAGS
2883 CXXFLAGS="-g"
2884 echo "$as_me:2884: checking whether $CXX accepts -g" >&5
2885 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2886 if test "${ac_cv_prog_cxx_g+set}" = set; then
2887   echo $ECHO_N "(cached) $ECHO_C" >&6
2888 else
2889   cat >conftest.$ac_ext <<_ACEOF
2890 #line 2890 "configure"
2891 #include "confdefs.h"
2892
2893 int
2894 main ()
2895 {
2896
2897   ;
2898   return 0;
2899 }
2900 _ACEOF
2901 rm -f conftest.$ac_objext
2902 if { (eval echo "$as_me:2902: \"$ac_compile\"") >&5
2903   (eval $ac_compile) 2>&5
2904   ac_status=$?
2905   echo "$as_me:2905: \$? = $ac_status" >&5
2906   (exit $ac_status); } &&
2907          { ac_try='test -s conftest.$ac_objext'
2908   { (eval echo "$as_me:2908: \"$ac_try\"") >&5
2909   (eval $ac_try) 2>&5
2910   ac_status=$?
2911   echo "$as_me:2911: \$? = $ac_status" >&5
2912   (exit $ac_status); }; }; then
2913   ac_cv_prog_cxx_g=yes
2914 else
2915   echo "$as_me: failed program was:" >&5
2916 cat conftest.$ac_ext >&5
2917 ac_cv_prog_cxx_g=no
2918 fi
2919 rm -f conftest.$ac_objext conftest.$ac_ext
2920 fi
2921 echo "$as_me:2921: result: $ac_cv_prog_cxx_g" >&5
2922 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2923 if test "$ac_test_CXXFLAGS" = set; then
2924   CXXFLAGS=$ac_save_CXXFLAGS
2925 elif test $ac_cv_prog_cxx_g = yes; then
2926   if test "$GXX" = yes; then
2927     CXXFLAGS="-g -O2"
2928   else
2929     CXXFLAGS="-g"
2930   fi
2931 else
2932   if test "$GXX" = yes; then
2933     CXXFLAGS="-O2"
2934   else
2935     CXXFLAGS=
2936   fi
2937 fi
2938 for ac_declaration in \
2939    ''\
2940    '#include <stdlib.h>' \
2941    'extern "C" void std::exit (int) throw (); using std::exit;' \
2942    'extern "C" void std::exit (int); using std::exit;' \
2943    'extern "C" void exit (int) throw ();' \
2944    'extern "C" void exit (int);' \
2945    'void exit (int);'
2946 do
2947   cat >conftest.$ac_ext <<_ACEOF
2948 #line 2948 "configure"
2949 #include "confdefs.h"
2950 #include <stdlib.h>
2951 $ac_declaration
2952 int
2953 main ()
2954 {
2955 exit (42);
2956   ;
2957   return 0;
2958 }
2959 _ACEOF
2960 rm -f conftest.$ac_objext
2961 if { (eval echo "$as_me:2961: \"$ac_compile\"") >&5
2962   (eval $ac_compile) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); } &&
2966          { ac_try='test -s conftest.$ac_objext'
2967   { (eval echo "$as_me:2967: \"$ac_try\"") >&5
2968   (eval $ac_try) 2>&5
2969   ac_status=$?
2970   echo "$as_me:2970: \$? = $ac_status" >&5
2971   (exit $ac_status); }; }; then
2972   :
2973 else
2974   echo "$as_me: failed program was:" >&5
2975 cat conftest.$ac_ext >&5
2976 continue
2977 fi
2978 rm -f conftest.$ac_objext conftest.$ac_ext
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 $ac_declaration
2983 int
2984 main ()
2985 {
2986 exit (42);
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   break
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 fi
3008 rm -f conftest.$ac_objext conftest.$ac_ext
3009 done
3010 rm -f conftest*
3011 if test -n "$ac_declaration"; then
3012   echo '#ifdef __cplusplus' >>confdefs.h
3013   echo $ac_declaration      >>confdefs.h
3014   echo '#endif'             >>confdefs.h
3015 fi
3016
3017 ac_ext=c
3018 ac_cpp='$CPP $CPPFLAGS'
3019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3022 ac_main_return=return
3023
3024                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3025         if test "$CXX" = "g++" ; then
3026                 # Extract the first word of "g++", so it can be a program name with args.
3027 set dummy g++; ac_word=$2
3028 echo "$as_me:3028: checking for $ac_word" >&5
3029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3030 if test "${ac_cv_path_CXX+set}" = set; then
3031   echo $ECHO_N "(cached) $ECHO_C" >&6
3032 else
3033   case $CXX in
3034   [\\/]* | ?:[\\/]*)
3035   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3036   ;;
3037   *)
3038   ac_save_IFS=$IFS; IFS=$ac_path_separator
3039 ac_dummy="$PATH"
3040 for ac_dir in $ac_dummy; do
3041   IFS=$ac_save_IFS
3042   test -z "$ac_dir" && ac_dir=.
3043   if $as_executable_p "$ac_dir/$ac_word"; then
3044    ac_cv_path_CXX="$ac_dir/$ac_word"
3045    echo "$as_me:3045: found $ac_dir/$ac_word" >&5
3046    break
3047 fi
3048 done
3049
3050   ;;
3051 esac
3052 fi
3053 CXX=$ac_cv_path_CXX
3054
3055 if test -n "$CXX"; then
3056   echo "$as_me:3056: result: $CXX" >&5
3057 echo "${ECHO_T}$CXX" >&6
3058 else
3059   echo "$as_me:3059: result: no" >&5
3060 echo "${ECHO_T}no" >&6
3061 fi
3062
3063         fi
3064         if test "$CXX" = "g++" ; then
3065                 { echo "$as_me:3065: WARNING: ignoring hardcoded g++" >&5
3066 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3067                 cf_with_cxx=no; CXX=""; GXX="";
3068         fi
3069 fi
3070
3071 GXX_VERSION=none
3072 if test "$GXX" = yes; then
3073         echo "$as_me:3073: checking version of g++" >&5
3074 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3075         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3076         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3077         echo "$as_me:3077: result: $GXX_VERSION" >&5
3078 echo "${ECHO_T}$GXX_VERSION" >&6
3079 fi
3080
3081 case $GXX_VERSION in
3082 1*|2.[0-6]*)
3083         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3084         # cf_cxx_library=no
3085         { echo "$as_me:3085: WARNING: templates do not work" >&5
3086 echo "$as_me: WARNING: templates do not work" >&2;}
3087         ;;
3088 esac
3089
3090 echo "$as_me:3090: checking if you want to build C++ binding and demo" >&5
3091 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3092
3093 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3094 if test "${with_cxx_binding+set}" = set; then
3095   withval="$with_cxx_binding"
3096   cf_with_cxx_binding=$withval
3097 else
3098   cf_with_cxx_binding=$cf_with_cxx
3099 fi;
3100 echo "$as_me:3100: result: $cf_with_cxx_binding" >&5
3101 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3102
3103 echo "$as_me:3103: checking if you want to build with Ada95" >&5
3104 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3105
3106 # Check whether --with-ada or --without-ada was given.
3107 if test "${with_ada+set}" = set; then
3108   withval="$with_ada"
3109   cf_with_ada=$withval
3110 else
3111   cf_with_ada=yes
3112 fi;
3113 echo "$as_me:3113: result: $cf_with_ada" >&5
3114 echo "${ECHO_T}$cf_with_ada" >&6
3115
3116 echo "$as_me:3116: checking if you want to install manpages" >&5
3117 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3118
3119 # Check whether --with-manpages or --without-manpages was given.
3120 if test "${with_manpages+set}" = set; then
3121   withval="$with_manpages"
3122   cf_with_manpages=$withval
3123 else
3124   cf_with_manpages=yes
3125 fi;
3126 echo "$as_me:3126: result: $cf_with_manpages" >&5
3127 echo "${ECHO_T}$cf_with_manpages" >&6
3128
3129 echo "$as_me:3129: checking if you want to build programs such as tic" >&5
3130 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3131
3132 # Check whether --with-progs or --without-progs was given.
3133 if test "${with_progs+set}" = set; then
3134   withval="$with_progs"
3135   cf_with_progs=$withval
3136 else
3137   cf_with_progs=yes
3138 fi;
3139 echo "$as_me:3139: result: $cf_with_progs" >&5
3140 echo "${ECHO_T}$cf_with_progs" >&6
3141
3142 echo "$as_me:3142: checking if you wish to install curses.h" >&5
3143 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3144
3145 # Check whether --with-curses-h or --without-curses-h was given.
3146 if test "${with_curses_h+set}" = set; then
3147   withval="$with_curses_h"
3148   with_curses_h=$withval
3149 else
3150   with_curses_h=yes
3151 fi;
3152 echo "$as_me:3152: result: $with_curses_h" >&5
3153 echo "${ECHO_T}$with_curses_h" >&6
3154
3155 modules_to_build="ncurses"
3156 if test "X$cf_with_progs" != Xno ; then
3157 modules_to_build="$modules_to_build progs tack"
3158 fi
3159 modules_to_build="$modules_to_build panel menu form"
3160
3161 test "$program_prefix" != NONE &&
3162   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3163 # Use a double $ so make ignores it.
3164 test "$program_suffix" != NONE &&
3165   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3166 # Double any \ or $.  echo might interpret backslashes.
3167 # By default was `s,x,x', remove it if useless.
3168 cat <<\_ACEOF >conftest.sed
3169 s/[\\$]/&&/g;s/;s,x,x,$//
3170 _ACEOF
3171 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3172 rm conftest.sed
3173
3174 for ac_prog in mawk gawk nawk awk
3175 do
3176   # Extract the first word of "$ac_prog", so it can be a program name with args.
3177 set dummy $ac_prog; ac_word=$2
3178 echo "$as_me:3178: checking for $ac_word" >&5
3179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3180 if test "${ac_cv_prog_AWK+set}" = set; then
3181   echo $ECHO_N "(cached) $ECHO_C" >&6
3182 else
3183   if test -n "$AWK"; then
3184   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3185 else
3186   ac_save_IFS=$IFS; IFS=$ac_path_separator
3187 ac_dummy="$PATH"
3188 for ac_dir in $ac_dummy; do
3189   IFS=$ac_save_IFS
3190   test -z "$ac_dir" && ac_dir=.
3191   $as_executable_p "$ac_dir/$ac_word" || continue
3192 ac_cv_prog_AWK="$ac_prog"
3193 echo "$as_me:3193: found $ac_dir/$ac_word" >&5
3194 break
3195 done
3196
3197 fi
3198 fi
3199 AWK=$ac_cv_prog_AWK
3200 if test -n "$AWK"; then
3201   echo "$as_me:3201: result: $AWK" >&5
3202 echo "${ECHO_T}$AWK" >&6
3203 else
3204   echo "$as_me:3204: result: no" >&5
3205 echo "${ECHO_T}no" >&6
3206 fi
3207
3208   test -n "$AWK" && break
3209 done
3210
3211 test -z "$AWK" && { { echo "$as_me:3211: error: No awk program found" >&5
3212 echo "$as_me: error: No awk program found" >&2;}
3213    { (exit 1); exit 1; }; }
3214
3215 echo "$as_me:3215: checking for egrep" >&5
3216 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3217 if test "${ac_cv_prog_egrep+set}" = set; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3221     then ac_cv_prog_egrep='grep -E'
3222     else ac_cv_prog_egrep='egrep'
3223     fi
3224 fi
3225 echo "$as_me:3225: result: $ac_cv_prog_egrep" >&5
3226 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3227  EGREP=$ac_cv_prog_egrep
3228
3229 test -z "$EGREP" && { { echo "$as_me:3229: error: No egrep program found" >&5
3230 echo "$as_me: error: No egrep program found" >&2;}
3231    { (exit 1); exit 1; }; }
3232
3233 # Find a good install program.  We prefer a C program (faster),
3234 # so one script is as good as another.  But avoid the broken or
3235 # incompatible versions:
3236 # SysV /etc/install, /usr/sbin/install
3237 # SunOS /usr/etc/install
3238 # IRIX /sbin/install
3239 # AIX /bin/install
3240 # AmigaOS /C/install, which installs bootblocks on floppy discs
3241 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3242 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3243 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3244 # ./install, which can be erroneously created by make from ./install.sh.
3245 echo "$as_me:3245: checking for a BSD compatible install" >&5
3246 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3247 if test -z "$INSTALL"; then
3248 if test "${ac_cv_path_install+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251     ac_save_IFS=$IFS; IFS=$ac_path_separator
3252   for ac_dir in $PATH; do
3253     IFS=$ac_save_IFS
3254     # Account for people who put trailing slashes in PATH elements.
3255     case $ac_dir/ in
3256     / | ./ | .// | /cC/* \
3257     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3258     | /usr/ucb/* ) ;;
3259     *)
3260       # OSF1 and SCO ODT 3.0 have their own names for install.
3261       # Don't use installbsd from OSF since it installs stuff as root
3262       # by default.
3263       for ac_prog in ginstall scoinst install; do
3264         if $as_executable_p "$ac_dir/$ac_prog"; then
3265           if test $ac_prog = install &&
3266             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3267             # AIX install.  It has an incompatible calling convention.
3268             :
3269           elif test $ac_prog = install &&
3270             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3271             # program-specific install script used by HP pwplus--don't use.
3272             :
3273           else
3274             ac_cv_path_install="$ac_dir/$ac_prog -c"
3275             break 2
3276           fi
3277         fi
3278       done
3279       ;;
3280     esac
3281   done
3282
3283 fi
3284   if test "${ac_cv_path_install+set}" = set; then
3285     INSTALL=$ac_cv_path_install
3286   else
3287     # As a last resort, use the slow shell script.  We don't cache a
3288     # path for INSTALL within a source directory, because that will
3289     # break other packages using the cache if that directory is
3290     # removed, or if the path is relative.
3291     INSTALL=$ac_install_sh
3292   fi
3293 fi
3294 echo "$as_me:3294: result: $INSTALL" >&5
3295 echo "${ECHO_T}$INSTALL" >&6
3296
3297 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3298 # It thinks the first close brace ends the variable substitution.
3299 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3300
3301 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3302
3303 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3304
3305 case $INSTALL in
3306 /*)
3307   ;;
3308 *)
3309   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3310   test -z "$cf_dir" && cf_dir=.
3311   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3312   ;;
3313 esac
3314
3315 for ac_prog in tdlint lint alint
3316 do
3317   # Extract the first word of "$ac_prog", so it can be a program name with args.
3318 set dummy $ac_prog; ac_word=$2
3319 echo "$as_me:3319: checking for $ac_word" >&5
3320 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3321 if test "${ac_cv_prog_LINT+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324   if test -n "$LINT"; then
3325   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3326 else
3327   ac_save_IFS=$IFS; IFS=$ac_path_separator
3328 ac_dummy="$PATH"
3329 for ac_dir in $ac_dummy; do
3330   IFS=$ac_save_IFS
3331   test -z "$ac_dir" && ac_dir=.
3332   $as_executable_p "$ac_dir/$ac_word" || continue
3333 ac_cv_prog_LINT="$ac_prog"
3334 echo "$as_me:3334: found $ac_dir/$ac_word" >&5
3335 break
3336 done
3337
3338 fi
3339 fi
3340 LINT=$ac_cv_prog_LINT
3341 if test -n "$LINT"; then
3342   echo "$as_me:3342: result: $LINT" >&5
3343 echo "${ECHO_T}$LINT" >&6
3344 else
3345   echo "$as_me:3345: result: no" >&5
3346 echo "${ECHO_T}no" >&6
3347 fi
3348
3349   test -n "$LINT" && break
3350 done
3351
3352 echo "$as_me:3352: checking whether ln -s works" >&5
3353 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3354 LN_S=$as_ln_s
3355 if test "$LN_S" = "ln -s"; then
3356   echo "$as_me:3356: result: yes" >&5
3357 echo "${ECHO_T}yes" >&6
3358 else
3359   echo "$as_me:3359: result: no, using $LN_S" >&5
3360 echo "${ECHO_T}no, using $LN_S" >&6
3361 fi
3362
3363 echo "$as_me:3363: checking for long file names" >&5
3364 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3365 if test "${ac_cv_sys_long_file_names+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   ac_cv_sys_long_file_names=yes
3369 # Test for long file names in all the places we know might matter:
3370 #      .                the current directory, where building will happen
3371 #      $prefix/lib      where we will be installing things
3372 #      $exec_prefix/lib likewise
3373 # eval it to expand exec_prefix.
3374 #      $TMPDIR          if set, where it might want to write temporary files
3375 # if $TMPDIR is not set:
3376 #      /tmp             where it might want to write temporary files
3377 #      /var/tmp         likewise
3378 #      /usr/tmp         likewise
3379 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3380   ac_tmpdirs=$TMPDIR
3381 else
3382   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3383 fi
3384 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3385   test -d $ac_dir || continue
3386   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3387   ac_xdir=$ac_dir/cf$$
3388   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3389   ac_tf1=$ac_xdir/conftest9012345
3390   ac_tf2=$ac_xdir/conftest9012346
3391   (echo 1 >$ac_tf1) 2>/dev/null
3392   (echo 2 >$ac_tf2) 2>/dev/null
3393   ac_val=`cat $ac_tf1 2>/dev/null`
3394   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3395     ac_cv_sys_long_file_names=no
3396     rm -rf $ac_xdir 2>/dev/null
3397     break
3398   fi
3399   rm -rf $ac_xdir 2>/dev/null
3400 done
3401 fi
3402 echo "$as_me:3402: result: $ac_cv_sys_long_file_names" >&5
3403 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3404 if test $ac_cv_sys_long_file_names = yes; then
3405
3406 cat >>confdefs.h <<\EOF
3407 #define HAVE_LONG_FILE_NAMES 1
3408 EOF
3409
3410 fi
3411
3412 echo "$as_me:3412: checking if we should assume mixed-case filenames" >&5
3413 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3414
3415 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3416 if test "${enable_mixed_case+set}" = set; then
3417   enableval="$enable_mixed_case"
3418   enable_mixedcase=$enableval
3419 else
3420   enable_mixedcase=auto
3421 fi;
3422 echo "$as_me:3422: result: $enable_mixedcase" >&5
3423 echo "${ECHO_T}$enable_mixedcase" >&6
3424 if test "$enable_mixedcase" = "auto" ; then
3425
3426 echo "$as_me:3426: checking if filesystem supports mixed-case filenames" >&5
3427 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3428 if test "${cf_cv_mixedcase+set}" = set; then
3429   echo $ECHO_N "(cached) $ECHO_C" >&6
3430 else
3431
3432 if test "$cross_compiling" = yes ; then
3433         case $target_alias in #(vi
3434         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3435                 cf_cv_mixedcase=no
3436                 ;;
3437         *)
3438                 cf_cv_mixedcase=yes
3439                 ;;
3440         esac
3441 else
3442         rm -f conftest CONFTEST
3443         echo test >conftest
3444         if test -f CONFTEST ; then
3445                 cf_cv_mixedcase=no
3446         else
3447                 cf_cv_mixedcase=yes
3448         fi
3449         rm -f conftest CONFTEST
3450 fi
3451
3452 fi
3453 echo "$as_me:3453: result: $cf_cv_mixedcase" >&5
3454 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3455 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3456 #define MIXEDCASE_FILENAMES 1
3457 EOF
3458
3459 else
3460     cf_cv_mixedcase=$enable_mixedcase
3461     if test "$enable_mixedcase" = "yes" ; then
3462         cat >>confdefs.h <<\EOF
3463 #define MIXEDCASE_FILENAMES 1
3464 EOF
3465
3466     fi
3467 fi
3468
3469 # do this after mixed-case option (tags/TAGS is not as important as tic).
3470 echo "$as_me:3470: checking whether ${MAKE-make} sets \${MAKE}" >&5
3471 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3472 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3473 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3474   echo $ECHO_N "(cached) $ECHO_C" >&6
3475 else
3476   cat >conftest.make <<\EOF
3477 all:
3478         @echo 'ac_maketemp="${MAKE}"'
3479 EOF
3480 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3481 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3482 if test -n "$ac_maketemp"; then
3483   eval ac_cv_prog_make_${ac_make}_set=yes
3484 else
3485   eval ac_cv_prog_make_${ac_make}_set=no
3486 fi
3487 rm -f conftest.make
3488 fi
3489 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3490   echo "$as_me:3490: result: yes" >&5
3491 echo "${ECHO_T}yes" >&6
3492   SET_MAKE=
3493 else
3494   echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496   SET_MAKE="MAKE=${MAKE-make}"
3497 fi
3498
3499 # Extract the first word of "ctags", so it can be a program name with args.
3500 set dummy ctags; ac_word=$2
3501 echo "$as_me:3501: checking for $ac_word" >&5
3502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3503 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3504   echo $ECHO_N "(cached) $ECHO_C" >&6
3505 else
3506   if test -n "$MAKE_LOWER_TAGS"; then
3507   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3508 else
3509   ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512   IFS=$ac_save_IFS
3513   test -z "$ac_dir" && ac_dir=.
3514   $as_executable_p "$ac_dir/$ac_word" || continue
3515 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3516 echo "$as_me:3516: found $ac_dir/$ac_word" >&5
3517 break
3518 done
3519
3520   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3521 fi
3522 fi
3523 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3524 if test -n "$MAKE_LOWER_TAGS"; then
3525   echo "$as_me:3525: result: $MAKE_LOWER_TAGS" >&5
3526 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3527 else
3528   echo "$as_me:3528: result: no" >&5
3529 echo "${ECHO_T}no" >&6
3530 fi
3531
3532 if test "$cf_cv_mixedcase" = yes ; then
3533         # Extract the first word of "etags", so it can be a program name with args.
3534 set dummy etags; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3538   echo $ECHO_N "(cached) $ECHO_C" >&6
3539 else
3540   if test -n "$MAKE_UPPER_TAGS"; then
3541   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3542 else
3543   ac_save_IFS=$IFS; IFS=$ac_path_separator
3544 ac_dummy="$PATH"
3545 for ac_dir in $ac_dummy; do
3546   IFS=$ac_save_IFS
3547   test -z "$ac_dir" && ac_dir=.
3548   $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3551 break
3552 done
3553
3554   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3555 fi
3556 fi
3557 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3558 if test -n "$MAKE_UPPER_TAGS"; then
3559   echo "$as_me:3559: result: $MAKE_UPPER_TAGS" >&5
3560 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3561 else
3562   echo "$as_me:3562: result: no" >&5
3563 echo "${ECHO_T}no" >&6
3564 fi
3565
3566 else
3567         MAKE_UPPER_TAGS=no
3568 fi
3569
3570 if test "$MAKE_UPPER_TAGS" = yes ; then
3571         MAKE_UPPER_TAGS=
3572 else
3573         MAKE_UPPER_TAGS="#"
3574 fi
3575
3576 if test "$MAKE_LOWER_TAGS" = yes ; then
3577         MAKE_LOWER_TAGS=
3578 else
3579         MAKE_LOWER_TAGS="#"
3580 fi
3581
3582 echo "$as_me:3582: checking for makeflags variable" >&5
3583 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3584 if test "${cf_cv_makeflags+set}" = set; then
3585   echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587
3588         cf_cv_makeflags=''
3589         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3590         do
3591                 cat >cf_makeflags.tmp <<CF_EOF
3592 SHELL = /bin/sh
3593 all :
3594         @ echo '.$cf_option'
3595 CF_EOF
3596                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3597                 case "$cf_result" in
3598                 .*k)
3599                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3600                         case "$cf_result" in
3601                         .*CC=*) cf_cv_makeflags=
3602                                 ;;
3603                         *)      cf_cv_makeflags=$cf_option
3604                                 ;;
3605                         esac
3606                         break
3607                         ;;
3608                 .-)     ;;
3609                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3610                         ;;
3611                 esac
3612         done
3613         rm -f cf_makeflags.tmp
3614
3615 fi
3616 echo "$as_me:3616: result: $cf_cv_makeflags" >&5
3617 echo "${ECHO_T}$cf_cv_makeflags" >&6
3618
3619 if test -n "$ac_tool_prefix"; then
3620   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3621 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3622 echo "$as_me:3622: checking for $ac_word" >&5
3623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3624 if test "${ac_cv_prog_RANLIB+set}" = set; then
3625   echo $ECHO_N "(cached) $ECHO_C" >&6
3626 else
3627   if test -n "$RANLIB"; then
3628   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3629 else
3630   ac_save_IFS=$IFS; IFS=$ac_path_separator
3631 ac_dummy="$PATH"
3632 for ac_dir in $ac_dummy; do
3633   IFS=$ac_save_IFS
3634   test -z "$ac_dir" && ac_dir=.
3635   $as_executable_p "$ac_dir/$ac_word" || continue
3636 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3637 echo "$as_me:3637: found $ac_dir/$ac_word" >&5
3638 break
3639 done
3640
3641 fi
3642 fi
3643 RANLIB=$ac_cv_prog_RANLIB
3644 if test -n "$RANLIB"; then
3645   echo "$as_me:3645: result: $RANLIB" >&5
3646 echo "${ECHO_T}$RANLIB" >&6
3647 else
3648   echo "$as_me:3648: result: no" >&5
3649 echo "${ECHO_T}no" >&6
3650 fi
3651
3652 fi
3653 if test -z "$ac_cv_prog_RANLIB"; then
3654   ac_ct_RANLIB=$RANLIB
3655   # Extract the first word of "ranlib", so it can be a program name with args.
3656 set dummy ranlib; ac_word=$2
3657 echo "$as_me:3657: checking for $ac_word" >&5
3658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3660   echo $ECHO_N "(cached) $ECHO_C" >&6
3661 else
3662   if test -n "$ac_ct_RANLIB"; then
3663   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3664 else
3665   ac_save_IFS=$IFS; IFS=$ac_path_separator
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668   IFS=$ac_save_IFS
3669   test -z "$ac_dir" && ac_dir=.
3670   $as_executable_p "$ac_dir/$ac_word" || continue
3671 ac_cv_prog_ac_ct_RANLIB="ranlib"
3672 echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3673 break
3674 done
3675
3676   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3677 fi
3678 fi
3679 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3680 if test -n "$ac_ct_RANLIB"; then
3681   echo "$as_me:3681: result: $ac_ct_RANLIB" >&5
3682 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3683 else
3684   echo "$as_me:3684: result: no" >&5
3685 echo "${ECHO_T}no" >&6
3686 fi
3687
3688   RANLIB=$ac_ct_RANLIB
3689 else
3690   RANLIB="$ac_cv_prog_RANLIB"
3691 fi
3692
3693 if test -n "$ac_tool_prefix"; then
3694   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3695 set dummy ${ac_tool_prefix}ld; ac_word=$2
3696 echo "$as_me:3696: checking for $ac_word" >&5
3697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3698 if test "${ac_cv_prog_LD+set}" = set; then
3699   echo $ECHO_N "(cached) $ECHO_C" >&6
3700 else
3701   if test -n "$LD"; then
3702   ac_cv_prog_LD="$LD" # Let the user override the test.
3703 else
3704   ac_save_IFS=$IFS; IFS=$ac_path_separator
3705 ac_dummy="$PATH"
3706 for ac_dir in $ac_dummy; do
3707   IFS=$ac_save_IFS
3708   test -z "$ac_dir" && ac_dir=.
3709   $as_executable_p "$ac_dir/$ac_word" || continue
3710 ac_cv_prog_LD="${ac_tool_prefix}ld"
3711 echo "$as_me:3711: found $ac_dir/$ac_word" >&5
3712 break
3713 done
3714
3715 fi
3716 fi
3717 LD=$ac_cv_prog_LD
3718 if test -n "$LD"; then
3719   echo "$as_me:3719: result: $LD" >&5
3720 echo "${ECHO_T}$LD" >&6
3721 else
3722   echo "$as_me:3722: result: no" >&5
3723 echo "${ECHO_T}no" >&6
3724 fi
3725
3726 fi
3727 if test -z "$ac_cv_prog_LD"; then
3728   ac_ct_LD=$LD
3729   # Extract the first word of "ld", so it can be a program name with args.
3730 set dummy ld; ac_word=$2
3731 echo "$as_me:3731: checking for $ac_word" >&5
3732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3734   echo $ECHO_N "(cached) $ECHO_C" >&6
3735 else
3736   if test -n "$ac_ct_LD"; then
3737   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3738 else
3739   ac_save_IFS=$IFS; IFS=$ac_path_separator
3740 ac_dummy="$PATH"
3741 for ac_dir in $ac_dummy; do
3742   IFS=$ac_save_IFS
3743   test -z "$ac_dir" && ac_dir=.
3744   $as_executable_p "$ac_dir/$ac_word" || continue
3745 ac_cv_prog_ac_ct_LD="ld"
3746 echo "$as_me:3746: found $ac_dir/$ac_word" >&5
3747 break
3748 done
3749
3750   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3751 fi
3752 fi
3753 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3754 if test -n "$ac_ct_LD"; then
3755   echo "$as_me:3755: result: $ac_ct_LD" >&5
3756 echo "${ECHO_T}$ac_ct_LD" >&6
3757 else
3758   echo "$as_me:3758: result: no" >&5
3759 echo "${ECHO_T}no" >&6
3760 fi
3761
3762   LD=$ac_ct_LD
3763 else
3764   LD="$ac_cv_prog_LD"
3765 fi
3766
3767 if test -n "$ac_tool_prefix"; then
3768   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3769 set dummy ${ac_tool_prefix}ar; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_AR+set}" = set; then
3773   echo $ECHO_N "(cached) $ECHO_C" >&6
3774 else
3775   if test -n "$AR"; then
3776   ac_cv_prog_AR="$AR" # Let the user override the test.
3777 else
3778   ac_save_IFS=$IFS; IFS=$ac_path_separator
3779 ac_dummy="$PATH"
3780 for ac_dir in $ac_dummy; do
3781   IFS=$ac_save_IFS
3782   test -z "$ac_dir" && ac_dir=.
3783   $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_AR="${ac_tool_prefix}ar"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3786 break
3787 done
3788
3789 fi
3790 fi
3791 AR=$ac_cv_prog_AR
3792 if test -n "$AR"; then
3793   echo "$as_me:3793: result: $AR" >&5
3794 echo "${ECHO_T}$AR" >&6
3795 else
3796   echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3798 fi
3799
3800 fi
3801 if test -z "$ac_cv_prog_AR"; then
3802   ac_ct_AR=$AR
3803   # Extract the first word of "ar", so it can be a program name with args.
3804 set dummy ar; ac_word=$2
3805 echo "$as_me:3805: checking for $ac_word" >&5
3806 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3807 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810   if test -n "$ac_ct_AR"; then
3811   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3812 else
3813   ac_save_IFS=$IFS; IFS=$ac_path_separator
3814 ac_dummy="$PATH"
3815 for ac_dir in $ac_dummy; do
3816   IFS=$ac_save_IFS
3817   test -z "$ac_dir" && ac_dir=.
3818   $as_executable_p "$ac_dir/$ac_word" || continue
3819 ac_cv_prog_ac_ct_AR="ar"
3820 echo "$as_me:3820: found $ac_dir/$ac_word" >&5
3821 break
3822 done
3823
3824   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3825 fi
3826 fi
3827 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3828 if test -n "$ac_ct_AR"; then
3829   echo "$as_me:3829: result: $ac_ct_AR" >&5
3830 echo "${ECHO_T}$ac_ct_AR" >&6
3831 else
3832   echo "$as_me:3832: result: no" >&5
3833 echo "${ECHO_T}no" >&6
3834 fi
3835
3836   AR=$ac_ct_AR
3837 else
3838   AR="$ac_cv_prog_AR"
3839 fi
3840
3841 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3842   echo $ECHO_N "(cached) $ECHO_C" >&6
3843 else
3844
3845 echo "$as_me:3845: checking for archiver options (symbol AR_OPTS)" >&5
3846 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3847
3848 if test -z "$AR_OPTS" ; then
3849         AR_OPTS=rv
3850
3851 fi
3852
3853 cf_cv_subst_AR_OPTS=$AR_OPTS
3854 echo "$as_me:3854: result: $AR_OPTS" >&5
3855 echo "${ECHO_T}$AR_OPTS" >&6
3856
3857 fi
3858
3859 echo "$as_me:3859: checking if you have specified an install-prefix" >&5
3860 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3861
3862 # Check whether --with-install-prefix or --without-install-prefix was given.
3863 if test "${with_install_prefix+set}" = set; then
3864   withval="$with_install_prefix"
3865   case "$withval" in #(vi
3866         yes|no) #(vi
3867                 ;;
3868         *)      DESTDIR="$withval"
3869                 ;;
3870         esac
3871 fi;
3872 echo "$as_me:3872: result: $DESTDIR" >&5
3873 echo "${ECHO_T}$DESTDIR" >&6
3874
3875 ###############################################################################
3876
3877 # If we're cross-compiling, allow the user to override the tools and their
3878 # options.  The configure script is oriented toward identifying the host
3879 # compiler, etc., but we need a build compiler to generate parts of the source.
3880
3881 if test "$cross_compiling" = yes ; then
3882
3883         # defaults that we might want to override
3884         : ${BUILD_CFLAGS:=''}
3885         : ${BUILD_CPPFLAGS:=''}
3886         : ${BUILD_LDFLAGS:=''}
3887         : ${BUILD_LIBS:=''}
3888         : ${BUILD_EXEEXT:='$x'}
3889         : ${BUILD_OBJEXT:='o'}
3890
3891 # Check whether --with-build-cc or --without-build-cc was given.
3892 if test "${with_build_cc+set}" = set; then
3893   withval="$with_build_cc"
3894   BUILD_CC="$withval"
3895 else
3896   for ac_prog in gcc cc cl
3897 do
3898   # Extract the first word of "$ac_prog", so it can be a program name with args.
3899 set dummy $ac_prog; ac_word=$2
3900 echo "$as_me:3900: checking for $ac_word" >&5
3901 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3902 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3903   echo $ECHO_N "(cached) $ECHO_C" >&6
3904 else
3905   if test -n "$BUILD_CC"; then
3906   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3907 else
3908   ac_save_IFS=$IFS; IFS=$ac_path_separator
3909 ac_dummy="$PATH"
3910 for ac_dir in $ac_dummy; do
3911   IFS=$ac_save_IFS
3912   test -z "$ac_dir" && ac_dir=.
3913   $as_executable_p "$ac_dir/$ac_word" || continue
3914 ac_cv_prog_BUILD_CC="$ac_prog"
3915 echo "$as_me:3915: found $ac_dir/$ac_word" >&5
3916 break
3917 done
3918
3919 fi
3920 fi
3921 BUILD_CC=$ac_cv_prog_BUILD_CC
3922 if test -n "$BUILD_CC"; then
3923   echo "$as_me:3923: result: $BUILD_CC" >&5
3924 echo "${ECHO_T}$BUILD_CC" >&6
3925 else
3926   echo "$as_me:3926: result: no" >&5
3927 echo "${ECHO_T}no" >&6
3928 fi
3929
3930   test -n "$BUILD_CC" && break
3931 done
3932
3933 fi;
3934         echo "$as_me:3934: checking for native build C compiler" >&5
3935 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3936         echo "$as_me:3936: result: $BUILD_CC" >&5
3937 echo "${ECHO_T}$BUILD_CC" >&6
3938
3939         echo "$as_me:3939: checking for native build C preprocessor" >&5
3940 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3941
3942 # Check whether --with-build-cpp or --without-build-cpp was given.
3943 if test "${with_build_cpp+set}" = set; then
3944   withval="$with_build_cpp"
3945   BUILD_CPP="$withval"
3946 else
3947   BUILD_CPP='${BUILD_CC} -E'
3948 fi;
3949         echo "$as_me:3949: result: $BUILD_CPP" >&5
3950 echo "${ECHO_T}$BUILD_CPP" >&6
3951
3952         echo "$as_me:3952: checking for native build C flags" >&5
3953 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3954
3955 # Check whether --with-build-cflags or --without-build-cflags was given.
3956 if test "${with_build_cflags+set}" = set; then
3957   withval="$with_build_cflags"
3958   BUILD_CFLAGS="$withval"
3959 fi;
3960         echo "$as_me:3960: result: $BUILD_CFLAGS" >&5
3961 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3962
3963         echo "$as_me:3963: checking for native build C preprocessor-flags" >&5
3964 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3965
3966 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3967 if test "${with_build_cppflags+set}" = set; then
3968   withval="$with_build_cppflags"
3969   BUILD_CPPFLAGS="$withval"
3970 fi;
3971         echo "$as_me:3971: result: $BUILD_CPPFLAGS" >&5
3972 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3973
3974         echo "$as_me:3974: checking for native build linker-flags" >&5
3975 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3976
3977 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3978 if test "${with_build_ldflags+set}" = set; then
3979   withval="$with_build_ldflags"
3980   BUILD_LDFLAGS="$withval"
3981 fi;
3982         echo "$as_me:3982: result: $BUILD_LDFLAGS" >&5
3983 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3984
3985         echo "$as_me:3985: checking for native build linker-libraries" >&5
3986 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3987
3988 # Check whether --with-build-libs or --without-build-libs was given.
3989 if test "${with_build_libs+set}" = set; then
3990   withval="$with_build_libs"
3991   BUILD_LIBS="$withval"
3992 fi;
3993         echo "$as_me:3993: result: $BUILD_LIBS" >&5
3994 echo "${ECHO_T}$BUILD_LIBS" >&6
3995
3996         # this assumes we're on Unix.
3997         BUILD_EXEEXT=
3998         BUILD_OBJEXT=o
3999
4000         : ${BUILD_CC:='${CC}'}
4001
4002         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4003                 { { echo "$as_me:4003: error: Cross-build requires two compilers.
4004 Use --with-build-cc to specify the native compiler." >&5
4005 echo "$as_me: error: Cross-build requires two compilers.
4006 Use --with-build-cc to specify the native compiler." >&2;}
4007    { (exit 1); exit 1; }; }
4008         fi
4009
4010 else
4011         : ${BUILD_CC:='${CC}'}
4012         : ${BUILD_CPP:='${CPP}'}
4013         : ${BUILD_CFLAGS:='${CFLAGS}'}
4014         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4015         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4016         : ${BUILD_LIBS:='${LIBS}'}
4017         : ${BUILD_EXEEXT:='$x'}
4018         : ${BUILD_OBJEXT:='o'}
4019 fi
4020
4021 ###############################################################################
4022
4023 ### Options to allow the user to specify the set of libraries which are used.
4024 ### Use "--without-normal --with-shared" to allow the default model to be
4025 ### shared, for example.
4026 cf_list_models=""
4027
4028 LIBTOOL=
4029
4030 # common library maintenance symbols that are convenient for libtool scripts:
4031 LIB_CREATE='${AR} -cr'
4032 LIB_OBJECT='${OBJECTS}'
4033 LIB_SUFFIX=.a
4034 LIB_PREP="$RANLIB"
4035
4036 # symbols used to prop libtool up to enable it to determine what it should be
4037 # doing:
4038 LIB_CLEAN=
4039 LIB_COMPILE=
4040 LIB_LINK='${CC}'
4041 LIB_INSTALL=
4042 LIB_UNINSTALL=
4043
4044 echo "$as_me:4044: checking if you want to build libraries with libtool" >&5
4045 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4046
4047 # Check whether --with-libtool or --without-libtool was given.
4048 if test "${with_libtool+set}" = set; then
4049   withval="$with_libtool"
4050   with_libtool=$withval
4051 else
4052   with_libtool=no
4053 fi;
4054 echo "$as_me:4054: result: $with_libtool" >&5
4055 echo "${ECHO_T}$with_libtool" >&6
4056 if test "$with_libtool" != "no"; then
4057
4058         if test "$with_libtool" != "yes" ; then
4059
4060 if test "x$prefix" != xNONE; then
4061   cf_path_syntax="$prefix"
4062 else
4063   cf_path_syntax="$ac_default_prefix"
4064 fi
4065
4066 case ".$with_libtool" in #(vi
4067 .\$\(*\)*|.\'*\'*) #(vi
4068   ;;
4069 ..|./*|.\\*) #(vi
4070   ;;
4071 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4072   ;;
4073 .\${*prefix}*) #(vi
4074   eval with_libtool="$with_libtool"
4075   case ".$with_libtool" in #(vi
4076   .NONE/*)
4077     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4078     ;;
4079   esac
4080   ;; #(vi
4081 .no|.NONE/*)
4082   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4083   ;;
4084 *)
4085   { { echo "$as_me:4085: error: expected a pathname, not \"$with_libtool\"" >&5
4086 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4087    { (exit 1); exit 1; }; }
4088   ;;
4089 esac
4090
4091                 LIBTOOL=$with_libtool
4092         else
4093                 # Extract the first word of "libtool", so it can be a program name with args.
4094 set dummy libtool; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   case $LIBTOOL in
4101   [\\/]* | ?:[\\/]*)
4102   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4103   ;;
4104   *)
4105   ac_save_IFS=$IFS; IFS=$ac_path_separator
4106 ac_dummy="$PATH"
4107 for ac_dir in $ac_dummy; do
4108   IFS=$ac_save_IFS
4109   test -z "$ac_dir" && ac_dir=.
4110   if $as_executable_p "$ac_dir/$ac_word"; then
4111    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4112    echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4113    break
4114 fi
4115 done
4116
4117   ;;
4118 esac
4119 fi
4120 LIBTOOL=$ac_cv_path_LIBTOOL
4121
4122 if test -n "$LIBTOOL"; then
4123   echo "$as_me:4123: result: $LIBTOOL" >&5
4124 echo "${ECHO_T}$LIBTOOL" >&6
4125 else
4126   echo "$as_me:4126: result: no" >&5
4127 echo "${ECHO_T}no" >&6
4128 fi
4129
4130         fi
4131         if test -z "$LIBTOOL" ; then
4132                 { { echo "$as_me:4132: error: Cannot find libtool" >&5
4133 echo "$as_me: error: Cannot find libtool" >&2;}
4134    { (exit 1); exit 1; }; }
4135         fi
4136         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4137         LIB_OBJECT='${OBJECTS:.o=.lo}'
4138         LIB_SUFFIX=.la
4139         LIB_CLEAN='${LIBTOOL} --mode=clean'
4140         LIB_COMPILE='${LIBTOOL} --mode=compile'
4141         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4142         LIB_INSTALL='${LIBTOOL} --mode=install'
4143         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4144         LIB_PREP=:
4145
4146         # Show the version of libtool
4147         echo "$as_me:4147: checking version of libtool" >&5
4148 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4149
4150         # Save the version in a cache variable - this is not entirely a good
4151         # thing, but the version string from libtool is very ugly, and for
4152         # bug reports it might be useful to have the original string.
4153         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.].*//'`
4154         echo "$as_me:4154: result: $cf_cv_libtool_version" >&5
4155 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4156         if test -z "$cf_cv_libtool_version" ; then
4157                 { { echo "$as_me:4157: error: This is not GNU libtool" >&5
4158 echo "$as_me: error: This is not GNU libtool" >&2;}
4159    { (exit 1); exit 1; }; }
4160         fi
4161
4162         # special hack to add --tag option for C++ compiler
4163         case $cf_cv_libtool_version in
4164         1.[5-9]*|[2-9]*)
4165                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4166                 LIBTOOL="$LIBTOOL --tag=CC"
4167                 ;;
4168         *)
4169                 LIBTOOL_CXX="$LIBTOOL"
4170                 ;;
4171         esac
4172 else
4173         LIBTOOL=""
4174         LIBTOOL_CXX=""
4175 fi
4176
4177 test -z "$LIBTOOL" && ECHO_LT=
4178
4179 if test "$with_libtool" != "no" ; then
4180
4181 cf_list_models="$cf_list_models libtool"
4182
4183 else
4184
4185 echo "$as_me:4185: checking if you want to build shared libraries" >&5
4186 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4187
4188 # Check whether --with-shared or --without-shared was given.
4189 if test "${with_shared+set}" = set; then
4190   withval="$with_shared"
4191   with_shared=$withval
4192 else
4193   with_shared=no
4194 fi;
4195 echo "$as_me:4195: result: $with_shared" >&5
4196 echo "${ECHO_T}$with_shared" >&6
4197 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4198
4199 echo "$as_me:4199: checking if you want to build static libraries" >&5
4200 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-normal or --without-normal was given.
4203 if test "${with_normal+set}" = set; then
4204   withval="$with_normal"
4205   with_normal=$withval
4206 else
4207   with_normal=yes
4208 fi;
4209 echo "$as_me:4209: result: $with_normal" >&5
4210 echo "${ECHO_T}$with_normal" >&6
4211 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4212
4213 echo "$as_me:4213: checking if you want to build debug libraries" >&5
4214 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4215
4216 # Check whether --with-debug or --without-debug was given.
4217 if test "${with_debug+set}" = set; then
4218   withval="$with_debug"
4219   with_debug=$withval
4220 else
4221   with_debug=yes
4222 fi;
4223 echo "$as_me:4223: result: $with_debug" >&5
4224 echo "${ECHO_T}$with_debug" >&6
4225 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4226
4227 echo "$as_me:4227: checking if you want to build profiling libraries" >&5
4228 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4229
4230 # Check whether --with-profile or --without-profile was given.
4231 if test "${with_profile+set}" = set; then
4232   withval="$with_profile"
4233   with_profile=$withval
4234 else
4235   with_profile=no
4236 fi;
4237 echo "$as_me:4237: result: $with_profile" >&5
4238 echo "${ECHO_T}$with_profile" >&6
4239 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4240
4241 fi
4242
4243 ###############################################################################
4244
4245 echo "$as_me:4245: checking for specified models" >&5
4246 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4247 test -z "$cf_list_models" && cf_list_models=normal
4248 test "$with_libtool" != "no" && cf_list_models=libtool
4249 echo "$as_me:4249: result: $cf_list_models" >&5
4250 echo "${ECHO_T}$cf_list_models" >&6
4251
4252 ### Use the first model as the default, and save its suffix for use in building
4253 ### up test-applications.
4254 echo "$as_me:4254: checking for default model" >&5
4255 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4256 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4257 echo "$as_me:4257: result: $DFT_LWR_MODEL" >&5
4258 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4259
4260 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4261
4262 TICS_NAME=tic
4263
4264 TINFO_NAME=tinfo
4265
4266 LIB_NAME=ncurses
4267
4268 LIB_DIR=../lib
4269 LIB_2ND=../../lib
4270
4271         case $cf_cv_system_name in #(vi
4272         OS/2*|os2*) #(vi
4273         LIB_PREFIX=''
4274         ;;
4275         *)      LIB_PREFIX='lib'
4276         ;;
4277         esac
4278 cf_prefix=$LIB_PREFIX
4279
4280 LIB_PREFIX=$cf_prefix
4281
4282 LIB_SUFFIX=
4283
4284 ###############################################################################
4285
4286 echo "$as_me:4286: checking if you want to build a separate terminfo library" >&5
4287 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4288
4289 # Check whether --with-termlib or --without-termlib was given.
4290 if test "${with_termlib+set}" = set; then
4291   withval="$with_termlib"
4292   with_termlib=$withval
4293 else
4294   with_termlib=no
4295 fi;
4296 echo "$as_me:4296: result: $with_termlib" >&5
4297 echo "${ECHO_T}$with_termlib" >&6
4298
4299 echo "$as_me:4299: checking if you want to build a separate tic library" >&5
4300 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4301
4302 # Check whether --with-ticlib or --without-ticlib was given.
4303 if test "${with_ticlib+set}" = set; then
4304   withval="$with_ticlib"
4305   with_ticlib=$withval
4306 else
4307   with_ticlib=no
4308 fi;
4309 echo "$as_me:4309: result: $with_ticlib" >&5
4310 echo "${ECHO_T}$with_ticlib" >&6
4311
4312 ### Checks for special libraries, must be done up-front.
4313 SHLIB_LIST=""
4314
4315 echo "$as_me:4315: checking if you want to link with the GPM mouse library" >&5
4316 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4317
4318 # Check whether --with-gpm or --without-gpm was given.
4319 if test "${with_gpm+set}" = set; then
4320   withval="$with_gpm"
4321   with_gpm=$withval
4322 else
4323   with_gpm=maybe
4324 fi;
4325 echo "$as_me:4325: result: $with_gpm" >&5
4326 echo "${ECHO_T}$with_gpm" >&6
4327
4328 if test "$with_gpm" != no ; then
4329         echo "$as_me:4329: checking for gpm.h" >&5
4330 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4331 if test "${ac_cv_header_gpm_h+set}" = set; then
4332   echo $ECHO_N "(cached) $ECHO_C" >&6
4333 else
4334   cat >conftest.$ac_ext <<_ACEOF
4335 #line 4335 "configure"
4336 #include "confdefs.h"
4337 #include <gpm.h>
4338 _ACEOF
4339 if { (eval echo "$as_me:4339: \"$ac_cpp conftest.$ac_ext\"") >&5
4340   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4341   ac_status=$?
4342   egrep -v '^ *\+' conftest.er1 >conftest.err
4343   rm -f conftest.er1
4344   cat conftest.err >&5
4345   echo "$as_me:4345: \$? = $ac_status" >&5
4346   (exit $ac_status); } >/dev/null; then
4347   if test -s conftest.err; then
4348     ac_cpp_err=$ac_c_preproc_warn_flag
4349   else
4350     ac_cpp_err=
4351   fi
4352 else
4353   ac_cpp_err=yes
4354 fi
4355 if test -z "$ac_cpp_err"; then
4356   ac_cv_header_gpm_h=yes
4357 else
4358   echo "$as_me: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   ac_cv_header_gpm_h=no
4361 fi
4362 rm -f conftest.err conftest.$ac_ext
4363 fi
4364 echo "$as_me:4364: result: $ac_cv_header_gpm_h" >&5
4365 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4366 if test $ac_cv_header_gpm_h = yes; then
4367
4368                 cat >>confdefs.h <<\EOF
4369 #define HAVE_GPM_H 1
4370 EOF
4371
4372                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4373                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4374
4375 echo "${as_me-configure}:4375: testing assuming we really have GPM library ..." 1>&5
4376
4377                         cat >>confdefs.h <<\EOF
4378 #define HAVE_LIBGPM 1
4379 EOF
4380
4381                 else
4382                         echo "$as_me:4382: checking for Gpm_Open in -lgpm" >&5
4383 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4384 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4385   echo $ECHO_N "(cached) $ECHO_C" >&6
4386 else
4387   ac_check_lib_save_LIBS=$LIBS
4388 LIBS="-lgpm  $LIBS"
4389 cat >conftest.$ac_ext <<_ACEOF
4390 #line 4390 "configure"
4391 #include "confdefs.h"
4392
4393 /* Override any gcc2 internal prototype to avoid an error.  */
4394 #ifdef __cplusplus
4395 extern "C"
4396 #endif
4397 /* We use char because int might match the return type of a gcc2
4398    builtin and then its argument prototype would still apply.  */
4399 char Gpm_Open ();
4400 int
4401 main ()
4402 {
4403 Gpm_Open ();
4404   ;
4405   return 0;
4406 }
4407 _ACEOF
4408 rm -f conftest.$ac_objext conftest$ac_exeext
4409 if { (eval echo "$as_me:4409: \"$ac_link\"") >&5
4410   (eval $ac_link) 2>&5
4411   ac_status=$?
4412   echo "$as_me:4412: \$? = $ac_status" >&5
4413   (exit $ac_status); } &&
4414          { ac_try='test -s conftest$ac_exeext'
4415   { (eval echo "$as_me:4415: \"$ac_try\"") >&5
4416   (eval $ac_try) 2>&5
4417   ac_status=$?
4418   echo "$as_me:4418: \$? = $ac_status" >&5
4419   (exit $ac_status); }; }; then
4420   ac_cv_lib_gpm_Gpm_Open=yes
4421 else
4422   echo "$as_me: failed program was:" >&5
4423 cat conftest.$ac_ext >&5
4424 ac_cv_lib_gpm_Gpm_Open=no
4425 fi
4426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4427 LIBS=$ac_check_lib_save_LIBS
4428 fi
4429 echo "$as_me:4429: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4430 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4431 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4432   :
4433 else
4434
4435                                 { { echo "$as_me:4435: error: Cannot link with GPM library" >&5
4436 echo "$as_me: error: Cannot link with GPM library" >&2;}
4437    { (exit 1); exit 1; }; }
4438                 fi
4439                 with_gpm=yes
4440
4441 fi
4442
4443 else
4444
4445                 test "$with_gpm" != maybe && { echo "$as_me:4445: WARNING: Cannot find GPM header" >&5
4446 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4447                 with_gpm=no
4448
4449 fi
4450
4451 fi
4452
4453 if test "$with_gpm" != no ; then
4454         echo "$as_me:4454: checking if you want to load GPM dynamically" >&5
4455 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4456
4457 # Check whether --with-dlsym or --without-dlsym was given.
4458 if test "${with_dlsym+set}" = set; then
4459   withval="$with_dlsym"
4460   with_dlsym=$withval
4461 else
4462   with_dlsym=yes
4463 fi;
4464         echo "$as_me:4464: result: $with_dlsym" >&5
4465 echo "${ECHO_T}$with_dlsym" >&6
4466         if test "$with_dlsym" = yes ; then
4467
4468 cf_have_dlsym=no
4469 echo "$as_me:4469: checking for dlsym" >&5
4470 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4471 if test "${ac_cv_func_dlsym+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   cat >conftest.$ac_ext <<_ACEOF
4475 #line 4475 "configure"
4476 #include "confdefs.h"
4477 /* System header to define __stub macros and hopefully few prototypes,
4478     which can conflict with char dlsym (); below.  */
4479 #include <assert.h>
4480 /* Override any gcc2 internal prototype to avoid an error.  */
4481 #ifdef __cplusplus
4482 extern "C"
4483 #endif
4484 /* We use char because int might match the return type of a gcc2
4485    builtin and then its argument prototype would still apply.  */
4486 char dlsym ();
4487 char (*f) ();
4488
4489 int
4490 main ()
4491 {
4492 /* The GNU C library defines this for functions which it implements
4493     to always fail with ENOSYS.  Some functions are actually named
4494     something starting with __ and the normal name is an alias.  */
4495 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4496 choke me
4497 #else
4498 f = dlsym;
4499 #endif
4500
4501   ;
4502   return 0;
4503 }
4504 _ACEOF
4505 rm -f conftest.$ac_objext conftest$ac_exeext
4506 if { (eval echo "$as_me:4506: \"$ac_link\"") >&5
4507   (eval $ac_link) 2>&5
4508   ac_status=$?
4509   echo "$as_me:4509: \$? = $ac_status" >&5
4510   (exit $ac_status); } &&
4511          { ac_try='test -s conftest$ac_exeext'
4512   { (eval echo "$as_me:4512: \"$ac_try\"") >&5
4513   (eval $ac_try) 2>&5
4514   ac_status=$?
4515   echo "$as_me:4515: \$? = $ac_status" >&5
4516   (exit $ac_status); }; }; then
4517   ac_cv_func_dlsym=yes
4518 else
4519   echo "$as_me: failed program was:" >&5
4520 cat conftest.$ac_ext >&5
4521 ac_cv_func_dlsym=no
4522 fi
4523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4524 fi
4525 echo "$as_me:4525: result: $ac_cv_func_dlsym" >&5
4526 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4527 if test $ac_cv_func_dlsym = yes; then
4528   cf_have_dlsym=yes
4529 else
4530
4531 cf_have_libdl=no
4532 echo "$as_me:4532: checking for dlsym in -ldl" >&5
4533 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4534 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4535   echo $ECHO_N "(cached) $ECHO_C" >&6
4536 else
4537   ac_check_lib_save_LIBS=$LIBS
4538 LIBS="-ldl  $LIBS"
4539 cat >conftest.$ac_ext <<_ACEOF
4540 #line 4540 "configure"
4541 #include "confdefs.h"
4542
4543 /* Override any gcc2 internal prototype to avoid an error.  */
4544 #ifdef __cplusplus
4545 extern "C"
4546 #endif
4547 /* We use char because int might match the return type of a gcc2
4548    builtin and then its argument prototype would still apply.  */
4549 char dlsym ();
4550 int
4551 main ()
4552 {
4553 dlsym ();
4554   ;
4555   return 0;
4556 }
4557 _ACEOF
4558 rm -f conftest.$ac_objext conftest$ac_exeext
4559 if { (eval echo "$as_me:4559: \"$ac_link\"") >&5
4560   (eval $ac_link) 2>&5
4561   ac_status=$?
4562   echo "$as_me:4562: \$? = $ac_status" >&5
4563   (exit $ac_status); } &&
4564          { ac_try='test -s conftest$ac_exeext'
4565   { (eval echo "$as_me:4565: \"$ac_try\"") >&5
4566   (eval $ac_try) 2>&5
4567   ac_status=$?
4568   echo "$as_me:4568: \$? = $ac_status" >&5
4569   (exit $ac_status); }; }; then
4570   ac_cv_lib_dl_dlsym=yes
4571 else
4572   echo "$as_me: failed program was:" >&5
4573 cat conftest.$ac_ext >&5
4574 ac_cv_lib_dl_dlsym=no
4575 fi
4576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4577 LIBS=$ac_check_lib_save_LIBS
4578 fi
4579 echo "$as_me:4579: result: $ac_cv_lib_dl_dlsym" >&5
4580 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4581 if test $ac_cv_lib_dl_dlsym = yes; then
4582
4583         cf_have_dlsym=yes
4584         cf_have_libdl=yes
4585 fi
4586
4587 fi
4588
4589 if test "$cf_have_dlsym" = yes ; then
4590         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4591
4592         echo "$as_me:4592: checking whether able to link to dl*() functions" >&5
4593 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4594         cat >conftest.$ac_ext <<_ACEOF
4595 #line 4595 "configure"
4596 #include "confdefs.h"
4597 #include <dlfcn.h>
4598 int
4599 main ()
4600 {
4601
4602                 void *obj;
4603                 if ((obj = dlopen("filename", 0)) != 0) {
4604                         if (dlsym(obj, "symbolname") == 0) {
4605                         dlclose(obj);
4606                         }
4607                 }
4608   ;
4609   return 0;
4610 }
4611 _ACEOF
4612 rm -f conftest.$ac_objext conftest$ac_exeext
4613 if { (eval echo "$as_me:4613: \"$ac_link\"") >&5
4614   (eval $ac_link) 2>&5
4615   ac_status=$?
4616   echo "$as_me:4616: \$? = $ac_status" >&5
4617   (exit $ac_status); } &&
4618          { ac_try='test -s conftest$ac_exeext'
4619   { (eval echo "$as_me:4619: \"$ac_try\"") >&5
4620   (eval $ac_try) 2>&5
4621   ac_status=$?
4622   echo "$as_me:4622: \$? = $ac_status" >&5
4623   (exit $ac_status); }; }; then
4624
4625                 cat >>confdefs.h <<\EOF
4626 #define HAVE_LIBDL 1
4627 EOF
4628
4629 else
4630   echo "$as_me: failed program was:" >&5
4631 cat conftest.$ac_ext >&5
4632
4633                 { { echo "$as_me:4633: error: Cannot link test program for libdl" >&5
4634 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4635    { (exit 1); exit 1; }; }
4636 fi
4637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4638         echo "$as_me:4638: result: ok" >&5
4639 echo "${ECHO_T}ok" >&6
4640 else
4641         { { echo "$as_me:4641: error: Cannot find dlsym function" >&5
4642 echo "$as_me: error: Cannot find dlsym function" >&2;}
4643    { (exit 1); exit 1; }; }
4644 fi
4645
4646                 if test "$with_gpm" != yes ; then
4647                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4648
4649 echo "${as_me-configure}:4649: testing assuming soname for gpm is $with_gpm ..." 1>&5
4650
4651                         cf_cv_gpm_soname="$with_gpm"
4652                 else
4653
4654 echo "$as_me:4654: checking for soname of gpm library" >&5
4655 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4656 if test "${cf_cv_gpm_soname+set}" = set; then
4657   echo $ECHO_N "(cached) $ECHO_C" >&6
4658 else
4659
4660 cf_cv_gpm_soname=unknown
4661 if test "$cross_compiling" != yes ; then
4662 cat >conftest.$ac_ext <<CF_EOF
4663 #include <gpm.h>
4664 int main()
4665 {
4666 if (Gpm_Open(0,0)) Gpm_Close();
4667         ${cf_cv_main_return:-return}(0);
4668 }
4669 CF_EOF
4670 cf_save_LIBS="$LIBS"
4671         LIBS="-lgpm $LIBS"
4672         if { (eval echo "$as_me:4672: \"$ac_compile\"") >&5
4673   (eval $ac_compile) 2>&5
4674   ac_status=$?
4675   echo "$as_me:4675: \$? = $ac_status" >&5
4676   (exit $ac_status); } ; then
4677                 if { (eval echo "$as_me:4677: \"$ac_link\"") >&5
4678   (eval $ac_link) 2>&5
4679   ac_status=$?
4680   echo "$as_me:4680: \$? = $ac_status" >&5
4681   (exit $ac_status); } ; then
4682                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4683                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4684                 fi
4685         fi
4686 rm -f conftest*
4687 LIBS="$cf_save_LIBS"
4688 fi
4689
4690 fi
4691 echo "$as_me:4691: result: $cf_cv_gpm_soname" >&5
4692 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4693
4694                 fi
4695                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4696 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4697 EOF
4698
4699                 SHLIB_LIST="-ldl $SHLIB_LIST"
4700         else
4701                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4702         fi
4703         cat >>confdefs.h <<\EOF
4704 #define HAVE_LIBGPM 1
4705 EOF
4706
4707 echo "$as_me:4707: checking for Gpm_Wgetch in -lgpm" >&5
4708 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4709 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4710   echo $ECHO_N "(cached) $ECHO_C" >&6
4711 else
4712   ac_check_lib_save_LIBS=$LIBS
4713 LIBS="-lgpm  $LIBS"
4714 cat >conftest.$ac_ext <<_ACEOF
4715 #line 4715 "configure"
4716 #include "confdefs.h"
4717
4718 /* Override any gcc2 internal prototype to avoid an error.  */
4719 #ifdef __cplusplus
4720 extern "C"
4721 #endif
4722 /* We use char because int might match the return type of a gcc2
4723    builtin and then its argument prototype would still apply.  */
4724 char Gpm_Wgetch ();
4725 int
4726 main ()
4727 {
4728 Gpm_Wgetch ();
4729   ;
4730   return 0;
4731 }
4732 _ACEOF
4733 rm -f conftest.$ac_objext conftest$ac_exeext
4734 if { (eval echo "$as_me:4734: \"$ac_link\"") >&5
4735   (eval $ac_link) 2>&5
4736   ac_status=$?
4737   echo "$as_me:4737: \$? = $ac_status" >&5
4738   (exit $ac_status); } &&
4739          { ac_try='test -s conftest$ac_exeext'
4740   { (eval echo "$as_me:4740: \"$ac_try\"") >&5
4741   (eval $ac_try) 2>&5
4742   ac_status=$?
4743   echo "$as_me:4743: \$? = $ac_status" >&5
4744   (exit $ac_status); }; }; then
4745   ac_cv_lib_gpm_Gpm_Wgetch=yes
4746 else
4747   echo "$as_me: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 ac_cv_lib_gpm_Gpm_Wgetch=no
4750 fi
4751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4752 LIBS=$ac_check_lib_save_LIBS
4753 fi
4754 echo "$as_me:4754: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4755 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4756 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4757
4758 echo "$as_me:4758: checking if GPM is weakly bound to curses library" >&5
4759 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4760 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4761   echo $ECHO_N "(cached) $ECHO_C" >&6
4762 else
4763
4764 cf_cv_check_gpm_wgetch=unknown
4765 if test "$cross_compiling" != yes ; then
4766
4767 cat >conftest.$ac_ext <<CF_EOF
4768 #include <gpm.h>
4769 int main()
4770 {
4771         Gpm_Wgetch();
4772         ${cf_cv_main_return:-return}(0);
4773 }
4774 CF_EOF
4775
4776         cf_save_LIBS="$LIBS"
4777         # This only works if we can look at the symbol table.  If a shared
4778         # library is stripped for install, we cannot use that.  So we're forced
4779         # to rely on the static library, noting that some packagers may not
4780         # include it.
4781         LIBS="-static -lgpm -dynamic $LIBS"
4782         if { (eval echo "$as_me:4782: \"$ac_compile\"") >&5
4783   (eval $ac_compile) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } ; then
4787                 if { (eval echo "$as_me:4787: \"$ac_link\"") >&5
4788   (eval $ac_link) 2>&5
4789   ac_status=$?
4790   echo "$as_me:4790: \$? = $ac_status" >&5
4791   (exit $ac_status); } ; then
4792                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4793                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4794                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4795                 fi
4796         fi
4797         rm -f conftest*
4798         LIBS="$cf_save_LIBS"
4799 fi
4800
4801 fi
4802 echo "$as_me:4802: result: $cf_cv_check_gpm_wgetch" >&5
4803 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4804
4805 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4806         { echo "$as_me:4806: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4807 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4808 fi
4809
4810 fi
4811
4812 fi
4813
4814 # not everyone has "test -c"
4815 if test -c /dev/sysmouse 2>/dev/null ; then
4816 echo "$as_me:4816: checking if you want to use sysmouse" >&5
4817 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4818
4819 # Check whether --with-sysmouse or --without-sysmouse was given.
4820 if test "${with_sysmouse+set}" = set; then
4821   withval="$with_sysmouse"
4822   cf_with_sysmouse=$withval
4823 else
4824   cf_with_sysmouse=maybe
4825 fi;
4826         if test "$cf_with_sysmouse" != no ; then
4827         cat >conftest.$ac_ext <<_ACEOF
4828 #line 4828 "configure"
4829 #include "confdefs.h"
4830
4831 #include <osreldate.h>
4832 #if (__FreeBSD_version >= 400017)
4833 #include <sys/consio.h>
4834 #include <sys/fbio.h>
4835 #else
4836 #include <machine/console.h>
4837 #endif
4838
4839 int
4840 main ()
4841 {
4842
4843         struct mouse_info the_mouse;
4844         ioctl(0, CONS_MOUSECTL, &the_mouse);
4845
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 rm -f conftest.$ac_objext
4851 if { (eval echo "$as_me:4851: \"$ac_compile\"") >&5
4852   (eval $ac_compile) 2>&5
4853   ac_status=$?
4854   echo "$as_me:4854: \$? = $ac_status" >&5
4855   (exit $ac_status); } &&
4856          { ac_try='test -s conftest.$ac_objext'
4857   { (eval echo "$as_me:4857: \"$ac_try\"") >&5
4858   (eval $ac_try) 2>&5
4859   ac_status=$?
4860   echo "$as_me:4860: \$? = $ac_status" >&5
4861   (exit $ac_status); }; }; then
4862   cf_with_sysmouse=yes
4863 else
4864   echo "$as_me: failed program was:" >&5
4865 cat conftest.$ac_ext >&5
4866 cf_with_sysmouse=no
4867 fi
4868 rm -f conftest.$ac_objext conftest.$ac_ext
4869         fi
4870 echo "$as_me:4870: result: $cf_with_sysmouse" >&5
4871 echo "${ECHO_T}$cf_with_sysmouse" >&6
4872 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4873 #define USE_SYSMOUSE 1
4874 EOF
4875
4876 fi
4877
4878 if test X"$CC_G_OPT" = X"" ; then
4879         CC_G_OPT='-g'
4880         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4881 fi
4882
4883 if test X"$CXX_G_OPT" = X"" ; then
4884         CXX_G_OPT='-g'
4885         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4886 fi
4887
4888 echo "$as_me:4888: checking for default loader flags" >&5
4889 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4890 case $DFT_LWR_MODEL in
4891 libtool) LD_MODEL=''   ;;
4892 normal)  LD_MODEL=''   ;;
4893 debug)   LD_MODEL=$CC_G_OPT ;;
4894 profile) LD_MODEL='-pg';;
4895 shared)  LD_MODEL=''   ;;
4896 esac
4897 echo "$as_me:4897: result: $LD_MODEL" >&5
4898 echo "${ECHO_T}$LD_MODEL" >&6
4899
4900 case $DFT_LWR_MODEL in
4901 shared)
4902
4903 echo "$as_me:4903: checking if rpath option should be used" >&5
4904 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4905
4906 # Check whether --enable-rpath or --disable-rpath was given.
4907 if test "${enable_rpath+set}" = set; then
4908   enableval="$enable_rpath"
4909   cf_cv_ld_rpath=$enableval
4910 else
4911   cf_cv_ld_rpath=no
4912 fi;
4913 echo "$as_me:4913: result: $cf_cv_ld_rpath" >&5
4914 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4915
4916 echo "$as_me:4916: checking if shared libraries should be relinked during install" >&5
4917 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4918
4919 # Check whether --enable-relink or --disable-relink was given.
4920 if test "${enable_relink+set}" = set; then
4921   enableval="$enable_relink"
4922   cf_cv_do_relink=$enableval
4923 else
4924   cf_cv_do_relink=yes
4925 fi;
4926 echo "$as_me:4926: result: $cf_cv_do_relink" >&5
4927 echo "${ECHO_T}$cf_cv_do_relink" >&6
4928         ;;
4929 esac
4930
4931         LOCAL_LDFLAGS=
4932         LOCAL_LDFLAGS2=
4933         LD_SHARED_OPTS=
4934         INSTALL_LIB="-m 644"
4935
4936         cf_cv_do_symlinks=no
4937
4938         echo "$as_me:4938: checking if release/abi version should be used for shared libs" >&5
4939 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4940
4941 # Check whether --with-shlib-version or --without-shlib-version was given.
4942 if test "${with_shlib_version+set}" = set; then
4943   withval="$with_shlib_version"
4944   test -z "$withval" && withval=auto
4945         case $withval in #(vi
4946         yes) #(vi
4947                 cf_cv_shlib_version=auto
4948                 ;;
4949         rel|abi|auto|no) #(vi
4950                 cf_cv_shlib_version=$withval
4951                 ;;
4952         *)
4953                 { { echo "$as_me:4953: error: option value must be one of: rel, abi, auto or no" >&5
4954 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4955    { (exit 1); exit 1; }; }
4956                 ;;
4957         esac
4958
4959 else
4960   cf_cv_shlib_version=auto
4961 fi;
4962         echo "$as_me:4962: result: $cf_cv_shlib_version" >&5
4963 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4964
4965         cf_cv_rm_so_locs=no
4966
4967         # Some less-capable ports of gcc support only -fpic
4968         CC_SHARED_OPTS=
4969         if test "$GCC" = yes
4970         then
4971                 echo "$as_me:4971: checking which $CC option to use" >&5
4972 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4973                 cf_save_CFLAGS="$CFLAGS"
4974                 for CC_SHARED_OPTS in -fPIC -fpic ''
4975                 do
4976                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4977                         cat >conftest.$ac_ext <<_ACEOF
4978 #line 4978 "configure"
4979 #include "confdefs.h"
4980 #include <stdio.h>
4981 int
4982 main ()
4983 {
4984 int x = 1
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext
4990 if { (eval echo "$as_me:4990: \"$ac_compile\"") >&5
4991   (eval $ac_compile) 2>&5
4992   ac_status=$?
4993   echo "$as_me:4993: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -s conftest.$ac_objext'
4996   { (eval echo "$as_me:4996: \"$ac_try\"") >&5
4997   (eval $ac_try) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); }; }; then
5001   break
5002 else
5003   echo "$as_me: failed program was:" >&5
5004 cat conftest.$ac_ext >&5
5005 fi
5006 rm -f conftest.$ac_objext conftest.$ac_ext
5007                 done
5008                 echo "$as_me:5008: result: $CC_SHARED_OPTS" >&5
5009 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5010                 CFLAGS="$cf_save_CFLAGS"
5011         fi
5012
5013         cf_cv_shlib_version_infix=no
5014
5015         case $cf_cv_system_name in
5016         aix[56]*)
5017                 if test "$GCC" = yes; then
5018                         CC_SHARED_OPTS=
5019                         MK_SHARED_LIB="$(CC) -shared"
5020                 fi
5021                 ;;
5022         beos*)
5023                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5024                 ;;
5025         cygwin*)
5026                 CC_SHARED_OPTS=
5027                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5028                 cf_cv_shlib_version=cygdll
5029                 cf_cv_shlib_version_infix=cygdll
5030                 cat >mk_shared_lib.sh <<-CF_EOF
5031                 #!/bin/sh
5032                 SHARED_LIB=\$1
5033                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5034                 shift
5035                 cat <<-EOF
5036                 Linking shared library
5037                 ** SHARED_LIB \$SHARED_LIB
5038                 ** IMPORT_LIB \$IMPORT_LIB
5039 EOF
5040                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5041 CF_EOF
5042                 chmod +x mk_shared_lib.sh
5043                 ;;
5044         darwin*)
5045                 EXTRA_CFLAGS="-no-cpp-precomp"
5046                 CC_SHARED_OPTS="-dynamic"
5047                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5048                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5049                 cf_cv_shlib_version_infix=yes
5050                 echo "$as_me:5050: checking if ld -search_paths_first works" >&5
5051 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5052 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5053   echo $ECHO_N "(cached) $ECHO_C" >&6
5054 else
5055
5056                         cf_save_LDFLAGS=$LDFLAGS
5057                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5058                         cat >conftest.$ac_ext <<_ACEOF
5059 #line 5059 "configure"
5060 #include "confdefs.h"
5061
5062 int
5063 main ()
5064 {
5065 int i;
5066   ;
5067   return 0;
5068 }
5069 _ACEOF
5070 rm -f conftest.$ac_objext conftest$ac_exeext
5071 if { (eval echo "$as_me:5071: \"$ac_link\"") >&5
5072   (eval $ac_link) 2>&5
5073   ac_status=$?
5074   echo "$as_me:5074: \$? = $ac_status" >&5
5075   (exit $ac_status); } &&
5076          { ac_try='test -s conftest$ac_exeext'
5077   { (eval echo "$as_me:5077: \"$ac_try\"") >&5
5078   (eval $ac_try) 2>&5
5079   ac_status=$?
5080   echo "$as_me:5080: \$? = $ac_status" >&5
5081   (exit $ac_status); }; }; then
5082   cf_cv_ldflags_search_paths_first=yes
5083 else
5084   echo "$as_me: failed program was:" >&5
5085 cat conftest.$ac_ext >&5
5086 cf_cv_ldflags_search_paths_first=no
5087 fi
5088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5089                                 LDFLAGS=$cf_save_LDFLAGS
5090 fi
5091 echo "$as_me:5091: result: $cf_cv_ldflags_search_paths_first" >&5
5092 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5093                 if test $cf_cv_ldflags_search_paths_first = yes; then
5094                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5095                 fi
5096                 ;;
5097         hpux*)
5098                 # (tested with gcc 2.7.2 -- I don't have c89)
5099                 if test "$GCC" = yes; then
5100                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5101                 else
5102                         CC_SHARED_OPTS='+Z'
5103                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5104                 fi
5105                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5106                 # HP-UX shared libraries must be executable, and should be
5107                 # readonly to exploit a quirk in the memory manager.
5108                 INSTALL_LIB="-m 555"
5109                 ;;
5110         irix*)
5111                 if test "$cf_cv_ld_rpath" = yes ; then
5112                         if test "$GCC" = yes; then
5113                                 cf_ld_rpath_opt="-Wl,-rpath,"
5114                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5115                         else
5116                                 cf_ld_rpath_opt="-rpath "
5117                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5118                         fi
5119                 fi
5120                 # tested with IRIX 5.2 and 'cc'.
5121                 if test "$GCC" != yes; then
5122                         CC_SHARED_OPTS='-KPIC'
5123                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5124                 else
5125                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5126                 fi
5127                 cf_cv_rm_so_locs=yes
5128                 ;;
5129         linux*|gnu*|k*bsd*-gnu)
5130                 if test "$DFT_LWR_MODEL" = "shared" ; then
5131                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5132                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5133                 fi
5134                 if test "$cf_cv_ld_rpath" = yes ; then
5135                         cf_ld_rpath_opt="-Wl,-rpath,"
5136                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5137                 fi
5138
5139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140         if test "$cf_cv_shlib_version" = rel; then
5141                 cf_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} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5147                 ;;
5148         openbsd[2-9].*)
5149                 if test "$DFT_LWR_MODEL" = "shared" ; then
5150                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5151                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5152                 fi
5153                 if test "$cf_cv_ld_rpath" = yes ; then
5154                         cf_ld_rpath_opt="-Wl,-rpath,"
5155                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5156                 fi
5157                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5158
5159         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5160         if test "$cf_cv_shlib_version" = rel; then
5161                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5162         else
5163                 cf_cv_shared_soname='`basename $@`'
5164         fi
5165
5166                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5167                 ;;
5168         nto-qnx*|openbsd*|freebsd[12].*)
5169                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5170                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5171                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5172                 ;;
5173         freebsd*)
5174                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5175                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5176                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5177                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5178                         cf_ld_rpath_opt="-rpath "
5179                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5180                 fi
5181
5182         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5183         if test "$cf_cv_shlib_version" = rel; then
5184                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5185         else
5186                 cf_cv_shared_soname='`basename $@`'
5187         fi
5188
5189                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5190                 ;;
5191         netbsd*)
5192                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5193                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5194                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5195                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5196                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5197                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5198                         if test "$cf_cv_shlib_version" = auto; then
5199                         if test -f /usr/libexec/ld.elf_so; then
5200                                 cf_cv_shlib_version=abi
5201                         else
5202                                 cf_cv_shlib_version=rel
5203                         fi
5204                         fi
5205
5206         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5207         if test "$cf_cv_shlib_version" = rel; then
5208                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5209         else
5210                 cf_cv_shared_soname='`basename $@`'
5211         fi
5212
5213                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5214                 else
5215                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5216                 fi
5217                 ;;
5218         osf*|mls+*)
5219                 # tested with OSF/1 V3.2 and 'cc'
5220                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5221                 # link with shared libs).
5222                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5223                 case $host_os in
5224                 osf4*)
5225                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5226                         ;;
5227                 esac
5228                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5229                 if test "$DFT_LWR_MODEL" = "shared" ; then
5230                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5231                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5232                 fi
5233                 if test "$cf_cv_ld_rpath" = yes ; then
5234                         cf_ld_rpath_opt="-rpath"
5235                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5236                 fi
5237                 cf_cv_rm_so_locs=yes
5238                 ;;
5239         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5240                 # tested with osr5.0.5
5241                 if test "$GCC" != yes; then
5242                         CC_SHARED_OPTS='-belf -KPIC'
5243                 fi
5244                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5245                 if test "$cf_cv_ld_rpath" = yes ; then
5246                         # only way is to set LD_RUN_PATH but no switch for it
5247                         RUN_PATH=$libdir
5248                 fi
5249                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5250                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5251                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5252                 ;;
5253         sunos4*)
5254                 # tested with SunOS 4.1.1 and gcc 2.7.0
5255                 if test "$GCC" != yes; then
5256                         CC_SHARED_OPTS='-KPIC'
5257                 fi
5258                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5259                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5260                 ;;
5261         solaris2*)
5262                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5263                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5264                 if test "$DFT_LWR_MODEL" = "shared" ; then
5265                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5266                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5267                 fi
5268                 if test "$cf_cv_ld_rpath" = yes ; then
5269                         cf_ld_rpath_opt="-R"
5270                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5271                 fi
5272
5273         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5274         if test "$cf_cv_shlib_version" = rel; then
5275                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5276         else
5277                 cf_cv_shared_soname='`basename $@`'
5278         fi
5279
5280                 if test "$GCC" != yes; then
5281                         CC_SHARED_OPTS='-xcode=pic32'
5282                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5283                 else
5284                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5285                 fi
5286                 ;;
5287         sysv5uw7*|unix_sv*)
5288                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5289                 if test "$GCC" != yes; then
5290                         CC_SHARED_OPTS='-KPIC'
5291                 fi
5292                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5293                 ;;
5294         *)
5295                 CC_SHARED_OPTS='unknown'
5296                 MK_SHARED_LIB='echo unknown'
5297                 ;;
5298         esac
5299
5300         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5301         case "$cf_cv_shlib_version" in #(vi
5302         rel|abi)
5303                 case "$MK_SHARED_LIB" in #(vi
5304                 *'-o $@')
5305                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5306                         ;;
5307                 *)
5308                         { echo "$as_me:5308: WARNING: ignored --with-shlib-version" >&5
5309 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5310                         ;;
5311                 esac
5312                 ;;
5313         esac
5314
5315         if test -n "$cf_ld_rpath_opt" ; then
5316                 echo "$as_me:5316: checking if we need a space after rpath option" >&5
5317 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5318                 cf_save_LIBS="$LIBS"
5319                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5320                 cat >conftest.$ac_ext <<_ACEOF
5321 #line 5321 "configure"
5322 #include "confdefs.h"
5323
5324 int
5325 main ()
5326 {
5327
5328   ;
5329   return 0;
5330 }
5331 _ACEOF
5332 rm -f conftest.$ac_objext conftest$ac_exeext
5333 if { (eval echo "$as_me:5333: \"$ac_link\"") >&5
5334   (eval $ac_link) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); } &&
5338          { ac_try='test -s conftest$ac_exeext'
5339   { (eval echo "$as_me:5339: \"$ac_try\"") >&5
5340   (eval $ac_try) 2>&5
5341   ac_status=$?
5342   echo "$as_me:5342: \$? = $ac_status" >&5
5343   (exit $ac_status); }; }; then
5344   cf_rpath_space=no
5345 else
5346   echo "$as_me: failed program was:" >&5
5347 cat conftest.$ac_ext >&5
5348 cf_rpath_space=yes
5349 fi
5350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5351                 LIBS="$cf_save_LIBS"
5352                 echo "$as_me:5352: result: $cf_rpath_space" >&5
5353 echo "${ECHO_T}$cf_rpath_space" >&6
5354                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5355                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5356         fi
5357
5358 if test "$CC_SHARED_OPTS" = "unknown"; then
5359         for model in $cf_list_models; do
5360                 if test "$model" = "shared"; then
5361                         { { echo "$as_me:5361: error: Shared libraries are not supported in this version" >&5
5362 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5363    { (exit 1); exit 1; }; }
5364                 fi
5365         done
5366 fi
5367
5368 ###############################################################################
5369
5370 ###     use option --disable-overwrite to leave out the link to -lcurses
5371 echo "$as_me:5371: checking if you wish to install ncurses overwriting curses" >&5
5372 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5373
5374 # Check whether --enable-overwrite or --disable-overwrite was given.
5375 if test "${enable_overwrite+set}" = set; then
5376   enableval="$enable_overwrite"
5377   with_overwrite=$enableval
5378 else
5379   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5380 fi;
5381 echo "$as_me:5381: result: $with_overwrite" >&5
5382 echo "${ECHO_T}$with_overwrite" >&6
5383
5384 echo "$as_me:5384: checking if external terminfo-database is used" >&5
5385 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5386
5387 # Check whether --enable-database or --disable-database was given.
5388 if test "${enable_database+set}" = set; then
5389   enableval="$enable_database"
5390   use_database=$enableval
5391 else
5392   use_database=yes
5393 fi;
5394 echo "$as_me:5394: result: $use_database" >&5
5395 echo "${ECHO_T}$use_database" >&6
5396
5397 case $host_os in #(vi
5398 os2*) #(vi
5399         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5400         ;;
5401 *) #(vi
5402         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5403         ;;
5404 esac
5405
5406         case $cf_cv_system_name in
5407         os2*)   PATHSEP=';'  ;;
5408         *)      PATHSEP=':'  ;;
5409         esac
5410
5411 if test "$use_database" != no ; then
5412         cat >>confdefs.h <<\EOF
5413 #define USE_DATABASE 1
5414 EOF
5415
5416         echo "$as_me:5416: checking which terminfo source-file will be installed" >&5
5417 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5418
5419 # Check whether --enable-database or --disable-database was given.
5420 if test "${enable_database+set}" = set; then
5421   enableval="$enable_database"
5422   TERMINFO_SRC=$withval
5423 fi;
5424         echo "$as_me:5424: result: $TERMINFO_SRC" >&5
5425 echo "${ECHO_T}$TERMINFO_SRC" >&6
5426
5427         echo "$as_me:5427: checking whether to use hashed database instead of directory/tree" >&5
5428 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5429
5430 # Check whether --with-hashed-db or --without-hashed-db was given.
5431 if test "${with_hashed_db+set}" = set; then
5432   withval="$with_hashed_db"
5433
5434 else
5435   with_hashed_db=no
5436 fi;
5437         echo "$as_me:5437: result: $with_hashed_db" >&5
5438 echo "${ECHO_T}$with_hashed_db" >&6
5439 else
5440         with_hashed_db=no
5441 fi
5442
5443 echo "$as_me:5443: checking for list of fallback descriptions" >&5
5444 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5445
5446 # Check whether --with-fallbacks or --without-fallbacks was given.
5447 if test "${with_fallbacks+set}" = set; then
5448   withval="$with_fallbacks"
5449   with_fallback=$withval
5450 else
5451   with_fallback=
5452 fi;
5453 echo "$as_me:5453: result: $with_fallback" >&5
5454 echo "${ECHO_T}$with_fallback" >&6
5455 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5456
5457 echo "$as_me:5457: checking if you want modern xterm or antique" >&5
5458 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5459
5460 # Check whether --with-xterm-new or --without-xterm-new was given.
5461 if test "${with_xterm_new+set}" = set; then
5462   withval="$with_xterm_new"
5463   with_xterm_new=$withval
5464 else
5465   with_xterm_new=yes
5466 fi;
5467 case $with_xterm_new in
5468 no)     with_xterm_new=xterm-old;;
5469 *)      with_xterm_new=xterm-new;;
5470 esac
5471 echo "$as_me:5471: result: $with_xterm_new" >&5
5472 echo "${ECHO_T}$with_xterm_new" >&6
5473 WHICH_XTERM=$with_xterm_new
5474
5475 MAKE_TERMINFO=
5476 if test "$use_database" = no ; then
5477         TERMINFO="${datadir}/terminfo"
5478         MAKE_TERMINFO="#"
5479 else
5480
5481 echo "$as_me:5481: checking for list of terminfo directories" >&5
5482 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5483
5484 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5485 if test "${with_terminfo_dirs+set}" = set; then
5486   withval="$with_terminfo_dirs"
5487
5488 else
5489   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5490 fi;
5491 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5492 cf_dst_path=
5493 for cf_src_path in $withval
5494 do
5495
5496 if test "x$prefix" != xNONE; then
5497   cf_path_syntax="$prefix"
5498 else
5499   cf_path_syntax="$ac_default_prefix"
5500 fi
5501
5502 case ".$cf_src_path" in #(vi
5503 .\$\(*\)*|.\'*\'*) #(vi
5504   ;;
5505 ..|./*|.\\*) #(vi
5506   ;;
5507 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5508   ;;
5509 .\${*prefix}*) #(vi
5510   eval cf_src_path="$cf_src_path"
5511   case ".$cf_src_path" in #(vi
5512   .NONE/*)
5513     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5514     ;;
5515   esac
5516   ;; #(vi
5517 .no|.NONE/*)
5518   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5519   ;;
5520 *)
5521   { { echo "$as_me:5521: error: expected a pathname, not \"$cf_src_path\"" >&5
5522 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5523    { (exit 1); exit 1; }; }
5524   ;;
5525 esac
5526
5527   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5528   cf_dst_path="${cf_dst_path}${cf_src_path}"
5529 done
5530 IFS="$ac_save_ifs"
5531
5532 eval 'TERMINFO_DIRS="$cf_dst_path"'
5533
5534 echo "$as_me:5534: result: $TERMINFO_DIRS" >&5
5535 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5536 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5537 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5538 EOF
5539
5540 echo "$as_me:5540: checking for default terminfo directory" >&5
5541 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5542
5543 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5544 if test "${with_default_terminfo_dir+set}" = set; then
5545   withval="$with_default_terminfo_dir"
5546
5547 else
5548   withval="${TERMINFO-${datadir}/terminfo}"
5549 fi; if test -n "${datadir}/terminfo" ; then
5550
5551 if test "x$prefix" != xNONE; then
5552   cf_path_syntax="$prefix"
5553 else
5554   cf_path_syntax="$ac_default_prefix"
5555 fi
5556
5557 case ".$withval" in #(vi
5558 .\$\(*\)*|.\'*\'*) #(vi
5559   ;;
5560 ..|./*|.\\*) #(vi
5561   ;;
5562 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5563   ;;
5564 .\${*prefix}*) #(vi
5565   eval withval="$withval"
5566   case ".$withval" in #(vi
5567   .NONE/*)
5568     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5569     ;;
5570   esac
5571   ;; #(vi
5572 .no|.NONE/*)
5573   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5574   ;;
5575 *)
5576   { { echo "$as_me:5576: error: expected a pathname, not \"$withval\"" >&5
5577 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5578    { (exit 1); exit 1; }; }
5579   ;;
5580 esac
5581
5582 fi
5583 TERMINFO="$withval"
5584
5585 echo "$as_me:5585: result: $TERMINFO" >&5
5586 echo "${ECHO_T}$TERMINFO" >&6
5587 cat >>confdefs.h <<EOF
5588 #define TERMINFO "$TERMINFO"
5589 EOF
5590
5591 fi
5592
5593 ###     use option --disable-big-core to make tic run on small machines
5594 ###     We need 4Mb, check if we can allocate 50% more than that.
5595 echo "$as_me:5595: checking if big-core option selected" >&5
5596 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5597
5598 # Check whether --enable-big-core or --disable-big-core was given.
5599 if test "${enable_big_core+set}" = set; then
5600   enableval="$enable_big_core"
5601   with_big_core=$enableval
5602 else
5603   if test "$cross_compiling" = yes; then
5604   with_big_core=no
5605 else
5606   cat >conftest.$ac_ext <<_ACEOF
5607 #line 5607 "configure"
5608 #include "confdefs.h"
5609
5610 #include <stdlib.h>
5611 #include <string.h>
5612 int main() {
5613         unsigned long n = 6000000L;
5614         char *s = malloc(n);
5615         if (s != 0)
5616                 s[0] = s[n-1] = 0;
5617         ${cf_cv_main_return:-return}(s == 0);
5618 }
5619 _ACEOF
5620 rm -f conftest$ac_exeext
5621 if { (eval echo "$as_me:5621: \"$ac_link\"") >&5
5622   (eval $ac_link) 2>&5
5623   ac_status=$?
5624   echo "$as_me:5624: \$? = $ac_status" >&5
5625   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5626   { (eval echo "$as_me:5626: \"$ac_try\"") >&5
5627   (eval $ac_try) 2>&5
5628   ac_status=$?
5629   echo "$as_me:5629: \$? = $ac_status" >&5
5630   (exit $ac_status); }; }; then
5631   with_big_core=yes
5632 else
5633   echo "$as_me: program exited with status $ac_status" >&5
5634 echo "$as_me: failed program was:" >&5
5635 cat conftest.$ac_ext >&5
5636 with_big_core=no
5637 fi
5638 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5639 fi
5640 fi;
5641 echo "$as_me:5641: result: $with_big_core" >&5
5642 echo "${ECHO_T}$with_big_core" >&6
5643 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5644 #define HAVE_BIG_CORE 1
5645 EOF
5646
5647 ### ISO C only guarantees 512-char strings, we have tables which load faster
5648 ### when constructed using "big" strings.  More than the C compiler, the awk
5649 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5650 echo "$as_me:5650: checking if big-strings option selected" >&5
5651 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5652
5653 # Check whether --enable-big-strings or --disable-big-strings was given.
5654 if test "${enable_big_strings+set}" = set; then
5655   enableval="$enable_big_strings"
5656   with_big_strings=$enableval
5657 else
5658
5659         case x$AWK in #(vi
5660         x)
5661                 eval with_big_strings=no
5662                 ;;
5663         *) #(vi
5664                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5665                         | $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
5666                         eval with_big_strings=yes
5667                 else
5668                         eval with_big_strings=no
5669                 fi
5670                 ;;
5671         esac
5672
5673 fi;
5674 echo "$as_me:5674: result: $with_big_strings" >&5
5675 echo "${ECHO_T}$with_big_strings" >&6
5676
5677 USE_BIG_STRINGS=0
5678 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5679
5680 ###     use option --enable-termcap to compile in the termcap fallback support
5681 echo "$as_me:5681: checking if you want termcap-fallback support" >&5
5682 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5683
5684 # Check whether --enable-termcap or --disable-termcap was given.
5685 if test "${enable_termcap+set}" = set; then
5686   enableval="$enable_termcap"
5687   with_termcap=$enableval
5688 else
5689   with_termcap=no
5690 fi;
5691 echo "$as_me:5691: result: $with_termcap" >&5
5692 echo "${ECHO_T}$with_termcap" >&6
5693
5694 if test "$with_termcap" != "yes" ; then
5695         if test "$use_database" = no ; then
5696                 if test -z "$with_fallback" ; then
5697                         { { echo "$as_me:5697: error: You have disabled the database w/o specifying fallbacks" >&5
5698 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5699    { (exit 1); exit 1; }; }
5700                 fi
5701         fi
5702         cat >>confdefs.h <<\EOF
5703 #define PURE_TERMINFO 1
5704 EOF
5705
5706 else
5707
5708 if test "$with_ticlib" != no ; then
5709         { { echo "$as_me:5709: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5710 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5711    { (exit 1); exit 1; }; }
5712 fi
5713
5714 cat >>confdefs.h <<\EOF
5715 #define USE_TERMCAP 1
5716 EOF
5717
5718 echo "$as_me:5718: checking for list of termcap files" >&5
5719 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5720
5721 # Check whether --with-termpath or --without-termpath was given.
5722 if test "${with_termpath+set}" = set; then
5723   withval="$with_termpath"
5724
5725 else
5726   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5727 fi;
5728 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5729 cf_dst_path=
5730 for cf_src_path in $withval
5731 do
5732
5733 if test "x$prefix" != xNONE; then
5734   cf_path_syntax="$prefix"
5735 else
5736   cf_path_syntax="$ac_default_prefix"
5737 fi
5738
5739 case ".$cf_src_path" in #(vi
5740 .\$\(*\)*|.\'*\'*) #(vi
5741   ;;
5742 ..|./*|.\\*) #(vi
5743   ;;
5744 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5745   ;;
5746 .\${*prefix}*) #(vi
5747   eval cf_src_path="$cf_src_path"
5748   case ".$cf_src_path" in #(vi
5749   .NONE/*)
5750     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5751     ;;
5752   esac
5753   ;; #(vi
5754 .no|.NONE/*)
5755   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5756   ;;
5757 *)
5758   { { echo "$as_me:5758: error: expected a pathname, not \"$cf_src_path\"" >&5
5759 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5760    { (exit 1); exit 1; }; }
5761   ;;
5762 esac
5763
5764   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5765   cf_dst_path="${cf_dst_path}${cf_src_path}"
5766 done
5767 IFS="$ac_save_ifs"
5768
5769 eval 'TERMPATH="$cf_dst_path"'
5770
5771 echo "$as_me:5771: result: $TERMPATH" >&5
5772 echo "${ECHO_T}$TERMPATH" >&6
5773 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5774 #define TERMPATH "$TERMPATH"
5775 EOF
5776
5777 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5778 echo "$as_me:5778: checking if fast termcap-loader is needed" >&5
5779 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5780
5781 # Check whether --enable-getcap or --disable-getcap was given.
5782 if test "${enable_getcap+set}" = set; then
5783   enableval="$enable_getcap"
5784   with_getcap=$enableval
5785 else
5786   with_getcap=no
5787 fi;
5788 echo "$as_me:5788: result: $with_getcap" >&5
5789 echo "${ECHO_T}$with_getcap" >&6
5790 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5791 #define USE_GETCAP 1
5792 EOF
5793
5794 echo "$as_me:5794: checking if translated termcaps will be cached in ~/.terminfo" >&5
5795 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5796
5797 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5798 if test "${enable_getcap_cache+set}" = set; then
5799   enableval="$enable_getcap_cache"
5800   with_getcap_cache=$enableval
5801 else
5802   with_getcap_cache=no
5803 fi;
5804 echo "$as_me:5804: result: $with_getcap_cache" >&5
5805 echo "${ECHO_T}$with_getcap_cache" >&6
5806 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5807 #define USE_GETCAP_CACHE 1
5808 EOF
5809
5810 fi
5811
5812 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5813 echo "$as_me:5813: checking if ~/.terminfo is wanted" >&5
5814 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5815
5816 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5817 if test "${enable_home_terminfo+set}" = set; then
5818   enableval="$enable_home_terminfo"
5819   with_home_terminfo=$enableval
5820 else
5821   with_home_terminfo=yes
5822 fi;
5823 echo "$as_me:5823: result: $with_home_terminfo" >&5
5824 echo "${ECHO_T}$with_home_terminfo" >&6
5825 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5826 #define USE_HOME_TERMINFO 1
5827 EOF
5828
5829 echo "$as_me:5829: checking if you want to use restricted environment when running as root" >&5
5830 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5831
5832 # Check whether --enable-root-environ or --disable-root-environ was given.
5833 if test "${enable_root_environ+set}" = set; then
5834   enableval="$enable_root_environ"
5835   with_root_environ=$enableval
5836 else
5837   with_root_environ=yes
5838 fi;
5839 echo "$as_me:5839: result: $with_root_environ" >&5
5840 echo "${ECHO_T}$with_root_environ" >&6
5841 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5842 #define USE_ROOT_ENVIRON 1
5843 EOF
5844
5845 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5846 ###   to reduce storage requirements for the terminfo database.
5847
5848 for ac_func in \
5849         remove \
5850         unlink
5851 do
5852 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5853 echo "$as_me:5853: checking for $ac_func" >&5
5854 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5855 if eval "test \"\${$as_ac_var+set}\" = set"; then
5856   echo $ECHO_N "(cached) $ECHO_C" >&6
5857 else
5858   cat >conftest.$ac_ext <<_ACEOF
5859 #line 5859 "configure"
5860 #include "confdefs.h"
5861 /* System header to define __stub macros and hopefully few prototypes,
5862     which can conflict with char $ac_func (); below.  */
5863 #include <assert.h>
5864 /* Override any gcc2 internal prototype to avoid an error.  */
5865 #ifdef __cplusplus
5866 extern "C"
5867 #endif
5868 /* We use char because int might match the return type of a gcc2
5869    builtin and then its argument prototype would still apply.  */
5870 char $ac_func ();
5871 char (*f) ();
5872
5873 int
5874 main ()
5875 {
5876 /* The GNU C library defines this for functions which it implements
5877     to always fail with ENOSYS.  Some functions are actually named
5878     something starting with __ and the normal name is an alias.  */
5879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5880 choke me
5881 #else
5882 f = $ac_func;
5883 #endif
5884
5885   ;
5886   return 0;
5887 }
5888 _ACEOF
5889 rm -f conftest.$ac_objext conftest$ac_exeext
5890 if { (eval echo "$as_me:5890: \"$ac_link\"") >&5
5891   (eval $ac_link) 2>&5
5892   ac_status=$?
5893   echo "$as_me:5893: \$? = $ac_status" >&5
5894   (exit $ac_status); } &&
5895          { ac_try='test -s conftest$ac_exeext'
5896   { (eval echo "$as_me:5896: \"$ac_try\"") >&5
5897   (eval $ac_try) 2>&5
5898   ac_status=$?
5899   echo "$as_me:5899: \$? = $ac_status" >&5
5900   (exit $ac_status); }; }; then
5901   eval "$as_ac_var=yes"
5902 else
5903   echo "$as_me: failed program was:" >&5
5904 cat conftest.$ac_ext >&5
5905 eval "$as_ac_var=no"
5906 fi
5907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5908 fi
5909 echo "$as_me:5909: result: `eval echo '${'$as_ac_var'}'`" >&5
5910 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5911 if test `eval echo '${'$as_ac_var'}'` = yes; then
5912   cat >>confdefs.h <<EOF
5913 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5914 EOF
5915
5916 fi
5917 done
5918
5919 if test "$cross_compiling" = yes ; then
5920
5921 for ac_func in \
5922                 link \
5923                 symlink
5924 do
5925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5926 echo "$as_me:5926: checking for $ac_func" >&5
5927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5928 if eval "test \"\${$as_ac_var+set}\" = set"; then
5929   echo $ECHO_N "(cached) $ECHO_C" >&6
5930 else
5931   cat >conftest.$ac_ext <<_ACEOF
5932 #line 5932 "configure"
5933 #include "confdefs.h"
5934 /* System header to define __stub macros and hopefully few prototypes,
5935     which can conflict with char $ac_func (); below.  */
5936 #include <assert.h>
5937 /* Override any gcc2 internal prototype to avoid an error.  */
5938 #ifdef __cplusplus
5939 extern "C"
5940 #endif
5941 /* We use char because int might match the return type of a gcc2
5942    builtin and then its argument prototype would still apply.  */
5943 char $ac_func ();
5944 char (*f) ();
5945
5946 int
5947 main ()
5948 {
5949 /* The GNU C library defines this for functions which it implements
5950     to always fail with ENOSYS.  Some functions are actually named
5951     something starting with __ and the normal name is an alias.  */
5952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5953 choke me
5954 #else
5955 f = $ac_func;
5956 #endif
5957
5958   ;
5959   return 0;
5960 }
5961 _ACEOF
5962 rm -f conftest.$ac_objext conftest$ac_exeext
5963 if { (eval echo "$as_me:5963: \"$ac_link\"") >&5
5964   (eval $ac_link) 2>&5
5965   ac_status=$?
5966   echo "$as_me:5966: \$? = $ac_status" >&5
5967   (exit $ac_status); } &&
5968          { ac_try='test -s conftest$ac_exeext'
5969   { (eval echo "$as_me:5969: \"$ac_try\"") >&5
5970   (eval $ac_try) 2>&5
5971   ac_status=$?
5972   echo "$as_me:5972: \$? = $ac_status" >&5
5973   (exit $ac_status); }; }; then
5974   eval "$as_ac_var=yes"
5975 else
5976   echo "$as_me: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5978 eval "$as_ac_var=no"
5979 fi
5980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5981 fi
5982 echo "$as_me:5982: result: `eval echo '${'$as_ac_var'}'`" >&5
5983 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5984 if test `eval echo '${'$as_ac_var'}'` = yes; then
5985   cat >>confdefs.h <<EOF
5986 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5987 EOF
5988
5989 fi
5990 done
5991
5992 else
5993         echo "$as_me:5993: checking if link/symlink functions work" >&5
5994 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5995 if test "${cf_cv_link_funcs+set}" = set; then
5996   echo $ECHO_N "(cached) $ECHO_C" >&6
5997 else
5998
5999                 cf_cv_link_funcs=
6000                 for cf_func in link symlink ; do
6001                         if test "$cross_compiling" = yes; then
6002
6003                         eval 'ac_cv_func_'$cf_func'=error'
6004 else
6005   cat >conftest.$ac_ext <<_ACEOF
6006 #line 6006 "configure"
6007 #include "confdefs.h"
6008
6009 #include <sys/types.h>
6010 #include <sys/stat.h>
6011 #ifdef HAVE_UNISTD_H
6012 #include <unistd.h>
6013 #endif
6014 int main()
6015 {
6016         int fail = 0;
6017         char *src = "config.log";
6018         char *dst = "conftest.chk";
6019         struct stat src_sb;
6020         struct stat dst_sb;
6021
6022         stat(src, &src_sb);
6023         fail = ($cf_func("config.log", "conftest.chk") < 0)
6024             || (stat(dst, &dst_sb) < 0)
6025             || (dst_sb.st_mtime != src_sb.st_mtime);
6026 #ifdef HAVE_UNLINK
6027         unlink(dst);
6028 #else
6029         remove(dst);
6030 #endif
6031         ${cf_cv_main_return:-return} (fail);
6032 }
6033
6034 _ACEOF
6035 rm -f conftest$ac_exeext
6036 if { (eval echo "$as_me:6036: \"$ac_link\"") >&5
6037   (eval $ac_link) 2>&5
6038   ac_status=$?
6039   echo "$as_me:6039: \$? = $ac_status" >&5
6040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6041   { (eval echo "$as_me:6041: \"$ac_try\"") >&5
6042   (eval $ac_try) 2>&5
6043   ac_status=$?
6044   echo "$as_me:6044: \$? = $ac_status" >&5
6045   (exit $ac_status); }; }; then
6046
6047                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6048                         eval 'ac_cv_func_'$cf_func'=yes'
6049 else
6050   echo "$as_me: program exited with status $ac_status" >&5
6051 echo "$as_me: failed program was:" >&5
6052 cat conftest.$ac_ext >&5
6053
6054                         eval 'ac_cv_func_'$cf_func'=no'
6055 fi
6056 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6057 fi
6058                 done
6059                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6060
6061 fi
6062 echo "$as_me:6062: result: $cf_cv_link_funcs" >&5
6063 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6064         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6065 #define HAVE_LINK 1
6066 EOF
6067
6068         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6069 #define HAVE_SYMLINK 1
6070 EOF
6071
6072 fi
6073
6074 with_links=no
6075 with_symlinks=no
6076
6077 # soft links (symbolic links) are useful for some systems where hard links do
6078 # not work, or to make it simpler to copy terminfo trees around.
6079 if test "$ac_cv_func_symlink" = yes ; then
6080     echo "$as_me:6080: checking if tic should use symbolic links" >&5
6081 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6082
6083 # Check whether --enable-symlinks or --disable-symlinks was given.
6084 if test "${enable_symlinks+set}" = set; then
6085   enableval="$enable_symlinks"
6086   with_symlinks=$enableval
6087 else
6088   with_symlinks=no
6089 fi;
6090     echo "$as_me:6090: result: $with_symlinks" >&5
6091 echo "${ECHO_T}$with_symlinks" >&6
6092 fi
6093
6094 # If we have hard links and did not choose to use soft links instead, there is
6095 # no reason to make this choice optional - use the hard links.
6096 if test "$with_symlinks" = no ; then
6097     echo "$as_me:6097: checking if tic should use hard links" >&5
6098 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6099     if test "$ac_cv_func_link" = yes ; then
6100         with_links=yes
6101     else
6102         with_links=no
6103     fi
6104     echo "$as_me:6104: result: $with_links" >&5
6105 echo "${ECHO_T}$with_links" >&6
6106 fi
6107
6108 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6109 #define USE_LINKS 1
6110 EOF
6111
6112 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6113 #define USE_SYMLINKS 1
6114 EOF
6115
6116 ###   use option --enable-broken-linker to force on use of broken-linker support
6117 echo "$as_me:6117: checking if you want broken-linker support code" >&5
6118 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6119
6120 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6121 if test "${enable_broken_linker+set}" = set; then
6122   enableval="$enable_broken_linker"
6123   with_broken_linker=$enableval
6124 else
6125   with_broken_linker=${BROKEN_LINKER-no}
6126 fi;
6127 echo "$as_me:6127: result: $with_broken_linker" >&5
6128 echo "${ECHO_T}$with_broken_linker" >&6
6129
6130 BROKEN_LINKER=0
6131 if test "$with_broken_linker" = yes ; then
6132         cat >>confdefs.h <<\EOF
6133 #define BROKEN_LINKER 1
6134 EOF
6135
6136         BROKEN_LINKER=1
6137 elif test "$DFT_LWR_MODEL" = shared ; then
6138         case $cf_cv_system_name in #(vi
6139         cygwin*)
6140                 cat >>confdefs.h <<\EOF
6141 #define BROKEN_LINKER 1
6142 EOF
6143
6144                 BROKEN_LINKER=1
6145                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6146
6147 echo "${as_me-configure}:6147: testing cygwin linker is broken anyway ..." 1>&5
6148
6149                 ;;
6150         esac
6151 fi
6152
6153 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6154 echo "$as_me:6154: checking if tputs should process BSD-style prefix padding" >&5
6155 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6156
6157 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6158 if test "${enable_bsdpad+set}" = set; then
6159   enableval="$enable_bsdpad"
6160   with_bsdpad=$enableval
6161 else
6162   with_bsdpad=no
6163 fi;
6164 echo "$as_me:6164: result: $with_bsdpad" >&5
6165 echo "${ECHO_T}$with_bsdpad" >&6
6166 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6167 #define BSD_TPUTS 1
6168 EOF
6169
6170 ###   use option --enable-widec to turn on use of wide-character support
6171 NCURSES_CH_T=chtype
6172 NCURSES_LIBUTF8=0
6173
6174 NEED_WCHAR_H=0
6175 NCURSES_MBSTATE_T=0
6176 NCURSES_WCHAR_T=0
6177 NCURSES_WINT_T=0
6178
6179 # Check to define _XOPEN_SOURCE "automatically"
6180
6181 echo "$as_me:6181: checking if $CC -U and -D options work together" >&5
6182 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6183 if test "${cf_cv_cc_u_d_options+set}" = set; then
6184   echo $ECHO_N "(cached) $ECHO_C" >&6
6185 else
6186
6187         cf_save_CPPFLAGS="$CPPFLAGS"
6188         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6189         cat >conftest.$ac_ext <<_ACEOF
6190 #line 6190 "configure"
6191 #include "confdefs.h"
6192
6193 int
6194 main ()
6195 {
6196
6197 #ifndef U_D_OPTIONS
6198 make an undefined-error
6199 #endif
6200 #ifdef  D_U_OPTIONS
6201 make a defined-error
6202 #endif
6203
6204   ;
6205   return 0;
6206 }
6207 _ACEOF
6208 rm -f conftest.$ac_objext
6209 if { (eval echo "$as_me:6209: \"$ac_compile\"") >&5
6210   (eval $ac_compile) 2>&5
6211   ac_status=$?
6212   echo "$as_me:6212: \$? = $ac_status" >&5
6213   (exit $ac_status); } &&
6214          { ac_try='test -s conftest.$ac_objext'
6215   { (eval echo "$as_me:6215: \"$ac_try\"") >&5
6216   (eval $ac_try) 2>&5
6217   ac_status=$?
6218   echo "$as_me:6218: \$? = $ac_status" >&5
6219   (exit $ac_status); }; }; then
6220
6221         cf_cv_cc_u_d_options=yes
6222 else
6223   echo "$as_me: failed program was:" >&5
6224 cat conftest.$ac_ext >&5
6225
6226         cf_cv_cc_u_d_options=no
6227 fi
6228 rm -f conftest.$ac_objext conftest.$ac_ext
6229         CPPFLAGS="$cf_save_CPPFLAGS"
6230
6231 fi
6232 echo "$as_me:6232: result: $cf_cv_cc_u_d_options" >&5
6233 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6234
6235 cf_XOPEN_SOURCE=500
6236 cf_POSIX_C_SOURCE=199506L
6237
6238 case $host_os in #(vi
6239 aix[456]*) #(vi
6240         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6241         ;;
6242 freebsd*|dragonfly*) #(vi
6243         # 5.x headers associate
6244         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6245         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6246         cf_POSIX_C_SOURCE=200112L
6247         cf_XOPEN_SOURCE=600
6248         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6249         ;;
6250 hpux*) #(vi
6251         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6252         ;;
6253 irix[56].*) #(vi
6254         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6255         ;;
6256 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6257
6258 echo "$as_me:6258: checking if we must define _GNU_SOURCE" >&5
6259 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6260 if test "${cf_cv_gnu_source+set}" = set; then
6261   echo $ECHO_N "(cached) $ECHO_C" >&6
6262 else
6263
6264 cat >conftest.$ac_ext <<_ACEOF
6265 #line 6265 "configure"
6266 #include "confdefs.h"
6267 #include <sys/types.h>
6268 int
6269 main ()
6270 {
6271
6272 #ifndef _XOPEN_SOURCE
6273 make an error
6274 #endif
6275   ;
6276   return 0;
6277 }
6278 _ACEOF
6279 rm -f conftest.$ac_objext
6280 if { (eval echo "$as_me:6280: \"$ac_compile\"") >&5
6281   (eval $ac_compile) 2>&5
6282   ac_status=$?
6283   echo "$as_me:6283: \$? = $ac_status" >&5
6284   (exit $ac_status); } &&
6285          { ac_try='test -s conftest.$ac_objext'
6286   { (eval echo "$as_me:6286: \"$ac_try\"") >&5
6287   (eval $ac_try) 2>&5
6288   ac_status=$?
6289   echo "$as_me:6289: \$? = $ac_status" >&5
6290   (exit $ac_status); }; }; then
6291   cf_cv_gnu_source=no
6292 else
6293   echo "$as_me: failed program was:" >&5
6294 cat conftest.$ac_ext >&5
6295 cf_save="$CPPFLAGS"
6296          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6297          cat >conftest.$ac_ext <<_ACEOF
6298 #line 6298 "configure"
6299 #include "confdefs.h"
6300 #include <sys/types.h>
6301 int
6302 main ()
6303 {
6304
6305 #ifdef _XOPEN_SOURCE
6306 make an error
6307 #endif
6308   ;
6309   return 0;
6310 }
6311 _ACEOF
6312 rm -f conftest.$ac_objext
6313 if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5
6314   (eval $ac_compile) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); } &&
6318          { ac_try='test -s conftest.$ac_objext'
6319   { (eval echo "$as_me:6319: \"$ac_try\"") >&5
6320   (eval $ac_try) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit $ac_status); }; }; then
6324   cf_cv_gnu_source=no
6325 else
6326   echo "$as_me: failed program was:" >&5
6327 cat conftest.$ac_ext >&5
6328 cf_cv_gnu_source=yes
6329 fi
6330 rm -f conftest.$ac_objext conftest.$ac_ext
6331         CPPFLAGS="$cf_save"
6332
6333 fi
6334 rm -f conftest.$ac_objext conftest.$ac_ext
6335
6336 fi
6337 echo "$as_me:6337: result: $cf_cv_gnu_source" >&5
6338 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6339 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6340
6341         ;;
6342 mirbsd*) #(vi
6343         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6344         ;;
6345 netbsd*) #(vi
6346         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6347         ;;
6348 openbsd*) #(vi
6349         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6350         ;;
6351 osf[45]*) #(vi
6352         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6353         ;;
6354 nto-qnx*) #(vi
6355         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6356         ;;
6357 sco*) #(vi
6358         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6359         ;;
6360 solaris*) #(vi
6361         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6362         ;;
6363 *)
6364         echo "$as_me:6364: checking if we should define _XOPEN_SOURCE" >&5
6365 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6366 if test "${cf_cv_xopen_source+set}" = set; then
6367   echo $ECHO_N "(cached) $ECHO_C" >&6
6368 else
6369
6370         cat >conftest.$ac_ext <<_ACEOF
6371 #line 6371 "configure"
6372 #include "confdefs.h"
6373 #include <sys/types.h>
6374 int
6375 main ()
6376 {
6377
6378 #ifndef _XOPEN_SOURCE
6379 make an error
6380 #endif
6381   ;
6382   return 0;
6383 }
6384 _ACEOF
6385 rm -f conftest.$ac_objext
6386 if { (eval echo "$as_me:6386: \"$ac_compile\"") >&5
6387   (eval $ac_compile) 2>&5
6388   ac_status=$?
6389   echo "$as_me:6389: \$? = $ac_status" >&5
6390   (exit $ac_status); } &&
6391          { ac_try='test -s conftest.$ac_objext'
6392   { (eval echo "$as_me:6392: \"$ac_try\"") >&5
6393   (eval $ac_try) 2>&5
6394   ac_status=$?
6395   echo "$as_me:6395: \$? = $ac_status" >&5
6396   (exit $ac_status); }; }; then
6397   cf_cv_xopen_source=no
6398 else
6399   echo "$as_me: failed program was:" >&5
6400 cat conftest.$ac_ext >&5
6401 cf_save="$CPPFLAGS"
6402          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6403          cat >conftest.$ac_ext <<_ACEOF
6404 #line 6404 "configure"
6405 #include "confdefs.h"
6406 #include <sys/types.h>
6407 int
6408 main ()
6409 {
6410
6411 #ifdef _XOPEN_SOURCE
6412 make an error
6413 #endif
6414   ;
6415   return 0;
6416 }
6417 _ACEOF
6418 rm -f conftest.$ac_objext
6419 if { (eval echo "$as_me:6419: \"$ac_compile\"") >&5
6420   (eval $ac_compile) 2>&5
6421   ac_status=$?
6422   echo "$as_me:6422: \$? = $ac_status" >&5
6423   (exit $ac_status); } &&
6424          { ac_try='test -s conftest.$ac_objext'
6425   { (eval echo "$as_me:6425: \"$ac_try\"") >&5
6426   (eval $ac_try) 2>&5
6427   ac_status=$?
6428   echo "$as_me:6428: \$? = $ac_status" >&5
6429   (exit $ac_status); }; }; then
6430   cf_cv_xopen_source=no
6431 else
6432   echo "$as_me: failed program was:" >&5
6433 cat conftest.$ac_ext >&5
6434 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6435 fi
6436 rm -f conftest.$ac_objext conftest.$ac_ext
6437         CPPFLAGS="$cf_save"
6438
6439 fi
6440 rm -f conftest.$ac_objext conftest.$ac_ext
6441
6442 fi
6443 echo "$as_me:6443: result: $cf_cv_xopen_source" >&5
6444 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6445         if test "$cf_cv_xopen_source" != no ; then
6446
6447 # remove _XOPEN_SOURCE symbol from $CFLAGS
6448 CFLAGS=`echo "$CFLAGS" | \
6449         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6450                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6451
6452 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6453 CPPFLAGS=`echo "$CPPFLAGS" | \
6454         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6455                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6456
6457                 test "$cf_cv_cc_u_d_options" = yes && \
6458                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6459                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6460         fi
6461
6462 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6463
6464 cf_save_CFLAGS="$CFLAGS"
6465 cf_save_CPPFLAGS="$CPPFLAGS"
6466
6467 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6468 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6469         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6470                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6471
6472 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6473 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6474         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6475                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6476
6477 echo "$as_me:6477: checking if we should define _POSIX_C_SOURCE" >&5
6478 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6479 if test "${cf_cv_posix_c_source+set}" = set; then
6480   echo $ECHO_N "(cached) $ECHO_C" >&6
6481 else
6482
6483 echo "${as_me-configure}:6483: testing if the symbol is already defined go no further ..." 1>&5
6484
6485         cat >conftest.$ac_ext <<_ACEOF
6486 #line 6486 "configure"
6487 #include "confdefs.h"
6488 #include <sys/types.h>
6489 int
6490 main ()
6491 {
6492
6493 #ifndef _POSIX_C_SOURCE
6494 make an error
6495 #endif
6496   ;
6497   return 0;
6498 }
6499 _ACEOF
6500 rm -f conftest.$ac_objext
6501 if { (eval echo "$as_me:6501: \"$ac_compile\"") >&5
6502   (eval $ac_compile) 2>&5
6503   ac_status=$?
6504   echo "$as_me:6504: \$? = $ac_status" >&5
6505   (exit $ac_status); } &&
6506          { ac_try='test -s conftest.$ac_objext'
6507   { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6508   (eval $ac_try) 2>&5
6509   ac_status=$?
6510   echo "$as_me:6510: \$? = $ac_status" >&5
6511   (exit $ac_status); }; }; then
6512   cf_cv_posix_c_source=no
6513 else
6514   echo "$as_me: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 cf_want_posix_source=no
6517          case .$cf_POSIX_C_SOURCE in #(vi
6518          .[12]??*) #(vi
6519                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6520                 ;;
6521          .2) #(vi
6522                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6523                 cf_want_posix_source=yes
6524                 ;;
6525          .*)
6526                 cf_want_posix_source=yes
6527                 ;;
6528          esac
6529          if test "$cf_want_posix_source" = yes ; then
6530                 cat >conftest.$ac_ext <<_ACEOF
6531 #line 6531 "configure"
6532 #include "confdefs.h"
6533 #include <sys/types.h>
6534 int
6535 main ()
6536 {
6537
6538 #ifdef _POSIX_SOURCE
6539 make an error
6540 #endif
6541   ;
6542   return 0;
6543 }
6544 _ACEOF
6545 rm -f conftest.$ac_objext
6546 if { (eval echo "$as_me:6546: \"$ac_compile\"") >&5
6547   (eval $ac_compile) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); } &&
6551          { ac_try='test -s conftest.$ac_objext'
6552   { (eval echo "$as_me:6552: \"$ac_try\"") >&5
6553   (eval $ac_try) 2>&5
6554   ac_status=$?
6555   echo "$as_me:6555: \$? = $ac_status" >&5
6556   (exit $ac_status); }; }; then
6557   :
6558 else
6559   echo "$as_me: failed program was:" >&5
6560 cat conftest.$ac_ext >&5
6561 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6562 fi
6563 rm -f conftest.$ac_objext conftest.$ac_ext
6564          fi
6565
6566 echo "${as_me-configure}:6566: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6567
6568          CFLAGS="$cf_trim_CFLAGS"
6569          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6570
6571 echo "${as_me-configure}:6571: testing if the second compile does not leave our definition intact error ..." 1>&5
6572
6573          cat >conftest.$ac_ext <<_ACEOF
6574 #line 6574 "configure"
6575 #include "confdefs.h"
6576 #include <sys/types.h>
6577 int
6578 main ()
6579 {
6580
6581 #ifndef _POSIX_C_SOURCE
6582 make an error
6583 #endif
6584   ;
6585   return 0;
6586 }
6587 _ACEOF
6588 rm -f conftest.$ac_objext
6589 if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5
6590   (eval $ac_compile) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); } &&
6594          { ac_try='test -s conftest.$ac_objext'
6595   { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6596   (eval $ac_try) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); }; }; then
6600   :
6601 else
6602   echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 cf_cv_posix_c_source=no
6605 fi
6606 rm -f conftest.$ac_objext conftest.$ac_ext
6607          CFLAGS="$cf_save_CFLAGS"
6608          CPPFLAGS="$cf_save_CPPFLAGS"
6609
6610 fi
6611 rm -f conftest.$ac_objext conftest.$ac_ext
6612
6613 fi
6614 echo "$as_me:6614: result: $cf_cv_posix_c_source" >&5
6615 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6616
6617 if test "$cf_cv_posix_c_source" != no ; then
6618         CFLAGS="$cf_trim_CFLAGS"
6619         CPPFLAGS="$cf_trim_CPPFLAGS"
6620         if test "$cf_cv_cc_u_d_options" = yes ; then
6621                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6622                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6623                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6624         fi
6625         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6626 fi
6627
6628         ;;
6629 esac
6630
6631 # Work around breakage on OS X
6632
6633 echo "$as_me:6633: checking if SIGWINCH is defined" >&5
6634 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6635 if test "${cf_cv_define_sigwinch+set}" = set; then
6636   echo $ECHO_N "(cached) $ECHO_C" >&6
6637 else
6638
6639         cat >conftest.$ac_ext <<_ACEOF
6640 #line 6640 "configure"
6641 #include "confdefs.h"
6642
6643 #include <sys/types.h>
6644 #include <sys/signal.h>
6645
6646 int
6647 main ()
6648 {
6649 int x = SIGWINCH
6650   ;
6651   return 0;
6652 }
6653 _ACEOF
6654 rm -f conftest.$ac_objext
6655 if { (eval echo "$as_me:6655: \"$ac_compile\"") >&5
6656   (eval $ac_compile) 2>&5
6657   ac_status=$?
6658   echo "$as_me:6658: \$? = $ac_status" >&5
6659   (exit $ac_status); } &&
6660          { ac_try='test -s conftest.$ac_objext'
6661   { (eval echo "$as_me:6661: \"$ac_try\"") >&5
6662   (eval $ac_try) 2>&5
6663   ac_status=$?
6664   echo "$as_me:6664: \$? = $ac_status" >&5
6665   (exit $ac_status); }; }; then
6666   cf_cv_define_sigwinch=yes
6667 else
6668   echo "$as_me: failed program was:" >&5
6669 cat conftest.$ac_ext >&5
6670 cat >conftest.$ac_ext <<_ACEOF
6671 #line 6671 "configure"
6672 #include "confdefs.h"
6673
6674 #undef _XOPEN_SOURCE
6675 #undef _POSIX_SOURCE
6676 #undef _POSIX_C_SOURCE
6677 #include <sys/types.h>
6678 #include <sys/signal.h>
6679
6680 int
6681 main ()
6682 {
6683 int x = SIGWINCH
6684   ;
6685   return 0;
6686 }
6687 _ACEOF
6688 rm -f conftest.$ac_objext
6689 if { (eval echo "$as_me:6689: \"$ac_compile\"") >&5
6690   (eval $ac_compile) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); } &&
6694          { ac_try='test -s conftest.$ac_objext'
6695   { (eval echo "$as_me:6695: \"$ac_try\"") >&5
6696   (eval $ac_try) 2>&5
6697   ac_status=$?
6698   echo "$as_me:6698: \$? = $ac_status" >&5
6699   (exit $ac_status); }; }; then
6700   cf_cv_define_sigwinch=maybe
6701 else
6702   echo "$as_me: failed program was:" >&5
6703 cat conftest.$ac_ext >&5
6704 cf_cv_define_sigwinch=no
6705 fi
6706 rm -f conftest.$ac_objext conftest.$ac_ext
6707
6708 fi
6709 rm -f conftest.$ac_objext conftest.$ac_ext
6710
6711 fi
6712 echo "$as_me:6712: result: $cf_cv_define_sigwinch" >&5
6713 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6714
6715 if test "$cf_cv_define_sigwinch" = maybe ; then
6716 echo "$as_me:6716: checking for actual SIGWINCH definition" >&5
6717 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6718 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721
6722 cf_cv_fixup_sigwinch=unknown
6723 cf_sigwinch=32
6724 while test $cf_sigwinch != 1
6725 do
6726         cat >conftest.$ac_ext <<_ACEOF
6727 #line 6727 "configure"
6728 #include "confdefs.h"
6729
6730 #undef _XOPEN_SOURCE
6731 #undef _POSIX_SOURCE
6732 #undef _POSIX_C_SOURCE
6733 #include <sys/types.h>
6734 #include <sys/signal.h>
6735
6736 int
6737 main ()
6738 {
6739
6740 #if SIGWINCH != $cf_sigwinch
6741 make an error
6742 #endif
6743 int x = SIGWINCH
6744   ;
6745   return 0;
6746 }
6747 _ACEOF
6748 rm -f conftest.$ac_objext
6749 if { (eval echo "$as_me:6749: \"$ac_compile\"") >&5
6750   (eval $ac_compile) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit $ac_status); } &&
6754          { ac_try='test -s conftest.$ac_objext'
6755   { (eval echo "$as_me:6755: \"$ac_try\"") >&5
6756   (eval $ac_try) 2>&5
6757   ac_status=$?
6758   echo "$as_me:6758: \$? = $ac_status" >&5
6759   (exit $ac_status); }; }; then
6760   cf_cv_fixup_sigwinch=$cf_sigwinch
6761          break
6762 else
6763   echo "$as_me: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 fi
6766 rm -f conftest.$ac_objext conftest.$ac_ext
6767
6768 cf_sigwinch=`expr $cf_sigwinch - 1`
6769 done
6770
6771 fi
6772 echo "$as_me:6772: result: $cf_cv_fixup_sigwinch" >&5
6773 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6774
6775         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6776                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6777         fi
6778 fi
6779
6780 # Checks for CODESET support.
6781
6782   echo "$as_me:6782: checking for nl_langinfo and CODESET" >&5
6783 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6784 if test "${am_cv_langinfo_codeset+set}" = set; then
6785   echo $ECHO_N "(cached) $ECHO_C" >&6
6786 else
6787   cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6790 #include <langinfo.h>
6791 int
6792 main ()
6793 {
6794 char* cs = nl_langinfo(CODESET);
6795   ;
6796   return 0;
6797 }
6798 _ACEOF
6799 rm -f conftest.$ac_objext conftest$ac_exeext
6800 if { (eval echo "$as_me:6800: \"$ac_link\"") >&5
6801   (eval $ac_link) 2>&5
6802   ac_status=$?
6803   echo "$as_me:6803: \$? = $ac_status" >&5
6804   (exit $ac_status); } &&
6805          { ac_try='test -s conftest$ac_exeext'
6806   { (eval echo "$as_me:6806: \"$ac_try\"") >&5
6807   (eval $ac_try) 2>&5
6808   ac_status=$?
6809   echo "$as_me:6809: \$? = $ac_status" >&5
6810   (exit $ac_status); }; }; then
6811   am_cv_langinfo_codeset=yes
6812 else
6813   echo "$as_me: failed program was:" >&5
6814 cat conftest.$ac_ext >&5
6815 am_cv_langinfo_codeset=no
6816 fi
6817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6818
6819 fi
6820 echo "$as_me:6820: result: $am_cv_langinfo_codeset" >&5
6821 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6822   if test $am_cv_langinfo_codeset = yes; then
6823
6824 cat >>confdefs.h <<\EOF
6825 #define HAVE_LANGINFO_CODESET 1
6826 EOF
6827
6828   fi
6829
6830 # use these variables to work around a defect in gcc's fixincludes.
6831 NCURSES_OK_WCHAR_T=
6832 NCURSES_OK_WINT_T=
6833
6834 echo "$as_me:6834: checking if you want wide-character code" >&5
6835 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6836
6837 # Check whether --enable-widec or --disable-widec was given.
6838 if test "${enable_widec+set}" = set; then
6839   enableval="$enable_widec"
6840   with_widec=$enableval
6841 else
6842   with_widec=no
6843 fi;
6844 echo "$as_me:6844: result: $with_widec" >&5
6845 echo "${ECHO_T}$with_widec" >&6
6846 if test "$with_widec" = yes ; then
6847         LIB_SUFFIX="w${LIB_SUFFIX}"
6848         cat >>confdefs.h <<\EOF
6849 #define USE_WIDEC_SUPPORT 1
6850 EOF
6851
6852 echo "$as_me:6852: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6853 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6854 cat >conftest.$ac_ext <<_ACEOF
6855 #line 6855 "configure"
6856 #include "confdefs.h"
6857 #include <sys/types.h>
6858
6859 int
6860 main ()
6861 {
6862
6863 #ifndef _XOPEN_SOURCE_EXTENDED
6864 make an error
6865 #endif
6866   ;
6867   return 0;
6868 }
6869 _ACEOF
6870 rm -f conftest.$ac_objext
6871 if { (eval echo "$as_me:6871: \"$ac_compile\"") >&5
6872   (eval $ac_compile) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); } &&
6876          { ac_try='test -s conftest.$ac_objext'
6877   { (eval echo "$as_me:6877: \"$ac_try\"") >&5
6878   (eval $ac_try) 2>&5
6879   ac_status=$?
6880   echo "$as_me:6880: \$? = $ac_status" >&5
6881   (exit $ac_status); }; }; then
6882   cf_result=no
6883 else
6884   echo "$as_me: failed program was:" >&5
6885 cat conftest.$ac_ext >&5
6886 cf_result=yes
6887 fi
6888 rm -f conftest.$ac_objext conftest.$ac_ext
6889 echo "$as_me:6889: result: $cf_result" >&5
6890 echo "${ECHO_T}$cf_result" >&6
6891
6892 if test "$cf_result" = yes ; then
6893         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6894 elif test "x" != "x" ; then
6895         echo "$as_me:6895: checking checking for compatible value versus " >&5
6896 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6897         cat >conftest.$ac_ext <<_ACEOF
6898 #line 6898 "configure"
6899 #include "confdefs.h"
6900 #include <sys/types.h>
6901
6902 int
6903 main ()
6904 {
6905
6906 #if _XOPEN_SOURCE_EXTENDED- < 0
6907 make an error
6908 #endif
6909   ;
6910   return 0;
6911 }
6912 _ACEOF
6913 rm -f conftest.$ac_objext
6914 if { (eval echo "$as_me:6914: \"$ac_compile\"") >&5
6915   (eval $ac_compile) 2>&5
6916   ac_status=$?
6917   echo "$as_me:6917: \$? = $ac_status" >&5
6918   (exit $ac_status); } &&
6919          { ac_try='test -s conftest.$ac_objext'
6920   { (eval echo "$as_me:6920: \"$ac_try\"") >&5
6921   (eval $ac_try) 2>&5
6922   ac_status=$?
6923   echo "$as_me:6923: \$? = $ac_status" >&5
6924   (exit $ac_status); }; }; then
6925   cf_result=yes
6926 else
6927   echo "$as_me: failed program was:" >&5
6928 cat conftest.$ac_ext >&5
6929 cf_result=no
6930 fi
6931 rm -f conftest.$ac_objext conftest.$ac_ext
6932         echo "$as_me:6932: result: $cf_result" >&5
6933 echo "${ECHO_T}$cf_result" >&6
6934         if test "$cf_result" = no ; then
6935                 # perhaps we can override it - try...
6936                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6937         fi
6938 fi
6939
6940         # with_overwrite=no
6941         NCURSES_CH_T=cchar_t
6942
6943 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6944 do
6945 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6946 echo "$as_me:6946: checking for $ac_func" >&5
6947 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6948 if eval "test \"\${$as_ac_var+set}\" = set"; then
6949   echo $ECHO_N "(cached) $ECHO_C" >&6
6950 else
6951   cat >conftest.$ac_ext <<_ACEOF
6952 #line 6952 "configure"
6953 #include "confdefs.h"
6954 /* System header to define __stub macros and hopefully few prototypes,
6955     which can conflict with char $ac_func (); below.  */
6956 #include <assert.h>
6957 /* Override any gcc2 internal prototype to avoid an error.  */
6958 #ifdef __cplusplus
6959 extern "C"
6960 #endif
6961 /* We use char because int might match the return type of a gcc2
6962    builtin and then its argument prototype would still apply.  */
6963 char $ac_func ();
6964 char (*f) ();
6965
6966 int
6967 main ()
6968 {
6969 /* The GNU C library defines this for functions which it implements
6970     to always fail with ENOSYS.  Some functions are actually named
6971     something starting with __ and the normal name is an alias.  */
6972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6973 choke me
6974 #else
6975 f = $ac_func;
6976 #endif
6977
6978   ;
6979   return 0;
6980 }
6981 _ACEOF
6982 rm -f conftest.$ac_objext conftest$ac_exeext
6983 if { (eval echo "$as_me:6983: \"$ac_link\"") >&5
6984   (eval $ac_link) 2>&5
6985   ac_status=$?
6986   echo "$as_me:6986: \$? = $ac_status" >&5
6987   (exit $ac_status); } &&
6988          { ac_try='test -s conftest$ac_exeext'
6989   { (eval echo "$as_me:6989: \"$ac_try\"") >&5
6990   (eval $ac_try) 2>&5
6991   ac_status=$?
6992   echo "$as_me:6992: \$? = $ac_status" >&5
6993   (exit $ac_status); }; }; then
6994   eval "$as_ac_var=yes"
6995 else
6996   echo "$as_me: failed program was:" >&5
6997 cat conftest.$ac_ext >&5
6998 eval "$as_ac_var=no"
6999 fi
7000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7001 fi
7002 echo "$as_me:7002: result: `eval echo '${'$as_ac_var'}'`" >&5
7003 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7004 if test `eval echo '${'$as_ac_var'}'` = yes; then
7005   cat >>confdefs.h <<EOF
7006 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7007 EOF
7008
7009 fi
7010 done
7011
7012         if test "$ac_cv_func_putwc" != yes ; then
7013
7014 echo "$as_me:7014: checking for multibyte character support" >&5
7015 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7016 if test "${cf_cv_utf8_lib+set}" = set; then
7017   echo $ECHO_N "(cached) $ECHO_C" >&6
7018 else
7019
7020         cf_save_LIBS="$LIBS"
7021         cat >conftest.$ac_ext <<_ACEOF
7022 #line 7022 "configure"
7023 #include "confdefs.h"
7024
7025 #include <stdlib.h>
7026 int
7027 main ()
7028 {
7029 putwc(0,0);
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f conftest.$ac_objext conftest$ac_exeext
7035 if { (eval echo "$as_me:7035: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); } &&
7040          { ac_try='test -s conftest$ac_exeext'
7041   { (eval echo "$as_me:7041: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); }; }; then
7046   cf_cv_utf8_lib=yes
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7050
7051 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7052 # will be set on completion of the AC_TRY_LINK below.
7053 cf_cv_header_path_utf8=
7054 cf_cv_library_path_utf8=
7055
7056 echo "${as_me-configure}:7056: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7057
7058 cat >conftest.$ac_ext <<_ACEOF
7059 #line 7059 "configure"
7060 #include "confdefs.h"
7061
7062 #include <libutf8.h>
7063 int
7064 main ()
7065 {
7066 putwc(0,0);
7067   ;
7068   return 0;
7069 }
7070 _ACEOF
7071 rm -f conftest.$ac_objext conftest$ac_exeext
7072 if { (eval echo "$as_me:7072: \"$ac_link\"") >&5
7073   (eval $ac_link) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); } &&
7077          { ac_try='test -s conftest$ac_exeext'
7078   { (eval echo "$as_me:7078: \"$ac_try\"") >&5
7079   (eval $ac_try) 2>&5
7080   ac_status=$?
7081   echo "$as_me:7081: \$? = $ac_status" >&5
7082   (exit $ac_status); }; }; then
7083   cf_cv_find_linkage_utf8=yes
7084 else
7085   echo "$as_me: failed program was:" >&5
7086 cat conftest.$ac_ext >&5
7087
7088     cf_cv_find_linkage_utf8=no
7089
7090     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7091
7092 echo "${as_me-configure}:7092: testing find linkage for utf8 library ..." 1>&5
7093
7094 echo "${as_me-configure}:7094: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7095
7096     cf_save_CPPFLAGS="$CPPFLAGS"
7097     cf_test_CPPFLAGS="$CPPFLAGS"
7098
7099 cf_header_path_list=""
7100 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7101         for cf_header_path in $CPPFLAGS $CFLAGS
7102         do
7103                 case $cf_header_path in #(vi
7104                 -I*)
7105                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7106
7107 test "$cf_header_path" != "NONE" && \
7108 test -d "$cf_header_path" && \
7109  {
7110         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7111         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7112         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7113         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7114         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7115         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7116 }
7117
7118                         cf_header_path_list="$cf_header_path_list $cf_search"
7119                         ;;
7120                 esac
7121         done
7122 fi
7123
7124 cf_search=""
7125
7126 test "/usr" != "$prefix" && \
7127 test -d "/usr" && \
7128 (test $prefix = NONE || test -d $prefix) && {
7129         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7130         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7131         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7132         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7133         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7134         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7135 }
7136
7137 test "$prefix" != "NONE" && \
7138 test -d "$prefix" && \
7139  {
7140         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7141         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7142         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7143         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7144         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7145         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7146 }
7147
7148 test "/usr/local" != "$prefix" && \
7149 test -d "/usr/local" && \
7150 (test $prefix = NONE || test -d $prefix) && {
7151         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7152         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7153         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7154         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7155         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7156         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7157 }
7158
7159 test "/opt" != "$prefix" && \
7160 test -d "/opt" && \
7161 (test $prefix = NONE || test -d $prefix) && {
7162         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7163         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7164         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7165         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7166         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7167         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7168 }
7169
7170 test "$HOME" != "$prefix" && \
7171 test -d "$HOME" && \
7172 (test $prefix = NONE || test -d $prefix) && {
7173         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7174         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7175         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7176         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7177         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7178         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7179 }
7180
7181 test "$includedir" != NONE && \
7182 test "$includedir" != "/usr/include" && \
7183 test -d "$includedir" && {
7184         test -d $includedir &&    cf_search="$cf_search $includedir"
7185         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7186 }
7187
7188 test "$oldincludedir" != NONE && \
7189 test "$oldincludedir" != "/usr/include" && \
7190 test -d "$oldincludedir" && {
7191         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7192         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7193 }
7194
7195 cf_search="$cf_header_path_list $cf_search"
7196
7197     for cf_cv_header_path_utf8 in $cf_search
7198     do
7199       if test -d $cf_cv_header_path_utf8 ; then
7200         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7201
7202 echo "${as_me-configure}:7202: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7203
7204         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7205         cat >conftest.$ac_ext <<_ACEOF
7206 #line 7206 "configure"
7207 #include "confdefs.h"
7208
7209 #include <libutf8.h>
7210 int
7211 main ()
7212 {
7213 putwc(0,0);
7214   ;
7215   return 0;
7216 }
7217 _ACEOF
7218 rm -f conftest.$ac_objext
7219 if { (eval echo "$as_me:7219: \"$ac_compile\"") >&5
7220   (eval $ac_compile) 2>&5
7221   ac_status=$?
7222   echo "$as_me:7222: \$? = $ac_status" >&5
7223   (exit $ac_status); } &&
7224          { ac_try='test -s conftest.$ac_objext'
7225   { (eval echo "$as_me:7225: \"$ac_try\"") >&5
7226   (eval $ac_try) 2>&5
7227   ac_status=$?
7228   echo "$as_me:7228: \$? = $ac_status" >&5
7229   (exit $ac_status); }; }; then
7230
7231             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7232
7233 echo "${as_me-configure}:7233: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7234
7235             cf_cv_find_linkage_utf8=maybe
7236             cf_test_CPPFLAGS="$CPPFLAGS"
7237             break
7238 else
7239   echo "$as_me: failed program was:" >&5
7240 cat conftest.$ac_ext >&5
7241
7242             CPPFLAGS="$cf_save_CPPFLAGS"
7243
7244 fi
7245 rm -f conftest.$ac_objext conftest.$ac_ext
7246       fi
7247     done
7248
7249     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7250
7251 echo "${as_me-configure}:7251: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7252
7253       cf_save_LIBS="$LIBS"
7254       cf_save_LDFLAGS="$LDFLAGS"
7255
7256       if test "$cf_cv_find_linkage_utf8" != yes ; then
7257
7258 cf_library_path_list=""
7259 if test -n "${LDFLAGS}${LIBS}" ; then
7260         for cf_library_path in $LDFLAGS $LIBS
7261         do
7262                 case $cf_library_path in #(vi
7263                 -L*)
7264                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7265
7266 test "$cf_library_path" != "NONE" && \
7267 test -d "$cf_library_path" && \
7268  {
7269         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7270         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7271         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7272         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7273         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7274         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7275 }
7276
7277                         cf_library_path_list="$cf_library_path_list $cf_search"
7278                         ;;
7279                 esac
7280         done
7281 fi
7282
7283 cf_search=""
7284
7285 test "/usr" != "$prefix" && \
7286 test -d "/usr" && \
7287 (test $prefix = NONE || test -d $prefix) && {
7288         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7289         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7290         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7291         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7292         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7293         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7294 }
7295
7296 test "$prefix" != "NONE" && \
7297 test -d "$prefix" && \
7298  {
7299         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7300         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7301         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7302         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7303         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7304         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7305 }
7306
7307 test "/usr/local" != "$prefix" && \
7308 test -d "/usr/local" && \
7309 (test $prefix = NONE || test -d $prefix) && {
7310         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7311         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7312         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7313         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7314         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7315         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7316 }
7317
7318 test "/opt" != "$prefix" && \
7319 test -d "/opt" && \
7320 (test $prefix = NONE || test -d $prefix) && {
7321         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7322         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7323         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7324         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7325         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7326         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7327 }
7328
7329 test "$HOME" != "$prefix" && \
7330 test -d "$HOME" && \
7331 (test $prefix = NONE || test -d $prefix) && {
7332         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7333         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7334         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7335         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7336         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7337         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7338 }
7339
7340 cf_search="$cf_library_path_list $cf_search"
7341
7342         for cf_cv_library_path_utf8 in $cf_search
7343         do
7344           if test -d $cf_cv_library_path_utf8 ; then
7345             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7346
7347 echo "${as_me-configure}:7347: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7348
7349             CPPFLAGS="$cf_test_CPPFLAGS"
7350             LIBS="-lutf8  $cf_save_LIBS"
7351             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7352             cat >conftest.$ac_ext <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355
7356 #include <libutf8.h>
7357 int
7358 main ()
7359 {
7360 putwc(0,0);
7361   ;
7362   return 0;
7363 }
7364 _ACEOF
7365 rm -f conftest.$ac_objext conftest$ac_exeext
7366 if { (eval echo "$as_me:7366: \"$ac_link\"") >&5
7367   (eval $ac_link) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit $ac_status); } &&
7371          { ac_try='test -s conftest$ac_exeext'
7372   { (eval echo "$as_me:7372: \"$ac_try\"") >&5
7373   (eval $ac_try) 2>&5
7374   ac_status=$?
7375   echo "$as_me:7375: \$? = $ac_status" >&5
7376   (exit $ac_status); }; }; then
7377
7378                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7379
7380 echo "${as_me-configure}:7380: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7381
7382                 cf_cv_find_linkage_utf8=yes
7383                 cf_cv_library_file_utf8="-lutf8"
7384                 break
7385 else
7386   echo "$as_me: failed program was:" >&5
7387 cat conftest.$ac_ext >&5
7388
7389                 CPPFLAGS="$cf_save_CPPFLAGS"
7390                 LIBS="$cf_save_LIBS"
7391                 LDFLAGS="$cf_save_LDFLAGS"
7392
7393 fi
7394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7395           fi
7396         done
7397         LIBS="$cf_save_LIBS"
7398         CPPFLAGS="$cf_save_CPPFLAGS"
7399         LDFLAGS="$cf_save_LDFLAGS"
7400       fi
7401
7402     else
7403       cf_cv_find_linkage_utf8=no
7404     fi
7405
7406 fi
7407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7408
7409 if test "$cf_cv_find_linkage_utf8" = yes ; then
7410 cf_cv_utf8_lib=add-on
7411 else
7412 cf_cv_utf8_lib=no
7413 fi
7414
7415 fi
7416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7417 fi
7418 echo "$as_me:7418: result: $cf_cv_utf8_lib" >&5
7419 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7420
7421 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7422 # ncurses/ncursesw:
7423 if test "$cf_cv_utf8_lib" = "add-on" ; then
7424         cat >>confdefs.h <<\EOF
7425 #define HAVE_LIBUTF8_H 1
7426 EOF
7427
7428 if test -n "$cf_cv_header_path_utf8" ; then
7429   for cf_add_incdir in $cf_cv_header_path_utf8
7430   do
7431         while test $cf_add_incdir != /usr/include
7432         do
7433           if test -d $cf_add_incdir
7434           then
7435                 cf_have_incdir=no
7436                 if test -n "$CFLAGS$CPPFLAGS" ; then
7437                   # a loop is needed to ensure we can add subdirs of existing dirs
7438                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7439                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7440                           cf_have_incdir=yes; break
7441                         fi
7442                   done
7443                 fi
7444
7445                 if test "$cf_have_incdir" = no ; then
7446                   if test "$cf_add_incdir" = /usr/local/include ; then
7447                         if test "$GCC" = yes
7448                         then
7449                           cf_save_CPPFLAGS=$CPPFLAGS
7450                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7451                           cat >conftest.$ac_ext <<_ACEOF
7452 #line 7452 "configure"
7453 #include "confdefs.h"
7454 #include <stdio.h>
7455 int
7456 main ()
7457 {
7458 printf("Hello")
7459   ;
7460   return 0;
7461 }
7462 _ACEOF
7463 rm -f conftest.$ac_objext
7464 if { (eval echo "$as_me:7464: \"$ac_compile\"") >&5
7465   (eval $ac_compile) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } &&
7469          { ac_try='test -s conftest.$ac_objext'
7470   { (eval echo "$as_me:7470: \"$ac_try\"") >&5
7471   (eval $ac_try) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); }; }; then
7475   :
7476 else
7477   echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 cf_have_incdir=yes
7480 fi
7481 rm -f conftest.$ac_objext conftest.$ac_ext
7482                           CPPFLAGS=$cf_save_CPPFLAGS
7483                         fi
7484                   fi
7485                 fi
7486
7487                 if test "$cf_have_incdir" = no ; then
7488                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7489
7490 echo "${as_me-configure}:7490: testing adding $cf_add_incdir to include-path ..." 1>&5
7491
7492                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
7493
7494                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7495                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7496                   cf_add_incdir="$cf_top_incdir"
7497                 else
7498                   break
7499                 fi
7500           fi
7501         done
7502   done
7503 fi
7504
7505 if test -n "$cf_cv_library_path_utf8" ; then
7506   for cf_add_libdir in $cf_cv_library_path_utf8
7507   do
7508     if test $cf_add_libdir = /usr/lib ; then
7509       :
7510     elif test -d $cf_add_libdir
7511     then
7512       cf_have_libdir=no
7513       if test -n "$LDFLAGS$LIBS" ; then
7514         # a loop is needed to ensure we can add subdirs of existing dirs
7515         for cf_test_libdir in $LDFLAGS $LIBS ; do
7516           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7517             cf_have_libdir=yes; break
7518           fi
7519         done
7520       fi
7521       if test "$cf_have_libdir" = no ; then
7522         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7523
7524 echo "${as_me-configure}:7524: testing adding $cf_add_libdir to library-path ..." 1>&5
7525
7526         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7527       fi
7528     fi
7529   done
7530 fi
7531
7532         LIBS="-lutf8 $LIBS"
7533 fi
7534
7535                 if test "$cf_cv_utf8_lib" != no ; then
7536                         NCURSES_LIBUTF8=1
7537                 fi
7538         fi
7539
7540 # This is needed on Tru64 5.0 to declare mbstate_t
7541 echo "$as_me:7541: checking if we must include wchar.h to declare mbstate_t" >&5
7542 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7543 if test "${cf_cv_mbstate_t+set}" = set; then
7544   echo $ECHO_N "(cached) $ECHO_C" >&6
7545 else
7546
7547 cat >conftest.$ac_ext <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550
7551 #include <stdlib.h>
7552 #include <stdarg.h>
7553 #include <stdio.h>
7554 #ifdef HAVE_LIBUTF8_H
7555 #include <libutf8.h>
7556 #endif
7557 int
7558 main ()
7559 {
7560 mbstate_t state
7561   ;
7562   return 0;
7563 }
7564 _ACEOF
7565 rm -f conftest.$ac_objext
7566 if { (eval echo "$as_me:7566: \"$ac_compile\"") >&5
7567   (eval $ac_compile) 2>&5
7568   ac_status=$?
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); } &&
7571          { ac_try='test -s conftest.$ac_objext'
7572   { (eval echo "$as_me:7572: \"$ac_try\"") >&5
7573   (eval $ac_try) 2>&5
7574   ac_status=$?
7575   echo "$as_me:7575: \$? = $ac_status" >&5
7576   (exit $ac_status); }; }; then
7577   cf_cv_mbstate_t=no
7578 else
7579   echo "$as_me: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
7581 cat >conftest.$ac_ext <<_ACEOF
7582 #line 7582 "configure"
7583 #include "confdefs.h"
7584
7585 #include <stdlib.h>
7586 #include <stdarg.h>
7587 #include <stdio.h>
7588 #include <wchar.h>
7589 #ifdef HAVE_LIBUTF8_H
7590 #include <libutf8.h>
7591 #endif
7592 int
7593 main ()
7594 {
7595 mbstate_t value
7596   ;
7597   return 0;
7598 }
7599 _ACEOF
7600 rm -f conftest.$ac_objext
7601 if { (eval echo "$as_me:7601: \"$ac_compile\"") >&5
7602   (eval $ac_compile) 2>&5
7603   ac_status=$?
7604   echo "$as_me:7604: \$? = $ac_status" >&5
7605   (exit $ac_status); } &&
7606          { ac_try='test -s conftest.$ac_objext'
7607   { (eval echo "$as_me:7607: \"$ac_try\"") >&5
7608   (eval $ac_try) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); }; }; then
7612   cf_cv_mbstate_t=yes
7613 else
7614   echo "$as_me: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 cf_cv_mbstate_t=unknown
7617 fi
7618 rm -f conftest.$ac_objext conftest.$ac_ext
7619 fi
7620 rm -f conftest.$ac_objext conftest.$ac_ext
7621 fi
7622 echo "$as_me:7622: result: $cf_cv_mbstate_t" >&5
7623 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7624
7625 if test "$cf_cv_mbstate_t" = yes ; then
7626         cat >>confdefs.h <<\EOF
7627 #define NEED_WCHAR_H 1
7628 EOF
7629
7630         NEED_WCHAR_H=1
7631 fi
7632
7633 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7634 if test "$cf_cv_mbstate_t" = unknown ; then
7635         NCURSES_MBSTATE_T=1
7636 fi
7637
7638 # This is needed on Tru64 5.0 to declare wchar_t
7639 echo "$as_me:7639: checking if we must include wchar.h to declare wchar_t" >&5
7640 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7641 if test "${cf_cv_wchar_t+set}" = set; then
7642   echo $ECHO_N "(cached) $ECHO_C" >&6
7643 else
7644
7645 cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648
7649 #include <stdlib.h>
7650 #include <stdarg.h>
7651 #include <stdio.h>
7652 #ifdef HAVE_LIBUTF8_H
7653 #include <libutf8.h>
7654 #endif
7655 int
7656 main ()
7657 {
7658 wchar_t state
7659   ;
7660   return 0;
7661 }
7662 _ACEOF
7663 rm -f conftest.$ac_objext
7664 if { (eval echo "$as_me:7664: \"$ac_compile\"") >&5
7665   (eval $ac_compile) 2>&5
7666   ac_status=$?
7667   echo "$as_me:7667: \$? = $ac_status" >&5
7668   (exit $ac_status); } &&
7669          { ac_try='test -s conftest.$ac_objext'
7670   { (eval echo "$as_me:7670: \"$ac_try\"") >&5
7671   (eval $ac_try) 2>&5
7672   ac_status=$?
7673   echo "$as_me:7673: \$? = $ac_status" >&5
7674   (exit $ac_status); }; }; then
7675   cf_cv_wchar_t=no
7676 else
7677   echo "$as_me: failed program was:" >&5
7678 cat conftest.$ac_ext >&5
7679 cat >conftest.$ac_ext <<_ACEOF
7680 #line 7680 "configure"
7681 #include "confdefs.h"
7682
7683 #include <stdlib.h>
7684 #include <stdarg.h>
7685 #include <stdio.h>
7686 #include <wchar.h>
7687 #ifdef HAVE_LIBUTF8_H
7688 #include <libutf8.h>
7689 #endif
7690 int
7691 main ()
7692 {
7693 wchar_t value
7694   ;
7695   return 0;
7696 }
7697 _ACEOF
7698 rm -f conftest.$ac_objext
7699 if { (eval echo "$as_me:7699: \"$ac_compile\"") >&5
7700   (eval $ac_compile) 2>&5
7701   ac_status=$?
7702   echo "$as_me:7702: \$? = $ac_status" >&5
7703   (exit $ac_status); } &&
7704          { ac_try='test -s conftest.$ac_objext'
7705   { (eval echo "$as_me:7705: \"$ac_try\"") >&5
7706   (eval $ac_try) 2>&5
7707   ac_status=$?
7708   echo "$as_me:7708: \$? = $ac_status" >&5
7709   (exit $ac_status); }; }; then
7710   cf_cv_wchar_t=yes
7711 else
7712   echo "$as_me: failed program was:" >&5
7713 cat conftest.$ac_ext >&5
7714 cf_cv_wchar_t=unknown
7715 fi
7716 rm -f conftest.$ac_objext conftest.$ac_ext
7717 fi
7718 rm -f conftest.$ac_objext conftest.$ac_ext
7719 fi
7720 echo "$as_me:7720: result: $cf_cv_wchar_t" >&5
7721 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7722
7723 if test "$cf_cv_wchar_t" = yes ; then
7724         cat >>confdefs.h <<\EOF
7725 #define NEED_WCHAR_H 1
7726 EOF
7727
7728         NEED_WCHAR_H=1
7729 fi
7730
7731 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7732 if test "$cf_cv_wchar_t" = unknown ; then
7733         NCURSES_WCHAR_T=1
7734 fi
7735
7736 # if we find wchar_t in either place, use substitution to provide a fallback.
7737 if test "$cf_cv_wchar_t" != unknown ; then
7738         NCURSES_OK_WCHAR_T=1
7739 fi
7740
7741 # This is needed on Tru64 5.0 to declare wint_t
7742 echo "$as_me:7742: checking if we must include wchar.h to declare wint_t" >&5
7743 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7744 if test "${cf_cv_wint_t+set}" = set; then
7745   echo $ECHO_N "(cached) $ECHO_C" >&6
7746 else
7747
7748 cat >conftest.$ac_ext <<_ACEOF
7749 #line 7749 "configure"
7750 #include "confdefs.h"
7751
7752 #include <stdlib.h>
7753 #include <stdarg.h>
7754 #include <stdio.h>
7755 #ifdef HAVE_LIBUTF8_H
7756 #include <libutf8.h>
7757 #endif
7758 int
7759 main ()
7760 {
7761 wint_t state
7762   ;
7763   return 0;
7764 }
7765 _ACEOF
7766 rm -f conftest.$ac_objext
7767 if { (eval echo "$as_me:7767: \"$ac_compile\"") >&5
7768   (eval $ac_compile) 2>&5
7769   ac_status=$?
7770   echo "$as_me:7770: \$? = $ac_status" >&5
7771   (exit $ac_status); } &&
7772          { ac_try='test -s conftest.$ac_objext'
7773   { (eval echo "$as_me:7773: \"$ac_try\"") >&5
7774   (eval $ac_try) 2>&5
7775   ac_status=$?
7776   echo "$as_me:7776: \$? = $ac_status" >&5
7777   (exit $ac_status); }; }; then
7778   cf_cv_wint_t=no
7779 else
7780   echo "$as_me: failed program was:" >&5
7781 cat conftest.$ac_ext >&5
7782 cat >conftest.$ac_ext <<_ACEOF
7783 #line 7783 "configure"
7784 #include "confdefs.h"
7785
7786 #include <stdlib.h>
7787 #include <stdarg.h>
7788 #include <stdio.h>
7789 #include <wchar.h>
7790 #ifdef HAVE_LIBUTF8_H
7791 #include <libutf8.h>
7792 #endif
7793 int
7794 main ()
7795 {
7796 wint_t value
7797   ;
7798   return 0;
7799 }
7800 _ACEOF
7801 rm -f conftest.$ac_objext
7802 if { (eval echo "$as_me:7802: \"$ac_compile\"") >&5
7803   (eval $ac_compile) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit $ac_status); } &&
7807          { ac_try='test -s conftest.$ac_objext'
7808   { (eval echo "$as_me:7808: \"$ac_try\"") >&5
7809   (eval $ac_try) 2>&5
7810   ac_status=$?
7811   echo "$as_me:7811: \$? = $ac_status" >&5
7812   (exit $ac_status); }; }; then
7813   cf_cv_wint_t=yes
7814 else
7815   echo "$as_me: failed program was:" >&5
7816 cat conftest.$ac_ext >&5
7817 cf_cv_wint_t=unknown
7818 fi
7819 rm -f conftest.$ac_objext conftest.$ac_ext
7820 fi
7821 rm -f conftest.$ac_objext conftest.$ac_ext
7822 fi
7823 echo "$as_me:7823: result: $cf_cv_wint_t" >&5
7824 echo "${ECHO_T}$cf_cv_wint_t" >&6
7825
7826 if test "$cf_cv_wint_t" = yes ; then
7827         cat >>confdefs.h <<\EOF
7828 #define NEED_WCHAR_H 1
7829 EOF
7830
7831         NEED_WCHAR_H=1
7832 fi
7833
7834 # if we do not find wint_t in either place, use substitution to provide a fallback.
7835 if test "$cf_cv_wint_t" = unknown ; then
7836         NCURSES_WINT_T=1
7837 fi
7838
7839 # if we find wint_t in either place, use substitution to provide a fallback.
7840 if test "$cf_cv_wint_t" != unknown ; then
7841         NCURSES_OK_WINT_T=1
7842 fi
7843
7844         if test "$NCURSES_MBSTATE_T" != 0; then
7845                 cat >>confdefs.h <<\EOF
7846 #define NEED_MBSTATE_T_DEF 1
7847 EOF
7848
7849         fi
7850 fi
7851
7852 ###   use option --disable-lp64 to allow long chtype
7853 case $cf_cv_abi_version in
7854 [345]*)
7855         default_with_lp64=no
7856         ;;
7857 *)
7858         default_with_lp64=yes
7859         ;;
7860 esac
7861
7862 echo "$as_me:7862: checking whether to enable _LP64 definition in curses.h" >&5
7863 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7864
7865 # Check whether --enable-lp64 or --disable-lp64 was given.
7866 if test "${enable_lp64+set}" = set; then
7867   enableval="$enable_lp64"
7868   with_lp64=$enableval
7869 else
7870   with_lp64=$default_with_lp64
7871 fi;
7872 echo "$as_me:7872: result: $with_lp64" >&5
7873 echo "${ECHO_T}$with_lp64" >&6
7874
7875 if test "$with_lp64" = yes ; then
7876         cf_cv_enable_lp64=1
7877 else
7878         cf_cv_enable_lp64=0
7879 fi
7880
7881 # Check whether --enable-largefile or --disable-largefile was given.
7882 if test "${enable_largefile+set}" = set; then
7883   enableval="$enable_largefile"
7884
7885 fi;
7886 if test "$enable_largefile" != no; then
7887
7888   echo "$as_me:7888: checking for special C compiler options needed for large files" >&5
7889 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7890 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7891   echo $ECHO_N "(cached) $ECHO_C" >&6
7892 else
7893   ac_cv_sys_largefile_CC=no
7894      if test "$GCC" != yes; then
7895        ac_save_CC=$CC
7896        while :; do
7897          # IRIX 6.2 and later do not support large files by default,
7898          # so use the C compiler's -n32 option if that helps.
7899          cat >conftest.$ac_ext <<_ACEOF
7900 #line 7900 "configure"
7901 #include "confdefs.h"
7902 #include <sys/types.h>
7903  /* Check that off_t can represent 2**63 - 1 correctly.
7904     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7905     since some C++ compilers masquerading as C compilers
7906     incorrectly reject 9223372036854775807.  */
7907 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7908   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7909                        && LARGE_OFF_T % 2147483647 == 1)
7910                       ? 1 : -1];
7911 int
7912 main ()
7913 {
7914
7915   ;
7916   return 0;
7917 }
7918 _ACEOF
7919          rm -f conftest.$ac_objext
7920 if { (eval echo "$as_me:7920: \"$ac_compile\"") >&5
7921   (eval $ac_compile) 2>&5
7922   ac_status=$?
7923   echo "$as_me:7923: \$? = $ac_status" >&5
7924   (exit $ac_status); } &&
7925          { ac_try='test -s conftest.$ac_objext'
7926   { (eval echo "$as_me:7926: \"$ac_try\"") >&5
7927   (eval $ac_try) 2>&5
7928   ac_status=$?
7929   echo "$as_me:7929: \$? = $ac_status" >&5
7930   (exit $ac_status); }; }; then
7931   break
7932 else
7933   echo "$as_me: failed program was:" >&5
7934 cat conftest.$ac_ext >&5
7935 fi
7936 rm -f conftest.$ac_objext
7937          CC="$CC -n32"
7938          rm -f conftest.$ac_objext
7939 if { (eval echo "$as_me:7939: \"$ac_compile\"") >&5
7940   (eval $ac_compile) 2>&5
7941   ac_status=$?
7942   echo "$as_me:7942: \$? = $ac_status" >&5
7943   (exit $ac_status); } &&
7944          { ac_try='test -s conftest.$ac_objext'
7945   { (eval echo "$as_me:7945: \"$ac_try\"") >&5
7946   (eval $ac_try) 2>&5
7947   ac_status=$?
7948   echo "$as_me:7948: \$? = $ac_status" >&5
7949   (exit $ac_status); }; }; then
7950   ac_cv_sys_largefile_CC=' -n32'; break
7951 else
7952   echo "$as_me: failed program was:" >&5
7953 cat conftest.$ac_ext >&5
7954 fi
7955 rm -f conftest.$ac_objext
7956          break
7957        done
7958        CC=$ac_save_CC
7959        rm -f conftest.$ac_ext
7960     fi
7961 fi
7962 echo "$as_me:7962: result: $ac_cv_sys_largefile_CC" >&5
7963 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7964   if test "$ac_cv_sys_largefile_CC" != no; then
7965     CC=$CC$ac_cv_sys_largefile_CC
7966   fi
7967
7968   echo "$as_me:7968: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7969 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7970 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7971   echo $ECHO_N "(cached) $ECHO_C" >&6
7972 else
7973   while :; do
7974   ac_cv_sys_file_offset_bits=no
7975   cat >conftest.$ac_ext <<_ACEOF
7976 #line 7976 "configure"
7977 #include "confdefs.h"
7978 #include <sys/types.h>
7979  /* Check that off_t can represent 2**63 - 1 correctly.
7980     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7981     since some C++ compilers masquerading as C compilers
7982     incorrectly reject 9223372036854775807.  */
7983 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7984   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7985                        && LARGE_OFF_T % 2147483647 == 1)
7986                       ? 1 : -1];
7987 int
7988 main ()
7989 {
7990
7991   ;
7992   return 0;
7993 }
7994 _ACEOF
7995 rm -f conftest.$ac_objext
7996 if { (eval echo "$as_me:7996: \"$ac_compile\"") >&5
7997   (eval $ac_compile) 2>&5
7998   ac_status=$?
7999   echo "$as_me:7999: \$? = $ac_status" >&5
8000   (exit $ac_status); } &&
8001          { ac_try='test -s conftest.$ac_objext'
8002   { (eval echo "$as_me:8002: \"$ac_try\"") >&5
8003   (eval $ac_try) 2>&5
8004   ac_status=$?
8005   echo "$as_me:8005: \$? = $ac_status" >&5
8006   (exit $ac_status); }; }; then
8007   break
8008 else
8009   echo "$as_me: failed program was:" >&5
8010 cat conftest.$ac_ext >&5
8011 fi
8012 rm -f conftest.$ac_objext conftest.$ac_ext
8013   cat >conftest.$ac_ext <<_ACEOF
8014 #line 8014 "configure"
8015 #include "confdefs.h"
8016 #define _FILE_OFFSET_BITS 64
8017 #include <sys/types.h>
8018  /* Check that off_t can represent 2**63 - 1 correctly.
8019     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8020     since some C++ compilers masquerading as C compilers
8021     incorrectly reject 9223372036854775807.  */
8022 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8023   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8024                        && LARGE_OFF_T % 2147483647 == 1)
8025                       ? 1 : -1];
8026 int
8027 main ()
8028 {
8029
8030   ;
8031   return 0;
8032 }
8033 _ACEOF
8034 rm -f conftest.$ac_objext
8035 if { (eval echo "$as_me:8035: \"$ac_compile\"") >&5
8036   (eval $ac_compile) 2>&5
8037   ac_status=$?
8038   echo "$as_me:8038: \$? = $ac_status" >&5
8039   (exit $ac_status); } &&
8040          { ac_try='test -s conftest.$ac_objext'
8041   { (eval echo "$as_me:8041: \"$ac_try\"") >&5
8042   (eval $ac_try) 2>&5
8043   ac_status=$?
8044   echo "$as_me:8044: \$? = $ac_status" >&5
8045   (exit $ac_status); }; }; then
8046   ac_cv_sys_file_offset_bits=64; break
8047 else
8048   echo "$as_me: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8050 fi
8051 rm -f conftest.$ac_objext conftest.$ac_ext
8052   break
8053 done
8054 fi
8055 echo "$as_me:8055: result: $ac_cv_sys_file_offset_bits" >&5
8056 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8057 if test "$ac_cv_sys_file_offset_bits" != no; then
8058
8059 cat >>confdefs.h <<EOF
8060 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8061 EOF
8062
8063 fi
8064 rm -f conftest*
8065   echo "$as_me:8065: checking for _LARGE_FILES value needed for large files" >&5
8066 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8067 if test "${ac_cv_sys_large_files+set}" = set; then
8068   echo $ECHO_N "(cached) $ECHO_C" >&6
8069 else
8070   while :; do
8071   ac_cv_sys_large_files=no
8072   cat >conftest.$ac_ext <<_ACEOF
8073 #line 8073 "configure"
8074 #include "confdefs.h"
8075 #include <sys/types.h>
8076  /* Check that off_t can represent 2**63 - 1 correctly.
8077     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8078     since some C++ compilers masquerading as C compilers
8079     incorrectly reject 9223372036854775807.  */
8080 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8081   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8082                        && LARGE_OFF_T % 2147483647 == 1)
8083                       ? 1 : -1];
8084 int
8085 main ()
8086 {
8087
8088   ;
8089   return 0;
8090 }
8091 _ACEOF
8092 rm -f conftest.$ac_objext
8093 if { (eval echo "$as_me:8093: \"$ac_compile\"") >&5
8094   (eval $ac_compile) 2>&5
8095   ac_status=$?
8096   echo "$as_me:8096: \$? = $ac_status" >&5
8097   (exit $ac_status); } &&
8098          { ac_try='test -s conftest.$ac_objext'
8099   { (eval echo "$as_me:8099: \"$ac_try\"") >&5
8100   (eval $ac_try) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); }; }; then
8104   break
8105 else
8106   echo "$as_me: failed program was:" >&5
8107 cat conftest.$ac_ext >&5
8108 fi
8109 rm -f conftest.$ac_objext conftest.$ac_ext
8110   cat >conftest.$ac_ext <<_ACEOF
8111 #line 8111 "configure"
8112 #include "confdefs.h"
8113 #define _LARGE_FILES 1
8114 #include <sys/types.h>
8115  /* Check that off_t can represent 2**63 - 1 correctly.
8116     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8117     since some C++ compilers masquerading as C compilers
8118     incorrectly reject 9223372036854775807.  */
8119 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8120   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8121                        && LARGE_OFF_T % 2147483647 == 1)
8122                       ? 1 : -1];
8123 int
8124 main ()
8125 {
8126
8127   ;
8128   return 0;
8129 }
8130 _ACEOF
8131 rm -f conftest.$ac_objext
8132 if { (eval echo "$as_me:8132: \"$ac_compile\"") >&5
8133   (eval $ac_compile) 2>&5
8134   ac_status=$?
8135   echo "$as_me:8135: \$? = $ac_status" >&5
8136   (exit $ac_status); } &&
8137          { ac_try='test -s conftest.$ac_objext'
8138   { (eval echo "$as_me:8138: \"$ac_try\"") >&5
8139   (eval $ac_try) 2>&5
8140   ac_status=$?
8141   echo "$as_me:8141: \$? = $ac_status" >&5
8142   (exit $ac_status); }; }; then
8143   ac_cv_sys_large_files=1; break
8144 else
8145   echo "$as_me: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 fi
8148 rm -f conftest.$ac_objext conftest.$ac_ext
8149   break
8150 done
8151 fi
8152 echo "$as_me:8152: result: $ac_cv_sys_large_files" >&5
8153 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8154 if test "$ac_cv_sys_large_files" != no; then
8155
8156 cat >>confdefs.h <<EOF
8157 #define _LARGE_FILES $ac_cv_sys_large_files
8158 EOF
8159
8160 fi
8161 rm -f conftest*
8162 fi
8163
8164     if test "$enable_largefile" != no ; then
8165         echo "$as_me:8165: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8166 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8167 if test "${ac_cv_sys_largefile_source+set}" = set; then
8168   echo $ECHO_N "(cached) $ECHO_C" >&6
8169 else
8170   while :; do
8171   ac_cv_sys_largefile_source=no
8172   cat >conftest.$ac_ext <<_ACEOF
8173 #line 8173 "configure"
8174 #include "confdefs.h"
8175 #include <stdio.h>
8176 int
8177 main ()
8178 {
8179 return !fseeko;
8180   ;
8181   return 0;
8182 }
8183 _ACEOF
8184 rm -f conftest.$ac_objext
8185 if { (eval echo "$as_me:8185: \"$ac_compile\"") >&5
8186   (eval $ac_compile) 2>&5
8187   ac_status=$?
8188   echo "$as_me:8188: \$? = $ac_status" >&5
8189   (exit $ac_status); } &&
8190          { ac_try='test -s conftest.$ac_objext'
8191   { (eval echo "$as_me:8191: \"$ac_try\"") >&5
8192   (eval $ac_try) 2>&5
8193   ac_status=$?
8194   echo "$as_me:8194: \$? = $ac_status" >&5
8195   (exit $ac_status); }; }; then
8196   break
8197 else
8198   echo "$as_me: failed program was:" >&5
8199 cat conftest.$ac_ext >&5
8200 fi
8201 rm -f conftest.$ac_objext conftest.$ac_ext
8202   cat >conftest.$ac_ext <<_ACEOF
8203 #line 8203 "configure"
8204 #include "confdefs.h"
8205 #define _LARGEFILE_SOURCE 1
8206 #include <stdio.h>
8207 int
8208 main ()
8209 {
8210 return !fseeko;
8211   ;
8212   return 0;
8213 }
8214 _ACEOF
8215 rm -f conftest.$ac_objext
8216 if { (eval echo "$as_me:8216: \"$ac_compile\"") >&5
8217   (eval $ac_compile) 2>&5
8218   ac_status=$?
8219   echo "$as_me:8219: \$? = $ac_status" >&5
8220   (exit $ac_status); } &&
8221          { ac_try='test -s conftest.$ac_objext'
8222   { (eval echo "$as_me:8222: \"$ac_try\"") >&5
8223   (eval $ac_try) 2>&5
8224   ac_status=$?
8225   echo "$as_me:8225: \$? = $ac_status" >&5
8226   (exit $ac_status); }; }; then
8227   ac_cv_sys_largefile_source=1; break
8228 else
8229   echo "$as_me: failed program was:" >&5
8230 cat conftest.$ac_ext >&5
8231 fi
8232 rm -f conftest.$ac_objext conftest.$ac_ext
8233   break
8234 done
8235 fi
8236 echo "$as_me:8236: result: $ac_cv_sys_largefile_source" >&5
8237 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8238 if test "$ac_cv_sys_largefile_source" != no; then
8239
8240 cat >>confdefs.h <<EOF
8241 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8242 EOF
8243
8244 fi
8245 rm -f conftest*
8246
8247 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8248 # in glibc 2.1.3, but that breaks too many other things.
8249 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8250 echo "$as_me:8250: checking for fseeko" >&5
8251 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8252 if test "${ac_cv_func_fseeko+set}" = set; then
8253   echo $ECHO_N "(cached) $ECHO_C" >&6
8254 else
8255   cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258 #include <stdio.h>
8259 int
8260 main ()
8261 {
8262 return fseeko && fseeko (stdin, 0, 0);
8263   ;
8264   return 0;
8265 }
8266 _ACEOF
8267 rm -f conftest.$ac_objext conftest$ac_exeext
8268 if { (eval echo "$as_me:8268: \"$ac_link\"") >&5
8269   (eval $ac_link) 2>&5
8270   ac_status=$?
8271   echo "$as_me:8271: \$? = $ac_status" >&5
8272   (exit $ac_status); } &&
8273          { ac_try='test -s conftest$ac_exeext'
8274   { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8275   (eval $ac_try) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); }; }; then
8279   ac_cv_func_fseeko=yes
8280 else
8281   echo "$as_me: failed program was:" >&5
8282 cat conftest.$ac_ext >&5
8283 ac_cv_func_fseeko=no
8284 fi
8285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8286 fi
8287 echo "$as_me:8287: result: $ac_cv_func_fseeko" >&5
8288 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8289 if test $ac_cv_func_fseeko = yes; then
8290
8291 cat >>confdefs.h <<\EOF
8292 #define HAVE_FSEEKO 1
8293 EOF
8294
8295 fi
8296
8297         # Normally we would collect these definitions in the config.h,
8298         # but (like _XOPEN_SOURCE), some environments rely on having these
8299         # defined before any of the system headers are included.  Another
8300         # case comes up with C++, e.g., on AIX the compiler compiles the
8301         # header files by themselves before looking at the body files it is
8302         # told to compile.  For ncurses, those header files do not include
8303         # the config.h
8304         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8305         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8306         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8307
8308         echo "$as_me:8308: checking whether to use struct dirent64" >&5
8309 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8310 if test "${cf_cv_struct_dirent64+set}" = set; then
8311   echo $ECHO_N "(cached) $ECHO_C" >&6
8312 else
8313
8314                 cat >conftest.$ac_ext <<_ACEOF
8315 #line 8315 "configure"
8316 #include "confdefs.h"
8317
8318 #include <sys/types.h>
8319 #include <dirent.h>
8320
8321 int
8322 main ()
8323 {
8324
8325                 /* if transitional largefile support is setup, this is true */
8326                 extern struct dirent64 * readdir(DIR *);
8327                 struct dirent64 *x = readdir((DIR *)0);
8328                 struct dirent *y = readdir((DIR *)0);
8329                 int z = x - y;
8330
8331   ;
8332   return 0;
8333 }
8334 _ACEOF
8335 rm -f conftest.$ac_objext
8336 if { (eval echo "$as_me:8336: \"$ac_compile\"") >&5
8337   (eval $ac_compile) 2>&5
8338   ac_status=$?
8339   echo "$as_me:8339: \$? = $ac_status" >&5
8340   (exit $ac_status); } &&
8341          { ac_try='test -s conftest.$ac_objext'
8342   { (eval echo "$as_me:8342: \"$ac_try\"") >&5
8343   (eval $ac_try) 2>&5
8344   ac_status=$?
8345   echo "$as_me:8345: \$? = $ac_status" >&5
8346   (exit $ac_status); }; }; then
8347   cf_cv_struct_dirent64=yes
8348 else
8349   echo "$as_me: failed program was:" >&5
8350 cat conftest.$ac_ext >&5
8351 cf_cv_struct_dirent64=no
8352 fi
8353 rm -f conftest.$ac_objext conftest.$ac_ext
8354
8355 fi
8356 echo "$as_me:8356: result: $cf_cv_struct_dirent64" >&5
8357 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8358         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8359 #define HAVE_STRUCT_DIRENT64 1
8360 EOF
8361
8362     fi
8363
8364 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8365 echo "$as_me:8365: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8366 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8367
8368 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8369 if test "${enable_tparm_varargs+set}" = set; then
8370   enableval="$enable_tparm_varargs"
8371   with_tparm_varargs=$enableval
8372 else
8373   with_tparm_varargs=yes
8374 fi;
8375 echo "$as_me:8375: result: $with_tparm_varargs" >&5
8376 echo "${ECHO_T}$with_tparm_varargs" >&6
8377 NCURSES_TPARM_VARARGS=0
8378 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8379
8380 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8381 if test "$with_ticlib" != no ; then
8382 echo "$as_me:8382: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8383 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8384
8385 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8386 if test "${enable_tic_depends+set}" = set; then
8387   enableval="$enable_tic_depends"
8388   with_tic_depends=$enableval
8389 else
8390   with_tic_depends=yes
8391 fi;
8392 echo "$as_me:8392: result: $with_tic_depends" >&5
8393 echo "${ECHO_T}$with_tic_depends" >&6
8394 else
8395         with_tic_depends=no
8396 fi
8397
8398 ###   use option --with-bool to override bool's type
8399 echo "$as_me:8399: checking for type of bool" >&5
8400 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8401
8402 # Check whether --with-bool or --without-bool was given.
8403 if test "${with_bool+set}" = set; then
8404   withval="$with_bool"
8405   NCURSES_BOOL="$withval"
8406 else
8407   NCURSES_BOOL=auto
8408 fi;
8409 echo "$as_me:8409: result: $NCURSES_BOOL" >&5
8410 echo "${ECHO_T}$NCURSES_BOOL" >&6
8411
8412 echo "$as_me:8412: checking for alternate terminal capabilities file" >&5
8413 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8414
8415 # Check whether --with-caps or --without-caps was given.
8416 if test "${with_caps+set}" = set; then
8417   withval="$with_caps"
8418   TERMINFO_CAPS=Caps.$withval
8419 else
8420   TERMINFO_CAPS=Caps
8421 fi;
8422 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8423 echo "$as_me:8423: result: $TERMINFO_CAPS" >&5
8424 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8425
8426 ###   use option --with-chtype to override chtype's type
8427 echo "$as_me:8427: checking for type of chtype" >&5
8428 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8429
8430 # Check whether --with-chtype or --without-chtype was given.
8431 if test "${with_chtype+set}" = set; then
8432   withval="$with_chtype"
8433   NCURSES_CHTYPE="$withval"
8434 else
8435   NCURSES_CHTYPE=auto
8436 fi;
8437 echo "$as_me:8437: result: $NCURSES_CHTYPE" >&5
8438 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8439
8440 ###   use option --with-ospeed to override ospeed's type
8441 echo "$as_me:8441: checking for type of ospeed" >&5
8442 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8443
8444 # Check whether --with-ospeed or --without-ospeed was given.
8445 if test "${with_ospeed+set}" = set; then
8446   withval="$with_ospeed"
8447   NCURSES_OSPEED="$withval"
8448 else
8449   NCURSES_OSPEED=short
8450 fi;
8451 echo "$as_me:8451: result: $NCURSES_OSPEED" >&5
8452 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8453
8454 ###   use option --with-mmask-t to override mmask_t's type
8455 echo "$as_me:8455: checking for type of mmask_t" >&5
8456 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8457
8458 # Check whether --with-mmask-t or --without-mmask-t was given.
8459 if test "${with_mmask_t+set}" = set; then
8460   withval="$with_mmask_t"
8461   NCURSES_MMASK_T="$withval"
8462 else
8463   NCURSES_MMASK_T=auto
8464 fi;
8465 echo "$as_me:8465: result: $NCURSES_MMASK_T" >&5
8466 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8467
8468 ### Enable compiling-in rcs id's
8469 echo "$as_me:8469: checking if RCS identifiers should be compiled-in" >&5
8470 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8471
8472 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8473 if test "${with_rcs_ids+set}" = set; then
8474   withval="$with_rcs_ids"
8475   with_rcs_ids=$withval
8476 else
8477   with_rcs_ids=no
8478 fi;
8479 echo "$as_me:8479: result: $with_rcs_ids" >&5
8480 echo "${ECHO_T}$with_rcs_ids" >&6
8481 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8482 #define USE_RCS_IDS 1
8483 EOF
8484
8485 ###############################################################################
8486
8487 echo "$as_me:8487: checking format of man-pages" >&5
8488 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8489
8490 # Check whether --with-manpage-format or --without-manpage-format was given.
8491 if test "${with_manpage_format+set}" = set; then
8492   withval="$with_manpage_format"
8493   MANPAGE_FORMAT=$withval
8494 else
8495   MANPAGE_FORMAT=unknown
8496 fi;
8497
8498 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8499 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8500
8501 cf_unknown=
8502
8503 case $MANPAGE_FORMAT in
8504 unknown)
8505   if test -z "$MANPATH" ; then
8506     MANPATH="/usr/man:/usr/share/man"
8507   fi
8508
8509   # look for the 'date' man-page (it's most likely to be installed!)
8510   MANPAGE_FORMAT=
8511   cf_preform=no
8512   cf_catonly=yes
8513   cf_example=date
8514
8515   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8516   for cf_dir in $MANPATH; do
8517     test -z "$cf_dir" && cf_dir=/usr/man
8518     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
8519     do
8520       cf_test=`echo $cf_name | sed -e 's/*//'`
8521       if test "x$cf_test" = "x$cf_name" ; then
8522
8523         case "$cf_name" in
8524         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8525         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8526         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8527         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8528         esac
8529
8530         case "$cf_name" in
8531         $cf_dir/man*)
8532           cf_catonly=no
8533           ;;
8534         $cf_dir/cat*)
8535           cf_preform=yes
8536           ;;
8537         esac
8538         break
8539       fi
8540
8541       # if we found a match in either man* or cat*, stop looking
8542       if test -n "$MANPAGE_FORMAT" ; then
8543         cf_found=no
8544         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8545         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8546         case "$cf_name" in
8547         $cf_dir/cat*)
8548           cf_found=yes
8549           ;;
8550         esac
8551         test $cf_found=yes && break
8552       fi
8553     done
8554     # only check the first directory in $MANPATH where we find manpages
8555     if test -n "$MANPAGE_FORMAT" ; then
8556        break
8557     fi
8558   done
8559   # if we did not find the example, just assume it is normal
8560   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8561   IFS="$ac_save_ifs"
8562   ;;
8563 *)
8564   for cf_option in $MANPAGE_FORMAT; do
8565      case $cf_option in #(vi
8566      gzip|compress|BSDI|normal|formatted|catonly)
8567        ;;
8568      *)
8569        cf_unknown="$cf_unknown $cf_option"
8570        ;;
8571      esac
8572   done
8573   ;;
8574 esac
8575
8576 echo "$as_me:8576: result: $MANPAGE_FORMAT" >&5
8577 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8578 if test -n "$cf_unknown" ; then
8579   { echo "$as_me:8579: WARNING: Unexpected manpage-format $cf_unknown" >&5
8580 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8581 fi
8582
8583 echo "$as_me:8583: checking for manpage renaming" >&5
8584 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8585
8586 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8587 if test "${with_manpage_renames+set}" = set; then
8588   withval="$with_manpage_renames"
8589   MANPAGE_RENAMES=$withval
8590 else
8591   MANPAGE_RENAMES=yes
8592 fi;
8593
8594 case ".$MANPAGE_RENAMES" in #(vi
8595 .no) #(vi
8596   ;;
8597 .|.yes)
8598   # Debian 'man' program?
8599   if test -f /etc/debian_version ; then
8600     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8601   else
8602     MANPAGE_RENAMES=no
8603   fi
8604   ;;
8605 esac
8606
8607 if test "$MANPAGE_RENAMES" != no ; then
8608   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8609     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8610   elif test ! -f $MANPAGE_RENAMES ; then
8611     { { echo "$as_me:8611: error: not a filename: $MANPAGE_RENAMES" >&5
8612 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8613    { (exit 1); exit 1; }; }
8614   fi
8615
8616   test ! -d man && mkdir man
8617
8618   # Construct a sed-script to perform renaming within man-pages
8619   if test -n "$MANPAGE_RENAMES" ; then
8620     test ! -d man && mkdir man
8621     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8622   fi
8623 fi
8624
8625 echo "$as_me:8625: result: $MANPAGE_RENAMES" >&5
8626 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8627
8628 echo "$as_me:8628: checking if manpage aliases will be installed" >&5
8629 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8630
8631 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8632 if test "${with_manpage_aliases+set}" = set; then
8633   withval="$with_manpage_aliases"
8634   MANPAGE_ALIASES=$withval
8635 else
8636   MANPAGE_ALIASES=yes
8637 fi;
8638
8639 echo "$as_me:8639: result: $MANPAGE_ALIASES" >&5
8640 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8641
8642 if test "$LN_S" = "ln -s"; then
8643         cf_use_symlinks=yes
8644 else
8645         cf_use_symlinks=no
8646 fi
8647
8648 MANPAGE_SYMLINKS=no
8649 if test "$MANPAGE_ALIASES" = yes ; then
8650 echo "$as_me:8650: checking if manpage symlinks should be used" >&5
8651 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8652
8653 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8654 if test "${with_manpage_symlinks+set}" = set; then
8655   withval="$with_manpage_symlinks"
8656   MANPAGE_SYMLINKS=$withval
8657 else
8658   MANPAGE_SYMLINKS=$cf_use_symlinks
8659 fi;
8660
8661 if test "$$cf_use_symlinks" = no; then
8662 if test "$MANPAGE_SYMLINKS" = yes ; then
8663         { echo "$as_me:8663: WARNING: cannot make symlinks" >&5
8664 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8665         MANPAGE_SYMLINKS=no
8666 fi
8667 fi
8668
8669 echo "$as_me:8669: result: $MANPAGE_SYMLINKS" >&5
8670 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8671 fi
8672
8673 echo "$as_me:8673: checking for manpage tbl" >&5
8674 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8675
8676 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8677 if test "${with_manpage_tbl+set}" = set; then
8678   withval="$with_manpage_tbl"
8679   MANPAGE_TBL=$withval
8680 else
8681   MANPAGE_TBL=no
8682 fi;
8683
8684 echo "$as_me:8684: result: $MANPAGE_TBL" >&5
8685 echo "${ECHO_T}$MANPAGE_TBL" >&6
8686
8687   if test "$prefix" = "NONE" ; then
8688      cf_prefix="$ac_default_prefix"
8689   else
8690      cf_prefix="$prefix"
8691   fi
8692
8693   case "$MANPAGE_FORMAT" in # (vi
8694   *catonly*) # (vi
8695     cf_format=yes
8696     cf_inboth=no
8697     ;;
8698   *formatted*) # (vi
8699     cf_format=yes
8700     cf_inboth=yes
8701     ;;
8702   *)
8703     cf_format=no
8704     cf_inboth=no
8705     ;;
8706   esac
8707
8708 test ! -d man && mkdir man
8709
8710 cf_so_strip=
8711 cf_compress=
8712 case "$MANPAGE_FORMAT" in #(vi
8713 *compress*) #(vi
8714         cf_so_strip="Z"
8715         cf_compress=compress
8716   ;;
8717 *gzip*) #(vi
8718         cf_so_strip="gz"
8719         cf_compress=gzip
8720   ;;
8721 esac
8722
8723 cf_edit_man=./edit_man.sh
8724 cf_man_alias=`pwd`/man_alias.sed
8725
8726 cat >$cf_edit_man <<CF_EOF
8727 #! /bin/sh
8728 # this script is generated by the configure-script CF_MAN_PAGES macro.
8729
8730 prefix="$cf_prefix"
8731 datadir="$datadir"
8732
8733 NCURSES_MAJOR="$NCURSES_MAJOR"
8734 NCURSES_MINOR="$NCURSES_MINOR"
8735 NCURSES_PATCH="$NCURSES_PATCH"
8736
8737 NCURSES_OSPEED="$NCURSES_OSPEED"
8738 TERMINFO="$TERMINFO"
8739
8740 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8741
8742 INSTALL="$INSTALL"
8743 INSTALL_DATA="$INSTALL_DATA"
8744
8745 transform="$program_transform_name"
8746
8747 TMP=\${TMPDIR-/tmp}/man\$\$
8748 trap "rm -f \$TMP" 0 1 2 5 15
8749
8750 form=\$1
8751 shift || exit 1
8752
8753 verb=\$1
8754 shift || exit 1
8755
8756 mandir=\$1
8757 shift || exit 1
8758
8759 srcdir=\$1
8760 top_srcdir=\$srcdir/..
8761 shift || exit 1
8762
8763 if test "\$form" = normal ; then
8764         if test "$cf_format" = yes ; then
8765         if test "$cf_inboth" = no ; then
8766                 sh \$0 format \$verb \$mandir \$srcdir \$*
8767                 exit $?
8768         fi
8769         fi
8770         cf_subdir=\$mandir/man
8771         cf_tables=$MANPAGE_TBL
8772 else
8773         cf_subdir=\$mandir/cat
8774         cf_tables=yes
8775 fi
8776
8777 # process the list of source-files
8778 for i in \$* ; do
8779 case \$i in #(vi
8780 *.orig|*.rej) ;; #(vi
8781 *.[0-9]*)
8782         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8783         if test \$verb = installing ; then
8784         if test ! -d \$cf_subdir\${section} ; then
8785                 \$MKDIRS \$cf_subdir\$section
8786         fi
8787         fi
8788
8789         # replace variables in man page
8790         if test ! -f $cf_man_alias ; then
8791 cat >>$cf_man_alias <<-CF_EOF2
8792                 s,@DATADIR@,\$datadir,g
8793                 s,@TERMINFO@,\$TERMINFO,g
8794                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8795                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8796                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8797                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8798 CF_EOF
8799
8800         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
8801         do
8802                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8803                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8804 cat >>$cf_edit_man <<-CF_EOF
8805                 s,@$cf_NAME@,$cf_name,
8806 CF_EOF
8807         done
8808
8809 cat >>$cf_edit_man <<CF_EOF
8810 CF_EOF2
8811                 echo "...made $cf_man_alias"
8812         fi
8813
8814         aliases=
8815         cf_source=\`basename \$i\`
8816         inalias=\$cf_source
8817         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8818         if test ! -f \$inalias ; then
8819                 echo .. skipped \$cf_source
8820                 continue
8821         fi
8822 CF_EOF
8823
8824 if test "$MANPAGE_ALIASES" != no ; then
8825 cat >>$cf_edit_man <<CF_EOF
8826         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8827 CF_EOF
8828 fi
8829
8830 if test "$MANPAGE_RENAMES" = no ; then
8831 cat >>$cf_edit_man <<CF_EOF
8832         # perform program transformations for section 1 man pages
8833         if test \$section = 1 ; then
8834                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8835         else
8836                 cf_target=\$cf_subdir\${section}/\$cf_source
8837         fi
8838 CF_EOF
8839 else
8840 cat >>$cf_edit_man <<CF_EOF
8841         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8842         if test -z "\$cf_target" ; then
8843                 echo '? missing rename for '\$cf_source
8844                 cf_target="\$cf_source"
8845         fi
8846         cf_target="\$cf_subdir\${section}/\${cf_target}"
8847
8848 CF_EOF
8849 fi
8850
8851 cat >>$cf_edit_man <<CF_EOF
8852         sed     -f $cf_man_alias \\
8853 CF_EOF
8854
8855 if test -f $MANPAGE_RENAMES ; then
8856 cat >>$cf_edit_man <<CF_EOF
8857                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8858 CF_EOF
8859 else
8860 cat >>$cf_edit_man <<CF_EOF
8861                 < \$i >\$TMP
8862 CF_EOF
8863 fi
8864
8865 cat >>$cf_edit_man <<CF_EOF
8866 if test \$cf_tables = yes ; then
8867         tbl \$TMP >\$TMP.out
8868         mv \$TMP.out \$TMP
8869 fi
8870 CF_EOF
8871
8872 if test $with_curses_h != yes ; then
8873 cat >>$cf_edit_man <<CF_EOF
8874         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8875         mv \$TMP.out \$TMP
8876 CF_EOF
8877 fi
8878
8879 cat >>$cf_edit_man <<CF_EOF
8880         if test \$form = format ; then
8881                 nroff -man \$TMP >\$TMP.out
8882                 mv \$TMP.out \$TMP
8883         fi
8884 CF_EOF
8885
8886 if test -n "$cf_compress" ; then
8887 cat >>$cf_edit_man <<CF_EOF
8888         if test \$verb = installing ; then
8889         if ( $cf_compress -f \$TMP )
8890         then
8891                 mv \$TMP.$cf_so_strip \$TMP
8892         fi
8893         fi
8894         cf_target="\$cf_target.$cf_so_strip"
8895 CF_EOF
8896 fi
8897
8898 case "$MANPAGE_FORMAT" in #(vi
8899 *BSDI*)
8900 cat >>$cf_edit_man <<CF_EOF
8901         if test \$form = format ; then
8902                 # BSDI installs only .0 suffixes in the cat directories
8903                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8904         fi
8905 CF_EOF
8906   ;;
8907 esac
8908
8909 cat >>$cf_edit_man <<CF_EOF
8910         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8911         if test \$verb = installing ; then
8912                 echo \$verb \$cf_target
8913                 \$INSTALL_DATA \$TMP \$cf_target
8914                 test -d \$cf_subdir\${section} &&
8915                 test -n "\$aliases" && (
8916                         cd \$cf_subdir\${section} && (
8917                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8918                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8919                                 cf_target=\`basename \$cf_target\`
8920                                 for cf_alias in \$aliases
8921                                 do
8922                                         if test \$section = 1 ; then
8923                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8924                                         fi
8925
8926                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8927                                                 if test -f \$cf_alias\${suffix} ; then
8928                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8929                                                         then
8930                                                                 continue
8931                                                         fi
8932                                                 fi
8933                                                 echo .. \$verb alias \$cf_alias\${suffix}
8934                                                 rm -f \$cf_alias\${suffix}
8935                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8936                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8937                                                 echo ".so \$cf_source" >\$TMP
8938 CF_EOF
8939 if test -n "$cf_compress" ; then
8940 cat >>$cf_edit_man <<CF_EOF
8941                                                 if test -n "$cf_so_strip" ; then
8942                                                         $cf_compress -f \$TMP
8943                                                         mv \$TMP.$cf_so_strip \$TMP
8944                                                 fi
8945 CF_EOF
8946 fi
8947 cat >>$cf_edit_man <<CF_EOF
8948                                                 echo .. \$verb alias \$cf_alias\${suffix}
8949                                                 rm -f \$cf_alias\${suffix}
8950                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8951                                         fi
8952                                 done
8953                         )
8954                 )
8955         elif test \$verb = removing ; then
8956                 test -f \$cf_target && (
8957                         echo \$verb \$cf_target
8958                         rm -f \$cf_target
8959                 )
8960                 test -d \$cf_subdir\${section} &&
8961                 test -n "\$aliases" && (
8962                         cd \$cf_subdir\${section} && (
8963                                 for cf_alias in \$aliases
8964                                 do
8965                                         if test \$section = 1 ; then
8966                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8967                                         fi
8968
8969                                         echo .. \$verb alias \$cf_alias\${suffix}
8970                                         rm -f \$cf_alias\${suffix}
8971                                 done
8972                         )
8973                 )
8974         else
8975 #               echo ".hy 0"
8976                 cat \$TMP
8977         fi
8978         ;;
8979 esac
8980 done
8981
8982 if test $cf_inboth = yes ; then
8983 if test \$form != format ; then
8984         sh \$0 format \$verb \$mandir \$srcdir \$*
8985 fi
8986 fi
8987
8988 exit 0
8989 CF_EOF
8990 chmod 755 $cf_edit_man
8991
8992 ###############################################################################
8993
8994 ### Note that some functions (such as const) are normally disabled anyway.
8995 echo "$as_me:8995: checking if you want to build with function extensions" >&5
8996 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8997
8998 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8999 if test "${enable_ext_funcs+set}" = set; then
9000   enableval="$enable_ext_funcs"
9001   with_ext_funcs=$enableval
9002 else
9003   with_ext_funcs=yes
9004 fi;
9005 echo "$as_me:9005: result: $with_ext_funcs" >&5
9006 echo "${ECHO_T}$with_ext_funcs" >&6
9007 if test "$with_ext_funcs" = yes ; then
9008         NCURSES_EXT_FUNCS=1
9009         cat >>confdefs.h <<\EOF
9010 #define HAVE_CURSES_VERSION 1
9011 EOF
9012
9013         cat >>confdefs.h <<\EOF
9014 #define HAVE_HAS_KEY 1
9015 EOF
9016
9017         cat >>confdefs.h <<\EOF
9018 #define HAVE_RESIZETERM 1
9019 EOF
9020
9021         cat >>confdefs.h <<\EOF
9022 #define HAVE_RESIZE_TERM 1
9023 EOF
9024
9025         cat >>confdefs.h <<\EOF
9026 #define HAVE_USE_DEFAULT_COLORS 1
9027 EOF
9028
9029         cat >>confdefs.h <<\EOF
9030 #define HAVE_WRESIZE 1
9031 EOF
9032
9033         cat >>confdefs.h <<\EOF
9034 #define NCURSES_EXT_FUNCS 1
9035 EOF
9036
9037         GENERATED_EXT_FUNCS=generated
9038 else
9039         NCURSES_EXT_FUNCS=0
9040         GENERATED_EXT_FUNCS=
9041 fi
9042
9043 ###   use option --enable-const to turn on use of const beyond that in XSI.
9044 echo "$as_me:9044: checking for extended use of const keyword" >&5
9045 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9046
9047 # Check whether --enable-const or --disable-const was given.
9048 if test "${enable_const+set}" = set; then
9049   enableval="$enable_const"
9050   with_ext_const=$enableval
9051 else
9052   with_ext_const=no
9053 fi;
9054 echo "$as_me:9054: result: $with_ext_const" >&5
9055 echo "${ECHO_T}$with_ext_const" >&6
9056 NCURSES_CONST='/*nothing*/'
9057 if test "$with_ext_const" = yes ; then
9058         NCURSES_CONST=const
9059 fi
9060
9061 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9062 echo "$as_me:9062: checking if you want to use extended colors" >&5
9063 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9064
9065 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9066 if test "${enable_ext_colors+set}" = set; then
9067   enableval="$enable_ext_colors"
9068   with_ext_colors=$enableval
9069 else
9070   with_ext_colors=no
9071 fi;
9072 echo "$as_me:9072: result: $with_ext_colors" >&5
9073 echo "${ECHO_T}$with_ext_colors" >&6
9074 NCURSES_EXT_COLORS=0
9075 if test "$with_ext_colors" = yes ; then
9076         if test "$with_widec" != yes ; then
9077                 { { echo "$as_me:9077: error: This option applies only to wide-character library" >&5
9078 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9079    { (exit 1); exit 1; }; }
9080         else
9081                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9082
9083 if test "${with_abi_version+set}" != set; then
9084         case $cf_cv_rel_version in
9085         5.*)
9086                 cf_cv_rel_version=6.0
9087                 cf_cv_abi_version=6
9088                 { echo "$as_me:9088: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9089 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9090                 ;;
9091         esac
9092 fi
9093
9094         fi
9095         NCURSES_EXT_COLORS=1
9096         cat >>confdefs.h <<\EOF
9097 #define NCURSES_EXT_COLORS 1
9098 EOF
9099
9100 fi
9101
9102 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9103 echo "$as_me:9103: checking if you want to use extended mouse encoding" >&5
9104 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9105
9106 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9107 if test "${enable_ext_mouse+set}" = set; then
9108   enableval="$enable_ext_mouse"
9109   with_ext_mouse=$enableval
9110 else
9111   with_ext_mouse=no
9112 fi;
9113 echo "$as_me:9113: result: $with_ext_mouse" >&5
9114 echo "${ECHO_T}$with_ext_mouse" >&6
9115 NCURSES_MOUSE_VERSION=1
9116 if test "$with_ext_mouse" = yes ; then
9117         NCURSES_MOUSE_VERSION=2
9118
9119 if test "${with_abi_version+set}" != set; then
9120         case $cf_cv_rel_version in
9121         5.*)
9122                 cf_cv_rel_version=6.0
9123                 cf_cv_abi_version=6
9124                 { echo "$as_me:9124: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9125 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9126                 ;;
9127         esac
9128 fi
9129
9130 fi
9131
9132 echo "$as_me:9132: checking if you want \$NCURSES_NO_PADDING code" >&5
9133 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9134
9135 # Check whether --enable-no-padding or --disable-no-padding was given.
9136 if test "${enable_no_padding+set}" = set; then
9137   enableval="$enable_no_padding"
9138   with_no_padding=$enableval
9139 else
9140   with_no_padding=$with_ext_funcs
9141 fi;
9142 echo "$as_me:9142: result: $with_no_padding" >&5
9143 echo "${ECHO_T}$with_no_padding" >&6
9144 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9145 #define NCURSES_NO_PADDING 1
9146 EOF
9147
9148 echo "$as_me:9148: checking for ANSI C header files" >&5
9149 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9150 if test "${ac_cv_header_stdc+set}" = set; then
9151   echo $ECHO_N "(cached) $ECHO_C" >&6
9152 else
9153   cat >conftest.$ac_ext <<_ACEOF
9154 #line 9154 "configure"
9155 #include "confdefs.h"
9156 #include <stdlib.h>
9157 #include <stdarg.h>
9158 #include <string.h>
9159 #include <float.h>
9160
9161 _ACEOF
9162 if { (eval echo "$as_me:9162: \"$ac_cpp conftest.$ac_ext\"") >&5
9163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9164   ac_status=$?
9165   egrep -v '^ *\+' conftest.er1 >conftest.err
9166   rm -f conftest.er1
9167   cat conftest.err >&5
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); } >/dev/null; then
9170   if test -s conftest.err; then
9171     ac_cpp_err=$ac_c_preproc_warn_flag
9172   else
9173     ac_cpp_err=
9174   fi
9175 else
9176   ac_cpp_err=yes
9177 fi
9178 if test -z "$ac_cpp_err"; then
9179   ac_cv_header_stdc=yes
9180 else
9181   echo "$as_me: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   ac_cv_header_stdc=no
9184 fi
9185 rm -f conftest.err conftest.$ac_ext
9186
9187 if test $ac_cv_header_stdc = yes; then
9188   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9189   cat >conftest.$ac_ext <<_ACEOF
9190 #line 9190 "configure"
9191 #include "confdefs.h"
9192 #include <string.h>
9193
9194 _ACEOF
9195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9196   egrep "memchr" >/dev/null 2>&1; then
9197   :
9198 else
9199   ac_cv_header_stdc=no
9200 fi
9201 rm -f conftest*
9202
9203 fi
9204
9205 if test $ac_cv_header_stdc = yes; then
9206   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9207   cat >conftest.$ac_ext <<_ACEOF
9208 #line 9208 "configure"
9209 #include "confdefs.h"
9210 #include <stdlib.h>
9211
9212 _ACEOF
9213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9214   egrep "free" >/dev/null 2>&1; then
9215   :
9216 else
9217   ac_cv_header_stdc=no
9218 fi
9219 rm -f conftest*
9220
9221 fi
9222
9223 if test $ac_cv_header_stdc = yes; then
9224   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9225   if test "$cross_compiling" = yes; then
9226   :
9227 else
9228   cat >conftest.$ac_ext <<_ACEOF
9229 #line 9229 "configure"
9230 #include "confdefs.h"
9231 #include <ctype.h>
9232 #if ((' ' & 0x0FF) == 0x020)
9233 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9234 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9235 #else
9236 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9237                      || ('j' <= (c) && (c) <= 'r') \
9238                      || ('s' <= (c) && (c) <= 'z'))
9239 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9240 #endif
9241
9242 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9243 int
9244 main ()
9245 {
9246   int i;
9247   for (i = 0; i < 256; i++)
9248     if (XOR (islower (i), ISLOWER (i))
9249         || toupper (i) != TOUPPER (i))
9250       $ac_main_return(2);
9251   $ac_main_return (0);
9252 }
9253 _ACEOF
9254 rm -f conftest$ac_exeext
9255 if { (eval echo "$as_me:9255: \"$ac_link\"") >&5
9256   (eval $ac_link) 2>&5
9257   ac_status=$?
9258   echo "$as_me:9258: \$? = $ac_status" >&5
9259   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9260   { (eval echo "$as_me:9260: \"$ac_try\"") >&5
9261   (eval $ac_try) 2>&5
9262   ac_status=$?
9263   echo "$as_me:9263: \$? = $ac_status" >&5
9264   (exit $ac_status); }; }; then
9265   :
9266 else
9267   echo "$as_me: program exited with status $ac_status" >&5
9268 echo "$as_me: failed program was:" >&5
9269 cat conftest.$ac_ext >&5
9270 ac_cv_header_stdc=no
9271 fi
9272 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9273 fi
9274 fi
9275 fi
9276 echo "$as_me:9276: result: $ac_cv_header_stdc" >&5
9277 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9278 if test $ac_cv_header_stdc = yes; then
9279
9280 cat >>confdefs.h <<\EOF
9281 #define STDC_HEADERS 1
9282 EOF
9283
9284 fi
9285
9286 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9287
9288 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9289                   inttypes.h stdint.h unistd.h
9290 do
9291 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9292 echo "$as_me:9292: checking for $ac_header" >&5
9293 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9294 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9295   echo $ECHO_N "(cached) $ECHO_C" >&6
9296 else
9297   cat >conftest.$ac_ext <<_ACEOF
9298 #line 9298 "configure"
9299 #include "confdefs.h"
9300 $ac_includes_default
9301 #include <$ac_header>
9302 _ACEOF
9303 rm -f conftest.$ac_objext
9304 if { (eval echo "$as_me:9304: \"$ac_compile\"") >&5
9305   (eval $ac_compile) 2>&5
9306   ac_status=$?
9307   echo "$as_me:9307: \$? = $ac_status" >&5
9308   (exit $ac_status); } &&
9309          { ac_try='test -s conftest.$ac_objext'
9310   { (eval echo "$as_me:9310: \"$ac_try\"") >&5
9311   (eval $ac_try) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit $ac_status); }; }; then
9315   eval "$as_ac_Header=yes"
9316 else
9317   echo "$as_me: failed program was:" >&5
9318 cat conftest.$ac_ext >&5
9319 eval "$as_ac_Header=no"
9320 fi
9321 rm -f conftest.$ac_objext conftest.$ac_ext
9322 fi
9323 echo "$as_me:9323: result: `eval echo '${'$as_ac_Header'}'`" >&5
9324 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9325 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9326   cat >>confdefs.h <<EOF
9327 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9328 EOF
9329
9330 fi
9331 done
9332
9333 echo "$as_me:9333: checking for signed char" >&5
9334 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9335 if test "${ac_cv_type_signed_char+set}" = set; then
9336   echo $ECHO_N "(cached) $ECHO_C" >&6
9337 else
9338   cat >conftest.$ac_ext <<_ACEOF
9339 #line 9339 "configure"
9340 #include "confdefs.h"
9341 $ac_includes_default
9342 int
9343 main ()
9344 {
9345 if ((signed char *) 0)
9346   return 0;
9347 if (sizeof (signed char))
9348   return 0;
9349   ;
9350   return 0;
9351 }
9352 _ACEOF
9353 rm -f conftest.$ac_objext
9354 if { (eval echo "$as_me:9354: \"$ac_compile\"") >&5
9355   (eval $ac_compile) 2>&5
9356   ac_status=$?
9357   echo "$as_me:9357: \$? = $ac_status" >&5
9358   (exit $ac_status); } &&
9359          { ac_try='test -s conftest.$ac_objext'
9360   { (eval echo "$as_me:9360: \"$ac_try\"") >&5
9361   (eval $ac_try) 2>&5
9362   ac_status=$?
9363   echo "$as_me:9363: \$? = $ac_status" >&5
9364   (exit $ac_status); }; }; then
9365   ac_cv_type_signed_char=yes
9366 else
9367   echo "$as_me: failed program was:" >&5
9368 cat conftest.$ac_ext >&5
9369 ac_cv_type_signed_char=no
9370 fi
9371 rm -f conftest.$ac_objext conftest.$ac_ext
9372 fi
9373 echo "$as_me:9373: result: $ac_cv_type_signed_char" >&5
9374 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9375
9376 echo "$as_me:9376: checking size of signed char" >&5
9377 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9378 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9379   echo $ECHO_N "(cached) $ECHO_C" >&6
9380 else
9381   if test "$ac_cv_type_signed_char" = yes; then
9382   if test "$cross_compiling" = yes; then
9383   # Depending upon the size, compute the lo and hi bounds.
9384 cat >conftest.$ac_ext <<_ACEOF
9385 #line 9385 "configure"
9386 #include "confdefs.h"
9387 $ac_includes_default
9388 int
9389 main ()
9390 {
9391 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9392   ;
9393   return 0;
9394 }
9395 _ACEOF
9396 rm -f conftest.$ac_objext
9397 if { (eval echo "$as_me:9397: \"$ac_compile\"") >&5
9398   (eval $ac_compile) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); } &&
9402          { ac_try='test -s conftest.$ac_objext'
9403   { (eval echo "$as_me:9403: \"$ac_try\"") >&5
9404   (eval $ac_try) 2>&5
9405   ac_status=$?
9406   echo "$as_me:9406: \$? = $ac_status" >&5
9407   (exit $ac_status); }; }; then
9408   ac_lo=0 ac_mid=0
9409   while :; do
9410     cat >conftest.$ac_ext <<_ACEOF
9411 #line 9411 "configure"
9412 #include "confdefs.h"
9413 $ac_includes_default
9414 int
9415 main ()
9416 {
9417 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9418   ;
9419   return 0;
9420 }
9421 _ACEOF
9422 rm -f conftest.$ac_objext
9423 if { (eval echo "$as_me:9423: \"$ac_compile\"") >&5
9424   (eval $ac_compile) 2>&5
9425   ac_status=$?
9426   echo "$as_me:9426: \$? = $ac_status" >&5
9427   (exit $ac_status); } &&
9428          { ac_try='test -s conftest.$ac_objext'
9429   { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9430   (eval $ac_try) 2>&5
9431   ac_status=$?
9432   echo "$as_me:9432: \$? = $ac_status" >&5
9433   (exit $ac_status); }; }; then
9434   ac_hi=$ac_mid; break
9435 else
9436   echo "$as_me: failed program was:" >&5
9437 cat conftest.$ac_ext >&5
9438 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9439 fi
9440 rm -f conftest.$ac_objext conftest.$ac_ext
9441   done
9442 else
9443   echo "$as_me: failed program was:" >&5
9444 cat conftest.$ac_ext >&5
9445 ac_hi=-1 ac_mid=-1
9446   while :; do
9447     cat >conftest.$ac_ext <<_ACEOF
9448 #line 9448 "configure"
9449 #include "confdefs.h"
9450 $ac_includes_default
9451 int
9452 main ()
9453 {
9454 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9455   ;
9456   return 0;
9457 }
9458 _ACEOF
9459 rm -f conftest.$ac_objext
9460 if { (eval echo "$as_me:9460: \"$ac_compile\"") >&5
9461   (eval $ac_compile) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit $ac_status); } &&
9465          { ac_try='test -s conftest.$ac_objext'
9466   { (eval echo "$as_me:9466: \"$ac_try\"") >&5
9467   (eval $ac_try) 2>&5
9468   ac_status=$?
9469   echo "$as_me:9469: \$? = $ac_status" >&5
9470   (exit $ac_status); }; }; then
9471   ac_lo=$ac_mid; break
9472 else
9473   echo "$as_me: failed program was:" >&5
9474 cat conftest.$ac_ext >&5
9475 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9476 fi
9477 rm -f conftest.$ac_objext conftest.$ac_ext
9478   done
9479 fi
9480 rm -f conftest.$ac_objext conftest.$ac_ext
9481 # Binary search between lo and hi bounds.
9482 while test "x$ac_lo" != "x$ac_hi"; do
9483   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9484   cat >conftest.$ac_ext <<_ACEOF
9485 #line 9485 "configure"
9486 #include "confdefs.h"
9487 $ac_includes_default
9488 int
9489 main ()
9490 {
9491 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9492   ;
9493   return 0;
9494 }
9495 _ACEOF
9496 rm -f conftest.$ac_objext
9497 if { (eval echo "$as_me:9497: \"$ac_compile\"") >&5
9498   (eval $ac_compile) 2>&5
9499   ac_status=$?
9500   echo "$as_me:9500: \$? = $ac_status" >&5
9501   (exit $ac_status); } &&
9502          { ac_try='test -s conftest.$ac_objext'
9503   { (eval echo "$as_me:9503: \"$ac_try\"") >&5
9504   (eval $ac_try) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); }; }; then
9508   ac_hi=$ac_mid
9509 else
9510   echo "$as_me: failed program was:" >&5
9511 cat conftest.$ac_ext >&5
9512 ac_lo=`expr $ac_mid + 1`
9513 fi
9514 rm -f conftest.$ac_objext conftest.$ac_ext
9515 done
9516 ac_cv_sizeof_signed_char=$ac_lo
9517 else
9518   if test "$cross_compiling" = yes; then
9519   { { echo "$as_me:9519: error: cannot run test program while cross compiling" >&5
9520 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9521    { (exit 1); exit 1; }; }
9522 else
9523   cat >conftest.$ac_ext <<_ACEOF
9524 #line 9524 "configure"
9525 #include "confdefs.h"
9526 $ac_includes_default
9527 int
9528 main ()
9529 {
9530 FILE *f = fopen ("conftest.val", "w");
9531 if (!f)
9532   $ac_main_return (1);
9533 fprintf (f, "%d", (sizeof (signed char)));
9534 fclose (f);
9535   ;
9536   return 0;
9537 }
9538 _ACEOF
9539 rm -f conftest$ac_exeext
9540 if { (eval echo "$as_me:9540: \"$ac_link\"") >&5
9541   (eval $ac_link) 2>&5
9542   ac_status=$?
9543   echo "$as_me:9543: \$? = $ac_status" >&5
9544   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9545   { (eval echo "$as_me:9545: \"$ac_try\"") >&5
9546   (eval $ac_try) 2>&5
9547   ac_status=$?
9548   echo "$as_me:9548: \$? = $ac_status" >&5
9549   (exit $ac_status); }; }; then
9550   ac_cv_sizeof_signed_char=`cat conftest.val`
9551 else
9552   echo "$as_me: program exited with status $ac_status" >&5
9553 echo "$as_me: failed program was:" >&5
9554 cat conftest.$ac_ext >&5
9555 fi
9556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9557 fi
9558 fi
9559 rm -f conftest.val
9560 else
9561   ac_cv_sizeof_signed_char=0
9562 fi
9563 fi
9564 echo "$as_me:9564: result: $ac_cv_sizeof_signed_char" >&5
9565 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9566 cat >>confdefs.h <<EOF
9567 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9568 EOF
9569
9570 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9571         NCURSES_SBOOL="signed char"
9572 else
9573         NCURSES_SBOOL="char"
9574 fi
9575 echo "$as_me:9575: checking if you want to use signed Boolean array in term.h" >&5
9576 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9577
9578 # Check whether --enable-signed-char or --disable-signed-char was given.
9579 if test "${enable_signed_char+set}" = set; then
9580   enableval="$enable_signed_char"
9581   with_signed_char=$enableval
9582 else
9583   with_signed_char=no
9584 fi;
9585 echo "$as_me:9585: result: $with_signed_char" >&5
9586 echo "${ECHO_T}$with_signed_char" >&6
9587 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9588
9589 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9590 echo "$as_me:9590: checking if you want SIGWINCH handler" >&5
9591 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9592
9593 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9594 if test "${enable_sigwinch+set}" = set; then
9595   enableval="$enable_sigwinch"
9596   with_sigwinch=$enableval
9597 else
9598   with_sigwinch=$with_ext_funcs
9599 fi;
9600 echo "$as_me:9600: result: $with_sigwinch" >&5
9601 echo "${ECHO_T}$with_sigwinch" >&6
9602 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9603 #define USE_SIGWINCH 1
9604 EOF
9605
9606 ###   use option --enable-tcap-names to allow user to define new capabilities
9607 echo "$as_me:9607: checking if you want user-definable terminal capabilities like termcap" >&5
9608 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9609
9610 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9611 if test "${enable_tcap_names+set}" = set; then
9612   enableval="$enable_tcap_names"
9613   with_tcap_names=$enableval
9614 else
9615   with_tcap_names=$with_ext_funcs
9616 fi;
9617 echo "$as_me:9617: result: $with_tcap_names" >&5
9618 echo "${ECHO_T}$with_tcap_names" >&6
9619 NCURSES_XNAMES=0
9620 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9621
9622 ###############################################################################
9623 # These options are relatively safe to experiment with.
9624
9625 echo "$as_me:9625: checking if you want all development code" >&5
9626 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9627
9628 # Check whether --with-develop or --without-develop was given.
9629 if test "${with_develop+set}" = set; then
9630   withval="$with_develop"
9631   with_develop=$withval
9632 else
9633   with_develop=no
9634 fi;
9635 echo "$as_me:9635: result: $with_develop" >&5
9636 echo "${ECHO_T}$with_develop" >&6
9637
9638 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9639 echo "$as_me:9639: checking if you want hard-tabs code" >&5
9640 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9641
9642 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9643 if test "${enable_hard_tabs+set}" = set; then
9644   enableval="$enable_hard_tabs"
9645
9646 else
9647   enable_hard_tabs=$with_develop
9648 fi;
9649 echo "$as_me:9649: result: $enable_hard_tabs" >&5
9650 echo "${ECHO_T}$enable_hard_tabs" >&6
9651 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9652 #define USE_HARD_TABS 1
9653 EOF
9654
9655 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9656 echo "$as_me:9656: checking if you want limited support for xmc" >&5
9657 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9658
9659 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9660 if test "${enable_xmc_glitch+set}" = set; then
9661   enableval="$enable_xmc_glitch"
9662
9663 else
9664   enable_xmc_glitch=$with_develop
9665 fi;
9666 echo "$as_me:9666: result: $enable_xmc_glitch" >&5
9667 echo "${ECHO_T}$enable_xmc_glitch" >&6
9668 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9669 #define USE_XMC_SUPPORT 1
9670 EOF
9671
9672 ###############################################################################
9673 # These are just experimental, probably should not be in a package:
9674
9675 echo "$as_me:9675: checking if you do not want to assume colors are white-on-black" >&5
9676 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9677
9678 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9679 if test "${enable_assumed_color+set}" = set; then
9680   enableval="$enable_assumed_color"
9681   with_assumed_color=$enableval
9682 else
9683   with_assumed_color=yes
9684 fi;
9685 echo "$as_me:9685: result: $with_assumed_color" >&5
9686 echo "${ECHO_T}$with_assumed_color" >&6
9687 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9688 #define USE_ASSUMED_COLOR 1
9689 EOF
9690
9691 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9692 echo "$as_me:9692: checking if you want hashmap scrolling-optimization code" >&5
9693 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9694
9695 # Check whether --enable-hashmap or --disable-hashmap was given.
9696 if test "${enable_hashmap+set}" = set; then
9697   enableval="$enable_hashmap"
9698   with_hashmap=$enableval
9699 else
9700   with_hashmap=yes
9701 fi;
9702 echo "$as_me:9702: result: $with_hashmap" >&5
9703 echo "${ECHO_T}$with_hashmap" >&6
9704 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9705 #define USE_HASHMAP 1
9706 EOF
9707
9708 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9709 echo "$as_me:9709: checking if you want colorfgbg code" >&5
9710 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9711
9712 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9713 if test "${enable_colorfgbg+set}" = set; then
9714   enableval="$enable_colorfgbg"
9715   with_colorfgbg=$enableval
9716 else
9717   with_colorfgbg=no
9718 fi;
9719 echo "$as_me:9719: result: $with_colorfgbg" >&5
9720 echo "${ECHO_T}$with_colorfgbg" >&6
9721 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9722 #define USE_COLORFGBG 1
9723 EOF
9724
9725 # This is still experimental (20080329), but should ultimately be moved to
9726 # the script-block --with-normal, etc.
9727
9728 echo "$as_me:9728: checking if you want to link with the pthread library" >&5
9729 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9730
9731 # Check whether --with-pthread or --without-pthread was given.
9732 if test "${with_pthread+set}" = set; then
9733   withval="$with_pthread"
9734   with_pthread=$withval
9735 else
9736   with_pthread=no
9737 fi;
9738 echo "$as_me:9738: result: $with_pthread" >&5
9739 echo "${ECHO_T}$with_pthread" >&6
9740
9741 if test "$with_pthread" != no ; then
9742     echo "$as_me:9742: checking for pthread.h" >&5
9743 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9744 if test "${ac_cv_header_pthread_h+set}" = set; then
9745   echo $ECHO_N "(cached) $ECHO_C" >&6
9746 else
9747   cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <pthread.h>
9751 _ACEOF
9752 if { (eval echo "$as_me:9752: \"$ac_cpp conftest.$ac_ext\"") >&5
9753   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9754   ac_status=$?
9755   egrep -v '^ *\+' conftest.er1 >conftest.err
9756   rm -f conftest.er1
9757   cat conftest.err >&5
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); } >/dev/null; then
9760   if test -s conftest.err; then
9761     ac_cpp_err=$ac_c_preproc_warn_flag
9762   else
9763     ac_cpp_err=
9764   fi
9765 else
9766   ac_cpp_err=yes
9767 fi
9768 if test -z "$ac_cpp_err"; then
9769   ac_cv_header_pthread_h=yes
9770 else
9771   echo "$as_me: failed program was:" >&5
9772   cat conftest.$ac_ext >&5
9773   ac_cv_header_pthread_h=no
9774 fi
9775 rm -f conftest.err conftest.$ac_ext
9776 fi
9777 echo "$as_me:9777: result: $ac_cv_header_pthread_h" >&5
9778 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9779 if test $ac_cv_header_pthread_h = yes; then
9780
9781         cat >>confdefs.h <<\EOF
9782 #define HAVE_PTHREADS_H 1
9783 EOF
9784
9785         echo "$as_me:9785: checking if we can link with the pthread library" >&5
9786 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9787         cf_save_LIBS="$LIBS"
9788         LIBS="-lpthread $LIBS"
9789         cat >conftest.$ac_ext <<_ACEOF
9790 #line 9790 "configure"
9791 #include "confdefs.h"
9792
9793 #include <pthread.h>
9794
9795 int
9796 main ()
9797 {
9798
9799         int rc = pthread_create(0,0,0,0);
9800
9801   ;
9802   return 0;
9803 }
9804 _ACEOF
9805 rm -f conftest.$ac_objext conftest$ac_exeext
9806 if { (eval echo "$as_me:9806: \"$ac_link\"") >&5
9807   (eval $ac_link) 2>&5
9808   ac_status=$?
9809   echo "$as_me:9809: \$? = $ac_status" >&5
9810   (exit $ac_status); } &&
9811          { ac_try='test -s conftest$ac_exeext'
9812   { (eval echo "$as_me:9812: \"$ac_try\"") >&5
9813   (eval $ac_try) 2>&5
9814   ac_status=$?
9815   echo "$as_me:9815: \$? = $ac_status" >&5
9816   (exit $ac_status); }; }; then
9817   with_pthread=yes
9818 else
9819   echo "$as_me: failed program was:" >&5
9820 cat conftest.$ac_ext >&5
9821 with_pthread=no
9822 fi
9823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9824         LIBS="$cf_save_LIBS"
9825         echo "$as_me:9825: result: $with_pthread" >&5
9826 echo "${ECHO_T}$with_pthread" >&6
9827
9828         if test "$with_pthread" = yes ; then
9829             LIBS="-lpthread $LIBS"
9830             cat >>confdefs.h <<\EOF
9831 #define HAVE_LIBPTHREADS 1
9832 EOF
9833
9834         else
9835             { { echo "$as_me:9835: error: Cannot link with pthread library" >&5
9836 echo "$as_me: error: Cannot link with pthread library" >&2;}
9837    { (exit 1); exit 1; }; }
9838         fi
9839
9840 fi
9841
9842 fi
9843
9844 echo "$as_me:9844: checking if you want to use weak-symbols for pthreads" >&5
9845 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9846
9847 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9848 if test "${enable_weak_symbols+set}" = set; then
9849   enableval="$enable_weak_symbols"
9850   use_weak_symbols=$withval
9851 else
9852   use_weak_symbols=no
9853 fi;
9854 echo "$as_me:9854: result: $use_weak_symbols" >&5
9855 echo "${ECHO_T}$use_weak_symbols" >&6
9856 if test "$use_weak_symbols" = yes ; then
9857
9858 echo "$as_me:9858: checking if $CC supports weak symbols" >&5
9859 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9860 if test "${cf_cv_weak_symbols+set}" = set; then
9861   echo $ECHO_N "(cached) $ECHO_C" >&6
9862 else
9863
9864 cat >conftest.$ac_ext <<_ACEOF
9865 #line 9865 "configure"
9866 #include "confdefs.h"
9867
9868 #include <stdio.h>
9869 int
9870 main ()
9871 {
9872
9873 #if defined(__GNUC__)
9874 #  if defined __USE_ISOC99
9875 #    define _cat_pragma(exp)    _Pragma(#exp)
9876 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9877 #  else
9878 #    define _weak_pragma(exp)
9879 #  endif
9880 #  define _declare(name)        __extension__ extern __typeof__(name) name
9881 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9882 #endif
9883
9884 weak_symbol(fopen);
9885
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 rm -f conftest.$ac_objext
9891 if { (eval echo "$as_me:9891: \"$ac_compile\"") >&5
9892   (eval $ac_compile) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); } &&
9896          { ac_try='test -s conftest.$ac_objext'
9897   { (eval echo "$as_me:9897: \"$ac_try\"") >&5
9898   (eval $ac_try) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); }; }; then
9902   cf_cv_weak_symbols=yes
9903 else
9904   echo "$as_me: failed program was:" >&5
9905 cat conftest.$ac_ext >&5
9906 cf_cv_weak_symbols=no
9907 fi
9908 rm -f conftest.$ac_objext conftest.$ac_ext
9909
9910 fi
9911 echo "$as_me:9911: result: $cf_cv_weak_symbols" >&5
9912 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9913
9914 else
9915     cf_cv_weak_symbols=no
9916 fi
9917
9918 if test $cf_cv_weak_symbols = yes ; then
9919     cat >>confdefs.h <<\EOF
9920 #define USE_WEAK_SYMBOLS 1
9921 EOF
9922
9923 fi
9924
9925 PTHREAD=
9926 if test "$with_pthread" = "yes" ; then
9927     cat >>confdefs.h <<\EOF
9928 #define USE_PTHREADS 1
9929 EOF
9930
9931     enable_reentrant=yes
9932     if test $cf_cv_weak_symbols = yes ; then
9933         PTHREAD=-lpthread
9934     fi
9935 fi
9936
9937 # Reentrant code has to be opaque; there's little advantage to making ncurses
9938 # opaque outside of that, so there is no --enable-opaque option.  We can use
9939 # this option without --with-pthreads, but this will be always set for
9940 # pthreads.
9941 echo "$as_me:9941: checking if you want experimental reentrant code" >&5
9942 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9943
9944 # Check whether --enable-reentrant or --disable-reentrant was given.
9945 if test "${enable_reentrant+set}" = set; then
9946   enableval="$enable_reentrant"
9947   with_reentrant=$enableval
9948 else
9949   with_reentrant=no
9950 fi;
9951 echo "$as_me:9951: result: $with_reentrant" >&5
9952 echo "${ECHO_T}$with_reentrant" >&6
9953 if test "$with_reentrant" = yes ; then
9954         cf_cv_enable_reentrant=1
9955         cf_cv_enable_opaque="NCURSES_INTERNALS"
9956         NCURSES_OPAQUE=1
9957         NCURSES_SIZE_T=int
9958     if test $cf_cv_weak_symbols = yes ; then
9959
9960 # remove pthread library from $LIBS
9961 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9962
9963     else
9964         LIB_SUFFIX="t${LIB_SUFFIX}"
9965     fi
9966         cat >>confdefs.h <<\EOF
9967 #define USE_REENTRANT 1
9968 EOF
9969
9970 if test "${with_abi_version+set}" != set; then
9971         case $cf_cv_rel_version in
9972         5.*)
9973                 cf_cv_rel_version=6.0
9974                 cf_cv_abi_version=6
9975                 { echo "$as_me:9975: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9976 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9977                 ;;
9978         esac
9979 fi
9980
9981 else
9982         cf_cv_enable_reentrant=0
9983         cf_cv_enable_opaque="NCURSES_OPAQUE"
9984         NCURSES_OPAQUE=0
9985         NCURSES_SIZE_T=short
9986 fi
9987
9988 echo "$as_me:9988: checking if you want experimental safe-sprintf code" >&5
9989 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9990
9991 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9992 if test "${enable_safe_sprintf+set}" = set; then
9993   enableval="$enable_safe_sprintf"
9994   with_safe_sprintf=$enableval
9995 else
9996   with_safe_sprintf=no
9997 fi;
9998 echo "$as_me:9998: result: $with_safe_sprintf" >&5
9999 echo "${ECHO_T}$with_safe_sprintf" >&6
10000 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10001 #define USE_SAFE_SPRINTF 1
10002 EOF
10003
10004 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10005 # when hashmap is used scroll hints are useless
10006 if test "$with_hashmap" = no ; then
10007 echo "$as_me:10007: checking if you want to experiment without scrolling-hints code" >&5
10008 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10009
10010 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10011 if test "${enable_scroll_hints+set}" = set; then
10012   enableval="$enable_scroll_hints"
10013   with_scroll_hints=$enableval
10014 else
10015   with_scroll_hints=yes
10016 fi;
10017 echo "$as_me:10017: result: $with_scroll_hints" >&5
10018 echo "${ECHO_T}$with_scroll_hints" >&6
10019 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10020 #define USE_SCROLL_HINTS 1
10021 EOF
10022
10023 fi
10024
10025 echo "$as_me:10025: checking if you want experimental wgetch-events code" >&5
10026 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10027
10028 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10029 if test "${enable_wgetch_events+set}" = set; then
10030   enableval="$enable_wgetch_events"
10031   with_wgetch_events=$enableval
10032 else
10033   with_wgetch_events=no
10034 fi;
10035 echo "$as_me:10035: result: $with_wgetch_events" >&5
10036 echo "${ECHO_T}$with_wgetch_events" >&6
10037 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10038 #define NCURSES_WGETCH_EVENTS 1
10039 EOF
10040
10041 ###############################################################################
10042
10043 ###     use option --disable-echo to suppress full display compiling commands
10044 echo "$as_me:10044: checking if you want to display full commands during build" >&5
10045 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10046
10047 # Check whether --enable-echo or --disable-echo was given.
10048 if test "${enable_echo+set}" = set; then
10049   enableval="$enable_echo"
10050   with_echo=$enableval
10051 else
10052   with_echo=yes
10053 fi;
10054 if test "$with_echo" = yes; then
10055         ECHO_LINK=
10056 else
10057         ECHO_LINK='@ echo linking $@ ... ;'
10058         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10059         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10060 fi
10061 echo "$as_me:10061: result: $with_echo" >&5
10062 echo "${ECHO_T}$with_echo" >&6
10063
10064 ###     use option --enable-warnings to turn on all gcc warnings
10065 echo "$as_me:10065: checking if you want to see compiler warnings" >&5
10066 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10067
10068 # Check whether --enable-warnings or --disable-warnings was given.
10069 if test "${enable_warnings+set}" = set; then
10070   enableval="$enable_warnings"
10071   with_warnings=$enableval
10072 fi;
10073 echo "$as_me:10073: result: $with_warnings" >&5
10074 echo "${ECHO_T}$with_warnings" >&6
10075
10076 if test "x$with_warnings" = "xyes"; then
10077         ADAFLAGS="$ADAFLAGS -gnatg"
10078
10079 INTEL_COMPILER=no
10080
10081 if test "$GCC" = yes ; then
10082         case $host_os in
10083         linux*|gnu*)
10084                 echo "$as_me:10084: checking if this is really Intel C compiler" >&5
10085 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10086                 cf_save_CFLAGS="$CFLAGS"
10087                 CFLAGS="$CFLAGS -no-gcc"
10088                 cat >conftest.$ac_ext <<_ACEOF
10089 #line 10089 "configure"
10090 #include "confdefs.h"
10091
10092 int
10093 main ()
10094 {
10095
10096 #ifdef __INTEL_COMPILER
10097 #else
10098 make an error
10099 #endif
10100
10101   ;
10102   return 0;
10103 }
10104 _ACEOF
10105 rm -f conftest.$ac_objext
10106 if { (eval echo "$as_me:10106: \"$ac_compile\"") >&5
10107   (eval $ac_compile) 2>&5
10108   ac_status=$?
10109   echo "$as_me:10109: \$? = $ac_status" >&5
10110   (exit $ac_status); } &&
10111          { ac_try='test -s conftest.$ac_objext'
10112   { (eval echo "$as_me:10112: \"$ac_try\"") >&5
10113   (eval $ac_try) 2>&5
10114   ac_status=$?
10115   echo "$as_me:10115: \$? = $ac_status" >&5
10116   (exit $ac_status); }; }; then
10117   INTEL_COMPILER=yes
10118 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10119
10120 else
10121   echo "$as_me: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10123 fi
10124 rm -f conftest.$ac_objext conftest.$ac_ext
10125                 CFLAGS="$cf_save_CFLAGS"
10126                 echo "$as_me:10126: result: $INTEL_COMPILER" >&5
10127 echo "${ECHO_T}$INTEL_COMPILER" >&6
10128                 ;;
10129         esac
10130 fi
10131
10132 cat > conftest.$ac_ext <<EOF
10133 #line 10133 "${as_me-configure}"
10134 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10135 EOF
10136
10137 if test "$INTEL_COMPILER" = yes
10138 then
10139 # The "-wdXXX" options suppress warnings:
10140 # remark #1419: external declaration in primary source file
10141 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10142 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10143 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10144 # remark #193: zero used for undefined preprocessing identifier
10145 # remark #593: variable "curs_sb_left_arrow" was set but never used
10146 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10147 # remark #869: parameter "tw" was never referenced
10148 # remark #981: operands are evaluated in unspecified order
10149 # warning #269: invalid format string conversion
10150
10151         { echo "$as_me:10151: checking for $CC warning options..." >&5
10152 echo "$as_me: checking for $CC warning options..." >&6;}
10153         cf_save_CFLAGS="$CFLAGS"
10154         EXTRA_CFLAGS="-Wall"
10155         for cf_opt in \
10156                 wd1419 \
10157                 wd1682 \
10158                 wd1683 \
10159                 wd1684 \
10160                 wd193 \
10161                 wd279 \
10162                 wd593 \
10163                 wd810 \
10164                 wd869 \
10165                 wd981
10166         do
10167                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10168                 if { (eval echo "$as_me:10168: \"$ac_compile\"") >&5
10169   (eval $ac_compile) 2>&5
10170   ac_status=$?
10171   echo "$as_me:10171: \$? = $ac_status" >&5
10172   (exit $ac_status); }; then
10173                         test -n "$verbose" && echo "$as_me:10173: result: ... -$cf_opt" >&5
10174 echo "${ECHO_T}... -$cf_opt" >&6
10175                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10176                 fi
10177         done
10178         CFLAGS="$cf_save_CFLAGS"
10179
10180 elif test "$GCC" = yes
10181 then
10182         { echo "$as_me:10182: checking for $CC warning options..." >&5
10183 echo "$as_me: checking for $CC warning options..." >&6;}
10184         cf_save_CFLAGS="$CFLAGS"
10185         EXTRA_CFLAGS="-W -Wall"
10186         cf_warn_CONST=""
10187         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10188         for cf_opt in \
10189                 Wbad-function-cast \
10190                 Wcast-align \
10191                 Wcast-qual \
10192                 Winline \
10193                 Wmissing-declarations \
10194                 Wmissing-prototypes \
10195                 Wnested-externs \
10196                 Wpointer-arith \
10197                 Wshadow \
10198                 Wstrict-prototypes \
10199                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10200         do
10201                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10202                 if { (eval echo "$as_me:10202: \"$ac_compile\"") >&5
10203   (eval $ac_compile) 2>&5
10204   ac_status=$?
10205   echo "$as_me:10205: \$? = $ac_status" >&5
10206   (exit $ac_status); }; then
10207                         test -n "$verbose" && echo "$as_me:10207: result: ... -$cf_opt" >&5
10208 echo "${ECHO_T}... -$cf_opt" >&6
10209                         case $cf_opt in #(vi
10210                         Wcast-qual) #(vi
10211                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10212                                 ;;
10213                         Winline) #(vi
10214                                 case $GCC_VERSION in
10215                                 [34].*)
10216                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10217
10218 echo "${as_me-configure}:10218: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10219
10220                                         continue;;
10221                                 esac
10222                                 ;;
10223                         esac
10224                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10225                 fi
10226         done
10227         CFLAGS="$cf_save_CFLAGS"
10228 fi
10229 rm -f conftest*
10230
10231         if test "$cf_with_cxx" = yes ; then
10232
10233 INTEL_CPLUSPLUS=no
10234
10235 if test "$GCC" = yes ; then
10236         case $host_os in
10237         linux*|gnu*)
10238                 echo "$as_me:10238: checking if this is really Intel C++ compiler" >&5
10239 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10240                 cf_save_CFLAGS="$CXXFLAGS"
10241                 CXXFLAGS="$CXXFLAGS -no-gcc"
10242                 cat >conftest.$ac_ext <<_ACEOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245
10246 int
10247 main ()
10248 {
10249
10250 #ifdef __INTEL_COMPILER
10251 #else
10252 make an error
10253 #endif
10254
10255   ;
10256   return 0;
10257 }
10258 _ACEOF
10259 rm -f conftest.$ac_objext
10260 if { (eval echo "$as_me:10260: \"$ac_compile\"") >&5
10261   (eval $ac_compile) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); } &&
10265          { ac_try='test -s conftest.$ac_objext'
10266   { (eval echo "$as_me:10266: \"$ac_try\"") >&5
10267   (eval $ac_try) 2>&5
10268   ac_status=$?
10269   echo "$as_me:10269: \$? = $ac_status" >&5
10270   (exit $ac_status); }; }; then
10271   INTEL_CPLUSPLUS=yes
10272 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10273
10274 else
10275   echo "$as_me: failed program was:" >&5
10276 cat conftest.$ac_ext >&5
10277 fi
10278 rm -f conftest.$ac_objext conftest.$ac_ext
10279                 CXXFLAGS="$cf_save_CFLAGS"
10280                 echo "$as_me:10280: result: $INTEL_CPLUSPLUS" >&5
10281 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10282                 ;;
10283         esac
10284 fi
10285
10286 ac_ext=cc
10287 ac_cpp='$CXXCPP $CPPFLAGS'
10288 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10289 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10290 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10291 ac_main_return=return
10292
10293 cat > conftest.$ac_ext <<EOF
10294 #line 10294 "configure"
10295 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10296 EOF
10297
10298 if test "$INTEL_CPLUSPLUS" = yes
10299 then
10300 # The "-wdXXX" options suppress warnings:
10301 # remark #1419: external declaration in primary source file
10302 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10303 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10304 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10305 # remark #193: zero used for undefined preprocessing identifier
10306 # remark #593: variable "curs_sb_left_arrow" was set but never used
10307 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10308 # remark #869: parameter "tw" was never referenced
10309 # remark #981: operands are evaluated in unspecified order
10310 # warning #269: invalid format string conversion
10311
10312         { echo "$as_me:10312: checking for $CC warning options..." >&5
10313 echo "$as_me: checking for $CC warning options..." >&6;}
10314         cf_save_CXXFLAGS="$CXXFLAGS"
10315         EXTRA_CXXFLAGS="-Wall"
10316         for cf_opt in \
10317                 wd1419 \
10318                 wd1682 \
10319                 wd1683 \
10320                 wd1684 \
10321                 wd193 \
10322                 wd279 \
10323                 wd593 \
10324                 wd810 \
10325                 wd869 \
10326                 wd981
10327         do
10328                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10329                 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330   (eval $ac_compile) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit $ac_status); }; then
10334                         test -n "$verbose" && echo "$as_me:10334: result: ... -$cf_opt" >&5
10335 echo "${ECHO_T}... -$cf_opt" >&6
10336                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10337                 fi
10338         done
10339         CXXFLAGS="$cf_save_CXXFLAGS"
10340
10341 elif test "$GXX" = yes
10342 then
10343         { echo "$as_me:10343: checking for $CXX warning options..." >&5
10344 echo "$as_me: checking for $CXX warning options..." >&6;}
10345         cf_save_CXXFLAGS="$CXXFLAGS"
10346         EXTRA_CXXFLAGS="-W -Wall"
10347         cf_gxx_extra_warnings=""
10348         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10349         case "$GCC_VERSION" in
10350         [1-2].*)
10351                 ;;
10352         *)
10353                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10354                 ;;
10355         esac
10356         for cf_opt in \
10357                 Wabi \
10358                 fabi-version=0 \
10359                 Woverloaded-virtual \
10360                 Wsign-promo \
10361                 Wsynth \
10362                 Wold-style-cast \
10363                 Wcast-align \
10364                 Wcast-qual \
10365                 Wmissing-prototypes \
10366                 Wpointer-arith \
10367                 Wshadow \
10368                 Wstrict-prototypes \
10369                 Wundef $cf_gxx_extra_warnings Wno-unused
10370         do
10371                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10372                 if { (eval echo "$as_me:10372: \"$ac_compile\"") >&5
10373   (eval $ac_compile) 2>&5
10374   ac_status=$?
10375   echo "$as_me:10375: \$? = $ac_status" >&5
10376   (exit $ac_status); }; then
10377                         test -n "$verbose" && echo "$as_me:10377: result: ... -$cf_opt" >&5
10378 echo "${ECHO_T}... -$cf_opt" >&6
10379                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10380                 else
10381                         test -n "$verbose" && echo "$as_me:10381: result: ... no -$cf_opt" >&5
10382 echo "${ECHO_T}... no -$cf_opt" >&6
10383                 fi
10384         done
10385         CXXFLAGS="$cf_save_CXXFLAGS"
10386 fi
10387
10388 rm -f conftest*
10389 ac_ext=c
10390 ac_cpp='$CPP $CPPFLAGS'
10391 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10392 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10393 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10394 ac_main_return=return
10395
10396         fi
10397 fi
10398
10399 if test "$GCC" = yes
10400 then
10401 cat > conftest.i <<EOF
10402 #ifndef GCC_PRINTF
10403 #define GCC_PRINTF 0
10404 #endif
10405 #ifndef GCC_SCANF
10406 #define GCC_SCANF 0
10407 #endif
10408 #ifndef GCC_NORETURN
10409 #define GCC_NORETURN /* nothing */
10410 #endif
10411 #ifndef GCC_UNUSED
10412 #define GCC_UNUSED /* nothing */
10413 #endif
10414 EOF
10415 if test "$GCC" = yes
10416 then
10417         { echo "$as_me:10417: checking for $CC __attribute__ directives..." >&5
10418 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10419 cat > conftest.$ac_ext <<EOF
10420 #line 10420 "${as_me-configure}"
10421 #include "confdefs.h"
10422 #include "conftest.h"
10423 #include "conftest.i"
10424 #if     GCC_PRINTF
10425 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10426 #else
10427 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10428 #endif
10429 #if     GCC_SCANF
10430 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10431 #else
10432 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10433 #endif
10434 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10435 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10436 extern void foo(void) GCC_NORETURN;
10437 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10438 EOF
10439         for cf_attribute in scanf printf unused noreturn
10440         do
10441
10442 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10443
10444                 cf_directive="__attribute__(($cf_attribute))"
10445                 echo "checking for $CC $cf_directive" 1>&5
10446                 case $cf_attribute in
10447                 scanf|printf)
10448                 cat >conftest.h <<EOF
10449 #define GCC_$cf_ATTRIBUTE 1
10450 EOF
10451                         ;;
10452                 *)
10453                 cat >conftest.h <<EOF
10454 #define GCC_$cf_ATTRIBUTE $cf_directive
10455 EOF
10456                         ;;
10457                 esac
10458                 if { (eval echo "$as_me:10458: \"$ac_compile\"") >&5
10459   (eval $ac_compile) 2>&5
10460   ac_status=$?
10461   echo "$as_me:10461: \$? = $ac_status" >&5
10462   (exit $ac_status); }; then
10463                         test -n "$verbose" && echo "$as_me:10463: result: ... $cf_attribute" >&5
10464 echo "${ECHO_T}... $cf_attribute" >&6
10465                         cat conftest.h >>confdefs.h
10466                 fi
10467         done
10468 else
10469         fgrep define conftest.i >>confdefs.h
10470 fi
10471 rm -rf conftest*
10472 fi
10473
10474 ###     use option --enable-assertions to turn on generation of assertion code
10475 echo "$as_me:10475: checking if you want to enable runtime assertions" >&5
10476 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10477
10478 # Check whether --enable-assertions or --disable-assertions was given.
10479 if test "${enable_assertions+set}" = set; then
10480   enableval="$enable_assertions"
10481   with_assertions=$enableval
10482 else
10483   with_assertions=no
10484 fi;
10485 echo "$as_me:10485: result: $with_assertions" >&5
10486 echo "${ECHO_T}$with_assertions" >&6
10487 if test -n "$GCC"
10488 then
10489         if test "$with_assertions" = no
10490         then
10491                 cat >>confdefs.h <<\EOF
10492 #define NDEBUG 1
10493 EOF
10494
10495                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10496         else
10497                 ADAFLAGS="$ADAFLAGS -gnata"
10498         fi
10499 fi
10500
10501 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10502
10503 echo "$as_me:10503: checking if you want to use dmalloc for testing" >&5
10504 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10505
10506 # Check whether --with-dmalloc or --without-dmalloc was given.
10507 if test "${with_dmalloc+set}" = set; then
10508   withval="$with_dmalloc"
10509   cat >>confdefs.h <<\EOF
10510 #define USE_DMALLOC 1
10511 EOF
10512
10513         : ${with_cflags:=-g}
10514         : ${with_no_leaks:=yes}
10515          with_dmalloc=yes
10516 else
10517   with_dmalloc=
10518 fi;
10519 echo "$as_me:10519: result: ${with_dmalloc:-no}" >&5
10520 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10521
10522 case .$with_cflags in #(vi
10523 .*-g*)
10524         case .$CFLAGS in #(vi
10525         .*-g*) #(vi
10526                 ;;
10527         *)
10528
10529 cf_fix_cppflags=no
10530 cf_new_cflags=
10531 cf_new_cppflags=
10532 cf_new_extra_cppflags=
10533
10534 for cf_add_cflags in -g
10535 do
10536 case $cf_fix_cppflags in
10537 no)
10538         case $cf_add_cflags in #(vi
10539         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10540                 case $cf_add_cflags in
10541                 -D*)
10542                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10543
10544                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10545                         && test -z "${cf_tst_cflags}" \
10546                         && cf_fix_cppflags=yes
10547
10548                         if test $cf_fix_cppflags = yes ; then
10549                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10550                                 continue
10551                         elif test "${cf_tst_cflags}" = "\"'" ; then
10552                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10553                                 continue
10554                         fi
10555                         ;;
10556                 esac
10557                 case "$CPPFLAGS" in
10558                 *$cf_add_cflags) #(vi
10559                         ;;
10560                 *) #(vi
10561                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10562                         ;;
10563                 esac
10564                 ;;
10565         *)
10566                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10567                 ;;
10568         esac
10569         ;;
10570 yes)
10571         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10572
10573         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10574
10575         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10576         && test -z "${cf_tst_cflags}" \
10577         && cf_fix_cppflags=no
10578         ;;
10579 esac
10580 done
10581
10582 if test -n "$cf_new_cflags" ; then
10583
10584         CFLAGS="$CFLAGS $cf_new_cflags"
10585 fi
10586
10587 if test -n "$cf_new_cppflags" ; then
10588
10589         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10590 fi
10591
10592 if test -n "$cf_new_extra_cppflags" ; then
10593
10594         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10595 fi
10596
10597                 ;;
10598         esac
10599         ;;
10600 esac
10601
10602 if test "$with_dmalloc" = yes ; then
10603         echo "$as_me:10603: checking for dmalloc.h" >&5
10604 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10605 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10606   echo $ECHO_N "(cached) $ECHO_C" >&6
10607 else
10608   cat >conftest.$ac_ext <<_ACEOF
10609 #line 10609 "configure"
10610 #include "confdefs.h"
10611 #include <dmalloc.h>
10612 _ACEOF
10613 if { (eval echo "$as_me:10613: \"$ac_cpp conftest.$ac_ext\"") >&5
10614   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10615   ac_status=$?
10616   egrep -v '^ *\+' conftest.er1 >conftest.err
10617   rm -f conftest.er1
10618   cat conftest.err >&5
10619   echo "$as_me:10619: \$? = $ac_status" >&5
10620   (exit $ac_status); } >/dev/null; then
10621   if test -s conftest.err; then
10622     ac_cpp_err=$ac_c_preproc_warn_flag
10623   else
10624     ac_cpp_err=
10625   fi
10626 else
10627   ac_cpp_err=yes
10628 fi
10629 if test -z "$ac_cpp_err"; then
10630   ac_cv_header_dmalloc_h=yes
10631 else
10632   echo "$as_me: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   ac_cv_header_dmalloc_h=no
10635 fi
10636 rm -f conftest.err conftest.$ac_ext
10637 fi
10638 echo "$as_me:10638: result: $ac_cv_header_dmalloc_h" >&5
10639 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10640 if test $ac_cv_header_dmalloc_h = yes; then
10641
10642 echo "$as_me:10642: checking for dmalloc_debug in -ldmalloc" >&5
10643 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10644 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10645   echo $ECHO_N "(cached) $ECHO_C" >&6
10646 else
10647   ac_check_lib_save_LIBS=$LIBS
10648 LIBS="-ldmalloc  $LIBS"
10649 cat >conftest.$ac_ext <<_ACEOF
10650 #line 10650 "configure"
10651 #include "confdefs.h"
10652
10653 /* Override any gcc2 internal prototype to avoid an error.  */
10654 #ifdef __cplusplus
10655 extern "C"
10656 #endif
10657 /* We use char because int might match the return type of a gcc2
10658    builtin and then its argument prototype would still apply.  */
10659 char dmalloc_debug ();
10660 int
10661 main ()
10662 {
10663 dmalloc_debug ();
10664   ;
10665   return 0;
10666 }
10667 _ACEOF
10668 rm -f conftest.$ac_objext conftest$ac_exeext
10669 if { (eval echo "$as_me:10669: \"$ac_link\"") >&5
10670   (eval $ac_link) 2>&5
10671   ac_status=$?
10672   echo "$as_me:10672: \$? = $ac_status" >&5
10673   (exit $ac_status); } &&
10674          { ac_try='test -s conftest$ac_exeext'
10675   { (eval echo "$as_me:10675: \"$ac_try\"") >&5
10676   (eval $ac_try) 2>&5
10677   ac_status=$?
10678   echo "$as_me:10678: \$? = $ac_status" >&5
10679   (exit $ac_status); }; }; then
10680   ac_cv_lib_dmalloc_dmalloc_debug=yes
10681 else
10682   echo "$as_me: failed program was:" >&5
10683 cat conftest.$ac_ext >&5
10684 ac_cv_lib_dmalloc_dmalloc_debug=no
10685 fi
10686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10687 LIBS=$ac_check_lib_save_LIBS
10688 fi
10689 echo "$as_me:10689: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10690 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10691 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10692   cat >>confdefs.h <<EOF
10693 #define HAVE_LIBDMALLOC 1
10694 EOF
10695
10696   LIBS="-ldmalloc $LIBS"
10697
10698 fi
10699
10700 fi
10701
10702 fi
10703
10704 echo "$as_me:10704: checking if you want to use dbmalloc for testing" >&5
10705 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10706
10707 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10708 if test "${with_dbmalloc+set}" = set; then
10709   withval="$with_dbmalloc"
10710   cat >>confdefs.h <<\EOF
10711 #define USE_DBMALLOC 1
10712 EOF
10713
10714         : ${with_cflags:=-g}
10715         : ${with_no_leaks:=yes}
10716          with_dbmalloc=yes
10717 else
10718   with_dbmalloc=
10719 fi;
10720 echo "$as_me:10720: result: ${with_dbmalloc:-no}" >&5
10721 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10722
10723 case .$with_cflags in #(vi
10724 .*-g*)
10725         case .$CFLAGS in #(vi
10726         .*-g*) #(vi
10727                 ;;
10728         *)
10729
10730 cf_fix_cppflags=no
10731 cf_new_cflags=
10732 cf_new_cppflags=
10733 cf_new_extra_cppflags=
10734
10735 for cf_add_cflags in -g
10736 do
10737 case $cf_fix_cppflags in
10738 no)
10739         case $cf_add_cflags in #(vi
10740         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10741                 case $cf_add_cflags in
10742                 -D*)
10743                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10744
10745                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10746                         && test -z "${cf_tst_cflags}" \
10747                         && cf_fix_cppflags=yes
10748
10749                         if test $cf_fix_cppflags = yes ; then
10750                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10751                                 continue
10752                         elif test "${cf_tst_cflags}" = "\"'" ; then
10753                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10754                                 continue
10755                         fi
10756                         ;;
10757                 esac
10758                 case "$CPPFLAGS" in
10759                 *$cf_add_cflags) #(vi
10760                         ;;
10761                 *) #(vi
10762                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10763                         ;;
10764                 esac
10765                 ;;
10766         *)
10767                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10768                 ;;
10769         esac
10770         ;;
10771 yes)
10772         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10773
10774         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10775
10776         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10777         && test -z "${cf_tst_cflags}" \
10778         && cf_fix_cppflags=no
10779         ;;
10780 esac
10781 done
10782
10783 if test -n "$cf_new_cflags" ; then
10784
10785         CFLAGS="$CFLAGS $cf_new_cflags"
10786 fi
10787
10788 if test -n "$cf_new_cppflags" ; then
10789
10790         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10791 fi
10792
10793 if test -n "$cf_new_extra_cppflags" ; then
10794
10795         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10796 fi
10797
10798                 ;;
10799         esac
10800         ;;
10801 esac
10802
10803 if test "$with_dbmalloc" = yes ; then
10804         echo "$as_me:10804: checking for dbmalloc.h" >&5
10805 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10806 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10807   echo $ECHO_N "(cached) $ECHO_C" >&6
10808 else
10809   cat >conftest.$ac_ext <<_ACEOF
10810 #line 10810 "configure"
10811 #include "confdefs.h"
10812 #include <dbmalloc.h>
10813 _ACEOF
10814 if { (eval echo "$as_me:10814: \"$ac_cpp conftest.$ac_ext\"") >&5
10815   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10816   ac_status=$?
10817   egrep -v '^ *\+' conftest.er1 >conftest.err
10818   rm -f conftest.er1
10819   cat conftest.err >&5
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); } >/dev/null; then
10822   if test -s conftest.err; then
10823     ac_cpp_err=$ac_c_preproc_warn_flag
10824   else
10825     ac_cpp_err=
10826   fi
10827 else
10828   ac_cpp_err=yes
10829 fi
10830 if test -z "$ac_cpp_err"; then
10831   ac_cv_header_dbmalloc_h=yes
10832 else
10833   echo "$as_me: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   ac_cv_header_dbmalloc_h=no
10836 fi
10837 rm -f conftest.err conftest.$ac_ext
10838 fi
10839 echo "$as_me:10839: result: $ac_cv_header_dbmalloc_h" >&5
10840 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10841 if test $ac_cv_header_dbmalloc_h = yes; then
10842
10843 echo "$as_me:10843: checking for debug_malloc in -ldbmalloc" >&5
10844 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10845 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10846   echo $ECHO_N "(cached) $ECHO_C" >&6
10847 else
10848   ac_check_lib_save_LIBS=$LIBS
10849 LIBS="-ldbmalloc  $LIBS"
10850 cat >conftest.$ac_ext <<_ACEOF
10851 #line 10851 "configure"
10852 #include "confdefs.h"
10853
10854 /* Override any gcc2 internal prototype to avoid an error.  */
10855 #ifdef __cplusplus
10856 extern "C"
10857 #endif
10858 /* We use char because int might match the return type of a gcc2
10859    builtin and then its argument prototype would still apply.  */
10860 char debug_malloc ();
10861 int
10862 main ()
10863 {
10864 debug_malloc ();
10865   ;
10866   return 0;
10867 }
10868 _ACEOF
10869 rm -f conftest.$ac_objext conftest$ac_exeext
10870 if { (eval echo "$as_me:10870: \"$ac_link\"") >&5
10871   (eval $ac_link) 2>&5
10872   ac_status=$?
10873   echo "$as_me:10873: \$? = $ac_status" >&5
10874   (exit $ac_status); } &&
10875          { ac_try='test -s conftest$ac_exeext'
10876   { (eval echo "$as_me:10876: \"$ac_try\"") >&5
10877   (eval $ac_try) 2>&5
10878   ac_status=$?
10879   echo "$as_me:10879: \$? = $ac_status" >&5
10880   (exit $ac_status); }; }; then
10881   ac_cv_lib_dbmalloc_debug_malloc=yes
10882 else
10883   echo "$as_me: failed program was:" >&5
10884 cat conftest.$ac_ext >&5
10885 ac_cv_lib_dbmalloc_debug_malloc=no
10886 fi
10887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10888 LIBS=$ac_check_lib_save_LIBS
10889 fi
10890 echo "$as_me:10890: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10891 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10892 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10893   cat >>confdefs.h <<EOF
10894 #define HAVE_LIBDBMALLOC 1
10895 EOF
10896
10897   LIBS="-ldbmalloc $LIBS"
10898
10899 fi
10900
10901 fi
10902
10903 fi
10904
10905 echo "$as_me:10905: checking if you want to use valgrind for testing" >&5
10906 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10907
10908 # Check whether --with-valgrind or --without-valgrind was given.
10909 if test "${with_valgrind+set}" = set; then
10910   withval="$with_valgrind"
10911   cat >>confdefs.h <<\EOF
10912 #define USE_VALGRIND 1
10913 EOF
10914
10915         : ${with_cflags:=-g}
10916         : ${with_no_leaks:=yes}
10917          with_valgrind=yes
10918 else
10919   with_valgrind=
10920 fi;
10921 echo "$as_me:10921: result: ${with_valgrind:-no}" >&5
10922 echo "${ECHO_T}${with_valgrind:-no}" >&6
10923
10924 case .$with_cflags in #(vi
10925 .*-g*)
10926         case .$CFLAGS in #(vi
10927         .*-g*) #(vi
10928                 ;;
10929         *)
10930
10931 cf_fix_cppflags=no
10932 cf_new_cflags=
10933 cf_new_cppflags=
10934 cf_new_extra_cppflags=
10935
10936 for cf_add_cflags in -g
10937 do
10938 case $cf_fix_cppflags in
10939 no)
10940         case $cf_add_cflags in #(vi
10941         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10942                 case $cf_add_cflags in
10943                 -D*)
10944                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10945
10946                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10947                         && test -z "${cf_tst_cflags}" \
10948                         && cf_fix_cppflags=yes
10949
10950                         if test $cf_fix_cppflags = yes ; then
10951                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10952                                 continue
10953                         elif test "${cf_tst_cflags}" = "\"'" ; then
10954                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10955                                 continue
10956                         fi
10957                         ;;
10958                 esac
10959                 case "$CPPFLAGS" in
10960                 *$cf_add_cflags) #(vi
10961                         ;;
10962                 *) #(vi
10963                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10964                         ;;
10965                 esac
10966                 ;;
10967         *)
10968                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10969                 ;;
10970         esac
10971         ;;
10972 yes)
10973         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10974
10975         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10976
10977         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10978         && test -z "${cf_tst_cflags}" \
10979         && cf_fix_cppflags=no
10980         ;;
10981 esac
10982 done
10983
10984 if test -n "$cf_new_cflags" ; then
10985
10986         CFLAGS="$CFLAGS $cf_new_cflags"
10987 fi
10988
10989 if test -n "$cf_new_cppflags" ; then
10990
10991         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10992 fi
10993
10994 if test -n "$cf_new_extra_cppflags" ; then
10995
10996         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10997 fi
10998
10999                 ;;
11000         esac
11001         ;;
11002 esac
11003
11004 echo "$as_me:11004: checking if you want to perform memory-leak testing" >&5
11005 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11006
11007 # Check whether --enable-leaks or --disable-leaks was given.
11008 if test "${enable_leaks+set}" = set; then
11009   enableval="$enable_leaks"
11010   with_no_leaks=yes
11011 else
11012   : ${with_no_leaks:=no}
11013 fi;
11014 echo "$as_me:11014: result: $with_no_leaks" >&5
11015 echo "${ECHO_T}$with_no_leaks" >&6
11016
11017 if test "$with_no_leaks" = yes ; then
11018         cat >>confdefs.h <<\EOF
11019 #define NO_LEAKS 1
11020 EOF
11021
11022 fi
11023
11024 cat >>confdefs.h <<\EOF
11025 #define HAVE_NC_ALLOC_H 1
11026 EOF
11027
11028 ###     use option --enable-expanded to generate certain macros as functions
11029
11030 # Check whether --enable-expanded or --disable-expanded was given.
11031 if test "${enable_expanded+set}" = set; then
11032   enableval="$enable_expanded"
11033   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11034 #define NCURSES_EXPANDED 1
11035 EOF
11036
11037 fi;
11038
11039 ###     use option --disable-macros to suppress macros in favor of functions
11040
11041 # Check whether --enable-macros or --disable-macros was given.
11042 if test "${enable_macros+set}" = set; then
11043   enableval="$enable_macros"
11044   test "$enableval" = no && cat >>confdefs.h <<\EOF
11045 #define NCURSES_NOMACROS 1
11046 EOF
11047
11048 fi;
11049
11050 # Normally we only add trace() to the debug-library.  Allow this to be
11051 # extended to all models of the ncurses library:
11052 cf_all_traces=no
11053 case "$CFLAGS $CPPFLAGS" in
11054 *-DTRACE*)
11055         cf_all_traces=yes
11056         ;;
11057 esac
11058
11059 echo "$as_me:11059: checking whether to add trace feature to all models" >&5
11060 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11061
11062 # Check whether --with-trace or --without-trace was given.
11063 if test "${with_trace+set}" = set; then
11064   withval="$with_trace"
11065   cf_with_trace=$withval
11066 else
11067   cf_with_trace=$cf_all_traces
11068 fi;
11069 echo "$as_me:11069: result: $cf_with_trace" >&5
11070 echo "${ECHO_T}$cf_with_trace" >&6
11071
11072 if test "$cf_with_trace" = yes ; then
11073         LIB_TRACING=all
11074         ADA_TRACE=TRUE
11075
11076 cf_fix_cppflags=no
11077 cf_new_cflags=
11078 cf_new_cppflags=
11079 cf_new_extra_cppflags=
11080
11081 for cf_add_cflags in -DTRACE
11082 do
11083 case $cf_fix_cppflags in
11084 no)
11085         case $cf_add_cflags in #(vi
11086         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11087                 case $cf_add_cflags in
11088                 -D*)
11089                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11090
11091                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11092                         && test -z "${cf_tst_cflags}" \
11093                         && cf_fix_cppflags=yes
11094
11095                         if test $cf_fix_cppflags = yes ; then
11096                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11097                                 continue
11098                         elif test "${cf_tst_cflags}" = "\"'" ; then
11099                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11100                                 continue
11101                         fi
11102                         ;;
11103                 esac
11104                 case "$CPPFLAGS" in
11105                 *$cf_add_cflags) #(vi
11106                         ;;
11107                 *) #(vi
11108                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11109                         ;;
11110                 esac
11111                 ;;
11112         *)
11113                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11114                 ;;
11115         esac
11116         ;;
11117 yes)
11118         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11119
11120         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11121
11122         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11123         && test -z "${cf_tst_cflags}" \
11124         && cf_fix_cppflags=no
11125         ;;
11126 esac
11127 done
11128
11129 if test -n "$cf_new_cflags" ; then
11130
11131         CFLAGS="$CFLAGS $cf_new_cflags"
11132 fi
11133
11134 if test -n "$cf_new_cppflags" ; then
11135
11136         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11137 fi
11138
11139 if test -n "$cf_new_extra_cppflags" ; then
11140
11141         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11142 fi
11143
11144 else
11145         LIB_TRACING=DEBUG
11146         ADA_TRACE=FALSE
11147 fi
11148
11149 ###     Checks for libraries.
11150 echo "$as_me:11150: checking for gettimeofday" >&5
11151 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11152 if test "${ac_cv_func_gettimeofday+set}" = set; then
11153   echo $ECHO_N "(cached) $ECHO_C" >&6
11154 else
11155   cat >conftest.$ac_ext <<_ACEOF
11156 #line 11156 "configure"
11157 #include "confdefs.h"
11158 /* System header to define __stub macros and hopefully few prototypes,
11159     which can conflict with char gettimeofday (); below.  */
11160 #include <assert.h>
11161 /* Override any gcc2 internal prototype to avoid an error.  */
11162 #ifdef __cplusplus
11163 extern "C"
11164 #endif
11165 /* We use char because int might match the return type of a gcc2
11166    builtin and then its argument prototype would still apply.  */
11167 char gettimeofday ();
11168 char (*f) ();
11169
11170 int
11171 main ()
11172 {
11173 /* The GNU C library defines this for functions which it implements
11174     to always fail with ENOSYS.  Some functions are actually named
11175     something starting with __ and the normal name is an alias.  */
11176 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11177 choke me
11178 #else
11179 f = gettimeofday;
11180 #endif
11181
11182   ;
11183   return 0;
11184 }
11185 _ACEOF
11186 rm -f conftest.$ac_objext conftest$ac_exeext
11187 if { (eval echo "$as_me:11187: \"$ac_link\"") >&5
11188   (eval $ac_link) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit $ac_status); } &&
11192          { ac_try='test -s conftest$ac_exeext'
11193   { (eval echo "$as_me:11193: \"$ac_try\"") >&5
11194   (eval $ac_try) 2>&5
11195   ac_status=$?
11196   echo "$as_me:11196: \$? = $ac_status" >&5
11197   (exit $ac_status); }; }; then
11198   ac_cv_func_gettimeofday=yes
11199 else
11200   echo "$as_me: failed program was:" >&5
11201 cat conftest.$ac_ext >&5
11202 ac_cv_func_gettimeofday=no
11203 fi
11204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11205 fi
11206 echo "$as_me:11206: result: $ac_cv_func_gettimeofday" >&5
11207 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11208 if test $ac_cv_func_gettimeofday = yes; then
11209   cat >>confdefs.h <<\EOF
11210 #define HAVE_GETTIMEOFDAY 1
11211 EOF
11212
11213 else
11214
11215 echo "$as_me:11215: checking for gettimeofday in -lbsd" >&5
11216 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11217 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11218   echo $ECHO_N "(cached) $ECHO_C" >&6
11219 else
11220   ac_check_lib_save_LIBS=$LIBS
11221 LIBS="-lbsd  $LIBS"
11222 cat >conftest.$ac_ext <<_ACEOF
11223 #line 11223 "configure"
11224 #include "confdefs.h"
11225
11226 /* Override any gcc2 internal prototype to avoid an error.  */
11227 #ifdef __cplusplus
11228 extern "C"
11229 #endif
11230 /* We use char because int might match the return type of a gcc2
11231    builtin and then its argument prototype would still apply.  */
11232 char gettimeofday ();
11233 int
11234 main ()
11235 {
11236 gettimeofday ();
11237   ;
11238   return 0;
11239 }
11240 _ACEOF
11241 rm -f conftest.$ac_objext conftest$ac_exeext
11242 if { (eval echo "$as_me:11242: \"$ac_link\"") >&5
11243   (eval $ac_link) 2>&5
11244   ac_status=$?
11245   echo "$as_me:11245: \$? = $ac_status" >&5
11246   (exit $ac_status); } &&
11247          { ac_try='test -s conftest$ac_exeext'
11248   { (eval echo "$as_me:11248: \"$ac_try\"") >&5
11249   (eval $ac_try) 2>&5
11250   ac_status=$?
11251   echo "$as_me:11251: \$? = $ac_status" >&5
11252   (exit $ac_status); }; }; then
11253   ac_cv_lib_bsd_gettimeofday=yes
11254 else
11255   echo "$as_me: failed program was:" >&5
11256 cat conftest.$ac_ext >&5
11257 ac_cv_lib_bsd_gettimeofday=no
11258 fi
11259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11260 LIBS=$ac_check_lib_save_LIBS
11261 fi
11262 echo "$as_me:11262: result: $ac_cv_lib_bsd_gettimeofday" >&5
11263 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11264 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11265   cat >>confdefs.h <<\EOF
11266 #define HAVE_GETTIMEOFDAY 1
11267 EOF
11268
11269         LIBS="$LIBS -lbsd"
11270 fi
11271
11272 fi
11273
11274 echo "$as_me:11274: checking if -lm needed for math functions" >&5
11275 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11276 if test "${cf_cv_need_libm+set}" = set; then
11277   echo $ECHO_N "(cached) $ECHO_C" >&6
11278 else
11279
11280         cat >conftest.$ac_ext <<_ACEOF
11281 #line 11281 "configure"
11282 #include "confdefs.h"
11283
11284         #include <stdio.h>
11285         #include <math.h>
11286
11287 int
11288 main ()
11289 {
11290 double x = rand(); printf("result = %g\n", sin(x))
11291   ;
11292   return 0;
11293 }
11294 _ACEOF
11295 rm -f conftest.$ac_objext conftest$ac_exeext
11296 if { (eval echo "$as_me:11296: \"$ac_link\"") >&5
11297   (eval $ac_link) 2>&5
11298   ac_status=$?
11299   echo "$as_me:11299: \$? = $ac_status" >&5
11300   (exit $ac_status); } &&
11301          { ac_try='test -s conftest$ac_exeext'
11302   { (eval echo "$as_me:11302: \"$ac_try\"") >&5
11303   (eval $ac_try) 2>&5
11304   ac_status=$?
11305   echo "$as_me:11305: \$? = $ac_status" >&5
11306   (exit $ac_status); }; }; then
11307   cf_cv_need_libm=no
11308 else
11309   echo "$as_me: failed program was:" >&5
11310 cat conftest.$ac_ext >&5
11311 cf_cv_need_libm=yes
11312 fi
11313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11314 fi
11315 echo "$as_me:11315: result: $cf_cv_need_libm" >&5
11316 echo "${ECHO_T}$cf_cv_need_libm" >&6
11317 if test "$cf_cv_need_libm" = yes
11318 then
11319 MATH_LIB=-lm
11320 fi
11321
11322 ###     Checks for header files.
11323 echo "$as_me:11323: checking for ANSI C header files" >&5
11324 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11325 if test "${ac_cv_header_stdc+set}" = set; then
11326   echo $ECHO_N "(cached) $ECHO_C" >&6
11327 else
11328   cat >conftest.$ac_ext <<_ACEOF
11329 #line 11329 "configure"
11330 #include "confdefs.h"
11331 #include <stdlib.h>
11332 #include <stdarg.h>
11333 #include <string.h>
11334 #include <float.h>
11335
11336 _ACEOF
11337 if { (eval echo "$as_me:11337: \"$ac_cpp conftest.$ac_ext\"") >&5
11338   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11339   ac_status=$?
11340   egrep -v '^ *\+' conftest.er1 >conftest.err
11341   rm -f conftest.er1
11342   cat conftest.err >&5
11343   echo "$as_me:11343: \$? = $ac_status" >&5
11344   (exit $ac_status); } >/dev/null; then
11345   if test -s conftest.err; then
11346     ac_cpp_err=$ac_c_preproc_warn_flag
11347   else
11348     ac_cpp_err=
11349   fi
11350 else
11351   ac_cpp_err=yes
11352 fi
11353 if test -z "$ac_cpp_err"; then
11354   ac_cv_header_stdc=yes
11355 else
11356   echo "$as_me: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   ac_cv_header_stdc=no
11359 fi
11360 rm -f conftest.err conftest.$ac_ext
11361
11362 if test $ac_cv_header_stdc = yes; then
11363   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11364   cat >conftest.$ac_ext <<_ACEOF
11365 #line 11365 "configure"
11366 #include "confdefs.h"
11367 #include <string.h>
11368
11369 _ACEOF
11370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11371   egrep "memchr" >/dev/null 2>&1; then
11372   :
11373 else
11374   ac_cv_header_stdc=no
11375 fi
11376 rm -f conftest*
11377
11378 fi
11379
11380 if test $ac_cv_header_stdc = yes; then
11381   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11382   cat >conftest.$ac_ext <<_ACEOF
11383 #line 11383 "configure"
11384 #include "confdefs.h"
11385 #include <stdlib.h>
11386
11387 _ACEOF
11388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11389   egrep "free" >/dev/null 2>&1; then
11390   :
11391 else
11392   ac_cv_header_stdc=no
11393 fi
11394 rm -f conftest*
11395
11396 fi
11397
11398 if test $ac_cv_header_stdc = yes; then
11399   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11400   if test "$cross_compiling" = yes; then
11401   :
11402 else
11403   cat >conftest.$ac_ext <<_ACEOF
11404 #line 11404 "configure"
11405 #include "confdefs.h"
11406 #include <ctype.h>
11407 #if ((' ' & 0x0FF) == 0x020)
11408 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11409 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11410 #else
11411 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11412                      || ('j' <= (c) && (c) <= 'r') \
11413                      || ('s' <= (c) && (c) <= 'z'))
11414 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11415 #endif
11416
11417 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11418 int
11419 main ()
11420 {
11421   int i;
11422   for (i = 0; i < 256; i++)
11423     if (XOR (islower (i), ISLOWER (i))
11424         || toupper (i) != TOUPPER (i))
11425       $ac_main_return(2);
11426   $ac_main_return (0);
11427 }
11428 _ACEOF
11429 rm -f conftest$ac_exeext
11430 if { (eval echo "$as_me:11430: \"$ac_link\"") >&5
11431   (eval $ac_link) 2>&5
11432   ac_status=$?
11433   echo "$as_me:11433: \$? = $ac_status" >&5
11434   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11435   { (eval echo "$as_me:11435: \"$ac_try\"") >&5
11436   (eval $ac_try) 2>&5
11437   ac_status=$?
11438   echo "$as_me:11438: \$? = $ac_status" >&5
11439   (exit $ac_status); }; }; then
11440   :
11441 else
11442   echo "$as_me: program exited with status $ac_status" >&5
11443 echo "$as_me: failed program was:" >&5
11444 cat conftest.$ac_ext >&5
11445 ac_cv_header_stdc=no
11446 fi
11447 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11448 fi
11449 fi
11450 fi
11451 echo "$as_me:11451: result: $ac_cv_header_stdc" >&5
11452 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11453 if test $ac_cv_header_stdc = yes; then
11454
11455 cat >>confdefs.h <<\EOF
11456 #define STDC_HEADERS 1
11457 EOF
11458
11459 fi
11460
11461 ac_header_dirent=no
11462 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11463   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11464 echo "$as_me:11464: checking for $ac_hdr that defines DIR" >&5
11465 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11466 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11467   echo $ECHO_N "(cached) $ECHO_C" >&6
11468 else
11469   cat >conftest.$ac_ext <<_ACEOF
11470 #line 11470 "configure"
11471 #include "confdefs.h"
11472 #include <sys/types.h>
11473 #include <$ac_hdr>
11474
11475 int
11476 main ()
11477 {
11478 if ((DIR *) 0)
11479 return 0;
11480   ;
11481   return 0;
11482 }
11483 _ACEOF
11484 rm -f conftest.$ac_objext
11485 if { (eval echo "$as_me:11485: \"$ac_compile\"") >&5
11486   (eval $ac_compile) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); } &&
11490          { ac_try='test -s conftest.$ac_objext'
11491   { (eval echo "$as_me:11491: \"$ac_try\"") >&5
11492   (eval $ac_try) 2>&5
11493   ac_status=$?
11494   echo "$as_me:11494: \$? = $ac_status" >&5
11495   (exit $ac_status); }; }; then
11496   eval "$as_ac_Header=yes"
11497 else
11498   echo "$as_me: failed program was:" >&5
11499 cat conftest.$ac_ext >&5
11500 eval "$as_ac_Header=no"
11501 fi
11502 rm -f conftest.$ac_objext conftest.$ac_ext
11503 fi
11504 echo "$as_me:11504: result: `eval echo '${'$as_ac_Header'}'`" >&5
11505 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11506 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11507   cat >>confdefs.h <<EOF
11508 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11509 EOF
11510
11511 ac_header_dirent=$ac_hdr; break
11512 fi
11513
11514 done
11515 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11516 if test $ac_header_dirent = dirent.h; then
11517   echo "$as_me:11517: checking for opendir in -ldir" >&5
11518 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11519 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11520   echo $ECHO_N "(cached) $ECHO_C" >&6
11521 else
11522   ac_check_lib_save_LIBS=$LIBS
11523 LIBS="-ldir  $LIBS"
11524 cat >conftest.$ac_ext <<_ACEOF
11525 #line 11525 "configure"
11526 #include "confdefs.h"
11527
11528 /* Override any gcc2 internal prototype to avoid an error.  */
11529 #ifdef __cplusplus
11530 extern "C"
11531 #endif
11532 /* We use char because int might match the return type of a gcc2
11533    builtin and then its argument prototype would still apply.  */
11534 char opendir ();
11535 int
11536 main ()
11537 {
11538 opendir ();
11539   ;
11540   return 0;
11541 }
11542 _ACEOF
11543 rm -f conftest.$ac_objext conftest$ac_exeext
11544 if { (eval echo "$as_me:11544: \"$ac_link\"") >&5
11545   (eval $ac_link) 2>&5
11546   ac_status=$?
11547   echo "$as_me:11547: \$? = $ac_status" >&5
11548   (exit $ac_status); } &&
11549          { ac_try='test -s conftest$ac_exeext'
11550   { (eval echo "$as_me:11550: \"$ac_try\"") >&5
11551   (eval $ac_try) 2>&5
11552   ac_status=$?
11553   echo "$as_me:11553: \$? = $ac_status" >&5
11554   (exit $ac_status); }; }; then
11555   ac_cv_lib_dir_opendir=yes
11556 else
11557   echo "$as_me: failed program was:" >&5
11558 cat conftest.$ac_ext >&5
11559 ac_cv_lib_dir_opendir=no
11560 fi
11561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11562 LIBS=$ac_check_lib_save_LIBS
11563 fi
11564 echo "$as_me:11564: result: $ac_cv_lib_dir_opendir" >&5
11565 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11566 if test $ac_cv_lib_dir_opendir = yes; then
11567   LIBS="$LIBS -ldir"
11568 fi
11569
11570 else
11571   echo "$as_me:11571: checking for opendir in -lx" >&5
11572 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11573 if test "${ac_cv_lib_x_opendir+set}" = set; then
11574   echo $ECHO_N "(cached) $ECHO_C" >&6
11575 else
11576   ac_check_lib_save_LIBS=$LIBS
11577 LIBS="-lx  $LIBS"
11578 cat >conftest.$ac_ext <<_ACEOF
11579 #line 11579 "configure"
11580 #include "confdefs.h"
11581
11582 /* Override any gcc2 internal prototype to avoid an error.  */
11583 #ifdef __cplusplus
11584 extern "C"
11585 #endif
11586 /* We use char because int might match the return type of a gcc2
11587    builtin and then its argument prototype would still apply.  */
11588 char opendir ();
11589 int
11590 main ()
11591 {
11592 opendir ();
11593   ;
11594   return 0;
11595 }
11596 _ACEOF
11597 rm -f conftest.$ac_objext conftest$ac_exeext
11598 if { (eval echo "$as_me:11598: \"$ac_link\"") >&5
11599   (eval $ac_link) 2>&5
11600   ac_status=$?
11601   echo "$as_me:11601: \$? = $ac_status" >&5
11602   (exit $ac_status); } &&
11603          { ac_try='test -s conftest$ac_exeext'
11604   { (eval echo "$as_me:11604: \"$ac_try\"") >&5
11605   (eval $ac_try) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit $ac_status); }; }; then
11609   ac_cv_lib_x_opendir=yes
11610 else
11611   echo "$as_me: failed program was:" >&5
11612 cat conftest.$ac_ext >&5
11613 ac_cv_lib_x_opendir=no
11614 fi
11615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11616 LIBS=$ac_check_lib_save_LIBS
11617 fi
11618 echo "$as_me:11618: result: $ac_cv_lib_x_opendir" >&5
11619 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11620 if test $ac_cv_lib_x_opendir = yes; then
11621   LIBS="$LIBS -lx"
11622 fi
11623
11624 fi
11625
11626 echo "$as_me:11626: checking whether time.h and sys/time.h may both be included" >&5
11627 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11628 if test "${ac_cv_header_time+set}" = set; then
11629   echo $ECHO_N "(cached) $ECHO_C" >&6
11630 else
11631   cat >conftest.$ac_ext <<_ACEOF
11632 #line 11632 "configure"
11633 #include "confdefs.h"
11634 #include <sys/types.h>
11635 #include <sys/time.h>
11636 #include <time.h>
11637
11638 int
11639 main ()
11640 {
11641 if ((struct tm *) 0)
11642 return 0;
11643   ;
11644   return 0;
11645 }
11646 _ACEOF
11647 rm -f conftest.$ac_objext
11648 if { (eval echo "$as_me:11648: \"$ac_compile\"") >&5
11649   (eval $ac_compile) 2>&5
11650   ac_status=$?
11651   echo "$as_me:11651: \$? = $ac_status" >&5
11652   (exit $ac_status); } &&
11653          { ac_try='test -s conftest.$ac_objext'
11654   { (eval echo "$as_me:11654: \"$ac_try\"") >&5
11655   (eval $ac_try) 2>&5
11656   ac_status=$?
11657   echo "$as_me:11657: \$? = $ac_status" >&5
11658   (exit $ac_status); }; }; then
11659   ac_cv_header_time=yes
11660 else
11661   echo "$as_me: failed program was:" >&5
11662 cat conftest.$ac_ext >&5
11663 ac_cv_header_time=no
11664 fi
11665 rm -f conftest.$ac_objext conftest.$ac_ext
11666 fi
11667 echo "$as_me:11667: result: $ac_cv_header_time" >&5
11668 echo "${ECHO_T}$ac_cv_header_time" >&6
11669 if test $ac_cv_header_time = yes; then
11670
11671 cat >>confdefs.h <<\EOF
11672 #define TIME_WITH_SYS_TIME 1
11673 EOF
11674
11675 fi
11676
11677 echo "$as_me:11677: checking for regular-expression headers" >&5
11678 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11679 if test "${cf_cv_regex+set}" = set; then
11680   echo $ECHO_N "(cached) $ECHO_C" >&6
11681 else
11682
11683 cat >conftest.$ac_ext <<_ACEOF
11684 #line 11684 "configure"
11685 #include "confdefs.h"
11686 #include <sys/types.h>
11687 #include <regex.h>
11688 int
11689 main ()
11690 {
11691
11692         regex_t *p;
11693         int x = regcomp(p, "", 0);
11694         int y = regexec(p, "", 0, 0, 0);
11695         regfree(p);
11696
11697   ;
11698   return 0;
11699 }
11700 _ACEOF
11701 rm -f conftest.$ac_objext conftest$ac_exeext
11702 if { (eval echo "$as_me:11702: \"$ac_link\"") >&5
11703   (eval $ac_link) 2>&5
11704   ac_status=$?
11705   echo "$as_me:11705: \$? = $ac_status" >&5
11706   (exit $ac_status); } &&
11707          { ac_try='test -s conftest$ac_exeext'
11708   { (eval echo "$as_me:11708: \"$ac_try\"") >&5
11709   (eval $ac_try) 2>&5
11710   ac_status=$?
11711   echo "$as_me:11711: \$? = $ac_status" >&5
11712   (exit $ac_status); }; }; then
11713   cf_cv_regex="regex.h"
11714 else
11715   echo "$as_me: failed program was:" >&5
11716 cat conftest.$ac_ext >&5
11717
11718         cat >conftest.$ac_ext <<_ACEOF
11719 #line 11719 "configure"
11720 #include "confdefs.h"
11721 #include <regexp.h>
11722 int
11723 main ()
11724 {
11725
11726                 char *p = compile("", "", "", 0);
11727                 int x = step("", "");
11728
11729   ;
11730   return 0;
11731 }
11732 _ACEOF
11733 rm -f conftest.$ac_objext conftest$ac_exeext
11734 if { (eval echo "$as_me:11734: \"$ac_link\"") >&5
11735   (eval $ac_link) 2>&5
11736   ac_status=$?
11737   echo "$as_me:11737: \$? = $ac_status" >&5
11738   (exit $ac_status); } &&
11739          { ac_try='test -s conftest$ac_exeext'
11740   { (eval echo "$as_me:11740: \"$ac_try\"") >&5
11741   (eval $ac_try) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit $ac_status); }; }; then
11745   cf_cv_regex="regexp.h"
11746 else
11747   echo "$as_me: failed program was:" >&5
11748 cat conftest.$ac_ext >&5
11749
11750                 cf_save_LIBS="$LIBS"
11751                 LIBS="-lgen $LIBS"
11752                 cat >conftest.$ac_ext <<_ACEOF
11753 #line 11753 "configure"
11754 #include "confdefs.h"
11755 #include <regexpr.h>
11756 int
11757 main ()
11758 {
11759
11760                         char *p = compile("", "", "");
11761                         int x = step("", "");
11762
11763   ;
11764   return 0;
11765 }
11766 _ACEOF
11767 rm -f conftest.$ac_objext conftest$ac_exeext
11768 if { (eval echo "$as_me:11768: \"$ac_link\"") >&5
11769   (eval $ac_link) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit $ac_status); } &&
11773          { ac_try='test -s conftest$ac_exeext'
11774   { (eval echo "$as_me:11774: \"$ac_try\"") >&5
11775   (eval $ac_try) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit $ac_status); }; }; then
11779   cf_cv_regex="regexpr.h"
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 cat conftest.$ac_ext >&5
11783 LIBS="$cf_save_LIBS"
11784 fi
11785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11786 fi
11787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11788 fi
11789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11790
11791 fi
11792
11793 echo "$as_me:11793: result: $cf_cv_regex" >&5
11794 echo "${ECHO_T}$cf_cv_regex" >&6
11795 case $cf_cv_regex in
11796         regex.h)   cat >>confdefs.h <<\EOF
11797 #define HAVE_REGEX_H_FUNCS 1
11798 EOF
11799  ;;
11800         regexp.h)  cat >>confdefs.h <<\EOF
11801 #define HAVE_REGEXP_H_FUNCS 1
11802 EOF
11803  ;;
11804         regexpr.h) cat >>confdefs.h <<\EOF
11805 #define HAVE_REGEXPR_H_FUNCS 1
11806 EOF
11807  ;;
11808 esac
11809
11810 for ac_header in \
11811 fcntl.h \
11812 getopt.h \
11813 limits.h \
11814 locale.h \
11815 poll.h \
11816 sys/bsdtypes.h \
11817 sys/ioctl.h \
11818 sys/param.h \
11819 sys/poll.h \
11820 sys/select.h \
11821 sys/time.h \
11822 sys/times.h \
11823 ttyent.h \
11824 unistd.h \
11825 wctype.h \
11826
11827 do
11828 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11829 echo "$as_me:11829: checking for $ac_header" >&5
11830 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11831 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11832   echo $ECHO_N "(cached) $ECHO_C" >&6
11833 else
11834   cat >conftest.$ac_ext <<_ACEOF
11835 #line 11835 "configure"
11836 #include "confdefs.h"
11837 #include <$ac_header>
11838 _ACEOF
11839 if { (eval echo "$as_me:11839: \"$ac_cpp conftest.$ac_ext\"") >&5
11840   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11841   ac_status=$?
11842   egrep -v '^ *\+' conftest.er1 >conftest.err
11843   rm -f conftest.er1
11844   cat conftest.err >&5
11845   echo "$as_me:11845: \$? = $ac_status" >&5
11846   (exit $ac_status); } >/dev/null; then
11847   if test -s conftest.err; then
11848     ac_cpp_err=$ac_c_preproc_warn_flag
11849   else
11850     ac_cpp_err=
11851   fi
11852 else
11853   ac_cpp_err=yes
11854 fi
11855 if test -z "$ac_cpp_err"; then
11856   eval "$as_ac_Header=yes"
11857 else
11858   echo "$as_me: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   eval "$as_ac_Header=no"
11861 fi
11862 rm -f conftest.err conftest.$ac_ext
11863 fi
11864 echo "$as_me:11864: result: `eval echo '${'$as_ac_Header'}'`" >&5
11865 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11866 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11867   cat >>confdefs.h <<EOF
11868 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11869 EOF
11870
11871 fi
11872 done
11873
11874 # check for ISC (this may also define _POSIX_SOURCE)
11875 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11876 if test "$ISC" = yes ; then
11877
11878 echo "$as_me:11878: checking for main in -lcposix" >&5
11879 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11880 if test "${ac_cv_lib_cposix_main+set}" = set; then
11881   echo $ECHO_N "(cached) $ECHO_C" >&6
11882 else
11883   ac_check_lib_save_LIBS=$LIBS
11884 LIBS="-lcposix  $LIBS"
11885 cat >conftest.$ac_ext <<_ACEOF
11886 #line 11886 "configure"
11887 #include "confdefs.h"
11888
11889 int
11890 main ()
11891 {
11892 main ();
11893   ;
11894   return 0;
11895 }
11896 _ACEOF
11897 rm -f conftest.$ac_objext conftest$ac_exeext
11898 if { (eval echo "$as_me:11898: \"$ac_link\"") >&5
11899   (eval $ac_link) 2>&5
11900   ac_status=$?
11901   echo "$as_me:11901: \$? = $ac_status" >&5
11902   (exit $ac_status); } &&
11903          { ac_try='test -s conftest$ac_exeext'
11904   { (eval echo "$as_me:11904: \"$ac_try\"") >&5
11905   (eval $ac_try) 2>&5
11906   ac_status=$?
11907   echo "$as_me:11907: \$? = $ac_status" >&5
11908   (exit $ac_status); }; }; then
11909   ac_cv_lib_cposix_main=yes
11910 else
11911   echo "$as_me: failed program was:" >&5
11912 cat conftest.$ac_ext >&5
11913 ac_cv_lib_cposix_main=no
11914 fi
11915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11916 LIBS=$ac_check_lib_save_LIBS
11917 fi
11918 echo "$as_me:11918: result: $ac_cv_lib_cposix_main" >&5
11919 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11920 if test $ac_cv_lib_cposix_main = yes; then
11921   cat >>confdefs.h <<EOF
11922 #define HAVE_LIBCPOSIX 1
11923 EOF
11924
11925   LIBS="-lcposix $LIBS"
11926
11927 fi
11928
11929         echo "$as_me:11929: checking for bzero in -linet" >&5
11930 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11931 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11932   echo $ECHO_N "(cached) $ECHO_C" >&6
11933 else
11934   ac_check_lib_save_LIBS=$LIBS
11935 LIBS="-linet  $LIBS"
11936 cat >conftest.$ac_ext <<_ACEOF
11937 #line 11937 "configure"
11938 #include "confdefs.h"
11939
11940 /* Override any gcc2 internal prototype to avoid an error.  */
11941 #ifdef __cplusplus
11942 extern "C"
11943 #endif
11944 /* We use char because int might match the return type of a gcc2
11945    builtin and then its argument prototype would still apply.  */
11946 char bzero ();
11947 int
11948 main ()
11949 {
11950 bzero ();
11951   ;
11952   return 0;
11953 }
11954 _ACEOF
11955 rm -f conftest.$ac_objext conftest$ac_exeext
11956 if { (eval echo "$as_me:11956: \"$ac_link\"") >&5
11957   (eval $ac_link) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); } &&
11961          { ac_try='test -s conftest$ac_exeext'
11962   { (eval echo "$as_me:11962: \"$ac_try\"") >&5
11963   (eval $ac_try) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); }; }; then
11967   ac_cv_lib_inet_bzero=yes
11968 else
11969   echo "$as_me: failed program was:" >&5
11970 cat conftest.$ac_ext >&5
11971 ac_cv_lib_inet_bzero=no
11972 fi
11973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11974 LIBS=$ac_check_lib_save_LIBS
11975 fi
11976 echo "$as_me:11976: result: $ac_cv_lib_inet_bzero" >&5
11977 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11978 if test $ac_cv_lib_inet_bzero = yes; then
11979   LIBS="$LIBS -linet"
11980 fi
11981 fi
11982
11983 echo "$as_me:11983: checking if sys/time.h works with sys/select.h" >&5
11984 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11985 if test "${cf_cv_sys_time_select+set}" = set; then
11986   echo $ECHO_N "(cached) $ECHO_C" >&6
11987 else
11988
11989 cat >conftest.$ac_ext <<_ACEOF
11990 #line 11990 "configure"
11991 #include "confdefs.h"
11992
11993 #include <sys/types.h>
11994 #ifdef HAVE_SYS_TIME_H
11995 #include <sys/time.h>
11996 #endif
11997 #ifdef HAVE_SYS_SELECT_H
11998 #include <sys/select.h>
11999 #endif
12000
12001 int
12002 main ()
12003 {
12004
12005   ;
12006   return 0;
12007 }
12008 _ACEOF
12009 rm -f conftest.$ac_objext
12010 if { (eval echo "$as_me:12010: \"$ac_compile\"") >&5
12011   (eval $ac_compile) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit $ac_status); } &&
12015          { ac_try='test -s conftest.$ac_objext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021   cf_cv_sys_time_select=yes
12022 else
12023   echo "$as_me: failed program was:" >&5
12024 cat conftest.$ac_ext >&5
12025 cf_cv_sys_time_select=no
12026 fi
12027 rm -f conftest.$ac_objext conftest.$ac_ext
12028
12029 fi
12030
12031 echo "$as_me:12031: result: $cf_cv_sys_time_select" >&5
12032 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12033 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12034 #define HAVE_SYS_TIME_SELECT 1
12035 EOF
12036
12037 ###     checks for compiler characteristics
12038 ac_ext=c
12039 ac_cpp='$CPP $CPPFLAGS'
12040 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12041 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12042 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12043 ac_main_return=return
12044
12045 echo "$as_me:12045: checking for $CC option to accept ANSI C" >&5
12046 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12047 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12048   echo $ECHO_N "(cached) $ECHO_C" >&6
12049 else
12050   ac_cv_prog_cc_stdc=no
12051 ac_save_CC=$CC
12052 cat >conftest.$ac_ext <<_ACEOF
12053 #line 12053 "configure"
12054 #include "confdefs.h"
12055 #include <stdarg.h>
12056 #include <stdio.h>
12057 #include <sys/types.h>
12058 #include <sys/stat.h>
12059 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12060 struct buf { int x; };
12061 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12062 static char *e (p, i)
12063      char **p;
12064      int i;
12065 {
12066   return p[i];
12067 }
12068 static char *f (char * (*g) (char **, int), char **p, ...)
12069 {
12070   char *s;
12071   va_list v;
12072   va_start (v,p);
12073   s = g (p, va_arg (v,int));
12074   va_end (v);
12075   return s;
12076 }
12077 int test (int i, double x);
12078 struct s1 {int (*f) (int a);};
12079 struct s2 {int (*f) (double a);};
12080 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12081 int argc;
12082 char **argv;
12083 int
12084 main ()
12085 {
12086 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12087   ;
12088   return 0;
12089 }
12090 _ACEOF
12091 # Don't try gcc -ansi; that turns off useful extensions and
12092 # breaks some systems' header files.
12093 # AIX                   -qlanglvl=ansi
12094 # Ultrix and OSF/1      -std1
12095 # HP-UX 10.20 and later -Ae
12096 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12097 # SVR4                  -Xc -D__EXTENSIONS__
12098 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12099 do
12100   CC="$ac_save_CC $ac_arg"
12101   rm -f conftest.$ac_objext
12102 if { (eval echo "$as_me:12102: \"$ac_compile\"") >&5
12103   (eval $ac_compile) 2>&5
12104   ac_status=$?
12105   echo "$as_me:12105: \$? = $ac_status" >&5
12106   (exit $ac_status); } &&
12107          { ac_try='test -s conftest.$ac_objext'
12108   { (eval echo "$as_me:12108: \"$ac_try\"") >&5
12109   (eval $ac_try) 2>&5
12110   ac_status=$?
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit $ac_status); }; }; then
12113   ac_cv_prog_cc_stdc=$ac_arg
12114 break
12115 else
12116   echo "$as_me: failed program was:" >&5
12117 cat conftest.$ac_ext >&5
12118 fi
12119 rm -f conftest.$ac_objext
12120 done
12121 rm -f conftest.$ac_ext conftest.$ac_objext
12122 CC=$ac_save_CC
12123
12124 fi
12125
12126 case "x$ac_cv_prog_cc_stdc" in
12127   x|xno)
12128     echo "$as_me:12128: result: none needed" >&5
12129 echo "${ECHO_T}none needed" >&6 ;;
12130   *)
12131     echo "$as_me:12131: result: $ac_cv_prog_cc_stdc" >&5
12132 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12133     CC="$CC $ac_cv_prog_cc_stdc" ;;
12134 esac
12135
12136 echo "$as_me:12136: checking for an ANSI C-conforming const" >&5
12137 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12138 if test "${ac_cv_c_const+set}" = set; then
12139   echo $ECHO_N "(cached) $ECHO_C" >&6
12140 else
12141   cat >conftest.$ac_ext <<_ACEOF
12142 #line 12142 "configure"
12143 #include "confdefs.h"
12144
12145 int
12146 main ()
12147 {
12148 /* FIXME: Include the comments suggested by Paul. */
12149 #ifndef __cplusplus
12150   /* Ultrix mips cc rejects this.  */
12151   typedef int charset[2];
12152   const charset x;
12153   /* SunOS 4.1.1 cc rejects this.  */
12154   char const *const *ccp;
12155   char **p;
12156   /* NEC SVR4.0.2 mips cc rejects this.  */
12157   struct point {int x, y;};
12158   static struct point const zero = {0,0};
12159   /* AIX XL C 1.02.0.0 rejects this.
12160      It does not let you subtract one const X* pointer from another in
12161      an arm of an if-expression whose if-part is not a constant
12162      expression */
12163   const char *g = "string";
12164   ccp = &g + (g ? g-g : 0);
12165   /* HPUX 7.0 cc rejects these. */
12166   ++ccp;
12167   p = (char**) ccp;
12168   ccp = (char const *const *) p;
12169   { /* SCO 3.2v4 cc rejects this.  */
12170     char *t;
12171     char const *s = 0 ? (char *) 0 : (char const *) 0;
12172
12173     *t++ = 0;
12174   }
12175   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12176     int x[] = {25, 17};
12177     const int *foo = &x[0];
12178     ++foo;
12179   }
12180   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12181     typedef const int *iptr;
12182     iptr p = 0;
12183     ++p;
12184   }
12185   { /* AIX XL C 1.02.0.0 rejects this saying
12186        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12187     struct s { int j; const int *ap[3]; };
12188     struct s *b; b->j = 5;
12189   }
12190   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12191     const int foo = 10;
12192   }
12193 #endif
12194
12195   ;
12196   return 0;
12197 }
12198 _ACEOF
12199 rm -f conftest.$ac_objext
12200 if { (eval echo "$as_me:12200: \"$ac_compile\"") >&5
12201   (eval $ac_compile) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); } &&
12205          { ac_try='test -s conftest.$ac_objext'
12206   { (eval echo "$as_me:12206: \"$ac_try\"") >&5
12207   (eval $ac_try) 2>&5
12208   ac_status=$?
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit $ac_status); }; }; then
12211   ac_cv_c_const=yes
12212 else
12213   echo "$as_me: failed program was:" >&5
12214 cat conftest.$ac_ext >&5
12215 ac_cv_c_const=no
12216 fi
12217 rm -f conftest.$ac_objext conftest.$ac_ext
12218 fi
12219 echo "$as_me:12219: result: $ac_cv_c_const" >&5
12220 echo "${ECHO_T}$ac_cv_c_const" >&6
12221 if test $ac_cv_c_const = no; then
12222
12223 cat >>confdefs.h <<\EOF
12224 #define const
12225 EOF
12226
12227 fi
12228
12229 echo "$as_me:12229: checking for inline" >&5
12230 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12231 if test "${ac_cv_c_inline+set}" = set; then
12232   echo $ECHO_N "(cached) $ECHO_C" >&6
12233 else
12234   ac_cv_c_inline=no
12235 for ac_kw in inline __inline__ __inline; do
12236   cat >conftest.$ac_ext <<_ACEOF
12237 #line 12237 "configure"
12238 #include "confdefs.h"
12239 #ifndef __cplusplus
12240 static $ac_kw int static_foo () {return 0; }
12241 $ac_kw int foo () {return 0; }
12242 #endif
12243
12244 _ACEOF
12245 rm -f conftest.$ac_objext
12246 if { (eval echo "$as_me:12246: \"$ac_compile\"") >&5
12247   (eval $ac_compile) 2>&5
12248   ac_status=$?
12249   echo "$as_me:12249: \$? = $ac_status" >&5
12250   (exit $ac_status); } &&
12251          { ac_try='test -s conftest.$ac_objext'
12252   { (eval echo "$as_me:12252: \"$ac_try\"") >&5
12253   (eval $ac_try) 2>&5
12254   ac_status=$?
12255   echo "$as_me:12255: \$? = $ac_status" >&5
12256   (exit $ac_status); }; }; then
12257   ac_cv_c_inline=$ac_kw; break
12258 else
12259   echo "$as_me: failed program was:" >&5
12260 cat conftest.$ac_ext >&5
12261 fi
12262 rm -f conftest.$ac_objext conftest.$ac_ext
12263 done
12264
12265 fi
12266 echo "$as_me:12266: result: $ac_cv_c_inline" >&5
12267 echo "${ECHO_T}$ac_cv_c_inline" >&6
12268 case $ac_cv_c_inline in
12269   inline | yes) ;;
12270   no)
12271 cat >>confdefs.h <<\EOF
12272 #define inline
12273 EOF
12274  ;;
12275   *)  cat >>confdefs.h <<EOF
12276 #define inline $ac_cv_c_inline
12277 EOF
12278  ;;
12279 esac
12280
12281 NCURSES_INLINE=
12282 if test "$ac_cv_c_inline" != no ; then
12283   NCURSES_INLINE=inline
12284   if test "$INTEL_COMPILER" = yes
12285   then
12286     :
12287   elif test "$GCC" = yes
12288   then
12289     echo "$as_me:12289: checking if gcc supports options to tune inlining" >&5
12290 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12291 if test "${cf_cv_gcc_inline+set}" = set; then
12292   echo $ECHO_N "(cached) $ECHO_C" >&6
12293 else
12294
12295       cf_save_CFLAGS=$CFLAGS
12296       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12297       cat >conftest.$ac_ext <<_ACEOF
12298 #line 12298 "configure"
12299 #include "confdefs.h"
12300 inline int foo(void) { return 1; }
12301 int
12302 main ()
12303 {
12304 ${cf_cv_main_return:-return} foo()
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 rm -f conftest.$ac_objext
12310 if { (eval echo "$as_me:12310: \"$ac_compile\"") >&5
12311   (eval $ac_compile) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); } &&
12315          { ac_try='test -s conftest.$ac_objext'
12316   { (eval echo "$as_me:12316: \"$ac_try\"") >&5
12317   (eval $ac_try) 2>&5
12318   ac_status=$?
12319   echo "$as_me:12319: \$? = $ac_status" >&5
12320   (exit $ac_status); }; }; then
12321   cf_cv_gcc_inline=yes
12322 else
12323   echo "$as_me: failed program was:" >&5
12324 cat conftest.$ac_ext >&5
12325 cf_cv_gcc_inline=no
12326 fi
12327 rm -f conftest.$ac_objext conftest.$ac_ext
12328       CFLAGS=$cf_save_CFLAGS
12329
12330 fi
12331 echo "$as_me:12331: result: $cf_cv_gcc_inline" >&5
12332 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12333     if test "$cf_cv_gcc_inline" = yes ; then
12334
12335 cf_fix_cppflags=no
12336 cf_new_cflags=
12337 cf_new_cppflags=
12338 cf_new_extra_cppflags=
12339
12340 for cf_add_cflags in --param max-inline-insns-single=1200
12341 do
12342 case $cf_fix_cppflags in
12343 no)
12344         case $cf_add_cflags in #(vi
12345         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12346                 case $cf_add_cflags in
12347                 -D*)
12348                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12349
12350                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12351                         && test -z "${cf_tst_cflags}" \
12352                         && cf_fix_cppflags=yes
12353
12354                         if test $cf_fix_cppflags = yes ; then
12355                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12356                                 continue
12357                         elif test "${cf_tst_cflags}" = "\"'" ; then
12358                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12359                                 continue
12360                         fi
12361                         ;;
12362                 esac
12363                 case "$CPPFLAGS" in
12364                 *$cf_add_cflags) #(vi
12365                         ;;
12366                 *) #(vi
12367                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12368                         ;;
12369                 esac
12370                 ;;
12371         *)
12372                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12373                 ;;
12374         esac
12375         ;;
12376 yes)
12377         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12378
12379         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12380
12381         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12382         && test -z "${cf_tst_cflags}" \
12383         && cf_fix_cppflags=no
12384         ;;
12385 esac
12386 done
12387
12388 if test -n "$cf_new_cflags" ; then
12389
12390         CFLAGS="$CFLAGS $cf_new_cflags"
12391 fi
12392
12393 if test -n "$cf_new_cppflags" ; then
12394
12395         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12396 fi
12397
12398 if test -n "$cf_new_extra_cppflags" ; then
12399
12400         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12401 fi
12402
12403     fi
12404   fi
12405 fi
12406
12407 echo "$as_me:12407: checking for signal global datatype" >&5
12408 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12409 if test "${cf_cv_sig_atomic_t+set}" = set; then
12410   echo $ECHO_N "(cached) $ECHO_C" >&6
12411 else
12412
12413         for cf_type in \
12414                 "volatile sig_atomic_t" \
12415                 "sig_atomic_t" \
12416                 "int"
12417         do
12418         cat >conftest.$ac_ext <<_ACEOF
12419 #line 12419 "configure"
12420 #include "confdefs.h"
12421
12422 #include <sys/types.h>
12423 #include <signal.h>
12424 #include <stdio.h>
12425
12426 extern $cf_type x;
12427 $cf_type x;
12428 static void handler(int sig)
12429 {
12430         x = 5;
12431 }
12432 int
12433 main ()
12434 {
12435 signal(SIGINT, handler);
12436                  x = 1
12437   ;
12438   return 0;
12439 }
12440 _ACEOF
12441 rm -f conftest.$ac_objext
12442 if { (eval echo "$as_me:12442: \"$ac_compile\"") >&5
12443   (eval $ac_compile) 2>&5
12444   ac_status=$?
12445   echo "$as_me:12445: \$? = $ac_status" >&5
12446   (exit $ac_status); } &&
12447          { ac_try='test -s conftest.$ac_objext'
12448   { (eval echo "$as_me:12448: \"$ac_try\"") >&5
12449   (eval $ac_try) 2>&5
12450   ac_status=$?
12451   echo "$as_me:12451: \$? = $ac_status" >&5
12452   (exit $ac_status); }; }; then
12453   cf_cv_sig_atomic_t=$cf_type
12454 else
12455   echo "$as_me: failed program was:" >&5
12456 cat conftest.$ac_ext >&5
12457 cf_cv_sig_atomic_t=no
12458 fi
12459 rm -f conftest.$ac_objext conftest.$ac_ext
12460                 test "$cf_cv_sig_atomic_t" != no && break
12461         done
12462
12463 fi
12464
12465 echo "$as_me:12465: result: $cf_cv_sig_atomic_t" >&5
12466 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12467 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12468 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12469 EOF
12470
12471 if test $NCURSES_CHTYPE = auto ; then
12472
12473 echo "$as_me:12473: checking for type of chtype" >&5
12474 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12475 if test "${cf_cv_typeof_chtype+set}" = set; then
12476   echo $ECHO_N "(cached) $ECHO_C" >&6
12477 else
12478
12479                 if test "$cross_compiling" = yes; then
12480   cf_cv_typeof_chtype=long
12481 else
12482   cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485
12486 #define WANT_BITS 31
12487 #include <stdio.h>
12488 int main()
12489 {
12490         FILE *fp = fopen("cf_test.out", "w");
12491         if (fp != 0) {
12492                 char *result = "long";
12493                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12494                         int n;
12495                         unsigned int x, y;
12496                         for (n = 0; n < WANT_BITS; n++) {
12497                                 x = (1 << n);
12498                                 y = (x >> n);
12499                                 if (y != 1 || x == 0) {
12500                                         x = 0;
12501                                         break;
12502                                 }
12503                         }
12504                         /*
12505                          * If x is nonzero, an int is big enough for the bits
12506                          * that we want.
12507                          */
12508                         result = (x != 0) ? "int" : "long";
12509                 }
12510                 fputs(result, fp);
12511                 fclose(fp);
12512         }
12513         ${cf_cv_main_return:-return}(0);
12514 }
12515
12516 _ACEOF
12517 rm -f conftest$ac_exeext
12518 if { (eval echo "$as_me:12518: \"$ac_link\"") >&5
12519   (eval $ac_link) 2>&5
12520   ac_status=$?
12521   echo "$as_me:12521: \$? = $ac_status" >&5
12522   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12523   { (eval echo "$as_me:12523: \"$ac_try\"") >&5
12524   (eval $ac_try) 2>&5
12525   ac_status=$?
12526   echo "$as_me:12526: \$? = $ac_status" >&5
12527   (exit $ac_status); }; }; then
12528   cf_cv_typeof_chtype=`cat cf_test.out`
12529 else
12530   echo "$as_me: program exited with status $ac_status" >&5
12531 echo "$as_me: failed program was:" >&5
12532 cat conftest.$ac_ext >&5
12533 cf_cv_typeof_chtype=long
12534 fi
12535 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12536 fi
12537                 rm -f cf_test.out
12538
12539 fi
12540
12541 echo "$as_me:12541: result: $cf_cv_typeof_chtype" >&5
12542 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12543
12544 cat >>confdefs.h <<EOF
12545 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12546 EOF
12547
12548 else
12549         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12550 fi
12551 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12552
12553 echo "$as_me:12553: checking if unsigned literals are legal" >&5
12554 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12555 if test "${cf_cv_unsigned_literals+set}" = set; then
12556   echo $ECHO_N "(cached) $ECHO_C" >&6
12557 else
12558
12559         cat >conftest.$ac_ext <<_ACEOF
12560 #line 12560 "configure"
12561 #include "confdefs.h"
12562
12563 int
12564 main ()
12565 {
12566 long x = 1L + 1UL + 1U + 1
12567   ;
12568   return 0;
12569 }
12570 _ACEOF
12571 rm -f conftest.$ac_objext
12572 if { (eval echo "$as_me:12572: \"$ac_compile\"") >&5
12573   (eval $ac_compile) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -s conftest.$ac_objext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   cf_cv_unsigned_literals=yes
12584 else
12585   echo "$as_me: failed program was:" >&5
12586 cat conftest.$ac_ext >&5
12587 cf_cv_unsigned_literals=no
12588 fi
12589 rm -f conftest.$ac_objext conftest.$ac_ext
12590
12591 fi
12592
12593 echo "$as_me:12593: result: $cf_cv_unsigned_literals" >&5
12594 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12595
12596 cf_cv_1UL="1"
12597 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12598 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12599
12600 if test $NCURSES_MMASK_T = auto ; then
12601         cf_cv_typeof_mmask_t=long
12602 else
12603         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12604 fi
12605 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12606
12607 ###     Checks for external-data
12608
12609 echo "$as_me:12609: checking if external errno is declared" >&5
12610 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12611 if test "${cf_cv_dcl_errno+set}" = set; then
12612   echo $ECHO_N "(cached) $ECHO_C" >&6
12613 else
12614
12615     cat >conftest.$ac_ext <<_ACEOF
12616 #line 12616 "configure"
12617 #include "confdefs.h"
12618
12619 #ifdef HAVE_STDLIB_H
12620 #include <stdlib.h>
12621 #endif
12622 #include <stdio.h>
12623 #include <sys/types.h>
12624 #include <errno.h>
12625 int
12626 main ()
12627 {
12628 int x = (int) errno
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 rm -f conftest.$ac_objext
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635   (eval $ac_compile) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit $ac_status); } &&
12639          { ac_try='test -s conftest.$ac_objext'
12640   { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641   (eval $ac_try) 2>&5
12642   ac_status=$?
12643   echo "$as_me:12643: \$? = $ac_status" >&5
12644   (exit $ac_status); }; }; then
12645   cf_cv_dcl_errno=yes
12646 else
12647   echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 cf_cv_dcl_errno=no
12650 fi
12651 rm -f conftest.$ac_objext conftest.$ac_ext
12652
12653 fi
12654 echo "$as_me:12654: result: $cf_cv_dcl_errno" >&5
12655 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12656
12657 if test "$cf_cv_dcl_errno" = no ; then
12658
12659 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12660
12661     cat >>confdefs.h <<EOF
12662 #define $cf_result 1
12663 EOF
12664
12665 fi
12666
12667 # It's possible (for near-UNIX clones) that the data doesn't exist
12668
12669 echo "$as_me:12669: checking if external errno exists" >&5
12670 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12671 if test "${cf_cv_have_errno+set}" = set; then
12672   echo $ECHO_N "(cached) $ECHO_C" >&6
12673 else
12674
12675     cat >conftest.$ac_ext <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678
12679 #undef errno
12680 extern int errno;
12681
12682 int
12683 main ()
12684 {
12685 errno = 2
12686   ;
12687   return 0;
12688 }
12689 _ACEOF
12690 rm -f conftest.$ac_objext conftest$ac_exeext
12691 if { (eval echo "$as_me:12691: \"$ac_link\"") >&5
12692   (eval $ac_link) 2>&5
12693   ac_status=$?
12694   echo "$as_me:12694: \$? = $ac_status" >&5
12695   (exit $ac_status); } &&
12696          { ac_try='test -s conftest$ac_exeext'
12697   { (eval echo "$as_me:12697: \"$ac_try\"") >&5
12698   (eval $ac_try) 2>&5
12699   ac_status=$?
12700   echo "$as_me:12700: \$? = $ac_status" >&5
12701   (exit $ac_status); }; }; then
12702   cf_cv_have_errno=yes
12703 else
12704   echo "$as_me: failed program was:" >&5
12705 cat conftest.$ac_ext >&5
12706 cf_cv_have_errno=no
12707 fi
12708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12709
12710 fi
12711 echo "$as_me:12711: result: $cf_cv_have_errno" >&5
12712 echo "${ECHO_T}$cf_cv_have_errno" >&6
12713
12714 if test "$cf_cv_have_errno" = yes ; then
12715
12716 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12717
12718     cat >>confdefs.h <<EOF
12719 #define $cf_result 1
12720 EOF
12721
12722 fi
12723
12724 echo "$as_me:12724: checking if data-only library module links" >&5
12725 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12726 if test "${cf_cv_link_dataonly+set}" = set; then
12727   echo $ECHO_N "(cached) $ECHO_C" >&6
12728 else
12729
12730         rm -f conftest.a
12731         cat >conftest.$ac_ext <<EOF
12732 #line 12732 "configure"
12733 int     testdata[3] = { 123, 456, 789 };
12734 EOF
12735         if { (eval echo "$as_me:12735: \"$ac_compile\"") >&5
12736   (eval $ac_compile) 2>&5
12737   ac_status=$?
12738   echo "$as_me:12738: \$? = $ac_status" >&5
12739   (exit $ac_status); } ; then
12740                 mv conftest.o data.o && \
12741                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12742         fi
12743         rm -f conftest.$ac_ext data.o
12744         cat >conftest.$ac_ext <<EOF
12745 #line 12745 "configure"
12746 int     testfunc()
12747 {
12748 #if defined(NeXT)
12749         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12750 #else
12751         extern int testdata[3];
12752         return testdata[0] == 123
12753            &&  testdata[1] == 456
12754            &&  testdata[2] == 789;
12755 #endif
12756 }
12757 EOF
12758         if { (eval echo "$as_me:12758: \"$ac_compile\"") >&5
12759   (eval $ac_compile) 2>&5
12760   ac_status=$?
12761   echo "$as_me:12761: \$? = $ac_status" >&5
12762   (exit $ac_status); }; then
12763                 mv conftest.o func.o && \
12764                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12765         fi
12766         rm -f conftest.$ac_ext func.o
12767         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12768         cf_saveLIBS="$LIBS"
12769         LIBS="conftest.a $LIBS"
12770         if test "$cross_compiling" = yes; then
12771   cf_cv_link_dataonly=unknown
12772 else
12773   cat >conftest.$ac_ext <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776
12777         int main()
12778         {
12779                 extern int testfunc();
12780                 ${cf_cv_main_return:-return} (!testfunc());
12781         }
12782
12783 _ACEOF
12784 rm -f conftest$ac_exeext
12785 if { (eval echo "$as_me:12785: \"$ac_link\"") >&5
12786   (eval $ac_link) 2>&5
12787   ac_status=$?
12788   echo "$as_me:12788: \$? = $ac_status" >&5
12789   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12790   { (eval echo "$as_me:12790: \"$ac_try\"") >&5
12791   (eval $ac_try) 2>&5
12792   ac_status=$?
12793   echo "$as_me:12793: \$? = $ac_status" >&5
12794   (exit $ac_status); }; }; then
12795   cf_cv_link_dataonly=yes
12796 else
12797   echo "$as_me: program exited with status $ac_status" >&5
12798 echo "$as_me: failed program was:" >&5
12799 cat conftest.$ac_ext >&5
12800 cf_cv_link_dataonly=no
12801 fi
12802 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12803 fi
12804         LIBS="$cf_saveLIBS"
12805
12806 fi
12807
12808 echo "$as_me:12808: result: $cf_cv_link_dataonly" >&5
12809 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12810
12811 if test "$cf_cv_link_dataonly" = no ; then
12812         cat >>confdefs.h <<\EOF
12813 #define BROKEN_LINKER 1
12814 EOF
12815
12816         BROKEN_LINKER=1
12817 fi
12818
12819 ###     Checks for library functions.
12820
12821 for ac_func in \
12822 getcwd \
12823 getegid \
12824 geteuid \
12825 getttynam \
12826 issetugid \
12827 poll \
12828 remove \
12829 select \
12830 setbuf \
12831 setbuffer \
12832 setvbuf \
12833 sigaction \
12834 sigvec \
12835 strdup \
12836 strstr \
12837 tcgetpgrp \
12838 times \
12839 vsnprintf \
12840
12841 do
12842 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12843 echo "$as_me:12843: checking for $ac_func" >&5
12844 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12845 if eval "test \"\${$as_ac_var+set}\" = set"; then
12846   echo $ECHO_N "(cached) $ECHO_C" >&6
12847 else
12848   cat >conftest.$ac_ext <<_ACEOF
12849 #line 12849 "configure"
12850 #include "confdefs.h"
12851 /* System header to define __stub macros and hopefully few prototypes,
12852     which can conflict with char $ac_func (); below.  */
12853 #include <assert.h>
12854 /* Override any gcc2 internal prototype to avoid an error.  */
12855 #ifdef __cplusplus
12856 extern "C"
12857 #endif
12858 /* We use char because int might match the return type of a gcc2
12859    builtin and then its argument prototype would still apply.  */
12860 char $ac_func ();
12861 char (*f) ();
12862
12863 int
12864 main ()
12865 {
12866 /* The GNU C library defines this for functions which it implements
12867     to always fail with ENOSYS.  Some functions are actually named
12868     something starting with __ and the normal name is an alias.  */
12869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12870 choke me
12871 #else
12872 f = $ac_func;
12873 #endif
12874
12875   ;
12876   return 0;
12877 }
12878 _ACEOF
12879 rm -f conftest.$ac_objext conftest$ac_exeext
12880 if { (eval echo "$as_me:12880: \"$ac_link\"") >&5
12881   (eval $ac_link) 2>&5
12882   ac_status=$?
12883   echo "$as_me:12883: \$? = $ac_status" >&5
12884   (exit $ac_status); } &&
12885          { ac_try='test -s conftest$ac_exeext'
12886   { (eval echo "$as_me:12886: \"$ac_try\"") >&5
12887   (eval $ac_try) 2>&5
12888   ac_status=$?
12889   echo "$as_me:12889: \$? = $ac_status" >&5
12890   (exit $ac_status); }; }; then
12891   eval "$as_ac_var=yes"
12892 else
12893   echo "$as_me: failed program was:" >&5
12894 cat conftest.$ac_ext >&5
12895 eval "$as_ac_var=no"
12896 fi
12897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12898 fi
12899 echo "$as_me:12899: result: `eval echo '${'$as_ac_var'}'`" >&5
12900 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12901 if test `eval echo '${'$as_ac_var'}'` = yes; then
12902   cat >>confdefs.h <<EOF
12903 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12904 EOF
12905
12906 fi
12907 done
12908
12909 if test "$with_getcap" = "yes" ; then
12910
12911 echo "$as_me:12911: checking for terminal-capability database functions" >&5
12912 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12913 if test "${cf_cv_cgetent+set}" = set; then
12914   echo $ECHO_N "(cached) $ECHO_C" >&6
12915 else
12916
12917 cat >conftest.$ac_ext <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920
12921 #include <stdlib.h>
12922 int
12923 main ()
12924 {
12925
12926         char temp[128];
12927         char *buf = temp;
12928         char *db_array = temp;
12929         cgetent(&buf, /* int *, */ &db_array, "vt100");
12930         cgetcap(buf, "tc", '=');
12931         cgetmatch(buf, "tc");
12932
12933   ;
12934   return 0;
12935 }
12936 _ACEOF
12937 rm -f conftest.$ac_objext conftest$ac_exeext
12938 if { (eval echo "$as_me:12938: \"$ac_link\"") >&5
12939   (eval $ac_link) 2>&5
12940   ac_status=$?
12941   echo "$as_me:12941: \$? = $ac_status" >&5
12942   (exit $ac_status); } &&
12943          { ac_try='test -s conftest$ac_exeext'
12944   { (eval echo "$as_me:12944: \"$ac_try\"") >&5
12945   (eval $ac_try) 2>&5
12946   ac_status=$?
12947   echo "$as_me:12947: \$? = $ac_status" >&5
12948   (exit $ac_status); }; }; then
12949   cf_cv_cgetent=yes
12950 else
12951   echo "$as_me: failed program was:" >&5
12952 cat conftest.$ac_ext >&5
12953 cf_cv_cgetent=no
12954 fi
12955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12956
12957 fi
12958
12959 echo "$as_me:12959: result: $cf_cv_cgetent" >&5
12960 echo "${ECHO_T}$cf_cv_cgetent" >&6
12961 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12962 #define HAVE_BSD_CGETENT 1
12963 EOF
12964
12965 fi
12966
12967 echo "$as_me:12967: checking for isascii" >&5
12968 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12969 if test "${cf_cv_have_isascii+set}" = set; then
12970   echo $ECHO_N "(cached) $ECHO_C" >&6
12971 else
12972
12973         cat >conftest.$ac_ext <<_ACEOF
12974 #line 12974 "configure"
12975 #include "confdefs.h"
12976 #include <ctype.h>
12977 int
12978 main ()
12979 {
12980 int x = isascii(' ')
12981   ;
12982   return 0;
12983 }
12984 _ACEOF
12985 rm -f conftest.$ac_objext conftest$ac_exeext
12986 if { (eval echo "$as_me:12986: \"$ac_link\"") >&5
12987   (eval $ac_link) 2>&5
12988   ac_status=$?
12989   echo "$as_me:12989: \$? = $ac_status" >&5
12990   (exit $ac_status); } &&
12991          { ac_try='test -s conftest$ac_exeext'
12992   { (eval echo "$as_me:12992: \"$ac_try\"") >&5
12993   (eval $ac_try) 2>&5
12994   ac_status=$?
12995   echo "$as_me:12995: \$? = $ac_status" >&5
12996   (exit $ac_status); }; }; then
12997   cf_cv_have_isascii=yes
12998 else
12999   echo "$as_me: failed program was:" >&5
13000 cat conftest.$ac_ext >&5
13001 cf_cv_have_isascii=no
13002 fi
13003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13004
13005 fi
13006 echo "$as_me:13006: result: $cf_cv_have_isascii" >&5
13007 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13008 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13009 #define HAVE_ISASCII 1
13010 EOF
13011
13012 if test "$ac_cv_func_sigaction" = yes; then
13013 echo "$as_me:13013: checking whether sigaction needs _POSIX_SOURCE" >&5
13014 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13015 cat >conftest.$ac_ext <<_ACEOF
13016 #line 13016 "configure"
13017 #include "confdefs.h"
13018
13019 #include <sys/types.h>
13020 #include <signal.h>
13021 int
13022 main ()
13023 {
13024 struct sigaction act
13025   ;
13026   return 0;
13027 }
13028 _ACEOF
13029 rm -f conftest.$ac_objext
13030 if { (eval echo "$as_me:13030: \"$ac_compile\"") >&5
13031   (eval $ac_compile) 2>&5
13032   ac_status=$?
13033   echo "$as_me:13033: \$? = $ac_status" >&5
13034   (exit $ac_status); } &&
13035          { ac_try='test -s conftest.$ac_objext'
13036   { (eval echo "$as_me:13036: \"$ac_try\"") >&5
13037   (eval $ac_try) 2>&5
13038   ac_status=$?
13039   echo "$as_me:13039: \$? = $ac_status" >&5
13040   (exit $ac_status); }; }; then
13041   sigact_bad=no
13042 else
13043   echo "$as_me: failed program was:" >&5
13044 cat conftest.$ac_ext >&5
13045
13046 cat >conftest.$ac_ext <<_ACEOF
13047 #line 13047 "configure"
13048 #include "confdefs.h"
13049
13050 #define _POSIX_SOURCE
13051 #include <sys/types.h>
13052 #include <signal.h>
13053 int
13054 main ()
13055 {
13056 struct sigaction act
13057   ;
13058   return 0;
13059 }
13060 _ACEOF
13061 rm -f conftest.$ac_objext
13062 if { (eval echo "$as_me:13062: \"$ac_compile\"") >&5
13063   (eval $ac_compile) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit $ac_status); } &&
13067          { ac_try='test -s conftest.$ac_objext'
13068   { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069   (eval $ac_try) 2>&5
13070   ac_status=$?
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit $ac_status); }; }; then
13073   sigact_bad=yes
13074          cat >>confdefs.h <<\EOF
13075 #define SVR4_ACTION 1
13076 EOF
13077
13078 else
13079   echo "$as_me: failed program was:" >&5
13080 cat conftest.$ac_ext >&5
13081 sigact_bad=unknown
13082 fi
13083 rm -f conftest.$ac_objext conftest.$ac_ext
13084 fi
13085 rm -f conftest.$ac_objext conftest.$ac_ext
13086 echo "$as_me:13086: result: $sigact_bad" >&5
13087 echo "${ECHO_T}$sigact_bad" >&6
13088 fi
13089
13090 echo "$as_me:13090: checking if nanosleep really works" >&5
13091 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13092 if test "${cf_cv_func_nanosleep+set}" = set; then
13093   echo $ECHO_N "(cached) $ECHO_C" >&6
13094 else
13095
13096 if test "$cross_compiling" = yes; then
13097   cf_cv_func_nanosleep=unknown
13098 else
13099   cat >conftest.$ac_ext <<_ACEOF
13100 #line 13100 "configure"
13101 #include "confdefs.h"
13102
13103 #include <stdio.h>
13104 #include <errno.h>
13105 #include <time.h>
13106
13107 #ifdef HAVE_SYS_TIME_H
13108 #include <sys/time.h>
13109 #endif
13110
13111 int main() {
13112         struct timespec ts1, ts2;
13113         int code;
13114         ts1.tv_sec  = 0;
13115         ts1.tv_nsec = 750000000;
13116         ts2.tv_sec  = 0;
13117         ts2.tv_nsec = 0;
13118         errno = 0;
13119         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13120         ${cf_cv_main_return:-return}(code != 0);
13121 }
13122
13123 _ACEOF
13124 rm -f conftest$ac_exeext
13125 if { (eval echo "$as_me:13125: \"$ac_link\"") >&5
13126   (eval $ac_link) 2>&5
13127   ac_status=$?
13128   echo "$as_me:13128: \$? = $ac_status" >&5
13129   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13130   { (eval echo "$as_me:13130: \"$ac_try\"") >&5
13131   (eval $ac_try) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); }; }; then
13135   cf_cv_func_nanosleep=yes
13136 else
13137   echo "$as_me: program exited with status $ac_status" >&5
13138 echo "$as_me: failed program was:" >&5
13139 cat conftest.$ac_ext >&5
13140 cf_cv_func_nanosleep=no
13141 fi
13142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13143 fi
13144 fi
13145 echo "$as_me:13145: result: $cf_cv_func_nanosleep" >&5
13146 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13147
13148 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13149 #define HAVE_NANOSLEEP 1
13150 EOF
13151
13152 for ac_header in \
13153 termio.h \
13154 termios.h \
13155 unistd.h \
13156
13157 do
13158 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13159 echo "$as_me:13159: checking for $ac_header" >&5
13160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13162   echo $ECHO_N "(cached) $ECHO_C" >&6
13163 else
13164   cat >conftest.$ac_ext <<_ACEOF
13165 #line 13165 "configure"
13166 #include "confdefs.h"
13167 #include <$ac_header>
13168 _ACEOF
13169 if { (eval echo "$as_me:13169: \"$ac_cpp conftest.$ac_ext\"") >&5
13170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13171   ac_status=$?
13172   egrep -v '^ *\+' conftest.er1 >conftest.err
13173   rm -f conftest.er1
13174   cat conftest.err >&5
13175   echo "$as_me:13175: \$? = $ac_status" >&5
13176   (exit $ac_status); } >/dev/null; then
13177   if test -s conftest.err; then
13178     ac_cpp_err=$ac_c_preproc_warn_flag
13179   else
13180     ac_cpp_err=
13181   fi
13182 else
13183   ac_cpp_err=yes
13184 fi
13185 if test -z "$ac_cpp_err"; then
13186   eval "$as_ac_Header=yes"
13187 else
13188   echo "$as_me: failed program was:" >&5
13189   cat conftest.$ac_ext >&5
13190   eval "$as_ac_Header=no"
13191 fi
13192 rm -f conftest.err conftest.$ac_ext
13193 fi
13194 echo "$as_me:13194: result: `eval echo '${'$as_ac_Header'}'`" >&5
13195 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13196 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13197   cat >>confdefs.h <<EOF
13198 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13199 EOF
13200
13201 fi
13202 done
13203
13204 if test "$ISC" = yes ; then
13205
13206 for ac_header in sys/termio.h
13207 do
13208 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13209 echo "$as_me:13209: checking for $ac_header" >&5
13210 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13211 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13212   echo $ECHO_N "(cached) $ECHO_C" >&6
13213 else
13214   cat >conftest.$ac_ext <<_ACEOF
13215 #line 13215 "configure"
13216 #include "confdefs.h"
13217 #include <$ac_header>
13218 _ACEOF
13219 if { (eval echo "$as_me:13219: \"$ac_cpp conftest.$ac_ext\"") >&5
13220   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13221   ac_status=$?
13222   egrep -v '^ *\+' conftest.er1 >conftest.err
13223   rm -f conftest.er1
13224   cat conftest.err >&5
13225   echo "$as_me:13225: \$? = $ac_status" >&5
13226   (exit $ac_status); } >/dev/null; then
13227   if test -s conftest.err; then
13228     ac_cpp_err=$ac_c_preproc_warn_flag
13229   else
13230     ac_cpp_err=
13231   fi
13232 else
13233   ac_cpp_err=yes
13234 fi
13235 if test -z "$ac_cpp_err"; then
13236   eval "$as_ac_Header=yes"
13237 else
13238   echo "$as_me: failed program was:" >&5
13239   cat conftest.$ac_ext >&5
13240   eval "$as_ac_Header=no"
13241 fi
13242 rm -f conftest.err conftest.$ac_ext
13243 fi
13244 echo "$as_me:13244: result: `eval echo '${'$as_ac_Header'}'`" >&5
13245 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13246 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13247   cat >>confdefs.h <<EOF
13248 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13249 EOF
13250
13251 fi
13252 done
13253
13254 fi
13255 if test "$ac_cv_header_termios_h" = yes ; then
13256         case "$CFLAGS $CPPFLAGS" in
13257         *-D_POSIX_SOURCE*)
13258                 termios_bad=dunno ;;
13259         *)      termios_bad=maybe ;;
13260         esac
13261         if test "$termios_bad" = maybe ; then
13262         echo "$as_me:13262: checking whether termios.h needs _POSIX_SOURCE" >&5
13263 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13264         cat >conftest.$ac_ext <<_ACEOF
13265 #line 13265 "configure"
13266 #include "confdefs.h"
13267 #include <termios.h>
13268 int
13269 main ()
13270 {
13271 struct termios foo; int x = foo.c_iflag
13272   ;
13273   return 0;
13274 }
13275 _ACEOF
13276 rm -f conftest.$ac_objext
13277 if { (eval echo "$as_me:13277: \"$ac_compile\"") >&5
13278   (eval $ac_compile) 2>&5
13279   ac_status=$?
13280   echo "$as_me:13280: \$? = $ac_status" >&5
13281   (exit $ac_status); } &&
13282          { ac_try='test -s conftest.$ac_objext'
13283   { (eval echo "$as_me:13283: \"$ac_try\"") >&5
13284   (eval $ac_try) 2>&5
13285   ac_status=$?
13286   echo "$as_me:13286: \$? = $ac_status" >&5
13287   (exit $ac_status); }; }; then
13288   termios_bad=no
13289 else
13290   echo "$as_me: failed program was:" >&5
13291 cat conftest.$ac_ext >&5
13292
13293                 cat >conftest.$ac_ext <<_ACEOF
13294 #line 13294 "configure"
13295 #include "confdefs.h"
13296
13297 #define _POSIX_SOURCE
13298 #include <termios.h>
13299 int
13300 main ()
13301 {
13302 struct termios foo; int x = foo.c_iflag
13303   ;
13304   return 0;
13305 }
13306 _ACEOF
13307 rm -f conftest.$ac_objext
13308 if { (eval echo "$as_me:13308: \"$ac_compile\"") >&5
13309   (eval $ac_compile) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); } &&
13313          { ac_try='test -s conftest.$ac_objext'
13314   { (eval echo "$as_me:13314: \"$ac_try\"") >&5
13315   (eval $ac_try) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit $ac_status); }; }; then
13319   termios_bad=unknown
13320 else
13321   echo "$as_me: failed program was:" >&5
13322 cat conftest.$ac_ext >&5
13323 termios_bad=yes cat >>confdefs.h <<\EOF
13324 #define SVR4_TERMIO 1
13325 EOF
13326
13327 fi
13328 rm -f conftest.$ac_objext conftest.$ac_ext
13329
13330 fi
13331 rm -f conftest.$ac_objext conftest.$ac_ext
13332         echo "$as_me:13332: result: $termios_bad" >&5
13333 echo "${ECHO_T}$termios_bad" >&6
13334         fi
13335 fi
13336
13337 echo "$as_me:13337: checking for tcgetattr" >&5
13338 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13339 if test "${cf_cv_have_tcgetattr+set}" = set; then
13340   echo $ECHO_N "(cached) $ECHO_C" >&6
13341 else
13342
13343 cat >conftest.$ac_ext <<_ACEOF
13344 #line 13344 "configure"
13345 #include "confdefs.h"
13346
13347 #include <sys/types.h>
13348 #ifdef HAVE_UNISTD_H
13349 #include <unistd.h>
13350 #endif
13351 #ifdef HAVE_TERMIOS_H
13352 #include <termios.h>
13353 #define TTY struct termios
13354 #else
13355 #ifdef HAVE_TERMIO_H
13356 #include <termio.h>
13357 #define TTY struct termio
13358 #endif
13359 #endif
13360
13361 int
13362 main ()
13363 {
13364
13365 TTY foo;
13366 tcgetattr(1, &foo);
13367   ;
13368   return 0;
13369 }
13370 _ACEOF
13371 rm -f conftest.$ac_objext conftest$ac_exeext
13372 if { (eval echo "$as_me:13372: \"$ac_link\"") >&5
13373   (eval $ac_link) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); } &&
13377          { ac_try='test -s conftest$ac_exeext'
13378   { (eval echo "$as_me:13378: \"$ac_try\"") >&5
13379   (eval $ac_try) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit $ac_status); }; }; then
13383   cf_cv_have_tcgetattr=yes
13384 else
13385   echo "$as_me: failed program was:" >&5
13386 cat conftest.$ac_ext >&5
13387 cf_cv_have_tcgetattr=no
13388 fi
13389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13390 fi
13391 echo "$as_me:13391: result: $cf_cv_have_tcgetattr" >&5
13392 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13393 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13394 #define HAVE_TCGETATTR 1
13395 EOF
13396
13397 echo "$as_me:13397: checking for vsscanf function or workaround" >&5
13398 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13399 if test "${cf_cv_func_vsscanf+set}" = set; then
13400   echo $ECHO_N "(cached) $ECHO_C" >&6
13401 else
13402
13403 cat >conftest.$ac_ext <<_ACEOF
13404 #line 13404 "configure"
13405 #include "confdefs.h"
13406
13407 #include <stdarg.h>
13408 #include <stdio.h>
13409 int
13410 main ()
13411 {
13412
13413         va_list ap;
13414         vsscanf("from", "%d", ap)
13415   ;
13416   return 0;
13417 }
13418 _ACEOF
13419 rm -f conftest.$ac_objext conftest$ac_exeext
13420 if { (eval echo "$as_me:13420: \"$ac_link\"") >&5
13421   (eval $ac_link) 2>&5
13422   ac_status=$?
13423   echo "$as_me:13423: \$? = $ac_status" >&5
13424   (exit $ac_status); } &&
13425          { ac_try='test -s conftest$ac_exeext'
13426   { (eval echo "$as_me:13426: \"$ac_try\"") >&5
13427   (eval $ac_try) 2>&5
13428   ac_status=$?
13429   echo "$as_me:13429: \$? = $ac_status" >&5
13430   (exit $ac_status); }; }; then
13431   cf_cv_func_vsscanf=vsscanf
13432 else
13433   echo "$as_me: failed program was:" >&5
13434 cat conftest.$ac_ext >&5
13435
13436 cat >conftest.$ac_ext <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439
13440 #include <stdarg.h>
13441 #include <stdio.h>
13442 int
13443 main ()
13444 {
13445
13446     FILE strbuf;
13447     char *str = "from";
13448
13449     strbuf._flag = _IOREAD;
13450     strbuf._ptr = strbuf._base = (unsigned char *) str;
13451     strbuf._cnt = strlen(str);
13452     strbuf._file = _NFILE;
13453     return (vfscanf(&strbuf, "%d", ap))
13454   ;
13455   return 0;
13456 }
13457 _ACEOF
13458 rm -f conftest.$ac_objext conftest$ac_exeext
13459 if { (eval echo "$as_me:13459: \"$ac_link\"") >&5
13460   (eval $ac_link) 2>&5
13461   ac_status=$?
13462   echo "$as_me:13462: \$? = $ac_status" >&5
13463   (exit $ac_status); } &&
13464          { ac_try='test -s conftest$ac_exeext'
13465   { (eval echo "$as_me:13465: \"$ac_try\"") >&5
13466   (eval $ac_try) 2>&5
13467   ac_status=$?
13468   echo "$as_me:13468: \$? = $ac_status" >&5
13469   (exit $ac_status); }; }; then
13470   cf_cv_func_vsscanf=vfscanf
13471 else
13472   echo "$as_me: failed program was:" >&5
13473 cat conftest.$ac_ext >&5
13474
13475 cat >conftest.$ac_ext <<_ACEOF
13476 #line 13476 "configure"
13477 #include "confdefs.h"
13478
13479 #include <stdarg.h>
13480 #include <stdio.h>
13481 int
13482 main ()
13483 {
13484
13485     FILE strbuf;
13486     char *str = "from";
13487
13488     strbuf._flag = _IOREAD;
13489     strbuf._ptr = strbuf._base = (unsigned char *) str;
13490     strbuf._cnt = strlen(str);
13491     strbuf._file = _NFILE;
13492     return (_doscan(&strbuf, "%d", ap))
13493   ;
13494   return 0;
13495 }
13496 _ACEOF
13497 rm -f conftest.$ac_objext conftest$ac_exeext
13498 if { (eval echo "$as_me:13498: \"$ac_link\"") >&5
13499   (eval $ac_link) 2>&5
13500   ac_status=$?
13501   echo "$as_me:13501: \$? = $ac_status" >&5
13502   (exit $ac_status); } &&
13503          { ac_try='test -s conftest$ac_exeext'
13504   { (eval echo "$as_me:13504: \"$ac_try\"") >&5
13505   (eval $ac_try) 2>&5
13506   ac_status=$?
13507   echo "$as_me:13507: \$? = $ac_status" >&5
13508   (exit $ac_status); }; }; then
13509   cf_cv_func_vsscanf=_doscan
13510 else
13511   echo "$as_me: failed program was:" >&5
13512 cat conftest.$ac_ext >&5
13513
13514 cf_cv_func_vsscanf=no
13515 fi
13516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13517 fi
13518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13519 fi
13520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13521 fi
13522 echo "$as_me:13522: result: $cf_cv_func_vsscanf" >&5
13523 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13524
13525 case $cf_cv_func_vsscanf in #(vi
13526 vsscanf) cat >>confdefs.h <<\EOF
13527 #define HAVE_VSSCANF 1
13528 EOF
13529 ;; #(vi
13530 vfscanf) cat >>confdefs.h <<\EOF
13531 #define HAVE_VFSCANF 1
13532 EOF
13533 ;; #(vi
13534 _doscan) cat >>confdefs.h <<\EOF
13535 #define HAVE__DOSCAN 1
13536 EOF
13537 ;;
13538 esac
13539
13540 echo "$as_me:13540: checking for working mkstemp" >&5
13541 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13542 if test "${cf_cv_func_mkstemp+set}" = set; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545
13546 rm -f conftest*
13547 if test "$cross_compiling" = yes; then
13548   echo "$as_me:13548: checking for mkstemp" >&5
13549 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13550 if test "${ac_cv_func_mkstemp+set}" = set; then
13551   echo $ECHO_N "(cached) $ECHO_C" >&6
13552 else
13553   cat >conftest.$ac_ext <<_ACEOF
13554 #line 13554 "configure"
13555 #include "confdefs.h"
13556 /* System header to define __stub macros and hopefully few prototypes,
13557     which can conflict with char mkstemp (); below.  */
13558 #include <assert.h>
13559 /* Override any gcc2 internal prototype to avoid an error.  */
13560 #ifdef __cplusplus
13561 extern "C"
13562 #endif
13563 /* We use char because int might match the return type of a gcc2
13564    builtin and then its argument prototype would still apply.  */
13565 char mkstemp ();
13566 char (*f) ();
13567
13568 int
13569 main ()
13570 {
13571 /* The GNU C library defines this for functions which it implements
13572     to always fail with ENOSYS.  Some functions are actually named
13573     something starting with __ and the normal name is an alias.  */
13574 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13575 choke me
13576 #else
13577 f = mkstemp;
13578 #endif
13579
13580   ;
13581   return 0;
13582 }
13583 _ACEOF
13584 rm -f conftest.$ac_objext conftest$ac_exeext
13585 if { (eval echo "$as_me:13585: \"$ac_link\"") >&5
13586   (eval $ac_link) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit $ac_status); } &&
13590          { ac_try='test -s conftest$ac_exeext'
13591   { (eval echo "$as_me:13591: \"$ac_try\"") >&5
13592   (eval $ac_try) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit $ac_status); }; }; then
13596   ac_cv_func_mkstemp=yes
13597 else
13598   echo "$as_me: failed program was:" >&5
13599 cat conftest.$ac_ext >&5
13600 ac_cv_func_mkstemp=no
13601 fi
13602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13603 fi
13604 echo "$as_me:13604: result: $ac_cv_func_mkstemp" >&5
13605 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13606
13607 else
13608   cat >conftest.$ac_ext <<_ACEOF
13609 #line 13609 "configure"
13610 #include "confdefs.h"
13611
13612 #include <sys/types.h>
13613 #include <stdlib.h>
13614 #include <stdio.h>
13615 #include <string.h>
13616 #include <sys/stat.h>
13617 int main()
13618 {
13619         char *tmpl = "conftestXXXXXX";
13620         char name[2][80];
13621         int n;
13622         int result = 0;
13623         int fd;
13624         struct stat sb;
13625
13626         umask(077);
13627         for (n = 0; n < 2; ++n) {
13628                 strcpy(name[n], tmpl);
13629                 if ((fd = mkstemp(name[n])) >= 0) {
13630                         if (!strcmp(name[n], tmpl)
13631                          || stat(name[n], &sb) != 0
13632                          || (sb.st_mode & S_IFMT) != S_IFREG
13633                          || (sb.st_mode & 077) != 0) {
13634                                 result = 1;
13635                         }
13636                         close(fd);
13637                 }
13638         }
13639         if (result == 0
13640          && !strcmp(name[0], name[1]))
13641                 result = 1;
13642         ${cf_cv_main_return:-return}(result);
13643 }
13644
13645 _ACEOF
13646 rm -f conftest$ac_exeext
13647 if { (eval echo "$as_me:13647: \"$ac_link\"") >&5
13648   (eval $ac_link) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13652   { (eval echo "$as_me:13652: \"$ac_try\"") >&5
13653   (eval $ac_try) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit $ac_status); }; }; then
13657   cf_cv_func_mkstemp=yes
13658
13659 else
13660   echo "$as_me: program exited with status $ac_status" >&5
13661 echo "$as_me: failed program was:" >&5
13662 cat conftest.$ac_ext >&5
13663 cf_cv_func_mkstemp=no
13664
13665 fi
13666 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13667 fi
13668
13669 fi
13670 echo "$as_me:13670: result: $cf_cv_func_mkstemp" >&5
13671 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13672 if test "$cf_cv_func_mkstemp" = yes ; then
13673         cat >>confdefs.h <<\EOF
13674 #define HAVE_MKSTEMP 1
13675 EOF
13676
13677 fi
13678
13679 # setup for prototype of fallback for vsscanf()
13680
13681 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13682         HAVE_VSSCANF=1
13683 else
13684         HAVE_VSSCANF=0
13685 fi
13686
13687 if test "$cross_compiling" = yes ; then
13688         { echo "$as_me:13688: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13689 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13690 else
13691         echo "$as_me:13691: checking whether setvbuf arguments are reversed" >&5
13692 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13693 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   if test "$cross_compiling" = yes; then
13697   { { echo "$as_me:13697: error: cannot run test program while cross compiling" >&5
13698 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13699    { (exit 1); exit 1; }; }
13700 else
13701   cat >conftest.$ac_ext <<_ACEOF
13702 #line 13702 "configure"
13703 #include "confdefs.h"
13704 #include <stdio.h>
13705 /* If setvbuf has the reversed format, exit 0. */
13706 int
13707 main ()
13708 {
13709   /* This call has the arguments reversed.
13710      A reversed system may check and see that the address of main
13711      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13712   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13713     $ac_main_return(1);
13714   putc('\r', stdout);
13715   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13716 }
13717 _ACEOF
13718 rm -f conftest$ac_exeext
13719 if { (eval echo "$as_me:13719: \"$ac_link\"") >&5
13720   (eval $ac_link) 2>&5
13721   ac_status=$?
13722   echo "$as_me:13722: \$? = $ac_status" >&5
13723   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13724   { (eval echo "$as_me:13724: \"$ac_try\"") >&5
13725   (eval $ac_try) 2>&5
13726   ac_status=$?
13727   echo "$as_me:13727: \$? = $ac_status" >&5
13728   (exit $ac_status); }; }; then
13729   ac_cv_func_setvbuf_reversed=yes
13730 else
13731   echo "$as_me: program exited with status $ac_status" >&5
13732 echo "$as_me: failed program was:" >&5
13733 cat conftest.$ac_ext >&5
13734 ac_cv_func_setvbuf_reversed=no
13735 fi
13736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13737 fi
13738 rm -f core core.* *.core
13739 fi
13740 echo "$as_me:13740: result: $ac_cv_func_setvbuf_reversed" >&5
13741 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13742 if test $ac_cv_func_setvbuf_reversed = yes; then
13743
13744 cat >>confdefs.h <<\EOF
13745 #define SETVBUF_REVERSED 1
13746 EOF
13747
13748 fi
13749
13750 fi
13751 echo "$as_me:13751: checking return type of signal handlers" >&5
13752 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13753 if test "${ac_cv_type_signal+set}" = set; then
13754   echo $ECHO_N "(cached) $ECHO_C" >&6
13755 else
13756   cat >conftest.$ac_ext <<_ACEOF
13757 #line 13757 "configure"
13758 #include "confdefs.h"
13759 #include <sys/types.h>
13760 #include <signal.h>
13761 #ifdef signal
13762 # undef signal
13763 #endif
13764 #ifdef __cplusplus
13765 extern "C" void (*signal (int, void (*)(int)))(int);
13766 #else
13767 void (*signal ()) ();
13768 #endif
13769
13770 int
13771 main ()
13772 {
13773 int i;
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 rm -f conftest.$ac_objext
13779 if { (eval echo "$as_me:13779: \"$ac_compile\"") >&5
13780   (eval $ac_compile) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit $ac_status); } &&
13784          { ac_try='test -s conftest.$ac_objext'
13785   { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786   (eval $ac_try) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit $ac_status); }; }; then
13790   ac_cv_type_signal=void
13791 else
13792   echo "$as_me: failed program was:" >&5
13793 cat conftest.$ac_ext >&5
13794 ac_cv_type_signal=int
13795 fi
13796 rm -f conftest.$ac_objext conftest.$ac_ext
13797 fi
13798 echo "$as_me:13798: result: $ac_cv_type_signal" >&5
13799 echo "${ECHO_T}$ac_cv_type_signal" >&6
13800
13801 cat >>confdefs.h <<EOF
13802 #define RETSIGTYPE $ac_cv_type_signal
13803 EOF
13804
13805 echo "$as_me:13805: checking for type sigaction_t" >&5
13806 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13807 if test "${cf_cv_type_sigaction+set}" = set; then
13808   echo $ECHO_N "(cached) $ECHO_C" >&6
13809 else
13810
13811         cat >conftest.$ac_ext <<_ACEOF
13812 #line 13812 "configure"
13813 #include "confdefs.h"
13814
13815 #include <signal.h>
13816 int
13817 main ()
13818 {
13819 sigaction_t x
13820   ;
13821   return 0;
13822 }
13823 _ACEOF
13824 rm -f conftest.$ac_objext
13825 if { (eval echo "$as_me:13825: \"$ac_compile\"") >&5
13826   (eval $ac_compile) 2>&5
13827   ac_status=$?
13828   echo "$as_me:13828: \$? = $ac_status" >&5
13829   (exit $ac_status); } &&
13830          { ac_try='test -s conftest.$ac_objext'
13831   { (eval echo "$as_me:13831: \"$ac_try\"") >&5
13832   (eval $ac_try) 2>&5
13833   ac_status=$?
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit $ac_status); }; }; then
13836   cf_cv_type_sigaction=yes
13837 else
13838   echo "$as_me: failed program was:" >&5
13839 cat conftest.$ac_ext >&5
13840 cf_cv_type_sigaction=no
13841 fi
13842 rm -f conftest.$ac_objext conftest.$ac_ext
13843 fi
13844
13845 echo "$as_me:13845: result: $cf_cv_type_sigaction" >&5
13846 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13847 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13848 #define HAVE_TYPE_SIGACTION 1
13849 EOF
13850
13851 echo "$as_me:13851: checking declaration of size-change" >&5
13852 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13853 if test "${cf_cv_sizechange+set}" = set; then
13854   echo $ECHO_N "(cached) $ECHO_C" >&6
13855 else
13856
13857     cf_cv_sizechange=unknown
13858     cf_save_CPPFLAGS="$CPPFLAGS"
13859
13860 for cf_opts in "" "NEED_PTEM_H"
13861 do
13862
13863     CPPFLAGS="$cf_save_CPPFLAGS"
13864     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13865     cat >conftest.$ac_ext <<_ACEOF
13866 #line 13866 "configure"
13867 #include "confdefs.h"
13868 #include <sys/types.h>
13869 #ifdef HAVE_TERMIOS_H
13870 #include <termios.h>
13871 #else
13872 #ifdef HAVE_TERMIO_H
13873 #include <termio.h>
13874 #endif
13875 #endif
13876 #ifdef NEED_PTEM_H
13877 /* This is a workaround for SCO:  they neglected to define struct winsize in
13878  * termios.h -- it's only in termio.h and ptem.h
13879  */
13880 #include        <sys/stream.h>
13881 #include        <sys/ptem.h>
13882 #endif
13883 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13884 #include <sys/ioctl.h>
13885 #endif
13886
13887 int
13888 main ()
13889 {
13890
13891 #ifdef TIOCGSIZE
13892         struct ttysize win;     /* FIXME: what system is this? */
13893         int y = win.ts_lines;
13894         int x = win.ts_cols;
13895 #else
13896 #ifdef TIOCGWINSZ
13897         struct winsize win;
13898         int y = win.ws_row;
13899         int x = win.ws_col;
13900 #else
13901         no TIOCGSIZE or TIOCGWINSZ
13902 #endif /* TIOCGWINSZ */
13903 #endif /* TIOCGSIZE */
13904
13905   ;
13906   return 0;
13907 }
13908 _ACEOF
13909 rm -f conftest.$ac_objext
13910 if { (eval echo "$as_me:13910: \"$ac_compile\"") >&5
13911   (eval $ac_compile) 2>&5
13912   ac_status=$?
13913   echo "$as_me:13913: \$? = $ac_status" >&5
13914   (exit $ac_status); } &&
13915          { ac_try='test -s conftest.$ac_objext'
13916   { (eval echo "$as_me:13916: \"$ac_try\"") >&5
13917   (eval $ac_try) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit $ac_status); }; }; then
13921   cf_cv_sizechange=yes
13922 else
13923   echo "$as_me: failed program was:" >&5
13924 cat conftest.$ac_ext >&5
13925 cf_cv_sizechange=no
13926 fi
13927 rm -f conftest.$ac_objext conftest.$ac_ext
13928
13929         CPPFLAGS="$cf_save_CPPFLAGS"
13930         if test "$cf_cv_sizechange" = yes ; then
13931                 echo "size-change succeeded ($cf_opts)" >&5
13932                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13933                 break
13934         fi
13935 done
13936
13937 fi
13938 echo "$as_me:13938: result: $cf_cv_sizechange" >&5
13939 echo "${ECHO_T}$cf_cv_sizechange" >&6
13940 if test "$cf_cv_sizechange" != no ; then
13941         cat >>confdefs.h <<\EOF
13942 #define HAVE_SIZECHANGE 1
13943 EOF
13944
13945         case $cf_cv_sizechange in #(vi
13946         NEED*)
13947                 cat >>confdefs.h <<EOF
13948 #define $cf_cv_sizechange  1
13949 EOF
13950
13951                 ;;
13952         esac
13953 fi
13954
13955 echo "$as_me:13955: checking for memmove" >&5
13956 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13957 if test "${ac_cv_func_memmove+set}" = set; then
13958   echo $ECHO_N "(cached) $ECHO_C" >&6
13959 else
13960   cat >conftest.$ac_ext <<_ACEOF
13961 #line 13961 "configure"
13962 #include "confdefs.h"
13963 /* System header to define __stub macros and hopefully few prototypes,
13964     which can conflict with char memmove (); below.  */
13965 #include <assert.h>
13966 /* Override any gcc2 internal prototype to avoid an error.  */
13967 #ifdef __cplusplus
13968 extern "C"
13969 #endif
13970 /* We use char because int might match the return type of a gcc2
13971    builtin and then its argument prototype would still apply.  */
13972 char memmove ();
13973 char (*f) ();
13974
13975 int
13976 main ()
13977 {
13978 /* The GNU C library defines this for functions which it implements
13979     to always fail with ENOSYS.  Some functions are actually named
13980     something starting with __ and the normal name is an alias.  */
13981 #if defined (__stub_memmove) || defined (__stub___memmove)
13982 choke me
13983 #else
13984 f = memmove;
13985 #endif
13986
13987   ;
13988   return 0;
13989 }
13990 _ACEOF
13991 rm -f conftest.$ac_objext conftest$ac_exeext
13992 if { (eval echo "$as_me:13992: \"$ac_link\"") >&5
13993   (eval $ac_link) 2>&5
13994   ac_status=$?
13995   echo "$as_me:13995: \$? = $ac_status" >&5
13996   (exit $ac_status); } &&
13997          { ac_try='test -s conftest$ac_exeext'
13998   { (eval echo "$as_me:13998: \"$ac_try\"") >&5
13999   (eval $ac_try) 2>&5
14000   ac_status=$?
14001   echo "$as_me:14001: \$? = $ac_status" >&5
14002   (exit $ac_status); }; }; then
14003   ac_cv_func_memmove=yes
14004 else
14005   echo "$as_me: failed program was:" >&5
14006 cat conftest.$ac_ext >&5
14007 ac_cv_func_memmove=no
14008 fi
14009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14010 fi
14011 echo "$as_me:14011: result: $ac_cv_func_memmove" >&5
14012 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14013 if test $ac_cv_func_memmove = yes; then
14014   :
14015 else
14016
14017 echo "$as_me:14017: checking for bcopy" >&5
14018 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14019 if test "${ac_cv_func_bcopy+set}" = set; then
14020   echo $ECHO_N "(cached) $ECHO_C" >&6
14021 else
14022   cat >conftest.$ac_ext <<_ACEOF
14023 #line 14023 "configure"
14024 #include "confdefs.h"
14025 /* System header to define __stub macros and hopefully few prototypes,
14026     which can conflict with char bcopy (); below.  */
14027 #include <assert.h>
14028 /* Override any gcc2 internal prototype to avoid an error.  */
14029 #ifdef __cplusplus
14030 extern "C"
14031 #endif
14032 /* We use char because int might match the return type of a gcc2
14033    builtin and then its argument prototype would still apply.  */
14034 char bcopy ();
14035 char (*f) ();
14036
14037 int
14038 main ()
14039 {
14040 /* The GNU C library defines this for functions which it implements
14041     to always fail with ENOSYS.  Some functions are actually named
14042     something starting with __ and the normal name is an alias.  */
14043 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14044 choke me
14045 #else
14046 f = bcopy;
14047 #endif
14048
14049   ;
14050   return 0;
14051 }
14052 _ACEOF
14053 rm -f conftest.$ac_objext conftest$ac_exeext
14054 if { (eval echo "$as_me:14054: \"$ac_link\"") >&5
14055   (eval $ac_link) 2>&5
14056   ac_status=$?
14057   echo "$as_me:14057: \$? = $ac_status" >&5
14058   (exit $ac_status); } &&
14059          { ac_try='test -s conftest$ac_exeext'
14060   { (eval echo "$as_me:14060: \"$ac_try\"") >&5
14061   (eval $ac_try) 2>&5
14062   ac_status=$?
14063   echo "$as_me:14063: \$? = $ac_status" >&5
14064   (exit $ac_status); }; }; then
14065   ac_cv_func_bcopy=yes
14066 else
14067   echo "$as_me: failed program was:" >&5
14068 cat conftest.$ac_ext >&5
14069 ac_cv_func_bcopy=no
14070 fi
14071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14072 fi
14073 echo "$as_me:14073: result: $ac_cv_func_bcopy" >&5
14074 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14075 if test $ac_cv_func_bcopy = yes; then
14076
14077         echo "$as_me:14077: checking if bcopy does overlapping moves" >&5
14078 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14079 if test "${cf_cv_good_bcopy+set}" = set; then
14080   echo $ECHO_N "(cached) $ECHO_C" >&6
14081 else
14082
14083                 if test "$cross_compiling" = yes; then
14084   cf_cv_good_bcopy=unknown
14085 else
14086   cat >conftest.$ac_ext <<_ACEOF
14087 #line 14087 "configure"
14088 #include "confdefs.h"
14089
14090 int main() {
14091         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14092         char temp[40];
14093         bcopy(data, temp, sizeof(data));
14094         bcopy(temp+10, temp, 15);
14095         bcopy(temp+5, temp+15, 10);
14096         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14097 }
14098
14099 _ACEOF
14100 rm -f conftest$ac_exeext
14101 if { (eval echo "$as_me:14101: \"$ac_link\"") >&5
14102   (eval $ac_link) 2>&5
14103   ac_status=$?
14104   echo "$as_me:14104: \$? = $ac_status" >&5
14105   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14106   { (eval echo "$as_me:14106: \"$ac_try\"") >&5
14107   (eval $ac_try) 2>&5
14108   ac_status=$?
14109   echo "$as_me:14109: \$? = $ac_status" >&5
14110   (exit $ac_status); }; }; then
14111   cf_cv_good_bcopy=yes
14112 else
14113   echo "$as_me: program exited with status $ac_status" >&5
14114 echo "$as_me: failed program was:" >&5
14115 cat conftest.$ac_ext >&5
14116 cf_cv_good_bcopy=no
14117 fi
14118 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14119 fi
14120
14121 fi
14122 echo "$as_me:14122: result: $cf_cv_good_bcopy" >&5
14123 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14124
14125 else
14126   cf_cv_good_bcopy=no
14127 fi
14128
14129         if test "$cf_cv_good_bcopy" = yes ; then
14130                 cat >>confdefs.h <<\EOF
14131 #define USE_OK_BCOPY 1
14132 EOF
14133
14134         else
14135                 cat >>confdefs.h <<\EOF
14136 #define USE_MY_MEMMOVE 1
14137 EOF
14138
14139         fi
14140
14141 fi
14142
14143 echo "$as_me:14143: checking if poll really works" >&5
14144 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14145 if test "${cf_cv_working_poll+set}" = set; then
14146   echo $ECHO_N "(cached) $ECHO_C" >&6
14147 else
14148
14149 if test "$cross_compiling" = yes; then
14150   cf_cv_working_poll=unknown
14151 else
14152   cat >conftest.$ac_ext <<_ACEOF
14153 #line 14153 "configure"
14154 #include "confdefs.h"
14155
14156 #include <stdio.h>
14157 #ifdef HAVE_POLL_H
14158 #include <poll.h>
14159 #else
14160 #include <sys/poll.h>
14161 #endif
14162 int main() {
14163         struct pollfd myfds;
14164         int ret;
14165
14166         myfds.fd = 0;
14167         myfds.events = POLLIN;
14168
14169         ret = poll(&myfds, 1, 100);
14170         ${cf_cv_main_return:-return}(ret != 0);
14171 }
14172 _ACEOF
14173 rm -f conftest$ac_exeext
14174 if { (eval echo "$as_me:14174: \"$ac_link\"") >&5
14175   (eval $ac_link) 2>&5
14176   ac_status=$?
14177   echo "$as_me:14177: \$? = $ac_status" >&5
14178   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14179   { (eval echo "$as_me:14179: \"$ac_try\"") >&5
14180   (eval $ac_try) 2>&5
14181   ac_status=$?
14182   echo "$as_me:14182: \$? = $ac_status" >&5
14183   (exit $ac_status); }; }; then
14184   cf_cv_working_poll=yes
14185 else
14186   echo "$as_me: program exited with status $ac_status" >&5
14187 echo "$as_me: failed program was:" >&5
14188 cat conftest.$ac_ext >&5
14189 cf_cv_working_poll=no
14190 fi
14191 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14192 fi
14193 fi
14194 echo "$as_me:14194: result: $cf_cv_working_poll" >&5
14195 echo "${ECHO_T}$cf_cv_working_poll" >&6
14196 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14197 #define HAVE_WORKING_POLL 1
14198 EOF
14199
14200 # special check for test/ditto.c
14201
14202 echo "$as_me:14202: checking for openpty in -lutil" >&5
14203 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14204 if test "${ac_cv_lib_util_openpty+set}" = set; then
14205   echo $ECHO_N "(cached) $ECHO_C" >&6
14206 else
14207   ac_check_lib_save_LIBS=$LIBS
14208 LIBS="-lutil  $LIBS"
14209 cat >conftest.$ac_ext <<_ACEOF
14210 #line 14210 "configure"
14211 #include "confdefs.h"
14212
14213 /* Override any gcc2 internal prototype to avoid an error.  */
14214 #ifdef __cplusplus
14215 extern "C"
14216 #endif
14217 /* We use char because int might match the return type of a gcc2
14218    builtin and then its argument prototype would still apply.  */
14219 char openpty ();
14220 int
14221 main ()
14222 {
14223 openpty ();
14224   ;
14225   return 0;
14226 }
14227 _ACEOF
14228 rm -f conftest.$ac_objext conftest$ac_exeext
14229 if { (eval echo "$as_me:14229: \"$ac_link\"") >&5
14230   (eval $ac_link) 2>&5
14231   ac_status=$?
14232   echo "$as_me:14232: \$? = $ac_status" >&5
14233   (exit $ac_status); } &&
14234          { ac_try='test -s conftest$ac_exeext'
14235   { (eval echo "$as_me:14235: \"$ac_try\"") >&5
14236   (eval $ac_try) 2>&5
14237   ac_status=$?
14238   echo "$as_me:14238: \$? = $ac_status" >&5
14239   (exit $ac_status); }; }; then
14240   ac_cv_lib_util_openpty=yes
14241 else
14242   echo "$as_me: failed program was:" >&5
14243 cat conftest.$ac_ext >&5
14244 ac_cv_lib_util_openpty=no
14245 fi
14246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14247 LIBS=$ac_check_lib_save_LIBS
14248 fi
14249 echo "$as_me:14249: result: $ac_cv_lib_util_openpty" >&5
14250 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14251 if test $ac_cv_lib_util_openpty = yes; then
14252   cf_cv_lib_util=yes
14253 else
14254   cf_cv_lib_util=no
14255 fi
14256
14257 echo "$as_me:14257: checking for openpty header" >&5
14258 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14259 if test "${cf_cv_func_openpty+set}" = set; then
14260   echo $ECHO_N "(cached) $ECHO_C" >&6
14261 else
14262
14263     cf_save_LIBS="$LIBS"
14264     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14265     for cf_header in pty.h libutil.h util.h
14266     do
14267     cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14270
14271 #include <$cf_header>
14272
14273 int
14274 main ()
14275 {
14276
14277     int x = openpty((int *)0, (int *)0, (char *)0,
14278                    (struct termios *)0, (struct winsize *)0);
14279
14280   ;
14281   return 0;
14282 }
14283 _ACEOF
14284 rm -f conftest.$ac_objext conftest$ac_exeext
14285 if { (eval echo "$as_me:14285: \"$ac_link\"") >&5
14286   (eval $ac_link) 2>&5
14287   ac_status=$?
14288   echo "$as_me:14288: \$? = $ac_status" >&5
14289   (exit $ac_status); } &&
14290          { ac_try='test -s conftest$ac_exeext'
14291   { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292   (eval $ac_try) 2>&5
14293   ac_status=$?
14294   echo "$as_me:14294: \$? = $ac_status" >&5
14295   (exit $ac_status); }; }; then
14296
14297         cf_cv_func_openpty=$cf_header
14298         break
14299
14300 else
14301   echo "$as_me: failed program was:" >&5
14302 cat conftest.$ac_ext >&5
14303
14304         cf_cv_func_openpty=no
14305
14306 fi
14307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14308     done
14309     LIBS="$cf_save_LIBS"
14310
14311 fi
14312 echo "$as_me:14312: result: $cf_cv_func_openpty" >&5
14313 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14314
14315 if test "$cf_cv_func_openpty" != no ; then
14316     cat >>confdefs.h <<EOF
14317 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14318 EOF
14319
14320     cat >>confdefs.h <<\EOF
14321 #define USE_XTERM_PTY 1
14322 EOF
14323
14324     if test "$cf_cv_lib_util" = yes ; then
14325         TEST_LIBS="-lutil $TEST_LIBS"
14326     fi
14327 fi
14328
14329 if test "$with_hashed_db" != no ; then
14330         cat >>confdefs.h <<\EOF
14331 #define USE_HASHED_DB 1
14332 EOF
14333
14334 case $with_hashed_db in #(vi
14335 yes|*able*) #(vi
14336     ;;
14337 *)
14338     if test -d "$with_hashed_db" ; then
14339
14340 if test -n "$with_hashed_db/include" ; then
14341   for cf_add_incdir in $with_hashed_db/include
14342   do
14343         while test $cf_add_incdir != /usr/include
14344         do
14345           if test -d $cf_add_incdir
14346           then
14347                 cf_have_incdir=no
14348                 if test -n "$CFLAGS$CPPFLAGS" ; then
14349                   # a loop is needed to ensure we can add subdirs of existing dirs
14350                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14351                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14352                           cf_have_incdir=yes; break
14353                         fi
14354                   done
14355                 fi
14356
14357                 if test "$cf_have_incdir" = no ; then
14358                   if test "$cf_add_incdir" = /usr/local/include ; then
14359                         if test "$GCC" = yes
14360                         then
14361                           cf_save_CPPFLAGS=$CPPFLAGS
14362                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14363                           cat >conftest.$ac_ext <<_ACEOF
14364 #line 14364 "configure"
14365 #include "confdefs.h"
14366 #include <stdio.h>
14367 int
14368 main ()
14369 {
14370 printf("Hello")
14371   ;
14372   return 0;
14373 }
14374 _ACEOF
14375 rm -f conftest.$ac_objext
14376 if { (eval echo "$as_me:14376: \"$ac_compile\"") >&5
14377   (eval $ac_compile) 2>&5
14378   ac_status=$?
14379   echo "$as_me:14379: \$? = $ac_status" >&5
14380   (exit $ac_status); } &&
14381          { ac_try='test -s conftest.$ac_objext'
14382   { (eval echo "$as_me:14382: \"$ac_try\"") >&5
14383   (eval $ac_try) 2>&5
14384   ac_status=$?
14385   echo "$as_me:14385: \$? = $ac_status" >&5
14386   (exit $ac_status); }; }; then
14387   :
14388 else
14389   echo "$as_me: failed program was:" >&5
14390 cat conftest.$ac_ext >&5
14391 cf_have_incdir=yes
14392 fi
14393 rm -f conftest.$ac_objext conftest.$ac_ext
14394                           CPPFLAGS=$cf_save_CPPFLAGS
14395                         fi
14396                   fi
14397                 fi
14398
14399                 if test "$cf_have_incdir" = no ; then
14400                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14401
14402 echo "${as_me-configure}:14402: testing adding $cf_add_incdir to include-path ..." 1>&5
14403
14404                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
14405
14406                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14407                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14408                   cf_add_incdir="$cf_top_incdir"
14409                 else
14410                   break
14411                 fi
14412           fi
14413         done
14414   done
14415 fi
14416
14417 if test -n "$with_hashed_db/lib" ; then
14418   for cf_add_libdir in $with_hashed_db/lib
14419   do
14420     if test $cf_add_libdir = /usr/lib ; then
14421       :
14422     elif test -d $cf_add_libdir
14423     then
14424       cf_have_libdir=no
14425       if test -n "$LDFLAGS$LIBS" ; then
14426         # a loop is needed to ensure we can add subdirs of existing dirs
14427         for cf_test_libdir in $LDFLAGS $LIBS ; do
14428           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14429             cf_have_libdir=yes; break
14430           fi
14431         done
14432       fi
14433       if test "$cf_have_libdir" = no ; then
14434         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14435
14436 echo "${as_me-configure}:14436: testing adding $cf_add_libdir to library-path ..." 1>&5
14437
14438         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14439       fi
14440     fi
14441   done
14442 fi
14443
14444     fi
14445 esac
14446
14447 echo "$as_me:14447: checking for db.h" >&5
14448 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14449 if test "${ac_cv_header_db_h+set}" = set; then
14450   echo $ECHO_N "(cached) $ECHO_C" >&6
14451 else
14452   cat >conftest.$ac_ext <<_ACEOF
14453 #line 14453 "configure"
14454 #include "confdefs.h"
14455 #include <db.h>
14456 _ACEOF
14457 if { (eval echo "$as_me:14457: \"$ac_cpp conftest.$ac_ext\"") >&5
14458   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14459   ac_status=$?
14460   egrep -v '^ *\+' conftest.er1 >conftest.err
14461   rm -f conftest.er1
14462   cat conftest.err >&5
14463   echo "$as_me:14463: \$? = $ac_status" >&5
14464   (exit $ac_status); } >/dev/null; then
14465   if test -s conftest.err; then
14466     ac_cpp_err=$ac_c_preproc_warn_flag
14467   else
14468     ac_cpp_err=
14469   fi
14470 else
14471   ac_cpp_err=yes
14472 fi
14473 if test -z "$ac_cpp_err"; then
14474   ac_cv_header_db_h=yes
14475 else
14476   echo "$as_me: failed program was:" >&5
14477   cat conftest.$ac_ext >&5
14478   ac_cv_header_db_h=no
14479 fi
14480 rm -f conftest.err conftest.$ac_ext
14481 fi
14482 echo "$as_me:14482: result: $ac_cv_header_db_h" >&5
14483 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14484 if test $ac_cv_header_db_h = yes; then
14485
14486 echo "$as_me:14486: checking for version of db" >&5
14487 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14488 if test "${cf_cv_hashed_db_version+set}" = set; then
14489   echo $ECHO_N "(cached) $ECHO_C" >&6
14490 else
14491
14492 cf_cv_hashed_db_version=unknown
14493
14494 for cf_db_version in 1 2 3 4 5
14495 do
14496
14497 echo "${as_me-configure}:14497: testing checking for db version $cf_db_version ..." 1>&5
14498
14499         cat >conftest.$ac_ext <<_ACEOF
14500 #line 14500 "configure"
14501 #include "confdefs.h"
14502
14503 $ac_includes_default
14504 #include <db.h>
14505
14506 #ifdef DB_VERSION_MAJOR
14507         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14508 #if $cf_db_version == DB_VERSION_MAJOR
14509         /* ok */
14510 #else
14511         make an error
14512 #endif
14513 #else
14514 #if $cf_db_version == 1
14515         /* ok: assuming this is DB 1.8.5 */
14516 #else
14517         make an error
14518 #endif
14519 #endif
14520
14521 int
14522 main ()
14523 {
14524 DBT *foo = 0
14525   ;
14526   return 0;
14527 }
14528 _ACEOF
14529 rm -f conftest.$ac_objext
14530 if { (eval echo "$as_me:14530: \"$ac_compile\"") >&5
14531   (eval $ac_compile) 2>&5
14532   ac_status=$?
14533   echo "$as_me:14533: \$? = $ac_status" >&5
14534   (exit $ac_status); } &&
14535          { ac_try='test -s conftest.$ac_objext'
14536   { (eval echo "$as_me:14536: \"$ac_try\"") >&5
14537   (eval $ac_try) 2>&5
14538   ac_status=$?
14539   echo "$as_me:14539: \$? = $ac_status" >&5
14540   (exit $ac_status); }; }; then
14541
14542         cf_cv_hashed_db_version=$cf_db_version
14543         break
14544
14545 else
14546   echo "$as_me: failed program was:" >&5
14547 cat conftest.$ac_ext >&5
14548 fi
14549 rm -f conftest.$ac_objext conftest.$ac_ext
14550 done
14551
14552 fi
14553 echo "$as_me:14553: result: $cf_cv_hashed_db_version" >&5
14554 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14555
14556 if test "$cf_cv_hashed_db_version" = unknown ; then
14557         { { echo "$as_me:14557: error: Cannot determine version of db" >&5
14558 echo "$as_me: error: Cannot determine version of db" >&2;}
14559    { (exit 1); exit 1; }; }
14560 else
14561
14562 echo "$as_me:14562: checking for db libraries" >&5
14563 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14564 if test "${cf_cv_hashed_db_libs+set}" = set; then
14565   echo $ECHO_N "(cached) $ECHO_C" >&6
14566 else
14567
14568 cf_cv_hashed_db_libs=unknown
14569 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14570 do
14571         cf_save_libs="$LIBS"
14572         if test -n "$cf_db_libs"; then
14573                 LIBS="-l$cf_db_libs $LIBS"
14574         fi
14575
14576 echo "${as_me-configure}:14576: testing checking for library "$cf_db_libs" ..." 1>&5
14577
14578         cat >conftest.$ac_ext <<_ACEOF
14579 #line 14579 "configure"
14580 #include "confdefs.h"
14581
14582 $ac_includes_default
14583 #include <db.h>
14584
14585 int
14586 main ()
14587 {
14588
14589         char *path = "/tmp/foo";
14590 #ifdef DB_VERSION_MAJOR
14591 #if DB_VERSION_MAJOR >= 4
14592         DB *result = 0;
14593         db_create(&result, NULL, 0);
14594         result->open(result,
14595                 NULL,
14596                 path,
14597                 path,
14598                 DB_HASH,
14599                 DB_CREATE,
14600                 0644);
14601 #elif DB_VERSION_MAJOR >= 3
14602         DB *result = 0;
14603         db_create(&result, NULL, 0);
14604         result->open(result,
14605                 path,
14606                 path,
14607                 DB_HASH,
14608                 DB_CREATE,
14609                 0644);
14610 #elif DB_VERSION_MAJOR >= 2
14611         DB *result = 0;
14612         db_open(path,
14613                 DB_HASH,
14614                 DB_CREATE,
14615                 0644,
14616                 (DB_ENV *) 0,
14617                 (DB_INFO *) 0,
14618                 &result);
14619 #endif /* DB_VERSION_MAJOR */
14620 #else
14621         DB *result = dbopen(path,
14622                      2,
14623                      0644,
14624                      DB_HASH,
14625                      0);
14626 #endif
14627         ${cf_cv_main_return:-return}(result != 0)
14628
14629   ;
14630   return 0;
14631 }
14632 _ACEOF
14633 rm -f conftest.$ac_objext conftest$ac_exeext
14634 if { (eval echo "$as_me:14634: \"$ac_link\"") >&5
14635   (eval $ac_link) 2>&5
14636   ac_status=$?
14637   echo "$as_me:14637: \$? = $ac_status" >&5
14638   (exit $ac_status); } &&
14639          { ac_try='test -s conftest$ac_exeext'
14640   { (eval echo "$as_me:14640: \"$ac_try\"") >&5
14641   (eval $ac_try) 2>&5
14642   ac_status=$?
14643   echo "$as_me:14643: \$? = $ac_status" >&5
14644   (exit $ac_status); }; }; then
14645
14646         if test -n "$cf_db_libs" ; then
14647                 cf_cv_hashed_db_libs=$cf_db_libs
14648         else
14649                 cf_cv_hashed_db_libs=default
14650         fi
14651         LIBS="$cf_save_libs"
14652         break
14653
14654 else
14655   echo "$as_me: failed program was:" >&5
14656 cat conftest.$ac_ext >&5
14657 fi
14658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14659         LIBS="$cf_save_libs"
14660 done
14661
14662 fi
14663 echo "$as_me:14663: result: $cf_cv_hashed_db_libs" >&5
14664 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14665
14666         if test "$cf_cv_hashed_db_libs" = unknown ; then
14667                 { { echo "$as_me:14667: error: Cannot determine library for db" >&5
14668 echo "$as_me: error: Cannot determine library for db" >&2;}
14669    { (exit 1); exit 1; }; }
14670         elif test "$cf_cv_hashed_db_libs" != default ; then
14671                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14672         fi
14673 fi
14674
14675 else
14676
14677         { { echo "$as_me:14677: error: Cannot find db.h" >&5
14678 echo "$as_me: error: Cannot find db.h" >&2;}
14679    { (exit 1); exit 1; }; }
14680
14681 fi
14682
14683 fi
14684
14685 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14686         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14687         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14688 fi
14689
14690 # Just in case, check if the C compiler has a bool type.
14691
14692 echo "$as_me:14692: checking if we should include stdbool.h" >&5
14693 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14694
14695 if test "${cf_cv_header_stdbool_h+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 int
14704 main ()
14705 {
14706 bool foo = false
14707   ;
14708   return 0;
14709 }
14710 _ACEOF
14711 rm -f conftest.$ac_objext
14712 if { (eval echo "$as_me:14712: \"$ac_compile\"") >&5
14713   (eval $ac_compile) 2>&5
14714   ac_status=$?
14715   echo "$as_me:14715: \$? = $ac_status" >&5
14716   (exit $ac_status); } &&
14717          { ac_try='test -s conftest.$ac_objext'
14718   { (eval echo "$as_me:14718: \"$ac_try\"") >&5
14719   (eval $ac_try) 2>&5
14720   ac_status=$?
14721   echo "$as_me:14721: \$? = $ac_status" >&5
14722   (exit $ac_status); }; }; then
14723   cf_cv_header_stdbool_h=0
14724 else
14725   echo "$as_me: failed program was:" >&5
14726 cat conftest.$ac_ext >&5
14727 cat >conftest.$ac_ext <<_ACEOF
14728 #line 14728 "configure"
14729 #include "confdefs.h"
14730
14731 #ifndef __BEOS__
14732 #include <stdbool.h>
14733 #endif
14734
14735 int
14736 main ()
14737 {
14738 bool foo = false
14739   ;
14740   return 0;
14741 }
14742 _ACEOF
14743 rm -f conftest.$ac_objext
14744 if { (eval echo "$as_me:14744: \"$ac_compile\"") >&5
14745   (eval $ac_compile) 2>&5
14746   ac_status=$?
14747   echo "$as_me:14747: \$? = $ac_status" >&5
14748   (exit $ac_status); } &&
14749          { ac_try='test -s conftest.$ac_objext'
14750   { (eval echo "$as_me:14750: \"$ac_try\"") >&5
14751   (eval $ac_try) 2>&5
14752   ac_status=$?
14753   echo "$as_me:14753: \$? = $ac_status" >&5
14754   (exit $ac_status); }; }; then
14755   cf_cv_header_stdbool_h=1
14756 else
14757   echo "$as_me: failed program was:" >&5
14758 cat conftest.$ac_ext >&5
14759 cf_cv_header_stdbool_h=0
14760 fi
14761 rm -f conftest.$ac_objext conftest.$ac_ext
14762 fi
14763 rm -f conftest.$ac_objext conftest.$ac_ext
14764 fi
14765
14766 if test "$cf_cv_header_stdbool_h" = 1
14767 then    echo "$as_me:14767: result: yes" >&5
14768 echo "${ECHO_T}yes" >&6
14769 else    echo "$as_me:14769: result: no" >&5
14770 echo "${ECHO_T}no" >&6
14771 fi
14772
14773 echo "$as_me:14773: checking for builtin bool type" >&5
14774 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14775
14776 if test "${cf_cv_cc_bool_type+set}" = set; then
14777   echo $ECHO_N "(cached) $ECHO_C" >&6
14778 else
14779
14780         cat >conftest.$ac_ext <<_ACEOF
14781 #line 14781 "configure"
14782 #include "confdefs.h"
14783
14784 #include <stdio.h>
14785 #include <sys/types.h>
14786
14787 int
14788 main ()
14789 {
14790 bool x = false
14791   ;
14792   return 0;
14793 }
14794 _ACEOF
14795 rm -f conftest.$ac_objext
14796 if { (eval echo "$as_me:14796: \"$ac_compile\"") >&5
14797   (eval $ac_compile) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit $ac_status); } &&
14801          { ac_try='test -s conftest.$ac_objext'
14802   { (eval echo "$as_me:14802: \"$ac_try\"") >&5
14803   (eval $ac_try) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit $ac_status); }; }; then
14807   cf_cv_cc_bool_type=1
14808 else
14809   echo "$as_me: failed program was:" >&5
14810 cat conftest.$ac_ext >&5
14811 cf_cv_cc_bool_type=0
14812 fi
14813 rm -f conftest.$ac_objext conftest.$ac_ext
14814
14815 fi
14816
14817 if test "$cf_cv_cc_bool_type" = 1
14818 then    echo "$as_me:14818: result: yes" >&5
14819 echo "${ECHO_T}yes" >&6
14820 else    echo "$as_me:14820: result: no" >&5
14821 echo "${ECHO_T}no" >&6
14822 fi
14823
14824 # Check for C++ compiler characteristics (and ensure that it's there!)
14825 if test -n "$CXX" ; then
14826         ac_ext=cc
14827 ac_cpp='$CXXCPP $CPPFLAGS'
14828 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14829 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14830 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14831 ac_main_return=return
14832
14833 if test -n "$GXX" ; then
14834 case $cf_cv_system_name in #(vi
14835 os2*) #(vi
14836         cf_stdcpp_libname=stdcpp
14837         ;;
14838 *)
14839         cf_stdcpp_libname=stdc++
14840         ;;
14841 esac
14842 echo "$as_me:14842: checking for library $cf_stdcpp_libname" >&5
14843 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14844 if test "${cf_cv_libstdcpp+set}" = set; then
14845   echo $ECHO_N "(cached) $ECHO_C" >&6
14846 else
14847
14848         cf_save="$LIBS"
14849         LIBS="$LIBS -l$cf_stdcpp_libname"
14850 cat >conftest.$ac_ext <<_ACEOF
14851 #line 14851 "configure"
14852 #include "confdefs.h"
14853
14854 #include <strstream.h>
14855 int
14856 main ()
14857 {
14858
14859 char buf[80];
14860 strstreambuf foo(buf, sizeof(buf))
14861
14862   ;
14863   return 0;
14864 }
14865 _ACEOF
14866 rm -f conftest.$ac_objext conftest$ac_exeext
14867 if { (eval echo "$as_me:14867: \"$ac_link\"") >&5
14868   (eval $ac_link) 2>&5
14869   ac_status=$?
14870   echo "$as_me:14870: \$? = $ac_status" >&5
14871   (exit $ac_status); } &&
14872          { ac_try='test -s conftest$ac_exeext'
14873   { (eval echo "$as_me:14873: \"$ac_try\"") >&5
14874   (eval $ac_try) 2>&5
14875   ac_status=$?
14876   echo "$as_me:14876: \$? = $ac_status" >&5
14877   (exit $ac_status); }; }; then
14878   cf_cv_libstdcpp=yes
14879 else
14880   echo "$as_me: failed program was:" >&5
14881 cat conftest.$ac_ext >&5
14882 cf_cv_libstdcpp=no
14883 fi
14884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14885         LIBS="$cf_save"
14886
14887 fi
14888 echo "$as_me:14888: result: $cf_cv_libstdcpp" >&5
14889 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14890 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14891 fi
14892
14893         echo "$as_me:14893: checking whether $CXX understands -c and -o together" >&5
14894 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14895 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14896   echo $ECHO_N "(cached) $ECHO_C" >&6
14897 else
14898
14899 cat > conftest.$ac_ext <<CF_EOF
14900 #include <stdio.h>
14901 int main()
14902 {
14903         ${cf_cv_main_return:-return}(0);
14904 }
14905 CF_EOF
14906 # We do the test twice because some compilers refuse to overwrite an
14907 # existing .o file with -o, though they will create one.
14908 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14909 if { (eval echo "$as_me:14909: \"$ac_try\"") >&5
14910   (eval $ac_try) 2>&5
14911   ac_status=$?
14912   echo "$as_me:14912: \$? = $ac_status" >&5
14913   (exit $ac_status); } &&
14914   test -f conftest2.$ac_objext && { (eval echo "$as_me:14914: \"$ac_try\"") >&5
14915   (eval $ac_try) 2>&5
14916   ac_status=$?
14917   echo "$as_me:14917: \$? = $ac_status" >&5
14918   (exit $ac_status); };
14919 then
14920   eval cf_cv_prog_CXX_c_o=yes
14921 else
14922   eval cf_cv_prog_CXX_c_o=no
14923 fi
14924 rm -f conftest*
14925
14926 fi
14927 if test $cf_cv_prog_CXX_c_o = yes; then
14928   echo "$as_me:14928: result: yes" >&5
14929 echo "${ECHO_T}yes" >&6
14930 else
14931   echo "$as_me:14931: result: no" >&5
14932 echo "${ECHO_T}no" >&6
14933 fi
14934
14935         case $GXX_VERSION in
14936         1*|2.0-6*)
14937                 cf_cxx_library=yes
14938                 ;;
14939         *-2.7*|2.7*)
14940
14941 cf_cxx_library=unknown
14942 case $cf_cv_system_name in #(vi
14943 os2*) #(vi
14944         cf_gpp_libname=gpp
14945         ;;
14946 *)
14947         cf_gpp_libname=g++
14948         ;;
14949 esac
14950 if test "$GXX" = yes; then
14951         echo "$as_me:14951: checking for lib$cf_gpp_libname" >&5
14952 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14953         cf_save="$LIBS"
14954         LIBS="$LIBS -l$cf_gpp_libname"
14955         cat >conftest.$ac_ext <<_ACEOF
14956 #line 14956 "configure"
14957 #include "confdefs.h"
14958
14959 #include <$cf_gpp_libname/builtin.h>
14960
14961 int
14962 main ()
14963 {
14964 two_arg_error_handler_t foo2 = lib_error_handler
14965   ;
14966   return 0;
14967 }
14968 _ACEOF
14969 rm -f conftest.$ac_objext conftest$ac_exeext
14970 if { (eval echo "$as_me:14970: \"$ac_link\"") >&5
14971   (eval $ac_link) 2>&5
14972   ac_status=$?
14973   echo "$as_me:14973: \$? = $ac_status" >&5
14974   (exit $ac_status); } &&
14975          { ac_try='test -s conftest$ac_exeext'
14976   { (eval echo "$as_me:14976: \"$ac_try\"") >&5
14977   (eval $ac_try) 2>&5
14978   ac_status=$?
14979   echo "$as_me:14979: \$? = $ac_status" >&5
14980   (exit $ac_status); }; }; then
14981   cf_cxx_library=yes
14982          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14983          if test "$cf_gpp_libname" = cpp ; then
14984             cat >>confdefs.h <<\EOF
14985 #define HAVE_GPP_BUILTIN_H 1
14986 EOF
14987
14988          else
14989             cat >>confdefs.h <<\EOF
14990 #define HAVE_GXX_BUILTIN_H 1
14991 EOF
14992
14993          fi
14994 else
14995   echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 cat >conftest.$ac_ext <<_ACEOF
14998 #line 14998 "configure"
14999 #include "confdefs.h"
15000
15001 #include <builtin.h>
15002
15003 int
15004 main ()
15005 {
15006 two_arg_error_handler_t foo2 = lib_error_handler
15007   ;
15008   return 0;
15009 }
15010 _ACEOF
15011 rm -f conftest.$ac_objext conftest$ac_exeext
15012 if { (eval echo "$as_me:15012: \"$ac_link\"") >&5
15013   (eval $ac_link) 2>&5
15014   ac_status=$?
15015   echo "$as_me:15015: \$? = $ac_status" >&5
15016   (exit $ac_status); } &&
15017          { ac_try='test -s conftest$ac_exeext'
15018   { (eval echo "$as_me:15018: \"$ac_try\"") >&5
15019   (eval $ac_try) 2>&5
15020   ac_status=$?
15021   echo "$as_me:15021: \$? = $ac_status" >&5
15022   (exit $ac_status); }; }; then
15023   cf_cxx_library=yes
15024          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15025          cat >>confdefs.h <<\EOF
15026 #define HAVE_BUILTIN_H 1
15027 EOF
15028
15029 else
15030   echo "$as_me: failed program was:" >&5
15031 cat conftest.$ac_ext >&5
15032 cf_cxx_library=no
15033 fi
15034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15035 fi
15036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15037         LIBS="$cf_save"
15038         echo "$as_me:15038: result: $cf_cxx_library" >&5
15039 echo "${ECHO_T}$cf_cxx_library" >&6
15040 fi
15041
15042                 ;;
15043         *)
15044                 cf_cxx_library=no
15045                 ;;
15046         esac
15047
15048         ac_ext=cc
15049 ac_cpp='$CXXCPP $CPPFLAGS'
15050 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15051 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15052 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15053 ac_main_return=return
15054 echo "$as_me:15054: checking how to run the C++ preprocessor" >&5
15055 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15056 if test -z "$CXXCPP"; then
15057   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15058   echo $ECHO_N "(cached) $ECHO_C" >&6
15059 else
15060       # Double quotes because CXXCPP needs to be expanded
15061     for CXXCPP in "$CXX -E" "/lib/cpp"
15062     do
15063       ac_preproc_ok=false
15064 for ac_cxx_preproc_warn_flag in '' yes
15065 do
15066   # Use a header file that comes with gcc, so configuring glibc
15067   # with a fresh cross-compiler works.
15068   # On the NeXT, cc -E runs the code through the compiler's parser,
15069   # not just through cpp. "Syntax error" is here to catch this case.
15070   cat >conftest.$ac_ext <<_ACEOF
15071 #line 15071 "configure"
15072 #include "confdefs.h"
15073 #include <assert.h>
15074                      Syntax error
15075 _ACEOF
15076 if { (eval echo "$as_me:15076: \"$ac_cpp conftest.$ac_ext\"") >&5
15077   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15078   ac_status=$?
15079   egrep -v '^ *\+' conftest.er1 >conftest.err
15080   rm -f conftest.er1
15081   cat conftest.err >&5
15082   echo "$as_me:15082: \$? = $ac_status" >&5
15083   (exit $ac_status); } >/dev/null; then
15084   if test -s conftest.err; then
15085     ac_cpp_err=$ac_cxx_preproc_warn_flag
15086   else
15087     ac_cpp_err=
15088   fi
15089 else
15090   ac_cpp_err=yes
15091 fi
15092 if test -z "$ac_cpp_err"; then
15093   :
15094 else
15095   echo "$as_me: failed program was:" >&5
15096   cat conftest.$ac_ext >&5
15097   # Broken: fails on valid input.
15098 continue
15099 fi
15100 rm -f conftest.err conftest.$ac_ext
15101
15102   # OK, works on sane cases.  Now check whether non-existent headers
15103   # can be detected and how.
15104   cat >conftest.$ac_ext <<_ACEOF
15105 #line 15105 "configure"
15106 #include "confdefs.h"
15107 #include <ac_nonexistent.h>
15108 _ACEOF
15109 if { (eval echo "$as_me:15109: \"$ac_cpp conftest.$ac_ext\"") >&5
15110   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15111   ac_status=$?
15112   egrep -v '^ *\+' conftest.er1 >conftest.err
15113   rm -f conftest.er1
15114   cat conftest.err >&5
15115   echo "$as_me:15115: \$? = $ac_status" >&5
15116   (exit $ac_status); } >/dev/null; then
15117   if test -s conftest.err; then
15118     ac_cpp_err=$ac_cxx_preproc_warn_flag
15119   else
15120     ac_cpp_err=
15121   fi
15122 else
15123   ac_cpp_err=yes
15124 fi
15125 if test -z "$ac_cpp_err"; then
15126   # Broken: success on invalid input.
15127 continue
15128 else
15129   echo "$as_me: failed program was:" >&5
15130   cat conftest.$ac_ext >&5
15131   # Passes both tests.
15132 ac_preproc_ok=:
15133 break
15134 fi
15135 rm -f conftest.err conftest.$ac_ext
15136
15137 done
15138 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15139 rm -f conftest.err conftest.$ac_ext
15140 if $ac_preproc_ok; then
15141   break
15142 fi
15143
15144     done
15145     ac_cv_prog_CXXCPP=$CXXCPP
15146
15147 fi
15148   CXXCPP=$ac_cv_prog_CXXCPP
15149 else
15150   ac_cv_prog_CXXCPP=$CXXCPP
15151 fi
15152 echo "$as_me:15152: result: $CXXCPP" >&5
15153 echo "${ECHO_T}$CXXCPP" >&6
15154 ac_preproc_ok=false
15155 for ac_cxx_preproc_warn_flag in '' yes
15156 do
15157   # Use a header file that comes with gcc, so configuring glibc
15158   # with a fresh cross-compiler works.
15159   # On the NeXT, cc -E runs the code through the compiler's parser,
15160   # not just through cpp. "Syntax error" is here to catch this case.
15161   cat >conftest.$ac_ext <<_ACEOF
15162 #line 15162 "configure"
15163 #include "confdefs.h"
15164 #include <assert.h>
15165                      Syntax error
15166 _ACEOF
15167 if { (eval echo "$as_me:15167: \"$ac_cpp conftest.$ac_ext\"") >&5
15168   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15169   ac_status=$?
15170   egrep -v '^ *\+' conftest.er1 >conftest.err
15171   rm -f conftest.er1
15172   cat conftest.err >&5
15173   echo "$as_me:15173: \$? = $ac_status" >&5
15174   (exit $ac_status); } >/dev/null; then
15175   if test -s conftest.err; then
15176     ac_cpp_err=$ac_cxx_preproc_warn_flag
15177   else
15178     ac_cpp_err=
15179   fi
15180 else
15181   ac_cpp_err=yes
15182 fi
15183 if test -z "$ac_cpp_err"; then
15184   :
15185 else
15186   echo "$as_me: failed program was:" >&5
15187   cat conftest.$ac_ext >&5
15188   # Broken: fails on valid input.
15189 continue
15190 fi
15191 rm -f conftest.err conftest.$ac_ext
15192
15193   # OK, works on sane cases.  Now check whether non-existent headers
15194   # can be detected and how.
15195   cat >conftest.$ac_ext <<_ACEOF
15196 #line 15196 "configure"
15197 #include "confdefs.h"
15198 #include <ac_nonexistent.h>
15199 _ACEOF
15200 if { (eval echo "$as_me:15200: \"$ac_cpp conftest.$ac_ext\"") >&5
15201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15202   ac_status=$?
15203   egrep -v '^ *\+' conftest.er1 >conftest.err
15204   rm -f conftest.er1
15205   cat conftest.err >&5
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); } >/dev/null; then
15208   if test -s conftest.err; then
15209     ac_cpp_err=$ac_cxx_preproc_warn_flag
15210   else
15211     ac_cpp_err=
15212   fi
15213 else
15214   ac_cpp_err=yes
15215 fi
15216 if test -z "$ac_cpp_err"; then
15217   # Broken: success on invalid input.
15218 continue
15219 else
15220   echo "$as_me: failed program was:" >&5
15221   cat conftest.$ac_ext >&5
15222   # Passes both tests.
15223 ac_preproc_ok=:
15224 break
15225 fi
15226 rm -f conftest.err conftest.$ac_ext
15227
15228 done
15229 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15230 rm -f conftest.err conftest.$ac_ext
15231 if $ac_preproc_ok; then
15232   :
15233 else
15234   { { echo "$as_me:15234: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15235 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15236    { (exit 1); exit 1; }; }
15237 fi
15238
15239 ac_ext=cc
15240 ac_cpp='$CXXCPP $CPPFLAGS'
15241 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15242 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15243 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15244 ac_main_return=return
15245
15246 for ac_header in iostream typeinfo
15247 do
15248 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15249 echo "$as_me:15249: checking for $ac_header" >&5
15250 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15251 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15252   echo $ECHO_N "(cached) $ECHO_C" >&6
15253 else
15254   cat >conftest.$ac_ext <<_ACEOF
15255 #line 15255 "configure"
15256 #include "confdefs.h"
15257 #include <$ac_header>
15258 _ACEOF
15259 if { (eval echo "$as_me:15259: \"$ac_cpp conftest.$ac_ext\"") >&5
15260   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15261   ac_status=$?
15262   egrep -v '^ *\+' conftest.er1 >conftest.err
15263   rm -f conftest.er1
15264   cat conftest.err >&5
15265   echo "$as_me:15265: \$? = $ac_status" >&5
15266   (exit $ac_status); } >/dev/null; then
15267   if test -s conftest.err; then
15268     ac_cpp_err=$ac_cxx_preproc_warn_flag
15269   else
15270     ac_cpp_err=
15271   fi
15272 else
15273   ac_cpp_err=yes
15274 fi
15275 if test -z "$ac_cpp_err"; then
15276   eval "$as_ac_Header=yes"
15277 else
15278   echo "$as_me: failed program was:" >&5
15279   cat conftest.$ac_ext >&5
15280   eval "$as_ac_Header=no"
15281 fi
15282 rm -f conftest.err conftest.$ac_ext
15283 fi
15284 echo "$as_me:15284: result: `eval echo '${'$as_ac_Header'}'`" >&5
15285 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15286 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15287   cat >>confdefs.h <<EOF
15288 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15289 EOF
15290
15291 fi
15292 done
15293
15294     if test x"$ac_cv_header_iostream" = xyes ; then
15295         echo "$as_me:15295: checking if iostream uses std-namespace" >&5
15296 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15297         cat >conftest.$ac_ext <<_ACEOF
15298 #line 15298 "configure"
15299 #include "confdefs.h"
15300
15301 #include <iostream>
15302 using std::endl;
15303 using std::cerr;
15304 int
15305 main ()
15306 {
15307
15308 cerr << "testing" << endl;
15309
15310   ;
15311   return 0;
15312 }
15313 _ACEOF
15314 rm -f conftest.$ac_objext
15315 if { (eval echo "$as_me:15315: \"$ac_compile\"") >&5
15316   (eval $ac_compile) 2>&5
15317   ac_status=$?
15318   echo "$as_me:15318: \$? = $ac_status" >&5
15319   (exit $ac_status); } &&
15320          { ac_try='test -s conftest.$ac_objext'
15321   { (eval echo "$as_me:15321: \"$ac_try\"") >&5
15322   (eval $ac_try) 2>&5
15323   ac_status=$?
15324   echo "$as_me:15324: \$? = $ac_status" >&5
15325   (exit $ac_status); }; }; then
15326   cf_iostream_namespace=yes
15327 else
15328   echo "$as_me: failed program was:" >&5
15329 cat conftest.$ac_ext >&5
15330 cf_iostream_namespace=no
15331 fi
15332 rm -f conftest.$ac_objext conftest.$ac_ext
15333         echo "$as_me:15333: result: $cf_iostream_namespace" >&5
15334 echo "${ECHO_T}$cf_iostream_namespace" >&6
15335         if test "$cf_iostream_namespace" = yes ; then
15336             cat >>confdefs.h <<\EOF
15337 #define IOSTREAM_NAMESPACE 1
15338 EOF
15339
15340         fi
15341     fi
15342
15343 echo "$as_me:15343: checking if we should include stdbool.h" >&5
15344 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15345
15346 if test "${cf_cv_header_stdbool_h+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 int
15355 main ()
15356 {
15357 bool foo = false
15358   ;
15359   return 0;
15360 }
15361 _ACEOF
15362 rm -f conftest.$ac_objext
15363 if { (eval echo "$as_me:15363: \"$ac_compile\"") >&5
15364   (eval $ac_compile) 2>&5
15365   ac_status=$?
15366   echo "$as_me:15366: \$? = $ac_status" >&5
15367   (exit $ac_status); } &&
15368          { ac_try='test -s conftest.$ac_objext'
15369   { (eval echo "$as_me:15369: \"$ac_try\"") >&5
15370   (eval $ac_try) 2>&5
15371   ac_status=$?
15372   echo "$as_me:15372: \$? = $ac_status" >&5
15373   (exit $ac_status); }; }; then
15374   cf_cv_header_stdbool_h=0
15375 else
15376   echo "$as_me: failed program was:" >&5
15377 cat conftest.$ac_ext >&5
15378 cat >conftest.$ac_ext <<_ACEOF
15379 #line 15379 "configure"
15380 #include "confdefs.h"
15381
15382 #ifndef __BEOS__
15383 #include <stdbool.h>
15384 #endif
15385
15386 int
15387 main ()
15388 {
15389 bool foo = false
15390   ;
15391   return 0;
15392 }
15393 _ACEOF
15394 rm -f conftest.$ac_objext
15395 if { (eval echo "$as_me:15395: \"$ac_compile\"") >&5
15396   (eval $ac_compile) 2>&5
15397   ac_status=$?
15398   echo "$as_me:15398: \$? = $ac_status" >&5
15399   (exit $ac_status); } &&
15400          { ac_try='test -s conftest.$ac_objext'
15401   { (eval echo "$as_me:15401: \"$ac_try\"") >&5
15402   (eval $ac_try) 2>&5
15403   ac_status=$?
15404   echo "$as_me:15404: \$? = $ac_status" >&5
15405   (exit $ac_status); }; }; then
15406   cf_cv_header_stdbool_h=1
15407 else
15408   echo "$as_me: failed program was:" >&5
15409 cat conftest.$ac_ext >&5
15410 cf_cv_header_stdbool_h=0
15411 fi
15412 rm -f conftest.$ac_objext conftest.$ac_ext
15413 fi
15414 rm -f conftest.$ac_objext conftest.$ac_ext
15415 fi
15416
15417 if test "$cf_cv_header_stdbool_h" = 1
15418 then    echo "$as_me:15418: result: yes" >&5
15419 echo "${ECHO_T}yes" >&6
15420 else    echo "$as_me:15420: result: no" >&5
15421 echo "${ECHO_T}no" >&6
15422 fi
15423
15424 echo "$as_me:15424: checking for builtin bool type" >&5
15425 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15426
15427 if test "${cf_cv_builtin_bool+set}" = set; then
15428   echo $ECHO_N "(cached) $ECHO_C" >&6
15429 else
15430
15431         cat >conftest.$ac_ext <<_ACEOF
15432 #line 15432 "configure"
15433 #include "confdefs.h"
15434
15435 #include <stdio.h>
15436 #include <sys/types.h>
15437
15438 int
15439 main ()
15440 {
15441 bool x = false
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 rm -f conftest.$ac_objext
15447 if { (eval echo "$as_me:15447: \"$ac_compile\"") >&5
15448   (eval $ac_compile) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); } &&
15452          { ac_try='test -s conftest.$ac_objext'
15453   { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); }; }; then
15458   cf_cv_builtin_bool=1
15459 else
15460   echo "$as_me: failed program was:" >&5
15461 cat conftest.$ac_ext >&5
15462 cf_cv_builtin_bool=0
15463 fi
15464 rm -f conftest.$ac_objext conftest.$ac_ext
15465
15466 fi
15467
15468 if test "$cf_cv_builtin_bool" = 1
15469 then    echo "$as_me:15469: result: yes" >&5
15470 echo "${ECHO_T}yes" >&6
15471 else    echo "$as_me:15471: result: no" >&5
15472 echo "${ECHO_T}no" >&6
15473 fi
15474
15475 echo "$as_me:15475: checking for size of bool" >&5
15476 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15477 if test "${cf_cv_type_of_bool+set}" = set; then
15478   echo $ECHO_N "(cached) $ECHO_C" >&6
15479 else
15480
15481         rm -f cf_test.out
15482         if test "$cross_compiling" = yes; then
15483   cf_cv_type_of_bool=unknown
15484 else
15485   cat >conftest.$ac_ext <<_ACEOF
15486 #line 15486 "configure"
15487 #include "confdefs.h"
15488
15489 #include <stdlib.h>
15490 #include <stdio.h>
15491
15492 #if defined(__cplusplus)
15493
15494 #ifdef HAVE_GXX_BUILTIN_H
15495 #include <g++/builtin.h>
15496 #elif HAVE_GPP_BUILTIN_H
15497 #include <gpp/builtin.h>
15498 #elif HAVE_BUILTIN_H
15499 #include <builtin.h>
15500 #endif
15501
15502 #else
15503
15504 #if $cf_cv_header_stdbool_h
15505 #include <stdbool.h>
15506 #endif
15507
15508 #endif
15509
15510 main()
15511 {
15512         FILE *fp = fopen("cf_test.out", "w");
15513         if (fp != 0) {
15514                 bool x = true;
15515                 if ((bool)(-x) >= 0)
15516                         fputs("unsigned ", fp);
15517                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15518                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15519                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15520                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15521                 fclose(fp);
15522         }
15523         ${cf_cv_main_return:-return}(0);
15524 }
15525
15526 _ACEOF
15527 rm -f conftest$ac_exeext
15528 if { (eval echo "$as_me:15528: \"$ac_link\"") >&5
15529   (eval $ac_link) 2>&5
15530   ac_status=$?
15531   echo "$as_me:15531: \$? = $ac_status" >&5
15532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15533   { (eval echo "$as_me:15533: \"$ac_try\"") >&5
15534   (eval $ac_try) 2>&5
15535   ac_status=$?
15536   echo "$as_me:15536: \$? = $ac_status" >&5
15537   (exit $ac_status); }; }; then
15538   cf_cv_type_of_bool=`cat cf_test.out`
15539                  if test -z "$cf_cv_type_of_bool"; then
15540                    cf_cv_type_of_bool=unknown
15541                  fi
15542 else
15543   echo "$as_me: program exited with status $ac_status" >&5
15544 echo "$as_me: failed program was:" >&5
15545 cat conftest.$ac_ext >&5
15546 cf_cv_type_of_bool=unknown
15547 fi
15548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15549 fi
15550
15551 fi
15552
15553         rm -f cf_test.out
15554 echo "$as_me:15554: result: $cf_cv_type_of_bool" >&5
15555 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15556 if test "$cf_cv_type_of_bool" = unknown ; then
15557         case .$NCURSES_BOOL in #(vi
15558         .auto|.) NCURSES_BOOL=unsigned;;
15559         esac
15560         { echo "$as_me:15560: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15561 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15562         cf_cv_type_of_bool=$NCURSES_BOOL
15563 fi
15564
15565 echo "$as_me:15565: checking for special defines needed for etip.h" >&5
15566 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15567 cf_save_CXXFLAGS="$CXXFLAGS"
15568 cf_result="none"
15569 for cf_math in "" MATH_H
15570 do
15571 for cf_excp in "" MATH_EXCEPTION
15572 do
15573         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15574         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15575         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15576 cat >conftest.$ac_ext <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15579
15580 #include <etip.h.in>
15581
15582 int
15583 main ()
15584 {
15585
15586   ;
15587   return 0;
15588 }
15589 _ACEOF
15590 rm -f conftest.$ac_objext
15591 if { (eval echo "$as_me:15591: \"$ac_compile\"") >&5
15592   (eval $ac_compile) 2>&5
15593   ac_status=$?
15594   echo "$as_me:15594: \$? = $ac_status" >&5
15595   (exit $ac_status); } &&
15596          { ac_try='test -s conftest.$ac_objext'
15597   { (eval echo "$as_me:15597: \"$ac_try\"") >&5
15598   (eval $ac_try) 2>&5
15599   ac_status=$?
15600   echo "$as_me:15600: \$? = $ac_status" >&5
15601   (exit $ac_status); }; }; then
15602
15603         test -n "$cf_math" && cat >>confdefs.h <<EOF
15604 #define ETIP_NEEDS_${cf_math} 1
15605 EOF
15606
15607         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15608 #define ETIP_NEEDS_${cf_excp} 1
15609 EOF
15610
15611         cf_result="$cf_math $cf_excp"
15612         break
15613
15614 else
15615   echo "$as_me: failed program was:" >&5
15616 cat conftest.$ac_ext >&5
15617 fi
15618 rm -f conftest.$ac_objext conftest.$ac_ext
15619 done
15620 done
15621 echo "$as_me:15621: result: $cf_result" >&5
15622 echo "${ECHO_T}$cf_result" >&6
15623 CXXFLAGS="$cf_save_CXXFLAGS"
15624
15625 if test -n "$CXX"; then
15626 echo "$as_me:15626: checking if $CXX accepts parameter initialization" >&5
15627 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15628 if test "${cf_cv_cpp_param_init+set}" = set; then
15629   echo $ECHO_N "(cached) $ECHO_C" >&6
15630 else
15631
15632         ac_ext=cc
15633 ac_cpp='$CXXCPP $CPPFLAGS'
15634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15637 ac_main_return=return
15638
15639         if test "$cross_compiling" = yes; then
15640   cf_cv_cpp_param_init=unknown
15641 else
15642   cat >conftest.$ac_ext <<_ACEOF
15643 #line 15643 "configure"
15644 #include "confdefs.h"
15645
15646 class TEST {
15647 private:
15648         int value;
15649 public:
15650         TEST(int x = 1);
15651         ~TEST();
15652 };
15653
15654 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15655 {
15656         value = x;
15657 }
15658 void main() { }
15659
15660 _ACEOF
15661 rm -f conftest$ac_exeext
15662 if { (eval echo "$as_me:15662: \"$ac_link\"") >&5
15663   (eval $ac_link) 2>&5
15664   ac_status=$?
15665   echo "$as_me:15665: \$? = $ac_status" >&5
15666   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15667   { (eval echo "$as_me:15667: \"$ac_try\"") >&5
15668   (eval $ac_try) 2>&5
15669   ac_status=$?
15670   echo "$as_me:15670: \$? = $ac_status" >&5
15671   (exit $ac_status); }; }; then
15672   cf_cv_cpp_param_init=yes
15673 else
15674   echo "$as_me: program exited with status $ac_status" >&5
15675 echo "$as_me: failed program was:" >&5
15676 cat conftest.$ac_ext >&5
15677 cf_cv_cpp_param_init=no
15678 fi
15679 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15680 fi
15681         ac_ext=cc
15682 ac_cpp='$CXXCPP $CPPFLAGS'
15683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15686 ac_main_return=return
15687
15688 fi
15689 echo "$as_me:15689: result: $cf_cv_cpp_param_init" >&5
15690 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15691 fi
15692 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15693 #define CPP_HAS_PARAM_INIT 1
15694 EOF
15695
15696 if test -n "$CXX"; then
15697
15698 echo "$as_me:15698: checking if $CXX accepts static_cast" >&5
15699 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15700 if test "${cf_cv_cpp_static_cast+set}" = set; then
15701   echo $ECHO_N "(cached) $ECHO_C" >&6
15702 else
15703
15704         ac_ext=cc
15705 ac_cpp='$CXXCPP $CPPFLAGS'
15706 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15707 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15708 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15709 ac_main_return=return
15710
15711         cat >conftest.$ac_ext <<_ACEOF
15712 #line 15712 "configure"
15713 #include "confdefs.h"
15714
15715 class NCursesPanel
15716 {
15717 public:
15718   NCursesPanel(int nlines,
15719                int ncols,
15720                int begin_y = 0,
15721                int begin_x = 0)
15722   {
15723   }
15724
15725   ~NCursesPanel();
15726 };
15727
15728 template<class T> class NCursesUserPanel : public NCursesPanel
15729 {
15730 public:
15731   NCursesUserPanel (int nlines,
15732                     int ncols,
15733                     int begin_y = 0,
15734                     int begin_x = 0,
15735                     const T* p_UserData = static_cast<T*>(0))
15736     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15737   {
15738   };
15739   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15740   {
15741   };
15742
15743   virtual ~NCursesUserPanel() {};
15744 };
15745
15746 int
15747 main ()
15748 {
15749
15750         const char* p_UserData = static_cast<char*>(0)
15751   ;
15752   return 0;
15753 }
15754 _ACEOF
15755 rm -f conftest.$ac_objext
15756 if { (eval echo "$as_me:15756: \"$ac_compile\"") >&5
15757   (eval $ac_compile) 2>&5
15758   ac_status=$?
15759   echo "$as_me:15759: \$? = $ac_status" >&5
15760   (exit $ac_status); } &&
15761          { ac_try='test -s conftest.$ac_objext'
15762   { (eval echo "$as_me:15762: \"$ac_try\"") >&5
15763   (eval $ac_try) 2>&5
15764   ac_status=$?
15765   echo "$as_me:15765: \$? = $ac_status" >&5
15766   (exit $ac_status); }; }; then
15767   cf_cv_cpp_static_cast=yes
15768 else
15769   echo "$as_me: failed program was:" >&5
15770 cat conftest.$ac_ext >&5
15771 cf_cv_cpp_static_cast=no
15772 fi
15773 rm -f conftest.$ac_objext conftest.$ac_ext
15774
15775         ac_ext=cc
15776 ac_cpp='$CXXCPP $CPPFLAGS'
15777 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15778 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15779 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15780 ac_main_return=return
15781
15782 fi
15783 echo "$as_me:15783: result: $cf_cv_cpp_static_cast" >&5
15784 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15785
15786 fi
15787
15788 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15789 #define CPP_HAS_STATIC_CAST 1
15790 EOF
15791
15792         CXX_AR='$(AR)'
15793         CXX_AR_OPTS='$(AR_OPTS)'
15794         case $cf_cv_system_name in #(vi
15795         irix*) #(vi
15796             if test "$GXX" != yes ; then
15797                 CXX_AR='$(CXX)'
15798                 CXX_AR_OPTS='-ar -o'
15799             fi
15800             ;;
15801         sco3.2v5*) #(vi
15802             CXXLDFLAGS="-u main"
15803             ;;
15804         solaris2*)
15805             if test "$GXX" != yes ; then
15806                 CXX_AR='$(CXX)'
15807                 CXX_AR_OPTS='-xar -o'
15808             fi
15809             ;;
15810         esac
15811
15812 else
15813         cf_cxx_library=no
15814         cf_cv_builtin_bool=1
15815
15816         # Just because we are not configuring against C++ right now does not
15817         # mean that a user will not want to use C++.  Some distributors disable
15818         # the C++ portion of this configuration as a shortcut (or just to avoid
15819         # compiling the demo in the c++ directory).  So we need a reasonable
15820         # default for the 'bool' type.
15821         #
15822         # Caveat: since the storage of the bool type is not standardized, it
15823         # may change.
15824
15825         if test "$NCURSES_BOOL" != auto ; then
15826                 cf_cv_type_of_bool=$NCURSES_BOOL
15827                 cf_cv_header_stdbool_h=0
15828         else
15829                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15830
15831 echo "$as_me:15831: checking for size of bool" >&5
15832 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15833 if test "${cf_cv_type_of_bool+set}" = set; then
15834   echo $ECHO_N "(cached) $ECHO_C" >&6
15835 else
15836
15837         rm -f cf_test.out
15838         if test "$cross_compiling" = yes; then
15839   cf_cv_type_of_bool=unknown
15840 else
15841   cat >conftest.$ac_ext <<_ACEOF
15842 #line 15842 "configure"
15843 #include "confdefs.h"
15844
15845 #include <stdlib.h>
15846 #include <stdio.h>
15847
15848 #if defined(__cplusplus)
15849
15850 #ifdef HAVE_GXX_BUILTIN_H
15851 #include <g++/builtin.h>
15852 #elif HAVE_GPP_BUILTIN_H
15853 #include <gpp/builtin.h>
15854 #elif HAVE_BUILTIN_H
15855 #include <builtin.h>
15856 #endif
15857
15858 #else
15859
15860 #if $cf_cv_header_stdbool_h
15861 #include <stdbool.h>
15862 #endif
15863
15864 #endif
15865
15866 main()
15867 {
15868         FILE *fp = fopen("cf_test.out", "w");
15869         if (fp != 0) {
15870                 bool x = true;
15871                 if ((bool)(-x) >= 0)
15872                         fputs("unsigned ", fp);
15873                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15874                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15875                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15876                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15877                 fclose(fp);
15878         }
15879         ${cf_cv_main_return:-return}(0);
15880 }
15881
15882 _ACEOF
15883 rm -f conftest$ac_exeext
15884 if { (eval echo "$as_me:15884: \"$ac_link\"") >&5
15885   (eval $ac_link) 2>&5
15886   ac_status=$?
15887   echo "$as_me:15887: \$? = $ac_status" >&5
15888   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15889   { (eval echo "$as_me:15889: \"$ac_try\"") >&5
15890   (eval $ac_try) 2>&5
15891   ac_status=$?
15892   echo "$as_me:15892: \$? = $ac_status" >&5
15893   (exit $ac_status); }; }; then
15894   cf_cv_type_of_bool=`cat cf_test.out`
15895                  if test -z "$cf_cv_type_of_bool"; then
15896                    cf_cv_type_of_bool=unknown
15897                  fi
15898 else
15899   echo "$as_me: program exited with status $ac_status" >&5
15900 echo "$as_me: failed program was:" >&5
15901 cat conftest.$ac_ext >&5
15902 cf_cv_type_of_bool=unknown
15903 fi
15904 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15905 fi
15906
15907 fi
15908
15909         rm -f cf_test.out
15910 echo "$as_me:15910: result: $cf_cv_type_of_bool" >&5
15911 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15912 if test "$cf_cv_type_of_bool" = unknown ; then
15913         case .$NCURSES_BOOL in #(vi
15914         .auto|.) NCURSES_BOOL=unsigned;;
15915         esac
15916         { echo "$as_me:15916: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15917 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15918         cf_cv_type_of_bool=$NCURSES_BOOL
15919 fi
15920
15921                 else
15922                         echo "$as_me:15922: checking for fallback type of bool" >&5
15923 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15924                         case "$host_cpu" in #(vi
15925                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15926                         *)      cf_cv_type_of_bool=int  ;;
15927                         esac
15928                         echo "$as_me:15928: result: $cf_cv_type_of_bool" >&5
15929 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15930                 fi
15931         fi
15932 fi
15933
15934 # If the C compiler did not declare bool, and we did not determine that the C++
15935 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15936 # ncurses library use the same type as C++ bool.  Note that this allows one to
15937 # specify the type of bool in a configure-script option and postpone
15938 # integration with the C++ compiler provided that the types are compatible.
15939 USE_CXX_BOOL=1
15940 if test $cf_cv_cc_bool_type = 1
15941 then
15942         # oops: C has a bool.  Unlikely, but C++ could differ.
15943         USE_CXX_BOOL=0
15944 elif test $cf_cv_builtin_bool = 0
15945 then
15946         # C++ has no bool
15947         USE_CXX_BOOL=0
15948 else
15949         # this is the normal case
15950         USE_CXX_BOOL='defined(__cplusplus)'
15951 fi
15952
15953 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15954
15955 if test "$cf_with_ada" != "no" ; then
15956     if test "$with_libtool" != "no"; then
15957         { echo "$as_me:15957: WARNING: libtool does not support Ada - disabling feature" >&5
15958 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15959         cf_with_ada=no
15960     fi
15961 fi
15962
15963 if test "$cf_with_ada" != "no" ; then
15964 cf_ada_make=gnatmake
15965 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15966 set dummy $cf_ada_make; ac_word=$2
15967 echo "$as_me:15967: checking for $ac_word" >&5
15968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15969 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15970   echo $ECHO_N "(cached) $ECHO_C" >&6
15971 else
15972   if test -n "$gnat_exists"; then
15973   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15974 else
15975   ac_save_IFS=$IFS; IFS=$ac_path_separator
15976 ac_dummy="$PATH"
15977 for ac_dir in $ac_dummy; do
15978   IFS=$ac_save_IFS
15979   test -z "$ac_dir" && ac_dir=.
15980   $as_executable_p "$ac_dir/$ac_word" || continue
15981 ac_cv_prog_gnat_exists="yes"
15982 echo "$as_me:15982: found $ac_dir/$ac_word" >&5
15983 break
15984 done
15985
15986   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15987 fi
15988 fi
15989 gnat_exists=$ac_cv_prog_gnat_exists
15990 if test -n "$gnat_exists"; then
15991   echo "$as_me:15991: result: $gnat_exists" >&5
15992 echo "${ECHO_T}$gnat_exists" >&6
15993 else
15994   echo "$as_me:15994: result: no" >&5
15995 echo "${ECHO_T}no" >&6
15996 fi
15997
15998 if test "$ac_cv_prog_gnat_exists" = no; then
15999    cf_ada_make=
16000 else
16001
16002 echo "$as_me:16002: checking for gnat version" >&5
16003 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16004 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16005   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16006 echo "$as_me:16006: result: $cf_gnat_version" >&5
16007 echo "${ECHO_T}$cf_gnat_version" >&6
16008
16009 case $cf_gnat_version in
16010   3.1[1-9]*|3.[2-9]*|[4-9].*)
16011     cf_cv_prog_gnat_correct=yes
16012     ;;
16013   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16014      cf_cv_prog_gnat_correct=no
16015      ;;
16016 esac
16017 case $cf_gnat_version in
16018   3.[1-9]*|[4-9].*)
16019       cf_compile_generics=generics
16020       cf_generic_objects="\${GENOBJS}"
16021       ;;
16022   *)  cf_compile_generics=
16023       cf_generic_objects=
16024       ;;
16025 esac
16026
16027    # Extract the first word of "m4", so it can be a program name with args.
16028 set dummy m4; ac_word=$2
16029 echo "$as_me:16029: checking for $ac_word" >&5
16030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16031 if test "${ac_cv_prog_M4_exists+set}" = set; then
16032   echo $ECHO_N "(cached) $ECHO_C" >&6
16033 else
16034   if test -n "$M4_exists"; then
16035   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16036 else
16037   ac_save_IFS=$IFS; IFS=$ac_path_separator
16038 ac_dummy="$PATH"
16039 for ac_dir in $ac_dummy; do
16040   IFS=$ac_save_IFS
16041   test -z "$ac_dir" && ac_dir=.
16042   $as_executable_p "$ac_dir/$ac_word" || continue
16043 ac_cv_prog_M4_exists="yes"
16044 echo "$as_me:16044: found $ac_dir/$ac_word" >&5
16045 break
16046 done
16047
16048   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16049 fi
16050 fi
16051 M4_exists=$ac_cv_prog_M4_exists
16052 if test -n "$M4_exists"; then
16053   echo "$as_me:16053: result: $M4_exists" >&5
16054 echo "${ECHO_T}$M4_exists" >&6
16055 else
16056   echo "$as_me:16056: result: no" >&5
16057 echo "${ECHO_T}no" >&6
16058 fi
16059
16060    if test "$ac_cv_prog_M4_exists" = no; then
16061       cf_cv_prog_gnat_correct=no
16062       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16063    fi
16064    if test "$cf_cv_prog_gnat_correct" = yes; then
16065       echo "$as_me:16065: checking if GNAT works" >&5
16066 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16067
16068 rm -f conftest*
16069 cat >>conftest.ads <<CF_EOF
16070 procedure conftest;
16071 CF_EOF
16072 cat >>conftest.adb <<CF_EOF
16073 with Text_IO;
16074 with GNAT.OS_Lib;
16075 procedure conftest is
16076 begin
16077    Text_IO.Put ("Hello World");
16078    Text_IO.New_Line;
16079    GNAT.OS_Lib.OS_Exit (0);
16080 end conftest;
16081 CF_EOF
16082 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16083    if ( ./conftest 1>&5 2>&1 ) ; then
16084       cf_cv_prog_gnat_correct=yes
16085    else
16086       cf_cv_prog_gnat_correct=no
16087    fi
16088 else
16089    cf_cv_prog_gnat_correct=no
16090 fi
16091 rm -f conftest*
16092
16093       echo "$as_me:16093: result: $cf_cv_prog_gnat_correct" >&5
16094 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16095    fi
16096 fi
16097 if test "$cf_cv_prog_gnat_correct" = yes; then
16098    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16099
16100    echo "$as_me:16100: checking if GNAT pragma Unreferenced works" >&5
16101 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16102
16103 rm -f conftest*
16104 cat >>conftest.ads <<CF_EOF
16105 procedure conftest;
16106 CF_EOF
16107 cat >>conftest.adb <<CF_EOF
16108 with Text_IO;
16109 with GNAT.OS_Lib;
16110 procedure conftest is
16111    test : Integer;
16112    pragma Unreferenced (test);
16113 begin
16114    test := 1;
16115    Text_IO.Put ("Hello World");
16116    Text_IO.New_Line;
16117    GNAT.OS_Lib.OS_Exit (0);
16118 end conftest;
16119 CF_EOF
16120 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16121       cf_cv_pragma_unreferenced=yes
16122 else
16123    cf_cv_pragma_unreferenced=no
16124 fi
16125 rm -f conftest*
16126
16127    echo "$as_me:16127: result: $cf_cv_pragma_unreferenced" >&5
16128 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16129
16130    # if the pragma is supported, use it (needed in the Trace code).
16131    if test $cf_cv_pragma_unreferenced = yes ; then
16132       PRAGMA_UNREF=TRUE
16133    else
16134       PRAGMA_UNREF=FALSE
16135    fi
16136
16137 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16138 if test "${with_ada_compiler+set}" = set; then
16139   withval="$with_ada_compiler"
16140   cf_ada_compiler=$withval
16141 else
16142   cf_ada_compiler=gnatmake
16143 fi;
16144
16145    cf_ada_package=terminal_interface
16146
16147 # Check whether --with-ada-include or --without-ada-include was given.
16148 if test "${with_ada_include+set}" = set; then
16149   withval="$with_ada_include"
16150
16151 else
16152   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16153 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16154
16155 if test "x$prefix" != xNONE; then
16156   cf_path_syntax="$prefix"
16157 else
16158   cf_path_syntax="$ac_default_prefix"
16159 fi
16160
16161 case ".$withval" in #(vi
16162 .\$\(*\)*|.\'*\'*) #(vi
16163   ;;
16164 ..|./*|.\\*) #(vi
16165   ;;
16166 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16167   ;;
16168 .\${*prefix}*) #(vi
16169   eval withval="$withval"
16170   case ".$withval" in #(vi
16171   .NONE/*)
16172     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16173     ;;
16174   esac
16175   ;; #(vi
16176 .no|.NONE/*)
16177   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16178   ;;
16179 *)
16180   { { echo "$as_me:16180: error: expected a pathname, not \"$withval\"" >&5
16181 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16182    { (exit 1); exit 1; }; }
16183   ;;
16184 esac
16185
16186 fi
16187 ADA_INCLUDE="$withval"
16188
16189 # Check whether --with-ada-objects or --without-ada-objects was given.
16190 if test "${with_ada_objects+set}" = set; then
16191   withval="$with_ada_objects"
16192
16193 else
16194   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16195 fi; if test -n "$prefix/lib/ada/adalib" ; then
16196
16197 if test "x$prefix" != xNONE; then
16198   cf_path_syntax="$prefix"
16199 else
16200   cf_path_syntax="$ac_default_prefix"
16201 fi
16202
16203 case ".$withval" in #(vi
16204 .\$\(*\)*|.\'*\'*) #(vi
16205   ;;
16206 ..|./*|.\\*) #(vi
16207   ;;
16208 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16209   ;;
16210 .\${*prefix}*) #(vi
16211   eval withval="$withval"
16212   case ".$withval" in #(vi
16213   .NONE/*)
16214     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16215     ;;
16216   esac
16217   ;; #(vi
16218 .no|.NONE/*)
16219   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16220   ;;
16221 *)
16222   { { echo "$as_me:16222: error: expected a pathname, not \"$withval\"" >&5
16223 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16224    { (exit 1); exit 1; }; }
16225   ;;
16226 esac
16227
16228 fi
16229 ADA_OBJECTS="$withval"
16230
16231 fi
16232 fi
16233 else
16234    cf_with_ada=no
16235 fi
16236
16237 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16238 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16239 ###
16240 ### ticlib modules may be a separate library, otherwise contained in termlib.
16241 ### termlib modules may be a separate library, otherwise contained in ncurses.
16242 ###
16243 ### The of "+" or " " between the tokens controls the way the script
16244 ### chooses to split module lists into libraries.
16245 ###
16246 ### (see CF_LIB_RULES).
16247 echo "$as_me:16247: checking for library subsets" >&5
16248 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16249 LIB_SUBSETS=
16250
16251 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16252         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16253         if test "$with_ticlib" != no ; then
16254                 LIB_SUBSETS="${LIB_SUBSETS} "
16255         else
16256                 LIB_SUBSETS="${LIB_SUBSETS}+"
16257         fi
16258 fi
16259
16260 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16261 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16262 if test "$with_termlib" != no ; then
16263         LIB_SUBSETS="${LIB_SUBSETS} "
16264 else
16265         LIB_SUBSETS="${LIB_SUBSETS}+"
16266 fi
16267
16268 LIB_SUBSETS="${LIB_SUBSETS}base"
16269 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16270 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16271
16272 echo "$as_me:16272: result: $LIB_SUBSETS" >&5
16273 echo "${ECHO_T}$LIB_SUBSETS" >&6
16274
16275 ### Construct the list of include-directories to be generated
16276
16277 CPPFLAGS="-I. -I../include $CPPFLAGS"
16278 if test "$srcdir" != "."; then
16279         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16280 fi
16281 if test "$GCC" != yes; then
16282         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16283 elif test "$includedir" != "/usr/include"; then
16284         if test "$includedir" = '${prefix}/include' ; then
16285                 if test $prefix != /usr ; then
16286                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16287                 fi
16288         else
16289                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16290         fi
16291 fi
16292
16293 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16294 if test "$srcdir" != "."; then
16295         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16296 fi
16297 if test "$GCC" != yes; then
16298         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16299 elif test "$includedir" != "/usr/include"; then
16300         if test "$includedir" = '${prefix}/include' ; then
16301                 if test $prefix != /usr ; then
16302                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16303                 fi
16304         else
16305                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16306         fi
16307 fi
16308
16309 ### Build up pieces for makefile rules
16310 echo "$as_me:16310: checking default library suffix" >&5
16311 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16312
16313         case $DFT_LWR_MODEL in
16314         libtool) DFT_ARG_SUFFIX=''   ;;
16315         normal)  DFT_ARG_SUFFIX=''   ;;
16316         debug)   DFT_ARG_SUFFIX='_g' ;;
16317         profile) DFT_ARG_SUFFIX='_p' ;;
16318         shared)  DFT_ARG_SUFFIX=''   ;;
16319         esac
16320         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16321 echo "$as_me:16321: result: $DFT_ARG_SUFFIX" >&5
16322 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16323
16324 echo "$as_me:16324: checking default library-dependency suffix" >&5
16325 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16326
16327         case $DFT_LWR_MODEL in #(vi
16328         libtool) #(vi
16329                 DFT_LIB_SUFFIX='.la'
16330                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16331                 ;;
16332         normal) #(vi
16333                 DFT_LIB_SUFFIX='.a'
16334                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16335                 ;;
16336         debug) #(vi
16337                 DFT_LIB_SUFFIX='_g.a'
16338                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16339                 ;;
16340         profile) #(vi
16341                 DFT_LIB_SUFFIX='_p.a'
16342                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16343                 ;;
16344         shared) #(vi
16345                 case $cf_cv_system_name in
16346                 aix[56]*) #(vi
16347                         DFT_LIB_SUFFIX='.a'
16348                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16349                         ;;
16350                 cygwin*) #(vi
16351                         DFT_LIB_SUFFIX='.dll'
16352                         DFT_DEP_SUFFIX='.dll.a'
16353                         ;;
16354                 darwin*) #(vi
16355                         DFT_LIB_SUFFIX='.dylib'
16356                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16357                         ;;
16358                 hpux*) #(vi
16359                         case $target in
16360                         ia64*) #(vi
16361                                 DFT_LIB_SUFFIX='.so'
16362                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16363                                 ;;
16364                         *) #(vi
16365                                 DFT_LIB_SUFFIX='.sl'
16366                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16367                                 ;;
16368                         esac
16369                         ;;
16370                 *)      DFT_LIB_SUFFIX='.so'
16371                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16372                         ;;
16373                 esac
16374         esac
16375         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16376         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16377 echo "$as_me:16377: result: $DFT_DEP_SUFFIX" >&5
16378 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16379
16380 echo "$as_me:16380: checking default object directory" >&5
16381 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16382
16383         case $DFT_LWR_MODEL in
16384         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16385         normal)  DFT_OBJ_SUBDIR='objects' ;;
16386         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16387         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16388         shared)
16389                 case $cf_cv_system_name in #(vi
16390                 cygwin) #(vi
16391                         DFT_OBJ_SUBDIR='objects' ;;
16392                 *)
16393                         DFT_OBJ_SUBDIR='obj_s' ;;
16394                 esac
16395         esac
16396 echo "$as_me:16396: result: $DFT_OBJ_SUBDIR" >&5
16397 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16398
16399 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16400 if test "$cf_with_cxx" = yes ; then
16401 echo "$as_me:16401: checking c++ library-dependency suffix" >&5
16402 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16403 if test "$with_libtool" != "no"; then
16404         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16405 else
16406
16407         case normal in #(vi
16408         libtool) #(vi
16409                 CXX_LIB_SUFFIX='.la'
16410                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16411                 ;;
16412         normal) #(vi
16413                 CXX_LIB_SUFFIX='.a'
16414                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16415                 ;;
16416         debug) #(vi
16417                 CXX_LIB_SUFFIX='_g.a'
16418                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16419                 ;;
16420         profile) #(vi
16421                 CXX_LIB_SUFFIX='_p.a'
16422                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16423                 ;;
16424         shared) #(vi
16425                 case $cf_cv_system_name in
16426                 aix[56]*) #(vi
16427                         CXX_LIB_SUFFIX='.a'
16428                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16429                         ;;
16430                 cygwin*) #(vi
16431                         CXX_LIB_SUFFIX='.dll'
16432                         CXX_DEP_SUFFIX='.dll.a'
16433                         ;;
16434                 darwin*) #(vi
16435                         CXX_LIB_SUFFIX='.dylib'
16436                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16437                         ;;
16438                 hpux*) #(vi
16439                         case $target in
16440                         ia64*) #(vi
16441                                 CXX_LIB_SUFFIX='.so'
16442                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16443                                 ;;
16444                         *) #(vi
16445                                 CXX_LIB_SUFFIX='.sl'
16446                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16447                                 ;;
16448                         esac
16449                         ;;
16450                 *)      CXX_LIB_SUFFIX='.so'
16451                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16452                         ;;
16453                 esac
16454         esac
16455         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16456         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16457 fi
16458 echo "$as_me:16458: result: $CXX_LIB_SUFFIX" >&5
16459 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16460
16461 fi
16462
16463 # do not want -ldl in build except as needed for -lncurses dependency
16464 if test "$with_dlsym" = yes ; then
16465 if test $DFT_LWR_MODEL = shared || \
16466    test $DFT_LWR_MODEL = libtool ; then
16467
16468 # remove dl library from $LIBS
16469 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16470
16471 fi
16472 fi
16473 ### Set up low-level terminfo dependencies for makefiles.
16474
16475 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16476 # do not need libdl
16477 TICS_LIST=
16478 if test "$with_dlsym" = yes ; then
16479
16480 # remove dl library from $SHLIB_LIST
16481 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16482
16483 fi
16484
16485 if test "$with_ticlib" != no ; then
16486
16487         if test "$with_ticlib" != yes ; then
16488                 TICS_NAME=$with_ticlib
16489                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16490                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16491                 TICS_LIB_SUFFIX="${with_ticlib}"
16492         else
16493                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16494                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16495                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16496         fi
16497         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16498 else
16499         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16500 fi
16501
16502 if test "$with_termlib" != no ; then
16503
16504         if test "$with_termlib" != yes ; then
16505                 TINFO_NAME=$with_termlib
16506                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16507                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16508                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16509                 TINFO_LIB_SUFFIX="${with_termlib}"
16510         else
16511                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16512                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16513                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16514                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16515         fi
16516
16517         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16518         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16519         if test "$DFT_LWR_MODEL" = "libtool"; then
16520                 TEST_ARGS="${TEST_DEPS}"
16521                 TEST_ARG2="${TEST_DEP2}"
16522                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16523         else
16524                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16525                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16526                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16527                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16528                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16529         fi
16530 else
16531         # the next lines are needed for linking libtic over libncurses
16532         TINFO_NAME=${LIB_NAME}
16533         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16534         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16535         if test "$with_tic_depends" = yes ; then
16536                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16537         else
16538                 TICS_LIST="$SHLIB_LIST"
16539         fi
16540
16541         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16542 fi
16543
16544 if test "$DFT_LWR_MODEL" = shared ; then
16545         case $cf_cv_system_name in #(vi
16546         cygwin*)
16547                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16548                 TINFO_SUFFIX=.dll
16549                 ;;
16550         esac
16551 fi
16552
16553 if test "$with_dlsym" = yes ; then
16554
16555 # remove dl library from $TICS_LIST
16556 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16557
16558 fi
16559
16560 if test "$DFT_LWR_MODEL" = "libtool"; then
16561     OBJEXT=lo
16562 fi
16563
16564 # needed for Ada95
16565 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16566
16567 case $DFT_LWR_MODEL in
16568 normal|debug|profile)
16569
16570 if test "$GCC" = yes ; then
16571         case $cf_cv_system_name in #(
16572         OS/2*|os2*|aix[4]*)     #( vi
16573                 LDFLAGS_STATIC=
16574                 LDFLAGS_SHARED=
16575                 ;;
16576     *)  #( normally, except when broken
16577         LDFLAGS_STATIC=-static
16578         LDFLAGS_SHARED=-dynamic
16579         ;;
16580     esac
16581 else
16582         case $cf_cv_system_name in #(
16583         aix[456]*)      #( from ld manpage
16584                 LDFLAGS_STATIC=-bstatic
16585                 LDFLAGS_SHARED=-bdynamic
16586                 ;;
16587         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16588                 # We could also use just "archive" and "shared".
16589                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16590                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16591                 ;;
16592         irix*)          #( from ld manpage IRIX64
16593                 LDFLAGS_STATIC=-Bstatic
16594                 LDFLAGS_SHARED=-Bdynamic
16595                 ;;
16596         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16597                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16598                 LDFLAGS_STATIC=-noso
16599                 LDFLAGS_SHARED=-so_archive
16600                 ;;
16601         solaris2*)
16602                 LDFLAGS_STATIC=-Bstatic
16603                 LDFLAGS_SHARED=-Bdynamic
16604                 ;;
16605         esac
16606 fi
16607
16608         ;;
16609 esac
16610
16611 echo "$as_me:16611: checking where we will install curses.h" >&5
16612 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16613 test "$with_overwrite" = no && \
16614 test "x$includedir" = 'x${prefix}/include' && \
16615         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16616 echo "$as_me:16616: result: $includedir" >&5
16617 echo "${ECHO_T}$includedir" >&6
16618
16619 ### Resolve a conflict between normal and wide-curses by forcing applications
16620 ### that will need libutf8 to add it to their configure script.
16621 if test "$with_overwrite" != no ; then
16622 if test "$NCURSES_LIBUTF8" = 1 ; then
16623         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16624         { echo "$as_me:16624: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16625 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16626 fi
16627 fi
16628
16629 # used to separate tack out of the tree
16630 NCURSES_TREE=
16631
16632 ### predefined stuff for the test programs
16633 cat >>confdefs.h <<\EOF
16634 #define HAVE_SLK_COLOR 1
16635 EOF
16636
16637 ### Construct the list of subdirectories for which we'll customize makefiles
16638 ### with the appropriate compile-rules.
16639
16640 echo "$as_me:16640: checking for src modules" >&5
16641 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16642
16643 # dependencies and linker-arguments for test-programs
16644 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16645 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16646 if test "$DFT_LWR_MODEL" = "libtool"; then
16647         TEST_ARGS="${TEST_DEPS}"
16648         TEST_ARG2="${TEST_DEP2}"
16649 else
16650         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16651         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16652 fi
16653
16654 cf_cv_src_modules=
16655 for cf_dir in $modules_to_build
16656 do
16657         if test -f $srcdir/$cf_dir/modules; then
16658
16659                 # We may/may not have tack in the distribution, though the
16660                 # makefile is.
16661                 if test $cf_dir = tack ; then
16662                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16663                                 continue
16664                         fi
16665                 fi
16666
16667                 if test -z "$cf_cv_src_modules"; then
16668                         cf_cv_src_modules=$cf_dir
16669                 else
16670                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16671                 fi
16672
16673                 # Make the ncurses_cfg.h file record the library interface files as
16674                 # well.  These are header files that are the same name as their
16675                 # directory.  Ncurses is the only library that does not follow
16676                 # that pattern.
16677                 if test $cf_dir = tack ; then
16678                         continue
16679                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16680
16681 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16682
16683                         cat >>confdefs.h <<EOF
16684 #define HAVE_${cf_have_include}_H 1
16685 EOF
16686
16687                         cat >>confdefs.h <<EOF
16688 #define HAVE_LIB${cf_have_include} 1
16689 EOF
16690
16691                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16692                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16693                         if test "$DFT_LWR_MODEL" = "libtool"; then
16694                                 TEST_ARGS="${TEST_DEPS}"
16695                                 TEST_ARG2="${TEST_DEP2}"
16696                         else
16697                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16698                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16699                         fi
16700                 fi
16701         fi
16702 done
16703 echo "$as_me:16703: result: $cf_cv_src_modules" >&5
16704 echo "${ECHO_T}$cf_cv_src_modules" >&6
16705
16706 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16707 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16708
16709 SRC_SUBDIRS=
16710 if test "x$cf_with_manpages" != xno ; then
16711         SRC_SUBDIRS="$SRC_SUBDIRS man"
16712 fi
16713 SRC_SUBDIRS="$SRC_SUBDIRS include"
16714 for cf_dir in $cf_cv_src_modules
16715 do
16716         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16717 done
16718 SRC_SUBDIRS="$SRC_SUBDIRS test"
16719 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16720 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16721
16722 ADA_SUBDIRS=
16723 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16724         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16725         ADA_SUBDIRS="gen src samples"
16726 fi
16727
16728 SUB_MAKEFILES=
16729 for cf_dir in $SRC_SUBDIRS
16730 do
16731         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16732 done
16733
16734 if test -n "$ADA_SUBDIRS"; then
16735         for cf_dir in $ADA_SUBDIRS
16736         do
16737                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16738         done
16739
16740 fi
16741
16742 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16743    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16744 fi
16745
16746 DIRS_TO_MAKE="lib"
16747 for cf_item in $cf_list_models
16748 do
16749
16750         case $cf_item in
16751         libtool) cf_subdir='obj_lo'  ;;
16752         normal)  cf_subdir='objects' ;;
16753         debug)   cf_subdir='obj_g' ;;
16754         profile) cf_subdir='obj_p' ;;
16755         shared)
16756                 case $cf_cv_system_name in #(vi
16757                 cygwin) #(vi
16758                         cf_subdir='objects' ;;
16759                 *)
16760                         cf_subdir='obj_s' ;;
16761                 esac
16762         esac
16763
16764         for cf_item2 in $DIRS_TO_MAKE
16765         do
16766                 test $cf_item2 = $cf_subdir && break
16767         done
16768         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16769 done
16770 for cf_dir in $DIRS_TO_MAKE
16771 do
16772         test ! -d $cf_dir && mkdir $cf_dir
16773 done
16774
16775 cat >>confdefs.h <<EOF
16776 #define NCURSES_PATHSEP '$PATHSEP'
16777 EOF
16778
16779 cat >>confdefs.h <<EOF
16780 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16781 EOF
16782
16783 ### Now that we're done running tests, add the compiler-warnings, if any
16784
16785 cf_fix_cppflags=no
16786 cf_new_cflags=
16787 cf_new_cppflags=
16788 cf_new_extra_cppflags=
16789
16790 for cf_add_cflags in $EXTRA_CFLAGS
16791 do
16792 case $cf_fix_cppflags in
16793 no)
16794         case $cf_add_cflags in #(vi
16795         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16796                 case $cf_add_cflags in
16797                 -D*)
16798                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16799
16800                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16801                         && test -z "${cf_tst_cflags}" \
16802                         && cf_fix_cppflags=yes
16803
16804                         if test $cf_fix_cppflags = yes ; then
16805                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16806                                 continue
16807                         elif test "${cf_tst_cflags}" = "\"'" ; then
16808                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16809                                 continue
16810                         fi
16811                         ;;
16812                 esac
16813                 case "$CPPFLAGS" in
16814                 *$cf_add_cflags) #(vi
16815                         ;;
16816                 *) #(vi
16817                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16818                         ;;
16819                 esac
16820                 ;;
16821         *)
16822                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16823                 ;;
16824         esac
16825         ;;
16826 yes)
16827         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16828
16829         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16830
16831         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16832         && test -z "${cf_tst_cflags}" \
16833         && cf_fix_cppflags=no
16834         ;;
16835 esac
16836 done
16837
16838 if test -n "$cf_new_cflags" ; then
16839
16840         CFLAGS="$CFLAGS $cf_new_cflags"
16841 fi
16842
16843 if test -n "$cf_new_cppflags" ; then
16844
16845         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16846 fi
16847
16848 if test -n "$cf_new_extra_cppflags" ; then
16849
16850         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16851 fi
16852
16853 ### If we're building with rpath, try to link non-standard libs that way too.
16854 if test "$DFT_LWR_MODEL" = "shared"; then
16855
16856 echo "$as_me:16856: checking for updated LDFLAGS" >&5
16857 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16858 if test -n "$LDFLAGS" ; then
16859 echo "$as_me:16859: result: maybe" >&5
16860 echo "${ECHO_T}maybe" >&6
16861 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16862
16863 echo "${as_me-configure}:16863: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16864
16865 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16866
16867 echo "${as_me-configure}:16867: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16868
16869 case "$EXTRA_LDFLAGS" in #(vi
16870 -Wl,-rpath,*) #(vi
16871         cf_rpath_hack="-Wl,-rpath,"
16872         ;;
16873 -R\ *)
16874         cf_rpath_hack="-R "
16875         ;;
16876 -R*)
16877         cf_rpath_hack="-R"
16878         ;;
16879 *)
16880         cf_rpath_hack=
16881         ;;
16882 esac
16883 if test -n "$cf_rpath_hack" ; then
16884         cf_rpath_dst=
16885         for cf_rpath_src in $LDFLAGS
16886         do
16887                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16888
16889 echo "${as_me-configure}:16889: testing Filtering $cf_rpath_src ..." 1>&5
16890
16891                 case $cf_rpath_src in #(vi
16892                 -L*) #(vi
16893                         if test "$cf_rpath_hack" = "-R " ; then
16894                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16895                         else
16896                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16897                         fi
16898                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
16899
16900 echo "${as_me-configure}:16900: testing ...Filter $cf_rpath_tmp ..." 1>&5
16901
16902                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16903                         ;;
16904                 esac
16905                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16906         done
16907         LDFLAGS=$cf_rpath_dst
16908         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16909
16910 echo "${as_me-configure}:16910: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16911
16912         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16913
16914 echo "${as_me-configure}:16914: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16915
16916 fi
16917 else
16918 echo "$as_me:16918: result: no" >&5
16919 echo "${ECHO_T}no" >&6
16920 fi
16921
16922 fi
16923
16924 ### Define substitutions for header files to avoid name-pollution
16925
16926 if test "$cf_cv_have_tcgetattr" = yes ; then
16927         HAVE_TCGETATTR=1
16928 else
16929         HAVE_TCGETATTR=0
16930 fi
16931
16932 if test "$ac_cv_header_termio_h" = yes ; then
16933         HAVE_TERMIO_H=1
16934 else
16935         HAVE_TERMIO_H=0
16936 fi
16937
16938 if test "$ac_cv_header_termios_h" = yes ; then
16939         HAVE_TERMIOS_H=1
16940 else
16941         HAVE_TERMIOS_H=0
16942 fi
16943
16944 ################################################################################
16945 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16946 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16947 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"
16948 ac_config_commands="$ac_config_commands default"
16949 cat >confcache <<\_ACEOF
16950 # This file is a shell script that caches the results of configure
16951 # tests run on this system so they can be shared between configure
16952 # scripts and configure runs, see configure's option --config-cache.
16953 # It is not useful on other systems.  If it contains results you don't
16954 # want to keep, you may remove or edit it.
16955 #
16956 # config.status only pays attention to the cache file if you give it
16957 # the --recheck option to rerun configure.
16958 #
16959 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16960 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16961 # following values.
16962
16963 _ACEOF
16964
16965 # The following way of writing the cache mishandles newlines in values,
16966 # but we know of no workaround that is simple, portable, and efficient.
16967 # So, don't put newlines in cache variables' values.
16968 # Ultrix sh set writes to stderr and can't be redirected directly,
16969 # and sets the high bit in the cache file unless we assign to the vars.
16970 {
16971   (set) 2>&1 |
16972     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16973     *ac_space=\ *)
16974       # `set' does not quote correctly, so add quotes (double-quote
16975       # substitution turns \\\\ into \\, and sed turns \\ into \).
16976       sed -n \
16977         "s/'/'\\\\''/g;
16978           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16979       ;;
16980     *)
16981       # `set' quotes correctly as required by POSIX, so do not add quotes.
16982       sed -n \
16983         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16984       ;;
16985     esac;
16986 } |
16987   sed '
16988      t clear
16989      : clear
16990      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16991      t end
16992      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16993      : end' >>confcache
16994 if cmp -s $cache_file confcache; then :; else
16995   if test -w $cache_file; then
16996     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16997     cat confcache >$cache_file
16998   else
16999     echo "not updating unwritable cache $cache_file"
17000   fi
17001 fi
17002 rm -f confcache
17003
17004 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17005 # Let make expand exec_prefix.
17006 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17007
17008 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17009 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17010 # trailing colons and then remove the whole line if VPATH becomes empty
17011 # (actually we leave an empty line to preserve line numbers).
17012 if test "x$srcdir" = x.; then
17013   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17014 s/:*\$(srcdir):*/:/;
17015 s/:*\${srcdir}:*/:/;
17016 s/:*@srcdir@:*/:/;
17017 s/^\([^=]*=[    ]*\):*/\1/;
17018 s/:*$//;
17019 s/^[^=]*=[      ]*$//;
17020 }'
17021 fi
17022
17023 DEFS=-DHAVE_CONFIG_H
17024
17025 : ${CONFIG_STATUS=./config.status}
17026 ac_clean_files_save=$ac_clean_files
17027 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17028 { echo "$as_me:17028: creating $CONFIG_STATUS" >&5
17029 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17030 cat >$CONFIG_STATUS <<_ACEOF
17031 #! $SHELL
17032 # Generated automatically by configure.
17033 # Run this file to recreate the current configuration.
17034 # Compiler output produced by configure, useful for debugging
17035 # configure, is in config.log if it exists.
17036
17037 debug=false
17038 SHELL=\${CONFIG_SHELL-$SHELL}
17039 ac_cs_invocation="\$0 \$@"
17040
17041 _ACEOF
17042
17043 cat >>$CONFIG_STATUS <<\_ACEOF
17044 # Be Bourne compatible
17045 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17046   emulate sh
17047   NULLCMD=:
17048 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17049   set -o posix
17050 fi
17051
17052 # Name of the executable.
17053 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17054
17055 if expr a : '\(a\)' >/dev/null 2>&1; then
17056   as_expr=expr
17057 else
17058   as_expr=false
17059 fi
17060
17061 rm -f conf$$ conf$$.exe conf$$.file
17062 echo >conf$$.file
17063 if ln -s conf$$.file conf$$ 2>/dev/null; then
17064   # We could just check for DJGPP; but this test a) works b) is more generic
17065   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17066   if test -f conf$$.exe; then
17067     # Don't use ln at all; we don't have any links
17068     as_ln_s='cp -p'
17069   else
17070     as_ln_s='ln -s'
17071   fi
17072 elif ln conf$$.file conf$$ 2>/dev/null; then
17073   as_ln_s=ln
17074 else
17075   as_ln_s='cp -p'
17076 fi
17077 rm -f conf$$ conf$$.exe conf$$.file
17078
17079 as_executable_p="test -f"
17080
17081 # Support unset when possible.
17082 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17083   as_unset=unset
17084 else
17085   as_unset=false
17086 fi
17087
17088 # NLS nuisances.
17089 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17090 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17091 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17092 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17093 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17094 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17095 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17096 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17097
17098 # IFS
17099 # We need space, tab and new line, in precisely that order.
17100 as_nl='
17101 '
17102 IFS="   $as_nl"
17103
17104 # CDPATH.
17105 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17106
17107 exec 6>&1
17108
17109 _ACEOF
17110
17111 # Files that config.status was made for.
17112 if test -n "$ac_config_files"; then
17113   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17114 fi
17115
17116 if test -n "$ac_config_headers"; then
17117   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17118 fi
17119
17120 if test -n "$ac_config_links"; then
17121   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17122 fi
17123
17124 if test -n "$ac_config_commands"; then
17125   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17126 fi
17127
17128 cat >>$CONFIG_STATUS <<\EOF
17129
17130 ac_cs_usage="\
17131 \`$as_me' instantiates files from templates according to the
17132 current configuration.
17133
17134 Usage: $0 [OPTIONS] [FILE]...
17135
17136   -h, --help       print this help, then exit
17137   -V, --version    print version number, then exit
17138   -d, --debug      don't remove temporary files
17139       --recheck    update $as_me by reconfiguring in the same conditions
17140   --file=FILE[:TEMPLATE]
17141                    instantiate the configuration file FILE
17142   --header=FILE[:TEMPLATE]
17143                    instantiate the configuration header FILE
17144
17145 Configuration files:
17146 $config_files
17147
17148 Configuration headers:
17149 $config_headers
17150
17151 Configuration commands:
17152 $config_commands
17153
17154 Report bugs to <bug-autoconf@gnu.org>."
17155 EOF
17156
17157 cat >>$CONFIG_STATUS <<EOF
17158 ac_cs_version="\\
17159 config.status
17160 configured by $0, generated by GNU Autoconf 2.52.20081225,
17161   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17162
17163 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17164 Free Software Foundation, Inc.
17165 This config.status script is free software; the Free Software Foundation
17166 gives unlimited permission to copy, distribute and modify it."
17167 srcdir=$srcdir
17168 INSTALL="$INSTALL"
17169 EOF
17170
17171 cat >>$CONFIG_STATUS <<\EOF
17172 # If no file are specified by the user, then we need to provide default
17173 # value.  By we need to know if files were specified by the user.
17174 ac_need_defaults=:
17175 while test $# != 0
17176 do
17177   case $1 in
17178   --*=*)
17179     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17180     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17181     shift
17182     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17183     shift
17184     ;;
17185   -*);;
17186   *) # This is not an option, so the user has probably given explicit
17187      # arguments.
17188      ac_need_defaults=false;;
17189   esac
17190
17191   case $1 in
17192   # Handling of the options.
17193 EOF
17194 cat >>$CONFIG_STATUS <<EOF
17195   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17196     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17197     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17198 EOF
17199 cat >>$CONFIG_STATUS <<\EOF
17200   --version | --vers* | -V )
17201     echo "$ac_cs_version"; exit 0 ;;
17202   --he | --h)
17203     # Conflict between --help and --header
17204     { { echo "$as_me:17204: error: ambiguous option: $1
17205 Try \`$0 --help' for more information." >&5
17206 echo "$as_me: error: ambiguous option: $1
17207 Try \`$0 --help' for more information." >&2;}
17208    { (exit 1); exit 1; }; };;
17209   --help | --hel | -h )
17210     echo "$ac_cs_usage"; exit 0 ;;
17211   --debug | --d* | -d )
17212     debug=: ;;
17213   --file | --fil | --fi | --f )
17214     shift
17215     CONFIG_FILES="$CONFIG_FILES $1"
17216     ac_need_defaults=false;;
17217   --header | --heade | --head | --hea )
17218     shift
17219     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17220     ac_need_defaults=false;;
17221
17222   # This is an error.
17223   -*) { { echo "$as_me:17223: error: unrecognized option: $1
17224 Try \`$0 --help' for more information." >&5
17225 echo "$as_me: error: unrecognized option: $1
17226 Try \`$0 --help' for more information." >&2;}
17227    { (exit 1); exit 1; }; } ;;
17228
17229   *) ac_config_targets="$ac_config_targets $1" ;;
17230
17231   esac
17232   shift
17233 done
17234
17235 exec 5>>config.log
17236 cat >&5 << _ACEOF
17237
17238 ## ----------------------- ##
17239 ## Running config.status.  ##
17240 ## ----------------------- ##
17241
17242 This file was extended by $as_me 2.52.20081225, executed with
17243   CONFIG_FILES    = $CONFIG_FILES
17244   CONFIG_HEADERS  = $CONFIG_HEADERS
17245   CONFIG_LINKS    = $CONFIG_LINKS
17246   CONFIG_COMMANDS = $CONFIG_COMMANDS
17247   > $ac_cs_invocation
17248 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17249
17250 _ACEOF
17251 EOF
17252
17253 cat >>$CONFIG_STATUS <<EOF
17254 #
17255 # INIT-COMMANDS section.
17256 #
17257
17258 ### Special initialization commands, used to pass information from the
17259 ### configuration-run into config.status
17260
17261 AWK="$AWK"
17262 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17263 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17264 ECHO_LINK="$ECHO_LINK"
17265 LDCONFIG="$LDCONFIG"
17266 LIB_NAME="$LIB_NAME"
17267 LIB_SUBSETS="$LIB_SUBSETS"
17268 LIB_SUFFIX="$LIB_SUFFIX"
17269 LIB_TRACING="$LIB_TRACING"
17270 MAKE_TERMINFO="$MAKE_TERMINFO"
17271 NCURSES_MAJOR="$NCURSES_MAJOR"
17272 NCURSES_MINOR="$NCURSES_MINOR"
17273 NCURSES_OSPEED="$NCURSES_OSPEED"
17274 NCURSES_PATCH="$NCURSES_PATCH"
17275 SRC_SUBDIRS="$SRC_SUBDIRS"
17276 TERMINFO="$TERMINFO"
17277 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17278 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17279 TINFO_NAME="$TINFO_NAME"
17280 TINFO_SUFFIX="$TINFO_SUFFIX"
17281 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17282 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17283 TICS_NAME="$TICS_NAME"
17284 WITH_CURSES_H="$with_curses_h"
17285 WITH_ECHO="$with_echo"
17286 WITH_OVERWRITE="$with_overwrite"
17287 cf_LIST_MODELS="$cf_list_models"
17288 cf_cv_abi_version="$cf_cv_abi_version"
17289 cf_cv_do_relink="$cf_cv_do_relink"
17290 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17291 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17292 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17293 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17294 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17295 cf_cv_rel_version="$cf_cv_rel_version"
17296 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17297 cf_cv_shared_soname='$cf_cv_shared_soname'
17298 cf_cv_shlib_version="$cf_cv_shlib_version"
17299 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17300 cf_cv_system_name="$cf_cv_system_name"
17301 cf_with_cxx_binding="$cf_with_cxx_binding"
17302 cf_with_manpages="$cf_with_manpages"
17303 host="$host"
17304 target="$target"
17305
17306 EOF
17307
17308 cat >>$CONFIG_STATUS <<\EOF
17309 for ac_config_target in $ac_config_targets
17310 do
17311   case "$ac_config_target" in
17312   # Handling of arguments.
17313   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17314   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17315   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17316   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17317   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17318   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17319   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17320   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17321   *) { { echo "$as_me:17321: error: invalid argument: $ac_config_target" >&5
17322 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17323    { (exit 1); exit 1; }; };;
17324   esac
17325 done
17326
17327 # If the user did not use the arguments to specify the items to instantiate,
17328 # then the envvar interface is used.  Set only those that are not.
17329 # We use the long form for the default assignment because of an extremely
17330 # bizarre bug on SunOS 4.1.3.
17331 if $ac_need_defaults; then
17332   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17333   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17334   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17335 fi
17336
17337 # Create a temporary directory, and hook for its removal unless debugging.
17338 $debug ||
17339 {
17340   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17341   trap '{ (exit 1); exit 1; }' 1 2 13 15
17342 }
17343
17344 # Create a (secure) tmp directory for tmp files.
17345 : ${TMPDIR=/tmp}
17346 {
17347   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17348   test -n "$tmp" && test -d "$tmp"
17349 }  ||
17350 {
17351   tmp=$TMPDIR/cs$$-$RANDOM
17352   (umask 077 && mkdir $tmp)
17353 } ||
17354 {
17355    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17356    { (exit 1); exit 1; }
17357 }
17358
17359 EOF
17360
17361 cat >>$CONFIG_STATUS <<EOF
17362
17363 #
17364 # CONFIG_FILES section.
17365 #
17366
17367 # No need to generate the scripts if there are no CONFIG_FILES.
17368 # This happens for instance when ./config.status config.h
17369 if test -n "\$CONFIG_FILES"; then
17370   # Protect against being on the right side of a sed subst in config.status.
17371   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17372    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17373 s,@SHELL@,$SHELL,;t t
17374 s,@exec_prefix@,$exec_prefix,;t t
17375 s,@prefix@,$prefix,;t t
17376 s,@program_transform_name@,$program_transform_name,;t t
17377 s,@bindir@,$bindir,;t t
17378 s,@sbindir@,$sbindir,;t t
17379 s,@libexecdir@,$libexecdir,;t t
17380 s,@datadir@,$datadir,;t t
17381 s,@sysconfdir@,$sysconfdir,;t t
17382 s,@sharedstatedir@,$sharedstatedir,;t t
17383 s,@localstatedir@,$localstatedir,;t t
17384 s,@libdir@,$libdir,;t t
17385 s,@includedir@,$includedir,;t t
17386 s,@oldincludedir@,$oldincludedir,;t t
17387 s,@infodir@,$infodir,;t t
17388 s,@mandir@,$mandir,;t t
17389 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17390 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17391 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17392 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17393 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17394 s,@build_alias@,$build_alias,;t t
17395 s,@host_alias@,$host_alias,;t t
17396 s,@target_alias@,$target_alias,;t t
17397 s,@ECHO_C@,$ECHO_C,;t t
17398 s,@ECHO_N@,$ECHO_N,;t t
17399 s,@ECHO_T@,$ECHO_T,;t t
17400 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17401 s,@DEFS@,$DEFS,;t t
17402 s,@LIBS@,$LIBS,;t t
17403 s,@top_builddir@,$top_builddir,;t t
17404 s,@EGREP@,$EGREP,;t t
17405 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17406 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17407 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17408 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17409 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17410 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17411 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17412 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17413 s,@build@,$build,;t t
17414 s,@build_cpu@,$build_cpu,;t t
17415 s,@build_vendor@,$build_vendor,;t t
17416 s,@build_os@,$build_os,;t t
17417 s,@host@,$host,;t t
17418 s,@host_cpu@,$host_cpu,;t t
17419 s,@host_vendor@,$host_vendor,;t t
17420 s,@host_os@,$host_os,;t t
17421 s,@target@,$target,;t t
17422 s,@target_cpu@,$target_cpu,;t t
17423 s,@target_vendor@,$target_vendor,;t t
17424 s,@target_os@,$target_os,;t t
17425 s,@CC@,$CC,;t t
17426 s,@CFLAGS@,$CFLAGS,;t t
17427 s,@LDFLAGS@,$LDFLAGS,;t t
17428 s,@CPPFLAGS@,$CPPFLAGS,;t t
17429 s,@ac_ct_CC@,$ac_ct_CC,;t t
17430 s,@EXEEXT@,$EXEEXT,;t t
17431 s,@OBJEXT@,$OBJEXT,;t t
17432 s,@CPP@,$CPP,;t t
17433 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17434 s,@PROG_EXT@,$PROG_EXT,;t t
17435 s,@LDCONFIG@,$LDCONFIG,;t t
17436 s,@CXX@,$CXX,;t t
17437 s,@CXXFLAGS@,$CXXFLAGS,;t t
17438 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17439 s,@AWK@,$AWK,;t t
17440 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17441 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17442 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17443 s,@LINT@,$LINT,;t t
17444 s,@LINT_OPTS@,$LINT_OPTS,;t t
17445 s,@LN_S@,$LN_S,;t t
17446 s,@SET_MAKE@,$SET_MAKE,;t t
17447 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17448 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17449 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17450 s,@RANLIB@,$RANLIB,;t t
17451 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17452 s,@LD@,$LD,;t t
17453 s,@ac_ct_LD@,$ac_ct_LD,;t t
17454 s,@AR@,$AR,;t t
17455 s,@ac_ct_AR@,$ac_ct_AR,;t t
17456 s,@AR_OPTS@,$AR_OPTS,;t t
17457 s,@DESTDIR@,$DESTDIR,;t t
17458 s,@BUILD_CC@,$BUILD_CC,;t t
17459 s,@BUILD_CPP@,$BUILD_CPP,;t t
17460 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17461 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17462 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17463 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17464 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17465 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17466 s,@cf_list_models@,$cf_list_models,;t t
17467 s,@LIBTOOL@,$LIBTOOL,;t t
17468 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17469 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17470 s,@LIB_CREATE@,$LIB_CREATE,;t t
17471 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17472 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17473 s,@LIB_PREP@,$LIB_PREP,;t t
17474 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17475 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17476 s,@LIB_LINK@,$LIB_LINK,;t t
17477 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17478 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17479 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17480 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17481 s,@TICS_NAME@,$TICS_NAME,;t t
17482 s,@TINFO_NAME@,$TINFO_NAME,;t t
17483 s,@LIB_NAME@,$LIB_NAME,;t t
17484 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17485 s,@CC_G_OPT@,$CC_G_OPT,;t t
17486 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17487 s,@LD_MODEL@,$LD_MODEL,;t t
17488 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17489 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17490 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17491 s,@LINK_PROGS@,$LINK_PROGS,;t t
17492 s,@LINK_TESTS@,$LINK_TESTS,;t t
17493 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17494 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17495 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17496 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17497 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17498 s,@PATHSEP@,$PATHSEP,;t t
17499 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17500 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17501 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17502 s,@TERMINFO@,$TERMINFO,;t t
17503 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17504 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17505 s,@TERMPATH@,$TERMPATH,;t t
17506 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17507 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17508 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17509 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17510 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17511 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17512 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17513 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17514 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17515 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17516 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17517 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17518 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17519 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17520 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17521 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17522 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17523 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17524 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17525 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17526 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17527 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17528 s,@PTHREAD@,$PTHREAD,;t t
17529 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17530 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17531 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17532 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17533 s,@ECHO_LINK@,$ECHO_LINK,;t t
17534 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17535 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17536 s,@ADA_TRACE@,$ADA_TRACE,;t t
17537 s,@MATH_LIB@,$MATH_LIB,;t t
17538 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17539 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17540 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17541 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17542 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17543 s,@TEST_LIBS@,$TEST_LIBS,;t t
17544 s,@CXXCPP@,$CXXCPP,;t t
17545 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17546 s,@CXX_AR@,$CXX_AR,;t t
17547 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17548 s,@CXXLIBS@,$CXXLIBS,;t t
17549 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17550 s,@gnat_exists@,$gnat_exists,;t t
17551 s,@M4_exists@,$M4_exists,;t t
17552 s,@cf_ada_make@,$cf_ada_make,;t t
17553 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17554 s,@cf_ada_package@,$cf_ada_package,;t t
17555 s,@ADAFLAGS@,$ADAFLAGS,;t t
17556 s,@cf_compile_generics@,$cf_compile_generics,;t t
17557 s,@cf_generic_objects@,$cf_generic_objects,;t t
17558 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17559 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17560 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17561 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17562 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17563 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17564 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17565 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17566 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17567 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17568 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17569 s,@TICS_ARGS@,$TICS_ARGS,;t t
17570 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17571 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17572 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17573 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17574 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17575 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17576 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17577 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17578 s,@TICS_LIST@,$TICS_LIST,;t t
17579 s,@TINFO_LIST@,$TINFO_LIST,;t t
17580 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17581 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17582 s,@TEST_ARGS@,$TEST_ARGS,;t t
17583 s,@TEST_DEPS@,$TEST_DEPS,;t t
17584 s,@TEST_ARG2@,$TEST_ARG2,;t t
17585 s,@TEST_DEP2@,$TEST_DEP2,;t t
17586 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17587 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17588 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17589 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17590 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17591 CEOF
17592
17593 EOF
17594
17595   cat >>$CONFIG_STATUS <<\EOF
17596   # Split the substitutions into bite-sized pieces for seds with
17597   # small command number limits, like on Digital OSF/1 and HP-UX.
17598   ac_max_sed_lines=48
17599   ac_sed_frag=1 # Number of current file.
17600   ac_beg=1 # First line for current file.
17601   ac_end=$ac_max_sed_lines # Line after last line for current file.
17602   ac_more_lines=:
17603   ac_sed_cmds=
17604   while $ac_more_lines; do
17605     if test $ac_beg -gt 1; then
17606       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17607     else
17608       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17609     fi
17610     if test ! -s $tmp/subs.frag; then
17611       ac_more_lines=false
17612     else
17613       # The purpose of the label and of the branching condition is to
17614       # speed up the sed processing (if there are no `@' at all, there
17615       # is no need to browse any of the substitutions).
17616       # These are the two extra sed commands mentioned above.
17617       (echo ':t
17618   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17619       if test -z "$ac_sed_cmds"; then
17620         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17621       else
17622         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17623       fi
17624       ac_sed_frag=`expr $ac_sed_frag + 1`
17625       ac_beg=$ac_end
17626       ac_end=`expr $ac_end + $ac_max_sed_lines`
17627     fi
17628   done
17629   if test -z "$ac_sed_cmds"; then
17630     ac_sed_cmds=cat
17631   fi
17632 fi # test -n "$CONFIG_FILES"
17633
17634 EOF
17635 cat >>$CONFIG_STATUS <<\EOF
17636 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17637   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17638   case $ac_file in
17639   - | *:- | *:-:* ) # input from stdin
17640         cat >$tmp/stdin
17641         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17642         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17643   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17644         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17645   * )   ac_file_in=$ac_file.in ;;
17646   esac
17647
17648   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17649   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17650          X"$ac_file" : 'X\(//\)[^/]' \| \
17651          X"$ac_file" : 'X\(//\)$' \| \
17652          X"$ac_file" : 'X\(/\)' \| \
17653          .     : '\(.\)' 2>/dev/null ||
17654 echo X"$ac_file" |
17655     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17656           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17657           /^X\(\/\/\)$/{ s//\1/; q; }
17658           /^X\(\/\).*/{ s//\1/; q; }
17659           s/.*/./; q'`
17660   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17661     { case "$ac_dir" in
17662   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17663   *)                      as_incr_dir=.;;
17664 esac
17665 as_dummy="$ac_dir"
17666 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17667   case $as_mkdir_dir in
17668     # Skip DOS drivespec
17669     ?:) as_incr_dir=$as_mkdir_dir ;;
17670     *)
17671       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17672       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17673     ;;
17674   esac
17675 done; }
17676
17677     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17678     # A "../" for each directory in $ac_dir_suffix.
17679     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17680   else
17681     ac_dir_suffix= ac_dots=
17682   fi
17683
17684   case $srcdir in
17685   .)  ac_srcdir=.
17686       if test -z "$ac_dots"; then
17687          ac_top_srcdir=.
17688       else
17689          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17690       fi ;;
17691   [\\/]* | ?:[\\/]* )
17692       ac_srcdir=$srcdir$ac_dir_suffix;
17693       ac_top_srcdir=$srcdir ;;
17694   *) # Relative path.
17695     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17696     ac_top_srcdir=$ac_dots$srcdir ;;
17697   esac
17698
17699   case $INSTALL in
17700   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17701   *) ac_INSTALL=$ac_dots$INSTALL ;;
17702   esac
17703
17704   if test x"$ac_file" != x-; then
17705     { echo "$as_me:17705: creating $ac_file" >&5
17706 echo "$as_me: creating $ac_file" >&6;}
17707     rm -f "$ac_file"
17708   fi
17709   # Let's still pretend it is `configure' which instantiates (i.e., don't
17710   # use $as_me), people would be surprised to read:
17711   #    /* config.h.  Generated automatically by config.status.  */
17712   configure_input="Generated automatically from `echo $ac_file_in |
17713                                                  sed 's,.*/,,'` by configure."
17714
17715   # First look for the input files in the build tree, otherwise in the
17716   # src tree.
17717   ac_file_inputs=`IFS=:
17718     for f in $ac_file_in; do
17719       case $f in
17720       -) echo $tmp/stdin ;;
17721       [\\/$]*)
17722          # Absolute (can't be DOS-style, as IFS=:)
17723          test -f "$f" || { { echo "$as_me:17723: error: cannot find input file: $f" >&5
17724 echo "$as_me: error: cannot find input file: $f" >&2;}
17725    { (exit 1); exit 1; }; }
17726          echo $f;;
17727       *) # Relative
17728          if test -f "$f"; then
17729            # Build tree
17730            echo $f
17731          elif test -f "$srcdir/$f"; then
17732            # Source tree
17733            echo $srcdir/$f
17734          else
17735            # /dev/null tree
17736            { { echo "$as_me:17736: error: cannot find input file: $f" >&5
17737 echo "$as_me: error: cannot find input file: $f" >&2;}
17738    { (exit 1); exit 1; }; }
17739          fi;;
17740       esac
17741     done` || { (exit 1); exit 1; }
17742 EOF
17743 cat >>$CONFIG_STATUS <<EOF
17744   sed "$ac_vpsub
17745 $extrasub
17746 EOF
17747 cat >>$CONFIG_STATUS <<\EOF
17748 :t
17749 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17750 s,@configure_input@,$configure_input,;t t
17751 s,@srcdir@,$ac_srcdir,;t t
17752 s,@top_srcdir@,$ac_top_srcdir,;t t
17753 s,@INSTALL@,$ac_INSTALL,;t t
17754 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17755   rm -f $tmp/stdin
17756   if test x"$ac_file" != x-; then
17757     mv $tmp/out $ac_file
17758   else
17759     cat $tmp/out
17760     rm -f $tmp/out
17761   fi
17762
17763 done
17764 EOF
17765 cat >>$CONFIG_STATUS <<\EOF
17766
17767 #
17768 # CONFIG_HEADER section.
17769 #
17770
17771 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17772 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17773 #
17774 # ac_d sets the value in "#define NAME VALUE" lines.
17775 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17776 ac_dB='[        ].*$,\1#\2'
17777 ac_dC=' '
17778 ac_dD=',;t'
17779 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17780 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17781 ac_iB='\([      ]\),\1#\2define\3'
17782 ac_iC=' '
17783 ac_iD='\4,;t'
17784 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17785 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17786 ac_uB='$,\1#\2define\3'
17787 ac_uC=' '
17788 ac_uD=',;t'
17789
17790 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17791   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17792   case $ac_file in
17793   - | *:- | *:-:* ) # input from stdin
17794         cat >$tmp/stdin
17795         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17796         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17797   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17798         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17799   * )   ac_file_in=$ac_file.in ;;
17800   esac
17801
17802   test x"$ac_file" != x- && { echo "$as_me:17802: creating $ac_file" >&5
17803 echo "$as_me: creating $ac_file" >&6;}
17804
17805   # First look for the input files in the build tree, otherwise in the
17806   # src tree.
17807   ac_file_inputs=`IFS=:
17808     for f in $ac_file_in; do
17809       case $f in
17810       -) echo $tmp/stdin ;;
17811       [\\/$]*)
17812          # Absolute (can't be DOS-style, as IFS=:)
17813          test -f "$f" || { { echo "$as_me:17813: error: cannot find input file: $f" >&5
17814 echo "$as_me: error: cannot find input file: $f" >&2;}
17815    { (exit 1); exit 1; }; }
17816          echo $f;;
17817       *) # Relative
17818          if test -f "$f"; then
17819            # Build tree
17820            echo $f
17821          elif test -f "$srcdir/$f"; then
17822            # Source tree
17823            echo $srcdir/$f
17824          else
17825            # /dev/null tree
17826            { { echo "$as_me:17826: error: cannot find input file: $f" >&5
17827 echo "$as_me: error: cannot find input file: $f" >&2;}
17828    { (exit 1); exit 1; }; }
17829          fi;;
17830       esac
17831     done` || { (exit 1); exit 1; }
17832   # Remove the trailing spaces.
17833   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17834
17835 EOF
17836
17837 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17838 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17839 # be either 'cat' or 'sort'.
17840 cat confdefs.h | uniq >conftest.vals
17841
17842 # Break up conftest.vals because some shells have a limit on
17843 # the size of here documents, and old seds have small limits too.
17844
17845 rm -f conftest.tail
17846 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17847 while grep . conftest.vals >/dev/null
17848 do
17849   # Write chunks of a limited-size here document to conftest.frag.
17850   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17851   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17852   echo 'CEOF' >> $CONFIG_STATUS
17853   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17854   rm -f conftest.vals
17855   mv conftest.tail conftest.vals
17856 done
17857 rm -f conftest.vals
17858
17859 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17860 # marker @DEFS@.
17861 echo '  cat >> conftest.edit <<CEOF
17862 /@DEFS@/r conftest.frag
17863 /@DEFS@/d
17864 CEOF
17865 sed -f conftest.edit $tmp/in > $tmp/out
17866 rm -f $tmp/in
17867 mv $tmp/out $tmp/in
17868 rm -f conftest.edit conftest.frag
17869 ' >> $CONFIG_STATUS
17870
17871 cat >>$CONFIG_STATUS <<\EOF
17872   # Let's still pretend it is `configure' which instantiates (i.e., don't
17873   # use $as_me), people would be surprised to read:
17874   #    /* config.h.  Generated automatically by config.status.  */
17875   if test x"$ac_file" = x-; then
17876     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17877   else
17878     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17879   fi
17880   cat $tmp/in >>$tmp/config.h
17881   rm -f $tmp/in
17882   if test x"$ac_file" != x-; then
17883     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17884       { echo "$as_me:17884: $ac_file is unchanged" >&5
17885 echo "$as_me: $ac_file is unchanged" >&6;}
17886     else
17887       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17888          X"$ac_file" : 'X\(//\)[^/]' \| \
17889          X"$ac_file" : 'X\(//\)$' \| \
17890          X"$ac_file" : 'X\(/\)' \| \
17891          .     : '\(.\)' 2>/dev/null ||
17892 echo X"$ac_file" |
17893     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17894           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17895           /^X\(\/\/\)$/{ s//\1/; q; }
17896           /^X\(\/\).*/{ s//\1/; q; }
17897           s/.*/./; q'`
17898       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17899         { case "$ac_dir" in
17900   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17901   *)                      as_incr_dir=.;;
17902 esac
17903 as_dummy="$ac_dir"
17904 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17905   case $as_mkdir_dir in
17906     # Skip DOS drivespec
17907     ?:) as_incr_dir=$as_mkdir_dir ;;
17908     *)
17909       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17910       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17911     ;;
17912   esac
17913 done; }
17914
17915       fi
17916       rm -f $ac_file
17917       mv $tmp/config.h $ac_file
17918     fi
17919   else
17920     cat $tmp/config.h
17921     rm -f $tmp/config.h
17922   fi
17923 done
17924 EOF
17925 cat >>$CONFIG_STATUS <<\EOF
17926
17927 #
17928 # CONFIG_COMMANDS section.
17929 #
17930 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17931   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17932   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17933
17934   case $ac_dest in
17935     default )
17936
17937 for cf_dir in test
17938 do
17939         if test ! -d $srcdir/$cf_dir; then
17940                 continue
17941         elif test -f $srcdir/$cf_dir/programs; then
17942                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17943         fi
17944 done
17945
17946         case $cf_cv_system_name in #(vi
17947         OS/2*|os2*) #(vi
17948         LIB_PREFIX=''
17949         ;;
17950         *)      LIB_PREFIX='lib'
17951         ;;
17952         esac
17953 cf_prefix=$LIB_PREFIX
17954
17955 if test $cf_cv_shlib_version = cygdll ; then
17956         TINFO_NAME=$TINFO_ARG_SUFFIX
17957         TINFO_SUFFIX=.dll
17958 fi
17959
17960 for cf_dir in $SRC_SUBDIRS
17961 do
17962         if test ! -d $srcdir/$cf_dir ; then
17963                 continue
17964         elif test -f $srcdir/$cf_dir/modules; then
17965
17966                 SHARED_LIB=
17967                 LIBS_TO_MAKE=
17968                 for cf_item in $cf_LIST_MODELS
17969                 do
17970
17971         case $cf_item in #(vi
17972         libtool) #(vi
17973                 cf_suffix='.la'
17974                 cf_depsuf=$cf_suffix
17975                 ;;
17976         normal) #(vi
17977                 cf_suffix='.a'
17978                 cf_depsuf=$cf_suffix
17979                 ;;
17980         debug) #(vi
17981                 cf_suffix='_g.a'
17982                 cf_depsuf=$cf_suffix
17983                 ;;
17984         profile) #(vi
17985                 cf_suffix='_p.a'
17986                 cf_depsuf=$cf_suffix
17987                 ;;
17988         shared) #(vi
17989                 case $cf_cv_system_name in
17990                 aix[56]*) #(vi
17991                         cf_suffix='.a'
17992                         cf_depsuf=$cf_suffix
17993                         ;;
17994                 cygwin*) #(vi
17995                         cf_suffix='.dll'
17996                         cf_depsuf='.dll.a'
17997                         ;;
17998                 darwin*) #(vi
17999                         cf_suffix='.dylib'
18000                         cf_depsuf=$cf_suffix
18001                         ;;
18002                 hpux*) #(vi
18003                         case $target in
18004                         ia64*) #(vi
18005                                 cf_suffix='.so'
18006                                 cf_depsuf=$cf_suffix
18007                                 ;;
18008                         *) #(vi
18009                                 cf_suffix='.sl'
18010                                 cf_depsuf=$cf_suffix
18011                                 ;;
18012                         esac
18013                         ;;
18014                 *)      cf_suffix='.so'
18015                         cf_depsuf=$cf_suffix
18016                         ;;
18017                 esac
18018         esac
18019         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18020         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18021
18022                         if test $cf_item = shared ; then
18023                         if test "$cf_cv_do_symlinks" = yes ; then
18024                                 case "$cf_cv_shlib_version" in #(vi
18025                                 rel) #(vi
18026                                         case "$cf_cv_system_name" in #(vi
18027                                         darwin*)
18028                                         case .${LIB_SUFFIX} in
18029                                         .w*)
18030                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18031                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18032                                                 ;;
18033                                         *)
18034                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18035                                                 ;;
18036                                         esac
18037                                         ;; #(vi
18038                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18039                                         esac
18040                                         ;;
18041                                 abi)
18042                                         case "$cf_cv_system_name" in #(vi
18043                                         darwin*)
18044                                         case .${LIB_SUFFIX} in
18045                                         .w*)
18046                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18047                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18048                                                 ;;
18049                                         *)
18050                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18051                                                 ;;
18052                                         esac
18053                                         ;; #(vi
18054                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18055                                         esac
18056                                         ;;
18057                                 esac
18058                         fi
18059                         # cygwin needs import library, and has unique naming convention
18060                         # use autodetected ${cf_prefix} for import lib and static lib, but
18061                         # use 'cyg' prefix for shared lib.
18062                         if test $cf_cv_shlib_version = cygdll ; then
18063                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18064                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18065                                 continue
18066                         fi
18067                         fi
18068                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18069                 done
18070
18071                 if test $cf_dir = ncurses ; then
18072                         cf_subsets="$LIB_SUBSETS"
18073                         cf_r_parts="$cf_subsets"
18074                         cf_liblist="$LIBS_TO_MAKE"
18075
18076                         while test -n "$cf_r_parts"
18077                         do
18078                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18079                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18080                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18081                                         cf_item=
18082                                         case $cf_l_parts in #(vi
18083                                         *termlib*) #(vi
18084                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18085                                                 ;;
18086                                         *ticlib*)
18087                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18088                                                 ;;
18089                                         *)
18090                                                 break
18091                                                 ;;
18092                                         esac
18093                                         if test -n "$cf_item"; then
18094                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18095                                         fi
18096                                 else
18097                                         break
18098                                 fi
18099                         done
18100                 else
18101                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18102                 fi
18103
18104                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18105                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18106                         $cf_dir/Makefile >$cf_dir/Makefile.out
18107                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18108
18109                 $AWK -f $srcdir/mk-0th.awk \
18110                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18111                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18112
18113                 for cf_subset in $cf_subsets
18114                 do
18115                         cf_subdirs=
18116                         for cf_item in $cf_LIST_MODELS
18117                         do
18118                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18119
18120 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18121
18122         case $cf_item in #(vi
18123         libtool) #(vi
18124                 cf_suffix='.la'
18125                 cf_depsuf=$cf_suffix
18126                 ;;
18127         normal) #(vi
18128                 cf_suffix='.a'
18129                 cf_depsuf=$cf_suffix
18130                 ;;
18131         debug) #(vi
18132                 cf_suffix='_g.a'
18133                 cf_depsuf=$cf_suffix
18134                 ;;
18135         profile) #(vi
18136                 cf_suffix='_p.a'
18137                 cf_depsuf=$cf_suffix
18138                 ;;
18139         shared) #(vi
18140                 case $cf_cv_system_name in
18141                 aix[56]*) #(vi
18142                         cf_suffix='.a'
18143                         cf_depsuf=$cf_suffix
18144                         ;;
18145                 cygwin*) #(vi
18146                         cf_suffix='.dll'
18147                         cf_depsuf='.dll.a'
18148                         ;;
18149                 darwin*) #(vi
18150                         cf_suffix='.dylib'
18151                         cf_depsuf=$cf_suffix
18152                         ;;
18153                 hpux*) #(vi
18154                         case $target in
18155                         ia64*) #(vi
18156                                 cf_suffix='.so'
18157                                 cf_depsuf=$cf_suffix
18158                                 ;;
18159                         *) #(vi
18160                                 cf_suffix='.sl'
18161                                 cf_depsuf=$cf_suffix
18162                                 ;;
18163                         esac
18164                         ;;
18165                 *)      cf_suffix='.so'
18166                         cf_depsuf=$cf_suffix
18167                         ;;
18168                 esac
18169         esac
18170         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18171         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18172
18173         case $cf_item in
18174         libtool) cf_subdir='obj_lo'  ;;
18175         normal)  cf_subdir='objects' ;;
18176         debug)   cf_subdir='obj_g' ;;
18177         profile) cf_subdir='obj_p' ;;
18178         shared)
18179                 case $cf_cv_system_name in #(vi
18180                 cygwin) #(vi
18181                         cf_subdir='objects' ;;
18182                 *)
18183                         cf_subdir='obj_s' ;;
18184                 esac
18185         esac
18186
18187                         # Test for case where we build libtinfo with a different name.
18188                         cf_libname=$cf_dir
18189                         if test $cf_dir = ncurses ; then
18190                                 case $cf_subset in
18191                                 *base*)
18192                                         cf_libname=${cf_libname}$LIB_SUFFIX
18193                                         ;;
18194                                 *termlib*)
18195                                         cf_libname=$TINFO_LIB_SUFFIX
18196                                         ;;
18197                                 ticlib*)
18198                                         cf_libname=$TICS_LIB_SUFFIX
18199                                         ;;
18200                                 esac
18201                         else
18202                                 cf_libname=${cf_libname}$LIB_SUFFIX
18203                         fi
18204                         if test -n "${DFT_ARG_SUFFIX}" ; then
18205                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18206                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18207                         fi
18208
18209                         # These dependencies really are for development, not
18210                         # builds, but they are useful in porting, too.
18211                         cf_depend="../include/ncurses_cfg.h"
18212                         if test "$srcdir" = "."; then
18213                                 cf_reldir="."
18214                         else
18215                                 cf_reldir="\${srcdir}"
18216                         fi
18217
18218                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18219                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18220                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18221                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18222                         fi
18223
18224                         cf_dir_suffix=
18225                         old_cf_suffix="$cf_suffix"
18226                         if test "$cf_cv_shlib_version_infix" = yes ; then
18227                         if test -n "$LIB_SUFFIX" ; then
18228                                 case $LIB_SUFFIX in
18229                                 w*)
18230                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18231                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18232                                         cf_dir_suffix=w
18233                                         ;;
18234                                 esac
18235                         fi
18236                         fi
18237
18238                         $AWK -f $srcdir/mk-1st.awk \
18239                                 name=${cf_libname}${cf_dir_suffix} \
18240                                 traces=$LIB_TRACING \
18241                                 MODEL=$cf_ITEM \
18242                                 model=$cf_subdir \
18243                                 prefix=$cf_prefix \
18244                                 suffix=$cf_suffix \
18245                                 subset=$cf_subset \
18246                                 TermlibRoot=$TINFO_NAME \
18247                                 TermlibSuffix=$TINFO_SUFFIX \
18248                                 ShlibVer=$cf_cv_shlib_version \
18249                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18250                                 ReLink=${cf_cv_do_relink-no} \
18251                                 DoLinks=$cf_cv_do_symlinks \
18252                                 rmSoLocs=$cf_cv_rm_so_locs \
18253                                 ldconfig="$LDCONFIG" \
18254                                 overwrite=$WITH_OVERWRITE \
18255                                 depend="$cf_depend" \
18256                                 host="$host" \
18257                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18258
18259                         cf_suffix="$old_cf_suffix"
18260
18261                         for cf_subdir2 in $cf_subdirs lib
18262                         do
18263                                 test $cf_subdir = $cf_subdir2 && break
18264                         done
18265                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18266                         $AWK -f $srcdir/mk-2nd.awk \
18267                                 name=$cf_dir \
18268                                 traces=$LIB_TRACING \
18269                                 MODEL=$cf_ITEM \
18270                                 model=$cf_subdir \
18271                                 subset=$cf_subset \
18272                                 srcdir=$srcdir \
18273                                 echo=$WITH_ECHO \
18274                                 crenames=$cf_cv_prog_CC_c_o \
18275                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18276                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18277                         cf_subdirs="$cf_subdirs $cf_subdir"
18278                         done
18279                 done
18280         fi
18281
18282         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18283 done
18284
18285 for cf_dir in $SRC_SUBDIRS
18286 do
18287         if test ! -d $srcdir/$cf_dir ; then
18288                 continue
18289         fi
18290
18291         if test -f $cf_dir/Makefile ; then
18292                 case "$cf_dir" in
18293                 Ada95) #(vi
18294                         echo 'libs \' >> Makefile
18295                         echo 'install.libs \' >> Makefile
18296                         echo 'uninstall.libs ::' >> Makefile
18297                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18298                         ;;
18299                 esac
18300         fi
18301
18302         if test -f $srcdir/$cf_dir/modules; then
18303                 echo >> Makefile
18304                 if test -f $srcdir/$cf_dir/headers; then
18305 cat >> Makefile <<CF_EOF
18306 install.includes \\
18307 uninstall.includes \\
18308 CF_EOF
18309                 fi
18310 if test "$cf_dir" != "c++" ; then
18311 echo 'lint \' >> Makefile
18312 fi
18313 cat >> Makefile <<CF_EOF
18314 libs \\
18315 lintlib \\
18316 install.libs \\
18317 uninstall.libs \\
18318 install.$cf_dir \\
18319 uninstall.$cf_dir ::
18320         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18321 CF_EOF
18322         elif test -f $srcdir/$cf_dir/headers; then
18323 cat >> Makefile <<CF_EOF
18324
18325 libs \\
18326 install.libs \\
18327 uninstall.libs \\
18328 install.includes \\
18329 uninstall.includes ::
18330         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18331 CF_EOF
18332 fi
18333 done
18334
18335 cat >> Makefile <<CF_EOF
18336
18337 install.libs uninstall.libs \\
18338 install.data uninstall.data ::
18339 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18340 CF_EOF
18341
18342 if test "x$cf_with_manpages" = xyes; then
18343 cat >> Makefile <<CF_EOF
18344
18345 install.man \\
18346 uninstall.man ::
18347         cd man && \${MAKE} \${CF_MFLAGS} \$@
18348 CF_EOF
18349 fi
18350
18351 cat >> Makefile <<CF_EOF
18352
18353 distclean ::
18354         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18355         rm -f headers.sh headers.sed mk_shared_lib.sh
18356         rm -f edit_man.* man_alias.*
18357         rm -rf \${DIRS_TO_MAKE}
18358 CF_EOF
18359
18360 # Special case: tack's manpage lives in its own directory.
18361 if test "x$cf_with_manpages" = xyes; then
18362 if test -d tack ; then
18363 if test -f $srcdir/$tack.h; then
18364 cat >> Makefile <<CF_EOF
18365
18366 install.man \\
18367 uninstall.man ::
18368         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18369 CF_EOF
18370 fi
18371 fi
18372 fi
18373
18374 rm -f headers.sed headers.sh
18375
18376 echo creating headers.sh
18377 cat >headers.sh <<CF_EOF
18378 #! /bin/sh
18379 # This shell script is generated by the 'configure' script.  It is invoked in a
18380 # subdirectory of the build tree.  It generates a sed-script in the parent
18381 # directory that is used to adjust includes for header files that reside in a
18382 # subdirectory of /usr/include, etc.
18383 PRG=""
18384 while test \$# != 3
18385 do
18386 PRG="\$PRG \$1"; shift
18387 done
18388 DST=\$1
18389 REF=\$2
18390 SRC=\$3
18391 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18392 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18393 echo installing \$SRC in \$DST
18394 CF_EOF
18395
18396 if test $WITH_CURSES_H = yes; then
18397         cat >>headers.sh <<CF_EOF
18398 case \$DST in
18399 /*/include/*)
18400         END=\`basename \$DST\`
18401         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18402         do
18403                 NAME=\`basename \$i\`
18404                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18405         done
18406         ;;
18407 *)
18408         echo "" >> \$TMPSED
18409         ;;
18410 esac
18411 CF_EOF
18412
18413 else
18414         cat >>headers.sh <<CF_EOF
18415 case \$DST in
18416 /*/include/*)
18417         END=\`basename \$DST\`
18418         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18419         do
18420                 NAME=\`basename \$i\`
18421                 if test "\$NAME" = "curses.h"
18422                 then
18423                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18424                         NAME=ncurses.h
18425                 fi
18426                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18427         done
18428         ;;
18429 *)
18430         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18431         ;;
18432 esac
18433 CF_EOF
18434 fi
18435 cat >>headers.sh <<CF_EOF
18436 rm -f \$TMPSRC
18437 sed -f \$TMPSED \$SRC > \$TMPSRC
18438 NAME=\`basename \$SRC\`
18439 CF_EOF
18440 if test $WITH_CURSES_H != yes; then
18441         cat >>headers.sh <<CF_EOF
18442 test "\$NAME" = "curses.h" && NAME=ncurses.h
18443 CF_EOF
18444 fi
18445 cat >>headers.sh <<CF_EOF
18446 # Just in case someone gzip'd manpages, remove the conflicting copy.
18447 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18448
18449 eval \$PRG \$TMPSRC \$DST/\$NAME
18450 rm -f \$TMPSRC \$TMPSED
18451 CF_EOF
18452
18453 chmod 0755 headers.sh
18454
18455 for cf_dir in $SRC_SUBDIRS
18456 do
18457         if test ! -d $srcdir/$cf_dir ; then
18458                 continue
18459         fi
18460
18461         if test -f $srcdir/$cf_dir/headers; then
18462                 $AWK -f $srcdir/mk-hdr.awk \
18463                         subset="$LIB_SUBSETS" \
18464                         compat="$WITH_CURSES_H" \
18465                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18466         fi
18467
18468         if test -f $srcdir/$cf_dir/modules; then
18469                 if test "$cf_dir" != "c++" ; then
18470                         cat >>$cf_dir/Makefile <<"CF_EOF"
18471 depend : ${AUTO_SRC}
18472         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18473
18474 # DO NOT DELETE THIS LINE -- make depend depends on it.
18475 CF_EOF
18476                 fi
18477         fi
18478 done
18479
18480  ;;
18481   esac
18482 done
18483 EOF
18484
18485 cat >>$CONFIG_STATUS <<\EOF
18486
18487 { (exit 0); exit 0; }
18488 EOF
18489 chmod +x $CONFIG_STATUS
18490 ac_clean_files=$ac_clean_files_save
18491
18492 # configure is writing to config.log, and then calls config.status.
18493 # config.status does its own redirection, appending to config.log.
18494 # Unfortunately, on DOS this fails, as config.log is still kept open
18495 # by configure, so config.status won't be able to write to it; its
18496 # output is simply discarded.  So we exec the FD to /dev/null,
18497 # effectively closing config.log, so it can be properly (re)opened and
18498 # appended to by config.status.  When coming back to configure, we
18499 # need to make the FD available again.
18500 if test "$no_create" != yes; then
18501   ac_cs_success=:
18502   exec 5>/dev/null
18503   $SHELL $CONFIG_STATUS || ac_cs_success=false
18504   exec 5>>config.log
18505   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18506   # would make configure fail if this is the last instruction.
18507   $ac_cs_success || { (exit 1); exit 1; }
18508 fi
18509 ${MAKE-make} preinstall