]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
092355971f9a206b71b68d8b9e961374a8dc91a8
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.456 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-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.20080325.  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 | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
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 | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
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 | *.pdb ) ;;
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         beos*)
5017                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5018                 ;;
5019         cygwin*)
5020                 CC_SHARED_OPTS=
5021                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5022                 cf_cv_shlib_version=cygdll
5023                 cf_cv_shlib_version_infix=cygdll
5024                 cat >mk_shared_lib.sh <<-CF_EOF
5025                 #!/bin/sh
5026                 SHARED_LIB=\$1
5027                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5028                 shift
5029                 cat <<-EOF
5030                 Linking shared library
5031                 ** SHARED_LIB \$SHARED_LIB
5032                 ** IMPORT_LIB \$IMPORT_LIB
5033 EOF
5034                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5035 CF_EOF
5036                 chmod +x mk_shared_lib.sh
5037                 ;;
5038         darwin*)
5039                 EXTRA_CFLAGS="-no-cpp-precomp"
5040                 CC_SHARED_OPTS="-dynamic"
5041                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5042                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5043                 cf_cv_shlib_version_infix=yes
5044                 echo "$as_me:5044: checking if ld -search_paths_first works" >&5
5045 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5046 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5047   echo $ECHO_N "(cached) $ECHO_C" >&6
5048 else
5049
5050                         cf_save_LDFLAGS=$LDFLAGS
5051                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5052                         cat >conftest.$ac_ext <<_ACEOF
5053 #line 5053 "configure"
5054 #include "confdefs.h"
5055
5056 int
5057 main ()
5058 {
5059 int i;
5060   ;
5061   return 0;
5062 }
5063 _ACEOF
5064 rm -f conftest.$ac_objext conftest$ac_exeext
5065 if { (eval echo "$as_me:5065: \"$ac_link\"") >&5
5066   (eval $ac_link) 2>&5
5067   ac_status=$?
5068   echo "$as_me:5068: \$? = $ac_status" >&5
5069   (exit $ac_status); } &&
5070          { ac_try='test -s conftest$ac_exeext'
5071   { (eval echo "$as_me:5071: \"$ac_try\"") >&5
5072   (eval $ac_try) 2>&5
5073   ac_status=$?
5074   echo "$as_me:5074: \$? = $ac_status" >&5
5075   (exit $ac_status); }; }; then
5076   cf_cv_ldflags_search_paths_first=yes
5077 else
5078   echo "$as_me: failed program was:" >&5
5079 cat conftest.$ac_ext >&5
5080 cf_cv_ldflags_search_paths_first=no
5081 fi
5082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5083                                 LDFLAGS=$cf_save_LDFLAGS
5084 fi
5085 echo "$as_me:5085: result: $cf_cv_ldflags_search_paths_first" >&5
5086 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5087                 if test $cf_cv_ldflags_search_paths_first = yes; then
5088                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5089                 fi
5090                 ;;
5091         hpux*)
5092                 # (tested with gcc 2.7.2 -- I don't have c89)
5093                 if test "$GCC" = yes; then
5094                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5095                 else
5096                         CC_SHARED_OPTS='+Z'
5097                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5098                 fi
5099                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5100                 # HP-UX shared libraries must be executable, and should be
5101                 # readonly to exploit a quirk in the memory manager.
5102                 INSTALL_LIB="-m 555"
5103                 ;;
5104         irix*)
5105                 if test "$cf_cv_ld_rpath" = yes ; then
5106                         if test "$GCC" = yes; then
5107                                 cf_ld_rpath_opt="-Wl,-rpath,"
5108                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5109                         else
5110                                 cf_ld_rpath_opt="-rpath "
5111                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5112                         fi
5113                 fi
5114                 # tested with IRIX 5.2 and 'cc'.
5115                 if test "$GCC" != yes; then
5116                         CC_SHARED_OPTS='-KPIC'
5117                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5118                 else
5119                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5120                 fi
5121                 cf_cv_rm_so_locs=yes
5122                 ;;
5123         linux*|gnu*|k*bsd*-gnu)
5124                 if test "$DFT_LWR_MODEL" = "shared" ; then
5125                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5126                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5127                 fi
5128                 if test "$cf_cv_ld_rpath" = yes ; then
5129                         cf_ld_rpath_opt="-Wl,-rpath,"
5130                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5131                 fi
5132
5133         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5134         if test "$cf_cv_shlib_version" = rel; then
5135                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5136         else
5137                 cf_cv_shared_soname='`basename $@`'
5138         fi
5139
5140                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5141                 ;;
5142         openbsd[2-9].*)
5143                 if test "$DFT_LWR_MODEL" = "shared" ; then
5144                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5145                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5146                 fi
5147                 if test "$cf_cv_ld_rpath" = yes ; then
5148                         cf_ld_rpath_opt="-Wl,-rpath,"
5149                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5150                 fi
5151                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5152
5153         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5154         if test "$cf_cv_shlib_version" = rel; then
5155                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5156         else
5157                 cf_cv_shared_soname='`basename $@`'
5158         fi
5159
5160                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5161                 ;;
5162         nto-qnx*|openbsd*|freebsd[12].*)
5163                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5164                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5165                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5166                 ;;
5167         freebsd*)
5168                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5169                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5170                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5171                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5172                         cf_ld_rpath_opt="-rpath "
5173                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5174                 fi
5175
5176         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5177         if test "$cf_cv_shlib_version" = rel; then
5178                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5179         else
5180                 cf_cv_shared_soname='`basename $@`'
5181         fi
5182
5183                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5184                 ;;
5185         netbsd*)
5186                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5187                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5188                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5189                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5191                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5192                         if test "$cf_cv_shlib_version" = auto; then
5193                         if test -f /usr/libexec/ld.elf_so; then
5194                                 cf_cv_shlib_version=abi
5195                         else
5196                                 cf_cv_shlib_version=rel
5197                         fi
5198                         fi
5199
5200         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5201         if test "$cf_cv_shlib_version" = rel; then
5202                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5203         else
5204                 cf_cv_shared_soname='`basename $@`'
5205         fi
5206
5207                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5208                 else
5209                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5210                 fi
5211                 ;;
5212         osf*|mls+*)
5213                 # tested with OSF/1 V3.2 and 'cc'
5214                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5215                 # link with shared libs).
5216                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5217                 case $host_os in
5218                 osf4*)
5219                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5220                         ;;
5221                 esac
5222                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5223                 if test "$DFT_LWR_MODEL" = "shared" ; then
5224                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5226                 fi
5227                 if test "$cf_cv_ld_rpath" = yes ; then
5228                         cf_ld_rpath_opt="-rpath"
5229                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5230                 fi
5231                 cf_cv_rm_so_locs=yes
5232                 ;;
5233         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5234                 # tested with osr5.0.5
5235                 if test "$GCC" != yes; then
5236                         CC_SHARED_OPTS='-belf -KPIC'
5237                 fi
5238                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5239                 if test "$cf_cv_ld_rpath" = yes ; then
5240                         # only way is to set LD_RUN_PATH but no switch for it
5241                         RUN_PATH=$libdir
5242                 fi
5243                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5244                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5245                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5246                 ;;
5247         sunos4*)
5248                 # tested with SunOS 4.1.1 and gcc 2.7.0
5249                 if test "$GCC" != yes; then
5250                         CC_SHARED_OPTS='-KPIC'
5251                 fi
5252                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5253                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5254                 ;;
5255         solaris2*)
5256                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5257                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5258                 if test "$DFT_LWR_MODEL" = "shared" ; then
5259                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5260                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5261                 fi
5262                 if test "$cf_cv_ld_rpath" = yes ; then
5263                         cf_ld_rpath_opt="-R"
5264                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5265                 fi
5266
5267         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5268         if test "$cf_cv_shlib_version" = rel; then
5269                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5270         else
5271                 cf_cv_shared_soname='`basename $@`'
5272         fi
5273
5274                 if test "$GCC" != yes; then
5275                         CC_SHARED_OPTS='-xcode=pic32'
5276                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5277                 else
5278                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5279                 fi
5280                 ;;
5281         sysv5uw7*|unix_sv*)
5282                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5283                 if test "$GCC" != yes; then
5284                         CC_SHARED_OPTS='-KPIC'
5285                 fi
5286                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5287                 ;;
5288         *)
5289                 CC_SHARED_OPTS='unknown'
5290                 MK_SHARED_LIB='echo unknown'
5291                 ;;
5292         esac
5293
5294         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5295         case "$cf_cv_shlib_version" in #(vi
5296         rel|abi)
5297                 case "$MK_SHARED_LIB" in #(vi
5298                 *'-o $@')
5299                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5300                         ;;
5301                 *)
5302                         { echo "$as_me:5302: WARNING: ignored --with-shlib-version" >&5
5303 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5304                         ;;
5305                 esac
5306                 ;;
5307         esac
5308
5309         if test -n "$cf_ld_rpath_opt" ; then
5310                 echo "$as_me:5310: checking if we need a space after rpath option" >&5
5311 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5312                 cf_save_LIBS="$LIBS"
5313                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5314                 cat >conftest.$ac_ext <<_ACEOF
5315 #line 5315 "configure"
5316 #include "confdefs.h"
5317
5318 int
5319 main ()
5320 {
5321
5322   ;
5323   return 0;
5324 }
5325 _ACEOF
5326 rm -f conftest.$ac_objext conftest$ac_exeext
5327 if { (eval echo "$as_me:5327: \"$ac_link\"") >&5
5328   (eval $ac_link) 2>&5
5329   ac_status=$?
5330   echo "$as_me:5330: \$? = $ac_status" >&5
5331   (exit $ac_status); } &&
5332          { ac_try='test -s conftest$ac_exeext'
5333   { (eval echo "$as_me:5333: \"$ac_try\"") >&5
5334   (eval $ac_try) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); }; }; then
5338   cf_rpath_space=no
5339 else
5340   echo "$as_me: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 cf_rpath_space=yes
5343 fi
5344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5345                 LIBS="$cf_save_LIBS"
5346                 echo "$as_me:5346: result: $cf_rpath_space" >&5
5347 echo "${ECHO_T}$cf_rpath_space" >&6
5348                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5349                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5350         fi
5351
5352 if test "$CC_SHARED_OPTS" = "unknown"; then
5353         for model in $cf_list_models; do
5354                 if test "$model" = "shared"; then
5355                         { { echo "$as_me:5355: error: Shared libraries are not supported in this version" >&5
5356 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5357    { (exit 1); exit 1; }; }
5358                 fi
5359         done
5360 fi
5361
5362 ###############################################################################
5363
5364 ###     use option --disable-overwrite to leave out the link to -lcurses
5365 echo "$as_me:5365: checking if you wish to install ncurses overwriting curses" >&5
5366 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5367
5368 # Check whether --enable-overwrite or --disable-overwrite was given.
5369 if test "${enable_overwrite+set}" = set; then
5370   enableval="$enable_overwrite"
5371   with_overwrite=$enableval
5372 else
5373   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5374 fi;
5375 echo "$as_me:5375: result: $with_overwrite" >&5
5376 echo "${ECHO_T}$with_overwrite" >&6
5377
5378 echo "$as_me:5378: checking if external terminfo-database is used" >&5
5379 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5380
5381 # Check whether --enable-database or --disable-database was given.
5382 if test "${enable_database+set}" = set; then
5383   enableval="$enable_database"
5384   use_database=$enableval
5385 else
5386   use_database=yes
5387 fi;
5388 echo "$as_me:5388: result: $use_database" >&5
5389 echo "${ECHO_T}$use_database" >&6
5390
5391 case $host_os in #(vi
5392 os2*) #(vi
5393         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5394         ;;
5395 *) #(vi
5396         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5397         ;;
5398 esac
5399
5400         case $cf_cv_system_name in
5401         os2*)   PATHSEP=';'  ;;
5402         *)      PATHSEP=':'  ;;
5403         esac
5404
5405 if test "$use_database" != no ; then
5406         cat >>confdefs.h <<\EOF
5407 #define USE_DATABASE 1
5408 EOF
5409
5410         echo "$as_me:5410: checking which terminfo source-file will be installed" >&5
5411 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5412
5413 # Check whether --enable-database or --disable-database was given.
5414 if test "${enable_database+set}" = set; then
5415   enableval="$enable_database"
5416   TERMINFO_SRC=$withval
5417 fi;
5418         echo "$as_me:5418: result: $TERMINFO_SRC" >&5
5419 echo "${ECHO_T}$TERMINFO_SRC" >&6
5420
5421         echo "$as_me:5421: checking whether to use hashed database instead of directory/tree" >&5
5422 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5423
5424 # Check whether --with-hashed-db or --without-hashed-db was given.
5425 if test "${with_hashed_db+set}" = set; then
5426   withval="$with_hashed_db"
5427
5428 else
5429   with_hashed_db=no
5430 fi;
5431         echo "$as_me:5431: result: $with_hashed_db" >&5
5432 echo "${ECHO_T}$with_hashed_db" >&6
5433 else
5434         with_hashed_db=no
5435 fi
5436
5437 echo "$as_me:5437: checking for list of fallback descriptions" >&5
5438 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5439
5440 # Check whether --with-fallbacks or --without-fallbacks was given.
5441 if test "${with_fallbacks+set}" = set; then
5442   withval="$with_fallbacks"
5443   with_fallback=$withval
5444 else
5445   with_fallback=
5446 fi;
5447 echo "$as_me:5447: result: $with_fallback" >&5
5448 echo "${ECHO_T}$with_fallback" >&6
5449 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5450
5451 echo "$as_me:5451: checking if you want modern xterm or antique" >&5
5452 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5453
5454 # Check whether --with-xterm-new or --without-xterm-new was given.
5455 if test "${with_xterm_new+set}" = set; then
5456   withval="$with_xterm_new"
5457   with_xterm_new=$withval
5458 else
5459   with_xterm_new=yes
5460 fi;
5461 case $with_xterm_new in
5462 no)     with_xterm_new=xterm-old;;
5463 *)      with_xterm_new=xterm-new;;
5464 esac
5465 echo "$as_me:5465: result: $with_xterm_new" >&5
5466 echo "${ECHO_T}$with_xterm_new" >&6
5467 WHICH_XTERM=$with_xterm_new
5468
5469 MAKE_TERMINFO=
5470 if test "$use_database" = no ; then
5471         TERMINFO="${datadir}/terminfo"
5472         MAKE_TERMINFO="#"
5473 else
5474
5475 echo "$as_me:5475: checking for list of terminfo directories" >&5
5476 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5477
5478 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5479 if test "${with_terminfo_dirs+set}" = set; then
5480   withval="$with_terminfo_dirs"
5481
5482 else
5483   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5484 fi;
5485 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5486 cf_dst_path=
5487 for cf_src_path in $withval
5488 do
5489
5490 if test "x$prefix" != xNONE; then
5491   cf_path_syntax="$prefix"
5492 else
5493   cf_path_syntax="$ac_default_prefix"
5494 fi
5495
5496 case ".$cf_src_path" in #(vi
5497 .\$\(*\)*|.\'*\'*) #(vi
5498   ;;
5499 ..|./*|.\\*) #(vi
5500   ;;
5501 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5502   ;;
5503 .\${*prefix}*) #(vi
5504   eval cf_src_path="$cf_src_path"
5505   case ".$cf_src_path" in #(vi
5506   .NONE/*)
5507     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5508     ;;
5509   esac
5510   ;; #(vi
5511 .no|.NONE/*)
5512   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5513   ;;
5514 *)
5515   { { echo "$as_me:5515: error: expected a pathname, not \"$cf_src_path\"" >&5
5516 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5517    { (exit 1); exit 1; }; }
5518   ;;
5519 esac
5520
5521   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5522   cf_dst_path="${cf_dst_path}${cf_src_path}"
5523 done
5524 IFS="$ac_save_ifs"
5525
5526 eval 'TERMINFO_DIRS="$cf_dst_path"'
5527
5528 echo "$as_me:5528: result: $TERMINFO_DIRS" >&5
5529 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5530 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5531 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5532 EOF
5533
5534 echo "$as_me:5534: checking for default terminfo directory" >&5
5535 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5536
5537 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5538 if test "${with_default_terminfo_dir+set}" = set; then
5539   withval="$with_default_terminfo_dir"
5540
5541 else
5542   withval="${TERMINFO-${datadir}/terminfo}"
5543 fi; if test -n "${datadir}/terminfo" ; then
5544
5545 if test "x$prefix" != xNONE; then
5546   cf_path_syntax="$prefix"
5547 else
5548   cf_path_syntax="$ac_default_prefix"
5549 fi
5550
5551 case ".$withval" in #(vi
5552 .\$\(*\)*|.\'*\'*) #(vi
5553   ;;
5554 ..|./*|.\\*) #(vi
5555   ;;
5556 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5557   ;;
5558 .\${*prefix}*) #(vi
5559   eval withval="$withval"
5560   case ".$withval" in #(vi
5561   .NONE/*)
5562     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5563     ;;
5564   esac
5565   ;; #(vi
5566 .no|.NONE/*)
5567   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5568   ;;
5569 *)
5570   { { echo "$as_me:5570: error: expected a pathname, not \"$withval\"" >&5
5571 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5572    { (exit 1); exit 1; }; }
5573   ;;
5574 esac
5575
5576 fi
5577 TERMINFO="$withval"
5578
5579 echo "$as_me:5579: result: $TERMINFO" >&5
5580 echo "${ECHO_T}$TERMINFO" >&6
5581 cat >>confdefs.h <<EOF
5582 #define TERMINFO "$TERMINFO"
5583 EOF
5584
5585 fi
5586
5587 ###     use option --disable-big-core to make tic run on small machines
5588 ###     We need 4Mb, check if we can allocate 50% more than that.
5589 echo "$as_me:5589: checking if big-core option selected" >&5
5590 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5591
5592 # Check whether --enable-big-core or --disable-big-core was given.
5593 if test "${enable_big_core+set}" = set; then
5594   enableval="$enable_big_core"
5595   with_big_core=$enableval
5596 else
5597   if test "$cross_compiling" = yes; then
5598   with_big_core=no
5599 else
5600   cat >conftest.$ac_ext <<_ACEOF
5601 #line 5601 "configure"
5602 #include "confdefs.h"
5603
5604 #include <stdlib.h>
5605 #include <string.h>
5606 int main() {
5607         unsigned long n = 6000000L;
5608         char *s = malloc(n);
5609         if (s != 0)
5610                 s[0] = s[n-1] = 0;
5611         ${cf_cv_main_return:-return}(s == 0);
5612 }
5613 _ACEOF
5614 rm -f conftest$ac_exeext
5615 if { (eval echo "$as_me:5615: \"$ac_link\"") >&5
5616   (eval $ac_link) 2>&5
5617   ac_status=$?
5618   echo "$as_me:5618: \$? = $ac_status" >&5
5619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5620   { (eval echo "$as_me:5620: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:5623: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   with_big_core=yes
5626 else
5627   echo "$as_me: program exited with status $ac_status" >&5
5628 echo "$as_me: failed program was:" >&5
5629 cat conftest.$ac_ext >&5
5630 with_big_core=no
5631 fi
5632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5633 fi
5634 fi;
5635 echo "$as_me:5635: result: $with_big_core" >&5
5636 echo "${ECHO_T}$with_big_core" >&6
5637 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5638 #define HAVE_BIG_CORE 1
5639 EOF
5640
5641 ### ISO C only guarantees 512-char strings, we have tables which load faster
5642 ### when constructed using "big" strings.  More than the C compiler, the awk
5643 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5644 echo "$as_me:5644: checking if big-strings option selected" >&5
5645 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5646
5647 # Check whether --enable-big-strings or --disable-big-strings was given.
5648 if test "${enable_big_strings+set}" = set; then
5649   enableval="$enable_big_strings"
5650   with_big_strings=$enableval
5651 else
5652
5653     case x$AWK in #(vi
5654     x)
5655         eval with_big_strings=no
5656         ;;
5657     *) #(vi
5658         if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5659             | $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
5660             eval with_big_strings=yes
5661         else
5662             eval with_big_strings=no
5663         fi
5664         ;;
5665     esac
5666
5667 fi;
5668 echo "$as_me:5668: result: $with_big_strings" >&5
5669 echo "${ECHO_T}$with_big_strings" >&6
5670
5671 USE_BIG_STRINGS=0
5672 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5673
5674 ###     use option --enable-termcap to compile in the termcap fallback support
5675 echo "$as_me:5675: checking if you want termcap-fallback support" >&5
5676 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5677
5678 # Check whether --enable-termcap or --disable-termcap was given.
5679 if test "${enable_termcap+set}" = set; then
5680   enableval="$enable_termcap"
5681   with_termcap=$enableval
5682 else
5683   with_termcap=no
5684 fi;
5685 echo "$as_me:5685: result: $with_termcap" >&5
5686 echo "${ECHO_T}$with_termcap" >&6
5687
5688 if test "$with_termcap" != "yes" ; then
5689         if test "$use_database" = no ; then
5690                 if test -z "$with_fallback" ; then
5691                         { { echo "$as_me:5691: error: You have disabled the database w/o specifying fallbacks" >&5
5692 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5693    { (exit 1); exit 1; }; }
5694                 fi
5695         fi
5696         cat >>confdefs.h <<\EOF
5697 #define PURE_TERMINFO 1
5698 EOF
5699
5700 else
5701
5702 if test "$with_ticlib" != no ; then
5703         { { echo "$as_me:5703: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5704 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5705    { (exit 1); exit 1; }; }
5706 fi
5707
5708 cat >>confdefs.h <<\EOF
5709 #define USE_TERMCAP 1
5710 EOF
5711
5712 echo "$as_me:5712: checking for list of termcap files" >&5
5713 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5714
5715 # Check whether --with-termpath or --without-termpath was given.
5716 if test "${with_termpath+set}" = set; then
5717   withval="$with_termpath"
5718
5719 else
5720   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5721 fi;
5722 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5723 cf_dst_path=
5724 for cf_src_path in $withval
5725 do
5726
5727 if test "x$prefix" != xNONE; then
5728   cf_path_syntax="$prefix"
5729 else
5730   cf_path_syntax="$ac_default_prefix"
5731 fi
5732
5733 case ".$cf_src_path" in #(vi
5734 .\$\(*\)*|.\'*\'*) #(vi
5735   ;;
5736 ..|./*|.\\*) #(vi
5737   ;;
5738 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5739   ;;
5740 .\${*prefix}*) #(vi
5741   eval cf_src_path="$cf_src_path"
5742   case ".$cf_src_path" in #(vi
5743   .NONE/*)
5744     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5745     ;;
5746   esac
5747   ;; #(vi
5748 .no|.NONE/*)
5749   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5750   ;;
5751 *)
5752   { { echo "$as_me:5752: error: expected a pathname, not \"$cf_src_path\"" >&5
5753 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5754    { (exit 1); exit 1; }; }
5755   ;;
5756 esac
5757
5758   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5759   cf_dst_path="${cf_dst_path}${cf_src_path}"
5760 done
5761 IFS="$ac_save_ifs"
5762
5763 eval 'TERMPATH="$cf_dst_path"'
5764
5765 echo "$as_me:5765: result: $TERMPATH" >&5
5766 echo "${ECHO_T}$TERMPATH" >&6
5767 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5768 #define TERMPATH "$TERMPATH"
5769 EOF
5770
5771 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5772 echo "$as_me:5772: checking if fast termcap-loader is needed" >&5
5773 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5774
5775 # Check whether --enable-getcap or --disable-getcap was given.
5776 if test "${enable_getcap+set}" = set; then
5777   enableval="$enable_getcap"
5778   with_getcap=$enableval
5779 else
5780   with_getcap=no
5781 fi;
5782 echo "$as_me:5782: result: $with_getcap" >&5
5783 echo "${ECHO_T}$with_getcap" >&6
5784 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5785 #define USE_GETCAP 1
5786 EOF
5787
5788 echo "$as_me:5788: checking if translated termcaps will be cached in ~/.terminfo" >&5
5789 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5790
5791 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5792 if test "${enable_getcap_cache+set}" = set; then
5793   enableval="$enable_getcap_cache"
5794   with_getcap_cache=$enableval
5795 else
5796   with_getcap_cache=no
5797 fi;
5798 echo "$as_me:5798: result: $with_getcap_cache" >&5
5799 echo "${ECHO_T}$with_getcap_cache" >&6
5800 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5801 #define USE_GETCAP_CACHE 1
5802 EOF
5803
5804 fi
5805
5806 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5807 echo "$as_me:5807: checking if ~/.terminfo is wanted" >&5
5808 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5809
5810 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5811 if test "${enable_home_terminfo+set}" = set; then
5812   enableval="$enable_home_terminfo"
5813   with_home_terminfo=$enableval
5814 else
5815   with_home_terminfo=yes
5816 fi;
5817 echo "$as_me:5817: result: $with_home_terminfo" >&5
5818 echo "${ECHO_T}$with_home_terminfo" >&6
5819 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5820 #define USE_HOME_TERMINFO 1
5821 EOF
5822
5823 echo "$as_me:5823: checking if you want to use restricted environment when running as root" >&5
5824 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5825
5826 # Check whether --enable-root-environ or --disable-root-environ was given.
5827 if test "${enable_root_environ+set}" = set; then
5828   enableval="$enable_root_environ"
5829   with_root_environ=$enableval
5830 else
5831   with_root_environ=yes
5832 fi;
5833 echo "$as_me:5833: result: $with_root_environ" >&5
5834 echo "${ECHO_T}$with_root_environ" >&6
5835 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5836 #define USE_ROOT_ENVIRON 1
5837 EOF
5838
5839 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5840 ###   to reduce storage requirements for the terminfo database.
5841
5842 for ac_func in \
5843         remove \
5844         unlink
5845 do
5846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5847 echo "$as_me:5847: checking for $ac_func" >&5
5848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5849 if eval "test \"\${$as_ac_var+set}\" = set"; then
5850   echo $ECHO_N "(cached) $ECHO_C" >&6
5851 else
5852   cat >conftest.$ac_ext <<_ACEOF
5853 #line 5853 "configure"
5854 #include "confdefs.h"
5855 /* System header to define __stub macros and hopefully few prototypes,
5856     which can conflict with char $ac_func (); below.  */
5857 #include <assert.h>
5858 /* Override any gcc2 internal prototype to avoid an error.  */
5859 #ifdef __cplusplus
5860 extern "C"
5861 #endif
5862 /* We use char because int might match the return type of a gcc2
5863    builtin and then its argument prototype would still apply.  */
5864 char $ac_func ();
5865 char (*f) ();
5866
5867 int
5868 main ()
5869 {
5870 /* The GNU C library defines this for functions which it implements
5871     to always fail with ENOSYS.  Some functions are actually named
5872     something starting with __ and the normal name is an alias.  */
5873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5874 choke me
5875 #else
5876 f = $ac_func;
5877 #endif
5878
5879   ;
5880   return 0;
5881 }
5882 _ACEOF
5883 rm -f conftest.$ac_objext conftest$ac_exeext
5884 if { (eval echo "$as_me:5884: \"$ac_link\"") >&5
5885   (eval $ac_link) 2>&5
5886   ac_status=$?
5887   echo "$as_me:5887: \$? = $ac_status" >&5
5888   (exit $ac_status); } &&
5889          { ac_try='test -s conftest$ac_exeext'
5890   { (eval echo "$as_me:5890: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:5893: \$? = $ac_status" >&5
5894   (exit $ac_status); }; }; then
5895   eval "$as_ac_var=yes"
5896 else
5897   echo "$as_me: failed program was:" >&5
5898 cat conftest.$ac_ext >&5
5899 eval "$as_ac_var=no"
5900 fi
5901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5902 fi
5903 echo "$as_me:5903: result: `eval echo '${'$as_ac_var'}'`" >&5
5904 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5905 if test `eval echo '${'$as_ac_var'}'` = yes; then
5906   cat >>confdefs.h <<EOF
5907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5908 EOF
5909
5910 fi
5911 done
5912
5913 if test "$cross_compiling" = yes ; then
5914
5915 for ac_func in \
5916                 link \
5917                 symlink
5918 do
5919 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5920 echo "$as_me:5920: checking for $ac_func" >&5
5921 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5922 if eval "test \"\${$as_ac_var+set}\" = set"; then
5923   echo $ECHO_N "(cached) $ECHO_C" >&6
5924 else
5925   cat >conftest.$ac_ext <<_ACEOF
5926 #line 5926 "configure"
5927 #include "confdefs.h"
5928 /* System header to define __stub macros and hopefully few prototypes,
5929     which can conflict with char $ac_func (); below.  */
5930 #include <assert.h>
5931 /* Override any gcc2 internal prototype to avoid an error.  */
5932 #ifdef __cplusplus
5933 extern "C"
5934 #endif
5935 /* We use char because int might match the return type of a gcc2
5936    builtin and then its argument prototype would still apply.  */
5937 char $ac_func ();
5938 char (*f) ();
5939
5940 int
5941 main ()
5942 {
5943 /* The GNU C library defines this for functions which it implements
5944     to always fail with ENOSYS.  Some functions are actually named
5945     something starting with __ and the normal name is an alias.  */
5946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5947 choke me
5948 #else
5949 f = $ac_func;
5950 #endif
5951
5952   ;
5953   return 0;
5954 }
5955 _ACEOF
5956 rm -f conftest.$ac_objext conftest$ac_exeext
5957 if { (eval echo "$as_me:5957: \"$ac_link\"") >&5
5958   (eval $ac_link) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); } &&
5962          { ac_try='test -s conftest$ac_exeext'
5963   { (eval echo "$as_me:5963: \"$ac_try\"") >&5
5964   (eval $ac_try) 2>&5
5965   ac_status=$?
5966   echo "$as_me:5966: \$? = $ac_status" >&5
5967   (exit $ac_status); }; }; then
5968   eval "$as_ac_var=yes"
5969 else
5970   echo "$as_me: failed program was:" >&5
5971 cat conftest.$ac_ext >&5
5972 eval "$as_ac_var=no"
5973 fi
5974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5975 fi
5976 echo "$as_me:5976: result: `eval echo '${'$as_ac_var'}'`" >&5
5977 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5978 if test `eval echo '${'$as_ac_var'}'` = yes; then
5979   cat >>confdefs.h <<EOF
5980 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5981 EOF
5982
5983 fi
5984 done
5985
5986 else
5987         echo "$as_me:5987: checking if link/symlink functions work" >&5
5988 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5989 if test "${cf_cv_link_funcs+set}" = set; then
5990   echo $ECHO_N "(cached) $ECHO_C" >&6
5991 else
5992
5993                 cf_cv_link_funcs=
5994                 for cf_func in link symlink ; do
5995                         if test "$cross_compiling" = yes; then
5996
5997                         eval 'ac_cv_func_'$cf_func'=error'
5998 else
5999   cat >conftest.$ac_ext <<_ACEOF
6000 #line 6000 "configure"
6001 #include "confdefs.h"
6002
6003 #include <sys/types.h>
6004 #include <sys/stat.h>
6005 #ifdef HAVE_UNISTD_H
6006 #include <unistd.h>
6007 #endif
6008 int main()
6009 {
6010         int fail = 0;
6011         char *src = "config.log";
6012         char *dst = "conftest.chk";
6013         struct stat src_sb;
6014         struct stat dst_sb;
6015
6016         stat(src, &src_sb);
6017         fail = ($cf_func("config.log", "conftest.chk") < 0)
6018             || (stat(dst, &dst_sb) < 0)
6019             || (dst_sb.st_mtime != src_sb.st_mtime);
6020 #ifdef HAVE_UNLINK
6021         unlink(dst);
6022 #else
6023         remove(dst);
6024 #endif
6025         ${cf_cv_main_return:-return} (fail);
6026 }
6027
6028 _ACEOF
6029 rm -f conftest$ac_exeext
6030 if { (eval echo "$as_me:6030: \"$ac_link\"") >&5
6031   (eval $ac_link) 2>&5
6032   ac_status=$?
6033   echo "$as_me:6033: \$? = $ac_status" >&5
6034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6035   { (eval echo "$as_me:6035: \"$ac_try\"") >&5
6036   (eval $ac_try) 2>&5
6037   ac_status=$?
6038   echo "$as_me:6038: \$? = $ac_status" >&5
6039   (exit $ac_status); }; }; then
6040
6041                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6042                         eval 'ac_cv_func_'$cf_func'=yes'
6043 else
6044   echo "$as_me: program exited with status $ac_status" >&5
6045 echo "$as_me: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047
6048                         eval 'ac_cv_func_'$cf_func'=no'
6049 fi
6050 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6051 fi
6052                 done
6053                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6054
6055 fi
6056 echo "$as_me:6056: result: $cf_cv_link_funcs" >&5
6057 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6058         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6059 #define HAVE_LINK 1
6060 EOF
6061
6062         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6063 #define HAVE_SYMLINK 1
6064 EOF
6065
6066 fi
6067
6068 with_links=no
6069 with_symlinks=no
6070
6071 # soft links (symbolic links) are useful for some systems where hard links do
6072 # not work, or to make it simpler to copy terminfo trees around.
6073 if test "$ac_cv_func_symlink" = yes ; then
6074     echo "$as_me:6074: checking if tic should use symbolic links" >&5
6075 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6076
6077 # Check whether --enable-symlinks or --disable-symlinks was given.
6078 if test "${enable_symlinks+set}" = set; then
6079   enableval="$enable_symlinks"
6080   with_symlinks=$enableval
6081 else
6082   with_symlinks=no
6083 fi;
6084     echo "$as_me:6084: result: $with_symlinks" >&5
6085 echo "${ECHO_T}$with_symlinks" >&6
6086 fi
6087
6088 # If we have hard links and did not choose to use soft links instead, there is
6089 # no reason to make this choice optional - use the hard links.
6090 if test "$with_symlinks" = no ; then
6091     echo "$as_me:6091: checking if tic should use hard links" >&5
6092 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6093     if test "$ac_cv_func_link" = yes ; then
6094         with_links=yes
6095     else
6096         with_links=no
6097     fi
6098     echo "$as_me:6098: result: $with_links" >&5
6099 echo "${ECHO_T}$with_links" >&6
6100 fi
6101
6102 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6103 #define USE_LINKS 1
6104 EOF
6105
6106 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6107 #define USE_SYMLINKS 1
6108 EOF
6109
6110 ###   use option --enable-broken-linker to force on use of broken-linker support
6111 echo "$as_me:6111: checking if you want broken-linker support code" >&5
6112 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6113
6114 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6115 if test "${enable_broken_linker+set}" = set; then
6116   enableval="$enable_broken_linker"
6117   with_broken_linker=$enableval
6118 else
6119   with_broken_linker=${BROKEN_LINKER-no}
6120 fi;
6121 echo "$as_me:6121: result: $with_broken_linker" >&5
6122 echo "${ECHO_T}$with_broken_linker" >&6
6123
6124 BROKEN_LINKER=0
6125 if test "$with_broken_linker" = yes ; then
6126         cat >>confdefs.h <<\EOF
6127 #define BROKEN_LINKER 1
6128 EOF
6129
6130         BROKEN_LINKER=1
6131 elif test "$DFT_LWR_MODEL" = shared ; then
6132         case $cf_cv_system_name in #(vi
6133         cygwin*)
6134                 cat >>confdefs.h <<\EOF
6135 #define BROKEN_LINKER 1
6136 EOF
6137
6138                 BROKEN_LINKER=1
6139                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6140
6141 echo "${as_me-configure}:6141: testing cygwin linker is broken anyway ..." 1>&5
6142
6143                 ;;
6144         esac
6145 fi
6146
6147 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6148 echo "$as_me:6148: checking if tputs should process BSD-style prefix padding" >&5
6149 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6150
6151 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6152 if test "${enable_bsdpad+set}" = set; then
6153   enableval="$enable_bsdpad"
6154   with_bsdpad=$enableval
6155 else
6156   with_bsdpad=no
6157 fi;
6158 echo "$as_me:6158: result: $with_bsdpad" >&5
6159 echo "${ECHO_T}$with_bsdpad" >&6
6160 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6161 #define BSD_TPUTS 1
6162 EOF
6163
6164 ###   use option --enable-widec to turn on use of wide-character support
6165 NCURSES_CH_T=chtype
6166 NCURSES_LIBUTF8=0
6167
6168 NEED_WCHAR_H=0
6169 NCURSES_MBSTATE_T=0
6170 NCURSES_WCHAR_T=0
6171 NCURSES_WINT_T=0
6172
6173 # Check to define _XOPEN_SOURCE "automatically"
6174
6175 echo "$as_me:6175: checking if $CC -U and -D options work together" >&5
6176 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6177 if test "${cf_cv_cc_u_d_options+set}" = set; then
6178   echo $ECHO_N "(cached) $ECHO_C" >&6
6179 else
6180
6181         cf_save_CPPFLAGS="$CPPFLAGS"
6182         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6183         cat >conftest.$ac_ext <<_ACEOF
6184 #line 6184 "configure"
6185 #include "confdefs.h"
6186
6187 int
6188 main ()
6189 {
6190
6191 #ifndef U_D_OPTIONS
6192 make an undefined-error
6193 #endif
6194 #ifdef  D_U_OPTIONS
6195 make a defined-error
6196 #endif
6197
6198   ;
6199   return 0;
6200 }
6201 _ACEOF
6202 rm -f conftest.$ac_objext
6203 if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204   (eval $ac_compile) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit $ac_status); } &&
6208          { ac_try='test -s conftest.$ac_objext'
6209   { (eval echo "$as_me:6209: \"$ac_try\"") >&5
6210   (eval $ac_try) 2>&5
6211   ac_status=$?
6212   echo "$as_me:6212: \$? = $ac_status" >&5
6213   (exit $ac_status); }; }; then
6214
6215         cf_cv_cc_u_d_options=yes
6216 else
6217   echo "$as_me: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6219
6220         cf_cv_cc_u_d_options=no
6221 fi
6222 rm -f conftest.$ac_objext conftest.$ac_ext
6223         CPPFLAGS="$cf_save_CPPFLAGS"
6224
6225 fi
6226 echo "$as_me:6226: result: $cf_cv_cc_u_d_options" >&5
6227 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6228
6229 cf_XOPEN_SOURCE=500
6230 cf_POSIX_C_SOURCE=199506L
6231
6232 case $host_os in #(vi
6233 aix[45]*) #(vi
6234         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6235         ;;
6236 freebsd*|dragonfly*) #(vi
6237         # 5.x headers associate
6238         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6239         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6240         cf_POSIX_C_SOURCE=200112L
6241         cf_XOPEN_SOURCE=600
6242         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6243         ;;
6244 hpux*) #(vi
6245         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6246         ;;
6247 irix[56].*) #(vi
6248         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6249         ;;
6250 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6251
6252 echo "$as_me:6252: checking if we must define _GNU_SOURCE" >&5
6253 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6254 if test "${cf_cv_gnu_source+set}" = set; then
6255   echo $ECHO_N "(cached) $ECHO_C" >&6
6256 else
6257
6258 cat >conftest.$ac_ext <<_ACEOF
6259 #line 6259 "configure"
6260 #include "confdefs.h"
6261 #include <sys/types.h>
6262 int
6263 main ()
6264 {
6265
6266 #ifndef _XOPEN_SOURCE
6267 make an error
6268 #endif
6269   ;
6270   return 0;
6271 }
6272 _ACEOF
6273 rm -f conftest.$ac_objext
6274 if { (eval echo "$as_me:6274: \"$ac_compile\"") >&5
6275   (eval $ac_compile) 2>&5
6276   ac_status=$?
6277   echo "$as_me:6277: \$? = $ac_status" >&5
6278   (exit $ac_status); } &&
6279          { ac_try='test -s conftest.$ac_objext'
6280   { (eval echo "$as_me:6280: \"$ac_try\"") >&5
6281   (eval $ac_try) 2>&5
6282   ac_status=$?
6283   echo "$as_me:6283: \$? = $ac_status" >&5
6284   (exit $ac_status); }; }; then
6285   cf_cv_gnu_source=no
6286 else
6287   echo "$as_me: failed program was:" >&5
6288 cat conftest.$ac_ext >&5
6289 cf_save="$CPPFLAGS"
6290          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6291          cat >conftest.$ac_ext <<_ACEOF
6292 #line 6292 "configure"
6293 #include "confdefs.h"
6294 #include <sys/types.h>
6295 int
6296 main ()
6297 {
6298
6299 #ifdef _XOPEN_SOURCE
6300 make an error
6301 #endif
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext
6307 if { (eval echo "$as_me:6307: \"$ac_compile\"") >&5
6308   (eval $ac_compile) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); } &&
6312          { ac_try='test -s conftest.$ac_objext'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; }; then
6318   cf_cv_gnu_source=no
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 cf_cv_gnu_source=yes
6323 fi
6324 rm -f conftest.$ac_objext conftest.$ac_ext
6325         CPPFLAGS="$cf_save"
6326
6327 fi
6328 rm -f conftest.$ac_objext conftest.$ac_ext
6329
6330 fi
6331 echo "$as_me:6331: result: $cf_cv_gnu_source" >&5
6332 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6333 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6334
6335         ;;
6336 mirbsd*) #(vi
6337         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6338         ;;
6339 netbsd*) #(vi
6340         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6341         ;;
6342 openbsd*) #(vi
6343         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6344         ;;
6345 osf[45]*) #(vi
6346         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6347         ;;
6348 nto-qnx*) #(vi
6349         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6350         ;;
6351 sco*) #(vi
6352         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6353         ;;
6354 solaris*) #(vi
6355         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6356         ;;
6357 *)
6358         echo "$as_me:6358: checking if we should define _XOPEN_SOURCE" >&5
6359 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6360 if test "${cf_cv_xopen_source+set}" = set; then
6361   echo $ECHO_N "(cached) $ECHO_C" >&6
6362 else
6363
6364         cat >conftest.$ac_ext <<_ACEOF
6365 #line 6365 "configure"
6366 #include "confdefs.h"
6367 #include <sys/types.h>
6368 int
6369 main ()
6370 {
6371
6372 #ifndef _XOPEN_SOURCE
6373 make an error
6374 #endif
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 rm -f conftest.$ac_objext
6380 if { (eval echo "$as_me:6380: \"$ac_compile\"") >&5
6381   (eval $ac_compile) 2>&5
6382   ac_status=$?
6383   echo "$as_me:6383: \$? = $ac_status" >&5
6384   (exit $ac_status); } &&
6385          { ac_try='test -s conftest.$ac_objext'
6386   { (eval echo "$as_me:6386: \"$ac_try\"") >&5
6387   (eval $ac_try) 2>&5
6388   ac_status=$?
6389   echo "$as_me:6389: \$? = $ac_status" >&5
6390   (exit $ac_status); }; }; then
6391   cf_cv_xopen_source=no
6392 else
6393   echo "$as_me: failed program was:" >&5
6394 cat conftest.$ac_ext >&5
6395 cf_save="$CPPFLAGS"
6396          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6397          cat >conftest.$ac_ext <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6400 #include <sys/types.h>
6401 int
6402 main ()
6403 {
6404
6405 #ifdef _XOPEN_SOURCE
6406 make an error
6407 #endif
6408   ;
6409   return 0;
6410 }
6411 _ACEOF
6412 rm -f conftest.$ac_objext
6413 if { (eval echo "$as_me:6413: \"$ac_compile\"") >&5
6414   (eval $ac_compile) 2>&5
6415   ac_status=$?
6416   echo "$as_me:6416: \$? = $ac_status" >&5
6417   (exit $ac_status); } &&
6418          { ac_try='test -s conftest.$ac_objext'
6419   { (eval echo "$as_me:6419: \"$ac_try\"") >&5
6420   (eval $ac_try) 2>&5
6421   ac_status=$?
6422   echo "$as_me:6422: \$? = $ac_status" >&5
6423   (exit $ac_status); }; }; then
6424   cf_cv_xopen_source=no
6425 else
6426   echo "$as_me: failed program was:" >&5
6427 cat conftest.$ac_ext >&5
6428 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6429 fi
6430 rm -f conftest.$ac_objext conftest.$ac_ext
6431         CPPFLAGS="$cf_save"
6432
6433 fi
6434 rm -f conftest.$ac_objext conftest.$ac_ext
6435
6436 fi
6437 echo "$as_me:6437: result: $cf_cv_xopen_source" >&5
6438 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6439         if test "$cf_cv_xopen_source" != no ; then
6440
6441 # remove _XOPEN_SOURCE symbol from $CFLAGS
6442 CFLAGS=`echo "$CFLAGS" | \
6443         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6444                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6445
6446 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6447 CPPFLAGS=`echo "$CPPFLAGS" | \
6448         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6449                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6450
6451                 test "$cf_cv_cc_u_d_options" = yes && \
6452                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6453                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6454         fi
6455
6456 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6457
6458 cf_save_CFLAGS="$CFLAGS"
6459 cf_save_CPPFLAGS="$CPPFLAGS"
6460
6461 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6462 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6463         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6464                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6465
6466 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6467 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6468         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6469                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6470
6471 echo "$as_me:6471: checking if we should define _POSIX_C_SOURCE" >&5
6472 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6473 if test "${cf_cv_posix_c_source+set}" = set; then
6474   echo $ECHO_N "(cached) $ECHO_C" >&6
6475 else
6476
6477 echo "${as_me-configure}:6477: testing if the symbol is already defined go no further ..." 1>&5
6478
6479         cat >conftest.$ac_ext <<_ACEOF
6480 #line 6480 "configure"
6481 #include "confdefs.h"
6482 #include <sys/types.h>
6483 int
6484 main ()
6485 {
6486
6487 #ifndef _POSIX_C_SOURCE
6488 make an error
6489 #endif
6490   ;
6491   return 0;
6492 }
6493 _ACEOF
6494 rm -f conftest.$ac_objext
6495 if { (eval echo "$as_me:6495: \"$ac_compile\"") >&5
6496   (eval $ac_compile) 2>&5
6497   ac_status=$?
6498   echo "$as_me:6498: \$? = $ac_status" >&5
6499   (exit $ac_status); } &&
6500          { ac_try='test -s conftest.$ac_objext'
6501   { (eval echo "$as_me:6501: \"$ac_try\"") >&5
6502   (eval $ac_try) 2>&5
6503   ac_status=$?
6504   echo "$as_me:6504: \$? = $ac_status" >&5
6505   (exit $ac_status); }; }; then
6506   cf_cv_posix_c_source=no
6507 else
6508   echo "$as_me: failed program was:" >&5
6509 cat conftest.$ac_ext >&5
6510 cf_want_posix_source=no
6511          case .$cf_POSIX_C_SOURCE in #(vi
6512          .[12]??*) #(vi
6513                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6514                 ;;
6515          .2) #(vi
6516                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6517                 cf_want_posix_source=yes
6518                 ;;
6519          .*)
6520                 cf_want_posix_source=yes
6521                 ;;
6522          esac
6523          if test "$cf_want_posix_source" = yes ; then
6524                 cat >conftest.$ac_ext <<_ACEOF
6525 #line 6525 "configure"
6526 #include "confdefs.h"
6527 #include <sys/types.h>
6528 int
6529 main ()
6530 {
6531
6532 #ifdef _POSIX_SOURCE
6533 make an error
6534 #endif
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 rm -f conftest.$ac_objext
6540 if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
6541   (eval $ac_compile) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -s conftest.$ac_objext'
6546   { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547   (eval $ac_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }; }; then
6551   :
6552 else
6553   echo "$as_me: failed program was:" >&5
6554 cat conftest.$ac_ext >&5
6555 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6556 fi
6557 rm -f conftest.$ac_objext conftest.$ac_ext
6558          fi
6559
6560 echo "${as_me-configure}:6560: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6561
6562          CFLAGS="$cf_trim_CFLAGS"
6563          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6564
6565 echo "${as_me-configure}:6565: testing if the second compile does not leave our definition intact error ..." 1>&5
6566
6567          cat >conftest.$ac_ext <<_ACEOF
6568 #line 6568 "configure"
6569 #include "confdefs.h"
6570 #include <sys/types.h>
6571 int
6572 main ()
6573 {
6574
6575 #ifndef _POSIX_C_SOURCE
6576 make an error
6577 #endif
6578   ;
6579   return 0;
6580 }
6581 _ACEOF
6582 rm -f conftest.$ac_objext
6583 if { (eval echo "$as_me:6583: \"$ac_compile\"") >&5
6584   (eval $ac_compile) 2>&5
6585   ac_status=$?
6586   echo "$as_me:6586: \$? = $ac_status" >&5
6587   (exit $ac_status); } &&
6588          { ac_try='test -s conftest.$ac_objext'
6589   { (eval echo "$as_me:6589: \"$ac_try\"") >&5
6590   (eval $ac_try) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); }; }; then
6594   :
6595 else
6596   echo "$as_me: failed program was:" >&5
6597 cat conftest.$ac_ext >&5
6598 cf_cv_posix_c_source=no
6599 fi
6600 rm -f conftest.$ac_objext conftest.$ac_ext
6601          CFLAGS="$cf_save_CFLAGS"
6602          CPPFLAGS="$cf_save_CPPFLAGS"
6603
6604 fi
6605 rm -f conftest.$ac_objext conftest.$ac_ext
6606
6607 fi
6608 echo "$as_me:6608: result: $cf_cv_posix_c_source" >&5
6609 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6610
6611 if test "$cf_cv_posix_c_source" != no ; then
6612         CFLAGS="$cf_trim_CFLAGS"
6613         CPPFLAGS="$cf_trim_CPPFLAGS"
6614         if test "$cf_cv_cc_u_d_options" = yes ; then
6615                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6616                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6617                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6618         fi
6619         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6620 fi
6621
6622         ;;
6623 esac
6624
6625 # Work around breakage on OS X
6626
6627 echo "$as_me:6627: checking if SIGWINCH is defined" >&5
6628 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6629 if test "${cf_cv_define_sigwinch+set}" = set; then
6630   echo $ECHO_N "(cached) $ECHO_C" >&6
6631 else
6632
6633         cat >conftest.$ac_ext <<_ACEOF
6634 #line 6634 "configure"
6635 #include "confdefs.h"
6636
6637 #include <sys/types.h>
6638 #include <sys/signal.h>
6639
6640 int
6641 main ()
6642 {
6643 int x = SIGWINCH
6644   ;
6645   return 0;
6646 }
6647 _ACEOF
6648 rm -f conftest.$ac_objext
6649 if { (eval echo "$as_me:6649: \"$ac_compile\"") >&5
6650   (eval $ac_compile) 2>&5
6651   ac_status=$?
6652   echo "$as_me:6652: \$? = $ac_status" >&5
6653   (exit $ac_status); } &&
6654          { ac_try='test -s conftest.$ac_objext'
6655   { (eval echo "$as_me:6655: \"$ac_try\"") >&5
6656   (eval $ac_try) 2>&5
6657   ac_status=$?
6658   echo "$as_me:6658: \$? = $ac_status" >&5
6659   (exit $ac_status); }; }; then
6660   cf_cv_define_sigwinch=yes
6661 else
6662   echo "$as_me: failed program was:" >&5
6663 cat conftest.$ac_ext >&5
6664 cat >conftest.$ac_ext <<_ACEOF
6665 #line 6665 "configure"
6666 #include "confdefs.h"
6667
6668 #undef _XOPEN_SOURCE
6669 #undef _POSIX_SOURCE
6670 #undef _POSIX_C_SOURCE
6671 #include <sys/types.h>
6672 #include <sys/signal.h>
6673
6674 int
6675 main ()
6676 {
6677 int x = SIGWINCH
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext
6683 if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
6684   (eval $ac_compile) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } &&
6688          { ac_try='test -s conftest.$ac_objext'
6689   { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690   (eval $ac_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }; }; then
6694   cf_cv_define_sigwinch=maybe
6695 else
6696   echo "$as_me: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 cf_cv_define_sigwinch=no
6699 fi
6700 rm -f conftest.$ac_objext conftest.$ac_ext
6701
6702 fi
6703 rm -f conftest.$ac_objext conftest.$ac_ext
6704
6705 fi
6706 echo "$as_me:6706: result: $cf_cv_define_sigwinch" >&5
6707 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6708
6709 if test "$cf_cv_define_sigwinch" = maybe ; then
6710 echo "$as_me:6710: checking for actual SIGWINCH definition" >&5
6711 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6712 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6713   echo $ECHO_N "(cached) $ECHO_C" >&6
6714 else
6715
6716 cf_cv_fixup_sigwinch=unknown
6717 cf_sigwinch=32
6718 while test $cf_sigwinch != 1
6719 do
6720         cat >conftest.$ac_ext <<_ACEOF
6721 #line 6721 "configure"
6722 #include "confdefs.h"
6723
6724 #undef _XOPEN_SOURCE
6725 #undef _POSIX_SOURCE
6726 #undef _POSIX_C_SOURCE
6727 #include <sys/types.h>
6728 #include <sys/signal.h>
6729
6730 int
6731 main ()
6732 {
6733
6734 #if SIGWINCH != $cf_sigwinch
6735 make an error
6736 #endif
6737 int x = SIGWINCH
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 rm -f conftest.$ac_objext
6743 if { (eval echo "$as_me:6743: \"$ac_compile\"") >&5
6744   (eval $ac_compile) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit $ac_status); } &&
6748          { ac_try='test -s conftest.$ac_objext'
6749   { (eval echo "$as_me:6749: \"$ac_try\"") >&5
6750   (eval $ac_try) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit $ac_status); }; }; then
6754   cf_cv_fixup_sigwinch=$cf_sigwinch
6755          break
6756 else
6757   echo "$as_me: failed program was:" >&5
6758 cat conftest.$ac_ext >&5
6759 fi
6760 rm -f conftest.$ac_objext conftest.$ac_ext
6761
6762 cf_sigwinch=`expr $cf_sigwinch - 1`
6763 done
6764
6765 fi
6766 echo "$as_me:6766: result: $cf_cv_fixup_sigwinch" >&5
6767 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6768
6769         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6770                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6771         fi
6772 fi
6773
6774 # Checks for CODESET support.
6775
6776   echo "$as_me:6776: checking for nl_langinfo and CODESET" >&5
6777 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6778 if test "${am_cv_langinfo_codeset+set}" = set; then
6779   echo $ECHO_N "(cached) $ECHO_C" >&6
6780 else
6781   cat >conftest.$ac_ext <<_ACEOF
6782 #line 6782 "configure"
6783 #include "confdefs.h"
6784 #include <langinfo.h>
6785 int
6786 main ()
6787 {
6788 char* cs = nl_langinfo(CODESET);
6789   ;
6790   return 0;
6791 }
6792 _ACEOF
6793 rm -f conftest.$ac_objext conftest$ac_exeext
6794 if { (eval echo "$as_me:6794: \"$ac_link\"") >&5
6795   (eval $ac_link) 2>&5
6796   ac_status=$?
6797   echo "$as_me:6797: \$? = $ac_status" >&5
6798   (exit $ac_status); } &&
6799          { ac_try='test -s conftest$ac_exeext'
6800   { (eval echo "$as_me:6800: \"$ac_try\"") >&5
6801   (eval $ac_try) 2>&5
6802   ac_status=$?
6803   echo "$as_me:6803: \$? = $ac_status" >&5
6804   (exit $ac_status); }; }; then
6805   am_cv_langinfo_codeset=yes
6806 else
6807   echo "$as_me: failed program was:" >&5
6808 cat conftest.$ac_ext >&5
6809 am_cv_langinfo_codeset=no
6810 fi
6811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6812
6813 fi
6814 echo "$as_me:6814: result: $am_cv_langinfo_codeset" >&5
6815 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6816   if test $am_cv_langinfo_codeset = yes; then
6817
6818 cat >>confdefs.h <<\EOF
6819 #define HAVE_LANGINFO_CODESET 1
6820 EOF
6821
6822   fi
6823
6824 # use these variables to work around a defect in gcc's fixincludes.
6825 NCURSES_OK_WCHAR_T=
6826 NCURSES_OK_WINT_T=
6827
6828 echo "$as_me:6828: checking if you want wide-character code" >&5
6829 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6830
6831 # Check whether --enable-widec or --disable-widec was given.
6832 if test "${enable_widec+set}" = set; then
6833   enableval="$enable_widec"
6834   with_widec=$enableval
6835 else
6836   with_widec=no
6837 fi;
6838 echo "$as_me:6838: result: $with_widec" >&5
6839 echo "${ECHO_T}$with_widec" >&6
6840 if test "$with_widec" = yes ; then
6841         LIB_SUFFIX="w${LIB_SUFFIX}"
6842         cat >>confdefs.h <<\EOF
6843 #define USE_WIDEC_SUPPORT 1
6844 EOF
6845
6846 echo "$as_me:6846: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6847 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6848 cat >conftest.$ac_ext <<_ACEOF
6849 #line 6849 "configure"
6850 #include "confdefs.h"
6851 #include <sys/types.h>
6852
6853 int
6854 main ()
6855 {
6856
6857 #ifndef _XOPEN_SOURCE_EXTENDED
6858 make an error
6859 #endif
6860   ;
6861   return 0;
6862 }
6863 _ACEOF
6864 rm -f conftest.$ac_objext
6865 if { (eval echo "$as_me:6865: \"$ac_compile\"") >&5
6866   (eval $ac_compile) 2>&5
6867   ac_status=$?
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit $ac_status); } &&
6870          { ac_try='test -s conftest.$ac_objext'
6871   { (eval echo "$as_me:6871: \"$ac_try\"") >&5
6872   (eval $ac_try) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); }; }; then
6876   cf_result=no
6877 else
6878   echo "$as_me: failed program was:" >&5
6879 cat conftest.$ac_ext >&5
6880 cf_result=yes
6881 fi
6882 rm -f conftest.$ac_objext conftest.$ac_ext
6883 echo "$as_me:6883: result: $cf_result" >&5
6884 echo "${ECHO_T}$cf_result" >&6
6885
6886 if test "$cf_result" = yes ; then
6887         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6888 elif test "x" != "x" ; then
6889         echo "$as_me:6889: checking checking for compatible value versus " >&5
6890 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6891         cat >conftest.$ac_ext <<_ACEOF
6892 #line 6892 "configure"
6893 #include "confdefs.h"
6894 #include <sys/types.h>
6895
6896 int
6897 main ()
6898 {
6899
6900 #if _XOPEN_SOURCE_EXTENDED- < 0
6901 make an error
6902 #endif
6903   ;
6904   return 0;
6905 }
6906 _ACEOF
6907 rm -f conftest.$ac_objext
6908 if { (eval echo "$as_me:6908: \"$ac_compile\"") >&5
6909   (eval $ac_compile) 2>&5
6910   ac_status=$?
6911   echo "$as_me:6911: \$? = $ac_status" >&5
6912   (exit $ac_status); } &&
6913          { ac_try='test -s conftest.$ac_objext'
6914   { (eval echo "$as_me:6914: \"$ac_try\"") >&5
6915   (eval $ac_try) 2>&5
6916   ac_status=$?
6917   echo "$as_me:6917: \$? = $ac_status" >&5
6918   (exit $ac_status); }; }; then
6919   cf_result=yes
6920 else
6921   echo "$as_me: failed program was:" >&5
6922 cat conftest.$ac_ext >&5
6923 cf_result=no
6924 fi
6925 rm -f conftest.$ac_objext conftest.$ac_ext
6926         echo "$as_me:6926: result: $cf_result" >&5
6927 echo "${ECHO_T}$cf_result" >&6
6928         if test "$cf_result" = no ; then
6929                 # perhaps we can override it - try...
6930                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6931         fi
6932 fi
6933
6934         # with_overwrite=no
6935         NCURSES_CH_T=cchar_t
6936
6937 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6938 do
6939 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6940 echo "$as_me:6940: checking for $ac_func" >&5
6941 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6942 if eval "test \"\${$as_ac_var+set}\" = set"; then
6943   echo $ECHO_N "(cached) $ECHO_C" >&6
6944 else
6945   cat >conftest.$ac_ext <<_ACEOF
6946 #line 6946 "configure"
6947 #include "confdefs.h"
6948 /* System header to define __stub macros and hopefully few prototypes,
6949     which can conflict with char $ac_func (); below.  */
6950 #include <assert.h>
6951 /* Override any gcc2 internal prototype to avoid an error.  */
6952 #ifdef __cplusplus
6953 extern "C"
6954 #endif
6955 /* We use char because int might match the return type of a gcc2
6956    builtin and then its argument prototype would still apply.  */
6957 char $ac_func ();
6958 char (*f) ();
6959
6960 int
6961 main ()
6962 {
6963 /* The GNU C library defines this for functions which it implements
6964     to always fail with ENOSYS.  Some functions are actually named
6965     something starting with __ and the normal name is an alias.  */
6966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6967 choke me
6968 #else
6969 f = $ac_func;
6970 #endif
6971
6972   ;
6973   return 0;
6974 }
6975 _ACEOF
6976 rm -f conftest.$ac_objext conftest$ac_exeext
6977 if { (eval echo "$as_me:6977: \"$ac_link\"") >&5
6978   (eval $ac_link) 2>&5
6979   ac_status=$?
6980   echo "$as_me:6980: \$? = $ac_status" >&5
6981   (exit $ac_status); } &&
6982          { ac_try='test -s conftest$ac_exeext'
6983   { (eval echo "$as_me:6983: \"$ac_try\"") >&5
6984   (eval $ac_try) 2>&5
6985   ac_status=$?
6986   echo "$as_me:6986: \$? = $ac_status" >&5
6987   (exit $ac_status); }; }; then
6988   eval "$as_ac_var=yes"
6989 else
6990   echo "$as_me: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992 eval "$as_ac_var=no"
6993 fi
6994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6995 fi
6996 echo "$as_me:6996: result: `eval echo '${'$as_ac_var'}'`" >&5
6997 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6998 if test `eval echo '${'$as_ac_var'}'` = yes; then
6999   cat >>confdefs.h <<EOF
7000 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7001 EOF
7002
7003 fi
7004 done
7005
7006         if test "$ac_cv_func_putwc" != yes ; then
7007
7008 echo "$as_me:7008: checking for multibyte character support" >&5
7009 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7010 if test "${cf_cv_utf8_lib+set}" = set; then
7011   echo $ECHO_N "(cached) $ECHO_C" >&6
7012 else
7013
7014         cf_save_LIBS="$LIBS"
7015         cat >conftest.$ac_ext <<_ACEOF
7016 #line 7016 "configure"
7017 #include "confdefs.h"
7018
7019 #include <stdlib.h>
7020 int
7021 main ()
7022 {
7023 putwc(0,0);
7024   ;
7025   return 0;
7026 }
7027 _ACEOF
7028 rm -f conftest.$ac_objext conftest$ac_exeext
7029 if { (eval echo "$as_me:7029: \"$ac_link\"") >&5
7030   (eval $ac_link) 2>&5
7031   ac_status=$?
7032   echo "$as_me:7032: \$? = $ac_status" >&5
7033   (exit $ac_status); } &&
7034          { ac_try='test -s conftest$ac_exeext'
7035   { (eval echo "$as_me:7035: \"$ac_try\"") >&5
7036   (eval $ac_try) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); }; }; then
7040   cf_cv_utf8_lib=yes
7041 else
7042   echo "$as_me: failed program was:" >&5
7043 cat conftest.$ac_ext >&5
7044
7045 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7046 # will be set on completion of the AC_TRY_LINK below.
7047 cf_cv_header_path_utf8=
7048 cf_cv_library_path_utf8=
7049
7050 echo "${as_me-configure}:7050: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7051
7052 cat >conftest.$ac_ext <<_ACEOF
7053 #line 7053 "configure"
7054 #include "confdefs.h"
7055
7056 #include <libutf8.h>
7057 int
7058 main ()
7059 {
7060 putwc(0,0);
7061   ;
7062   return 0;
7063 }
7064 _ACEOF
7065 rm -f conftest.$ac_objext conftest$ac_exeext
7066 if { (eval echo "$as_me:7066: \"$ac_link\"") >&5
7067   (eval $ac_link) 2>&5
7068   ac_status=$?
7069   echo "$as_me:7069: \$? = $ac_status" >&5
7070   (exit $ac_status); } &&
7071          { ac_try='test -s conftest$ac_exeext'
7072   { (eval echo "$as_me:7072: \"$ac_try\"") >&5
7073   (eval $ac_try) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); }; }; then
7077   cf_cv_find_linkage_utf8=yes
7078 else
7079   echo "$as_me: failed program was:" >&5
7080 cat conftest.$ac_ext >&5
7081
7082     cf_cv_find_linkage_utf8=no
7083
7084 echo "${as_me-configure}:7084: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7085
7086     cf_save_CPPFLAGS="$CPPFLAGS"
7087     cf_test_CPPFLAGS="$CPPFLAGS"
7088
7089 cf_header_path_list=""
7090 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7091         for cf_header_path in $CPPFLAGS $CFLAGS
7092         do
7093                 case $cf_header_path in #(vi
7094                 -I*)
7095                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7096
7097 test "$cf_header_path" != "NONE" && \
7098 test -d "$cf_header_path" && \
7099  {
7100         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7101         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7102         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7103         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7104         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7105         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7106 }
7107
7108                         cf_header_path_list="$cf_header_path_list $cf_search"
7109                         ;;
7110                 esac
7111         done
7112 fi
7113
7114 cf_search=""
7115
7116 test "/usr" != "$prefix" && \
7117 test -d "/usr" && \
7118 (test $prefix = NONE || test -d $prefix) && {
7119         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7120         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7121         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7122         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7123         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7124         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7125 }
7126
7127 test "$prefix" != "NONE" && \
7128 test -d "$prefix" && \
7129  {
7130         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7131         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7132         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7133         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7134         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7135         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7136 }
7137
7138 test "/usr/local" != "$prefix" && \
7139 test -d "/usr/local" && \
7140 (test $prefix = NONE || test -d $prefix) && {
7141         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7142         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7143         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7144         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7145         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7146         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7147 }
7148
7149 test "/opt" != "$prefix" && \
7150 test -d "/opt" && \
7151 (test $prefix = NONE || test -d $prefix) && {
7152         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7153         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7154         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7155         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7156         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7157         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7158 }
7159
7160 test "$HOME" != "$prefix" && \
7161 test -d "$HOME" && \
7162 (test $prefix = NONE || test -d $prefix) && {
7163         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7164         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7165         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7166         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7167         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7168         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7169 }
7170
7171 test "$includedir" != NONE && \
7172 test "$includedir" != "/usr/include" && \
7173 test -d "$includedir" && {
7174         test -d $includedir &&    cf_search="$cf_search $includedir"
7175         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7176 }
7177
7178 test "$oldincludedir" != NONE && \
7179 test "$oldincludedir" != "/usr/include" && \
7180 test -d "$oldincludedir" && {
7181         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7182         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7183 }
7184
7185 cf_search="$cf_header_path_list $cf_search"
7186
7187     for cf_cv_header_path_utf8 in $cf_search
7188     do
7189       if test -d $cf_cv_header_path_utf8 ; then
7190         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7191
7192 echo "${as_me-configure}:7192: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7193
7194         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7195         cat >conftest.$ac_ext <<_ACEOF
7196 #line 7196 "configure"
7197 #include "confdefs.h"
7198
7199 #include <libutf8.h>
7200 int
7201 main ()
7202 {
7203 putwc(0,0);
7204   ;
7205   return 0;
7206 }
7207 _ACEOF
7208 rm -f conftest.$ac_objext
7209 if { (eval echo "$as_me:7209: \"$ac_compile\"") >&5
7210   (eval $ac_compile) 2>&5
7211   ac_status=$?
7212   echo "$as_me:7212: \$? = $ac_status" >&5
7213   (exit $ac_status); } &&
7214          { ac_try='test -s conftest.$ac_objext'
7215   { (eval echo "$as_me:7215: \"$ac_try\"") >&5
7216   (eval $ac_try) 2>&5
7217   ac_status=$?
7218   echo "$as_me:7218: \$? = $ac_status" >&5
7219   (exit $ac_status); }; }; then
7220
7221             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7222
7223 echo "${as_me-configure}:7223: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7224
7225             cf_cv_find_linkage_utf8=maybe
7226             cf_test_CPPFLAGS="$CPPFLAGS"
7227             break
7228 else
7229   echo "$as_me: failed program was:" >&5
7230 cat conftest.$ac_ext >&5
7231
7232             CPPFLAGS="$cf_save_CPPFLAGS"
7233
7234 fi
7235 rm -f conftest.$ac_objext conftest.$ac_ext
7236       fi
7237     done
7238
7239     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7240
7241 echo "${as_me-configure}:7241: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7242
7243       cf_save_LIBS="$LIBS"
7244       cf_save_LDFLAGS="$LDFLAGS"
7245
7246       if test "$cf_cv_find_linkage_utf8" != yes ; then
7247
7248 cf_library_path_list=""
7249 if test -n "${LDFLAGS}${LIBS}" ; then
7250         for cf_library_path in $LDFLAGS $LIBS
7251         do
7252                 case $cf_library_path in #(vi
7253                 -L*)
7254                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7255
7256 test "$cf_library_path" != "NONE" && \
7257 test -d "$cf_library_path" && \
7258  {
7259         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7260         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7261         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7262         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7263         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7264         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7265 }
7266
7267                         cf_library_path_list="$cf_library_path_list $cf_search"
7268                         ;;
7269                 esac
7270         done
7271 fi
7272
7273 cf_search=""
7274
7275 test "/usr" != "$prefix" && \
7276 test -d "/usr" && \
7277 (test $prefix = NONE || test -d $prefix) && {
7278         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7279         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7280         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7281         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7282         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7283         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7284 }
7285
7286 test "$prefix" != "NONE" && \
7287 test -d "$prefix" && \
7288  {
7289         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7290         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7291         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7292         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7293         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7294         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7295 }
7296
7297 test "/usr/local" != "$prefix" && \
7298 test -d "/usr/local" && \
7299 (test $prefix = NONE || test -d $prefix) && {
7300         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7301         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7302         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7303         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7304         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7305         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7306 }
7307
7308 test "/opt" != "$prefix" && \
7309 test -d "/opt" && \
7310 (test $prefix = NONE || test -d $prefix) && {
7311         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7312         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7313         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7314         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7315         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7316         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7317 }
7318
7319 test "$HOME" != "$prefix" && \
7320 test -d "$HOME" && \
7321 (test $prefix = NONE || test -d $prefix) && {
7322         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7323         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7324         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7325         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7326         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7327         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7328 }
7329
7330 cf_search="$cf_library_path_list $cf_search"
7331
7332         for cf_cv_library_path_utf8 in $cf_search
7333         do
7334           if test -d $cf_cv_library_path_utf8 ; then
7335             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7336
7337 echo "${as_me-configure}:7337: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7338
7339             CPPFLAGS="$cf_test_CPPFLAGS"
7340             LIBS="-lutf8  $cf_save_LIBS"
7341             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7342             cat >conftest.$ac_ext <<_ACEOF
7343 #line 7343 "configure"
7344 #include "confdefs.h"
7345
7346 #include <libutf8.h>
7347 int
7348 main ()
7349 {
7350 putwc(0,0);
7351   ;
7352   return 0;
7353 }
7354 _ACEOF
7355 rm -f conftest.$ac_objext conftest$ac_exeext
7356 if { (eval echo "$as_me:7356: \"$ac_link\"") >&5
7357   (eval $ac_link) 2>&5
7358   ac_status=$?
7359   echo "$as_me:7359: \$? = $ac_status" >&5
7360   (exit $ac_status); } &&
7361          { ac_try='test -s conftest$ac_exeext'
7362   { (eval echo "$as_me:7362: \"$ac_try\"") >&5
7363   (eval $ac_try) 2>&5
7364   ac_status=$?
7365   echo "$as_me:7365: \$? = $ac_status" >&5
7366   (exit $ac_status); }; }; then
7367
7368                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7369
7370 echo "${as_me-configure}:7370: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7371
7372                 cf_cv_find_linkage_utf8=yes
7373                 cf_cv_library_file_utf8="-lutf8"
7374                 break
7375 else
7376   echo "$as_me: failed program was:" >&5
7377 cat conftest.$ac_ext >&5
7378
7379                 CPPFLAGS="$cf_save_CPPFLAGS"
7380                 LIBS="$cf_save_LIBS"
7381                 LDFLAGS="$cf_save_LDFLAGS"
7382
7383 fi
7384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7385           fi
7386         done
7387         LIBS="$cf_save_LIBS"
7388         CPPFLAGS="$cf_save_CPPFLAGS"
7389         LDFLAGS="$cf_save_LDFLAGS"
7390       fi
7391
7392     else
7393       cf_cv_find_linkage_utf8=no
7394     fi
7395
7396 fi
7397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7398
7399 if test "$cf_cv_find_linkage_utf8" = yes ; then
7400 cf_cv_utf8_lib=add-on
7401 else
7402 cf_cv_utf8_lib=no
7403 fi
7404
7405 fi
7406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7407 fi
7408 echo "$as_me:7408: result: $cf_cv_utf8_lib" >&5
7409 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7410
7411 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7412 # ncurses/ncursesw:
7413 if test "$cf_cv_utf8_lib" = "add-on" ; then
7414         cat >>confdefs.h <<\EOF
7415 #define HAVE_LIBUTF8_H 1
7416 EOF
7417
7418 if test -n "$cf_cv_header_path_utf8" ; then
7419   for cf_add_incdir in $cf_cv_header_path_utf8
7420   do
7421         while test $cf_add_incdir != /usr/include
7422         do
7423           if test -d $cf_add_incdir
7424           then
7425                 cf_have_incdir=no
7426                 if test -n "$CFLAGS$CPPFLAGS" ; then
7427                   # a loop is needed to ensure we can add subdirs of existing dirs
7428                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7429                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7430                           cf_have_incdir=yes; break
7431                         fi
7432                   done
7433                 fi
7434
7435                 if test "$cf_have_incdir" = no ; then
7436           if test "$cf_add_incdir" = /usr/local/include ; then
7437                         if test "$GCC" = yes
7438                         then
7439                           cf_save_CPPFLAGS=$CPPFLAGS
7440                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7441                           cat >conftest.$ac_ext <<_ACEOF
7442 #line 7442 "configure"
7443 #include "confdefs.h"
7444 #include <stdio.h>
7445 int
7446 main ()
7447 {
7448 printf("Hello")
7449   ;
7450   return 0;
7451 }
7452 _ACEOF
7453 rm -f conftest.$ac_objext
7454 if { (eval echo "$as_me:7454: \"$ac_compile\"") >&5
7455   (eval $ac_compile) 2>&5
7456   ac_status=$?
7457   echo "$as_me:7457: \$? = $ac_status" >&5
7458   (exit $ac_status); } &&
7459          { ac_try='test -s conftest.$ac_objext'
7460   { (eval echo "$as_me:7460: \"$ac_try\"") >&5
7461   (eval $ac_try) 2>&5
7462   ac_status=$?
7463   echo "$as_me:7463: \$? = $ac_status" >&5
7464   (exit $ac_status); }; }; then
7465   :
7466 else
7467   echo "$as_me: failed program was:" >&5
7468 cat conftest.$ac_ext >&5
7469 cf_have_incdir=yes
7470 fi
7471 rm -f conftest.$ac_objext conftest.$ac_ext
7472                           CPPFLAGS=$cf_save_CPPFLAGS
7473                         fi
7474                   fi
7475                 fi
7476
7477                 if test "$cf_have_incdir" = no ; then
7478                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7479
7480 echo "${as_me-configure}:7480: testing adding $cf_add_incdir to include-path ..." 1>&5
7481
7482                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
7483
7484           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7485           test "$cf_top_incdir" = "$cf_add_incdir" && break
7486           cf_add_incdir="$cf_top_incdir"
7487                 else
7488                   break
7489                 fi
7490           fi
7491         done
7492   done
7493 fi
7494
7495 if test -n "$cf_cv_library_path_utf8" ; then
7496   for cf_add_libdir in $cf_cv_library_path_utf8
7497   do
7498     if test $cf_add_libdir = /usr/lib ; then
7499       :
7500     elif test -d $cf_add_libdir
7501     then
7502       cf_have_libdir=no
7503       if test -n "$LDFLAGS$LIBS" ; then
7504         # a loop is needed to ensure we can add subdirs of existing dirs
7505         for cf_test_libdir in $LDFLAGS $LIBS ; do
7506           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7507             cf_have_libdir=yes; break
7508           fi
7509         done
7510       fi
7511       if test "$cf_have_libdir" = no ; then
7512         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7513
7514 echo "${as_me-configure}:7514: testing adding $cf_add_libdir to library-path ..." 1>&5
7515
7516         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7517       fi
7518     fi
7519   done
7520 fi
7521
7522         LIBS="-lutf8 $LIBS"
7523 fi
7524
7525                 if test "$cf_cv_utf8_lib" != no ; then
7526                         NCURSES_LIBUTF8=1
7527                 fi
7528         fi
7529
7530 # This is needed on Tru64 5.0 to declare mbstate_t
7531 echo "$as_me:7531: checking if we must include wchar.h to declare mbstate_t" >&5
7532 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7533 if test "${cf_cv_mbstate_t+set}" = set; then
7534   echo $ECHO_N "(cached) $ECHO_C" >&6
7535 else
7536
7537 cat >conftest.$ac_ext <<_ACEOF
7538 #line 7538 "configure"
7539 #include "confdefs.h"
7540
7541 #include <stdlib.h>
7542 #include <stdarg.h>
7543 #include <stdio.h>
7544 #ifdef HAVE_LIBUTF8_H
7545 #include <libutf8.h>
7546 #endif
7547 int
7548 main ()
7549 {
7550 mbstate_t state
7551   ;
7552   return 0;
7553 }
7554 _ACEOF
7555 rm -f conftest.$ac_objext
7556 if { (eval echo "$as_me:7556: \"$ac_compile\"") >&5
7557   (eval $ac_compile) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit $ac_status); } &&
7561          { ac_try='test -s conftest.$ac_objext'
7562   { (eval echo "$as_me:7562: \"$ac_try\"") >&5
7563   (eval $ac_try) 2>&5
7564   ac_status=$?
7565   echo "$as_me:7565: \$? = $ac_status" >&5
7566   (exit $ac_status); }; }; then
7567   cf_cv_mbstate_t=no
7568 else
7569   echo "$as_me: failed program was:" >&5
7570 cat conftest.$ac_ext >&5
7571 cat >conftest.$ac_ext <<_ACEOF
7572 #line 7572 "configure"
7573 #include "confdefs.h"
7574
7575 #include <stdlib.h>
7576 #include <stdarg.h>
7577 #include <stdio.h>
7578 #include <wchar.h>
7579 #ifdef HAVE_LIBUTF8_H
7580 #include <libutf8.h>
7581 #endif
7582 int
7583 main ()
7584 {
7585 mbstate_t value
7586   ;
7587   return 0;
7588 }
7589 _ACEOF
7590 rm -f conftest.$ac_objext
7591 if { (eval echo "$as_me:7591: \"$ac_compile\"") >&5
7592   (eval $ac_compile) 2>&5
7593   ac_status=$?
7594   echo "$as_me:7594: \$? = $ac_status" >&5
7595   (exit $ac_status); } &&
7596          { ac_try='test -s conftest.$ac_objext'
7597   { (eval echo "$as_me:7597: \"$ac_try\"") >&5
7598   (eval $ac_try) 2>&5
7599   ac_status=$?
7600   echo "$as_me:7600: \$? = $ac_status" >&5
7601   (exit $ac_status); }; }; then
7602   cf_cv_mbstate_t=yes
7603 else
7604   echo "$as_me: failed program was:" >&5
7605 cat conftest.$ac_ext >&5
7606 cf_cv_mbstate_t=unknown
7607 fi
7608 rm -f conftest.$ac_objext conftest.$ac_ext
7609 fi
7610 rm -f conftest.$ac_objext conftest.$ac_ext
7611 fi
7612 echo "$as_me:7612: result: $cf_cv_mbstate_t" >&5
7613 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7614
7615 if test "$cf_cv_mbstate_t" = yes ; then
7616         cat >>confdefs.h <<\EOF
7617 #define NEED_WCHAR_H 1
7618 EOF
7619
7620         NEED_WCHAR_H=1
7621 fi
7622
7623 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7624 if test "$cf_cv_mbstate_t" = unknown ; then
7625         NCURSES_MBSTATE_T=1
7626 fi
7627
7628 # This is needed on Tru64 5.0 to declare wchar_t
7629 echo "$as_me:7629: checking if we must include wchar.h to declare wchar_t" >&5
7630 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7631 if test "${cf_cv_wchar_t+set}" = set; then
7632   echo $ECHO_N "(cached) $ECHO_C" >&6
7633 else
7634
7635 cat >conftest.$ac_ext <<_ACEOF
7636 #line 7636 "configure"
7637 #include "confdefs.h"
7638
7639 #include <stdlib.h>
7640 #include <stdarg.h>
7641 #include <stdio.h>
7642 #ifdef HAVE_LIBUTF8_H
7643 #include <libutf8.h>
7644 #endif
7645 int
7646 main ()
7647 {
7648 wchar_t state
7649   ;
7650   return 0;
7651 }
7652 _ACEOF
7653 rm -f conftest.$ac_objext
7654 if { (eval echo "$as_me:7654: \"$ac_compile\"") >&5
7655   (eval $ac_compile) 2>&5
7656   ac_status=$?
7657   echo "$as_me:7657: \$? = $ac_status" >&5
7658   (exit $ac_status); } &&
7659          { ac_try='test -s conftest.$ac_objext'
7660   { (eval echo "$as_me:7660: \"$ac_try\"") >&5
7661   (eval $ac_try) 2>&5
7662   ac_status=$?
7663   echo "$as_me:7663: \$? = $ac_status" >&5
7664   (exit $ac_status); }; }; then
7665   cf_cv_wchar_t=no
7666 else
7667   echo "$as_me: failed program was:" >&5
7668 cat conftest.$ac_ext >&5
7669 cat >conftest.$ac_ext <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672
7673 #include <stdlib.h>
7674 #include <stdarg.h>
7675 #include <stdio.h>
7676 #include <wchar.h>
7677 #ifdef HAVE_LIBUTF8_H
7678 #include <libutf8.h>
7679 #endif
7680 int
7681 main ()
7682 {
7683 wchar_t value
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 rm -f conftest.$ac_objext
7689 if { (eval echo "$as_me:7689: \"$ac_compile\"") >&5
7690   (eval $ac_compile) 2>&5
7691   ac_status=$?
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit $ac_status); } &&
7694          { ac_try='test -s conftest.$ac_objext'
7695   { (eval echo "$as_me:7695: \"$ac_try\"") >&5
7696   (eval $ac_try) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit $ac_status); }; }; then
7700   cf_cv_wchar_t=yes
7701 else
7702   echo "$as_me: failed program was:" >&5
7703 cat conftest.$ac_ext >&5
7704 cf_cv_wchar_t=unknown
7705 fi
7706 rm -f conftest.$ac_objext conftest.$ac_ext
7707 fi
7708 rm -f conftest.$ac_objext conftest.$ac_ext
7709 fi
7710 echo "$as_me:7710: result: $cf_cv_wchar_t" >&5
7711 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7712
7713 if test "$cf_cv_wchar_t" = yes ; then
7714         cat >>confdefs.h <<\EOF
7715 #define NEED_WCHAR_H 1
7716 EOF
7717
7718         NEED_WCHAR_H=1
7719 fi
7720
7721 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7722 if test "$cf_cv_wchar_t" = unknown ; then
7723         NCURSES_WCHAR_T=1
7724 fi
7725
7726 # if we find wchar_t in either place, use substitution to provide a fallback.
7727 if test "$cf_cv_wchar_t" != unknown ; then
7728         NCURSES_OK_WCHAR_T=1
7729 fi
7730
7731 # This is needed on Tru64 5.0 to declare wint_t
7732 echo "$as_me:7732: checking if we must include wchar.h to declare wint_t" >&5
7733 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7734 if test "${cf_cv_wint_t+set}" = set; then
7735   echo $ECHO_N "(cached) $ECHO_C" >&6
7736 else
7737
7738 cat >conftest.$ac_ext <<_ACEOF
7739 #line 7739 "configure"
7740 #include "confdefs.h"
7741
7742 #include <stdlib.h>
7743 #include <stdarg.h>
7744 #include <stdio.h>
7745 #ifdef HAVE_LIBUTF8_H
7746 #include <libutf8.h>
7747 #endif
7748 int
7749 main ()
7750 {
7751 wint_t state
7752   ;
7753   return 0;
7754 }
7755 _ACEOF
7756 rm -f conftest.$ac_objext
7757 if { (eval echo "$as_me:7757: \"$ac_compile\"") >&5
7758   (eval $ac_compile) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } &&
7762          { ac_try='test -s conftest.$ac_objext'
7763   { (eval echo "$as_me:7763: \"$ac_try\"") >&5
7764   (eval $ac_try) 2>&5
7765   ac_status=$?
7766   echo "$as_me:7766: \$? = $ac_status" >&5
7767   (exit $ac_status); }; }; then
7768   cf_cv_wint_t=no
7769 else
7770   echo "$as_me: failed program was:" >&5
7771 cat conftest.$ac_ext >&5
7772 cat >conftest.$ac_ext <<_ACEOF
7773 #line 7773 "configure"
7774 #include "confdefs.h"
7775
7776 #include <stdlib.h>
7777 #include <stdarg.h>
7778 #include <stdio.h>
7779 #include <wchar.h>
7780 #ifdef HAVE_LIBUTF8_H
7781 #include <libutf8.h>
7782 #endif
7783 int
7784 main ()
7785 {
7786 wint_t value
7787   ;
7788   return 0;
7789 }
7790 _ACEOF
7791 rm -f conftest.$ac_objext
7792 if { (eval echo "$as_me:7792: \"$ac_compile\"") >&5
7793   (eval $ac_compile) 2>&5
7794   ac_status=$?
7795   echo "$as_me:7795: \$? = $ac_status" >&5
7796   (exit $ac_status); } &&
7797          { ac_try='test -s conftest.$ac_objext'
7798   { (eval echo "$as_me:7798: \"$ac_try\"") >&5
7799   (eval $ac_try) 2>&5
7800   ac_status=$?
7801   echo "$as_me:7801: \$? = $ac_status" >&5
7802   (exit $ac_status); }; }; then
7803   cf_cv_wint_t=yes
7804 else
7805   echo "$as_me: failed program was:" >&5
7806 cat conftest.$ac_ext >&5
7807 cf_cv_wint_t=unknown
7808 fi
7809 rm -f conftest.$ac_objext conftest.$ac_ext
7810 fi
7811 rm -f conftest.$ac_objext conftest.$ac_ext
7812 fi
7813 echo "$as_me:7813: result: $cf_cv_wint_t" >&5
7814 echo "${ECHO_T}$cf_cv_wint_t" >&6
7815
7816 if test "$cf_cv_wint_t" = yes ; then
7817         cat >>confdefs.h <<\EOF
7818 #define NEED_WCHAR_H 1
7819 EOF
7820
7821         NEED_WCHAR_H=1
7822 fi
7823
7824 # if we do not find wint_t in either place, use substitution to provide a fallback.
7825 if test "$cf_cv_wint_t" = unknown ; then
7826         NCURSES_WINT_T=1
7827 fi
7828
7829 # if we find wint_t in either place, use substitution to provide a fallback.
7830 if test "$cf_cv_wint_t" != unknown ; then
7831         NCURSES_OK_WINT_T=1
7832 fi
7833
7834         if test "$NCURSES_MBSTATE_T" != 0; then
7835                 cat >>confdefs.h <<\EOF
7836 #define NEED_MBSTATE_T_DEF 1
7837 EOF
7838
7839         fi
7840 fi
7841
7842 ###   use option --disable-lp64 to allow long chtype
7843 case $cf_cv_abi_version in
7844 [345]*)
7845         default_with_lp64=no
7846         ;;
7847 *)
7848         default_with_lp64=yes
7849         ;;
7850 esac
7851
7852 echo "$as_me:7852: checking whether to enable _LP64 definition in curses.h" >&5
7853 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7854
7855 # Check whether --enable-lp64 or --disable-lp64 was given.
7856 if test "${enable_lp64+set}" = set; then
7857   enableval="$enable_lp64"
7858   with_lp64=$enableval
7859 else
7860   with_lp64=$default_with_lp64
7861 fi;
7862 echo "$as_me:7862: result: $with_lp64" >&5
7863 echo "${ECHO_T}$with_lp64" >&6
7864
7865 if test "$with_lp64" = yes ; then
7866         cf_cv_enable_lp64=1
7867 else
7868         cf_cv_enable_lp64=0
7869 fi
7870
7871 # Check whether --enable-largefile or --disable-largefile was given.
7872 if test "${enable_largefile+set}" = set; then
7873   enableval="$enable_largefile"
7874
7875 fi;
7876 if test "$enable_largefile" != no; then
7877
7878   echo "$as_me:7878: checking for special C compiler options needed for large files" >&5
7879 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7880 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7881   echo $ECHO_N "(cached) $ECHO_C" >&6
7882 else
7883   ac_cv_sys_largefile_CC=no
7884      if test "$GCC" != yes; then
7885        ac_save_CC=$CC
7886        while :; do
7887          # IRIX 6.2 and later do not support large files by default,
7888          # so use the C compiler's -n32 option if that helps.
7889          cat >conftest.$ac_ext <<_ACEOF
7890 #line 7890 "configure"
7891 #include "confdefs.h"
7892 #include <sys/types.h>
7893  /* Check that off_t can represent 2**63 - 1 correctly.
7894     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7895     since some C++ compilers masquerading as C compilers
7896     incorrectly reject 9223372036854775807.  */
7897 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7898   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7899                        && LARGE_OFF_T % 2147483647 == 1)
7900                       ? 1 : -1];
7901 int
7902 main ()
7903 {
7904
7905   ;
7906   return 0;
7907 }
7908 _ACEOF
7909          rm -f conftest.$ac_objext
7910 if { (eval echo "$as_me:7910: \"$ac_compile\"") >&5
7911   (eval $ac_compile) 2>&5
7912   ac_status=$?
7913   echo "$as_me:7913: \$? = $ac_status" >&5
7914   (exit $ac_status); } &&
7915          { ac_try='test -s conftest.$ac_objext'
7916   { (eval echo "$as_me:7916: \"$ac_try\"") >&5
7917   (eval $ac_try) 2>&5
7918   ac_status=$?
7919   echo "$as_me:7919: \$? = $ac_status" >&5
7920   (exit $ac_status); }; }; then
7921   break
7922 else
7923   echo "$as_me: failed program was:" >&5
7924 cat conftest.$ac_ext >&5
7925 fi
7926 rm -f conftest.$ac_objext
7927          CC="$CC -n32"
7928          rm -f conftest.$ac_objext
7929 if { (eval echo "$as_me:7929: \"$ac_compile\"") >&5
7930   (eval $ac_compile) 2>&5
7931   ac_status=$?
7932   echo "$as_me:7932: \$? = $ac_status" >&5
7933   (exit $ac_status); } &&
7934          { ac_try='test -s conftest.$ac_objext'
7935   { (eval echo "$as_me:7935: \"$ac_try\"") >&5
7936   (eval $ac_try) 2>&5
7937   ac_status=$?
7938   echo "$as_me:7938: \$? = $ac_status" >&5
7939   (exit $ac_status); }; }; then
7940   ac_cv_sys_largefile_CC=' -n32'; break
7941 else
7942   echo "$as_me: failed program was:" >&5
7943 cat conftest.$ac_ext >&5
7944 fi
7945 rm -f conftest.$ac_objext
7946          break
7947        done
7948        CC=$ac_save_CC
7949        rm -f conftest.$ac_ext
7950     fi
7951 fi
7952 echo "$as_me:7952: result: $ac_cv_sys_largefile_CC" >&5
7953 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7954   if test "$ac_cv_sys_largefile_CC" != no; then
7955     CC=$CC$ac_cv_sys_largefile_CC
7956   fi
7957
7958   echo "$as_me:7958: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7959 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7960 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7961   echo $ECHO_N "(cached) $ECHO_C" >&6
7962 else
7963   while :; do
7964   ac_cv_sys_file_offset_bits=no
7965   cat >conftest.$ac_ext <<_ACEOF
7966 #line 7966 "configure"
7967 #include "confdefs.h"
7968 #include <sys/types.h>
7969  /* Check that off_t can represent 2**63 - 1 correctly.
7970     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7971     since some C++ compilers masquerading as C compilers
7972     incorrectly reject 9223372036854775807.  */
7973 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7974   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7975                        && LARGE_OFF_T % 2147483647 == 1)
7976                       ? 1 : -1];
7977 int
7978 main ()
7979 {
7980
7981   ;
7982   return 0;
7983 }
7984 _ACEOF
7985 rm -f conftest.$ac_objext
7986 if { (eval echo "$as_me:7986: \"$ac_compile\"") >&5
7987   (eval $ac_compile) 2>&5
7988   ac_status=$?
7989   echo "$as_me:7989: \$? = $ac_status" >&5
7990   (exit $ac_status); } &&
7991          { ac_try='test -s conftest.$ac_objext'
7992   { (eval echo "$as_me:7992: \"$ac_try\"") >&5
7993   (eval $ac_try) 2>&5
7994   ac_status=$?
7995   echo "$as_me:7995: \$? = $ac_status" >&5
7996   (exit $ac_status); }; }; then
7997   break
7998 else
7999   echo "$as_me: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8001 fi
8002 rm -f conftest.$ac_objext conftest.$ac_ext
8003   cat >conftest.$ac_ext <<_ACEOF
8004 #line 8004 "configure"
8005 #include "confdefs.h"
8006 #define _FILE_OFFSET_BITS 64
8007 #include <sys/types.h>
8008  /* Check that off_t can represent 2**63 - 1 correctly.
8009     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8010     since some C++ compilers masquerading as C compilers
8011     incorrectly reject 9223372036854775807.  */
8012 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8013   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8014                        && LARGE_OFF_T % 2147483647 == 1)
8015                       ? 1 : -1];
8016 int
8017 main ()
8018 {
8019
8020   ;
8021   return 0;
8022 }
8023 _ACEOF
8024 rm -f conftest.$ac_objext
8025 if { (eval echo "$as_me:8025: \"$ac_compile\"") >&5
8026   (eval $ac_compile) 2>&5
8027   ac_status=$?
8028   echo "$as_me:8028: \$? = $ac_status" >&5
8029   (exit $ac_status); } &&
8030          { ac_try='test -s conftest.$ac_objext'
8031   { (eval echo "$as_me:8031: \"$ac_try\"") >&5
8032   (eval $ac_try) 2>&5
8033   ac_status=$?
8034   echo "$as_me:8034: \$? = $ac_status" >&5
8035   (exit $ac_status); }; }; then
8036   ac_cv_sys_file_offset_bits=64; break
8037 else
8038   echo "$as_me: failed program was:" >&5
8039 cat conftest.$ac_ext >&5
8040 fi
8041 rm -f conftest.$ac_objext conftest.$ac_ext
8042   break
8043 done
8044 fi
8045 echo "$as_me:8045: result: $ac_cv_sys_file_offset_bits" >&5
8046 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8047 if test "$ac_cv_sys_file_offset_bits" != no; then
8048
8049 cat >>confdefs.h <<EOF
8050 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8051 EOF
8052
8053 fi
8054 rm -f conftest*
8055   echo "$as_me:8055: checking for _LARGE_FILES value needed for large files" >&5
8056 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8057 if test "${ac_cv_sys_large_files+set}" = set; then
8058   echo $ECHO_N "(cached) $ECHO_C" >&6
8059 else
8060   while :; do
8061   ac_cv_sys_large_files=no
8062   cat >conftest.$ac_ext <<_ACEOF
8063 #line 8063 "configure"
8064 #include "confdefs.h"
8065 #include <sys/types.h>
8066  /* Check that off_t can represent 2**63 - 1 correctly.
8067     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8068     since some C++ compilers masquerading as C compilers
8069     incorrectly reject 9223372036854775807.  */
8070 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8071   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8072                        && LARGE_OFF_T % 2147483647 == 1)
8073                       ? 1 : -1];
8074 int
8075 main ()
8076 {
8077
8078   ;
8079   return 0;
8080 }
8081 _ACEOF
8082 rm -f conftest.$ac_objext
8083 if { (eval echo "$as_me:8083: \"$ac_compile\"") >&5
8084   (eval $ac_compile) 2>&5
8085   ac_status=$?
8086   echo "$as_me:8086: \$? = $ac_status" >&5
8087   (exit $ac_status); } &&
8088          { ac_try='test -s conftest.$ac_objext'
8089   { (eval echo "$as_me:8089: \"$ac_try\"") >&5
8090   (eval $ac_try) 2>&5
8091   ac_status=$?
8092   echo "$as_me:8092: \$? = $ac_status" >&5
8093   (exit $ac_status); }; }; then
8094   break
8095 else
8096   echo "$as_me: failed program was:" >&5
8097 cat conftest.$ac_ext >&5
8098 fi
8099 rm -f conftest.$ac_objext conftest.$ac_ext
8100   cat >conftest.$ac_ext <<_ACEOF
8101 #line 8101 "configure"
8102 #include "confdefs.h"
8103 #define _LARGE_FILES 1
8104 #include <sys/types.h>
8105  /* Check that off_t can represent 2**63 - 1 correctly.
8106     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8107     since some C++ compilers masquerading as C compilers
8108     incorrectly reject 9223372036854775807.  */
8109 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8110   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8111                        && LARGE_OFF_T % 2147483647 == 1)
8112                       ? 1 : -1];
8113 int
8114 main ()
8115 {
8116
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 rm -f conftest.$ac_objext
8122 if { (eval echo "$as_me:8122: \"$ac_compile\"") >&5
8123   (eval $ac_compile) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit $ac_status); } &&
8127          { ac_try='test -s conftest.$ac_objext'
8128   { (eval echo "$as_me:8128: \"$ac_try\"") >&5
8129   (eval $ac_try) 2>&5
8130   ac_status=$?
8131   echo "$as_me:8131: \$? = $ac_status" >&5
8132   (exit $ac_status); }; }; then
8133   ac_cv_sys_large_files=1; break
8134 else
8135   echo "$as_me: failed program was:" >&5
8136 cat conftest.$ac_ext >&5
8137 fi
8138 rm -f conftest.$ac_objext conftest.$ac_ext
8139   break
8140 done
8141 fi
8142 echo "$as_me:8142: result: $ac_cv_sys_large_files" >&5
8143 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8144 if test "$ac_cv_sys_large_files" != no; then
8145
8146 cat >>confdefs.h <<EOF
8147 #define _LARGE_FILES $ac_cv_sys_large_files
8148 EOF
8149
8150 fi
8151 rm -f conftest*
8152 fi
8153
8154     if test "$enable_largefile" != no ; then
8155         echo "$as_me:8155: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8156 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8157 if test "${ac_cv_sys_largefile_source+set}" = set; then
8158   echo $ECHO_N "(cached) $ECHO_C" >&6
8159 else
8160   while :; do
8161   ac_cv_sys_largefile_source=no
8162   cat >conftest.$ac_ext <<_ACEOF
8163 #line 8163 "configure"
8164 #include "confdefs.h"
8165 #include <stdio.h>
8166 int
8167 main ()
8168 {
8169 return !fseeko;
8170   ;
8171   return 0;
8172 }
8173 _ACEOF
8174 rm -f conftest.$ac_objext
8175 if { (eval echo "$as_me:8175: \"$ac_compile\"") >&5
8176   (eval $ac_compile) 2>&5
8177   ac_status=$?
8178   echo "$as_me:8178: \$? = $ac_status" >&5
8179   (exit $ac_status); } &&
8180          { ac_try='test -s conftest.$ac_objext'
8181   { (eval echo "$as_me:8181: \"$ac_try\"") >&5
8182   (eval $ac_try) 2>&5
8183   ac_status=$?
8184   echo "$as_me:8184: \$? = $ac_status" >&5
8185   (exit $ac_status); }; }; then
8186   break
8187 else
8188   echo "$as_me: failed program was:" >&5
8189 cat conftest.$ac_ext >&5
8190 fi
8191 rm -f conftest.$ac_objext conftest.$ac_ext
8192   cat >conftest.$ac_ext <<_ACEOF
8193 #line 8193 "configure"
8194 #include "confdefs.h"
8195 #define _LARGEFILE_SOURCE 1
8196 #include <stdio.h>
8197 int
8198 main ()
8199 {
8200 return !fseeko;
8201   ;
8202   return 0;
8203 }
8204 _ACEOF
8205 rm -f conftest.$ac_objext
8206 if { (eval echo "$as_me:8206: \"$ac_compile\"") >&5
8207   (eval $ac_compile) 2>&5
8208   ac_status=$?
8209   echo "$as_me:8209: \$? = $ac_status" >&5
8210   (exit $ac_status); } &&
8211          { ac_try='test -s conftest.$ac_objext'
8212   { (eval echo "$as_me:8212: \"$ac_try\"") >&5
8213   (eval $ac_try) 2>&5
8214   ac_status=$?
8215   echo "$as_me:8215: \$? = $ac_status" >&5
8216   (exit $ac_status); }; }; then
8217   ac_cv_sys_largefile_source=1; break
8218 else
8219   echo "$as_me: failed program was:" >&5
8220 cat conftest.$ac_ext >&5
8221 fi
8222 rm -f conftest.$ac_objext conftest.$ac_ext
8223   break
8224 done
8225 fi
8226 echo "$as_me:8226: result: $ac_cv_sys_largefile_source" >&5
8227 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8228 if test "$ac_cv_sys_largefile_source" != no; then
8229
8230 cat >>confdefs.h <<EOF
8231 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8232 EOF
8233
8234 fi
8235 rm -f conftest*
8236
8237 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8238 # in glibc 2.1.3, but that breaks too many other things.
8239 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8240 echo "$as_me:8240: checking for fseeko" >&5
8241 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8242 if test "${ac_cv_func_fseeko+set}" = set; then
8243   echo $ECHO_N "(cached) $ECHO_C" >&6
8244 else
8245   cat >conftest.$ac_ext <<_ACEOF
8246 #line 8246 "configure"
8247 #include "confdefs.h"
8248 #include <stdio.h>
8249 int
8250 main ()
8251 {
8252 return fseeko && fseeko (stdin, 0, 0);
8253   ;
8254   return 0;
8255 }
8256 _ACEOF
8257 rm -f conftest.$ac_objext conftest$ac_exeext
8258 if { (eval echo "$as_me:8258: \"$ac_link\"") >&5
8259   (eval $ac_link) 2>&5
8260   ac_status=$?
8261   echo "$as_me:8261: \$? = $ac_status" >&5
8262   (exit $ac_status); } &&
8263          { ac_try='test -s conftest$ac_exeext'
8264   { (eval echo "$as_me:8264: \"$ac_try\"") >&5
8265   (eval $ac_try) 2>&5
8266   ac_status=$?
8267   echo "$as_me:8267: \$? = $ac_status" >&5
8268   (exit $ac_status); }; }; then
8269   ac_cv_func_fseeko=yes
8270 else
8271   echo "$as_me: failed program was:" >&5
8272 cat conftest.$ac_ext >&5
8273 ac_cv_func_fseeko=no
8274 fi
8275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8276 fi
8277 echo "$as_me:8277: result: $ac_cv_func_fseeko" >&5
8278 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8279 if test $ac_cv_func_fseeko = yes; then
8280
8281 cat >>confdefs.h <<\EOF
8282 #define HAVE_FSEEKO 1
8283 EOF
8284
8285 fi
8286
8287         # Normally we would collect these definitions in the config.h,
8288         # but (like _XOPEN_SOURCE), some environments rely on having these
8289         # defined before any of the system headers are included.  Another
8290         # case comes up with C++, e.g., on AIX the compiler compiles the
8291         # header files by themselves before looking at the body files it is
8292         # told to compile.  For ncurses, those header files do not include
8293         # the config.h
8294         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8295         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8296         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8297
8298         echo "$as_me:8298: checking whether to use struct dirent64" >&5
8299 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8300 if test "${cf_cv_struct_dirent64+set}" = set; then
8301   echo $ECHO_N "(cached) $ECHO_C" >&6
8302 else
8303
8304                 cat >conftest.$ac_ext <<_ACEOF
8305 #line 8305 "configure"
8306 #include "confdefs.h"
8307
8308 #include <sys/types.h>
8309 #include <dirent.h>
8310
8311 int
8312 main ()
8313 {
8314
8315                 /* if transitional largefile support is setup, this is true */
8316                 extern struct dirent64 * readdir(DIR *);
8317                 struct dirent64 *x = readdir((DIR *)0);
8318                 struct dirent *y = readdir((DIR *)0);
8319                 int z = x - y;
8320
8321   ;
8322   return 0;
8323 }
8324 _ACEOF
8325 rm -f conftest.$ac_objext
8326 if { (eval echo "$as_me:8326: \"$ac_compile\"") >&5
8327   (eval $ac_compile) 2>&5
8328   ac_status=$?
8329   echo "$as_me:8329: \$? = $ac_status" >&5
8330   (exit $ac_status); } &&
8331          { ac_try='test -s conftest.$ac_objext'
8332   { (eval echo "$as_me:8332: \"$ac_try\"") >&5
8333   (eval $ac_try) 2>&5
8334   ac_status=$?
8335   echo "$as_me:8335: \$? = $ac_status" >&5
8336   (exit $ac_status); }; }; then
8337   cf_cv_struct_dirent64=yes
8338 else
8339   echo "$as_me: failed program was:" >&5
8340 cat conftest.$ac_ext >&5
8341 cf_cv_struct_dirent64=no
8342 fi
8343 rm -f conftest.$ac_objext conftest.$ac_ext
8344
8345 fi
8346 echo "$as_me:8346: result: $cf_cv_struct_dirent64" >&5
8347 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8348         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8349 #define HAVE_STRUCT_DIRENT64 1
8350 EOF
8351
8352     fi
8353
8354 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8355 echo "$as_me:8355: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8356 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8357
8358 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8359 if test "${enable_tparm_varargs+set}" = set; then
8360   enableval="$enable_tparm_varargs"
8361   with_tparm_varargs=$enableval
8362 else
8363   with_tparm_varargs=yes
8364 fi;
8365 echo "$as_me:8365: result: $with_tparm_varargs" >&5
8366 echo "${ECHO_T}$with_tparm_varargs" >&6
8367 NCURSES_TPARM_VARARGS=0
8368 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8369
8370 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8371 if test "$with_ticlib" != no ; then
8372 echo "$as_me:8372: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8373 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8374
8375 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8376 if test "${enable_tic_depends+set}" = set; then
8377   enableval="$enable_tic_depends"
8378   with_tic_depends=$enableval
8379 else
8380   with_tic_depends=yes
8381 fi;
8382 echo "$as_me:8382: result: $with_tic_depends" >&5
8383 echo "${ECHO_T}$with_tic_depends" >&6
8384 else
8385         with_tic_depends=no
8386 fi
8387
8388 ###   use option --with-bool to override bool's type
8389 echo "$as_me:8389: checking for type of bool" >&5
8390 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8391
8392 # Check whether --with-bool or --without-bool was given.
8393 if test "${with_bool+set}" = set; then
8394   withval="$with_bool"
8395   NCURSES_BOOL="$withval"
8396 else
8397   NCURSES_BOOL=auto
8398 fi;
8399 echo "$as_me:8399: result: $NCURSES_BOOL" >&5
8400 echo "${ECHO_T}$NCURSES_BOOL" >&6
8401
8402 echo "$as_me:8402: checking for alternate terminal capabilities file" >&5
8403 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8404
8405 # Check whether --with-caps or --without-caps was given.
8406 if test "${with_caps+set}" = set; then
8407   withval="$with_caps"
8408   TERMINFO_CAPS=Caps.$withval
8409 else
8410   TERMINFO_CAPS=Caps
8411 fi;
8412 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8413 echo "$as_me:8413: result: $TERMINFO_CAPS" >&5
8414 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8415
8416 ###   use option --with-chtype to override chtype's type
8417 echo "$as_me:8417: checking for type of chtype" >&5
8418 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8419
8420 # Check whether --with-chtype or --without-chtype was given.
8421 if test "${with_chtype+set}" = set; then
8422   withval="$with_chtype"
8423   NCURSES_CHTYPE="$withval"
8424 else
8425   NCURSES_CHTYPE=auto
8426 fi;
8427 echo "$as_me:8427: result: $NCURSES_CHTYPE" >&5
8428 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8429
8430 ###   use option --with-ospeed to override ospeed's type
8431 echo "$as_me:8431: checking for type of ospeed" >&5
8432 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8433
8434 # Check whether --with-ospeed or --without-ospeed was given.
8435 if test "${with_ospeed+set}" = set; then
8436   withval="$with_ospeed"
8437   NCURSES_OSPEED="$withval"
8438 else
8439   NCURSES_OSPEED=short
8440 fi;
8441 echo "$as_me:8441: result: $NCURSES_OSPEED" >&5
8442 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8443
8444 ###   use option --with-mmask-t to override mmask_t's type
8445 echo "$as_me:8445: checking for type of mmask_t" >&5
8446 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8447
8448 # Check whether --with-mmask-t or --without-mmask-t was given.
8449 if test "${with_mmask_t+set}" = set; then
8450   withval="$with_mmask_t"
8451   NCURSES_MMASK_T="$withval"
8452 else
8453   NCURSES_MMASK_T=auto
8454 fi;
8455 echo "$as_me:8455: result: $NCURSES_MMASK_T" >&5
8456 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8457
8458 ### Enable compiling-in rcs id's
8459 echo "$as_me:8459: checking if RCS identifiers should be compiled-in" >&5
8460 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8461
8462 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8463 if test "${with_rcs_ids+set}" = set; then
8464   withval="$with_rcs_ids"
8465   with_rcs_ids=$withval
8466 else
8467   with_rcs_ids=no
8468 fi;
8469 echo "$as_me:8469: result: $with_rcs_ids" >&5
8470 echo "${ECHO_T}$with_rcs_ids" >&6
8471 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8472 #define USE_RCS_IDS 1
8473 EOF
8474
8475 ###############################################################################
8476
8477 echo "$as_me:8477: checking format of man-pages" >&5
8478 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8479
8480 # Check whether --with-manpage-format or --without-manpage-format was given.
8481 if test "${with_manpage_format+set}" = set; then
8482   withval="$with_manpage_format"
8483   MANPAGE_FORMAT=$withval
8484 else
8485   MANPAGE_FORMAT=unknown
8486 fi;
8487
8488 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8489 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8490
8491 cf_unknown=
8492
8493 case $MANPAGE_FORMAT in
8494 unknown)
8495   if test -z "$MANPATH" ; then
8496     MANPATH="/usr/man:/usr/share/man"
8497   fi
8498
8499   # look for the 'date' man-page (it's most likely to be installed!)
8500   MANPAGE_FORMAT=
8501   cf_preform=no
8502   cf_catonly=yes
8503   cf_example=date
8504
8505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8506   for cf_dir in $MANPATH; do
8507     test -z "$cf_dir" && cf_dir=/usr/man
8508     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
8509     do
8510       cf_test=`echo $cf_name | sed -e 's/*//'`
8511       if test "x$cf_test" = "x$cf_name" ; then
8512
8513         case "$cf_name" in
8514         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8515         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8516         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8517         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8518         esac
8519
8520         case "$cf_name" in
8521         $cf_dir/man*)
8522           cf_catonly=no
8523           ;;
8524         $cf_dir/cat*)
8525           cf_preform=yes
8526           ;;
8527         esac
8528         break
8529       fi
8530
8531       # if we found a match in either man* or cat*, stop looking
8532       if test -n "$MANPAGE_FORMAT" ; then
8533         cf_found=no
8534         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8535         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8536         case "$cf_name" in
8537         $cf_dir/cat*)
8538           cf_found=yes
8539           ;;
8540         esac
8541         test $cf_found=yes && break
8542       fi
8543     done
8544     # only check the first directory in $MANPATH where we find manpages
8545     if test -n "$MANPAGE_FORMAT" ; then
8546        break
8547     fi
8548   done
8549   # if we did not find the example, just assume it is normal
8550   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8551   IFS="$ac_save_ifs"
8552   ;;
8553 *)
8554   for cf_option in $MANPAGE_FORMAT; do
8555      case $cf_option in #(vi
8556      gzip|compress|BSDI|normal|formatted|catonly)
8557        ;;
8558      *)
8559        cf_unknown="$cf_unknown $cf_option"
8560        ;;
8561      esac
8562   done
8563   ;;
8564 esac
8565
8566 echo "$as_me:8566: result: $MANPAGE_FORMAT" >&5
8567 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8568 if test -n "$cf_unknown" ; then
8569   { echo "$as_me:8569: WARNING: Unexpected manpage-format $cf_unknown" >&5
8570 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8571 fi
8572
8573 echo "$as_me:8573: checking for manpage renaming" >&5
8574 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8575
8576 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8577 if test "${with_manpage_renames+set}" = set; then
8578   withval="$with_manpage_renames"
8579   MANPAGE_RENAMES=$withval
8580 else
8581   MANPAGE_RENAMES=yes
8582 fi;
8583
8584 case ".$MANPAGE_RENAMES" in #(vi
8585 .no) #(vi
8586   ;;
8587 .|.yes)
8588   # Debian 'man' program?
8589   if test -f /etc/debian_version ; then
8590     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8591   else
8592     MANPAGE_RENAMES=no
8593   fi
8594   ;;
8595 esac
8596
8597 if test "$MANPAGE_RENAMES" != no ; then
8598   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8599     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8600   elif test ! -f $MANPAGE_RENAMES ; then
8601     { { echo "$as_me:8601: error: not a filename: $MANPAGE_RENAMES" >&5
8602 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8603    { (exit 1); exit 1; }; }
8604   fi
8605
8606   test ! -d man && mkdir man
8607
8608   # Construct a sed-script to perform renaming within man-pages
8609   if test -n "$MANPAGE_RENAMES" ; then
8610     test ! -d man && mkdir man
8611     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8612   fi
8613 fi
8614
8615 echo "$as_me:8615: result: $MANPAGE_RENAMES" >&5
8616 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8617
8618 echo "$as_me:8618: checking if manpage aliases will be installed" >&5
8619 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8620
8621 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8622 if test "${with_manpage_aliases+set}" = set; then
8623   withval="$with_manpage_aliases"
8624   MANPAGE_ALIASES=$withval
8625 else
8626   MANPAGE_ALIASES=yes
8627 fi;
8628
8629 echo "$as_me:8629: result: $MANPAGE_ALIASES" >&5
8630 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8631
8632 if test "$LN_S" = "ln -s"; then
8633         cf_use_symlinks=yes
8634 else
8635         cf_use_symlinks=no
8636 fi
8637
8638 MANPAGE_SYMLINKS=no
8639 if test "$MANPAGE_ALIASES" = yes ; then
8640 echo "$as_me:8640: checking if manpage symlinks should be used" >&5
8641 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8642
8643 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8644 if test "${with_manpage_symlinks+set}" = set; then
8645   withval="$with_manpage_symlinks"
8646   MANPAGE_SYMLINKS=$withval
8647 else
8648   MANPAGE_SYMLINKS=$cf_use_symlinks
8649 fi;
8650
8651 if test "$$cf_use_symlinks" = no; then
8652 if test "$MANPAGE_SYMLINKS" = yes ; then
8653         { echo "$as_me:8653: WARNING: cannot make symlinks" >&5
8654 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8655         MANPAGE_SYMLINKS=no
8656 fi
8657 fi
8658
8659 echo "$as_me:8659: result: $MANPAGE_SYMLINKS" >&5
8660 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8661 fi
8662
8663 echo "$as_me:8663: checking for manpage tbl" >&5
8664 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8665
8666 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8667 if test "${with_manpage_tbl+set}" = set; then
8668   withval="$with_manpage_tbl"
8669   MANPAGE_TBL=$withval
8670 else
8671   MANPAGE_TBL=no
8672 fi;
8673
8674 echo "$as_me:8674: result: $MANPAGE_TBL" >&5
8675 echo "${ECHO_T}$MANPAGE_TBL" >&6
8676
8677   if test "$prefix" = "NONE" ; then
8678      cf_prefix="$ac_default_prefix"
8679   else
8680      cf_prefix="$prefix"
8681   fi
8682
8683   case "$MANPAGE_FORMAT" in # (vi
8684   *catonly*) # (vi
8685     cf_format=yes
8686     cf_inboth=no
8687     ;;
8688   *formatted*) # (vi
8689     cf_format=yes
8690     cf_inboth=yes
8691     ;;
8692   *)
8693     cf_format=no
8694     cf_inboth=no
8695     ;;
8696   esac
8697
8698 test ! -d man && mkdir man
8699
8700 cf_so_strip=
8701 cf_compress=
8702 case "$MANPAGE_FORMAT" in #(vi
8703 *compress*) #(vi
8704         cf_so_strip="Z"
8705         cf_compress=compress
8706   ;;
8707 *gzip*) #(vi
8708         cf_so_strip="gz"
8709         cf_compress=gzip
8710   ;;
8711 esac
8712
8713 cf_edit_man=./edit_man.sh
8714 cf_man_alias=`pwd`/man_alias.sed
8715
8716 cat >$cf_edit_man <<CF_EOF
8717 #! /bin/sh
8718 # this script is generated by the configure-script CF_MAN_PAGES macro.
8719
8720 prefix="$cf_prefix"
8721 datadir="$datadir"
8722
8723 NCURSES_MAJOR="$NCURSES_MAJOR"
8724 NCURSES_MINOR="$NCURSES_MINOR"
8725 NCURSES_PATCH="$NCURSES_PATCH"
8726
8727 NCURSES_OSPEED="$NCURSES_OSPEED"
8728 TERMINFO="$TERMINFO"
8729
8730 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8731
8732 INSTALL="$INSTALL"
8733 INSTALL_DATA="$INSTALL_DATA"
8734
8735 transform="$program_transform_name"
8736
8737 TMP=\${TMPDIR-/tmp}/man\$\$
8738 trap "rm -f \$TMP" 0 1 2 5 15
8739
8740 form=\$1
8741 shift || exit 1
8742
8743 verb=\$1
8744 shift || exit 1
8745
8746 mandir=\$1
8747 shift || exit 1
8748
8749 srcdir=\$1
8750 top_srcdir=\$srcdir/..
8751 shift || exit 1
8752
8753 if test "\$form" = normal ; then
8754         if test "$cf_format" = yes ; then
8755         if test "$cf_inboth" = no ; then
8756                 sh \$0 format \$verb \$mandir \$srcdir \$*
8757                 exit $?
8758         fi
8759         fi
8760         cf_subdir=\$mandir/man
8761         cf_tables=$MANPAGE_TBL
8762 else
8763         cf_subdir=\$mandir/cat
8764         cf_tables=yes
8765 fi
8766
8767 # process the list of source-files
8768 for i in \$* ; do
8769 case \$i in #(vi
8770 *.orig|*.rej) ;; #(vi
8771 *.[0-9]*)
8772         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8773         if test \$verb = installing ; then
8774         if test ! -d \$cf_subdir\${section} ; then
8775                 \$MKDIRS \$cf_subdir\$section
8776         fi
8777         fi
8778
8779         # replace variables in man page
8780         if test ! -f $cf_man_alias ; then
8781 cat >>$cf_man_alias <<-CF_EOF2
8782                 s,@DATADIR@,\$datadir,g
8783                 s,@TERMINFO@,\$TERMINFO,g
8784                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8785                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8786                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8787                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8788 CF_EOF
8789
8790         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
8791         do
8792                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8793                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8794 cat >>$cf_edit_man <<-CF_EOF
8795                 s,@$cf_NAME@,$cf_name,
8796 CF_EOF
8797         done
8798
8799 cat >>$cf_edit_man <<CF_EOF
8800 CF_EOF2
8801                 echo "...made $cf_man_alias"
8802         fi
8803
8804         aliases=
8805         cf_source=\`basename \$i\`
8806         inalias=\$cf_source
8807         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8808         if test ! -f \$inalias ; then
8809                 echo .. skipped \$cf_source
8810                 continue
8811         fi
8812 CF_EOF
8813
8814 if test "$MANPAGE_ALIASES" != no ; then
8815 cat >>$cf_edit_man <<CF_EOF
8816         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8817 CF_EOF
8818 fi
8819
8820 if test "$MANPAGE_RENAMES" = no ; then
8821 cat >>$cf_edit_man <<CF_EOF
8822         # perform program transformations for section 1 man pages
8823         if test \$section = 1 ; then
8824                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8825         else
8826                 cf_target=\$cf_subdir\${section}/\$cf_source
8827         fi
8828 CF_EOF
8829 else
8830 cat >>$cf_edit_man <<CF_EOF
8831         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8832         if test -z "\$cf_target" ; then
8833                 echo '? missing rename for '\$cf_source
8834                 cf_target="\$cf_source"
8835         fi
8836         cf_target="\$cf_subdir\${section}/\${cf_target}"
8837
8838 CF_EOF
8839 fi
8840
8841 cat >>$cf_edit_man <<CF_EOF
8842         sed     -f $cf_man_alias \\
8843 CF_EOF
8844
8845 if test -f $MANPAGE_RENAMES ; then
8846 cat >>$cf_edit_man <<CF_EOF
8847                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8848 CF_EOF
8849 else
8850 cat >>$cf_edit_man <<CF_EOF
8851                 < \$i >\$TMP
8852 CF_EOF
8853 fi
8854
8855 cat >>$cf_edit_man <<CF_EOF
8856 if test \$cf_tables = yes ; then
8857         tbl \$TMP >\$TMP.out
8858         mv \$TMP.out \$TMP
8859 fi
8860 CF_EOF
8861
8862 if test $with_curses_h != yes ; then
8863 cat >>$cf_edit_man <<CF_EOF
8864         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8865         mv \$TMP.out \$TMP
8866 CF_EOF
8867 fi
8868
8869 cat >>$cf_edit_man <<CF_EOF
8870         if test \$form = format ; then
8871                 nroff -man \$TMP >\$TMP.out
8872                 mv \$TMP.out \$TMP
8873         fi
8874 CF_EOF
8875
8876 if test -n "$cf_compress" ; then
8877 cat >>$cf_edit_man <<CF_EOF
8878         if test \$verb = installing ; then
8879         if ( $cf_compress -f \$TMP )
8880         then
8881                 mv \$TMP.$cf_so_strip \$TMP
8882         fi
8883         fi
8884         cf_target="\$cf_target.$cf_so_strip"
8885 CF_EOF
8886 fi
8887
8888 case "$MANPAGE_FORMAT" in #(vi
8889 *BSDI*)
8890 cat >>$cf_edit_man <<CF_EOF
8891         if test \$form = format ; then
8892                 # BSDI installs only .0 suffixes in the cat directories
8893                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8894         fi
8895 CF_EOF
8896   ;;
8897 esac
8898
8899 cat >>$cf_edit_man <<CF_EOF
8900         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8901         if test \$verb = installing ; then
8902                 echo \$verb \$cf_target
8903                 \$INSTALL_DATA \$TMP \$cf_target
8904                 test -d \$cf_subdir\${section} &&
8905                 test -n "\$aliases" && (
8906                         cd \$cf_subdir\${section} && (
8907                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8908                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8909                                 cf_target=\`basename \$cf_target\`
8910                                 for cf_alias in \$aliases
8911                                 do
8912                                         if test \$section = 1 ; then
8913                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8914                                         fi
8915
8916                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8917                                                 if test -f \$cf_alias\${suffix} ; then
8918                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8919                                                         then
8920                                                                 continue
8921                                                         fi
8922                                                 fi
8923                                                 echo .. \$verb alias \$cf_alias\${suffix}
8924                                                 rm -f \$cf_alias\${suffix}
8925                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8926                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8927                                                 echo ".so \$cf_source" >\$TMP
8928 CF_EOF
8929 if test -n "$cf_compress" ; then
8930 cat >>$cf_edit_man <<CF_EOF
8931                                                 if test -n "$cf_so_strip" ; then
8932                                                         $cf_compress -f \$TMP
8933                                                         mv \$TMP.$cf_so_strip \$TMP
8934                                                 fi
8935 CF_EOF
8936 fi
8937 cat >>$cf_edit_man <<CF_EOF
8938                                                 echo .. \$verb alias \$cf_alias\${suffix}
8939                                                 rm -f \$cf_alias\${suffix}
8940                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8941                                         fi
8942                                 done
8943                         )
8944                 )
8945         elif test \$verb = removing ; then
8946                 test -f \$cf_target && (
8947                         echo \$verb \$cf_target
8948                         rm -f \$cf_target
8949                 )
8950                 test -d \$cf_subdir\${section} &&
8951                 test -n "\$aliases" && (
8952                         cd \$cf_subdir\${section} && (
8953                                 for cf_alias in \$aliases
8954                                 do
8955                                         if test \$section = 1 ; then
8956                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8957                                         fi
8958
8959                                         echo .. \$verb alias \$cf_alias\${suffix}
8960                                         rm -f \$cf_alias\${suffix}
8961                                 done
8962                         )
8963                 )
8964         else
8965 #               echo ".hy 0"
8966                 cat \$TMP
8967         fi
8968         ;;
8969 esac
8970 done
8971
8972 if test $cf_inboth = yes ; then
8973 if test \$form != format ; then
8974         sh \$0 format \$verb \$mandir \$srcdir \$*
8975 fi
8976 fi
8977
8978 exit 0
8979 CF_EOF
8980 chmod 755 $cf_edit_man
8981
8982 ###############################################################################
8983
8984 ### Note that some functions (such as const) are normally disabled anyway.
8985 echo "$as_me:8985: checking if you want to build with function extensions" >&5
8986 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8987
8988 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8989 if test "${enable_ext_funcs+set}" = set; then
8990   enableval="$enable_ext_funcs"
8991   with_ext_funcs=$enableval
8992 else
8993   with_ext_funcs=yes
8994 fi;
8995 echo "$as_me:8995: result: $with_ext_funcs" >&5
8996 echo "${ECHO_T}$with_ext_funcs" >&6
8997 if test "$with_ext_funcs" = yes ; then
8998         NCURSES_EXT_FUNCS=1
8999         cat >>confdefs.h <<\EOF
9000 #define HAVE_CURSES_VERSION 1
9001 EOF
9002
9003         cat >>confdefs.h <<\EOF
9004 #define HAVE_HAS_KEY 1
9005 EOF
9006
9007         cat >>confdefs.h <<\EOF
9008 #define HAVE_RESIZETERM 1
9009 EOF
9010
9011         cat >>confdefs.h <<\EOF
9012 #define HAVE_RESIZE_TERM 1
9013 EOF
9014
9015         cat >>confdefs.h <<\EOF
9016 #define HAVE_USE_DEFAULT_COLORS 1
9017 EOF
9018
9019         cat >>confdefs.h <<\EOF
9020 #define HAVE_WRESIZE 1
9021 EOF
9022
9023         cat >>confdefs.h <<\EOF
9024 #define NCURSES_EXT_FUNCS 1
9025 EOF
9026
9027 else
9028         NCURSES_EXT_FUNCS=0
9029 fi
9030
9031 ###   use option --enable-const to turn on use of const beyond that in XSI.
9032 echo "$as_me:9032: checking for extended use of const keyword" >&5
9033 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9034
9035 # Check whether --enable-const or --disable-const was given.
9036 if test "${enable_const+set}" = set; then
9037   enableval="$enable_const"
9038   with_ext_const=$enableval
9039 else
9040   with_ext_const=no
9041 fi;
9042 echo "$as_me:9042: result: $with_ext_const" >&5
9043 echo "${ECHO_T}$with_ext_const" >&6
9044 NCURSES_CONST='/*nothing*/'
9045 if test "$with_ext_const" = yes ; then
9046         NCURSES_CONST=const
9047 fi
9048
9049 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9050 echo "$as_me:9050: checking if you want to use extended colors" >&5
9051 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9052
9053 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9054 if test "${enable_ext_colors+set}" = set; then
9055   enableval="$enable_ext_colors"
9056   with_ext_colors=$enableval
9057 else
9058   with_ext_colors=no
9059 fi;
9060 echo "$as_me:9060: result: $with_ext_colors" >&5
9061 echo "${ECHO_T}$with_ext_colors" >&6
9062 NCURSES_EXT_COLORS=0
9063 if test "$with_ext_colors" = yes ; then
9064         if test "$with_widec" != yes ; then
9065                 { { echo "$as_me:9065: error: This option applies only to wide-character library" >&5
9066 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9067    { (exit 1); exit 1; }; }
9068         else
9069                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9070
9071 if test "${with_abi_version+set}" != set; then
9072         case $cf_cv_rel_version in
9073         5.*)
9074                 cf_cv_rel_version=6.0
9075                 cf_cv_abi_version=6
9076                 { echo "$as_me:9076: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9077 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9078                 ;;
9079         esac
9080 fi
9081
9082         fi
9083         NCURSES_EXT_COLORS=1
9084         cat >>confdefs.h <<\EOF
9085 #define NCURSES_EXT_COLORS 1
9086 EOF
9087
9088 fi
9089
9090 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9091 echo "$as_me:9091: checking if you want to use extended mouse encoding" >&5
9092 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9093
9094 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9095 if test "${enable_ext_mouse+set}" = set; then
9096   enableval="$enable_ext_mouse"
9097   with_ext_mouse=$enableval
9098 else
9099   with_ext_mouse=no
9100 fi;
9101 echo "$as_me:9101: result: $with_ext_mouse" >&5
9102 echo "${ECHO_T}$with_ext_mouse" >&6
9103 NCURSES_MOUSE_VERSION=1
9104 if test "$with_ext_mouse" = yes ; then
9105         NCURSES_MOUSE_VERSION=2
9106
9107 if test "${with_abi_version+set}" != set; then
9108         case $cf_cv_rel_version in
9109         5.*)
9110                 cf_cv_rel_version=6.0
9111                 cf_cv_abi_version=6
9112                 { echo "$as_me:9112: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9113 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9114                 ;;
9115         esac
9116 fi
9117
9118 fi
9119
9120 echo "$as_me:9120: checking if you want \$NCURSES_NO_PADDING code" >&5
9121 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9122
9123 # Check whether --enable-no-padding or --disable-no-padding was given.
9124 if test "${enable_no_padding+set}" = set; then
9125   enableval="$enable_no_padding"
9126   with_no_padding=$enableval
9127 else
9128   with_no_padding=$with_ext_funcs
9129 fi;
9130 echo "$as_me:9130: result: $with_no_padding" >&5
9131 echo "${ECHO_T}$with_no_padding" >&6
9132 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9133 #define NCURSES_NO_PADDING 1
9134 EOF
9135
9136 echo "$as_me:9136: checking for ANSI C header files" >&5
9137 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9138 if test "${ac_cv_header_stdc+set}" = set; then
9139   echo $ECHO_N "(cached) $ECHO_C" >&6
9140 else
9141   cat >conftest.$ac_ext <<_ACEOF
9142 #line 9142 "configure"
9143 #include "confdefs.h"
9144 #include <stdlib.h>
9145 #include <stdarg.h>
9146 #include <string.h>
9147 #include <float.h>
9148
9149 _ACEOF
9150 if { (eval echo "$as_me:9150: \"$ac_cpp conftest.$ac_ext\"") >&5
9151   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9152   ac_status=$?
9153   egrep -v '^ *\+' conftest.er1 >conftest.err
9154   rm -f conftest.er1
9155   cat conftest.err >&5
9156   echo "$as_me:9156: \$? = $ac_status" >&5
9157   (exit $ac_status); } >/dev/null; then
9158   if test -s conftest.err; then
9159     ac_cpp_err=$ac_c_preproc_warn_flag
9160   else
9161     ac_cpp_err=
9162   fi
9163 else
9164   ac_cpp_err=yes
9165 fi
9166 if test -z "$ac_cpp_err"; then
9167   ac_cv_header_stdc=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170   cat conftest.$ac_ext >&5
9171   ac_cv_header_stdc=no
9172 fi
9173 rm -f conftest.err conftest.$ac_ext
9174
9175 if test $ac_cv_header_stdc = yes; then
9176   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9177   cat >conftest.$ac_ext <<_ACEOF
9178 #line 9178 "configure"
9179 #include "confdefs.h"
9180 #include <string.h>
9181
9182 _ACEOF
9183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9184   egrep "memchr" >/dev/null 2>&1; then
9185   :
9186 else
9187   ac_cv_header_stdc=no
9188 fi
9189 rm -f conftest*
9190
9191 fi
9192
9193 if test $ac_cv_header_stdc = yes; then
9194   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9195   cat >conftest.$ac_ext <<_ACEOF
9196 #line 9196 "configure"
9197 #include "confdefs.h"
9198 #include <stdlib.h>
9199
9200 _ACEOF
9201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9202   egrep "free" >/dev/null 2>&1; then
9203   :
9204 else
9205   ac_cv_header_stdc=no
9206 fi
9207 rm -f conftest*
9208
9209 fi
9210
9211 if test $ac_cv_header_stdc = yes; then
9212   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9213   if test "$cross_compiling" = yes; then
9214   :
9215 else
9216   cat >conftest.$ac_ext <<_ACEOF
9217 #line 9217 "configure"
9218 #include "confdefs.h"
9219 #include <ctype.h>
9220 #if ((' ' & 0x0FF) == 0x020)
9221 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9222 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9223 #else
9224 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9225                      || ('j' <= (c) && (c) <= 'r') \
9226                      || ('s' <= (c) && (c) <= 'z'))
9227 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9228 #endif
9229
9230 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9231 int
9232 main ()
9233 {
9234   int i;
9235   for (i = 0; i < 256; i++)
9236     if (XOR (islower (i), ISLOWER (i))
9237         || toupper (i) != TOUPPER (i))
9238       $ac_main_return(2);
9239   $ac_main_return (0);
9240 }
9241 _ACEOF
9242 rm -f conftest$ac_exeext
9243 if { (eval echo "$as_me:9243: \"$ac_link\"") >&5
9244   (eval $ac_link) 2>&5
9245   ac_status=$?
9246   echo "$as_me:9246: \$? = $ac_status" >&5
9247   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9248   { (eval echo "$as_me:9248: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   :
9254 else
9255   echo "$as_me: program exited with status $ac_status" >&5
9256 echo "$as_me: failed program was:" >&5
9257 cat conftest.$ac_ext >&5
9258 ac_cv_header_stdc=no
9259 fi
9260 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9261 fi
9262 fi
9263 fi
9264 echo "$as_me:9264: result: $ac_cv_header_stdc" >&5
9265 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9266 if test $ac_cv_header_stdc = yes; then
9267
9268 cat >>confdefs.h <<\EOF
9269 #define STDC_HEADERS 1
9270 EOF
9271
9272 fi
9273
9274 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9275
9276 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9277                   inttypes.h stdint.h unistd.h
9278 do
9279 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9280 echo "$as_me:9280: checking for $ac_header" >&5
9281 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9282 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9283   echo $ECHO_N "(cached) $ECHO_C" >&6
9284 else
9285   cat >conftest.$ac_ext <<_ACEOF
9286 #line 9286 "configure"
9287 #include "confdefs.h"
9288 $ac_includes_default
9289 #include <$ac_header>
9290 _ACEOF
9291 rm -f conftest.$ac_objext
9292 if { (eval echo "$as_me:9292: \"$ac_compile\"") >&5
9293   (eval $ac_compile) 2>&5
9294   ac_status=$?
9295   echo "$as_me:9295: \$? = $ac_status" >&5
9296   (exit $ac_status); } &&
9297          { ac_try='test -s conftest.$ac_objext'
9298   { (eval echo "$as_me:9298: \"$ac_try\"") >&5
9299   (eval $ac_try) 2>&5
9300   ac_status=$?
9301   echo "$as_me:9301: \$? = $ac_status" >&5
9302   (exit $ac_status); }; }; then
9303   eval "$as_ac_Header=yes"
9304 else
9305   echo "$as_me: failed program was:" >&5
9306 cat conftest.$ac_ext >&5
9307 eval "$as_ac_Header=no"
9308 fi
9309 rm -f conftest.$ac_objext conftest.$ac_ext
9310 fi
9311 echo "$as_me:9311: result: `eval echo '${'$as_ac_Header'}'`" >&5
9312 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9313 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9314   cat >>confdefs.h <<EOF
9315 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9316 EOF
9317
9318 fi
9319 done
9320
9321 echo "$as_me:9321: checking for signed char" >&5
9322 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9323 if test "${ac_cv_type_signed_char+set}" = set; then
9324   echo $ECHO_N "(cached) $ECHO_C" >&6
9325 else
9326   cat >conftest.$ac_ext <<_ACEOF
9327 #line 9327 "configure"
9328 #include "confdefs.h"
9329 $ac_includes_default
9330 int
9331 main ()
9332 {
9333 if ((signed char *) 0)
9334   return 0;
9335 if (sizeof (signed char))
9336   return 0;
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext
9342 if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
9343   (eval $ac_compile) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -s conftest.$ac_objext'
9348   { (eval echo "$as_me:9348: \"$ac_try\"") >&5
9349   (eval $ac_try) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); }; }; then
9353   ac_cv_type_signed_char=yes
9354 else
9355   echo "$as_me: failed program was:" >&5
9356 cat conftest.$ac_ext >&5
9357 ac_cv_type_signed_char=no
9358 fi
9359 rm -f conftest.$ac_objext conftest.$ac_ext
9360 fi
9361 echo "$as_me:9361: result: $ac_cv_type_signed_char" >&5
9362 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9363
9364 echo "$as_me:9364: checking size of signed char" >&5
9365 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9366 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9367   echo $ECHO_N "(cached) $ECHO_C" >&6
9368 else
9369   if test "$ac_cv_type_signed_char" = yes; then
9370   if test "$cross_compiling" = yes; then
9371   # Depending upon the size, compute the lo and hi bounds.
9372 cat >conftest.$ac_ext <<_ACEOF
9373 #line 9373 "configure"
9374 #include "confdefs.h"
9375 $ac_includes_default
9376 int
9377 main ()
9378 {
9379 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9380   ;
9381   return 0;
9382 }
9383 _ACEOF
9384 rm -f conftest.$ac_objext
9385 if { (eval echo "$as_me:9385: \"$ac_compile\"") >&5
9386   (eval $ac_compile) 2>&5
9387   ac_status=$?
9388   echo "$as_me:9388: \$? = $ac_status" >&5
9389   (exit $ac_status); } &&
9390          { ac_try='test -s conftest.$ac_objext'
9391   { (eval echo "$as_me:9391: \"$ac_try\"") >&5
9392   (eval $ac_try) 2>&5
9393   ac_status=$?
9394   echo "$as_me:9394: \$? = $ac_status" >&5
9395   (exit $ac_status); }; }; then
9396   ac_lo=0 ac_mid=0
9397   while :; do
9398     cat >conftest.$ac_ext <<_ACEOF
9399 #line 9399 "configure"
9400 #include "confdefs.h"
9401 $ac_includes_default
9402 int
9403 main ()
9404 {
9405 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9406   ;
9407   return 0;
9408 }
9409 _ACEOF
9410 rm -f conftest.$ac_objext
9411 if { (eval echo "$as_me:9411: \"$ac_compile\"") >&5
9412   (eval $ac_compile) 2>&5
9413   ac_status=$?
9414   echo "$as_me:9414: \$? = $ac_status" >&5
9415   (exit $ac_status); } &&
9416          { ac_try='test -s conftest.$ac_objext'
9417   { (eval echo "$as_me:9417: \"$ac_try\"") >&5
9418   (eval $ac_try) 2>&5
9419   ac_status=$?
9420   echo "$as_me:9420: \$? = $ac_status" >&5
9421   (exit $ac_status); }; }; then
9422   ac_hi=$ac_mid; break
9423 else
9424   echo "$as_me: failed program was:" >&5
9425 cat conftest.$ac_ext >&5
9426 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9427 fi
9428 rm -f conftest.$ac_objext conftest.$ac_ext
9429   done
9430 else
9431   echo "$as_me: failed program was:" >&5
9432 cat conftest.$ac_ext >&5
9433 ac_hi=-1 ac_mid=-1
9434   while :; do
9435     cat >conftest.$ac_ext <<_ACEOF
9436 #line 9436 "configure"
9437 #include "confdefs.h"
9438 $ac_includes_default
9439 int
9440 main ()
9441 {
9442 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9443   ;
9444   return 0;
9445 }
9446 _ACEOF
9447 rm -f conftest.$ac_objext
9448 if { (eval echo "$as_me:9448: \"$ac_compile\"") >&5
9449   (eval $ac_compile) 2>&5
9450   ac_status=$?
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); } &&
9453          { ac_try='test -s conftest.$ac_objext'
9454   { (eval echo "$as_me:9454: \"$ac_try\"") >&5
9455   (eval $ac_try) 2>&5
9456   ac_status=$?
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit $ac_status); }; }; then
9459   ac_lo=$ac_mid; break
9460 else
9461   echo "$as_me: failed program was:" >&5
9462 cat conftest.$ac_ext >&5
9463 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9464 fi
9465 rm -f conftest.$ac_objext conftest.$ac_ext
9466   done
9467 fi
9468 rm -f conftest.$ac_objext conftest.$ac_ext
9469 # Binary search between lo and hi bounds.
9470 while test "x$ac_lo" != "x$ac_hi"; do
9471   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9472   cat >conftest.$ac_ext <<_ACEOF
9473 #line 9473 "configure"
9474 #include "confdefs.h"
9475 $ac_includes_default
9476 int
9477 main ()
9478 {
9479 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9480   ;
9481   return 0;
9482 }
9483 _ACEOF
9484 rm -f conftest.$ac_objext
9485 if { (eval echo "$as_me:9485: \"$ac_compile\"") >&5
9486   (eval $ac_compile) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); } &&
9490          { ac_try='test -s conftest.$ac_objext'
9491   { (eval echo "$as_me:9491: \"$ac_try\"") >&5
9492   (eval $ac_try) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); }; }; then
9496   ac_hi=$ac_mid
9497 else
9498   echo "$as_me: failed program was:" >&5
9499 cat conftest.$ac_ext >&5
9500 ac_lo=`expr $ac_mid + 1`
9501 fi
9502 rm -f conftest.$ac_objext conftest.$ac_ext
9503 done
9504 ac_cv_sizeof_signed_char=$ac_lo
9505 else
9506   if test "$cross_compiling" = yes; then
9507   { { echo "$as_me:9507: error: cannot run test program while cross compiling" >&5
9508 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9509    { (exit 1); exit 1; }; }
9510 else
9511   cat >conftest.$ac_ext <<_ACEOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514 $ac_includes_default
9515 int
9516 main ()
9517 {
9518 FILE *f = fopen ("conftest.val", "w");
9519 if (!f)
9520   $ac_main_return (1);
9521 fprintf (f, "%d", (sizeof (signed char)));
9522 fclose (f);
9523   ;
9524   return 0;
9525 }
9526 _ACEOF
9527 rm -f conftest$ac_exeext
9528 if { (eval echo "$as_me:9528: \"$ac_link\"") >&5
9529   (eval $ac_link) 2>&5
9530   ac_status=$?
9531   echo "$as_me:9531: \$? = $ac_status" >&5
9532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9533   { (eval echo "$as_me:9533: \"$ac_try\"") >&5
9534   (eval $ac_try) 2>&5
9535   ac_status=$?
9536   echo "$as_me:9536: \$? = $ac_status" >&5
9537   (exit $ac_status); }; }; then
9538   ac_cv_sizeof_signed_char=`cat conftest.val`
9539 else
9540   echo "$as_me: program exited with status $ac_status" >&5
9541 echo "$as_me: failed program was:" >&5
9542 cat conftest.$ac_ext >&5
9543 fi
9544 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9545 fi
9546 fi
9547 rm -f conftest.val
9548 else
9549   ac_cv_sizeof_signed_char=0
9550 fi
9551 fi
9552 echo "$as_me:9552: result: $ac_cv_sizeof_signed_char" >&5
9553 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9554 cat >>confdefs.h <<EOF
9555 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9556 EOF
9557
9558 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9559         NCURSES_SBOOL="signed char"
9560 else
9561         NCURSES_SBOOL="char"
9562 fi
9563 echo "$as_me:9563: checking if you want to use signed Boolean array in term.h" >&5
9564 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9565
9566 # Check whether --enable-signed-char or --disable-signed-char was given.
9567 if test "${enable_signed_char+set}" = set; then
9568   enableval="$enable_signed_char"
9569   with_signed_char=$enableval
9570 else
9571   with_signed_char=no
9572 fi;
9573 echo "$as_me:9573: result: $with_signed_char" >&5
9574 echo "${ECHO_T}$with_signed_char" >&6
9575 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9576
9577 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9578 echo "$as_me:9578: checking if you want SIGWINCH handler" >&5
9579 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9580
9581 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9582 if test "${enable_sigwinch+set}" = set; then
9583   enableval="$enable_sigwinch"
9584   with_sigwinch=$enableval
9585 else
9586   with_sigwinch=$with_ext_funcs
9587 fi;
9588 echo "$as_me:9588: result: $with_sigwinch" >&5
9589 echo "${ECHO_T}$with_sigwinch" >&6
9590 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9591 #define USE_SIGWINCH 1
9592 EOF
9593
9594 ###   use option --enable-tcap-names to allow user to define new capabilities
9595 echo "$as_me:9595: checking if you want user-definable terminal capabilities like termcap" >&5
9596 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9597
9598 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9599 if test "${enable_tcap_names+set}" = set; then
9600   enableval="$enable_tcap_names"
9601   with_tcap_names=$enableval
9602 else
9603   with_tcap_names=$with_ext_funcs
9604 fi;
9605 echo "$as_me:9605: result: $with_tcap_names" >&5
9606 echo "${ECHO_T}$with_tcap_names" >&6
9607 NCURSES_XNAMES=0
9608 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9609
9610 ###############################################################################
9611 # These options are relatively safe to experiment with.
9612
9613 echo "$as_me:9613: checking if you want all development code" >&5
9614 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9615
9616 # Check whether --with-develop or --without-develop was given.
9617 if test "${with_develop+set}" = set; then
9618   withval="$with_develop"
9619   with_develop=$withval
9620 else
9621   with_develop=no
9622 fi;
9623 echo "$as_me:9623: result: $with_develop" >&5
9624 echo "${ECHO_T}$with_develop" >&6
9625
9626 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9627 echo "$as_me:9627: checking if you want hard-tabs code" >&5
9628 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9629
9630 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9631 if test "${enable_hard_tabs+set}" = set; then
9632   enableval="$enable_hard_tabs"
9633
9634 else
9635   enable_hard_tabs=$with_develop
9636 fi;
9637 echo "$as_me:9637: result: $enable_hard_tabs" >&5
9638 echo "${ECHO_T}$enable_hard_tabs" >&6
9639 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9640 #define USE_HARD_TABS 1
9641 EOF
9642
9643 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9644 echo "$as_me:9644: checking if you want limited support for xmc" >&5
9645 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9646
9647 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9648 if test "${enable_xmc_glitch+set}" = set; then
9649   enableval="$enable_xmc_glitch"
9650
9651 else
9652   enable_xmc_glitch=$with_develop
9653 fi;
9654 echo "$as_me:9654: result: $enable_xmc_glitch" >&5
9655 echo "${ECHO_T}$enable_xmc_glitch" >&6
9656 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9657 #define USE_XMC_SUPPORT 1
9658 EOF
9659
9660 ###############################################################################
9661 # These are just experimental, probably should not be in a package:
9662
9663 echo "$as_me:9663: checking if you do not want to assume colors are white-on-black" >&5
9664 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9665
9666 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9667 if test "${enable_assumed_color+set}" = set; then
9668   enableval="$enable_assumed_color"
9669   with_assumed_color=$enableval
9670 else
9671   with_assumed_color=yes
9672 fi;
9673 echo "$as_me:9673: result: $with_assumed_color" >&5
9674 echo "${ECHO_T}$with_assumed_color" >&6
9675 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9676 #define USE_ASSUMED_COLOR 1
9677 EOF
9678
9679 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9680 echo "$as_me:9680: checking if you want hashmap scrolling-optimization code" >&5
9681 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9682
9683 # Check whether --enable-hashmap or --disable-hashmap was given.
9684 if test "${enable_hashmap+set}" = set; then
9685   enableval="$enable_hashmap"
9686   with_hashmap=$enableval
9687 else
9688   with_hashmap=yes
9689 fi;
9690 echo "$as_me:9690: result: $with_hashmap" >&5
9691 echo "${ECHO_T}$with_hashmap" >&6
9692 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9693 #define USE_HASHMAP 1
9694 EOF
9695
9696 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9697 echo "$as_me:9697: checking if you want colorfgbg code" >&5
9698 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9699
9700 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9701 if test "${enable_colorfgbg+set}" = set; then
9702   enableval="$enable_colorfgbg"
9703   with_colorfgbg=$enableval
9704 else
9705   with_colorfgbg=no
9706 fi;
9707 echo "$as_me:9707: result: $with_colorfgbg" >&5
9708 echo "${ECHO_T}$with_colorfgbg" >&6
9709 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9710 #define USE_COLORFGBG 1
9711 EOF
9712
9713 # This is still experimental (20080329), but should ultimately be moved to
9714 # the script-block --with-normal, etc.
9715
9716 echo "$as_me:9716: checking if you want to link with the pthread library" >&5
9717 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9718
9719 # Check whether --with-pthread or --without-pthread was given.
9720 if test "${with_pthread+set}" = set; then
9721   withval="$with_pthread"
9722   with_pthread=$withval
9723 else
9724   with_pthread=no
9725 fi;
9726 echo "$as_me:9726: result: $with_pthread" >&5
9727 echo "${ECHO_T}$with_pthread" >&6
9728
9729 if test "$with_pthread" != no ; then
9730     echo "$as_me:9730: checking for pthread.h" >&5
9731 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9732 if test "${ac_cv_header_pthread_h+set}" = set; then
9733   echo $ECHO_N "(cached) $ECHO_C" >&6
9734 else
9735   cat >conftest.$ac_ext <<_ACEOF
9736 #line 9736 "configure"
9737 #include "confdefs.h"
9738 #include <pthread.h>
9739 _ACEOF
9740 if { (eval echo "$as_me:9740: \"$ac_cpp conftest.$ac_ext\"") >&5
9741   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9742   ac_status=$?
9743   egrep -v '^ *\+' conftest.er1 >conftest.err
9744   rm -f conftest.er1
9745   cat conftest.err >&5
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); } >/dev/null; then
9748   if test -s conftest.err; then
9749     ac_cpp_err=$ac_c_preproc_warn_flag
9750   else
9751     ac_cpp_err=
9752   fi
9753 else
9754   ac_cpp_err=yes
9755 fi
9756 if test -z "$ac_cpp_err"; then
9757   ac_cv_header_pthread_h=yes
9758 else
9759   echo "$as_me: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761   ac_cv_header_pthread_h=no
9762 fi
9763 rm -f conftest.err conftest.$ac_ext
9764 fi
9765 echo "$as_me:9765: result: $ac_cv_header_pthread_h" >&5
9766 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9767 if test $ac_cv_header_pthread_h = yes; then
9768
9769         cat >>confdefs.h <<\EOF
9770 #define HAVE_PTHREADS_H 1
9771 EOF
9772
9773         echo "$as_me:9773: checking if we can link with the pthread library" >&5
9774 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9775         cf_save_LIBS="$LIBS"
9776         LIBS="-lpthread $LIBS"
9777         cat >conftest.$ac_ext <<_ACEOF
9778 #line 9778 "configure"
9779 #include "confdefs.h"
9780
9781 #include <pthread.h>
9782
9783 int
9784 main ()
9785 {
9786
9787         int rc = pthread_create(0,0,0,0);
9788
9789   ;
9790   return 0;
9791 }
9792 _ACEOF
9793 rm -f conftest.$ac_objext conftest$ac_exeext
9794 if { (eval echo "$as_me:9794: \"$ac_link\"") >&5
9795   (eval $ac_link) 2>&5
9796   ac_status=$?
9797   echo "$as_me:9797: \$? = $ac_status" >&5
9798   (exit $ac_status); } &&
9799          { ac_try='test -s conftest$ac_exeext'
9800   { (eval echo "$as_me:9800: \"$ac_try\"") >&5
9801   (eval $ac_try) 2>&5
9802   ac_status=$?
9803   echo "$as_me:9803: \$? = $ac_status" >&5
9804   (exit $ac_status); }; }; then
9805   with_pthread=yes
9806 else
9807   echo "$as_me: failed program was:" >&5
9808 cat conftest.$ac_ext >&5
9809 with_pthread=no
9810 fi
9811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9812         LIBS="$cf_save_LIBS"
9813         echo "$as_me:9813: result: $with_pthread" >&5
9814 echo "${ECHO_T}$with_pthread" >&6
9815
9816         if test "$with_pthread" = yes ; then
9817             LIBS="-lpthread $LIBS"
9818             cat >>confdefs.h <<\EOF
9819 #define HAVE_LIBPTHREADS 1
9820 EOF
9821
9822         else
9823             { { echo "$as_me:9823: error: Cannot link with pthread library" >&5
9824 echo "$as_me: error: Cannot link with pthread library" >&2;}
9825    { (exit 1); exit 1; }; }
9826         fi
9827
9828 fi
9829
9830 fi
9831
9832 echo "$as_me:9832: checking if you want to use weak-symbols for pthreads" >&5
9833 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9834
9835 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9836 if test "${enable_weak_symbols+set}" = set; then
9837   enableval="$enable_weak_symbols"
9838   use_weak_symbols=$withval
9839 else
9840   use_weak_symbols=no
9841 fi;
9842 echo "$as_me:9842: result: $use_weak_symbols" >&5
9843 echo "${ECHO_T}$use_weak_symbols" >&6
9844 if test "$use_weak_symbols" = yes ; then
9845
9846 echo "$as_me:9846: checking if $CC supports weak symbols" >&5
9847 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9848 if test "${cf_cv_weak_symbols+set}" = set; then
9849   echo $ECHO_N "(cached) $ECHO_C" >&6
9850 else
9851
9852 cat >conftest.$ac_ext <<_ACEOF
9853 #line 9853 "configure"
9854 #include "confdefs.h"
9855
9856 #include <stdio.h>
9857 int
9858 main ()
9859 {
9860
9861 #if defined(__GNUC__)
9862 #  if defined __USE_ISOC99
9863 #    define _cat_pragma(exp)    _Pragma(#exp)
9864 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9865 #  else
9866 #    define _weak_pragma(exp)
9867 #  endif
9868 #  define _declare(name)        __extension__ extern __typeof__(name) name
9869 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9870 #endif
9871
9872 weak_symbol(fopen);
9873
9874   ;
9875   return 0;
9876 }
9877 _ACEOF
9878 rm -f conftest.$ac_objext
9879 if { (eval echo "$as_me:9879: \"$ac_compile\"") >&5
9880   (eval $ac_compile) 2>&5
9881   ac_status=$?
9882   echo "$as_me:9882: \$? = $ac_status" >&5
9883   (exit $ac_status); } &&
9884          { ac_try='test -s conftest.$ac_objext'
9885   { (eval echo "$as_me:9885: \"$ac_try\"") >&5
9886   (eval $ac_try) 2>&5
9887   ac_status=$?
9888   echo "$as_me:9888: \$? = $ac_status" >&5
9889   (exit $ac_status); }; }; then
9890   cf_cv_weak_symbols=yes
9891 else
9892   echo "$as_me: failed program was:" >&5
9893 cat conftest.$ac_ext >&5
9894 cf_cv_weak_symbols=no
9895 fi
9896 rm -f conftest.$ac_objext conftest.$ac_ext
9897
9898 fi
9899 echo "$as_me:9899: result: $cf_cv_weak_symbols" >&5
9900 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9901
9902 else
9903     cf_cv_weak_symbols=no
9904 fi
9905
9906 if test $cf_cv_weak_symbols = yes ; then
9907     cat >>confdefs.h <<\EOF
9908 #define USE_WEAK_SYMBOLS 1
9909 EOF
9910
9911 fi
9912
9913 PTHREAD=
9914 if test "$with_pthread" = "yes" ; then
9915     cat >>confdefs.h <<\EOF
9916 #define USE_PTHREADS 1
9917 EOF
9918
9919     enable_reentrant=yes
9920     if test $cf_cv_weak_symbols = yes ; then
9921         PTHREAD=-lpthread
9922     fi
9923 fi
9924
9925 # Reentrant code has to be opaque; there's little advantage to making ncurses
9926 # opaque outside of that, so there is no --enable-opaque option.  We can use
9927 # this option without --with-pthreads, but this will be always set for
9928 # pthreads.
9929 echo "$as_me:9929: checking if you want experimental reentrant code" >&5
9930 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9931
9932 # Check whether --enable-reentrant or --disable-reentrant was given.
9933 if test "${enable_reentrant+set}" = set; then
9934   enableval="$enable_reentrant"
9935   with_reentrant=$enableval
9936 else
9937   with_reentrant=no
9938 fi;
9939 echo "$as_me:9939: result: $with_reentrant" >&5
9940 echo "${ECHO_T}$with_reentrant" >&6
9941 if test "$with_reentrant" = yes ; then
9942         cf_cv_enable_reentrant=1
9943         cf_cv_enable_opaque="NCURSES_INTERNALS"
9944         NCURSES_OPAQUE=1
9945         NCURSES_SIZE_T=int
9946     if test $cf_cv_weak_symbols = yes ; then
9947
9948 # remove pthread library from $LIBS
9949 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9950
9951     else
9952         LIB_SUFFIX="t${LIB_SUFFIX}"
9953     fi
9954         cat >>confdefs.h <<\EOF
9955 #define USE_REENTRANT 1
9956 EOF
9957
9958 if test "${with_abi_version+set}" != set; then
9959         case $cf_cv_rel_version in
9960         5.*)
9961                 cf_cv_rel_version=6.0
9962                 cf_cv_abi_version=6
9963                 { echo "$as_me:9963: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9964 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9965                 ;;
9966         esac
9967 fi
9968
9969 else
9970         cf_cv_enable_reentrant=0
9971         cf_cv_enable_opaque="NCURSES_OPAQUE"
9972         NCURSES_OPAQUE=0
9973         NCURSES_SIZE_T=short
9974 fi
9975
9976 echo "$as_me:9976: checking if you want experimental safe-sprintf code" >&5
9977 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9978
9979 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9980 if test "${enable_safe_sprintf+set}" = set; then
9981   enableval="$enable_safe_sprintf"
9982   with_safe_sprintf=$enableval
9983 else
9984   with_safe_sprintf=no
9985 fi;
9986 echo "$as_me:9986: result: $with_safe_sprintf" >&5
9987 echo "${ECHO_T}$with_safe_sprintf" >&6
9988 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9989 #define USE_SAFE_SPRINTF 1
9990 EOF
9991
9992 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9993 # when hashmap is used scroll hints are useless
9994 if test "$with_hashmap" = no ; then
9995 echo "$as_me:9995: checking if you want to experiment without scrolling-hints code" >&5
9996 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9997
9998 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9999 if test "${enable_scroll_hints+set}" = set; then
10000   enableval="$enable_scroll_hints"
10001   with_scroll_hints=$enableval
10002 else
10003   with_scroll_hints=yes
10004 fi;
10005 echo "$as_me:10005: result: $with_scroll_hints" >&5
10006 echo "${ECHO_T}$with_scroll_hints" >&6
10007 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10008 #define USE_SCROLL_HINTS 1
10009 EOF
10010
10011 fi
10012
10013 echo "$as_me:10013: checking if you want experimental wgetch-events code" >&5
10014 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10015
10016 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10017 if test "${enable_wgetch_events+set}" = set; then
10018   enableval="$enable_wgetch_events"
10019   with_wgetch_events=$enableval
10020 else
10021   with_wgetch_events=no
10022 fi;
10023 echo "$as_me:10023: result: $with_wgetch_events" >&5
10024 echo "${ECHO_T}$with_wgetch_events" >&6
10025 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10026 #define NCURSES_WGETCH_EVENTS 1
10027 EOF
10028
10029 ###############################################################################
10030
10031 ###     use option --disable-echo to suppress full display compiling commands
10032 echo "$as_me:10032: checking if you want to display full commands during build" >&5
10033 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10034
10035 # Check whether --enable-echo or --disable-echo was given.
10036 if test "${enable_echo+set}" = set; then
10037   enableval="$enable_echo"
10038   with_echo=$enableval
10039 else
10040   with_echo=yes
10041 fi;
10042 if test "$with_echo" = yes; then
10043         ECHO_LINK=
10044 else
10045         ECHO_LINK='@ echo linking $@ ... ;'
10046         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10047         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10048 fi
10049 echo "$as_me:10049: result: $with_echo" >&5
10050 echo "${ECHO_T}$with_echo" >&6
10051
10052 ###     use option --enable-warnings to turn on all gcc warnings
10053 echo "$as_me:10053: checking if you want to see compiler warnings" >&5
10054 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10055
10056 # Check whether --enable-warnings or --disable-warnings was given.
10057 if test "${enable_warnings+set}" = set; then
10058   enableval="$enable_warnings"
10059   with_warnings=$enableval
10060 fi;
10061 echo "$as_me:10061: result: $with_warnings" >&5
10062 echo "${ECHO_T}$with_warnings" >&6
10063
10064 if test "x$with_warnings" = "xyes"; then
10065         ADAFLAGS="$ADAFLAGS -gnatg"
10066
10067 INTEL_COMPILER=no
10068
10069 if test "$GCC" = yes ; then
10070         case $host_os in
10071         linux*|gnu*)
10072                 echo "$as_me:10072: checking if this is really Intel C compiler" >&5
10073 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10074                 cf_save_CFLAGS="$CFLAGS"
10075                 CFLAGS="$CFLAGS -no-gcc"
10076                 cat >conftest.$ac_ext <<_ACEOF
10077 #line 10077 "configure"
10078 #include "confdefs.h"
10079
10080 int
10081 main ()
10082 {
10083
10084 #ifdef __INTEL_COMPILER
10085 #else
10086 make an error
10087 #endif
10088
10089   ;
10090   return 0;
10091 }
10092 _ACEOF
10093 rm -f conftest.$ac_objext
10094 if { (eval echo "$as_me:10094: \"$ac_compile\"") >&5
10095   (eval $ac_compile) 2>&5
10096   ac_status=$?
10097   echo "$as_me:10097: \$? = $ac_status" >&5
10098   (exit $ac_status); } &&
10099          { ac_try='test -s conftest.$ac_objext'
10100   { (eval echo "$as_me:10100: \"$ac_try\"") >&5
10101   (eval $ac_try) 2>&5
10102   ac_status=$?
10103   echo "$as_me:10103: \$? = $ac_status" >&5
10104   (exit $ac_status); }; }; then
10105   INTEL_COMPILER=yes
10106 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10107
10108 else
10109   echo "$as_me: failed program was:" >&5
10110 cat conftest.$ac_ext >&5
10111 fi
10112 rm -f conftest.$ac_objext conftest.$ac_ext
10113                 CFLAGS="$cf_save_CFLAGS"
10114                 echo "$as_me:10114: result: $INTEL_COMPILER" >&5
10115 echo "${ECHO_T}$INTEL_COMPILER" >&6
10116                 ;;
10117         esac
10118 fi
10119
10120 cat > conftest.$ac_ext <<EOF
10121 #line 10121 "${as_me-configure}"
10122 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10123 EOF
10124
10125 if test "$INTEL_COMPILER" = yes
10126 then
10127 # The "-wdXXX" options suppress warnings:
10128 # remark #1419: external declaration in primary source file
10129 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10130 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10131 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10132 # remark #193: zero used for undefined preprocessing identifier
10133 # remark #593: variable "curs_sb_left_arrow" was set but never used
10134 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10135 # remark #869: parameter "tw" was never referenced
10136 # remark #981: operands are evaluated in unspecified order
10137 # warning #269: invalid format string conversion
10138
10139         { echo "$as_me:10139: checking for $CC warning options..." >&5
10140 echo "$as_me: checking for $CC warning options..." >&6;}
10141         cf_save_CFLAGS="$CFLAGS"
10142         EXTRA_CFLAGS="-Wall"
10143         for cf_opt in \
10144                 wd1419 \
10145                 wd1682 \
10146                 wd1683 \
10147                 wd1684 \
10148                 wd193 \
10149                 wd279 \
10150                 wd593 \
10151                 wd810 \
10152                 wd869 \
10153                 wd981
10154         do
10155                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10156                 if { (eval echo "$as_me:10156: \"$ac_compile\"") >&5
10157   (eval $ac_compile) 2>&5
10158   ac_status=$?
10159   echo "$as_me:10159: \$? = $ac_status" >&5
10160   (exit $ac_status); }; then
10161                         test -n "$verbose" && echo "$as_me:10161: result: ... -$cf_opt" >&5
10162 echo "${ECHO_T}... -$cf_opt" >&6
10163                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10164                 fi
10165         done
10166         CFLAGS="$cf_save_CFLAGS"
10167
10168 elif test "$GCC" = yes
10169 then
10170         { echo "$as_me:10170: checking for $CC warning options..." >&5
10171 echo "$as_me: checking for $CC warning options..." >&6;}
10172         cf_save_CFLAGS="$CFLAGS"
10173         EXTRA_CFLAGS="-W -Wall"
10174         cf_warn_CONST=""
10175         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10176         for cf_opt in \
10177                 Wbad-function-cast \
10178                 Wcast-align \
10179                 Wcast-qual \
10180                 Winline \
10181                 Wmissing-declarations \
10182                 Wmissing-prototypes \
10183                 Wnested-externs \
10184                 Wpointer-arith \
10185                 Wshadow \
10186                 Wstrict-prototypes \
10187                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10188         do
10189                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10190                 if { (eval echo "$as_me:10190: \"$ac_compile\"") >&5
10191   (eval $ac_compile) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); }; then
10195                         test -n "$verbose" && echo "$as_me:10195: result: ... -$cf_opt" >&5
10196 echo "${ECHO_T}... -$cf_opt" >&6
10197                         case $cf_opt in #(vi
10198                         Wcast-qual) #(vi
10199                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10200                                 ;;
10201                         Winline) #(vi
10202                                 case $GCC_VERSION in
10203                                 [34].*)
10204                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10205
10206 echo "${as_me-configure}:10206: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10207
10208                                         continue;;
10209                                 esac
10210                                 ;;
10211                         esac
10212                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10213                 fi
10214         done
10215         CFLAGS="$cf_save_CFLAGS"
10216 fi
10217 rm -f conftest*
10218
10219         if test "$cf_with_cxx" = yes ; then
10220
10221 INTEL_CPLUSPLUS=no
10222
10223 if test "$GCC" = yes ; then
10224         case $host_os in
10225         linux*|gnu*)
10226                 echo "$as_me:10226: checking if this is really Intel C++ compiler" >&5
10227 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10228                 cf_save_CFLAGS="$CXXFLAGS"
10229                 CXXFLAGS="$CXXFLAGS -no-gcc"
10230                 cat >conftest.$ac_ext <<_ACEOF
10231 #line 10231 "configure"
10232 #include "confdefs.h"
10233
10234 int
10235 main ()
10236 {
10237
10238 #ifdef __INTEL_COMPILER
10239 #else
10240 make an error
10241 #endif
10242
10243   ;
10244   return 0;
10245 }
10246 _ACEOF
10247 rm -f conftest.$ac_objext
10248 if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249   (eval $ac_compile) 2>&5
10250   ac_status=$?
10251   echo "$as_me:10251: \$? = $ac_status" >&5
10252   (exit $ac_status); } &&
10253          { ac_try='test -s conftest.$ac_objext'
10254   { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255   (eval $ac_try) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); }; }; then
10259   INTEL_CPLUSPLUS=yes
10260 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10261
10262 else
10263   echo "$as_me: failed program was:" >&5
10264 cat conftest.$ac_ext >&5
10265 fi
10266 rm -f conftest.$ac_objext conftest.$ac_ext
10267                 CXXFLAGS="$cf_save_CFLAGS"
10268                 echo "$as_me:10268: result: $INTEL_CPLUSPLUS" >&5
10269 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10270                 ;;
10271         esac
10272 fi
10273
10274 ac_ext=cc
10275 ac_cpp='$CXXCPP $CPPFLAGS'
10276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10279 ac_main_return=return
10280
10281 cat > conftest.$ac_ext <<EOF
10282 #line 10282 "configure"
10283 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10284 EOF
10285
10286 if test "$INTEL_CPLUSPLUS" = yes
10287 then
10288 # The "-wdXXX" options suppress warnings:
10289 # remark #1419: external declaration in primary source file
10290 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10291 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10292 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10293 # remark #193: zero used for undefined preprocessing identifier
10294 # remark #593: variable "curs_sb_left_arrow" was set but never used
10295 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10296 # remark #869: parameter "tw" was never referenced
10297 # remark #981: operands are evaluated in unspecified order
10298 # warning #269: invalid format string conversion
10299
10300         { echo "$as_me:10300: checking for $CC warning options..." >&5
10301 echo "$as_me: checking for $CC warning options..." >&6;}
10302         cf_save_CXXFLAGS="$CXXFLAGS"
10303         EXTRA_CXXFLAGS="-Wall"
10304         for cf_opt in \
10305                 wd1419 \
10306                 wd1682 \
10307                 wd1683 \
10308                 wd1684 \
10309                 wd193 \
10310                 wd279 \
10311                 wd593 \
10312                 wd810 \
10313                 wd869 \
10314                 wd981
10315         do
10316                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10317                 if { (eval echo "$as_me:10317: \"$ac_compile\"") >&5
10318   (eval $ac_compile) 2>&5
10319   ac_status=$?
10320   echo "$as_me:10320: \$? = $ac_status" >&5
10321   (exit $ac_status); }; then
10322                         test -n "$verbose" && echo "$as_me:10322: result: ... -$cf_opt" >&5
10323 echo "${ECHO_T}... -$cf_opt" >&6
10324                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10325                 fi
10326         done
10327         CXXFLAGS="$cf_save_CXXFLAGS"
10328
10329 elif test "$GXX" = yes
10330 then
10331         { echo "$as_me:10331: checking for $CXX warning options..." >&5
10332 echo "$as_me: checking for $CXX warning options..." >&6;}
10333         cf_save_CXXFLAGS="$CXXFLAGS"
10334         EXTRA_CXXFLAGS="-W -Wall"
10335         cf_gxx_extra_warnings=""
10336         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10337         case "$GCC_VERSION" in
10338         [1-2].*)
10339                 ;;
10340         *)
10341                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10342                 ;;
10343         esac
10344         for cf_opt in \
10345                 Wabi \
10346                 fabi-version=0 \
10347                 Woverloaded-virtual \
10348                 Wsign-promo \
10349                 Wsynth \
10350                 Wold-style-cast \
10351                 Wcast-align \
10352                 Wcast-qual \
10353                 Wmissing-prototypes \
10354                 Wpointer-arith \
10355                 Wshadow \
10356                 Wstrict-prototypes \
10357                 Wundef $cf_gxx_extra_warnings Wno-unused
10358         do
10359                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10360                 if { (eval echo "$as_me:10360: \"$ac_compile\"") >&5
10361   (eval $ac_compile) 2>&5
10362   ac_status=$?
10363   echo "$as_me:10363: \$? = $ac_status" >&5
10364   (exit $ac_status); }; then
10365                         test -n "$verbose" && echo "$as_me:10365: result: ... -$cf_opt" >&5
10366 echo "${ECHO_T}... -$cf_opt" >&6
10367                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10368                 else
10369                         test -n "$verbose" && echo "$as_me:10369: result: ... no -$cf_opt" >&5
10370 echo "${ECHO_T}... no -$cf_opt" >&6
10371                 fi
10372         done
10373         CXXFLAGS="$cf_save_CXXFLAGS"
10374 fi
10375
10376 rm -f conftest*
10377 ac_ext=c
10378 ac_cpp='$CPP $CPPFLAGS'
10379 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10380 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10381 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10382 ac_main_return=return
10383
10384         fi
10385 fi
10386
10387 if test "$GCC" = yes
10388 then
10389 cat > conftest.i <<EOF
10390 #ifndef GCC_PRINTF
10391 #define GCC_PRINTF 0
10392 #endif
10393 #ifndef GCC_SCANF
10394 #define GCC_SCANF 0
10395 #endif
10396 #ifndef GCC_NORETURN
10397 #define GCC_NORETURN /* nothing */
10398 #endif
10399 #ifndef GCC_UNUSED
10400 #define GCC_UNUSED /* nothing */
10401 #endif
10402 EOF
10403 if test "$GCC" = yes
10404 then
10405         { echo "$as_me:10405: checking for $CC __attribute__ directives..." >&5
10406 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10407 cat > conftest.$ac_ext <<EOF
10408 #line 10408 "${as_me-configure}"
10409 #include "confdefs.h"
10410 #include "conftest.h"
10411 #include "conftest.i"
10412 #if     GCC_PRINTF
10413 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10414 #else
10415 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10416 #endif
10417 #if     GCC_SCANF
10418 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10419 #else
10420 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10421 #endif
10422 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10423 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10424 extern void foo(void) GCC_NORETURN;
10425 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10426 EOF
10427         for cf_attribute in scanf printf unused noreturn
10428         do
10429
10430 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10431
10432                 cf_directive="__attribute__(($cf_attribute))"
10433                 echo "checking for $CC $cf_directive" 1>&5
10434                 case $cf_attribute in
10435                 scanf|printf)
10436                 cat >conftest.h <<EOF
10437 #define GCC_$cf_ATTRIBUTE 1
10438 EOF
10439                         ;;
10440                 *)
10441                 cat >conftest.h <<EOF
10442 #define GCC_$cf_ATTRIBUTE $cf_directive
10443 EOF
10444                         ;;
10445                 esac
10446                 if { (eval echo "$as_me:10446: \"$ac_compile\"") >&5
10447   (eval $ac_compile) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit $ac_status); }; then
10451                         test -n "$verbose" && echo "$as_me:10451: result: ... $cf_attribute" >&5
10452 echo "${ECHO_T}... $cf_attribute" >&6
10453                         cat conftest.h >>confdefs.h
10454                 fi
10455         done
10456 else
10457         fgrep define conftest.i >>confdefs.h
10458 fi
10459 rm -rf conftest*
10460 fi
10461
10462 ###     use option --enable-assertions to turn on generation of assertion code
10463 echo "$as_me:10463: checking if you want to enable runtime assertions" >&5
10464 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10465
10466 # Check whether --enable-assertions or --disable-assertions was given.
10467 if test "${enable_assertions+set}" = set; then
10468   enableval="$enable_assertions"
10469   with_assertions=$enableval
10470 else
10471   with_assertions=no
10472 fi;
10473 echo "$as_me:10473: result: $with_assertions" >&5
10474 echo "${ECHO_T}$with_assertions" >&6
10475 if test -n "$GCC"
10476 then
10477         if test "$with_assertions" = no
10478         then
10479                 cat >>confdefs.h <<\EOF
10480 #define NDEBUG 1
10481 EOF
10482
10483                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10484         else
10485                 ADAFLAGS="$ADAFLAGS -gnata"
10486         fi
10487 fi
10488
10489 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10490
10491 echo "$as_me:10491: checking if you want to use dmalloc for testing" >&5
10492 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10493
10494 # Check whether --with-dmalloc or --without-dmalloc was given.
10495 if test "${with_dmalloc+set}" = set; then
10496   withval="$with_dmalloc"
10497   cat >>confdefs.h <<\EOF
10498 #define USE_DMALLOC 1
10499 EOF
10500
10501         : ${with_cflags:=-g}
10502         : ${with_no_leaks:=yes}
10503          with_dmalloc=yes
10504 else
10505   with_dmalloc=
10506 fi;
10507 echo "$as_me:10507: result: ${with_dmalloc:-no}" >&5
10508 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10509
10510 case .$with_cflags in #(vi
10511 .*-g*)
10512         case .$CFLAGS in #(vi
10513         .*-g*) #(vi
10514                 ;;
10515         *)
10516
10517 cf_fix_cppflags=no
10518 cf_new_cflags=
10519 cf_new_cppflags=
10520 cf_new_extra_cppflags=
10521
10522 for cf_add_cflags in -g
10523 do
10524 case $cf_fix_cppflags in
10525 no)
10526         case $cf_add_cflags in #(vi
10527         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10528                 case $cf_add_cflags in
10529                 -D*)
10530                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10531
10532                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10533                         && test -z "${cf_tst_cflags}" \
10534                         && cf_fix_cppflags=yes
10535
10536                         if test $cf_fix_cppflags = yes ; then
10537                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10538                                 continue
10539                         elif test "${cf_tst_cflags}" = "\"'" ; then
10540                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10541                                 continue
10542                         fi
10543                         ;;
10544                 esac
10545                 case "$CPPFLAGS" in
10546                 *$cf_add_cflags) #(vi
10547                         ;;
10548                 *) #(vi
10549                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10550                         ;;
10551                 esac
10552                 ;;
10553         *)
10554                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10555                 ;;
10556         esac
10557         ;;
10558 yes)
10559         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10560
10561         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10562
10563         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10564         && test -z "${cf_tst_cflags}" \
10565         && cf_fix_cppflags=no
10566         ;;
10567 esac
10568 done
10569
10570 if test -n "$cf_new_cflags" ; then
10571
10572         CFLAGS="$CFLAGS $cf_new_cflags"
10573 fi
10574
10575 if test -n "$cf_new_cppflags" ; then
10576
10577         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10578 fi
10579
10580 if test -n "$cf_new_extra_cppflags" ; then
10581
10582         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10583 fi
10584
10585                 ;;
10586         esac
10587         ;;
10588 esac
10589
10590 if test "$with_dmalloc" = yes ; then
10591         echo "$as_me:10591: checking for dmalloc.h" >&5
10592 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10593 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10594   echo $ECHO_N "(cached) $ECHO_C" >&6
10595 else
10596   cat >conftest.$ac_ext <<_ACEOF
10597 #line 10597 "configure"
10598 #include "confdefs.h"
10599 #include <dmalloc.h>
10600 _ACEOF
10601 if { (eval echo "$as_me:10601: \"$ac_cpp conftest.$ac_ext\"") >&5
10602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10603   ac_status=$?
10604   egrep -v '^ *\+' conftest.er1 >conftest.err
10605   rm -f conftest.er1
10606   cat conftest.err >&5
10607   echo "$as_me:10607: \$? = $ac_status" >&5
10608   (exit $ac_status); } >/dev/null; then
10609   if test -s conftest.err; then
10610     ac_cpp_err=$ac_c_preproc_warn_flag
10611   else
10612     ac_cpp_err=
10613   fi
10614 else
10615   ac_cpp_err=yes
10616 fi
10617 if test -z "$ac_cpp_err"; then
10618   ac_cv_header_dmalloc_h=yes
10619 else
10620   echo "$as_me: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   ac_cv_header_dmalloc_h=no
10623 fi
10624 rm -f conftest.err conftest.$ac_ext
10625 fi
10626 echo "$as_me:10626: result: $ac_cv_header_dmalloc_h" >&5
10627 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10628 if test $ac_cv_header_dmalloc_h = yes; then
10629
10630 echo "$as_me:10630: checking for dmalloc_debug in -ldmalloc" >&5
10631 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10632 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10633   echo $ECHO_N "(cached) $ECHO_C" >&6
10634 else
10635   ac_check_lib_save_LIBS=$LIBS
10636 LIBS="-ldmalloc  $LIBS"
10637 cat >conftest.$ac_ext <<_ACEOF
10638 #line 10638 "configure"
10639 #include "confdefs.h"
10640
10641 /* Override any gcc2 internal prototype to avoid an error.  */
10642 #ifdef __cplusplus
10643 extern "C"
10644 #endif
10645 /* We use char because int might match the return type of a gcc2
10646    builtin and then its argument prototype would still apply.  */
10647 char dmalloc_debug ();
10648 int
10649 main ()
10650 {
10651 dmalloc_debug ();
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 rm -f conftest.$ac_objext conftest$ac_exeext
10657 if { (eval echo "$as_me:10657: \"$ac_link\"") >&5
10658   (eval $ac_link) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit $ac_status); } &&
10662          { ac_try='test -s conftest$ac_exeext'
10663   { (eval echo "$as_me:10663: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); }; }; then
10668   ac_cv_lib_dmalloc_dmalloc_debug=yes
10669 else
10670   echo "$as_me: failed program was:" >&5
10671 cat conftest.$ac_ext >&5
10672 ac_cv_lib_dmalloc_dmalloc_debug=no
10673 fi
10674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10675 LIBS=$ac_check_lib_save_LIBS
10676 fi
10677 echo "$as_me:10677: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10678 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10679 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10680   cat >>confdefs.h <<EOF
10681 #define HAVE_LIBDMALLOC 1
10682 EOF
10683
10684   LIBS="-ldmalloc $LIBS"
10685
10686 fi
10687
10688 fi
10689
10690 fi
10691
10692 echo "$as_me:10692: checking if you want to use dbmalloc for testing" >&5
10693 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10694
10695 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10696 if test "${with_dbmalloc+set}" = set; then
10697   withval="$with_dbmalloc"
10698   cat >>confdefs.h <<\EOF
10699 #define USE_DBMALLOC 1
10700 EOF
10701
10702         : ${with_cflags:=-g}
10703         : ${with_no_leaks:=yes}
10704          with_dbmalloc=yes
10705 else
10706   with_dbmalloc=
10707 fi;
10708 echo "$as_me:10708: result: ${with_dbmalloc:-no}" >&5
10709 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10710
10711 case .$with_cflags in #(vi
10712 .*-g*)
10713         case .$CFLAGS in #(vi
10714         .*-g*) #(vi
10715                 ;;
10716         *)
10717
10718 cf_fix_cppflags=no
10719 cf_new_cflags=
10720 cf_new_cppflags=
10721 cf_new_extra_cppflags=
10722
10723 for cf_add_cflags in -g
10724 do
10725 case $cf_fix_cppflags in
10726 no)
10727         case $cf_add_cflags in #(vi
10728         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10729                 case $cf_add_cflags in
10730                 -D*)
10731                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10732
10733                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10734                         && test -z "${cf_tst_cflags}" \
10735                         && cf_fix_cppflags=yes
10736
10737                         if test $cf_fix_cppflags = yes ; then
10738                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10739                                 continue
10740                         elif test "${cf_tst_cflags}" = "\"'" ; then
10741                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10742                                 continue
10743                         fi
10744                         ;;
10745                 esac
10746                 case "$CPPFLAGS" in
10747                 *$cf_add_cflags) #(vi
10748                         ;;
10749                 *) #(vi
10750                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10751                         ;;
10752                 esac
10753                 ;;
10754         *)
10755                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10756                 ;;
10757         esac
10758         ;;
10759 yes)
10760         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10761
10762         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10763
10764         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10765         && test -z "${cf_tst_cflags}" \
10766         && cf_fix_cppflags=no
10767         ;;
10768 esac
10769 done
10770
10771 if test -n "$cf_new_cflags" ; then
10772
10773         CFLAGS="$CFLAGS $cf_new_cflags"
10774 fi
10775
10776 if test -n "$cf_new_cppflags" ; then
10777
10778         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10779 fi
10780
10781 if test -n "$cf_new_extra_cppflags" ; then
10782
10783         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10784 fi
10785
10786                 ;;
10787         esac
10788         ;;
10789 esac
10790
10791 if test "$with_dbmalloc" = yes ; then
10792         echo "$as_me:10792: checking for dbmalloc.h" >&5
10793 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10794 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10795   echo $ECHO_N "(cached) $ECHO_C" >&6
10796 else
10797   cat >conftest.$ac_ext <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800 #include <dbmalloc.h>
10801 _ACEOF
10802 if { (eval echo "$as_me:10802: \"$ac_cpp conftest.$ac_ext\"") >&5
10803   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10804   ac_status=$?
10805   egrep -v '^ *\+' conftest.er1 >conftest.err
10806   rm -f conftest.er1
10807   cat conftest.err >&5
10808   echo "$as_me:10808: \$? = $ac_status" >&5
10809   (exit $ac_status); } >/dev/null; then
10810   if test -s conftest.err; then
10811     ac_cpp_err=$ac_c_preproc_warn_flag
10812   else
10813     ac_cpp_err=
10814   fi
10815 else
10816   ac_cpp_err=yes
10817 fi
10818 if test -z "$ac_cpp_err"; then
10819   ac_cv_header_dbmalloc_h=yes
10820 else
10821   echo "$as_me: failed program was:" >&5
10822   cat conftest.$ac_ext >&5
10823   ac_cv_header_dbmalloc_h=no
10824 fi
10825 rm -f conftest.err conftest.$ac_ext
10826 fi
10827 echo "$as_me:10827: result: $ac_cv_header_dbmalloc_h" >&5
10828 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10829 if test $ac_cv_header_dbmalloc_h = yes; then
10830
10831 echo "$as_me:10831: checking for debug_malloc in -ldbmalloc" >&5
10832 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10833 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10834   echo $ECHO_N "(cached) $ECHO_C" >&6
10835 else
10836   ac_check_lib_save_LIBS=$LIBS
10837 LIBS="-ldbmalloc  $LIBS"
10838 cat >conftest.$ac_ext <<_ACEOF
10839 #line 10839 "configure"
10840 #include "confdefs.h"
10841
10842 /* Override any gcc2 internal prototype to avoid an error.  */
10843 #ifdef __cplusplus
10844 extern "C"
10845 #endif
10846 /* We use char because int might match the return type of a gcc2
10847    builtin and then its argument prototype would still apply.  */
10848 char debug_malloc ();
10849 int
10850 main ()
10851 {
10852 debug_malloc ();
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 rm -f conftest.$ac_objext conftest$ac_exeext
10858 if { (eval echo "$as_me:10858: \"$ac_link\"") >&5
10859   (eval $ac_link) 2>&5
10860   ac_status=$?
10861   echo "$as_me:10861: \$? = $ac_status" >&5
10862   (exit $ac_status); } &&
10863          { ac_try='test -s conftest$ac_exeext'
10864   { (eval echo "$as_me:10864: \"$ac_try\"") >&5
10865   (eval $ac_try) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); }; }; then
10869   ac_cv_lib_dbmalloc_debug_malloc=yes
10870 else
10871   echo "$as_me: failed program was:" >&5
10872 cat conftest.$ac_ext >&5
10873 ac_cv_lib_dbmalloc_debug_malloc=no
10874 fi
10875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10876 LIBS=$ac_check_lib_save_LIBS
10877 fi
10878 echo "$as_me:10878: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10879 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10880 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10881   cat >>confdefs.h <<EOF
10882 #define HAVE_LIBDBMALLOC 1
10883 EOF
10884
10885   LIBS="-ldbmalloc $LIBS"
10886
10887 fi
10888
10889 fi
10890
10891 fi
10892
10893 echo "$as_me:10893: checking if you want to use valgrind for testing" >&5
10894 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10895
10896 # Check whether --with-valgrind or --without-valgrind was given.
10897 if test "${with_valgrind+set}" = set; then
10898   withval="$with_valgrind"
10899   cat >>confdefs.h <<\EOF
10900 #define USE_VALGRIND 1
10901 EOF
10902
10903         : ${with_cflags:=-g}
10904         : ${with_no_leaks:=yes}
10905          with_valgrind=yes
10906 else
10907   with_valgrind=
10908 fi;
10909 echo "$as_me:10909: result: ${with_valgrind:-no}" >&5
10910 echo "${ECHO_T}${with_valgrind:-no}" >&6
10911
10912 case .$with_cflags in #(vi
10913 .*-g*)
10914         case .$CFLAGS in #(vi
10915         .*-g*) #(vi
10916                 ;;
10917         *)
10918
10919 cf_fix_cppflags=no
10920 cf_new_cflags=
10921 cf_new_cppflags=
10922 cf_new_extra_cppflags=
10923
10924 for cf_add_cflags in -g
10925 do
10926 case $cf_fix_cppflags in
10927 no)
10928         case $cf_add_cflags in #(vi
10929         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10930                 case $cf_add_cflags in
10931                 -D*)
10932                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10933
10934                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10935                         && test -z "${cf_tst_cflags}" \
10936                         && cf_fix_cppflags=yes
10937
10938                         if test $cf_fix_cppflags = yes ; then
10939                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10940                                 continue
10941                         elif test "${cf_tst_cflags}" = "\"'" ; then
10942                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10943                                 continue
10944                         fi
10945                         ;;
10946                 esac
10947                 case "$CPPFLAGS" in
10948                 *$cf_add_cflags) #(vi
10949                         ;;
10950                 *) #(vi
10951                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10952                         ;;
10953                 esac
10954                 ;;
10955         *)
10956                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10957                 ;;
10958         esac
10959         ;;
10960 yes)
10961         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10962
10963         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10964
10965         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10966         && test -z "${cf_tst_cflags}" \
10967         && cf_fix_cppflags=no
10968         ;;
10969 esac
10970 done
10971
10972 if test -n "$cf_new_cflags" ; then
10973
10974         CFLAGS="$CFLAGS $cf_new_cflags"
10975 fi
10976
10977 if test -n "$cf_new_cppflags" ; then
10978
10979         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10980 fi
10981
10982 if test -n "$cf_new_extra_cppflags" ; then
10983
10984         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10985 fi
10986
10987                 ;;
10988         esac
10989         ;;
10990 esac
10991
10992 echo "$as_me:10992: checking if you want to perform memory-leak testing" >&5
10993 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10994
10995 # Check whether --enable-leaks or --disable-leaks was given.
10996 if test "${enable_leaks+set}" = set; then
10997   enableval="$enable_leaks"
10998   with_no_leaks=yes
10999 else
11000   : ${with_no_leaks:=no}
11001 fi;
11002 echo "$as_me:11002: result: $with_no_leaks" >&5
11003 echo "${ECHO_T}$with_no_leaks" >&6
11004
11005 if test "$with_no_leaks" = yes ; then
11006         cat >>confdefs.h <<\EOF
11007 #define NO_LEAKS 1
11008 EOF
11009
11010 fi
11011
11012 cat >>confdefs.h <<\EOF
11013 #define HAVE_NC_ALLOC_H 1
11014 EOF
11015
11016 ###     use option --enable-expanded to generate certain macros as functions
11017
11018 # Check whether --enable-expanded or --disable-expanded was given.
11019 if test "${enable_expanded+set}" = set; then
11020   enableval="$enable_expanded"
11021   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11022 #define NCURSES_EXPANDED 1
11023 EOF
11024
11025 fi;
11026
11027 ###     use option --disable-macros to suppress macros in favor of functions
11028
11029 # Check whether --enable-macros or --disable-macros was given.
11030 if test "${enable_macros+set}" = set; then
11031   enableval="$enable_macros"
11032   test "$enableval" = no && cat >>confdefs.h <<\EOF
11033 #define NCURSES_NOMACROS 1
11034 EOF
11035
11036 fi;
11037
11038 # Normally we only add trace() to the debug-library.  Allow this to be
11039 # extended to all models of the ncurses library:
11040 cf_all_traces=no
11041 case "$CFLAGS $CPPFLAGS" in
11042 *-DTRACE*)
11043         cf_all_traces=yes
11044         ;;
11045 esac
11046
11047 echo "$as_me:11047: checking whether to add trace feature to all models" >&5
11048 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11049
11050 # Check whether --with-trace or --without-trace was given.
11051 if test "${with_trace+set}" = set; then
11052   withval="$with_trace"
11053   cf_with_trace=$withval
11054 else
11055   cf_with_trace=$cf_all_traces
11056 fi;
11057 echo "$as_me:11057: result: $cf_with_trace" >&5
11058 echo "${ECHO_T}$cf_with_trace" >&6
11059
11060 if test "$cf_with_trace" = yes ; then
11061         LIB_TRACING=all
11062         ADA_TRACE=TRUE
11063
11064 cf_fix_cppflags=no
11065 cf_new_cflags=
11066 cf_new_cppflags=
11067 cf_new_extra_cppflags=
11068
11069 for cf_add_cflags in -DTRACE
11070 do
11071 case $cf_fix_cppflags in
11072 no)
11073         case $cf_add_cflags in #(vi
11074         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11075                 case $cf_add_cflags in
11076                 -D*)
11077                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11078
11079                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11080                         && test -z "${cf_tst_cflags}" \
11081                         && cf_fix_cppflags=yes
11082
11083                         if test $cf_fix_cppflags = yes ; then
11084                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11085                                 continue
11086                         elif test "${cf_tst_cflags}" = "\"'" ; then
11087                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11088                                 continue
11089                         fi
11090                         ;;
11091                 esac
11092                 case "$CPPFLAGS" in
11093                 *$cf_add_cflags) #(vi
11094                         ;;
11095                 *) #(vi
11096                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11097                         ;;
11098                 esac
11099                 ;;
11100         *)
11101                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11102                 ;;
11103         esac
11104         ;;
11105 yes)
11106         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11107
11108         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11109
11110         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11111         && test -z "${cf_tst_cflags}" \
11112         && cf_fix_cppflags=no
11113         ;;
11114 esac
11115 done
11116
11117 if test -n "$cf_new_cflags" ; then
11118
11119         CFLAGS="$CFLAGS $cf_new_cflags"
11120 fi
11121
11122 if test -n "$cf_new_cppflags" ; then
11123
11124         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11125 fi
11126
11127 if test -n "$cf_new_extra_cppflags" ; then
11128
11129         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11130 fi
11131
11132 else
11133         LIB_TRACING=DEBUG
11134         ADA_TRACE=FALSE
11135 fi
11136
11137 ###     Checks for libraries.
11138 echo "$as_me:11138: checking for gettimeofday" >&5
11139 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11140 if test "${ac_cv_func_gettimeofday+set}" = set; then
11141   echo $ECHO_N "(cached) $ECHO_C" >&6
11142 else
11143   cat >conftest.$ac_ext <<_ACEOF
11144 #line 11144 "configure"
11145 #include "confdefs.h"
11146 /* System header to define __stub macros and hopefully few prototypes,
11147     which can conflict with char gettimeofday (); below.  */
11148 #include <assert.h>
11149 /* Override any gcc2 internal prototype to avoid an error.  */
11150 #ifdef __cplusplus
11151 extern "C"
11152 #endif
11153 /* We use char because int might match the return type of a gcc2
11154    builtin and then its argument prototype would still apply.  */
11155 char gettimeofday ();
11156 char (*f) ();
11157
11158 int
11159 main ()
11160 {
11161 /* The GNU C library defines this for functions which it implements
11162     to always fail with ENOSYS.  Some functions are actually named
11163     something starting with __ and the normal name is an alias.  */
11164 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11165 choke me
11166 #else
11167 f = gettimeofday;
11168 #endif
11169
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 rm -f conftest.$ac_objext conftest$ac_exeext
11175 if { (eval echo "$as_me:11175: \"$ac_link\"") >&5
11176   (eval $ac_link) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); } &&
11180          { ac_try='test -s conftest$ac_exeext'
11181   { (eval echo "$as_me:11181: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); }; }; then
11186   ac_cv_func_gettimeofday=yes
11187 else
11188   echo "$as_me: failed program was:" >&5
11189 cat conftest.$ac_ext >&5
11190 ac_cv_func_gettimeofday=no
11191 fi
11192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11193 fi
11194 echo "$as_me:11194: result: $ac_cv_func_gettimeofday" >&5
11195 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11196 if test $ac_cv_func_gettimeofday = yes; then
11197   cat >>confdefs.h <<\EOF
11198 #define HAVE_GETTIMEOFDAY 1
11199 EOF
11200
11201 else
11202
11203 echo "$as_me:11203: checking for gettimeofday in -lbsd" >&5
11204 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11205 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11206   echo $ECHO_N "(cached) $ECHO_C" >&6
11207 else
11208   ac_check_lib_save_LIBS=$LIBS
11209 LIBS="-lbsd  $LIBS"
11210 cat >conftest.$ac_ext <<_ACEOF
11211 #line 11211 "configure"
11212 #include "confdefs.h"
11213
11214 /* Override any gcc2 internal prototype to avoid an error.  */
11215 #ifdef __cplusplus
11216 extern "C"
11217 #endif
11218 /* We use char because int might match the return type of a gcc2
11219    builtin and then its argument prototype would still apply.  */
11220 char gettimeofday ();
11221 int
11222 main ()
11223 {
11224 gettimeofday ();
11225   ;
11226   return 0;
11227 }
11228 _ACEOF
11229 rm -f conftest.$ac_objext conftest$ac_exeext
11230 if { (eval echo "$as_me:11230: \"$ac_link\"") >&5
11231   (eval $ac_link) 2>&5
11232   ac_status=$?
11233   echo "$as_me:11233: \$? = $ac_status" >&5
11234   (exit $ac_status); } &&
11235          { ac_try='test -s conftest$ac_exeext'
11236   { (eval echo "$as_me:11236: \"$ac_try\"") >&5
11237   (eval $ac_try) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); }; }; then
11241   ac_cv_lib_bsd_gettimeofday=yes
11242 else
11243   echo "$as_me: failed program was:" >&5
11244 cat conftest.$ac_ext >&5
11245 ac_cv_lib_bsd_gettimeofday=no
11246 fi
11247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11248 LIBS=$ac_check_lib_save_LIBS
11249 fi
11250 echo "$as_me:11250: result: $ac_cv_lib_bsd_gettimeofday" >&5
11251 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11252 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11253   cat >>confdefs.h <<\EOF
11254 #define HAVE_GETTIMEOFDAY 1
11255 EOF
11256
11257         LIBS="$LIBS -lbsd"
11258 fi
11259
11260 fi
11261
11262 echo "$as_me:11262: checking if -lm needed for math functions" >&5
11263 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11264 if test "${cf_cv_need_libm+set}" = set; then
11265   echo $ECHO_N "(cached) $ECHO_C" >&6
11266 else
11267
11268         cat >conftest.$ac_ext <<_ACEOF
11269 #line 11269 "configure"
11270 #include "confdefs.h"
11271
11272         #include <stdio.h>
11273         #include <math.h>
11274
11275 int
11276 main ()
11277 {
11278 double x = rand(); printf("result = %g\n", sin(x))
11279   ;
11280   return 0;
11281 }
11282 _ACEOF
11283 rm -f conftest.$ac_objext conftest$ac_exeext
11284 if { (eval echo "$as_me:11284: \"$ac_link\"") >&5
11285   (eval $ac_link) 2>&5
11286   ac_status=$?
11287   echo "$as_me:11287: \$? = $ac_status" >&5
11288   (exit $ac_status); } &&
11289          { ac_try='test -s conftest$ac_exeext'
11290   { (eval echo "$as_me:11290: \"$ac_try\"") >&5
11291   (eval $ac_try) 2>&5
11292   ac_status=$?
11293   echo "$as_me:11293: \$? = $ac_status" >&5
11294   (exit $ac_status); }; }; then
11295   cf_cv_need_libm=no
11296 else
11297   echo "$as_me: failed program was:" >&5
11298 cat conftest.$ac_ext >&5
11299 cf_cv_need_libm=yes
11300 fi
11301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11302 fi
11303 echo "$as_me:11303: result: $cf_cv_need_libm" >&5
11304 echo "${ECHO_T}$cf_cv_need_libm" >&6
11305 if test "$cf_cv_need_libm" = yes
11306 then
11307 MATH_LIB=-lm
11308 fi
11309
11310 ###     Checks for header files.
11311 echo "$as_me:11311: checking for ANSI C header files" >&5
11312 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11313 if test "${ac_cv_header_stdc+set}" = set; then
11314   echo $ECHO_N "(cached) $ECHO_C" >&6
11315 else
11316   cat >conftest.$ac_ext <<_ACEOF
11317 #line 11317 "configure"
11318 #include "confdefs.h"
11319 #include <stdlib.h>
11320 #include <stdarg.h>
11321 #include <string.h>
11322 #include <float.h>
11323
11324 _ACEOF
11325 if { (eval echo "$as_me:11325: \"$ac_cpp conftest.$ac_ext\"") >&5
11326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11327   ac_status=$?
11328   egrep -v '^ *\+' conftest.er1 >conftest.err
11329   rm -f conftest.er1
11330   cat conftest.err >&5
11331   echo "$as_me:11331: \$? = $ac_status" >&5
11332   (exit $ac_status); } >/dev/null; then
11333   if test -s conftest.err; then
11334     ac_cpp_err=$ac_c_preproc_warn_flag
11335   else
11336     ac_cpp_err=
11337   fi
11338 else
11339   ac_cpp_err=yes
11340 fi
11341 if test -z "$ac_cpp_err"; then
11342   ac_cv_header_stdc=yes
11343 else
11344   echo "$as_me: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   ac_cv_header_stdc=no
11347 fi
11348 rm -f conftest.err conftest.$ac_ext
11349
11350 if test $ac_cv_header_stdc = yes; then
11351   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11352   cat >conftest.$ac_ext <<_ACEOF
11353 #line 11353 "configure"
11354 #include "confdefs.h"
11355 #include <string.h>
11356
11357 _ACEOF
11358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11359   egrep "memchr" >/dev/null 2>&1; then
11360   :
11361 else
11362   ac_cv_header_stdc=no
11363 fi
11364 rm -f conftest*
11365
11366 fi
11367
11368 if test $ac_cv_header_stdc = yes; then
11369   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11370   cat >conftest.$ac_ext <<_ACEOF
11371 #line 11371 "configure"
11372 #include "confdefs.h"
11373 #include <stdlib.h>
11374
11375 _ACEOF
11376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11377   egrep "free" >/dev/null 2>&1; then
11378   :
11379 else
11380   ac_cv_header_stdc=no
11381 fi
11382 rm -f conftest*
11383
11384 fi
11385
11386 if test $ac_cv_header_stdc = yes; then
11387   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11388   if test "$cross_compiling" = yes; then
11389   :
11390 else
11391   cat >conftest.$ac_ext <<_ACEOF
11392 #line 11392 "configure"
11393 #include "confdefs.h"
11394 #include <ctype.h>
11395 #if ((' ' & 0x0FF) == 0x020)
11396 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11397 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11398 #else
11399 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11400                      || ('j' <= (c) && (c) <= 'r') \
11401                      || ('s' <= (c) && (c) <= 'z'))
11402 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11403 #endif
11404
11405 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11406 int
11407 main ()
11408 {
11409   int i;
11410   for (i = 0; i < 256; i++)
11411     if (XOR (islower (i), ISLOWER (i))
11412         || toupper (i) != TOUPPER (i))
11413       $ac_main_return(2);
11414   $ac_main_return (0);
11415 }
11416 _ACEOF
11417 rm -f conftest$ac_exeext
11418 if { (eval echo "$as_me:11418: \"$ac_link\"") >&5
11419   (eval $ac_link) 2>&5
11420   ac_status=$?
11421   echo "$as_me:11421: \$? = $ac_status" >&5
11422   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11423   { (eval echo "$as_me:11423: \"$ac_try\"") >&5
11424   (eval $ac_try) 2>&5
11425   ac_status=$?
11426   echo "$as_me:11426: \$? = $ac_status" >&5
11427   (exit $ac_status); }; }; then
11428   :
11429 else
11430   echo "$as_me: program exited with status $ac_status" >&5
11431 echo "$as_me: failed program was:" >&5
11432 cat conftest.$ac_ext >&5
11433 ac_cv_header_stdc=no
11434 fi
11435 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11436 fi
11437 fi
11438 fi
11439 echo "$as_me:11439: result: $ac_cv_header_stdc" >&5
11440 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11441 if test $ac_cv_header_stdc = yes; then
11442
11443 cat >>confdefs.h <<\EOF
11444 #define STDC_HEADERS 1
11445 EOF
11446
11447 fi
11448
11449 ac_header_dirent=no
11450 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11451   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11452 echo "$as_me:11452: checking for $ac_hdr that defines DIR" >&5
11453 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11454 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11455   echo $ECHO_N "(cached) $ECHO_C" >&6
11456 else
11457   cat >conftest.$ac_ext <<_ACEOF
11458 #line 11458 "configure"
11459 #include "confdefs.h"
11460 #include <sys/types.h>
11461 #include <$ac_hdr>
11462
11463 int
11464 main ()
11465 {
11466 if ((DIR *) 0)
11467 return 0;
11468   ;
11469   return 0;
11470 }
11471 _ACEOF
11472 rm -f conftest.$ac_objext
11473 if { (eval echo "$as_me:11473: \"$ac_compile\"") >&5
11474   (eval $ac_compile) 2>&5
11475   ac_status=$?
11476   echo "$as_me:11476: \$? = $ac_status" >&5
11477   (exit $ac_status); } &&
11478          { ac_try='test -s conftest.$ac_objext'
11479   { (eval echo "$as_me:11479: \"$ac_try\"") >&5
11480   (eval $ac_try) 2>&5
11481   ac_status=$?
11482   echo "$as_me:11482: \$? = $ac_status" >&5
11483   (exit $ac_status); }; }; then
11484   eval "$as_ac_Header=yes"
11485 else
11486   echo "$as_me: failed program was:" >&5
11487 cat conftest.$ac_ext >&5
11488 eval "$as_ac_Header=no"
11489 fi
11490 rm -f conftest.$ac_objext conftest.$ac_ext
11491 fi
11492 echo "$as_me:11492: result: `eval echo '${'$as_ac_Header'}'`" >&5
11493 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11494 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11495   cat >>confdefs.h <<EOF
11496 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11497 EOF
11498
11499 ac_header_dirent=$ac_hdr; break
11500 fi
11501
11502 done
11503 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11504 if test $ac_header_dirent = dirent.h; then
11505   echo "$as_me:11505: checking for opendir in -ldir" >&5
11506 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11507 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11508   echo $ECHO_N "(cached) $ECHO_C" >&6
11509 else
11510   ac_check_lib_save_LIBS=$LIBS
11511 LIBS="-ldir  $LIBS"
11512 cat >conftest.$ac_ext <<_ACEOF
11513 #line 11513 "configure"
11514 #include "confdefs.h"
11515
11516 /* Override any gcc2 internal prototype to avoid an error.  */
11517 #ifdef __cplusplus
11518 extern "C"
11519 #endif
11520 /* We use char because int might match the return type of a gcc2
11521    builtin and then its argument prototype would still apply.  */
11522 char opendir ();
11523 int
11524 main ()
11525 {
11526 opendir ();
11527   ;
11528   return 0;
11529 }
11530 _ACEOF
11531 rm -f conftest.$ac_objext conftest$ac_exeext
11532 if { (eval echo "$as_me:11532: \"$ac_link\"") >&5
11533   (eval $ac_link) 2>&5
11534   ac_status=$?
11535   echo "$as_me:11535: \$? = $ac_status" >&5
11536   (exit $ac_status); } &&
11537          { ac_try='test -s conftest$ac_exeext'
11538   { (eval echo "$as_me:11538: \"$ac_try\"") >&5
11539   (eval $ac_try) 2>&5
11540   ac_status=$?
11541   echo "$as_me:11541: \$? = $ac_status" >&5
11542   (exit $ac_status); }; }; then
11543   ac_cv_lib_dir_opendir=yes
11544 else
11545   echo "$as_me: failed program was:" >&5
11546 cat conftest.$ac_ext >&5
11547 ac_cv_lib_dir_opendir=no
11548 fi
11549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11550 LIBS=$ac_check_lib_save_LIBS
11551 fi
11552 echo "$as_me:11552: result: $ac_cv_lib_dir_opendir" >&5
11553 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11554 if test $ac_cv_lib_dir_opendir = yes; then
11555   LIBS="$LIBS -ldir"
11556 fi
11557
11558 else
11559   echo "$as_me:11559: checking for opendir in -lx" >&5
11560 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11561 if test "${ac_cv_lib_x_opendir+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   ac_check_lib_save_LIBS=$LIBS
11565 LIBS="-lx  $LIBS"
11566 cat >conftest.$ac_ext <<_ACEOF
11567 #line 11567 "configure"
11568 #include "confdefs.h"
11569
11570 /* Override any gcc2 internal prototype to avoid an error.  */
11571 #ifdef __cplusplus
11572 extern "C"
11573 #endif
11574 /* We use char because int might match the return type of a gcc2
11575    builtin and then its argument prototype would still apply.  */
11576 char opendir ();
11577 int
11578 main ()
11579 {
11580 opendir ();
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 rm -f conftest.$ac_objext conftest$ac_exeext
11586 if { (eval echo "$as_me:11586: \"$ac_link\"") >&5
11587   (eval $ac_link) 2>&5
11588   ac_status=$?
11589   echo "$as_me:11589: \$? = $ac_status" >&5
11590   (exit $ac_status); } &&
11591          { ac_try='test -s conftest$ac_exeext'
11592   { (eval echo "$as_me:11592: \"$ac_try\"") >&5
11593   (eval $ac_try) 2>&5
11594   ac_status=$?
11595   echo "$as_me:11595: \$? = $ac_status" >&5
11596   (exit $ac_status); }; }; then
11597   ac_cv_lib_x_opendir=yes
11598 else
11599   echo "$as_me: failed program was:" >&5
11600 cat conftest.$ac_ext >&5
11601 ac_cv_lib_x_opendir=no
11602 fi
11603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11604 LIBS=$ac_check_lib_save_LIBS
11605 fi
11606 echo "$as_me:11606: result: $ac_cv_lib_x_opendir" >&5
11607 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11608 if test $ac_cv_lib_x_opendir = yes; then
11609   LIBS="$LIBS -lx"
11610 fi
11611
11612 fi
11613
11614 echo "$as_me:11614: checking whether time.h and sys/time.h may both be included" >&5
11615 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11616 if test "${ac_cv_header_time+set}" = set; then
11617   echo $ECHO_N "(cached) $ECHO_C" >&6
11618 else
11619   cat >conftest.$ac_ext <<_ACEOF
11620 #line 11620 "configure"
11621 #include "confdefs.h"
11622 #include <sys/types.h>
11623 #include <sys/time.h>
11624 #include <time.h>
11625
11626 int
11627 main ()
11628 {
11629 if ((struct tm *) 0)
11630 return 0;
11631   ;
11632   return 0;
11633 }
11634 _ACEOF
11635 rm -f conftest.$ac_objext
11636 if { (eval echo "$as_me:11636: \"$ac_compile\"") >&5
11637   (eval $ac_compile) 2>&5
11638   ac_status=$?
11639   echo "$as_me:11639: \$? = $ac_status" >&5
11640   (exit $ac_status); } &&
11641          { ac_try='test -s conftest.$ac_objext'
11642   { (eval echo "$as_me:11642: \"$ac_try\"") >&5
11643   (eval $ac_try) 2>&5
11644   ac_status=$?
11645   echo "$as_me:11645: \$? = $ac_status" >&5
11646   (exit $ac_status); }; }; then
11647   ac_cv_header_time=yes
11648 else
11649   echo "$as_me: failed program was:" >&5
11650 cat conftest.$ac_ext >&5
11651 ac_cv_header_time=no
11652 fi
11653 rm -f conftest.$ac_objext conftest.$ac_ext
11654 fi
11655 echo "$as_me:11655: result: $ac_cv_header_time" >&5
11656 echo "${ECHO_T}$ac_cv_header_time" >&6
11657 if test $ac_cv_header_time = yes; then
11658
11659 cat >>confdefs.h <<\EOF
11660 #define TIME_WITH_SYS_TIME 1
11661 EOF
11662
11663 fi
11664
11665 echo "$as_me:11665: checking for regular-expression headers" >&5
11666 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11667 if test "${cf_cv_regex+set}" = set; then
11668   echo $ECHO_N "(cached) $ECHO_C" >&6
11669 else
11670
11671 cat >conftest.$ac_ext <<_ACEOF
11672 #line 11672 "configure"
11673 #include "confdefs.h"
11674 #include <sys/types.h>
11675 #include <regex.h>
11676 int
11677 main ()
11678 {
11679
11680         regex_t *p;
11681         int x = regcomp(p, "", 0);
11682         int y = regexec(p, "", 0, 0, 0);
11683         regfree(p);
11684
11685   ;
11686   return 0;
11687 }
11688 _ACEOF
11689 rm -f conftest.$ac_objext conftest$ac_exeext
11690 if { (eval echo "$as_me:11690: \"$ac_link\"") >&5
11691   (eval $ac_link) 2>&5
11692   ac_status=$?
11693   echo "$as_me:11693: \$? = $ac_status" >&5
11694   (exit $ac_status); } &&
11695          { ac_try='test -s conftest$ac_exeext'
11696   { (eval echo "$as_me:11696: \"$ac_try\"") >&5
11697   (eval $ac_try) 2>&5
11698   ac_status=$?
11699   echo "$as_me:11699: \$? = $ac_status" >&5
11700   (exit $ac_status); }; }; then
11701   cf_cv_regex="regex.h"
11702 else
11703   echo "$as_me: failed program was:" >&5
11704 cat conftest.$ac_ext >&5
11705
11706         cat >conftest.$ac_ext <<_ACEOF
11707 #line 11707 "configure"
11708 #include "confdefs.h"
11709 #include <regexp.h>
11710 int
11711 main ()
11712 {
11713
11714                 char *p = compile("", "", "", 0);
11715                 int x = step("", "");
11716
11717   ;
11718   return 0;
11719 }
11720 _ACEOF
11721 rm -f conftest.$ac_objext conftest$ac_exeext
11722 if { (eval echo "$as_me:11722: \"$ac_link\"") >&5
11723   (eval $ac_link) 2>&5
11724   ac_status=$?
11725   echo "$as_me:11725: \$? = $ac_status" >&5
11726   (exit $ac_status); } &&
11727          { ac_try='test -s conftest$ac_exeext'
11728   { (eval echo "$as_me:11728: \"$ac_try\"") >&5
11729   (eval $ac_try) 2>&5
11730   ac_status=$?
11731   echo "$as_me:11731: \$? = $ac_status" >&5
11732   (exit $ac_status); }; }; then
11733   cf_cv_regex="regexp.h"
11734 else
11735   echo "$as_me: failed program was:" >&5
11736 cat conftest.$ac_ext >&5
11737
11738                 cf_save_LIBS="$LIBS"
11739                 LIBS="-lgen $LIBS"
11740                 cat >conftest.$ac_ext <<_ACEOF
11741 #line 11741 "configure"
11742 #include "confdefs.h"
11743 #include <regexpr.h>
11744 int
11745 main ()
11746 {
11747
11748                         char *p = compile("", "", "");
11749                         int x = step("", "");
11750
11751   ;
11752   return 0;
11753 }
11754 _ACEOF
11755 rm -f conftest.$ac_objext conftest$ac_exeext
11756 if { (eval echo "$as_me:11756: \"$ac_link\"") >&5
11757   (eval $ac_link) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); } &&
11761          { ac_try='test -s conftest$ac_exeext'
11762   { (eval echo "$as_me:11762: \"$ac_try\"") >&5
11763   (eval $ac_try) 2>&5
11764   ac_status=$?
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit $ac_status); }; }; then
11767   cf_cv_regex="regexpr.h"
11768 else
11769   echo "$as_me: failed program was:" >&5
11770 cat conftest.$ac_ext >&5
11771 LIBS="$cf_save_LIBS"
11772 fi
11773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11774 fi
11775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11776 fi
11777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11778
11779 fi
11780
11781 echo "$as_me:11781: result: $cf_cv_regex" >&5
11782 echo "${ECHO_T}$cf_cv_regex" >&6
11783 case $cf_cv_regex in
11784         regex.h)   cat >>confdefs.h <<\EOF
11785 #define HAVE_REGEX_H_FUNCS 1
11786 EOF
11787  ;;
11788         regexp.h)  cat >>confdefs.h <<\EOF
11789 #define HAVE_REGEXP_H_FUNCS 1
11790 EOF
11791  ;;
11792         regexpr.h) cat >>confdefs.h <<\EOF
11793 #define HAVE_REGEXPR_H_FUNCS 1
11794 EOF
11795  ;;
11796 esac
11797
11798 for ac_header in \
11799 fcntl.h \
11800 getopt.h \
11801 limits.h \
11802 locale.h \
11803 poll.h \
11804 sys/bsdtypes.h \
11805 sys/ioctl.h \
11806 sys/param.h \
11807 sys/poll.h \
11808 sys/select.h \
11809 sys/time.h \
11810 sys/times.h \
11811 ttyent.h \
11812 unistd.h \
11813 wctype.h \
11814
11815 do
11816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11817 echo "$as_me:11817: checking for $ac_header" >&5
11818 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11819 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11820   echo $ECHO_N "(cached) $ECHO_C" >&6
11821 else
11822   cat >conftest.$ac_ext <<_ACEOF
11823 #line 11823 "configure"
11824 #include "confdefs.h"
11825 #include <$ac_header>
11826 _ACEOF
11827 if { (eval echo "$as_me:11827: \"$ac_cpp conftest.$ac_ext\"") >&5
11828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11829   ac_status=$?
11830   egrep -v '^ *\+' conftest.er1 >conftest.err
11831   rm -f conftest.er1
11832   cat conftest.err >&5
11833   echo "$as_me:11833: \$? = $ac_status" >&5
11834   (exit $ac_status); } >/dev/null; then
11835   if test -s conftest.err; then
11836     ac_cpp_err=$ac_c_preproc_warn_flag
11837   else
11838     ac_cpp_err=
11839   fi
11840 else
11841   ac_cpp_err=yes
11842 fi
11843 if test -z "$ac_cpp_err"; then
11844   eval "$as_ac_Header=yes"
11845 else
11846   echo "$as_me: failed program was:" >&5
11847   cat conftest.$ac_ext >&5
11848   eval "$as_ac_Header=no"
11849 fi
11850 rm -f conftest.err conftest.$ac_ext
11851 fi
11852 echo "$as_me:11852: result: `eval echo '${'$as_ac_Header'}'`" >&5
11853 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11854 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11855   cat >>confdefs.h <<EOF
11856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11857 EOF
11858
11859 fi
11860 done
11861
11862 # check for ISC (this may also define _POSIX_SOURCE)
11863 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11864 if test "$ISC" = yes ; then
11865
11866 echo "$as_me:11866: checking for main in -lcposix" >&5
11867 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11868 if test "${ac_cv_lib_cposix_main+set}" = set; then
11869   echo $ECHO_N "(cached) $ECHO_C" >&6
11870 else
11871   ac_check_lib_save_LIBS=$LIBS
11872 LIBS="-lcposix  $LIBS"
11873 cat >conftest.$ac_ext <<_ACEOF
11874 #line 11874 "configure"
11875 #include "confdefs.h"
11876
11877 int
11878 main ()
11879 {
11880 main ();
11881   ;
11882   return 0;
11883 }
11884 _ACEOF
11885 rm -f conftest.$ac_objext conftest$ac_exeext
11886 if { (eval echo "$as_me:11886: \"$ac_link\"") >&5
11887   (eval $ac_link) 2>&5
11888   ac_status=$?
11889   echo "$as_me:11889: \$? = $ac_status" >&5
11890   (exit $ac_status); } &&
11891          { ac_try='test -s conftest$ac_exeext'
11892   { (eval echo "$as_me:11892: \"$ac_try\"") >&5
11893   (eval $ac_try) 2>&5
11894   ac_status=$?
11895   echo "$as_me:11895: \$? = $ac_status" >&5
11896   (exit $ac_status); }; }; then
11897   ac_cv_lib_cposix_main=yes
11898 else
11899   echo "$as_me: failed program was:" >&5
11900 cat conftest.$ac_ext >&5
11901 ac_cv_lib_cposix_main=no
11902 fi
11903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11904 LIBS=$ac_check_lib_save_LIBS
11905 fi
11906 echo "$as_me:11906: result: $ac_cv_lib_cposix_main" >&5
11907 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11908 if test $ac_cv_lib_cposix_main = yes; then
11909   cat >>confdefs.h <<EOF
11910 #define HAVE_LIBCPOSIX 1
11911 EOF
11912
11913   LIBS="-lcposix $LIBS"
11914
11915 fi
11916
11917         echo "$as_me:11917: checking for bzero in -linet" >&5
11918 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11919 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11920   echo $ECHO_N "(cached) $ECHO_C" >&6
11921 else
11922   ac_check_lib_save_LIBS=$LIBS
11923 LIBS="-linet  $LIBS"
11924 cat >conftest.$ac_ext <<_ACEOF
11925 #line 11925 "configure"
11926 #include "confdefs.h"
11927
11928 /* Override any gcc2 internal prototype to avoid an error.  */
11929 #ifdef __cplusplus
11930 extern "C"
11931 #endif
11932 /* We use char because int might match the return type of a gcc2
11933    builtin and then its argument prototype would still apply.  */
11934 char bzero ();
11935 int
11936 main ()
11937 {
11938 bzero ();
11939   ;
11940   return 0;
11941 }
11942 _ACEOF
11943 rm -f conftest.$ac_objext conftest$ac_exeext
11944 if { (eval echo "$as_me:11944: \"$ac_link\"") >&5
11945   (eval $ac_link) 2>&5
11946   ac_status=$?
11947   echo "$as_me:11947: \$? = $ac_status" >&5
11948   (exit $ac_status); } &&
11949          { ac_try='test -s conftest$ac_exeext'
11950   { (eval echo "$as_me:11950: \"$ac_try\"") >&5
11951   (eval $ac_try) 2>&5
11952   ac_status=$?
11953   echo "$as_me:11953: \$? = $ac_status" >&5
11954   (exit $ac_status); }; }; then
11955   ac_cv_lib_inet_bzero=yes
11956 else
11957   echo "$as_me: failed program was:" >&5
11958 cat conftest.$ac_ext >&5
11959 ac_cv_lib_inet_bzero=no
11960 fi
11961 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11962 LIBS=$ac_check_lib_save_LIBS
11963 fi
11964 echo "$as_me:11964: result: $ac_cv_lib_inet_bzero" >&5
11965 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11966 if test $ac_cv_lib_inet_bzero = yes; then
11967   LIBS="$LIBS -linet"
11968 fi
11969 fi
11970
11971 echo "$as_me:11971: checking if sys/time.h works with sys/select.h" >&5
11972 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11973 if test "${cf_cv_sys_time_select+set}" = set; then
11974   echo $ECHO_N "(cached) $ECHO_C" >&6
11975 else
11976
11977 cat >conftest.$ac_ext <<_ACEOF
11978 #line 11978 "configure"
11979 #include "confdefs.h"
11980
11981 #include <sys/types.h>
11982 #ifdef HAVE_SYS_TIME_H
11983 #include <sys/time.h>
11984 #endif
11985 #ifdef HAVE_SYS_SELECT_H
11986 #include <sys/select.h>
11987 #endif
11988
11989 int
11990 main ()
11991 {
11992
11993   ;
11994   return 0;
11995 }
11996 _ACEOF
11997 rm -f conftest.$ac_objext
11998 if { (eval echo "$as_me:11998: \"$ac_compile\"") >&5
11999   (eval $ac_compile) 2>&5
12000   ac_status=$?
12001   echo "$as_me:12001: \$? = $ac_status" >&5
12002   (exit $ac_status); } &&
12003          { ac_try='test -s conftest.$ac_objext'
12004   { (eval echo "$as_me:12004: \"$ac_try\"") >&5
12005   (eval $ac_try) 2>&5
12006   ac_status=$?
12007   echo "$as_me:12007: \$? = $ac_status" >&5
12008   (exit $ac_status); }; }; then
12009   cf_cv_sys_time_select=yes
12010 else
12011   echo "$as_me: failed program was:" >&5
12012 cat conftest.$ac_ext >&5
12013 cf_cv_sys_time_select=no
12014 fi
12015 rm -f conftest.$ac_objext conftest.$ac_ext
12016
12017 fi
12018
12019 echo "$as_me:12019: result: $cf_cv_sys_time_select" >&5
12020 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12021 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12022 #define HAVE_SYS_TIME_SELECT 1
12023 EOF
12024
12025 ###     checks for compiler characteristics
12026 ac_ext=c
12027 ac_cpp='$CPP $CPPFLAGS'
12028 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12029 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12031 ac_main_return=return
12032
12033 echo "$as_me:12033: checking for $CC option to accept ANSI C" >&5
12034 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12035 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12036   echo $ECHO_N "(cached) $ECHO_C" >&6
12037 else
12038   ac_cv_prog_cc_stdc=no
12039 ac_save_CC=$CC
12040 cat >conftest.$ac_ext <<_ACEOF
12041 #line 12041 "configure"
12042 #include "confdefs.h"
12043 #include <stdarg.h>
12044 #include <stdio.h>
12045 #include <sys/types.h>
12046 #include <sys/stat.h>
12047 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12048 struct buf { int x; };
12049 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12050 static char *e (p, i)
12051      char **p;
12052      int i;
12053 {
12054   return p[i];
12055 }
12056 static char *f (char * (*g) (char **, int), char **p, ...)
12057 {
12058   char *s;
12059   va_list v;
12060   va_start (v,p);
12061   s = g (p, va_arg (v,int));
12062   va_end (v);
12063   return s;
12064 }
12065 int test (int i, double x);
12066 struct s1 {int (*f) (int a);};
12067 struct s2 {int (*f) (double a);};
12068 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12069 int argc;
12070 char **argv;
12071 int
12072 main ()
12073 {
12074 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12075   ;
12076   return 0;
12077 }
12078 _ACEOF
12079 # Don't try gcc -ansi; that turns off useful extensions and
12080 # breaks some systems' header files.
12081 # AIX                   -qlanglvl=ansi
12082 # Ultrix and OSF/1      -std1
12083 # HP-UX 10.20 and later -Ae
12084 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12085 # SVR4                  -Xc -D__EXTENSIONS__
12086 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12087 do
12088   CC="$ac_save_CC $ac_arg"
12089   rm -f conftest.$ac_objext
12090 if { (eval echo "$as_me:12090: \"$ac_compile\"") >&5
12091   (eval $ac_compile) 2>&5
12092   ac_status=$?
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit $ac_status); } &&
12095          { ac_try='test -s conftest.$ac_objext'
12096   { (eval echo "$as_me:12096: \"$ac_try\"") >&5
12097   (eval $ac_try) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit $ac_status); }; }; then
12101   ac_cv_prog_cc_stdc=$ac_arg
12102 break
12103 else
12104   echo "$as_me: failed program was:" >&5
12105 cat conftest.$ac_ext >&5
12106 fi
12107 rm -f conftest.$ac_objext
12108 done
12109 rm -f conftest.$ac_ext conftest.$ac_objext
12110 CC=$ac_save_CC
12111
12112 fi
12113
12114 case "x$ac_cv_prog_cc_stdc" in
12115   x|xno)
12116     echo "$as_me:12116: result: none needed" >&5
12117 echo "${ECHO_T}none needed" >&6 ;;
12118   *)
12119     echo "$as_me:12119: result: $ac_cv_prog_cc_stdc" >&5
12120 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12121     CC="$CC $ac_cv_prog_cc_stdc" ;;
12122 esac
12123
12124 echo "$as_me:12124: checking for an ANSI C-conforming const" >&5
12125 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12126 if test "${ac_cv_c_const+set}" = set; then
12127   echo $ECHO_N "(cached) $ECHO_C" >&6
12128 else
12129   cat >conftest.$ac_ext <<_ACEOF
12130 #line 12130 "configure"
12131 #include "confdefs.h"
12132
12133 int
12134 main ()
12135 {
12136 /* FIXME: Include the comments suggested by Paul. */
12137 #ifndef __cplusplus
12138   /* Ultrix mips cc rejects this.  */
12139   typedef int charset[2];
12140   const charset x;
12141   /* SunOS 4.1.1 cc rejects this.  */
12142   char const *const *ccp;
12143   char **p;
12144   /* NEC SVR4.0.2 mips cc rejects this.  */
12145   struct point {int x, y;};
12146   static struct point const zero = {0,0};
12147   /* AIX XL C 1.02.0.0 rejects this.
12148      It does not let you subtract one const X* pointer from another in
12149      an arm of an if-expression whose if-part is not a constant
12150      expression */
12151   const char *g = "string";
12152   ccp = &g + (g ? g-g : 0);
12153   /* HPUX 7.0 cc rejects these. */
12154   ++ccp;
12155   p = (char**) ccp;
12156   ccp = (char const *const *) p;
12157   { /* SCO 3.2v4 cc rejects this.  */
12158     char *t;
12159     char const *s = 0 ? (char *) 0 : (char const *) 0;
12160
12161     *t++ = 0;
12162   }
12163   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12164     int x[] = {25, 17};
12165     const int *foo = &x[0];
12166     ++foo;
12167   }
12168   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12169     typedef const int *iptr;
12170     iptr p = 0;
12171     ++p;
12172   }
12173   { /* AIX XL C 1.02.0.0 rejects this saying
12174        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12175     struct s { int j; const int *ap[3]; };
12176     struct s *b; b->j = 5;
12177   }
12178   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12179     const int foo = 10;
12180   }
12181 #endif
12182
12183   ;
12184   return 0;
12185 }
12186 _ACEOF
12187 rm -f conftest.$ac_objext
12188 if { (eval echo "$as_me:12188: \"$ac_compile\"") >&5
12189   (eval $ac_compile) 2>&5
12190   ac_status=$?
12191   echo "$as_me:12191: \$? = $ac_status" >&5
12192   (exit $ac_status); } &&
12193          { ac_try='test -s conftest.$ac_objext'
12194   { (eval echo "$as_me:12194: \"$ac_try\"") >&5
12195   (eval $ac_try) 2>&5
12196   ac_status=$?
12197   echo "$as_me:12197: \$? = $ac_status" >&5
12198   (exit $ac_status); }; }; then
12199   ac_cv_c_const=yes
12200 else
12201   echo "$as_me: failed program was:" >&5
12202 cat conftest.$ac_ext >&5
12203 ac_cv_c_const=no
12204 fi
12205 rm -f conftest.$ac_objext conftest.$ac_ext
12206 fi
12207 echo "$as_me:12207: result: $ac_cv_c_const" >&5
12208 echo "${ECHO_T}$ac_cv_c_const" >&6
12209 if test $ac_cv_c_const = no; then
12210
12211 cat >>confdefs.h <<\EOF
12212 #define const
12213 EOF
12214
12215 fi
12216
12217 echo "$as_me:12217: checking for inline" >&5
12218 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12219 if test "${ac_cv_c_inline+set}" = set; then
12220   echo $ECHO_N "(cached) $ECHO_C" >&6
12221 else
12222   ac_cv_c_inline=no
12223 for ac_kw in inline __inline__ __inline; do
12224   cat >conftest.$ac_ext <<_ACEOF
12225 #line 12225 "configure"
12226 #include "confdefs.h"
12227 #ifndef __cplusplus
12228 static $ac_kw int static_foo () {return 0; }
12229 $ac_kw int foo () {return 0; }
12230 #endif
12231
12232 _ACEOF
12233 rm -f conftest.$ac_objext
12234 if { (eval echo "$as_me:12234: \"$ac_compile\"") >&5
12235   (eval $ac_compile) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); } &&
12239          { ac_try='test -s conftest.$ac_objext'
12240   { (eval echo "$as_me:12240: \"$ac_try\"") >&5
12241   (eval $ac_try) 2>&5
12242   ac_status=$?
12243   echo "$as_me:12243: \$? = $ac_status" >&5
12244   (exit $ac_status); }; }; then
12245   ac_cv_c_inline=$ac_kw; break
12246 else
12247   echo "$as_me: failed program was:" >&5
12248 cat conftest.$ac_ext >&5
12249 fi
12250 rm -f conftest.$ac_objext conftest.$ac_ext
12251 done
12252
12253 fi
12254 echo "$as_me:12254: result: $ac_cv_c_inline" >&5
12255 echo "${ECHO_T}$ac_cv_c_inline" >&6
12256 case $ac_cv_c_inline in
12257   inline | yes) ;;
12258   no)
12259 cat >>confdefs.h <<\EOF
12260 #define inline
12261 EOF
12262  ;;
12263   *)  cat >>confdefs.h <<EOF
12264 #define inline $ac_cv_c_inline
12265 EOF
12266  ;;
12267 esac
12268
12269 NCURSES_INLINE=
12270 if test "$ac_cv_c_inline" != no ; then
12271   NCURSES_INLINE=inline
12272   if test "$INTEL_COMPILER" = yes
12273   then
12274     :
12275   elif test "$GCC" = yes
12276   then
12277     echo "$as_me:12277: checking if gcc supports options to tune inlining" >&5
12278 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12279 if test "${cf_cv_gcc_inline+set}" = set; then
12280   echo $ECHO_N "(cached) $ECHO_C" >&6
12281 else
12282
12283       cf_save_CFLAGS=$CFLAGS
12284       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12285       cat >conftest.$ac_ext <<_ACEOF
12286 #line 12286 "configure"
12287 #include "confdefs.h"
12288 inline int foo(void) { return 1; }
12289 int
12290 main ()
12291 {
12292 ${cf_cv_main_return:-return} foo()
12293   ;
12294   return 0;
12295 }
12296 _ACEOF
12297 rm -f conftest.$ac_objext
12298 if { (eval echo "$as_me:12298: \"$ac_compile\"") >&5
12299   (eval $ac_compile) 2>&5
12300   ac_status=$?
12301   echo "$as_me:12301: \$? = $ac_status" >&5
12302   (exit $ac_status); } &&
12303          { ac_try='test -s conftest.$ac_objext'
12304   { (eval echo "$as_me:12304: \"$ac_try\"") >&5
12305   (eval $ac_try) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); }; }; then
12309   cf_cv_gcc_inline=yes
12310 else
12311   echo "$as_me: failed program was:" >&5
12312 cat conftest.$ac_ext >&5
12313 cf_cv_gcc_inline=no
12314 fi
12315 rm -f conftest.$ac_objext conftest.$ac_ext
12316       CFLAGS=$cf_save_CFLAGS
12317
12318 fi
12319 echo "$as_me:12319: result: $cf_cv_gcc_inline" >&5
12320 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12321     if test "$cf_cv_gcc_inline" = yes ; then
12322
12323 cf_fix_cppflags=no
12324 cf_new_cflags=
12325 cf_new_cppflags=
12326 cf_new_extra_cppflags=
12327
12328 for cf_add_cflags in --param max-inline-insns-single=1200
12329 do
12330 case $cf_fix_cppflags in
12331 no)
12332         case $cf_add_cflags in #(vi
12333         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12334                 case $cf_add_cflags in
12335                 -D*)
12336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12337
12338                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12339                         && test -z "${cf_tst_cflags}" \
12340                         && cf_fix_cppflags=yes
12341
12342                         if test $cf_fix_cppflags = yes ; then
12343                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12344                                 continue
12345                         elif test "${cf_tst_cflags}" = "\"'" ; then
12346                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12347                                 continue
12348                         fi
12349                         ;;
12350                 esac
12351                 case "$CPPFLAGS" in
12352                 *$cf_add_cflags) #(vi
12353                         ;;
12354                 *) #(vi
12355                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12356                         ;;
12357                 esac
12358                 ;;
12359         *)
12360                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12361                 ;;
12362         esac
12363         ;;
12364 yes)
12365         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12366
12367         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12368
12369         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12370         && test -z "${cf_tst_cflags}" \
12371         && cf_fix_cppflags=no
12372         ;;
12373 esac
12374 done
12375
12376 if test -n "$cf_new_cflags" ; then
12377
12378         CFLAGS="$CFLAGS $cf_new_cflags"
12379 fi
12380
12381 if test -n "$cf_new_cppflags" ; then
12382
12383         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12384 fi
12385
12386 if test -n "$cf_new_extra_cppflags" ; then
12387
12388         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12389 fi
12390
12391     fi
12392   fi
12393 fi
12394
12395 echo "$as_me:12395: checking for signal global datatype" >&5
12396 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12397 if test "${cf_cv_sig_atomic_t+set}" = set; then
12398   echo $ECHO_N "(cached) $ECHO_C" >&6
12399 else
12400
12401         for cf_type in \
12402                 "volatile sig_atomic_t" \
12403                 "sig_atomic_t" \
12404                 "int"
12405         do
12406         cat >conftest.$ac_ext <<_ACEOF
12407 #line 12407 "configure"
12408 #include "confdefs.h"
12409
12410 #include <sys/types.h>
12411 #include <signal.h>
12412 #include <stdio.h>
12413
12414 extern $cf_type x;
12415 $cf_type x;
12416 static void handler(int sig)
12417 {
12418         x = 5;
12419 }
12420 int
12421 main ()
12422 {
12423 signal(SIGINT, handler);
12424                  x = 1
12425   ;
12426   return 0;
12427 }
12428 _ACEOF
12429 rm -f conftest.$ac_objext
12430 if { (eval echo "$as_me:12430: \"$ac_compile\"") >&5
12431   (eval $ac_compile) 2>&5
12432   ac_status=$?
12433   echo "$as_me:12433: \$? = $ac_status" >&5
12434   (exit $ac_status); } &&
12435          { ac_try='test -s conftest.$ac_objext'
12436   { (eval echo "$as_me:12436: \"$ac_try\"") >&5
12437   (eval $ac_try) 2>&5
12438   ac_status=$?
12439   echo "$as_me:12439: \$? = $ac_status" >&5
12440   (exit $ac_status); }; }; then
12441   cf_cv_sig_atomic_t=$cf_type
12442 else
12443   echo "$as_me: failed program was:" >&5
12444 cat conftest.$ac_ext >&5
12445 cf_cv_sig_atomic_t=no
12446 fi
12447 rm -f conftest.$ac_objext conftest.$ac_ext
12448                 test "$cf_cv_sig_atomic_t" != no && break
12449         done
12450
12451 fi
12452
12453 echo "$as_me:12453: result: $cf_cv_sig_atomic_t" >&5
12454 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12455 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12456 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12457 EOF
12458
12459 if test $NCURSES_CHTYPE = auto ; then
12460
12461 echo "$as_me:12461: checking for type of chtype" >&5
12462 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12463 if test "${cf_cv_typeof_chtype+set}" = set; then
12464   echo $ECHO_N "(cached) $ECHO_C" >&6
12465 else
12466
12467                 if test "$cross_compiling" = yes; then
12468   cf_cv_typeof_chtype=long
12469 else
12470   cat >conftest.$ac_ext <<_ACEOF
12471 #line 12471 "configure"
12472 #include "confdefs.h"
12473
12474 #define WANT_BITS 31
12475 #include <stdio.h>
12476 int main()
12477 {
12478         FILE *fp = fopen("cf_test.out", "w");
12479         if (fp != 0) {
12480                 char *result = "long";
12481                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12482                         int n;
12483                         unsigned int x, y;
12484                         for (n = 0; n < WANT_BITS; n++) {
12485                                 x = (1 << n);
12486                                 y = (x >> n);
12487                                 if (y != 1 || x == 0) {
12488                                         x = 0;
12489                                         break;
12490                                 }
12491                         }
12492                         /*
12493                          * If x is nonzero, an int is big enough for the bits
12494                          * that we want.
12495                          */
12496                         result = (x != 0) ? "int" : "long";
12497                 }
12498                 fputs(result, fp);
12499                 fclose(fp);
12500         }
12501         ${cf_cv_main_return:-return}(0);
12502 }
12503
12504 _ACEOF
12505 rm -f conftest$ac_exeext
12506 if { (eval echo "$as_me:12506: \"$ac_link\"") >&5
12507   (eval $ac_link) 2>&5
12508   ac_status=$?
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12511   { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512   (eval $ac_try) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); }; }; then
12516   cf_cv_typeof_chtype=`cat cf_test.out`
12517 else
12518   echo "$as_me: program exited with status $ac_status" >&5
12519 echo "$as_me: failed program was:" >&5
12520 cat conftest.$ac_ext >&5
12521 cf_cv_typeof_chtype=long
12522 fi
12523 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12524 fi
12525                 rm -f cf_test.out
12526
12527 fi
12528
12529 echo "$as_me:12529: result: $cf_cv_typeof_chtype" >&5
12530 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12531
12532 cat >>confdefs.h <<EOF
12533 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12534 EOF
12535
12536 else
12537         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12538 fi
12539 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12540
12541 echo "$as_me:12541: checking if unsigned literals are legal" >&5
12542 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12543 if test "${cf_cv_unsigned_literals+set}" = set; then
12544   echo $ECHO_N "(cached) $ECHO_C" >&6
12545 else
12546
12547         cat >conftest.$ac_ext <<_ACEOF
12548 #line 12548 "configure"
12549 #include "confdefs.h"
12550
12551 int
12552 main ()
12553 {
12554 long x = 1L + 1UL + 1U + 1
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 rm -f conftest.$ac_objext
12560 if { (eval echo "$as_me:12560: \"$ac_compile\"") >&5
12561   (eval $ac_compile) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); } &&
12565          { ac_try='test -s conftest.$ac_objext'
12566   { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567   (eval $ac_try) 2>&5
12568   ac_status=$?
12569   echo "$as_me:12569: \$? = $ac_status" >&5
12570   (exit $ac_status); }; }; then
12571   cf_cv_unsigned_literals=yes
12572 else
12573   echo "$as_me: failed program was:" >&5
12574 cat conftest.$ac_ext >&5
12575 cf_cv_unsigned_literals=no
12576 fi
12577 rm -f conftest.$ac_objext conftest.$ac_ext
12578
12579 fi
12580
12581 echo "$as_me:12581: result: $cf_cv_unsigned_literals" >&5
12582 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12583
12584 cf_cv_1UL="1"
12585 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12586 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12587
12588 if test $NCURSES_MMASK_T = auto ; then
12589         cf_cv_typeof_mmask_t=long
12590 else
12591         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12592 fi
12593 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12594
12595 ###     Checks for external-data
12596
12597 echo "$as_me:12597: checking if external errno is declared" >&5
12598 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12599 if test "${cf_cv_dcl_errno+set}" = set; then
12600   echo $ECHO_N "(cached) $ECHO_C" >&6
12601 else
12602
12603     cat >conftest.$ac_ext <<_ACEOF
12604 #line 12604 "configure"
12605 #include "confdefs.h"
12606
12607 #ifdef HAVE_STDLIB_H
12608 #include <stdlib.h>
12609 #endif
12610 #include <stdio.h>
12611 #include <sys/types.h>
12612 #include <errno.h>
12613 int
12614 main ()
12615 {
12616 int x = (int) errno
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f conftest.$ac_objext
12622 if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
12623   (eval $ac_compile) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); } &&
12627          { ac_try='test -s conftest.$ac_objext'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); }; }; then
12633   cf_cv_dcl_errno=yes
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat conftest.$ac_ext >&5
12637 cf_cv_dcl_errno=no
12638 fi
12639 rm -f conftest.$ac_objext conftest.$ac_ext
12640
12641 fi
12642 echo "$as_me:12642: result: $cf_cv_dcl_errno" >&5
12643 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12644
12645 if test "$cf_cv_dcl_errno" = no ; then
12646
12647 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12648
12649     cat >>confdefs.h <<EOF
12650 #define $cf_result 1
12651 EOF
12652
12653 fi
12654
12655 # It's possible (for near-UNIX clones) that the data doesn't exist
12656
12657 echo "$as_me:12657: checking if external errno exists" >&5
12658 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12659 if test "${cf_cv_have_errno+set}" = set; then
12660   echo $ECHO_N "(cached) $ECHO_C" >&6
12661 else
12662
12663     cat >conftest.$ac_ext <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666
12667 #undef errno
12668 extern int errno;
12669
12670 int
12671 main ()
12672 {
12673 errno = 2
12674   ;
12675   return 0;
12676 }
12677 _ACEOF
12678 rm -f conftest.$ac_objext conftest$ac_exeext
12679 if { (eval echo "$as_me:12679: \"$ac_link\"") >&5
12680   (eval $ac_link) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); } &&
12684          { ac_try='test -s conftest$ac_exeext'
12685   { (eval echo "$as_me:12685: \"$ac_try\"") >&5
12686   (eval $ac_try) 2>&5
12687   ac_status=$?
12688   echo "$as_me:12688: \$? = $ac_status" >&5
12689   (exit $ac_status); }; }; then
12690   cf_cv_have_errno=yes
12691 else
12692   echo "$as_me: failed program was:" >&5
12693 cat conftest.$ac_ext >&5
12694 cf_cv_have_errno=no
12695 fi
12696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12697
12698 fi
12699 echo "$as_me:12699: result: $cf_cv_have_errno" >&5
12700 echo "${ECHO_T}$cf_cv_have_errno" >&6
12701
12702 if test "$cf_cv_have_errno" = yes ; then
12703
12704 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12705
12706     cat >>confdefs.h <<EOF
12707 #define $cf_result 1
12708 EOF
12709
12710 fi
12711
12712 echo "$as_me:12712: checking if data-only library module links" >&5
12713 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12714 if test "${cf_cv_link_dataonly+set}" = set; then
12715   echo $ECHO_N "(cached) $ECHO_C" >&6
12716 else
12717
12718         rm -f conftest.a
12719         cat >conftest.$ac_ext <<EOF
12720 #line 12720 "configure"
12721 int     testdata[3] = { 123, 456, 789 };
12722 EOF
12723         if { (eval echo "$as_me:12723: \"$ac_compile\"") >&5
12724   (eval $ac_compile) 2>&5
12725   ac_status=$?
12726   echo "$as_me:12726: \$? = $ac_status" >&5
12727   (exit $ac_status); } ; then
12728                 mv conftest.o data.o && \
12729                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12730         fi
12731         rm -f conftest.$ac_ext data.o
12732         cat >conftest.$ac_ext <<EOF
12733 #line 12733 "configure"
12734 int     testfunc()
12735 {
12736 #if defined(NeXT)
12737         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12738 #else
12739         extern int testdata[3];
12740         return testdata[0] == 123
12741            &&  testdata[1] == 456
12742            &&  testdata[2] == 789;
12743 #endif
12744 }
12745 EOF
12746         if { (eval echo "$as_me:12746: \"$ac_compile\"") >&5
12747   (eval $ac_compile) 2>&5
12748   ac_status=$?
12749   echo "$as_me:12749: \$? = $ac_status" >&5
12750   (exit $ac_status); }; then
12751                 mv conftest.o func.o && \
12752                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12753         fi
12754         rm -f conftest.$ac_ext func.o
12755         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12756         cf_saveLIBS="$LIBS"
12757         LIBS="conftest.a $LIBS"
12758         if test "$cross_compiling" = yes; then
12759   cf_cv_link_dataonly=unknown
12760 else
12761   cat >conftest.$ac_ext <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764
12765         int main()
12766         {
12767                 extern int testfunc();
12768                 ${cf_cv_main_return:-return} (!testfunc());
12769         }
12770
12771 _ACEOF
12772 rm -f conftest$ac_exeext
12773 if { (eval echo "$as_me:12773: \"$ac_link\"") >&5
12774   (eval $ac_link) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); }; }; then
12783   cf_cv_link_dataonly=yes
12784 else
12785   echo "$as_me: program exited with status $ac_status" >&5
12786 echo "$as_me: failed program was:" >&5
12787 cat conftest.$ac_ext >&5
12788 cf_cv_link_dataonly=no
12789 fi
12790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12791 fi
12792         LIBS="$cf_saveLIBS"
12793
12794 fi
12795
12796 echo "$as_me:12796: result: $cf_cv_link_dataonly" >&5
12797 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12798
12799 if test "$cf_cv_link_dataonly" = no ; then
12800         cat >>confdefs.h <<\EOF
12801 #define BROKEN_LINKER 1
12802 EOF
12803
12804         BROKEN_LINKER=1
12805 fi
12806
12807 ###     Checks for library functions.
12808
12809 for ac_func in \
12810 getcwd \
12811 getegid \
12812 geteuid \
12813 getttynam \
12814 issetugid \
12815 poll \
12816 remove \
12817 select \
12818 setbuf \
12819 setbuffer \
12820 setvbuf \
12821 sigaction \
12822 sigvec \
12823 strdup \
12824 strstr \
12825 tcgetpgrp \
12826 times \
12827 vsnprintf \
12828
12829 do
12830 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12831 echo "$as_me:12831: checking for $ac_func" >&5
12832 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12833 if eval "test \"\${$as_ac_var+set}\" = set"; then
12834   echo $ECHO_N "(cached) $ECHO_C" >&6
12835 else
12836   cat >conftest.$ac_ext <<_ACEOF
12837 #line 12837 "configure"
12838 #include "confdefs.h"
12839 /* System header to define __stub macros and hopefully few prototypes,
12840     which can conflict with char $ac_func (); below.  */
12841 #include <assert.h>
12842 /* Override any gcc2 internal prototype to avoid an error.  */
12843 #ifdef __cplusplus
12844 extern "C"
12845 #endif
12846 /* We use char because int might match the return type of a gcc2
12847    builtin and then its argument prototype would still apply.  */
12848 char $ac_func ();
12849 char (*f) ();
12850
12851 int
12852 main ()
12853 {
12854 /* The GNU C library defines this for functions which it implements
12855     to always fail with ENOSYS.  Some functions are actually named
12856     something starting with __ and the normal name is an alias.  */
12857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12858 choke me
12859 #else
12860 f = $ac_func;
12861 #endif
12862
12863   ;
12864   return 0;
12865 }
12866 _ACEOF
12867 rm -f conftest.$ac_objext conftest$ac_exeext
12868 if { (eval echo "$as_me:12868: \"$ac_link\"") >&5
12869   (eval $ac_link) 2>&5
12870   ac_status=$?
12871   echo "$as_me:12871: \$? = $ac_status" >&5
12872   (exit $ac_status); } &&
12873          { ac_try='test -s conftest$ac_exeext'
12874   { (eval echo "$as_me:12874: \"$ac_try\"") >&5
12875   (eval $ac_try) 2>&5
12876   ac_status=$?
12877   echo "$as_me:12877: \$? = $ac_status" >&5
12878   (exit $ac_status); }; }; then
12879   eval "$as_ac_var=yes"
12880 else
12881   echo "$as_me: failed program was:" >&5
12882 cat conftest.$ac_ext >&5
12883 eval "$as_ac_var=no"
12884 fi
12885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12886 fi
12887 echo "$as_me:12887: result: `eval echo '${'$as_ac_var'}'`" >&5
12888 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12889 if test `eval echo '${'$as_ac_var'}'` = yes; then
12890   cat >>confdefs.h <<EOF
12891 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12892 EOF
12893
12894 fi
12895 done
12896
12897 if test "$with_getcap" = "yes" ; then
12898
12899 echo "$as_me:12899: checking for terminal-capability database functions" >&5
12900 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12901 if test "${cf_cv_cgetent+set}" = set; then
12902   echo $ECHO_N "(cached) $ECHO_C" >&6
12903 else
12904
12905 cat >conftest.$ac_ext <<_ACEOF
12906 #line 12906 "configure"
12907 #include "confdefs.h"
12908
12909 #include <stdlib.h>
12910 int
12911 main ()
12912 {
12913
12914         char temp[128];
12915         char *buf = temp;
12916         char *db_array = temp;
12917         cgetent(&buf, /* int *, */ &db_array, "vt100");
12918         cgetcap(buf, "tc", '=');
12919         cgetmatch(buf, "tc");
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 rm -f conftest.$ac_objext conftest$ac_exeext
12926 if { (eval echo "$as_me:12926: \"$ac_link\"") >&5
12927   (eval $ac_link) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); } &&
12931          { ac_try='test -s conftest$ac_exeext'
12932   { (eval echo "$as_me:12932: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; }; then
12937   cf_cv_cgetent=yes
12938 else
12939   echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 cf_cv_cgetent=no
12942 fi
12943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12944
12945 fi
12946
12947 echo "$as_me:12947: result: $cf_cv_cgetent" >&5
12948 echo "${ECHO_T}$cf_cv_cgetent" >&6
12949 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12950 #define HAVE_BSD_CGETENT 1
12951 EOF
12952
12953 fi
12954
12955 echo "$as_me:12955: checking for isascii" >&5
12956 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12957 if test "${cf_cv_have_isascii+set}" = set; then
12958   echo $ECHO_N "(cached) $ECHO_C" >&6
12959 else
12960
12961         cat >conftest.$ac_ext <<_ACEOF
12962 #line 12962 "configure"
12963 #include "confdefs.h"
12964 #include <ctype.h>
12965 int
12966 main ()
12967 {
12968 int x = isascii(' ')
12969   ;
12970   return 0;
12971 }
12972 _ACEOF
12973 rm -f conftest.$ac_objext conftest$ac_exeext
12974 if { (eval echo "$as_me:12974: \"$ac_link\"") >&5
12975   (eval $ac_link) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); } &&
12979          { ac_try='test -s conftest$ac_exeext'
12980   { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981   (eval $ac_try) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); }; }; then
12985   cf_cv_have_isascii=yes
12986 else
12987   echo "$as_me: failed program was:" >&5
12988 cat conftest.$ac_ext >&5
12989 cf_cv_have_isascii=no
12990 fi
12991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12992
12993 fi
12994 echo "$as_me:12994: result: $cf_cv_have_isascii" >&5
12995 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12996 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12997 #define HAVE_ISASCII 1
12998 EOF
12999
13000 if test "$ac_cv_func_sigaction" = yes; then
13001 echo "$as_me:13001: checking whether sigaction needs _POSIX_SOURCE" >&5
13002 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13003 cat >conftest.$ac_ext <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006
13007 #include <sys/types.h>
13008 #include <signal.h>
13009 int
13010 main ()
13011 {
13012 struct sigaction act
13013   ;
13014   return 0;
13015 }
13016 _ACEOF
13017 rm -f conftest.$ac_objext
13018 if { (eval echo "$as_me:13018: \"$ac_compile\"") >&5
13019   (eval $ac_compile) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); } &&
13023          { ac_try='test -s conftest.$ac_objext'
13024   { (eval echo "$as_me:13024: \"$ac_try\"") >&5
13025   (eval $ac_try) 2>&5
13026   ac_status=$?
13027   echo "$as_me:13027: \$? = $ac_status" >&5
13028   (exit $ac_status); }; }; then
13029   sigact_bad=no
13030 else
13031   echo "$as_me: failed program was:" >&5
13032 cat conftest.$ac_ext >&5
13033
13034 cat >conftest.$ac_ext <<_ACEOF
13035 #line 13035 "configure"
13036 #include "confdefs.h"
13037
13038 #define _POSIX_SOURCE
13039 #include <sys/types.h>
13040 #include <signal.h>
13041 int
13042 main ()
13043 {
13044 struct sigaction act
13045   ;
13046   return 0;
13047 }
13048 _ACEOF
13049 rm -f conftest.$ac_objext
13050 if { (eval echo "$as_me:13050: \"$ac_compile\"") >&5
13051   (eval $ac_compile) 2>&5
13052   ac_status=$?
13053   echo "$as_me:13053: \$? = $ac_status" >&5
13054   (exit $ac_status); } &&
13055          { ac_try='test -s conftest.$ac_objext'
13056   { (eval echo "$as_me:13056: \"$ac_try\"") >&5
13057   (eval $ac_try) 2>&5
13058   ac_status=$?
13059   echo "$as_me:13059: \$? = $ac_status" >&5
13060   (exit $ac_status); }; }; then
13061   sigact_bad=yes
13062          cat >>confdefs.h <<\EOF
13063 #define SVR4_ACTION 1
13064 EOF
13065
13066 else
13067   echo "$as_me: failed program was:" >&5
13068 cat conftest.$ac_ext >&5
13069 sigact_bad=unknown
13070 fi
13071 rm -f conftest.$ac_objext conftest.$ac_ext
13072 fi
13073 rm -f conftest.$ac_objext conftest.$ac_ext
13074 echo "$as_me:13074: result: $sigact_bad" >&5
13075 echo "${ECHO_T}$sigact_bad" >&6
13076 fi
13077
13078 echo "$as_me:13078: checking if nanosleep really works" >&5
13079 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13080 if test "${cf_cv_func_nanosleep+set}" = set; then
13081   echo $ECHO_N "(cached) $ECHO_C" >&6
13082 else
13083
13084 if test "$cross_compiling" = yes; then
13085   cf_cv_func_nanosleep=unknown
13086 else
13087   cat >conftest.$ac_ext <<_ACEOF
13088 #line 13088 "configure"
13089 #include "confdefs.h"
13090
13091 #include <stdio.h>
13092 #include <errno.h>
13093 #include <time.h>
13094
13095 #ifdef HAVE_SYS_TIME_H
13096 #include <sys/time.h>
13097 #endif
13098
13099 int main() {
13100         struct timespec ts1, ts2;
13101         int code;
13102         ts1.tv_sec  = 0;
13103         ts1.tv_nsec = 750000000;
13104         ts2.tv_sec  = 0;
13105         ts2.tv_nsec = 0;
13106         errno = 0;
13107         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13108         ${cf_cv_main_return:-return}(code != 0);
13109 }
13110
13111 _ACEOF
13112 rm -f conftest$ac_exeext
13113 if { (eval echo "$as_me:13113: \"$ac_link\"") >&5
13114   (eval $ac_link) 2>&5
13115   ac_status=$?
13116   echo "$as_me:13116: \$? = $ac_status" >&5
13117   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13118   { (eval echo "$as_me:13118: \"$ac_try\"") >&5
13119   (eval $ac_try) 2>&5
13120   ac_status=$?
13121   echo "$as_me:13121: \$? = $ac_status" >&5
13122   (exit $ac_status); }; }; then
13123   cf_cv_func_nanosleep=yes
13124 else
13125   echo "$as_me: program exited with status $ac_status" >&5
13126 echo "$as_me: failed program was:" >&5
13127 cat conftest.$ac_ext >&5
13128 cf_cv_func_nanosleep=no
13129 fi
13130 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13131 fi
13132 fi
13133 echo "$as_me:13133: result: $cf_cv_func_nanosleep" >&5
13134 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13135
13136 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13137 #define HAVE_NANOSLEEP 1
13138 EOF
13139
13140 for ac_header in \
13141 termio.h \
13142 termios.h \
13143 unistd.h \
13144
13145 do
13146 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13147 echo "$as_me:13147: checking for $ac_header" >&5
13148 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13149 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13150   echo $ECHO_N "(cached) $ECHO_C" >&6
13151 else
13152   cat >conftest.$ac_ext <<_ACEOF
13153 #line 13153 "configure"
13154 #include "confdefs.h"
13155 #include <$ac_header>
13156 _ACEOF
13157 if { (eval echo "$as_me:13157: \"$ac_cpp conftest.$ac_ext\"") >&5
13158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13159   ac_status=$?
13160   egrep -v '^ *\+' conftest.er1 >conftest.err
13161   rm -f conftest.er1
13162   cat conftest.err >&5
13163   echo "$as_me:13163: \$? = $ac_status" >&5
13164   (exit $ac_status); } >/dev/null; then
13165   if test -s conftest.err; then
13166     ac_cpp_err=$ac_c_preproc_warn_flag
13167   else
13168     ac_cpp_err=
13169   fi
13170 else
13171   ac_cpp_err=yes
13172 fi
13173 if test -z "$ac_cpp_err"; then
13174   eval "$as_ac_Header=yes"
13175 else
13176   echo "$as_me: failed program was:" >&5
13177   cat conftest.$ac_ext >&5
13178   eval "$as_ac_Header=no"
13179 fi
13180 rm -f conftest.err conftest.$ac_ext
13181 fi
13182 echo "$as_me:13182: result: `eval echo '${'$as_ac_Header'}'`" >&5
13183 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13184 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13185   cat >>confdefs.h <<EOF
13186 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13187 EOF
13188
13189 fi
13190 done
13191
13192 if test "$ISC" = yes ; then
13193
13194 for ac_header in sys/termio.h
13195 do
13196 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13197 echo "$as_me:13197: checking for $ac_header" >&5
13198 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13199 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13200   echo $ECHO_N "(cached) $ECHO_C" >&6
13201 else
13202   cat >conftest.$ac_ext <<_ACEOF
13203 #line 13203 "configure"
13204 #include "confdefs.h"
13205 #include <$ac_header>
13206 _ACEOF
13207 if { (eval echo "$as_me:13207: \"$ac_cpp conftest.$ac_ext\"") >&5
13208   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13209   ac_status=$?
13210   egrep -v '^ *\+' conftest.er1 >conftest.err
13211   rm -f conftest.er1
13212   cat conftest.err >&5
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit $ac_status); } >/dev/null; then
13215   if test -s conftest.err; then
13216     ac_cpp_err=$ac_c_preproc_warn_flag
13217   else
13218     ac_cpp_err=
13219   fi
13220 else
13221   ac_cpp_err=yes
13222 fi
13223 if test -z "$ac_cpp_err"; then
13224   eval "$as_ac_Header=yes"
13225 else
13226   echo "$as_me: failed program was:" >&5
13227   cat conftest.$ac_ext >&5
13228   eval "$as_ac_Header=no"
13229 fi
13230 rm -f conftest.err conftest.$ac_ext
13231 fi
13232 echo "$as_me:13232: result: `eval echo '${'$as_ac_Header'}'`" >&5
13233 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13234 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13235   cat >>confdefs.h <<EOF
13236 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13237 EOF
13238
13239 fi
13240 done
13241
13242 fi
13243 if test "$ac_cv_header_termios_h" = yes ; then
13244         case "$CFLAGS $CPPFLAGS" in
13245         *-D_POSIX_SOURCE*)
13246                 termios_bad=dunno ;;
13247         *)      termios_bad=maybe ;;
13248         esac
13249         if test "$termios_bad" = maybe ; then
13250         echo "$as_me:13250: checking whether termios.h needs _POSIX_SOURCE" >&5
13251 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13252         cat >conftest.$ac_ext <<_ACEOF
13253 #line 13253 "configure"
13254 #include "confdefs.h"
13255 #include <termios.h>
13256 int
13257 main ()
13258 {
13259 struct termios foo; int x = foo.c_iflag
13260   ;
13261   return 0;
13262 }
13263 _ACEOF
13264 rm -f conftest.$ac_objext
13265 if { (eval echo "$as_me:13265: \"$ac_compile\"") >&5
13266   (eval $ac_compile) 2>&5
13267   ac_status=$?
13268   echo "$as_me:13268: \$? = $ac_status" >&5
13269   (exit $ac_status); } &&
13270          { ac_try='test -s conftest.$ac_objext'
13271   { (eval echo "$as_me:13271: \"$ac_try\"") >&5
13272   (eval $ac_try) 2>&5
13273   ac_status=$?
13274   echo "$as_me:13274: \$? = $ac_status" >&5
13275   (exit $ac_status); }; }; then
13276   termios_bad=no
13277 else
13278   echo "$as_me: failed program was:" >&5
13279 cat conftest.$ac_ext >&5
13280
13281                 cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284
13285 #define _POSIX_SOURCE
13286 #include <termios.h>
13287 int
13288 main ()
13289 {
13290 struct termios foo; int x = foo.c_iflag
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 rm -f conftest.$ac_objext
13296 if { (eval echo "$as_me:13296: \"$ac_compile\"") >&5
13297   (eval $ac_compile) 2>&5
13298   ac_status=$?
13299   echo "$as_me:13299: \$? = $ac_status" >&5
13300   (exit $ac_status); } &&
13301          { ac_try='test -s conftest.$ac_objext'
13302   { (eval echo "$as_me:13302: \"$ac_try\"") >&5
13303   (eval $ac_try) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); }; }; then
13307   termios_bad=unknown
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat conftest.$ac_ext >&5
13311 termios_bad=yes cat >>confdefs.h <<\EOF
13312 #define SVR4_TERMIO 1
13313 EOF
13314
13315 fi
13316 rm -f conftest.$ac_objext conftest.$ac_ext
13317
13318 fi
13319 rm -f conftest.$ac_objext conftest.$ac_ext
13320         echo "$as_me:13320: result: $termios_bad" >&5
13321 echo "${ECHO_T}$termios_bad" >&6
13322         fi
13323 fi
13324
13325 echo "$as_me:13325: checking for tcgetattr" >&5
13326 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13327 if test "${cf_cv_have_tcgetattr+set}" = set; then
13328   echo $ECHO_N "(cached) $ECHO_C" >&6
13329 else
13330
13331 cat >conftest.$ac_ext <<_ACEOF
13332 #line 13332 "configure"
13333 #include "confdefs.h"
13334
13335 #include <sys/types.h>
13336 #ifdef HAVE_UNISTD_H
13337 #include <unistd.h>
13338 #endif
13339 #ifdef HAVE_TERMIOS_H
13340 #include <termios.h>
13341 #define TTY struct termios
13342 #else
13343 #ifdef HAVE_TERMIO_H
13344 #include <termio.h>
13345 #define TTY struct termio
13346 #endif
13347 #endif
13348
13349 int
13350 main ()
13351 {
13352
13353 TTY foo;
13354 tcgetattr(1, &foo);
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 rm -f conftest.$ac_objext conftest$ac_exeext
13360 if { (eval echo "$as_me:13360: \"$ac_link\"") >&5
13361   (eval $ac_link) 2>&5
13362   ac_status=$?
13363   echo "$as_me:13363: \$? = $ac_status" >&5
13364   (exit $ac_status); } &&
13365          { ac_try='test -s conftest$ac_exeext'
13366   { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367   (eval $ac_try) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); }; }; then
13371   cf_cv_have_tcgetattr=yes
13372 else
13373   echo "$as_me: failed program was:" >&5
13374 cat conftest.$ac_ext >&5
13375 cf_cv_have_tcgetattr=no
13376 fi
13377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13378 fi
13379 echo "$as_me:13379: result: $cf_cv_have_tcgetattr" >&5
13380 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13381 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13382 #define HAVE_TCGETATTR 1
13383 EOF
13384
13385 echo "$as_me:13385: checking for vsscanf function or workaround" >&5
13386 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13387 if test "${cf_cv_func_vsscanf+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390
13391 cat >conftest.$ac_ext <<_ACEOF
13392 #line 13392 "configure"
13393 #include "confdefs.h"
13394
13395 #include <stdarg.h>
13396 #include <stdio.h>
13397 int
13398 main ()
13399 {
13400
13401         va_list ap;
13402         vsscanf("from", "%d", ap)
13403   ;
13404   return 0;
13405 }
13406 _ACEOF
13407 rm -f conftest.$ac_objext conftest$ac_exeext
13408 if { (eval echo "$as_me:13408: \"$ac_link\"") >&5
13409   (eval $ac_link) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); } &&
13413          { ac_try='test -s conftest$ac_exeext'
13414   { (eval echo "$as_me:13414: \"$ac_try\"") >&5
13415   (eval $ac_try) 2>&5
13416   ac_status=$?
13417   echo "$as_me:13417: \$? = $ac_status" >&5
13418   (exit $ac_status); }; }; then
13419   cf_cv_func_vsscanf=vsscanf
13420 else
13421   echo "$as_me: failed program was:" >&5
13422 cat conftest.$ac_ext >&5
13423
13424 cat >conftest.$ac_ext <<_ACEOF
13425 #line 13425 "configure"
13426 #include "confdefs.h"
13427
13428 #include <stdarg.h>
13429 #include <stdio.h>
13430 int
13431 main ()
13432 {
13433
13434     FILE strbuf;
13435     char *str = "from";
13436
13437     strbuf._flag = _IOREAD;
13438     strbuf._ptr = strbuf._base = (unsigned char *) str;
13439     strbuf._cnt = strlen(str);
13440     strbuf._file = _NFILE;
13441     return (vfscanf(&strbuf, "%d", ap))
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 rm -f conftest.$ac_objext conftest$ac_exeext
13447 if { (eval echo "$as_me:13447: \"$ac_link\"") >&5
13448   (eval $ac_link) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit $ac_status); } &&
13452          { ac_try='test -s conftest$ac_exeext'
13453   { (eval echo "$as_me:13453: \"$ac_try\"") >&5
13454   (eval $ac_try) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); }; }; then
13458   cf_cv_func_vsscanf=vfscanf
13459 else
13460   echo "$as_me: failed program was:" >&5
13461 cat conftest.$ac_ext >&5
13462
13463 cat >conftest.$ac_ext <<_ACEOF
13464 #line 13464 "configure"
13465 #include "confdefs.h"
13466
13467 #include <stdarg.h>
13468 #include <stdio.h>
13469 int
13470 main ()
13471 {
13472
13473     FILE strbuf;
13474     char *str = "from";
13475
13476     strbuf._flag = _IOREAD;
13477     strbuf._ptr = strbuf._base = (unsigned char *) str;
13478     strbuf._cnt = strlen(str);
13479     strbuf._file = _NFILE;
13480     return (_doscan(&strbuf, "%d", ap))
13481   ;
13482   return 0;
13483 }
13484 _ACEOF
13485 rm -f conftest.$ac_objext conftest$ac_exeext
13486 if { (eval echo "$as_me:13486: \"$ac_link\"") >&5
13487   (eval $ac_link) 2>&5
13488   ac_status=$?
13489   echo "$as_me:13489: \$? = $ac_status" >&5
13490   (exit $ac_status); } &&
13491          { ac_try='test -s conftest$ac_exeext'
13492   { (eval echo "$as_me:13492: \"$ac_try\"") >&5
13493   (eval $ac_try) 2>&5
13494   ac_status=$?
13495   echo "$as_me:13495: \$? = $ac_status" >&5
13496   (exit $ac_status); }; }; then
13497   cf_cv_func_vsscanf=_doscan
13498 else
13499   echo "$as_me: failed program was:" >&5
13500 cat conftest.$ac_ext >&5
13501
13502 cf_cv_func_vsscanf=no
13503 fi
13504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13505 fi
13506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13507 fi
13508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13509 fi
13510 echo "$as_me:13510: result: $cf_cv_func_vsscanf" >&5
13511 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13512
13513 case $cf_cv_func_vsscanf in #(vi
13514 vsscanf) cat >>confdefs.h <<\EOF
13515 #define HAVE_VSSCANF 1
13516 EOF
13517 ;; #(vi
13518 vfscanf) cat >>confdefs.h <<\EOF
13519 #define HAVE_VFSCANF 1
13520 EOF
13521 ;; #(vi
13522 _doscan) cat >>confdefs.h <<\EOF
13523 #define HAVE__DOSCAN 1
13524 EOF
13525 ;;
13526 esac
13527
13528 echo "$as_me:13528: checking for working mkstemp" >&5
13529 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13530 if test "${cf_cv_func_mkstemp+set}" = set; then
13531   echo $ECHO_N "(cached) $ECHO_C" >&6
13532 else
13533
13534 rm -f conftest*
13535 if test "$cross_compiling" = yes; then
13536   echo "$as_me:13536: checking for mkstemp" >&5
13537 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13538 if test "${ac_cv_func_mkstemp+set}" = set; then
13539   echo $ECHO_N "(cached) $ECHO_C" >&6
13540 else
13541   cat >conftest.$ac_ext <<_ACEOF
13542 #line 13542 "configure"
13543 #include "confdefs.h"
13544 /* System header to define __stub macros and hopefully few prototypes,
13545     which can conflict with char mkstemp (); below.  */
13546 #include <assert.h>
13547 /* Override any gcc2 internal prototype to avoid an error.  */
13548 #ifdef __cplusplus
13549 extern "C"
13550 #endif
13551 /* We use char because int might match the return type of a gcc2
13552    builtin and then its argument prototype would still apply.  */
13553 char mkstemp ();
13554 char (*f) ();
13555
13556 int
13557 main ()
13558 {
13559 /* The GNU C library defines this for functions which it implements
13560     to always fail with ENOSYS.  Some functions are actually named
13561     something starting with __ and the normal name is an alias.  */
13562 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13563 choke me
13564 #else
13565 f = mkstemp;
13566 #endif
13567
13568   ;
13569   return 0;
13570 }
13571 _ACEOF
13572 rm -f conftest.$ac_objext conftest$ac_exeext
13573 if { (eval echo "$as_me:13573: \"$ac_link\"") >&5
13574   (eval $ac_link) 2>&5
13575   ac_status=$?
13576   echo "$as_me:13576: \$? = $ac_status" >&5
13577   (exit $ac_status); } &&
13578          { ac_try='test -s conftest$ac_exeext'
13579   { (eval echo "$as_me:13579: \"$ac_try\"") >&5
13580   (eval $ac_try) 2>&5
13581   ac_status=$?
13582   echo "$as_me:13582: \$? = $ac_status" >&5
13583   (exit $ac_status); }; }; then
13584   ac_cv_func_mkstemp=yes
13585 else
13586   echo "$as_me: failed program was:" >&5
13587 cat conftest.$ac_ext >&5
13588 ac_cv_func_mkstemp=no
13589 fi
13590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13591 fi
13592 echo "$as_me:13592: result: $ac_cv_func_mkstemp" >&5
13593 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13594
13595 else
13596   cat >conftest.$ac_ext <<_ACEOF
13597 #line 13597 "configure"
13598 #include "confdefs.h"
13599
13600 #include <sys/types.h>
13601 #include <stdlib.h>
13602 #include <stdio.h>
13603 #include <string.h>
13604 #include <sys/stat.h>
13605 int main()
13606 {
13607         char *tmpl = "conftestXXXXXX";
13608         char name[2][80];
13609         int n;
13610         int result = 0;
13611         int fd;
13612         struct stat sb;
13613
13614         umask(077);
13615         for (n = 0; n < 2; ++n) {
13616                 strcpy(name[n], tmpl);
13617                 if ((fd = mkstemp(name[n])) >= 0) {
13618                         if (!strcmp(name[n], tmpl)
13619                          || stat(name[n], &sb) != 0
13620                          || (sb.st_mode & S_IFMT) != S_IFREG
13621                          || (sb.st_mode & 077) != 0) {
13622                                 result = 1;
13623                         }
13624                         close(fd);
13625                 }
13626         }
13627         if (result == 0
13628          && !strcmp(name[0], name[1]))
13629                 result = 1;
13630         ${cf_cv_main_return:-return}(result);
13631 }
13632
13633 _ACEOF
13634 rm -f conftest$ac_exeext
13635 if { (eval echo "$as_me:13635: \"$ac_link\"") >&5
13636   (eval $ac_link) 2>&5
13637   ac_status=$?
13638   echo "$as_me:13638: \$? = $ac_status" >&5
13639   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13640   { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641   (eval $ac_try) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); }; }; then
13645   cf_cv_func_mkstemp=yes
13646
13647 else
13648   echo "$as_me: program exited with status $ac_status" >&5
13649 echo "$as_me: failed program was:" >&5
13650 cat conftest.$ac_ext >&5
13651 cf_cv_func_mkstemp=no
13652
13653 fi
13654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13655 fi
13656
13657 fi
13658 echo "$as_me:13658: result: $cf_cv_func_mkstemp" >&5
13659 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13660 if test "$cf_cv_func_mkstemp" = yes ; then
13661         cat >>confdefs.h <<\EOF
13662 #define HAVE_MKSTEMP 1
13663 EOF
13664
13665 fi
13666
13667 # setup for prototype of fallback for vsscanf()
13668
13669 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13670         HAVE_VSSCANF=1
13671 else
13672         HAVE_VSSCANF=0
13673 fi
13674
13675 if test "$cross_compiling" = yes ; then
13676         { echo "$as_me:13676: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13677 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13678 else
13679         echo "$as_me:13679: checking whether setvbuf arguments are reversed" >&5
13680 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13681 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13682   echo $ECHO_N "(cached) $ECHO_C" >&6
13683 else
13684   if test "$cross_compiling" = yes; then
13685   { { echo "$as_me:13685: error: cannot run test program while cross compiling" >&5
13686 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13687    { (exit 1); exit 1; }; }
13688 else
13689   cat >conftest.$ac_ext <<_ACEOF
13690 #line 13690 "configure"
13691 #include "confdefs.h"
13692 #include <stdio.h>
13693 /* If setvbuf has the reversed format, exit 0. */
13694 int
13695 main ()
13696 {
13697   /* This call has the arguments reversed.
13698      A reversed system may check and see that the address of main
13699      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13700   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13701     $ac_main_return(1);
13702   putc('\r', stdout);
13703   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13704 }
13705 _ACEOF
13706 rm -f conftest$ac_exeext
13707 if { (eval echo "$as_me:13707: \"$ac_link\"") >&5
13708   (eval $ac_link) 2>&5
13709   ac_status=$?
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13712   { (eval echo "$as_me:13712: \"$ac_try\"") >&5
13713   (eval $ac_try) 2>&5
13714   ac_status=$?
13715   echo "$as_me:13715: \$? = $ac_status" >&5
13716   (exit $ac_status); }; }; then
13717   ac_cv_func_setvbuf_reversed=yes
13718 else
13719   echo "$as_me: program exited with status $ac_status" >&5
13720 echo "$as_me: failed program was:" >&5
13721 cat conftest.$ac_ext >&5
13722 ac_cv_func_setvbuf_reversed=no
13723 fi
13724 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13725 fi
13726 rm -f core core.* *.core
13727 fi
13728 echo "$as_me:13728: result: $ac_cv_func_setvbuf_reversed" >&5
13729 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13730 if test $ac_cv_func_setvbuf_reversed = yes; then
13731
13732 cat >>confdefs.h <<\EOF
13733 #define SETVBUF_REVERSED 1
13734 EOF
13735
13736 fi
13737
13738 fi
13739 echo "$as_me:13739: checking return type of signal handlers" >&5
13740 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13741 if test "${ac_cv_type_signal+set}" = set; then
13742   echo $ECHO_N "(cached) $ECHO_C" >&6
13743 else
13744   cat >conftest.$ac_ext <<_ACEOF
13745 #line 13745 "configure"
13746 #include "confdefs.h"
13747 #include <sys/types.h>
13748 #include <signal.h>
13749 #ifdef signal
13750 # undef signal
13751 #endif
13752 #ifdef __cplusplus
13753 extern "C" void (*signal (int, void (*)(int)))(int);
13754 #else
13755 void (*signal ()) ();
13756 #endif
13757
13758 int
13759 main ()
13760 {
13761 int i;
13762   ;
13763   return 0;
13764 }
13765 _ACEOF
13766 rm -f conftest.$ac_objext
13767 if { (eval echo "$as_me:13767: \"$ac_compile\"") >&5
13768   (eval $ac_compile) 2>&5
13769   ac_status=$?
13770   echo "$as_me:13770: \$? = $ac_status" >&5
13771   (exit $ac_status); } &&
13772          { ac_try='test -s conftest.$ac_objext'
13773   { (eval echo "$as_me:13773: \"$ac_try\"") >&5
13774   (eval $ac_try) 2>&5
13775   ac_status=$?
13776   echo "$as_me:13776: \$? = $ac_status" >&5
13777   (exit $ac_status); }; }; then
13778   ac_cv_type_signal=void
13779 else
13780   echo "$as_me: failed program was:" >&5
13781 cat conftest.$ac_ext >&5
13782 ac_cv_type_signal=int
13783 fi
13784 rm -f conftest.$ac_objext conftest.$ac_ext
13785 fi
13786 echo "$as_me:13786: result: $ac_cv_type_signal" >&5
13787 echo "${ECHO_T}$ac_cv_type_signal" >&6
13788
13789 cat >>confdefs.h <<EOF
13790 #define RETSIGTYPE $ac_cv_type_signal
13791 EOF
13792
13793 echo "$as_me:13793: checking for type sigaction_t" >&5
13794 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13795 if test "${cf_cv_type_sigaction+set}" = set; then
13796   echo $ECHO_N "(cached) $ECHO_C" >&6
13797 else
13798
13799         cat >conftest.$ac_ext <<_ACEOF
13800 #line 13800 "configure"
13801 #include "confdefs.h"
13802
13803 #include <signal.h>
13804 int
13805 main ()
13806 {
13807 sigaction_t x
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext
13813 if { (eval echo "$as_me:13813: \"$ac_compile\"") >&5
13814   (eval $ac_compile) 2>&5
13815   ac_status=$?
13816   echo "$as_me:13816: \$? = $ac_status" >&5
13817   (exit $ac_status); } &&
13818          { ac_try='test -s conftest.$ac_objext'
13819   { (eval echo "$as_me:13819: \"$ac_try\"") >&5
13820   (eval $ac_try) 2>&5
13821   ac_status=$?
13822   echo "$as_me:13822: \$? = $ac_status" >&5
13823   (exit $ac_status); }; }; then
13824   cf_cv_type_sigaction=yes
13825 else
13826   echo "$as_me: failed program was:" >&5
13827 cat conftest.$ac_ext >&5
13828 cf_cv_type_sigaction=no
13829 fi
13830 rm -f conftest.$ac_objext conftest.$ac_ext
13831 fi
13832
13833 echo "$as_me:13833: result: $cf_cv_type_sigaction" >&5
13834 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13835 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13836 #define HAVE_TYPE_SIGACTION 1
13837 EOF
13838
13839 echo "$as_me:13839: checking declaration of size-change" >&5
13840 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13841 if test "${cf_cv_sizechange+set}" = set; then
13842   echo $ECHO_N "(cached) $ECHO_C" >&6
13843 else
13844
13845     cf_cv_sizechange=unknown
13846     cf_save_CPPFLAGS="$CPPFLAGS"
13847
13848 for cf_opts in "" "NEED_PTEM_H"
13849 do
13850
13851     CPPFLAGS="$cf_save_CPPFLAGS"
13852     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13853     cat >conftest.$ac_ext <<_ACEOF
13854 #line 13854 "configure"
13855 #include "confdefs.h"
13856 #include <sys/types.h>
13857 #ifdef HAVE_TERMIOS_H
13858 #include <termios.h>
13859 #else
13860 #ifdef HAVE_TERMIO_H
13861 #include <termio.h>
13862 #endif
13863 #endif
13864 #ifdef NEED_PTEM_H
13865 /* This is a workaround for SCO:  they neglected to define struct winsize in
13866  * termios.h -- it's only in termio.h and ptem.h
13867  */
13868 #include        <sys/stream.h>
13869 #include        <sys/ptem.h>
13870 #endif
13871 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13872 #include <sys/ioctl.h>
13873 #endif
13874
13875 int
13876 main ()
13877 {
13878
13879 #ifdef TIOCGSIZE
13880         struct ttysize win;     /* FIXME: what system is this? */
13881         int y = win.ts_lines;
13882         int x = win.ts_cols;
13883 #else
13884 #ifdef TIOCGWINSZ
13885         struct winsize win;
13886         int y = win.ws_row;
13887         int x = win.ws_col;
13888 #else
13889         no TIOCGSIZE or TIOCGWINSZ
13890 #endif /* TIOCGWINSZ */
13891 #endif /* TIOCGSIZE */
13892
13893   ;
13894   return 0;
13895 }
13896 _ACEOF
13897 rm -f conftest.$ac_objext
13898 if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899   (eval $ac_compile) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); } &&
13903          { ac_try='test -s conftest.$ac_objext'
13904   { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905   (eval $ac_try) 2>&5
13906   ac_status=$?
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit $ac_status); }; }; then
13909   cf_cv_sizechange=yes
13910 else
13911   echo "$as_me: failed program was:" >&5
13912 cat conftest.$ac_ext >&5
13913 cf_cv_sizechange=no
13914 fi
13915 rm -f conftest.$ac_objext conftest.$ac_ext
13916
13917         CPPFLAGS="$cf_save_CPPFLAGS"
13918         if test "$cf_cv_sizechange" = yes ; then
13919                 echo "size-change succeeded ($cf_opts)" >&5
13920                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13921                 break
13922         fi
13923 done
13924
13925 fi
13926 echo "$as_me:13926: result: $cf_cv_sizechange" >&5
13927 echo "${ECHO_T}$cf_cv_sizechange" >&6
13928 if test "$cf_cv_sizechange" != no ; then
13929         cat >>confdefs.h <<\EOF
13930 #define HAVE_SIZECHANGE 1
13931 EOF
13932
13933         case $cf_cv_sizechange in #(vi
13934         NEED*)
13935                 cat >>confdefs.h <<EOF
13936 #define $cf_cv_sizechange  1
13937 EOF
13938
13939                 ;;
13940         esac
13941 fi
13942
13943 echo "$as_me:13943: checking for memmove" >&5
13944 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13945 if test "${ac_cv_func_memmove+set}" = set; then
13946   echo $ECHO_N "(cached) $ECHO_C" >&6
13947 else
13948   cat >conftest.$ac_ext <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 /* System header to define __stub macros and hopefully few prototypes,
13952     which can conflict with char memmove (); below.  */
13953 #include <assert.h>
13954 /* Override any gcc2 internal prototype to avoid an error.  */
13955 #ifdef __cplusplus
13956 extern "C"
13957 #endif
13958 /* We use char because int might match the return type of a gcc2
13959    builtin and then its argument prototype would still apply.  */
13960 char memmove ();
13961 char (*f) ();
13962
13963 int
13964 main ()
13965 {
13966 /* The GNU C library defines this for functions which it implements
13967     to always fail with ENOSYS.  Some functions are actually named
13968     something starting with __ and the normal name is an alias.  */
13969 #if defined (__stub_memmove) || defined (__stub___memmove)
13970 choke me
13971 #else
13972 f = memmove;
13973 #endif
13974
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f conftest.$ac_objext conftest$ac_exeext
13980 if { (eval echo "$as_me:13980: \"$ac_link\"") >&5
13981   (eval $ac_link) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); } &&
13985          { ac_try='test -s conftest$ac_exeext'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   ac_cv_func_memmove=yes
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 cat conftest.$ac_ext >&5
13995 ac_cv_func_memmove=no
13996 fi
13997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13998 fi
13999 echo "$as_me:13999: result: $ac_cv_func_memmove" >&5
14000 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14001 if test $ac_cv_func_memmove = yes; then
14002   :
14003 else
14004
14005 echo "$as_me:14005: checking for bcopy" >&5
14006 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14007 if test "${ac_cv_func_bcopy+set}" = set; then
14008   echo $ECHO_N "(cached) $ECHO_C" >&6
14009 else
14010   cat >conftest.$ac_ext <<_ACEOF
14011 #line 14011 "configure"
14012 #include "confdefs.h"
14013 /* System header to define __stub macros and hopefully few prototypes,
14014     which can conflict with char bcopy (); below.  */
14015 #include <assert.h>
14016 /* Override any gcc2 internal prototype to avoid an error.  */
14017 #ifdef __cplusplus
14018 extern "C"
14019 #endif
14020 /* We use char because int might match the return type of a gcc2
14021    builtin and then its argument prototype would still apply.  */
14022 char bcopy ();
14023 char (*f) ();
14024
14025 int
14026 main ()
14027 {
14028 /* The GNU C library defines this for functions which it implements
14029     to always fail with ENOSYS.  Some functions are actually named
14030     something starting with __ and the normal name is an alias.  */
14031 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14032 choke me
14033 #else
14034 f = bcopy;
14035 #endif
14036
14037   ;
14038   return 0;
14039 }
14040 _ACEOF
14041 rm -f conftest.$ac_objext conftest$ac_exeext
14042 if { (eval echo "$as_me:14042: \"$ac_link\"") >&5
14043   (eval $ac_link) 2>&5
14044   ac_status=$?
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit $ac_status); } &&
14047          { ac_try='test -s conftest$ac_exeext'
14048   { (eval echo "$as_me:14048: \"$ac_try\"") >&5
14049   (eval $ac_try) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); }; }; then
14053   ac_cv_func_bcopy=yes
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 cat conftest.$ac_ext >&5
14057 ac_cv_func_bcopy=no
14058 fi
14059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14060 fi
14061 echo "$as_me:14061: result: $ac_cv_func_bcopy" >&5
14062 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14063 if test $ac_cv_func_bcopy = yes; then
14064
14065         echo "$as_me:14065: checking if bcopy does overlapping moves" >&5
14066 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14067 if test "${cf_cv_good_bcopy+set}" = set; then
14068   echo $ECHO_N "(cached) $ECHO_C" >&6
14069 else
14070
14071                 if test "$cross_compiling" = yes; then
14072   cf_cv_good_bcopy=unknown
14073 else
14074   cat >conftest.$ac_ext <<_ACEOF
14075 #line 14075 "configure"
14076 #include "confdefs.h"
14077
14078 int main() {
14079         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14080         char temp[40];
14081         bcopy(data, temp, sizeof(data));
14082         bcopy(temp+10, temp, 15);
14083         bcopy(temp+5, temp+15, 10);
14084         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14085 }
14086
14087 _ACEOF
14088 rm -f conftest$ac_exeext
14089 if { (eval echo "$as_me:14089: \"$ac_link\"") >&5
14090   (eval $ac_link) 2>&5
14091   ac_status=$?
14092   echo "$as_me:14092: \$? = $ac_status" >&5
14093   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14094   { (eval echo "$as_me:14094: \"$ac_try\"") >&5
14095   (eval $ac_try) 2>&5
14096   ac_status=$?
14097   echo "$as_me:14097: \$? = $ac_status" >&5
14098   (exit $ac_status); }; }; then
14099   cf_cv_good_bcopy=yes
14100 else
14101   echo "$as_me: program exited with status $ac_status" >&5
14102 echo "$as_me: failed program was:" >&5
14103 cat conftest.$ac_ext >&5
14104 cf_cv_good_bcopy=no
14105 fi
14106 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14107 fi
14108
14109 fi
14110 echo "$as_me:14110: result: $cf_cv_good_bcopy" >&5
14111 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14112
14113 else
14114   cf_cv_good_bcopy=no
14115 fi
14116
14117         if test "$cf_cv_good_bcopy" = yes ; then
14118                 cat >>confdefs.h <<\EOF
14119 #define USE_OK_BCOPY 1
14120 EOF
14121
14122         else
14123                 cat >>confdefs.h <<\EOF
14124 #define USE_MY_MEMMOVE 1
14125 EOF
14126
14127         fi
14128
14129 fi
14130
14131 echo "$as_me:14131: checking if poll really works" >&5
14132 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14133 if test "${cf_cv_working_poll+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136
14137 if test "$cross_compiling" = yes; then
14138   cf_cv_working_poll=unknown
14139 else
14140   cat >conftest.$ac_ext <<_ACEOF
14141 #line 14141 "configure"
14142 #include "confdefs.h"
14143
14144 #include <stdio.h>
14145 #ifdef HAVE_POLL_H
14146 #include <poll.h>
14147 #else
14148 #include <sys/poll.h>
14149 #endif
14150 int main() {
14151         struct pollfd myfds;
14152         int ret;
14153
14154         myfds.fd = 0;
14155         myfds.events = POLLIN;
14156
14157         ret = poll(&myfds, 1, 100);
14158         ${cf_cv_main_return:-return}(ret != 0);
14159 }
14160 _ACEOF
14161 rm -f conftest$ac_exeext
14162 if { (eval echo "$as_me:14162: \"$ac_link\"") >&5
14163   (eval $ac_link) 2>&5
14164   ac_status=$?
14165   echo "$as_me:14165: \$? = $ac_status" >&5
14166   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14167   { (eval echo "$as_me:14167: \"$ac_try\"") >&5
14168   (eval $ac_try) 2>&5
14169   ac_status=$?
14170   echo "$as_me:14170: \$? = $ac_status" >&5
14171   (exit $ac_status); }; }; then
14172   cf_cv_working_poll=yes
14173 else
14174   echo "$as_me: program exited with status $ac_status" >&5
14175 echo "$as_me: failed program was:" >&5
14176 cat conftest.$ac_ext >&5
14177 cf_cv_working_poll=no
14178 fi
14179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14180 fi
14181 fi
14182 echo "$as_me:14182: result: $cf_cv_working_poll" >&5
14183 echo "${ECHO_T}$cf_cv_working_poll" >&6
14184 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14185 #define HAVE_WORKING_POLL 1
14186 EOF
14187
14188 # special check for test/ditto.c
14189
14190 echo "$as_me:14190: checking for openpty in -lutil" >&5
14191 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14192 if test "${ac_cv_lib_util_openpty+set}" = set; then
14193   echo $ECHO_N "(cached) $ECHO_C" >&6
14194 else
14195   ac_check_lib_save_LIBS=$LIBS
14196 LIBS="-lutil  $LIBS"
14197 cat >conftest.$ac_ext <<_ACEOF
14198 #line 14198 "configure"
14199 #include "confdefs.h"
14200
14201 /* Override any gcc2 internal prototype to avoid an error.  */
14202 #ifdef __cplusplus
14203 extern "C"
14204 #endif
14205 /* We use char because int might match the return type of a gcc2
14206    builtin and then its argument prototype would still apply.  */
14207 char openpty ();
14208 int
14209 main ()
14210 {
14211 openpty ();
14212   ;
14213   return 0;
14214 }
14215 _ACEOF
14216 rm -f conftest.$ac_objext conftest$ac_exeext
14217 if { (eval echo "$as_me:14217: \"$ac_link\"") >&5
14218   (eval $ac_link) 2>&5
14219   ac_status=$?
14220   echo "$as_me:14220: \$? = $ac_status" >&5
14221   (exit $ac_status); } &&
14222          { ac_try='test -s conftest$ac_exeext'
14223   { (eval echo "$as_me:14223: \"$ac_try\"") >&5
14224   (eval $ac_try) 2>&5
14225   ac_status=$?
14226   echo "$as_me:14226: \$? = $ac_status" >&5
14227   (exit $ac_status); }; }; then
14228   ac_cv_lib_util_openpty=yes
14229 else
14230   echo "$as_me: failed program was:" >&5
14231 cat conftest.$ac_ext >&5
14232 ac_cv_lib_util_openpty=no
14233 fi
14234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14235 LIBS=$ac_check_lib_save_LIBS
14236 fi
14237 echo "$as_me:14237: result: $ac_cv_lib_util_openpty" >&5
14238 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14239 if test $ac_cv_lib_util_openpty = yes; then
14240   cf_cv_lib_util=yes
14241 else
14242   cf_cv_lib_util=no
14243 fi
14244
14245 echo "$as_me:14245: checking for openpty header" >&5
14246 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14247 if test "${cf_cv_func_openpty+set}" = set; then
14248   echo $ECHO_N "(cached) $ECHO_C" >&6
14249 else
14250
14251     cf_save_LIBS="$LIBS"
14252     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14253     for cf_header in pty.h libutil.h util.h
14254     do
14255     cat >conftest.$ac_ext <<_ACEOF
14256 #line 14256 "configure"
14257 #include "confdefs.h"
14258
14259 #include <$cf_header>
14260
14261 int
14262 main ()
14263 {
14264
14265     int x = openpty((int *)0, (int *)0, (char *)0,
14266                    (struct termios *)0, (struct winsize *)0);
14267
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 rm -f conftest.$ac_objext conftest$ac_exeext
14273 if { (eval echo "$as_me:14273: \"$ac_link\"") >&5
14274   (eval $ac_link) 2>&5
14275   ac_status=$?
14276   echo "$as_me:14276: \$? = $ac_status" >&5
14277   (exit $ac_status); } &&
14278          { ac_try='test -s conftest$ac_exeext'
14279   { (eval echo "$as_me:14279: \"$ac_try\"") >&5
14280   (eval $ac_try) 2>&5
14281   ac_status=$?
14282   echo "$as_me:14282: \$? = $ac_status" >&5
14283   (exit $ac_status); }; }; then
14284
14285         cf_cv_func_openpty=$cf_header
14286         break
14287
14288 else
14289   echo "$as_me: failed program was:" >&5
14290 cat conftest.$ac_ext >&5
14291
14292         cf_cv_func_openpty=no
14293
14294 fi
14295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14296     done
14297     LIBS="$cf_save_LIBS"
14298
14299 fi
14300 echo "$as_me:14300: result: $cf_cv_func_openpty" >&5
14301 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14302
14303 if test "$cf_cv_func_openpty" != no ; then
14304     cat >>confdefs.h <<EOF
14305 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14306 EOF
14307
14308     cat >>confdefs.h <<\EOF
14309 #define USE_XTERM_PTY 1
14310 EOF
14311
14312     if test "$cf_cv_lib_util" = yes ; then
14313         TEST_LIBS="-lutil $TEST_LIBS"
14314     fi
14315 fi
14316
14317 if test "$with_hashed_db" != no ; then
14318         cat >>confdefs.h <<\EOF
14319 #define USE_HASHED_DB 1
14320 EOF
14321
14322 case $with_hashed_db in #(vi
14323 yes|*able*) #(vi
14324     ;;
14325 *)
14326     if test -d "$with_hashed_db" ; then
14327
14328 if test -n "$with_hashed_db/include" ; then
14329   for cf_add_incdir in $with_hashed_db/include
14330   do
14331         while test $cf_add_incdir != /usr/include
14332         do
14333           if test -d $cf_add_incdir
14334           then
14335                 cf_have_incdir=no
14336                 if test -n "$CFLAGS$CPPFLAGS" ; then
14337                   # a loop is needed to ensure we can add subdirs of existing dirs
14338                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14339                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14340                           cf_have_incdir=yes; break
14341                         fi
14342                   done
14343                 fi
14344
14345                 if test "$cf_have_incdir" = no ; then
14346           if test "$cf_add_incdir" = /usr/local/include ; then
14347                         if test "$GCC" = yes
14348                         then
14349                           cf_save_CPPFLAGS=$CPPFLAGS
14350                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14351                           cat >conftest.$ac_ext <<_ACEOF
14352 #line 14352 "configure"
14353 #include "confdefs.h"
14354 #include <stdio.h>
14355 int
14356 main ()
14357 {
14358 printf("Hello")
14359   ;
14360   return 0;
14361 }
14362 _ACEOF
14363 rm -f conftest.$ac_objext
14364 if { (eval echo "$as_me:14364: \"$ac_compile\"") >&5
14365   (eval $ac_compile) 2>&5
14366   ac_status=$?
14367   echo "$as_me:14367: \$? = $ac_status" >&5
14368   (exit $ac_status); } &&
14369          { ac_try='test -s conftest.$ac_objext'
14370   { (eval echo "$as_me:14370: \"$ac_try\"") >&5
14371   (eval $ac_try) 2>&5
14372   ac_status=$?
14373   echo "$as_me:14373: \$? = $ac_status" >&5
14374   (exit $ac_status); }; }; then
14375   :
14376 else
14377   echo "$as_me: failed program was:" >&5
14378 cat conftest.$ac_ext >&5
14379 cf_have_incdir=yes
14380 fi
14381 rm -f conftest.$ac_objext conftest.$ac_ext
14382                           CPPFLAGS=$cf_save_CPPFLAGS
14383                         fi
14384                   fi
14385                 fi
14386
14387                 if test "$cf_have_incdir" = no ; then
14388                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14389
14390 echo "${as_me-configure}:14390: testing adding $cf_add_incdir to include-path ..." 1>&5
14391
14392                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
14393
14394           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14395           test "$cf_top_incdir" = "$cf_add_incdir" && break
14396           cf_add_incdir="$cf_top_incdir"
14397                 else
14398                   break
14399                 fi
14400           fi
14401         done
14402   done
14403 fi
14404
14405 if test -n "$with_hashed_db/lib" ; then
14406   for cf_add_libdir in $with_hashed_db/lib
14407   do
14408     if test $cf_add_libdir = /usr/lib ; then
14409       :
14410     elif test -d $cf_add_libdir
14411     then
14412       cf_have_libdir=no
14413       if test -n "$LDFLAGS$LIBS" ; then
14414         # a loop is needed to ensure we can add subdirs of existing dirs
14415         for cf_test_libdir in $LDFLAGS $LIBS ; do
14416           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14417             cf_have_libdir=yes; break
14418           fi
14419         done
14420       fi
14421       if test "$cf_have_libdir" = no ; then
14422         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14423
14424 echo "${as_me-configure}:14424: testing adding $cf_add_libdir to library-path ..." 1>&5
14425
14426         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14427       fi
14428     fi
14429   done
14430 fi
14431
14432     fi
14433 esac
14434
14435 echo "$as_me:14435: checking for db.h" >&5
14436 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14437 if test "${ac_cv_header_db_h+set}" = set; then
14438   echo $ECHO_N "(cached) $ECHO_C" >&6
14439 else
14440   cat >conftest.$ac_ext <<_ACEOF
14441 #line 14441 "configure"
14442 #include "confdefs.h"
14443 #include <db.h>
14444 _ACEOF
14445 if { (eval echo "$as_me:14445: \"$ac_cpp conftest.$ac_ext\"") >&5
14446   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14447   ac_status=$?
14448   egrep -v '^ *\+' conftest.er1 >conftest.err
14449   rm -f conftest.er1
14450   cat conftest.err >&5
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); } >/dev/null; then
14453   if test -s conftest.err; then
14454     ac_cpp_err=$ac_c_preproc_warn_flag
14455   else
14456     ac_cpp_err=
14457   fi
14458 else
14459   ac_cpp_err=yes
14460 fi
14461 if test -z "$ac_cpp_err"; then
14462   ac_cv_header_db_h=yes
14463 else
14464   echo "$as_me: failed program was:" >&5
14465   cat conftest.$ac_ext >&5
14466   ac_cv_header_db_h=no
14467 fi
14468 rm -f conftest.err conftest.$ac_ext
14469 fi
14470 echo "$as_me:14470: result: $ac_cv_header_db_h" >&5
14471 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14472 if test $ac_cv_header_db_h = yes; then
14473
14474 echo "$as_me:14474: checking for version of db" >&5
14475 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14476 if test "${cf_cv_hashed_db_version+set}" = set; then
14477   echo $ECHO_N "(cached) $ECHO_C" >&6
14478 else
14479
14480 cf_cv_hashed_db_version=unknown
14481
14482 for cf_db_version in 1 2 3 4 5
14483 do
14484
14485 echo "${as_me-configure}:14485: testing checking for db version $cf_db_version ..." 1>&5
14486
14487         cat >conftest.$ac_ext <<_ACEOF
14488 #line 14488 "configure"
14489 #include "confdefs.h"
14490
14491 $ac_includes_default
14492 #include <db.h>
14493
14494 #ifdef DB_VERSION_MAJOR
14495         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14496 #if $cf_db_version == DB_VERSION_MAJOR
14497         /* ok */
14498 #else
14499         make an error
14500 #endif
14501 #else
14502 #if $cf_db_version == 1
14503         /* ok: assuming this is DB 1.8.5 */
14504 #else
14505         make an error
14506 #endif
14507 #endif
14508
14509 int
14510 main ()
14511 {
14512 DBT *foo = 0
14513   ;
14514   return 0;
14515 }
14516 _ACEOF
14517 rm -f conftest.$ac_objext
14518 if { (eval echo "$as_me:14518: \"$ac_compile\"") >&5
14519   (eval $ac_compile) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); } &&
14523          { ac_try='test -s conftest.$ac_objext'
14524   { (eval echo "$as_me:14524: \"$ac_try\"") >&5
14525   (eval $ac_try) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit $ac_status); }; }; then
14529
14530         cf_cv_hashed_db_version=$cf_db_version
14531         break
14532
14533 else
14534   echo "$as_me: failed program was:" >&5
14535 cat conftest.$ac_ext >&5
14536 fi
14537 rm -f conftest.$ac_objext conftest.$ac_ext
14538 done
14539
14540 fi
14541 echo "$as_me:14541: result: $cf_cv_hashed_db_version" >&5
14542 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14543
14544 if test "$cf_cv_hashed_db_version" = unknown ; then
14545         { { echo "$as_me:14545: error: Cannot determine version of db" >&5
14546 echo "$as_me: error: Cannot determine version of db" >&2;}
14547    { (exit 1); exit 1; }; }
14548 else
14549
14550 echo "$as_me:14550: checking for db libraries" >&5
14551 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14552 if test "${cf_cv_hashed_db_libs+set}" = set; then
14553   echo $ECHO_N "(cached) $ECHO_C" >&6
14554 else
14555
14556 cf_cv_hashed_db_libs=unknown
14557 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14558 do
14559         cf_save_libs="$LIBS"
14560         if test -n "$cf_db_libs"; then
14561                 LIBS="-l$cf_db_libs $LIBS"
14562         fi
14563
14564 echo "${as_me-configure}:14564: testing checking for library "$cf_db_libs" ..." 1>&5
14565
14566         cat >conftest.$ac_ext <<_ACEOF
14567 #line 14567 "configure"
14568 #include "confdefs.h"
14569
14570 $ac_includes_default
14571 #include <db.h>
14572
14573 int
14574 main ()
14575 {
14576
14577         char *path = "/tmp/foo";
14578 #ifdef DB_VERSION_MAJOR
14579 #if DB_VERSION_MAJOR >= 4
14580         DB *result = 0;
14581         db_create(&result, NULL, 0);
14582         result->open(result,
14583                 NULL,
14584                 path,
14585                 path,
14586                 DB_HASH,
14587                 DB_CREATE,
14588                 0644);
14589 #elif DB_VERSION_MAJOR >= 3
14590         DB *result = 0;
14591         db_create(&result, NULL, 0);
14592         result->open(result,
14593                 path,
14594                 path,
14595                 DB_HASH,
14596                 DB_CREATE,
14597                 0644);
14598 #elif DB_VERSION_MAJOR >= 2
14599         DB *result = 0;
14600         db_open(path,
14601                 DB_HASH,
14602                 DB_CREATE,
14603                 0644,
14604                 (DB_ENV *) 0,
14605                 (DB_INFO *) 0,
14606                 &result);
14607 #endif /* DB_VERSION_MAJOR */
14608 #else
14609         DB *result = dbopen(path,
14610                      2,
14611                      0644,
14612                      DB_HASH,
14613                      0);
14614 #endif
14615         ${cf_cv_main_return:-return}(result != 0)
14616
14617   ;
14618   return 0;
14619 }
14620 _ACEOF
14621 rm -f conftest.$ac_objext conftest$ac_exeext
14622 if { (eval echo "$as_me:14622: \"$ac_link\"") >&5
14623   (eval $ac_link) 2>&5
14624   ac_status=$?
14625   echo "$as_me:14625: \$? = $ac_status" >&5
14626   (exit $ac_status); } &&
14627          { ac_try='test -s conftest$ac_exeext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633
14634         if test -n "$cf_db_libs" ; then
14635                 cf_cv_hashed_db_libs=$cf_db_libs
14636         else
14637                 cf_cv_hashed_db_libs=default
14638         fi
14639         LIBS="$cf_save_libs"
14640         break
14641
14642 else
14643   echo "$as_me: failed program was:" >&5
14644 cat conftest.$ac_ext >&5
14645 fi
14646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14647         LIBS="$cf_save_libs"
14648 done
14649
14650 fi
14651 echo "$as_me:14651: result: $cf_cv_hashed_db_libs" >&5
14652 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14653
14654         if test "$cf_cv_hashed_db_libs" = unknown ; then
14655                 { { echo "$as_me:14655: error: Cannot determine library for db" >&5
14656 echo "$as_me: error: Cannot determine library for db" >&2;}
14657    { (exit 1); exit 1; }; }
14658         elif test "$cf_cv_hashed_db_libs" != default ; then
14659                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14660         fi
14661 fi
14662
14663 else
14664
14665         { { echo "$as_me:14665: error: Cannot find db.h" >&5
14666 echo "$as_me: error: Cannot find db.h" >&2;}
14667    { (exit 1); exit 1; }; }
14668
14669 fi
14670
14671 fi
14672
14673 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14674         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14675         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14676 fi
14677
14678 # Just in case, check if the C compiler has a bool type.
14679
14680 echo "$as_me:14680: checking if we should include stdbool.h" >&5
14681 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14682
14683 if test "${cf_cv_header_stdbool_h+set}" = set; then
14684   echo $ECHO_N "(cached) $ECHO_C" >&6
14685 else
14686
14687         cat >conftest.$ac_ext <<_ACEOF
14688 #line 14688 "configure"
14689 #include "confdefs.h"
14690
14691 int
14692 main ()
14693 {
14694 bool foo = false
14695   ;
14696   return 0;
14697 }
14698 _ACEOF
14699 rm -f conftest.$ac_objext
14700 if { (eval echo "$as_me:14700: \"$ac_compile\"") >&5
14701   (eval $ac_compile) 2>&5
14702   ac_status=$?
14703   echo "$as_me:14703: \$? = $ac_status" >&5
14704   (exit $ac_status); } &&
14705          { ac_try='test -s conftest.$ac_objext'
14706   { (eval echo "$as_me:14706: \"$ac_try\"") >&5
14707   (eval $ac_try) 2>&5
14708   ac_status=$?
14709   echo "$as_me:14709: \$? = $ac_status" >&5
14710   (exit $ac_status); }; }; then
14711   cf_cv_header_stdbool_h=0
14712 else
14713   echo "$as_me: failed program was:" >&5
14714 cat conftest.$ac_ext >&5
14715 cat >conftest.$ac_ext <<_ACEOF
14716 #line 14716 "configure"
14717 #include "confdefs.h"
14718
14719 #ifndef __BEOS__
14720 #include <stdbool.h>
14721 #endif
14722
14723 int
14724 main ()
14725 {
14726 bool foo = false
14727   ;
14728   return 0;
14729 }
14730 _ACEOF
14731 rm -f conftest.$ac_objext
14732 if { (eval echo "$as_me:14732: \"$ac_compile\"") >&5
14733   (eval $ac_compile) 2>&5
14734   ac_status=$?
14735   echo "$as_me:14735: \$? = $ac_status" >&5
14736   (exit $ac_status); } &&
14737          { ac_try='test -s conftest.$ac_objext'
14738   { (eval echo "$as_me:14738: \"$ac_try\"") >&5
14739   (eval $ac_try) 2>&5
14740   ac_status=$?
14741   echo "$as_me:14741: \$? = $ac_status" >&5
14742   (exit $ac_status); }; }; then
14743   cf_cv_header_stdbool_h=1
14744 else
14745   echo "$as_me: failed program was:" >&5
14746 cat conftest.$ac_ext >&5
14747 cf_cv_header_stdbool_h=0
14748 fi
14749 rm -f conftest.$ac_objext conftest.$ac_ext
14750 fi
14751 rm -f conftest.$ac_objext conftest.$ac_ext
14752 fi
14753
14754 if test "$cf_cv_header_stdbool_h" = 1
14755 then    echo "$as_me:14755: result: yes" >&5
14756 echo "${ECHO_T}yes" >&6
14757 else    echo "$as_me:14757: result: no" >&5
14758 echo "${ECHO_T}no" >&6
14759 fi
14760
14761 echo "$as_me:14761: checking for builtin bool type" >&5
14762 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14763
14764 if test "${cf_cv_cc_bool_type+set}" = set; then
14765   echo $ECHO_N "(cached) $ECHO_C" >&6
14766 else
14767
14768         cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771
14772 #include <stdio.h>
14773 #include <sys/types.h>
14774
14775 int
14776 main ()
14777 {
14778 bool x = false
14779   ;
14780   return 0;
14781 }
14782 _ACEOF
14783 rm -f conftest.$ac_objext
14784 if { (eval echo "$as_me:14784: \"$ac_compile\"") >&5
14785   (eval $ac_compile) 2>&5
14786   ac_status=$?
14787   echo "$as_me:14787: \$? = $ac_status" >&5
14788   (exit $ac_status); } &&
14789          { ac_try='test -s conftest.$ac_objext'
14790   { (eval echo "$as_me:14790: \"$ac_try\"") >&5
14791   (eval $ac_try) 2>&5
14792   ac_status=$?
14793   echo "$as_me:14793: \$? = $ac_status" >&5
14794   (exit $ac_status); }; }; then
14795   cf_cv_cc_bool_type=1
14796 else
14797   echo "$as_me: failed program was:" >&5
14798 cat conftest.$ac_ext >&5
14799 cf_cv_cc_bool_type=0
14800 fi
14801 rm -f conftest.$ac_objext conftest.$ac_ext
14802
14803 fi
14804
14805 if test "$cf_cv_cc_bool_type" = 1
14806 then    echo "$as_me:14806: result: yes" >&5
14807 echo "${ECHO_T}yes" >&6
14808 else    echo "$as_me:14808: result: no" >&5
14809 echo "${ECHO_T}no" >&6
14810 fi
14811
14812 # Check for C++ compiler characteristics (and ensure that it's there!)
14813 if test -n "$CXX" ; then
14814         ac_ext=cc
14815 ac_cpp='$CXXCPP $CPPFLAGS'
14816 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14817 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14818 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14819 ac_main_return=return
14820
14821 if test -n "$GXX" ; then
14822 case $cf_cv_system_name in #(vi
14823 os2*) #(vi
14824         cf_stdcpp_libname=stdcpp
14825         ;;
14826 *)
14827         cf_stdcpp_libname=stdc++
14828         ;;
14829 esac
14830 echo "$as_me:14830: checking for library $cf_stdcpp_libname" >&5
14831 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14832 if test "${cf_cv_libstdcpp+set}" = set; then
14833   echo $ECHO_N "(cached) $ECHO_C" >&6
14834 else
14835
14836         cf_save="$LIBS"
14837         LIBS="$LIBS -l$cf_stdcpp_libname"
14838 cat >conftest.$ac_ext <<_ACEOF
14839 #line 14839 "configure"
14840 #include "confdefs.h"
14841
14842 #include <strstream.h>
14843 int
14844 main ()
14845 {
14846
14847 char buf[80];
14848 strstreambuf foo(buf, sizeof(buf))
14849
14850   ;
14851   return 0;
14852 }
14853 _ACEOF
14854 rm -f conftest.$ac_objext conftest$ac_exeext
14855 if { (eval echo "$as_me:14855: \"$ac_link\"") >&5
14856   (eval $ac_link) 2>&5
14857   ac_status=$?
14858   echo "$as_me:14858: \$? = $ac_status" >&5
14859   (exit $ac_status); } &&
14860          { ac_try='test -s conftest$ac_exeext'
14861   { (eval echo "$as_me:14861: \"$ac_try\"") >&5
14862   (eval $ac_try) 2>&5
14863   ac_status=$?
14864   echo "$as_me:14864: \$? = $ac_status" >&5
14865   (exit $ac_status); }; }; then
14866   cf_cv_libstdcpp=yes
14867 else
14868   echo "$as_me: failed program was:" >&5
14869 cat conftest.$ac_ext >&5
14870 cf_cv_libstdcpp=no
14871 fi
14872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14873         LIBS="$cf_save"
14874
14875 fi
14876 echo "$as_me:14876: result: $cf_cv_libstdcpp" >&5
14877 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14878 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14879 fi
14880
14881         echo "$as_me:14881: checking whether $CXX understands -c and -o together" >&5
14882 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14883 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14884   echo $ECHO_N "(cached) $ECHO_C" >&6
14885 else
14886
14887 cat > conftest.$ac_ext <<CF_EOF
14888 #include <stdio.h>
14889 int main()
14890 {
14891         ${cf_cv_main_return:-return}(0);
14892 }
14893 CF_EOF
14894 # We do the test twice because some compilers refuse to overwrite an
14895 # existing .o file with -o, though they will create one.
14896 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14897 if { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898   (eval $ac_try) 2>&5
14899   ac_status=$?
14900   echo "$as_me:14900: \$? = $ac_status" >&5
14901   (exit $ac_status); } &&
14902   test -f conftest2.$ac_objext && { (eval echo "$as_me:14902: \"$ac_try\"") >&5
14903   (eval $ac_try) 2>&5
14904   ac_status=$?
14905   echo "$as_me:14905: \$? = $ac_status" >&5
14906   (exit $ac_status); };
14907 then
14908   eval cf_cv_prog_CXX_c_o=yes
14909 else
14910   eval cf_cv_prog_CXX_c_o=no
14911 fi
14912 rm -f conftest*
14913
14914 fi
14915 if test $cf_cv_prog_CXX_c_o = yes; then
14916   echo "$as_me:14916: result: yes" >&5
14917 echo "${ECHO_T}yes" >&6
14918 else
14919   echo "$as_me:14919: result: no" >&5
14920 echo "${ECHO_T}no" >&6
14921 fi
14922
14923         case $GXX_VERSION in
14924         1*|2.0-6*)
14925                 cf_cxx_library=yes
14926                 ;;
14927         *-2.7*|2.7*)
14928
14929 cf_cxx_library=unknown
14930 case $cf_cv_system_name in #(vi
14931 os2*) #(vi
14932         cf_gpp_libname=gpp
14933         ;;
14934 *)
14935         cf_gpp_libname=g++
14936         ;;
14937 esac
14938 if test "$GXX" = yes; then
14939         echo "$as_me:14939: checking for lib$cf_gpp_libname" >&5
14940 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14941         cf_save="$LIBS"
14942         LIBS="$LIBS -l$cf_gpp_libname"
14943         cat >conftest.$ac_ext <<_ACEOF
14944 #line 14944 "configure"
14945 #include "confdefs.h"
14946
14947 #include <$cf_gpp_libname/builtin.h>
14948
14949 int
14950 main ()
14951 {
14952 two_arg_error_handler_t foo2 = lib_error_handler
14953   ;
14954   return 0;
14955 }
14956 _ACEOF
14957 rm -f conftest.$ac_objext conftest$ac_exeext
14958 if { (eval echo "$as_me:14958: \"$ac_link\"") >&5
14959   (eval $ac_link) 2>&5
14960   ac_status=$?
14961   echo "$as_me:14961: \$? = $ac_status" >&5
14962   (exit $ac_status); } &&
14963          { ac_try='test -s conftest$ac_exeext'
14964   { (eval echo "$as_me:14964: \"$ac_try\"") >&5
14965   (eval $ac_try) 2>&5
14966   ac_status=$?
14967   echo "$as_me:14967: \$? = $ac_status" >&5
14968   (exit $ac_status); }; }; then
14969   cf_cxx_library=yes
14970          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14971          if test "$cf_gpp_libname" = cpp ; then
14972             cat >>confdefs.h <<\EOF
14973 #define HAVE_GPP_BUILTIN_H 1
14974 EOF
14975
14976          else
14977             cat >>confdefs.h <<\EOF
14978 #define HAVE_GXX_BUILTIN_H 1
14979 EOF
14980
14981          fi
14982 else
14983   echo "$as_me: failed program was:" >&5
14984 cat conftest.$ac_ext >&5
14985 cat >conftest.$ac_ext <<_ACEOF
14986 #line 14986 "configure"
14987 #include "confdefs.h"
14988
14989 #include <builtin.h>
14990
14991 int
14992 main ()
14993 {
14994 two_arg_error_handler_t foo2 = lib_error_handler
14995   ;
14996   return 0;
14997 }
14998 _ACEOF
14999 rm -f conftest.$ac_objext conftest$ac_exeext
15000 if { (eval echo "$as_me:15000: \"$ac_link\"") >&5
15001   (eval $ac_link) 2>&5
15002   ac_status=$?
15003   echo "$as_me:15003: \$? = $ac_status" >&5
15004   (exit $ac_status); } &&
15005          { ac_try='test -s conftest$ac_exeext'
15006   { (eval echo "$as_me:15006: \"$ac_try\"") >&5
15007   (eval $ac_try) 2>&5
15008   ac_status=$?
15009   echo "$as_me:15009: \$? = $ac_status" >&5
15010   (exit $ac_status); }; }; then
15011   cf_cxx_library=yes
15012          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15013          cat >>confdefs.h <<\EOF
15014 #define HAVE_BUILTIN_H 1
15015 EOF
15016
15017 else
15018   echo "$as_me: failed program was:" >&5
15019 cat conftest.$ac_ext >&5
15020 cf_cxx_library=no
15021 fi
15022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15023 fi
15024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15025         LIBS="$cf_save"
15026         echo "$as_me:15026: result: $cf_cxx_library" >&5
15027 echo "${ECHO_T}$cf_cxx_library" >&6
15028 fi
15029
15030                 ;;
15031         *)
15032                 cf_cxx_library=no
15033                 ;;
15034         esac
15035
15036         ac_ext=cc
15037 ac_cpp='$CXXCPP $CPPFLAGS'
15038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15041 ac_main_return=return
15042 echo "$as_me:15042: checking how to run the C++ preprocessor" >&5
15043 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15044 if test -z "$CXXCPP"; then
15045   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15046   echo $ECHO_N "(cached) $ECHO_C" >&6
15047 else
15048       # Double quotes because CXXCPP needs to be expanded
15049     for CXXCPP in "$CXX -E" "/lib/cpp"
15050     do
15051       ac_preproc_ok=false
15052 for ac_cxx_preproc_warn_flag in '' yes
15053 do
15054   # Use a header file that comes with gcc, so configuring glibc
15055   # with a fresh cross-compiler works.
15056   # On the NeXT, cc -E runs the code through the compiler's parser,
15057   # not just through cpp. "Syntax error" is here to catch this case.
15058   cat >conftest.$ac_ext <<_ACEOF
15059 #line 15059 "configure"
15060 #include "confdefs.h"
15061 #include <assert.h>
15062                      Syntax error
15063 _ACEOF
15064 if { (eval echo "$as_me:15064: \"$ac_cpp conftest.$ac_ext\"") >&5
15065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15066   ac_status=$?
15067   egrep -v '^ *\+' conftest.er1 >conftest.err
15068   rm -f conftest.er1
15069   cat conftest.err >&5
15070   echo "$as_me:15070: \$? = $ac_status" >&5
15071   (exit $ac_status); } >/dev/null; then
15072   if test -s conftest.err; then
15073     ac_cpp_err=$ac_cxx_preproc_warn_flag
15074   else
15075     ac_cpp_err=
15076   fi
15077 else
15078   ac_cpp_err=yes
15079 fi
15080 if test -z "$ac_cpp_err"; then
15081   :
15082 else
15083   echo "$as_me: failed program was:" >&5
15084   cat conftest.$ac_ext >&5
15085   # Broken: fails on valid input.
15086 continue
15087 fi
15088 rm -f conftest.err conftest.$ac_ext
15089
15090   # OK, works on sane cases.  Now check whether non-existent headers
15091   # can be detected and how.
15092   cat >conftest.$ac_ext <<_ACEOF
15093 #line 15093 "configure"
15094 #include "confdefs.h"
15095 #include <ac_nonexistent.h>
15096 _ACEOF
15097 if { (eval echo "$as_me:15097: \"$ac_cpp conftest.$ac_ext\"") >&5
15098   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15099   ac_status=$?
15100   egrep -v '^ *\+' conftest.er1 >conftest.err
15101   rm -f conftest.er1
15102   cat conftest.err >&5
15103   echo "$as_me:15103: \$? = $ac_status" >&5
15104   (exit $ac_status); } >/dev/null; then
15105   if test -s conftest.err; then
15106     ac_cpp_err=$ac_cxx_preproc_warn_flag
15107   else
15108     ac_cpp_err=
15109   fi
15110 else
15111   ac_cpp_err=yes
15112 fi
15113 if test -z "$ac_cpp_err"; then
15114   # Broken: success on invalid input.
15115 continue
15116 else
15117   echo "$as_me: failed program was:" >&5
15118   cat conftest.$ac_ext >&5
15119   # Passes both tests.
15120 ac_preproc_ok=:
15121 break
15122 fi
15123 rm -f conftest.err conftest.$ac_ext
15124
15125 done
15126 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15127 rm -f conftest.err conftest.$ac_ext
15128 if $ac_preproc_ok; then
15129   break
15130 fi
15131
15132     done
15133     ac_cv_prog_CXXCPP=$CXXCPP
15134
15135 fi
15136   CXXCPP=$ac_cv_prog_CXXCPP
15137 else
15138   ac_cv_prog_CXXCPP=$CXXCPP
15139 fi
15140 echo "$as_me:15140: result: $CXXCPP" >&5
15141 echo "${ECHO_T}$CXXCPP" >&6
15142 ac_preproc_ok=false
15143 for ac_cxx_preproc_warn_flag in '' yes
15144 do
15145   # Use a header file that comes with gcc, so configuring glibc
15146   # with a fresh cross-compiler works.
15147   # On the NeXT, cc -E runs the code through the compiler's parser,
15148   # not just through cpp. "Syntax error" is here to catch this case.
15149   cat >conftest.$ac_ext <<_ACEOF
15150 #line 15150 "configure"
15151 #include "confdefs.h"
15152 #include <assert.h>
15153                      Syntax error
15154 _ACEOF
15155 if { (eval echo "$as_me:15155: \"$ac_cpp conftest.$ac_ext\"") >&5
15156   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15157   ac_status=$?
15158   egrep -v '^ *\+' conftest.er1 >conftest.err
15159   rm -f conftest.er1
15160   cat conftest.err >&5
15161   echo "$as_me:15161: \$? = $ac_status" >&5
15162   (exit $ac_status); } >/dev/null; then
15163   if test -s conftest.err; then
15164     ac_cpp_err=$ac_cxx_preproc_warn_flag
15165   else
15166     ac_cpp_err=
15167   fi
15168 else
15169   ac_cpp_err=yes
15170 fi
15171 if test -z "$ac_cpp_err"; then
15172   :
15173 else
15174   echo "$as_me: failed program was:" >&5
15175   cat conftest.$ac_ext >&5
15176   # Broken: fails on valid input.
15177 continue
15178 fi
15179 rm -f conftest.err conftest.$ac_ext
15180
15181   # OK, works on sane cases.  Now check whether non-existent headers
15182   # can be detected and how.
15183   cat >conftest.$ac_ext <<_ACEOF
15184 #line 15184 "configure"
15185 #include "confdefs.h"
15186 #include <ac_nonexistent.h>
15187 _ACEOF
15188 if { (eval echo "$as_me:15188: \"$ac_cpp conftest.$ac_ext\"") >&5
15189   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15190   ac_status=$?
15191   egrep -v '^ *\+' conftest.er1 >conftest.err
15192   rm -f conftest.er1
15193   cat conftest.err >&5
15194   echo "$as_me:15194: \$? = $ac_status" >&5
15195   (exit $ac_status); } >/dev/null; then
15196   if test -s conftest.err; then
15197     ac_cpp_err=$ac_cxx_preproc_warn_flag
15198   else
15199     ac_cpp_err=
15200   fi
15201 else
15202   ac_cpp_err=yes
15203 fi
15204 if test -z "$ac_cpp_err"; then
15205   # Broken: success on invalid input.
15206 continue
15207 else
15208   echo "$as_me: failed program was:" >&5
15209   cat conftest.$ac_ext >&5
15210   # Passes both tests.
15211 ac_preproc_ok=:
15212 break
15213 fi
15214 rm -f conftest.err conftest.$ac_ext
15215
15216 done
15217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15218 rm -f conftest.err conftest.$ac_ext
15219 if $ac_preproc_ok; then
15220   :
15221 else
15222   { { echo "$as_me:15222: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15223 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15224    { (exit 1); exit 1; }; }
15225 fi
15226
15227 ac_ext=cc
15228 ac_cpp='$CXXCPP $CPPFLAGS'
15229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15232 ac_main_return=return
15233
15234 for ac_header in iostream typeinfo
15235 do
15236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15237 echo "$as_me:15237: checking for $ac_header" >&5
15238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15240   echo $ECHO_N "(cached) $ECHO_C" >&6
15241 else
15242   cat >conftest.$ac_ext <<_ACEOF
15243 #line 15243 "configure"
15244 #include "confdefs.h"
15245 #include <$ac_header>
15246 _ACEOF
15247 if { (eval echo "$as_me:15247: \"$ac_cpp conftest.$ac_ext\"") >&5
15248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15249   ac_status=$?
15250   egrep -v '^ *\+' conftest.er1 >conftest.err
15251   rm -f conftest.er1
15252   cat conftest.err >&5
15253   echo "$as_me:15253: \$? = $ac_status" >&5
15254   (exit $ac_status); } >/dev/null; then
15255   if test -s conftest.err; then
15256     ac_cpp_err=$ac_cxx_preproc_warn_flag
15257   else
15258     ac_cpp_err=
15259   fi
15260 else
15261   ac_cpp_err=yes
15262 fi
15263 if test -z "$ac_cpp_err"; then
15264   eval "$as_ac_Header=yes"
15265 else
15266   echo "$as_me: failed program was:" >&5
15267   cat conftest.$ac_ext >&5
15268   eval "$as_ac_Header=no"
15269 fi
15270 rm -f conftest.err conftest.$ac_ext
15271 fi
15272 echo "$as_me:15272: result: `eval echo '${'$as_ac_Header'}'`" >&5
15273 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15274 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15275   cat >>confdefs.h <<EOF
15276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15277 EOF
15278
15279 fi
15280 done
15281
15282     if test x"$ac_cv_header_iostream" = xyes ; then
15283         echo "$as_me:15283: checking if iostream uses std-namespace" >&5
15284 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15285         cat >conftest.$ac_ext <<_ACEOF
15286 #line 15286 "configure"
15287 #include "confdefs.h"
15288
15289 #include <iostream>
15290 using std::endl;
15291 using std::cerr;
15292 int
15293 main ()
15294 {
15295
15296 cerr << "testing" << endl;
15297
15298   ;
15299   return 0;
15300 }
15301 _ACEOF
15302 rm -f conftest.$ac_objext
15303 if { (eval echo "$as_me:15303: \"$ac_compile\"") >&5
15304   (eval $ac_compile) 2>&5
15305   ac_status=$?
15306   echo "$as_me:15306: \$? = $ac_status" >&5
15307   (exit $ac_status); } &&
15308          { ac_try='test -s conftest.$ac_objext'
15309   { (eval echo "$as_me:15309: \"$ac_try\"") >&5
15310   (eval $ac_try) 2>&5
15311   ac_status=$?
15312   echo "$as_me:15312: \$? = $ac_status" >&5
15313   (exit $ac_status); }; }; then
15314   cf_iostream_namespace=yes
15315 else
15316   echo "$as_me: failed program was:" >&5
15317 cat conftest.$ac_ext >&5
15318 cf_iostream_namespace=no
15319 fi
15320 rm -f conftest.$ac_objext conftest.$ac_ext
15321         echo "$as_me:15321: result: $cf_iostream_namespace" >&5
15322 echo "${ECHO_T}$cf_iostream_namespace" >&6
15323         if test "$cf_iostream_namespace" = yes ; then
15324             cat >>confdefs.h <<\EOF
15325 #define IOSTREAM_NAMESPACE 1
15326 EOF
15327
15328         fi
15329     fi
15330
15331 echo "$as_me:15331: checking if we should include stdbool.h" >&5
15332 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15333
15334 if test "${cf_cv_header_stdbool_h+set}" = set; then
15335   echo $ECHO_N "(cached) $ECHO_C" >&6
15336 else
15337
15338         cat >conftest.$ac_ext <<_ACEOF
15339 #line 15339 "configure"
15340 #include "confdefs.h"
15341
15342 int
15343 main ()
15344 {
15345 bool foo = false
15346   ;
15347   return 0;
15348 }
15349 _ACEOF
15350 rm -f conftest.$ac_objext
15351 if { (eval echo "$as_me:15351: \"$ac_compile\"") >&5
15352   (eval $ac_compile) 2>&5
15353   ac_status=$?
15354   echo "$as_me:15354: \$? = $ac_status" >&5
15355   (exit $ac_status); } &&
15356          { ac_try='test -s conftest.$ac_objext'
15357   { (eval echo "$as_me:15357: \"$ac_try\"") >&5
15358   (eval $ac_try) 2>&5
15359   ac_status=$?
15360   echo "$as_me:15360: \$? = $ac_status" >&5
15361   (exit $ac_status); }; }; then
15362   cf_cv_header_stdbool_h=0
15363 else
15364   echo "$as_me: failed program was:" >&5
15365 cat conftest.$ac_ext >&5
15366 cat >conftest.$ac_ext <<_ACEOF
15367 #line 15367 "configure"
15368 #include "confdefs.h"
15369
15370 #ifndef __BEOS__
15371 #include <stdbool.h>
15372 #endif
15373
15374 int
15375 main ()
15376 {
15377 bool foo = false
15378   ;
15379   return 0;
15380 }
15381 _ACEOF
15382 rm -f conftest.$ac_objext
15383 if { (eval echo "$as_me:15383: \"$ac_compile\"") >&5
15384   (eval $ac_compile) 2>&5
15385   ac_status=$?
15386   echo "$as_me:15386: \$? = $ac_status" >&5
15387   (exit $ac_status); } &&
15388          { ac_try='test -s conftest.$ac_objext'
15389   { (eval echo "$as_me:15389: \"$ac_try\"") >&5
15390   (eval $ac_try) 2>&5
15391   ac_status=$?
15392   echo "$as_me:15392: \$? = $ac_status" >&5
15393   (exit $ac_status); }; }; then
15394   cf_cv_header_stdbool_h=1
15395 else
15396   echo "$as_me: failed program was:" >&5
15397 cat conftest.$ac_ext >&5
15398 cf_cv_header_stdbool_h=0
15399 fi
15400 rm -f conftest.$ac_objext conftest.$ac_ext
15401 fi
15402 rm -f conftest.$ac_objext conftest.$ac_ext
15403 fi
15404
15405 if test "$cf_cv_header_stdbool_h" = 1
15406 then    echo "$as_me:15406: result: yes" >&5
15407 echo "${ECHO_T}yes" >&6
15408 else    echo "$as_me:15408: result: no" >&5
15409 echo "${ECHO_T}no" >&6
15410 fi
15411
15412 echo "$as_me:15412: checking for builtin bool type" >&5
15413 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15414
15415 if test "${cf_cv_builtin_bool+set}" = set; then
15416   echo $ECHO_N "(cached) $ECHO_C" >&6
15417 else
15418
15419         cat >conftest.$ac_ext <<_ACEOF
15420 #line 15420 "configure"
15421 #include "confdefs.h"
15422
15423 #include <stdio.h>
15424 #include <sys/types.h>
15425
15426 int
15427 main ()
15428 {
15429 bool x = false
15430   ;
15431   return 0;
15432 }
15433 _ACEOF
15434 rm -f conftest.$ac_objext
15435 if { (eval echo "$as_me:15435: \"$ac_compile\"") >&5
15436   (eval $ac_compile) 2>&5
15437   ac_status=$?
15438   echo "$as_me:15438: \$? = $ac_status" >&5
15439   (exit $ac_status); } &&
15440          { ac_try='test -s conftest.$ac_objext'
15441   { (eval echo "$as_me:15441: \"$ac_try\"") >&5
15442   (eval $ac_try) 2>&5
15443   ac_status=$?
15444   echo "$as_me:15444: \$? = $ac_status" >&5
15445   (exit $ac_status); }; }; then
15446   cf_cv_builtin_bool=1
15447 else
15448   echo "$as_me: failed program was:" >&5
15449 cat conftest.$ac_ext >&5
15450 cf_cv_builtin_bool=0
15451 fi
15452 rm -f conftest.$ac_objext conftest.$ac_ext
15453
15454 fi
15455
15456 if test "$cf_cv_builtin_bool" = 1
15457 then    echo "$as_me:15457: result: yes" >&5
15458 echo "${ECHO_T}yes" >&6
15459 else    echo "$as_me:15459: result: no" >&5
15460 echo "${ECHO_T}no" >&6
15461 fi
15462
15463 echo "$as_me:15463: checking for size of bool" >&5
15464 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15465 if test "${cf_cv_type_of_bool+set}" = set; then
15466   echo $ECHO_N "(cached) $ECHO_C" >&6
15467 else
15468
15469         rm -f cf_test.out
15470         if test "$cross_compiling" = yes; then
15471   cf_cv_type_of_bool=unknown
15472 else
15473   cat >conftest.$ac_ext <<_ACEOF
15474 #line 15474 "configure"
15475 #include "confdefs.h"
15476
15477 #include <stdlib.h>
15478 #include <stdio.h>
15479
15480 #if defined(__cplusplus)
15481
15482 #ifdef HAVE_GXX_BUILTIN_H
15483 #include <g++/builtin.h>
15484 #elif HAVE_GPP_BUILTIN_H
15485 #include <gpp/builtin.h>
15486 #elif HAVE_BUILTIN_H
15487 #include <builtin.h>
15488 #endif
15489
15490 #else
15491
15492 #if $cf_cv_header_stdbool_h
15493 #include <stdbool.h>
15494 #endif
15495
15496 #endif
15497
15498 main()
15499 {
15500         FILE *fp = fopen("cf_test.out", "w");
15501         if (fp != 0) {
15502                 bool x = true;
15503                 if ((bool)(-x) >= 0)
15504                         fputs("unsigned ", fp);
15505                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15506                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15507                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15508                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15509                 fclose(fp);
15510         }
15511         ${cf_cv_main_return:-return}(0);
15512 }
15513
15514 _ACEOF
15515 rm -f conftest$ac_exeext
15516 if { (eval echo "$as_me:15516: \"$ac_link\"") >&5
15517   (eval $ac_link) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15521   { (eval echo "$as_me:15521: \"$ac_try\"") >&5
15522   (eval $ac_try) 2>&5
15523   ac_status=$?
15524   echo "$as_me:15524: \$? = $ac_status" >&5
15525   (exit $ac_status); }; }; then
15526   cf_cv_type_of_bool=`cat cf_test.out`
15527                  if test -z "$cf_cv_type_of_bool"; then
15528                    cf_cv_type_of_bool=unknown
15529                  fi
15530 else
15531   echo "$as_me: program exited with status $ac_status" >&5
15532 echo "$as_me: failed program was:" >&5
15533 cat conftest.$ac_ext >&5
15534 cf_cv_type_of_bool=unknown
15535 fi
15536 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15537 fi
15538
15539 fi
15540
15541         rm -f cf_test.out
15542 echo "$as_me:15542: result: $cf_cv_type_of_bool" >&5
15543 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15544 if test "$cf_cv_type_of_bool" = unknown ; then
15545         case .$NCURSES_BOOL in #(vi
15546         .auto|.) NCURSES_BOOL=unsigned;;
15547         esac
15548         { echo "$as_me:15548: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15549 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15550         cf_cv_type_of_bool=$NCURSES_BOOL
15551 fi
15552
15553 echo "$as_me:15553: checking for special defines needed for etip.h" >&5
15554 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15555 cf_save_CXXFLAGS="$CXXFLAGS"
15556 cf_result="none"
15557 for cf_math in "" MATH_H
15558 do
15559 for cf_excp in "" MATH_EXCEPTION
15560 do
15561         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15562         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15563         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15564 cat >conftest.$ac_ext <<_ACEOF
15565 #line 15565 "configure"
15566 #include "confdefs.h"
15567
15568 #include <etip.h.in>
15569
15570 int
15571 main ()
15572 {
15573
15574   ;
15575   return 0;
15576 }
15577 _ACEOF
15578 rm -f conftest.$ac_objext
15579 if { (eval echo "$as_me:15579: \"$ac_compile\"") >&5
15580   (eval $ac_compile) 2>&5
15581   ac_status=$?
15582   echo "$as_me:15582: \$? = $ac_status" >&5
15583   (exit $ac_status); } &&
15584          { ac_try='test -s conftest.$ac_objext'
15585   { (eval echo "$as_me:15585: \"$ac_try\"") >&5
15586   (eval $ac_try) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590
15591         test -n "$cf_math" && cat >>confdefs.h <<EOF
15592 #define ETIP_NEEDS_${cf_math} 1
15593 EOF
15594
15595         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15596 #define ETIP_NEEDS_${cf_excp} 1
15597 EOF
15598
15599         cf_result="$cf_math $cf_excp"
15600         break
15601
15602 else
15603   echo "$as_me: failed program was:" >&5
15604 cat conftest.$ac_ext >&5
15605 fi
15606 rm -f conftest.$ac_objext conftest.$ac_ext
15607 done
15608 done
15609 echo "$as_me:15609: result: $cf_result" >&5
15610 echo "${ECHO_T}$cf_result" >&6
15611 CXXFLAGS="$cf_save_CXXFLAGS"
15612
15613 if test -n "$CXX"; then
15614 echo "$as_me:15614: checking if $CXX accepts parameter initialization" >&5
15615 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15616 if test "${cf_cv_cpp_param_init+set}" = set; then
15617   echo $ECHO_N "(cached) $ECHO_C" >&6
15618 else
15619
15620         ac_ext=cc
15621 ac_cpp='$CXXCPP $CPPFLAGS'
15622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15625 ac_main_return=return
15626
15627         if test "$cross_compiling" = yes; then
15628   cf_cv_cpp_param_init=unknown
15629 else
15630   cat >conftest.$ac_ext <<_ACEOF
15631 #line 15631 "configure"
15632 #include "confdefs.h"
15633
15634 class TEST {
15635 private:
15636         int value;
15637 public:
15638         TEST(int x = 1);
15639         ~TEST();
15640 };
15641
15642 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15643 {
15644         value = x;
15645 }
15646 void main() { }
15647
15648 _ACEOF
15649 rm -f conftest$ac_exeext
15650 if { (eval echo "$as_me:15650: \"$ac_link\"") >&5
15651   (eval $ac_link) 2>&5
15652   ac_status=$?
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15655   { (eval echo "$as_me:15655: \"$ac_try\"") >&5
15656   (eval $ac_try) 2>&5
15657   ac_status=$?
15658   echo "$as_me:15658: \$? = $ac_status" >&5
15659   (exit $ac_status); }; }; then
15660   cf_cv_cpp_param_init=yes
15661 else
15662   echo "$as_me: program exited with status $ac_status" >&5
15663 echo "$as_me: failed program was:" >&5
15664 cat conftest.$ac_ext >&5
15665 cf_cv_cpp_param_init=no
15666 fi
15667 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15668 fi
15669         ac_ext=cc
15670 ac_cpp='$CXXCPP $CPPFLAGS'
15671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15674 ac_main_return=return
15675
15676 fi
15677 echo "$as_me:15677: result: $cf_cv_cpp_param_init" >&5
15678 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15679 fi
15680 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15681 #define CPP_HAS_PARAM_INIT 1
15682 EOF
15683
15684 if test -n "$CXX"; then
15685
15686 echo "$as_me:15686: checking if $CXX accepts static_cast" >&5
15687 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15688 if test "${cf_cv_cpp_static_cast+set}" = set; then
15689   echo $ECHO_N "(cached) $ECHO_C" >&6
15690 else
15691
15692         ac_ext=cc
15693 ac_cpp='$CXXCPP $CPPFLAGS'
15694 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15695 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15696 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15697 ac_main_return=return
15698
15699         cat >conftest.$ac_ext <<_ACEOF
15700 #line 15700 "configure"
15701 #include "confdefs.h"
15702
15703 class NCursesPanel
15704 {
15705 public:
15706   NCursesPanel(int nlines,
15707                int ncols,
15708                int begin_y = 0,
15709                int begin_x = 0)
15710   {
15711   }
15712
15713   ~NCursesPanel();
15714 };
15715
15716 template<class T> class NCursesUserPanel : public NCursesPanel
15717 {
15718 public:
15719   NCursesUserPanel (int nlines,
15720                     int ncols,
15721                     int begin_y = 0,
15722                     int begin_x = 0,
15723                     const T* p_UserData = static_cast<T*>(0))
15724     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15725   {
15726   };
15727   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15728   {
15729   };
15730
15731   virtual ~NCursesUserPanel() {};
15732 };
15733
15734 int
15735 main ()
15736 {
15737
15738         const char* p_UserData = static_cast<char*>(0)
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 rm -f conftest.$ac_objext
15744 if { (eval echo "$as_me:15744: \"$ac_compile\"") >&5
15745   (eval $ac_compile) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); } &&
15749          { ac_try='test -s conftest.$ac_objext'
15750   { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751   (eval $ac_try) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); }; }; then
15755   cf_cv_cpp_static_cast=yes
15756 else
15757   echo "$as_me: failed program was:" >&5
15758 cat conftest.$ac_ext >&5
15759 cf_cv_cpp_static_cast=no
15760 fi
15761 rm -f conftest.$ac_objext conftest.$ac_ext
15762
15763         ac_ext=cc
15764 ac_cpp='$CXXCPP $CPPFLAGS'
15765 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15766 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15767 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15768 ac_main_return=return
15769
15770 fi
15771 echo "$as_me:15771: result: $cf_cv_cpp_static_cast" >&5
15772 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15773
15774 fi
15775
15776 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15777 #define CPP_HAS_STATIC_CAST 1
15778 EOF
15779
15780         CXX_AR='$(AR)'
15781         CXX_AR_OPTS='$(AR_OPTS)'
15782         case $cf_cv_system_name in #(vi
15783         irix*) #(vi
15784             if test "$GXX" != yes ; then
15785                 CXX_AR='$(CXX)'
15786                 CXX_AR_OPTS='-ar -o'
15787             fi
15788             ;;
15789         sco3.2v5*) #(vi
15790             CXXLDFLAGS="-u main"
15791             ;;
15792         solaris2*)
15793             if test "$GXX" != yes ; then
15794                 CXX_AR='$(CXX)'
15795                 CXX_AR_OPTS='-xar -o'
15796             fi
15797             ;;
15798         esac
15799
15800 else
15801         cf_cxx_library=no
15802         cf_cv_builtin_bool=1
15803
15804         # Just because we are not configuring against C++ right now does not
15805         # mean that a user will not want to use C++.  Some distributors disable
15806         # the C++ portion of this configuration as a shortcut (or just to avoid
15807         # compiling the demo in the c++ directory).  So we need a reasonable
15808         # default for the 'bool' type.
15809         #
15810         # Caveat: since the storage of the bool type is not standardized, it
15811         # may change.
15812
15813         if test "$NCURSES_BOOL" != auto ; then
15814                 cf_cv_type_of_bool=$NCURSES_BOOL
15815                 cf_cv_header_stdbool_h=0
15816         else
15817                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15818
15819 echo "$as_me:15819: checking for size of bool" >&5
15820 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15821 if test "${cf_cv_type_of_bool+set}" = set; then
15822   echo $ECHO_N "(cached) $ECHO_C" >&6
15823 else
15824
15825         rm -f cf_test.out
15826         if test "$cross_compiling" = yes; then
15827   cf_cv_type_of_bool=unknown
15828 else
15829   cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15832
15833 #include <stdlib.h>
15834 #include <stdio.h>
15835
15836 #if defined(__cplusplus)
15837
15838 #ifdef HAVE_GXX_BUILTIN_H
15839 #include <g++/builtin.h>
15840 #elif HAVE_GPP_BUILTIN_H
15841 #include <gpp/builtin.h>
15842 #elif HAVE_BUILTIN_H
15843 #include <builtin.h>
15844 #endif
15845
15846 #else
15847
15848 #if $cf_cv_header_stdbool_h
15849 #include <stdbool.h>
15850 #endif
15851
15852 #endif
15853
15854 main()
15855 {
15856         FILE *fp = fopen("cf_test.out", "w");
15857         if (fp != 0) {
15858                 bool x = true;
15859                 if ((bool)(-x) >= 0)
15860                         fputs("unsigned ", fp);
15861                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15862                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15863                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15864                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15865                 fclose(fp);
15866         }
15867         ${cf_cv_main_return:-return}(0);
15868 }
15869
15870 _ACEOF
15871 rm -f conftest$ac_exeext
15872 if { (eval echo "$as_me:15872: \"$ac_link\"") >&5
15873   (eval $ac_link) 2>&5
15874   ac_status=$?
15875   echo "$as_me:15875: \$? = $ac_status" >&5
15876   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15877   { (eval echo "$as_me:15877: \"$ac_try\"") >&5
15878   (eval $ac_try) 2>&5
15879   ac_status=$?
15880   echo "$as_me:15880: \$? = $ac_status" >&5
15881   (exit $ac_status); }; }; then
15882   cf_cv_type_of_bool=`cat cf_test.out`
15883                  if test -z "$cf_cv_type_of_bool"; then
15884                    cf_cv_type_of_bool=unknown
15885                  fi
15886 else
15887   echo "$as_me: program exited with status $ac_status" >&5
15888 echo "$as_me: failed program was:" >&5
15889 cat conftest.$ac_ext >&5
15890 cf_cv_type_of_bool=unknown
15891 fi
15892 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15893 fi
15894
15895 fi
15896
15897         rm -f cf_test.out
15898 echo "$as_me:15898: result: $cf_cv_type_of_bool" >&5
15899 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15900 if test "$cf_cv_type_of_bool" = unknown ; then
15901         case .$NCURSES_BOOL in #(vi
15902         .auto|.) NCURSES_BOOL=unsigned;;
15903         esac
15904         { echo "$as_me:15904: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15905 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15906         cf_cv_type_of_bool=$NCURSES_BOOL
15907 fi
15908
15909                 else
15910                         echo "$as_me:15910: checking for fallback type of bool" >&5
15911 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15912                         case "$host_cpu" in #(vi
15913                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15914                         *)      cf_cv_type_of_bool=int  ;;
15915                         esac
15916                         echo "$as_me:15916: result: $cf_cv_type_of_bool" >&5
15917 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15918                 fi
15919         fi
15920 fi
15921
15922 # If the C compiler did not declare bool, and we did not determine that the C++
15923 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15924 # ncurses library use the same type as C++ bool.  Note that this allows one to
15925 # specify the type of bool in a configure-script option and postpone
15926 # integration with the C++ compiler provided that the types are compatible.
15927 USE_CXX_BOOL=1
15928 if test $cf_cv_cc_bool_type = 1
15929 then
15930         # oops: C has a bool.  Unlikely, but C++ could differ.
15931         USE_CXX_BOOL=0
15932 elif test $cf_cv_builtin_bool = 0
15933 then
15934         # C++ has no bool
15935         USE_CXX_BOOL=0
15936 else
15937         # this is the normal case
15938         USE_CXX_BOOL='defined(__cplusplus)'
15939 fi
15940
15941 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15942
15943 if test "$cf_with_ada" != "no" ; then
15944     if test "$with_libtool" != "no"; then
15945         { echo "$as_me:15945: WARNING: libtool does not support Ada - disabling feature" >&5
15946 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15947         cf_with_ada=no
15948     fi
15949 fi
15950
15951 if test "$cf_with_ada" != "no" ; then
15952 cf_ada_make=gnatmake
15953 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15954 set dummy $cf_ada_make; ac_word=$2
15955 echo "$as_me:15955: checking for $ac_word" >&5
15956 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15957 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15958   echo $ECHO_N "(cached) $ECHO_C" >&6
15959 else
15960   if test -n "$gnat_exists"; then
15961   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15962 else
15963   ac_save_IFS=$IFS; IFS=$ac_path_separator
15964 ac_dummy="$PATH"
15965 for ac_dir in $ac_dummy; do
15966   IFS=$ac_save_IFS
15967   test -z "$ac_dir" && ac_dir=.
15968   $as_executable_p "$ac_dir/$ac_word" || continue
15969 ac_cv_prog_gnat_exists="yes"
15970 echo "$as_me:15970: found $ac_dir/$ac_word" >&5
15971 break
15972 done
15973
15974   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15975 fi
15976 fi
15977 gnat_exists=$ac_cv_prog_gnat_exists
15978 if test -n "$gnat_exists"; then
15979   echo "$as_me:15979: result: $gnat_exists" >&5
15980 echo "${ECHO_T}$gnat_exists" >&6
15981 else
15982   echo "$as_me:15982: result: no" >&5
15983 echo "${ECHO_T}no" >&6
15984 fi
15985
15986 if test "$ac_cv_prog_gnat_exists" = no; then
15987    cf_ada_make=
15988 else
15989
15990 echo "$as_me:15990: checking for gnat version" >&5
15991 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15992 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15993   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15994 echo "$as_me:15994: result: $cf_gnat_version" >&5
15995 echo "${ECHO_T}$cf_gnat_version" >&6
15996
15997 case $cf_gnat_version in
15998   3.1[1-9]*|3.[2-9]*|[4-9].*)
15999     cf_cv_prog_gnat_correct=yes
16000     ;;
16001   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16002      cf_cv_prog_gnat_correct=no
16003      ;;
16004 esac
16005 case $cf_gnat_version in
16006   3.[1-9]*|[4-9].*)
16007       cf_compile_generics=generics
16008       cf_generic_objects="\${GENOBJS}"
16009       ;;
16010   *)  cf_compile_generics=
16011       cf_generic_objects=
16012       ;;
16013 esac
16014
16015    # Extract the first word of "m4", so it can be a program name with args.
16016 set dummy m4; ac_word=$2
16017 echo "$as_me:16017: checking for $ac_word" >&5
16018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16019 if test "${ac_cv_prog_M4_exists+set}" = set; then
16020   echo $ECHO_N "(cached) $ECHO_C" >&6
16021 else
16022   if test -n "$M4_exists"; then
16023   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16024 else
16025   ac_save_IFS=$IFS; IFS=$ac_path_separator
16026 ac_dummy="$PATH"
16027 for ac_dir in $ac_dummy; do
16028   IFS=$ac_save_IFS
16029   test -z "$ac_dir" && ac_dir=.
16030   $as_executable_p "$ac_dir/$ac_word" || continue
16031 ac_cv_prog_M4_exists="yes"
16032 echo "$as_me:16032: found $ac_dir/$ac_word" >&5
16033 break
16034 done
16035
16036   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16037 fi
16038 fi
16039 M4_exists=$ac_cv_prog_M4_exists
16040 if test -n "$M4_exists"; then
16041   echo "$as_me:16041: result: $M4_exists" >&5
16042 echo "${ECHO_T}$M4_exists" >&6
16043 else
16044   echo "$as_me:16044: result: no" >&5
16045 echo "${ECHO_T}no" >&6
16046 fi
16047
16048    if test "$ac_cv_prog_M4_exists" = no; then
16049       cf_cv_prog_gnat_correct=no
16050       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16051    fi
16052    if test "$cf_cv_prog_gnat_correct" = yes; then
16053       echo "$as_me:16053: checking if GNAT works" >&5
16054 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16055
16056 rm -f conftest*
16057 cat >>conftest.ads <<CF_EOF
16058 procedure conftest;
16059 CF_EOF
16060 cat >>conftest.adb <<CF_EOF
16061 with Text_IO;
16062 with GNAT.OS_Lib;
16063 procedure conftest is
16064 begin
16065    Text_IO.Put ("Hello World");
16066    Text_IO.New_Line;
16067    GNAT.OS_Lib.OS_Exit (0);
16068 end conftest;
16069 CF_EOF
16070 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16071    if ( ./conftest 1>&5 2>&1 ) ; then
16072       cf_cv_prog_gnat_correct=yes
16073    else
16074       cf_cv_prog_gnat_correct=no
16075    fi
16076 else
16077    cf_cv_prog_gnat_correct=no
16078 fi
16079 rm -f conftest*
16080
16081       echo "$as_me:16081: result: $cf_cv_prog_gnat_correct" >&5
16082 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16083    fi
16084 fi
16085 if test "$cf_cv_prog_gnat_correct" = yes; then
16086    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16087
16088    echo "$as_me:16088: checking if GNAT pragma Unreferenced works" >&5
16089 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16090
16091 rm -f conftest*
16092 cat >>conftest.ads <<CF_EOF
16093 procedure conftest;
16094 CF_EOF
16095 cat >>conftest.adb <<CF_EOF
16096 with Text_IO;
16097 with GNAT.OS_Lib;
16098 procedure conftest is
16099    test : Integer;
16100    pragma Unreferenced (test);
16101 begin
16102    test := 1;
16103    Text_IO.Put ("Hello World");
16104    Text_IO.New_Line;
16105    GNAT.OS_Lib.OS_Exit (0);
16106 end conftest;
16107 CF_EOF
16108 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16109       cf_cv_pragma_unreferenced=yes
16110 else
16111    cf_cv_pragma_unreferenced=no
16112 fi
16113 rm -f conftest*
16114
16115    echo "$as_me:16115: result: $cf_cv_pragma_unreferenced" >&5
16116 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16117
16118    # if the pragma is supported, use it (needed in the Trace code).
16119    if test $cf_cv_pragma_unreferenced = yes ; then
16120       PRAGMA_UNREF=TRUE
16121    else
16122       PRAGMA_UNREF=FALSE
16123    fi
16124
16125 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16126 if test "${with_ada_compiler+set}" = set; then
16127   withval="$with_ada_compiler"
16128   cf_ada_compiler=$withval
16129 else
16130   cf_ada_compiler=gnatmake
16131 fi;
16132
16133    cf_ada_package=terminal_interface
16134
16135 # Check whether --with-ada-include or --without-ada-include was given.
16136 if test "${with_ada_include+set}" = set; then
16137   withval="$with_ada_include"
16138
16139 else
16140   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16141 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16142
16143 if test "x$prefix" != xNONE; then
16144   cf_path_syntax="$prefix"
16145 else
16146   cf_path_syntax="$ac_default_prefix"
16147 fi
16148
16149 case ".$withval" in #(vi
16150 .\$\(*\)*|.\'*\'*) #(vi
16151   ;;
16152 ..|./*|.\\*) #(vi
16153   ;;
16154 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16155   ;;
16156 .\${*prefix}*) #(vi
16157   eval withval="$withval"
16158   case ".$withval" in #(vi
16159   .NONE/*)
16160     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16161     ;;
16162   esac
16163   ;; #(vi
16164 .no|.NONE/*)
16165   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16166   ;;
16167 *)
16168   { { echo "$as_me:16168: error: expected a pathname, not \"$withval\"" >&5
16169 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16170    { (exit 1); exit 1; }; }
16171   ;;
16172 esac
16173
16174 fi
16175 ADA_INCLUDE="$withval"
16176
16177 # Check whether --with-ada-objects or --without-ada-objects was given.
16178 if test "${with_ada_objects+set}" = set; then
16179   withval="$with_ada_objects"
16180
16181 else
16182   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16183 fi; if test -n "$prefix/lib/ada/adalib" ; then
16184
16185 if test "x$prefix" != xNONE; then
16186   cf_path_syntax="$prefix"
16187 else
16188   cf_path_syntax="$ac_default_prefix"
16189 fi
16190
16191 case ".$withval" in #(vi
16192 .\$\(*\)*|.\'*\'*) #(vi
16193   ;;
16194 ..|./*|.\\*) #(vi
16195   ;;
16196 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16197   ;;
16198 .\${*prefix}*) #(vi
16199   eval withval="$withval"
16200   case ".$withval" in #(vi
16201   .NONE/*)
16202     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16203     ;;
16204   esac
16205   ;; #(vi
16206 .no|.NONE/*)
16207   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16208   ;;
16209 *)
16210   { { echo "$as_me:16210: error: expected a pathname, not \"$withval\"" >&5
16211 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16212    { (exit 1); exit 1; }; }
16213   ;;
16214 esac
16215
16216 fi
16217 ADA_OBJECTS="$withval"
16218
16219 fi
16220 fi
16221 else
16222    cf_with_ada=no
16223 fi
16224
16225 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16226 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16227 ###
16228 ### ticlib modules may be a separate library, otherwise contained in termlib.
16229 ### termlib modules may be a separate library, otherwise contained in ncurses.
16230 ###
16231 ### The of "+" or " " between the tokens controls the way the script
16232 ### chooses to split module lists into libraries.
16233 ###
16234 ### (see CF_LIB_RULES).
16235 echo "$as_me:16235: checking for library subsets" >&5
16236 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16237 LIB_SUBSETS=
16238
16239 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16240         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16241         if test "$with_ticlib" != no ; then
16242                 LIB_SUBSETS="${LIB_SUBSETS} "
16243         else
16244                 LIB_SUBSETS="${LIB_SUBSETS}+"
16245         fi
16246 fi
16247
16248 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16249 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16250 if test "$with_termlib" != no ; then
16251         LIB_SUBSETS="${LIB_SUBSETS} "
16252 else
16253         LIB_SUBSETS="${LIB_SUBSETS}+"
16254 fi
16255
16256 LIB_SUBSETS="${LIB_SUBSETS}base"
16257 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16258 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16259
16260 echo "$as_me:16260: result: $LIB_SUBSETS" >&5
16261 echo "${ECHO_T}$LIB_SUBSETS" >&6
16262
16263 ### Construct the list of include-directories to be generated
16264
16265 CPPFLAGS="-I. -I../include $CPPFLAGS"
16266 if test "$srcdir" != "."; then
16267         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16268 fi
16269 if test "$GCC" != yes; then
16270         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16271 elif test "$includedir" != "/usr/include"; then
16272         if test "$includedir" = '${prefix}/include' ; then
16273                 if test $prefix != /usr ; then
16274                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16275                 fi
16276         else
16277                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16278         fi
16279 fi
16280
16281 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16282 if test "$srcdir" != "."; then
16283         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16284 fi
16285 if test "$GCC" != yes; then
16286         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16287 elif test "$includedir" != "/usr/include"; then
16288         if test "$includedir" = '${prefix}/include' ; then
16289                 if test $prefix != /usr ; then
16290                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16291                 fi
16292         else
16293                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16294         fi
16295 fi
16296
16297 ### Build up pieces for makefile rules
16298 echo "$as_me:16298: checking default library suffix" >&5
16299 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16300
16301         case $DFT_LWR_MODEL in
16302         libtool) DFT_ARG_SUFFIX=''   ;;
16303         normal)  DFT_ARG_SUFFIX=''   ;;
16304         debug)   DFT_ARG_SUFFIX='_g' ;;
16305         profile) DFT_ARG_SUFFIX='_p' ;;
16306         shared)  DFT_ARG_SUFFIX=''   ;;
16307         esac
16308         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16309 echo "$as_me:16309: result: $DFT_ARG_SUFFIX" >&5
16310 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16311
16312 echo "$as_me:16312: checking default library-dependency suffix" >&5
16313 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16314
16315         case $DFT_LWR_MODEL in
16316         libtool)
16317                 DFT_LIB_SUFFIX='.la'
16318                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16319                 ;;
16320         normal)
16321                 DFT_LIB_SUFFIX='.a'
16322                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16323                 ;;
16324         debug)
16325                 DFT_LIB_SUFFIX='_g.a'
16326                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16327                 ;;
16328         profile)
16329                 DFT_LIB_SUFFIX='_p.a'
16330                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16331                 ;;
16332         shared)
16333                 case $cf_cv_system_name in
16334                 cygwin*)
16335                         DFT_LIB_SUFFIX='.dll'
16336                         DFT_DEP_SUFFIX='.dll.a'
16337                         ;;
16338                 darwin*)
16339                         DFT_LIB_SUFFIX='.dylib'
16340                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16341                         ;;
16342                 hpux*)
16343                         case $target in
16344                         ia64*)
16345                                 DFT_LIB_SUFFIX='.so'
16346                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16347                                 ;;
16348                         *)
16349                                 DFT_LIB_SUFFIX='.sl'
16350                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16351                                 ;;
16352                         esac
16353                         ;;
16354                 *)      DFT_LIB_SUFFIX='.so'
16355                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16356                         ;;
16357                 esac
16358         esac
16359         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16360         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16361 echo "$as_me:16361: result: $DFT_DEP_SUFFIX" >&5
16362 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16363
16364 echo "$as_me:16364: checking default object directory" >&5
16365 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16366
16367         case $DFT_LWR_MODEL in
16368         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16369         normal)  DFT_OBJ_SUBDIR='objects' ;;
16370         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16371         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16372         shared)
16373                 case $cf_cv_system_name in #(vi
16374                 cygwin) #(vi
16375                         DFT_OBJ_SUBDIR='objects' ;;
16376                 *)
16377                         DFT_OBJ_SUBDIR='obj_s' ;;
16378                 esac
16379         esac
16380 echo "$as_me:16380: result: $DFT_OBJ_SUBDIR" >&5
16381 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16382
16383 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16384 if test "$cf_with_cxx" = yes ; then
16385 echo "$as_me:16385: checking c++ library-dependency suffix" >&5
16386 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16387 if test "$with_libtool" != "no"; then
16388         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16389 else
16390
16391         case normal in
16392         libtool)
16393                 CXX_LIB_SUFFIX='.la'
16394                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16395                 ;;
16396         normal)
16397                 CXX_LIB_SUFFIX='.a'
16398                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16399                 ;;
16400         debug)
16401                 CXX_LIB_SUFFIX='_g.a'
16402                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16403                 ;;
16404         profile)
16405                 CXX_LIB_SUFFIX='_p.a'
16406                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16407                 ;;
16408         shared)
16409                 case $cf_cv_system_name in
16410                 cygwin*)
16411                         CXX_LIB_SUFFIX='.dll'
16412                         CXX_DEP_SUFFIX='.dll.a'
16413                         ;;
16414                 darwin*)
16415                         CXX_LIB_SUFFIX='.dylib'
16416                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16417                         ;;
16418                 hpux*)
16419                         case $target in
16420                         ia64*)
16421                                 CXX_LIB_SUFFIX='.so'
16422                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16423                                 ;;
16424                         *)
16425                                 CXX_LIB_SUFFIX='.sl'
16426                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16427                                 ;;
16428                         esac
16429                         ;;
16430                 *)      CXX_LIB_SUFFIX='.so'
16431                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16432                         ;;
16433                 esac
16434         esac
16435         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16436         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16437 fi
16438 echo "$as_me:16438: result: $CXX_LIB_SUFFIX" >&5
16439 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16440
16441 fi
16442
16443 # do not want -ldl in build except as needed for -lncurses dependency
16444 if test "$with_dlsym" = yes ; then
16445 if test $DFT_LWR_MODEL = shared || \
16446    test $DFT_LWR_MODEL = libtool ; then
16447
16448 # remove dl library from $LIBS
16449 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16450
16451 fi
16452 fi
16453 ### Set up low-level terminfo dependencies for makefiles.
16454
16455 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16456 # do not need libdl
16457 TICS_LIST=
16458 if test "$with_dlsym" = yes ; then
16459
16460 # remove dl library from $SHLIB_LIST
16461 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16462
16463 fi
16464
16465 if test "$with_ticlib" != no ; then
16466
16467         if test "$with_ticlib" != yes ; then
16468                 TICS_NAME=$with_ticlib
16469                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16470                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16471                 TICS_LIB_SUFFIX="${with_ticlib}"
16472         else
16473                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16474                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16475                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16476         fi
16477         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16478 else
16479         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16480 fi
16481
16482 if test "$with_termlib" != no ; then
16483
16484         if test "$with_termlib" != yes ; then
16485                 TINFO_NAME=$with_termlib
16486                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16487                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16488                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16489                 TINFO_LIB_SUFFIX="${with_termlib}"
16490         else
16491                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16492                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16493                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16494                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16495         fi
16496
16497         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16498         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16499         if test "$DFT_LWR_MODEL" = "libtool"; then
16500                 TEST_ARGS="${TEST_DEPS}"
16501                 TEST_ARG2="${TEST_DEP2}"
16502                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16503         else
16504                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16505                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16506                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16507                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16508                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16509         fi
16510 else
16511         # the next lines are needed for linking libtic over libncurses
16512         TINFO_NAME=${LIB_NAME}
16513         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16514         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16515         if test "$with_tic_depends" = yes ; then
16516                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16517         else
16518                 TICS_LIST="$SHLIB_LIST"
16519         fi
16520
16521         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16522 fi
16523
16524 if test "$DFT_LWR_MODEL" = shared ; then
16525         case $cf_cv_system_name in #(vi
16526         cygwin*)
16527                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16528                 TINFO_SUFFIX=.dll
16529                 ;;
16530         esac
16531 fi
16532
16533 if test "$with_dlsym" = yes ; then
16534
16535 # remove dl library from $TICS_LIST
16536 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16537
16538 fi
16539
16540 if test "$DFT_LWR_MODEL" = "libtool"; then
16541     OBJEXT=lo
16542 fi
16543
16544 # needed for Ada95
16545 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16546
16547 case $DFT_LWR_MODEL in
16548 normal|debug|profile)
16549
16550 if test "$GCC" = yes ; then
16551         case $cf_cv_system_name in #(
16552         OS/2*|os2*|aix[45]*)    #( vi
16553                 LDFLAGS_STATIC=
16554                 LDFLAGS_SHARED=
16555                 ;;
16556     *)  #( normally, except when broken
16557         LDFLAGS_STATIC=-static
16558         LDFLAGS_SHARED=-dynamic
16559         ;;
16560     esac
16561 else
16562         case $cf_cv_system_name in #(
16563         aix[45]*)       #( from ld manpage
16564                 LDFLAGS_STATIC=-bstatic
16565                 LDFLAGS_SHARED=-bdynamic
16566                 ;;
16567         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16568                 # We could also use just "archive" and "shared".
16569                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16570                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16571                 ;;
16572         irix*)          #( from ld manpage IRIX64
16573                 LDFLAGS_STATIC=-Bstatic
16574                 LDFLAGS_SHARED=-Bdynamic
16575                 ;;
16576         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16577                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16578                 LDFLAGS_STATIC=-noso
16579                 LDFLAGS_SHARED=-so_archive
16580                 ;;
16581         solaris2*)
16582                 LDFLAGS_STATIC=-Bstatic
16583                 LDFLAGS_SHARED=-Bdynamic
16584                 ;;
16585         esac
16586 fi
16587
16588         ;;
16589 esac
16590
16591 echo "$as_me:16591: checking where we will install curses.h" >&5
16592 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16593 test "$with_overwrite" = no && \
16594 test "x$includedir" = 'x${prefix}/include' && \
16595         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16596 echo "$as_me:16596: result: $includedir" >&5
16597 echo "${ECHO_T}$includedir" >&6
16598
16599 ### Resolve a conflict between normal and wide-curses by forcing applications
16600 ### that will need libutf8 to add it to their configure script.
16601 if test "$with_overwrite" != no ; then
16602 if test "$NCURSES_LIBUTF8" = 1 ; then
16603         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16604         { echo "$as_me:16604: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16605 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16606 fi
16607 fi
16608
16609 # used to separate tack out of the tree
16610 NCURSES_TREE=
16611
16612 ### predefined stuff for the test programs
16613 cat >>confdefs.h <<\EOF
16614 #define HAVE_SLK_COLOR 1
16615 EOF
16616
16617 ### Construct the list of subdirectories for which we'll customize makefiles
16618 ### with the appropriate compile-rules.
16619
16620 echo "$as_me:16620: checking for src modules" >&5
16621 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16622
16623 # dependencies and linker-arguments for test-programs
16624 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16625 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16626 if test "$DFT_LWR_MODEL" = "libtool"; then
16627         TEST_ARGS="${TEST_DEPS}"
16628         TEST_ARG2="${TEST_DEP2}"
16629 else
16630         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16631         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16632 fi
16633
16634 cf_cv_src_modules=
16635 for cf_dir in $modules_to_build
16636 do
16637         if test -f $srcdir/$cf_dir/modules; then
16638
16639                 # We may/may not have tack in the distribution, though the
16640                 # makefile is.
16641                 if test $cf_dir = tack ; then
16642                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16643                                 continue
16644                         fi
16645                 fi
16646
16647                 if test -z "$cf_cv_src_modules"; then
16648                         cf_cv_src_modules=$cf_dir
16649                 else
16650                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16651                 fi
16652
16653                 # Make the ncurses_cfg.h file record the library interface files as
16654                 # well.  These are header files that are the same name as their
16655                 # directory.  Ncurses is the only library that does not follow
16656                 # that pattern.
16657                 if test $cf_dir = tack ; then
16658                         continue
16659                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16660
16661 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16662
16663                         cat >>confdefs.h <<EOF
16664 #define HAVE_${cf_have_include}_H 1
16665 EOF
16666
16667                         cat >>confdefs.h <<EOF
16668 #define HAVE_LIB${cf_have_include} 1
16669 EOF
16670
16671                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16672                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16673                         if test "$DFT_LWR_MODEL" = "libtool"; then
16674                                 TEST_ARGS="${TEST_DEPS}"
16675                                 TEST_ARG2="${TEST_DEP2}"
16676                         else
16677                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16678                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16679                         fi
16680                 fi
16681         fi
16682 done
16683 echo "$as_me:16683: result: $cf_cv_src_modules" >&5
16684 echo "${ECHO_T}$cf_cv_src_modules" >&6
16685
16686 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16687 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16688
16689 SRC_SUBDIRS=
16690 if test "x$cf_with_manpages" != xno ; then
16691         SRC_SUBDIRS="$SRC_SUBDIRS man"
16692 fi
16693 SRC_SUBDIRS="$SRC_SUBDIRS include"
16694 for cf_dir in $cf_cv_src_modules
16695 do
16696         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16697 done
16698 SRC_SUBDIRS="$SRC_SUBDIRS test"
16699 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16700 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16701
16702 ADA_SUBDIRS=
16703 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16704    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16705    ADA_SUBDIRS="gen src samples"
16706 fi
16707
16708 SUB_MAKEFILES=
16709 for cf_dir in $SRC_SUBDIRS
16710 do
16711         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16712 done
16713
16714 if test -n "$ADA_SUBDIRS"; then
16715    for cf_dir in $ADA_SUBDIRS
16716    do
16717       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16718    done
16719
16720 fi
16721
16722 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16723    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16724 fi
16725
16726 DIRS_TO_MAKE="lib"
16727 for cf_item in $cf_list_models
16728 do
16729
16730         case $cf_item in
16731         libtool) cf_subdir='obj_lo'  ;;
16732         normal)  cf_subdir='objects' ;;
16733         debug)   cf_subdir='obj_g' ;;
16734         profile) cf_subdir='obj_p' ;;
16735         shared)
16736                 case $cf_cv_system_name in #(vi
16737                 cygwin) #(vi
16738                         cf_subdir='objects' ;;
16739                 *)
16740                         cf_subdir='obj_s' ;;
16741                 esac
16742         esac
16743
16744         for cf_item2 in $DIRS_TO_MAKE
16745         do
16746                 test $cf_item2 = $cf_subdir && break
16747         done
16748         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16749 done
16750 for cf_dir in $DIRS_TO_MAKE
16751 do
16752         test ! -d $cf_dir && mkdir $cf_dir
16753 done
16754
16755 cat >>confdefs.h <<EOF
16756 #define NCURSES_PATHSEP '$PATHSEP'
16757 EOF
16758
16759 cat >>confdefs.h <<EOF
16760 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16761 EOF
16762
16763 ### Now that we're done running tests, add the compiler-warnings, if any
16764
16765 cf_fix_cppflags=no
16766 cf_new_cflags=
16767 cf_new_cppflags=
16768 cf_new_extra_cppflags=
16769
16770 for cf_add_cflags in $EXTRA_CFLAGS
16771 do
16772 case $cf_fix_cppflags in
16773 no)
16774         case $cf_add_cflags in #(vi
16775         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16776                 case $cf_add_cflags in
16777                 -D*)
16778                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16779
16780                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16781                         && test -z "${cf_tst_cflags}" \
16782                         && cf_fix_cppflags=yes
16783
16784                         if test $cf_fix_cppflags = yes ; then
16785                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16786                                 continue
16787                         elif test "${cf_tst_cflags}" = "\"'" ; then
16788                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16789                                 continue
16790                         fi
16791                         ;;
16792                 esac
16793                 case "$CPPFLAGS" in
16794                 *$cf_add_cflags) #(vi
16795                         ;;
16796                 *) #(vi
16797                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16798                         ;;
16799                 esac
16800                 ;;
16801         *)
16802                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16803                 ;;
16804         esac
16805         ;;
16806 yes)
16807         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16808
16809         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16810
16811         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16812         && test -z "${cf_tst_cflags}" \
16813         && cf_fix_cppflags=no
16814         ;;
16815 esac
16816 done
16817
16818 if test -n "$cf_new_cflags" ; then
16819
16820         CFLAGS="$CFLAGS $cf_new_cflags"
16821 fi
16822
16823 if test -n "$cf_new_cppflags" ; then
16824
16825         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16826 fi
16827
16828 if test -n "$cf_new_extra_cppflags" ; then
16829
16830         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16831 fi
16832
16833 ### If we're building with rpath, try to link non-standard libs that way too.
16834 if test "$DFT_LWR_MODEL" = "shared"; then
16835
16836 echo "$as_me:16836: checking for updated LDFLAGS" >&5
16837 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16838 if test -n "$LDFLAGS" ; then
16839 echo "$as_me:16839: result: maybe" >&5
16840 echo "${ECHO_T}maybe" >&6
16841 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16842
16843 echo "${as_me-configure}:16843: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16844
16845 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16846
16847 echo "${as_me-configure}:16847: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16848
16849 case "$EXTRA_LDFLAGS" in #(vi
16850 -Wl,-rpath,*) #(vi
16851         cf_rpath_hack="-Wl,-rpath,"
16852         ;;
16853 -R\ *)
16854         cf_rpath_hack="-R "
16855         ;;
16856 -R*)
16857         cf_rpath_hack="-R"
16858         ;;
16859 *)
16860         cf_rpath_hack=
16861         ;;
16862 esac
16863 if test -n "$cf_rpath_hack" ; then
16864         cf_rpath_dst=
16865         for cf_rpath_src in $LDFLAGS
16866         do
16867                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16868
16869 echo "${as_me-configure}:16869: testing Filtering $cf_rpath_src ..." 1>&5
16870
16871                 case $cf_rpath_src in #(vi
16872                 -L*) #(vi
16873                         if test "$cf_rpath_hack" = "-R " ; then
16874                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16875                         else
16876                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16877                         fi
16878                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
16879
16880 echo "${as_me-configure}:16880: testing ...Filter $cf_rpath_tmp ..." 1>&5
16881
16882                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16883                         ;;
16884                 esac
16885                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16886         done
16887         LDFLAGS=$cf_rpath_dst
16888         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16889
16890 echo "${as_me-configure}:16890: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16891
16892         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16893
16894 echo "${as_me-configure}:16894: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16895
16896 fi
16897 else
16898 echo "$as_me:16898: result: no" >&5
16899 echo "${ECHO_T}no" >&6
16900 fi
16901
16902 fi
16903
16904 ### Define substitutions for header files to avoid name-pollution
16905
16906 if test "$cf_cv_have_tcgetattr" = yes ; then
16907         HAVE_TCGETATTR=1
16908 else
16909         HAVE_TCGETATTR=0
16910 fi
16911
16912 if test "$ac_cv_header_termio_h" = yes ; then
16913         HAVE_TERMIO_H=1
16914 else
16915         HAVE_TERMIO_H=0
16916 fi
16917
16918 if test "$ac_cv_header_termios_h" = yes ; then
16919         HAVE_TERMIOS_H=1
16920 else
16921         HAVE_TERMIOS_H=0
16922 fi
16923
16924 ################################################################################
16925 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16926 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16927 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"
16928 ac_config_commands="$ac_config_commands default"
16929 cat >confcache <<\_ACEOF
16930 # This file is a shell script that caches the results of configure
16931 # tests run on this system so they can be shared between configure
16932 # scripts and configure runs, see configure's option --config-cache.
16933 # It is not useful on other systems.  If it contains results you don't
16934 # want to keep, you may remove or edit it.
16935 #
16936 # config.status only pays attention to the cache file if you give it
16937 # the --recheck option to rerun configure.
16938 #
16939 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16940 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16941 # following values.
16942
16943 _ACEOF
16944
16945 # The following way of writing the cache mishandles newlines in values,
16946 # but we know of no workaround that is simple, portable, and efficient.
16947 # So, don't put newlines in cache variables' values.
16948 # Ultrix sh set writes to stderr and can't be redirected directly,
16949 # and sets the high bit in the cache file unless we assign to the vars.
16950 {
16951   (set) 2>&1 |
16952     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16953     *ac_space=\ *)
16954       # `set' does not quote correctly, so add quotes (double-quote
16955       # substitution turns \\\\ into \\, and sed turns \\ into \).
16956       sed -n \
16957         "s/'/'\\\\''/g;
16958           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16959       ;;
16960     *)
16961       # `set' quotes correctly as required by POSIX, so do not add quotes.
16962       sed -n \
16963         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16964       ;;
16965     esac;
16966 } |
16967   sed '
16968      t clear
16969      : clear
16970      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16971      t end
16972      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16973      : end' >>confcache
16974 if cmp -s $cache_file confcache; then :; else
16975   if test -w $cache_file; then
16976     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16977     cat confcache >$cache_file
16978   else
16979     echo "not updating unwritable cache $cache_file"
16980   fi
16981 fi
16982 rm -f confcache
16983
16984 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16985 # Let make expand exec_prefix.
16986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16987
16988 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16989 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16990 # trailing colons and then remove the whole line if VPATH becomes empty
16991 # (actually we leave an empty line to preserve line numbers).
16992 if test "x$srcdir" = x.; then
16993   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16994 s/:*\$(srcdir):*/:/;
16995 s/:*\${srcdir}:*/:/;
16996 s/:*@srcdir@:*/:/;
16997 s/^\([^=]*=[    ]*\):*/\1/;
16998 s/:*$//;
16999 s/^[^=]*=[      ]*$//;
17000 }'
17001 fi
17002
17003 DEFS=-DHAVE_CONFIG_H
17004
17005 : ${CONFIG_STATUS=./config.status}
17006 ac_clean_files_save=$ac_clean_files
17007 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17008 { echo "$as_me:17008: creating $CONFIG_STATUS" >&5
17009 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17010 cat >$CONFIG_STATUS <<_ACEOF
17011 #! $SHELL
17012 # Generated automatically by configure.
17013 # Run this file to recreate the current configuration.
17014 # Compiler output produced by configure, useful for debugging
17015 # configure, is in config.log if it exists.
17016
17017 debug=false
17018 SHELL=\${CONFIG_SHELL-$SHELL}
17019 ac_cs_invocation="\$0 \$@"
17020
17021 _ACEOF
17022
17023 cat >>$CONFIG_STATUS <<\_ACEOF
17024 # Be Bourne compatible
17025 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17026   emulate sh
17027   NULLCMD=:
17028 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17029   set -o posix
17030 fi
17031
17032 # Name of the executable.
17033 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17034
17035 if expr a : '\(a\)' >/dev/null 2>&1; then
17036   as_expr=expr
17037 else
17038   as_expr=false
17039 fi
17040
17041 rm -f conf$$ conf$$.exe conf$$.file
17042 echo >conf$$.file
17043 if ln -s conf$$.file conf$$ 2>/dev/null; then
17044   # We could just check for DJGPP; but this test a) works b) is more generic
17045   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17046   if test -f conf$$.exe; then
17047     # Don't use ln at all; we don't have any links
17048     as_ln_s='cp -p'
17049   else
17050     as_ln_s='ln -s'
17051   fi
17052 elif ln conf$$.file conf$$ 2>/dev/null; then
17053   as_ln_s=ln
17054 else
17055   as_ln_s='cp -p'
17056 fi
17057 rm -f conf$$ conf$$.exe conf$$.file
17058
17059 as_executable_p="test -f"
17060
17061 # Support unset when possible.
17062 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17063   as_unset=unset
17064 else
17065   as_unset=false
17066 fi
17067
17068 # NLS nuisances.
17069 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17070 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17071 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17072 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17073 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17074 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17075 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17076 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17077
17078 # IFS
17079 # We need space, tab and new line, in precisely that order.
17080 as_nl='
17081 '
17082 IFS="   $as_nl"
17083
17084 # CDPATH.
17085 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17086
17087 exec 6>&1
17088
17089 _ACEOF
17090
17091 # Files that config.status was made for.
17092 if test -n "$ac_config_files"; then
17093   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17094 fi
17095
17096 if test -n "$ac_config_headers"; then
17097   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17098 fi
17099
17100 if test -n "$ac_config_links"; then
17101   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17102 fi
17103
17104 if test -n "$ac_config_commands"; then
17105   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17106 fi
17107
17108 cat >>$CONFIG_STATUS <<\EOF
17109
17110 ac_cs_usage="\
17111 \`$as_me' instantiates files from templates according to the
17112 current configuration.
17113
17114 Usage: $0 [OPTIONS] [FILE]...
17115
17116   -h, --help       print this help, then exit
17117   -V, --version    print version number, then exit
17118   -d, --debug      don't remove temporary files
17119       --recheck    update $as_me by reconfiguring in the same conditions
17120   --file=FILE[:TEMPLATE]
17121                    instantiate the configuration file FILE
17122   --header=FILE[:TEMPLATE]
17123                    instantiate the configuration header FILE
17124
17125 Configuration files:
17126 $config_files
17127
17128 Configuration headers:
17129 $config_headers
17130
17131 Configuration commands:
17132 $config_commands
17133
17134 Report bugs to <bug-autoconf@gnu.org>."
17135 EOF
17136
17137 cat >>$CONFIG_STATUS <<EOF
17138 ac_cs_version="\\
17139 config.status
17140 configured by $0, generated by GNU Autoconf 2.52.20080325,
17141   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17142
17143 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17144 Free Software Foundation, Inc.
17145 This config.status script is free software; the Free Software Foundation
17146 gives unlimited permission to copy, distribute and modify it."
17147 srcdir=$srcdir
17148 INSTALL="$INSTALL"
17149 EOF
17150
17151 cat >>$CONFIG_STATUS <<\EOF
17152 # If no file are specified by the user, then we need to provide default
17153 # value.  By we need to know if files were specified by the user.
17154 ac_need_defaults=:
17155 while test $# != 0
17156 do
17157   case $1 in
17158   --*=*)
17159     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17160     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17161     shift
17162     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17163     shift
17164     ;;
17165   -*);;
17166   *) # This is not an option, so the user has probably given explicit
17167      # arguments.
17168      ac_need_defaults=false;;
17169   esac
17170
17171   case $1 in
17172   # Handling of the options.
17173 EOF
17174 cat >>$CONFIG_STATUS <<EOF
17175   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17176     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17177     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17178 EOF
17179 cat >>$CONFIG_STATUS <<\EOF
17180   --version | --vers* | -V )
17181     echo "$ac_cs_version"; exit 0 ;;
17182   --he | --h)
17183     # Conflict between --help and --header
17184     { { echo "$as_me:17184: error: ambiguous option: $1
17185 Try \`$0 --help' for more information." >&5
17186 echo "$as_me: error: ambiguous option: $1
17187 Try \`$0 --help' for more information." >&2;}
17188    { (exit 1); exit 1; }; };;
17189   --help | --hel | -h )
17190     echo "$ac_cs_usage"; exit 0 ;;
17191   --debug | --d* | -d )
17192     debug=: ;;
17193   --file | --fil | --fi | --f )
17194     shift
17195     CONFIG_FILES="$CONFIG_FILES $1"
17196     ac_need_defaults=false;;
17197   --header | --heade | --head | --hea )
17198     shift
17199     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17200     ac_need_defaults=false;;
17201
17202   # This is an error.
17203   -*) { { echo "$as_me:17203: error: unrecognized option: $1
17204 Try \`$0 --help' for more information." >&5
17205 echo "$as_me: error: unrecognized option: $1
17206 Try \`$0 --help' for more information." >&2;}
17207    { (exit 1); exit 1; }; } ;;
17208
17209   *) ac_config_targets="$ac_config_targets $1" ;;
17210
17211   esac
17212   shift
17213 done
17214
17215 exec 5>>config.log
17216 cat >&5 << _ACEOF
17217
17218 ## ----------------------- ##
17219 ## Running config.status.  ##
17220 ## ----------------------- ##
17221
17222 This file was extended by $as_me 2.52.20080325, executed with
17223   CONFIG_FILES    = $CONFIG_FILES
17224   CONFIG_HEADERS  = $CONFIG_HEADERS
17225   CONFIG_LINKS    = $CONFIG_LINKS
17226   CONFIG_COMMANDS = $CONFIG_COMMANDS
17227   > $ac_cs_invocation
17228 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17229
17230 _ACEOF
17231 EOF
17232
17233 cat >>$CONFIG_STATUS <<EOF
17234 #
17235 # INIT-COMMANDS section.
17236 #
17237
17238 ### Special initialization commands, used to pass information from the
17239 ### configuration-run into config.status
17240
17241 AWK="$AWK"
17242 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17243 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17244 ECHO_LINK="$ECHO_LINK"
17245 LDCONFIG="$LDCONFIG"
17246 LIB_NAME="$LIB_NAME"
17247 LIB_SUBSETS="$LIB_SUBSETS"
17248 LIB_SUFFIX="$LIB_SUFFIX"
17249 LIB_TRACING="$LIB_TRACING"
17250 MAKE_TERMINFO="$MAKE_TERMINFO"
17251 NCURSES_MAJOR="$NCURSES_MAJOR"
17252 NCURSES_MINOR="$NCURSES_MINOR"
17253 NCURSES_OSPEED="$NCURSES_OSPEED"
17254 NCURSES_PATCH="$NCURSES_PATCH"
17255 SRC_SUBDIRS="$SRC_SUBDIRS"
17256 TERMINFO="$TERMINFO"
17257 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17258 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17259 TINFO_NAME="$TINFO_NAME"
17260 TINFO_SUFFIX="$TINFO_SUFFIX"
17261 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17262 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17263 TICS_NAME="$TICS_NAME"
17264 WITH_CURSES_H="$with_curses_h"
17265 WITH_ECHO="$with_echo"
17266 WITH_OVERWRITE="$with_overwrite"
17267 cf_LIST_MODELS="$cf_list_models"
17268 cf_cv_abi_version="$cf_cv_abi_version"
17269 cf_cv_do_relink="$cf_cv_do_relink"
17270 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17271 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17272 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17273 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17274 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17275 cf_cv_rel_version="$cf_cv_rel_version"
17276 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17277 cf_cv_shared_soname='$cf_cv_shared_soname'
17278 cf_cv_shlib_version="$cf_cv_shlib_version"
17279 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17280 cf_cv_system_name="$cf_cv_system_name"
17281 cf_with_cxx_binding="$cf_with_cxx_binding"
17282 cf_with_manpages="$cf_with_manpages"
17283 host="$host"
17284 target="$target"
17285
17286 EOF
17287
17288 cat >>$CONFIG_STATUS <<\EOF
17289 for ac_config_target in $ac_config_targets
17290 do
17291   case "$ac_config_target" in
17292   # Handling of arguments.
17293   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17294   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17295   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17296   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17297   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17298   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17299   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17300   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17301   *) { { echo "$as_me:17301: error: invalid argument: $ac_config_target" >&5
17302 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17303    { (exit 1); exit 1; }; };;
17304   esac
17305 done
17306
17307 # If the user did not use the arguments to specify the items to instantiate,
17308 # then the envvar interface is used.  Set only those that are not.
17309 # We use the long form for the default assignment because of an extremely
17310 # bizarre bug on SunOS 4.1.3.
17311 if $ac_need_defaults; then
17312   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17313   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17314   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17315 fi
17316
17317 # Create a temporary directory, and hook for its removal unless debugging.
17318 $debug ||
17319 {
17320   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17321   trap '{ (exit 1); exit 1; }' 1 2 13 15
17322 }
17323
17324 # Create a (secure) tmp directory for tmp files.
17325 : ${TMPDIR=/tmp}
17326 {
17327   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17328   test -n "$tmp" && test -d "$tmp"
17329 }  ||
17330 {
17331   tmp=$TMPDIR/cs$$-$RANDOM
17332   (umask 077 && mkdir $tmp)
17333 } ||
17334 {
17335    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17336    { (exit 1); exit 1; }
17337 }
17338
17339 EOF
17340
17341 cat >>$CONFIG_STATUS <<EOF
17342
17343 #
17344 # CONFIG_FILES section.
17345 #
17346
17347 # No need to generate the scripts if there are no CONFIG_FILES.
17348 # This happens for instance when ./config.status config.h
17349 if test -n "\$CONFIG_FILES"; then
17350   # Protect against being on the right side of a sed subst in config.status.
17351   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17352    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17353 s,@SHELL@,$SHELL,;t t
17354 s,@exec_prefix@,$exec_prefix,;t t
17355 s,@prefix@,$prefix,;t t
17356 s,@program_transform_name@,$program_transform_name,;t t
17357 s,@bindir@,$bindir,;t t
17358 s,@sbindir@,$sbindir,;t t
17359 s,@libexecdir@,$libexecdir,;t t
17360 s,@datadir@,$datadir,;t t
17361 s,@sysconfdir@,$sysconfdir,;t t
17362 s,@sharedstatedir@,$sharedstatedir,;t t
17363 s,@localstatedir@,$localstatedir,;t t
17364 s,@libdir@,$libdir,;t t
17365 s,@includedir@,$includedir,;t t
17366 s,@oldincludedir@,$oldincludedir,;t t
17367 s,@infodir@,$infodir,;t t
17368 s,@mandir@,$mandir,;t t
17369 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17370 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17371 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17372 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17373 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17374 s,@build_alias@,$build_alias,;t t
17375 s,@host_alias@,$host_alias,;t t
17376 s,@target_alias@,$target_alias,;t t
17377 s,@ECHO_C@,$ECHO_C,;t t
17378 s,@ECHO_N@,$ECHO_N,;t t
17379 s,@ECHO_T@,$ECHO_T,;t t
17380 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17381 s,@DEFS@,$DEFS,;t t
17382 s,@LIBS@,$LIBS,;t t
17383 s,@top_builddir@,$top_builddir,;t t
17384 s,@EGREP@,$EGREP,;t t
17385 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17386 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17387 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17388 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17389 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17390 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17391 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17392 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17393 s,@build@,$build,;t t
17394 s,@build_cpu@,$build_cpu,;t t
17395 s,@build_vendor@,$build_vendor,;t t
17396 s,@build_os@,$build_os,;t t
17397 s,@host@,$host,;t t
17398 s,@host_cpu@,$host_cpu,;t t
17399 s,@host_vendor@,$host_vendor,;t t
17400 s,@host_os@,$host_os,;t t
17401 s,@target@,$target,;t t
17402 s,@target_cpu@,$target_cpu,;t t
17403 s,@target_vendor@,$target_vendor,;t t
17404 s,@target_os@,$target_os,;t t
17405 s,@CC@,$CC,;t t
17406 s,@CFLAGS@,$CFLAGS,;t t
17407 s,@LDFLAGS@,$LDFLAGS,;t t
17408 s,@CPPFLAGS@,$CPPFLAGS,;t t
17409 s,@ac_ct_CC@,$ac_ct_CC,;t t
17410 s,@EXEEXT@,$EXEEXT,;t t
17411 s,@OBJEXT@,$OBJEXT,;t t
17412 s,@CPP@,$CPP,;t t
17413 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17414 s,@PROG_EXT@,$PROG_EXT,;t t
17415 s,@LDCONFIG@,$LDCONFIG,;t t
17416 s,@CXX@,$CXX,;t t
17417 s,@CXXFLAGS@,$CXXFLAGS,;t t
17418 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17419 s,@AWK@,$AWK,;t t
17420 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17421 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17422 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17423 s,@LINT@,$LINT,;t t
17424 s,@LINT_OPTS@,$LINT_OPTS,;t t
17425 s,@LN_S@,$LN_S,;t t
17426 s,@SET_MAKE@,$SET_MAKE,;t t
17427 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17428 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17429 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17430 s,@RANLIB@,$RANLIB,;t t
17431 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17432 s,@LD@,$LD,;t t
17433 s,@ac_ct_LD@,$ac_ct_LD,;t t
17434 s,@AR@,$AR,;t t
17435 s,@ac_ct_AR@,$ac_ct_AR,;t t
17436 s,@AR_OPTS@,$AR_OPTS,;t t
17437 s,@DESTDIR@,$DESTDIR,;t t
17438 s,@BUILD_CC@,$BUILD_CC,;t t
17439 s,@BUILD_CPP@,$BUILD_CPP,;t t
17440 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17441 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17442 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17443 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17444 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17445 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17446 s,@cf_list_models@,$cf_list_models,;t t
17447 s,@LIBTOOL@,$LIBTOOL,;t t
17448 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17449 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17450 s,@LIB_CREATE@,$LIB_CREATE,;t t
17451 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17452 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17453 s,@LIB_PREP@,$LIB_PREP,;t t
17454 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17455 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17456 s,@LIB_LINK@,$LIB_LINK,;t t
17457 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17458 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17459 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17460 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17461 s,@TICS_NAME@,$TICS_NAME,;t t
17462 s,@TINFO_NAME@,$TINFO_NAME,;t t
17463 s,@LIB_NAME@,$LIB_NAME,;t t
17464 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17465 s,@CC_G_OPT@,$CC_G_OPT,;t t
17466 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17467 s,@LD_MODEL@,$LD_MODEL,;t t
17468 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17469 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17470 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17471 s,@LINK_PROGS@,$LINK_PROGS,;t t
17472 s,@LINK_TESTS@,$LINK_TESTS,;t t
17473 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17474 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17475 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17476 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17477 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17478 s,@PATHSEP@,$PATHSEP,;t t
17479 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17480 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17481 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17482 s,@TERMINFO@,$TERMINFO,;t t
17483 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17484 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17485 s,@TERMPATH@,$TERMPATH,;t t
17486 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17487 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17488 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17489 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17490 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17491 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17492 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17493 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17494 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17495 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17496 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17497 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17498 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17499 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17500 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17501 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17502 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17503 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17504 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17505 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17506 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17507 s,@PTHREAD@,$PTHREAD,;t t
17508 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17509 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17510 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17511 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17512 s,@ECHO_LINK@,$ECHO_LINK,;t t
17513 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17514 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17515 s,@ADA_TRACE@,$ADA_TRACE,;t t
17516 s,@MATH_LIB@,$MATH_LIB,;t t
17517 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17518 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17519 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17520 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17521 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17522 s,@TEST_LIBS@,$TEST_LIBS,;t t
17523 s,@CXXCPP@,$CXXCPP,;t t
17524 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17525 s,@CXX_AR@,$CXX_AR,;t t
17526 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17527 s,@CXXLIBS@,$CXXLIBS,;t t
17528 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17529 s,@gnat_exists@,$gnat_exists,;t t
17530 s,@M4_exists@,$M4_exists,;t t
17531 s,@cf_ada_make@,$cf_ada_make,;t t
17532 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17533 s,@cf_ada_package@,$cf_ada_package,;t t
17534 s,@ADAFLAGS@,$ADAFLAGS,;t t
17535 s,@cf_compile_generics@,$cf_compile_generics,;t t
17536 s,@cf_generic_objects@,$cf_generic_objects,;t t
17537 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17538 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17539 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17540 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17541 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17542 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17543 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17544 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17545 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17546 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17547 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17548 s,@TICS_ARGS@,$TICS_ARGS,;t t
17549 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17550 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17551 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17552 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17553 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17554 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17555 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17556 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17557 s,@TICS_LIST@,$TICS_LIST,;t t
17558 s,@TINFO_LIST@,$TINFO_LIST,;t t
17559 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17560 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17561 s,@TEST_ARGS@,$TEST_ARGS,;t t
17562 s,@TEST_DEPS@,$TEST_DEPS,;t t
17563 s,@TEST_ARG2@,$TEST_ARG2,;t t
17564 s,@TEST_DEP2@,$TEST_DEP2,;t t
17565 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17566 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17567 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17568 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17569 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17570 CEOF
17571
17572 EOF
17573
17574   cat >>$CONFIG_STATUS <<\EOF
17575   # Split the substitutions into bite-sized pieces for seds with
17576   # small command number limits, like on Digital OSF/1 and HP-UX.
17577   ac_max_sed_lines=48
17578   ac_sed_frag=1 # Number of current file.
17579   ac_beg=1 # First line for current file.
17580   ac_end=$ac_max_sed_lines # Line after last line for current file.
17581   ac_more_lines=:
17582   ac_sed_cmds=
17583   while $ac_more_lines; do
17584     if test $ac_beg -gt 1; then
17585       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17586     else
17587       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17588     fi
17589     if test ! -s $tmp/subs.frag; then
17590       ac_more_lines=false
17591     else
17592       # The purpose of the label and of the branching condition is to
17593       # speed up the sed processing (if there are no `@' at all, there
17594       # is no need to browse any of the substitutions).
17595       # These are the two extra sed commands mentioned above.
17596       (echo ':t
17597   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17598       if test -z "$ac_sed_cmds"; then
17599         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17600       else
17601         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17602       fi
17603       ac_sed_frag=`expr $ac_sed_frag + 1`
17604       ac_beg=$ac_end
17605       ac_end=`expr $ac_end + $ac_max_sed_lines`
17606     fi
17607   done
17608   if test -z "$ac_sed_cmds"; then
17609     ac_sed_cmds=cat
17610   fi
17611 fi # test -n "$CONFIG_FILES"
17612
17613 EOF
17614 cat >>$CONFIG_STATUS <<\EOF
17615 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17616   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17617   case $ac_file in
17618   - | *:- | *:-:* ) # input from stdin
17619         cat >$tmp/stdin
17620         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17621         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17622   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17623         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17624   * )   ac_file_in=$ac_file.in ;;
17625   esac
17626
17627   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17628   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17629          X"$ac_file" : 'X\(//\)[^/]' \| \
17630          X"$ac_file" : 'X\(//\)$' \| \
17631          X"$ac_file" : 'X\(/\)' \| \
17632          .     : '\(.\)' 2>/dev/null ||
17633 echo X"$ac_file" |
17634     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17635           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17636           /^X\(\/\/\)$/{ s//\1/; q; }
17637           /^X\(\/\).*/{ s//\1/; q; }
17638           s/.*/./; q'`
17639   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17640     { case "$ac_dir" in
17641   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17642   *)                      as_incr_dir=.;;
17643 esac
17644 as_dummy="$ac_dir"
17645 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17646   case $as_mkdir_dir in
17647     # Skip DOS drivespec
17648     ?:) as_incr_dir=$as_mkdir_dir ;;
17649     *)
17650       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17651       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17652     ;;
17653   esac
17654 done; }
17655
17656     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17657     # A "../" for each directory in $ac_dir_suffix.
17658     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17659   else
17660     ac_dir_suffix= ac_dots=
17661   fi
17662
17663   case $srcdir in
17664   .)  ac_srcdir=.
17665       if test -z "$ac_dots"; then
17666          ac_top_srcdir=.
17667       else
17668          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17669       fi ;;
17670   [\\/]* | ?:[\\/]* )
17671       ac_srcdir=$srcdir$ac_dir_suffix;
17672       ac_top_srcdir=$srcdir ;;
17673   *) # Relative path.
17674     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17675     ac_top_srcdir=$ac_dots$srcdir ;;
17676   esac
17677
17678   case $INSTALL in
17679   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17680   *) ac_INSTALL=$ac_dots$INSTALL ;;
17681   esac
17682
17683   if test x"$ac_file" != x-; then
17684     { echo "$as_me:17684: creating $ac_file" >&5
17685 echo "$as_me: creating $ac_file" >&6;}
17686     rm -f "$ac_file"
17687   fi
17688   # Let's still pretend it is `configure' which instantiates (i.e., don't
17689   # use $as_me), people would be surprised to read:
17690   #    /* config.h.  Generated automatically by config.status.  */
17691   configure_input="Generated automatically from `echo $ac_file_in |
17692                                                  sed 's,.*/,,'` by configure."
17693
17694   # First look for the input files in the build tree, otherwise in the
17695   # src tree.
17696   ac_file_inputs=`IFS=:
17697     for f in $ac_file_in; do
17698       case $f in
17699       -) echo $tmp/stdin ;;
17700       [\\/$]*)
17701          # Absolute (can't be DOS-style, as IFS=:)
17702          test -f "$f" || { { echo "$as_me:17702: error: cannot find input file: $f" >&5
17703 echo "$as_me: error: cannot find input file: $f" >&2;}
17704    { (exit 1); exit 1; }; }
17705          echo $f;;
17706       *) # Relative
17707          if test -f "$f"; then
17708            # Build tree
17709            echo $f
17710          elif test -f "$srcdir/$f"; then
17711            # Source tree
17712            echo $srcdir/$f
17713          else
17714            # /dev/null tree
17715            { { echo "$as_me:17715: error: cannot find input file: $f" >&5
17716 echo "$as_me: error: cannot find input file: $f" >&2;}
17717    { (exit 1); exit 1; }; }
17718          fi;;
17719       esac
17720     done` || { (exit 1); exit 1; }
17721 EOF
17722 cat >>$CONFIG_STATUS <<EOF
17723   sed "$ac_vpsub
17724 $extrasub
17725 EOF
17726 cat >>$CONFIG_STATUS <<\EOF
17727 :t
17728 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17729 s,@configure_input@,$configure_input,;t t
17730 s,@srcdir@,$ac_srcdir,;t t
17731 s,@top_srcdir@,$ac_top_srcdir,;t t
17732 s,@INSTALL@,$ac_INSTALL,;t t
17733 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17734   rm -f $tmp/stdin
17735   if test x"$ac_file" != x-; then
17736     mv $tmp/out $ac_file
17737   else
17738     cat $tmp/out
17739     rm -f $tmp/out
17740   fi
17741
17742 done
17743 EOF
17744 cat >>$CONFIG_STATUS <<\EOF
17745
17746 #
17747 # CONFIG_HEADER section.
17748 #
17749
17750 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17751 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17752 #
17753 # ac_d sets the value in "#define NAME VALUE" lines.
17754 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17755 ac_dB='[        ].*$,\1#\2'
17756 ac_dC=' '
17757 ac_dD=',;t'
17758 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17759 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17760 ac_iB='\([      ]\),\1#\2define\3'
17761 ac_iC=' '
17762 ac_iD='\4,;t'
17763 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17764 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17765 ac_uB='$,\1#\2define\3'
17766 ac_uC=' '
17767 ac_uD=',;t'
17768
17769 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17770   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17771   case $ac_file in
17772   - | *:- | *:-:* ) # input from stdin
17773         cat >$tmp/stdin
17774         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17775         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17776   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17777         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17778   * )   ac_file_in=$ac_file.in ;;
17779   esac
17780
17781   test x"$ac_file" != x- && { echo "$as_me:17781: creating $ac_file" >&5
17782 echo "$as_me: creating $ac_file" >&6;}
17783
17784   # First look for the input files in the build tree, otherwise in the
17785   # src tree.
17786   ac_file_inputs=`IFS=:
17787     for f in $ac_file_in; do
17788       case $f in
17789       -) echo $tmp/stdin ;;
17790       [\\/$]*)
17791          # Absolute (can't be DOS-style, as IFS=:)
17792          test -f "$f" || { { echo "$as_me:17792: error: cannot find input file: $f" >&5
17793 echo "$as_me: error: cannot find input file: $f" >&2;}
17794    { (exit 1); exit 1; }; }
17795          echo $f;;
17796       *) # Relative
17797          if test -f "$f"; then
17798            # Build tree
17799            echo $f
17800          elif test -f "$srcdir/$f"; then
17801            # Source tree
17802            echo $srcdir/$f
17803          else
17804            # /dev/null tree
17805            { { echo "$as_me:17805: error: cannot find input file: $f" >&5
17806 echo "$as_me: error: cannot find input file: $f" >&2;}
17807    { (exit 1); exit 1; }; }
17808          fi;;
17809       esac
17810     done` || { (exit 1); exit 1; }
17811   # Remove the trailing spaces.
17812   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17813
17814 EOF
17815
17816 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17817 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17818 # be either 'cat' or 'sort'.
17819 cat confdefs.h | uniq >conftest.vals
17820
17821 # Break up conftest.vals because some shells have a limit on
17822 # the size of here documents, and old seds have small limits too.
17823
17824 rm -f conftest.tail
17825 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17826 while grep . conftest.vals >/dev/null
17827 do
17828   # Write chunks of a limited-size here document to conftest.frag.
17829   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17830   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17831   echo 'CEOF' >> $CONFIG_STATUS
17832   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17833   rm -f conftest.vals
17834   mv conftest.tail conftest.vals
17835 done
17836 rm -f conftest.vals
17837
17838 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17839 # marker @DEFS@.
17840 echo '  cat >> conftest.edit <<CEOF
17841 /@DEFS@/r conftest.frag
17842 /@DEFS@/d
17843 CEOF
17844 sed -f conftest.edit $tmp/in > $tmp/out
17845 rm -f $tmp/in
17846 mv $tmp/out $tmp/in
17847 rm -f conftest.edit conftest.frag
17848 ' >> $CONFIG_STATUS
17849
17850 cat >>$CONFIG_STATUS <<\EOF
17851   # Let's still pretend it is `configure' which instantiates (i.e., don't
17852   # use $as_me), people would be surprised to read:
17853   #    /* config.h.  Generated automatically by config.status.  */
17854   if test x"$ac_file" = x-; then
17855     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17856   else
17857     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17858   fi
17859   cat $tmp/in >>$tmp/config.h
17860   rm -f $tmp/in
17861   if test x"$ac_file" != x-; then
17862     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17863       { echo "$as_me:17863: $ac_file is unchanged" >&5
17864 echo "$as_me: $ac_file is unchanged" >&6;}
17865     else
17866       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17867          X"$ac_file" : 'X\(//\)[^/]' \| \
17868          X"$ac_file" : 'X\(//\)$' \| \
17869          X"$ac_file" : 'X\(/\)' \| \
17870          .     : '\(.\)' 2>/dev/null ||
17871 echo X"$ac_file" |
17872     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17873           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17874           /^X\(\/\/\)$/{ s//\1/; q; }
17875           /^X\(\/\).*/{ s//\1/; q; }
17876           s/.*/./; q'`
17877       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17878         { case "$ac_dir" in
17879   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17880   *)                      as_incr_dir=.;;
17881 esac
17882 as_dummy="$ac_dir"
17883 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17884   case $as_mkdir_dir in
17885     # Skip DOS drivespec
17886     ?:) as_incr_dir=$as_mkdir_dir ;;
17887     *)
17888       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17889       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17890     ;;
17891   esac
17892 done; }
17893
17894       fi
17895       rm -f $ac_file
17896       mv $tmp/config.h $ac_file
17897     fi
17898   else
17899     cat $tmp/config.h
17900     rm -f $tmp/config.h
17901   fi
17902 done
17903 EOF
17904 cat >>$CONFIG_STATUS <<\EOF
17905
17906 #
17907 # CONFIG_COMMANDS section.
17908 #
17909 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17910   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17911   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17912
17913   case $ac_dest in
17914     default )
17915
17916 for cf_dir in test
17917 do
17918         if test ! -d $srcdir/$cf_dir; then
17919                 continue
17920         elif test -f $srcdir/$cf_dir/programs; then
17921                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17922         fi
17923 done
17924
17925         case $cf_cv_system_name in #(vi
17926         OS/2*|os2*) #(vi
17927         LIB_PREFIX=''
17928         ;;
17929         *)      LIB_PREFIX='lib'
17930         ;;
17931         esac
17932 cf_prefix=$LIB_PREFIX
17933
17934 if test $cf_cv_shlib_version = cygdll ; then
17935         TINFO_NAME=$TINFO_ARG_SUFFIX
17936         TINFO_SUFFIX=.dll
17937 fi
17938
17939 for cf_dir in $SRC_SUBDIRS
17940 do
17941         if test ! -d $srcdir/$cf_dir ; then
17942                 continue
17943         elif test -f $srcdir/$cf_dir/modules; then
17944
17945                 SHARED_LIB=
17946                 LIBS_TO_MAKE=
17947                 for cf_item in $cf_LIST_MODELS
17948                 do
17949
17950         case $cf_item in
17951         libtool)
17952                 cf_suffix='.la'
17953                 cf_depsuf=$cf_suffix
17954                 ;;
17955         normal)
17956                 cf_suffix='.a'
17957                 cf_depsuf=$cf_suffix
17958                 ;;
17959         debug)
17960                 cf_suffix='_g.a'
17961                 cf_depsuf=$cf_suffix
17962                 ;;
17963         profile)
17964                 cf_suffix='_p.a'
17965                 cf_depsuf=$cf_suffix
17966                 ;;
17967         shared)
17968                 case $cf_cv_system_name in
17969                 cygwin*)
17970                         cf_suffix='.dll'
17971                         cf_depsuf='.dll.a'
17972                         ;;
17973                 darwin*)
17974                         cf_suffix='.dylib'
17975                         cf_depsuf=$cf_suffix
17976                         ;;
17977                 hpux*)
17978                         case $target in
17979                         ia64*)
17980                                 cf_suffix='.so'
17981                                 cf_depsuf=$cf_suffix
17982                                 ;;
17983                         *)
17984                                 cf_suffix='.sl'
17985                                 cf_depsuf=$cf_suffix
17986                                 ;;
17987                         esac
17988                         ;;
17989                 *)      cf_suffix='.so'
17990                         cf_depsuf=$cf_suffix
17991                         ;;
17992                 esac
17993         esac
17994         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17995         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17996
17997                         if test $cf_item = shared ; then
17998                         if test "$cf_cv_do_symlinks" = yes ; then
17999                                 case "$cf_cv_shlib_version" in #(vi
18000                                 rel) #(vi
18001                                         case "$cf_cv_system_name" in #(vi
18002                                         darwin*)
18003                                         case .${LIB_SUFFIX} in
18004                                         .w*)
18005                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18006                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18007                                                 ;;
18008                                         *)
18009                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18010                                                 ;;
18011                                         esac
18012                                         ;; #(vi
18013                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18014                                         esac
18015                                         ;;
18016                                 abi)
18017                                         case "$cf_cv_system_name" in #(vi
18018                                         darwin*)
18019                                         case .${LIB_SUFFIX} in
18020                                         .w*)
18021                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18022                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18023                                                 ;;
18024                                         *)
18025                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18026                                                 ;;
18027                                         esac
18028                                         ;; #(vi
18029                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18030                                         esac
18031                                         ;;
18032                                 esac
18033                         fi
18034                         # cygwin needs import library, and has unique naming convention
18035                         # use autodetected ${cf_prefix} for import lib and static lib, but
18036                         # use 'cyg' prefix for shared lib.
18037                         if test $cf_cv_shlib_version = cygdll ; then
18038                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18039                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18040                                 continue
18041                         fi
18042                         fi
18043                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18044                 done
18045
18046                 if test $cf_dir = ncurses ; then
18047                         cf_subsets="$LIB_SUBSETS"
18048                         cf_r_parts="$cf_subsets"
18049                         cf_liblist="$LIBS_TO_MAKE"
18050
18051                         while test -n "$cf_r_parts"
18052                         do
18053                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18054                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18055                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18056                                         cf_item=
18057                                         case $cf_l_parts in #(vi
18058                                         *termlib*) #(vi
18059                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18060                                                 ;;
18061                                         *ticlib*)
18062                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18063                                                 ;;
18064                                         *)
18065                                                 break
18066                                                 ;;
18067                                         esac
18068                                         if test -n "$cf_item"; then
18069                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18070                                         fi
18071                                 else
18072                                         break
18073                                 fi
18074                         done
18075                 else
18076                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18077                 fi
18078
18079                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18080                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18081                         $cf_dir/Makefile >$cf_dir/Makefile.out
18082                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18083
18084                 $AWK -f $srcdir/mk-0th.awk \
18085                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18086                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18087
18088                 for cf_subset in $cf_subsets
18089                 do
18090                         cf_subdirs=
18091                         for cf_item in $cf_LIST_MODELS
18092                         do
18093                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18094
18095 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18096
18097         case $cf_item in
18098         libtool)
18099                 cf_suffix='.la'
18100                 cf_depsuf=$cf_suffix
18101                 ;;
18102         normal)
18103                 cf_suffix='.a'
18104                 cf_depsuf=$cf_suffix
18105                 ;;
18106         debug)
18107                 cf_suffix='_g.a'
18108                 cf_depsuf=$cf_suffix
18109                 ;;
18110         profile)
18111                 cf_suffix='_p.a'
18112                 cf_depsuf=$cf_suffix
18113                 ;;
18114         shared)
18115                 case $cf_cv_system_name in
18116                 cygwin*)
18117                         cf_suffix='.dll'
18118                         cf_depsuf='.dll.a'
18119                         ;;
18120                 darwin*)
18121                         cf_suffix='.dylib'
18122                         cf_depsuf=$cf_suffix
18123                         ;;
18124                 hpux*)
18125                         case $target in
18126                         ia64*)
18127                                 cf_suffix='.so'
18128                                 cf_depsuf=$cf_suffix
18129                                 ;;
18130                         *)
18131                                 cf_suffix='.sl'
18132                                 cf_depsuf=$cf_suffix
18133                                 ;;
18134                         esac
18135                         ;;
18136                 *)      cf_suffix='.so'
18137                         cf_depsuf=$cf_suffix
18138                         ;;
18139                 esac
18140         esac
18141         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18142         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18143
18144         case $cf_item in
18145         libtool) cf_subdir='obj_lo'  ;;
18146         normal)  cf_subdir='objects' ;;
18147         debug)   cf_subdir='obj_g' ;;
18148         profile) cf_subdir='obj_p' ;;
18149         shared)
18150                 case $cf_cv_system_name in #(vi
18151                 cygwin) #(vi
18152                         cf_subdir='objects' ;;
18153                 *)
18154                         cf_subdir='obj_s' ;;
18155                 esac
18156         esac
18157
18158                         # Test for case where we build libtinfo with a different name.
18159                         cf_libname=$cf_dir
18160                         if test $cf_dir = ncurses ; then
18161                                 case $cf_subset in
18162                                 *base*)
18163                                         cf_libname=${cf_libname}$LIB_SUFFIX
18164                                         ;;
18165                                 *termlib*)
18166                                         cf_libname=$TINFO_LIB_SUFFIX
18167                                         ;;
18168                                 ticlib*)
18169                                         cf_libname=$TICS_LIB_SUFFIX
18170                                         ;;
18171                                 esac
18172                         else
18173                                 cf_libname=${cf_libname}$LIB_SUFFIX
18174                         fi
18175                         if test -n "${DFT_ARG_SUFFIX}" ; then
18176                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18177                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18178                         fi
18179
18180                         # These dependencies really are for development, not
18181                         # builds, but they are useful in porting, too.
18182                         cf_depend="../include/ncurses_cfg.h"
18183                         if test "$srcdir" = "."; then
18184                                 cf_reldir="."
18185                         else
18186                                 cf_reldir="\${srcdir}"
18187                         fi
18188
18189                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18190                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18191                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18192                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18193                         fi
18194
18195                         cf_dir_suffix=
18196                         old_cf_suffix="$cf_suffix"
18197                         if test "$cf_cv_shlib_version_infix" = yes ; then
18198                         if test -n "$LIB_SUFFIX" ; then
18199                                 case $LIB_SUFFIX in
18200                                 w*)
18201                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18202                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18203                                         cf_dir_suffix=w
18204                                         ;;
18205                                 esac
18206                         fi
18207                         fi
18208
18209                         $AWK -f $srcdir/mk-1st.awk \
18210                                 name=${cf_libname}${cf_dir_suffix} \
18211                                 traces=$LIB_TRACING \
18212                                 MODEL=$cf_ITEM \
18213                                 model=$cf_subdir \
18214                                 prefix=$cf_prefix \
18215                                 suffix=$cf_suffix \
18216                                 subset=$cf_subset \
18217                                 TermlibRoot=$TINFO_NAME \
18218                                 TermlibSuffix=$TINFO_SUFFIX \
18219                                 ShlibVer=$cf_cv_shlib_version \
18220                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18221                                 ReLink=${cf_cv_do_relink-no} \
18222                                 DoLinks=$cf_cv_do_symlinks \
18223                                 rmSoLocs=$cf_cv_rm_so_locs \
18224                                 ldconfig="$LDCONFIG" \
18225                                 overwrite=$WITH_OVERWRITE \
18226                                 depend="$cf_depend" \
18227                                 host="$host" \
18228                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18229
18230                         cf_suffix="$old_cf_suffix"
18231
18232                         for cf_subdir2 in $cf_subdirs lib
18233                         do
18234                                 test $cf_subdir = $cf_subdir2 && break
18235                         done
18236                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18237                         $AWK -f $srcdir/mk-2nd.awk \
18238                                 name=$cf_dir \
18239                                 traces=$LIB_TRACING \
18240                                 MODEL=$cf_ITEM \
18241                                 model=$cf_subdir \
18242                                 subset=$cf_subset \
18243                                 srcdir=$srcdir \
18244                                 echo=$WITH_ECHO \
18245                                 crenames=$cf_cv_prog_CC_c_o \
18246                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18247                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18248                         cf_subdirs="$cf_subdirs $cf_subdir"
18249                         done
18250                 done
18251         fi
18252
18253         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18254 done
18255
18256 for cf_dir in $SRC_SUBDIRS
18257 do
18258         if test ! -d $srcdir/$cf_dir ; then
18259                 continue
18260         fi
18261
18262         if test -f $cf_dir/Makefile ; then
18263                 case "$cf_dir" in
18264                 Ada95) #(vi
18265                         echo 'libs \' >> Makefile
18266                         echo 'install.libs \' >> Makefile
18267                         echo 'uninstall.libs ::' >> Makefile
18268                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18269                         ;;
18270                 esac
18271         fi
18272
18273         if test -f $srcdir/$cf_dir/modules; then
18274                 echo >> Makefile
18275                 if test -f $srcdir/$cf_dir/headers; then
18276 cat >> Makefile <<CF_EOF
18277 install.includes \\
18278 uninstall.includes \\
18279 CF_EOF
18280                 fi
18281 if test "$cf_dir" != "c++" ; then
18282 echo 'lint \' >> Makefile
18283 fi
18284 cat >> Makefile <<CF_EOF
18285 libs \\
18286 lintlib \\
18287 install.libs \\
18288 uninstall.libs \\
18289 install.$cf_dir \\
18290 uninstall.$cf_dir ::
18291         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18292 CF_EOF
18293         elif test -f $srcdir/$cf_dir/headers; then
18294 cat >> Makefile <<CF_EOF
18295
18296 libs \\
18297 install.libs \\
18298 uninstall.libs \\
18299 install.includes \\
18300 uninstall.includes ::
18301         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18302 CF_EOF
18303 fi
18304 done
18305
18306 cat >> Makefile <<CF_EOF
18307
18308 install.libs uninstall.libs \\
18309 install.data uninstall.data ::
18310 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18311 CF_EOF
18312
18313 if test "x$cf_with_manpages" = xyes; then
18314 cat >> Makefile <<CF_EOF
18315
18316 install.man \\
18317 uninstall.man ::
18318         cd man && \${MAKE} \${CF_MFLAGS} \$@
18319 CF_EOF
18320 fi
18321
18322 cat >> Makefile <<CF_EOF
18323
18324 distclean ::
18325         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18326         rm -f headers.sh headers.sed mk_shared_lib.sh
18327         rm -f edit_man.* man_alias.*
18328         rm -rf \${DIRS_TO_MAKE}
18329 CF_EOF
18330
18331 # Special case: tack's manpage lives in its own directory.
18332 if test "x$cf_with_manpages" = xyes; then
18333 if test -d tack ; then
18334 if test -f $srcdir/$tack.h; then
18335 cat >> Makefile <<CF_EOF
18336
18337 install.man \\
18338 uninstall.man ::
18339         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18340 CF_EOF
18341 fi
18342 fi
18343 fi
18344
18345 rm -f headers.sed headers.sh
18346
18347 echo creating headers.sh
18348 cat >headers.sh <<CF_EOF
18349 #! /bin/sh
18350 # This shell script is generated by the 'configure' script.  It is invoked in a
18351 # subdirectory of the build tree.  It generates a sed-script in the parent
18352 # directory that is used to adjust includes for header files that reside in a
18353 # subdirectory of /usr/include, etc.
18354 PRG=""
18355 while test \$# != 3
18356 do
18357 PRG="\$PRG \$1"; shift
18358 done
18359 DST=\$1
18360 REF=\$2
18361 SRC=\$3
18362 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18363 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18364 echo installing \$SRC in \$DST
18365 CF_EOF
18366
18367 if test $WITH_CURSES_H = yes; then
18368         cat >>headers.sh <<CF_EOF
18369 case \$DST in
18370 /*/include/*)
18371         END=\`basename \$DST\`
18372         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18373         do
18374                 NAME=\`basename \$i\`
18375                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18376         done
18377         ;;
18378 *)
18379         echo "" >> \$TMPSED
18380         ;;
18381 esac
18382 CF_EOF
18383
18384 else
18385         cat >>headers.sh <<CF_EOF
18386 case \$DST in
18387 /*/include/*)
18388         END=\`basename \$DST\`
18389         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18390         do
18391                 NAME=\`basename \$i\`
18392                 if test "\$NAME" = "curses.h"
18393                 then
18394                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18395                         NAME=ncurses.h
18396                 fi
18397                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18398         done
18399         ;;
18400 *)
18401         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18402         ;;
18403 esac
18404 CF_EOF
18405 fi
18406 cat >>headers.sh <<CF_EOF
18407 rm -f \$TMPSRC
18408 sed -f \$TMPSED \$SRC > \$TMPSRC
18409 NAME=\`basename \$SRC\`
18410 CF_EOF
18411 if test $WITH_CURSES_H != yes; then
18412         cat >>headers.sh <<CF_EOF
18413 test "\$NAME" = "curses.h" && NAME=ncurses.h
18414 CF_EOF
18415 fi
18416 cat >>headers.sh <<CF_EOF
18417 # Just in case someone gzip'd manpages, remove the conflicting copy.
18418 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18419
18420 eval \$PRG \$TMPSRC \$DST/\$NAME
18421 rm -f \$TMPSRC \$TMPSED
18422 CF_EOF
18423
18424 chmod 0755 headers.sh
18425
18426 for cf_dir in $SRC_SUBDIRS
18427 do
18428         if test ! -d $srcdir/$cf_dir ; then
18429                 continue
18430         fi
18431
18432         if test -f $srcdir/$cf_dir/headers; then
18433                 $AWK -f $srcdir/mk-hdr.awk \
18434                         subset="$LIB_SUBSETS" \
18435                         compat="$WITH_CURSES_H" \
18436                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18437         fi
18438
18439         if test -f $srcdir/$cf_dir/modules; then
18440                 if test "$cf_dir" != "c++" ; then
18441                         cat >>$cf_dir/Makefile <<"CF_EOF"
18442 depend : ${AUTO_SRC}
18443         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18444
18445 # DO NOT DELETE THIS LINE -- make depend depends on it.
18446 CF_EOF
18447                 fi
18448         fi
18449 done
18450
18451  ;;
18452   esac
18453 done
18454 EOF
18455
18456 cat >>$CONFIG_STATUS <<\EOF
18457
18458 { (exit 0); exit 0; }
18459 EOF
18460 chmod +x $CONFIG_STATUS
18461 ac_clean_files=$ac_clean_files_save
18462
18463 # configure is writing to config.log, and then calls config.status.
18464 # config.status does its own redirection, appending to config.log.
18465 # Unfortunately, on DOS this fails, as config.log is still kept open
18466 # by configure, so config.status won't be able to write to it; its
18467 # output is simply discarded.  So we exec the FD to /dev/null,
18468 # effectively closing config.log, so it can be properly (re)opened and
18469 # appended to by config.status.  When coming back to configure, we
18470 # need to make the FD available again.
18471 if test "$no_create" != yes; then
18472   ac_cs_success=:
18473   exec 5>/dev/null
18474   $SHELL $CONFIG_STATUS || ac_cs_success=false
18475   exec 5>>config.log
18476   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18477   # would make configure fail if this is the last instruction.
18478   $ac_cs_success || { (exit 1); exit 1; }
18479 fi
18480 ${MAKE-make} preinstall